@decocms/mesh 2.77.0 → 2.78.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 (155) hide show
  1. package/dist/client/assets/{AlertCircle-oGnqqT1Z.js → AlertCircle-BppvLQSd.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-DyvHGnwT.js → ArrowUp-D26ZQKRa.js} +1 -1
  3. package/dist/client/assets/{Calendar-DH27yGmZ.js → Calendar-DDieAsd2.js} +1 -1
  4. package/dist/client/assets/{Check-BlatIqwx.js → Check-bgVFNRDs.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-A7jAb6dO.js → CheckCircle-D5tJhsvc.js} +1 -1
  6. package/dist/client/assets/{CheckDone01-6mjKztKu.js → CheckDone01-dY3WtOge.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-CCp2JMaE.js → ChevronDown-DY4fpd0G.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BcCazbVH.js → ChevronRight-DMzFQQCc.js} +1 -1
  9. package/dist/client/assets/{Code01-D97OsfSf.js → Code01-7hV4ZDjZ.js} +1 -1
  10. package/dist/client/assets/{Copy01-DGJsTP15.js → Copy01-C35WeFYE.js} +1 -1
  11. package/dist/client/assets/{DotsHorizontal-C2NdUnkY.js → DotsHorizontal-LbVwX-Tq.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BahQdspO.js → DotsVertical-BNqPYTki.js} +1 -1
  13. package/dist/client/assets/{Download01-NaPFxXbm.js → Download01-Cihql6Z7.js} +1 -1
  14. package/dist/client/assets/{Edit01-CSl-FU1V.js → Edit01-DDrpQJgk.js} +1 -1
  15. package/dist/client/assets/{File02-DCmcNtYa.js → File02-GEmd_G7y.js} +1 -1
  16. package/dist/client/assets/{File06-BmPjFHnz.js → File06-888BgyfZ.js} +1 -1
  17. package/dist/client/assets/{FilterLines-Bbx0mrEz.js → FilterLines-Bvkz4XO7.js} +1 -1
  18. package/dist/client/assets/{Globe02-B4QQLqTF.js → Globe02-DSX2gzp_.js} +1 -1
  19. package/dist/client/assets/{Grid01-CXhtcjgR.js → Grid01-CfSiTcO8.js} +1 -1
  20. package/dist/client/assets/{Home02-DTzcdbjE.js → Home02-PhQXF8P6.js} +1 -1
  21. package/dist/client/assets/{Image01-Cw_RHYUi.js → Image01-BUR65REQ.js} +1 -1
  22. package/dist/client/assets/{Inbox01-Cd7KCD-D.js → Inbox01-Bhe6QhSW.js} +1 -1
  23. package/dist/client/assets/{InfoCircle-D87-HsMo.js → InfoCircle-5NZyA5WD.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DAYrBD75.js → LinkExternal01-Cr89LzOE.js} +1 -1
  25. package/dist/client/assets/{List-BOdL1TDJ.js → List-BBkbo-oe.js} +1 -1
  26. package/dist/client/assets/{Loading01-DcUBqOzt.js → Loading01-C2vqzEw-.js} +1 -1
  27. package/dist/client/assets/{Lock01-CJlTX6d9.js → Lock01-ClMI2bMm.js} +1 -1
  28. package/dist/client/assets/{Pin01-Cetrd1z7.js → Pin01-uiXGtZsb.js} +1 -1
  29. package/dist/client/assets/{Play-76i3R5Mg.js → Play-Bm8SKfhZ.js} +1 -1
  30. package/dist/client/assets/{Plus-CBeTqgO0.js → Plus-BMOTPGqH.js} +1 -1
  31. package/dist/client/assets/{RefreshCcw01-qWaidSs5.js → RefreshCcw01-B1tus5Lj.js} +1 -1
  32. package/dist/client/assets/{SearchMd-DlO0jVus.js → SearchMd-BqVXNd65.js} +1 -1
  33. package/dist/client/assets/{Settings01-Dyku2FbW.js → Settings01-CYRp4gjN.js} +1 -1
  34. package/dist/client/assets/{Settings02-CYlXe29M.js → Settings02-BiTxgSpC.js} +1 -1
  35. package/dist/client/assets/{Share07-5RJmIBaS.js → Share07-BZVoNuS6.js} +1 -1
  36. package/dist/client/assets/{Terminal-CwhCdVNd.js → Terminal-DRpoCIsG.js} +1 -1
  37. package/dist/client/assets/{Tool01-SB9NL9XB.js → Tool01-djk7g7Hv.js} +1 -1
  38. package/dist/client/assets/{Trash01-B5rQsNj_.js → Trash01-d4v7i3Ze.js} +1 -1
  39. package/dist/client/assets/{Upload01-up-2G0Zk.js → Upload01-Ci_jklEk.js} +1 -1
  40. package/dist/client/assets/{Users03-YVnet25Q.js → Users03-Bw7fWrTD.js} +1 -1
  41. package/dist/client/assets/{X-CDixI9Fp.js → X-CslJd5Ib.js} +1 -1
  42. package/dist/client/assets/{XClose-9HhuzPl1.js → XClose-CjpNuP8c.js} +1 -1
  43. package/dist/client/assets/{agent-connections-preview-D_HsP759.js → agent-connections-preview-qFrRTce9.js} +1 -1
  44. package/dist/client/assets/{agent-detail-CNliY0im.js → agent-detail-BqrAf6oD.js} +1 -1
  45. package/dist/client/assets/{agents-DSOm54r8.js → agents-DUQt1GSW.js} +1 -1
  46. package/dist/client/assets/{alert-dialog-CezkcFZv.js → alert-dialog-DRso9X1m.js} +1 -1
  47. package/dist/client/assets/{auth-catchall-Ddtu2gr8.js → auth-catchall-CBFb2pC-.js} +1 -1
  48. package/dist/client/assets/{avatar-a-IdsKtd.js → avatar-kY9raA-l.js} +1 -1
  49. package/dist/client/assets/{badge-DyTP00ui.js → badge-DBw6AEaX.js} +1 -1
  50. package/dist/client/assets/{binder-D3g26T9_.js → binder-Jddq1y1v.js} +1 -1
  51. package/dist/client/assets/{breadcrumb-CrQKEc0V.js → breadcrumb-ChH6wfcA.js} +1 -1
  52. package/dist/client/assets/{button-IcLvDS7b.js → button-D_OpQIQm.js} +1 -1
  53. package/dist/client/assets/{card-DPhTtE1j.js → card-DAZxrY9k.js} +1 -1
  54. package/dist/client/assets/{checkbox-BMOSGAPg.js → checkbox-C1Sx9y02.js} +1 -1
  55. package/dist/client/assets/{circle-alert-CUdPHotP.js → circle-alert-DHI8xRUj.js} +1 -1
  56. package/dist/client/assets/collection-detail-mD5cqpxJ.js +26 -0
  57. package/dist/client/assets/{collection-search-C9obF9Ju.js → collection-search-Bkd4qN8a.js} +1 -1
  58. package/dist/client/assets/{collection-tab-B0D5Ge1w.js → collection-tab-Dw5b9EM9.js} +1 -1
  59. package/dist/client/assets/{collection-table-wrapper-B0DqLvbL.js → collection-table-wrapper-DFTdnQhc.js} +1 -1
  60. package/dist/client/assets/{collection-tabs-Bh3_w0C-.js → collection-tabs-N53MF1Jz.js} +1 -1
  61. package/dist/client/assets/{command-xbgaBPKx.js → command-B5nNM5RC.js} +1 -1
  62. package/dist/client/assets/{connect-B1f578pl.js → connect--hPmG576.js} +1 -1
  63. package/dist/client/assets/{connection-card-DzzffrUK.js → connection-card-Ci3H_H7r.js} +1 -1
  64. package/dist/client/assets/{connection-detail-Dc9842ih.js → connection-detail-8nT6j66Y.js} +1 -1
  65. package/dist/client/assets/{connections-DMThZLY2.js → connections-ShazCLrP.js} +1 -1
  66. package/dist/client/assets/constants-1u4R2d-I.js +1 -0
  67. package/dist/client/assets/{constants-Bb6jn5pm.js → constants-DisdEZ3l.js} +1 -1
  68. package/dist/client/assets/{create-organization-dialog-Cv4z3yf1.js → create-organization-dialog-Ca5pwwfH.js} +1 -1
  69. package/dist/client/assets/{create-project-dialog-B-TMsdZD.js → create-project-dialog-BDfz4rOz.js} +1 -1
  70. package/dist/client/assets/{dialog-BP68A3-r.js → dialog-BPL7ZvPc.js} +1 -1
  71. package/dist/client/assets/{dropdown-menu-C0weu07S.js → dropdown-menu-BxLN4KkF.js} +1 -1
  72. package/dist/client/assets/{dynamic-plugin-layout-C3YR0WSk.js → dynamic-plugin-layout-D9dQ0ajA.js} +1 -1
  73. package/dist/client/assets/{empty-state-BY2kT0YF.js → empty-state-CbIU_RrP.js} +1 -1
  74. package/dist/client/assets/{empty-state-CcIz0DtW.js → empty-state-DXJM9xrV.js} +1 -1
  75. package/dist/client/assets/{env-vars-editor-DJJKlTL9.js → env-vars-editor-BbjrljLQ.js} +1 -1
  76. package/dist/client/assets/{error-boundary-Dxa9vN4s.js → error-boundary-BMH0CjEH.js} +1 -1
  77. package/dist/client/assets/{estree-BOE5AzoZ.js → estree-CwOGYdhi.js} +2 -2
  78. package/dist/client/assets/{extract-connection-data-qxA4zC_1.js → extract-connection-data-wB5jtXsg.js} +1 -1
  79. package/dist/client/assets/{file-browser-C4JlHX7p.js → file-browser-DBOCTon5.js} +2 -2
  80. package/dist/client/assets/{form-CPbw8FiC.js → form-BpiblhO1.js} +1 -1
  81. package/dist/client/assets/{grid-view-Pi_wFmga.js → grid-view-Bty4YwjE.js} +1 -1
  82. package/dist/client/assets/{home-D9pqYJxL.js → home-BIvstm5O.js} +1 -1
  83. package/dist/client/assets/{index-DIqndGeg.js → index--vZ0X2xS.js} +1 -1
  84. package/dist/client/assets/{index-CV7G73w0.js → index-B9-4goiW.js} +1 -1
  85. package/dist/client/assets/{index-ChHDKIbN.js → index-BKpxPW_G.js} +6 -6
  86. package/dist/client/assets/{index-BQaDRMwA.js → index-BV_k_ZyP.js} +1 -1
  87. package/dist/client/assets/{index-DauKEk3R.js → index-B_142IPp.js} +2 -2
  88. package/dist/client/assets/{index-BE8lTkR-.js → index-CnNzyZrg.js} +1 -1
  89. package/dist/client/assets/{index-CIjJkh1w.js → index-D-_nr7La.js} +1 -1
  90. package/dist/client/assets/index-D0nVkmnC.js +25 -0
  91. package/dist/client/assets/{index-Bofa5A4c.js → index-fVGDVKMq.js} +1 -1
  92. package/dist/client/assets/{infiniteQueryObserver-BJxHLYt6.js → infiniteQueryObserver-B8M15Jhm.js} +1 -1
  93. package/dist/client/assets/{input-BiH6tKYM.js → input-lpAGMNlp.js} +1 -1
  94. package/dist/client/assets/{integration-icon-D8EX8kVH.js → integration-icon-DFSc5_D8.js} +1 -1
  95. package/dist/client/assets/{label-CL-z0zvN.js → label-h0it3r-G.js} +1 -1
  96. package/dist/client/assets/{layout-DS9ZU1FV.js → layout-DaBTH10o.js} +1 -1
  97. package/dist/client/assets/{localstorage-keys-CglJRhni.js → localstorage-keys-CrJngaoW.js} +1 -1
  98. package/dist/client/assets/{login-CQ4DI182.js → login-DX4NlTrd.js} +1 -1
  99. package/dist/client/assets/{mcp-oauth-pNbworXN.js → mcp-oauth-DQYLB8aB.js} +1 -1
  100. package/dist/client/assets/{mcp-server-card-CiBv2daD.js → mcp-server-card-fBAhOAUG.js} +1 -1
  101. package/dist/client/assets/{mcp-server-detail-CWlOVXjE.js → mcp-server-detail-BZkrf0kt.js} +2 -2
  102. package/dist/client/assets/{members-DP31FB6R.js → members-BigA6ZKR.js} +1 -1
  103. package/dist/client/assets/{monaco-editor-B3-QQ48f.js → monaco-editor-DZSx9WV6.js} +2 -2
  104. package/dist/client/assets/{monitoring-CEJjhEzo.js → monitoring-cMb0Xapp.js} +3 -3
  105. package/dist/client/assets/{oauth-callback-DwNVkFW_.js → oauth-callback-CjSC6FG1.js} +1 -1
  106. package/dist/client/assets/{page-UBkAPmC5.js → page-BDwNfQ-N.js} +1 -1
  107. package/dist/client/assets/{page-BYKRtBSp.js → page-jq7pkske.js} +1 -1
  108. package/dist/client/assets/{plugin-empty-state-BpFO_GZ3.js → plugin-empty-state-CIjn_En1.js} +1 -1
  109. package/dist/client/assets/{plugin-header-COGg6PEu.js → plugin-header-DxKd-JRE.js} +1 -1
  110. package/dist/client/assets/{popover-JVz1MvYo.js → popover-ESVk6nXT.js} +1 -1
  111. package/dist/client/assets/{project-layout-D_GhuXhx.js → project-layout-DOGEQwDl.js} +1 -1
  112. package/dist/client/assets/{project-settings-YCZbbN-X.js → project-settings-DPjoRdOS.js} +1 -1
  113. package/dist/client/assets/{projects-list-DK4ua0bt.js → projects-list-BSPk4OqL.js} +1 -1
  114. package/dist/client/assets/{registry-utils-BAvR5D-B.js → registry-utils-yxVJe3X4.js} +1 -1
  115. package/dist/client/assets/{resizable-Z1lo2KUF.js → resizable-fcBWjaSA.js} +1 -1
  116. package/dist/client/assets/{select-DWWlFXcM.js → select-BbzYJ4VF.js} +1 -1
  117. package/dist/client/assets/{shell-layout-j0caJ6cv.js → shell-layout-DlF3XvPK.js} +1 -1
  118. package/dist/client/assets/{spinner-DDglcYN3.js → spinner-Lv2khbLw.js} +1 -1
  119. package/dist/client/assets/{store-invite-DE3oTPEQ.js → store-invite-Bg3OdZwq.js} +1 -1
  120. package/dist/client/assets/{switch-BU39MRXa.js → switch-sdaV-SJo.js} +1 -1
  121. package/dist/client/assets/{table-DkKXRH0o.js → table-BxUix49E.js} +1 -1
  122. package/dist/client/assets/{tasks-B5becd8b.js → tasks-Bl2i_lGW.js} +1 -1
  123. package/dist/client/assets/{textarea-B0H-V_2P.js → textarea-BRJpMcB0.js} +1 -1
  124. package/dist/client/assets/{tools-list-BPmcCiBX.js → tools-list-Cmzz8Wet.js} +1 -1
  125. package/dist/client/assets/{topbar-portal-COlO8Xo1.js → topbar-portal-bqTUj07t.js} +1 -1
  126. package/dist/client/assets/{typewriter-title-Bwf3Eryu.js → typewriter-title-BPMIdq0b.js} +1 -1
  127. package/dist/client/assets/{use-binding-BF44Dr3v.js → use-binding-DMsO_03X.js} +1 -1
  128. package/dist/client/assets/{use-connection-DMc1ed7A.js → use-connection-B0740Saa.js} +1 -1
  129. package/dist/client/assets/{use-create-virtual-mcp-DFreYzbI.js → use-create-virtual-mcp-lh01_aoW.js} +1 -1
  130. package/dist/client/assets/{use-deco-chat-open-C_KGQyGq.js → use-deco-chat-open-B2KYtTue.js} +2 -2
  131. package/dist/client/assets/{use-install-from-registry--Nvk5mQH.js → use-install-from-registry-BjKzt3Pz.js} +1 -1
  132. package/dist/client/assets/{use-list-state-BHsqFECN.js → use-list-state-DNfSCsX5.js} +1 -1
  133. package/dist/client/assets/{use-llm-B0wA4ukF.js → use-llm-D28vq8-j.js} +1 -1
  134. package/dist/client/assets/{use-mcp-prompts-DnDIhnz1.js → use-mcp-prompts-FoVTG9k7.js} +1 -1
  135. package/dist/client/assets/{use-mcp-tools-D7_YQODs.js → use-mcp-tools-DF65_5AL.js} +1 -1
  136. package/dist/client/assets/{use-mobile-DKBgr338.js → use-mobile-Cu9U-yCu.js} +1 -1
  137. package/dist/client/assets/{use-organization-settings-DhaOb6f0.js → use-organization-settings-CPNBbiln.js} +1 -1
  138. package/dist/client/assets/{use-project-DuJfQ5Lc.js → use-project-CuNldV92.js} +1 -1
  139. package/dist/client/assets/{use-virtual-mcp-Dx2SDNW7.js → use-virtual-mcp-BUCuQhrG.js} +1 -1
  140. package/dist/client/assets/useInfiniteQuery-CsMrU_k5.js +1 -0
  141. package/dist/client/assets/{useMutation-CR-ZbATX.js → useMutation-Bnsod7M-.js} +1 -1
  142. package/dist/client/assets/useQuery-Bo6lCSyK.js +1 -0
  143. package/dist/client/assets/utils-Ckp7rFN8.js +1 -0
  144. package/dist/client/assets/{view-mode-toggle-DL3lAsm5.js → view-mode-toggle-4jMhv4Z3.js} +1 -1
  145. package/dist/client/assets/{workflow-COg9B_We.js → workflow-BrBoF9SG.js} +1 -1
  146. package/dist/client/index.html +1 -1
  147. package/dist/server/cli.js +151 -148
  148. package/dist/server/server.js +126 -123
  149. package/package.json +1 -1
  150. package/dist/client/assets/collection-detail-CVwTrXbU.js +0 -26
  151. package/dist/client/assets/constants-D3p69qeS.js +0 -1
  152. package/dist/client/assets/index-Dw0obvD7.js +0 -25
  153. package/dist/client/assets/useInfiniteQuery-l-SVnEZQ.js +0 -1
  154. package/dist/client/assets/useQuery-t9jS7IDj.js +0 -1
  155. package/dist/client/assets/utils-B_eWxCLR.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-C4JlHX7p.js","assets/topbar-portal-COlO8Xo1.js","assets/useInfiniteQuery-l-SVnEZQ.js","assets/infiniteQueryObserver-BJxHLYt6.js","assets/button-IcLvDS7b.js","assets/utils-B_eWxCLR.js","assets/checkbox-BMOSGAPg.js","assets/Check-BlatIqwx.js","assets/AlertCircle-oGnqqT1Z.js","assets/ChevronRight-BcCazbVH.js","assets/Download01-NaPFxXbm.js","assets/File02-DCmcNtYa.js","assets/Grid01-CXhtcjgR.js","assets/Home02-DTzcdbjE.js","assets/List-BOdL1TDJ.js","assets/Loading01-DcUBqOzt.js","assets/Trash01-B5rQsNj_.js","assets/Upload01-up-2G0Zk.js","assets/useMutation-CR-ZbATX.js","assets/plugin-header-COGg6PEu.js","assets/ChevronDown-CCp2JMaE.js","assets/login-CQ4DI182.js","assets/input-BiH6tKYM.js","assets/connect-B1f578pl.js","assets/useQuery-t9jS7IDj.js","assets/card-DPhTtE1j.js","assets/mcp-oauth-pNbworXN.js","assets/circle-alert-CUdPHotP.js","assets/oauth-callback-DwNVkFW_.js","assets/shell-layout-j0caJ6cv.js","assets/index-DauKEk3R.js","assets/X-CDixI9Fp.js","assets/use-deco-chat-open-C_KGQyGq.js","assets/constants-Bb6jn5pm.js","assets/use-virtual-mcp-Dx2SDNW7.js","assets/use-connection-DMc1ed7A.js","assets/use-llm-B0wA4ukF.js","assets/use-binding-BF44Dr3v.js","assets/binder-D3g26T9_.js","assets/Code01-D97OsfSf.js","assets/localstorage-keys-CglJRhni.js","assets/popover-JVz1MvYo.js","assets/select-DWWlFXcM.js","assets/index-Bofa5A4c.js","assets/error-boundary-Dxa9vN4s.js","assets/File06-BmPjFHnz.js","assets/Image01-Cw_RHYUi.js","assets/RefreshCcw01-qWaidSs5.js","assets/SearchMd-DlO0jVus.js","assets/spinner-DDglcYN3.js","assets/integration-icon-D8EX8kVH.js","assets/use-mcp-prompts-DnDIhnz1.js","assets/dialog-BP68A3-r.js","assets/form-CPbw8FiC.js","assets/label-CL-z0zvN.js","assets/ArrowUp-DyvHGnwT.js","assets/Edit01-CSl-FU1V.js","assets/Users03-YVnet25Q.js","assets/Copy01-DGJsTP15.js","assets/Terminal-CwhCdVNd.js","assets/monaco-editor-B3-QQ48f.js","assets/empty-state-CcIz0DtW.js","assets/generate-id-Dyweu44Y.js","assets/badge-DyTP00ui.js","assets/use-create-virtual-mcp-DFreYzbI.js","assets/index-CV7G73w0.js","assets/typewriter-title-Bwf3Eryu.js","assets/Plus-CBeTqgO0.js","assets/create-project-dialog-B-TMsdZD.js","assets/textarea-B0H-V_2P.js","assets/CheckDone01-6mjKztKu.js","assets/use-project-DuJfQ5Lc.js","assets/use-mobile-DKBgr338.js","assets/avatar-a-IdsKtd.js","assets/Inbox01-Cd7KCD-D.js","assets/XClose-9HhuzPl1.js","assets/Settings02-CYlXe29M.js","assets/create-organization-dialog-Cv4z3yf1.js","assets/alert-dialog-CezkcFZv.js","assets/switch-BU39MRXa.js","assets/use-organization-settings-DhaOb6f0.js","assets/dropdown-menu-C0weu07S.js","assets/LinkExternal01-DAYrBD75.js","assets/Settings01-Dyku2FbW.js","assets/resizable-Z1lo2KUF.js","assets/home-D9pqYJxL.js","assets/project-layout-D_GhuXhx.js","assets/page-BYKRtBSp.js","assets/Pin01-Cetrd1z7.js","assets/Share07-5RJmIBaS.js","assets/tasks-B5becd8b.js","assets/breadcrumb-CrQKEc0V.js","assets/project-settings-YCZbbN-X.js","assets/use-install-from-registry--Nvk5mQH.js","assets/extract-connection-data-qxA4zC_1.js","assets/constants-D3p69qeS.js","assets/github-icon-Dp3wHhYE.js","assets/registry-utils-BAvR5D-B.js","assets/projects-list-DK4ua0bt.js","assets/collection-search-C9obF9Ju.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/members-DP31FB6R.js","assets/collection-table-wrapper-B0DqLvbL.js","assets/view-mode-toggle-DL3lAsm5.js","assets/table-DkKXRH0o.js","assets/command-xbgaBPKx.js","assets/index-BE8lTkR-.js","assets/DotsHorizontal-C2NdUnkY.js","assets/Lock01-CJlTX6d9.js","assets/DotsVertical-BahQdspO.js","assets/connections-DMThZLY2.js","assets/connection-card-DzzffrUK.js","assets/CheckCircle-A7jAb6dO.js","assets/use-list-state-BHsqFECN.js","assets/use-mcp-tools-D7_YQODs.js","assets/Globe02-B4QQLqTF.js","assets/env-vars-editor-DJJKlTL9.js","assets/connection-detail-Dc9842ih.js","assets/index-BQaDRMwA.js","assets/index-Dw0obvD7.js","assets/index-DIqndGeg.js","assets/collection-tabs-Bh3_w0C-.js","assets/layout-DS9ZU1FV.js","assets/collection-tab-B0D5Ge1w.js","assets/empty-state-BY2kT0YF.js","assets/tools-list-BPmcCiBX.js","assets/tools-list-DWnTz46N.css","assets/collection-detail-CVwTrXbU.js","assets/Play-76i3R5Mg.js","assets/Calendar-DH27yGmZ.js","assets/Tool01-SB9NL9XB.js","assets/monitoring-CEJjhEzo.js","assets/FilterLines-Bbx0mrEz.js","assets/page-UBkAPmC5.js","assets/slugify-CEUa2lfQ.js","assets/mcp-server-card-CiBv2daD.js","assets/mcp-server-detail-CWlOVXjE.js","assets/InfoCircle-D87-HsMo.js","assets/agents-DSOm54r8.js","assets/agent-connections-preview-D_HsP759.js","assets/agent-detail-CNliY0im.js","assets/workflow-COg9B_We.js","assets/dynamic-plugin-layout-C3YR0WSk.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-DBOCTon5.js","assets/topbar-portal-bqTUj07t.js","assets/useInfiniteQuery-CsMrU_k5.js","assets/infiniteQueryObserver-B8M15Jhm.js","assets/button-D_OpQIQm.js","assets/utils-Ckp7rFN8.js","assets/checkbox-C1Sx9y02.js","assets/Check-bgVFNRDs.js","assets/AlertCircle-BppvLQSd.js","assets/ChevronRight-DMzFQQCc.js","assets/Download01-Cihql6Z7.js","assets/File02-GEmd_G7y.js","assets/Grid01-CfSiTcO8.js","assets/Home02-PhQXF8P6.js","assets/List-BBkbo-oe.js","assets/Loading01-C2vqzEw-.js","assets/Trash01-d4v7i3Ze.js","assets/Upload01-Ci_jklEk.js","assets/useMutation-Bnsod7M-.js","assets/plugin-header-DxKd-JRE.js","assets/ChevronDown-DY4fpd0G.js","assets/login-DX4NlTrd.js","assets/input-lpAGMNlp.js","assets/connect--hPmG576.js","assets/useQuery-Bo6lCSyK.js","assets/card-DAZxrY9k.js","assets/mcp-oauth-DQYLB8aB.js","assets/circle-alert-DHI8xRUj.js","assets/oauth-callback-CjSC6FG1.js","assets/shell-layout-DlF3XvPK.js","assets/index-B_142IPp.js","assets/X-CslJd5Ib.js","assets/use-deco-chat-open-B2KYtTue.js","assets/constants-DisdEZ3l.js","assets/use-virtual-mcp-BUCuQhrG.js","assets/use-connection-B0740Saa.js","assets/use-llm-D28vq8-j.js","assets/use-binding-DMsO_03X.js","assets/binder-Jddq1y1v.js","assets/Code01-7hV4ZDjZ.js","assets/localstorage-keys-CrJngaoW.js","assets/popover-ESVk6nXT.js","assets/select-BbzYJ4VF.js","assets/index-fVGDVKMq.js","assets/error-boundary-BMH0CjEH.js","assets/File06-888BgyfZ.js","assets/Image01-BUR65REQ.js","assets/RefreshCcw01-B1tus5Lj.js","assets/SearchMd-BqVXNd65.js","assets/spinner-Lv2khbLw.js","assets/integration-icon-DFSc5_D8.js","assets/use-mcp-prompts-FoVTG9k7.js","assets/dialog-BPL7ZvPc.js","assets/form-BpiblhO1.js","assets/label-h0it3r-G.js","assets/ArrowUp-D26ZQKRa.js","assets/Edit01-DDrpQJgk.js","assets/Users03-Bw7fWrTD.js","assets/Copy01-C35WeFYE.js","assets/Terminal-DRpoCIsG.js","assets/monaco-editor-DZSx9WV6.js","assets/empty-state-DXJM9xrV.js","assets/generate-id-Dyweu44Y.js","assets/badge-DBw6AEaX.js","assets/use-create-virtual-mcp-lh01_aoW.js","assets/index-B9-4goiW.js","assets/typewriter-title-BPMIdq0b.js","assets/Plus-BMOTPGqH.js","assets/create-project-dialog-BDfz4rOz.js","assets/textarea-BRJpMcB0.js","assets/CheckDone01-dY3WtOge.js","assets/use-project-CuNldV92.js","assets/use-mobile-Cu9U-yCu.js","assets/avatar-kY9raA-l.js","assets/Inbox01-Bhe6QhSW.js","assets/XClose-CjpNuP8c.js","assets/Settings02-BiTxgSpC.js","assets/create-organization-dialog-Ca5pwwfH.js","assets/alert-dialog-DRso9X1m.js","assets/switch-sdaV-SJo.js","assets/use-organization-settings-CPNBbiln.js","assets/dropdown-menu-BxLN4KkF.js","assets/LinkExternal01-Cr89LzOE.js","assets/Settings01-CYRp4gjN.js","assets/resizable-fcBWjaSA.js","assets/home-BIvstm5O.js","assets/project-layout-DOGEQwDl.js","assets/page-jq7pkske.js","assets/Pin01-uiXGtZsb.js","assets/Share07-BZVoNuS6.js","assets/tasks-Bl2i_lGW.js","assets/breadcrumb-ChH6wfcA.js","assets/project-settings-DPjoRdOS.js","assets/use-install-from-registry-BjKzt3Pz.js","assets/extract-connection-data-wB5jtXsg.js","assets/constants-1u4R2d-I.js","assets/github-icon-Dp3wHhYE.js","assets/registry-utils-yxVJe3X4.js","assets/projects-list-BSPk4OqL.js","assets/collection-search-Bkd4qN8a.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/members-BigA6ZKR.js","assets/collection-table-wrapper-DFTdnQhc.js","assets/view-mode-toggle-4jMhv4Z3.js","assets/table-BxUix49E.js","assets/command-B5nNM5RC.js","assets/index-CnNzyZrg.js","assets/DotsHorizontal-LbVwX-Tq.js","assets/Lock01-ClMI2bMm.js","assets/DotsVertical-BNqPYTki.js","assets/connections-ShazCLrP.js","assets/connection-card-Ci3H_H7r.js","assets/CheckCircle-D5tJhsvc.js","assets/use-list-state-DNfSCsX5.js","assets/use-mcp-tools-DF65_5AL.js","assets/Globe02-DSX2gzp_.js","assets/env-vars-editor-BbjrljLQ.js","assets/connection-detail-8nT6j66Y.js","assets/index-BV_k_ZyP.js","assets/index-D0nVkmnC.js","assets/index--vZ0X2xS.js","assets/collection-tabs-N53MF1Jz.js","assets/layout-DaBTH10o.js","assets/collection-tab-Dw5b9EM9.js","assets/empty-state-CbIU_RrP.js","assets/tools-list-Cmzz8Wet.js","assets/tools-list-DWnTz46N.css","assets/collection-detail-mD5cqpxJ.js","assets/Play-Bm8SKfhZ.js","assets/Calendar-DDieAsd2.js","assets/Tool01-djk7g7Hv.js","assets/monitoring-cMb0Xapp.js","assets/FilterLines-Bvkz4XO7.js","assets/page-BDwNfQ-N.js","assets/slugify-CEUa2lfQ.js","assets/mcp-server-card-fBAhOAUG.js","assets/mcp-server-detail-BZkrf0kt.js","assets/InfoCircle-5NZyA5WD.js","assets/agents-DUQt1GSW.js","assets/agent-connections-preview-qFrRTce9.js","assets/agent-detail-BqrAf6oD.js","assets/workflow-BrBoF9SG.js","assets/dynamic-plugin-layout-D9dQ0ajA.js"])))=>i.map(i=>d[i]);
2
2
  function DD(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 l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).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 LD="modulepreload",jD=function(e){return"/"+e},qR={},Jt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=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=l(n.map(f=>{if(f=jD(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":LD,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(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var Vre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vy={exports:{}},hu={};var HR;function $D(){if(HR)return hu;HR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var l=null;if(i!==void 0&&(l=""+i),a.key!==void 0&&(l=""+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:l,ref:a!==void 0?a:null,props:i}}return hu.Fragment=t,hu.jsx=n,hu.jsxs=n,hu}var GR;function UD(){return GR||(GR=1,vy.exports=$D()),vy.exports}var x=UD(),yy={exports:{}},pu={},_y={exports:{}},by={};var ZR;function zD(){return ZR||(ZR=1,(function(e){function t(B,W){var Y=B.length;B.push(W);e:for(;0<Y;){var pe=Y-1>>>1,ae=B[pe];if(0<a(ae,W))B[pe]=W,B[Y]=ae,Y=pe;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],Y=B.pop();if(Y!==W){B[0]=Y;e:for(var pe=0,ae=B.length,M=ae>>>1;pe<M;){var q=2*(pe+1)-1,F=B[q],L=q+1,z=B[L];if(0>a(F,Y))L<ae&&0>a(z,F)?(B[pe]=z,B[L]=Y,pe=L):(B[pe]=F,B[q]=Y,pe=q);else if(L<ae&&0>a(z,Y))B[pe]=z,B[L]=Y,pe=L;else break e}}return W}function a(B,W){var Y=B.sortIndex-W.sortIndex;return Y!==0?Y:B.id-W.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 l=Date,u=l.now();e.unstable_now=function(){return l.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(B){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=B)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function C(B){if(S=!1,O(B),!w)if(n(d)!==null)w=!0,I||(I=!0,G());else{var W=n(f);W!==null&&le(C,W.startTime-B)}}var I=!1,N=-1,P=5,$=-1;function K(){return b?!0:!(e.unstable_now()-$<P)}function V(){if(b=!1,I){var B=e.unstable_now();$=B;var W=!0;try{e:{w=!1,S&&(S=!1,R(N),N=-1),y=!0;var Y=g;try{t:{for(O(B),p=n(d);p!==null&&!(p.expirationTime>B&&K());){var pe=p.callback;if(typeof pe=="function"){p.callback=null,g=p.priorityLevel;var ae=pe(p.expirationTime<=B);if(B=e.unstable_now(),typeof ae=="function"){p.callback=ae,O(B),W=!0;break t}p===n(d)&&r(d),O(B)}else r(d);p=n(d)}if(p!==null)W=!0;else{var M=n(f);M!==null&&le(C,M.startTime-B),W=!1}}break e}finally{p=null,g=Y,y=!1}W=void 0}}finally{W?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(B,W){N=E(function(){B(e.unstable_now())},W)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var Y=g;g=W;try{return B()}finally{g=Y}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Y=g;g=B;try{return W()}finally{g=Y}},e.unstable_scheduleCallback=function(B,W,Y){var pe=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?pe+Y:pe):Y=pe,B){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=Y+ae,B={id:m++,callback:W,priorityLevel:B,startTime:Y,expirationTime:ae,sortIndex:-1},Y>pe?(B.sortIndex=Y,t(f,B),n(d)===null&&B===n(f)&&(S?(R(N),N=-1):S=!0,le(C,Y-pe))):(B.sortIndex=ae,t(d,B),w||y||(w=!0,I||(I=!0,G()))),B},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(B){var W=g;return function(){var Y=g;g=W;try{return B.apply(this,arguments)}finally{g=Y}}}})(by)),by}var KR;function VD(){return KR||(KR=1,_y.exports=zD()),_y.exports}var wy={exports:{}},tt={};var WR;function FD(){if(WR)return tt;WR=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"),l=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(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function E(M,q,F){this.props=M,this.context=q,this.refs=b,this.updater=F||w}E.prototype.isReactComponent={},E.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},E.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function R(){}R.prototype=E.prototype;function T(M,q,F){this.props=M,this.context=q,this.refs=b,this.updater=F||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 $(M,q,F){var L=F.ref;return{$$typeof:e,type:M,key:q,ref:L!==void 0?L:null,props:F}}function K(M,q){return $(M.type,q,M.props)}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function G(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(F){return q[F]})}var U=/\/+/g;function J(M,q){return typeof M=="object"&&M!==null&&M.key!=null?G(""+M.key):q.toString(36)}function le(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(I,I):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,q,F,L,z){var X=typeof M;(X==="undefined"||X==="boolean")&&(M=null);var de=!1;if(M===null)de=!0;else switch(X){case"bigint":case"string":case"number":de=!0;break;case"object":switch(M.$$typeof){case e:case t:de=!0;break;case m:return de=M._init,B(de(M._payload),q,F,L,z)}}if(de)return z=z(M),de=L===""?"."+J(M,0):L,C(z)?(F="",de!=null&&(F=de.replace(U,"$&/")+"/"),B(z,q,F,"",function(Ae){return Ae})):z!=null&&(V(z)&&(z=K(z,F+(z.key==null||M&&M.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+de)),q.push(z)),1;de=0;var ve=L===""?".":L+":";if(C(M))for(var Ie=0;Ie<M.length;Ie++)L=M[Ie],X=ve+J(L,Ie),de+=B(L,q,F,X,z);else if(Ie=y(M),typeof Ie=="function")for(M=Ie.call(M),Ie=0;!(L=M.next()).done;)L=L.value,X=ve+J(L,Ie++),de+=B(L,q,F,X,z);else if(X==="object"){if(typeof M.then=="function")return B(le(M),q,F,L,z);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return de}function W(M,q,F){if(M==null)return M;var L=[],z=0;return B(M,L,"","",function(X){return q.call(F,X,z++)}),L}function Y(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(F){(M._status===0||M._status===-1)&&(M._status=1,M._result=F)},function(F){(M._status===0||M._status===-1)&&(M._status=2,M._result=F)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var pe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},ae={map:W,forEach:function(M,q,F){W(M,function(){q.apply(this,arguments)},F)},count:function(M){var q=0;return W(M,function(){q++}),q},toArray:function(M){return W(M,function(q){return q})||[]},only:function(M){if(!V(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return tt.Activity=p,tt.Children=ae,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(M){return N.H.useMemoCache(M)}},tt.cache=function(M){return function(){return M.apply(null,arguments)}},tt.cacheSignal=function(){return null},tt.cloneElement=function(M,q,F){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var L=S({},M.props),z=M.key;if(q!=null)for(X in q.key!==void 0&&(z=""+q.key),q)!P.call(q,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&q.ref===void 0||(L[X]=q[X]);var X=arguments.length-2;if(X===1)L.children=F;else if(1<X){for(var de=Array(X),ve=0;ve<X;ve++)de[ve]=arguments[ve+2];L.children=de}return $(M.type,z,L)},tt.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:i,_context:M},M},tt.createElement=function(M,q,F){var L,z={},X=null;if(q!=null)for(L in q.key!==void 0&&(X=""+q.key),q)P.call(q,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(z[L]=q[L]);var de=arguments.length-2;if(de===1)z.children=F;else if(1<de){for(var ve=Array(de),Ie=0;Ie<de;Ie++)ve[Ie]=arguments[Ie+2];z.children=ve}if(M&&M.defaultProps)for(L in de=M.defaultProps,de)z[L]===void 0&&(z[L]=de[L]);return $(M,X,z)},tt.createRef=function(){return{current:null}},tt.forwardRef=function(M){return{$$typeof:u,render:M}},tt.isValidElement=V,tt.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:Y}},tt.memo=function(M,q){return{$$typeof:f,type:M,compare:q===void 0?null:q}},tt.startTransition=function(M){var q=N.T,F={};N.T=F;try{var L=M(),z=N.S;z!==null&&z(F,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,pe)}catch(X){pe(X)}finally{q!==null&&F.types!==null&&(q.types=F.types),N.T=q}},tt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},tt.use=function(M){return N.H.use(M)},tt.useActionState=function(M,q,F){return N.H.useActionState(M,q,F)},tt.useCallback=function(M,q){return N.H.useCallback(M,q)},tt.useContext=function(M){return N.H.useContext(M)},tt.useDebugValue=function(){},tt.useDeferredValue=function(M,q){return N.H.useDeferredValue(M,q)},tt.useEffect=function(M,q){return N.H.useEffect(M,q)},tt.useEffectEvent=function(M){return N.H.useEffectEvent(M)},tt.useId=function(){return N.H.useId()},tt.useImperativeHandle=function(M,q,F){return N.H.useImperativeHandle(M,q,F)},tt.useInsertionEffect=function(M,q){return N.H.useInsertionEffect(M,q)},tt.useLayoutEffect=function(M,q){return N.H.useLayoutEffect(M,q)},tt.useMemo=function(M,q){return N.H.useMemo(M,q)},tt.useOptimistic=function(M,q){return N.H.useOptimistic(M,q)},tt.useReducer=function(M,q,F){return N.H.useReducer(M,q,F)},tt.useRef=function(M){return N.H.useRef(M)},tt.useState=function(M){return N.H.useState(M)},tt.useSyncExternalStore=function(M,q,F){return N.H.useSyncExternalStore(M,q,F)},tt.useTransition=function(){return N.H.useTransition()},tt.version="19.2.4",tt}var YR;function Zs(){return YR||(YR=1,wy.exports=FD()),wy.exports}var Sy={exports:{}},fr={};var QR;function BD(){if(QR)return fr;QR=1;var e=Zs();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 l=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 fr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fr.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)},fr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fr.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))},fr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fr.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})}},fr.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)},fr.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})}},fr.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)},fr.requestFormReset=function(d){r.d.r(d)},fr.unstable_batchedUpdates=function(d,f){return d(f)},fr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fr.useFormStatus=function(){return l.H.useHostTransitionStatus()},fr.version="19.2.4",fr}var XR;function VC(){if(XR)return Sy.exports;XR=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(),Sy.exports=BD(),Sy.exports}var JR;function qD(){if(JR)return pu;JR=1;var e=VD(),t=Zs(),n=VC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}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,c=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(c=s.return),o=s.return;while(o)}return s.tag===3?c:null}function l(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 c=o,h=s;;){var v=c.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){c=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===c)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=v,h=_;else{for(var k=!1,j=v.child;j;){if(j===c){k=!0,c=v,h=_;break}if(j===h){k=!0,h=v,c=_;break}j=j.sibling}if(!k){for(j=_.child;j;){if(j===c){k=!0,c=_,h=v;break}if(j===h){k=!0,h=_,c=v;break}j=j.sibling}if(!k)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?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"),K=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,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},pe=[],ae=-1;function M(o){return{current:o}}function q(o){0>ae||(o.current=pe[ae],pe[ae]=null,ae--)}function F(o,s){ae++,pe[ae]=o.current,o.current=s}var L=M(null),z=M(null),X=M(null),de=M(null);function ve(o,s){switch(F(X,s),F(z,o),F(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?hR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=hR(s),o=pR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(L),F(L,o)}function Ie(){q(L),q(z),q(X)}function Ae(o){o.memoizedState!==null&&F(de,o);var s=L.current,c=pR(s,o.type);s!==c&&(F(z,o),F(L,c))}function H(o){z.current===o&&(q(L),q(z)),de.current===o&&(q(de),cu._currentValue=Y)}var ne,_e;function se(o){if(ne===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",_e=-1<c.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+ne+o+_e}var ue=!1;function Oe(o,s){if(!o||ue)return"";ue=!0;var c=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 me=ge}Reflect.construct(o,[],Te)}else{try{Te.call()}catch(ge){me=ge}o.call(Te.prototype)}}else{try{throw Error()}catch(ge){me=ge}(Te=o())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(ge){if(ge&&me&&typeof ge.stack=="string")return[ge.stack,me.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 Q=k.split(`
@@ -6,8 +6,8 @@ function DD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
6
6
  `);for(v=h=0;h<Q.length&&!Q[h].includes("DetermineComponentFrameRoot");)h++;for(;v<he.length&&!he[v].includes("DetermineComponentFrameRoot");)v++;if(h===Q.length||v===he.length)for(h=Q.length-1,v=he.length-1;1<=h&&0<=v&&Q[h]!==he[v];)v--;for(;1<=h&&0<=v;h--,v--)if(Q[h]!==he[v]){if(h!==1||v!==1)do if(h--,v--,0>v||Q[h]!==he[v]){var be=`
7
7
  `+Q[h].replace(" at new "," at ");return o.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",o.displayName)),be}while(1<=h&&0<=v);break}}}finally{ue=!1,Error.prepareStackTrace=c}return(c=o?o.displayName||o.name:"")?se(c):""}function Pe(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="",c=null;do s+=Pe(o,c),c=o,o=o.return;while(o);return s}catch(h){return`
8
8
  Error generating stack: `+h.message+`
9
- `+h.stack}}var Fe=Object.prototype.hasOwnProperty,We=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,re=e.unstable_shouldYield,oe=e.unstable_requestPaint,we=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Je=e.unstable_NormalPriority,ot=e.unstable_LowPriority,Ct=e.unstable_IdlePriority,ur=e.log,tn=e.unstable_setDisableYieldValue,Rn=null,nn=null;function jn(o){if(typeof ur=="function"&&tn(o),nn&&typeof nn.setStrictMode=="function")try{nn.setStrictMode(Rn,o)}catch{}}var xn=Math.clz32?Math.clz32:Be,Qa=Math.log,ga=Math.LN2;function Be(o){return o>>>=0,o===0?32:31-(Qa(o)/ga|0)|0}var bt=256,Tt=262144,ct=4194304;function At(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 qe(o,s,c){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=At(h):(k&=j,k!==0?v=At(k):c||(c=j&~o,c!==0&&(v=At(c))))):(j=h&~_,j!==0?v=At(j):k!==0?v=At(k):c||(c=h&~o,c!==0&&(v=At(c)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,c=s&-s,_>=c||_===32&&(c&4194048)!==0)?s:v}function ut(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Wt(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 qt(){var o=ct;return ct<<=1,(ct&62914560)===0&&(ct=4194304),o}function dr(o){for(var s=[],c=0;31>c;c++)s.push(o);return s}function It(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function rn(o,s,c,h,v,_){var k=o.pendingLanes;o.pendingLanes=c,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=c,o.entangledLanes&=c,o.errorRecoveryDisabledLanes&=c,o.shellSuspendCounter=0;var j=o.entanglements,Q=o.expirationTimes,he=o.hiddenUpdates;for(c=k&~c;0<c;){var be=31-xn(c),Te=1<<be;j[be]=0,Q[be]=-1;var me=he[be];if(me!==null)for(he[be]=null,be=0;be<me.length;be++){var ge=me[be];ge!==null&&(ge.lane&=-536870913)}c&=~Te}h!==0&&ao(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(k&~s))}function ao(o,s,c){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-xn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|c&261930}function Yn(o,s){var c=o.entangledLanes|=s;for(o=o.entanglements;c;){var h=31-xn(c),v=1<<h;v&s|o[h]&s&&(o[h]|=s),c&=~v}}function xr(o,s){var c=s&-s;return c=(c&42)!==0?1:qi(c),(c&(o.suspendedLanes|s))!==0?0:c}function qi(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 Co(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ig(){var o=W.p;return o!==0?o:(o=window.event,o===void 0?32:jR(o.type))}function J1(o,s){var c=W.p;try{return W.p=o,s()}finally{W.p=c}}var Xa=Math.random().toString(36).slice(2),Qn="__reactFiber$"+Xa,Tr="__reactProps$"+Xa,Hi="__reactContainer$"+Xa,lg="__reactEvents$"+Xa,RP="__reactListeners$"+Xa,xP="__reactHandles$"+Xa,ew="__reactResources$"+Xa,Rc="__reactMarker$"+Xa;function cg(o){delete o[Qn],delete o[Tr],delete o[lg],delete o[RP],delete o[xP]}function Gi(o){var s=o[Qn];if(s)return s;for(var c=o.parentNode;c;){if(s=c[Hi]||c[Qn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(o=wR(o);o!==null;){if(c=o[Qn])return c;o=wR(o)}return s}o=c,c=o.parentNode}return null}function Zi(o){if(o=o[Qn]||o[Hi]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function xc(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Ki(o){var s=o[ew];return s||(s=o[ew]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qn(o){o[Rc]=!0}var tw=new Set,nw={};function Xs(o,s){Wi(o,s),Wi(o+"Capture",s)}function Wi(o,s){for(nw[o]=s,o=0;o<s.length;o++)tw.add(s[o])}var TP=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]*$"),rw={},ow={};function OP(o){return Fe.call(ow,o)?!0:Fe.call(rw,o)?!1:TP.test(o)?ow[o]=!0:(rw[o]=!0,!1)}function jd(o,s,c){if(OP(s))if(c===null)o.removeAttribute(s);else{switch(typeof c){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,""+c)}}function $d(o,s,c){if(c===null)o.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+c)}}function va(o,s,c,h){if(h===null)o.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(c);return}o.setAttributeNS(s,c,""+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 aw(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function CP(o,s,c){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){c=""+k,_.call(this,k)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function ug(o){if(!o._valueTracker){var s=aw(o)?"checked":"value";o._valueTracker=CP(o,s,""+o[s])}}function sw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return o&&(h=aw(o)?o.checked?"true":"false":o.value),o=h,o!==c?(s.setValue(o),!0):!1}function Ud(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 AP=/[\n"\\]/g;function io(o){return o.replace(AP,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function dg(o,s,c,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?fg(o,k,so(s)):c!=null?fg(o,k,so(c)):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 iw(o,s,c,h,v,_,k,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){ug(o);return}c=c!=null?""+so(c):"",s=s!=null?""+so(s):c,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),ug(o)}function fg(o,s,c){s==="number"&&Ud(o.ownerDocument)===o||o.defaultValue===""+c||(o.defaultValue=""+c)}function Yi(o,s,c,h){if(o=o.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<o.length;c++)v=s.hasOwnProperty("$"+o[c].value),o[c].selected!==v&&(o[c].selected=v),v&&h&&(o[c].defaultSelected=!0)}else{for(c=""+so(c),s=null,v=0;v<o.length;v++){if(o[v].value===c){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function lw(o,s,c){if(s!=null&&(s=""+so(s),s!==o.value&&(o.value=s),c==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=c!=null?""+so(c):""}function cw(o,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(le(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=so(s),o.defaultValue=c,h=o.textContent,h===c&&h!==""&&h!==null&&(o.value=h),ug(o)}function Qi(o,s){if(s){var c=o.firstChild;if(c&&c===o.lastChild&&c.nodeType===3){c.nodeValue=s;return}}o.textContent=s}var IP=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 uw(o,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,c):typeof c!="number"||c===0||IP.has(s)?s==="float"?o.cssFloat=c:o[s]=(""+c).trim():o[s]=c+"px"}function dw(o,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,c!=null){for(var h in c)!c.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)&&c[v]!==h&&uw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&uw(o,_,s[_])}function hg(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 NP=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"]]),kP=/^[\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 zd(o){return kP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ya(){}var pg=null;function mg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Xi=null,Ji=null;function fw(o){var s=Zi(o);if(s&&(o=s.stateNode)){var c=o[Tr]||null;e:switch(o=s.stateNode,s.type){case"input":if(dg(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=o;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+io(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==o&&h.form===o.form){var v=h[Tr]||null;if(!v)throw Error(r(90));dg(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===o.form&&sw(h)}break e;case"textarea":lw(o,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Yi(o,!!c.multiple,s,!1)}}}var gg=!1;function hw(o,s,c){if(gg)return o(s,c);gg=!0;try{var h=o(s);return h}finally{if(gg=!1,(Xi!==null||Ji!==null)&&(Cf(),Xi&&(s=Xi,o=Ji,Ji=Xi=null,fw(s),o)))for(s=0;s<o.length;s++)fw(o[s])}}function Tc(o,s){var c=o.stateNode;if(c===null)return null;var h=c[Tr]||null;if(h===null)return null;c=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(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vg=!1;if(_a)try{var Oc={};Object.defineProperty(Oc,"passive",{get:function(){vg=!0}}),window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{vg=!1}var Ja=null,yg=null,Vd=null;function pw(){if(Vd)return Vd;var o,s=yg,c=s.length,h,v="value"in Ja?Ja.value:Ja.textContent,_=v.length;for(o=0;o<c&&s[o]===v[o];o++);var k=c-o;for(h=1;h<=k&&s[c-h]===v[_-h];h++);return Vd=v.slice(o,1<h?1-h:void 0)}function Fd(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 Bd(){return!0}function mw(){return!1}function Or(o){function s(c,h,v,_,k){this._reactName=c,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=k,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(c=o[j],this[j]=c?c(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Bd:mw,this.isPropagationStopped=mw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Bd)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Bd)},persist:function(){},isPersistent:Bd}),s}var Js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=Or(Js),Cc=p({},Js,{view:0,detail:0}),MP=Or(Cc),_g,bg,Ac,Hd=p({},Cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sg,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!==Ac&&(Ac&&o.type==="mousemove"?(_g=o.screenX-Ac.screenX,bg=o.screenY-Ac.screenY):bg=_g=0,Ac=o),_g)},movementY:function(o){return"movementY"in o?o.movementY:bg}}),gw=Or(Hd),PP=p({},Hd,{dataTransfer:0}),DP=Or(PP),LP=p({},Cc,{relatedTarget:0}),wg=Or(LP),jP=p({},Js,{animationName:0,elapsedTime:0,pseudoElement:0}),$P=Or(jP),UP=p({},Js,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),zP=Or(UP),VP=p({},Js,{data:0}),vw=Or(VP),FP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BP={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"},qP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HP(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=qP[o])?!!s[o]:!1}function Sg(){return HP}var GP=p({},Cc,{key:function(o){if(o.key){var s=FP[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=Fd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?BP[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sg,charCode:function(o){return o.type==="keypress"?Fd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Fd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),ZP=Or(GP),KP=p({},Hd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yw=Or(KP),WP=p({},Cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sg}),YP=Or(WP),QP=p({},Js,{propertyName:0,elapsedTime:0,pseudoElement:0}),XP=Or(QP),JP=p({},Hd,{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}),e3=Or(JP),t3=p({},Js,{newState:0,oldState:0}),n3=Or(t3),r3=[9,13,27,32],Eg=_a&&"CompositionEvent"in window,Ic=null;_a&&"documentMode"in document&&(Ic=document.documentMode);var o3=_a&&"TextEvent"in window&&!Ic,_w=_a&&(!Eg||Ic&&8<Ic&&11>=Ic),bw=" ",ww=!1;function Sw(o,s){switch(o){case"keyup":return r3.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ew(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var el=!1;function a3(o,s){switch(o){case"compositionend":return Ew(s);case"keypress":return s.which!==32?null:(ww=!0,bw);case"textInput":return o=s.data,o===bw&&ww?null:o;default:return null}}function s3(o,s){if(el)return o==="compositionend"||!Eg&&Sw(o,s)?(o=pw(),Vd=yg=Ja=null,el=!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 _w&&s.locale!=="ko"?null:s.data;default:return null}}var i3={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 Rw(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!i3[o.type]:s==="textarea"}function xw(o,s,c,h){Xi?Ji?Ji.push(h):Ji=[h]:Xi=h,s=Df(s,"onChange"),0<s.length&&(c=new qd("onChange","change",null,c,h),o.push({event:c,listeners:s}))}var Nc=null,kc=null;function l3(o){iR(o,0)}function Gd(o){var s=xc(o);if(sw(s))return o}function Tw(o,s){if(o==="change")return s}var Ow=!1;if(_a){var Rg;if(_a){var xg="oninput"in document;if(!xg){var Cw=document.createElement("div");Cw.setAttribute("oninput","return;"),xg=typeof Cw.oninput=="function"}Rg=xg}else Rg=!1;Ow=Rg&&(!document.documentMode||9<document.documentMode)}function Aw(){Nc&&(Nc.detachEvent("onpropertychange",Iw),kc=Nc=null)}function Iw(o){if(o.propertyName==="value"&&Gd(kc)){var s=[];xw(s,kc,o,mg(o)),hw(l3,s)}}function c3(o,s,c){o==="focusin"?(Aw(),Nc=s,kc=c,Nc.attachEvent("onpropertychange",Iw)):o==="focusout"&&Aw()}function u3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Gd(kc)}function d3(o,s){if(o==="click")return Gd(s)}function f3(o,s){if(o==="input"||o==="change")return Gd(s)}function h3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var zr=typeof Object.is=="function"?Object.is:h3;function Mc(o,s){if(zr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var c=Object.keys(o),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var v=c[h];if(!Fe.call(s,v)||!zr(o[v],s[v]))return!1}return!0}function Nw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function kw(o,s){var c=Nw(o);o=0;for(var h;c;){if(c.nodeType===3){if(h=o+c.textContent.length,o<=s&&h>=s)return{node:c,offset:s-o};o=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Nw(c)}}function Mw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Mw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Pw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=Ud(o.document);s instanceof o.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)o=s.contentWindow;else break;s=Ud(o.document)}return s}function Tg(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 p3=_a&&"documentMode"in document&&11>=document.documentMode,tl=null,Og=null,Pc=null,Cg=!1;function Dw(o,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Cg||tl==null||tl!==Ud(h)||(h=tl,"selectionStart"in h&&Tg(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}),Pc&&Mc(Pc,h)||(Pc=h,h=Df(Og,"onSelect"),0<h.length&&(s=new qd("onSelect","select",null,s,c),o.push({event:s,listeners:h}),s.target=tl)))}function ei(o,s){var c={};return c[o.toLowerCase()]=s.toLowerCase(),c["Webkit"+o]="webkit"+s,c["Moz"+o]="moz"+s,c}var nl={animationend:ei("Animation","AnimationEnd"),animationiteration:ei("Animation","AnimationIteration"),animationstart:ei("Animation","AnimationStart"),transitionrun:ei("Transition","TransitionRun"),transitionstart:ei("Transition","TransitionStart"),transitioncancel:ei("Transition","TransitionCancel"),transitionend:ei("Transition","TransitionEnd")},Ag={},Lw={};_a&&(Lw=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function ti(o){if(Ag[o])return Ag[o];if(!nl[o])return o;var s=nl[o],c;for(c in s)if(s.hasOwnProperty(c)&&c in Lw)return Ag[o]=s[c];return o}var jw=ti("animationend"),$w=ti("animationiteration"),Uw=ti("animationstart"),m3=ti("transitionrun"),g3=ti("transitionstart"),v3=ti("transitioncancel"),zw=ti("transitionend"),Vw=new Map,Ig="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(" ");Ig.push("scrollEnd");function Ao(o,s){Vw.set(o,s),Xs(s,[o])}var Zd=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)},lo=[],rl=0,Ng=0;function Kd(){for(var o=rl,s=Ng=rl=0;s<o;){var c=lo[s];lo[s++]=null;var h=lo[s];lo[s++]=null;var v=lo[s];lo[s++]=null;var _=lo[s];if(lo[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&&Fw(c,v,_)}}function Wd(o,s,c,h){lo[rl++]=o,lo[rl++]=s,lo[rl++]=c,lo[rl++]=h,Ng|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function kg(o,s,c,h){return Wd(o,s,c,h),Yd(o)}function ni(o,s){return Wd(o,null,null,s),Yd(o)}function Fw(o,s,c){o.lanes|=c;var h=o.alternate;h!==null&&(h.lanes|=c);for(var v=!1,_=o.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.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(c),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=c|536870912),_):null}function Yd(o){if(50<nu)throw nu=0,Vv=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var ol={};function y3(o,s,c,h){this.tag=o,this.key=c,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,c,h){return new y3(o,s,c,h)}function Mg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ba(o,s){var c=o.alternate;return c===null?(c=Vr(o.tag,s,o.key,o.mode),c.elementType=o.elementType,c.type=o.type,c.stateNode=o.stateNode,c.alternate=o,o.alternate=c):(c.pendingProps=s,c.type=o.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=o.flags&65011712,c.childLanes=o.childLanes,c.lanes=o.lanes,c.child=o.child,c.memoizedProps=o.memoizedProps,c.memoizedState=o.memoizedState,c.updateQueue=o.updateQueue,s=o.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=o.sibling,c.index=o.index,c.ref=o.ref,c.refCleanup=o.refCleanup,c}function Bw(o,s){o.flags&=65011714;var c=o.alternate;return c===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=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,s=c.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Qd(o,s,c,h,v,_){var k=0;if(h=o,typeof o=="function")Mg(o)&&(k=1);else if(typeof o=="string")k=ED(o,c,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case $:return o=Vr(31,c,s,v),o.elementType=$,o.lanes=_,o;case S:return ri(c.children,v,_,s);case b:k=8,v|=24;break;case E:return o=Vr(12,c,s,v|2),o.elementType=E,o.lanes=_,o;case C:return o=Vr(13,c,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Vr(19,c,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,c=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Vr(k,c,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ri(o,s,c,h){return o=Vr(7,o,h,s),o.lanes=c,o}function Pg(o,s,c){return o=Vr(6,o,null,s),o.lanes=c,o}function qw(o){var s=Vr(18,null,null,0);return s.stateNode=o,s}function Dg(o,s,c){return s=Vr(4,o.children!==null?o.children:[],o.key,s),s.lanes=c,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Hw=new WeakMap;function co(o,s){if(typeof o=="object"&&o!==null){var c=Hw.get(o);return c!==void 0?c:(s={value:o,source:s,stack:Xe(s)},Hw.set(o,s),s)}return{value:o,source:s,stack:Xe(s)}}var al=[],sl=0,Xd=null,Dc=0,uo=[],fo=0,es=null,Wo=1,Yo="";function wa(o,s){al[sl++]=Dc,al[sl++]=Xd,Xd=o,Dc=s}function Gw(o,s,c){uo[fo++]=Wo,uo[fo++]=Yo,uo[fo++]=es,es=o;var h=Wo;o=Yo;var v=32-xn(h)-1;h&=~(1<<v),c+=1;var _=32-xn(s)+v;if(30<_){var k=v-v%5;_=(h&(1<<k)-1).toString(32),h>>=k,v-=k,Wo=1<<32-xn(s)+v|c<<v|h,Yo=_+o}else Wo=1<<_|c<<v|h,Yo=o}function Lg(o){o.return!==null&&(wa(o,1),Gw(o,1,0))}function jg(o){for(;o===Xd;)Xd=al[--sl],al[sl]=null,Dc=al[--sl],al[sl]=null;for(;o===es;)es=uo[--fo],uo[fo]=null,Yo=uo[--fo],uo[fo]=null,Wo=uo[--fo],uo[fo]=null}function Zw(o,s){uo[fo++]=Wo,uo[fo++]=Yo,uo[fo++]=es,Wo=s.id,Yo=s.overflow,es=o}var Xn=null,on=null,Rt=!1,ts=null,ho=!1,$g=Error(r(519));function ns(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lc(co(s,o)),$g}function Kw(o){var s=o.stateNode,c=o.type,h=o.memoizedProps;switch(s[Qn]=o,s[Tr]=h,c){case"dialog":vt("cancel",s),vt("close",s);break;case"iframe":case"object":case"embed":vt("load",s);break;case"video":case"audio":for(c=0;c<ou.length;c++)vt(ou[c],s);break;case"source":vt("error",s);break;case"img":case"image":case"link":vt("error",s),vt("load",s);break;case"details":vt("toggle",s);break;case"input":vt("invalid",s),iw(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":vt("invalid",s);break;case"textarea":vt("invalid",s),cw(s,h.value,h.defaultValue,h.children)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||dR(s.textContent,c)?(h.popover!=null&&(vt("beforetoggle",s),vt("toggle",s)),h.onScroll!=null&&vt("scroll",s),h.onScrollEnd!=null&&vt("scrollend",s),h.onClick!=null&&(s.onclick=ya),s=!0):s=!1,s||ns(o,!0)}function Ww(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 il(o){if(o!==Xn)return!1;if(!Rt)return Ww(o),Rt=!0,!1;var s=o.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=o.type,c=!(c!=="form"&&c!=="button")||ny(o.type,o.memoizedProps)),c=!c),c&&on&&ns(o),Ww(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));on=bR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));on=bR(o)}else s===27?(s=on,gs(o.type)?(o=iy,iy=null,on=o):on=s):on=Xn?mo(o.stateNode.nextSibling):null;return!0}function oi(){on=Xn=null,Rt=!1}function Ug(){var o=ts;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),ts=null),o}function Lc(o){ts===null?ts=[o]:ts.push(o)}var zg=M(null),ai=null,Sa=null;function rs(o,s,c){F(zg,s._currentValue),s._currentValue=c}function Ea(o){o._currentValue=zg.current,q(zg)}function Vg(o,s,c){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===c)break;o=o.return}}function Fg(o,s,c,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 Q=0;Q<s.length;Q++)if(j.context===s[Q]){_.lanes|=c,j=_.alternate,j!==null&&(j.lanes|=c),Vg(_.return,c,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|=c,_=k.alternate,_!==null&&(_.lanes|=c),Vg(k,c,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 ll(o,s,c,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===de.current){if(k=v.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(cu):o=[cu])}v=v.return}o!==null&&Fg(s,o,c,h),s.flags|=262144}function Jd(o){for(o=o.firstContext;o!==null;){if(!zr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function si(o){ai=o,Sa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Jn(o){return Yw(ai,o)}function ef(o,s){return ai===null&&si(o),Yw(o,s)}function Yw(o,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},Sa===null){if(o===null)throw Error(r(308));Sa=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else Sa=Sa.next=s;return c}var _3=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(c,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(c){return c()})}},b3=e.unstable_scheduleCallback,w3=e.unstable_NormalPriority,Tn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bg(){return{controller:new _3,data:new Map,refCount:0}}function jc(o){o.refCount--,o.refCount===0&&b3(w3,function(){o.controller.abort()})}var $c=null,qg=0,cl=0,ul=null;function S3(o,s){if($c===null){var c=$c=[];qg=0,cl=Zv(),ul={status:"pending",value:void 0,then:function(h){c.push(h)}}}return qg++,s.then(Qw,Qw),s}function Qw(){if(--qg===0&&$c!==null){ul!==null&&(ul.status="fulfilled");var o=$c;$c=null,cl=0,ul=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function E3(o,s){var c=[],h={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),h}var Xw=B.S;B.S=function(o,s){DE=we(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&S3(o,s),Xw!==null&&Xw(o,s)};var ii=M(null);function Hg(){var o=ii.current;return o!==null?o:Yt.pooledCache}function tf(o,s){s===null?F(ii,ii.current):F(ii,s.pool)}function Jw(){var o=Hg();return o===null?null:{parent:Tn._currentValue,pool:o}}var dl=Error(r(460)),Gg=Error(r(474)),nf=Error(r(542)),rf={then:function(){}};function eS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function tS(o,s,c){switch(c=o[c],c===void 0?o.push(s):c!==s&&(s.then(ya,ya),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,rS(o),o;default:if(typeof s.status=="string")s.then(ya,ya);else{if(o=Yt,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,rS(o),o}throw ci=s,dl}}function li(o){try{var s=o._init;return s(o._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(ci=c,dl):c}}var ci=null;function nS(){if(ci===null)throw Error(r(459));var o=ci;return ci=null,o}function rS(o){if(o===dl||o===nf)throw Error(r(483))}var fl=null,Uc=0;function of(o){var s=Uc;return Uc+=1,fl===null&&(fl=[]),tS(fl,o,s)}function zc(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function af(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 oS(o){function s(ie,te){if(o){var fe=ie.deletions;fe===null?(ie.deletions=[te],ie.flags|=16):fe.push(te)}}function c(ie,te){if(!o)return null;for(;te!==null;)s(ie,te),te=te.sibling;return null}function h(ie){for(var te=new Map;ie!==null;)ie.key!==null?te.set(ie.key,ie):te.set(ie.index,ie),ie=ie.sibling;return te}function v(ie,te){return ie=ba(ie,te),ie.index=0,ie.sibling=null,ie}function _(ie,te,fe){return ie.index=fe,o?(fe=ie.alternate,fe!==null?(fe=fe.index,fe<te?(ie.flags|=67108866,te):fe):(ie.flags|=67108866,te)):(ie.flags|=1048576,te)}function k(ie){return o&&ie.alternate===null&&(ie.flags|=67108866),ie}function j(ie,te,fe,Se){return te===null||te.tag!==6?(te=Pg(fe,ie.mode,Se),te.return=ie,te):(te=v(te,fe),te.return=ie,te)}function Q(ie,te,fe,Se){var Ke=fe.type;return Ke===S?be(ie,te,fe.props.children,Se,fe.key):te!==null&&(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&li(Ke)===te.type)?(te=v(te,fe.props),zc(te,fe),te.return=ie,te):(te=Qd(fe.type,fe.key,fe.props,null,ie.mode,Se),zc(te,fe),te.return=ie,te)}function he(ie,te,fe,Se){return te===null||te.tag!==4||te.stateNode.containerInfo!==fe.containerInfo||te.stateNode.implementation!==fe.implementation?(te=Dg(fe,ie.mode,Se),te.return=ie,te):(te=v(te,fe.children||[]),te.return=ie,te)}function be(ie,te,fe,Se,Ke){return te===null||te.tag!==7?(te=ri(fe,ie.mode,Se,Ke),te.return=ie,te):(te=v(te,fe),te.return=ie,te)}function Te(ie,te,fe){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Pg(""+te,ie.mode,fe),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return fe=Qd(te.type,te.key,te.props,null,ie.mode,fe),zc(fe,te),fe.return=ie,fe;case w:return te=Dg(te,ie.mode,fe),te.return=ie,te;case P:return te=li(te),Te(ie,te,fe)}if(le(te)||G(te))return te=ri(te,ie.mode,fe,null),te.return=ie,te;if(typeof te.then=="function")return Te(ie,of(te),fe);if(te.$$typeof===T)return Te(ie,ef(ie,te),fe);af(ie,te)}return null}function me(ie,te,fe,Se){var Ke=te!==null?te.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Ke!==null?null:j(ie,te,""+fe,Se);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Ke?Q(ie,te,fe,Se):null;case w:return fe.key===Ke?he(ie,te,fe,Se):null;case P:return fe=li(fe),me(ie,te,fe,Se)}if(le(fe)||G(fe))return Ke!==null?null:be(ie,te,fe,Se,null);if(typeof fe.then=="function")return me(ie,te,of(fe),Se);if(fe.$$typeof===T)return me(ie,te,ef(ie,fe),Se);af(ie,fe)}return null}function ge(ie,te,fe,Se,Ke){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ie=ie.get(fe)||null,j(te,ie,""+Se,Ke);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case y:return ie=ie.get(Se.key===null?fe:Se.key)||null,Q(te,ie,Se,Ke);case w:return ie=ie.get(Se.key===null?fe:Se.key)||null,he(te,ie,Se,Ke);case P:return Se=li(Se),ge(ie,te,fe,Se,Ke)}if(le(Se)||G(Se))return ie=ie.get(fe)||null,be(te,ie,Se,Ke,null);if(typeof Se.then=="function")return ge(ie,te,fe,of(Se),Ke);if(Se.$$typeof===T)return ge(ie,te,fe,ef(te,Se),Ke);af(te,Se)}return null}function $e(ie,te,fe,Se){for(var Ke=null,Nt=null,He=te,it=te=0,St=null;He!==null&&it<fe.length;it++){He.index>it?(St=He,He=null):St=He.sibling;var kt=me(ie,He,fe[it],Se);if(kt===null){He===null&&(He=St);break}o&&He&&kt.alternate===null&&s(ie,He),te=_(kt,te,it),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt,He=St}if(it===fe.length)return c(ie,He),Rt&&wa(ie,it),Ke;if(He===null){for(;it<fe.length;it++)He=Te(ie,fe[it],Se),He!==null&&(te=_(He,te,it),Nt===null?Ke=He:Nt.sibling=He,Nt=He);return Rt&&wa(ie,it),Ke}for(He=h(He);it<fe.length;it++)St=ge(He,ie,it,fe[it],Se),St!==null&&(o&&St.alternate!==null&&He.delete(St.key===null?it:St.key),te=_(St,te,it),Nt===null?Ke=St:Nt.sibling=St,Nt=St);return o&&He.forEach(function(ws){return s(ie,ws)}),Rt&&wa(ie,it),Ke}function Ye(ie,te,fe,Se){if(fe==null)throw Error(r(151));for(var Ke=null,Nt=null,He=te,it=te=0,St=null,kt=fe.next();He!==null&&!kt.done;it++,kt=fe.next()){He.index>it?(St=He,He=null):St=He.sibling;var ws=me(ie,He,kt.value,Se);if(ws===null){He===null&&(He=St);break}o&&He&&ws.alternate===null&&s(ie,He),te=_(ws,te,it),Nt===null?Ke=ws:Nt.sibling=ws,Nt=ws,He=St}if(kt.done)return c(ie,He),Rt&&wa(ie,it),Ke;if(He===null){for(;!kt.done;it++,kt=fe.next())kt=Te(ie,kt.value,Se),kt!==null&&(te=_(kt,te,it),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt);return Rt&&wa(ie,it),Ke}for(He=h(He);!kt.done;it++,kt=fe.next())kt=ge(He,ie,it,kt.value,Se),kt!==null&&(o&&kt.alternate!==null&&He.delete(kt.key===null?it:kt.key),te=_(kt,te,it),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt);return o&&He.forEach(function(PD){return s(ie,PD)}),Rt&&wa(ie,it),Ke}function Zt(ie,te,fe,Se){if(typeof fe=="object"&&fe!==null&&fe.type===S&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Ke=fe.key;te!==null;){if(te.key===Ke){if(Ke=fe.type,Ke===S){if(te.tag===7){c(ie,te.sibling),Se=v(te,fe.props.children),Se.return=ie,ie=Se;break e}}else if(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&li(Ke)===te.type){c(ie,te.sibling),Se=v(te,fe.props),zc(Se,fe),Se.return=ie,ie=Se;break e}c(ie,te);break}else s(ie,te);te=te.sibling}fe.type===S?(Se=ri(fe.props.children,ie.mode,Se,fe.key),Se.return=ie,ie=Se):(Se=Qd(fe.type,fe.key,fe.props,null,ie.mode,Se),zc(Se,fe),Se.return=ie,ie=Se)}return k(ie);case w:e:{for(Ke=fe.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){c(ie,te.sibling),Se=v(te,fe.children||[]),Se.return=ie,ie=Se;break e}else{c(ie,te);break}else s(ie,te);te=te.sibling}Se=Dg(fe,ie.mode,Se),Se.return=ie,ie=Se}return k(ie);case P:return fe=li(fe),Zt(ie,te,fe,Se)}if(le(fe))return $e(ie,te,fe,Se);if(G(fe)){if(Ke=G(fe),typeof Ke!="function")throw Error(r(150));return fe=Ke.call(fe),Ye(ie,te,fe,Se)}if(typeof fe.then=="function")return Zt(ie,te,of(fe),Se);if(fe.$$typeof===T)return Zt(ie,te,ef(ie,fe),Se);af(ie,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(c(ie,te.sibling),Se=v(te,fe),Se.return=ie,ie=Se):(c(ie,te),Se=Pg(fe,ie.mode,Se),Se.return=ie,ie=Se),k(ie)):c(ie,te)}return function(ie,te,fe,Se){try{Uc=0;var Ke=Zt(ie,te,fe,Se);return fl=null,Ke}catch(He){if(He===dl||He===nf)throw He;var Nt=Vr(29,He,null,ie.mode);return Nt.lanes=Se,Nt.return=ie,Nt}finally{}}}var ui=oS(!0),aS=oS(!1),os=!1;function Zg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kg(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,c){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(Dt&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Yd(o),Fw(o,null,c),s}return Wd(o,h,s,c),Yd(o)}function Vc(o,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Yn(o,c)}}function Wg(o,s){var c=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var v=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var k={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?v=_=k:_=_.next=k,c=c.next}while(c!==null);_===null?v=_=s:_=_.next=s}else v=_=s;c={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=c;return}o=c.lastBaseUpdate,o===null?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=s}var Yg=!1;function Fc(){if(Yg){var o=ul;if(o!==null)throw o}}function Bc(o,s,c,h){Yg=!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 Q=j,he=Q.next;Q.next=null,k===null?_=he:k.next=he,k=Q;var be=o.alternate;be!==null&&(be=be.updateQueue,j=be.lastBaseUpdate,j!==k&&(j===null?be.firstBaseUpdate=he:j.next=he,be.lastBaseUpdate=Q))}if(_!==null){var Te=v.baseState;k=0,be=he=Q=null,j=_;do{var me=j.lane&-536870913,ge=me!==j.lane;if(ge?(wt&me)===me:(h&me)===me){me!==0&&me===cl&&(Yg=!0),be!==null&&(be=be.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var $e=o,Ye=j;me=s;var Zt=c;switch(Ye.tag){case 1:if($e=Ye.payload,typeof $e=="function"){Te=$e.call(Zt,Te,me);break e}Te=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=Ye.payload,me=typeof $e=="function"?$e.call(Zt,Te,me):$e,me==null)break e;Te=p({},Te,me);break e;case 2:os=!0}}me=j.callback,me!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[me]:ge.push(me))}else ge={lane:me,tag:j.tag,payload:j.payload,callback:j.callback,next:null},be===null?(he=be=ge,Q=Te):be=be.next=ge,k|=me;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);be===null&&(Q=Te),v.baseState=Q,v.firstBaseUpdate=he,v.lastBaseUpdate=be,_===null&&(v.shared.lanes=0),ds|=k,o.lanes=k,o.memoizedState=Te}}function sS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function iS(o,s){var c=o.callbacks;if(c!==null)for(o.callbacks=null,o=0;o<c.length;o++)sS(c[o],s)}var hl=M(null),sf=M(0);function lS(o,s){o=ka,F(sf,o),F(hl,s),ka=o|s.baseLanes}function Qg(){F(sf,ka),F(hl,hl.current)}function Xg(){ka=sf.current,q(hl),q(sf)}var Fr=M(null),po=null;function is(o){var s=o.alternate;F(yn,yn.current&1),F(Fr,o),po===null&&(s===null||hl.current!==null||s.memoizedState!==null)&&(po=o)}function Jg(o){F(yn,yn.current),F(Fr,o),po===null&&(po=o)}function cS(o){o.tag===22?(F(yn,yn.current),F(Fr,o),po===null&&(po=o)):ls()}function ls(){F(yn,yn.current),F(Fr,Fr.current)}function Br(o){q(Fr),po===o&&(po=null),q(yn)}var yn=M(0);function lf(o){for(var s=o;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||ay(c)||sy(c)))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 Ra=0,st=null,Ht=null,On=null,cf=!1,pl=!1,di=!1,uf=0,qc=0,ml=null,R3=0;function mn(){throw Error(r(321))}function ev(o,s){if(s===null)return!1;for(var c=0;c<s.length&&c<o.length;c++)if(!zr(o[c],s[c]))return!1;return!0}function tv(o,s,c,h,v,_){return Ra=_,st=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=o===null||o.memoizedState===null?GS:gv,di=!1,_=c(h,v),di=!1,pl&&(_=dS(s,c,h,v)),uS(o),_}function uS(o){B.H=Zc;var s=Ht!==null&&Ht.next!==null;if(Ra=0,On=Ht=st=null,cf=!1,qc=0,ml=null,s)throw Error(r(300));o===null||Cn||(o=o.dependencies,o!==null&&Jd(o)&&(Cn=!0))}function dS(o,s,c,h){st=o;var v=0;do{if(pl&&(ml=null),qc=0,pl=!1,25<=v)throw Error(r(301));if(v+=1,On=Ht=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}B.H=ZS,_=s(c,h)}while(pl);return _}function x3(){var o=B.H,s=o.useState()[0];return s=typeof s.then=="function"?Hc(s):s,o=o.useState()[0],(Ht!==null?Ht.memoizedState:null)!==o&&(st.flags|=1024),s}function nv(){var o=uf!==0;return uf=0,o}function rv(o,s,c){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~c}function ov(o){if(cf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}cf=!1}Ra=0,On=Ht=st=null,pl=!1,qc=uf=0,ml=null}function yr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?st.memoizedState=On=o:On=On.next=o,On}function _n(){if(Ht===null){var o=st.alternate;o=o!==null?o.memoizedState:null}else o=Ht.next;var s=On===null?st.memoizedState:On.next;if(s!==null)On=s,Ht=o;else{if(o===null)throw st.alternate===null?Error(r(467)):Error(r(310));Ht=o,o={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},On===null?st.memoizedState=On=o:On=On.next=o}return On}function df(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hc(o){var s=qc;return qc+=1,ml===null&&(ml=[]),o=tS(ml,o,s),s=st,(On===null?s.memoizedState:On.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?GS:gv),o}function ff(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Hc(o);if(o.$$typeof===T)return Jn(o)}throw Error(r(438,String(o)))}function av(o){var s=null,c=st.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=st.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}),c===null&&(c=df(),st.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(o),h=0;h<o;h++)c[h]=K;return s.index++,c}function xa(o,s){return typeof s=="function"?s(o):s}function hf(o){var s=_n();return sv(s,Ht,o)}function sv(o,s,c){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;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,Q=null,he=s,be=!1;do{var Te=he.lane&-536870913;if(Te!==he.lane?(wt&Te)===Te:(Ra&Te)===Te){var me=he.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),Te===cl&&(be=!0);else if((Ra&me)===me){he=he.next,me===cl&&(be=!0);continue}else Te={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(j=Q=Te,k=_):Q=Q.next=Te,st.lanes|=me,ds|=me;Te=he.action,di&&c(_,Te),_=he.hasEagerState?he.eagerState:c(_,Te)}else me={lane:Te,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(j=Q=me,k=_):Q=Q.next=me,st.lanes|=Te,ds|=Te;he=he.next}while(he!==null&&he!==s);if(Q===null?k=_:Q.next=j,!zr(_,o.memoizedState)&&(Cn=!0,be&&(c=ul,c!==null)))throw c;o.memoizedState=_,o.baseState=k,o.baseQueue=Q,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function iv(o){var s=_n(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=o;var h=c.dispatch,v=c.pending,_=s.memoizedState;if(v!==null){c.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=_),c.lastRenderedState=_}return[_,h]}function fS(o,s,c){var h=st,v=_n(),_=Rt;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var k=!zr((Ht||v).memoizedState,c);if(k&&(v.memoizedState=c,Cn=!0),v=v.queue,uv(mS.bind(null,h,v,o),[o]),v.getSnapshot!==s||k||On!==null&&On.memoizedState.tag&1){if(h.flags|=2048,gl(9,{destroy:void 0},pS.bind(null,h,v,c,s),null),Yt===null)throw Error(r(349));_||(Ra&127)!==0||hS(h,s,c)}return c}function hS(o,s,c){o.flags|=16384,o={getSnapshot:s,value:c},s=st.updateQueue,s===null?(s=df(),st.updateQueue=s,s.stores=[o]):(c=s.stores,c===null?s.stores=[o]:c.push(o))}function pS(o,s,c,h){s.value=c,s.getSnapshot=h,gS(s)&&vS(o)}function mS(o,s,c){return c(function(){gS(s)&&vS(o)})}function gS(o){var s=o.getSnapshot;o=o.value;try{var c=s();return!zr(o,c)}catch{return!0}}function vS(o){var s=ni(o,2);s!==null&&kr(s,o,2)}function lv(o){var s=yr();if(typeof o=="function"){var c=o;if(o=c(),di){jn(!0);try{c()}finally{jn(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:o},s}function yS(o,s,c,h){return o.baseState=c,sv(o,Ht,typeof h=="function"?h:xa)}function T3(o,s,c,h,v){if(gf(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)}};B.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,_S(s,_)):(_.next=c.next,s.pending=c.next=_)}}function _S(o,s){var c=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=B.T,k={};B.T=k;try{var j=c(v,h),Q=B.S;Q!==null&&Q(k,j),bS(o,s,j)}catch(he){cv(o,s,he)}finally{_!==null&&k.types!==null&&(_.types=k.types),B.T=_}}else try{_=c(v,h),bS(o,s,_)}catch(he){cv(o,s,he)}}function bS(o,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){wS(o,s,h)},function(h){return cv(o,s,h)}):wS(o,s,c)}function wS(o,s,c){s.status="fulfilled",s.value=c,SS(s),o.state=c,s=o.pending,s!==null&&(c=s.next,c===s?o.pending=null:(c=c.next,s.next=c,_S(o,c)))}function cv(o,s,c){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,SS(s),s=s.next;while(s!==h)}o.action=null}function SS(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function ES(o,s){return s}function RS(o,s){if(Rt){var c=Yt.formState;if(c!==null){e:{var h=st;if(Rt){if(on){t:{for(var v=on,_=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){on=mo(v.nextSibling),h=v.data==="F!";break e}}ns(h)}h=!1}h&&(s=c[0])}}return c=yr(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ES,lastRenderedState:s},c.queue=h,c=BS.bind(null,st,h),h.dispatch=c,h=lv(!1),_=mv.bind(null,st,!1,h.queue),h=yr(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,c=T3.bind(null,st,v,_,c),v.dispatch=c,h.memoizedState=o,[s,c,!1]}function xS(o){var s=_n();return TS(s,Ht,o)}function TS(o,s,c){if(s=sv(o,s,ES)[0],o=hf(xa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Hc(s)}catch(k){throw k===dl?nf:k}else h=s;s=_n();var v=s.queue,_=v.dispatch;return c!==s.memoizedState&&(st.flags|=2048,gl(9,{destroy:void 0},O3.bind(null,v,c),null)),[h,_,o]}function O3(o,s){o.action=s}function OS(o){var s=_n(),c=Ht;if(c!==null)return TS(s,c,o);_n(),s=s.memoizedState,c=_n();var h=c.queue.dispatch;return c.memoizedState=o,[s,h,!1]}function gl(o,s,c,h){return o={tag:o,create:c,deps:h,inst:s,next:null},s=st.updateQueue,s===null&&(s=df(),st.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=o.next=o:(h=c.next,c.next=o,o.next=h,s.lastEffect=o),o}function CS(){return _n().memoizedState}function pf(o,s,c,h){var v=yr();st.flags|=o,v.memoizedState=gl(1|s,{destroy:void 0},c,h===void 0?null:h)}function mf(o,s,c,h){var v=_n();h=h===void 0?null:h;var _=v.memoizedState.inst;Ht!==null&&h!==null&&ev(h,Ht.memoizedState.deps)?v.memoizedState=gl(s,_,c,h):(st.flags|=o,v.memoizedState=gl(1|s,_,c,h))}function AS(o,s){pf(8390656,8,o,s)}function uv(o,s){mf(2048,8,o,s)}function C3(o){st.flags|=4;var s=st.updateQueue;if(s===null)s=df(),st.updateQueue=s,s.events=[o];else{var c=s.events;c===null?s.events=[o]:c.push(o)}}function IS(o){var s=_n().memoizedState;return C3({ref:s,nextImpl:o}),function(){if((Dt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function NS(o,s){return mf(4,2,o,s)}function kS(o,s){return mf(4,4,o,s)}function MS(o,s){if(typeof s=="function"){o=o();var c=s(o);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function PS(o,s,c){c=c!=null?c.concat([o]):null,mf(4,4,MS.bind(null,s,o),c)}function dv(){}function DS(o,s){var c=_n();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&ev(s,h[1])?h[0]:(c.memoizedState=[o,s],o)}function LS(o,s){var c=_n();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&ev(s,h[1]))return h[0];if(h=o(),di){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h}function fv(o,s,c){return c===void 0||(Ra&1073741824)!==0&&(wt&261930)===0?o.memoizedState=s:(o.memoizedState=c,o=jE(),st.lanes|=o,ds|=o,c)}function jS(o,s,c,h){return zr(c,s)?c:hl.current!==null?(o=fv(o,c,h),zr(o,s)||(Cn=!0),o):(Ra&42)===0||(Ra&1073741824)!==0&&(wt&261930)===0?(Cn=!0,o.memoizedState=c):(o=jE(),st.lanes|=o,ds|=o,s)}function $S(o,s,c,h,v){var _=W.p;W.p=_!==0&&8>_?_:8;var k=B.T,j={};B.T=j,mv(o,!1,s,c);try{var Q=v(),he=B.S;if(he!==null&&he(j,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=E3(Q,h);Gc(o,s,be,Gr(o))}else Gc(o,s,h,Gr(o))}catch(Te){Gc(o,s,{then:function(){},status:"rejected",reason:Te},Gr())}finally{W.p=_,k!==null&&j.types!==null&&(k.types=j.types),B.T=k}}function A3(){}function hv(o,s,c,h){if(o.tag!==5)throw Error(r(476));var v=US(o).queue;$S(o,v,s,Y,c===null?A3:function(){return zS(o),c(h)})}function US(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:Y},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:c},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function zS(o){var s=US(o);s.next===null&&(s=o.alternate.memoizedState),Gc(o,s.next.queue,{},Gr())}function pv(){return Jn(cu)}function VS(){return _n().memoizedState}function FS(){return _n().memoizedState}function I3(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var c=Gr();o=as(c);var h=ss(s,o,c);h!==null&&(kr(h,s,c),Vc(h,s,c)),s={cache:Bg()},o.payload=s;return}s=s.return}}function N3(o,s,c){var h=Gr();c={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},gf(o)?qS(s,c):(c=kg(o,s,c,h),c!==null&&(kr(c,o,h),HS(c,s,h)))}function BS(o,s,c){var h=Gr();Gc(o,s,c,h)}function Gc(o,s,c,h){var v={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(gf(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,c);if(v.hasEagerState=!0,v.eagerState=j,zr(j,k))return Wd(o,s,v,0),Yt===null&&Kd(),!1}catch{}finally{}if(c=kg(o,s,v,h),c!==null)return kr(c,o,h),HS(c,s,h),!0}return!1}function mv(o,s,c,h){if(h={lane:2,revertLane:Zv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},gf(o)){if(s)throw Error(r(479))}else s=kg(o,c,h,2),s!==null&&kr(s,o,2)}function gf(o){var s=o.alternate;return o===st||s!==null&&s===st}function qS(o,s){pl=cf=!0;var c=o.pending;c===null?s.next=s:(s.next=c.next,c.next=s),o.pending=s}function HS(o,s,c){if((c&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Yn(o,c)}}var Zc={readContext:Jn,use:ff,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};Zc.useEffectEvent=mn;var GS={readContext:Jn,use:ff,useCallback:function(o,s){return yr().memoizedState=[o,s===void 0?null:s],o},useContext:Jn,useEffect:AS,useImperativeHandle:function(o,s,c){c=c!=null?c.concat([o]):null,pf(4194308,4,MS.bind(null,s,o),c)},useLayoutEffect:function(o,s){return pf(4194308,4,o,s)},useInsertionEffect:function(o,s){pf(4,2,o,s)},useMemo:function(o,s){var c=yr();s=s===void 0?null:s;var h=o();if(di){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h},useReducer:function(o,s,c){var h=yr();if(c!==void 0){var v=c(s);if(di){jn(!0);try{c(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=N3.bind(null,st,o),[h.memoizedState,o]},useRef:function(o){var s=yr();return o={current:o},s.memoizedState=o},useState:function(o){o=lv(o);var s=o.queue,c=BS.bind(null,st,s);return s.dispatch=c,[o.memoizedState,c]},useDebugValue:dv,useDeferredValue:function(o,s){var c=yr();return fv(c,o,s)},useTransition:function(){var o=lv(!1);return o=$S.bind(null,st,o.queue,!0,!1),yr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,c){var h=st,v=yr();if(Rt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Yt===null)throw Error(r(349));(wt&127)!==0||hS(h,s,c)}v.memoizedState=c;var _={value:c,getSnapshot:s};return v.queue=_,AS(mS.bind(null,h,_,o),[o]),h.flags|=2048,gl(9,{destroy:void 0},pS.bind(null,h,_,c,s),null),c},useId:function(){var o=yr(),s=Yt.identifierPrefix;if(Rt){var c=Yo,h=Wo;c=(h&~(1<<32-xn(h)-1)).toString(32)+c,s="_"+s+"R_"+c,c=uf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=R3++,s="_"+s+"r_"+c.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:pv,useFormState:RS,useActionState:RS,useOptimistic:function(o){var s=yr();s.memoizedState=s.baseState=o;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=mv.bind(null,st,!0,c),c.dispatch=s,[o,s]},useMemoCache:av,useCacheRefresh:function(){return yr().memoizedState=I3.bind(null,st)},useEffectEvent:function(o){var s=yr(),c={impl:o};return s.memoizedState=c,function(){if((Dt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},gv={readContext:Jn,use:ff,useCallback:DS,useContext:Jn,useEffect:uv,useImperativeHandle:PS,useInsertionEffect:NS,useLayoutEffect:kS,useMemo:LS,useReducer:hf,useRef:CS,useState:function(){return hf(xa)},useDebugValue:dv,useDeferredValue:function(o,s){var c=_n();return jS(c,Ht.memoizedState,o,s)},useTransition:function(){var o=hf(xa)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Hc(o),s]},useSyncExternalStore:fS,useId:VS,useHostTransitionStatus:pv,useFormState:xS,useActionState:xS,useOptimistic:function(o,s){var c=_n();return yS(c,Ht,o,s)},useMemoCache:av,useCacheRefresh:FS};gv.useEffectEvent=IS;var ZS={readContext:Jn,use:ff,useCallback:DS,useContext:Jn,useEffect:uv,useImperativeHandle:PS,useInsertionEffect:NS,useLayoutEffect:kS,useMemo:LS,useReducer:iv,useRef:CS,useState:function(){return iv(xa)},useDebugValue:dv,useDeferredValue:function(o,s){var c=_n();return Ht===null?fv(c,o,s):jS(c,Ht.memoizedState,o,s)},useTransition:function(){var o=iv(xa)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Hc(o),s]},useSyncExternalStore:fS,useId:VS,useHostTransitionStatus:pv,useFormState:OS,useActionState:OS,useOptimistic:function(o,s){var c=_n();return Ht!==null?yS(c,Ht,o,s):(c.baseState=o,[o,c.queue.dispatch])},useMemoCache:av,useCacheRefresh:FS};ZS.useEffectEvent=IS;function vv(o,s,c,h){s=o.memoizedState,c=c(h,s),c=c==null?s:p({},s,c),o.memoizedState=c,o.lanes===0&&(o.updateQueue.baseState=c)}var yv={enqueueSetState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=as(h);v.payload=s,c!=null&&(v.callback=c),s=ss(o,v,h),s!==null&&(kr(s,o,h),Vc(s,o,h))},enqueueReplaceState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=as(h);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=ss(o,v,h),s!==null&&(kr(s,o,h),Vc(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var c=Gr(),h=as(c);h.tag=2,s!=null&&(h.callback=s),s=ss(o,h,c),s!==null&&(kr(s,o,c),Vc(s,o,c))}};function KS(o,s,c,h,v,_,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,k):s.prototype&&s.prototype.isPureReactComponent?!Mc(c,h)||!Mc(v,_):!0}function WS(o,s,c,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==o&&yv.enqueueReplaceState(s,s.state,null)}function fi(o,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(o=o.defaultProps){c===s&&(c=p({},c));for(var v in o)c[v]===void 0&&(c[v]=o[v])}return c}function YS(o){Zd(o)}function QS(o){console.error(o)}function XS(o){Zd(o)}function vf(o,s){try{var c=o.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function JS(o,s,c){try{var h=o.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function _v(o,s,c){return c=as(c),c.tag=3,c.payload={element:null},c.callback=function(){vf(o,s)},c}function eE(o){return o=as(o),o.tag=3,o}function tE(o,s,c,h){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){JS(s,c,h)}}var k=c.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(o.callback=function(){JS(s,c,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 k3(o,s,c,h,v){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&ll(s,c,v,!0),c=Fr.current,c!==null){switch(c.tag){case 31:case 13:return po===null?Af():c.alternate===null&&gn===0&&(gn=3),c.flags&=-257,c.flags|=65536,c.lanes=v,h===rf?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),qv(o,h,v)),!1;case 22:return c.flags|=65536,h===rf?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),qv(o,h,v)),!1}throw Error(r(435,c.tag))}return qv(o,h,v),Af(),!1}if(Rt)return s=Fr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==$g&&(o=Error(r(422),{cause:h}),Lc(co(o,c)))):(h!==$g&&(s=Error(r(423),{cause:h}),Lc(co(s,c))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=co(h,c),v=_v(o.stateNode,h,v),Wg(o,v),gn!==4&&(gn=2)),!1;var _=Error(r(520),{cause:h});if(_=co(_,c),tu===null?tu=[_]:tu.push(_),gn!==4&&(gn=2),s===null)return!0;h=co(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,o=v&-v,c.lanes|=o,o=_v(c.stateNode,h,o),Wg(c,o),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(fs===null||!fs.has(_))))return c.flags|=65536,v&=-v,c.lanes|=v,v=eE(v),tE(v,o,c,h),Wg(c,v),!1}c=c.return}while(c!==null);return!1}var bv=Error(r(461)),Cn=!1;function er(o,s,c,h){s.child=o===null?aS(s,null,c,h):ui(s,o.child,c,h)}function nE(o,s,c,h,v){c=c.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 si(s),h=tv(o,s,c,k,_,v),j=nv(),o!==null&&!Cn?(rv(o,s,v),Ta(o,s,v)):(Rt&&j&&Lg(s),s.flags|=1,er(o,s,h,v),s.child)}function rE(o,s,c,h,v){if(o===null){var _=c.type;return typeof _=="function"&&!Mg(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,oE(o,s,_,h,v)):(o=Qd(c.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!Cv(o,v)){var k=_.memoizedProps;if(c=c.compare,c=c!==null?c:Mc,c(k,h)&&o.ref===s.ref)return Ta(o,s,v)}return s.flags|=1,o=ba(_,h),o.ref=s.ref,o.return=s,s.child=o}function oE(o,s,c,h,v){if(o!==null){var _=o.memoizedProps;if(Mc(_,h)&&o.ref===s.ref)if(Cn=!1,s.pendingProps=h=_,Cv(o,v))(o.flags&131072)!==0&&(Cn=!0);else return s.lanes=o.lanes,Ta(o,s,v)}return wv(o,s,c,h,v)}function aE(o,s,c,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|c:c,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 sE(o,s,_,c,h)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&tf(s,_!==null?_.cachePool:null),_!==null?lS(s,_):Qg(),cS(s);else return h=s.lanes=536870912,sE(o,s,_!==null?_.baseLanes|c:c,c,h)}else _!==null?(tf(s,_.cachePool),lS(s,_),ls(),s.memoizedState=null):(o!==null&&tf(s,null),Qg(),ls());return er(o,s,v,c),s.child}function Kc(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function sE(o,s,c,h,v){var _=Hg();return _=_===null?null:{parent:Tn._currentValue,pool:_},s.memoizedState={baseLanes:c,cachePool:_},o!==null&&tf(s,null),Qg(),cS(s),o!==null&&ll(o,s,h,!0),s.childLanes=v,null}function yf(o,s){return s=bf({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function iE(o,s,c){return ui(s,o.child,null,c),o=yf(s,s.pendingProps),o.flags|=2,Br(s),s.memoizedState=null,o}function M3(o,s,c){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(Rt){if(h.mode==="hidden")return o=yf(s,h),s.lanes=536870912,Kc(null,o);if(Jg(s),(o=on)?(o=_R(o,ho),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Wo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},c=qw(o),c.return=s,s.child=c,Xn=s,on=null)):o=null,o===null)throw ns(s);return s.lanes=536870912,null}return yf(s,h)}var _=o.memoizedState;if(_!==null){var k=_.dehydrated;if(Jg(s),v)if(s.flags&256)s.flags&=-257,s=iE(o,s,c);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(Cn||ll(o,s,c,!1),v=(c&o.childLanes)!==0,Cn||v){if(h=Yt,h!==null&&(k=xr(h,c),k!==0&&k!==_.retryLane))throw _.retryLane=k,ni(o,k),kr(h,o,k),bv;Af(),s=iE(o,s,c)}else o=_.treeContext,on=mo(k.nextSibling),Xn=s,Rt=!0,ts=null,ho=!1,o!==null&&Zw(s,o),s=yf(s,h),s.flags|=4096;return s}return o=ba(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function _f(o,s){var c=s.ref;if(c===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(o===null||o.ref!==c)&&(s.flags|=4194816)}}function wv(o,s,c,h,v){return si(s),c=tv(o,s,c,h,void 0,v),h=nv(),o!==null&&!Cn?(rv(o,s,v),Ta(o,s,v)):(Rt&&h&&Lg(s),s.flags|=1,er(o,s,c,v),s.child)}function lE(o,s,c,h,v,_){return si(s),s.updateQueue=null,c=dS(s,h,c,v),uS(o),h=nv(),o!==null&&!Cn?(rv(o,s,_),Ta(o,s,_)):(Rt&&h&&Lg(s),s.flags|=1,er(o,s,c,_),s.child)}function cE(o,s,c,h,v){if(si(s),s.stateNode===null){var _=ol,k=c.contextType;typeof k=="object"&&k!==null&&(_=Jn(k)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=yv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Zg(s),k=c.contextType,_.context=typeof k=="object"&&k!==null?Jn(k):ol,_.state=s.memoizedState,k=c.getDerivedStateFromProps,typeof k=="function"&&(vv(s,c,k,h),_.state=s.memoizedState),typeof c.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&&yv.enqueueReplaceState(_,_.state,null),Bc(s,h,_,v),Fc(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,Q=fi(c,j);_.props=Q;var he=_.context,be=c.contextType;k=ol,typeof be=="object"&&be!==null&&(k=Jn(be));var Te=c.getDerivedStateFromProps;be=typeof Te=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||he!==k)&&WS(s,_,h,k),os=!1;var me=s.memoizedState;_.state=me,Bc(s,h,_,v),Fc(),he=s.memoizedState,j||me!==he||os?(typeof Te=="function"&&(vv(s,c,Te,h),he=s.memoizedState),(Q=os||KS(s,c,Q,h,me,he,k))?(be||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=Q):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Kg(o,s),k=s.memoizedProps,be=fi(c,k),_.props=be,Te=s.pendingProps,me=_.context,he=c.contextType,Q=ol,typeof he=="object"&&he!==null&&(Q=Jn(he)),j=c.getDerivedStateFromProps,(he=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k!==Te||me!==Q)&&WS(s,_,h,Q),os=!1,me=s.memoizedState,_.state=me,Bc(s,h,_,v),Fc();var ge=s.memoizedState;k!==Te||me!==ge||os||o!==null&&o.dependencies!==null&&Jd(o.dependencies)?(typeof j=="function"&&(vv(s,c,j,h),ge=s.memoizedState),(be=os||KS(s,c,be,h,me,ge,Q)||o!==null&&o.dependencies!==null&&Jd(o.dependencies))?(he||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,Q),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,Q)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=Q,h=be):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,_f(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=ui(s,o.child,null,v),s.child=ui(s,null,c,v)):er(o,s,c,v),s.memoizedState=_.state,o=s.child):o=Ta(o,s,v),o}function uE(o,s,c,h){return oi(),s.flags|=256,er(o,s,c,h),s.child}var Sv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ev(o){return{baseLanes:o,cachePool:Jw()}}function Rv(o,s,c){return o=o!==null?o.childLanes&~c:0,s&&(o|=Hr),o}function dE(o,s,c){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(Rt){if(v?is(s):ls(),(o=on)?(o=_R(o,ho),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Wo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},c=qw(o),c.return=s,s.child=c,Xn=s,on=null)):o=null,o===null)throw ns(s);return sy(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(ls(),v=s.mode,j=bf({mode:"hidden",children:j},v),h=ri(h,v,c,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=Ev(c),h.childLanes=Rv(o,k,c),s.memoizedState=Sv,Kc(null,h)):(is(s),xv(s,j))}var Q=o.memoizedState;if(Q!==null&&(j=Q.dehydrated,j!==null)){if(_)s.flags&256?(is(s),s.flags&=-257,s=Tv(o,s,c)):s.memoizedState!==null?(ls(),s.child=o.child,s.flags|=128,s=null):(ls(),j=h.fallback,v=s.mode,h=bf({mode:"visible",children:h.children},v),j=ri(j,v,c,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,ui(s,o.child,null,c),h=s.child,h.memoizedState=Ev(c),h.childLanes=Rv(o,k,c),s.memoizedState=Sv,s=Kc(null,h));else if(is(s),sy(j)){if(k=j.nextSibling&&j.nextSibling.dataset,k)var he=k.dgst;k=he,h=Error(r(419)),h.stack="",h.digest=k,Lc({value:h,source:null,stack:null}),s=Tv(o,s,c)}else if(Cn||ll(o,s,c,!1),k=(c&o.childLanes)!==0,Cn||k){if(k=Yt,k!==null&&(h=xr(k,c),h!==0&&h!==Q.retryLane))throw Q.retryLane=h,ni(o,h),kr(k,o,h),bv;ay(j)||Af(),s=Tv(o,s,c)}else ay(j)?(s.flags|=192,s.child=o.child,s=null):(o=Q.treeContext,on=mo(j.nextSibling),Xn=s,Rt=!0,ts=null,ho=!1,o!==null&&Zw(s,o),s=xv(s,h.children),s.flags|=4096);return s}return v?(ls(),j=h.fallback,v=s.mode,Q=o.child,he=Q.sibling,h=ba(Q,{mode:"hidden",children:h.children}),h.subtreeFlags=Q.subtreeFlags&65011712,he!==null?j=ba(he,j):(j=ri(j,v,c,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Kc(null,h),h=s.child,j=o.child.memoizedState,j===null?j=Ev(c):(v=j.cachePool,v!==null?(Q=Tn._currentValue,v=v.parent!==Q?{parent:Q,pool:Q}:v):v=Jw(),j={baseLanes:j.baseLanes|c,cachePool:v}),h.memoizedState=j,h.childLanes=Rv(o,k,c),s.memoizedState=Sv,Kc(o.child,h)):(is(s),c=o.child,o=c.sibling,c=ba(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,o!==null&&(k=s.deletions,k===null?(s.deletions=[o],s.flags|=16):k.push(o)),s.child=c,s.memoizedState=null,c)}function xv(o,s){return s=bf({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function bf(o,s){return o=Vr(22,o,null,s),o.lanes=0,o}function Tv(o,s,c){return ui(s,o.child,null,c),o=xv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function fE(o,s,c){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),Vg(o.return,s,c)}function Ov(o,s,c,h,v,_){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:v,treeForkCount:_}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=h,k.tail=c,k.tailMode=v,k.treeForkCount=_)}function hE(o,s,c){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,F(yn,k),er(o,s,h,c),h=Rt?Dc:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&fE(o,c,s);else if(o.tag===19)fE(o,c,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(c=s.child,v=null;c!==null;)o=c.alternate,o!==null&&lf(o)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Ov(s,!1,v,c,_,h);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&lf(o)===null){s.child=v;break}o=v.sibling,v.sibling=c,c=v,v=o}Ov(s,!0,c,null,_,h);break;case"together":Ov(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function Ta(o,s,c){if(o!==null&&(s.dependencies=o.dependencies),ds|=s.lanes,(c&s.childLanes)===0)if(o!==null){if(ll(o,s,c,!1),(c&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,c=ba(o,o.pendingProps),s.child=c,c.return=s;o.sibling!==null;)o=o.sibling,c=c.sibling=ba(o,o.pendingProps),c.return=s;c.sibling=null}return s.child}function Cv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Jd(o)))}function P3(o,s,c){switch(s.tag){case 3:ve(s,s.stateNode.containerInfo),rs(s,Tn,o.memoizedState.cache),oi();break;case 27:case 5:Ae(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,Jg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(is(s),s.flags|=128,null):(c&s.child.childLanes)!==0?dE(o,s,c):(is(s),o=Ta(o,s,c),o!==null?o.sibling:null);is(s);break;case 19:var v=(o.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(ll(o,s,c,!1),h=(c&s.childLanes)!==0),v){if(h)return hE(o,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),F(yn,yn.current),h)break;return null;case 22:return s.lanes=0,aE(o,s,c,s.pendingProps);case 24:rs(s,Tn,o.memoizedState.cache)}return Ta(o,s,c)}function pE(o,s,c){if(o!==null)if(o.memoizedProps!==s.pendingProps)Cn=!0;else{if(!Cv(o,c)&&(s.flags&128)===0)return Cn=!1,P3(o,s,c);Cn=(o.flags&131072)!==0}else Cn=!1,Rt&&(s.flags&1048576)!==0&&Gw(s,Dc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=li(s.elementType),s.type=o,typeof o=="function")Mg(o)?(h=fi(o,h),s.tag=1,s=cE(null,s,o,h,c)):(s.tag=0,s=wv(null,s,o,h,c));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=nE(null,s,o,h,c);break e}else if(v===N){s.tag=14,s=rE(null,s,o,h,c);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return wv(o,s,s.type,s.pendingProps,c);case 1:return h=s.type,v=fi(h,s.pendingProps),cE(o,s,h,v,c);case 3:e:{if(ve(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,Kg(o,s),Bc(s,h,null,c);var k=s.memoizedState;if(h=k.cache,rs(s,Tn,h),h!==_.cache&&Fg(s,[Tn],c,!0),Fc(),h=k.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:k.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=uE(o,s,h,c);break e}else if(h!==v){v=co(Error(r(424)),s),Lc(v),s=uE(o,s,h,c);break e}else{switch(o=s.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(on=mo(o.firstChild),Xn=s,Rt=!0,ts=null,ho=!0,c=aS(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(oi(),h===v){s=Ta(o,s,c);break e}er(o,s,h,c)}s=s.child}return s;case 26:return _f(o,s),o===null?(c=xR(s.type,null,s.pendingProps,null))?s.memoizedState=c:Rt||(c=s.type,o=s.pendingProps,h=Lf(X.current).createElement(c),h[Qn]=s,h[Tr]=o,tr(h,c,o),qn(h),s.stateNode=h):s.memoizedState=xR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ae(s),o===null&&Rt&&(h=s.stateNode=SR(s.type,s.pendingProps,X.current),Xn=s,ho=!0,v=on,gs(s.type)?(iy=v,on=mo(h.firstChild)):on=v),er(o,s,s.pendingProps.children,c),_f(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&Rt&&((v=h=on)&&(h=uD(h,s.type,s.pendingProps,ho),h!==null?(s.stateNode=h,Xn=s,on=mo(h.firstChild),ho=!1,v=!0):v=!1),v||ns(s)),Ae(s),v=s.type,_=s.pendingProps,k=o!==null?o.memoizedProps:null,h=_.children,ny(v,_)?h=null:k!==null&&ny(v,k)&&(s.flags|=32),s.memoizedState!==null&&(v=tv(o,s,x3,null,null,c),cu._currentValue=v),_f(o,s),er(o,s,h,c),s.child;case 6:return o===null&&Rt&&((o=c=on)&&(c=dD(c,s.pendingProps,ho),c!==null?(s.stateNode=c,Xn=s,on=null,o=!0):o=!1),o||ns(s)),null;case 13:return dE(o,s,c);case 4:return ve(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=ui(s,null,h,c):er(o,s,h,c),s.child;case 11:return nE(o,s,s.type,s.pendingProps,c);case 7:return er(o,s,s.pendingProps,c),s.child;case 8:return er(o,s,s.pendingProps.children,c),s.child;case 12:return er(o,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,rs(s,s.type,h.value),er(o,s,h.children,c),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,si(s),v=Jn(v),h=h(v),s.flags|=1,er(o,s,h,c),s.child;case 14:return rE(o,s,s.type,s.pendingProps,c);case 15:return oE(o,s,s.type,s.pendingProps,c);case 19:return hE(o,s,c);case 31:return M3(o,s,c);case 22:return aE(o,s,c,s.pendingProps);case 24:return si(s),h=Jn(Tn),o===null?(v=Hg(),v===null&&(v=Yt,_=Bg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=c),v=_),s.memoizedState={parent:h,cache:v},Zg(s),rs(s,Tn,v)):((o.lanes&c)!==0&&(Kg(o,s),Bc(s,null,null,c),Fc()),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&&Fg(s,[Tn],c,!0))),er(o,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Oa(o){o.flags|=4}function Av(o,s,c,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(VE())o.flags|=8192;else throw ci=rf,Gg}else o.flags&=-16777217}function mE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!IR(s))if(VE())o.flags|=8192;else throw ci=rf,Gg}function wf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?qt():536870912,o.lanes|=s,bl|=s)}function Wc(o,s){if(!Rt)switch(o.tailMode){case"hidden":s=o.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o.tail=null:c.sibling=null;break;case"collapsed":c=o.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function an(o){var s=o.alternate!==null&&o.alternate.child===o.child,c=0,h=0;if(s)for(var v=o.child;v!==null;)c|=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;)c|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=c,s}function D3(o,s,c){var h=s.pendingProps;switch(jg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return an(s),null;case 3:return c=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Ea(Tn),Ie(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(o===null||o.child===null)&&(il(s)?Oa(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ug())),an(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(Oa(s),_!==null?(an(s),mE(s,_)):(an(s),Av(s,v,null,h,c))):_?_!==o.memoizedState?(Oa(s),an(s),mE(s,_)):(an(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&Oa(s),an(s),Av(s,v,o,h,c)),null;case 27:if(H(s),c=X.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return an(s),null}o=L.current,il(s)?Kw(s):(o=SR(v,h,c),s.stateNode=o,Oa(s))}return an(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return an(s),null}if(_=L.current,il(s))Kw(s);else{var k=Lf(X.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&&Oa(s)}}return an(s),Av(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,c),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=X.current,il(s)){if(o=s.stateNode,c=s.memoizedProps,h=null,v=Xn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Qn]=s,o=!!(o.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||dR(o.nodeValue,c)),o||ns(s,!0)}else o=Lf(o).createTextNode(h),o[Qn]=s,s.stateNode=o}return an(s),null;case 31:if(c=s.memoizedState,o===null||o.memoizedState!==null){if(h=il(s),c!==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 oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),o=!1}else c=Ug(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=c),o=!0;if(!o)return s.flags&256?(Br(s),s):(Br(s),null);if((s.flags&128)!==0)throw Error(r(558))}return an(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=il(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 oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),v=!1}else v=Ug(),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=c,s):(c=h!==null,o=o!==null&&o.memoizedState!==null,c&&(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)),c!==o&&c&&(s.child.flags|=8192),wf(s,s.updateQueue),an(s),null);case 4:return Ie(),o===null&&Qv(s.stateNode.containerInfo),an(s),null;case 10:return Ea(s.type),an(s),null;case 19:if(q(yn),h=s.memoizedState,h===null)return an(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Wc(h,!1);else{if(gn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=lf(o),_!==null){for(s.flags|=128,Wc(h,!1),o=_.updateQueue,s.updateQueue=o,wf(s,o),s.subtreeFlags=0,o=c,c=s.child;c!==null;)Bw(c,o),c=c.sibling;return F(yn,yn.current&1|2),Rt&&wa(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&we()>Tf&&(s.flags|=128,v=!0,Wc(h,!1),s.lanes=4194304)}else{if(!v)if(o=lf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,wf(s,o),Wc(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!Rt)return an(s),null}else 2*we()-h.renderingStartTime>Tf&&c!==536870912&&(s.flags|=128,v=!0,Wc(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=we(),o.sibling=null,c=yn.current,F(yn,v?c&1|2:c&1),Rt&&wa(s,h.treeForkCount),o):(an(s),null);case 22:case 23:return Br(s),Xg(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),c=s.updateQueue,c!==null&&wf(s,c.retryQueue),c=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),o!==null&&q(ii),null;case 24:return c=null,o!==null&&(c=o.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Ea(Tn),an(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function L3(o,s){switch(jg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return Ea(Tn),Ie(),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));oi()}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));oi()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(yn),null;case 4:return Ie(),null;case 10:return Ea(s.type),null;case 22:case 23:return Br(s),Xg(),o!==null&&q(ii),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return Ea(Tn),null;case 25:return null;default:return null}}function gE(o,s){switch(jg(s),s.tag){case 3:Ea(Tn),Ie();break;case 26:case 27:case 5:H(s);break;case 4:Ie();break;case 31:s.memoizedState!==null&&Br(s);break;case 13:Br(s);break;case 19:q(yn);break;case 10:Ea(s.type);break;case 22:case 23:Br(s),Xg(),o!==null&&q(ii);break;case 24:Ea(Tn)}}function Yc(o,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var v=h.next;c=v;do{if((c.tag&o)===o){h=void 0;var _=c.create,k=c.inst;h=_(),k.destroy=h}c=c.next}while(c!==v)}}catch(j){zt(s,s.return,j)}}function cs(o,s,c){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 Q=c,he=j;try{he()}catch(be){zt(v,Q,be)}}}h=h.next}while(h!==_)}}catch(be){zt(s,s.return,be)}}function vE(o){var s=o.updateQueue;if(s!==null){var c=o.stateNode;try{iS(s,c)}catch(h){zt(o,o.return,h)}}}function yE(o,s,c){c.props=fi(o.type,o.memoizedProps),c.state=o.memoizedState;try{c.componentWillUnmount()}catch(h){zt(o,s,h)}}function Qc(o,s){try{var c=o.ref;if(c!==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 c=="function"?o.refCleanup=c(h):c.current=h}}catch(v){zt(o,s,v)}}function Qo(o,s){var c=o.ref,h=o.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(v){zt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){zt(o,s,v)}else c.current=null}function _E(o){var s=o.type,c=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(v){zt(o,o.return,v)}}function Iv(o,s,c){try{var h=o.stateNode;oD(h,o.type,c,s),h[Tr]=s}catch(v){zt(o,o.return,v)}}function bE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&gs(o.type)||o.tag===4}function Nv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||bE(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 kv(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(o,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(o),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=ya));else if(h!==4&&(h===27&&gs(o.type)&&(c=o.stateNode,s=null),o=o.child,o!==null))for(kv(o,s,c),o=o.sibling;o!==null;)kv(o,s,c),o=o.sibling}function Sf(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?c.insertBefore(o,s):c.appendChild(o);else if(h!==4&&(h===27&&gs(o.type)&&(c=o.stateNode),o=o.child,o!==null))for(Sf(o,s,c),o=o.sibling;o!==null;)Sf(o,s,c),o=o.sibling}function wE(o){var s=o.stateNode,c=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);tr(s,h,c),s[Qn]=o,s[Tr]=c}catch(_){zt(o,o.return,_)}}var Ca=!1,An=!1,Mv=!1,SE=typeof WeakSet=="function"?WeakSet:Set,Hn=null;function j3(o,s){if(o=o.containerInfo,ey=Bf,o=Pw(o),Tg(o)){if("selectionStart"in o)var c={start:o.selectionStart,end:o.selectionEnd};else e:{c=(c=o.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var k=0,j=-1,Q=-1,he=0,be=0,Te=o,me=null;t:for(;;){for(var ge;Te!==c||v!==0&&Te.nodeType!==3||(j=k+v),Te!==_||h!==0&&Te.nodeType!==3||(Q=k+h),Te.nodeType===3&&(k+=Te.nodeValue.length),(ge=Te.firstChild)!==null;)me=Te,Te=ge;for(;;){if(Te===o)break t;if(me===c&&++he===v&&(j=k),me===_&&++be===h&&(Q=k),(ge=Te.nextSibling)!==null)break;Te=me,me=Te.parentNode}Te=ge}c=j===-1||Q===-1?null:{start:j,end:Q}}else c=null}c=c||{start:0,end:0}}else c=null;for(ty={focusedElem:o,selectionRange:c},Bf=!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(c=0;c<o.length;c++)v=o[c],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,c=s,v=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var $e=fi(c.type,v);o=h.getSnapshotBeforeUpdate($e,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ye){zt(c,c.return,Ye)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,c=o.nodeType,c===9)oy(o);else if(c===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":oy(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 EE(o,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:Ia(o,c),h&4&&Yc(5,c);break;case 1:if(Ia(o,c),h&4)if(o=c.stateNode,s===null)try{o.componentDidMount()}catch(k){zt(c,c.return,k)}else{var v=fi(c.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(k){zt(c,c.return,k)}}h&64&&vE(c),h&512&&Qc(c,c.return);break;case 3:if(Ia(o,c),h&64&&(o=c.updateQueue,o!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{iS(o,s)}catch(k){zt(c,c.return,k)}}break;case 27:s===null&&h&4&&wE(c);case 26:case 5:Ia(o,c),s===null&&h&4&&_E(c),h&512&&Qc(c,c.return);break;case 12:Ia(o,c);break;case 31:Ia(o,c),h&4&&TE(o,c);break;case 13:Ia(o,c),h&4&&OE(o,c),h&64&&(o=c.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(c=G3.bind(null,c),fD(o,c))));break;case 22:if(h=c.memoizedState!==null||Ca,!h){s=s!==null&&s.memoizedState!==null||An,v=Ca;var _=An;Ca=h,(An=s)&&!_?Na(o,c,(c.subtreeFlags&8772)!==0):Ia(o,c),Ca=v,An=_}break;case 30:break;default:Ia(o,c)}}function RE(o){var s=o.alternate;s!==null&&(o.alternate=null,RE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&cg(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 sn=null,Cr=!1;function Aa(o,s,c){for(c=c.child;c!==null;)xE(o,s,c),c=c.sibling}function xE(o,s,c){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(Rn,c)}catch{}switch(c.tag){case 26:An||Qo(c,s),Aa(o,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:An||Qo(c,s);var h=sn,v=Cr;gs(c.type)&&(sn=c.stateNode,Cr=!1),Aa(o,s,c),su(c.stateNode),sn=h,Cr=v;break;case 5:An||Qo(c,s);case 6:if(h=sn,v=Cr,sn=null,Aa(o,s,c),sn=h,Cr=v,sn!==null)if(Cr)try{(sn.nodeType===9?sn.body:sn.nodeName==="HTML"?sn.ownerDocument.body:sn).removeChild(c.stateNode)}catch(_){zt(c,s,_)}else try{sn.removeChild(c.stateNode)}catch(_){zt(c,s,_)}break;case 18:sn!==null&&(Cr?(o=sn,vR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,c.stateNode),Cl(o)):vR(sn,c.stateNode));break;case 4:h=sn,v=Cr,sn=c.stateNode.containerInfo,Cr=!0,Aa(o,s,c),sn=h,Cr=v;break;case 0:case 11:case 14:case 15:cs(2,c,s),An||cs(4,c,s),Aa(o,s,c);break;case 1:An||(Qo(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&yE(c,s,h)),Aa(o,s,c);break;case 21:Aa(o,s,c);break;case 22:An=(h=An)||c.memoizedState!==null,Aa(o,s,c),An=h;break;default:Aa(o,s,c)}}function TE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Cl(o)}catch(c){zt(s,s.return,c)}}}function OE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Cl(o)}catch(c){zt(s,s.return,c)}}function $3(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new SE),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new SE),s;default:throw Error(r(435,o.tag))}}function Ef(o,s){var c=$3(o);s.forEach(function(h){if(!c.has(h)){c.add(h);var v=Z3.bind(null,o,h);h.then(v,v)}})}function Ar(o,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var v=c[h],_=o,k=s,j=k;e:for(;j!==null;){switch(j.tag){case 27:if(gs(j.type)){sn=j.stateNode,Cr=!1;break e}break;case 5:sn=j.stateNode,Cr=!1;break e;case 3:case 4:sn=j.stateNode.containerInfo,Cr=!0;break e}j=j.return}if(sn===null)throw Error(r(160));xE(_,k,v),sn=null,Cr=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)CE(s,o),s=s.sibling}var Io=null;function CE(o,s){var c=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Ar(s,o),Ir(o),h&4&&(cs(3,o,o.return),Yc(3,o),cs(5,o,o.return));break;case 1:Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),h&64&&Ca&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(c=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var v=Io;if(Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=o.memoizedState,c===null)if(h===null)if(o.stateNode===null){e:{h=o.type,c=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Rc]||_[Qn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),tr(_,h,c),_[Qn]=o,qn(_),h=_;break e;case"link":var k=CR("link","href",v).get(h+(c.href||""));if(k){for(var j=0;j<k.length;j++)if(_=k[j],_.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;case"meta":if(k=CR("meta","content",v).get(h+(c.content||""))){for(j=0;j<k.length;j++)if(_=k[j],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Qn]=o,qn(_),h=_}o.stateNode=h}else AR(v,o.type,o.stateNode);else o.stateNode=OR(v,h,o.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?AR(v,o.type,o.stateNode):OR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Iv(o,o.memoizedProps,c.memoizedProps)}break;case 27:Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),c!==null&&h&4&&Iv(o,o.memoizedProps,c.memoizedProps);break;case 5:if(Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),o.flags&32){v=o.stateNode;try{Qi(v,"")}catch($e){zt(o,o.return,$e)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Iv(o,v,c!==null?c.memoizedProps:v)),h&1024&&(Mv=!0);break;case 6:if(Ar(s,o),Ir(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,c=o.stateNode;try{c.nodeValue=h}catch($e){zt(o,o.return,$e)}}break;case 3:if(Uf=null,v=Io,Io=jf(s.containerInfo),Ar(s,o),Io=v,Ir(o),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Cl(s.containerInfo)}catch($e){zt(o,o.return,$e)}Mv&&(Mv=!1,AE(o));break;case 4:h=Io,Io=jf(o.stateNode.containerInfo),Ar(s,o),Ir(o),Io=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,Ef(o,h)));break;case 13:Ar(s,o),Ir(o),o.child.flags&8192&&o.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(xf=we()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Ef(o,h)));break;case 22:v=o.memoizedState!==null;var Q=c!==null&&c.memoizedState!==null,he=Ca,be=An;if(Ca=he||v,An=be||Q,Ar(s,o),An=be,Ca=he,Ir(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||Q||Ca||An||hi(o)),c=null,s=o;;){if(s.tag===5||s.tag===26){if(c===null){Q=c=s;try{if(_=Q.stateNode,v)k=_.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{j=Q.stateNode;var Te=Q.memoizedProps.style,me=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;j.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch($e){zt(Q,Q.return,$e)}}}else if(s.tag===6){if(c===null){Q=s;try{Q.stateNode.nodeValue=v?"":Q.memoizedProps}catch($e){zt(Q,Q.return,$e)}}}else if(s.tag===18){if(c===null){Q=s;try{var ge=Q.stateNode;v?yR(ge,!0):yR(Q.stateNode,!1)}catch($e){zt(Q,Q.return,$e)}}}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;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Ef(o,c))));break;case 19:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Ef(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 c,h=o.return;h!==null;){if(bE(h)){c=h;break}h=h.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var v=c.stateNode,_=Nv(o);Sf(o,_,v);break;case 5:var k=c.stateNode;c.flags&32&&(Qi(k,""),c.flags&=-33);var j=Nv(o);Sf(o,j,k);break;case 3:case 4:var Q=c.stateNode.containerInfo,he=Nv(o);kv(o,he,Q);break;default:throw Error(r(161))}}catch(be){zt(o,o.return,be)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function AE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;AE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Ia(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)EE(o,s.alternate,s),s=s.sibling}function hi(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:cs(4,s,s.return),hi(s);break;case 1:Qo(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&yE(s,s.return,c),hi(s);break;case 27:su(s.stateNode);case 26:case 5:Qo(s,s.return),hi(s);break;case 22:s.memoizedState===null&&hi(s);break;case 30:hi(s);break;default:hi(s)}o=o.sibling}}function Na(o,s,c){for(c=c&&(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:Na(v,_,c),Yc(4,_);break;case 1:if(Na(v,_,c),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(he){zt(h,h.return,he)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var Q=v.shared.hiddenCallbacks;if(Q!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Q.length;v++)sS(Q[v],j)}catch(he){zt(h,h.return,he)}}c&&k&64&&vE(_),Qc(_,_.return);break;case 27:wE(_);case 26:case 5:Na(v,_,c),c&&h===null&&k&4&&_E(_),Qc(_,_.return);break;case 12:Na(v,_,c);break;case 31:Na(v,_,c),c&&k&4&&TE(v,_);break;case 13:Na(v,_,c),c&&k&4&&OE(v,_);break;case 22:_.memoizedState===null&&Na(v,_,c),Qc(_,_.return);break;case 30:break;default:Na(v,_,c)}s=s.sibling}}function Pv(o,s){var c=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==c&&(o!=null&&o.refCount++,c!=null&&jc(c))}function Dv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&jc(o))}function No(o,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)IE(o,s,c,h),s=s.sibling}function IE(o,s,c,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:No(o,s,c,h),v&2048&&Yc(9,s);break;case 1:No(o,s,c,h);break;case 3:No(o,s,c,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&jc(o)));break;case 12:if(v&2048){No(o,s,c,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(Q){zt(s,s.return,Q)}}else No(o,s,c,h);break;case 31:No(o,s,c,h);break;case 13:No(o,s,c,h);break;case 23:break;case 22:_=s.stateNode,k=s.alternate,s.memoizedState!==null?_._visibility&2?No(o,s,c,h):Xc(o,s):_._visibility&2?No(o,s,c,h):(_._visibility|=2,vl(o,s,c,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Pv(k,s);break;case 24:No(o,s,c,h),v&2048&&Dv(s.alternate,s);break;default:No(o,s,c,h)}}function vl(o,s,c,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,k=s,j=c,Q=h,he=k.flags;switch(k.tag){case 0:case 11:case 15:vl(_,k,j,Q,v),Yc(8,k);break;case 23:break;case 22:var be=k.stateNode;k.memoizedState!==null?be._visibility&2?vl(_,k,j,Q,v):Xc(_,k):(be._visibility|=2,vl(_,k,j,Q,v)),v&&he&2048&&Pv(k.alternate,k);break;case 24:vl(_,k,j,Q,v),v&&he&2048&&Dv(k.alternate,k);break;default:vl(_,k,j,Q,v)}s=s.sibling}}function Xc(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=o,h=s,v=h.flags;switch(h.tag){case 22:Xc(c,h),v&2048&&Pv(h.alternate,h);break;case 24:Xc(c,h),v&2048&&Dv(h.alternate,h);break;default:Xc(c,h)}s=s.sibling}}var Jc=8192;function yl(o,s,c){if(o.subtreeFlags&Jc)for(o=o.child;o!==null;)NE(o,s,c),o=o.sibling}function NE(o,s,c){switch(o.tag){case 26:yl(o,s,c),o.flags&Jc&&o.memoizedState!==null&&RD(c,Io,o.memoizedState,o.memoizedProps);break;case 5:yl(o,s,c);break;case 3:case 4:var h=Io;Io=jf(o.stateNode.containerInfo),yl(o,s,c),Io=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=Jc,Jc=16777216,yl(o,s,c),Jc=h):yl(o,s,c));break;default:yl(o,s,c)}}function kE(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 eu(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,PE(h,o)}kE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)ME(o),o=o.sibling}function ME(o){switch(o.tag){case 0:case 11:case 15:eu(o),o.flags&2048&&cs(9,o,o.return);break;case 3:eu(o);break;case 12:eu(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Rf(o)):eu(o);break;default:eu(o)}}function Rf(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,PE(h,o)}kE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:cs(8,s,s.return),Rf(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Rf(s));break;default:Rf(s)}o=o.sibling}}function PE(o,s){for(;Hn!==null;){var c=Hn;switch(c.tag){case 0:case 11:case 15:cs(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:jc(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Hn=h;else e:for(c=o;Hn!==null;){h=Hn;var v=h.sibling,_=h.return;if(RE(h),h===c){Hn=null;break e}if(v!==null){v.return=_,Hn=v;break e}Hn=_}}}var U3={getCacheForType:function(o){var s=Jn(Tn),c=s.data.get(o);return c===void 0&&(c=o(),s.data.set(o,c)),c},cacheSignal:function(){return Jn(Tn).controller.signal}},z3=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Yt=null,gt=null,wt=0,Ut=0,qr=null,us=!1,_l=!1,Lv=!1,ka=0,gn=0,ds=0,pi=0,jv=0,Hr=0,bl=0,tu=null,Nr=null,$v=!1,xf=0,DE=0,Tf=1/0,Of=null,fs=null,$n=0,hs=null,wl=null,Ma=0,Uv=0,zv=null,LE=null,nu=0,Vv=null;function Gr(){return(Dt&2)!==0&&wt!==0?wt&-wt:B.T!==null?Zv():ig()}function jE(){if(Hr===0)if((wt&536870912)===0||Rt){var o=Tt;Tt<<=1,(Tt&3932160)===0&&(Tt=262144),Hr=o}else Hr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Hr}function kr(o,s,c){(o===Yt&&(Ut===2||Ut===9)||o.cancelPendingCommit!==null)&&(Sl(o,0),ps(o,wt,Hr,!1)),It(o,c),((Dt&2)===0||o!==Yt)&&(o===Yt&&((Dt&2)===0&&(pi|=c),gn===4&&ps(o,wt,Hr,!1)),Xo(o))}function $E(o,s,c){if((Dt&6)!==0)throw Error(r(327));var h=!c&&(s&127)===0&&(s&o.expiredLanes)===0||ut(o,s),v=h?B3(o,s):Bv(o,s,!0),_=h;do{if(v===0){_l&&!h&&ps(o,s,0,!1);break}else{if(c=o.current.alternate,_&&!V3(c)){v=Bv(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=tu;var Q=j.current.memoizedState.isDehydrated;if(Q&&(Sl(j,k).flags|=256),k=Bv(j,k,!1),k!==2){if(Lv&&!Q){j.errorRecoveryDisabledLanes|=_,pi|=_,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){Sl(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=xf+300-we(),10<v)){if(ps(h,s,Hr,!us),qe(h,0,!0)!==0)break e;Ma=s,h.timeoutHandle=mR(UE.bind(null,h,c,Nr,Of,$v,s,Hr,pi,bl,us,_,"Throttled",-0,0),v);break e}UE(h,c,Nr,Of,$v,s,Hr,pi,bl,us,_,null,-0,0)}}break}while(!0);Xo(o)}function UE(o,s,c,h,v,_,k,j,Q,he,be,Te,me,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:ya},NE(s,_,Te);var $e=(_&62914560)===_?xf-we():(_&4194048)===_?DE-we():0;if($e=xD(Te,$e),$e!==null){Ma=_,o.cancelPendingCommit=$e(ZE.bind(null,o,s,_,c,h,v,k,j,Q,be,Te,null,me,ge)),ps(o,_,k,!he);return}}ZE(o,s,_,c,h,v,k,j,Q)}function V3(o){for(var s=o;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var v=c[h],_=v.getSnapshot;v=v.value;try{if(!zr(_(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;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,c,h){s&=~jv,s&=~pi,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}c!==0&&ao(o,c,s)}function Cf(){return(Dt&6)===0?(ru(0),!1):!0}function Fv(){if(gt!==null){if(Ut===0)var o=gt.return;else o=gt,Sa=ai=null,ov(o),fl=null,Uc=0,o=gt;for(;o!==null;)gE(o.alternate,o),o=o.return;gt=null}}function Sl(o,s){var c=o.timeoutHandle;c!==-1&&(o.timeoutHandle=-1,iD(c)),c=o.cancelPendingCommit,c!==null&&(o.cancelPendingCommit=null,c()),Ma=0,Fv(),Yt=o,gt=c=ba(o.current,null),wt=s,Ut=0,qr=null,us=!1,_l=ut(o,s),Lv=!1,bl=Hr=jv=pi=ds=gn=0,Nr=tu=null,$v=!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 ka=s,Kd(),c}function zE(o,s){st=null,B.H=Zc,s===dl||s===nf?(s=nS(),Ut=3):s===Gg?(s=nS(),Ut=4):Ut=s===bv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qr=s,gt===null&&(gn=1,vf(o,co(s,o.current)))}function VE(){var o=Fr.current;return o===null?!0:(wt&4194048)===wt?po===null:(wt&62914560)===wt||(wt&536870912)!==0?o===po:!1}function FE(){var o=B.H;return B.H=Zc,o===null?Zc:o}function BE(){var o=B.A;return B.A=U3,o}function Af(){gn=4,us||(wt&4194048)!==wt&&Fr.current!==null||(_l=!0),(ds&134217727)===0&&(pi&134217727)===0||Yt===null||ps(Yt,wt,Hr,!1)}function Bv(o,s,c){var h=Dt;Dt|=2;var v=FE(),_=BE();(Yt!==o||wt!==s)&&(Of=null,Sl(o,s)),s=!1;var k=gn;e:do try{if(Ut!==0&&gt!==null){var j=gt,Q=qr;switch(Ut){case 8:Fv(),k=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(s=!0);var he=Ut;if(Ut=0,qr=null,El(o,j,Q,he),c&&_l){k=0;break e}break;default:he=Ut,Ut=0,qr=null,El(o,j,Q,he)}}F3(),k=gn;break}catch(be){zE(o,be)}while(!0);return s&&o.shellSuspendCounter++,Sa=ai=null,Dt=h,B.H=v,B.A=_,gt===null&&(Yt=null,wt=0,Kd()),k}function F3(){for(;gt!==null;)qE(gt)}function B3(o,s){var c=Dt;Dt|=2;var h=FE(),v=BE();Yt!==o||wt!==s?(Of=null,Tf=we()+500,Sl(o,s)):_l=ut(o,s);e:do try{if(Ut!==0&&gt!==null){s=gt;var _=qr;t:switch(Ut){case 1:Ut=0,qr=null,El(o,s,_,1);break;case 2:case 9:if(eS(_)){Ut=0,qr=null,HE(s);break}s=function(){Ut!==2&&Ut!==9||Yt!==o||(Ut=7),Xo(o)},_.then(s,s);break e;case 3:Ut=7;break e;case 4:Ut=5;break e;case 7:eS(_)?(Ut=0,qr=null,HE(s)):(Ut=0,qr=null,El(o,s,_,7));break;case 5:var k=null;switch(gt.tag){case 26:k=gt.memoizedState;case 5:case 27:var j=gt;if(k?IR(k):j.stateNode.complete){Ut=0,qr=null;var Q=j.sibling;if(Q!==null)gt=Q;else{var he=j.return;he!==null?(gt=he,If(he)):gt=null}break t}}Ut=0,qr=null,El(o,s,_,5);break;case 6:Ut=0,qr=null,El(o,s,_,6);break;case 8:Fv(),gn=6;break e;default:throw Error(r(462))}}q3();break}catch(be){zE(o,be)}while(!0);return Sa=ai=null,B.H=h,B.A=v,Dt=c,gt!==null?0:(Yt=null,wt=0,Kd(),gn)}function q3(){for(;gt!==null&&!re();)qE(gt)}function qE(o){var s=pE(o.alternate,o,ka);o.memoizedProps=o.pendingProps,s===null?If(o):gt=s}function HE(o){var s=o,c=s.alternate;switch(s.tag){case 15:case 0:s=lE(c,s,s.pendingProps,s.type,void 0,wt);break;case 11:s=lE(c,s,s.pendingProps,s.type.render,s.ref,wt);break;case 5:ov(s);default:gE(c,s),s=gt=Bw(s,ka),s=pE(c,s,ka)}o.memoizedProps=o.pendingProps,s===null?If(o):gt=s}function El(o,s,c,h){Sa=ai=null,ov(s),fl=null,Uc=0;var v=s.return;try{if(k3(o,v,s,c,wt)){gn=1,vf(o,co(c,o.current)),gt=null;return}}catch(_){if(v!==null)throw gt=v,_;gn=1,vf(o,co(c,o.current)),gt=null;return}s.flags&32768?(Rt||h===1?o=!0:_l||(wt&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))),GE(s,o)):If(s)}function If(o){var s=o;do{if((s.flags&32768)!==0){GE(s,us);return}o=s.return;var c=D3(s.alternate,s,ka);if(c!==null){gt=c;return}if(s=s.sibling,s!==null){gt=s;return}gt=s=o}while(s!==null);gn===0&&(gn=5)}function GE(o,s){do{var c=L3(o.alternate,o);if(c!==null){c.flags&=32767,gt=c;return}if(c=o.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(o=o.sibling,o!==null)){gt=o;return}gt=o=c}while(o!==null);gn=6,gt=null}function ZE(o,s,c,h,v,_,k,j,Q){o.cancelPendingCommit=null;do Nf();while($n!==0);if((Dt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Ng,rn(o,c,_,k,j,Q),o===Yt&&(gt=Yt=null,wt=0),wl=s,hs=o,Ma=c,Uv=_,zv=v,LE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,K3(Je,function(){return XE(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=B.T,B.T=null,v=W.p,W.p=2,k=Dt,Dt|=4;try{j3(o,s,c)}finally{Dt=k,W.p=v,B.T=h}}$n=1,KE(),WE(),YE()}}function KE(){if($n===1){$n=0;var o=hs,s=wl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var h=W.p;W.p=2;var v=Dt;Dt|=4;try{CE(s,o);var _=ty,k=Pw(o.containerInfo),j=_.focusedElem,Q=_.selectionRange;if(k!==j&&j&&j.ownerDocument&&Mw(j.ownerDocument.documentElement,j)){if(Q!==null&&Tg(j)){var he=Q.start,be=Q.end;if(be===void 0&&(be=he),"selectionStart"in j)j.selectionStart=he,j.selectionEnd=Math.min(be,j.value.length);else{var Te=j.ownerDocument||document,me=Te&&Te.defaultView||window;if(me.getSelection){var ge=me.getSelection(),$e=j.textContent.length,Ye=Math.min(Q.start,$e),Zt=Q.end===void 0?Ye:Math.min(Q.end,$e);!ge.extend&&Ye>Zt&&(k=Zt,Zt=Ye,Ye=k);var ie=kw(j,Ye),te=kw(j,Zt);if(ie&&te&&(ge.rangeCount!==1||ge.anchorNode!==ie.node||ge.anchorOffset!==ie.offset||ge.focusNode!==te.node||ge.focusOffset!==te.offset)){var fe=Te.createRange();fe.setStart(ie.node,ie.offset),ge.removeAllRanges(),Ye>Zt?(ge.addRange(fe),ge.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),ge.addRange(fe))}}}}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 Se=Te[j];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}Bf=!!ey,ty=ey=null}finally{Dt=v,W.p=h,B.T=c}}o.current=s,$n=2}}function WE(){if($n===2){$n=0;var o=hs,s=wl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var h=W.p;W.p=2;var v=Dt;Dt|=4;try{EE(o,s.alternate,s)}finally{Dt=v,W.p=h,B.T=c}}$n=3}}function YE(){if($n===4||$n===3){$n=0,oe();var o=hs,s=wl,c=Ma,h=LE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?$n=5:($n=0,wl=hs=null,QE(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(fs=null),Co(c),s=s.stateNode,nn&&typeof nn.onCommitFiberRoot=="function")try{nn.onCommitFiberRoot(Rn,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=B.T,v=W.p,W.p=2,B.T=null;try{for(var _=o.onRecoverableError,k=0;k<h.length;k++){var j=h[k];_(j.value,{componentStack:j.stack})}}finally{B.T=s,W.p=v}}(Ma&3)!==0&&Nf(),Xo(o),v=o.pendingLanes,(c&261930)!==0&&(v&42)!==0?o===Vv?nu++:(nu=0,Vv=o):nu=0,ru(0)}}function QE(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,jc(s)))}function Nf(){return KE(),WE(),YE(),XE()}function XE(){if($n!==5)return!1;var o=hs,s=Uv;Uv=0;var c=Co(Ma),h=B.T,v=W.p;try{W.p=32>c?32:c,B.T=null,c=zv,zv=null;var _=hs,k=Ma;if($n=0,wl=hs=null,Ma=0,(Dt&6)!==0)throw Error(r(331));var j=Dt;if(Dt|=4,ME(_.current),IE(_,_.current,k,c),Dt=j,ru(0,!1),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(Rn,_)}catch{}return!0}finally{W.p=v,B.T=h,QE(o,s)}}function JE(o,s,c){s=co(c,s),s=_v(o.stateNode,s,2),o=ss(o,s,2),o!==null&&(It(o,2),Xo(o))}function zt(o,s,c){if(o.tag===3)JE(o,o,c);else for(;s!==null;){if(s.tag===3){JE(s,o,c);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=co(c,o),c=eE(2),h=ss(s,c,2),h!==null&&(tE(c,h,s,o),It(h,2),Xo(h));break}}s=s.return}}function qv(o,s,c){var h=o.pingCache;if(h===null){h=o.pingCache=new z3;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(c)||(Lv=!0,v.add(c),o=H3.bind(null,o,s,c),s.then(o,o))}function H3(o,s,c){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&c,o.warmLanes&=~c,Yt===o&&(wt&c)===c&&(gn===4||gn===3&&(wt&62914560)===wt&&300>we()-xf?(Dt&2)===0&&Sl(o,0):jv|=c,bl===wt&&(bl=0)),Xo(o)}function eR(o,s){s===0&&(s=qt()),o=ni(o,s),o!==null&&(It(o,s),Xo(o))}function G3(o){var s=o.memoizedState,c=0;s!==null&&(c=s.retryLane),eR(o,c)}function Z3(o,s){var c=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(c=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),eR(o,c)}function K3(o,s){return We(o,s)}var kf=null,Rl=null,Hv=!1,Mf=!1,Gv=!1,ms=0;function Xo(o){o!==Rl&&o.next===null&&(Rl===null?kf=Rl=o:Rl=Rl.next=o),Mf=!0,Hv||(Hv=!0,Y3())}function ru(o,s){if(!Gv&&Mf){Gv=!0;do for(var c=!1,h=kf;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&&(c=!0,oR(h,_))}else _=wt,_=qe(h,h===Yt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||ut(h,_)||(c=!0,oR(h,_));h=h.next}while(c);Gv=!1}}function W3(){tR()}function tR(){Mf=Hv=!1;var o=0;ms!==0&&sD()&&(o=ms);for(var s=we(),c=null,h=kf;h!==null;){var v=h.next,_=nR(h,s);_===0?(h.next=null,c===null?kf=v:c.next=v,v===null&&(Rl=c)):(c=h,(o!==0||(_&3)!==0)&&(Mf=!0)),h=v}$n!==0&&$n!==5||ru(o),ms!==0&&(ms=0)}function nR(o,s){for(var c=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var k=31-xn(_),j=1<<k,Q=v[k];Q===-1?((j&c)===0||(j&h)!==0)&&(v[k]=Wt(j,s)):Q<=s&&(o.expiredLanes|=j),_&=~j}if(s=Yt,c=wt,c=qe(o,o===s?c:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,c===0||o===s&&(Ut===2||Ut===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((c&3)===0||ut(o,c)){if(s=c&-c,s===o.callbackPriority)return s;switch(h!==null&&Z(h),Co(c)){case 2:case 8:c=ke;break;case 32:c=Je;break;case 268435456:c=Ct;break;default:c=Je}return h=rR.bind(null,o),c=We(c,h),o.callbackPriority=s,o.callbackNode=c,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function rR(o,s){if($n!==0&&$n!==5)return o.callbackNode=null,o.callbackPriority=0,null;var c=o.callbackNode;if(Nf()&&o.callbackNode!==c)return null;var h=wt;return h=qe(o,o===Yt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:($E(o,h,s),nR(o,we()),o.callbackNode!=null&&o.callbackNode===c?rR.bind(null,o):null)}function oR(o,s){if(Nf())return null;$E(o,s,!0)}function Y3(){lD(function(){(Dt&6)!==0?We(Re,W3):tR()})}function Zv(){if(ms===0){var o=cl;o===0&&(o=bt,bt<<=1,(bt&261888)===0&&(bt=256)),ms=o}return ms}function aR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:zd(""+o)}function sR(o,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,o.id&&c.setAttribute("form",o.id),s.parentNode.insertBefore(c,s),o=new FormData(o),c.parentNode.removeChild(c),o}function Q3(o,s,c,h,v){if(s==="submit"&&c&&c.stateNode===v){var _=aR((v[Tr]||null).action),k=h.submitter;k&&(s=(s=k[Tr]||null)?aR(s.formAction):k.getAttribute("formAction"),s!==null&&(_=s,k=null));var j=new qd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ms!==0){var Q=k?sR(v,k):new FormData(v);hv(c,{pending:!0,data:Q,method:v.method,action:_},null,Q)}}else typeof _=="function"&&(j.preventDefault(),Q=k?sR(v,k):new FormData(v),hv(c,{pending:!0,data:Q,method:v.method,action:_},_,Q))},currentTarget:v}]})}}for(var Kv=0;Kv<Ig.length;Kv++){var Wv=Ig[Kv],X3=Wv.toLowerCase(),J3=Wv[0].toUpperCase()+Wv.slice(1);Ao(X3,"on"+J3)}Ao(jw,"onAnimationEnd"),Ao($w,"onAnimationIteration"),Ao(Uw,"onAnimationStart"),Ao("dblclick","onDoubleClick"),Ao("focusin","onFocus"),Ao("focusout","onBlur"),Ao(m3,"onTransitionRun"),Ao(g3,"onTransitionStart"),Ao(v3,"onTransitionCancel"),Ao(zw,"onTransitionEnd"),Wi("onMouseEnter",["mouseout","mouseover"]),Wi("onMouseLeave",["mouseout","mouseover"]),Wi("onPointerEnter",["pointerout","pointerover"]),Wi("onPointerLeave",["pointerout","pointerover"]),Xs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),eD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function iR(o,s){s=(s&4)!==0;for(var c=0;c<o.length;c++){var h=o[c],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],Q=j.instance,he=j.currentTarget;if(j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Zd(be)}v.currentTarget=null,_=Q}else for(k=0;k<h.length;k++){if(j=h[k],Q=j.instance,he=j.currentTarget,j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Zd(be)}v.currentTarget=null,_=Q}}}}function vt(o,s){var c=s[lg];c===void 0&&(c=s[lg]=new Set);var h=o+"__bubble";c.has(h)||(lR(s,o,2,!1),c.add(h))}function Yv(o,s,c){var h=0;s&&(h|=4),lR(c,o,h,s)}var Pf="_reactListening"+Math.random().toString(36).slice(2);function Qv(o){if(!o[Pf]){o[Pf]=!0,tw.forEach(function(c){c!=="selectionchange"&&(eD.has(c)||Yv(c,!1,o),Yv(c,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Pf]||(s[Pf]=!0,Yv("selectionchange",!1,s))}}function lR(o,s,c,h){switch(jR(s)){case 2:var v=CD;break;case 8:v=AD;break;default:v=fy}c=v.bind(null,s,c,o),v=void 0,!vg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,c,{capture:!0,passive:v}):o.addEventListener(s,c,!0):v!==void 0?o.addEventListener(s,c,{passive:v}):o.addEventListener(s,c,!1)}function Xv(o,s,c,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 Q=k.tag;if((Q===3||Q===4)&&k.stateNode.containerInfo===v)return;k=k.return}for(;j!==null;){if(k=Gi(j),k===null)return;if(Q=k.tag,Q===5||Q===6||Q===26||Q===27){h=_=k;continue e}j=j.parentNode}}h=h.return}hw(function(){var he=_,be=mg(c),Te=[];e:{var me=Vw.get(o);if(me!==void 0){var ge=qd,$e=o;switch(o){case"keypress":if(Fd(c)===0)break e;case"keydown":case"keyup":ge=ZP;break;case"focusin":$e="focus",ge=wg;break;case"focusout":$e="blur",ge=wg;break;case"beforeblur":case"afterblur":ge=wg;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=DP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=YP;break;case jw:case $w:case Uw:ge=$P;break;case zw:ge=XP;break;case"scroll":case"scrollend":ge=MP;break;case"wheel":ge=e3;break;case"copy":case"cut":case"paste":ge=zP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=yw;break;case"toggle":case"beforetoggle":ge=n3}var Ye=(s&4)!==0,Zt=!Ye&&(o==="scroll"||o==="scrollend"),ie=Ye?me!==null?me+"Capture":null:me;Ye=[];for(var te=he,fe;te!==null;){var Se=te;if(fe=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||fe===null||ie===null||(Se=Tc(te,ie),Se!=null&&Ye.push(au(te,Se,fe))),Zt)break;te=te.return}0<Ye.length&&(me=new ge(me,$e,null,c,be),Te.push({event:me,listeners:Ye}))}}if((s&7)===0){e:{if(me=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",me&&c!==pg&&($e=c.relatedTarget||c.fromElement)&&(Gi($e)||$e[Hi]))break e;if((ge||me)&&(me=be.window===be?be:(me=be.ownerDocument)?me.defaultView||me.parentWindow:window,ge?($e=c.relatedTarget||c.toElement,ge=he,$e=$e?Gi($e):null,$e!==null&&(Zt=i($e),Ye=$e.tag,$e!==Zt||Ye!==5&&Ye!==27&&Ye!==6)&&($e=null)):(ge=null,$e=he),ge!==$e)){if(Ye=gw,Se="onMouseLeave",ie="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(Ye=yw,Se="onPointerLeave",ie="onPointerEnter",te="pointer"),Zt=ge==null?me:xc(ge),fe=$e==null?me:xc($e),me=new Ye(Se,te+"leave",ge,c,be),me.target=Zt,me.relatedTarget=fe,Se=null,Gi(be)===he&&(Ye=new Ye(ie,te+"enter",$e,c,be),Ye.target=fe,Ye.relatedTarget=Zt,Se=Ye),Zt=Se,ge&&$e)t:{for(Ye=tD,ie=ge,te=$e,fe=0,Se=ie;Se;Se=Ye(Se))fe++;Se=0;for(var Ke=te;Ke;Ke=Ye(Ke))Se++;for(;0<fe-Se;)ie=Ye(ie),fe--;for(;0<Se-fe;)te=Ye(te),Se--;for(;fe--;){if(ie===te||te!==null&&ie===te.alternate){Ye=ie;break t}ie=Ye(ie),te=Ye(te)}Ye=null}else Ye=null;ge!==null&&cR(Te,me,ge,Ye,!1),$e!==null&&Zt!==null&&cR(Te,Zt,$e,Ye,!0)}}e:{if(me=he?xc(he):window,ge=me.nodeName&&me.nodeName.toLowerCase(),ge==="select"||ge==="input"&&me.type==="file")var Nt=Tw;else if(Rw(me))if(Ow)Nt=f3;else{Nt=u3;var He=c3}else ge=me.nodeName,!ge||ge.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?he&&hg(he.elementType)&&(Nt=Tw):Nt=d3;if(Nt&&(Nt=Nt(o,he))){xw(Te,Nt,c,be);break e}He&&He(o,me,he),o==="focusout"&&he&&me.type==="number"&&he.memoizedProps.value!=null&&fg(me,"number",me.value)}switch(He=he?xc(he):window,o){case"focusin":(Rw(He)||He.contentEditable==="true")&&(tl=He,Og=he,Pc=null);break;case"focusout":Pc=Og=tl=null;break;case"mousedown":Cg=!0;break;case"contextmenu":case"mouseup":case"dragend":Cg=!1,Dw(Te,c,be);break;case"selectionchange":if(p3)break;case"keydown":case"keyup":Dw(Te,c,be)}var it;if(Eg)e:{switch(o){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else el?Sw(o,c)&&(St="onCompositionEnd"):o==="keydown"&&c.keyCode===229&&(St="onCompositionStart");St&&(_w&&c.locale!=="ko"&&(el||St!=="onCompositionStart"?St==="onCompositionEnd"&&el&&(it=pw()):(Ja=be,yg="value"in Ja?Ja.value:Ja.textContent,el=!0)),He=Df(he,St),0<He.length&&(St=new vw(St,o,null,c,be),Te.push({event:St,listeners:He}),it?St.data=it:(it=Ew(c),it!==null&&(St.data=it)))),(it=o3?a3(o,c):s3(o,c))&&(St=Df(he,"onBeforeInput"),0<St.length&&(He=new vw("onBeforeInput","beforeinput",null,c,be),Te.push({event:He,listeners:St}),He.data=it)),Q3(Te,o,he,c,be)}iR(Te,s)})}function au(o,s,c){return{instance:o,listener:s,currentTarget:c}}function Df(o,s){for(var c=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=Tc(o,c),v!=null&&h.unshift(au(o,v,_)),v=Tc(o,s),v!=null&&h.push(au(o,v,_))),o.tag===3)return h;o=o.return}return[]}function tD(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function cR(o,s,c,h,v){for(var _=s._reactName,k=[];c!==null&&c!==h;){var j=c,Q=j.alternate,he=j.stateNode;if(j=j.tag,Q!==null&&Q===h)break;j!==5&&j!==26&&j!==27||he===null||(Q=he,v?(he=Tc(c,_),he!=null&&k.unshift(au(c,he,Q))):v||(he=Tc(c,_),he!=null&&k.push(au(c,he,Q)))),c=c.return}k.length!==0&&o.push({event:s,listeners:k})}var nD=/\r\n?/g,rD=/\u0000|\uFFFD/g;function uR(o){return(typeof o=="string"?o:""+o).replace(nD,`
10
- `).replace(rD,"")}function dR(o,s){return s=uR(s),uR(o)===s}function Gt(o,s,c,h,v,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Qi(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Qi(o,""+h);break;case"className":$d(o,"class",h);break;case"tabIndex":$d(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":$d(o,c,h);break;case"style":dw(o,h,_);break;case"data":if(s!=="object"){$d(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){o.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=zd(""+h),o.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(c,"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"&&(c==="formAction"?(s!=="input"&&Gt(o,s,"name",v.name,v,null),Gt(o,s,"formEncType",v.formEncType,v,null),Gt(o,s,"formMethod",v.formMethod,v,null),Gt(o,s,"formTarget",v.formTarget,v,null)):(Gt(o,s,"encType",v.encType,v,null),Gt(o,s,"method",v.method,v,null),Gt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=zd(""+h),o.setAttribute(c,h);break;case"onClick":h!=null&&(o.onclick=ya);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}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}c=zd(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);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(c,""+h):o.removeAttribute(c);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(c,""):o.removeAttribute(c);break;case"capture":case"download":h===!0?o.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,h):o.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(c,h):o.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(c):o.setAttribute(c,h);break;case"popover":vt("beforetoggle",o),vt("toggle",o),jd(o,"popover",h);break;case"xlinkActuate":va(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":va(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":va(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":va(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":va(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":va(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":va(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":va(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":va(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":jd(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=NP.get(c)||c,jd(o,c,h))}}function Jv(o,s,c,h,v,_){switch(c){case"style":dw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"children":typeof h=="string"?Qi(o,h):(typeof h=="number"||typeof h=="bigint")&&Qi(o,""+h);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nw.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),_=o[Tr]||null,_=_!=null?_[c]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(c in o?o[c]=null:o.hasAttribute(c)&&o.removeAttribute(c)),o.addEventListener(s,h,v);break e}c in o?o[c]=h:h===!0?o.setAttribute(c,""):jd(o,c,h)}}}function tr(o,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",o),vt("load",o);var h=!1,v=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var k=c[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,_,k,c,null)}}v&&Gt(o,s,"srcSet",c.srcSet,c,null),h&&Gt(o,s,"src",c.src,c,null);return;case"input":vt("invalid",o);var j=_=k=v=null,Q=null,he=null;for(h in c)if(c.hasOwnProperty(h)){var be=c[h];if(be!=null)switch(h){case"name":v=be;break;case"type":k=be;break;case"checked":Q=be;break;case"defaultChecked":he=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Gt(o,s,h,be,c,null)}}iw(o,_,j,Q,he,k,v,!1);return;case"select":vt("invalid",o),h=k=_=null;for(v in c)if(c.hasOwnProperty(v)&&(j=c[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Gt(o,s,v,j,c,null)}s=_,c=k,o.multiple=!!h,s!=null?Yi(o,!!h,s,!1):c!=null&&Yi(o,!!h,c,!0);return;case"textarea":vt("invalid",o),_=v=h=null;for(k in c)if(c.hasOwnProperty(k)&&(j=c[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:Gt(o,s,k,j,c,null)}cw(o,h,v,_);return;case"option":for(Q in c)if(c.hasOwnProperty(Q)&&(h=c[Q],h!=null))switch(Q){case"selected":o.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Gt(o,s,Q,h,c,null)}return;case"dialog":vt("beforetoggle",o),vt("toggle",o),vt("cancel",o),vt("close",o);break;case"iframe":case"object":vt("load",o);break;case"video":case"audio":for(h=0;h<ou.length;h++)vt(ou[h],o);break;case"image":vt("error",o),vt("load",o);break;case"details":vt("toggle",o);break;case"embed":case"source":case"link":vt("error",o),vt("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 c)if(c.hasOwnProperty(he)&&(h=c[he],h!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,he,h,c,null)}return;default:if(hg(s)){for(be in c)c.hasOwnProperty(be)&&(h=c[be],h!==void 0&&Jv(o,s,be,h,c,void 0));return}}for(j in c)c.hasOwnProperty(j)&&(h=c[j],h!=null&&Gt(o,s,j,h,c,null))}function oD(o,s,c,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,Q=null,he=null,be=null;for(ge in c){var Te=c[ge];if(c.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=Te;default:h.hasOwnProperty(ge)||Gt(o,s,ge,null,h,Te)}}for(var me in h){var ge=h[me];if(Te=c[me],h.hasOwnProperty(me)&&(ge!=null||Te!=null))switch(me){case"type":_=ge;break;case"name":v=ge;break;case"checked":he=ge;break;case"defaultChecked":be=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&&Gt(o,s,me,ge,h,Te)}}dg(o,k,j,Q,he,be,_,v);return;case"select":ge=k=j=me=null;for(_ in c)if(Q=c[_],c.hasOwnProperty(_)&&Q!=null)switch(_){case"value":break;case"multiple":ge=Q;default:h.hasOwnProperty(_)||Gt(o,s,_,null,h,Q)}for(v in h)if(_=h[v],Q=c[v],h.hasOwnProperty(v)&&(_!=null||Q!=null))switch(v){case"value":me=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==Q&&Gt(o,s,v,_,h,Q)}s=j,c=k,h=ge,me!=null?Yi(o,!!c,me,!1):!!h!=!!c&&(s!=null?Yi(o,!!c,s,!0):Yi(o,!!c,c?[]:"",!1));return;case"textarea":ge=me=null;for(j in c)if(v=c[j],c.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Gt(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=c[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":me=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Gt(o,s,k,v,h,_)}lw(o,me,ge);return;case"option":for(var $e in c)if(me=c[$e],c.hasOwnProperty($e)&&me!=null&&!h.hasOwnProperty($e))switch($e){case"selected":o.selected=!1;break;default:Gt(o,s,$e,null,h,me)}for(Q in h)if(me=h[Q],ge=c[Q],h.hasOwnProperty(Q)&&me!==ge&&(me!=null||ge!=null))switch(Q){case"selected":o.selected=me&&typeof me!="function"&&typeof me!="symbol";break;default:Gt(o,s,Q,me,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 c)me=c[Ye],c.hasOwnProperty(Ye)&&me!=null&&!h.hasOwnProperty(Ye)&&Gt(o,s,Ye,null,h,me);for(he in h)if(me=h[he],ge=c[he],h.hasOwnProperty(he)&&me!==ge&&(me!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,s));break;default:Gt(o,s,he,me,h,ge)}return;default:if(hg(s)){for(var Zt in c)me=c[Zt],c.hasOwnProperty(Zt)&&me!==void 0&&!h.hasOwnProperty(Zt)&&Jv(o,s,Zt,void 0,h,me);for(be in h)me=h[be],ge=c[be],!h.hasOwnProperty(be)||me===ge||me===void 0&&ge===void 0||Jv(o,s,be,me,h,ge);return}}for(var ie in c)me=c[ie],c.hasOwnProperty(ie)&&me!=null&&!h.hasOwnProperty(ie)&&Gt(o,s,ie,null,h,me);for(Te in h)me=h[Te],ge=c[Te],!h.hasOwnProperty(Te)||me===ge||me==null&&ge==null||Gt(o,s,Te,me,h,ge)}function fR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aD(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var v=c[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&fR(k)){for(k=0,j=v.responseEnd,h+=1;h<c.length;h++){var Q=c[h],he=Q.startTime;if(he>j)break;var be=Q.transferSize,Te=Q.initiatorType;be&&fR(Te)&&(Q=Q.responseEnd,k+=be*(Q<j?1:(j-he)/(Q-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 ey=null,ty=null;function Lf(o){return o.nodeType===9?o:o.ownerDocument}function hR(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 pR(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 ny(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 ry=null;function sD(){var o=window.event;return o&&o.type==="popstate"?o===ry?!1:(ry=o,!0):(ry=null,!1)}var mR=typeof setTimeout=="function"?setTimeout:void 0,iD=typeof clearTimeout=="function"?clearTimeout:void 0,gR=typeof Promise=="function"?Promise:void 0,lD=typeof queueMicrotask=="function"?queueMicrotask:typeof gR<"u"?function(o){return gR.resolve(null).then(o).catch(cD)}:mR;function cD(o){setTimeout(function(){throw o})}function gs(o){return o==="head"}function vR(o,s){var c=s,h=0;do{var v=c.nextSibling;if(o.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(h===0){o.removeChild(v),Cl(s);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")su(o.ownerDocument.documentElement);else if(c==="head"){c=o.ownerDocument.head,su(c);for(var _=c.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Rc]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=k}}else c==="body"&&su(o.ownerDocument.body);c=v}while(c);Cl(s)}function yR(o,s){var c=o;o=0;do{var h=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(o===0)break;o--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||o++;c=h}while(c)}function oy(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":oy(c),cg(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}o.removeChild(c)}}function uD(o,s,c,h){for(;o.nodeType===1;){var v=c;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Rc])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 dD(o,s,c){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!c||(o=mo(o.nextSibling),o===null))return null;return o}function _R(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 ay(o){return o.data==="$?"||o.data==="$~"}function sy(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function fD(o,s){var c=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||c.readyState!=="loading")s();else{var h=function(){s(),c.removeEventListener("DOMContentLoaded",h)};c.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 iy=null;function bR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="/$"||c==="/&"){if(s===0)return mo(o.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}o=o.nextSibling}return null}function wR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return o;s--}else c!=="/$"&&c!=="/&"||s++}o=o.previousSibling}return null}function SR(o,s,c){switch(s=Lf(c),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 su(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);cg(o)}var go=new Map,ER=new Set;function jf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Pa=W.d;W.d={f:hD,r:pD,D:mD,C:gD,L:vD,m:yD,X:bD,S:_D,M:wD};function hD(){var o=Pa.f(),s=Cf();return o||s}function pD(o){var s=Zi(o);s!==null&&s.tag===5&&s.type==="form"?zS(s):Pa.r(o)}var xl=typeof document>"u"?null:document;function RR(o,s,c){var h=xl;if(h&&typeof s=="string"&&s){var v=io(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),ER.has(v)||(ER.add(v),o={rel:o,crossOrigin:c,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function mD(o){Pa.D(o),RR("dns-prefetch",o,null)}function gD(o,s){Pa.C(o,s),RR("preconnect",o,s)}function vD(o,s,c){Pa.L(o,s,c);var h=xl;if(h&&o&&s){var v='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+io(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+io(c.imageSizes)+'"]')):v+='[href="'+io(o)+'"]';var _=v;switch(s){case"style":_=Tl(o);break;case"script":_=Ol(o)}go.has(_)||(o=p({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:o,as:s},c),go.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(iu(_))||s==="script"&&h.querySelector(lu(_))||(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function yD(o,s){Pa.m(o,s);var c=xl;if(c&&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":_=Ol(o)}if(!go.has(_)&&(o=p({rel:"modulepreload",href:o},s),go.set(_,o),c.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(lu(_)))return}h=c.createElement("link"),tr(h,"link",o),qn(h),c.head.appendChild(h)}}}function _D(o,s,c){Pa.S(o,s,c);var h=xl;if(h&&o){var v=Ki(h).hoistableStyles,_=Tl(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(iu(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},c),(c=go.get(_))&&ly(o,c);var Q=k=h.createElement("link");qn(Q),tr(Q,"link",o),Q._p=new Promise(function(he,be){Q.onload=he,Q.onerror=be}),Q.addEventListener("load",function(){j.loading|=1}),Q.addEventListener("error",function(){j.loading|=2}),j.loading|=4,$f(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function bD(o,s){Pa.X(o,s);var c=xl;if(c&&o){var h=Ki(c).hoistableScripts,v=Ol(o),_=h.get(v);_||(_=c.querySelector(lu(v)),_||(o=p({src:o,async:!0},s),(s=go.get(v))&&cy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function wD(o,s){Pa.M(o,s);var c=xl;if(c&&o){var h=Ki(c).hoistableScripts,v=Ol(o),_=h.get(v);_||(_=c.querySelector(lu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=go.get(v))&&cy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function xR(o,s,c,h){var v=(v=X.current)?jf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Tl(c.href),c=Ki(v).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){o=Tl(c.href);var _=Ki(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(iu(o)))&&!_._p&&(k.instance=_,k.state.loading=5),go.has(o)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},go.set(o,c),_||SD(v,o,c,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=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ol(c),c=Ki(v).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Tl(o){return'href="'+io(o)+'"'}function iu(o){return'link[rel="stylesheet"]['+o+"]"}function TR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function SD(o,s,c,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",c),qn(s),o.head.appendChild(s))}function Ol(o){return'[src="'+io(o)+'"]'}function lu(o){return"script[async]"+o}function OR(o,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+io(c.href)+'"]');if(h)return s.instance=h,qn(h),h;var v=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),qn(h),tr(h,"style",v),$f(h,c.precedence,o),s.instance=h;case"stylesheet":v=Tl(c.href);var _=o.querySelector(iu(v));if(_)return s.state.loading|=4,s.instance=_,qn(_),_;h=TR(c),(v=go.get(v))&&ly(h,v),_=(o.ownerDocument||o).createElement("link"),qn(_);var k=_;return k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),s.state.loading|=4,$f(_,c.precedence,o),s.instance=_;case"script":return _=Ol(c.src),(v=o.querySelector(lu(_)))?(s.instance=v,qn(v),v):(h=c,(v=go.get(_))&&(h=p({},c),cy(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,$f(h,c.precedence,o));return s.instance}function $f(o,s,c){for(var h=c.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=c.nodeType===9?c.head:c,s.insertBefore(o,s.firstChild))}function ly(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function cy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var Uf=null;function CR(o,s,c){if(Uf===null){var h=new Map,v=Uf=new Map;v.set(c,h)}else v=Uf,h=v.get(c),h||(h=new Map,v.set(c,h));if(h.has(o))return h;for(h.set(o,null),c=c.getElementsByTagName(o),v=0;v<c.length;v++){var _=c[v];if(!(_[Rc]||_[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 AR(o,s,c){o=o.ownerDocument||o,o.head.insertBefore(c,s==="title"?o.querySelector("head > title"):null)}function ED(o,s,c){if(c===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;switch(s.rel){case"stylesheet":return o=s.disabled,typeof s.precedence=="string"&&o==null;default:return!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 IR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function RD(o,s,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=Tl(h.href),_=s.querySelector(iu(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=zf.bind(o),s.then(o,o)),c.state.loading|=4,c.instance=_,qn(_);return}_=s.ownerDocument||s,h=TR(h),(v=go.get(v))&&ly(h,v),_=_.createElement("link"),qn(_);var k=_;k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),c.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(o.count++,c=zf.bind(o),s.addEventListener("load",c),s.addEventListener("error",c))}}var uy=0;function xD(o,s){return o.stylesheets&&o.count===0&&Ff(o,o.stylesheets),0<o.count||0<o.imgCount?function(c){var h=setTimeout(function(){if(o.stylesheets&&Ff(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&uy===0&&(uy=62500*aD());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Ff(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>uy?50:800)+s);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ff(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Vf=null;function Ff(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Vf=new Map,s.forEach(TD,o),Vf=null,zf.call(o))}function TD(o,s){if(!(s.state.loading&4)){var c=Vf.get(o);if(c)var h=c.get(null);else{c=new Map,Vf.set(o,c);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")&&(c.set(k.dataset.precedence,k),h=k)}h&&c.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=c.get(k)||h,_===h&&c.set(null,v),c.set(k,v),this.count++,h=zf.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 cu={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function OD(o,s,c,h,v,_,k,j,Q){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=dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.hiddenUpdates=dr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function NR(o,s,c,h,v,_,k,j,Q,he,be,Te){return o=new OD(o,s,c,k,Q,he,be,Te,j),s=1,_===!0&&(s|=24),_=Vr(3,null,null,s),o.current=_,_.stateNode=o,s=Bg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},Zg(_),o}function kR(o){return o?(o=ol,o):ol}function MR(o,s,c,h,v,_){v=kR(v),h.context===null?h.context=v:h.pendingContext=v,h=as(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=ss(o,h,s),c!==null&&(kr(c,o,s),Vc(c,o,s))}function PR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var c=o.retryLane;o.retryLane=c!==0&&c<s?c:s}}function dy(o,s){PR(o,s),(o=o.alternate)&&PR(o,s)}function DR(o){if(o.tag===13||o.tag===31){var s=ni(o,67108864);s!==null&&kr(s,o,67108864),dy(o,67108864)}}function LR(o){if(o.tag===13||o.tag===31){var s=Gr();s=qi(s);var c=ni(o,s);c!==null&&kr(c,o,s),dy(o,s)}}var Bf=!0;function CD(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=2,fy(o,s,c,h)}finally{W.p=_,B.T=v}}function AD(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=8,fy(o,s,c,h)}finally{W.p=_,B.T=v}}function fy(o,s,c,h){if(Bf){var v=hy(h);if(v===null)Xv(o,s,h,qf,c),$R(o,h);else if(ND(v,o,s,c,h))h.stopPropagation();else if($R(o,h),s&4&&-1<ID.indexOf(o)){for(;v!==null;){var _=Zi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=At(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var Q=1<<31-xn(k);j.entanglements[1]|=Q,k&=~Q}Xo(_),(Dt&6)===0&&(Tf=we()+500,ru(0))}}break;case 31:case 13:j=ni(_,2),j!==null&&kr(j,_,2),Cf(),dy(_,2)}if(_=hy(h),_===null&&Xv(o,s,h,qf,c),_===v)break;v=_}v!==null&&h.stopPropagation()}else Xv(o,s,h,null,c)}}function hy(o){return o=mg(o),py(o)}var qf=null;function py(o){if(qf=null,o=Gi(o),o!==null){var s=i(o);if(s===null)o=null;else{var c=s.tag;if(c===13){if(o=l(s),o!==null)return o;o=null}else if(c===31){if(o=u(s),o!==null)return o;o=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return qf=o,null}function jR(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 ot:return 32;case Ct:return 268435456;default:return 32}default:return 32}}var my=!1,vs=null,ys=null,_s=null,uu=new Map,du=new Map,bs=[],ID="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 $R(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":uu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(s.pointerId)}}function fu(o,s,c,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Zi(s),s!==null&&DR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function ND(o,s,c,h,v){switch(s){case"focusin":return vs=fu(vs,o,s,c,h,v),!0;case"dragenter":return ys=fu(ys,o,s,c,h,v),!0;case"mouseover":return _s=fu(_s,o,s,c,h,v),!0;case"pointerover":var _=v.pointerId;return uu.set(_,fu(uu.get(_)||null,o,s,c,h,v)),!0;case"gotpointercapture":return _=v.pointerId,du.set(_,fu(du.get(_)||null,o,s,c,h,v)),!0}return!1}function UR(o){var s=Gi(o.target);if(s!==null){var c=i(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){o.blockedOn=s,J1(o.priority,function(){LR(c)});return}}else if(s===31){if(s=u(c),s!==null){o.blockedOn=s,J1(o.priority,function(){LR(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){o.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Hf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var c=hy(o.nativeEvent);if(c===null){c=o.nativeEvent;var h=new c.constructor(c.type,c);pg=h,c.target.dispatchEvent(h),pg=null}else return s=Zi(c),s!==null&&DR(s),o.blockedOn=c,!1;s.shift()}return!0}function zR(o,s,c){Hf(o)&&c.delete(s)}function kD(){my=!1,vs!==null&&Hf(vs)&&(vs=null),ys!==null&&Hf(ys)&&(ys=null),_s!==null&&Hf(_s)&&(_s=null),uu.forEach(zR),du.forEach(zR)}function Gf(o,s){o.blockedOn===s&&(o.blockedOn=null,my||(my=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kD)))}var Zf=null;function VR(o){Zf!==o&&(Zf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zf===o&&(Zf=null);for(var s=0;s<o.length;s+=3){var c=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(py(h||c)===null)continue;break}var _=Zi(c);_!==null&&(o.splice(s,3),s-=3,hv(_,{pending:!0,data:v,method:c.method,action:h},h,v))}}))}function Cl(o){function s(Q){return Gf(Q,o)}vs!==null&&Gf(vs,o),ys!==null&&Gf(ys,o),_s!==null&&Gf(_s,o),uu.forEach(s),du.forEach(s);for(var c=0;c<bs.length;c++){var h=bs[c];h.blockedOn===o&&(h.blockedOn=null)}for(;0<bs.length&&(c=bs[0],c.blockedOn===null);)UR(c),c.blockedOn===null&&bs.shift();if(c=(o.ownerDocument||o).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var v=c[h],_=c[h+1],k=v[Tr]||null;if(typeof _=="function")k||VR(c);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[Tr]||null)j=k.formAction;else if(py(v)!==null)continue}else j=k.action;typeof j=="function"?c[h+1]=j:(c.splice(h,3),h-=3),VR(c)}}}function FR(){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(c,20)}function c(){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(c,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function gy(o){this._internalRoot=o}Kf.prototype.render=gy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Gr();MR(c,h,o,s,null,null)},Kf.prototype.unmount=gy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;MR(o.current,2,null,o,null,null),Cf(),s[Hi]=null}};function Kf(o){this._internalRoot=o}Kf.prototype.unstable_scheduleHydration=function(o){if(o){var s=ig();o={blockedOn:null,target:o,priority:s};for(var c=0;c<bs.length&&s!==0&&s<bs[c].priority;c++);bs.splice(c,0,o),c===0&&UR(o)}};var BR=t.version;if(BR!=="19.2.4")throw Error(r(527,BR,"19.2.4"));W.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 MD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wf.isDisabled&&Wf.supportsFiber)try{Rn=Wf.inject(MD),nn=Wf}catch{}}return pu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var c=!1,h="",v=YS,_=QS,k=XS;return s!=null&&(s.unstable_strictMode===!0&&(c=!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=NR(o,1,!1,null,null,c,h,null,v,_,k,FR),o[Hi]=s.current,Qv(o),new gy(s)},pu.hydrateRoot=function(o,s,c){if(!a(o))throw Error(r(299));var h=!1,v="",_=YS,k=QS,j=XS,Q=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(k=c.onCaughtError),c.onRecoverableError!==void 0&&(j=c.onRecoverableError),c.formState!==void 0&&(Q=c.formState)),s=NR(o,1,!0,s,c??null,h,v,Q,_,k,j,FR),s.context=kR(null),c=s.current,h=Gr(),h=qi(h),v=as(h),v.callback=null,ss(c,v,h),c=h,s.current.lanes=c,It(s,c),Xo(s),o[Hi]=s.current,Qv(o),new Kf(s)},pu.version="19.2.4",pu}var ex;function HD(){if(ex)return yy.exports;ex=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(),yy.exports=qD(),yy.exports}var GD=HD(),A=Zs();const ee=Ga(A),db=DD({__proto__:null,default:ee},[A]);var Ey={exports:{}},Ry={};var tx;function ZD(){if(tx)return Ry;tx=1;var e=Zs().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ry.c=function(t){return e.H.useMemoCache(t)},Ry}var nx;function KD(){return nx||(nx=1,Ey.exports=ZD()),Ey.exports}var gc=KD(),md=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(){}},WD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},YD=class{#e=WD;#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)}},xi=new YD;function QD(e){setTimeout(e,0)}var Mi=typeof window>"u"||"Deno"in globalThis;function Lr(){}function XD(e,t){return typeof e=="function"?e(t):e}function G0(e){return typeof e=="number"&&e>=0&&e!==1/0}function FC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ds(e,t){return typeof e=="function"?e(t):e}function bo(e,t){return typeof e=="function"?e(t):e}function rx(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==fb(l,t.options))return!1}else if(!Qu(t.queryKey,l))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 ox(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Yu(t.options.mutationKey)!==Yu(i))return!1}else if(!Qu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function fb(e,t){return(t?.queryKeyHashFn||Yu)(e)}function Yu(e){return JSON.stringify(e,(t,n)=>K0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Qu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qu(e[n],t[n])):!1}var JD=Object.prototype.hasOwnProperty;function BC(e,t){if(e===t)return e;const n=ax(e)&&ax(t);if(!n&&!(K0(e)&&K0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),l=i.length,u=n?new Array(l):{};let d=0;for(let f=0;f<l;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:JD.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=BC(p,g);u[m]=y,y===p&&d++}return a===l&&d===a?e:u}function Z0(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 ax(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function K0(e){if(!sx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!sx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sx(e){return Object.prototype.toString.call(e)==="[object Object]"}function e5(e){return new Promise(t=>{xi.setTimeout(t,e)})}function W0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?BC(e,t):t}function Fre(e){return e}function t5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function n5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var hb=Symbol();function qC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===hb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function r5(e,t){return typeof e=="function"?e(...t):!!e}var o5=class extends md{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Mi&&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"}},pb=new o5;function Y0(){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 a5=QD;function s5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=a5;const i=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{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||l()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var or=s5(),i5=class extends md{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Mi&&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}},xp=new i5;function l5(e){return Math.min(1e3*2**e,3e4)}function HC(e){return(e??"online")==="online"?xp.isOnline():!0}var Q0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function GC(e){let t=!1,n=0,r;const a=Y0(),i=()=>a.status!=="pending",l=S=>{if(!i()){const b=new Q0(S);g(b),e.onCancel?.(b)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>pb.isFocused()&&(e.networkMode==="always"||xp.isOnline())&&e.canRun(),m=()=>HC(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??(Mi?0:3),T=e.retryDelay??l5,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),e5(O).then(()=>f()?void 0:y()).then(()=>{t?g(E):w()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?w():y().then(w),a)}}var ZC=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),G0(this.gcTime)&&(this.#e=xi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Mi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(xi.clearTimeout(this.#e),this.#e=void 0)}},c5=class extends ZC{#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=lx(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=lx(this.options);t.data!==void 0&&(this.setState(ix(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=W0(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===hb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ds(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:!FC(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=qC(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)},l=(()=>{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(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#a({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=GC({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof Q0&&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:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.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 Q0){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,...KC(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ix(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 KC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:HC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ix(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lx(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 u5=class extends md{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=Y0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return X0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return X0(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&&!Z0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ux(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)||Ds(this.options.staleTime,this.#t)!==Ds(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.#l)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return f5(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=Ds(this.options.staleTime,this.#t);if(Mi||this.#o.isStale||!G0(e))return;const n=FC(this.#o.dataUpdatedAt,e)+1;this.#c=xi.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.#l=e,!(Mi||bo(this.options.enabled,this.#t)===!1||!G0(this.#l)||this.#l===0)&&(this.#u=xi.setInterval(()=>{(this.options.refetchIntervalInBackground||pb.isFocused())&&this.#d()},this.#l))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#c&&(xi.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(xi.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,l=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&&cx(e,t),K=P&&ux(e,n,t,r);($||K)&&(m={...m,...KC(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===l?.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=W0(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=W0(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:mb(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=Y0();P(V)},K=this.#s;switch(K.status){case"pending":e.queryHash===n.queryHash&&P(K);break;case"fulfilled":(N.status==="error"||N.data!==K.value)&&$();break;case"rejected":(N.status!=="error"||N.error!==K.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),Z0(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(l=>{const u=l;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 d5(e,t){return bo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function cx(e,t){return d5(e,t)||e.state.data!==void 0&&X0(e,t,t.refetchOnMount)}function X0(e,t,n){if(bo(t.enabled,e)!==!1&&Ds(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&mb(e,t)}return!1}function ux(e,t,n,r){return(e!==t||bo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&mb(e,n)}function mb(e,t){return bo(t.enabled,e)!==!1&&e.isStaleByTime(Ds(t.staleTime,e))}function f5(e,t){return!Z0(e.getCurrentResult(),t)}function dx(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=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=qC(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?n5:t5;return{pages:C(w.pages,T,O),pageParams:C(w.pageParams,S,O)}};if(a&&i.length){const w=a==="backward",S=w?WC:J0,b={pages:i,pageParams:l},E=S(r,b);u=await y(b,E,w)}else{const w=e??i.length;do{const S=d===0?l[0]??r.initialPageParam:J0(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 J0(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 WC(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Bre(e,t){return t?J0(e,t)!=null:!1}function qre(e,t){return!t||!e.getPreviousPageParam?!1:WC(e,t)!=null}var h5=class extends ZC{#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||p5(),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=GC({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},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 l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,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 p5(){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 md{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 h5({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=Yf(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=Yf(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=Yf(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=Yf(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=>ox(t,n))}findAll(e={}){return this.getAll().filter(t=>ox(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 Yf(e){return e.options.scope?.id}var g5=class extends md{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??fb(r,t);let i=this.get(a);return i||(i=new c5({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=>rx(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>rx(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()})})}},v5=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new g5,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=pb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=xp.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(Ds(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,l=XD(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...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(Ds(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=dx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=dx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xp.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(Yu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Qu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Yu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Qu(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=fb(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===hb&&(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()}},YC=A.createContext(void 0),y5=e=>{const t=A.useContext(YC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_5=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(YC.Provider,{value:e,children:t})),QC=A.createContext(!1),b5=()=>A.useContext(QC);QC.Provider;function w5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var S5=A.createContext(w5()),E5=()=>A.useContext(S5),R5=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},x5=e=>{A.useEffect(()=>{e.clearReset()},[e])},T5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||r5(n,[e.error,r])),O5=(e,t)=>t.state.data===void 0,C5=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))}},A5=(e,t)=>e.isLoading&&e.isFetching&&!t,I5=(e,t)=>e?.suspense&&t.isPending,fx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function N5(e,t,n){const r=b5(),a=E5(),i=y5(n),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",C5(l),R5(l,a),x5(a);const u=!i.getQueryCache().get(l.queryHash),[d]=A.useState(()=>new t(i,l)),f=d.getOptimisticResult(l),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(l)},[l,d]),I5(l,f))throw fx(l,d,a);if(T5({result:f,errorResetBoundary:a,throwOnError:l.throwOnError,query:i.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,f),l.experimental_prefetchInRender&&!Mi&&A5(f,r)&&(u?fx(l,d,a):i.getQueryCache().get(l.queryHash)?.promise)?.catch(Lr).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?f:d.trackResult(f)}function XC(e,t){return N5({...e,enabled:!0,suspense:!0,throwOnError:O5,placeholderData:void 0},u5,t)}const JC={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["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],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],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]},eA=A.createContext(void 0);async function k5(){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 M5(e){const t=gc.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:JC.authConfig(),queryFn:k5,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=XC(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(eA.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function Hre(){const e=A.useContext(eA);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const e_=new WeakMap,P5=new WeakMap,Tp={current:[]};let xy=!1,Uu=0;const Au=new Set,Qf=new Map;function tA(e){for(const t of e){if(Tp.current.includes(t))continue;Tp.current.push(t),t.recompute();const n=P5.get(t);if(n)for(const r of n){const a=e_.get(r);a?.length&&tA(a)}}}function D5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function L5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function nA(e){if(Uu>0&&!Qf.has(e)&&Qf.set(e,e.prevState),Au.add(e),!(Uu>0)&&!xy)try{for(xy=!0;Au.size>0;){const t=Array.from(Au);Au.clear();for(const n of t){const r=Qf.get(n)??n.prevState;n.prevState=r,D5(n)}for(const n of t){const r=e_.get(n);r&&(Tp.current.push(n),tA(r))}for(const n of t){const r=e_.get(n);if(r)for(const a of r)L5(a)}}}finally{xy=!1,Tp.current=[],Qf.clear()}}function zu(e){Uu++;try{e()}finally{if(Uu--,Uu===0){const t=Au.values().next().value;t&&nA(t)}}}function j5(e){return typeof e=="function"}class $5{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const l=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),l?.()}},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):j5(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),nA(this)}}const Ls="__TSR_index",hx="popstate",px="beforeunload";function U5(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:l}))},a=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},i=async({task:l,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){l();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=Op(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,u,d)=>{const f=t.state[Ls];u=mx(f+1,u),i({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Ls];u=mx(f,u),i({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{i({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ls]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function mx(e,t){t||(t={});const n=gb();return{...t,key:n,__TSR_key:n,[Ls]:e}}function z5(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,l=P=>a=P,u=(P=>P),d=(()=>Op(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=gb();t.history.replaceState({[Ls]: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,$,K)=>{const V=u($);E||(m=f),f=Op($,K),b={href:V,state:K,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[Ls]-f.state[Ls],K=$===1,V=$===-1,G=!K&&!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 B of le)if(await B.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 K=i();if(typeof document<"u"&&K.length)for(const V of K){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=U5({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(px,I,{capture:!0}),t.removeEventListener(hx,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(px,I,{capture:!0}),t.addEventListener(hx,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 Op(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=gb();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||{[Ls]:0,key:a,__TSR_key:a}}}function gb(){return(Math.random()+1).toString(36).substring(7)}function Cp(e){return e[e.length-1]}function V5(e){return typeof e=="function"}function Ai(e,t){return V5(e)?e(t):e}const F5=Object.prototype.hasOwnProperty;function _o(e,t){if(e===t)return e;const n=t,r=yx(e)&&yx(n);if(!r&&!(Ap(e)&&Ap(n)))return n;const a=r?e:gx(e);if(!a)return n;const i=r?n:gx(n);if(!i)return n;const l=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<l:F5.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 l===u&&f===l?e:d}function gx(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 Ap(e){if(!vx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!vx(n)||!n.hasOwnProperty("isPrototypeOf"))}function vx(e){return Object.prototype.toString.call(e)==="[object Object]"}function yx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ii(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(!Ii(e[r],t[r],n))return!1;return!0}if(Ap(e)&&Ap(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Ii(e[l],t[l],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&a++;let i=0;for(const l in t)if((!r||t[l]!==void 0)&&(i++,i>a||!Ii(e[l],t[l],n)))return!1;return a===i}return!1}function oc(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 B5(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 js(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function _x(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function bx(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=_x(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+_x(r?e.slice(r):e)}var q5="Invariant failed";function Fa(e,t){if(!e)throw new Error(q5)}function Ip(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 l=t.get(i);if(l)return a(l),l.value},set(i,l){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=l,a(u);else{const d={key:i,value:l,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 ac=0,Pi=1,Di=2,Xu=3,H5=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,G5=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Z5=/^([^{]*)\{\$\}([^}]*)$/;function vb(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]=ac,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]=Di,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=Pi,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const l=i.match(Z5);if(l){const m=l[1].length;return n[0]=Di,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(G5);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Xu,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(H5);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=Pi,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]=ac,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function Em(e,t,n,r,a,i,l){l?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=vb(d,u,t);let g;const y=u,w=p[5];switch(u=w+1,i++,p[0]){case ac:{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=Ju(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=Ju(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(E,T)}}break}case Pi:{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=Oy(Pi,n.fullPath??n.from,R,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Xu:{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=Oy(Xu,n.fullPath??n.from,R,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Di:{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=Oy(Di,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)Em(e,t,d,u,a,i,l)}function Ty(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 Ei(e){if(e.static)for(const t of e.static.values())Ei(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ei(t);if(e.dynamic?.length){e.dynamic.sort(Ty);for(const t of e.dynamic)Ei(t)}if(e.optional?.length){e.optional.sort(Ty);for(const t of e.optional)Ei(t)}if(e.wildcard?.length){e.wildcard.sort(Ty);for(const t of e.wildcard)Ei(t)}}function Ju(e){return{kind:ac,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Oy(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 K5(e,t){const n=Ju("/"),r=new Uint16Array(6);for(const a of e)Em(!1,r,a,1,n,0);Ei(n),t.masksTree=n,t.flatCache=Ip(1e3)}function W5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=yb(e,t.masksTree);return t.flatCache.set(e,r),r}function Y5(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let l=a.singleCache.get(i);if(!l){l=Ju("/");const u=new Uint16Array(6);Em(t,u,{from:e},1,l,0),a.singleCache.set(i,l)}return yb(r,l,n)}function Q5(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=yb(e,t.segmentTree,n);return i&&(i.branch=t6(i.route)),t.matchCache.set(r,i),i}function X5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function J5(e,t=!1,n){const r=Ju(e.fullPath),a=new Uint16Array(6),i={},l={};let u=0;return Em(t,a,e,1,r,0,f=>{if(n?.(f,u),Fa(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=X5(f.fullPath);(!l[m]||f.fullPath.endsWith("/"))&&(l[m]=f)}u++}),Ei(r),{processedTree:{segmentTree:r,singleCache:Ip(1e3),matchCache:Ip(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function yb(e,t,n=!1){const r=e.split("/"),a=r6(e,r,t,n);if(!a)return null;const i=e6(e,r,a),l="**"in a;return l&&(i["**"]=a["**"]),{route:l?a.node.notFound??a.node.route:a.node.route,params:i}}function e6(e,t,n){const r=n6(n.node);let a=null;const i={};for(let l=0,u=0,d=0;u<r.length;l++,u++,d++){const f=r[u],m=t[l],p=d;if(m&&(d+=m.length),f.kind===Pi){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===Xu){if(n.skipped&1<<u){l--;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===Di){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 t6(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function n6(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function r6(e,t,n,r){const a=!Cp(t),i=a&&e!=="/",l=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&&Xf(f,p)&&(f=p);const T=y===l;if(T){if(g.route&&(!i||g.isIndex)&&(Xf(m,p)&&(m=p),b===l&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&Xf(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:K,suffix:V}=$;if(K||V){const G=$.caseSensitive?O:C??=O.toLowerCase();if(K&&!G.startsWith(K)||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 K=N.caseSensitive?O:C??=O.toLowerCase();if(P&&!K.startsWith(P)||$&&!K.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 Xf(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 Xf(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 fp(e){return _b(e.filter(t=>t!==void 0).join("/"))}function _b(e){return e.replace(/\/{2,}/g,"/")}function rA(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ni(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function hp(e){return Ni(rA(e))}function Np(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function o6(e,t,n){return Np(e,n)===Np(t,n)}function a6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let l;if(r){l=a?t:i?e:e+"\0"+t;const p=r.get(l);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&&Cp(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&&(Cp(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=vb(g,0,d);const y=d[0];if(y===ac){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===Pi?f+=S||b?`${S}{$${E}}${b}`:`$${E}`:y===Di?f+=S||b?`${S}{$}${b}`:"$":f+=`${S}{-$${E}}${b}`}f=_b(f);const m=f||"/";return l&&r&&r.set(l,m),m}function Cy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):s6(r,n)}function Ay({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 l=0,u,d="";for(;l<i;){const m=l;u=vb(e,m,u);const p=u[5];if(l=p+1,m===p)continue;const g=u[0];if(g===ac){d+="/"+e.substring(m,p);continue}if(g===Di){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=Cy("_splat",t,n);d+="/"+w+b+S;continue}if(g===Pi){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=Cy(y,t,n)??"undefined";d+="/"+w+b+S;continue}if(g===Xu){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=Cy(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 i6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const kp="tsr-scroll-restoration-v1_3",l6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function c6(){const e=i6();if(!e)return null;const t=e.getItem(kp);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ai(r,n)||n,e.setItem(kp,JSON.stringify(n)))}}const Jf=c6(),t_=e=>e.state.__TSR_key||e.href;function u6(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 Mp=!1;function oA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=l[u];Mp=!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)}}Mp=!1}function d6(e,t){if(!Jf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Jf))return;e.isScrollRestorationSetup=!0,Mp=!1;const r=e.options.getScrollRestorationKey||t_;window.history.scrollRestoration="manual";const a=i=>{if(Mp||!e.isScrollRestoring)return;let l="";if(i.target===document||i.target===window)l="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=u6(i.target)}const u=r(e.state.location);Jf.set(d=>{const f=d[u]||={},m=f[l]||={};if(l==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(l){const p=document.querySelector(l);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",l6(a,100),!0),e.subscribe("onRendered",i=>{const l=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(oA({storageKey:kp,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Jf.set(u=>(u[l]||={},u)))})}function f6(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 h6(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 Iy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function p6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Iy(a):Array.isArray(i)?i.push(Iy(a)):n[r]=[i,Iy(a)]}return n}const m6=v6(JSON.parse),g6=y6(JSON.stringify,JSON.parse);function v6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=p6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function y6(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=h6(a,r);return i?`?${i}`:""}}const Yr="__root__";function bb(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 Fo(e){return e instanceof Response&&!!e.options}const pp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Rm=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),aA=(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),Fa(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Fa(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,aA(e,t))},Ms=(e,t,n)=>{if(!(!Fo(n)&&!So(n))){if(Fo(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=Fo(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 Fo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(aA(e,n),n)}},sA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},mu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Ms(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,Ms(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}))},_6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,l=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Yr;return}if(l?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&l?.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:eh(f,a.searchError),params:eh(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:eh(y.search,y.searchError),params:eh(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(js(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},iA=(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&&!Rm(e,t)&&(n.options.loader||n.options.beforeLoad||uA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{pp(e)},a);r._nonReactive.pendingTimeout=l}},b6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;iA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Ms(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},w6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=oc(()=>{i?.resolve()});const{paramsError:l,searchError:u}=a;l&&mu(e,n,l,"PARSE_PARAMS"),u&&mu(e,n,u,"VALIDATE_SEARCH"),iA(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){zu(()=>{w(),S()});return}a._nonReactive.beforeLoadPromise=oc();const{search:b,params:E,cause:R}=a,T=Rm(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){zu(()=>{w(),S()});return}(Fo(N)||So(N))&&(w(),mu(e,n,N,"BEFORE_LOAD")),zu(()=>{w(),e.updateMatch(t,P=>({...P,__beforeLoadContext:N,context:{...P.context,...N}})),S()})};let I;try{if(I=r.options.beforeLoad(O),js(I))return w(),I.catch(N=>{mu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){w(),mu(e,n,N,"BEFORE_LOAD")}C(I)},S6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=_6(e,n,t,a);if(js(d))return d.then(u)}return u()},l=()=>w6(e,n,t,a),u=()=>{if(sA(e,n))return;const d=b6(e,n,a);return js(d)?d.then(l):l()};return i()},Vu=(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,l,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},lA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:l,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=Rm(e,t);return{params:i,deps:l,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}},wx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&cA(r);const i=r.options.loader?.(lA(e,t,n,r)),l=r.options.loader&&js(i);if(!!(l||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=l?await i:i;Ms(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=Vu(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 l=i;const u=a._nonReactive.minPendingPromise;u&&await u,So(i)&&await r.options.notFoundComponent?.preload?.(),Ms(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){l=m,Ms(e,e.router.getMatch(t),m)}const d=Vu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const l=Vu(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}Ms(e,i,a)}},E6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const l=e.router.looseRoutesById[r];if(sA(e,n)){if(e.router.isServer){const f=Vu(e,n,l);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&&Ms(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Rm(e,n),g=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,y=l.options.shouldReload,w=typeof y=="function"?y(lA(e,n,t,l)):y,S=!!p&&!e.router.state.matches.some(T=>T.id===n),b=e.router.getMatch(n);b._nonReactive.loaderPromise=oc(),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&&l.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await wx(e,n,t,l);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Fo(T)&&await e.router.navigate(T.options)}})();else if(E!=="success"||a&&e.sync)await wx(e,n,t,l);else{const T=Vu(e,n,l);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 Sx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&pp(t);try{for(let a=0;a<t.matches.length;a++){const i=S6(t,a);js(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(E6(t,a));await Promise.all(t.matchPromises);const r=pp(t);js(r)&&await r}catch(n){if(So(n)&&!t.preload){const r=pp(t);throw js(r)&&await r,n}if(Fo(n))throw n}return t.matches}async function cA(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 dA){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 eh(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function uA(e){for(const t of dA)if(e.options[t]?.preload)return!0;return!1}const dA=["component","errorComponent","pendingComponent","notFoundComponent"];function R6(e){return{input:({url:t})=>{for(const n of e)t=fA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=hA(e[n],t);return t}}}function x6(e){const t=hp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===a?l.pathname="/":u.startsWith(i)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=fp(["/",t,l.pathname]),l)}}function fA(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 hA(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 ki(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 T6{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,l=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=z5())),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 $5(C6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),d6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||l!==f){this.basepath=d;const g=[];hp(d)!==""&&g.push(x6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:R6(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}=J5(this.routeTree,this.options.caseSensitive,(l,u)=>{l.init({originalIndex:u})});this.options.routeMasks&&K5(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=fA(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:bx(S),searchStr:y,search:_o(r?.search,g),hash:b.split("#").reverse()[0]??"",state:_o(r?.state,f)}},i=a(n),{__tempLocation:l,__tempKey:u}=i.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);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=Ip(1e3),this.resolvePathWithBase=(n,r)=>a6({base:n,to:_b(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=>A6({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 l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=Cp(u);i.from;const f=i.unsafeRelative==="path"?l.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,Ai(i.params,g)),S=Ay({path:y,params:w}).interpolatedPath,b=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(w).length>0)for(const K of b){const V=K.options.params?.stringify??K.options.stringifyParams;V&&Object.assign(w,V(w))}const E=n.leaveParams?y:bx(Ay({path:y,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let R=p;if(n._includeValidateSearch&&this.options.search?.strict){const K={};b.forEach(V=>{if(V.options.validateSearch)try{Object.assign(K,n_(V.options.validateSearch,{...K,...R}))}catch{}}),R=K}R=I6({search:R,dest:i,destRoutes:b,_includeValidateSearch:n._includeValidateSearch}),R=_o(p,R);const T=this.options.stringifySearch(R),O=i.hash===!0?l.hash:i.hash?Ai(i.hash,l.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?l.state:i.state?Ai(i.state,l.state):{};I=_o(l.state,I);const N=`${E}${T}${C}`,P=new URL(N,this.origin),$=hA(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={},l)=>{const u=r(i);let d=l?r(l):void 0;if(!d){const f={};if(this.options.routeMasks){const m=W5(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;l={from:n.from,...g,params:f},d=r(l)}}}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=Ii(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Ni(this.latestLocation.href)===Ni(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=oc(()=>{u?.resolve()}),l&&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:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Op(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:l});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(hp(a(this.latestLocation.href))!==hp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),bb({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",...ki({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...ki({resolvedLocation:f,location:d})}),await Sx({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=[];zu(()=>{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){Fo(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 l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(u=>u.status==="error")&&(l=500),l!==void 0&&this.__store.setState(u=>({...u,statusCode:l}))},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,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(ki({resolvedLocation:l,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(l=>l.id===n?r(l):l)}))})},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=cA,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)),l=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);zu(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await Sx({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(Fo(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=Y5(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Ii(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ii(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??g6,parseSearch:t.parseSearch??m6}),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:l}=r,u=!1;(a?a.path!=="/"&&i["**"]:Ni(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=l.length-1;p>=0;p--){const g=l[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 l.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=n_(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let B=le;if(le instanceof Pp||(B=new Pp(le.message,{cause:le})),n?.throwOnError)throw B;return[U,{},B]}})(),E=p.options.loaderDeps?.({search:w})??"",R=E?JSON.stringify(E):"",{interpolatedPath:T,usedParams:O}=Ay({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)||Fo(J)?$=J:$=new O6(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const K=N?"stay":"enter";let V;if(I)V={...I,cause:K,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||uA(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:oc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:K,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 Pp extends Error{}class O6 extends Error{}function C6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function n_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Pp("Async validation not supported");if(n.issues)throw new Pp(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 A6({pathname:e,routesById:t,processedTree:n}){const r={},a=Ni(e);let i;const l=Q5(a,n,!0);return l&&(i=l.route,Object.assign(r,l.params)),{matchedRoutes:l?.branch||[t[Yr]],routeParams:r,foundRoute:i}}function I6({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,...n_(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:Ai(t.search,u):{};a.push(i);const l=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>l(u+1,p)})};return l(0,e)}const N6="Error preloading route! ☝️";class pA{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||Fa(!1);let i=a?Yr:r?.path;i&&i!=="/"&&(i=rA(i));const l=r?.id||i;let u=a?Yr:fp([this.parentRoute.id===Yr?"":this.parentRoute.id,l]);i===Yr&&(i="/"),u!==Yr&&(u=fp(["/",u]));const d=u===Yr?"/":fp([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 k6 extends pA{constructor(t){super(t)}}function wb(e){const t=e.errorComponent??xm;return x.jsx(M6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class M6 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 xm({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 P6({children:e,fallback:t=null}){return D6()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function D6(){return ee.useSyncExternalStore(L6,()=>!0,()=>!1)}function L6(){return()=>{}}var Ny={exports:{}},ky={},My={exports:{}},Py={};var Ex;function j6(){if(Ex)return Py;Ex=1;var e=Zs();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,l=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]),l(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 Py.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Py}var Rx;function mA(){return Rx||(Rx=1,My.exports=j6()),My.exports}var xx;function $6(){if(xx)return ky;xx=1;var e=Zs(),t=mA();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,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return ky.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 l(function(){S.hasValue=!0,S.value=b},[b]),d(b),b},ky}var Tx;function U6(){return Tx||(Tx=1,Ny.exports=$6()),Ny.exports}var gA=U6();const Gre=Ga(gA);function z6(e,t=r=>r,n={}){const r=n.equal??V6;return gA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function V6(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=Ox(e);if(n.length!==Ox(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 Ox(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dy=A.createContext(null);function vA(){return typeof document>"u"?Dy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dy,Dy)}function Ur(e){const t=A.useContext(vA());return e?.warn,t}function Er(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return z6(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 Tm=A.createContext(void 0),F6=A.createContext(void 0);function la(e){const t=A.useContext(e.from?F6:Tm);return Er({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Fa(!((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 Sb(e){return la({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Eb(e){const{select:t,...n}=e;return la({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Ql(e){return la({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 Om(e){return la({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Iu=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Ly(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 B6(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 q6(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function vc(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Zre(e){const t=Ur(),n=vc(),r=A.useRef(null);return Iu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Cm=VC();const yA=Ga(Cm);function H6(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),l=q6(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:K,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:le,state:B,mask:W,reloadDocument:Y,unsafeRelative:pe,from:ae,_fromLocation:M,...q}=e,F=Er({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,z=A.useMemo(()=>({...e,from:L}),[n,F,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=A.useMemo(()=>n.buildLocation({...z}),[n,z]),de=A.useMemo(()=>{if(O)return;let oe=X.maskedLocation?X.maskedLocation.url:X.url,we=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":we=!0),{href:oe,external:we}},[O,X.maskedLocation,X.url,n.origin,n.history]),ve=A.useMemo(()=>{if(de?.external)return de.href;try{return new URL(m),m}catch{}},[m,de]),Ie=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ae=g??n.options.defaultPreloadDelay??0,H=Er({select:oe=>{if(ve)return!1;if(f?.exact){if(!o6(oe.location.pathname,X.pathname,n.basepath))return!1}else{const we=Np(oe.location.pathname,n.basepath),xe=Np(X.pathname,n.basepath);if(!(we.startsWith(xe)&&(we.length===xe.length||we[xe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ii(oe.location.search,X.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===X.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(N6)})},[n,z]),_e=A.useCallback(oe=>{oe?.isIntersecting&&ne()},[ne]);B6(l,_e,Y6,{disabled:!!O||Ie!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ie==="render"&&(ne(),i.current=!0)},[O,ne,Ie]);const se=oe=>{const we=oe.currentTarget.getAttribute("target"),xe=T!==void 0?T:we;if(!O&&!Q6(oe)&&!oe.defaultPrevented&&(!xe||xe==="_self")&&oe.button===0){oe.preventDefault(),Cm.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:l,href:ve,...R&&{children:R},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...P&&{onFocus:P},...$&&{onMouseEnter:$},...K&&{onMouseLeave:K},...V&&{onTouchStart:V}};const ue=oe=>{O||Ie&&ne()},Oe=ue,Pe=oe=>{if(!(O||!Ie))if(!Ae)ne();else{const we=oe.target;if(gu.has(we))return;const xe=setTimeout(()=>{gu.delete(we),ne()},Ae);gu.set(we,xe)}},Xe=oe=>{if(O||!Ie||!Ae)return;const we=oe.target,xe=gu.get(we);xe&&(clearTimeout(xe),gu.delete(we))},Fe=H?Ai(u,{})??G6:jy,We=H?jy:Ai(d,{})??jy,Z=[I,Fe.className,We.className].filter(Boolean).join(" "),re=(C||Fe.style||We.style)&&{...C,...Fe.style,...We.style};return{...q,...Fe,...We,href:de?.href,ref:l,onClick:vu([N,se]),onFocus:vu([P,ue]),onMouseEnter:vu([$,Pe]),onMouseLeave:vu([K,Xe]),onTouchStart:vu([V,Oe]),disabled:!!O,target:T,...re&&{style:re},...Z&&{className:Z},...O&&Z6,...H&&K6,...r&&W6}}const jy={},G6={className:"active"},Z6={role:"link","aria-disabled":!0},K6={"data-status":"active","aria-current":"page"},W6={"data-transitioning":"transitioning"},gu=new WeakMap,Y6={rootMargin:"100px"},vu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Am=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...l}=H6(r,t),u=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,A.createElement(n||"a",{...l,ref:i},u)});function Q6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class X6 extends pA{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Om({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ql({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Eb({...n,from:this.id}),this.useLoaderData=n=>Sb({...n,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Am,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function en(e){return new X6(e)}class J6 extends k6{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Om({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ql({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Eb({...n,from:this.id}),this.useLoaderData=n=>Sb({...n,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Am,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function eL(e){return new J6(e)}function Cx(e){return typeof e=="object"?new Ax(e,{silent:!0}).createRoute(e):new Ax(e,{silent:!0}).createRoute}class Ax{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=en(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Ix{constructor(t){this.useMatch=n=>la({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Om({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Ql({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Eb({...n,from:this.options.id}),this.useLoaderData=n=>Sb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return vc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Nx(e){return typeof e=="object"?new Ix(e):t=>new Ix({id:e,...t})}function un(e,t){let n,r,a,i;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,B5(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 l();return A.createElement(r,f)};return u.preload=l,u}function tL(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=Ly(i),u=i||n||a,d=Ly(u),f=i||a,m=Ly(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 Ni(e.latestLocation.href)!==Ni(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Iu(()=>{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]),Iu(()=>{l&&!i&&e.emit({type:"onLoad",...ki(e.state)})},[l,e,i]),Iu(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...ki(e.state)})},[f,m,e]),Iu(()=>{if(d&&!u){const p=ki(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&f6(e)}},[u,d,e]),null}function nL(e){const t=Er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(wb,{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 rL(){return x.jsx("p",{children:"Not Found"})}function Vl(e){return x.jsx(x.Fragment,{children:e.children})}function _A(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(rL,{})}function oL({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 aL(){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||t_)(e.latestLocation),r=n!==t_(e.latestLocation)?n:void 0,a={storageKey:kp,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(oL,{children:`(${oA.toString()})(${JSON.stringify(a)})`})}const bA=A.memo(function({matchId:t}){const n=Ur(),r=Er({select:E=>{const R=E.matches.find(T=>T.id===t);return Fa(R),{routeId:R.routeId,ssr:R.ssr,_displayPending:R._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,l=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:Vl,g=u?wb:Vl,y=f?nL:Vl,w=Er({select:E=>E.loadedAt}),S=Er({select:E=>{const R=E.matches.findIndex(T=>T.id===t);return E.matches[R-1]?.routeId}}),b=a.isRoot?a.options.shellComponent??Vl:Vl;return x.jsxs(b,{children:[x.jsx(Tm.Provider,{value:t,children:x.jsx(p,{fallback:l,children:x.jsx(g,{getResetKey:()=>w,errorComponent:u||xm,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(P6,{fallback:l,children:x.jsx(kx,{matchId:t})}):x.jsx(kx,{matchId:t})})})})}),S===Yr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(sL,{}),x.jsx(aL,{})]}):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",...ki(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const kx=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Er({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}),l=n.routesById[i],u=A.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(wA,{})},[a,l.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=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=oc();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 Fa(So(r.error)),_A(n,l,r.error);if(r.status==="redirected")throw Fa(Fo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||xm;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),wA=A.memo(function(){const t=Ur(),n=A.useContext(Tm),r=Er({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Er({select:f=>{const p=f.matches.find(g=>g.id===n);return Fa(p),p.globalNotFound}}),l=Er({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 _A(t,a,void 0);if(!l)return null;const d=x.jsx(bA,{matchId:l});return r===Yr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function iL(){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?Vl:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(tL,{}),x.jsx(lL,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function lL(){const e=Ur(),t=Er({select:a=>a.matches[0]?.id}),n=Er({select:a=>a.loadedAt}),r=t?x.jsx(bA,{matchId:t}):null;return x.jsx(Tm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(wb,{getResetKey:()=>n,errorComponent:xm,onCatch:a=>{a.message||a.toString()},children:r})})}const cL=e=>new uL(e);class uL extends T6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Cx,globalThis.createLazyFileRoute=Nx):typeof window<"u"&&(window.createFileRoute=Cx,window.createLazyFileRoute=Nx);function dL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=vA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function fL({router:e,...t}){return x.jsx(dL,{router:e,...t,children:x.jsx(iL,{})})}function hL(e){return Er({select:t=>t.location})}var pL={},Mx={};const mp=Object.create(null),yu=e=>pL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?mp:globalThis),wo=new Proxy(mp,{get(e,t){return yu()[t]??mp[t]},has(e,t){return t in yu()||t in mp},set(e,t,n){const r=yu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=yu(!0);return delete n[t],!0},ownKeys(){const e=yu(!0);return Object.keys(e)}});function In(e,t){return typeof process<"u"&&Mx?Mx[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const _u=1,Zn=4,na=8,Xr=24,Px={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},mL=new Map(Object.entries({APPVEYOR:na,BUILDKITE:na,CIRCLECI:Xr,DRONE:na,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:na,TRAVIS:na})),gL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function vL(){if(In("FORCE_COLOR")!==void 0)switch(In("FORCE_COLOR")){case"":case"1":case"true":return Zn;case"2":return na;case"3":return Xr;default:return _u}if(In("NODE_DISABLE_COLORS")!==void 0&&In("NODE_DISABLE_COLORS")!==""||In("NO_COLOR")!==void 0&&In("NO_COLOR")!==""||In("TERM")==="dumb")return _u;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 mL)if(e in wo)return t;return In("CI_NAME")==="codeship"?na:_u}if("TEAMCITY_VERSION"in wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(In("TEAMCITY_VERSION"))!==null?Zn:_u;switch(In("TERM_PROGRAM")){case"iTerm.app":return!In("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(In("TERM_PROGRAM_VERSION"))!==null?na:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return na}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 na;const e=In("TERM").toLowerCase();if(Px[e])return Px[e];if(gL.some(t=>t.exec(e)!==null))return Zn}return In("COLORTERM")?Zn:_u}const ra={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"}},r_=["debug","info","success","warn","error"];function yL(e,t){return r_.indexOf(t)>=r_.indexOf(e)}const _L={info:ra.fg.blue,success:ra.fg.green,warn:ra.fg.yellow,error:ra.fg.red,debug:ra.fg.magenta},bL=(e,t,n)=>{const r=new Date().toISOString();return n?`${ra.dim}${r}${ra.reset} ${_L[e]}${e.toUpperCase()}${ra.reset} ${ra.bright}[Better Auth]:${ra.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},wL=e=>{const t="error",n=vL()!==1,r=(a,i,l=[])=>{if(!yL(t,a))return;const u=bL(a,i,n);{a==="error"?console.error(u,...l):a==="warn"?console.warn(u,...l):console.log(u,...l);return}};return{...Object.fromEntries(r_.map(a=>[a,(...[i,...l])=>r(a,i,l)])),get level(){return t}}};wL();var Fu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function SL(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Fu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function EL(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Fu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Fu?t:new Fu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function $y(e,t="/api/auth"){if(EL(e),SL(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function RL(e,t,n,r,a){if(e)return $y(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 $y(i,t)}if(typeof window<"u"&&window.location)return $y(window.location.origin,t)}const xL={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*:/},TL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Dx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},OL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function CL(e){return e instanceof Date&&!isNaN(e.getTime())}function AL(e){const t=OL.exec(e);if(!t)return null;const[,n,r,a,i,l,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(l,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 CL(g)?g:null}function IL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const u=l.toLowerCase();if(u.length<=9&&u in Dx)return Dx[u];if(!TL.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(xL).some(([d,f])=>{const m=f.test(l);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(l,(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=AL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function NL(e,t={strict:!0}){return IL(e,t)}let ko=[],Ss=0;const th=4,Zl=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+th;i<ko.length;)ko[i]===r?ko.splice(i,th):i+=th;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!ko.length;for(let l of t)ko.push(l,n.value,r,a);if(i){for(Ss=0;Ss<ko.length;Ss+=th)ko[Ss](ko[Ss+1],ko[Ss+2],ko[Ss+3]);ko.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},kL=5,nh=6,rh=10;let ML=(e,t,n,r)=>(e.events=e.events||{},e.events[n+rh]||(e.events[n+rh]=r(a=>{e.events[n].reduceRight((i,l)=>(l(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+rh](),delete e.events[n+rh])}),PL=1e3,SA=(e,t)=>ML(e,r=>{let a=t(r);a&&e.events[nh].push(a)},kL,r=>{let a=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...l));let i=e.off;return e.events[nh]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[nh])l();e.events[nh]=[]}},PL)},()=>{e.listen=a,e.off=i}});function DL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,l)=>{r.has(l)&&n(a,i,l)})}var LL=Object.defineProperty,jL=Object.defineProperties,$L=Object.getOwnPropertyDescriptors,Lx=Object.getOwnPropertySymbols,UL=Object.prototype.hasOwnProperty,zL=Object.prototype.propertyIsEnumerable,jx=(e,t,n)=>t in e?LL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jo=(e,t)=>{for(var n in t||(t={}))UL.call(t,n)&&jx(e,n,t[n]);if(Lx)for(var n of Lx(t))zL.call(t,n)&&jx(e,n,t[n]);return e},ta=(e,t)=>jL(e,$L(t)),VL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},FL=async(e,t)=>{var n,r,a,i,l,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((l=m.hooks)==null?void 0:l.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},$x=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}},BL=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 qL(e){if(typeof e=="number")return new $x({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new $x(e);case"exponential":return new BL(e);default:throw new Error("Invalid retry strategy")}}var HL=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},GL=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ZL(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 GL.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function KL(e){try{return JSON.parse(e),!0}catch{return!1}}function EA(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 Ux(e){try{return JSON.parse(e)}catch{return e}}function zx(e){return typeof e=="function"}function WL(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 YL(e){const t=new Headers(e?.headers),n=await HL(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=QL(e?.body);r&&t.set("content-type",r)}return t}function QL(e){return EA(e)?"application/json":null}function XL(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(EA(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 JL(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 xA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function ej(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var tj=class RA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,RA.prototype)}};async function gp(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new tj(n.issues);return n.value}var xA=["get","post","put","patch","delete"],nj=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,l;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))),(l=u.config)!=null&&l.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ta(jo({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ta(jo({},m),{body:f.input?await gp(f.input,n?.body):n?.body,params:f.params?await gp(f.params,n?.params):n?.params,query:f.query?await gp(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),rj=e=>{async function t(n,r){const a=ta(jo(jo({},e),r),{plugins:[...e?.plugins||[],nj(e||{})]});if(e?.catchAllError)try{return await o_(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 o_(n,a)}return t};function oj(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];xA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[l,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=l.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const w=r[g];l=l.replace(y,w)}}else for(const[p,g]of Object.entries(r))l=l.replace(`:${p}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${f}`,i):`${i}${l}${f}`}var o_=async(e,t)=>{var n,r,a,i,l,u,d,f;const{hooks:m,url:p,options:g}=await FL(e,t),y=WL(g),w=new AbortController,S=(n=g.signal)!=null?n:w.signal,b=oj(p,g),E=XL(g),R=await YL(g),T=JL(p,g);let O=ta(jo({},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}=ej(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(ta(jo({},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=ZL(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const B=await I.text(),Y=await((i=O.jsonParser)!=null?i:Ux)(B);le.data=Y}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await gp(O.output,le.data));for(const B of m.onSuccess)B&&await B(ta(jo({},le),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:Ux,$=await I.text(),K=KL($),V=K?await P($):null,G={response:I,responseText:$,request:O,error:ta(jo({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ta(jo({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=qL(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const B of m.onRetry)B&&await B(N);const le=U.getDelay(J);return await new Promise(B=>setTimeout(B,le)),await o_(e,ta(jo({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new VL(I.status,I.statusText,K?V:$);return{data:null,error:ta(jo({},V),{status:I.status,statusText:I.statusText})}};const Uy=Symbol.for("better-auth:broadcast-channel"),aj=()=>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:aj()}))}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 zy(e="better-auth.message"){return globalThis[Uy]||(globalThis[Uy]=new sj(e)),globalThis[Uy]}const Vy=Symbol.for("better-auth:focus-manager");var ij=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 Vx(){return globalThis[Vy]||(globalThis[Vy]=new ij),globalThis[Vy]}const Fy=Symbol.for("better-auth:online-manager");var lj=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 By(){return globalThis[Fy]||(globalThis[Fy]=new lj),globalThis[Fy]}const cj=()=>typeof window>"u",Nu=(e,t,n,r)=>{const a=Zl({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 l=!1;for(const u of e)u.subscribe(async()=>{cj()||(l?await i():SA(a,()=>{const d=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Al=()=>Math.floor(Date.now()/1e3),uj=5;function dj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,l=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||By().isOnline,m=R=>{if(!f())return;if(R?.event==="storage"){d.lastSync=Al(),n.set(!n.get());return}const T=t.get();if(R?.event==="poll"){d.lastSessionRequest=Al(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=Al(),n.set(!n.get())}).catch(()=>{});return}R?.event==="visibilitychange"&&Al()-d.lastSessionRequest<uj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||R?.event==="visibilitychange")&&(R?.event==="visibilitychange"&&(d.lastSessionRequest=Al()),d.lastSync=Al(),n.set(!n.get()))},p=R=>{zy().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=zy().subscribe(()=>{m({event:"storage"})})},w=()=>{l&&(d.unsubscribeFocus=Vx().subscribe(()=>{m({event:"visibilitychange"})}))},S=()=>{d.unsubscribeOnline=By().subscribe(R=>{R&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),w(),S(),zy().setup(),Vx().setup(),By().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 fj={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 hj(e,t){const n=Zl(!1),r=Nu(n,"/get-session",e,{method:"GET"});return SA(r,()=>{const a=dj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const pj=(e,t)=>{const n="credentials"in Request.prototype,r=RL(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:l,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=rj({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?NL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[fj],...a]}),{$sessionSignal:g,session:y}=hj(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 mj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function gj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...l}=n||{};return r||(a?.method?a.method:l&&Object.keys(l).length>0?"POST":"GET")}function vj(e,t,n,r,a){function i(l=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,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"||mj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+l.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=gj(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 yj(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?DL(e,r,d):e.listen(d)},a),l=()=>n.current;return A.useSyncExternalStore(i,l,l)}function _j(e){return`use${bj(e)}`}function bj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function wj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:l}=pj(e);let u={};for(const[d,f]of Object.entries(r))u[_j(d)]=()=>yj(f);return vj({...n,...u,$fetch:a,$store:i},a,t,r,l)}function Sj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const l=e[a];if(!l)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>l.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>l.includes(d)):r=u.actions.every(d=>l.includes(d))}else throw new Fu("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 TA(e){return{newRole(t){return Sj(t)},statements:e}}const Ej={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},OA=TA(Ej),CA=OA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),AA=OA.newRole({user:[],session:[]}),Rj={admin:CA,user:AA},xj=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||Rj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},Tj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Rb=TA(Tj),IA=Rb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),NA=Rb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),kA=Rb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),Oj={admin:IA,owner:NA,member:kA},Cj=(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 l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},Aj=e=>{const t={admin:CA,user:AA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>xj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},Ij=()=>({id:"magic-link",$InferServerPlugin:{}}),Nj=e=>Cj(e,e.options.roles||Oj),kj=e=>{const t=Zl(!1),n=Zl(!1),r=Zl(!1),a=Zl(!1),i={admin:IA,member:kA,owner:NA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Nj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const u=Nu(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Nu([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:u,activeMember:Nu([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Nu([a],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Mj=e=>({id:"sso-client",$InferServerPlugin:{}}),Pj=wj({plugins:[kj({}),Aj(),Mj(),Ij()]});function MA(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=MA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function PA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=MA(e))&&(r&&(r+=" "),r+=t);return r}const Dj=(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},Lj=(e,t)=>({classGroupId:e,validator:t}),DA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Dp="-",Fx=[],jj="arbitrary..",$j=e=>{const t=zj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Uj(l);const u=l.split(Dp),d=u[0]===""&&u.length>1?1:0;return LA(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?Dj(f,d):d:f||Fx}return n[l]||Fx}}},LA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=LA(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Dp):e.slice(t).join(Dp),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},Uj=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})(),zj=e=>{const{theme:t,classGroups:n}=e;return Vj(n,t)},Vj=(e,t)=>{const n=DA();for(const r in e){const a=e[r];xb(a,n,r,t)}return n},xb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];Fj(l,t,n,r)}},Fj=(e,t,n,r)=>{if(typeof e=="string"){Bj(e,t,n);return}if(typeof e=="function"){qj(e,t,n,r);return}Hj(e,t,n,r)},Bj=(e,t,n)=>{const r=e===""?t:jA(t,e);r.classGroupId=n},qj=(e,t,n,r)=>{if(Gj(e)){xb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Lj(n,e))},Hj=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[u,d]=a[l];xb(d,jA(t,u),n,r)}},jA=(e,t)=>{let n=e;const r=t.split(Dp),a=r.length;for(let i=0;i<a;i++){const l=r[i];let u=n.nextPart.get(l);u||(u=DA(),n.nextPart.set(l,u)),n=u}return n},Gj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},a_="!",Bx=":",Kj=[],qx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Wj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,u=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const b=a[S];if(l===0&&u===0){if(b===Bx){i.push(a.slice(d,S)),d=S+1;continue}if(b==="/"){f=S;continue}}b==="["?l++:b==="]"?l--:b==="("?u++:b===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(a_)?(g=p.slice(0,-1),y=!0):p.startsWith(a_)&&(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+Bx,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):qx(Kj,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Yj=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 l=n[i],u=l[0]==="[",d=t.has(l);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},Qj=e=>({cache:Zj(e.cacheSize),parseClassName:Wj(e),sortModifiers:Yj(e),...$j(e)}),Xj=/\s+/,Jj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],u=e.trim().split(Xj);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+a_:R,O=T+E;if(l.indexOf(O)>-1)continue;l.push(O);const C=a(E,b);for(let I=0;I<C.length;++I){const N=C[I];l.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},e$=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=$A(n))&&(a&&(a+=" "),a+=r);return a},$A=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$A(e[r]))&&(n&&(n+=" "),n+=t);return n},t$=(e,...t)=>{let n,r,a,i;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=Qj(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=Jj(d,n);return a(d,m),m};return i=l,(...d)=>i(e$(...d))},n$=[],Un=e=>{const t=n=>n[e]||n$;return t.isThemeGetter=!0,t},UA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r$=/^\d+\/\d+$/,o$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a$=/\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)\(.+\)$/,i$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Il=e=>r$.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),Es=e=>!!e&&Number.isInteger(Number(e)),qy=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Da=e=>o$.test(e),c$=()=>!0,u$=e=>a$.test(e)&&!s$.test(e),VA=()=>!1,d$=e=>i$.test(e),f$=e=>l$.test(e),h$=e=>!Ue(e)&&!ze(e),p$=e=>yc(e,qA,VA),Ue=e=>UA.test(e),mi=e=>yc(e,HA,u$),Hy=e=>yc(e,_$,ft),Hx=e=>yc(e,FA,VA),m$=e=>yc(e,BA,f$),oh=e=>yc(e,GA,d$),ze=e=>zA.test(e),bu=e=>_c(e,HA),g$=e=>_c(e,b$),Gx=e=>_c(e,FA),v$=e=>_c(e,qA),y$=e=>_c(e,BA),ah=e=>_c(e,GA,!0),yc=(e,t,n)=>{const r=UA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_c=(e,t,n=!1)=>{const r=zA.exec(e);return r?r[1]?t(r[1]):n:!1},FA=e=>e==="position"||e==="percentage",BA=e=>e==="image"||e==="url",qA=e=>e==="length"||e==="size"||e==="bg-size",HA=e=>e==="length",_$=e=>e==="number",b$=e=>e==="family-name",GA=e=>e==="shadow",w$=()=>{const e=Un("color"),t=Un("font"),n=Un("text"),r=Un("font-weight"),a=Un("tracking"),i=Un("leading"),l=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(),ze,Ue],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[ze,Ue,d],$=()=>[Il,"full","auto",...P()],K=()=>[Es,"none","subgrid",ze,Ue],V=()=>["auto",{span:["full",Es,ze,Ue]},Es,ze,Ue],G=()=>[Es,"auto",ze,Ue],U=()=>["auto","min","max","fr",ze,Ue],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...P()],W=()=>[Il,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Y=()=>[e,ze,Ue],pe=()=>[...O(),Gx,Hx,{position:[ze,Ue]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",v$,p$,{size:[ze,Ue]}],q=()=>[qy,bu,mi],F=()=>["","none","full",f,ze,Ue],L=()=>["",ft,bu,mi],z=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[ft,qy,Gx,Hx],ve=()=>["","none",w,ze,Ue],Ie=()=>["none",ft,ze,Ue],Ae=()=>["none",ft,ze,Ue],H=()=>[ft,ze,Ue],ne=()=>[Il,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Da],breakpoint:[Da],color:[c$],container:[Da],"drop-shadow":[Da],ease:["in","out","in-out"],font:[h$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Da],shadow:[Da],spacing:["px",ft],text:[Da],"text-shadow":[Da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Il,Ue,ze,b]}],container:["container"],columns:[{columns:[ft,Ue,ze,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:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Es,"auto",ze,Ue]}],basis:[{basis:[Il,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,Il,"auto","initial","none",Ue]}],grow:[{grow:["",ft,ze,Ue]}],shrink:[{shrink:["",ft,ze,Ue]}],order:[{order:[Es,"first","last","none",ze,Ue]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":K()}],"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()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[u,"screen",...W()]}],"min-w":[{"min-w":[u,"screen","none",...W()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,bu,mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Hy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qy,Ue]}],"font-family":[{font:[g$,Ue,t]}],"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,ze,Ue]}],"line-clamp":[{"line-clamp":[ft,"none",ze,Hy]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ze,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",ze,mi]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ft,"auto",ze,Ue]}],"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",ze,Ue]}],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",ze,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Es,ze,Ue],radial:["",ze,Ue],conic:[Es,ze,Ue]},y$,m$]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,ze,Ue]}],"outline-w":[{outline:["",ft,bu,mi]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,ah,oh]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,ah,oh]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ft,mi]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,ah,oh]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ft,ze,Ue]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ze,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Ue]}],filter:[{filter:["","none",ze,Ue]}],blur:[{blur:ve()}],brightness:[{brightness:[ft,ze,Ue]}],contrast:[{contrast:[ft,ze,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,ah,oh]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ft,ze,Ue]}],"hue-rotate":[{"hue-rotate":[ft,ze,Ue]}],invert:[{invert:["",ft,ze,Ue]}],saturate:[{saturate:[ft,ze,Ue]}],sepia:[{sepia:["",ft,ze,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Ue]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[ft,ze,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[ft,ze,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,ze,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,ze,Ue]}],"backdrop-invert":[{"backdrop-invert":["",ft,ze,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[ft,ze,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[ft,ze,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,ze,Ue]}],"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",ze,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",ze,Ue]}],ease:[{ease:["linear","initial",E,ze,Ue]}],delay:[{delay:[ft,ze,Ue]}],animate:[{animate:["none",R,ze,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ze,Ue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[ze,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",ze,Ue]}],"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-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-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",ze,Ue]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ft,bu,mi,Hy]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},S$=t$(w$),E$=Object.freeze({status:"aborted"});function ye(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.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 l(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(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Xl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ZA extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const KA={};function Vs(e){return KA}function WA(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 s_(e,t){return typeof t=="bigint"?t.toString():t}function Im(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function gd(e){return e==null}function Tb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function R$(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,l=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return l%u/10**i}const Zx=Symbol("evaluating");function xt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Zx)return r===void 0&&(r=Zx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ui(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ks(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Kx(e){return JSON.stringify(e)}function x$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const YA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ed(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const T$=Im(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function sc(e){if(ed(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ed(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function QA(e){return sc(e)?{...e}:Array.isArray(e)?[...e]:e}const O$=new Set(["string","number","symbol"]);function ic(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ws(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Le(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 C$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const A$={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 I$(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=Ks(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return Ui(this,"shape",l),l},checks:[]});return Ws(e,i)}function N$(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=Ks(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return Ui(this,"shape",l),l},checks:[]});return Ws(e,i)}function k$(e,t){if(!sc(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 l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Ks(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ui(this,"shape",i),i}});return Ws(e,a)}function M$(e,t){if(!sc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ks(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ui(this,"shape",r),r}});return Ws(e,n)}function P$(e,t){const n=Ks(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ui(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Ws(e,n)}function D$(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 l=Ks(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 Ui(this,"shape",d),d},checks:[]});return Ws(t,l)}function L$(e,t,n){const r=Ks(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)i[l]=new e({type:"nonoptional",innerType:a[l]});return Ui(this,"shape",i),i}});return Ws(t,r)}function Kl(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 Ti(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function sh(e){return typeof e=="string"?e:e?.message}function Fs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=sh(e.inst?._zod.def?.error?.(e))??sh(t?.error?.(e))??sh(n.customError?.(e))??sh(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function XA(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ob(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function td(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const JA=(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,s_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Cb=ye("$ZodError",JA),Nm=ye("$ZodError",JA,{Parent:Error});function j$(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 $$(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(l=>r({issues:l}));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 l=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const km=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new Xl;if(l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Fs(d,i,Vs())));throw YA(u,a?.callee),u}return l.value},U$=km(Nm),Mm=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Fs(d,i,Vs())));throw YA(u,a?.callee),u}return l.value},z$=Mm(Nm),Pm=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 Xl;return i.issues.length?{success:!1,error:new(e??Cb)(i.issues.map(l=>Fs(l,a,Vs())))}:{success:!0,data:i.value}},eI=Pm(Nm),Dm=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(l=>Fs(l,a,Vs())))}:{success:!0,data:i.value}},V$=Dm(Nm),F$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return km(e)(t,n,a)},B$=e=>(t,n,r)=>km(e)(t,n,r),q$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mm(e)(t,n,a)},H$=e=>async(t,n,r)=>Mm(e)(t,n,r),G$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pm(e)(t,n,a)},Z$=e=>(t,n,r)=>Pm(e)(t,n,r),K$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dm(e)(t,n,a)},W$=e=>async(t,n,r)=>Dm(e)(t,n,r),Y$=/^[cC][^\s-]{8,}$/,Q$=/^[0-9a-z]+$/,X$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,J$=/^[0-9a-vA-V]{20}$/,e8=/^[A-Za-z0-9]{27}$/,t8=/^[a-zA-Z0-9_-]{21}$/,n8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,r8=/^([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})$/,Wx=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)$/,o8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function s8(){return new RegExp(a8,"u")}const i8=/^(?:(?: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])$/,l8=/^(([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}|:))$/,c8=/^((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])$/,u8=/^(([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])$/,d8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tI=/^[A-Za-z0-9_-]*$/,f8=/^\+[1-9]\d{6,14}$/,nI="(?:(?:\\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])))",h8=new RegExp(`^${nI}$`);function rI(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 p8(e){return new RegExp(`^${rI(e)}$`)}function m8(e){const t=rI({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(`^${nI}T(?:${r})$`)}const g8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},v8=/^-?\d+$/,oI=/^-?\d+(?:\.\d+)?$/,y8=/^(?:true|false)$/i,_8=/^null$/i,b8=/^[^A-Z]*$/,w8=/^[^a-z]*$/,ir=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aI={number:"number",bigint:"bigint",object:"date"},sI=ye("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const n=aI[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})}}),iI=ye("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const n=aI[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})}}),S8=ye("$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):R$(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})}}),E8=ye("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=A$[t.format];e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=v8)}),e._zod.check=l=>{const u=l.value;if(n){if(!Number.isInteger(u)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?l.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}):l.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&&l.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&l.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),R8=ye("$ZodCheckMaxSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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:XA(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),x8=ye("$ZodCheckMinSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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:XA(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),T8=ye("$ZodCheckMaxLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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 l=Ob(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),O8=ye("$ZodCheckMinLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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 l=Ob(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),C8=ye("$ZodCheckLengthEquals",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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 l=Ob(a),u=i>t.length;r.issues.push({origin:l,...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})}}),Lm=ye("$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=()=>{})}),A8=ye("$ZodCheckRegex",(e,t)=>{Lm.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})}}),I8=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=b8),Lm.init(e,t)}),N8=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=w8),Lm.init(e,t)}),k8=ye("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const n=ic(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})}}),M8=ye("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`^${ic(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})}}),P8=ye("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`.*${ic(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})}}),D8=ye("$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})}}),L8=ye("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class j8{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(`
9
+ `+h.stack}}var Fe=Object.prototype.hasOwnProperty,We=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,re=e.unstable_shouldYield,oe=e.unstable_requestPaint,we=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Je=e.unstable_NormalPriority,ot=e.unstable_LowPriority,Ct=e.unstable_IdlePriority,ur=e.log,tn=e.unstable_setDisableYieldValue,Rn=null,nn=null;function jn(o){if(typeof ur=="function"&&tn(o),nn&&typeof nn.setStrictMode=="function")try{nn.setStrictMode(Rn,o)}catch{}}var xn=Math.clz32?Math.clz32:Be,Qa=Math.log,ga=Math.LN2;function Be(o){return o>>>=0,o===0?32:31-(Qa(o)/ga|0)|0}var bt=256,Tt=262144,ct=4194304;function At(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 qe(o,s,c){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=At(h):(k&=j,k!==0?v=At(k):c||(c=j&~o,c!==0&&(v=At(c))))):(j=h&~_,j!==0?v=At(j):k!==0?v=At(k):c||(c=h&~o,c!==0&&(v=At(c)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,c=s&-s,_>=c||_===32&&(c&4194048)!==0)?s:v}function ut(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Wt(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 qt(){var o=ct;return ct<<=1,(ct&62914560)===0&&(ct=4194304),o}function dr(o){for(var s=[],c=0;31>c;c++)s.push(o);return s}function It(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function rn(o,s,c,h,v,_){var k=o.pendingLanes;o.pendingLanes=c,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=c,o.entangledLanes&=c,o.errorRecoveryDisabledLanes&=c,o.shellSuspendCounter=0;var j=o.entanglements,Q=o.expirationTimes,he=o.hiddenUpdates;for(c=k&~c;0<c;){var be=31-xn(c),Te=1<<be;j[be]=0,Q[be]=-1;var me=he[be];if(me!==null)for(he[be]=null,be=0;be<me.length;be++){var ge=me[be];ge!==null&&(ge.lane&=-536870913)}c&=~Te}h!==0&&ao(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(k&~s))}function ao(o,s,c){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-xn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|c&261930}function Yn(o,s){var c=o.entangledLanes|=s;for(o=o.entanglements;c;){var h=31-xn(c),v=1<<h;v&s|o[h]&s&&(o[h]|=s),c&=~v}}function xr(o,s){var c=s&-s;return c=(c&42)!==0?1:qi(c),(c&(o.suspendedLanes|s))!==0?0:c}function qi(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 Co(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ig(){var o=W.p;return o!==0?o:(o=window.event,o===void 0?32:jR(o.type))}function J1(o,s){var c=W.p;try{return W.p=o,s()}finally{W.p=c}}var Xa=Math.random().toString(36).slice(2),Qn="__reactFiber$"+Xa,Tr="__reactProps$"+Xa,Hi="__reactContainer$"+Xa,lg="__reactEvents$"+Xa,RP="__reactListeners$"+Xa,xP="__reactHandles$"+Xa,ew="__reactResources$"+Xa,Rc="__reactMarker$"+Xa;function cg(o){delete o[Qn],delete o[Tr],delete o[lg],delete o[RP],delete o[xP]}function Gi(o){var s=o[Qn];if(s)return s;for(var c=o.parentNode;c;){if(s=c[Hi]||c[Qn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(o=wR(o);o!==null;){if(c=o[Qn])return c;o=wR(o)}return s}o=c,c=o.parentNode}return null}function Zi(o){if(o=o[Qn]||o[Hi]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function xc(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Ki(o){var s=o[ew];return s||(s=o[ew]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qn(o){o[Rc]=!0}var tw=new Set,nw={};function Xs(o,s){Wi(o,s),Wi(o+"Capture",s)}function Wi(o,s){for(nw[o]=s,o=0;o<s.length;o++)tw.add(s[o])}var TP=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]*$"),rw={},ow={};function OP(o){return Fe.call(ow,o)?!0:Fe.call(rw,o)?!1:TP.test(o)?ow[o]=!0:(rw[o]=!0,!1)}function jd(o,s,c){if(OP(s))if(c===null)o.removeAttribute(s);else{switch(typeof c){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,""+c)}}function $d(o,s,c){if(c===null)o.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+c)}}function va(o,s,c,h){if(h===null)o.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(c);return}o.setAttributeNS(s,c,""+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 aw(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function CP(o,s,c){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){c=""+k,_.call(this,k)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function ug(o){if(!o._valueTracker){var s=aw(o)?"checked":"value";o._valueTracker=CP(o,s,""+o[s])}}function sw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return o&&(h=aw(o)?o.checked?"true":"false":o.value),o=h,o!==c?(s.setValue(o),!0):!1}function Ud(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 AP=/[\n"\\]/g;function io(o){return o.replace(AP,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function dg(o,s,c,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?fg(o,k,so(s)):c!=null?fg(o,k,so(c)):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 iw(o,s,c,h,v,_,k,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){ug(o);return}c=c!=null?""+so(c):"",s=s!=null?""+so(s):c,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),ug(o)}function fg(o,s,c){s==="number"&&Ud(o.ownerDocument)===o||o.defaultValue===""+c||(o.defaultValue=""+c)}function Yi(o,s,c,h){if(o=o.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<o.length;c++)v=s.hasOwnProperty("$"+o[c].value),o[c].selected!==v&&(o[c].selected=v),v&&h&&(o[c].defaultSelected=!0)}else{for(c=""+so(c),s=null,v=0;v<o.length;v++){if(o[v].value===c){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function lw(o,s,c){if(s!=null&&(s=""+so(s),s!==o.value&&(o.value=s),c==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=c!=null?""+so(c):""}function cw(o,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(le(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=so(s),o.defaultValue=c,h=o.textContent,h===c&&h!==""&&h!==null&&(o.value=h),ug(o)}function Qi(o,s){if(s){var c=o.firstChild;if(c&&c===o.lastChild&&c.nodeType===3){c.nodeValue=s;return}}o.textContent=s}var IP=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 uw(o,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,c):typeof c!="number"||c===0||IP.has(s)?s==="float"?o.cssFloat=c:o[s]=(""+c).trim():o[s]=c+"px"}function dw(o,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,c!=null){for(var h in c)!c.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)&&c[v]!==h&&uw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&uw(o,_,s[_])}function hg(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 NP=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"]]),kP=/^[\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 zd(o){return kP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ya(){}var pg=null;function mg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Xi=null,Ji=null;function fw(o){var s=Zi(o);if(s&&(o=s.stateNode)){var c=o[Tr]||null;e:switch(o=s.stateNode,s.type){case"input":if(dg(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=o;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+io(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==o&&h.form===o.form){var v=h[Tr]||null;if(!v)throw Error(r(90));dg(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===o.form&&sw(h)}break e;case"textarea":lw(o,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Yi(o,!!c.multiple,s,!1)}}}var gg=!1;function hw(o,s,c){if(gg)return o(s,c);gg=!0;try{var h=o(s);return h}finally{if(gg=!1,(Xi!==null||Ji!==null)&&(Cf(),Xi&&(s=Xi,o=Ji,Ji=Xi=null,fw(s),o)))for(s=0;s<o.length;s++)fw(o[s])}}function Tc(o,s){var c=o.stateNode;if(c===null)return null;var h=c[Tr]||null;if(h===null)return null;c=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(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vg=!1;if(_a)try{var Oc={};Object.defineProperty(Oc,"passive",{get:function(){vg=!0}}),window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{vg=!1}var Ja=null,yg=null,Vd=null;function pw(){if(Vd)return Vd;var o,s=yg,c=s.length,h,v="value"in Ja?Ja.value:Ja.textContent,_=v.length;for(o=0;o<c&&s[o]===v[o];o++);var k=c-o;for(h=1;h<=k&&s[c-h]===v[_-h];h++);return Vd=v.slice(o,1<h?1-h:void 0)}function Fd(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 Bd(){return!0}function mw(){return!1}function Or(o){function s(c,h,v,_,k){this._reactName=c,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=k,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(c=o[j],this[j]=c?c(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Bd:mw,this.isPropagationStopped=mw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Bd)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Bd)},persist:function(){},isPersistent:Bd}),s}var Js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=Or(Js),Cc=p({},Js,{view:0,detail:0}),MP=Or(Cc),_g,bg,Ac,Hd=p({},Cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sg,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!==Ac&&(Ac&&o.type==="mousemove"?(_g=o.screenX-Ac.screenX,bg=o.screenY-Ac.screenY):bg=_g=0,Ac=o),_g)},movementY:function(o){return"movementY"in o?o.movementY:bg}}),gw=Or(Hd),PP=p({},Hd,{dataTransfer:0}),DP=Or(PP),LP=p({},Cc,{relatedTarget:0}),wg=Or(LP),jP=p({},Js,{animationName:0,elapsedTime:0,pseudoElement:0}),$P=Or(jP),UP=p({},Js,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),zP=Or(UP),VP=p({},Js,{data:0}),vw=Or(VP),FP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BP={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"},qP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HP(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=qP[o])?!!s[o]:!1}function Sg(){return HP}var GP=p({},Cc,{key:function(o){if(o.key){var s=FP[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=Fd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?BP[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sg,charCode:function(o){return o.type==="keypress"?Fd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Fd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),ZP=Or(GP),KP=p({},Hd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yw=Or(KP),WP=p({},Cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sg}),YP=Or(WP),QP=p({},Js,{propertyName:0,elapsedTime:0,pseudoElement:0}),XP=Or(QP),JP=p({},Hd,{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}),e3=Or(JP),t3=p({},Js,{newState:0,oldState:0}),n3=Or(t3),r3=[9,13,27,32],Eg=_a&&"CompositionEvent"in window,Ic=null;_a&&"documentMode"in document&&(Ic=document.documentMode);var o3=_a&&"TextEvent"in window&&!Ic,_w=_a&&(!Eg||Ic&&8<Ic&&11>=Ic),bw=" ",ww=!1;function Sw(o,s){switch(o){case"keyup":return r3.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ew(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var el=!1;function a3(o,s){switch(o){case"compositionend":return Ew(s);case"keypress":return s.which!==32?null:(ww=!0,bw);case"textInput":return o=s.data,o===bw&&ww?null:o;default:return null}}function s3(o,s){if(el)return o==="compositionend"||!Eg&&Sw(o,s)?(o=pw(),Vd=yg=Ja=null,el=!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 _w&&s.locale!=="ko"?null:s.data;default:return null}}var i3={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 Rw(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!i3[o.type]:s==="textarea"}function xw(o,s,c,h){Xi?Ji?Ji.push(h):Ji=[h]:Xi=h,s=Df(s,"onChange"),0<s.length&&(c=new qd("onChange","change",null,c,h),o.push({event:c,listeners:s}))}var Nc=null,kc=null;function l3(o){iR(o,0)}function Gd(o){var s=xc(o);if(sw(s))return o}function Tw(o,s){if(o==="change")return s}var Ow=!1;if(_a){var Rg;if(_a){var xg="oninput"in document;if(!xg){var Cw=document.createElement("div");Cw.setAttribute("oninput","return;"),xg=typeof Cw.oninput=="function"}Rg=xg}else Rg=!1;Ow=Rg&&(!document.documentMode||9<document.documentMode)}function Aw(){Nc&&(Nc.detachEvent("onpropertychange",Iw),kc=Nc=null)}function Iw(o){if(o.propertyName==="value"&&Gd(kc)){var s=[];xw(s,kc,o,mg(o)),hw(l3,s)}}function c3(o,s,c){o==="focusin"?(Aw(),Nc=s,kc=c,Nc.attachEvent("onpropertychange",Iw)):o==="focusout"&&Aw()}function u3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Gd(kc)}function d3(o,s){if(o==="click")return Gd(s)}function f3(o,s){if(o==="input"||o==="change")return Gd(s)}function h3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var zr=typeof Object.is=="function"?Object.is:h3;function Mc(o,s){if(zr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var c=Object.keys(o),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var v=c[h];if(!Fe.call(s,v)||!zr(o[v],s[v]))return!1}return!0}function Nw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function kw(o,s){var c=Nw(o);o=0;for(var h;c;){if(c.nodeType===3){if(h=o+c.textContent.length,o<=s&&h>=s)return{node:c,offset:s-o};o=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Nw(c)}}function Mw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Mw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Pw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=Ud(o.document);s instanceof o.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)o=s.contentWindow;else break;s=Ud(o.document)}return s}function Tg(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 p3=_a&&"documentMode"in document&&11>=document.documentMode,tl=null,Og=null,Pc=null,Cg=!1;function Dw(o,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Cg||tl==null||tl!==Ud(h)||(h=tl,"selectionStart"in h&&Tg(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}),Pc&&Mc(Pc,h)||(Pc=h,h=Df(Og,"onSelect"),0<h.length&&(s=new qd("onSelect","select",null,s,c),o.push({event:s,listeners:h}),s.target=tl)))}function ei(o,s){var c={};return c[o.toLowerCase()]=s.toLowerCase(),c["Webkit"+o]="webkit"+s,c["Moz"+o]="moz"+s,c}var nl={animationend:ei("Animation","AnimationEnd"),animationiteration:ei("Animation","AnimationIteration"),animationstart:ei("Animation","AnimationStart"),transitionrun:ei("Transition","TransitionRun"),transitionstart:ei("Transition","TransitionStart"),transitioncancel:ei("Transition","TransitionCancel"),transitionend:ei("Transition","TransitionEnd")},Ag={},Lw={};_a&&(Lw=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function ti(o){if(Ag[o])return Ag[o];if(!nl[o])return o;var s=nl[o],c;for(c in s)if(s.hasOwnProperty(c)&&c in Lw)return Ag[o]=s[c];return o}var jw=ti("animationend"),$w=ti("animationiteration"),Uw=ti("animationstart"),m3=ti("transitionrun"),g3=ti("transitionstart"),v3=ti("transitioncancel"),zw=ti("transitionend"),Vw=new Map,Ig="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(" ");Ig.push("scrollEnd");function Ao(o,s){Vw.set(o,s),Xs(s,[o])}var Zd=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)},lo=[],rl=0,Ng=0;function Kd(){for(var o=rl,s=Ng=rl=0;s<o;){var c=lo[s];lo[s++]=null;var h=lo[s];lo[s++]=null;var v=lo[s];lo[s++]=null;var _=lo[s];if(lo[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&&Fw(c,v,_)}}function Wd(o,s,c,h){lo[rl++]=o,lo[rl++]=s,lo[rl++]=c,lo[rl++]=h,Ng|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function kg(o,s,c,h){return Wd(o,s,c,h),Yd(o)}function ni(o,s){return Wd(o,null,null,s),Yd(o)}function Fw(o,s,c){o.lanes|=c;var h=o.alternate;h!==null&&(h.lanes|=c);for(var v=!1,_=o.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.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(c),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=c|536870912),_):null}function Yd(o){if(50<nu)throw nu=0,Vv=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var ol={};function y3(o,s,c,h){this.tag=o,this.key=c,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,c,h){return new y3(o,s,c,h)}function Mg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ba(o,s){var c=o.alternate;return c===null?(c=Vr(o.tag,s,o.key,o.mode),c.elementType=o.elementType,c.type=o.type,c.stateNode=o.stateNode,c.alternate=o,o.alternate=c):(c.pendingProps=s,c.type=o.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=o.flags&65011712,c.childLanes=o.childLanes,c.lanes=o.lanes,c.child=o.child,c.memoizedProps=o.memoizedProps,c.memoizedState=o.memoizedState,c.updateQueue=o.updateQueue,s=o.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=o.sibling,c.index=o.index,c.ref=o.ref,c.refCleanup=o.refCleanup,c}function Bw(o,s){o.flags&=65011714;var c=o.alternate;return c===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=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,s=c.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Qd(o,s,c,h,v,_){var k=0;if(h=o,typeof o=="function")Mg(o)&&(k=1);else if(typeof o=="string")k=ED(o,c,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case $:return o=Vr(31,c,s,v),o.elementType=$,o.lanes=_,o;case S:return ri(c.children,v,_,s);case b:k=8,v|=24;break;case E:return o=Vr(12,c,s,v|2),o.elementType=E,o.lanes=_,o;case C:return o=Vr(13,c,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Vr(19,c,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,c=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Vr(k,c,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ri(o,s,c,h){return o=Vr(7,o,h,s),o.lanes=c,o}function Pg(o,s,c){return o=Vr(6,o,null,s),o.lanes=c,o}function qw(o){var s=Vr(18,null,null,0);return s.stateNode=o,s}function Dg(o,s,c){return s=Vr(4,o.children!==null?o.children:[],o.key,s),s.lanes=c,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Hw=new WeakMap;function co(o,s){if(typeof o=="object"&&o!==null){var c=Hw.get(o);return c!==void 0?c:(s={value:o,source:s,stack:Xe(s)},Hw.set(o,s),s)}return{value:o,source:s,stack:Xe(s)}}var al=[],sl=0,Xd=null,Dc=0,uo=[],fo=0,es=null,Wo=1,Yo="";function wa(o,s){al[sl++]=Dc,al[sl++]=Xd,Xd=o,Dc=s}function Gw(o,s,c){uo[fo++]=Wo,uo[fo++]=Yo,uo[fo++]=es,es=o;var h=Wo;o=Yo;var v=32-xn(h)-1;h&=~(1<<v),c+=1;var _=32-xn(s)+v;if(30<_){var k=v-v%5;_=(h&(1<<k)-1).toString(32),h>>=k,v-=k,Wo=1<<32-xn(s)+v|c<<v|h,Yo=_+o}else Wo=1<<_|c<<v|h,Yo=o}function Lg(o){o.return!==null&&(wa(o,1),Gw(o,1,0))}function jg(o){for(;o===Xd;)Xd=al[--sl],al[sl]=null,Dc=al[--sl],al[sl]=null;for(;o===es;)es=uo[--fo],uo[fo]=null,Yo=uo[--fo],uo[fo]=null,Wo=uo[--fo],uo[fo]=null}function Zw(o,s){uo[fo++]=Wo,uo[fo++]=Yo,uo[fo++]=es,Wo=s.id,Yo=s.overflow,es=o}var Xn=null,on=null,Rt=!1,ts=null,ho=!1,$g=Error(r(519));function ns(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lc(co(s,o)),$g}function Kw(o){var s=o.stateNode,c=o.type,h=o.memoizedProps;switch(s[Qn]=o,s[Tr]=h,c){case"dialog":vt("cancel",s),vt("close",s);break;case"iframe":case"object":case"embed":vt("load",s);break;case"video":case"audio":for(c=0;c<ou.length;c++)vt(ou[c],s);break;case"source":vt("error",s);break;case"img":case"image":case"link":vt("error",s),vt("load",s);break;case"details":vt("toggle",s);break;case"input":vt("invalid",s),iw(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":vt("invalid",s);break;case"textarea":vt("invalid",s),cw(s,h.value,h.defaultValue,h.children)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||dR(s.textContent,c)?(h.popover!=null&&(vt("beforetoggle",s),vt("toggle",s)),h.onScroll!=null&&vt("scroll",s),h.onScrollEnd!=null&&vt("scrollend",s),h.onClick!=null&&(s.onclick=ya),s=!0):s=!1,s||ns(o,!0)}function Ww(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 il(o){if(o!==Xn)return!1;if(!Rt)return Ww(o),Rt=!0,!1;var s=o.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=o.type,c=!(c!=="form"&&c!=="button")||ny(o.type,o.memoizedProps)),c=!c),c&&on&&ns(o),Ww(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));on=bR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));on=bR(o)}else s===27?(s=on,gs(o.type)?(o=iy,iy=null,on=o):on=s):on=Xn?mo(o.stateNode.nextSibling):null;return!0}function oi(){on=Xn=null,Rt=!1}function Ug(){var o=ts;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),ts=null),o}function Lc(o){ts===null?ts=[o]:ts.push(o)}var zg=M(null),ai=null,Sa=null;function rs(o,s,c){F(zg,s._currentValue),s._currentValue=c}function Ea(o){o._currentValue=zg.current,q(zg)}function Vg(o,s,c){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===c)break;o=o.return}}function Fg(o,s,c,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 Q=0;Q<s.length;Q++)if(j.context===s[Q]){_.lanes|=c,j=_.alternate,j!==null&&(j.lanes|=c),Vg(_.return,c,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|=c,_=k.alternate,_!==null&&(_.lanes|=c),Vg(k,c,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 ll(o,s,c,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===de.current){if(k=v.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(cu):o=[cu])}v=v.return}o!==null&&Fg(s,o,c,h),s.flags|=262144}function Jd(o){for(o=o.firstContext;o!==null;){if(!zr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function si(o){ai=o,Sa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Jn(o){return Yw(ai,o)}function ef(o,s){return ai===null&&si(o),Yw(o,s)}function Yw(o,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},Sa===null){if(o===null)throw Error(r(308));Sa=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else Sa=Sa.next=s;return c}var _3=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(c,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(c){return c()})}},b3=e.unstable_scheduleCallback,w3=e.unstable_NormalPriority,Tn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bg(){return{controller:new _3,data:new Map,refCount:0}}function jc(o){o.refCount--,o.refCount===0&&b3(w3,function(){o.controller.abort()})}var $c=null,qg=0,cl=0,ul=null;function S3(o,s){if($c===null){var c=$c=[];qg=0,cl=Zv(),ul={status:"pending",value:void 0,then:function(h){c.push(h)}}}return qg++,s.then(Qw,Qw),s}function Qw(){if(--qg===0&&$c!==null){ul!==null&&(ul.status="fulfilled");var o=$c;$c=null,cl=0,ul=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function E3(o,s){var c=[],h={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),h}var Xw=B.S;B.S=function(o,s){DE=we(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&S3(o,s),Xw!==null&&Xw(o,s)};var ii=M(null);function Hg(){var o=ii.current;return o!==null?o:Yt.pooledCache}function tf(o,s){s===null?F(ii,ii.current):F(ii,s.pool)}function Jw(){var o=Hg();return o===null?null:{parent:Tn._currentValue,pool:o}}var dl=Error(r(460)),Gg=Error(r(474)),nf=Error(r(542)),rf={then:function(){}};function eS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function tS(o,s,c){switch(c=o[c],c===void 0?o.push(s):c!==s&&(s.then(ya,ya),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,rS(o),o;default:if(typeof s.status=="string")s.then(ya,ya);else{if(o=Yt,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,rS(o),o}throw ci=s,dl}}function li(o){try{var s=o._init;return s(o._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(ci=c,dl):c}}var ci=null;function nS(){if(ci===null)throw Error(r(459));var o=ci;return ci=null,o}function rS(o){if(o===dl||o===nf)throw Error(r(483))}var fl=null,Uc=0;function of(o){var s=Uc;return Uc+=1,fl===null&&(fl=[]),tS(fl,o,s)}function zc(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function af(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 oS(o){function s(ie,te){if(o){var fe=ie.deletions;fe===null?(ie.deletions=[te],ie.flags|=16):fe.push(te)}}function c(ie,te){if(!o)return null;for(;te!==null;)s(ie,te),te=te.sibling;return null}function h(ie){for(var te=new Map;ie!==null;)ie.key!==null?te.set(ie.key,ie):te.set(ie.index,ie),ie=ie.sibling;return te}function v(ie,te){return ie=ba(ie,te),ie.index=0,ie.sibling=null,ie}function _(ie,te,fe){return ie.index=fe,o?(fe=ie.alternate,fe!==null?(fe=fe.index,fe<te?(ie.flags|=67108866,te):fe):(ie.flags|=67108866,te)):(ie.flags|=1048576,te)}function k(ie){return o&&ie.alternate===null&&(ie.flags|=67108866),ie}function j(ie,te,fe,Se){return te===null||te.tag!==6?(te=Pg(fe,ie.mode,Se),te.return=ie,te):(te=v(te,fe),te.return=ie,te)}function Q(ie,te,fe,Se){var Ke=fe.type;return Ke===S?be(ie,te,fe.props.children,Se,fe.key):te!==null&&(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&li(Ke)===te.type)?(te=v(te,fe.props),zc(te,fe),te.return=ie,te):(te=Qd(fe.type,fe.key,fe.props,null,ie.mode,Se),zc(te,fe),te.return=ie,te)}function he(ie,te,fe,Se){return te===null||te.tag!==4||te.stateNode.containerInfo!==fe.containerInfo||te.stateNode.implementation!==fe.implementation?(te=Dg(fe,ie.mode,Se),te.return=ie,te):(te=v(te,fe.children||[]),te.return=ie,te)}function be(ie,te,fe,Se,Ke){return te===null||te.tag!==7?(te=ri(fe,ie.mode,Se,Ke),te.return=ie,te):(te=v(te,fe),te.return=ie,te)}function Te(ie,te,fe){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Pg(""+te,ie.mode,fe),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return fe=Qd(te.type,te.key,te.props,null,ie.mode,fe),zc(fe,te),fe.return=ie,fe;case w:return te=Dg(te,ie.mode,fe),te.return=ie,te;case P:return te=li(te),Te(ie,te,fe)}if(le(te)||G(te))return te=ri(te,ie.mode,fe,null),te.return=ie,te;if(typeof te.then=="function")return Te(ie,of(te),fe);if(te.$$typeof===T)return Te(ie,ef(ie,te),fe);af(ie,te)}return null}function me(ie,te,fe,Se){var Ke=te!==null?te.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Ke!==null?null:j(ie,te,""+fe,Se);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Ke?Q(ie,te,fe,Se):null;case w:return fe.key===Ke?he(ie,te,fe,Se):null;case P:return fe=li(fe),me(ie,te,fe,Se)}if(le(fe)||G(fe))return Ke!==null?null:be(ie,te,fe,Se,null);if(typeof fe.then=="function")return me(ie,te,of(fe),Se);if(fe.$$typeof===T)return me(ie,te,ef(ie,fe),Se);af(ie,fe)}return null}function ge(ie,te,fe,Se,Ke){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ie=ie.get(fe)||null,j(te,ie,""+Se,Ke);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case y:return ie=ie.get(Se.key===null?fe:Se.key)||null,Q(te,ie,Se,Ke);case w:return ie=ie.get(Se.key===null?fe:Se.key)||null,he(te,ie,Se,Ke);case P:return Se=li(Se),ge(ie,te,fe,Se,Ke)}if(le(Se)||G(Se))return ie=ie.get(fe)||null,be(te,ie,Se,Ke,null);if(typeof Se.then=="function")return ge(ie,te,fe,of(Se),Ke);if(Se.$$typeof===T)return ge(ie,te,fe,ef(te,Se),Ke);af(te,Se)}return null}function $e(ie,te,fe,Se){for(var Ke=null,Nt=null,He=te,it=te=0,St=null;He!==null&&it<fe.length;it++){He.index>it?(St=He,He=null):St=He.sibling;var kt=me(ie,He,fe[it],Se);if(kt===null){He===null&&(He=St);break}o&&He&&kt.alternate===null&&s(ie,He),te=_(kt,te,it),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt,He=St}if(it===fe.length)return c(ie,He),Rt&&wa(ie,it),Ke;if(He===null){for(;it<fe.length;it++)He=Te(ie,fe[it],Se),He!==null&&(te=_(He,te,it),Nt===null?Ke=He:Nt.sibling=He,Nt=He);return Rt&&wa(ie,it),Ke}for(He=h(He);it<fe.length;it++)St=ge(He,ie,it,fe[it],Se),St!==null&&(o&&St.alternate!==null&&He.delete(St.key===null?it:St.key),te=_(St,te,it),Nt===null?Ke=St:Nt.sibling=St,Nt=St);return o&&He.forEach(function(ws){return s(ie,ws)}),Rt&&wa(ie,it),Ke}function Ye(ie,te,fe,Se){if(fe==null)throw Error(r(151));for(var Ke=null,Nt=null,He=te,it=te=0,St=null,kt=fe.next();He!==null&&!kt.done;it++,kt=fe.next()){He.index>it?(St=He,He=null):St=He.sibling;var ws=me(ie,He,kt.value,Se);if(ws===null){He===null&&(He=St);break}o&&He&&ws.alternate===null&&s(ie,He),te=_(ws,te,it),Nt===null?Ke=ws:Nt.sibling=ws,Nt=ws,He=St}if(kt.done)return c(ie,He),Rt&&wa(ie,it),Ke;if(He===null){for(;!kt.done;it++,kt=fe.next())kt=Te(ie,kt.value,Se),kt!==null&&(te=_(kt,te,it),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt);return Rt&&wa(ie,it),Ke}for(He=h(He);!kt.done;it++,kt=fe.next())kt=ge(He,ie,it,kt.value,Se),kt!==null&&(o&&kt.alternate!==null&&He.delete(kt.key===null?it:kt.key),te=_(kt,te,it),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt);return o&&He.forEach(function(PD){return s(ie,PD)}),Rt&&wa(ie,it),Ke}function Zt(ie,te,fe,Se){if(typeof fe=="object"&&fe!==null&&fe.type===S&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Ke=fe.key;te!==null;){if(te.key===Ke){if(Ke=fe.type,Ke===S){if(te.tag===7){c(ie,te.sibling),Se=v(te,fe.props.children),Se.return=ie,ie=Se;break e}}else if(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&li(Ke)===te.type){c(ie,te.sibling),Se=v(te,fe.props),zc(Se,fe),Se.return=ie,ie=Se;break e}c(ie,te);break}else s(ie,te);te=te.sibling}fe.type===S?(Se=ri(fe.props.children,ie.mode,Se,fe.key),Se.return=ie,ie=Se):(Se=Qd(fe.type,fe.key,fe.props,null,ie.mode,Se),zc(Se,fe),Se.return=ie,ie=Se)}return k(ie);case w:e:{for(Ke=fe.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){c(ie,te.sibling),Se=v(te,fe.children||[]),Se.return=ie,ie=Se;break e}else{c(ie,te);break}else s(ie,te);te=te.sibling}Se=Dg(fe,ie.mode,Se),Se.return=ie,ie=Se}return k(ie);case P:return fe=li(fe),Zt(ie,te,fe,Se)}if(le(fe))return $e(ie,te,fe,Se);if(G(fe)){if(Ke=G(fe),typeof Ke!="function")throw Error(r(150));return fe=Ke.call(fe),Ye(ie,te,fe,Se)}if(typeof fe.then=="function")return Zt(ie,te,of(fe),Se);if(fe.$$typeof===T)return Zt(ie,te,ef(ie,fe),Se);af(ie,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(c(ie,te.sibling),Se=v(te,fe),Se.return=ie,ie=Se):(c(ie,te),Se=Pg(fe,ie.mode,Se),Se.return=ie,ie=Se),k(ie)):c(ie,te)}return function(ie,te,fe,Se){try{Uc=0;var Ke=Zt(ie,te,fe,Se);return fl=null,Ke}catch(He){if(He===dl||He===nf)throw He;var Nt=Vr(29,He,null,ie.mode);return Nt.lanes=Se,Nt.return=ie,Nt}}}var ui=oS(!0),aS=oS(!1),os=!1;function Zg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kg(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,c){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(Dt&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Yd(o),Fw(o,null,c),s}return Wd(o,h,s,c),Yd(o)}function Vc(o,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Yn(o,c)}}function Wg(o,s){var c=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var v=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var k={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?v=_=k:_=_.next=k,c=c.next}while(c!==null);_===null?v=_=s:_=_.next=s}else v=_=s;c={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=c;return}o=c.lastBaseUpdate,o===null?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=s}var Yg=!1;function Fc(){if(Yg){var o=ul;if(o!==null)throw o}}function Bc(o,s,c,h){Yg=!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 Q=j,he=Q.next;Q.next=null,k===null?_=he:k.next=he,k=Q;var be=o.alternate;be!==null&&(be=be.updateQueue,j=be.lastBaseUpdate,j!==k&&(j===null?be.firstBaseUpdate=he:j.next=he,be.lastBaseUpdate=Q))}if(_!==null){var Te=v.baseState;k=0,be=he=Q=null,j=_;do{var me=j.lane&-536870913,ge=me!==j.lane;if(ge?(wt&me)===me:(h&me)===me){me!==0&&me===cl&&(Yg=!0),be!==null&&(be=be.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var $e=o,Ye=j;me=s;var Zt=c;switch(Ye.tag){case 1:if($e=Ye.payload,typeof $e=="function"){Te=$e.call(Zt,Te,me);break e}Te=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=Ye.payload,me=typeof $e=="function"?$e.call(Zt,Te,me):$e,me==null)break e;Te=p({},Te,me);break e;case 2:os=!0}}me=j.callback,me!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[me]:ge.push(me))}else ge={lane:me,tag:j.tag,payload:j.payload,callback:j.callback,next:null},be===null?(he=be=ge,Q=Te):be=be.next=ge,k|=me;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);be===null&&(Q=Te),v.baseState=Q,v.firstBaseUpdate=he,v.lastBaseUpdate=be,_===null&&(v.shared.lanes=0),ds|=k,o.lanes=k,o.memoizedState=Te}}function sS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function iS(o,s){var c=o.callbacks;if(c!==null)for(o.callbacks=null,o=0;o<c.length;o++)sS(c[o],s)}var hl=M(null),sf=M(0);function lS(o,s){o=ka,F(sf,o),F(hl,s),ka=o|s.baseLanes}function Qg(){F(sf,ka),F(hl,hl.current)}function Xg(){ka=sf.current,q(hl),q(sf)}var Fr=M(null),po=null;function is(o){var s=o.alternate;F(yn,yn.current&1),F(Fr,o),po===null&&(s===null||hl.current!==null||s.memoizedState!==null)&&(po=o)}function Jg(o){F(yn,yn.current),F(Fr,o),po===null&&(po=o)}function cS(o){o.tag===22?(F(yn,yn.current),F(Fr,o),po===null&&(po=o)):ls()}function ls(){F(yn,yn.current),F(Fr,Fr.current)}function Br(o){q(Fr),po===o&&(po=null),q(yn)}var yn=M(0);function lf(o){for(var s=o;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||ay(c)||sy(c)))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 Ra=0,st=null,Ht=null,On=null,cf=!1,pl=!1,di=!1,uf=0,qc=0,ml=null,R3=0;function mn(){throw Error(r(321))}function ev(o,s){if(s===null)return!1;for(var c=0;c<s.length&&c<o.length;c++)if(!zr(o[c],s[c]))return!1;return!0}function tv(o,s,c,h,v,_){return Ra=_,st=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=o===null||o.memoizedState===null?GS:gv,di=!1,_=c(h,v),di=!1,pl&&(_=dS(s,c,h,v)),uS(o),_}function uS(o){B.H=Zc;var s=Ht!==null&&Ht.next!==null;if(Ra=0,On=Ht=st=null,cf=!1,qc=0,ml=null,s)throw Error(r(300));o===null||Cn||(o=o.dependencies,o!==null&&Jd(o)&&(Cn=!0))}function dS(o,s,c,h){st=o;var v=0;do{if(pl&&(ml=null),qc=0,pl=!1,25<=v)throw Error(r(301));if(v+=1,On=Ht=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}B.H=ZS,_=s(c,h)}while(pl);return _}function x3(){var o=B.H,s=o.useState()[0];return s=typeof s.then=="function"?Hc(s):s,o=o.useState()[0],(Ht!==null?Ht.memoizedState:null)!==o&&(st.flags|=1024),s}function nv(){var o=uf!==0;return uf=0,o}function rv(o,s,c){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~c}function ov(o){if(cf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}cf=!1}Ra=0,On=Ht=st=null,pl=!1,qc=uf=0,ml=null}function yr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?st.memoizedState=On=o:On=On.next=o,On}function _n(){if(Ht===null){var o=st.alternate;o=o!==null?o.memoizedState:null}else o=Ht.next;var s=On===null?st.memoizedState:On.next;if(s!==null)On=s,Ht=o;else{if(o===null)throw st.alternate===null?Error(r(467)):Error(r(310));Ht=o,o={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},On===null?st.memoizedState=On=o:On=On.next=o}return On}function df(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hc(o){var s=qc;return qc+=1,ml===null&&(ml=[]),o=tS(ml,o,s),s=st,(On===null?s.memoizedState:On.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?GS:gv),o}function ff(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Hc(o);if(o.$$typeof===T)return Jn(o)}throw Error(r(438,String(o)))}function av(o){var s=null,c=st.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=st.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}),c===null&&(c=df(),st.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(o),h=0;h<o;h++)c[h]=K;return s.index++,c}function xa(o,s){return typeof s=="function"?s(o):s}function hf(o){var s=_n();return sv(s,Ht,o)}function sv(o,s,c){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;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,Q=null,he=s,be=!1;do{var Te=he.lane&-536870913;if(Te!==he.lane?(wt&Te)===Te:(Ra&Te)===Te){var me=he.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),Te===cl&&(be=!0);else if((Ra&me)===me){he=he.next,me===cl&&(be=!0);continue}else Te={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(j=Q=Te,k=_):Q=Q.next=Te,st.lanes|=me,ds|=me;Te=he.action,di&&c(_,Te),_=he.hasEagerState?he.eagerState:c(_,Te)}else me={lane:Te,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(j=Q=me,k=_):Q=Q.next=me,st.lanes|=Te,ds|=Te;he=he.next}while(he!==null&&he!==s);if(Q===null?k=_:Q.next=j,!zr(_,o.memoizedState)&&(Cn=!0,be&&(c=ul,c!==null)))throw c;o.memoizedState=_,o.baseState=k,o.baseQueue=Q,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function iv(o){var s=_n(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=o;var h=c.dispatch,v=c.pending,_=s.memoizedState;if(v!==null){c.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=_),c.lastRenderedState=_}return[_,h]}function fS(o,s,c){var h=st,v=_n(),_=Rt;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var k=!zr((Ht||v).memoizedState,c);if(k&&(v.memoizedState=c,Cn=!0),v=v.queue,uv(mS.bind(null,h,v,o),[o]),v.getSnapshot!==s||k||On!==null&&On.memoizedState.tag&1){if(h.flags|=2048,gl(9,{destroy:void 0},pS.bind(null,h,v,c,s),null),Yt===null)throw Error(r(349));_||(Ra&127)!==0||hS(h,s,c)}return c}function hS(o,s,c){o.flags|=16384,o={getSnapshot:s,value:c},s=st.updateQueue,s===null?(s=df(),st.updateQueue=s,s.stores=[o]):(c=s.stores,c===null?s.stores=[o]:c.push(o))}function pS(o,s,c,h){s.value=c,s.getSnapshot=h,gS(s)&&vS(o)}function mS(o,s,c){return c(function(){gS(s)&&vS(o)})}function gS(o){var s=o.getSnapshot;o=o.value;try{var c=s();return!zr(o,c)}catch{return!0}}function vS(o){var s=ni(o,2);s!==null&&kr(s,o,2)}function lv(o){var s=yr();if(typeof o=="function"){var c=o;if(o=c(),di){jn(!0);try{c()}finally{jn(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:o},s}function yS(o,s,c,h){return o.baseState=c,sv(o,Ht,typeof h=="function"?h:xa)}function T3(o,s,c,h,v){if(gf(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)}};B.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,_S(s,_)):(_.next=c.next,s.pending=c.next=_)}}function _S(o,s){var c=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=B.T,k={};B.T=k;try{var j=c(v,h),Q=B.S;Q!==null&&Q(k,j),bS(o,s,j)}catch(he){cv(o,s,he)}finally{_!==null&&k.types!==null&&(_.types=k.types),B.T=_}}else try{_=c(v,h),bS(o,s,_)}catch(he){cv(o,s,he)}}function bS(o,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){wS(o,s,h)},function(h){return cv(o,s,h)}):wS(o,s,c)}function wS(o,s,c){s.status="fulfilled",s.value=c,SS(s),o.state=c,s=o.pending,s!==null&&(c=s.next,c===s?o.pending=null:(c=c.next,s.next=c,_S(o,c)))}function cv(o,s,c){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,SS(s),s=s.next;while(s!==h)}o.action=null}function SS(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function ES(o,s){return s}function RS(o,s){if(Rt){var c=Yt.formState;if(c!==null){e:{var h=st;if(Rt){if(on){t:{for(var v=on,_=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){on=mo(v.nextSibling),h=v.data==="F!";break e}}ns(h)}h=!1}h&&(s=c[0])}}return c=yr(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ES,lastRenderedState:s},c.queue=h,c=BS.bind(null,st,h),h.dispatch=c,h=lv(!1),_=mv.bind(null,st,!1,h.queue),h=yr(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,c=T3.bind(null,st,v,_,c),v.dispatch=c,h.memoizedState=o,[s,c,!1]}function xS(o){var s=_n();return TS(s,Ht,o)}function TS(o,s,c){if(s=sv(o,s,ES)[0],o=hf(xa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Hc(s)}catch(k){throw k===dl?nf:k}else h=s;s=_n();var v=s.queue,_=v.dispatch;return c!==s.memoizedState&&(st.flags|=2048,gl(9,{destroy:void 0},O3.bind(null,v,c),null)),[h,_,o]}function O3(o,s){o.action=s}function OS(o){var s=_n(),c=Ht;if(c!==null)return TS(s,c,o);_n(),s=s.memoizedState,c=_n();var h=c.queue.dispatch;return c.memoizedState=o,[s,h,!1]}function gl(o,s,c,h){return o={tag:o,create:c,deps:h,inst:s,next:null},s=st.updateQueue,s===null&&(s=df(),st.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=o.next=o:(h=c.next,c.next=o,o.next=h,s.lastEffect=o),o}function CS(){return _n().memoizedState}function pf(o,s,c,h){var v=yr();st.flags|=o,v.memoizedState=gl(1|s,{destroy:void 0},c,h===void 0?null:h)}function mf(o,s,c,h){var v=_n();h=h===void 0?null:h;var _=v.memoizedState.inst;Ht!==null&&h!==null&&ev(h,Ht.memoizedState.deps)?v.memoizedState=gl(s,_,c,h):(st.flags|=o,v.memoizedState=gl(1|s,_,c,h))}function AS(o,s){pf(8390656,8,o,s)}function uv(o,s){mf(2048,8,o,s)}function C3(o){st.flags|=4;var s=st.updateQueue;if(s===null)s=df(),st.updateQueue=s,s.events=[o];else{var c=s.events;c===null?s.events=[o]:c.push(o)}}function IS(o){var s=_n().memoizedState;return C3({ref:s,nextImpl:o}),function(){if((Dt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function NS(o,s){return mf(4,2,o,s)}function kS(o,s){return mf(4,4,o,s)}function MS(o,s){if(typeof s=="function"){o=o();var c=s(o);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function PS(o,s,c){c=c!=null?c.concat([o]):null,mf(4,4,MS.bind(null,s,o),c)}function dv(){}function DS(o,s){var c=_n();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&ev(s,h[1])?h[0]:(c.memoizedState=[o,s],o)}function LS(o,s){var c=_n();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&ev(s,h[1]))return h[0];if(h=o(),di){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h}function fv(o,s,c){return c===void 0||(Ra&1073741824)!==0&&(wt&261930)===0?o.memoizedState=s:(o.memoizedState=c,o=jE(),st.lanes|=o,ds|=o,c)}function jS(o,s,c,h){return zr(c,s)?c:hl.current!==null?(o=fv(o,c,h),zr(o,s)||(Cn=!0),o):(Ra&42)===0||(Ra&1073741824)!==0&&(wt&261930)===0?(Cn=!0,o.memoizedState=c):(o=jE(),st.lanes|=o,ds|=o,s)}function $S(o,s,c,h,v){var _=W.p;W.p=_!==0&&8>_?_:8;var k=B.T,j={};B.T=j,mv(o,!1,s,c);try{var Q=v(),he=B.S;if(he!==null&&he(j,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=E3(Q,h);Gc(o,s,be,Gr(o))}else Gc(o,s,h,Gr(o))}catch(Te){Gc(o,s,{then:function(){},status:"rejected",reason:Te},Gr())}finally{W.p=_,k!==null&&j.types!==null&&(k.types=j.types),B.T=k}}function A3(){}function hv(o,s,c,h){if(o.tag!==5)throw Error(r(476));var v=US(o).queue;$S(o,v,s,Y,c===null?A3:function(){return zS(o),c(h)})}function US(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:Y},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:c},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function zS(o){var s=US(o);s.next===null&&(s=o.alternate.memoizedState),Gc(o,s.next.queue,{},Gr())}function pv(){return Jn(cu)}function VS(){return _n().memoizedState}function FS(){return _n().memoizedState}function I3(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var c=Gr();o=as(c);var h=ss(s,o,c);h!==null&&(kr(h,s,c),Vc(h,s,c)),s={cache:Bg()},o.payload=s;return}s=s.return}}function N3(o,s,c){var h=Gr();c={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},gf(o)?qS(s,c):(c=kg(o,s,c,h),c!==null&&(kr(c,o,h),HS(c,s,h)))}function BS(o,s,c){var h=Gr();Gc(o,s,c,h)}function Gc(o,s,c,h){var v={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(gf(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,c);if(v.hasEagerState=!0,v.eagerState=j,zr(j,k))return Wd(o,s,v,0),Yt===null&&Kd(),!1}catch{}if(c=kg(o,s,v,h),c!==null)return kr(c,o,h),HS(c,s,h),!0}return!1}function mv(o,s,c,h){if(h={lane:2,revertLane:Zv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},gf(o)){if(s)throw Error(r(479))}else s=kg(o,c,h,2),s!==null&&kr(s,o,2)}function gf(o){var s=o.alternate;return o===st||s!==null&&s===st}function qS(o,s){pl=cf=!0;var c=o.pending;c===null?s.next=s:(s.next=c.next,c.next=s),o.pending=s}function HS(o,s,c){if((c&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Yn(o,c)}}var Zc={readContext:Jn,use:ff,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};Zc.useEffectEvent=mn;var GS={readContext:Jn,use:ff,useCallback:function(o,s){return yr().memoizedState=[o,s===void 0?null:s],o},useContext:Jn,useEffect:AS,useImperativeHandle:function(o,s,c){c=c!=null?c.concat([o]):null,pf(4194308,4,MS.bind(null,s,o),c)},useLayoutEffect:function(o,s){return pf(4194308,4,o,s)},useInsertionEffect:function(o,s){pf(4,2,o,s)},useMemo:function(o,s){var c=yr();s=s===void 0?null:s;var h=o();if(di){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h},useReducer:function(o,s,c){var h=yr();if(c!==void 0){var v=c(s);if(di){jn(!0);try{c(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=N3.bind(null,st,o),[h.memoizedState,o]},useRef:function(o){var s=yr();return o={current:o},s.memoizedState=o},useState:function(o){o=lv(o);var s=o.queue,c=BS.bind(null,st,s);return s.dispatch=c,[o.memoizedState,c]},useDebugValue:dv,useDeferredValue:function(o,s){var c=yr();return fv(c,o,s)},useTransition:function(){var o=lv(!1);return o=$S.bind(null,st,o.queue,!0,!1),yr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,c){var h=st,v=yr();if(Rt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Yt===null)throw Error(r(349));(wt&127)!==0||hS(h,s,c)}v.memoizedState=c;var _={value:c,getSnapshot:s};return v.queue=_,AS(mS.bind(null,h,_,o),[o]),h.flags|=2048,gl(9,{destroy:void 0},pS.bind(null,h,_,c,s),null),c},useId:function(){var o=yr(),s=Yt.identifierPrefix;if(Rt){var c=Yo,h=Wo;c=(h&~(1<<32-xn(h)-1)).toString(32)+c,s="_"+s+"R_"+c,c=uf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=R3++,s="_"+s+"r_"+c.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:pv,useFormState:RS,useActionState:RS,useOptimistic:function(o){var s=yr();s.memoizedState=s.baseState=o;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=mv.bind(null,st,!0,c),c.dispatch=s,[o,s]},useMemoCache:av,useCacheRefresh:function(){return yr().memoizedState=I3.bind(null,st)},useEffectEvent:function(o){var s=yr(),c={impl:o};return s.memoizedState=c,function(){if((Dt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},gv={readContext:Jn,use:ff,useCallback:DS,useContext:Jn,useEffect:uv,useImperativeHandle:PS,useInsertionEffect:NS,useLayoutEffect:kS,useMemo:LS,useReducer:hf,useRef:CS,useState:function(){return hf(xa)},useDebugValue:dv,useDeferredValue:function(o,s){var c=_n();return jS(c,Ht.memoizedState,o,s)},useTransition:function(){var o=hf(xa)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Hc(o),s]},useSyncExternalStore:fS,useId:VS,useHostTransitionStatus:pv,useFormState:xS,useActionState:xS,useOptimistic:function(o,s){var c=_n();return yS(c,Ht,o,s)},useMemoCache:av,useCacheRefresh:FS};gv.useEffectEvent=IS;var ZS={readContext:Jn,use:ff,useCallback:DS,useContext:Jn,useEffect:uv,useImperativeHandle:PS,useInsertionEffect:NS,useLayoutEffect:kS,useMemo:LS,useReducer:iv,useRef:CS,useState:function(){return iv(xa)},useDebugValue:dv,useDeferredValue:function(o,s){var c=_n();return Ht===null?fv(c,o,s):jS(c,Ht.memoizedState,o,s)},useTransition:function(){var o=iv(xa)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Hc(o),s]},useSyncExternalStore:fS,useId:VS,useHostTransitionStatus:pv,useFormState:OS,useActionState:OS,useOptimistic:function(o,s){var c=_n();return Ht!==null?yS(c,Ht,o,s):(c.baseState=o,[o,c.queue.dispatch])},useMemoCache:av,useCacheRefresh:FS};ZS.useEffectEvent=IS;function vv(o,s,c,h){s=o.memoizedState,c=c(h,s),c=c==null?s:p({},s,c),o.memoizedState=c,o.lanes===0&&(o.updateQueue.baseState=c)}var yv={enqueueSetState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=as(h);v.payload=s,c!=null&&(v.callback=c),s=ss(o,v,h),s!==null&&(kr(s,o,h),Vc(s,o,h))},enqueueReplaceState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=as(h);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=ss(o,v,h),s!==null&&(kr(s,o,h),Vc(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var c=Gr(),h=as(c);h.tag=2,s!=null&&(h.callback=s),s=ss(o,h,c),s!==null&&(kr(s,o,c),Vc(s,o,c))}};function KS(o,s,c,h,v,_,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,k):s.prototype&&s.prototype.isPureReactComponent?!Mc(c,h)||!Mc(v,_):!0}function WS(o,s,c,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==o&&yv.enqueueReplaceState(s,s.state,null)}function fi(o,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(o=o.defaultProps){c===s&&(c=p({},c));for(var v in o)c[v]===void 0&&(c[v]=o[v])}return c}function YS(o){Zd(o)}function QS(o){console.error(o)}function XS(o){Zd(o)}function vf(o,s){try{var c=o.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function JS(o,s,c){try{var h=o.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function _v(o,s,c){return c=as(c),c.tag=3,c.payload={element:null},c.callback=function(){vf(o,s)},c}function eE(o){return o=as(o),o.tag=3,o}function tE(o,s,c,h){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){JS(s,c,h)}}var k=c.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(o.callback=function(){JS(s,c,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 k3(o,s,c,h,v){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&ll(s,c,v,!0),c=Fr.current,c!==null){switch(c.tag){case 31:case 13:return po===null?Af():c.alternate===null&&gn===0&&(gn=3),c.flags&=-257,c.flags|=65536,c.lanes=v,h===rf?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),qv(o,h,v)),!1;case 22:return c.flags|=65536,h===rf?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),qv(o,h,v)),!1}throw Error(r(435,c.tag))}return qv(o,h,v),Af(),!1}if(Rt)return s=Fr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==$g&&(o=Error(r(422),{cause:h}),Lc(co(o,c)))):(h!==$g&&(s=Error(r(423),{cause:h}),Lc(co(s,c))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=co(h,c),v=_v(o.stateNode,h,v),Wg(o,v),gn!==4&&(gn=2)),!1;var _=Error(r(520),{cause:h});if(_=co(_,c),tu===null?tu=[_]:tu.push(_),gn!==4&&(gn=2),s===null)return!0;h=co(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,o=v&-v,c.lanes|=o,o=_v(c.stateNode,h,o),Wg(c,o),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(fs===null||!fs.has(_))))return c.flags|=65536,v&=-v,c.lanes|=v,v=eE(v),tE(v,o,c,h),Wg(c,v),!1}c=c.return}while(c!==null);return!1}var bv=Error(r(461)),Cn=!1;function er(o,s,c,h){s.child=o===null?aS(s,null,c,h):ui(s,o.child,c,h)}function nE(o,s,c,h,v){c=c.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 si(s),h=tv(o,s,c,k,_,v),j=nv(),o!==null&&!Cn?(rv(o,s,v),Ta(o,s,v)):(Rt&&j&&Lg(s),s.flags|=1,er(o,s,h,v),s.child)}function rE(o,s,c,h,v){if(o===null){var _=c.type;return typeof _=="function"&&!Mg(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,oE(o,s,_,h,v)):(o=Qd(c.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!Cv(o,v)){var k=_.memoizedProps;if(c=c.compare,c=c!==null?c:Mc,c(k,h)&&o.ref===s.ref)return Ta(o,s,v)}return s.flags|=1,o=ba(_,h),o.ref=s.ref,o.return=s,s.child=o}function oE(o,s,c,h,v){if(o!==null){var _=o.memoizedProps;if(Mc(_,h)&&o.ref===s.ref)if(Cn=!1,s.pendingProps=h=_,Cv(o,v))(o.flags&131072)!==0&&(Cn=!0);else return s.lanes=o.lanes,Ta(o,s,v)}return wv(o,s,c,h,v)}function aE(o,s,c,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|c:c,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 sE(o,s,_,c,h)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&tf(s,_!==null?_.cachePool:null),_!==null?lS(s,_):Qg(),cS(s);else return h=s.lanes=536870912,sE(o,s,_!==null?_.baseLanes|c:c,c,h)}else _!==null?(tf(s,_.cachePool),lS(s,_),ls(),s.memoizedState=null):(o!==null&&tf(s,null),Qg(),ls());return er(o,s,v,c),s.child}function Kc(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function sE(o,s,c,h,v){var _=Hg();return _=_===null?null:{parent:Tn._currentValue,pool:_},s.memoizedState={baseLanes:c,cachePool:_},o!==null&&tf(s,null),Qg(),cS(s),o!==null&&ll(o,s,h,!0),s.childLanes=v,null}function yf(o,s){return s=bf({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function iE(o,s,c){return ui(s,o.child,null,c),o=yf(s,s.pendingProps),o.flags|=2,Br(s),s.memoizedState=null,o}function M3(o,s,c){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(Rt){if(h.mode==="hidden")return o=yf(s,h),s.lanes=536870912,Kc(null,o);if(Jg(s),(o=on)?(o=_R(o,ho),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Wo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},c=qw(o),c.return=s,s.child=c,Xn=s,on=null)):o=null,o===null)throw ns(s);return s.lanes=536870912,null}return yf(s,h)}var _=o.memoizedState;if(_!==null){var k=_.dehydrated;if(Jg(s),v)if(s.flags&256)s.flags&=-257,s=iE(o,s,c);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(Cn||ll(o,s,c,!1),v=(c&o.childLanes)!==0,Cn||v){if(h=Yt,h!==null&&(k=xr(h,c),k!==0&&k!==_.retryLane))throw _.retryLane=k,ni(o,k),kr(h,o,k),bv;Af(),s=iE(o,s,c)}else o=_.treeContext,on=mo(k.nextSibling),Xn=s,Rt=!0,ts=null,ho=!1,o!==null&&Zw(s,o),s=yf(s,h),s.flags|=4096;return s}return o=ba(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function _f(o,s){var c=s.ref;if(c===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(o===null||o.ref!==c)&&(s.flags|=4194816)}}function wv(o,s,c,h,v){return si(s),c=tv(o,s,c,h,void 0,v),h=nv(),o!==null&&!Cn?(rv(o,s,v),Ta(o,s,v)):(Rt&&h&&Lg(s),s.flags|=1,er(o,s,c,v),s.child)}function lE(o,s,c,h,v,_){return si(s),s.updateQueue=null,c=dS(s,h,c,v),uS(o),h=nv(),o!==null&&!Cn?(rv(o,s,_),Ta(o,s,_)):(Rt&&h&&Lg(s),s.flags|=1,er(o,s,c,_),s.child)}function cE(o,s,c,h,v){if(si(s),s.stateNode===null){var _=ol,k=c.contextType;typeof k=="object"&&k!==null&&(_=Jn(k)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=yv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Zg(s),k=c.contextType,_.context=typeof k=="object"&&k!==null?Jn(k):ol,_.state=s.memoizedState,k=c.getDerivedStateFromProps,typeof k=="function"&&(vv(s,c,k,h),_.state=s.memoizedState),typeof c.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&&yv.enqueueReplaceState(_,_.state,null),Bc(s,h,_,v),Fc(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,Q=fi(c,j);_.props=Q;var he=_.context,be=c.contextType;k=ol,typeof be=="object"&&be!==null&&(k=Jn(be));var Te=c.getDerivedStateFromProps;be=typeof Te=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||he!==k)&&WS(s,_,h,k),os=!1;var me=s.memoizedState;_.state=me,Bc(s,h,_,v),Fc(),he=s.memoizedState,j||me!==he||os?(typeof Te=="function"&&(vv(s,c,Te,h),he=s.memoizedState),(Q=os||KS(s,c,Q,h,me,he,k))?(be||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=Q):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Kg(o,s),k=s.memoizedProps,be=fi(c,k),_.props=be,Te=s.pendingProps,me=_.context,he=c.contextType,Q=ol,typeof he=="object"&&he!==null&&(Q=Jn(he)),j=c.getDerivedStateFromProps,(he=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k!==Te||me!==Q)&&WS(s,_,h,Q),os=!1,me=s.memoizedState,_.state=me,Bc(s,h,_,v),Fc();var ge=s.memoizedState;k!==Te||me!==ge||os||o!==null&&o.dependencies!==null&&Jd(o.dependencies)?(typeof j=="function"&&(vv(s,c,j,h),ge=s.memoizedState),(be=os||KS(s,c,be,h,me,ge,Q)||o!==null&&o.dependencies!==null&&Jd(o.dependencies))?(he||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,Q),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,Q)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=Q,h=be):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,_f(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=ui(s,o.child,null,v),s.child=ui(s,null,c,v)):er(o,s,c,v),s.memoizedState=_.state,o=s.child):o=Ta(o,s,v),o}function uE(o,s,c,h){return oi(),s.flags|=256,er(o,s,c,h),s.child}var Sv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ev(o){return{baseLanes:o,cachePool:Jw()}}function Rv(o,s,c){return o=o!==null?o.childLanes&~c:0,s&&(o|=Hr),o}function dE(o,s,c){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(Rt){if(v?is(s):ls(),(o=on)?(o=_R(o,ho),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Wo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},c=qw(o),c.return=s,s.child=c,Xn=s,on=null)):o=null,o===null)throw ns(s);return sy(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(ls(),v=s.mode,j=bf({mode:"hidden",children:j},v),h=ri(h,v,c,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=Ev(c),h.childLanes=Rv(o,k,c),s.memoizedState=Sv,Kc(null,h)):(is(s),xv(s,j))}var Q=o.memoizedState;if(Q!==null&&(j=Q.dehydrated,j!==null)){if(_)s.flags&256?(is(s),s.flags&=-257,s=Tv(o,s,c)):s.memoizedState!==null?(ls(),s.child=o.child,s.flags|=128,s=null):(ls(),j=h.fallback,v=s.mode,h=bf({mode:"visible",children:h.children},v),j=ri(j,v,c,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,ui(s,o.child,null,c),h=s.child,h.memoizedState=Ev(c),h.childLanes=Rv(o,k,c),s.memoizedState=Sv,s=Kc(null,h));else if(is(s),sy(j)){if(k=j.nextSibling&&j.nextSibling.dataset,k)var he=k.dgst;k=he,h=Error(r(419)),h.stack="",h.digest=k,Lc({value:h,source:null,stack:null}),s=Tv(o,s,c)}else if(Cn||ll(o,s,c,!1),k=(c&o.childLanes)!==0,Cn||k){if(k=Yt,k!==null&&(h=xr(k,c),h!==0&&h!==Q.retryLane))throw Q.retryLane=h,ni(o,h),kr(k,o,h),bv;ay(j)||Af(),s=Tv(o,s,c)}else ay(j)?(s.flags|=192,s.child=o.child,s=null):(o=Q.treeContext,on=mo(j.nextSibling),Xn=s,Rt=!0,ts=null,ho=!1,o!==null&&Zw(s,o),s=xv(s,h.children),s.flags|=4096);return s}return v?(ls(),j=h.fallback,v=s.mode,Q=o.child,he=Q.sibling,h=ba(Q,{mode:"hidden",children:h.children}),h.subtreeFlags=Q.subtreeFlags&65011712,he!==null?j=ba(he,j):(j=ri(j,v,c,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Kc(null,h),h=s.child,j=o.child.memoizedState,j===null?j=Ev(c):(v=j.cachePool,v!==null?(Q=Tn._currentValue,v=v.parent!==Q?{parent:Q,pool:Q}:v):v=Jw(),j={baseLanes:j.baseLanes|c,cachePool:v}),h.memoizedState=j,h.childLanes=Rv(o,k,c),s.memoizedState=Sv,Kc(o.child,h)):(is(s),c=o.child,o=c.sibling,c=ba(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,o!==null&&(k=s.deletions,k===null?(s.deletions=[o],s.flags|=16):k.push(o)),s.child=c,s.memoizedState=null,c)}function xv(o,s){return s=bf({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function bf(o,s){return o=Vr(22,o,null,s),o.lanes=0,o}function Tv(o,s,c){return ui(s,o.child,null,c),o=xv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function fE(o,s,c){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),Vg(o.return,s,c)}function Ov(o,s,c,h,v,_){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:v,treeForkCount:_}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=h,k.tail=c,k.tailMode=v,k.treeForkCount=_)}function hE(o,s,c){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,F(yn,k),er(o,s,h,c),h=Rt?Dc:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&fE(o,c,s);else if(o.tag===19)fE(o,c,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(c=s.child,v=null;c!==null;)o=c.alternate,o!==null&&lf(o)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Ov(s,!1,v,c,_,h);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&lf(o)===null){s.child=v;break}o=v.sibling,v.sibling=c,c=v,v=o}Ov(s,!0,c,null,_,h);break;case"together":Ov(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function Ta(o,s,c){if(o!==null&&(s.dependencies=o.dependencies),ds|=s.lanes,(c&s.childLanes)===0)if(o!==null){if(ll(o,s,c,!1),(c&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,c=ba(o,o.pendingProps),s.child=c,c.return=s;o.sibling!==null;)o=o.sibling,c=c.sibling=ba(o,o.pendingProps),c.return=s;c.sibling=null}return s.child}function Cv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Jd(o)))}function P3(o,s,c){switch(s.tag){case 3:ve(s,s.stateNode.containerInfo),rs(s,Tn,o.memoizedState.cache),oi();break;case 27:case 5:Ae(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,Jg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(is(s),s.flags|=128,null):(c&s.child.childLanes)!==0?dE(o,s,c):(is(s),o=Ta(o,s,c),o!==null?o.sibling:null);is(s);break;case 19:var v=(o.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(ll(o,s,c,!1),h=(c&s.childLanes)!==0),v){if(h)return hE(o,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),F(yn,yn.current),h)break;return null;case 22:return s.lanes=0,aE(o,s,c,s.pendingProps);case 24:rs(s,Tn,o.memoizedState.cache)}return Ta(o,s,c)}function pE(o,s,c){if(o!==null)if(o.memoizedProps!==s.pendingProps)Cn=!0;else{if(!Cv(o,c)&&(s.flags&128)===0)return Cn=!1,P3(o,s,c);Cn=(o.flags&131072)!==0}else Cn=!1,Rt&&(s.flags&1048576)!==0&&Gw(s,Dc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=li(s.elementType),s.type=o,typeof o=="function")Mg(o)?(h=fi(o,h),s.tag=1,s=cE(null,s,o,h,c)):(s.tag=0,s=wv(null,s,o,h,c));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=nE(null,s,o,h,c);break e}else if(v===N){s.tag=14,s=rE(null,s,o,h,c);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return wv(o,s,s.type,s.pendingProps,c);case 1:return h=s.type,v=fi(h,s.pendingProps),cE(o,s,h,v,c);case 3:e:{if(ve(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,Kg(o,s),Bc(s,h,null,c);var k=s.memoizedState;if(h=k.cache,rs(s,Tn,h),h!==_.cache&&Fg(s,[Tn],c,!0),Fc(),h=k.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:k.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=uE(o,s,h,c);break e}else if(h!==v){v=co(Error(r(424)),s),Lc(v),s=uE(o,s,h,c);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,on=mo(o.firstChild),Xn=s,Rt=!0,ts=null,ho=!0,c=aS(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(oi(),h===v){s=Ta(o,s,c);break e}er(o,s,h,c)}s=s.child}return s;case 26:return _f(o,s),o===null?(c=xR(s.type,null,s.pendingProps,null))?s.memoizedState=c:Rt||(c=s.type,o=s.pendingProps,h=Lf(X.current).createElement(c),h[Qn]=s,h[Tr]=o,tr(h,c,o),qn(h),s.stateNode=h):s.memoizedState=xR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ae(s),o===null&&Rt&&(h=s.stateNode=SR(s.type,s.pendingProps,X.current),Xn=s,ho=!0,v=on,gs(s.type)?(iy=v,on=mo(h.firstChild)):on=v),er(o,s,s.pendingProps.children,c),_f(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&Rt&&((v=h=on)&&(h=uD(h,s.type,s.pendingProps,ho),h!==null?(s.stateNode=h,Xn=s,on=mo(h.firstChild),ho=!1,v=!0):v=!1),v||ns(s)),Ae(s),v=s.type,_=s.pendingProps,k=o!==null?o.memoizedProps:null,h=_.children,ny(v,_)?h=null:k!==null&&ny(v,k)&&(s.flags|=32),s.memoizedState!==null&&(v=tv(o,s,x3,null,null,c),cu._currentValue=v),_f(o,s),er(o,s,h,c),s.child;case 6:return o===null&&Rt&&((o=c=on)&&(c=dD(c,s.pendingProps,ho),c!==null?(s.stateNode=c,Xn=s,on=null,o=!0):o=!1),o||ns(s)),null;case 13:return dE(o,s,c);case 4:return ve(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=ui(s,null,h,c):er(o,s,h,c),s.child;case 11:return nE(o,s,s.type,s.pendingProps,c);case 7:return er(o,s,s.pendingProps,c),s.child;case 8:return er(o,s,s.pendingProps.children,c),s.child;case 12:return er(o,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,rs(s,s.type,h.value),er(o,s,h.children,c),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,si(s),v=Jn(v),h=h(v),s.flags|=1,er(o,s,h,c),s.child;case 14:return rE(o,s,s.type,s.pendingProps,c);case 15:return oE(o,s,s.type,s.pendingProps,c);case 19:return hE(o,s,c);case 31:return M3(o,s,c);case 22:return aE(o,s,c,s.pendingProps);case 24:return si(s),h=Jn(Tn),o===null?(v=Hg(),v===null&&(v=Yt,_=Bg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=c),v=_),s.memoizedState={parent:h,cache:v},Zg(s),rs(s,Tn,v)):((o.lanes&c)!==0&&(Kg(o,s),Bc(s,null,null,c),Fc()),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&&Fg(s,[Tn],c,!0))),er(o,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Oa(o){o.flags|=4}function Av(o,s,c,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(VE())o.flags|=8192;else throw ci=rf,Gg}else o.flags&=-16777217}function mE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!IR(s))if(VE())o.flags|=8192;else throw ci=rf,Gg}function wf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?qt():536870912,o.lanes|=s,bl|=s)}function Wc(o,s){if(!Rt)switch(o.tailMode){case"hidden":s=o.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o.tail=null:c.sibling=null;break;case"collapsed":c=o.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function an(o){var s=o.alternate!==null&&o.alternate.child===o.child,c=0,h=0;if(s)for(var v=o.child;v!==null;)c|=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;)c|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=c,s}function D3(o,s,c){var h=s.pendingProps;switch(jg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return an(s),null;case 3:return c=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Ea(Tn),Ie(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(o===null||o.child===null)&&(il(s)?Oa(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ug())),an(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(Oa(s),_!==null?(an(s),mE(s,_)):(an(s),Av(s,v,null,h,c))):_?_!==o.memoizedState?(Oa(s),an(s),mE(s,_)):(an(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&Oa(s),an(s),Av(s,v,o,h,c)),null;case 27:if(H(s),c=X.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return an(s),null}o=L.current,il(s)?Kw(s):(o=SR(v,h,c),s.stateNode=o,Oa(s))}return an(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return an(s),null}if(_=L.current,il(s))Kw(s);else{var k=Lf(X.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&&Oa(s)}}return an(s),Av(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,c),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=X.current,il(s)){if(o=s.stateNode,c=s.memoizedProps,h=null,v=Xn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Qn]=s,o=!!(o.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||dR(o.nodeValue,c)),o||ns(s,!0)}else o=Lf(o).createTextNode(h),o[Qn]=s,s.stateNode=o}return an(s),null;case 31:if(c=s.memoizedState,o===null||o.memoizedState!==null){if(h=il(s),c!==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 oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),o=!1}else c=Ug(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=c),o=!0;if(!o)return s.flags&256?(Br(s),s):(Br(s),null);if((s.flags&128)!==0)throw Error(r(558))}return an(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=il(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 oi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),v=!1}else v=Ug(),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=c,s):(c=h!==null,o=o!==null&&o.memoizedState!==null,c&&(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)),c!==o&&c&&(s.child.flags|=8192),wf(s,s.updateQueue),an(s),null);case 4:return Ie(),o===null&&Qv(s.stateNode.containerInfo),an(s),null;case 10:return Ea(s.type),an(s),null;case 19:if(q(yn),h=s.memoizedState,h===null)return an(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Wc(h,!1);else{if(gn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=lf(o),_!==null){for(s.flags|=128,Wc(h,!1),o=_.updateQueue,s.updateQueue=o,wf(s,o),s.subtreeFlags=0,o=c,c=s.child;c!==null;)Bw(c,o),c=c.sibling;return F(yn,yn.current&1|2),Rt&&wa(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&we()>Tf&&(s.flags|=128,v=!0,Wc(h,!1),s.lanes=4194304)}else{if(!v)if(o=lf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,wf(s,o),Wc(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!Rt)return an(s),null}else 2*we()-h.renderingStartTime>Tf&&c!==536870912&&(s.flags|=128,v=!0,Wc(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=we(),o.sibling=null,c=yn.current,F(yn,v?c&1|2:c&1),Rt&&wa(s,h.treeForkCount),o):(an(s),null);case 22:case 23:return Br(s),Xg(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),c=s.updateQueue,c!==null&&wf(s,c.retryQueue),c=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),o!==null&&q(ii),null;case 24:return c=null,o!==null&&(c=o.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Ea(Tn),an(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function L3(o,s){switch(jg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return Ea(Tn),Ie(),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));oi()}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));oi()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(yn),null;case 4:return Ie(),null;case 10:return Ea(s.type),null;case 22:case 23:return Br(s),Xg(),o!==null&&q(ii),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return Ea(Tn),null;case 25:return null;default:return null}}function gE(o,s){switch(jg(s),s.tag){case 3:Ea(Tn),Ie();break;case 26:case 27:case 5:H(s);break;case 4:Ie();break;case 31:s.memoizedState!==null&&Br(s);break;case 13:Br(s);break;case 19:q(yn);break;case 10:Ea(s.type);break;case 22:case 23:Br(s),Xg(),o!==null&&q(ii);break;case 24:Ea(Tn)}}function Yc(o,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var v=h.next;c=v;do{if((c.tag&o)===o){h=void 0;var _=c.create,k=c.inst;h=_(),k.destroy=h}c=c.next}while(c!==v)}}catch(j){zt(s,s.return,j)}}function cs(o,s,c){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 Q=c,he=j;try{he()}catch(be){zt(v,Q,be)}}}h=h.next}while(h!==_)}}catch(be){zt(s,s.return,be)}}function vE(o){var s=o.updateQueue;if(s!==null){var c=o.stateNode;try{iS(s,c)}catch(h){zt(o,o.return,h)}}}function yE(o,s,c){c.props=fi(o.type,o.memoizedProps),c.state=o.memoizedState;try{c.componentWillUnmount()}catch(h){zt(o,s,h)}}function Qc(o,s){try{var c=o.ref;if(c!==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 c=="function"?o.refCleanup=c(h):c.current=h}}catch(v){zt(o,s,v)}}function Qo(o,s){var c=o.ref,h=o.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(v){zt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){zt(o,s,v)}else c.current=null}function _E(o){var s=o.type,c=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(v){zt(o,o.return,v)}}function Iv(o,s,c){try{var h=o.stateNode;oD(h,o.type,c,s),h[Tr]=s}catch(v){zt(o,o.return,v)}}function bE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&gs(o.type)||o.tag===4}function Nv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||bE(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 kv(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(o,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(o),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=ya));else if(h!==4&&(h===27&&gs(o.type)&&(c=o.stateNode,s=null),o=o.child,o!==null))for(kv(o,s,c),o=o.sibling;o!==null;)kv(o,s,c),o=o.sibling}function Sf(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?c.insertBefore(o,s):c.appendChild(o);else if(h!==4&&(h===27&&gs(o.type)&&(c=o.stateNode),o=o.child,o!==null))for(Sf(o,s,c),o=o.sibling;o!==null;)Sf(o,s,c),o=o.sibling}function wE(o){var s=o.stateNode,c=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);tr(s,h,c),s[Qn]=o,s[Tr]=c}catch(_){zt(o,o.return,_)}}var Ca=!1,An=!1,Mv=!1,SE=typeof WeakSet=="function"?WeakSet:Set,Hn=null;function j3(o,s){if(o=o.containerInfo,ey=Bf,o=Pw(o),Tg(o)){if("selectionStart"in o)var c={start:o.selectionStart,end:o.selectionEnd};else e:{c=(c=o.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var k=0,j=-1,Q=-1,he=0,be=0,Te=o,me=null;t:for(;;){for(var ge;Te!==c||v!==0&&Te.nodeType!==3||(j=k+v),Te!==_||h!==0&&Te.nodeType!==3||(Q=k+h),Te.nodeType===3&&(k+=Te.nodeValue.length),(ge=Te.firstChild)!==null;)me=Te,Te=ge;for(;;){if(Te===o)break t;if(me===c&&++he===v&&(j=k),me===_&&++be===h&&(Q=k),(ge=Te.nextSibling)!==null)break;Te=me,me=Te.parentNode}Te=ge}c=j===-1||Q===-1?null:{start:j,end:Q}}else c=null}c=c||{start:0,end:0}}else c=null;for(ty={focusedElem:o,selectionRange:c},Bf=!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(c=0;c<o.length;c++)v=o[c],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,c=s,v=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var $e=fi(c.type,v);o=h.getSnapshotBeforeUpdate($e,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ye){zt(c,c.return,Ye)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,c=o.nodeType,c===9)oy(o);else if(c===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":oy(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 EE(o,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:Ia(o,c),h&4&&Yc(5,c);break;case 1:if(Ia(o,c),h&4)if(o=c.stateNode,s===null)try{o.componentDidMount()}catch(k){zt(c,c.return,k)}else{var v=fi(c.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(k){zt(c,c.return,k)}}h&64&&vE(c),h&512&&Qc(c,c.return);break;case 3:if(Ia(o,c),h&64&&(o=c.updateQueue,o!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{iS(o,s)}catch(k){zt(c,c.return,k)}}break;case 27:s===null&&h&4&&wE(c);case 26:case 5:Ia(o,c),s===null&&h&4&&_E(c),h&512&&Qc(c,c.return);break;case 12:Ia(o,c);break;case 31:Ia(o,c),h&4&&TE(o,c);break;case 13:Ia(o,c),h&4&&OE(o,c),h&64&&(o=c.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(c=G3.bind(null,c),fD(o,c))));break;case 22:if(h=c.memoizedState!==null||Ca,!h){s=s!==null&&s.memoizedState!==null||An,v=Ca;var _=An;Ca=h,(An=s)&&!_?Na(o,c,(c.subtreeFlags&8772)!==0):Ia(o,c),Ca=v,An=_}break;case 30:break;default:Ia(o,c)}}function RE(o){var s=o.alternate;s!==null&&(o.alternate=null,RE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&cg(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 sn=null,Cr=!1;function Aa(o,s,c){for(c=c.child;c!==null;)xE(o,s,c),c=c.sibling}function xE(o,s,c){if(nn&&typeof nn.onCommitFiberUnmount=="function")try{nn.onCommitFiberUnmount(Rn,c)}catch{}switch(c.tag){case 26:An||Qo(c,s),Aa(o,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:An||Qo(c,s);var h=sn,v=Cr;gs(c.type)&&(sn=c.stateNode,Cr=!1),Aa(o,s,c),su(c.stateNode),sn=h,Cr=v;break;case 5:An||Qo(c,s);case 6:if(h=sn,v=Cr,sn=null,Aa(o,s,c),sn=h,Cr=v,sn!==null)if(Cr)try{(sn.nodeType===9?sn.body:sn.nodeName==="HTML"?sn.ownerDocument.body:sn).removeChild(c.stateNode)}catch(_){zt(c,s,_)}else try{sn.removeChild(c.stateNode)}catch(_){zt(c,s,_)}break;case 18:sn!==null&&(Cr?(o=sn,vR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,c.stateNode),Cl(o)):vR(sn,c.stateNode));break;case 4:h=sn,v=Cr,sn=c.stateNode.containerInfo,Cr=!0,Aa(o,s,c),sn=h,Cr=v;break;case 0:case 11:case 14:case 15:cs(2,c,s),An||cs(4,c,s),Aa(o,s,c);break;case 1:An||(Qo(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&yE(c,s,h)),Aa(o,s,c);break;case 21:Aa(o,s,c);break;case 22:An=(h=An)||c.memoizedState!==null,Aa(o,s,c),An=h;break;default:Aa(o,s,c)}}function TE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Cl(o)}catch(c){zt(s,s.return,c)}}}function OE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Cl(o)}catch(c){zt(s,s.return,c)}}function $3(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new SE),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new SE),s;default:throw Error(r(435,o.tag))}}function Ef(o,s){var c=$3(o);s.forEach(function(h){if(!c.has(h)){c.add(h);var v=Z3.bind(null,o,h);h.then(v,v)}})}function Ar(o,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var v=c[h],_=o,k=s,j=k;e:for(;j!==null;){switch(j.tag){case 27:if(gs(j.type)){sn=j.stateNode,Cr=!1;break e}break;case 5:sn=j.stateNode,Cr=!1;break e;case 3:case 4:sn=j.stateNode.containerInfo,Cr=!0;break e}j=j.return}if(sn===null)throw Error(r(160));xE(_,k,v),sn=null,Cr=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)CE(s,o),s=s.sibling}var Io=null;function CE(o,s){var c=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Ar(s,o),Ir(o),h&4&&(cs(3,o,o.return),Yc(3,o),cs(5,o,o.return));break;case 1:Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),h&64&&Ca&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(c=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var v=Io;if(Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=o.memoizedState,c===null)if(h===null)if(o.stateNode===null){e:{h=o.type,c=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Rc]||_[Qn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),tr(_,h,c),_[Qn]=o,qn(_),h=_;break e;case"link":var k=CR("link","href",v).get(h+(c.href||""));if(k){for(var j=0;j<k.length;j++)if(_=k[j],_.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;case"meta":if(k=CR("meta","content",v).get(h+(c.content||""))){for(j=0;j<k.length;j++)if(_=k[j],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Qn]=o,qn(_),h=_}o.stateNode=h}else AR(v,o.type,o.stateNode);else o.stateNode=OR(v,h,o.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?AR(v,o.type,o.stateNode):OR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Iv(o,o.memoizedProps,c.memoizedProps)}break;case 27:Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),c!==null&&h&4&&Iv(o,o.memoizedProps,c.memoizedProps);break;case 5:if(Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),o.flags&32){v=o.stateNode;try{Qi(v,"")}catch($e){zt(o,o.return,$e)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Iv(o,v,c!==null?c.memoizedProps:v)),h&1024&&(Mv=!0);break;case 6:if(Ar(s,o),Ir(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,c=o.stateNode;try{c.nodeValue=h}catch($e){zt(o,o.return,$e)}}break;case 3:if(Uf=null,v=Io,Io=jf(s.containerInfo),Ar(s,o),Io=v,Ir(o),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Cl(s.containerInfo)}catch($e){zt(o,o.return,$e)}Mv&&(Mv=!1,AE(o));break;case 4:h=Io,Io=jf(o.stateNode.containerInfo),Ar(s,o),Ir(o),Io=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,Ef(o,h)));break;case 13:Ar(s,o),Ir(o),o.child.flags&8192&&o.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(xf=we()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Ef(o,h)));break;case 22:v=o.memoizedState!==null;var Q=c!==null&&c.memoizedState!==null,he=Ca,be=An;if(Ca=he||v,An=be||Q,Ar(s,o),An=be,Ca=he,Ir(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||Q||Ca||An||hi(o)),c=null,s=o;;){if(s.tag===5||s.tag===26){if(c===null){Q=c=s;try{if(_=Q.stateNode,v)k=_.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{j=Q.stateNode;var Te=Q.memoizedProps.style,me=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;j.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch($e){zt(Q,Q.return,$e)}}}else if(s.tag===6){if(c===null){Q=s;try{Q.stateNode.nodeValue=v?"":Q.memoizedProps}catch($e){zt(Q,Q.return,$e)}}}else if(s.tag===18){if(c===null){Q=s;try{var ge=Q.stateNode;v?yR(ge,!0):yR(Q.stateNode,!1)}catch($e){zt(Q,Q.return,$e)}}}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;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Ef(o,c))));break;case 19:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Ef(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 c,h=o.return;h!==null;){if(bE(h)){c=h;break}h=h.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var v=c.stateNode,_=Nv(o);Sf(o,_,v);break;case 5:var k=c.stateNode;c.flags&32&&(Qi(k,""),c.flags&=-33);var j=Nv(o);Sf(o,j,k);break;case 3:case 4:var Q=c.stateNode.containerInfo,he=Nv(o);kv(o,he,Q);break;default:throw Error(r(161))}}catch(be){zt(o,o.return,be)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function AE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;AE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Ia(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)EE(o,s.alternate,s),s=s.sibling}function hi(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:cs(4,s,s.return),hi(s);break;case 1:Qo(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&yE(s,s.return,c),hi(s);break;case 27:su(s.stateNode);case 26:case 5:Qo(s,s.return),hi(s);break;case 22:s.memoizedState===null&&hi(s);break;case 30:hi(s);break;default:hi(s)}o=o.sibling}}function Na(o,s,c){for(c=c&&(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:Na(v,_,c),Yc(4,_);break;case 1:if(Na(v,_,c),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(he){zt(h,h.return,he)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var Q=v.shared.hiddenCallbacks;if(Q!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Q.length;v++)sS(Q[v],j)}catch(he){zt(h,h.return,he)}}c&&k&64&&vE(_),Qc(_,_.return);break;case 27:wE(_);case 26:case 5:Na(v,_,c),c&&h===null&&k&4&&_E(_),Qc(_,_.return);break;case 12:Na(v,_,c);break;case 31:Na(v,_,c),c&&k&4&&TE(v,_);break;case 13:Na(v,_,c),c&&k&4&&OE(v,_);break;case 22:_.memoizedState===null&&Na(v,_,c),Qc(_,_.return);break;case 30:break;default:Na(v,_,c)}s=s.sibling}}function Pv(o,s){var c=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==c&&(o!=null&&o.refCount++,c!=null&&jc(c))}function Dv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&jc(o))}function No(o,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)IE(o,s,c,h),s=s.sibling}function IE(o,s,c,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:No(o,s,c,h),v&2048&&Yc(9,s);break;case 1:No(o,s,c,h);break;case 3:No(o,s,c,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&jc(o)));break;case 12:if(v&2048){No(o,s,c,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(Q){zt(s,s.return,Q)}}else No(o,s,c,h);break;case 31:No(o,s,c,h);break;case 13:No(o,s,c,h);break;case 23:break;case 22:_=s.stateNode,k=s.alternate,s.memoizedState!==null?_._visibility&2?No(o,s,c,h):Xc(o,s):_._visibility&2?No(o,s,c,h):(_._visibility|=2,vl(o,s,c,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Pv(k,s);break;case 24:No(o,s,c,h),v&2048&&Dv(s.alternate,s);break;default:No(o,s,c,h)}}function vl(o,s,c,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,k=s,j=c,Q=h,he=k.flags;switch(k.tag){case 0:case 11:case 15:vl(_,k,j,Q,v),Yc(8,k);break;case 23:break;case 22:var be=k.stateNode;k.memoizedState!==null?be._visibility&2?vl(_,k,j,Q,v):Xc(_,k):(be._visibility|=2,vl(_,k,j,Q,v)),v&&he&2048&&Pv(k.alternate,k);break;case 24:vl(_,k,j,Q,v),v&&he&2048&&Dv(k.alternate,k);break;default:vl(_,k,j,Q,v)}s=s.sibling}}function Xc(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=o,h=s,v=h.flags;switch(h.tag){case 22:Xc(c,h),v&2048&&Pv(h.alternate,h);break;case 24:Xc(c,h),v&2048&&Dv(h.alternate,h);break;default:Xc(c,h)}s=s.sibling}}var Jc=8192;function yl(o,s,c){if(o.subtreeFlags&Jc)for(o=o.child;o!==null;)NE(o,s,c),o=o.sibling}function NE(o,s,c){switch(o.tag){case 26:yl(o,s,c),o.flags&Jc&&o.memoizedState!==null&&RD(c,Io,o.memoizedState,o.memoizedProps);break;case 5:yl(o,s,c);break;case 3:case 4:var h=Io;Io=jf(o.stateNode.containerInfo),yl(o,s,c),Io=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=Jc,Jc=16777216,yl(o,s,c),Jc=h):yl(o,s,c));break;default:yl(o,s,c)}}function kE(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 eu(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,PE(h,o)}kE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)ME(o),o=o.sibling}function ME(o){switch(o.tag){case 0:case 11:case 15:eu(o),o.flags&2048&&cs(9,o,o.return);break;case 3:eu(o);break;case 12:eu(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Rf(o)):eu(o);break;default:eu(o)}}function Rf(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,PE(h,o)}kE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:cs(8,s,s.return),Rf(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Rf(s));break;default:Rf(s)}o=o.sibling}}function PE(o,s){for(;Hn!==null;){var c=Hn;switch(c.tag){case 0:case 11:case 15:cs(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:jc(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Hn=h;else e:for(c=o;Hn!==null;){h=Hn;var v=h.sibling,_=h.return;if(RE(h),h===c){Hn=null;break e}if(v!==null){v.return=_,Hn=v;break e}Hn=_}}}var U3={getCacheForType:function(o){var s=Jn(Tn),c=s.data.get(o);return c===void 0&&(c=o(),s.data.set(o,c)),c},cacheSignal:function(){return Jn(Tn).controller.signal}},z3=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Yt=null,gt=null,wt=0,Ut=0,qr=null,us=!1,_l=!1,Lv=!1,ka=0,gn=0,ds=0,pi=0,jv=0,Hr=0,bl=0,tu=null,Nr=null,$v=!1,xf=0,DE=0,Tf=1/0,Of=null,fs=null,$n=0,hs=null,wl=null,Ma=0,Uv=0,zv=null,LE=null,nu=0,Vv=null;function Gr(){return(Dt&2)!==0&&wt!==0?wt&-wt:B.T!==null?Zv():ig()}function jE(){if(Hr===0)if((wt&536870912)===0||Rt){var o=Tt;Tt<<=1,(Tt&3932160)===0&&(Tt=262144),Hr=o}else Hr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Hr}function kr(o,s,c){(o===Yt&&(Ut===2||Ut===9)||o.cancelPendingCommit!==null)&&(Sl(o,0),ps(o,wt,Hr,!1)),It(o,c),((Dt&2)===0||o!==Yt)&&(o===Yt&&((Dt&2)===0&&(pi|=c),gn===4&&ps(o,wt,Hr,!1)),Xo(o))}function $E(o,s,c){if((Dt&6)!==0)throw Error(r(327));var h=!c&&(s&127)===0&&(s&o.expiredLanes)===0||ut(o,s),v=h?B3(o,s):Bv(o,s,!0),_=h;do{if(v===0){_l&&!h&&ps(o,s,0,!1);break}else{if(c=o.current.alternate,_&&!V3(c)){v=Bv(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=tu;var Q=j.current.memoizedState.isDehydrated;if(Q&&(Sl(j,k).flags|=256),k=Bv(j,k,!1),k!==2){if(Lv&&!Q){j.errorRecoveryDisabledLanes|=_,pi|=_,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){Sl(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=xf+300-we(),10<v)){if(ps(h,s,Hr,!us),qe(h,0,!0)!==0)break e;Ma=s,h.timeoutHandle=mR(UE.bind(null,h,c,Nr,Of,$v,s,Hr,pi,bl,us,_,"Throttled",-0,0),v);break e}UE(h,c,Nr,Of,$v,s,Hr,pi,bl,us,_,null,-0,0)}}break}while(!0);Xo(o)}function UE(o,s,c,h,v,_,k,j,Q,he,be,Te,me,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:ya},NE(s,_,Te);var $e=(_&62914560)===_?xf-we():(_&4194048)===_?DE-we():0;if($e=xD(Te,$e),$e!==null){Ma=_,o.cancelPendingCommit=$e(ZE.bind(null,o,s,_,c,h,v,k,j,Q,be,Te,null,me,ge)),ps(o,_,k,!he);return}}ZE(o,s,_,c,h,v,k,j,Q)}function V3(o){for(var s=o;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var v=c[h],_=v.getSnapshot;v=v.value;try{if(!zr(_(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;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,c,h){s&=~jv,s&=~pi,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}c!==0&&ao(o,c,s)}function Cf(){return(Dt&6)===0?(ru(0),!1):!0}function Fv(){if(gt!==null){if(Ut===0)var o=gt.return;else o=gt,Sa=ai=null,ov(o),fl=null,Uc=0,o=gt;for(;o!==null;)gE(o.alternate,o),o=o.return;gt=null}}function Sl(o,s){var c=o.timeoutHandle;c!==-1&&(o.timeoutHandle=-1,iD(c)),c=o.cancelPendingCommit,c!==null&&(o.cancelPendingCommit=null,c()),Ma=0,Fv(),Yt=o,gt=c=ba(o.current,null),wt=s,Ut=0,qr=null,us=!1,_l=ut(o,s),Lv=!1,bl=Hr=jv=pi=ds=gn=0,Nr=tu=null,$v=!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 ka=s,Kd(),c}function zE(o,s){st=null,B.H=Zc,s===dl||s===nf?(s=nS(),Ut=3):s===Gg?(s=nS(),Ut=4):Ut=s===bv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qr=s,gt===null&&(gn=1,vf(o,co(s,o.current)))}function VE(){var o=Fr.current;return o===null?!0:(wt&4194048)===wt?po===null:(wt&62914560)===wt||(wt&536870912)!==0?o===po:!1}function FE(){var o=B.H;return B.H=Zc,o===null?Zc:o}function BE(){var o=B.A;return B.A=U3,o}function Af(){gn=4,us||(wt&4194048)!==wt&&Fr.current!==null||(_l=!0),(ds&134217727)===0&&(pi&134217727)===0||Yt===null||ps(Yt,wt,Hr,!1)}function Bv(o,s,c){var h=Dt;Dt|=2;var v=FE(),_=BE();(Yt!==o||wt!==s)&&(Of=null,Sl(o,s)),s=!1;var k=gn;e:do try{if(Ut!==0&&gt!==null){var j=gt,Q=qr;switch(Ut){case 8:Fv(),k=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(s=!0);var he=Ut;if(Ut=0,qr=null,El(o,j,Q,he),c&&_l){k=0;break e}break;default:he=Ut,Ut=0,qr=null,El(o,j,Q,he)}}F3(),k=gn;break}catch(be){zE(o,be)}while(!0);return s&&o.shellSuspendCounter++,Sa=ai=null,Dt=h,B.H=v,B.A=_,gt===null&&(Yt=null,wt=0,Kd()),k}function F3(){for(;gt!==null;)qE(gt)}function B3(o,s){var c=Dt;Dt|=2;var h=FE(),v=BE();Yt!==o||wt!==s?(Of=null,Tf=we()+500,Sl(o,s)):_l=ut(o,s);e:do try{if(Ut!==0&&gt!==null){s=gt;var _=qr;t:switch(Ut){case 1:Ut=0,qr=null,El(o,s,_,1);break;case 2:case 9:if(eS(_)){Ut=0,qr=null,HE(s);break}s=function(){Ut!==2&&Ut!==9||Yt!==o||(Ut=7),Xo(o)},_.then(s,s);break e;case 3:Ut=7;break e;case 4:Ut=5;break e;case 7:eS(_)?(Ut=0,qr=null,HE(s)):(Ut=0,qr=null,El(o,s,_,7));break;case 5:var k=null;switch(gt.tag){case 26:k=gt.memoizedState;case 5:case 27:var j=gt;if(k?IR(k):j.stateNode.complete){Ut=0,qr=null;var Q=j.sibling;if(Q!==null)gt=Q;else{var he=j.return;he!==null?(gt=he,If(he)):gt=null}break t}}Ut=0,qr=null,El(o,s,_,5);break;case 6:Ut=0,qr=null,El(o,s,_,6);break;case 8:Fv(),gn=6;break e;default:throw Error(r(462))}}q3();break}catch(be){zE(o,be)}while(!0);return Sa=ai=null,B.H=h,B.A=v,Dt=c,gt!==null?0:(Yt=null,wt=0,Kd(),gn)}function q3(){for(;gt!==null&&!re();)qE(gt)}function qE(o){var s=pE(o.alternate,o,ka);o.memoizedProps=o.pendingProps,s===null?If(o):gt=s}function HE(o){var s=o,c=s.alternate;switch(s.tag){case 15:case 0:s=lE(c,s,s.pendingProps,s.type,void 0,wt);break;case 11:s=lE(c,s,s.pendingProps,s.type.render,s.ref,wt);break;case 5:ov(s);default:gE(c,s),s=gt=Bw(s,ka),s=pE(c,s,ka)}o.memoizedProps=o.pendingProps,s===null?If(o):gt=s}function El(o,s,c,h){Sa=ai=null,ov(s),fl=null,Uc=0;var v=s.return;try{if(k3(o,v,s,c,wt)){gn=1,vf(o,co(c,o.current)),gt=null;return}}catch(_){if(v!==null)throw gt=v,_;gn=1,vf(o,co(c,o.current)),gt=null;return}s.flags&32768?(Rt||h===1?o=!0:_l||(wt&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))),GE(s,o)):If(s)}function If(o){var s=o;do{if((s.flags&32768)!==0){GE(s,us);return}o=s.return;var c=D3(s.alternate,s,ka);if(c!==null){gt=c;return}if(s=s.sibling,s!==null){gt=s;return}gt=s=o}while(s!==null);gn===0&&(gn=5)}function GE(o,s){do{var c=L3(o.alternate,o);if(c!==null){c.flags&=32767,gt=c;return}if(c=o.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(o=o.sibling,o!==null)){gt=o;return}gt=o=c}while(o!==null);gn=6,gt=null}function ZE(o,s,c,h,v,_,k,j,Q){o.cancelPendingCommit=null;do Nf();while($n!==0);if((Dt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Ng,rn(o,c,_,k,j,Q),o===Yt&&(gt=Yt=null,wt=0),wl=s,hs=o,Ma=c,Uv=_,zv=v,LE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,K3(Je,function(){return XE(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=B.T,B.T=null,v=W.p,W.p=2,k=Dt,Dt|=4;try{j3(o,s,c)}finally{Dt=k,W.p=v,B.T=h}}$n=1,KE(),WE(),YE()}}function KE(){if($n===1){$n=0;var o=hs,s=wl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var h=W.p;W.p=2;var v=Dt;Dt|=4;try{CE(s,o);var _=ty,k=Pw(o.containerInfo),j=_.focusedElem,Q=_.selectionRange;if(k!==j&&j&&j.ownerDocument&&Mw(j.ownerDocument.documentElement,j)){if(Q!==null&&Tg(j)){var he=Q.start,be=Q.end;if(be===void 0&&(be=he),"selectionStart"in j)j.selectionStart=he,j.selectionEnd=Math.min(be,j.value.length);else{var Te=j.ownerDocument||document,me=Te&&Te.defaultView||window;if(me.getSelection){var ge=me.getSelection(),$e=j.textContent.length,Ye=Math.min(Q.start,$e),Zt=Q.end===void 0?Ye:Math.min(Q.end,$e);!ge.extend&&Ye>Zt&&(k=Zt,Zt=Ye,Ye=k);var ie=kw(j,Ye),te=kw(j,Zt);if(ie&&te&&(ge.rangeCount!==1||ge.anchorNode!==ie.node||ge.anchorOffset!==ie.offset||ge.focusNode!==te.node||ge.focusOffset!==te.offset)){var fe=Te.createRange();fe.setStart(ie.node,ie.offset),ge.removeAllRanges(),Ye>Zt?(ge.addRange(fe),ge.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),ge.addRange(fe))}}}}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 Se=Te[j];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}Bf=!!ey,ty=ey=null}finally{Dt=v,W.p=h,B.T=c}}o.current=s,$n=2}}function WE(){if($n===2){$n=0;var o=hs,s=wl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var h=W.p;W.p=2;var v=Dt;Dt|=4;try{EE(o,s.alternate,s)}finally{Dt=v,W.p=h,B.T=c}}$n=3}}function YE(){if($n===4||$n===3){$n=0,oe();var o=hs,s=wl,c=Ma,h=LE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?$n=5:($n=0,wl=hs=null,QE(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(fs=null),Co(c),s=s.stateNode,nn&&typeof nn.onCommitFiberRoot=="function")try{nn.onCommitFiberRoot(Rn,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=B.T,v=W.p,W.p=2,B.T=null;try{for(var _=o.onRecoverableError,k=0;k<h.length;k++){var j=h[k];_(j.value,{componentStack:j.stack})}}finally{B.T=s,W.p=v}}(Ma&3)!==0&&Nf(),Xo(o),v=o.pendingLanes,(c&261930)!==0&&(v&42)!==0?o===Vv?nu++:(nu=0,Vv=o):nu=0,ru(0)}}function QE(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,jc(s)))}function Nf(){return KE(),WE(),YE(),XE()}function XE(){if($n!==5)return!1;var o=hs,s=Uv;Uv=0;var c=Co(Ma),h=B.T,v=W.p;try{W.p=32>c?32:c,B.T=null,c=zv,zv=null;var _=hs,k=Ma;if($n=0,wl=hs=null,Ma=0,(Dt&6)!==0)throw Error(r(331));var j=Dt;if(Dt|=4,ME(_.current),IE(_,_.current,k,c),Dt=j,ru(0,!1),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(Rn,_)}catch{}return!0}finally{W.p=v,B.T=h,QE(o,s)}}function JE(o,s,c){s=co(c,s),s=_v(o.stateNode,s,2),o=ss(o,s,2),o!==null&&(It(o,2),Xo(o))}function zt(o,s,c){if(o.tag===3)JE(o,o,c);else for(;s!==null;){if(s.tag===3){JE(s,o,c);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=co(c,o),c=eE(2),h=ss(s,c,2),h!==null&&(tE(c,h,s,o),It(h,2),Xo(h));break}}s=s.return}}function qv(o,s,c){var h=o.pingCache;if(h===null){h=o.pingCache=new z3;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(c)||(Lv=!0,v.add(c),o=H3.bind(null,o,s,c),s.then(o,o))}function H3(o,s,c){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&c,o.warmLanes&=~c,Yt===o&&(wt&c)===c&&(gn===4||gn===3&&(wt&62914560)===wt&&300>we()-xf?(Dt&2)===0&&Sl(o,0):jv|=c,bl===wt&&(bl=0)),Xo(o)}function eR(o,s){s===0&&(s=qt()),o=ni(o,s),o!==null&&(It(o,s),Xo(o))}function G3(o){var s=o.memoizedState,c=0;s!==null&&(c=s.retryLane),eR(o,c)}function Z3(o,s){var c=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(c=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),eR(o,c)}function K3(o,s){return We(o,s)}var kf=null,Rl=null,Hv=!1,Mf=!1,Gv=!1,ms=0;function Xo(o){o!==Rl&&o.next===null&&(Rl===null?kf=Rl=o:Rl=Rl.next=o),Mf=!0,Hv||(Hv=!0,Y3())}function ru(o,s){if(!Gv&&Mf){Gv=!0;do for(var c=!1,h=kf;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&&(c=!0,oR(h,_))}else _=wt,_=qe(h,h===Yt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||ut(h,_)||(c=!0,oR(h,_));h=h.next}while(c);Gv=!1}}function W3(){tR()}function tR(){Mf=Hv=!1;var o=0;ms!==0&&sD()&&(o=ms);for(var s=we(),c=null,h=kf;h!==null;){var v=h.next,_=nR(h,s);_===0?(h.next=null,c===null?kf=v:c.next=v,v===null&&(Rl=c)):(c=h,(o!==0||(_&3)!==0)&&(Mf=!0)),h=v}$n!==0&&$n!==5||ru(o),ms!==0&&(ms=0)}function nR(o,s){for(var c=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var k=31-xn(_),j=1<<k,Q=v[k];Q===-1?((j&c)===0||(j&h)!==0)&&(v[k]=Wt(j,s)):Q<=s&&(o.expiredLanes|=j),_&=~j}if(s=Yt,c=wt,c=qe(o,o===s?c:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,c===0||o===s&&(Ut===2||Ut===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((c&3)===0||ut(o,c)){if(s=c&-c,s===o.callbackPriority)return s;switch(h!==null&&Z(h),Co(c)){case 2:case 8:c=ke;break;case 32:c=Je;break;case 268435456:c=Ct;break;default:c=Je}return h=rR.bind(null,o),c=We(c,h),o.callbackPriority=s,o.callbackNode=c,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function rR(o,s){if($n!==0&&$n!==5)return o.callbackNode=null,o.callbackPriority=0,null;var c=o.callbackNode;if(Nf()&&o.callbackNode!==c)return null;var h=wt;return h=qe(o,o===Yt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:($E(o,h,s),nR(o,we()),o.callbackNode!=null&&o.callbackNode===c?rR.bind(null,o):null)}function oR(o,s){if(Nf())return null;$E(o,s,!0)}function Y3(){lD(function(){(Dt&6)!==0?We(Re,W3):tR()})}function Zv(){if(ms===0){var o=cl;o===0&&(o=bt,bt<<=1,(bt&261888)===0&&(bt=256)),ms=o}return ms}function aR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:zd(""+o)}function sR(o,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,o.id&&c.setAttribute("form",o.id),s.parentNode.insertBefore(c,s),o=new FormData(o),c.parentNode.removeChild(c),o}function Q3(o,s,c,h,v){if(s==="submit"&&c&&c.stateNode===v){var _=aR((v[Tr]||null).action),k=h.submitter;k&&(s=(s=k[Tr]||null)?aR(s.formAction):k.getAttribute("formAction"),s!==null&&(_=s,k=null));var j=new qd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ms!==0){var Q=k?sR(v,k):new FormData(v);hv(c,{pending:!0,data:Q,method:v.method,action:_},null,Q)}}else typeof _=="function"&&(j.preventDefault(),Q=k?sR(v,k):new FormData(v),hv(c,{pending:!0,data:Q,method:v.method,action:_},_,Q))},currentTarget:v}]})}}for(var Kv=0;Kv<Ig.length;Kv++){var Wv=Ig[Kv],X3=Wv.toLowerCase(),J3=Wv[0].toUpperCase()+Wv.slice(1);Ao(X3,"on"+J3)}Ao(jw,"onAnimationEnd"),Ao($w,"onAnimationIteration"),Ao(Uw,"onAnimationStart"),Ao("dblclick","onDoubleClick"),Ao("focusin","onFocus"),Ao("focusout","onBlur"),Ao(m3,"onTransitionRun"),Ao(g3,"onTransitionStart"),Ao(v3,"onTransitionCancel"),Ao(zw,"onTransitionEnd"),Wi("onMouseEnter",["mouseout","mouseover"]),Wi("onMouseLeave",["mouseout","mouseover"]),Wi("onPointerEnter",["pointerout","pointerover"]),Wi("onPointerLeave",["pointerout","pointerover"]),Xs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),eD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function iR(o,s){s=(s&4)!==0;for(var c=0;c<o.length;c++){var h=o[c],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],Q=j.instance,he=j.currentTarget;if(j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Zd(be)}v.currentTarget=null,_=Q}else for(k=0;k<h.length;k++){if(j=h[k],Q=j.instance,he=j.currentTarget,j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Zd(be)}v.currentTarget=null,_=Q}}}}function vt(o,s){var c=s[lg];c===void 0&&(c=s[lg]=new Set);var h=o+"__bubble";c.has(h)||(lR(s,o,2,!1),c.add(h))}function Yv(o,s,c){var h=0;s&&(h|=4),lR(c,o,h,s)}var Pf="_reactListening"+Math.random().toString(36).slice(2);function Qv(o){if(!o[Pf]){o[Pf]=!0,tw.forEach(function(c){c!=="selectionchange"&&(eD.has(c)||Yv(c,!1,o),Yv(c,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Pf]||(s[Pf]=!0,Yv("selectionchange",!1,s))}}function lR(o,s,c,h){switch(jR(s)){case 2:var v=CD;break;case 8:v=AD;break;default:v=fy}c=v.bind(null,s,c,o),v=void 0,!vg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,c,{capture:!0,passive:v}):o.addEventListener(s,c,!0):v!==void 0?o.addEventListener(s,c,{passive:v}):o.addEventListener(s,c,!1)}function Xv(o,s,c,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 Q=k.tag;if((Q===3||Q===4)&&k.stateNode.containerInfo===v)return;k=k.return}for(;j!==null;){if(k=Gi(j),k===null)return;if(Q=k.tag,Q===5||Q===6||Q===26||Q===27){h=_=k;continue e}j=j.parentNode}}h=h.return}hw(function(){var he=_,be=mg(c),Te=[];e:{var me=Vw.get(o);if(me!==void 0){var ge=qd,$e=o;switch(o){case"keypress":if(Fd(c)===0)break e;case"keydown":case"keyup":ge=ZP;break;case"focusin":$e="focus",ge=wg;break;case"focusout":$e="blur",ge=wg;break;case"beforeblur":case"afterblur":ge=wg;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=DP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=YP;break;case jw:case $w:case Uw:ge=$P;break;case zw:ge=XP;break;case"scroll":case"scrollend":ge=MP;break;case"wheel":ge=e3;break;case"copy":case"cut":case"paste":ge=zP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=yw;break;case"toggle":case"beforetoggle":ge=n3}var Ye=(s&4)!==0,Zt=!Ye&&(o==="scroll"||o==="scrollend"),ie=Ye?me!==null?me+"Capture":null:me;Ye=[];for(var te=he,fe;te!==null;){var Se=te;if(fe=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||fe===null||ie===null||(Se=Tc(te,ie),Se!=null&&Ye.push(au(te,Se,fe))),Zt)break;te=te.return}0<Ye.length&&(me=new ge(me,$e,null,c,be),Te.push({event:me,listeners:Ye}))}}if((s&7)===0){e:{if(me=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",me&&c!==pg&&($e=c.relatedTarget||c.fromElement)&&(Gi($e)||$e[Hi]))break e;if((ge||me)&&(me=be.window===be?be:(me=be.ownerDocument)?me.defaultView||me.parentWindow:window,ge?($e=c.relatedTarget||c.toElement,ge=he,$e=$e?Gi($e):null,$e!==null&&(Zt=i($e),Ye=$e.tag,$e!==Zt||Ye!==5&&Ye!==27&&Ye!==6)&&($e=null)):(ge=null,$e=he),ge!==$e)){if(Ye=gw,Se="onMouseLeave",ie="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(Ye=yw,Se="onPointerLeave",ie="onPointerEnter",te="pointer"),Zt=ge==null?me:xc(ge),fe=$e==null?me:xc($e),me=new Ye(Se,te+"leave",ge,c,be),me.target=Zt,me.relatedTarget=fe,Se=null,Gi(be)===he&&(Ye=new Ye(ie,te+"enter",$e,c,be),Ye.target=fe,Ye.relatedTarget=Zt,Se=Ye),Zt=Se,ge&&$e)t:{for(Ye=tD,ie=ge,te=$e,fe=0,Se=ie;Se;Se=Ye(Se))fe++;Se=0;for(var Ke=te;Ke;Ke=Ye(Ke))Se++;for(;0<fe-Se;)ie=Ye(ie),fe--;for(;0<Se-fe;)te=Ye(te),Se--;for(;fe--;){if(ie===te||te!==null&&ie===te.alternate){Ye=ie;break t}ie=Ye(ie),te=Ye(te)}Ye=null}else Ye=null;ge!==null&&cR(Te,me,ge,Ye,!1),$e!==null&&Zt!==null&&cR(Te,Zt,$e,Ye,!0)}}e:{if(me=he?xc(he):window,ge=me.nodeName&&me.nodeName.toLowerCase(),ge==="select"||ge==="input"&&me.type==="file")var Nt=Tw;else if(Rw(me))if(Ow)Nt=f3;else{Nt=u3;var He=c3}else ge=me.nodeName,!ge||ge.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?he&&hg(he.elementType)&&(Nt=Tw):Nt=d3;if(Nt&&(Nt=Nt(o,he))){xw(Te,Nt,c,be);break e}He&&He(o,me,he),o==="focusout"&&he&&me.type==="number"&&he.memoizedProps.value!=null&&fg(me,"number",me.value)}switch(He=he?xc(he):window,o){case"focusin":(Rw(He)||He.contentEditable==="true")&&(tl=He,Og=he,Pc=null);break;case"focusout":Pc=Og=tl=null;break;case"mousedown":Cg=!0;break;case"contextmenu":case"mouseup":case"dragend":Cg=!1,Dw(Te,c,be);break;case"selectionchange":if(p3)break;case"keydown":case"keyup":Dw(Te,c,be)}var it;if(Eg)e:{switch(o){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else el?Sw(o,c)&&(St="onCompositionEnd"):o==="keydown"&&c.keyCode===229&&(St="onCompositionStart");St&&(_w&&c.locale!=="ko"&&(el||St!=="onCompositionStart"?St==="onCompositionEnd"&&el&&(it=pw()):(Ja=be,yg="value"in Ja?Ja.value:Ja.textContent,el=!0)),He=Df(he,St),0<He.length&&(St=new vw(St,o,null,c,be),Te.push({event:St,listeners:He}),it?St.data=it:(it=Ew(c),it!==null&&(St.data=it)))),(it=o3?a3(o,c):s3(o,c))&&(St=Df(he,"onBeforeInput"),0<St.length&&(He=new vw("onBeforeInput","beforeinput",null,c,be),Te.push({event:He,listeners:St}),He.data=it)),Q3(Te,o,he,c,be)}iR(Te,s)})}function au(o,s,c){return{instance:o,listener:s,currentTarget:c}}function Df(o,s){for(var c=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=Tc(o,c),v!=null&&h.unshift(au(o,v,_)),v=Tc(o,s),v!=null&&h.push(au(o,v,_))),o.tag===3)return h;o=o.return}return[]}function tD(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function cR(o,s,c,h,v){for(var _=s._reactName,k=[];c!==null&&c!==h;){var j=c,Q=j.alternate,he=j.stateNode;if(j=j.tag,Q!==null&&Q===h)break;j!==5&&j!==26&&j!==27||he===null||(Q=he,v?(he=Tc(c,_),he!=null&&k.unshift(au(c,he,Q))):v||(he=Tc(c,_),he!=null&&k.push(au(c,he,Q)))),c=c.return}k.length!==0&&o.push({event:s,listeners:k})}var nD=/\r\n?/g,rD=/\u0000|\uFFFD/g;function uR(o){return(typeof o=="string"?o:""+o).replace(nD,`
10
+ `).replace(rD,"")}function dR(o,s){return s=uR(s),uR(o)===s}function Gt(o,s,c,h,v,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Qi(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Qi(o,""+h);break;case"className":$d(o,"class",h);break;case"tabIndex":$d(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":$d(o,c,h);break;case"style":dw(o,h,_);break;case"data":if(s!=="object"){$d(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){o.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=zd(""+h),o.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(c,"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"&&(c==="formAction"?(s!=="input"&&Gt(o,s,"name",v.name,v,null),Gt(o,s,"formEncType",v.formEncType,v,null),Gt(o,s,"formMethod",v.formMethod,v,null),Gt(o,s,"formTarget",v.formTarget,v,null)):(Gt(o,s,"encType",v.encType,v,null),Gt(o,s,"method",v.method,v,null),Gt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=zd(""+h),o.setAttribute(c,h);break;case"onClick":h!=null&&(o.onclick=ya);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}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}c=zd(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);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(c,""+h):o.removeAttribute(c);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(c,""):o.removeAttribute(c);break;case"capture":case"download":h===!0?o.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,h):o.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(c,h):o.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(c):o.setAttribute(c,h);break;case"popover":vt("beforetoggle",o),vt("toggle",o),jd(o,"popover",h);break;case"xlinkActuate":va(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":va(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":va(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":va(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":va(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":va(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":va(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":va(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":va(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":jd(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=NP.get(c)||c,jd(o,c,h))}}function Jv(o,s,c,h,v,_){switch(c){case"style":dw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"children":typeof h=="string"?Qi(o,h):(typeof h=="number"||typeof h=="bigint")&&Qi(o,""+h);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nw.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),_=o[Tr]||null,_=_!=null?_[c]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(c in o?o[c]=null:o.hasAttribute(c)&&o.removeAttribute(c)),o.addEventListener(s,h,v);break e}c in o?o[c]=h:h===!0?o.setAttribute(c,""):jd(o,c,h)}}}function tr(o,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",o),vt("load",o);var h=!1,v=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var k=c[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,_,k,c,null)}}v&&Gt(o,s,"srcSet",c.srcSet,c,null),h&&Gt(o,s,"src",c.src,c,null);return;case"input":vt("invalid",o);var j=_=k=v=null,Q=null,he=null;for(h in c)if(c.hasOwnProperty(h)){var be=c[h];if(be!=null)switch(h){case"name":v=be;break;case"type":k=be;break;case"checked":Q=be;break;case"defaultChecked":he=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Gt(o,s,h,be,c,null)}}iw(o,_,j,Q,he,k,v,!1);return;case"select":vt("invalid",o),h=k=_=null;for(v in c)if(c.hasOwnProperty(v)&&(j=c[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Gt(o,s,v,j,c,null)}s=_,c=k,o.multiple=!!h,s!=null?Yi(o,!!h,s,!1):c!=null&&Yi(o,!!h,c,!0);return;case"textarea":vt("invalid",o),_=v=h=null;for(k in c)if(c.hasOwnProperty(k)&&(j=c[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:Gt(o,s,k,j,c,null)}cw(o,h,v,_);return;case"option":for(Q in c)c.hasOwnProperty(Q)&&(h=c[Q],h!=null)&&(Q==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Gt(o,s,Q,h,c,null));return;case"dialog":vt("beforetoggle",o),vt("toggle",o),vt("cancel",o),vt("close",o);break;case"iframe":case"object":vt("load",o);break;case"video":case"audio":for(h=0;h<ou.length;h++)vt(ou[h],o);break;case"image":vt("error",o),vt("load",o);break;case"details":vt("toggle",o);break;case"embed":case"source":case"link":vt("error",o),vt("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 c)if(c.hasOwnProperty(he)&&(h=c[he],h!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,he,h,c,null)}return;default:if(hg(s)){for(be in c)c.hasOwnProperty(be)&&(h=c[be],h!==void 0&&Jv(o,s,be,h,c,void 0));return}}for(j in c)c.hasOwnProperty(j)&&(h=c[j],h!=null&&Gt(o,s,j,h,c,null))}function oD(o,s,c,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,Q=null,he=null,be=null;for(ge in c){var Te=c[ge];if(c.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=Te;default:h.hasOwnProperty(ge)||Gt(o,s,ge,null,h,Te)}}for(var me in h){var ge=h[me];if(Te=c[me],h.hasOwnProperty(me)&&(ge!=null||Te!=null))switch(me){case"type":_=ge;break;case"name":v=ge;break;case"checked":he=ge;break;case"defaultChecked":be=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&&Gt(o,s,me,ge,h,Te)}}dg(o,k,j,Q,he,be,_,v);return;case"select":ge=k=j=me=null;for(_ in c)if(Q=c[_],c.hasOwnProperty(_)&&Q!=null)switch(_){case"value":break;case"multiple":ge=Q;default:h.hasOwnProperty(_)||Gt(o,s,_,null,h,Q)}for(v in h)if(_=h[v],Q=c[v],h.hasOwnProperty(v)&&(_!=null||Q!=null))switch(v){case"value":me=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==Q&&Gt(o,s,v,_,h,Q)}s=j,c=k,h=ge,me!=null?Yi(o,!!c,me,!1):!!h!=!!c&&(s!=null?Yi(o,!!c,s,!0):Yi(o,!!c,c?[]:"",!1));return;case"textarea":ge=me=null;for(j in c)if(v=c[j],c.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Gt(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=c[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":me=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Gt(o,s,k,v,h,_)}lw(o,me,ge);return;case"option":for(var $e in c)me=c[$e],c.hasOwnProperty($e)&&me!=null&&!h.hasOwnProperty($e)&&($e==="selected"?o.selected=!1:Gt(o,s,$e,null,h,me));for(Q in h)me=h[Q],ge=c[Q],h.hasOwnProperty(Q)&&me!==ge&&(me!=null||ge!=null)&&(Q==="selected"?o.selected=me&&typeof me!="function"&&typeof me!="symbol":Gt(o,s,Q,me,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 c)me=c[Ye],c.hasOwnProperty(Ye)&&me!=null&&!h.hasOwnProperty(Ye)&&Gt(o,s,Ye,null,h,me);for(he in h)if(me=h[he],ge=c[he],h.hasOwnProperty(he)&&me!==ge&&(me!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,s));break;default:Gt(o,s,he,me,h,ge)}return;default:if(hg(s)){for(var Zt in c)me=c[Zt],c.hasOwnProperty(Zt)&&me!==void 0&&!h.hasOwnProperty(Zt)&&Jv(o,s,Zt,void 0,h,me);for(be in h)me=h[be],ge=c[be],!h.hasOwnProperty(be)||me===ge||me===void 0&&ge===void 0||Jv(o,s,be,me,h,ge);return}}for(var ie in c)me=c[ie],c.hasOwnProperty(ie)&&me!=null&&!h.hasOwnProperty(ie)&&Gt(o,s,ie,null,h,me);for(Te in h)me=h[Te],ge=c[Te],!h.hasOwnProperty(Te)||me===ge||me==null&&ge==null||Gt(o,s,Te,me,h,ge)}function fR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aD(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var v=c[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&fR(k)){for(k=0,j=v.responseEnd,h+=1;h<c.length;h++){var Q=c[h],he=Q.startTime;if(he>j)break;var be=Q.transferSize,Te=Q.initiatorType;be&&fR(Te)&&(Q=Q.responseEnd,k+=be*(Q<j?1:(j-he)/(Q-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 ey=null,ty=null;function Lf(o){return o.nodeType===9?o:o.ownerDocument}function hR(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 pR(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 ny(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 ry=null;function sD(){var o=window.event;return o&&o.type==="popstate"?o===ry?!1:(ry=o,!0):(ry=null,!1)}var mR=typeof setTimeout=="function"?setTimeout:void 0,iD=typeof clearTimeout=="function"?clearTimeout:void 0,gR=typeof Promise=="function"?Promise:void 0,lD=typeof queueMicrotask=="function"?queueMicrotask:typeof gR<"u"?function(o){return gR.resolve(null).then(o).catch(cD)}:mR;function cD(o){setTimeout(function(){throw o})}function gs(o){return o==="head"}function vR(o,s){var c=s,h=0;do{var v=c.nextSibling;if(o.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(h===0){o.removeChild(v),Cl(s);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")su(o.ownerDocument.documentElement);else if(c==="head"){c=o.ownerDocument.head,su(c);for(var _=c.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Rc]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=k}}else c==="body"&&su(o.ownerDocument.body);c=v}while(c);Cl(s)}function yR(o,s){var c=o;o=0;do{var h=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(o===0)break;o--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||o++;c=h}while(c)}function oy(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":oy(c),cg(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}o.removeChild(c)}}function uD(o,s,c,h){for(;o.nodeType===1;){var v=c;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Rc])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 dD(o,s,c){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!c||(o=mo(o.nextSibling),o===null))return null;return o}function _R(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 ay(o){return o.data==="$?"||o.data==="$~"}function sy(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function fD(o,s){var c=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||c.readyState!=="loading")s();else{var h=function(){s(),c.removeEventListener("DOMContentLoaded",h)};c.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 iy=null;function bR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="/$"||c==="/&"){if(s===0)return mo(o.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}o=o.nextSibling}return null}function wR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return o;s--}else c!=="/$"&&c!=="/&"||s++}o=o.previousSibling}return null}function SR(o,s,c){switch(s=Lf(c),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 su(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);cg(o)}var go=new Map,ER=new Set;function jf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Pa=W.d;W.d={f:hD,r:pD,D:mD,C:gD,L:vD,m:yD,X:bD,S:_D,M:wD};function hD(){var o=Pa.f(),s=Cf();return o||s}function pD(o){var s=Zi(o);s!==null&&s.tag===5&&s.type==="form"?zS(s):Pa.r(o)}var xl=typeof document>"u"?null:document;function RR(o,s,c){var h=xl;if(h&&typeof s=="string"&&s){var v=io(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),ER.has(v)||(ER.add(v),o={rel:o,crossOrigin:c,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function mD(o){Pa.D(o),RR("dns-prefetch",o,null)}function gD(o,s){Pa.C(o,s),RR("preconnect",o,s)}function vD(o,s,c){Pa.L(o,s,c);var h=xl;if(h&&o&&s){var v='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+io(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+io(c.imageSizes)+'"]')):v+='[href="'+io(o)+'"]';var _=v;switch(s){case"style":_=Tl(o);break;case"script":_=Ol(o)}go.has(_)||(o=p({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:o,as:s},c),go.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(iu(_))||s==="script"&&h.querySelector(lu(_))||(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function yD(o,s){Pa.m(o,s);var c=xl;if(c&&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":_=Ol(o)}if(!go.has(_)&&(o=p({rel:"modulepreload",href:o},s),go.set(_,o),c.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(lu(_)))return}h=c.createElement("link"),tr(h,"link",o),qn(h),c.head.appendChild(h)}}}function _D(o,s,c){Pa.S(o,s,c);var h=xl;if(h&&o){var v=Ki(h).hoistableStyles,_=Tl(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(iu(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},c),(c=go.get(_))&&ly(o,c);var Q=k=h.createElement("link");qn(Q),tr(Q,"link",o),Q._p=new Promise(function(he,be){Q.onload=he,Q.onerror=be}),Q.addEventListener("load",function(){j.loading|=1}),Q.addEventListener("error",function(){j.loading|=2}),j.loading|=4,$f(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function bD(o,s){Pa.X(o,s);var c=xl;if(c&&o){var h=Ki(c).hoistableScripts,v=Ol(o),_=h.get(v);_||(_=c.querySelector(lu(v)),_||(o=p({src:o,async:!0},s),(s=go.get(v))&&cy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function wD(o,s){Pa.M(o,s);var c=xl;if(c&&o){var h=Ki(c).hoistableScripts,v=Ol(o),_=h.get(v);_||(_=c.querySelector(lu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=go.get(v))&&cy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function xR(o,s,c,h){var v=(v=X.current)?jf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Tl(c.href),c=Ki(v).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){o=Tl(c.href);var _=Ki(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(iu(o)))&&!_._p&&(k.instance=_,k.state.loading=5),go.has(o)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},go.set(o,c),_||SD(v,o,c,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=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ol(c),c=Ki(v).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Tl(o){return'href="'+io(o)+'"'}function iu(o){return'link[rel="stylesheet"]['+o+"]"}function TR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function SD(o,s,c,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",c),qn(s),o.head.appendChild(s))}function Ol(o){return'[src="'+io(o)+'"]'}function lu(o){return"script[async]"+o}function OR(o,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+io(c.href)+'"]');if(h)return s.instance=h,qn(h),h;var v=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),qn(h),tr(h,"style",v),$f(h,c.precedence,o),s.instance=h;case"stylesheet":v=Tl(c.href);var _=o.querySelector(iu(v));if(_)return s.state.loading|=4,s.instance=_,qn(_),_;h=TR(c),(v=go.get(v))&&ly(h,v),_=(o.ownerDocument||o).createElement("link"),qn(_);var k=_;return k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),s.state.loading|=4,$f(_,c.precedence,o),s.instance=_;case"script":return _=Ol(c.src),(v=o.querySelector(lu(_)))?(s.instance=v,qn(v),v):(h=c,(v=go.get(_))&&(h=p({},c),cy(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,$f(h,c.precedence,o));return s.instance}function $f(o,s,c){for(var h=c.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=c.nodeType===9?c.head:c,s.insertBefore(o,s.firstChild))}function ly(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function cy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var Uf=null;function CR(o,s,c){if(Uf===null){var h=new Map,v=Uf=new Map;v.set(c,h)}else v=Uf,h=v.get(c),h||(h=new Map,v.set(c,h));if(h.has(o))return h;for(h.set(o,null),c=c.getElementsByTagName(o),v=0;v<c.length;v++){var _=c[v];if(!(_[Rc]||_[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 AR(o,s,c){o=o.ownerDocument||o,o.head.insertBefore(c,s==="title"?o.querySelector("head > title"):null)}function ED(o,s,c){if(c===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 IR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function RD(o,s,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=Tl(h.href),_=s.querySelector(iu(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=zf.bind(o),s.then(o,o)),c.state.loading|=4,c.instance=_,qn(_);return}_=s.ownerDocument||s,h=TR(h),(v=go.get(v))&&ly(h,v),_=_.createElement("link"),qn(_);var k=_;k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),c.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(o.count++,c=zf.bind(o),s.addEventListener("load",c),s.addEventListener("error",c))}}var uy=0;function xD(o,s){return o.stylesheets&&o.count===0&&Ff(o,o.stylesheets),0<o.count||0<o.imgCount?function(c){var h=setTimeout(function(){if(o.stylesheets&&Ff(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&uy===0&&(uy=62500*aD());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Ff(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>uy?50:800)+s);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ff(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Vf=null;function Ff(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Vf=new Map,s.forEach(TD,o),Vf=null,zf.call(o))}function TD(o,s){if(!(s.state.loading&4)){var c=Vf.get(o);if(c)var h=c.get(null);else{c=new Map,Vf.set(o,c);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")&&(c.set(k.dataset.precedence,k),h=k)}h&&c.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=c.get(k)||h,_===h&&c.set(null,v),c.set(k,v),this.count++,h=zf.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 cu={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function OD(o,s,c,h,v,_,k,j,Q){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=dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.hiddenUpdates=dr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function NR(o,s,c,h,v,_,k,j,Q,he,be,Te){return o=new OD(o,s,c,k,Q,he,be,Te,j),s=1,_===!0&&(s|=24),_=Vr(3,null,null,s),o.current=_,_.stateNode=o,s=Bg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},Zg(_),o}function kR(o){return o?(o=ol,o):ol}function MR(o,s,c,h,v,_){v=kR(v),h.context===null?h.context=v:h.pendingContext=v,h=as(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=ss(o,h,s),c!==null&&(kr(c,o,s),Vc(c,o,s))}function PR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var c=o.retryLane;o.retryLane=c!==0&&c<s?c:s}}function dy(o,s){PR(o,s),(o=o.alternate)&&PR(o,s)}function DR(o){if(o.tag===13||o.tag===31){var s=ni(o,67108864);s!==null&&kr(s,o,67108864),dy(o,67108864)}}function LR(o){if(o.tag===13||o.tag===31){var s=Gr();s=qi(s);var c=ni(o,s);c!==null&&kr(c,o,s),dy(o,s)}}var Bf=!0;function CD(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=2,fy(o,s,c,h)}finally{W.p=_,B.T=v}}function AD(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=8,fy(o,s,c,h)}finally{W.p=_,B.T=v}}function fy(o,s,c,h){if(Bf){var v=hy(h);if(v===null)Xv(o,s,h,qf,c),$R(o,h);else if(ND(v,o,s,c,h))h.stopPropagation();else if($R(o,h),s&4&&-1<ID.indexOf(o)){for(;v!==null;){var _=Zi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=At(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var Q=1<<31-xn(k);j.entanglements[1]|=Q,k&=~Q}Xo(_),(Dt&6)===0&&(Tf=we()+500,ru(0))}}break;case 31:case 13:j=ni(_,2),j!==null&&kr(j,_,2),Cf(),dy(_,2)}if(_=hy(h),_===null&&Xv(o,s,h,qf,c),_===v)break;v=_}v!==null&&h.stopPropagation()}else Xv(o,s,h,null,c)}}function hy(o){return o=mg(o),py(o)}var qf=null;function py(o){if(qf=null,o=Gi(o),o!==null){var s=i(o);if(s===null)o=null;else{var c=s.tag;if(c===13){if(o=l(s),o!==null)return o;o=null}else if(c===31){if(o=u(s),o!==null)return o;o=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return qf=o,null}function jR(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 ot:return 32;case Ct:return 268435456;default:return 32}default:return 32}}var my=!1,vs=null,ys=null,_s=null,uu=new Map,du=new Map,bs=[],ID="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 $R(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":uu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(s.pointerId)}}function fu(o,s,c,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Zi(s),s!==null&&DR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function ND(o,s,c,h,v){switch(s){case"focusin":return vs=fu(vs,o,s,c,h,v),!0;case"dragenter":return ys=fu(ys,o,s,c,h,v),!0;case"mouseover":return _s=fu(_s,o,s,c,h,v),!0;case"pointerover":var _=v.pointerId;return uu.set(_,fu(uu.get(_)||null,o,s,c,h,v)),!0;case"gotpointercapture":return _=v.pointerId,du.set(_,fu(du.get(_)||null,o,s,c,h,v)),!0}return!1}function UR(o){var s=Gi(o.target);if(s!==null){var c=i(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){o.blockedOn=s,J1(o.priority,function(){LR(c)});return}}else if(s===31){if(s=u(c),s!==null){o.blockedOn=s,J1(o.priority,function(){LR(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){o.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Hf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var c=hy(o.nativeEvent);if(c===null){c=o.nativeEvent;var h=new c.constructor(c.type,c);pg=h,c.target.dispatchEvent(h),pg=null}else return s=Zi(c),s!==null&&DR(s),o.blockedOn=c,!1;s.shift()}return!0}function zR(o,s,c){Hf(o)&&c.delete(s)}function kD(){my=!1,vs!==null&&Hf(vs)&&(vs=null),ys!==null&&Hf(ys)&&(ys=null),_s!==null&&Hf(_s)&&(_s=null),uu.forEach(zR),du.forEach(zR)}function Gf(o,s){o.blockedOn===s&&(o.blockedOn=null,my||(my=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kD)))}var Zf=null;function VR(o){Zf!==o&&(Zf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zf===o&&(Zf=null);for(var s=0;s<o.length;s+=3){var c=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(py(h||c)===null)continue;break}var _=Zi(c);_!==null&&(o.splice(s,3),s-=3,hv(_,{pending:!0,data:v,method:c.method,action:h},h,v))}}))}function Cl(o){function s(Q){return Gf(Q,o)}vs!==null&&Gf(vs,o),ys!==null&&Gf(ys,o),_s!==null&&Gf(_s,o),uu.forEach(s),du.forEach(s);for(var c=0;c<bs.length;c++){var h=bs[c];h.blockedOn===o&&(h.blockedOn=null)}for(;0<bs.length&&(c=bs[0],c.blockedOn===null);)UR(c),c.blockedOn===null&&bs.shift();if(c=(o.ownerDocument||o).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var v=c[h],_=c[h+1],k=v[Tr]||null;if(typeof _=="function")k||VR(c);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[Tr]||null)j=k.formAction;else if(py(v)!==null)continue}else j=k.action;typeof j=="function"?c[h+1]=j:(c.splice(h,3),h-=3),VR(c)}}}function FR(){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(c,20)}function c(){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(c,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function gy(o){this._internalRoot=o}Kf.prototype.render=gy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Gr();MR(c,h,o,s,null,null)},Kf.prototype.unmount=gy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;MR(o.current,2,null,o,null,null),Cf(),s[Hi]=null}};function Kf(o){this._internalRoot=o}Kf.prototype.unstable_scheduleHydration=function(o){if(o){var s=ig();o={blockedOn:null,target:o,priority:s};for(var c=0;c<bs.length&&s!==0&&s<bs[c].priority;c++);bs.splice(c,0,o),c===0&&UR(o)}};var BR=t.version;if(BR!=="19.2.4")throw Error(r(527,BR,"19.2.4"));W.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 MD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wf.isDisabled&&Wf.supportsFiber)try{Rn=Wf.inject(MD),nn=Wf}catch{}}return pu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var c=!1,h="",v=YS,_=QS,k=XS;return s!=null&&(s.unstable_strictMode===!0&&(c=!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=NR(o,1,!1,null,null,c,h,null,v,_,k,FR),o[Hi]=s.current,Qv(o),new gy(s)},pu.hydrateRoot=function(o,s,c){if(!a(o))throw Error(r(299));var h=!1,v="",_=YS,k=QS,j=XS,Q=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(k=c.onCaughtError),c.onRecoverableError!==void 0&&(j=c.onRecoverableError),c.formState!==void 0&&(Q=c.formState)),s=NR(o,1,!0,s,c??null,h,v,Q,_,k,j,FR),s.context=kR(null),c=s.current,h=Gr(),h=qi(h),v=as(h),v.callback=null,ss(c,v,h),c=h,s.current.lanes=c,It(s,c),Xo(s),o[Hi]=s.current,Qv(o),new Kf(s)},pu.version="19.2.4",pu}var ex;function HD(){if(ex)return yy.exports;ex=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(),yy.exports=qD(),yy.exports}var GD=HD(),A=Zs();const ee=Ga(A),db=DD({__proto__:null,default:ee},[A]);var Ey={exports:{}},Ry={};var tx;function ZD(){if(tx)return Ry;tx=1;var e=Zs().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ry.c=function(t){return e.H.useMemoCache(t)},Ry}var nx;function KD(){return nx||(nx=1,Ey.exports=ZD()),Ey.exports}var gc=KD(),md=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(){}},WD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},YD=class{#e=WD;#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)}},xi=new YD;function QD(e){setTimeout(e,0)}var Mi=typeof window>"u"||"Deno"in globalThis;function Lr(){}function XD(e,t){return typeof e=="function"?e(t):e}function G0(e){return typeof e=="number"&&e>=0&&e!==1/0}function FC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ds(e,t){return typeof e=="function"?e(t):e}function bo(e,t){return typeof e=="function"?e(t):e}function rx(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==fb(l,t.options))return!1}else if(!Qu(t.queryKey,l))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 ox(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Yu(t.options.mutationKey)!==Yu(i))return!1}else if(!Qu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function fb(e,t){return(t?.queryKeyHashFn||Yu)(e)}function Yu(e){return JSON.stringify(e,(t,n)=>K0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Qu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qu(e[n],t[n])):!1}var JD=Object.prototype.hasOwnProperty;function BC(e,t){if(e===t)return e;const n=ax(e)&&ax(t);if(!n&&!(K0(e)&&K0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),l=i.length,u=n?new Array(l):{};let d=0;for(let f=0;f<l;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:JD.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=BC(p,g);u[m]=y,y===p&&d++}return a===l&&d===a?e:u}function Z0(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 ax(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function K0(e){if(!sx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!sx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sx(e){return Object.prototype.toString.call(e)==="[object Object]"}function e5(e){return new Promise(t=>{xi.setTimeout(t,e)})}function W0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?BC(e,t):t}function Fre(e){return e}function t5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function n5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var hb=Symbol();function qC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===hb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function r5(e,t){return typeof e=="function"?e(...t):!!e}var o5=class extends md{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Mi&&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"}},pb=new o5;function Y0(){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 a5=QD;function s5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=a5;const i=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{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||l()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var or=s5(),i5=class extends md{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Mi&&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}},xp=new i5;function l5(e){return Math.min(1e3*2**e,3e4)}function HC(e){return(e??"online")==="online"?xp.isOnline():!0}var Q0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function GC(e){let t=!1,n=0,r;const a=Y0(),i=()=>a.status!=="pending",l=S=>{if(!i()){const b=new Q0(S);g(b),e.onCancel?.(b)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>pb.isFocused()&&(e.networkMode==="always"||xp.isOnline())&&e.canRun(),m=()=>HC(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??(Mi?0:3),T=e.retryDelay??l5,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),e5(O).then(()=>f()?void 0:y()).then(()=>{t?g(E):w()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?w():y().then(w),a)}}var ZC=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),G0(this.gcTime)&&(this.#e=xi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Mi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(xi.clearTimeout(this.#e),this.#e=void 0)}},c5=class extends ZC{#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=lx(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=lx(this.options);t.data!==void 0&&(this.setState(ix(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=W0(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===hb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ds(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:!FC(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=qC(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)},l=(()=>{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(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#a({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=GC({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof Q0&&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:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.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 Q0){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,...KC(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ix(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 KC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:HC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ix(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lx(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 u5=class extends md{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=Y0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return X0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return X0(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&&!Z0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ux(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)||Ds(this.options.staleTime,this.#t)!==Ds(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.#l)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return f5(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=Ds(this.options.staleTime,this.#t);if(Mi||this.#o.isStale||!G0(e))return;const n=FC(this.#o.dataUpdatedAt,e)+1;this.#c=xi.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.#l=e,!(Mi||bo(this.options.enabled,this.#t)===!1||!G0(this.#l)||this.#l===0)&&(this.#u=xi.setInterval(()=>{(this.options.refetchIntervalInBackground||pb.isFocused())&&this.#d()},this.#l))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#c&&(xi.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(xi.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,l=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&&cx(e,t),K=P&&ux(e,n,t,r);($||K)&&(m={...m,...KC(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===l?.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=W0(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=W0(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:mb(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=Y0();P(V)},K=this.#s;switch(K.status){case"pending":e.queryHash===n.queryHash&&P(K);break;case"fulfilled":(N.status==="error"||N.data!==K.value)&&$();break;case"rejected":(N.status!=="error"||N.error!==K.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),Z0(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(l=>{const u=l;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 d5(e,t){return bo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function cx(e,t){return d5(e,t)||e.state.data!==void 0&&X0(e,t,t.refetchOnMount)}function X0(e,t,n){if(bo(t.enabled,e)!==!1&&Ds(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&mb(e,t)}return!1}function ux(e,t,n,r){return(e!==t||bo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&mb(e,n)}function mb(e,t){return bo(t.enabled,e)!==!1&&e.isStaleByTime(Ds(t.staleTime,e))}function f5(e,t){return!Z0(e.getCurrentResult(),t)}function dx(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=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=qC(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?n5:t5;return{pages:C(w.pages,T,O),pageParams:C(w.pageParams,S,O)}};if(a&&i.length){const w=a==="backward",S=w?WC:J0,b={pages:i,pageParams:l},E=S(r,b);u=await y(b,E,w)}else{const w=e??i.length;do{const S=d===0?l[0]??r.initialPageParam:J0(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 J0(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 WC(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Bre(e,t){return t?J0(e,t)!=null:!1}function qre(e,t){return!t||!e.getPreviousPageParam?!1:WC(e,t)!=null}var h5=class extends ZC{#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||p5(),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=GC({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},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 l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,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 p5(){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 md{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 h5({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=Yf(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=Yf(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=Yf(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=Yf(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=>ox(t,n))}findAll(e={}){return this.getAll().filter(t=>ox(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 Yf(e){return e.options.scope?.id}var g5=class extends md{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??fb(r,t);let i=this.get(a);return i||(i=new c5({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=>rx(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>rx(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()})})}},v5=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new g5,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=pb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=xp.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(Ds(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,l=XD(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...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(Ds(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=dx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=dx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xp.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(Yu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Qu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Yu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Qu(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=fb(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===hb&&(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()}},YC=A.createContext(void 0),y5=e=>{const t=A.useContext(YC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_5=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(YC.Provider,{value:e,children:t})),QC=A.createContext(!1),b5=()=>A.useContext(QC);QC.Provider;function w5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var S5=A.createContext(w5()),E5=()=>A.useContext(S5),R5=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},x5=e=>{A.useEffect(()=>{e.clearReset()},[e])},T5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||r5(n,[e.error,r])),O5=(e,t)=>t.state.data===void 0,C5=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))}},A5=(e,t)=>e.isLoading&&e.isFetching&&!t,I5=(e,t)=>e?.suspense&&t.isPending,fx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function N5(e,t,n){const r=b5(),a=E5(),i=y5(n),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",C5(l),R5(l,a),x5(a);const u=!i.getQueryCache().get(l.queryHash),[d]=A.useState(()=>new t(i,l)),f=d.getOptimisticResult(l),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(l)},[l,d]),I5(l,f))throw fx(l,d,a);if(T5({result:f,errorResetBoundary:a,throwOnError:l.throwOnError,query:i.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,f),l.experimental_prefetchInRender&&!Mi&&A5(f,r)&&(u?fx(l,d,a):i.getQueryCache().get(l.queryHash)?.promise)?.catch(Lr).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?f:d.trackResult(f)}function XC(e,t){return N5({...e,enabled:!0,suspense:!0,throwOnError:O5,placeholderData:void 0},u5,t)}const JC={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["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],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],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]},eA=A.createContext(void 0);async function k5(){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 M5(e){const t=gc.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:JC.authConfig(),queryFn:k5,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=XC(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(eA.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function Hre(){const e=A.useContext(eA);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const e_=new WeakMap,P5=new WeakMap,Tp={current:[]};let xy=!1,Uu=0;const Au=new Set,Qf=new Map;function tA(e){for(const t of e){if(Tp.current.includes(t))continue;Tp.current.push(t),t.recompute();const n=P5.get(t);if(n)for(const r of n){const a=e_.get(r);a?.length&&tA(a)}}}function D5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function L5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function nA(e){if(Uu>0&&!Qf.has(e)&&Qf.set(e,e.prevState),Au.add(e),!(Uu>0)&&!xy)try{for(xy=!0;Au.size>0;){const t=Array.from(Au);Au.clear();for(const n of t){const r=Qf.get(n)??n.prevState;n.prevState=r,D5(n)}for(const n of t){const r=e_.get(n);r&&(Tp.current.push(n),tA(r))}for(const n of t){const r=e_.get(n);if(r)for(const a of r)L5(a)}}}finally{xy=!1,Tp.current=[],Qf.clear()}}function zu(e){Uu++;try{e()}finally{if(Uu--,Uu===0){const t=Au.values().next().value;t&&nA(t)}}}function j5(e){return typeof e=="function"}class $5{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const l=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),l?.()}},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):j5(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),nA(this)}}const Ls="__TSR_index",hx="popstate",px="beforeunload";function U5(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:l}))},a=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},i=async({task:l,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){l();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=Op(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,u,d)=>{const f=t.state[Ls];u=mx(f+1,u),i({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Ls];u=mx(f,u),i({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{i({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ls]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function mx(e,t){t||(t={});const n=gb();return{...t,key:n,__TSR_key:n,[Ls]:e}}function z5(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,l=P=>a=P,u=(P=>P),d=(()=>Op(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=gb();t.history.replaceState({[Ls]: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,$,K)=>{const V=u($);E||(m=f),f=Op($,K),b={href:V,state:K,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[Ls]-f.state[Ls],K=$===1,V=$===-1,G=!K&&!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 B of le)if(await B.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 K=i();if(typeof document<"u"&&K.length)for(const V of K){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=U5({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(px,I,{capture:!0}),t.removeEventListener(hx,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(px,I,{capture:!0}),t.addEventListener(hx,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 Op(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=gb();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||{[Ls]:0,key:a,__TSR_key:a}}}function gb(){return(Math.random()+1).toString(36).substring(7)}function Cp(e){return e[e.length-1]}function V5(e){return typeof e=="function"}function Ai(e,t){return V5(e)?e(t):e}const F5=Object.prototype.hasOwnProperty;function _o(e,t){if(e===t)return e;const n=t,r=yx(e)&&yx(n);if(!r&&!(Ap(e)&&Ap(n)))return n;const a=r?e:gx(e);if(!a)return n;const i=r?n:gx(n);if(!i)return n;const l=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<l:F5.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 l===u&&f===l?e:d}function gx(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 Ap(e){if(!vx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!vx(n)||!n.hasOwnProperty("isPrototypeOf"))}function vx(e){return Object.prototype.toString.call(e)==="[object Object]"}function yx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ii(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(!Ii(e[r],t[r],n))return!1;return!0}if(Ap(e)&&Ap(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Ii(e[l],t[l],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&a++;let i=0;for(const l in t)if((!r||t[l]!==void 0)&&(i++,i>a||!Ii(e[l],t[l],n)))return!1;return a===i}return!1}function oc(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 B5(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 js(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function _x(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function bx(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=_x(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+_x(r?e.slice(r):e)}var q5="Invariant failed";function Fa(e,t){if(!e)throw new Error(q5)}function Ip(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 l=t.get(i);if(l)return a(l),l.value},set(i,l){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=l,a(u);else{const d={key:i,value:l,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 ac=0,Pi=1,Di=2,Xu=3,H5=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,G5=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Z5=/^([^{]*)\{\$\}([^}]*)$/;function vb(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]=ac,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]=Di,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=Pi,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const l=i.match(Z5);if(l){const m=l[1].length;return n[0]=Di,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(G5);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Xu,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(H5);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=Pi,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]=ac,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function Em(e,t,n,r,a,i,l){l?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=vb(d,u,t);let g;const y=u,w=p[5];switch(u=w+1,i++,p[0]){case ac:{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=Ju(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=Ju(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(E,T)}}break}case Pi:{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=Oy(Pi,n.fullPath??n.from,R,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Xu:{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=Oy(Xu,n.fullPath??n.from,R,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Di:{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=Oy(Di,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)Em(e,t,d,u,a,i,l)}function Ty(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 Ei(e){if(e.static)for(const t of e.static.values())Ei(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ei(t);if(e.dynamic?.length){e.dynamic.sort(Ty);for(const t of e.dynamic)Ei(t)}if(e.optional?.length){e.optional.sort(Ty);for(const t of e.optional)Ei(t)}if(e.wildcard?.length){e.wildcard.sort(Ty);for(const t of e.wildcard)Ei(t)}}function Ju(e){return{kind:ac,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Oy(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 K5(e,t){const n=Ju("/"),r=new Uint16Array(6);for(const a of e)Em(!1,r,a,1,n,0);Ei(n),t.masksTree=n,t.flatCache=Ip(1e3)}function W5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=yb(e,t.masksTree);return t.flatCache.set(e,r),r}function Y5(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let l=a.singleCache.get(i);if(!l){l=Ju("/");const u=new Uint16Array(6);Em(t,u,{from:e},1,l,0),a.singleCache.set(i,l)}return yb(r,l,n)}function Q5(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=yb(e,t.segmentTree,n);return i&&(i.branch=t6(i.route)),t.matchCache.set(r,i),i}function X5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function J5(e,t=!1,n){const r=Ju(e.fullPath),a=new Uint16Array(6),i={},l={};let u=0;return Em(t,a,e,1,r,0,f=>{if(n?.(f,u),Fa(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=X5(f.fullPath);(!l[m]||f.fullPath.endsWith("/"))&&(l[m]=f)}u++}),Ei(r),{processedTree:{segmentTree:r,singleCache:Ip(1e3),matchCache:Ip(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function yb(e,t,n=!1){const r=e.split("/"),a=r6(e,r,t,n);if(!a)return null;const i=e6(e,r,a),l="**"in a;return l&&(i["**"]=a["**"]),{route:l?a.node.notFound??a.node.route:a.node.route,params:i}}function e6(e,t,n){const r=n6(n.node);let a=null;const i={};for(let l=0,u=0,d=0;u<r.length;l++,u++,d++){const f=r[u],m=t[l],p=d;if(m&&(d+=m.length),f.kind===Pi){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===Xu){if(n.skipped&1<<u){l--;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===Di){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 t6(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function n6(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function r6(e,t,n,r){const a=!Cp(t),i=a&&e!=="/",l=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&&Xf(f,p)&&(f=p);const T=y===l;if(T){if(g.route&&(!i||g.isIndex)&&(Xf(m,p)&&(m=p),b===l&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&Xf(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:K,suffix:V}=$;if(K||V){const G=$.caseSensitive?O:C??=O.toLowerCase();if(K&&!G.startsWith(K)||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 K=N.caseSensitive?O:C??=O.toLowerCase();if(P&&!K.startsWith(P)||$&&!K.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 Xf(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 Xf(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 fp(e){return _b(e.filter(t=>t!==void 0).join("/"))}function _b(e){return e.replace(/\/{2,}/g,"/")}function rA(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ni(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function hp(e){return Ni(rA(e))}function Np(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function o6(e,t,n){return Np(e,n)===Np(t,n)}function a6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let l;if(r){l=a?t:i?e:e+"\0"+t;const p=r.get(l);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&&Cp(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&&(Cp(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=vb(g,0,d);const y=d[0];if(y===ac){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===Pi?f+=S||b?`${S}{$${E}}${b}`:`$${E}`:y===Di?f+=S||b?`${S}{$}${b}`:"$":f+=`${S}{-$${E}}${b}`}f=_b(f);const m=f||"/";return l&&r&&r.set(l,m),m}function Cy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):s6(r,n)}function Ay({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 l=0,u,d="";for(;l<i;){const m=l;u=vb(e,m,u);const p=u[5];if(l=p+1,m===p)continue;const g=u[0];if(g===ac){d+="/"+e.substring(m,p);continue}if(g===Di){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=Cy("_splat",t,n);d+="/"+w+b+S;continue}if(g===Pi){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=Cy(y,t,n)??"undefined";d+="/"+w+b+S;continue}if(g===Xu){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=Cy(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 i6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const kp="tsr-scroll-restoration-v1_3",l6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function c6(){const e=i6();if(!e)return null;const t=e.getItem(kp);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ai(r,n)||n,e.setItem(kp,JSON.stringify(n)))}}const Jf=c6(),t_=e=>e.state.__TSR_key||e.href;function u6(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 Mp=!1;function oA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=l[u];Mp=!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)}}Mp=!1}function d6(e,t){if(!Jf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Jf))return;e.isScrollRestorationSetup=!0,Mp=!1;const r=e.options.getScrollRestorationKey||t_;window.history.scrollRestoration="manual";const a=i=>{if(Mp||!e.isScrollRestoring)return;let l="";if(i.target===document||i.target===window)l="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=u6(i.target)}const u=r(e.state.location);Jf.set(d=>{const f=d[u]||={},m=f[l]||={};if(l==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(l){const p=document.querySelector(l);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",l6(a,100),!0),e.subscribe("onRendered",i=>{const l=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(oA({storageKey:kp,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Jf.set(u=>(u[l]||={},u)))})}function f6(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 h6(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 Iy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function p6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Iy(a):Array.isArray(i)?i.push(Iy(a)):n[r]=[i,Iy(a)]}return n}const m6=v6(JSON.parse),g6=y6(JSON.stringify,JSON.parse);function v6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=p6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function y6(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=h6(a,r);return i?`?${i}`:""}}const Yr="__root__";function bb(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 Fo(e){return e instanceof Response&&!!e.options}const pp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Rm=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),aA=(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),Fa(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Fa(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,aA(e,t))},Ms=(e,t,n)=>{if(!(!Fo(n)&&!So(n))){if(Fo(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=Fo(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 Fo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(aA(e,n),n)}},sA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},mu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Ms(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,Ms(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}))},_6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,l=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Yr;return}if(l?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&l?.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:eh(f,a.searchError),params:eh(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:eh(y.search,y.searchError),params:eh(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(js(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},iA=(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&&!Rm(e,t)&&(n.options.loader||n.options.beforeLoad||uA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{pp(e)},a);r._nonReactive.pendingTimeout=l}},b6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;iA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Ms(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},w6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=oc(()=>{i?.resolve()});const{paramsError:l,searchError:u}=a;l&&mu(e,n,l,"PARSE_PARAMS"),u&&mu(e,n,u,"VALIDATE_SEARCH"),iA(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){zu(()=>{w(),S()});return}a._nonReactive.beforeLoadPromise=oc();const{search:b,params:E,cause:R}=a,T=Rm(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){zu(()=>{w(),S()});return}(Fo(N)||So(N))&&(w(),mu(e,n,N,"BEFORE_LOAD")),zu(()=>{w(),e.updateMatch(t,P=>({...P,__beforeLoadContext:N,context:{...P.context,...N}})),S()})};let I;try{if(I=r.options.beforeLoad(O),js(I))return w(),I.catch(N=>{mu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){w(),mu(e,n,N,"BEFORE_LOAD")}C(I)},S6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=_6(e,n,t,a);if(js(d))return d.then(u)}return u()},l=()=>w6(e,n,t,a),u=()=>{if(sA(e,n))return;const d=b6(e,n,a);return js(d)?d.then(l):l()};return i()},Vu=(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,l,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},lA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:l,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=Rm(e,t);return{params:i,deps:l,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}},wx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&cA(r);const i=r.options.loader?.(lA(e,t,n,r)),l=r.options.loader&&js(i);if((l||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=l?await i:i;Ms(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=Vu(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 l=i;const u=a._nonReactive.minPendingPromise;u&&await u,So(i)&&await r.options.notFoundComponent?.preload?.(),Ms(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){l=m,Ms(e,e.router.getMatch(t),m)}const d=Vu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const l=Vu(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}Ms(e,i,a)}},E6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const l=e.router.looseRoutesById[r];if(sA(e,n)){if(e.router.isServer){const f=Vu(e,n,l);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&&Ms(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Rm(e,n),g=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,y=l.options.shouldReload,w=typeof y=="function"?y(lA(e,n,t,l)):y,S=!!p&&!e.router.state.matches.some(T=>T.id===n),b=e.router.getMatch(n);b._nonReactive.loaderPromise=oc(),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&&l.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await wx(e,n,t,l);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Fo(T)&&await e.router.navigate(T.options)}})();else if(E!=="success"||a&&e.sync)await wx(e,n,t,l);else{const T=Vu(e,n,l);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 Sx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&pp(t);try{for(let a=0;a<t.matches.length;a++){const i=S6(t,a);js(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(E6(t,a));await Promise.all(t.matchPromises);const r=pp(t);js(r)&&await r}catch(n){if(So(n)&&!t.preload){const r=pp(t);throw js(r)&&await r,n}if(Fo(n))throw n}return t.matches}async function cA(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 dA){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 eh(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function uA(e){for(const t of dA)if(e.options[t]?.preload)return!0;return!1}const dA=["component","errorComponent","pendingComponent","notFoundComponent"];function R6(e){return{input:({url:t})=>{for(const n of e)t=fA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=hA(e[n],t);return t}}}function x6(e){const t=hp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===a?l.pathname="/":u.startsWith(i)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=fp(["/",t,l.pathname]),l)}}function fA(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 hA(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 ki(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 T6{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,l=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=z5())),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 $5(C6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),d6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||l!==f){this.basepath=d;const g=[];hp(d)!==""&&g.push(x6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:R6(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}=J5(this.routeTree,this.options.caseSensitive,(l,u)=>{l.init({originalIndex:u})});this.options.routeMasks&&K5(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=fA(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:bx(S),searchStr:y,search:_o(r?.search,g),hash:b.split("#").reverse()[0]??"",state:_o(r?.state,f)}},i=a(n),{__tempLocation:l,__tempKey:u}=i.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);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=Ip(1e3),this.resolvePathWithBase=(n,r)=>a6({base:n,to:_b(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=>A6({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 l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=Cp(u);i.from;const f=i.unsafeRelative==="path"?l.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,Ai(i.params,g)),S=Ay({path:y,params:w}).interpolatedPath,b=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(w).length>0)for(const K of b){const V=K.options.params?.stringify??K.options.stringifyParams;V&&Object.assign(w,V(w))}const E=n.leaveParams?y:bx(Ay({path:y,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let R=p;if(n._includeValidateSearch&&this.options.search?.strict){const K={};b.forEach(V=>{if(V.options.validateSearch)try{Object.assign(K,n_(V.options.validateSearch,{...K,...R}))}catch{}}),R=K}R=I6({search:R,dest:i,destRoutes:b,_includeValidateSearch:n._includeValidateSearch}),R=_o(p,R);const T=this.options.stringifySearch(R),O=i.hash===!0?l.hash:i.hash?Ai(i.hash,l.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?l.state:i.state?Ai(i.state,l.state):{};I=_o(l.state,I);const N=`${E}${T}${C}`,P=new URL(N,this.origin),$=hA(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={},l)=>{const u=r(i);let d=l?r(l):void 0;if(!d){const f={};if(this.options.routeMasks){const m=W5(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;l={from:n.from,...g,params:f},d=r(l)}}}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=Ii(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Ni(this.latestLocation.href)===Ni(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=oc(()=>{u?.resolve()}),l&&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:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Op(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:l});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(hp(a(this.latestLocation.href))!==hp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),bb({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",...ki({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...ki({resolvedLocation:f,location:d})}),await Sx({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=[];zu(()=>{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){Fo(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 l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(u=>u.status==="error")&&(l=500),l!==void 0&&this.__store.setState(u=>({...u,statusCode:l}))},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,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(ki({resolvedLocation:l,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(l=>l.id===n?r(l):l)}))})},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=cA,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)),l=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);zu(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await Sx({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(Fo(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=Y5(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Ii(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ii(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??g6,parseSearch:t.parseSearch??m6}),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:l}=r,u=!1;(a?a.path!=="/"&&i["**"]:Ni(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=l.length-1;p>=0;p--){const g=l[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 l.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=n_(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let B=le;if(le instanceof Pp||(B=new Pp(le.message,{cause:le})),n?.throwOnError)throw B;return[U,{},B]}})(),E=p.options.loaderDeps?.({search:w})??"",R=E?JSON.stringify(E):"",{interpolatedPath:T,usedParams:O}=Ay({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)||Fo(J)?$=J:$=new O6(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const K=N?"stay":"enter";let V;if(I)V={...I,cause:K,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||uA(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:oc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:K,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 Pp extends Error{}class O6 extends Error{}function C6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function n_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Pp("Async validation not supported");if(n.issues)throw new Pp(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 A6({pathname:e,routesById:t,processedTree:n}){const r={},a=Ni(e);let i;const l=Q5(a,n,!0);return l&&(i=l.route,Object.assign(r,l.params)),{matchedRoutes:l?.branch||[t[Yr]],routeParams:r,foundRoute:i}}function I6({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,...n_(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:Ai(t.search,u):{};a.push(i);const l=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>l(u+1,p)})};return l(0,e)}const N6="Error preloading route! ☝️";class pA{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||Fa(!1);let i=a?Yr:r?.path;i&&i!=="/"&&(i=rA(i));const l=r?.id||i;let u=a?Yr:fp([this.parentRoute.id===Yr?"":this.parentRoute.id,l]);i===Yr&&(i="/"),u!==Yr&&(u=fp(["/",u]));const d=u===Yr?"/":fp([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 k6 extends pA{constructor(t){super(t)}}function wb(e){const t=e.errorComponent??xm;return x.jsx(M6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class M6 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 xm({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 P6({children:e,fallback:t=null}){return D6()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function D6(){return ee.useSyncExternalStore(L6,()=>!0,()=>!1)}function L6(){return()=>{}}var Ny={exports:{}},ky={},My={exports:{}},Py={};var Ex;function j6(){if(Ex)return Py;Ex=1;var e=Zs();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,l=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]),l(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 Py.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Py}var Rx;function mA(){return Rx||(Rx=1,My.exports=j6()),My.exports}var xx;function $6(){if(xx)return ky;xx=1;var e=Zs(),t=mA();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,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return ky.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 l(function(){S.hasValue=!0,S.value=b},[b]),d(b),b},ky}var Tx;function U6(){return Tx||(Tx=1,Ny.exports=$6()),Ny.exports}var gA=U6();const Gre=Ga(gA);function z6(e,t=r=>r,n={}){const r=n.equal??V6;return gA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function V6(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=Ox(e);if(n.length!==Ox(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 Ox(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dy=A.createContext(null);function vA(){return typeof document>"u"?Dy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dy,Dy)}function Ur(e){const t=A.useContext(vA());return e?.warn,t}function Er(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return z6(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 Tm=A.createContext(void 0),F6=A.createContext(void 0);function la(e){const t=A.useContext(e.from?F6:Tm);return Er({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Fa(!((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 Sb(e){return la({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Eb(e){const{select:t,...n}=e;return la({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Ql(e){return la({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 Om(e){return la({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Iu=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Ly(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 B6(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 q6(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function vc(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Zre(e){const t=Ur(),n=vc(),r=A.useRef(null);return Iu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Cm=VC();const yA=Ga(Cm);function H6(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),l=q6(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:K,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:le,state:B,mask:W,reloadDocument:Y,unsafeRelative:pe,from:ae,_fromLocation:M,...q}=e,F=Er({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,z=A.useMemo(()=>({...e,from:L}),[n,F,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=A.useMemo(()=>n.buildLocation({...z}),[n,z]),de=A.useMemo(()=>{if(O)return;let oe=X.maskedLocation?X.maskedLocation.url:X.url,we=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":we=!0),{href:oe,external:we}},[O,X.maskedLocation,X.url,n.origin,n.history]),ve=A.useMemo(()=>{if(de?.external)return de.href;try{return new URL(m),m}catch{}},[m,de]),Ie=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ae=g??n.options.defaultPreloadDelay??0,H=Er({select:oe=>{if(ve)return!1;if(f?.exact){if(!o6(oe.location.pathname,X.pathname,n.basepath))return!1}else{const we=Np(oe.location.pathname,n.basepath),xe=Np(X.pathname,n.basepath);if(!(we.startsWith(xe)&&(we.length===xe.length||we[xe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ii(oe.location.search,X.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===X.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(N6)})},[n,z]),_e=A.useCallback(oe=>{oe?.isIntersecting&&ne()},[ne]);B6(l,_e,Y6,{disabled:!!O||Ie!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ie==="render"&&(ne(),i.current=!0)},[O,ne,Ie]);const se=oe=>{const we=oe.currentTarget.getAttribute("target"),xe=T!==void 0?T:we;if(!O&&!Q6(oe)&&!oe.defaultPrevented&&(!xe||xe==="_self")&&oe.button===0){oe.preventDefault(),Cm.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:l,href:ve,...R&&{children:R},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...P&&{onFocus:P},...$&&{onMouseEnter:$},...K&&{onMouseLeave:K},...V&&{onTouchStart:V}};const ue=oe=>{O||Ie&&ne()},Oe=ue,Pe=oe=>{if(!(O||!Ie))if(!Ae)ne();else{const we=oe.target;if(gu.has(we))return;const xe=setTimeout(()=>{gu.delete(we),ne()},Ae);gu.set(we,xe)}},Xe=oe=>{if(O||!Ie||!Ae)return;const we=oe.target,xe=gu.get(we);xe&&(clearTimeout(xe),gu.delete(we))},Fe=H?Ai(u,{})??G6:jy,We=H?jy:Ai(d,{})??jy,Z=[I,Fe.className,We.className].filter(Boolean).join(" "),re=(C||Fe.style||We.style)&&{...C,...Fe.style,...We.style};return{...q,...Fe,...We,href:de?.href,ref:l,onClick:vu([N,se]),onFocus:vu([P,ue]),onMouseEnter:vu([$,Pe]),onMouseLeave:vu([K,Xe]),onTouchStart:vu([V,Oe]),disabled:!!O,target:T,...re&&{style:re},...Z&&{className:Z},...O&&Z6,...H&&K6,...r&&W6}}const jy={},G6={className:"active"},Z6={role:"link","aria-disabled":!0},K6={"data-status":"active","aria-current":"page"},W6={"data-transitioning":"transitioning"},gu=new WeakMap,Y6={rootMargin:"100px"},vu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Am=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...l}=H6(r,t),u=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,A.createElement(n||"a",{...l,ref:i},u)});function Q6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class X6 extends pA{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Om({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ql({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Eb({...n,from:this.id}),this.useLoaderData=n=>Sb({...n,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Am,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function en(e){return new X6(e)}class J6 extends k6{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Om({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ql({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Eb({...n,from:this.id}),this.useLoaderData=n=>Sb({...n,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Am,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function eL(e){return new J6(e)}function Cx(e){return typeof e=="object"?new Ax(e,{silent:!0}).createRoute(e):new Ax(e,{silent:!0}).createRoute}class Ax{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=en(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Ix{constructor(t){this.useMatch=n=>la({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Om({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Ql({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Eb({...n,from:this.options.id}),this.useLoaderData=n=>Sb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return vc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Nx(e){return typeof e=="object"?new Ix(e):t=>new Ix({id:e,...t})}function un(e,t){let n,r,a,i;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,B5(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 l();return A.createElement(r,f)};return u.preload=l,u}function tL(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=Ly(i),u=i||n||a,d=Ly(u),f=i||a,m=Ly(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 Ni(e.latestLocation.href)!==Ni(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Iu(()=>{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]),Iu(()=>{l&&!i&&e.emit({type:"onLoad",...ki(e.state)})},[l,e,i]),Iu(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...ki(e.state)})},[f,m,e]),Iu(()=>{if(d&&!u){const p=ki(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&f6(e)}},[u,d,e]),null}function nL(e){const t=Er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(wb,{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 rL(){return x.jsx("p",{children:"Not Found"})}function Vl(e){return x.jsx(x.Fragment,{children:e.children})}function _A(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(rL,{})}function oL({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 aL(){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||t_)(e.latestLocation),r=n!==t_(e.latestLocation)?n:void 0,a={storageKey:kp,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(oL,{children:`(${oA.toString()})(${JSON.stringify(a)})`})}const bA=A.memo(function({matchId:t}){const n=Ur(),r=Er({select:E=>{const R=E.matches.find(T=>T.id===t);return Fa(R),{routeId:R.routeId,ssr:R.ssr,_displayPending:R._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,l=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:Vl,g=u?wb:Vl,y=f?nL:Vl,w=Er({select:E=>E.loadedAt}),S=Er({select:E=>{const R=E.matches.findIndex(T=>T.id===t);return E.matches[R-1]?.routeId}}),b=a.isRoot?a.options.shellComponent??Vl:Vl;return x.jsxs(b,{children:[x.jsx(Tm.Provider,{value:t,children:x.jsx(p,{fallback:l,children:x.jsx(g,{getResetKey:()=>w,errorComponent:u||xm,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(P6,{fallback:l,children:x.jsx(kx,{matchId:t})}):x.jsx(kx,{matchId:t})})})})}),S===Yr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(sL,{}),x.jsx(aL,{})]}):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",...ki(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const kx=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Er({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}),l=n.routesById[i],u=A.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(wA,{})},[a,l.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=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=oc();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 Fa(So(r.error)),_A(n,l,r.error);if(r.status==="redirected")throw Fa(Fo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||xm;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),wA=A.memo(function(){const t=Ur(),n=A.useContext(Tm),r=Er({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Er({select:f=>{const p=f.matches.find(g=>g.id===n);return Fa(p),p.globalNotFound}}),l=Er({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 _A(t,a,void 0);if(!l)return null;const d=x.jsx(bA,{matchId:l});return r===Yr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function iL(){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?Vl:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(tL,{}),x.jsx(lL,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function lL(){const e=Ur(),t=Er({select:a=>a.matches[0]?.id}),n=Er({select:a=>a.loadedAt}),r=t?x.jsx(bA,{matchId:t}):null;return x.jsx(Tm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(wb,{getResetKey:()=>n,errorComponent:xm,onCatch:a=>{a.message||a.toString()},children:r})})}const cL=e=>new uL(e);class uL extends T6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Cx,globalThis.createLazyFileRoute=Nx):typeof window<"u"&&(window.createFileRoute=Cx,window.createLazyFileRoute=Nx);function dL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=vA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function fL({router:e,...t}){return x.jsx(dL,{router:e,...t,children:x.jsx(iL,{})})}function hL(e){return Er({select:t=>t.location})}var pL={},Mx={};const mp=Object.create(null),yu=e=>pL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?mp:globalThis),wo=new Proxy(mp,{get(e,t){return yu()[t]??mp[t]},has(e,t){return t in yu()||t in mp},set(e,t,n){const r=yu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=yu(!0);return delete n[t],!0},ownKeys(){const e=yu(!0);return Object.keys(e)}});function In(e,t){return typeof process<"u"&&Mx?Mx[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const _u=1,Zn=4,na=8,Xr=24,Px={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},mL=new Map(Object.entries({APPVEYOR:na,BUILDKITE:na,CIRCLECI:Xr,DRONE:na,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:na,TRAVIS:na})),gL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function vL(){if(In("FORCE_COLOR")!==void 0)switch(In("FORCE_COLOR")){case"":case"1":case"true":return Zn;case"2":return na;case"3":return Xr;default:return _u}if(In("NODE_DISABLE_COLORS")!==void 0&&In("NODE_DISABLE_COLORS")!==""||In("NO_COLOR")!==void 0&&In("NO_COLOR")!==""||In("TERM")==="dumb")return _u;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 mL)if(e in wo)return t;return In("CI_NAME")==="codeship"?na:_u}if("TEAMCITY_VERSION"in wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(In("TEAMCITY_VERSION"))!==null?Zn:_u;switch(In("TERM_PROGRAM")){case"iTerm.app":return!In("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(In("TERM_PROGRAM_VERSION"))!==null?na:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return na}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 na;const e=In("TERM").toLowerCase();if(Px[e])return Px[e];if(gL.some(t=>t.exec(e)!==null))return Zn}return In("COLORTERM")?Zn:_u}const ra={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"}},r_=["debug","info","success","warn","error"];function yL(e,t){return r_.indexOf(t)>=r_.indexOf(e)}const _L={info:ra.fg.blue,success:ra.fg.green,warn:ra.fg.yellow,error:ra.fg.red,debug:ra.fg.magenta},bL=(e,t,n)=>{const r=new Date().toISOString();return n?`${ra.dim}${r}${ra.reset} ${_L[e]}${e.toUpperCase()}${ra.reset} ${ra.bright}[Better Auth]:${ra.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},wL=e=>{const t="error",n=vL()!==1,r=(a,i,l=[])=>{if(!yL(t,a))return;const u=bL(a,i,n);{a==="error"?console.error(u,...l):a==="warn"?console.warn(u,...l):console.log(u,...l);return}};return{...Object.fromEntries(r_.map(a=>[a,(...[i,...l])=>r(a,i,l)])),get level(){return t}}};wL();var Fu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function SL(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Fu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function EL(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Fu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Fu?t:new Fu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function $y(e,t="/api/auth"){if(EL(e),SL(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function RL(e,t,n,r,a){if(e)return $y(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 $y(i,t)}if(typeof window<"u"&&window.location)return $y(window.location.origin,t)}const xL={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*:/},TL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Dx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},OL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function CL(e){return e instanceof Date&&!isNaN(e.getTime())}function AL(e){const t=OL.exec(e);if(!t)return null;const[,n,r,a,i,l,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(l,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 CL(g)?g:null}function IL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const u=l.toLowerCase();if(u.length<=9&&u in Dx)return Dx[u];if(!TL.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(xL).some(([d,f])=>{const m=f.test(l);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(l,(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=AL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function NL(e,t={strict:!0}){return IL(e,t)}let ko=[],Ss=0;const th=4,Zl=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+th;i<ko.length;)ko[i]===r?ko.splice(i,th):i+=th;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!ko.length;for(let l of t)ko.push(l,n.value,r,a);if(i){for(Ss=0;Ss<ko.length;Ss+=th)ko[Ss](ko[Ss+1],ko[Ss+2],ko[Ss+3]);ko.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},kL=5,nh=6,rh=10;let ML=(e,t,n,r)=>(e.events=e.events||{},e.events[n+rh]||(e.events[n+rh]=r(a=>{e.events[n].reduceRight((i,l)=>(l(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+rh](),delete e.events[n+rh])}),PL=1e3,SA=(e,t)=>ML(e,r=>{let a=t(r);a&&e.events[nh].push(a)},kL,r=>{let a=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...l));let i=e.off;return e.events[nh]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[nh])l();e.events[nh]=[]}},PL)},()=>{e.listen=a,e.off=i}});function DL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,l)=>{r.has(l)&&n(a,i,l)})}var LL=Object.defineProperty,jL=Object.defineProperties,$L=Object.getOwnPropertyDescriptors,Lx=Object.getOwnPropertySymbols,UL=Object.prototype.hasOwnProperty,zL=Object.prototype.propertyIsEnumerable,jx=(e,t,n)=>t in e?LL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jo=(e,t)=>{for(var n in t||(t={}))UL.call(t,n)&&jx(e,n,t[n]);if(Lx)for(var n of Lx(t))zL.call(t,n)&&jx(e,n,t[n]);return e},ta=(e,t)=>jL(e,$L(t)),VL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},FL=async(e,t)=>{var n,r,a,i,l,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((l=m.hooks)==null?void 0:l.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},$x=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}},BL=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 qL(e){if(typeof e=="number")return new $x({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new $x(e);case"exponential":return new BL(e);default:throw new Error("Invalid retry strategy")}}var HL=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},GL=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ZL(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 GL.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function KL(e){try{return JSON.parse(e),!0}catch{return!1}}function EA(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 Ux(e){try{return JSON.parse(e)}catch{return e}}function zx(e){return typeof e=="function"}function WL(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 YL(e){const t=new Headers(e?.headers),n=await HL(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=QL(e?.body);r&&t.set("content-type",r)}return t}function QL(e){return EA(e)?"application/json":null}function XL(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(EA(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 JL(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 xA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function ej(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var tj=class RA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,RA.prototype)}};async function gp(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new tj(n.issues);return n.value}var xA=["get","post","put","patch","delete"],nj=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,l;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))),(l=u.config)!=null&&l.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ta(jo({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ta(jo({},m),{body:f.input?await gp(f.input,n?.body):n?.body,params:f.params?await gp(f.params,n?.params):n?.params,query:f.query?await gp(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),rj=e=>{async function t(n,r){const a=ta(jo(jo({},e),r),{plugins:[...e?.plugins||[],nj(e||{})]});if(e?.catchAllError)try{return await o_(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 o_(n,a)}return t};function oj(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];xA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[l,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=l.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const w=r[g];l=l.replace(y,w)}}else for(const[p,g]of Object.entries(r))l=l.replace(`:${p}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${f}`,i):`${i}${l}${f}`}var o_=async(e,t)=>{var n,r,a,i,l,u,d,f;const{hooks:m,url:p,options:g}=await FL(e,t),y=WL(g),w=new AbortController,S=(n=g.signal)!=null?n:w.signal,b=oj(p,g),E=XL(g),R=await YL(g),T=JL(p,g);let O=ta(jo({},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}=ej(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(ta(jo({},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=ZL(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const B=await I.text(),Y=await((i=O.jsonParser)!=null?i:Ux)(B);le.data=Y}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await gp(O.output,le.data));for(const B of m.onSuccess)B&&await B(ta(jo({},le),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:Ux,$=await I.text(),K=KL($),V=K?await P($):null,G={response:I,responseText:$,request:O,error:ta(jo({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ta(jo({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=qL(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const B of m.onRetry)B&&await B(N);const le=U.getDelay(J);return await new Promise(B=>setTimeout(B,le)),await o_(e,ta(jo({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new VL(I.status,I.statusText,K?V:$);return{data:null,error:ta(jo({},V),{status:I.status,statusText:I.statusText})}};const Uy=Symbol.for("better-auth:broadcast-channel"),aj=()=>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:aj()}))}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 zy(e="better-auth.message"){return globalThis[Uy]||(globalThis[Uy]=new sj(e)),globalThis[Uy]}const Vy=Symbol.for("better-auth:focus-manager");var ij=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 Vx(){return globalThis[Vy]||(globalThis[Vy]=new ij),globalThis[Vy]}const Fy=Symbol.for("better-auth:online-manager");var lj=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 By(){return globalThis[Fy]||(globalThis[Fy]=new lj),globalThis[Fy]}const cj=()=>typeof window>"u",Nu=(e,t,n,r)=>{const a=Zl({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 l=!1;for(const u of e)u.subscribe(async()=>{cj()||(l?await i():SA(a,()=>{const d=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Al=()=>Math.floor(Date.now()/1e3),uj=5;function dj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,l=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||By().isOnline,m=R=>{if(!f())return;if(R?.event==="storage"){d.lastSync=Al(),n.set(!n.get());return}const T=t.get();if(R?.event==="poll"){d.lastSessionRequest=Al(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=Al(),n.set(!n.get())}).catch(()=>{});return}R?.event==="visibilitychange"&&Al()-d.lastSessionRequest<uj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||R?.event==="visibilitychange")&&(R?.event==="visibilitychange"&&(d.lastSessionRequest=Al()),d.lastSync=Al(),n.set(!n.get()))},p=R=>{zy().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=zy().subscribe(()=>{m({event:"storage"})})},w=()=>{l&&(d.unsubscribeFocus=Vx().subscribe(()=>{m({event:"visibilitychange"})}))},S=()=>{d.unsubscribeOnline=By().subscribe(R=>{R&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),w(),S(),zy().setup(),Vx().setup(),By().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 fj={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 hj(e,t){const n=Zl(!1),r=Nu(n,"/get-session",e,{method:"GET"});return SA(r,()=>{const a=dj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const pj=(e,t)=>{const n="credentials"in Request.prototype,r=RL(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:l,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=rj({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?NL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[fj],...a]}),{$sessionSignal:g,session:y}=hj(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 mj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function gj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...l}=n||{};return r||(a?.method?a.method:l&&Object.keys(l).length>0?"POST":"GET")}function vj(e,t,n,r,a){function i(l=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,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"||mj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+l.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=gj(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 yj(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?DL(e,r,d):e.listen(d)},a),l=()=>n.current;return A.useSyncExternalStore(i,l,l)}function _j(e){return`use${bj(e)}`}function bj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function wj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:l}=pj(e);let u={};for(const[d,f]of Object.entries(r))u[_j(d)]=()=>yj(f);return vj({...n,...u,$fetch:a,$store:i},a,t,r,l)}function Sj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const l=e[a];if(!l)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>l.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>l.includes(d)):r=u.actions.every(d=>l.includes(d))}else throw new Fu("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 TA(e){return{newRole(t){return Sj(t)},statements:e}}const Ej={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},OA=TA(Ej),CA=OA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),AA=OA.newRole({user:[],session:[]}),Rj={admin:CA,user:AA},xj=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||Rj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},Tj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Rb=TA(Tj),IA=Rb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),NA=Rb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),kA=Rb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),Oj={admin:IA,owner:NA,member:kA},Cj=(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 l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},Aj=e=>{const t={admin:CA,user:AA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>xj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},Ij=()=>({id:"magic-link",$InferServerPlugin:{}}),Nj=e=>Cj(e,e.options.roles||Oj),kj=e=>{const t=Zl(!1),n=Zl(!1),r=Zl(!1),a=Zl(!1),i={admin:IA,member:kA,owner:NA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Nj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const u=Nu(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Nu([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:u,activeMember:Nu([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Nu([a],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Mj=e=>({id:"sso-client",$InferServerPlugin:{}}),Pj=wj({plugins:[kj({}),Aj(),Mj(),Ij()]});function MA(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=MA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function PA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=MA(e))&&(r&&(r+=" "),r+=t);return r}const Dj=(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},Lj=(e,t)=>({classGroupId:e,validator:t}),DA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Dp="-",Fx=[],jj="arbitrary..",$j=e=>{const t=zj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Uj(l);const u=l.split(Dp),d=u[0]===""&&u.length>1?1:0;return LA(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?Dj(f,d):d:f||Fx}return n[l]||Fx}}},LA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=LA(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Dp):e.slice(t).join(Dp),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},Uj=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})(),zj=e=>{const{theme:t,classGroups:n}=e;return Vj(n,t)},Vj=(e,t)=>{const n=DA();for(const r in e){const a=e[r];xb(a,n,r,t)}return n},xb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];Fj(l,t,n,r)}},Fj=(e,t,n,r)=>{if(typeof e=="string"){Bj(e,t,n);return}if(typeof e=="function"){qj(e,t,n,r);return}Hj(e,t,n,r)},Bj=(e,t,n)=>{const r=e===""?t:jA(t,e);r.classGroupId=n},qj=(e,t,n,r)=>{if(Gj(e)){xb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Lj(n,e))},Hj=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[u,d]=a[l];xb(d,jA(t,u),n,r)}},jA=(e,t)=>{let n=e;const r=t.split(Dp),a=r.length;for(let i=0;i<a;i++){const l=r[i];let u=n.nextPart.get(l);u||(u=DA(),n.nextPart.set(l,u)),n=u}return n},Gj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},a_="!",Bx=":",Kj=[],qx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Wj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,u=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const b=a[S];if(l===0&&u===0){if(b===Bx){i.push(a.slice(d,S)),d=S+1;continue}if(b==="/"){f=S;continue}}b==="["?l++:b==="]"?l--:b==="("?u++:b===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(a_)?(g=p.slice(0,-1),y=!0):p.startsWith(a_)&&(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+Bx,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):qx(Kj,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Yj=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 l=n[i],u=l[0]==="[",d=t.has(l);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},Qj=e=>({cache:Zj(e.cacheSize),parseClassName:Wj(e),sortModifiers:Yj(e),...$j(e)}),Xj=/\s+/,Jj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],u=e.trim().split(Xj);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+a_:R,O=T+E;if(l.indexOf(O)>-1)continue;l.push(O);const C=a(E,b);for(let I=0;I<C.length;++I){const N=C[I];l.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},e$=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=$A(n))&&(a&&(a+=" "),a+=r);return a},$A=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$A(e[r]))&&(n&&(n+=" "),n+=t);return n},t$=(e,...t)=>{let n,r,a,i;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=Qj(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=Jj(d,n);return a(d,m),m};return i=l,(...d)=>i(e$(...d))},n$=[],Un=e=>{const t=n=>n[e]||n$;return t.isThemeGetter=!0,t},UA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r$=/^\d+\/\d+$/,o$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a$=/\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)\(.+\)$/,i$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Il=e=>r$.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),Es=e=>!!e&&Number.isInteger(Number(e)),qy=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Da=e=>o$.test(e),c$=()=>!0,u$=e=>a$.test(e)&&!s$.test(e),VA=()=>!1,d$=e=>i$.test(e),f$=e=>l$.test(e),h$=e=>!Ue(e)&&!ze(e),p$=e=>yc(e,qA,VA),Ue=e=>UA.test(e),mi=e=>yc(e,HA,u$),Hy=e=>yc(e,_$,ft),Hx=e=>yc(e,FA,VA),m$=e=>yc(e,BA,f$),oh=e=>yc(e,GA,d$),ze=e=>zA.test(e),bu=e=>_c(e,HA),g$=e=>_c(e,b$),Gx=e=>_c(e,FA),v$=e=>_c(e,qA),y$=e=>_c(e,BA),ah=e=>_c(e,GA,!0),yc=(e,t,n)=>{const r=UA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_c=(e,t,n=!1)=>{const r=zA.exec(e);return r?r[1]?t(r[1]):n:!1},FA=e=>e==="position"||e==="percentage",BA=e=>e==="image"||e==="url",qA=e=>e==="length"||e==="size"||e==="bg-size",HA=e=>e==="length",_$=e=>e==="number",b$=e=>e==="family-name",GA=e=>e==="shadow",w$=()=>{const e=Un("color"),t=Un("font"),n=Un("text"),r=Un("font-weight"),a=Un("tracking"),i=Un("leading"),l=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(),ze,Ue],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[ze,Ue,d],$=()=>[Il,"full","auto",...P()],K=()=>[Es,"none","subgrid",ze,Ue],V=()=>["auto",{span:["full",Es,ze,Ue]},Es,ze,Ue],G=()=>[Es,"auto",ze,Ue],U=()=>["auto","min","max","fr",ze,Ue],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...P()],W=()=>[Il,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Y=()=>[e,ze,Ue],pe=()=>[...O(),Gx,Hx,{position:[ze,Ue]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",v$,p$,{size:[ze,Ue]}],q=()=>[qy,bu,mi],F=()=>["","none","full",f,ze,Ue],L=()=>["",ft,bu,mi],z=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[ft,qy,Gx,Hx],ve=()=>["","none",w,ze,Ue],Ie=()=>["none",ft,ze,Ue],Ae=()=>["none",ft,ze,Ue],H=()=>[ft,ze,Ue],ne=()=>[Il,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Da],breakpoint:[Da],color:[c$],container:[Da],"drop-shadow":[Da],ease:["in","out","in-out"],font:[h$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Da],shadow:[Da],spacing:["px",ft],text:[Da],"text-shadow":[Da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Il,Ue,ze,b]}],container:["container"],columns:[{columns:[ft,Ue,ze,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:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Es,"auto",ze,Ue]}],basis:[{basis:[Il,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,Il,"auto","initial","none",Ue]}],grow:[{grow:["",ft,ze,Ue]}],shrink:[{shrink:["",ft,ze,Ue]}],order:[{order:[Es,"first","last","none",ze,Ue]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":K()}],"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()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[u,"screen",...W()]}],"min-w":[{"min-w":[u,"screen","none",...W()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,bu,mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Hy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qy,Ue]}],"font-family":[{font:[g$,Ue,t]}],"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,ze,Ue]}],"line-clamp":[{"line-clamp":[ft,"none",ze,Hy]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ze,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",ze,mi]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ft,"auto",ze,Ue]}],"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",ze,Ue]}],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",ze,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Es,ze,Ue],radial:["",ze,Ue],conic:[Es,ze,Ue]},y$,m$]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,ze,Ue]}],"outline-w":[{outline:["",ft,bu,mi]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,ah,oh]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,ah,oh]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ft,mi]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,ah,oh]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ft,ze,Ue]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ze,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Ue]}],filter:[{filter:["","none",ze,Ue]}],blur:[{blur:ve()}],brightness:[{brightness:[ft,ze,Ue]}],contrast:[{contrast:[ft,ze,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,ah,oh]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ft,ze,Ue]}],"hue-rotate":[{"hue-rotate":[ft,ze,Ue]}],invert:[{invert:["",ft,ze,Ue]}],saturate:[{saturate:[ft,ze,Ue]}],sepia:[{sepia:["",ft,ze,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Ue]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[ft,ze,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[ft,ze,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,ze,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,ze,Ue]}],"backdrop-invert":[{"backdrop-invert":["",ft,ze,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[ft,ze,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[ft,ze,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,ze,Ue]}],"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",ze,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",ze,Ue]}],ease:[{ease:["linear","initial",E,ze,Ue]}],delay:[{delay:[ft,ze,Ue]}],animate:[{animate:["none",R,ze,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ze,Ue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[ze,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",ze,Ue]}],"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-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-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",ze,Ue]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ft,bu,mi,Hy]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},S$=t$(w$),E$=Object.freeze({status:"aborted"});function ye(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.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 l(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(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Xl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ZA extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const KA={};function Vs(e){return KA}function WA(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 s_(e,t){return typeof t=="bigint"?t.toString():t}function Im(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function gd(e){return e==null}function Tb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function R$(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,l=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return l%u/10**i}const Zx=Symbol("evaluating");function xt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Zx)return r===void 0&&(r=Zx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ui(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ks(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Kx(e){return JSON.stringify(e)}function x$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const YA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ed(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const T$=Im(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function sc(e){if(ed(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ed(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function QA(e){return sc(e)?{...e}:Array.isArray(e)?[...e]:e}const O$=new Set(["string","number","symbol"]);function ic(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ws(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Le(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 C$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const A$={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 I$(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=Ks(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return Ui(this,"shape",l),l},checks:[]});return Ws(e,i)}function N$(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=Ks(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return Ui(this,"shape",l),l},checks:[]});return Ws(e,i)}function k$(e,t){if(!sc(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 l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Ks(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ui(this,"shape",i),i}});return Ws(e,a)}function M$(e,t){if(!sc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ks(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ui(this,"shape",r),r}});return Ws(e,n)}function P$(e,t){const n=Ks(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ui(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Ws(e,n)}function D$(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 l=Ks(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 Ui(this,"shape",d),d},checks:[]});return Ws(t,l)}function L$(e,t,n){const r=Ks(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)i[l]=new e({type:"nonoptional",innerType:a[l]});return Ui(this,"shape",i),i}});return Ws(t,r)}function Kl(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 Ti(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function sh(e){return typeof e=="string"?e:e?.message}function Fs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=sh(e.inst?._zod.def?.error?.(e))??sh(t?.error?.(e))??sh(n.customError?.(e))??sh(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function XA(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ob(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function td(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const JA=(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,s_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Cb=ye("$ZodError",JA),Nm=ye("$ZodError",JA,{Parent:Error});function j$(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 $$(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(l=>r({issues:l}));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 l=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const km=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new Xl;if(l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Fs(d,i,Vs())));throw YA(u,a?.callee),u}return l.value},U$=km(Nm),Mm=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Fs(d,i,Vs())));throw YA(u,a?.callee),u}return l.value},z$=Mm(Nm),Pm=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 Xl;return i.issues.length?{success:!1,error:new(e??Cb)(i.issues.map(l=>Fs(l,a,Vs())))}:{success:!0,data:i.value}},eI=Pm(Nm),Dm=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(l=>Fs(l,a,Vs())))}:{success:!0,data:i.value}},V$=Dm(Nm),F$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return km(e)(t,n,a)},B$=e=>(t,n,r)=>km(e)(t,n,r),q$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mm(e)(t,n,a)},H$=e=>async(t,n,r)=>Mm(e)(t,n,r),G$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pm(e)(t,n,a)},Z$=e=>(t,n,r)=>Pm(e)(t,n,r),K$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dm(e)(t,n,a)},W$=e=>async(t,n,r)=>Dm(e)(t,n,r),Y$=/^[cC][^\s-]{8,}$/,Q$=/^[0-9a-z]+$/,X$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,J$=/^[0-9a-vA-V]{20}$/,e8=/^[A-Za-z0-9]{27}$/,t8=/^[a-zA-Z0-9_-]{21}$/,n8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,r8=/^([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})$/,Wx=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)$/,o8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function s8(){return new RegExp(a8,"u")}const i8=/^(?:(?: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])$/,l8=/^(([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}|:))$/,c8=/^((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])$/,u8=/^(([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])$/,d8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tI=/^[A-Za-z0-9_-]*$/,f8=/^\+[1-9]\d{6,14}$/,nI="(?:(?:\\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])))",h8=new RegExp(`^${nI}$`);function rI(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 p8(e){return new RegExp(`^${rI(e)}$`)}function m8(e){const t=rI({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(`^${nI}T(?:${r})$`)}const g8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},v8=/^-?\d+$/,oI=/^-?\d+(?:\.\d+)?$/,y8=/^(?:true|false)$/i,_8=/^null$/i,b8=/^[^A-Z]*$/,w8=/^[^a-z]*$/,ir=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aI={number:"number",bigint:"bigint",object:"date"},sI=ye("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const n=aI[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})}}),iI=ye("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const n=aI[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})}}),S8=ye("$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):R$(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})}}),E8=ye("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=A$[t.format];e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=v8)}),e._zod.check=l=>{const u=l.value;if(n){if(!Number.isInteger(u)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?l.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}):l.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&&l.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&l.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),R8=ye("$ZodCheckMaxSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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:XA(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),x8=ye("$ZodCheckMinSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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:XA(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),T8=ye("$ZodCheckMaxLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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 l=Ob(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),O8=ye("$ZodCheckMinLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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 l=Ob(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),C8=ye("$ZodCheckLengthEquals",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(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 l=Ob(a),u=i>t.length;r.issues.push({origin:l,...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})}}),Lm=ye("$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=()=>{})}),A8=ye("$ZodCheckRegex",(e,t)=>{Lm.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})}}),I8=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=b8),Lm.init(e,t)}),N8=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=w8),Lm.init(e,t)}),k8=ye("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const n=ic(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})}}),M8=ye("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`^${ic(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})}}),P8=ye("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`.*${ic(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})}}),D8=ye("$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})}}),L8=ye("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class j8{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
11
  `).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),i=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
12
12
  `))}}const $8={major:4,minor:3,patch:6},Bt=ye("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=$8;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=(l,u,d)=>{let f=Kl(l),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,y=p._zod.check(l);if(y instanceof Promise&&d?.async===!1)throw new Xl;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,l.issues.length!==g&&(f||(f=Kl(l,g)))});else{if(l.issues.length===g)continue;f||(f=Kl(l,g))}}return m?m.then(()=>l):l},i=(l,u,d)=>{if(Kl(l))return l.aborted=!0,l;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new Xl;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(l,u)=>{if(u.skipChecks)return e._zod.parse(l,u);if(u.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,l,u)):i(f,l,u)}const d=e._zod.parse(l,u);if(d instanceof Promise){if(u.async===!1)throw new Xl;return d.then(f=>a(f,r,u))}return a(d,r,u)}}xt(e,"~standard",()=>({validate:a=>{try{const i=eI(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return V$(e,a).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Ab=ye("$ZodString",(e,t)=>{Bt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??g8(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=ye("$ZodStringFormat",(e,t)=>{Lm.init(e,t),Ab.init(e,t)}),U8=ye("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=r8),dn.init(e,t)}),z8=ye("$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=Wx(r))}else t.pattern??(t.pattern=Wx());dn.init(e,t)}),V8=ye("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=o8),dn.init(e,t)}),F8=ye("$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})}}}),B8=ye("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=s8()),dn.init(e,t)}),q8=ye("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=t8),dn.init(e,t)}),H8=ye("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Y$),dn.init(e,t)}),G8=ye("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Q$),dn.init(e,t)}),Z8=ye("$ZodULID",(e,t)=>{t.pattern??(t.pattern=X$),dn.init(e,t)}),K8=ye("$ZodXID",(e,t)=>{t.pattern??(t.pattern=J$),dn.init(e,t)}),W8=ye("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=e8),dn.init(e,t)}),Y8=ye("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=m8(t)),dn.init(e,t)}),Q8=ye("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=h8),dn.init(e,t)}),X8=ye("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=p8(t)),dn.init(e,t)}),J8=ye("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=n8),dn.init(e,t)}),e9=ye("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=i8),dn.init(e,t),e._zod.bag.format="ipv4"}),t9=ye("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=l8),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})}}}),n9=ye("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=c8),dn.init(e,t)}),r9=ye("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=u8),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 l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>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 lI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const o9=ye("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=d8),dn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{lI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function a9(e){if(!tI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return lI(n)}const s9=ye("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tI),dn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{a9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),i9=ye("$ZodE164",(e,t)=>{t.pattern??(t.pattern=f8),dn.init(e,t)});function l9(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 c9=ye("$ZodJWT",(e,t)=>{dn.init(e,t),e._zod.check=n=>{l9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),cI=ye("$ZodNumber",(e,t)=>{Bt.init(e,t),e._zod.pattern=e._zod.bag.pattern??oI,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}}),u9=ye("$ZodNumberFormat",(e,t)=>{E8.init(e,t),cI.init(e,t)}),d9=ye("$ZodBoolean",(e,t)=>{Bt.init(e,t),e._zod.pattern=y8,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}}),f9=ye("$ZodNull",(e,t)=>{Bt.init(e,t),e._zod.pattern=_8,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}}),h9=ye("$ZodAny",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),p9=ye("$ZodUnknown",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),m9=ye("$ZodNever",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Yx(e,t,n){e.issues.length&&t.issues.push(...Ti(n,e.issues)),t.value[n]=e.value}const g9=ye("$ZodArray",(e,t)=>{Bt.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 l=0;l<a.length;l++){const u=a[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>Yx(f,n,l))):Yx(d,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function Lp(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...Ti(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function uI(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=C$(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function dI(e,t,n,r,a,i){const l=[],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"){l.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Lp(y,n,p,t,m))):Lp(g,n,p,t,m)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const v9=ye("$ZodObject",(e,t)=>{if(Bt.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=Im(()=>uI(t));xt(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=ed,i=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=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=l.shape;for(const g of l.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=>Lp(b,u,g,f,w))):Lp(S,u,g,f,w)}return i?dI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),y9=ye("$ZodObjectJIT",(e,t)=>{v9.init(e,t);const n=e._zod.parse,r=Im(()=>uI(t)),a=g=>{const y=new j8(["shape","payload","ctx"]),w=r.value,S=T=>{const O=Kx(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=Kx(T),N=g[T]?._zod?.optout==="optional";y.write(`const ${O} = ${S(T)};`),N?y.write(`
13
13
  if (${O}.issues.length) {
@@ -45,7 +45,7 @@ Error generating stack: `+h.message+`
45
45
 
46
46
  `)}y.write("payload.value = newResult;"),y.write("return payload;");const R=y.compile();return(T,O)=>R(g,T,O)};let i;const l=ed,u=!KA.jitless,f=u&&T$.value,m=t.catchall;let p;e._zod.parse=(g,y)=>{p??(p=r.value);const w=g.value;return l(w)?u&&f&&y?.async===!1&&y.jitless!==!0?(i||(i=a(t.shape)),g=i(g,y),m?dI([],w,g,y,p,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),g)}});function Qx(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=>!Kl(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(l=>Fs(l,r,Vs())))}),t)}const fI=ye("$ZodUnion",(e,t)=>{Bt.init(e,t),xt(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),xt(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),xt(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),xt(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=>Tb(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 l=!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),l=!0;else{if(f.issues.length===0)return f;u.push(f)}}return l?Promise.all(u).then(d=>Qx(d,a,e,i)):Qx(u,a,e,i)}}),_9=ye("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fI.init(e,t);const n=e._zod.parse;xt(e._zod,"propValues",()=>{const a={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(l)){a[u]||(a[u]=new Set);for(const f of d)a[u].add(f)}}return a});const r=Im(()=>{const a=t.options,i=new Map;for(const l of a){const u=l._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,l)}}return i});e._zod.parse=(a,i)=>{const l=a.value;if(!ed(l))return a.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),a;const u=r.value.get(l?.[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:l,path:[t.discriminator],inst:e}),a)}}),b9=ye("$ZodIntersection",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([d,f])=>Xx(n,d,f)):Xx(n,i,l)}});function i_(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(sc(e)&&sc(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 l=i_(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};a[i]=l.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],l=i_(a,i);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Xx(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}),Kl(e))return e;const l=i_(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const w9=ye("$ZodTuple",(e,t)=>{Bt.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 l=[],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?l.push(p.then(g=>ih(g,r,f))):ih(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?l.push(g.then(y=>ih(y,r,f))):ih(g,r,f)}}return l.length?Promise.all(l).then(()=>r):r}});function ih(e,t,n){e.issues.length&&t.issues.push(...Ti(n,e.issues)),t.value[n]=e.value}const S9=ye("$ZodRecord",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!sc(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const u=new Set;for(const f of l)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(...Ti(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Ti(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"&&oI.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=>Fs(p,r,Vs())),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(...Ti(u,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...Ti(u,m.issues)),n.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>n):n}}),E9=ye("$ZodEnum",(e,t)=>{Bt.init(e,t);const n=WA(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>O$.has(typeof a)).map(a=>typeof a=="string"?ic(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const l=a.value;return r.has(l)||a.issues.push({code:"invalid_value",values:n,input:l,inst:e}),a}}),R9=ye("$ZodLiteral",(e,t)=>{if(Bt.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"?ic(r):r?ic(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}}),x9=ye("$ZodFile",(e,t)=>{Bt.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}}),T9=ye("$ZodTransform",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ZA(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n));if(a instanceof Promise)throw new Xl;return n.value=a,n}});function Jx(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const hI=ye("$ZodOptional",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",xt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),xt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Tb(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=>Jx(i,n.value)):Jx(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),O9=ye("$ZodExactOptional",(e,t)=>{hI.init(e,t),xt(e._zod,"values",()=>t.innerType._zod.values),xt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),C9=ye("$ZodNullable",(e,t)=>{Bt.init(e,t),xt(e._zod,"optin",()=>t.innerType._zod.optin),xt(e._zod,"optout",()=>t.innerType._zod.optout),xt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Tb(n.source)}|null)$`):void 0}),xt(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)}),A9=ye("$ZodDefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",xt(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=>eT(i,t)):eT(a,t)}});function eT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const I9=ye("$ZodPrefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",xt(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))}),N9=ye("$ZodNonOptional",(e,t)=>{Bt.init(e,t),xt(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=>tT(i,e)):tT(a,e)}});function tT(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=ye("$ZodCatch",(e,t)=>{Bt.init(e,t),xt(e._zod,"optin",()=>t.innerType._zod.optin),xt(e._zod,"optout",()=>t.innerType._zod.optout),xt(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(l=>Fs(l,r,Vs()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>Fs(i,r,Vs()))},input:n.value}),n.issues=[]),n)}}),M9=ye("$ZodPipe",(e,t)=>{Bt.init(e,t),xt(e._zod,"values",()=>t.in._zod.values),xt(e._zod,"optin",()=>t.in._zod.optin),xt(e._zod,"optout",()=>t.out._zod.optout),xt(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(l=>lh(l,t.in,r)):lh(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>lh(i,t.out,r)):lh(a,t.out,r)}});function lh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const P9=ye("$ZodReadonly",(e,t)=>{Bt.init(e,t),xt(e._zod,"propValues",()=>t.innerType._zod.propValues),xt(e._zod,"values",()=>t.innerType._zod.values),xt(e._zod,"optin",()=>t.innerType?._zod?.optin),xt(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(nT):nT(a)}});function nT(e){return e.value=Object.freeze(e.value),e}const D9=ye("$ZodLazy",(e,t)=>{Bt.init(e,t),xt(e._zod,"innerType",()=>t.getter()),xt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),xt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),xt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),xt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),L9=ye("$ZodCustom",(e,t)=>{ir.init(e,t),Bt.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=>rT(i,n,r,e));rT(a,n,r,e)}});function rT(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(td(a))}}var oT;class j9{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 $9(){return new j9}(oT=globalThis).__zod_globalRegistry??(oT.__zod_globalRegistry=$9());const ku=globalThis.__zod_globalRegistry;function U9(e,t){return new e({type:"string",...Le(t)})}function z9(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Le(t)})}function aT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Le(t)})}function V9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Le(t)})}function F9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Le(t)})}function B9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Le(t)})}function q9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Le(t)})}function pI(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Le(t)})}function H9(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Le(t)})}function G9(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Le(t)})}function Z9(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Le(t)})}function K9(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Le(t)})}function W9(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Le(t)})}function Y9(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Le(t)})}function Q9(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Le(t)})}function X9(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Le(t)})}function J9(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Le(t)})}function eU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Le(t)})}function tU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Le(t)})}function nU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Le(t)})}function rU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Le(t)})}function oU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Le(t)})}function aU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Le(t)})}function sU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Le(t)})}function iU(e,t){return new e({type:"string",format:"date",check:"string_format",...Le(t)})}function lU(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Le(t)})}function cU(e,t){return new e({type:"string",format:"duration",check:"string_format",...Le(t)})}function uU(e,t){return new e({type:"number",checks:[],...Le(t)})}function dU(e,t){return new e({type:"number",coerce:!0,checks:[],...Le(t)})}function fU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Le(t)})}function hU(e,t){return new e({type:"boolean",...Le(t)})}function pU(e,t){return new e({type:"boolean",coerce:!0,...Le(t)})}function mU(e,t){return new e({type:"null",...Le(t)})}function gU(e){return new e({type:"any"})}function vU(e){return new e({type:"unknown"})}function yU(e,t){return new e({type:"never",...Le(t)})}function sT(e,t){return new sI({check:"less_than",...Le(t),value:e,inclusive:!1})}function Gy(e,t){return new sI({check:"less_than",...Le(t),value:e,inclusive:!0})}function iT(e,t){return new iI({check:"greater_than",...Le(t),value:e,inclusive:!1})}function Zy(e,t){return new iI({check:"greater_than",...Le(t),value:e,inclusive:!0})}function lT(e,t){return new S8({check:"multiple_of",...Le(t),value:e})}function _U(e,t){return new R8({check:"max_size",...Le(t),maximum:e})}function bU(e,t){return new x8({check:"min_size",...Le(t),minimum:e})}function mI(e,t){return new T8({check:"max_length",...Le(t),maximum:e})}function jp(e,t){return new O8({check:"min_length",...Le(t),minimum:e})}function gI(e,t){return new C8({check:"length_equals",...Le(t),length:e})}function wU(e,t){return new A8({check:"string_format",format:"regex",...Le(t),pattern:e})}function SU(e){return new I8({check:"string_format",format:"lowercase",...Le(e)})}function EU(e){return new N8({check:"string_format",format:"uppercase",...Le(e)})}function RU(e,t){return new k8({check:"string_format",format:"includes",...Le(t),includes:e})}function xU(e,t){return new M8({check:"string_format",format:"starts_with",...Le(t),prefix:e})}function TU(e,t){return new P8({check:"string_format",format:"ends_with",...Le(t),suffix:e})}function OU(e,t){return new D8({check:"mime_type",mime:e,...Le(t)})}function bc(e){return new L8({check:"overwrite",tx:e})}function CU(e){return bc(t=>t.normalize(e))}function AU(){return bc(e=>e.trim())}function IU(){return bc(e=>e.toLowerCase())}function NU(){return bc(e=>e.toUpperCase())}function kU(){return bc(e=>x$(e))}function MU(e,t,n){return new e({type:"array",element:t,...Le(n)})}function PU(e,t){return new e({type:"file",...Le(t)})}function DU(e,t,n){const r=Le(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function LU(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Le(n)})}function jU(e){const t=$U(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(td(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(td(a))}},e(n.value,n)));return t}function $U(e,t){const n=new ir({check:"custom",...Le(t)});return n._zod.check=e,n}function $p(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??ku,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 Xt(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 l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=e._zod.toJSONSchema?.();if(u)l.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,m);else{const g=l.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&&(l.ref||(l.ref=p),Xt(p,t,m),t.seen.get(p).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&br(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Up(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 l of e.seen.entries()){const u=e.metadataRegistry.get(l[0])?.id;if(u){const d=r.get(u);if(d&&d!==l[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,l[0])}}const a=l=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(l[0])?.id,g=e.external.uri??(w=>w);if(p)return{ref:g(p)};const y=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=y,{defId:y,ref:`${g("__shared")}#/${u}/${y}`}}if(l[1]===n)return{ref:"#"};const f=`#/${u}/`,m=l[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},i=l=>{if(l[1].schema.$ref)return;const u=l[1],{ref:d,defId:f}=a(l);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 l of e.seen.entries()){const u=l[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
47
47
 
48
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const u=l[1];if(t===l[0]){i(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(u.cycle){i(l);continue}if(u.count>1&&e.reused==="ref"){i(l);continue}}}function zp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const u=e.seen.get(l);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),l._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=l._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:l,jsonSchema:d,path:u.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[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 l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(l)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const l of e.seen.entries()){const u=l[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 l=JSON.parse(JSON.stringify(a));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Vp(t,"input",e.processors),output:Vp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function br(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 br(r.element,n);if(r.type==="set")return br(r.valueType,n);if(r.type==="lazy")return br(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 br(r.innerType,n);if(r.type==="intersection")return br(r.left,n)||br(r.right,n);if(r.type==="record"||r.type==="map")return br(r.keyType,n)||br(r.valueType,n);if(r.type==="pipe")return br(r.in,n)||br(r.out,n);if(r.type==="object"){for(const a in r.shape)if(br(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(br(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(br(a,n))return!0;return!!(r.rest&&br(r.rest,n))}return!1}const UU=(e,t={})=>n=>{const r=$p({...n,processors:t});return Xt(e,r),Up(r,e),zp(r,e)},Vp=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},l=$p({...a??{},target:i,io:t,processors:n});return Xt(e,l),Up(l,e),zp(l,e)},zU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof l=="number"&&(a.maxLength=l),u&&(a.format=zU[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}))])}},yI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:l,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 l=="number"&&(a.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},_I=(e,t,n,r)=>{n.type="boolean"},VU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},FU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},bI=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},BU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},qU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},wI=(e,t,n,r)=>{n.not={}},SI=(e,t,n,r)=>{},EI=(e,t,n,r)=>{},HU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},RI=(e,t,n,r)=>{const a=e._zod.def,i=WA(a.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},xI=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const l of a.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},GU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},ZU=(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},TI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:u,mime:d}=e._zod.bag;l!==void 0&&(i.minLength=l),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)},KU=(e,t,n,r)=>{n.type="boolean"},OI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},WU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},CI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},YU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},QU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},AI=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=Xt(i.element,t,{...r,path:[...r.path,"items"]})},II=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const l=i.shape;for(const f in l)a.properties[f]=Xt(l[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(l)),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=Xt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},NI=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,l=a.options.map((u,d)=>Xt(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=l:n.anyOf=l},kI=(e,t,n,r)=>{const a=e._zod.def,i=Xt(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Xt(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(l)?l.allOf:[l]];n.allOf=d},MI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const l=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)=>Xt(g,t,{...r,path:[...r.path,l,y]})),f=i.rest?Xt(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)},PI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const l=i.keyType,d=l._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=Xt(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=Xt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=Xt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=l._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},DI=(e,t,n,r)=>{const a=e._zod.def,i=Xt(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},LI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},jI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},$I=(e,t,n,r)=>{const a=e._zod.def;Xt(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)))},UI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},zI=(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;Xt(i,t,r);const l=t.seen.get(e);l.ref=i},VI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},XU=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Ib=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},FI=(e,t,n,r)=>{const a=e._zod.innerType;Xt(a,t,r);const i=t.seen.get(e);i.ref=a},cT={string:vI,number:yI,boolean:_I,bigint:VU,symbol:FU,null:bI,undefined:BU,void:qU,never:wI,any:SI,unknown:EI,date:HU,enum:RI,literal:xI,nan:GU,template_literal:ZU,file:TI,success:KU,custom:OI,function:WU,transform:CI,map:YU,set:QU,array:AI,object:II,union:NI,intersection:kI,tuple:MI,record:PI,nullable:DI,nonoptional:LI,default:jI,prefault:$I,catch:UI,pipe:zI,readonly:VI,promise:XU,optional:Ib,lazy:FI};function Kre(e,t){if("_idmap"in e){const r=e,a=$p({...t,processors:cT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;Xt(m,a)}const l={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;Up(a,m),l[f]=zp(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:i}}return{schemas:l}}const n=$p({...t,processors:cT});return Xt(e,n),Up(n,e),zp(n,e)}const JU=ye("ZodISODateTime",(e,t)=>{Y8.init(e,t),hn.init(e,t)});function BI(e){return sU(JU,e)}const e7=ye("ZodISODate",(e,t)=>{Q8.init(e,t),hn.init(e,t)});function t7(e){return iU(e7,e)}const n7=ye("ZodISOTime",(e,t)=>{X8.init(e,t),hn.init(e,t)});function r7(e){return lU(n7,e)}const o7=ye("ZodISODuration",(e,t)=>{J8.init(e,t),hn.init(e,t)});function a7(e){return cU(o7,e)}const s7=(e,t)=>{Cb.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>$$(e,n)},flatten:{value:n=>j$(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,s_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,s_,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ro=ye("ZodError",s7,{Parent:Error}),i7=km(Ro),l7=Mm(Ro),c7=Pm(Ro),u7=Dm(Ro),d7=F$(Ro),f7=B$(Ro),h7=q$(Ro),p7=H$(Ro),m7=G$(Ro),g7=Z$(Ro),v7=K$(Ro),y7=W$(Ro),Kt=ye("ZodType",(e,t)=>(Bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Vp(e,"input"),output:Vp(e,"output")}}),e.toJSONSchema=UU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ks(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)=>Ws(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>i7(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>c7(e,n,r),e.parseAsync=async(n,r)=>l7(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>u7(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>d7(e,n,r),e.decode=(n,r)=>f7(e,n,r),e.encodeAsync=async(n,r)=>h7(e,n,r),e.decodeAsync=async(n,r)=>p7(e,n,r),e.safeEncode=(n,r)=>m7(e,n,r),e.safeDecode=(n,r)=>g7(e,n,r),e.safeEncodeAsync=async(n,r)=>v7(e,n,r),e.safeDecodeAsync=async(n,r)=>y7(e,n,r),e.refine=(n,r)=>e.check(lz(n,r)),e.superRefine=n=>e.check(cz(n)),e.overwrite=n=>e.check(bc(n)),e.optional=()=>vn(e),e.exactOptional=()=>W7(e),e.nullable=()=>hT(e),e.nullish=()=>vn(hT(e)),e.nonoptional=n=>tz(e,n),e.array=()=>Ee(e),e.or=n=>Lt([e,n]),e.and=n=>yd(e,n),e.transform=n=>c_(e,QI(n)),e.default=n=>X7(e,n),e.prefault=n=>ez(e,n),e.catch=n=>rz(e,n),e.pipe=n=>c_(e,n),e.readonly=()=>sz(e),e.describe=n=>{const r=e.clone();return ku.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ku.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ku.get(e);const r=e.clone();return ku.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),qI=ye("_ZodString",(e,t)=>{Ab.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>vI(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(wU(...r)),e.includes=(...r)=>e.check(RU(...r)),e.startsWith=(...r)=>e.check(xU(...r)),e.endsWith=(...r)=>e.check(TU(...r)),e.min=(...r)=>e.check(jp(...r)),e.max=(...r)=>e.check(mI(...r)),e.length=(...r)=>e.check(gI(...r)),e.nonempty=(...r)=>e.check(jp(1,...r)),e.lowercase=r=>e.check(SU(r)),e.uppercase=r=>e.check(EU(r)),e.trim=()=>e.check(AU()),e.normalize=(...r)=>e.check(CU(...r)),e.toLowerCase=()=>e.check(IU()),e.toUpperCase=()=>e.check(NU()),e.slugify=()=>e.check(kU())}),jm=ye("ZodString",(e,t)=>{Ab.init(e,t),qI.init(e,t),e.email=n=>e.check(z9(_7,n)),e.url=n=>e.check(pI(HI,n)),e.jwt=n=>e.check(aU(D7,n)),e.emoji=n=>e.check(H9(w7,n)),e.guid=n=>e.check(aT(uT,n)),e.uuid=n=>e.check(V9(ch,n)),e.uuidv4=n=>e.check(F9(ch,n)),e.uuidv6=n=>e.check(B9(ch,n)),e.uuidv7=n=>e.check(q9(ch,n)),e.nanoid=n=>e.check(G9(S7,n)),e.guid=n=>e.check(aT(uT,n)),e.cuid=n=>e.check(Z9(E7,n)),e.cuid2=n=>e.check(K9(R7,n)),e.ulid=n=>e.check(W9(x7,n)),e.base64=n=>e.check(nU(k7,n)),e.base64url=n=>e.check(rU(M7,n)),e.xid=n=>e.check(Y9(T7,n)),e.ksuid=n=>e.check(Q9(O7,n)),e.ipv4=n=>e.check(X9(C7,n)),e.ipv6=n=>e.check(J9(A7,n)),e.cidrv4=n=>e.check(eU(I7,n)),e.cidrv6=n=>e.check(tU(N7,n)),e.e164=n=>e.check(oU(P7,n)),e.datetime=n=>e.check(BI(n)),e.date=n=>e.check(t7(n)),e.time=n=>e.check(r7(n)),e.duration=n=>e.check(a7(n))});function D(e){return U9(jm,e)}const hn=ye("ZodStringFormat",(e,t)=>{dn.init(e,t),qI.init(e,t)}),_7=ye("ZodEmail",(e,t)=>{V8.init(e,t),hn.init(e,t)}),uT=ye("ZodGUID",(e,t)=>{U8.init(e,t),hn.init(e,t)}),ch=ye("ZodUUID",(e,t)=>{z8.init(e,t),hn.init(e,t)}),HI=ye("ZodURL",(e,t)=>{F8.init(e,t),hn.init(e,t)});function b7(e){return pI(HI,e)}const w7=ye("ZodEmoji",(e,t)=>{B8.init(e,t),hn.init(e,t)}),S7=ye("ZodNanoID",(e,t)=>{q8.init(e,t),hn.init(e,t)}),E7=ye("ZodCUID",(e,t)=>{H8.init(e,t),hn.init(e,t)}),R7=ye("ZodCUID2",(e,t)=>{G8.init(e,t),hn.init(e,t)}),x7=ye("ZodULID",(e,t)=>{Z8.init(e,t),hn.init(e,t)}),T7=ye("ZodXID",(e,t)=>{K8.init(e,t),hn.init(e,t)}),O7=ye("ZodKSUID",(e,t)=>{W8.init(e,t),hn.init(e,t)}),C7=ye("ZodIPv4",(e,t)=>{e9.init(e,t),hn.init(e,t)}),A7=ye("ZodIPv6",(e,t)=>{t9.init(e,t),hn.init(e,t)}),I7=ye("ZodCIDRv4",(e,t)=>{n9.init(e,t),hn.init(e,t)}),N7=ye("ZodCIDRv6",(e,t)=>{r9.init(e,t),hn.init(e,t)}),k7=ye("ZodBase64",(e,t)=>{o9.init(e,t),hn.init(e,t)}),M7=ye("ZodBase64URL",(e,t)=>{s9.init(e,t),hn.init(e,t)}),P7=ye("ZodE164",(e,t)=>{i9.init(e,t),hn.init(e,t)}),D7=ye("ZodJWT",(e,t)=>{c9.init(e,t),hn.init(e,t)}),Za=ye("ZodNumber",(e,t)=>{cI.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>yI(e,r,a),e.gt=(r,a)=>e.check(iT(r,a)),e.gte=(r,a)=>e.check(Zy(r,a)),e.min=(r,a)=>e.check(Zy(r,a)),e.lt=(r,a)=>e.check(sT(r,a)),e.lte=(r,a)=>e.check(Gy(r,a)),e.max=(r,a)=>e.check(Gy(r,a)),e.int=r=>e.check(dT(r)),e.safe=r=>e.check(dT(r)),e.positive=r=>e.check(iT(0,r)),e.nonnegative=r=>e.check(Zy(0,r)),e.negative=r=>e.check(sT(0,r)),e.nonpositive=r=>e.check(Gy(0,r)),e.multipleOf=(r,a)=>e.check(lT(r,a)),e.step=(r,a)=>e.check(lT(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 Ze(e){return uU(Za,e)}const L7=ye("ZodNumberFormat",(e,t)=>{u9.init(e,t),Za.init(e,t)});function dT(e){return fU(L7,e)}const GI=ye("ZodBoolean",(e,t)=>{d9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_I(e,n,r)});function et(e){return hU(GI,e)}const j7=ye("ZodNull",(e,t)=>{f9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bI(e,n,r)});function vd(e){return mU(j7,e)}const $7=ye("ZodAny",(e,t)=>{h9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>SI()});function eo(){return gU($7)}const U7=ye("ZodUnknown",(e,t)=>{p9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>EI()});function _t(){return vU(U7)}const z7=ye("ZodNever",(e,t)=>{m9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wI(e,n,r)});function Fp(e){return yU(z7,e)}const ZI=ye("ZodArray",(e,t)=>{g9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AI(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(jp(n,r)),e.nonempty=n=>e.check(jp(1,n)),e.max=(n,r)=>e.check(mI(n,r)),e.length=(n,r)=>e.check(gI(n,r)),e.unwrap=()=>e.element});function Ee(e,t){return MU(ZI,e,t)}const $m=ye("ZodObject",(e,t)=>{y9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>II(e,n,r,a),xt(e,"shape",()=>t.shape),e.keyof=()=>$t(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_t()}),e.loose=()=>e.clone({...e._zod.def,catchall:_t()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>k$(e,n),e.safeExtend=n=>M$(e,n),e.merge=n=>P$(e,n),e.pick=n=>I$(e,n),e.omit=n=>N$(e,n),e.partial=(...n)=>D$(XI,e,n[0]),e.required=(...n)=>L$(JI,e,n[0])});function ce(e,t){const n={type:"object",shape:e??{},...Le(t)};return new $m(n)}function Wre(e,t){return new $m({type:"object",shape:e,catchall:Fp(),...Le(t)})}function ar(e,t){return new $m({type:"object",shape:e,catchall:_t(),...Le(t)})}const KI=ye("ZodUnion",(e,t)=>{fI.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NI(e,n,r,a),e.options=t.options});function Lt(e,t){return new KI({type:"union",options:e,...Le(t)})}const V7=ye("ZodDiscriminatedUnion",(e,t)=>{KI.init(e,t),_9.init(e,t)});function WI(e,t,n){return new V7({type:"union",options:t,discriminator:e,...Le(n)})}const F7=ye("ZodIntersection",(e,t)=>{b9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kI(e,n,r,a)});function yd(e,t){return new F7({type:"intersection",left:e,right:t})}const B7=ye("ZodTuple",(e,t)=>{w9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MI(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function fT(e,t,n){const r=t instanceof Bt,a=r?n:t,i=r?t:null;return new B7({type:"tuple",items:e,rest:i,...Le(a)})}const YI=ye("ZodRecord",(e,t)=>{S9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PI(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function Et(e,t,n){return new YI({type:"record",keyType:e,valueType:t,...Le(n)})}const l_=ye("ZodEnum",(e,t)=>{E9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>RI(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 l of r)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new l_({...t,checks:[],...Le(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const l of r)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new l_({...t,checks:[],...Le(a),entries:i})}});function $t(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new l_({type:"enum",entries:n,...Le(t)})}const q7=ye("ZodLiteral",(e,t)=>{R9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>xI(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 je(e,t){return new q7({type:"literal",values:Array.isArray(e)?e:[e],...Le(t)})}const H7=ye("ZodFile",(e,t)=>{x9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>TI(e,n,r),e.min=(n,r)=>e.check(bU(n,r)),e.max=(n,r)=>e.check(_U(n,r)),e.mime=(n,r)=>e.check(OU(Array.isArray(n)?n:[n],r))});function G7(e){return PU(H7,e)}const Z7=ye("ZodTransform",(e,t)=>{T9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>CI(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ZA(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(td(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(td(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function QI(e){return new Z7({type:"transform",transform:e})}const XI=ye("ZodOptional",(e,t)=>{hI.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ib(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vn(e){return new XI({type:"optional",innerType:e})}const K7=ye("ZodExactOptional",(e,t)=>{O9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ib(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function W7(e){return new K7({type:"optional",innerType:e})}const Y7=ye("ZodNullable",(e,t)=>{C9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>DI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function hT(e){return new Y7({type:"nullable",innerType:e})}const Q7=ye("ZodDefault",(e,t)=>{A9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function X7(e,t){return new Q7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():QA(t)}})}const J7=ye("ZodPrefault",(e,t)=>{I9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$I(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function ez(e,t){return new J7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():QA(t)}})}const JI=ye("ZodNonOptional",(e,t)=>{N9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function tz(e,t){return new JI({type:"nonoptional",innerType:e,...Le(t)})}const nz=ye("ZodCatch",(e,t)=>{k9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>UI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rz(e,t){return new nz({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const oz=ye("ZodPipe",(e,t)=>{M9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zI(e,n,r,a),e.in=t.in,e.out=t.out});function c_(e,t){return new oz({type:"pipe",in:e,out:t})}const az=ye("ZodReadonly",(e,t)=>{P9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>VI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function sz(e){return new az({type:"readonly",innerType:e})}const iz=ye("ZodLazy",(e,t)=>{D9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>FI(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function ua(e){return new iz({type:"lazy",getter:e})}const Nb=ye("ZodCustom",(e,t)=>{L9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>OI(e,n)});function eN(e,t){return DU(Nb,e??(()=>!0),t)}function lz(e,t={}){return LU(Nb,e,t)}function cz(e){return jU(e)}function Yre(e,t={}){const n=new Nb({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le(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 kb(e,t){return c_(QI(e),t)}const uz={custom:"custom"};function tN(e){return dU(Za,e)}function pT(e){return pU(GI,e)}function Ce(...e){return S$(PA(e))}function dz(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 zi(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function u_(e,t){for(const n in e)if(e[n]===t)return n}function nd(e,t){let n=D().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 fz={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"},hz={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"},pz={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."},mz={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."},gz={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},vz={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},yz={...gz,...vz},_z={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},bz={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},wz={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Sz={INVALID_SESSION_TOKEN:"Invalid session token"},Ez={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"},Rz={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"},xz={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"},Tz={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"},Oz={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"},Cz={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"},Az={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"},Iz={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",...mz,...fz,...hz,...pz,...yz,..._z,...bz,...wz,...Sz,...Ez,...Rz,...xz,...Tz,...Oz,...Cz,...Az},Nz={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"},mT={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},gT={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 Mz=e=>{switch(e){case"success":return Lz;case"info":return $z;case"warning":return jz;case"error":return Uz;default:return null}},Pz=Array(12).fill(0),Dz=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},Pz.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Lz=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"})),jz=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"})),$z=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"})),Uz=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"})),zz=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"})),Vz=()=>{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 d_=1;class Fz{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:d_++,l=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?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,l;const u=a.then(async f=>{if(l=["resolve",f],ee.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(qz(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(l=["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(()=>l[0]==="reject"?m(l[1]):f(l[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||d_++;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 Fz,Bz=(e,t)=>{const n=t?.id||d_++;return Dr.addToast({title:e,...t,id:n}),n},qz=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hz=Bz,Gz=()=>Dr.toasts,Zz=()=>Dr.getActiveToasts(),vT=Object.assign(Hz,{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:Gz,getToasts:Zz});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 uh(e){return e.label!==void 0}const Kz=3,Wz="24px",Yz="16px",yT=4e3,Qz=356,Xz=14,Jz=45,eV=200;function Jo(...e){return e.filter(Boolean).join(" ")}function tV(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const nV=e=>{var t,n,r,a,i,l,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:K="",descriptionClassName:V="",duration:G,position:U,gap:J,expandByDefault:le,classNames:B,icons:W,closeButtonAriaLabel:Y="Close toast"}=e,[pe,ae]=ee.useState(null),[M,q]=ee.useState(null),[F,L]=ee.useState(!1),[z,X]=ee.useState(!1),[de,ve]=ee.useState(!1),[Ie,Ae]=ee.useState(!1),[H,ne]=ee.useState(!1),[_e,se]=ee.useState(0),[ue,Oe]=ee.useState(0),Pe=ee.useRef(p.duration||G||yT),Xe=ee.useRef(null),Fe=ee.useRef(null),We=E===0,Z=E+1<=S,re=p.type,oe=p.dismissible!==!1,we=p.className||"",xe=p.descriptionClassName||"",Re=ee.useMemo(()=>b.findIndex(qe=>qe.toastId===p.id)||0,[b,p.id]),ke=ee.useMemo(()=>{var qe;return(qe=p.closeButton)!=null?qe:I},[p.closeButton,I]),Je=ee.useMemo(()=>p.duration||G||yT,[p.duration,G]),ot=ee.useRef(0),Ct=ee.useRef(0),ur=ee.useRef(0),tn=ee.useRef(null),[Rn,nn]=U.split("-"),jn=ee.useMemo(()=>b.reduce((qe,ut,Wt)=>Wt>=Re?qe:qe+ut.height,0),[b,Re]),xn=Vz(),Qa=p.invert||m,ga=re==="loading";Ct.current=ee.useMemo(()=>Re*J+jn,[Re,jn]),ee.useEffect(()=>{Pe.current=Je},[Je]),ee.useEffect(()=>{L(!0)},[]),ee.useEffect(()=>{const qe=Fe.current;if(qe){const ut=qe.getBoundingClientRect().height;return Oe(ut),w(Wt=>[{toastId:p.id,height:ut,position:p.position},...Wt]),()=>w(Wt=>Wt.filter(qt=>qt.toastId!==p.id))}},[w,p.id]),ee.useLayoutEffect(()=>{if(!F)return;const qe=Fe.current,ut=qe.style.height;qe.style.height="auto";const Wt=qe.getBoundingClientRect().height;qe.style.height=ut,Oe(Wt),w(qt=>qt.find(It=>It.toastId===p.id)?qt.map(It=>It.toastId===p.id?{...It,height:Wt}:It):[{toastId:p.id,height:Wt,position:p.position},...qt])},[F,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const Be=ee.useCallback(()=>{X(!0),se(Ct.current),w(qe=>qe.filter(ut=>ut.toastId!==p.id)),setTimeout(()=>{O(p)},eV)},[p,O,w,Ct]);ee.useEffect(()=>{if(p.promise&&re==="loading"||p.duration===1/0||p.type==="loading")return;let qe;return T||y||xn?(()=>{if(ur.current<ot.current){const qt=new Date().getTime()-ot.current;Pe.current=Pe.current-qt}ur.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(ot.current=new Date().getTime(),qe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Be()},Pe.current))})(),()=>clearTimeout(qe)},[T,y,p,re,xn,Be]),ee.useEffect(()=>{p.delete&&(Be(),p.onDismiss==null||p.onDismiss.call(p,p))},[Be,p.delete]);function bt(){var qe;if(W?.loading){var ut;return ee.createElement("div",{className:Jo(B?.loader,p==null||(ut=p.classNames)==null?void 0:ut.loader,"sonner-loader"),"data-visible":re==="loading"},W.loading)}return ee.createElement(Dz,{className:Jo(B?.loader,p==null||(qe=p.classNames)==null?void 0:qe.loader),visible:re==="loading"})}const Tt=p.icon||W?.[re]||Mz(re);var ct,At;return ee.createElement("li",{tabIndex:0,ref:Fe,className:Jo(K,we,B?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,B?.default,B?.[re],p==null||(n=p.classNames)==null?void 0:n[re]),"data-sonner-toast":"","data-rich-colors":(ct=p.richColors)!=null?ct:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":F,"data-promise":!!p.promise,"data-swiped":H,"data-removed":z,"data-visible":Z,"data-y-position":Rn,"data-x-position":nn,"data-index":E,"data-front":We,"data-swiping":de,"data-dismissible":oe,"data-type":re,"data-invert":Qa,"data-swipe-out":Ie,"data-swipe-direction":M,"data-expanded":!!(T||le&&F),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":R.length-E,"--offset":`${z?_e:Ct.current}px`,"--initial-height":le?"auto":`${ue}px`,...N,...p.style},onDragEnd:()=>{ve(!1),ae(null),tn.current=null},onPointerDown:qe=>{qe.button!==2&&(ga||!oe||(Xe.current=new Date,se(Ct.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(ve(!0),tn.current={x:qe.clientX,y:qe.clientY})))},onPointerUp:()=>{var qe,ut,Wt;if(Ie||!oe)return;tn.current=null;const qt=Number(((qe=Fe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),dr=Number(((ut=Fe.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),It=new Date().getTime()-((Wt=Xe.current)==null?void 0:Wt.getTime()),rn=pe==="x"?qt:dr,ao=Math.abs(rn)/It;if(Math.abs(rn)>=Jz||ao>.11){se(Ct.current),p.onDismiss==null||p.onDismiss.call(p,p),q(pe==="x"?qt>0?"right":"left":dr>0?"down":"up"),Be(),Ae(!0);return}else{var Yn,xr;(Yn=Fe.current)==null||Yn.style.setProperty("--swipe-amount-x","0px"),(xr=Fe.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}ne(!1),ve(!1),ae(null)},onPointerMove:qe=>{var ut,Wt,qt;if(!tn.current||!oe||((ut=window.getSelection())==null?void 0:ut.toString().length)>0)return;const It=qe.clientY-tn.current.y,rn=qe.clientX-tn.current.x;var ao;const Yn=(ao=e.swipeDirections)!=null?ao:tV(U);!pe&&(Math.abs(rn)>1||Math.abs(It)>1)&&ae(Math.abs(rn)>Math.abs(It)?"x":"y");let xr={x:0,y:0};const qi=Co=>1/(1.5+Math.abs(Co)/20);if(pe==="y"){if(Yn.includes("top")||Yn.includes("bottom"))if(Yn.includes("top")&&It<0||Yn.includes("bottom")&&It>0)xr.y=It;else{const Co=It*qi(It);xr.y=Math.abs(Co)<Math.abs(It)?Co:It}}else if(pe==="x"&&(Yn.includes("left")||Yn.includes("right")))if(Yn.includes("left")&&rn<0||Yn.includes("right")&&rn>0)xr.x=rn;else{const Co=rn*qi(rn);xr.x=Math.abs(Co)<Math.abs(rn)?Co:rn}(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&ne(!0),(Wt=Fe.current)==null||Wt.style.setProperty("--swipe-amount-x",`${xr.x}px`),(qt=Fe.current)==null||qt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}},ke&&!p.jsx&&re!=="loading"?ee.createElement("button",{"aria-label":Y,"data-disabled":ga,"data-close-button":!0,onClick:ga||!oe?()=>{}:()=>{Be(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Jo(B?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(At=W?.close)!=null?At:zz):null,(re||p.icon||p.promise)&&p.icon!==null&&(W?.[re]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:Jo(B?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||bt():null,p.type!=="loading"?Tt:null):null,ee.createElement("div",{"data-content":"",className:Jo(B?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ee.createElement("div",{"data-title":"",className:Jo(B?.title,p==null||(l=p.classNames)==null?void 0:l.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:Jo(V,xe,B?.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&&uh(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:qe=>{uh(p.cancel)&&oe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,qe),Be())},className:Jo(B?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&uh(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:qe=>{uh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,qe),!qe.defaultPrevented&&Be())},className:Jo(B?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function _T(){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 rV(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,l=i?"--mobile-offset":"--offset",u=i?Yz:Wz;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${l}-${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[`${l}-${f}`]=u:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const oV=ee.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:w,style:S,visibleToasts:b=Kz,toastOptions:E,dir:R=_T(),gap:T=Xz,icons:O,containerAriaLabel:C="Notifications"}=t,[I,N]=ee.useState([]),P=ee.useMemo(()=>r?I.filter(F=>F.toasterId===r):I.filter(F=>!F.toasterId),[I,r]),$=ee.useMemo(()=>Array.from(new Set([i].concat(P.filter(F=>F.position).map(F=>F.position)))),[P,i]),[K,V]=ee.useState([]),[G,U]=ee.useState(!1),[J,le]=ee.useState(!1),[B,W]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=ee.useRef(null),pe=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ae=ee.useRef(null),M=ee.useRef(!1),q=ee.useCallback(F=>{N(L=>{var z;return(z=L.find(X=>X.id===F.id))!=null&&z.delete||Dr.dismiss(F.id),L.filter(({id:X})=>X!==F.id)})},[]);return ee.useEffect(()=>Dr.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{N(L=>L.map(z=>z.id===F.id?{...z,delete:!0}:z))});return}setTimeout(()=>{yA.flushSync(()=>{N(L=>{const z=L.findIndex(X=>X.id===F.id);return z!==-1?[...L.slice(0,z),{...L[z],...F},...L.slice(z+1)]:[F,...L]})})})}),[I]),ee.useEffect(()=>{if(g!=="system"){W(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:L})=>{W(L?"dark":"light")})}catch{F.addListener(({matches:z})=>{try{W(z?"dark":"light")}catch(X){console.error(X)}})}},[g]),ee.useEffect(()=>{I.length<=1&&U(!1)},[I]),ee.useEffect(()=>{const F=L=>{var z;if(l.every(ve=>L[ve]||L.code===ve)){var de;U(!0),(de=Y.current)==null||de.focus()}L.code==="Escape"&&(document.activeElement===Y.current||(z=Y.current)!=null&&z.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[l]),ee.useEffect(()=>{if(Y.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,M.current=!1)}},[Y.current]),ee.createElement("section",{ref:n,"aria-label":`${C} ${pe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((F,L)=>{var z;const[X,de]=F.split("-");return P.length?ee.createElement("ol",{key:F,dir:R==="auto"?_T():R,tabIndex:-1,ref:Y,className:f,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":X,"data-x-position":de,style:{"--front-toast-height":`${((z=K[0])==null?void 0:z.height)||0}px`,"--width":`${Qz}px`,"--gap":`${T}px`,...S,...rV(m,p)},onBlur:ve=>{M.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(M.current=!1,ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||M.current||(M.current=!0,ae.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===F).map((ve,Ie)=>{var Ae,H;return ee.createElement(nV,{key:ve.id,icons:O,index:Ie,toast:ve,defaultRichColors:y,duration:(Ae=E?.duration)!=null?Ae:w,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:a,visibleToasts:b,closeButton:(H=E?.closeButton)!=null?H:d,interacting:J,position:F,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:q,toasts:P.filter(ne=>ne.position==ve.position),heights:K.filter(ne=>ne.position==ve.position),setHeights:V,expandByDefault:u,gap:T,expanded:G,swipeDirections:t.swipeDirections})})):null}))}),nN=A.createContext({});function rN(){return A.useContext(nN)}var Ky,bT;function aV(){if(bT)return Ky;bT=1;var e=function(){};return Ky=e,Ky}var sV=aV();const iV=Ga(sV);function lV({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),a&&l.setAttribute("nonce",a),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var cV=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 Bu=null,rd=!1;const Bp=new Set,qp=new Set,uV=typeof window<"u",Jl="___grecaptcha_cfg",oN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function dV(){if(!uV)return;function e(n){if(rd)n();else{window[Jl]||(window[Jl]={});const r=window[Jl];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(){rd=!0;for(const n of qp)n();qp.clear()}window[oN]=t}function fV({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",l=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/${l}?${u.toString()}`}function hV({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},l=fV({language:e,onLoadCallbackName:oN,render:t,useEnterprise:r,useRecaptchaNet:a});if(Bu){if(Bu!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Bu=l,lV(Object.assign(Object.assign(Object.assign({},i),n),{src:l}))}function pV(e){if(!window[Jl])return;const t=window[Jl];t.clients&&delete t.clients[e]}function mV(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=cV(t,["onLoadCallback","onLoadCallbackName"]);if(Bp.size===0&&dV(),hV(a),Bp.add(e),n&&(rd?n():qp.add(n)),r){let i=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};rd?i():qp.add(i)}}function gV(e){var t,n,r;Bp.delete(e),Bp.size===0&&(window.grecaptcha=void 0,window[Jl]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Bu}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Bu=null,rd=!1)}let wT=!1;function vV({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:l}){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 mV(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:l}),()=>{gV(w),b(null)}},[e?.element,w,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,l]),A.useEffect(()=>{var N,P,$;if(!e?.element||!S?.render)return;const K={"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,K);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&(wT||(iV(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),wT=!0),($=V.querySelector(".grecaptcha-badge"))===null||$===void 0||$.style.setProperty("display","none")),R(G),T.current=!0,()=>{R(null),T.current=!1,pV(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(nN.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:S},children:t})}var yV=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 yV;function _V(){return()=>{}}function Ka(){return A.useSyncExternalStore(_V,()=>!0,()=>!1)}function aN(){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 Mb(){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 bV({children:e}){const t=Ka(),{captcha:n}=A.useContext(ht);return n?.provider!=="google-recaptcha-v3"?e:x.jsxs(vV,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&x.jsx("style",{children:`
48
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const u=l[1];if(t===l[0]){i(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(u.cycle){i(l);continue}if(u.count>1&&e.reused==="ref"){i(l);continue}}}function zp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const u=e.seen.get(l);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),l._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=l._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:l,jsonSchema:d,path:u.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[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 l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(l)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const l of e.seen.entries()){const u=l[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 l=JSON.parse(JSON.stringify(a));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Vp(t,"input",e.processors),output:Vp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function br(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 br(r.element,n);if(r.type==="set")return br(r.valueType,n);if(r.type==="lazy")return br(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 br(r.innerType,n);if(r.type==="intersection")return br(r.left,n)||br(r.right,n);if(r.type==="record"||r.type==="map")return br(r.keyType,n)||br(r.valueType,n);if(r.type==="pipe")return br(r.in,n)||br(r.out,n);if(r.type==="object"){for(const a in r.shape)if(br(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(br(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(br(a,n))return!0;return!!(r.rest&&br(r.rest,n))}return!1}const UU=(e,t={})=>n=>{const r=$p({...n,processors:t});return Xt(e,r),Up(r,e),zp(r,e)},Vp=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},l=$p({...a??{},target:i,io:t,processors:n});return Xt(e,l),Up(l,e),zp(l,e)},zU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof l=="number"&&(a.maxLength=l),u&&(a.format=zU[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}))])}},yI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:l,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 l=="number"&&(a.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},_I=(e,t,n,r)=>{n.type="boolean"},VU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},FU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},bI=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},BU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},qU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},wI=(e,t,n,r)=>{n.not={}},SI=(e,t,n,r)=>{},EI=(e,t,n,r)=>{},HU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},RI=(e,t,n,r)=>{const a=e._zod.def,i=WA(a.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},xI=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const l of a.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},GU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},ZU=(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},TI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:u,mime:d}=e._zod.bag;l!==void 0&&(i.minLength=l),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)},KU=(e,t,n,r)=>{n.type="boolean"},OI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},WU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},CI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},YU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},QU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},AI=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=Xt(i.element,t,{...r,path:[...r.path,"items"]})},II=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const l=i.shape;for(const f in l)a.properties[f]=Xt(l[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(l)),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=Xt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},NI=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,l=a.options.map((u,d)=>Xt(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=l:n.anyOf=l},kI=(e,t,n,r)=>{const a=e._zod.def,i=Xt(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Xt(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(l)?l.allOf:[l]];n.allOf=d},MI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const l=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)=>Xt(g,t,{...r,path:[...r.path,l,y]})),f=i.rest?Xt(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)},PI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const l=i.keyType,d=l._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=Xt(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=Xt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=Xt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=l._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},DI=(e,t,n,r)=>{const a=e._zod.def,i=Xt(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},LI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},jI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},$I=(e,t,n,r)=>{const a=e._zod.def;Xt(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)))},UI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},zI=(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;Xt(i,t,r);const l=t.seen.get(e);l.ref=i},VI=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},XU=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Ib=(e,t,n,r)=>{const a=e._zod.def;Xt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},FI=(e,t,n,r)=>{const a=e._zod.innerType;Xt(a,t,r);const i=t.seen.get(e);i.ref=a},cT={string:vI,number:yI,boolean:_I,bigint:VU,symbol:FU,null:bI,undefined:BU,void:qU,never:wI,any:SI,unknown:EI,date:HU,enum:RI,literal:xI,nan:GU,template_literal:ZU,file:TI,success:KU,custom:OI,function:WU,transform:CI,map:YU,set:QU,array:AI,object:II,union:NI,intersection:kI,tuple:MI,record:PI,nullable:DI,nonoptional:LI,default:jI,prefault:$I,catch:UI,pipe:zI,readonly:VI,promise:XU,optional:Ib,lazy:FI};function Kre(e,t){if("_idmap"in e){const r=e,a=$p({...t,processors:cT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;Xt(m,a)}const l={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;Up(a,m),l[f]=zp(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:i}}return{schemas:l}}const n=$p({...t,processors:cT});return Xt(e,n),Up(n,e),zp(n,e)}const JU=ye("ZodISODateTime",(e,t)=>{Y8.init(e,t),hn.init(e,t)});function BI(e){return sU(JU,e)}const e7=ye("ZodISODate",(e,t)=>{Q8.init(e,t),hn.init(e,t)});function t7(e){return iU(e7,e)}const n7=ye("ZodISOTime",(e,t)=>{X8.init(e,t),hn.init(e,t)});function r7(e){return lU(n7,e)}const o7=ye("ZodISODuration",(e,t)=>{J8.init(e,t),hn.init(e,t)});function a7(e){return cU(o7,e)}const s7=(e,t)=>{Cb.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>$$(e,n)},flatten:{value:n=>j$(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,s_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,s_,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ro=ye("ZodError",s7,{Parent:Error}),i7=km(Ro),l7=Mm(Ro),c7=Pm(Ro),u7=Dm(Ro),d7=F$(Ro),f7=B$(Ro),h7=q$(Ro),p7=H$(Ro),m7=G$(Ro),g7=Z$(Ro),v7=K$(Ro),y7=W$(Ro),Kt=ye("ZodType",(e,t)=>(Bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Vp(e,"input"),output:Vp(e,"output")}}),e.toJSONSchema=UU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ks(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)=>Ws(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>i7(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>c7(e,n,r),e.parseAsync=async(n,r)=>l7(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>u7(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>d7(e,n,r),e.decode=(n,r)=>f7(e,n,r),e.encodeAsync=async(n,r)=>h7(e,n,r),e.decodeAsync=async(n,r)=>p7(e,n,r),e.safeEncode=(n,r)=>m7(e,n,r),e.safeDecode=(n,r)=>g7(e,n,r),e.safeEncodeAsync=async(n,r)=>v7(e,n,r),e.safeDecodeAsync=async(n,r)=>y7(e,n,r),e.refine=(n,r)=>e.check(lz(n,r)),e.superRefine=n=>e.check(cz(n)),e.overwrite=n=>e.check(bc(n)),e.optional=()=>vn(e),e.exactOptional=()=>W7(e),e.nullable=()=>hT(e),e.nullish=()=>vn(hT(e)),e.nonoptional=n=>tz(e,n),e.array=()=>Ee(e),e.or=n=>Lt([e,n]),e.and=n=>yd(e,n),e.transform=n=>c_(e,QI(n)),e.default=n=>X7(e,n),e.prefault=n=>ez(e,n),e.catch=n=>rz(e,n),e.pipe=n=>c_(e,n),e.readonly=()=>sz(e),e.describe=n=>{const r=e.clone();return ku.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ku.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ku.get(e);const r=e.clone();return ku.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),qI=ye("_ZodString",(e,t)=>{Ab.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>vI(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(wU(...r)),e.includes=(...r)=>e.check(RU(...r)),e.startsWith=(...r)=>e.check(xU(...r)),e.endsWith=(...r)=>e.check(TU(...r)),e.min=(...r)=>e.check(jp(...r)),e.max=(...r)=>e.check(mI(...r)),e.length=(...r)=>e.check(gI(...r)),e.nonempty=(...r)=>e.check(jp(1,...r)),e.lowercase=r=>e.check(SU(r)),e.uppercase=r=>e.check(EU(r)),e.trim=()=>e.check(AU()),e.normalize=(...r)=>e.check(CU(...r)),e.toLowerCase=()=>e.check(IU()),e.toUpperCase=()=>e.check(NU()),e.slugify=()=>e.check(kU())}),jm=ye("ZodString",(e,t)=>{Ab.init(e,t),qI.init(e,t),e.email=n=>e.check(z9(_7,n)),e.url=n=>e.check(pI(HI,n)),e.jwt=n=>e.check(aU(D7,n)),e.emoji=n=>e.check(H9(w7,n)),e.guid=n=>e.check(aT(uT,n)),e.uuid=n=>e.check(V9(ch,n)),e.uuidv4=n=>e.check(F9(ch,n)),e.uuidv6=n=>e.check(B9(ch,n)),e.uuidv7=n=>e.check(q9(ch,n)),e.nanoid=n=>e.check(G9(S7,n)),e.guid=n=>e.check(aT(uT,n)),e.cuid=n=>e.check(Z9(E7,n)),e.cuid2=n=>e.check(K9(R7,n)),e.ulid=n=>e.check(W9(x7,n)),e.base64=n=>e.check(nU(k7,n)),e.base64url=n=>e.check(rU(M7,n)),e.xid=n=>e.check(Y9(T7,n)),e.ksuid=n=>e.check(Q9(O7,n)),e.ipv4=n=>e.check(X9(C7,n)),e.ipv6=n=>e.check(J9(A7,n)),e.cidrv4=n=>e.check(eU(I7,n)),e.cidrv6=n=>e.check(tU(N7,n)),e.e164=n=>e.check(oU(P7,n)),e.datetime=n=>e.check(BI(n)),e.date=n=>e.check(t7(n)),e.time=n=>e.check(r7(n)),e.duration=n=>e.check(a7(n))});function D(e){return U9(jm,e)}const hn=ye("ZodStringFormat",(e,t)=>{dn.init(e,t),qI.init(e,t)}),_7=ye("ZodEmail",(e,t)=>{V8.init(e,t),hn.init(e,t)}),uT=ye("ZodGUID",(e,t)=>{U8.init(e,t),hn.init(e,t)}),ch=ye("ZodUUID",(e,t)=>{z8.init(e,t),hn.init(e,t)}),HI=ye("ZodURL",(e,t)=>{F8.init(e,t),hn.init(e,t)});function b7(e){return pI(HI,e)}const w7=ye("ZodEmoji",(e,t)=>{B8.init(e,t),hn.init(e,t)}),S7=ye("ZodNanoID",(e,t)=>{q8.init(e,t),hn.init(e,t)}),E7=ye("ZodCUID",(e,t)=>{H8.init(e,t),hn.init(e,t)}),R7=ye("ZodCUID2",(e,t)=>{G8.init(e,t),hn.init(e,t)}),x7=ye("ZodULID",(e,t)=>{Z8.init(e,t),hn.init(e,t)}),T7=ye("ZodXID",(e,t)=>{K8.init(e,t),hn.init(e,t)}),O7=ye("ZodKSUID",(e,t)=>{W8.init(e,t),hn.init(e,t)}),C7=ye("ZodIPv4",(e,t)=>{e9.init(e,t),hn.init(e,t)}),A7=ye("ZodIPv6",(e,t)=>{t9.init(e,t),hn.init(e,t)}),I7=ye("ZodCIDRv4",(e,t)=>{n9.init(e,t),hn.init(e,t)}),N7=ye("ZodCIDRv6",(e,t)=>{r9.init(e,t),hn.init(e,t)}),k7=ye("ZodBase64",(e,t)=>{o9.init(e,t),hn.init(e,t)}),M7=ye("ZodBase64URL",(e,t)=>{s9.init(e,t),hn.init(e,t)}),P7=ye("ZodE164",(e,t)=>{i9.init(e,t),hn.init(e,t)}),D7=ye("ZodJWT",(e,t)=>{c9.init(e,t),hn.init(e,t)}),Za=ye("ZodNumber",(e,t)=>{cI.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>yI(e,r,a),e.gt=(r,a)=>e.check(iT(r,a)),e.gte=(r,a)=>e.check(Zy(r,a)),e.min=(r,a)=>e.check(Zy(r,a)),e.lt=(r,a)=>e.check(sT(r,a)),e.lte=(r,a)=>e.check(Gy(r,a)),e.max=(r,a)=>e.check(Gy(r,a)),e.int=r=>e.check(dT(r)),e.safe=r=>e.check(dT(r)),e.positive=r=>e.check(iT(0,r)),e.nonnegative=r=>e.check(Zy(0,r)),e.negative=r=>e.check(sT(0,r)),e.nonpositive=r=>e.check(Gy(0,r)),e.multipleOf=(r,a)=>e.check(lT(r,a)),e.step=(r,a)=>e.check(lT(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 Ze(e){return uU(Za,e)}const L7=ye("ZodNumberFormat",(e,t)=>{u9.init(e,t),Za.init(e,t)});function dT(e){return fU(L7,e)}const GI=ye("ZodBoolean",(e,t)=>{d9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_I(e,n,r)});function et(e){return hU(GI,e)}const j7=ye("ZodNull",(e,t)=>{f9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bI(e,n,r)});function vd(e){return mU(j7,e)}const $7=ye("ZodAny",(e,t)=>{h9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>SI()});function eo(){return gU($7)}const U7=ye("ZodUnknown",(e,t)=>{p9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>EI()});function _t(){return vU(U7)}const z7=ye("ZodNever",(e,t)=>{m9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wI(e,n,r)});function Fp(e){return yU(z7,e)}const ZI=ye("ZodArray",(e,t)=>{g9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AI(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(jp(n,r)),e.nonempty=n=>e.check(jp(1,n)),e.max=(n,r)=>e.check(mI(n,r)),e.length=(n,r)=>e.check(gI(n,r)),e.unwrap=()=>e.element});function Ee(e,t){return MU(ZI,e,t)}const $m=ye("ZodObject",(e,t)=>{y9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>II(e,n,r,a),xt(e,"shape",()=>t.shape),e.keyof=()=>$t(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_t()}),e.loose=()=>e.clone({...e._zod.def,catchall:_t()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>k$(e,n),e.safeExtend=n=>M$(e,n),e.merge=n=>P$(e,n),e.pick=n=>I$(e,n),e.omit=n=>N$(e,n),e.partial=(...n)=>D$(XI,e,n[0]),e.required=(...n)=>L$(JI,e,n[0])});function ce(e,t){const n={type:"object",shape:e??{},...Le(t)};return new $m(n)}function Wre(e,t){return new $m({type:"object",shape:e,catchall:Fp(),...Le(t)})}function ar(e,t){return new $m({type:"object",shape:e,catchall:_t(),...Le(t)})}const KI=ye("ZodUnion",(e,t)=>{fI.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NI(e,n,r,a),e.options=t.options});function Lt(e,t){return new KI({type:"union",options:e,...Le(t)})}const V7=ye("ZodDiscriminatedUnion",(e,t)=>{KI.init(e,t),_9.init(e,t)});function WI(e,t,n){return new V7({type:"union",options:t,discriminator:e,...Le(n)})}const F7=ye("ZodIntersection",(e,t)=>{b9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kI(e,n,r,a)});function yd(e,t){return new F7({type:"intersection",left:e,right:t})}const B7=ye("ZodTuple",(e,t)=>{w9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MI(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function fT(e,t,n){const r=t instanceof Bt,a=r?n:t,i=r?t:null;return new B7({type:"tuple",items:e,rest:i,...Le(a)})}const YI=ye("ZodRecord",(e,t)=>{S9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PI(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function Et(e,t,n){return new YI({type:"record",keyType:e,valueType:t,...Le(n)})}const l_=ye("ZodEnum",(e,t)=>{E9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>RI(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 l of r)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new l_({...t,checks:[],...Le(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const l of r)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new l_({...t,checks:[],...Le(a),entries:i})}});function $t(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new l_({type:"enum",entries:n,...Le(t)})}const q7=ye("ZodLiteral",(e,t)=>{R9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>xI(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 je(e,t){return new q7({type:"literal",values:Array.isArray(e)?e:[e],...Le(t)})}const H7=ye("ZodFile",(e,t)=>{x9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>TI(e,n,r),e.min=(n,r)=>e.check(bU(n,r)),e.max=(n,r)=>e.check(_U(n,r)),e.mime=(n,r)=>e.check(OU(Array.isArray(n)?n:[n],r))});function G7(e){return PU(H7,e)}const Z7=ye("ZodTransform",(e,t)=>{T9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>CI(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ZA(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(td(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(td(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function QI(e){return new Z7({type:"transform",transform:e})}const XI=ye("ZodOptional",(e,t)=>{hI.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ib(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vn(e){return new XI({type:"optional",innerType:e})}const K7=ye("ZodExactOptional",(e,t)=>{O9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ib(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function W7(e){return new K7({type:"optional",innerType:e})}const Y7=ye("ZodNullable",(e,t)=>{C9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>DI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function hT(e){return new Y7({type:"nullable",innerType:e})}const Q7=ye("ZodDefault",(e,t)=>{A9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function X7(e,t){return new Q7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():QA(t)}})}const J7=ye("ZodPrefault",(e,t)=>{I9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$I(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function ez(e,t){return new J7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():QA(t)}})}const JI=ye("ZodNonOptional",(e,t)=>{N9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function tz(e,t){return new JI({type:"nonoptional",innerType:e,...Le(t)})}const nz=ye("ZodCatch",(e,t)=>{k9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>UI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rz(e,t){return new nz({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const oz=ye("ZodPipe",(e,t)=>{M9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zI(e,n,r,a),e.in=t.in,e.out=t.out});function c_(e,t){return new oz({type:"pipe",in:e,out:t})}const az=ye("ZodReadonly",(e,t)=>{P9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>VI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function sz(e){return new az({type:"readonly",innerType:e})}const iz=ye("ZodLazy",(e,t)=>{D9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>FI(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function ua(e){return new iz({type:"lazy",getter:e})}const Nb=ye("ZodCustom",(e,t)=>{L9.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>OI(e,n)});function eN(e,t){return DU(Nb,e??(()=>!0),t)}function lz(e,t={}){return LU(Nb,e,t)}function cz(e){return jU(e)}function Yre(e,t={}){const n=new Nb({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le(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 kb(e,t){return c_(QI(e),t)}const uz={custom:"custom"};function tN(e){return dU(Za,e)}function pT(e){return pU(GI,e)}function Ce(...e){return S$(PA(e))}function dz(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 zi(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function u_(e,t){for(const n in e)if(e[n]===t)return n}function nd(e,t){let n=D().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 fz={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"},hz={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"},pz={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."},mz={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."},gz={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},vz={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},yz={...gz,...vz},_z={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},bz={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},wz={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Sz={INVALID_SESSION_TOKEN:"Invalid session token"},Ez={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"},Rz={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"},xz={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"},Tz={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"},Oz={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"},Cz={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"},Az={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"},Iz={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",...mz,...fz,...hz,...pz,...yz,..._z,...bz,...wz,...Sz,...Ez,...Rz,...xz,...Tz,...Oz,...Cz,...Az},Nz={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"},mT={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},gT={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 Mz=e=>{switch(e){case"success":return Lz;case"info":return $z;case"warning":return jz;case"error":return Uz;default:return null}},Pz=Array(12).fill(0),Dz=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},Pz.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Lz=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"})),jz=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"})),$z=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"})),Uz=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"})),zz=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"})),Vz=()=>{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 d_=1;class Fz{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:d_++,l=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?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,l;const u=a.then(async f=>{if(l=["resolve",f],ee.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(qz(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(l=["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(()=>l[0]==="reject"?m(l[1]):f(l[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||d_++;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 Fz,Bz=(e,t)=>{const n=t?.id||d_++;return Dr.addToast({title:e,...t,id:n}),n},qz=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hz=Bz,Gz=()=>Dr.toasts,Zz=()=>Dr.getActiveToasts(),vT=Object.assign(Hz,{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:Gz,getToasts:Zz});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 uh(e){return e.label!==void 0}const Kz=3,Wz="24px",Yz="16px",yT=4e3,Qz=356,Xz=14,Jz=45,eV=200;function Jo(...e){return e.filter(Boolean).join(" ")}function tV(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const nV=e=>{var t,n,r,a,i,l,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:K="",descriptionClassName:V="",duration:G,position:U,gap:J,expandByDefault:le,classNames:B,icons:W,closeButtonAriaLabel:Y="Close toast"}=e,[pe,ae]=ee.useState(null),[M,q]=ee.useState(null),[F,L]=ee.useState(!1),[z,X]=ee.useState(!1),[de,ve]=ee.useState(!1),[Ie,Ae]=ee.useState(!1),[H,ne]=ee.useState(!1),[_e,se]=ee.useState(0),[ue,Oe]=ee.useState(0),Pe=ee.useRef(p.duration||G||yT),Xe=ee.useRef(null),Fe=ee.useRef(null),We=E===0,Z=E+1<=S,re=p.type,oe=p.dismissible!==!1,we=p.className||"",xe=p.descriptionClassName||"",Re=ee.useMemo(()=>b.findIndex(qe=>qe.toastId===p.id)||0,[b,p.id]),ke=ee.useMemo(()=>{var qe;return(qe=p.closeButton)!=null?qe:I},[p.closeButton,I]),Je=ee.useMemo(()=>p.duration||G||yT,[p.duration,G]),ot=ee.useRef(0),Ct=ee.useRef(0),ur=ee.useRef(0),tn=ee.useRef(null),[Rn,nn]=U.split("-"),jn=ee.useMemo(()=>b.reduce((qe,ut,Wt)=>Wt>=Re?qe:qe+ut.height,0),[b,Re]),xn=Vz(),Qa=p.invert||m,ga=re==="loading";Ct.current=ee.useMemo(()=>Re*J+jn,[Re,jn]),ee.useEffect(()=>{Pe.current=Je},[Je]),ee.useEffect(()=>{L(!0)},[]),ee.useEffect(()=>{const qe=Fe.current;if(qe){const ut=qe.getBoundingClientRect().height;return Oe(ut),w(Wt=>[{toastId:p.id,height:ut,position:p.position},...Wt]),()=>w(Wt=>Wt.filter(qt=>qt.toastId!==p.id))}},[w,p.id]),ee.useLayoutEffect(()=>{if(!F)return;const qe=Fe.current,ut=qe.style.height;qe.style.height="auto";const Wt=qe.getBoundingClientRect().height;qe.style.height=ut,Oe(Wt),w(qt=>qt.find(It=>It.toastId===p.id)?qt.map(It=>It.toastId===p.id?{...It,height:Wt}:It):[{toastId:p.id,height:Wt,position:p.position},...qt])},[F,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const Be=ee.useCallback(()=>{X(!0),se(Ct.current),w(qe=>qe.filter(ut=>ut.toastId!==p.id)),setTimeout(()=>{O(p)},eV)},[p,O,w,Ct]);ee.useEffect(()=>{if(p.promise&&re==="loading"||p.duration===1/0||p.type==="loading")return;let qe;return T||y||xn?(()=>{if(ur.current<ot.current){const qt=new Date().getTime()-ot.current;Pe.current=Pe.current-qt}ur.current=new Date().getTime()})():Pe.current!==1/0&&(ot.current=new Date().getTime(),qe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Be()},Pe.current)),()=>clearTimeout(qe)},[T,y,p,re,xn,Be]),ee.useEffect(()=>{p.delete&&(Be(),p.onDismiss==null||p.onDismiss.call(p,p))},[Be,p.delete]);function bt(){var qe;if(W?.loading){var ut;return ee.createElement("div",{className:Jo(B?.loader,p==null||(ut=p.classNames)==null?void 0:ut.loader,"sonner-loader"),"data-visible":re==="loading"},W.loading)}return ee.createElement(Dz,{className:Jo(B?.loader,p==null||(qe=p.classNames)==null?void 0:qe.loader),visible:re==="loading"})}const Tt=p.icon||W?.[re]||Mz(re);var ct,At;return ee.createElement("li",{tabIndex:0,ref:Fe,className:Jo(K,we,B?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,B?.default,B?.[re],p==null||(n=p.classNames)==null?void 0:n[re]),"data-sonner-toast":"","data-rich-colors":(ct=p.richColors)!=null?ct:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":F,"data-promise":!!p.promise,"data-swiped":H,"data-removed":z,"data-visible":Z,"data-y-position":Rn,"data-x-position":nn,"data-index":E,"data-front":We,"data-swiping":de,"data-dismissible":oe,"data-type":re,"data-invert":Qa,"data-swipe-out":Ie,"data-swipe-direction":M,"data-expanded":!!(T||le&&F),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":R.length-E,"--offset":`${z?_e:Ct.current}px`,"--initial-height":le?"auto":`${ue}px`,...N,...p.style},onDragEnd:()=>{ve(!1),ae(null),tn.current=null},onPointerDown:qe=>{qe.button!==2&&(ga||!oe||(Xe.current=new Date,se(Ct.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(ve(!0),tn.current={x:qe.clientX,y:qe.clientY})))},onPointerUp:()=>{var qe,ut,Wt;if(Ie||!oe)return;tn.current=null;const qt=Number(((qe=Fe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),dr=Number(((ut=Fe.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),It=new Date().getTime()-((Wt=Xe.current)==null?void 0:Wt.getTime()),rn=pe==="x"?qt:dr,ao=Math.abs(rn)/It;if(Math.abs(rn)>=Jz||ao>.11){se(Ct.current),p.onDismiss==null||p.onDismiss.call(p,p),q(pe==="x"?qt>0?"right":"left":dr>0?"down":"up"),Be(),Ae(!0);return}else{var Yn,xr;(Yn=Fe.current)==null||Yn.style.setProperty("--swipe-amount-x","0px"),(xr=Fe.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}ne(!1),ve(!1),ae(null)},onPointerMove:qe=>{var ut,Wt,qt;if(!tn.current||!oe||((ut=window.getSelection())==null?void 0:ut.toString().length)>0)return;const It=qe.clientY-tn.current.y,rn=qe.clientX-tn.current.x;var ao;const Yn=(ao=e.swipeDirections)!=null?ao:tV(U);!pe&&(Math.abs(rn)>1||Math.abs(It)>1)&&ae(Math.abs(rn)>Math.abs(It)?"x":"y");let xr={x:0,y:0};const qi=Co=>1/(1.5+Math.abs(Co)/20);if(pe==="y"){if(Yn.includes("top")||Yn.includes("bottom"))if(Yn.includes("top")&&It<0||Yn.includes("bottom")&&It>0)xr.y=It;else{const Co=It*qi(It);xr.y=Math.abs(Co)<Math.abs(It)?Co:It}}else if(pe==="x"&&(Yn.includes("left")||Yn.includes("right")))if(Yn.includes("left")&&rn<0||Yn.includes("right")&&rn>0)xr.x=rn;else{const Co=rn*qi(rn);xr.x=Math.abs(Co)<Math.abs(rn)?Co:rn}(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&ne(!0),(Wt=Fe.current)==null||Wt.style.setProperty("--swipe-amount-x",`${xr.x}px`),(qt=Fe.current)==null||qt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}},ke&&!p.jsx&&re!=="loading"?ee.createElement("button",{"aria-label":Y,"data-disabled":ga,"data-close-button":!0,onClick:ga||!oe?()=>{}:()=>{Be(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Jo(B?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(At=W?.close)!=null?At:zz):null,(re||p.icon||p.promise)&&p.icon!==null&&(W?.[re]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:Jo(B?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||bt():null,p.type!=="loading"?Tt:null):null,ee.createElement("div",{"data-content":"",className:Jo(B?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ee.createElement("div",{"data-title":"",className:Jo(B?.title,p==null||(l=p.classNames)==null?void 0:l.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:Jo(V,xe,B?.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&&uh(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:qe=>{uh(p.cancel)&&oe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,qe),Be())},className:Jo(B?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&uh(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:qe=>{uh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,qe),!qe.defaultPrevented&&Be())},className:Jo(B?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function _T(){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 rV(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,l=i?"--mobile-offset":"--offset",u=i?Yz:Wz;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${l}-${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[`${l}-${f}`]=u:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const oV=ee.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:w,style:S,visibleToasts:b=Kz,toastOptions:E,dir:R=_T(),gap:T=Xz,icons:O,containerAriaLabel:C="Notifications"}=t,[I,N]=ee.useState([]),P=ee.useMemo(()=>r?I.filter(F=>F.toasterId===r):I.filter(F=>!F.toasterId),[I,r]),$=ee.useMemo(()=>Array.from(new Set([i].concat(P.filter(F=>F.position).map(F=>F.position)))),[P,i]),[K,V]=ee.useState([]),[G,U]=ee.useState(!1),[J,le]=ee.useState(!1),[B,W]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=ee.useRef(null),pe=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ae=ee.useRef(null),M=ee.useRef(!1),q=ee.useCallback(F=>{N(L=>{var z;return(z=L.find(X=>X.id===F.id))!=null&&z.delete||Dr.dismiss(F.id),L.filter(({id:X})=>X!==F.id)})},[]);return ee.useEffect(()=>Dr.subscribe(F=>{if(F.dismiss){requestAnimationFrame(()=>{N(L=>L.map(z=>z.id===F.id?{...z,delete:!0}:z))});return}setTimeout(()=>{yA.flushSync(()=>{N(L=>{const z=L.findIndex(X=>X.id===F.id);return z!==-1?[...L.slice(0,z),{...L[z],...F},...L.slice(z+1)]:[F,...L]})})})}),[I]),ee.useEffect(()=>{if(g!=="system"){W(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:L})=>{W(L?"dark":"light")})}catch{F.addListener(({matches:z})=>{try{W(z?"dark":"light")}catch(X){console.error(X)}})}},[g]),ee.useEffect(()=>{I.length<=1&&U(!1)},[I]),ee.useEffect(()=>{const F=L=>{var z;if(l.every(ve=>L[ve]||L.code===ve)){var de;U(!0),(de=Y.current)==null||de.focus()}L.code==="Escape"&&(document.activeElement===Y.current||(z=Y.current)!=null&&z.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[l]),ee.useEffect(()=>{if(Y.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,M.current=!1)}},[Y.current]),ee.createElement("section",{ref:n,"aria-label":`${C} ${pe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((F,L)=>{var z;const[X,de]=F.split("-");return P.length?ee.createElement("ol",{key:F,dir:R==="auto"?_T():R,tabIndex:-1,ref:Y,className:f,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":X,"data-x-position":de,style:{"--front-toast-height":`${((z=K[0])==null?void 0:z.height)||0}px`,"--width":`${Qz}px`,"--gap":`${T}px`,...S,...rV(m,p)},onBlur:ve=>{M.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(M.current=!1,ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||M.current||(M.current=!0,ae.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===F).map((ve,Ie)=>{var Ae,H;return ee.createElement(nV,{key:ve.id,icons:O,index:Ie,toast:ve,defaultRichColors:y,duration:(Ae=E?.duration)!=null?Ae:w,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:a,visibleToasts:b,closeButton:(H=E?.closeButton)!=null?H:d,interacting:J,position:F,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:q,toasts:P.filter(ne=>ne.position==ve.position),heights:K.filter(ne=>ne.position==ve.position),setHeights:V,expandByDefault:u,gap:T,expanded:G,swipeDirections:t.swipeDirections})})):null}))}),nN=A.createContext({});function rN(){return A.useContext(nN)}var Ky,bT;function aV(){if(bT)return Ky;bT=1;var e=function(){};return Ky=e,Ky}var sV=aV();const iV=Ga(sV);function lV({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),a&&l.setAttribute("nonce",a),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var cV=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 Bu=null,rd=!1;const Bp=new Set,qp=new Set,uV=typeof window<"u",Jl="___grecaptcha_cfg",oN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function dV(){if(!uV)return;function e(n){if(rd)n();else{window[Jl]||(window[Jl]={});const r=window[Jl];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(){rd=!0;for(const n of qp)n();qp.clear()}window[oN]=t}function fV({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",l=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/${l}?${u.toString()}`}function hV({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},l=fV({language:e,onLoadCallbackName:oN,render:t,useEnterprise:r,useRecaptchaNet:a});if(Bu){if(Bu!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Bu=l,lV(Object.assign(Object.assign(Object.assign({},i),n),{src:l}))}function pV(e){if(!window[Jl])return;const t=window[Jl];t.clients&&delete t.clients[e]}function mV(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=cV(t,["onLoadCallback","onLoadCallbackName"]);if(Bp.size===0&&dV(),hV(a),Bp.add(e),n&&(rd?n():qp.add(n)),r){let i=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};rd?i():qp.add(i)}}function gV(e){var t,n,r;Bp.delete(e),Bp.size===0&&(window.grecaptcha=void 0,window[Jl]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Bu}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Bu=null,rd=!1)}let wT=!1;function vV({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:l}){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 mV(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:l}),()=>{gV(w),b(null)}},[e?.element,w,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,l]),A.useEffect(()=>{var N,P,$;if(!e?.element||!S?.render)return;const K={"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,K);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&(wT||(iV(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),wT=!0),($=V.querySelector(".grecaptcha-badge"))===null||$===void 0||$.style.setProperty("display","none")),R(G),T.current=!0,()=>{R(null),T.current=!1,pV(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(nN.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:S},children:t})}var yV=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 yV;function _V(){return()=>{}}function Ka(){return A.useSyncExternalStore(_V,()=>!0,()=>!1)}function aN(){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 Mb(){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 bV({children:e}){const t=Ka(),{captcha:n}=A.useContext(ht);return n?.provider!=="google-recaptcha-v3"?e:x.jsxs(vV,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&x.jsx("style",{children:`
49
49
  .grecaptcha-badge {
50
50
  visibility: hidden;
51
51
  border-radius: var(--radius) !important;
@@ -102,7 +102,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
102
102
 
103
103
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
104
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},qB="DialogDescriptionWarning",HB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ek(qB).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},GB=zN,ZB=FN,KB=qN,WB=HN,YB=GN,QB=KN,eoe=YN,toe=XN;function tk(e){const t=e+"CollectionProvider",[n,r]=Vi(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=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})};l.displayName=t;const u=e+"CollectionSlot",d=od(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=od(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}),()=>void 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:l,Slot:f,ItemSlot:y},w,r]}var XB=A.createContext(void 0);function nk(e){const t=A.useContext(XB);return e||t||"ltr"}const JB=["top","right","bottom","left"],Bs=Math.min,Jr=Math.max,Yp=Math.round,gh=Math.floor,sa=e=>({x:e,y:e}),eq={left:"right",right:"left",bottom:"top",top:"bottom"},tq={start:"end",end:"start"};function y_(e,t,n){return Jr(e,Bs(t,n))}function Ba(e,t){return typeof e=="function"?e(t):e}function qa(e){return e.split("-")[0]}function wc(e){return e.split("-")[1]}function Qb(e){return e==="x"?"y":"x"}function Xb(e){return e==="y"?"height":"width"}const nq=new Set(["top","bottom"]);function aa(e){return nq.has(qa(e))?"y":"x"}function Jb(e){return Qb(aa(e))}function rq(e,t,n){n===void 0&&(n=!1);const r=wc(e),a=Jb(e),i=Xb(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Qp(l)),[l,Qp(l)]}function oq(e){const t=Qp(e);return[__(e),t,__(t)]}function __(e){return e.replace(/start|end/g,t=>tq[t])}const JT=["left","right"],eO=["right","left"],aq=["top","bottom"],sq=["bottom","top"];function iq(e,t,n){switch(e){case"top":case"bottom":return n?t?eO:JT:t?JT:eO;case"left":case"right":return t?aq:sq;default:return[]}}function lq(e,t,n,r){const a=wc(e);let i=iq(qa(e),n==="start",r);return a&&(i=i.map(l=>l+"-"+a),t&&(i=i.concat(i.map(__)))),i}function Qp(e){return e.replace(/left|right|bottom|top/g,t=>eq[t])}function cq(e){return{top:0,right:0,bottom:0,left:0,...e}}function rk(e){return typeof e!="number"?cq(e):{top:e,right:e,bottom:e,left:e}}function Xp(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 tO(e,t,n){let{reference:r,floating:a}=e;const i=aa(t),l=Jb(t),u=Xb(l),d=qa(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(wc(t)){case"start":y[l]-=g*(n&&f?-1:1);break;case"end":y[l]+=g*(n&&f?-1:1);break}return y}async function uq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Ba(t,e),w=rk(y),b=u[g?p==="floating"?"reference":"floating":p],E=Xp(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:l.floating.width,height:l.floating.height}:l.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=Xp(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 dq=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=tO(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:{...l,detectOverflow:(S=l.detectOverflow)!=null?S:uq},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 l.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:m,y:p}=tO(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:y}},fq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Ba(e,t)||{};if(f==null)return{};const p=rk(m),g={x:n,y:r},y=Jb(a),w=Xb(y),S=await l.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(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let N=I?I[T]:0;(!N||!await(l.isElement==null?void 0:l.isElement(I)))&&(N=u.floating[T]||i.floating[w]);const P=O/2-C/2,$=N/2-S[w]/2-1,K=Bs(p[E],$),V=Bs(p[R],$),G=K,U=N-S[w]-V,J=N/2-S[w]/2+P,le=y_(G,J,U),B=!d.arrow&&wc(a)!=null&&J!==le&&i.reference[w]/2-(J<G?K:V)-S[w]/2<0,W=B?J<G?J-G:J-U:0;return{[y]:g[y]+W,data:{[y]:le,centerOffset:J-le-W,...B&&{alignmentOffset:W}},reset:B}}}),hq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:l,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}=Ba(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=qa(a),R=aa(u),T=qa(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),C=g||(T||!S?[Qp(u)]:oq(u)),I=w!=="none";!g&&I&&C.push(...lq(u,S,w,O));const N=[u,...C],P=await d.detectOverflow(t,b),$=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&$.push(P[E]),p){const J=rq(a,l,O);$.push(P[J[0]],P[J[1]])}if(K=[...K,{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!==aa(le):!1)||K.every(Y=>aa(Y.placement)===R?Y.overflows[0]>0:!0)))return{data:{index:J,overflows:K},reset:{placement:le}};let B=(G=K.filter(W=>W.overflows[0]<=0).sort((W,Y)=>W.overflows[1]-Y.overflows[1])[0])==null?void 0:G.placement;if(!B)switch(y){case"bestFit":{var U;const W=(U=K.filter(Y=>{if(I){const pe=aa(Y.placement);return pe===R||pe==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(pe=>pe>0).reduce((pe,ae)=>pe+ae,0)]).sort((Y,pe)=>Y[1]-pe[1])[0])==null?void 0:U[0];W&&(B=W);break}case"initialPlacement":B=u;break}if(a!==B)return{reset:{placement:B}}}return{}}}};function nO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rO(e){return JB.some(t=>e[t]>=0)}const pq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Ba(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=nO(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:rO(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...i,altBoundary:!0}),u=nO(l,n.floating);return{data:{escapedOffsets:u,escaped:rO(u)}}}default:return{}}}}},ok=new Set(["left","top"]);async function mq(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=qa(n),u=wc(n),d=aa(n)==="y",f=ok.has(l)?-1:1,m=i&&d?-1:1,p=Ba(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 gq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:l,middlewareData:u}=t,d=await mq(t,e);return l===((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:l}}}}},vq=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:l=!0,crossAxis:u=!1,limiter:d={fn:E=>{let{x:R,y:T}=E;return{x:R,y:T}}},...f}=Ba(e,t),m={x:n,y:r},p=await i.detectOverflow(t,f),g=aa(qa(a)),y=Qb(g);let w=m[y],S=m[g];if(l){const E=y==="y"?"top":"left",R=y==="y"?"bottom":"right",T=w+p[E],O=w-p[R];w=y_(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=y_(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]:l,[g]:u}}}}}},yq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ba(e,t),m={x:n,y:r},p=aa(a),g=Qb(p);let y=m[g],w=m[p];const S=Ba(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=ok.has(qa(a)),C=i.reference[p]-i.floating[T]+(O&&((E=l.offset)==null?void 0:E[p])||0)+(O?0:b.crossAxis),I=i.reference[p]+i.reference[T]+(O?0:((R=l.offset)==null?void 0:R[p])||0)-(O?b.crossAxis:0);w<C?w=C:w>I&&(w=I)}return{[g]:y,[p]:w}}}},_q=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ba(e,t),m=await l.detectOverflow(t,f),p=qa(a),g=wc(a),y=aa(a)==="y",{width:w,height:S}=i.floating;let b,E;p==="top"||p==="bottom"?(b=p,E=g===(await(l.isRTL==null?void 0:l.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=Bs(S-m[b],R),C=Bs(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 K=Jr(m.left,0),V=Jr(m.right,0),G=Jr(m.top,0),U=Jr(m.bottom,0);y?P=w-2*(K!==0||V!==0?K+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 l.getDimensions(u.floating);return w!==$.width||S!==$.height?{reset:{rects:!0}}:{}}}};function Fm(){return typeof window<"u"}function Sc(e){return ak(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ha(e){var t;return(t=(ak(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ak(e){return Fm()?e instanceof Node||e instanceof no(e).Node:!1}function Ho(e){return Fm()?e instanceof Element||e instanceof no(e).Element:!1}function ca(e){return Fm()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function oO(e){return!Fm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}const bq=new Set(["inline","contents"]);function Sd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!bq.has(a)}const wq=new Set(["table","td","th"]);function Sq(e){return wq.has(Sc(e))}const Eq=[":popover-open",":modal"];function Bm(e){return Eq.some(t=>{try{return e.matches(t)}catch{return!1}})}const Rq=["transform","translate","scale","rotate","perspective"],xq=["transform","translate","scale","rotate","perspective","filter"],Tq=["paint","layout","strict","content"];function e1(e){const t=t1(),n=Ho(e)?Go(e):e;return Rq.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)||xq.some(r=>(n.willChange||"").includes(r))||Tq.some(r=>(n.contain||"").includes(r))}function Oq(e){let t=qs(e);for(;ca(t)&&!lc(t);){if(e1(t))return t;if(Bm(t))return null;t=qs(t)}return null}function t1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cq=new Set(["html","body","#document"]);function lc(e){return Cq.has(Sc(e))}function Go(e){return no(e).getComputedStyle(e)}function qm(e){return Ho(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qs(e){if(Sc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oO(e)&&e.host||ha(e);return oO(t)?t.host:t}function sk(e){const t=qs(e);return lc(t)?e.ownerDocument?e.ownerDocument.body:e.body:ca(t)&&Sd(t)?t:sk(t)}function ad(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=sk(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),l=no(a);if(i){const u=b_(l);return t.concat(l,l.visualViewport||[],Sd(a)?a:[],u&&n?ad(u):[])}return t.concat(a,ad(a,[],n))}function b_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ik(e){const t=Go(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ca(e),i=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Yp(n)!==i||Yp(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function n1(e){return Ho(e)?e:e.contextElement}function tc(e){const t=n1(e);if(!ca(t))return sa(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=ik(t);let l=(i?Yp(n.width):n.width)/r,u=(i?Yp(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const Aq=sa(0);function lk(e){const t=no(e);return!t1()||!t.visualViewport?Aq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==no(e)?!1:t}function ji(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=n1(e);let l=sa(1);t&&(r?Ho(r)&&(l=tc(r)):l=tc(e));const u=Iq(i,n,r)?lk(i):sa(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,p=a.height/l.y;if(i){const g=no(i),y=r&&Ho(r)?no(r):r;let w=g,S=b_(w);for(;S&&r&&y!==w;){const b=tc(S),E=S.getBoundingClientRect(),R=Go(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=b_(w)}}return Xp({width:m,height:p,x:d,y:f})}function Hm(e,t){const n=qm(e).scrollLeft;return t?t.left+n:ji(ha(e)).left+n}function ck(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function Nq(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",l=ha(r),u=t?Bm(t.floating):!1;if(r===l||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=sa(1);const m=sa(0),p=ca(r);if((p||!p&&!i)&&((Sc(r)!=="body"||Sd(l))&&(d=qm(r)),ca(r))){const y=ji(r);f=tc(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=l&&!p&&!i?ck(l,d):sa(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 Mq(e){const t=ha(e),n=qm(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 l=-n.scrollLeft+Hm(e);const u=-n.scrollTop;return Go(r).direction==="rtl"&&(l+=Jr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:l,y:u}}const aO=25;function Pq(e,t){const n=no(e),r=ha(e),a=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){i=a.width,l=a.height;const m=t1();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Hm(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<=aO&&(i-=w)}else f<=aO&&(i+=f);return{width:i,height:l,x:u,y:d}}const Dq=new Set(["absolute","fixed"]);function Lq(e,t){const n=ji(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=ca(e)?tc(e):sa(1),l=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:l,height:u,x:d,y:f}}function sO(e,t,n){let r;if(t==="viewport")r=Pq(e,n);else if(t==="document")r=Mq(ha(e));else if(Ho(t))r=Lq(t,n);else{const a=lk(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Xp(r)}function uk(e,t){const n=qs(e);return n===t||!Ho(n)||lc(n)?!1:Go(n).position==="fixed"||uk(n,t)}function jq(e,t){const n=t.get(e);if(n)return n;let r=ad(e,[],!1).filter(u=>Ho(u)&&Sc(u)!=="body"),a=null;const i=Go(e).position==="fixed";let l=i?qs(e):e;for(;Ho(l)&&!lc(l);){const u=Go(l),d=e1(l);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&Dq.has(a.position)||Sd(l)&&!d&&uk(e,l))?r=r.filter(m=>m!==l):a=u,l=qs(l)}return t.set(e,r),r}function $q(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Bm(t)?[]:jq(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const p=sO(t,m,a);return f.top=Jr(p.top,f.top),f.right=Bs(p.right,f.right),f.bottom=Bs(p.bottom,f.bottom),f.left=Jr(p.left,f.left),f},sO(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Uq(e){const{width:t,height:n}=ik(e);return{width:t,height:n}}function zq(e,t,n){const r=ca(t),a=ha(t),i=n==="fixed",l=ji(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=sa(0);function f(){d.x=Hm(a)}if(r||!r&&!i)if((Sc(t)!=="body"||Sd(a))&&(u=qm(t)),r){const y=ji(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?ck(a,u):sa(0),p=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function r0(e){return Go(e).position==="static"}function iO(e,t){if(!ca(e)||Go(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ha(e)===n&&(n=n.ownerDocument.body),n}function dk(e,t){const n=no(e);if(Bm(e))return n;if(!ca(e)){let a=qs(e);for(;a&&!lc(a);){if(Ho(a)&&!r0(a))return a;a=qs(a)}return n}let r=iO(e,t);for(;r&&Sq(r)&&r0(r);)r=iO(r,t);return r&&lc(r)&&r0(r)&&!e1(r)?n:r||Oq(e)||n}const Vq=async function(e){const t=this.getOffsetParent||dk,n=this.getDimensions,r=await n(e.floating);return{reference:zq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fq(e){return Go(e).direction==="rtl"}const Bq={convertOffsetParentRelativeRectToViewportRelativeRect:Nq,getDocumentElement:ha,getClippingRect:$q,getOffsetParent:dk,getElementRects:Vq,getClientRects:kq,getDimensions:Uq,getScale:tc,isElement:Ho,isRTL:Fq};function fk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qq(e,t){let n=null,r;const a=ha(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(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=gh(p),S=gh(a.clientWidth-(m+g)),b=gh(a.clientHeight-(p+y)),E=gh(m),T={rootMargin:-w+"px "+-S+"px "+-b+"px "+-E+"px",threshold:Jr(0,Bs(1,d))||1};let O=!0;function C(I){const N=I[0].intersectionRatio;if(N!==d){if(!O)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!fk(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(C,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return l(!0),i}function Hq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=n1(e),m=a||i?[...f?ad(f):[],...ad(t)]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const p=f&&u?qq(f,n):null;let g=-1,y=null;l&&(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?ji(e):null;d&&b();function b(){const E=ji(e);S&&!fk(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 Gq=gq,Zq=vq,Kq=hq,Wq=_q,Yq=pq,lO=fq,Qq=yq,Xq=(e,t,n)=>{const r=new Map,a={platform:Bq,...n},i={...a.platform,_c:r};return dq(e,t,{...a,platform:i})};var Jq=typeof document<"u",eH=function(){},_p=Jq?A.useLayoutEffect:eH;function Jp(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(!Jp(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)&&!Jp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cO(e,t){const n=hk(e);return Math.round(t*n)/n}function o0(e){const t=A.useRef(e);return _p(()=>{t.current=e}),t}function tH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:l}={},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);Jp(g,r)||y(r);const[w,S]=A.useState(null),[b,E]=A.useState(null),R=A.useCallback(Y=>{Y!==I.current&&(I.current=Y,S(Y))},[]),T=A.useCallback(Y=>{Y!==N.current&&(N.current=Y,E(Y))},[]),O=i||w,C=l||b,I=A.useRef(null),N=A.useRef(null),P=A.useRef(m),$=d!=null,K=o0(d),V=o0(a),G=o0(f),U=A.useCallback(()=>{if(!I.current||!N.current)return;const Y={placement:t,strategy:n,middleware:g};V.current&&(Y.platform=V.current),Xq(I.current,N.current,Y).then(pe=>{const ae={...pe,isPositioned:G.current!==!1};J.current&&!Jp(P.current,ae)&&(P.current=ae,Cm.flushSync(()=>{p(ae)}))})},[g,t,n,V,G]);_p(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[f]);const J=A.useRef(!1);_p(()=>(J.current=!0,()=>{J.current=!1}),[]),_p(()=>{if(O&&(I.current=O),C&&(N.current=C),O&&C){if(K.current)return K.current(O,C,U);U()}},[O,C,U,K,$]);const le=A.useMemo(()=>({reference:I,floating:N,setReference:R,setFloating:T}),[R,T]),B=A.useMemo(()=>({reference:O,floating:C}),[O,C]),W=A.useMemo(()=>{const Y={position:n,left:0,top:0};if(!B.floating)return Y;const pe=cO(B.floating,m.x),ae=cO(B.floating,m.y);return u?{...Y,transform:"translate("+pe+"px, "+ae+"px)",...hk(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:pe,top:ae}},[n,u,B.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:le,elements:B,floatingStyles:W}),[m,U,le,B,W])}const nH=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?lO({element:r.current,padding:a}).fn(n):{}:r?lO({element:r,padding:a}).fn(n):{}}}},rH=(e,t)=>({...Gq(e),options:[e,t]}),oH=(e,t)=>({...Zq(e),options:[e,t]}),aH=(e,t)=>({...Qq(e),options:[e,t]}),sH=(e,t)=>({...Kq(e),options:[e,t]}),iH=(e,t)=>({...Wq(e),options:[e,t]}),lH=(e,t)=>({...Yq(e),options:[e,t]}),cH=(e,t)=>({...nH(e),options:[e,t]});var uH="Arrow",pk=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"})})});pk.displayName=uH;var dH=pk;function mk(e){const[t,n]=A.useState(void 0);return Bo(()=>{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 l,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var r1="Popper",[gk,vk]=Vi(r1),[fH,yk]=gk(r1),_k=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return x.jsx(fH,{scope:t,anchor:r,onAnchorChange:a,children:n})};_k.displayName=r1;var bk="PopperAnchor",wk=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=yk(bk,n),l=A.useRef(null),u=Bn(t,l),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:x.jsx(pn.div,{...a,ref:u})});wk.displayName=bk;var o1="PopperContent",[hH,pH]=gk(o1),Sk=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:l=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=yk(o1,n),[E,R]=A.useState(null),T=Bn(t,de=>R(de)),[O,C]=A.useState(null),I=mk(O),N=I?.width??0,P=I?.height??0,$=r+(i!=="center"?"-"+i:""),K=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:K,boundary:V.filter(gH),altBoundary:G},{refs:J,floatingStyles:le,placement:B,isPositioned:W,middlewareData:Y}=tH({strategy:"fixed",placement:$,whileElementsMounted:(...de)=>Hq(...de,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[rH({mainAxis:a+P,alignmentAxis:l}),d&&oH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?aH():void 0,...U}),d&&sH({...U}),iH({...U,apply:({elements:de,rects:ve,availableWidth:Ie,availableHeight:Ae})=>{const{width:H,height:ne}=ve.reference,_e=de.floating.style;_e.setProperty("--radix-popper-available-width",`${Ie}px`),_e.setProperty("--radix-popper-available-height",`${Ae}px`),_e.setProperty("--radix-popper-anchor-width",`${H}px`),_e.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),O&&cH({element:O,padding:u}),vH({arrowWidth:N,arrowHeight:P}),g&&lH({strategy:"referenceHidden",...U})]}),[pe,ae]=xk(B),M=qo(w);Bo(()=>{W&&M?.()},[W,M]);const q=Y.arrow?.x,F=Y.arrow?.y,L=Y.arrow?.centerOffset!==0,[z,X]=A.useState();return Bo(()=>{E&&X(window.getComputedStyle(E).zIndex)},[E]),x.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:W?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(hH,{scope:n,placedSide:pe,onArrowChange:C,arrowX:q,arrowY:F,shouldHideArrow:L,children:x.jsx(pn.div,{"data-side":pe,"data-align":ae,...S,ref:T,style:{...S.style,animation:W?void 0:"none"}})})})});Sk.displayName=o1;var Ek="PopperArrow",mH={top:"bottom",right:"left",bottom:"top",left:"right"},Rk=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=pH(Ek,r),l=mH[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]: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(dH,{...a,ref:n,style:{...a.style,display:"block"}})})});Rk.displayName=Ek;function gH(e){return e!==null}var vH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=xk(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=l?p:`${g}px`,S=`${-d}px`):f==="top"?(w=l?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(w=`${-d}px`,S=l?p:`${y}px`):f==="left"&&(w=`${r.floating.width+d}px`,S=l?p:`${y}px`),{data:{x:w,y:S}}}});function xk(e){const[t,n="center"]=e.split("-");return[t,n]}var Tk=_k,yH=wk,_H=Sk,bH=Rk,a0="rovingFocusGroup.onEntryFocus",wH={bubbles:!1,cancelable:!0},Ed="RovingFocusGroup",[w_,Ok,SH]=tk(Ed),[EH,Ck]=Vi(Ed,[SH]),[RH,xH]=EH(Ed),Ak=A.forwardRef((e,t)=>x.jsx(w_.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(w_.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(TH,{...e,ref:t})})}));Ak.displayName=Ed;var TH=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=Bn(t,g),w=nk(i),[S,b]=wd({prop:l,defaultProp:u??null,onChange:d,caller:Ed}),[E,R]=A.useState(!1),T=qo(f),O=Ok(n),C=A.useRef(!1),[I,N]=A.useState(0);return A.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(a0,T),()=>P.removeEventListener(a0,T)},[T]),x.jsx(RH,{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 K=new CustomEvent(a0,wH);if(P.currentTarget.dispatchEvent(K),!K.defaultPrevented){const V=O().filter(B=>B.focusable),G=V.find(B=>B.active),U=V.find(B=>B.id===S),le=[G,U,...V].filter(Boolean).map(B=>B.ref.current);kk(le,m)}}C.current=!1}),onBlur:lt(e.onBlur,()=>R(!1))})})}),Ik="RovingFocusGroupItem",Nk=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:l,...u}=e,d=$s(),f=i||d,m=xH(Ik,n),p=m.currentTabStopId===f,g=Ok(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:S}=m;return A.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),x.jsx(w_.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=AH(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?IH(T,O+1):T.slice(O+1)}setTimeout(()=>kk(T))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:S!=null}):l})})});Nk.displayName=Ik;var OH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AH(e,t,n){const r=CH(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return OH[r]}function kk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function IH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NH=Ak,kH=Nk,S_=["Enter"," "],MH=["ArrowDown","PageUp","Home"],Mk=["ArrowUp","PageDown","End"],PH=[...MH,...Mk],DH={ltr:[...S_,"ArrowRight"],rtl:[...S_,"ArrowLeft"]},LH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rd="Menu",[sd,jH,$H]=tk(Rd),[Fi,Pk]=Vi(Rd,[$H,vk,Ck]),xd=vk(),Dk=Ck(),[Lk,Ys]=Fi(Rd),[UH,Td]=Fi(Rd),jk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:l=!0}=e,u=xd(t),[d,f]=A.useState(null),m=A.useRef(!1),p=qo(i),g=nk(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(Tk,{...u,children:x.jsx(Lk,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:x.jsx(UH,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};jk.displayName=Rd;var zH="MenuAnchor",a1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=xd(n);return x.jsx(yH,{...a,...r,ref:t})});a1.displayName=zH;var s1="MenuPortal",[VH,$k]=Fi(s1,{forceMount:void 0}),Uk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Ys(s1,t);return x.jsx(VH,{scope:t,forceMount:n,children:x.jsx(Wa,{present:n||i.open,children:x.jsx(Gb,{asChild:!0,container:a,children:r})})})};Uk.displayName=s1;var Eo="MenuContent",[FH,i1]=Fi(Eo),zk=A.forwardRef((e,t)=>{const n=$k(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ys(Eo,e.__scopeMenu),l=Td(Eo,e.__scopeMenu);return x.jsx(sd.Provider,{scope:e.__scopeMenu,children:x.jsx(Wa,{present:r||i.open,children:x.jsx(sd.Slot,{scope:e.__scopeMenu,children:l.modal?x.jsx(BH,{...a,ref:t}):x.jsx(qH,{...a,ref:t})})})})}),BH=A.forwardRef((e,t)=>{const n=Ys(Eo,e.__scopeMenu),r=A.useRef(null),a=Bn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return $N(i)},[]),x.jsx(l1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qH=A.forwardRef((e,t)=>{const n=Ys(Eo,e.__scopeMenu);return x.jsx(l1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HH=od("MenuContent.ScrollLock"),l1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:w,...S}=e,b=Ys(Eo,n),E=Td(Eo,n),R=xd(n),T=Dk(n),O=jH(n),[C,I]=A.useState(null),N=A.useRef(null),P=Bn(t,N,b.onContentChange),$=A.useRef(0),K=A.useRef(""),V=A.useRef(0),G=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),le=w?Zb:A.Fragment,B=w?{as:HH,allowPinchZoom:!0}:void 0,W=pe=>{const ae=K.current+pe,M=O().filter(de=>!de.disabled),q=document.activeElement,F=M.find(de=>de.ref.current===q)?.textValue,L=M.map(de=>de.textValue),z=rG(L,ae,F),X=M.find(de=>de.textValue===z)?.ref.current;(function de(ve){K.current=ve,window.clearTimeout($.current),ve!==""&&($.current=window.setTimeout(()=>de(""),1e3))})(ae),X&&setTimeout(()=>X.focus())};A.useEffect(()=>()=>window.clearTimeout($.current),[]),AN();const Y=A.useCallback(pe=>U.current===G.current?.side&&aG(pe,G.current?.area),[]);return x.jsx(FH,{scope:n,searchRef:K,onItemEnter:A.useCallback(pe=>{Y(pe)&&pe.preventDefault()},[Y]),onItemLeave:A.useCallback(pe=>{Y(pe)||(N.current?.focus(),I(null))},[Y]),onTriggerLeave:A.useCallback(pe=>{Y(pe)&&pe.preventDefault()},[Y]),pointerGraceTimerRef:V,onPointerGraceIntentChange:A.useCallback(pe=>{G.current=pe},[]),children:x.jsx(le,{...B,children:x.jsx(Hb,{asChild:!0,trapped:a,onMountAutoFocus:lt(i,pe=>{pe.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:x.jsx(qb,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:x.jsx(NH,{asChild:!0,...T,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:I,onEntryFocus:lt(d,pe=>{E.isUsingKeyboardRef.current||pe.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(_H,{role:"menu","aria-orientation":"vertical","data-state":rM(b.open),"data-radix-menu-content":"",dir:E.dir,...R,...S,ref:P,style:{outline:"none",...S.style},onKeyDown:lt(S.onKeyDown,pe=>{const M=pe.target.closest("[data-radix-menu-content]")===pe.currentTarget,q=pe.ctrlKey||pe.altKey||pe.metaKey,F=pe.key.length===1;M&&(pe.key==="Tab"&&pe.preventDefault(),!q&&F&&W(pe.key));const L=N.current;if(pe.target!==L||!PH.includes(pe.key))return;pe.preventDefault();const X=O().filter(de=>!de.disabled).map(de=>de.ref.current);Mk.includes(pe.key)&&X.reverse(),tG(X)}),onBlur:lt(e.onBlur,pe=>{pe.currentTarget.contains(pe.target)||(window.clearTimeout($.current),K.current="")}),onPointerMove:lt(e.onPointerMove,id(pe=>{const ae=pe.target,M=J.current!==pe.clientX;if(pe.currentTarget.contains(ae)&&M){const q=pe.clientX>J.current?"right":"left";U.current=q,J.current=pe.clientX}}))})})})})})})});zk.displayName=Eo;var GH="MenuGroup",c1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"group",...r,ref:t})});c1.displayName=GH;var ZH="MenuLabel",Vk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{...r,ref:t})});Vk.displayName=ZH;var em="MenuItem",uO="menu.itemSelect",Gm=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),l=Td(em,e.__scopeMenu),u=i1(em,e.__scopeMenu),d=Bn(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(uO,{bubbles:!0,cancelable:!0});p.addEventListener(uO,y=>r?.(y),{once:!0}),xN(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return x.jsx(Fk,{...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===" "||S_.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Gm.displayName=em;var Fk=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,l=i1(em,n),u=Dk(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(sd.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,id(w=>{r?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lt(e.onPointerLeave,id(w=>l.onItemLeave(w))),onFocus:lt(e.onFocus,()=>p(!0)),onBlur:lt(e.onBlur,()=>p(!1))})})})}),KH="MenuCheckboxItem",Bk=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(Kk,{scope:e.__scopeMenu,checked:n,children:x.jsx(Gm,{role:"menuitemcheckbox","aria-checked":tm(n)?"mixed":n,...a,ref:t,"data-state":f1(n),onSelect:lt(a.onSelect,()=>r?.(tm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Bk.displayName=KH;var qk="MenuRadioGroup",[WH,YH]=Fi(qk,{value:void 0,onValueChange:()=>{}}),Hk=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=qo(r);return x.jsx(WH,{scope:e.__scopeMenu,value:n,onValueChange:i,children:x.jsx(c1,{...a,ref:t})})});Hk.displayName=qk;var Gk="MenuRadioItem",Zk=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=YH(Gk,e.__scopeMenu),i=n===a.value;return x.jsx(Kk,{scope:e.__scopeMenu,checked:i,children:x.jsx(Gm,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":f1(i),onSelect:lt(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Zk.displayName=Gk;var u1="MenuItemIndicator",[Kk,QH]=Fi(u1,{checked:!1}),Wk=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=QH(u1,n);return x.jsx(Wa,{present:r||tm(i.checked)||i.checked===!0,children:x.jsx(pn.span,{...a,ref:t,"data-state":f1(i.checked)})})});Wk.displayName=u1;var XH="MenuSeparator",Yk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Yk.displayName=XH;var JH="MenuArrow",Qk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=xd(n);return x.jsx(bH,{...a,...r,ref:t})});Qk.displayName=JH;var d1="MenuSub",[eG,Xk]=Fi(d1),Jk=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=Ys(d1,t),l=xd(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=qo(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),x.jsx(Tk,{...l,children:x.jsx(Lk,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:x.jsx(eG,{scope:t,contentId:$s(),triggerId:$s(),trigger:u,onTriggerChange:d,children:n})})})};Jk.displayName=d1;var Mu="MenuSubTrigger",eM=A.forwardRef((e,t)=>{const n=Ys(Mu,e.__scopeMenu),r=Td(Mu,e.__scopeMenu),a=Xk(Mu,e.__scopeMenu),i=i1(Mu,e.__scopeMenu),l=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),x.jsx(a1,{asChild:!0,...f,children:x.jsx(Fk,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":rM(n.open),...e,ref:bd(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lt(e.onPointerMove,id(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:lt(e.onPointerLeave,id(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===" "||DH[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});eM.displayName=Mu;var tM="MenuSubContent",nM=A.forwardRef((e,t)=>{const n=$k(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ys(Eo,e.__scopeMenu),l=Td(Eo,e.__scopeMenu),u=Xk(tM,e.__scopeMenu),d=A.useRef(null),f=Bn(t,d);return x.jsx(sd.Provider,{scope:e.__scopeMenu,children:x.jsx(Wa,{present:r||i.open,children:x.jsx(sd.Slot,{scope:e.__scopeMenu,children:x.jsx(l1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{l.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=>{l.onClose(),m.preventDefault()}),onKeyDown:lt(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=LH[l.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});nM.displayName=tM;function rM(e){return e?"open":"closed"}function tm(e){return e==="indeterminate"}function f1(e){return tm(e)?"indeterminate":e?"checked":"unchecked"}function tG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function rG(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 l=nG(e,Math.max(i,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function oG(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],d=t[l],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 aG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return oG(n,t)}function id(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sG=jk,iG=a1,lG=Uk,cG=zk,uG=c1,dG=Vk,fG=Gm,hG=Bk,pG=Hk,mG=Zk,gG=Wk,vG=Yk,yG=Qk,_G=Jk,bG=eM,wG=nM,Zm="DropdownMenu",[SG]=Vi(Zm,[Pk]),vr=Pk(),[EG,oM]=SG(Zm),aM=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:l,modal:u=!0}=e,d=vr(t),f=A.useRef(null),[m,p]=wd({prop:a,defaultProp:i??!1,onChange:l,caller:Zm});return x.jsx(EG,{scope:t,triggerId:$s(),triggerRef:f,contentId:$s(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:x.jsx(sG,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};aM.displayName=Zm;var sM="DropdownMenuTrigger",iM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=oM(sM,n),l=vr(n);return x.jsx(iG,{asChild:!0,...l,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:bd(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())})})})});iM.displayName=sM;var RG="DropdownMenuPortal",lM=e=>{const{__scopeDropdownMenu:t,...n}=e,r=vr(t);return x.jsx(lG,{...r,...n})};lM.displayName=RG;var cM="DropdownMenuContent",uM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=oM(cM,n),i=vr(n),l=A.useRef(!1);return x.jsx(cG,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,u=>{l.current||a.triggerRef.current?.focus(),l.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)&&(l.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)"}})});uM.displayName=cM;var xG="DropdownMenuGroup",TG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(uG,{...a,...r,ref:t})});TG.displayName=xG;var OG="DropdownMenuLabel",CG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(dG,{...a,...r,ref:t})});CG.displayName=OG;var AG="DropdownMenuItem",dM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(fG,{...a,...r,ref:t})});dM.displayName=AG;var IG="DropdownMenuCheckboxItem",NG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(hG,{...a,...r,ref:t})});NG.displayName=IG;var kG="DropdownMenuRadioGroup",MG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(pG,{...a,...r,ref:t})});MG.displayName=kG;var PG="DropdownMenuRadioItem",DG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(mG,{...a,...r,ref:t})});DG.displayName=PG;var LG="DropdownMenuItemIndicator",jG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(gG,{...a,...r,ref:t})});jG.displayName=LG;var $G="DropdownMenuSeparator",fM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(vG,{...a,...r,ref:t})});fM.displayName=$G;var UG="DropdownMenuArrow",zG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(yG,{...a,...r,ref:t})});zG.displayName=UG;var VG=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,l=vr(t),[u,d]=wd({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return x.jsx(_G,{...l,open:u,onOpenChange:d,children:n})},FG="DropdownMenuSubTrigger",hM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(bG,{...a,...r,ref:t})});hM.displayName=FG;var BG="DropdownMenuSubContent",pM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(wG,{...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)"}})});pM.displayName=BG;var qG=aM,HG=iM,GG=lM,ZG=uM,KG=dM,noe=fM,roe=VG,ooe=hM,aoe=pM,WG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Od=WG.reduce((e,t)=>{const n=SN(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?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}},{}),YG="Label",mM=A.forwardRef((e,t)=>x.jsx(Od.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));mM.displayName=YG;var QG=mM;function XG(e,t=[]){let n=[];function r(i,l){const u=A.createContext(l);u.displayName=i+"Context";const d=n.length;n=[...n,l];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(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(l=>A.createContext(l));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,JG(a,...t)]}function JG(...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 l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var eZ=mA();function tZ(){return eZ.useSyncExternalStore(nZ,()=>!0,()=>!1)}function nZ(){return()=>{}}var h1="Avatar",[rZ]=XG(h1),[oZ,gM]=rZ(h1),vM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return x.jsx(oZ,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(Od.span,{...r,ref:t})})});vM.displayName=h1;var yM="AvatarImage",_M=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,l=gM(yM,n),u=aZ(r,i),d=qo(f=>{a(f),l.onImageLoadingStatusChange(f)});return Bo(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?x.jsx(Od.img,{...i,ref:t,src:r}):null});_M.displayName=yM;var bM="AvatarFallback",wM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=gM(bM,n),[l,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]),l&&i.imageLoadingStatus!=="loaded"?x.jsx(Od.span,{...a,ref:t}):null});wM.displayName=bM;function dO(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function aZ(e,{referrerPolicy:t,crossOrigin:n}){const r=tZ(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[l,u]=A.useState(()=>dO(i,e));return Bo(()=>{u(dO(i,e))},[i,e]),Bo(()=>{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]),l}var sZ=vM,iZ=_M,lZ=wM;function cZ(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function p1(e,t,n=""){const r=cZ(e),a=e?.length;if(!r||t!==void 0){const l=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(l+"expected Uint8Array"+u+", got "+d)}return e}function fO(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 uZ(e,t){p1(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 E_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function s0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ea(e,t){return e<<32-t|e>>>t}const dZ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",fZ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function hZ(e){if(p1(e),dZ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=fZ[e[n]];return t}function pZ(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 mZ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function gZ(e,t,n){return e&t^~e&n}function vZ(e,t,n){return e&t^e&n^t&n}class yZ{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=s0(this.buffer)}update(t){fO(this),p1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let l=0;l<i;){const u=Math.min(a-this.pos,i-l);if(u===a){const d=s0(t);for(;a<=i-l;l+=a)this.process(d,l);continue}r.set(t.subarray(l,l+u),this.pos),this.pos+=u,l+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){fO(this),uZ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:l}=this;n[l++]=128,E_(this.buffer.subarray(l)),this.padOffset>a-l&&(this.process(r,0),l=0);for(let p=l;p<a;p++)n[p]=0;r.setBigUint64(a-8,BigInt(this.length*8),i),this.process(r,0);const u=s0(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:l,pos:u}=this;return t.destroyed=l,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Rs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_Z=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]),xs=new Uint32Array(64);class bZ extends yZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:l,G:u,H:d}=this;return[t,n,r,a,i,l,u,d]}set(t,n,r,a,i,l,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=l|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)xs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=xs[p-15],y=xs[p-2],w=ea(g,7)^ea(g,18)^g>>>3,S=ea(y,17)^ea(y,19)^y>>>10;xs[p]=S+xs[p-7]+w+xs[p-16]|0}let{A:r,B:a,C:i,D:l,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=ea(u,6)^ea(u,11)^ea(u,25),y=m+g+gZ(u,d,f)+_Z[p]+xs[p]|0,S=(ea(r,2)^ea(r,13)^ea(r,22))+vZ(r,a,i)|0;m=f,f=d,d=u,u=l+y|0,l=i,i=a,a=r,r=y+S|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,l=l+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,l,u,d,f,m)}roundClean(){E_(xs)}destroy(){this.set(0,0,0,0,0,0,0,0),E_(this.buffer)}}class wZ extends bZ{A=Rs[0]|0;B=Rs[1]|0;C=Rs[2]|0;D=Rs[3]|0;E=Rs[4]|0;F=Rs[5]|0;G=Rs[6]|0;H=Rs[7]|0;constructor(){super(32)}}const SZ=pZ(()=>new wZ,mZ(1));function EZ(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 Km="Checkbox",[RZ]=Vi(Km),[xZ,m1]=RZ(Km);function TZ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:l,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=wd({prop:n,defaultProp:a??!1,onChange:d,caller:Km}),[w,S]=A.useState(null),[b,E]=A.useState(null),R=A.useRef(!1),T=w?!!l||!!w.closest("form"):!0,O={checked:g,disabled:i,setChecked:y,control:w,setControl:S,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:R,required:f,defaultChecked:Us(a)?!1:a,isFormControl:T,bubbleInput:b,setBubbleInput:E};return x.jsx(xZ,{scope:t,...O,children:OZ(p)?p(O):r})}var SM="CheckboxTrigger",EM=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:l,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=m1(SM,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":Us(d)?"mixed":d,"aria-required":f,"data-state":AM(d),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:S,onKeyDown:lt(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:lt(n,E=>{p(R=>Us(R)?!0:!R),w&&y&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})});EM.displayName=SM;var RM=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:l,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return x.jsx(TZ,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>x.jsxs(x.Fragment,{children:[x.jsx(EM,{...p,ref:t,__scopeCheckbox:n}),g&&x.jsx(CM,{__scopeCheckbox:n})]})})});RM.displayName=Km;var xM="CheckboxIndicator",TM=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=m1(xM,n);return x.jsx(Wa,{present:r||Us(i.checked)||i.checked===!0,children:x.jsx(pn.span,{"data-state":AM(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});TM.displayName=xM;var OM="CheckboxBubbleInput",CM=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:l,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=m1(OM,e),w=Bn(n,y),S=EZ(i),b=mk(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=Us(i),C.call(R,Us(i)?!1:i),R.dispatchEvent(N)}},[g,S,i,a]);const E=A.useRef(Us(i)?!1:i);return x.jsx(pn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??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%)"}})});CM.displayName=OM;function OZ(e){return typeof e=="function"}function Us(e){return e==="indeterminate"}function AM(e){return Us(e)?"indeterminate":e?"checked":"unchecked"}var IM={OBJECT:"object",UNDEFINED:"undefined"},vh="browser",hO="cpu",pO="device",i0="engine",yh="os",Cs="name",nm="type",R_="vendor",Do="version",x_="architecture",T_="major",O_="model",CZ="console",AZ="mobile",IZ="tablet",NZ="smarttv",kZ="wearable",MZ="embedded",PZ=typeof window!==IM.UNDEFINED,l0=PZ&&window.navigator?window.navigator:void 0;l0&&l0.userAgentData&&l0.userAgentData;var Wm=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},_h=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==IM.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return _h.call(e.init,[[vh,[Cs,Do,T_,nm]],[hO,[x_]],[pO,[nm,O_,R_]],[i0,[Cs,Do]],[yh,[Cs,Do]]]),_h.call(e.isIgnore,[[vh,[Do,T_]],[i0,[Do]],[yh,[Do]]]),_h.call(e.isIgnoreRgx,[[vh,/ ?browser$/i],[yh,/ ?os$/i]]),_h.call(e.toString,[[vh,[Cs,Do]],[hO,[x_]],[pO,[R_,O_]],[i0,[Cs,Do]],[yh,[Cs,Do]]]),e})();Wm([Cs,Do,T_,nm]);Wm([x_]);Wm([O_,R_,nm,CZ,AZ,NZ,IZ,kZ,MZ]);Wm([Cs,Do]);function DZ(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 NM=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}),Cd=()=>{const e=ee.useContext(NM);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};DZ(`[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(
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},qB="DialogDescriptionWarning",HB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ek(qB).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},GB=zN,ZB=FN,KB=qN,WB=HN,YB=GN,QB=KN,eoe=YN,toe=XN;function tk(e){const t=e+"CollectionProvider",[n,r]=Vi(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=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})};l.displayName=t;const u=e+"CollectionSlot",d=od(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=od(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:l,Slot:f,ItemSlot:y},w,r]}var XB=A.createContext(void 0);function nk(e){const t=A.useContext(XB);return e||t||"ltr"}const JB=["top","right","bottom","left"],Bs=Math.min,Jr=Math.max,Yp=Math.round,gh=Math.floor,sa=e=>({x:e,y:e}),eq={left:"right",right:"left",bottom:"top",top:"bottom"},tq={start:"end",end:"start"};function y_(e,t,n){return Jr(e,Bs(t,n))}function Ba(e,t){return typeof e=="function"?e(t):e}function qa(e){return e.split("-")[0]}function wc(e){return e.split("-")[1]}function Qb(e){return e==="x"?"y":"x"}function Xb(e){return e==="y"?"height":"width"}const nq=new Set(["top","bottom"]);function aa(e){return nq.has(qa(e))?"y":"x"}function Jb(e){return Qb(aa(e))}function rq(e,t,n){n===void 0&&(n=!1);const r=wc(e),a=Jb(e),i=Xb(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Qp(l)),[l,Qp(l)]}function oq(e){const t=Qp(e);return[__(e),t,__(t)]}function __(e){return e.replace(/start|end/g,t=>tq[t])}const JT=["left","right"],eO=["right","left"],aq=["top","bottom"],sq=["bottom","top"];function iq(e,t,n){switch(e){case"top":case"bottom":return n?t?eO:JT:t?JT:eO;case"left":case"right":return t?aq:sq;default:return[]}}function lq(e,t,n,r){const a=wc(e);let i=iq(qa(e),n==="start",r);return a&&(i=i.map(l=>l+"-"+a),t&&(i=i.concat(i.map(__)))),i}function Qp(e){return e.replace(/left|right|bottom|top/g,t=>eq[t])}function cq(e){return{top:0,right:0,bottom:0,left:0,...e}}function rk(e){return typeof e!="number"?cq(e):{top:e,right:e,bottom:e,left:e}}function Xp(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 tO(e,t,n){let{reference:r,floating:a}=e;const i=aa(t),l=Jb(t),u=Xb(l),d=qa(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(wc(t)){case"start":y[l]-=g*(n&&f?-1:1);break;case"end":y[l]+=g*(n&&f?-1:1);break}return y}async function uq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Ba(t,e),w=rk(y),b=u[g?p==="floating"?"reference":"floating":p],E=Xp(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:l.floating.width,height:l.floating.height}:l.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=Xp(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 dq=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=tO(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:{...l,detectOverflow:(S=l.detectOverflow)!=null?S:uq},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 l.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:m,y:p}=tO(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:y}},fq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Ba(e,t)||{};if(f==null)return{};const p=rk(m),g={x:n,y:r},y=Jb(a),w=Xb(y),S=await l.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(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let N=I?I[T]:0;(!N||!await(l.isElement==null?void 0:l.isElement(I)))&&(N=u.floating[T]||i.floating[w]);const P=O/2-C/2,$=N/2-S[w]/2-1,K=Bs(p[E],$),V=Bs(p[R],$),G=K,U=N-S[w]-V,J=N/2-S[w]/2+P,le=y_(G,J,U),B=!d.arrow&&wc(a)!=null&&J!==le&&i.reference[w]/2-(J<G?K:V)-S[w]/2<0,W=B?J<G?J-G:J-U:0;return{[y]:g[y]+W,data:{[y]:le,centerOffset:J-le-W,...B&&{alignmentOffset:W}},reset:B}}}),hq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:l,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}=Ba(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=qa(a),R=aa(u),T=qa(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),C=g||(T||!S?[Qp(u)]:oq(u)),I=w!=="none";!g&&I&&C.push(...lq(u,S,w,O));const N=[u,...C],P=await d.detectOverflow(t,b),$=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&$.push(P[E]),p){const J=rq(a,l,O);$.push(P[J[0]],P[J[1]])}if(K=[...K,{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!==aa(le):!1)||K.every(Y=>aa(Y.placement)===R?Y.overflows[0]>0:!0)))return{data:{index:J,overflows:K},reset:{placement:le}};let B=(G=K.filter(W=>W.overflows[0]<=0).sort((W,Y)=>W.overflows[1]-Y.overflows[1])[0])==null?void 0:G.placement;if(!B)switch(y){case"bestFit":{var U;const W=(U=K.filter(Y=>{if(I){const pe=aa(Y.placement);return pe===R||pe==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(pe=>pe>0).reduce((pe,ae)=>pe+ae,0)]).sort((Y,pe)=>Y[1]-pe[1])[0])==null?void 0:U[0];W&&(B=W);break}case"initialPlacement":B=u;break}if(a!==B)return{reset:{placement:B}}}return{}}}};function nO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rO(e){return JB.some(t=>e[t]>=0)}const pq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Ba(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=nO(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:rO(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...i,altBoundary:!0}),u=nO(l,n.floating);return{data:{escapedOffsets:u,escaped:rO(u)}}}default:return{}}}}},ok=new Set(["left","top"]);async function mq(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=qa(n),u=wc(n),d=aa(n)==="y",f=ok.has(l)?-1:1,m=i&&d?-1:1,p=Ba(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 gq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:l,middlewareData:u}=t,d=await mq(t,e);return l===((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:l}}}}},vq=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:l=!0,crossAxis:u=!1,limiter:d={fn:E=>{let{x:R,y:T}=E;return{x:R,y:T}}},...f}=Ba(e,t),m={x:n,y:r},p=await i.detectOverflow(t,f),g=aa(qa(a)),y=Qb(g);let w=m[y],S=m[g];if(l){const E=y==="y"?"top":"left",R=y==="y"?"bottom":"right",T=w+p[E],O=w-p[R];w=y_(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=y_(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]:l,[g]:u}}}}}},yq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ba(e,t),m={x:n,y:r},p=aa(a),g=Qb(p);let y=m[g],w=m[p];const S=Ba(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=ok.has(qa(a)),C=i.reference[p]-i.floating[T]+(O&&((E=l.offset)==null?void 0:E[p])||0)+(O?0:b.crossAxis),I=i.reference[p]+i.reference[T]+(O?0:((R=l.offset)==null?void 0:R[p])||0)-(O?b.crossAxis:0);w<C?w=C:w>I&&(w=I)}return{[g]:y,[p]:w}}}},_q=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Ba(e,t),m=await l.detectOverflow(t,f),p=qa(a),g=wc(a),y=aa(a)==="y",{width:w,height:S}=i.floating;let b,E;p==="top"||p==="bottom"?(b=p,E=g===(await(l.isRTL==null?void 0:l.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=Bs(S-m[b],R),C=Bs(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 K=Jr(m.left,0),V=Jr(m.right,0),G=Jr(m.top,0),U=Jr(m.bottom,0);y?P=w-2*(K!==0||V!==0?K+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 l.getDimensions(u.floating);return w!==$.width||S!==$.height?{reset:{rects:!0}}:{}}}};function Fm(){return typeof window<"u"}function Sc(e){return ak(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ha(e){var t;return(t=(ak(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ak(e){return Fm()?e instanceof Node||e instanceof no(e).Node:!1}function Ho(e){return Fm()?e instanceof Element||e instanceof no(e).Element:!1}function ca(e){return Fm()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function oO(e){return!Fm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}const bq=new Set(["inline","contents"]);function Sd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!bq.has(a)}const wq=new Set(["table","td","th"]);function Sq(e){return wq.has(Sc(e))}const Eq=[":popover-open",":modal"];function Bm(e){return Eq.some(t=>{try{return e.matches(t)}catch{return!1}})}const Rq=["transform","translate","scale","rotate","perspective"],xq=["transform","translate","scale","rotate","perspective","filter"],Tq=["paint","layout","strict","content"];function e1(e){const t=t1(),n=Ho(e)?Go(e):e;return Rq.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)||xq.some(r=>(n.willChange||"").includes(r))||Tq.some(r=>(n.contain||"").includes(r))}function Oq(e){let t=qs(e);for(;ca(t)&&!lc(t);){if(e1(t))return t;if(Bm(t))return null;t=qs(t)}return null}function t1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cq=new Set(["html","body","#document"]);function lc(e){return Cq.has(Sc(e))}function Go(e){return no(e).getComputedStyle(e)}function qm(e){return Ho(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qs(e){if(Sc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oO(e)&&e.host||ha(e);return oO(t)?t.host:t}function sk(e){const t=qs(e);return lc(t)?e.ownerDocument?e.ownerDocument.body:e.body:ca(t)&&Sd(t)?t:sk(t)}function ad(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=sk(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),l=no(a);if(i){const u=b_(l);return t.concat(l,l.visualViewport||[],Sd(a)?a:[],u&&n?ad(u):[])}return t.concat(a,ad(a,[],n))}function b_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ik(e){const t=Go(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ca(e),i=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Yp(n)!==i||Yp(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function n1(e){return Ho(e)?e:e.contextElement}function tc(e){const t=n1(e);if(!ca(t))return sa(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=ik(t);let l=(i?Yp(n.width):n.width)/r,u=(i?Yp(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const Aq=sa(0);function lk(e){const t=no(e);return!t1()||!t.visualViewport?Aq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Iq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==no(e)?!1:t}function ji(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=n1(e);let l=sa(1);t&&(r?Ho(r)&&(l=tc(r)):l=tc(e));const u=Iq(i,n,r)?lk(i):sa(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,p=a.height/l.y;if(i){const g=no(i),y=r&&Ho(r)?no(r):r;let w=g,S=b_(w);for(;S&&r&&y!==w;){const b=tc(S),E=S.getBoundingClientRect(),R=Go(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=b_(w)}}return Xp({width:m,height:p,x:d,y:f})}function Hm(e,t){const n=qm(e).scrollLeft;return t?t.left+n:ji(ha(e)).left+n}function ck(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function Nq(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",l=ha(r),u=t?Bm(t.floating):!1;if(r===l||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=sa(1);const m=sa(0),p=ca(r);if((p||!p&&!i)&&((Sc(r)!=="body"||Sd(l))&&(d=qm(r)),ca(r))){const y=ji(r);f=tc(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=l&&!p&&!i?ck(l,d):sa(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 Mq(e){const t=ha(e),n=qm(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 l=-n.scrollLeft+Hm(e);const u=-n.scrollTop;return Go(r).direction==="rtl"&&(l+=Jr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:l,y:u}}const aO=25;function Pq(e,t){const n=no(e),r=ha(e),a=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){i=a.width,l=a.height;const m=t1();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Hm(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<=aO&&(i-=w)}else f<=aO&&(i+=f);return{width:i,height:l,x:u,y:d}}const Dq=new Set(["absolute","fixed"]);function Lq(e,t){const n=ji(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=ca(e)?tc(e):sa(1),l=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:l,height:u,x:d,y:f}}function sO(e,t,n){let r;if(t==="viewport")r=Pq(e,n);else if(t==="document")r=Mq(ha(e));else if(Ho(t))r=Lq(t,n);else{const a=lk(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Xp(r)}function uk(e,t){const n=qs(e);return n===t||!Ho(n)||lc(n)?!1:Go(n).position==="fixed"||uk(n,t)}function jq(e,t){const n=t.get(e);if(n)return n;let r=ad(e,[],!1).filter(u=>Ho(u)&&Sc(u)!=="body"),a=null;const i=Go(e).position==="fixed";let l=i?qs(e):e;for(;Ho(l)&&!lc(l);){const u=Go(l),d=e1(l);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&Dq.has(a.position)||Sd(l)&&!d&&uk(e,l))?r=r.filter(m=>m!==l):a=u,l=qs(l)}return t.set(e,r),r}function $q(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Bm(t)?[]:jq(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const p=sO(t,m,a);return f.top=Jr(p.top,f.top),f.right=Bs(p.right,f.right),f.bottom=Bs(p.bottom,f.bottom),f.left=Jr(p.left,f.left),f},sO(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Uq(e){const{width:t,height:n}=ik(e);return{width:t,height:n}}function zq(e,t,n){const r=ca(t),a=ha(t),i=n==="fixed",l=ji(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=sa(0);function f(){d.x=Hm(a)}if(r||!r&&!i)if((Sc(t)!=="body"||Sd(a))&&(u=qm(t)),r){const y=ji(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?ck(a,u):sa(0),p=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function r0(e){return Go(e).position==="static"}function iO(e,t){if(!ca(e)||Go(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ha(e)===n&&(n=n.ownerDocument.body),n}function dk(e,t){const n=no(e);if(Bm(e))return n;if(!ca(e)){let a=qs(e);for(;a&&!lc(a);){if(Ho(a)&&!r0(a))return a;a=qs(a)}return n}let r=iO(e,t);for(;r&&Sq(r)&&r0(r);)r=iO(r,t);return r&&lc(r)&&r0(r)&&!e1(r)?n:r||Oq(e)||n}const Vq=async function(e){const t=this.getOffsetParent||dk,n=this.getDimensions,r=await n(e.floating);return{reference:zq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fq(e){return Go(e).direction==="rtl"}const Bq={convertOffsetParentRelativeRectToViewportRelativeRect:Nq,getDocumentElement:ha,getClippingRect:$q,getOffsetParent:dk,getElementRects:Vq,getClientRects:kq,getDimensions:Uq,getScale:tc,isElement:Ho,isRTL:Fq};function fk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qq(e,t){let n=null,r;const a=ha(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(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=gh(p),S=gh(a.clientWidth-(m+g)),b=gh(a.clientHeight-(p+y)),E=gh(m),T={rootMargin:-w+"px "+-S+"px "+-b+"px "+-E+"px",threshold:Jr(0,Bs(1,d))||1};let O=!0;function C(I){const N=I[0].intersectionRatio;if(N!==d){if(!O)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!fk(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(C,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return l(!0),i}function Hq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=n1(e),m=a||i?[...f?ad(f):[],...ad(t)]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const p=f&&u?qq(f,n):null;let g=-1,y=null;l&&(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?ji(e):null;d&&b();function b(){const E=ji(e);S&&!fk(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 Gq=gq,Zq=vq,Kq=hq,Wq=_q,Yq=pq,lO=fq,Qq=yq,Xq=(e,t,n)=>{const r=new Map,a={platform:Bq,...n},i={...a.platform,_c:r};return dq(e,t,{...a,platform:i})};var Jq=typeof document<"u",eH=function(){},_p=Jq?A.useLayoutEffect:eH;function Jp(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(!Jp(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)&&!Jp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cO(e,t){const n=hk(e);return Math.round(t*n)/n}function o0(e){const t=A.useRef(e);return _p(()=>{t.current=e}),t}function tH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:l}={},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);Jp(g,r)||y(r);const[w,S]=A.useState(null),[b,E]=A.useState(null),R=A.useCallback(Y=>{Y!==I.current&&(I.current=Y,S(Y))},[]),T=A.useCallback(Y=>{Y!==N.current&&(N.current=Y,E(Y))},[]),O=i||w,C=l||b,I=A.useRef(null),N=A.useRef(null),P=A.useRef(m),$=d!=null,K=o0(d),V=o0(a),G=o0(f),U=A.useCallback(()=>{if(!I.current||!N.current)return;const Y={placement:t,strategy:n,middleware:g};V.current&&(Y.platform=V.current),Xq(I.current,N.current,Y).then(pe=>{const ae={...pe,isPositioned:G.current!==!1};J.current&&!Jp(P.current,ae)&&(P.current=ae,Cm.flushSync(()=>{p(ae)}))})},[g,t,n,V,G]);_p(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[f]);const J=A.useRef(!1);_p(()=>(J.current=!0,()=>{J.current=!1}),[]),_p(()=>{if(O&&(I.current=O),C&&(N.current=C),O&&C){if(K.current)return K.current(O,C,U);U()}},[O,C,U,K,$]);const le=A.useMemo(()=>({reference:I,floating:N,setReference:R,setFloating:T}),[R,T]),B=A.useMemo(()=>({reference:O,floating:C}),[O,C]),W=A.useMemo(()=>{const Y={position:n,left:0,top:0};if(!B.floating)return Y;const pe=cO(B.floating,m.x),ae=cO(B.floating,m.y);return u?{...Y,transform:"translate("+pe+"px, "+ae+"px)",...hk(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:pe,top:ae}},[n,u,B.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:le,elements:B,floatingStyles:W}),[m,U,le,B,W])}const nH=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?lO({element:r.current,padding:a}).fn(n):{}:r?lO({element:r,padding:a}).fn(n):{}}}},rH=(e,t)=>({...Gq(e),options:[e,t]}),oH=(e,t)=>({...Zq(e),options:[e,t]}),aH=(e,t)=>({...Qq(e),options:[e,t]}),sH=(e,t)=>({...Kq(e),options:[e,t]}),iH=(e,t)=>({...Wq(e),options:[e,t]}),lH=(e,t)=>({...Yq(e),options:[e,t]}),cH=(e,t)=>({...nH(e),options:[e,t]});var uH="Arrow",pk=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"})})});pk.displayName=uH;var dH=pk;function mk(e){const[t,n]=A.useState(void 0);return Bo(()=>{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 l,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var r1="Popper",[gk,vk]=Vi(r1),[fH,yk]=gk(r1),_k=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return x.jsx(fH,{scope:t,anchor:r,onAnchorChange:a,children:n})};_k.displayName=r1;var bk="PopperAnchor",wk=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=yk(bk,n),l=A.useRef(null),u=Bn(t,l),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:x.jsx(pn.div,{...a,ref:u})});wk.displayName=bk;var o1="PopperContent",[hH,pH]=gk(o1),Sk=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:l=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=yk(o1,n),[E,R]=A.useState(null),T=Bn(t,de=>R(de)),[O,C]=A.useState(null),I=mk(O),N=I?.width??0,P=I?.height??0,$=r+(i!=="center"?"-"+i:""),K=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:K,boundary:V.filter(gH),altBoundary:G},{refs:J,floatingStyles:le,placement:B,isPositioned:W,middlewareData:Y}=tH({strategy:"fixed",placement:$,whileElementsMounted:(...de)=>Hq(...de,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[rH({mainAxis:a+P,alignmentAxis:l}),d&&oH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?aH():void 0,...U}),d&&sH({...U}),iH({...U,apply:({elements:de,rects:ve,availableWidth:Ie,availableHeight:Ae})=>{const{width:H,height:ne}=ve.reference,_e=de.floating.style;_e.setProperty("--radix-popper-available-width",`${Ie}px`),_e.setProperty("--radix-popper-available-height",`${Ae}px`),_e.setProperty("--radix-popper-anchor-width",`${H}px`),_e.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),O&&cH({element:O,padding:u}),vH({arrowWidth:N,arrowHeight:P}),g&&lH({strategy:"referenceHidden",...U})]}),[pe,ae]=xk(B),M=qo(w);Bo(()=>{W&&M?.()},[W,M]);const q=Y.arrow?.x,F=Y.arrow?.y,L=Y.arrow?.centerOffset!==0,[z,X]=A.useState();return Bo(()=>{E&&X(window.getComputedStyle(E).zIndex)},[E]),x.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:W?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(hH,{scope:n,placedSide:pe,onArrowChange:C,arrowX:q,arrowY:F,shouldHideArrow:L,children:x.jsx(pn.div,{"data-side":pe,"data-align":ae,...S,ref:T,style:{...S.style,animation:W?void 0:"none"}})})})});Sk.displayName=o1;var Ek="PopperArrow",mH={top:"bottom",right:"left",bottom:"top",left:"right"},Rk=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=pH(Ek,r),l=mH[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]: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(dH,{...a,ref:n,style:{...a.style,display:"block"}})})});Rk.displayName=Ek;function gH(e){return e!==null}var vH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=xk(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=l?p:`${g}px`,S=`${-d}px`):f==="top"?(w=l?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(w=`${-d}px`,S=l?p:`${y}px`):f==="left"&&(w=`${r.floating.width+d}px`,S=l?p:`${y}px`),{data:{x:w,y:S}}}});function xk(e){const[t,n="center"]=e.split("-");return[t,n]}var Tk=_k,yH=wk,_H=Sk,bH=Rk,a0="rovingFocusGroup.onEntryFocus",wH={bubbles:!1,cancelable:!0},Ed="RovingFocusGroup",[w_,Ok,SH]=tk(Ed),[EH,Ck]=Vi(Ed,[SH]),[RH,xH]=EH(Ed),Ak=A.forwardRef((e,t)=>x.jsx(w_.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(w_.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(TH,{...e,ref:t})})}));Ak.displayName=Ed;var TH=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=Bn(t,g),w=nk(i),[S,b]=wd({prop:l,defaultProp:u??null,onChange:d,caller:Ed}),[E,R]=A.useState(!1),T=qo(f),O=Ok(n),C=A.useRef(!1),[I,N]=A.useState(0);return A.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(a0,T),()=>P.removeEventListener(a0,T)},[T]),x.jsx(RH,{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 K=new CustomEvent(a0,wH);if(P.currentTarget.dispatchEvent(K),!K.defaultPrevented){const V=O().filter(B=>B.focusable),G=V.find(B=>B.active),U=V.find(B=>B.id===S),le=[G,U,...V].filter(Boolean).map(B=>B.ref.current);kk(le,m)}}C.current=!1}),onBlur:lt(e.onBlur,()=>R(!1))})})}),Ik="RovingFocusGroupItem",Nk=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:l,...u}=e,d=$s(),f=i||d,m=xH(Ik,n),p=m.currentTabStopId===f,g=Ok(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:S}=m;return A.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),x.jsx(w_.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=AH(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?IH(T,O+1):T.slice(O+1)}setTimeout(()=>kk(T))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:S!=null}):l})})});Nk.displayName=Ik;var OH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AH(e,t,n){const r=CH(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return OH[r]}function kk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function IH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NH=Ak,kH=Nk,S_=["Enter"," "],MH=["ArrowDown","PageUp","Home"],Mk=["ArrowUp","PageDown","End"],PH=[...MH,...Mk],DH={ltr:[...S_,"ArrowRight"],rtl:[...S_,"ArrowLeft"]},LH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rd="Menu",[sd,jH,$H]=tk(Rd),[Fi,Pk]=Vi(Rd,[$H,vk,Ck]),xd=vk(),Dk=Ck(),[Lk,Ys]=Fi(Rd),[UH,Td]=Fi(Rd),jk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:l=!0}=e,u=xd(t),[d,f]=A.useState(null),m=A.useRef(!1),p=qo(i),g=nk(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(Tk,{...u,children:x.jsx(Lk,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:x.jsx(UH,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};jk.displayName=Rd;var zH="MenuAnchor",a1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=xd(n);return x.jsx(yH,{...a,...r,ref:t})});a1.displayName=zH;var s1="MenuPortal",[VH,$k]=Fi(s1,{forceMount:void 0}),Uk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Ys(s1,t);return x.jsx(VH,{scope:t,forceMount:n,children:x.jsx(Wa,{present:n||i.open,children:x.jsx(Gb,{asChild:!0,container:a,children:r})})})};Uk.displayName=s1;var Eo="MenuContent",[FH,i1]=Fi(Eo),zk=A.forwardRef((e,t)=>{const n=$k(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ys(Eo,e.__scopeMenu),l=Td(Eo,e.__scopeMenu);return x.jsx(sd.Provider,{scope:e.__scopeMenu,children:x.jsx(Wa,{present:r||i.open,children:x.jsx(sd.Slot,{scope:e.__scopeMenu,children:l.modal?x.jsx(BH,{...a,ref:t}):x.jsx(qH,{...a,ref:t})})})})}),BH=A.forwardRef((e,t)=>{const n=Ys(Eo,e.__scopeMenu),r=A.useRef(null),a=Bn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return $N(i)},[]),x.jsx(l1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),qH=A.forwardRef((e,t)=>{const n=Ys(Eo,e.__scopeMenu);return x.jsx(l1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HH=od("MenuContent.ScrollLock"),l1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:w,...S}=e,b=Ys(Eo,n),E=Td(Eo,n),R=xd(n),T=Dk(n),O=jH(n),[C,I]=A.useState(null),N=A.useRef(null),P=Bn(t,N,b.onContentChange),$=A.useRef(0),K=A.useRef(""),V=A.useRef(0),G=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),le=w?Zb:A.Fragment,B=w?{as:HH,allowPinchZoom:!0}:void 0,W=pe=>{const ae=K.current+pe,M=O().filter(de=>!de.disabled),q=document.activeElement,F=M.find(de=>de.ref.current===q)?.textValue,L=M.map(de=>de.textValue),z=rG(L,ae,F),X=M.find(de=>de.textValue===z)?.ref.current;(function de(ve){K.current=ve,window.clearTimeout($.current),ve!==""&&($.current=window.setTimeout(()=>de(""),1e3))})(ae),X&&setTimeout(()=>X.focus())};A.useEffect(()=>()=>window.clearTimeout($.current),[]),AN();const Y=A.useCallback(pe=>U.current===G.current?.side&&aG(pe,G.current?.area),[]);return x.jsx(FH,{scope:n,searchRef:K,onItemEnter:A.useCallback(pe=>{Y(pe)&&pe.preventDefault()},[Y]),onItemLeave:A.useCallback(pe=>{Y(pe)||(N.current?.focus(),I(null))},[Y]),onTriggerLeave:A.useCallback(pe=>{Y(pe)&&pe.preventDefault()},[Y]),pointerGraceTimerRef:V,onPointerGraceIntentChange:A.useCallback(pe=>{G.current=pe},[]),children:x.jsx(le,{...B,children:x.jsx(Hb,{asChild:!0,trapped:a,onMountAutoFocus:lt(i,pe=>{pe.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:x.jsx(qb,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:x.jsx(NH,{asChild:!0,...T,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:I,onEntryFocus:lt(d,pe=>{E.isUsingKeyboardRef.current||pe.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(_H,{role:"menu","aria-orientation":"vertical","data-state":rM(b.open),"data-radix-menu-content":"",dir:E.dir,...R,...S,ref:P,style:{outline:"none",...S.style},onKeyDown:lt(S.onKeyDown,pe=>{const M=pe.target.closest("[data-radix-menu-content]")===pe.currentTarget,q=pe.ctrlKey||pe.altKey||pe.metaKey,F=pe.key.length===1;M&&(pe.key==="Tab"&&pe.preventDefault(),!q&&F&&W(pe.key));const L=N.current;if(pe.target!==L||!PH.includes(pe.key))return;pe.preventDefault();const X=O().filter(de=>!de.disabled).map(de=>de.ref.current);Mk.includes(pe.key)&&X.reverse(),tG(X)}),onBlur:lt(e.onBlur,pe=>{pe.currentTarget.contains(pe.target)||(window.clearTimeout($.current),K.current="")}),onPointerMove:lt(e.onPointerMove,id(pe=>{const ae=pe.target,M=J.current!==pe.clientX;if(pe.currentTarget.contains(ae)&&M){const q=pe.clientX>J.current?"right":"left";U.current=q,J.current=pe.clientX}}))})})})})})})});zk.displayName=Eo;var GH="MenuGroup",c1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"group",...r,ref:t})});c1.displayName=GH;var ZH="MenuLabel",Vk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{...r,ref:t})});Vk.displayName=ZH;var em="MenuItem",uO="menu.itemSelect",Gm=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),l=Td(em,e.__scopeMenu),u=i1(em,e.__scopeMenu),d=Bn(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(uO,{bubbles:!0,cancelable:!0});p.addEventListener(uO,y=>r?.(y),{once:!0}),xN(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return x.jsx(Fk,{...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===" "||S_.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Gm.displayName=em;var Fk=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,l=i1(em,n),u=Dk(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(sd.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,id(w=>{r?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lt(e.onPointerLeave,id(w=>l.onItemLeave(w))),onFocus:lt(e.onFocus,()=>p(!0)),onBlur:lt(e.onBlur,()=>p(!1))})})})}),KH="MenuCheckboxItem",Bk=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(Kk,{scope:e.__scopeMenu,checked:n,children:x.jsx(Gm,{role:"menuitemcheckbox","aria-checked":tm(n)?"mixed":n,...a,ref:t,"data-state":f1(n),onSelect:lt(a.onSelect,()=>r?.(tm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Bk.displayName=KH;var qk="MenuRadioGroup",[WH,YH]=Fi(qk,{value:void 0,onValueChange:()=>{}}),Hk=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=qo(r);return x.jsx(WH,{scope:e.__scopeMenu,value:n,onValueChange:i,children:x.jsx(c1,{...a,ref:t})})});Hk.displayName=qk;var Gk="MenuRadioItem",Zk=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=YH(Gk,e.__scopeMenu),i=n===a.value;return x.jsx(Kk,{scope:e.__scopeMenu,checked:i,children:x.jsx(Gm,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":f1(i),onSelect:lt(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Zk.displayName=Gk;var u1="MenuItemIndicator",[Kk,QH]=Fi(u1,{checked:!1}),Wk=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=QH(u1,n);return x.jsx(Wa,{present:r||tm(i.checked)||i.checked===!0,children:x.jsx(pn.span,{...a,ref:t,"data-state":f1(i.checked)})})});Wk.displayName=u1;var XH="MenuSeparator",Yk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Yk.displayName=XH;var JH="MenuArrow",Qk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=xd(n);return x.jsx(bH,{...a,...r,ref:t})});Qk.displayName=JH;var d1="MenuSub",[eG,Xk]=Fi(d1),Jk=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=Ys(d1,t),l=xd(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=qo(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),x.jsx(Tk,{...l,children:x.jsx(Lk,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:x.jsx(eG,{scope:t,contentId:$s(),triggerId:$s(),trigger:u,onTriggerChange:d,children:n})})})};Jk.displayName=d1;var Mu="MenuSubTrigger",eM=A.forwardRef((e,t)=>{const n=Ys(Mu,e.__scopeMenu),r=Td(Mu,e.__scopeMenu),a=Xk(Mu,e.__scopeMenu),i=i1(Mu,e.__scopeMenu),l=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),x.jsx(a1,{asChild:!0,...f,children:x.jsx(Fk,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":rM(n.open),...e,ref:bd(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lt(e.onPointerMove,id(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:lt(e.onPointerLeave,id(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===" "||DH[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});eM.displayName=Mu;var tM="MenuSubContent",nM=A.forwardRef((e,t)=>{const n=$k(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ys(Eo,e.__scopeMenu),l=Td(Eo,e.__scopeMenu),u=Xk(tM,e.__scopeMenu),d=A.useRef(null),f=Bn(t,d);return x.jsx(sd.Provider,{scope:e.__scopeMenu,children:x.jsx(Wa,{present:r||i.open,children:x.jsx(sd.Slot,{scope:e.__scopeMenu,children:x.jsx(l1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{l.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=>{l.onClose(),m.preventDefault()}),onKeyDown:lt(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=LH[l.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});nM.displayName=tM;function rM(e){return e?"open":"closed"}function tm(e){return e==="indeterminate"}function f1(e){return tm(e)?"indeterminate":e?"checked":"unchecked"}function tG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function rG(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 l=nG(e,Math.max(i,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function oG(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],d=t[l],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 aG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return oG(n,t)}function id(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sG=jk,iG=a1,lG=Uk,cG=zk,uG=c1,dG=Vk,fG=Gm,hG=Bk,pG=Hk,mG=Zk,gG=Wk,vG=Yk,yG=Qk,_G=Jk,bG=eM,wG=nM,Zm="DropdownMenu",[SG]=Vi(Zm,[Pk]),vr=Pk(),[EG,oM]=SG(Zm),aM=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:l,modal:u=!0}=e,d=vr(t),f=A.useRef(null),[m,p]=wd({prop:a,defaultProp:i??!1,onChange:l,caller:Zm});return x.jsx(EG,{scope:t,triggerId:$s(),triggerRef:f,contentId:$s(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:x.jsx(sG,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};aM.displayName=Zm;var sM="DropdownMenuTrigger",iM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=oM(sM,n),l=vr(n);return x.jsx(iG,{asChild:!0,...l,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:bd(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())})})})});iM.displayName=sM;var RG="DropdownMenuPortal",lM=e=>{const{__scopeDropdownMenu:t,...n}=e,r=vr(t);return x.jsx(lG,{...r,...n})};lM.displayName=RG;var cM="DropdownMenuContent",uM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=oM(cM,n),i=vr(n),l=A.useRef(!1);return x.jsx(cG,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,u=>{l.current||a.triggerRef.current?.focus(),l.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)&&(l.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)"}})});uM.displayName=cM;var xG="DropdownMenuGroup",TG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(uG,{...a,...r,ref:t})});TG.displayName=xG;var OG="DropdownMenuLabel",CG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(dG,{...a,...r,ref:t})});CG.displayName=OG;var AG="DropdownMenuItem",dM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(fG,{...a,...r,ref:t})});dM.displayName=AG;var IG="DropdownMenuCheckboxItem",NG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(hG,{...a,...r,ref:t})});NG.displayName=IG;var kG="DropdownMenuRadioGroup",MG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(pG,{...a,...r,ref:t})});MG.displayName=kG;var PG="DropdownMenuRadioItem",DG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(mG,{...a,...r,ref:t})});DG.displayName=PG;var LG="DropdownMenuItemIndicator",jG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(gG,{...a,...r,ref:t})});jG.displayName=LG;var $G="DropdownMenuSeparator",fM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(vG,{...a,...r,ref:t})});fM.displayName=$G;var UG="DropdownMenuArrow",zG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(yG,{...a,...r,ref:t})});zG.displayName=UG;var VG=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,l=vr(t),[u,d]=wd({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return x.jsx(_G,{...l,open:u,onOpenChange:d,children:n})},FG="DropdownMenuSubTrigger",hM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(bG,{...a,...r,ref:t})});hM.displayName=FG;var BG="DropdownMenuSubContent",pM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(wG,{...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)"}})});pM.displayName=BG;var qG=aM,HG=iM,GG=lM,ZG=uM,KG=dM,noe=fM,roe=VG,ooe=hM,aoe=pM,WG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Od=WG.reduce((e,t)=>{const n=SN(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?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}},{}),YG="Label",mM=A.forwardRef((e,t)=>x.jsx(Od.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));mM.displayName=YG;var QG=mM;function XG(e,t=[]){let n=[];function r(i,l){const u=A.createContext(l);u.displayName=i+"Context";const d=n.length;n=[...n,l];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(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(l=>A.createContext(l));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,JG(a,...t)]}function JG(...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 l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var eZ=mA();function tZ(){return eZ.useSyncExternalStore(nZ,()=>!0,()=>!1)}function nZ(){return()=>{}}var h1="Avatar",[rZ]=XG(h1),[oZ,gM]=rZ(h1),vM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return x.jsx(oZ,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(Od.span,{...r,ref:t})})});vM.displayName=h1;var yM="AvatarImage",_M=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,l=gM(yM,n),u=aZ(r,i),d=qo(f=>{a(f),l.onImageLoadingStatusChange(f)});return Bo(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?x.jsx(Od.img,{...i,ref:t,src:r}):null});_M.displayName=yM;var bM="AvatarFallback",wM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=gM(bM,n),[l,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]),l&&i.imageLoadingStatus!=="loaded"?x.jsx(Od.span,{...a,ref:t}):null});wM.displayName=bM;function dO(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function aZ(e,{referrerPolicy:t,crossOrigin:n}){const r=tZ(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[l,u]=A.useState(()=>dO(i,e));return Bo(()=>{u(dO(i,e))},[i,e]),Bo(()=>{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]),l}var sZ=vM,iZ=_M,lZ=wM;function cZ(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function p1(e,t,n=""){const r=cZ(e),a=e?.length;if(!r||t!==void 0){const l=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(l+"expected Uint8Array"+u+", got "+d)}return e}function fO(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 uZ(e,t){p1(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 E_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function s0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ea(e,t){return e<<32-t|e>>>t}const dZ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",fZ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function hZ(e){if(p1(e),dZ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=fZ[e[n]];return t}function pZ(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 mZ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function gZ(e,t,n){return e&t^~e&n}function vZ(e,t,n){return e&t^e&n^t&n}class yZ{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=s0(this.buffer)}update(t){fO(this),p1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let l=0;l<i;){const u=Math.min(a-this.pos,i-l);if(u===a){const d=s0(t);for(;a<=i-l;l+=a)this.process(d,l);continue}r.set(t.subarray(l,l+u),this.pos),this.pos+=u,l+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){fO(this),uZ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:l}=this;n[l++]=128,E_(this.buffer.subarray(l)),this.padOffset>a-l&&(this.process(r,0),l=0);for(let p=l;p<a;p++)n[p]=0;r.setBigUint64(a-8,BigInt(this.length*8),i),this.process(r,0);const u=s0(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:l,pos:u}=this;return t.destroyed=l,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Rs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_Z=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]),xs=new Uint32Array(64);class bZ extends yZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:l,G:u,H:d}=this;return[t,n,r,a,i,l,u,d]}set(t,n,r,a,i,l,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=l|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)xs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=xs[p-15],y=xs[p-2],w=ea(g,7)^ea(g,18)^g>>>3,S=ea(y,17)^ea(y,19)^y>>>10;xs[p]=S+xs[p-7]+w+xs[p-16]|0}let{A:r,B:a,C:i,D:l,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=ea(u,6)^ea(u,11)^ea(u,25),y=m+g+gZ(u,d,f)+_Z[p]+xs[p]|0,S=(ea(r,2)^ea(r,13)^ea(r,22))+vZ(r,a,i)|0;m=f,f=d,d=u,u=l+y|0,l=i,i=a,a=r,r=y+S|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,l=l+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,l,u,d,f,m)}roundClean(){E_(xs)}destroy(){this.set(0,0,0,0,0,0,0,0),E_(this.buffer)}}class wZ extends bZ{A=Rs[0]|0;B=Rs[1]|0;C=Rs[2]|0;D=Rs[3]|0;E=Rs[4]|0;F=Rs[5]|0;G=Rs[6]|0;H=Rs[7]|0;constructor(){super(32)}}const SZ=pZ(()=>new wZ,mZ(1));function EZ(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 Km="Checkbox",[RZ]=Vi(Km),[xZ,m1]=RZ(Km);function TZ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:l,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=wd({prop:n,defaultProp:a??!1,onChange:d,caller:Km}),[w,S]=A.useState(null),[b,E]=A.useState(null),R=A.useRef(!1),T=w?!!l||!!w.closest("form"):!0,O={checked:g,disabled:i,setChecked:y,control:w,setControl:S,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:R,required:f,defaultChecked:Us(a)?!1:a,isFormControl:T,bubbleInput:b,setBubbleInput:E};return x.jsx(xZ,{scope:t,...O,children:OZ(p)?p(O):r})}var SM="CheckboxTrigger",EM=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:l,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=m1(SM,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":Us(d)?"mixed":d,"aria-required":f,"data-state":AM(d),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:S,onKeyDown:lt(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:lt(n,E=>{p(R=>Us(R)?!0:!R),w&&y&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})});EM.displayName=SM;var RM=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:l,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return x.jsx(TZ,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>x.jsxs(x.Fragment,{children:[x.jsx(EM,{...p,ref:t,__scopeCheckbox:n}),g&&x.jsx(CM,{__scopeCheckbox:n})]})})});RM.displayName=Km;var xM="CheckboxIndicator",TM=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=m1(xM,n);return x.jsx(Wa,{present:r||Us(i.checked)||i.checked===!0,children:x.jsx(pn.span,{"data-state":AM(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});TM.displayName=xM;var OM="CheckboxBubbleInput",CM=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:l,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=m1(OM,e),w=Bn(n,y),S=EZ(i),b=mk(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=Us(i),C.call(R,Us(i)?!1:i),R.dispatchEvent(N)}},[g,S,i,a]);const E=A.useRef(Us(i)?!1:i);return x.jsx(pn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??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%)"}})});CM.displayName=OM;function OZ(e){return typeof e=="function"}function Us(e){return e==="indeterminate"}function AM(e){return Us(e)?"indeterminate":e?"checked":"unchecked"}var IM={OBJECT:"object",UNDEFINED:"undefined"},vh="browser",hO="cpu",pO="device",i0="engine",yh="os",Cs="name",nm="type",R_="vendor",Do="version",x_="architecture",T_="major",O_="model",CZ="console",AZ="mobile",IZ="tablet",NZ="smarttv",kZ="wearable",MZ="embedded",PZ=typeof window!==IM.UNDEFINED,l0=PZ&&window.navigator?window.navigator:void 0;l0&&l0.userAgentData&&l0.userAgentData;var Wm=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},_h=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==IM.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return _h.call(e.init,[[vh,[Cs,Do,T_,nm]],[hO,[x_]],[pO,[nm,O_,R_]],[i0,[Cs,Do]],[yh,[Cs,Do]]]),_h.call(e.isIgnore,[[vh,[Do,T_]],[i0,[Do]],[yh,[Do]]]),_h.call(e.isIgnoreRgx,[[vh,/ ?browser$/i],[yh,/ ?os$/i]]),_h.call(e.toString,[[vh,[Cs,Do]],[hO,[x_]],[pO,[R_,O_]],[i0,[Cs,Do]],[yh,[Cs,Do]]]),e})();Wm([Cs,Do,T_,nm]);Wm([x_]);Wm([O_,R_,nm,CZ,AZ,NZ,IZ,kZ,MZ]);Wm([Cs,Do]);function DZ(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 NM=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}),Cd=()=>{const e=ee.useContext(NM);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};DZ(`[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
106
  [data-state=closed]
107
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 LZ(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function jZ(){return g1(/^Mac/)}function $Z(){return g1(/^iPhone/)}function mO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function UZ(){return g1(/^iPad/)||jZ()&&navigator.maxTouchPoints>1}function kM(){return $Z()||UZ()}function g1(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const zZ=24,VZ=typeof window<"u"?A.useLayoutEffect:A.useEffect;function gO(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const c0=typeof document<"u"&&window.visualViewport;function vO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function MM(e){for(vO(e)&&(e=e.parentElement);e&&!vO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const FZ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let bh=0,u0;function BZ(e={}){let{isDisabled:t}=e;VZ(()=>{if(!t)return bh++,bh===1&&kM()&&(u0=qZ()),()=>{bh--,bh===0&&u0?.()}},[t])}function qZ(){let e,t=0,n=p=>{e=MM(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;C_(g)&&g!==document.activeElement&&(p.preventDefault(),g.style.transform="translateY(-2000px)",g.focus(),requestAnimationFrame(()=>{g.style.transform=""}))},i=p=>{let g=p.target;C_(g)&&(g.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{g.style.transform="",c0&&(c0.height<window.innerHeight?requestAnimationFrame(()=>{yO(g)}):c0.addEventListener("resize",()=>yO(g),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},u=window.pageXOffset,d=window.pageYOffset,f=gO(HZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=gO(Su(document,"touchstart",n,{passive:!1,capture:!0}),Su(document,"touchmove",r,{passive:!1,capture:!0}),Su(document,"touchend",a,{passive:!1,capture:!0}),Su(document,"focus",i,!0),Su(window,"scroll",l));return()=>{f(),m(),window.scrollTo(u,d)}}function HZ(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Su(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function yO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=MM(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom+zZ;i>l&&(n.scrollTop+=a-r)}e=n.parentElement}}function C_(e){return e instanceof HTMLInputElement&&!FZ.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function GZ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ZZ(...e){return t=>e.forEach(n=>GZ(n,t))}function PM(...e){return A.useCallback(ZZ(...e),e)}const DM=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&&DM.set(e,r)}function KZ(e,t){if(!e||!(e instanceof HTMLElement))return;let n=DM.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 wh(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 WZ(e){return 8*(Math.log(e+1)-2)}function d0(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function YZ(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const fn={DURATION:.5,EASE:[.32,.72,0,1]},LM=.4,QZ=.25,XZ=100,jM=8,gi=16,A_=26,f0="vaul-dragging";function $M(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 JZ({defaultProp:e,onChange:t}){const n=ee.useState(e),[r]=n,a=ee.useRef(r),i=$M(t);return ee.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}function UM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=JZ({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,u=$M(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[l,d]}function eK({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:i,onSnapPointChange:l,direction:u="bottom",container:d,snapToSequentialPoint:f}){const[m,p]=UM({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 K=typeof $=="string";let V=0;if(K&&(V=parseInt($,10)),Mn(u)){const U=K?V:g?$*N.height:0;return g?u==="bottom"?N.height-U:-N.height+U:U}const G=K?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(K=>K===N))!=null?P:null;l($),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:K}){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){K?P():T(E[0]);return}if(!f&&$>2&&J&&E&&n){T(E[n.length-1]);return}const le=E?.reduce((W,Y)=>typeof W!="number"||typeof Y!="number"?W:Math.abs(Y-V)<Math.abs(W-V)?Y:W),B=Mn(u)?window.innerHeight:window.innerWidth;if($>LM&&Math.abs(N)<B*.4){const W=J?1:-1;if(W>0&&w&&n){T(E[n.length-1]);return}if(U&&W<0&&K&&P(),S===null)return;T(E[S+W]);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 tK=()=>()=>{};function nK(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=Cd(),i=ee.useRef(null),l=A.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-A_)/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;YZ(r&&!a?d0(document.body,{background:"black"}):tK,d0(d,{transformOrigin:Mn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${fn.EASE.join(",")})`}));const f=d0(d,{borderRadius:`${jM}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(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},fn.DURATION*1e3)}}},[t,n,l])}let Eu=null;function rK({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:i}){const[l,u]=ee.useState(()=>typeof window<"u"?window.location.href:""),d=ee.useRef(0),f=ee.useCallback(()=>{if(mO()&&Eu===null&&e&&!i){Eu={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(mO()&&Eu!==null&&!i){const p=-parseInt(document.body.style.top,10),g=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Eu),window.requestAnimationFrame(()=>{if(a&&l!==window.location.href){u(window.location.href);return}window.scrollTo(g,p)}),Eu=null}},[l]);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,l,t,n,f,m]),{restorePositionSetting:m}}function oK({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:i,shouldScaleBackground:l=!1,setBackgroundColorOnScale:u=!0,closeThreshold:d=QZ,scrollLockTimeout:f=XZ,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:K,container:V,autoFocus:G=!1}){var U,J;const[le=!1,B]=UM({defaultProp:C,prop:e,onChange:Be=>{t?.(Be),!Be&&!R&&ke(),setTimeout(()=>{K?.(Be)},fn.DURATION*1e3),Be&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Be||(document.body.style.pointerEvents="auto")}}),[W,Y]=ee.useState(!1),[pe,ae]=ee.useState(!1),[M,q]=ee.useState(!1),F=ee.useRef(null),L=ee.useRef(null),z=ee.useRef(null),X=ee.useRef(null),de=ee.useRef(null),ve=ee.useRef(!1),Ie=ee.useRef(null),Ae=ee.useRef(0),H=ee.useRef(!1),ne=ee.useRef(!C),_e=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),Pe=ee.useRef(0),Xe=ee.useCallback(Be=>{i&&Be===oe.length-1&&(L.current=new Date)},[]),{activeSnapPoint:Fe,activeSnapPointIndex:We,setActiveSnapPoint:Z,onRelease:re,snapPointsOffset:oe,onDrag:we,shouldFade:xe,getPercentageDragged:Re}=eK({snapPoints:i,activeSnapPointProp:y,setActiveSnapPointProp:w,drawerRef:se,fadeFromIndex:g,overlayRef:F,onSnapPointChange:Xe,direction:O,container:V,snapToSequentialPoint:N});BZ({isDisabled:!le||pe||!b||M||!W||!$||!I});const{restorePositionSetting:ke}=rK({isOpen:le,modal:b,nested:R??!1,hasBeenOpened:W,preventScrollRestoration:P,noBodyStyles:T});function Je(){return(window.innerWidth-A_)/window.innerWidth}function ot(Be){var bt,Tt;!m&&!i||se.current&&!se.current.contains(Be.target)||(ue.current=((bt=se.current)==null?void 0:bt.getBoundingClientRect().height)||0,Oe.current=((Tt=se.current)==null?void 0:Tt.getBoundingClientRect().width)||0,ae(!0),z.current=new Date,kM()&&window.addEventListener("touchend",()=>ve.current=!1,{once:!0}),Be.target.setPointerCapture(Be.pointerId),Ae.current=Mn(O)?Be.pageY:Be.pageX)}function Ct(Be,bt){var Tt;let ct=Be;const At=(Tt=window.getSelection())==null?void 0:Tt.toString(),qe=se.current?wh(se.current,O):null,ut=new Date;if(ct.tagName==="SELECT"||ct.hasAttribute("data-vaul-no-drag")||ct.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(L.current&&ut.getTime()-L.current.getTime()<500)return!1;if(qe!==null&&(O==="bottom"?qe>0:qe<0))return!0;if(At&&At.length>0)return!1;if(de.current&&ut.getTime()-de.current.getTime()<f&&qe===0||bt)return de.current=ut,!1;for(;ct;){if(ct.scrollHeight>ct.clientHeight){if(ct.scrollTop!==0)return de.current=new Date,!1;if(ct.getAttribute("role")==="dialog")return!0}ct=ct.parentNode}return!0}function ur(Be){if(se.current&&pe){const bt=O==="bottom"||O==="right"?1:-1,Tt=(Ae.current-(Mn(O)?Be.pageY:Be.pageX))*bt,ct=Tt>0,At=i&&!m&&!ct;if(At&&We===0)return;const qe=Math.abs(Tt),ut=document.querySelector("[data-vaul-drawer-wrapper]"),Wt=O==="bottom"||O==="top"?ue.current:Oe.current;let qt=qe/Wt;const dr=Re(qe,ct);if(dr!==null&&(qt=dr),At&&qt>=1||!ve.current&&!Ct(Be.target,ct))return;if(se.current.classList.add(f0),ve.current=!0,Vn(se.current,{transition:"none"}),Vn(F.current,{transition:"none"}),i&&we({draggedDistance:Tt}),ct&&!i){const rn=WZ(Tt),ao=Math.min(rn*-1,0)*bt;Vn(se.current,{transform:Mn(O)?`translate3d(0, ${ao}px, 0)`:`translate3d(${ao}px, 0, 0)`});return}const It=1-qt;if((xe||g&&We===g-1)&&(r?.(Be,qt),Vn(F.current,{opacity:`${It}`,transition:"none"},!0)),ut&&F.current&&l){const rn=Math.min(Je()+qt*(1-Je()),1),ao=8-qt*8,Yn=Math.max(0,14-qt*14);Vn(ut,{borderRadius:`${ao}px`,transform:Mn(O)?`scale(${rn}) translate3d(0, ${Yn}px, 0)`:`scale(${rn}) translate3d(${Yn}px, 0, 0)`,transition:"none"},!0)}if(!i){const rn=qe*bt;Vn(se.current,{transform:Mn(O)?`translate3d(0, ${rn}px, 0)`:`translate3d(${rn}px, 0, 0)`})}}}ee.useEffect(()=>{window.requestAnimationFrame(()=>{ne.current=!0})},[]),ee.useEffect(()=>{var Be;function bt(){if(!se.current||!$)return;const Tt=document.activeElement;if(C_(Tt)||H.current){var ct;const At=((ct=window.visualViewport)==null?void 0:ct.height)||0,qe=window.innerHeight;let ut=qe-At;const Wt=se.current.getBoundingClientRect().height||0,qt=Wt>qe*.8;Pe.current||(Pe.current=Wt);const dr=se.current.getBoundingClientRect().top;if(Math.abs(_e.current-ut)>60&&(H.current=!H.current),i&&i.length>0&&oe&&We){const It=oe[We]||0;ut+=It}if(_e.current=ut,Wt>At||H.current){const It=se.current.getBoundingClientRect().height;let rn=It;It>At&&(rn=At-(qt?dr:A_)),S?se.current.style.height=`${It-Math.max(ut,0)}px`:se.current.style.height=`${Math.max(rn,At-dr)}px`}else LZ()||(se.current.style.height=`${Pe.current}px`);i&&i.length>0&&!H.current?se.current.style.bottom="0px":se.current.style.bottom=`${Math.max(ut,0)}px`}}return(Be=window.visualViewport)==null||Be.addEventListener("resize",bt),()=>{var Tt;return(Tt=window.visualViewport)==null?void 0:Tt.removeEventListener("resize",bt)}},[We,i,oe]);function tn(Be){nn(),E?.(),Be||B(!1),setTimeout(()=>{i&&Z(i[0])},fn.DURATION*1e3)}function Rn(){if(!se.current)return;const Be=document.querySelector("[data-vaul-drawer-wrapper]"),bt=wh(se.current,O);Vn(se.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`}),Vn(F.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"1"}),l&&bt&&bt>0&&le&&Vn(Be,{borderRadius:`${jM}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 nn(){!pe||!se.current||(se.current.classList.remove(f0),ve.current=!1,ae(!1),X.current=new Date)}function jn(Be){if(!pe||!se.current)return;se.current.classList.remove(f0),ve.current=!1,ae(!1),X.current=new Date;const bt=wh(se.current,O);if(!Be||!Ct(Be.target,!1)||!bt||Number.isNaN(bt)||z.current===null)return;const Tt=X.current.getTime()-z.current.getTime(),ct=Ae.current-(Mn(O)?Be.pageY:Be.pageX),At=Math.abs(ct)/Tt;if(At>.05&&(q(!0),setTimeout(()=>{q(!1)},200)),i){re({draggedDistance:ct*(O==="bottom"||O==="right"?1:-1),closeDrawer:tn,velocity:At,dismissible:m}),a?.(Be,!0);return}if(O==="bottom"||O==="right"?ct>0:ct<0){Rn(),a?.(Be,!0);return}if(At>LM){tn(),a?.(Be,!1);return}var qe;const ut=Math.min((qe=se.current.getBoundingClientRect().height)!=null?qe:0,window.innerHeight);var Wt;const qt=Math.min((Wt=se.current.getBoundingClientRect().width)!=null?Wt:0,window.innerWidth),dr=O==="left"||O==="right";if(Math.abs(bt)>=(dr?qt:ut)*d){tn(),a?.(Be,!1);return}a?.(Be,!0),Rn()}ee.useEffect(()=>(le&&(Vn(document.documentElement,{scrollBehavior:"auto"}),L.current=new Date),()=>{KZ(document.documentElement,"scrollBehavior")}),[le]);function xn(Be){const bt=Be?(window.innerWidth-gi)/window.innerWidth:1,Tt=Be?-gi:0;Ie.current&&window.clearTimeout(Ie.current),Vn(se.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(O)?`scale(${bt}) translate3d(0, ${Tt}px, 0)`:`scale(${bt}) translate3d(${Tt}px, 0, 0)`}),!Be&&se.current&&(Ie.current=setTimeout(()=>{const ct=wh(se.current,O);Vn(se.current,{transition:"none",transform:Mn(O)?`translate3d(0, ${ct}px, 0)`:`translate3d(${ct}px, 0, 0)`})},500))}function Qa(Be,bt){if(bt<0)return;const Tt=(window.innerWidth-gi)/window.innerWidth,ct=Tt+bt*(1-Tt),At=-gi+bt*gi;Vn(se.current,{transform:Mn(O)?`scale(${ct}) translate3d(0, ${At}px, 0)`:`scale(${ct}) translate3d(${At}px, 0, 0)`,transition:"none"})}function ga(Be,bt){const Tt=Mn(O)?window.innerHeight:window.innerWidth,ct=bt?(Tt-gi)/Tt:1,At=bt?-gi:0;bt&&Vn(se.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(O)?`scale(${ct}) translate3d(0, ${At}px, 0)`:`scale(${ct}) translate3d(${At}px, 0, 0)`})}return ee.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),ee.createElement(GB,{defaultOpen:C,onOpenChange:Be=>{!m&&!Be||(Be?Y(!0):tn(!0),B(Be))},open:le},ee.createElement(NM.Provider,{value:{activeSnapPoint:Fe,snapPoints:i,setActiveSnapPoint:Z,drawerRef:se,overlayRef:F,onOpenChange:t,onPress:ot,onRelease:jn,onDrag:ur,dismissible:m,shouldAnimate:ne,handleOnly:p,isOpen:le,isDragging:pe,shouldFade:xe,closeDrawer:tn,onNestedDrag:Qa,onNestedOpenChange:xn,onNestedRelease:ga,keyboardIsOpen:H,modal:b,snapPointsOffset:oe,activeSnapPointIndex:We,direction:O,shouldScaleBackground:l,setBackgroundColorOnScale:u,noBodyStyles:T,container:V,autoFocus:G}},n))}const zM=ee.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:l,modal:u,shouldAnimate:d}=Cd(),f=PM(t,n),m=r&&r.length>0;if(!u)return null;const p=ee.useCallback(g=>a(g),[a]);return ee.createElement(WB,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":l&&m?"true":"false","data-vaul-snap-points-overlay":l&&i?"true":"false","data-vaul-animate":d?.current?"true":"false",...e})});zM.displayName="Drawer.Overlay";const VM=ee.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:l,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}=Cd(),[O,C]=ee.useState(!1),I=PM(a,i),N=ee.useRef(null),P=ee.useRef(null),$=ee.useRef(!1),K=S&&S.length>0;nK();const V=(U,J,le=0)=>{if($.current)return!0;const B=Math.abs(U.y),W=Math.abs(U.x),Y=W>B,pe=["bottom","right"].includes(J)?1:-1;if(J==="left"||J==="right"){if(!(U.x*pe<0)&&W>=0&&W<=le)return Y}else if(!(U.y*pe<0)&&B>=0&&B<=le)return!Y;return $.current=!0,!0};ee.useEffect(()=>{K&&window.requestAnimationFrame(()=>{C(!0)})},[]);function G(U){N.current=null,$.current=!1,u(U)}return ee.createElement(YB,{"data-vaul-drawer-direction":w,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":y&&K?"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},l(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,B=U.pointerType==="touch"?10:2;V({x:le,y:J},w,B)?d(U):(Math.abs(le)>B||Math.abs(J)>B)&&(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)}})});VM.displayName="Drawer.Content";const aK=250,sK=120,iK=ee.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:l,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Cd(),w=ee.useRef(null),S=ee.useRef(!1);function b(){if(S.current){T();return}window.setTimeout(()=>{E()},sK)}function E(){if(i||e||S.current){T();return}if(T(),!l||l.length===0){f||a();return}if(u===l[l.length-1]&&f){a();return}const C=l.findIndex(N=>N===u);if(C===-1)return;const I=l[C+1];d(I)}function R(){w.current=window.setTimeout(()=>{S.current=!0},aK)}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))});iK.displayName="Drawer.Handle";function lK(e){const t=Cd(),{container:n=t.container,...r}=e;return ee.createElement(KB,{container:n,...r})}const soe={Root:oK,Content:VM,Overlay:zM,Trigger:ZB,Portal:lK,Title:QB};var nc=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},l=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,l);u((n=n.apply(e,t)).next())}),bp=class extends Error{},cK=class extends Error{},uK=e=>Math.exp(e)*150,dK=(e,...t)=>nc(void 0,[e,...t],function*(n,{attempts:r=4}={}){var a;let i;for(let l=0;l<r;l++)try{return yield n()}catch(u){i=u,yield new Promise(d=>setTimeout(d,uK(l)))}throw new bp((a=i?.message)!=null?a:"Exhausted all retries")}),Ru,FM="captchaFoxOnLoad",_O=`https://cdn.captchafox.com/api.js?render=explicit&onload=${FM}`;function fK(){return nc(this,arguments,function*({nonce:e}={}){return Ru&&document.querySelector(`script[src="${_O}"]`)||(Ru=new Promise((t,n)=>{window[FM]=t;const r=document.createElement("script");r.src=_O,r.async=!0,r.defer=!0,r.onerror=a=>{r.remove(),Ru=void 0,n(a)},e&&(r.nonce=e),document.body.appendChild(r)})),Ru})}function hK(){return nc(this,arguments,function*(e={}){return dK(()=>fK(e))})}var Dl=()=>typeof window?.captchafox<"u",BM=A.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:a,className:i,nonce:l,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!Dl()||!R?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(R)},reset(){if(!Dl()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(R)},remove(){if(!Dl()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}T(void 0),window.captchafox.remove(R)},execute:()=>nc(void 0,null,function*(){if(P.current)return Promise.reject(new bp);if(!Dl()||!R)return K();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?Dl()&&G():hK({nonce:l}).then(()=>nc(void 0,null,function*(){Dl()&&(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)},K=()=>new Promise((U,J)=>{N.current=()=>{$(),J(new bp)},I.current=setTimeout(()=>{J(new cK("Execute timed out"))},e*1e3),C.current=le=>{$(),window.captchafox.execute(le).then(U).catch(B=>{const W=V(B);J(W)})}}),V=U=>U!=="challenge-aborted"&&U!=="rate-limited"?new bp:U,G=()=>nc(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 B=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});B&&(T(B),C.current&&(C.current(B),C.current=void 0))});return ee.createElement("div",{ref:E,id:R,className:i})});BM.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 I_(e,t){return I_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},I_(e,t)}function pK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,I_(e,t)}var mK=Object.defineProperty,gK=Object.defineProperties,vK=Object.getOwnPropertyDescriptors,rm=Object.getOwnPropertySymbols,qM=Object.prototype.hasOwnProperty,HM=Object.prototype.propertyIsEnumerable,N_=(e,t,n)=>t in e?mK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wr=(e,t)=>{for(var n in t||(t={}))qM.call(t,n)&&N_(e,n,t[n]);if(rm)for(var n of rm(t))HM.call(t,n)&&N_(e,n,t[n]);return e},GM=(e,t)=>gK(e,vK(t)),yK=(e,t)=>{var n={};for(var r in e)qM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rm)for(var r of rm(e))t.indexOf(r)<0&&HM.call(e,r)&&(n[r]=e[r]);return n},Kn=(e,t,n)=>(N_(e,typeof t!="symbol"?t+"":t,n),n),cc=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},l=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,l);u((n=n.apply(e,t)).next())}),_K="hCaptcha-script",wp="hCaptchaOnLoad",bO="script-error",Ns="@hCaptcha/loader";function bK(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function ZM(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function KM(e){return e||document.head}function wK(e){var t;e.setTag("source",Ns),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Wr({},SK())),e.setContext("device",GM(Wr({},RK()),{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 SK(){var e,t,n,r,a,i;let l=navigator.userAgent,u,d;return l.indexOf("Firefox")!==-1?(u="Firefox",d=(e=l.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):l.indexOf("Edg")!==-1?(u="Microsoft Edge",d=(t=l.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):l.indexOf("Chrome")!==-1&&l.indexOf("Safari")!==-1?(u="Chrome",d=(n=l.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):l.indexOf("Safari")!==-1&&l.indexOf("Chrome")===-1?(u="Safari",d=(r=l.match(/Version\/([\d.]+)/))==null?void 0:r[1]):l.indexOf("Opera")!==-1||l.indexOf("OPR")!==-1?(u="Opera",d=(a=l.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:a[2]):l.indexOf("MSIE")!==-1||l.indexOf("Trident")!==-1?(u="Internet Explorer",d=(i=l.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:i[2]):(u="Unknown",d="Unknown"),{name:u,version:d}}function EK(e){return new Promise(t=>setTimeout(t,e))}function RK(){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 xK=class WM{constructor(t){Kn(this,"_parent"),Kn(this,"breadcrumbs",[]),Kn(this,"context",{}),Kn(this,"extra",{}),Kn(this,"tags",{}),Kn(this,"request"),Kn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new WM(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=Wr(Wr({},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=Wr(Wr({},r.extra),a.extra),r.contexts=Wr(Wr({},r.contexts),a.context),r.tags=Wr(Wr({},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}},TK=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,OK=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,CK=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,AK=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Sh="?",wO="An unknown error occurred",IK="0.0.4";function NK(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function hr(e){return(e+256).toString(16).substring(1)}function kK(){let e=NK(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,hr(e[0])+hr(e[1])+hr(e[2])+hr(e[3])+"-"+hr(e[4])+hr(e[5])+"-"+hr(e[6])+hr(e[7])+"-"+hr(e[8])+hr(e[9])+"-"+hr(e[10])+hr(e[11])+hr(e[12])+hr(e[13])+hr(e[14])+hr(e[15])}var MK=[[TK,"chrome"],[CK,"winjs"],[OK,"gecko"]];function PK(e){var t,n,r,a;if(!e.stack)return null;let i=[],l=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
108
108
  `))!=null?r:[];for(let u=0;u<l.length;++u){let d=null,f=null,m=null;for(let[p,g]of MK)if(f=p.exec(l[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]||Sh,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||Sh,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]||Sh,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=Sh),i.push(d)}}return i.length?i.reverse():null}function DK(e){let t=PK(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function LK(e){let t=AK.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 jK(e,t,n){var r,a;let i=Wr({event_id:kK().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:IK},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 l=[],u=e.error;for(let d=0;d<5&&u&&(l.push(DK(u)),!(!u.cause||!(u.cause instanceof Error)));d++)u=u.cause;i.exception={values:l.reverse()}}return e.type==="message"&&(i.message=e.message,i.level=e.level),i}function $K(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=yK(n,["message"]),i=new Error(typeof r=="string"?r:wO);return Object.assign(i,a)}let t=new Error(wO);return Object.assign(t,{cause:e})}function UK(e,t,n){return cc(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 l=yield fetch(e,GM(Wr({},t),{signal:i})),u=yield l.text();return{status:l.status,body:u}}return yield new Promise((i,l)=>{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=()=>l(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(),l(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,k_=(Mr=class{constructor(e){Kn(this,"apiURL"),Kn(this,"dsn"),Kn(this,"environment"),Kn(this,"release"),Kn(this,"sampleRate"),Kn(this,"debug"),Kn(this,"_scope"),Kn(this,"shouldBuffer",!1),Kn(this,"bufferlimit",20),Kn(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 xK,this.apiURL=LK(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:$K(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 cc(this,null,function*(){try{this.log("Sending sentry event",e);let n=jK(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a={type:"event"},i=JSON.stringify(r)+`
@@ -171,4 +171,4 @@ ${r}
171
171
  `;break;case"id":u=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?r(parseInt(b,10)):n(new gC(`Invalid \`retry\` value: "${b}"`,{type:"invalid-retry",value:b,line:E}));break;default:n(new gC(`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
172
  `)?d.slice(0,-1):d}),u=void 0,d="",f=""}function w(S={}){i&&S.consume&&p(i),l=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:w}}function Uee(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
173
173
  `,r);let l=-1;if(a!==-1&&i!==-1?l=Math.min(a,i):a!==-1?a===e.length-1?l=-1:l=a:i!==-1&&(l=i),l===-1){n=e.slice(r);break}else{const u=e.slice(r,l);t.push(u),r=l+1,e[r-1]==="\r"&&e[r]===`
174
- `&&r++}}return[t,n]}class vC 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(yC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(yC(this),n)}}function zee(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function U_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(U_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${U_(e.cause)}`:e.message:`${e}`}function yC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var lP=e=>{throw TypeError(e)},K1=(e,t,n)=>t.has(e)||lP("Cannot "+n),yt=(e,t,n)=>(K1(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>t.has(e)?lP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ln=(e,t,n,r)=>(K1(e,t,"write to private field"),t.set(e,n),n),za=(e,t,n)=>(K1(e,t,"access private method"),n),$r,Ri,Bl,Ep,um,Ku,Yl,Wu,ks,ql,rc,Hl,Du,Lo,z_,V_,F_,_C,B_,q_,Lu,H_,G_;class Rp extends EventTarget{constructor(t,n){var r,a;super(),zn(this,Lo),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,zn(this,$r),zn(this,Ri),zn(this,Bl),zn(this,Ep),zn(this,um),zn(this,Ku),zn(this,Yl),zn(this,Wu,null),zn(this,ks),zn(this,ql),zn(this,rc,null),zn(this,Hl,null),zn(this,Du,null),zn(this,V_,async i=>{var l;yt(this,ql).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){za(this,Lo,Lu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?ln(this,Bl,new URL(i.url)):ln(this,Bl,void 0),f!==200){za(this,Lo,Lu).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){za(this,Lo,Lu).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(yt(this,$r)===this.CLOSED)return;ln(this,$r,this.OPEN);const p=new Event("open");if((l=yt(this,Du))==null||l.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){za(this,Lo,Lu).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&&yt(this,ql).feed(g.decode(b,{stream:!S})),S&&(w=!1,yt(this,ql).reset(),za(this,Lo,H_).call(this))}while(w)}),zn(this,F_,i=>{ln(this,ks,void 0),!(i.name==="AbortError"||i.type==="aborted")&&za(this,Lo,H_).call(this,U_(i))}),zn(this,B_,i=>{typeof i.id=="string"&&ln(this,Wu,i.id);const l=new MessageEvent(i.event||"message",{data:i.data,origin:yt(this,Bl)?yt(this,Bl).origin:yt(this,Ri).origin,lastEventId:i.id||""});yt(this,Hl)&&(!i.event||i.event==="message")&&yt(this,Hl).call(this,l),this.dispatchEvent(l)}),zn(this,q_,i=>{ln(this,Ku,i)}),zn(this,G_,()=>{ln(this,Yl,void 0),yt(this,$r)===this.CONNECTING&&za(this,Lo,z_).call(this)});try{if(t instanceof URL)ln(this,Ri,t);else if(typeof t=="string")ln(this,Ri,new URL(t,Vee()));else throw new Error("Invalid URL")}catch{throw zee("An invalid or illegal string was specified")}ln(this,ql,iP({onEvent:yt(this,B_),onRetry:yt(this,q_)})),ln(this,$r,this.CONNECTING),ln(this,Ku,3e3),ln(this,um,(r=n?.fetch)!=null?r:globalThis.fetch),ln(this,Ep,(a=n?.withCredentials)!=null?a:!1),za(this,Lo,z_).call(this)}get readyState(){return yt(this,$r)}get url(){return yt(this,Ri).href}get withCredentials(){return yt(this,Ep)}get onerror(){return yt(this,rc)}set onerror(t){ln(this,rc,t)}get onmessage(){return yt(this,Hl)}set onmessage(t){ln(this,Hl,t)}get onopen(){return yt(this,Du)}set onopen(t){ln(this,Du,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(){yt(this,Yl)&&clearTimeout(yt(this,Yl)),yt(this,$r)!==this.CLOSED&&(yt(this,ks)&&yt(this,ks).abort(),ln(this,$r,this.CLOSED),ln(this,ks,void 0))}}$r=new WeakMap,Ri=new WeakMap,Bl=new WeakMap,Ep=new WeakMap,um=new WeakMap,Ku=new WeakMap,Yl=new WeakMap,Wu=new WeakMap,ks=new WeakMap,ql=new WeakMap,rc=new WeakMap,Hl=new WeakMap,Du=new WeakMap,Lo=new WeakSet,z_=function(){ln(this,$r,this.CONNECTING),ln(this,ks,new AbortController),yt(this,um)(yt(this,Ri),za(this,Lo,_C).call(this)).then(yt(this,V_)).catch(yt(this,F_))},V_=new WeakMap,F_=new WeakMap,_C=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...yt(this,Wu)?{"Last-Event-ID":yt(this,Wu)}:void 0},cache:"no-store",signal:(e=yt(this,ks))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},B_=new WeakMap,q_=new WeakMap,Lu=function(e,t){var n;yt(this,$r)!==this.CLOSED&&ln(this,$r,this.CLOSED);const r=new vC("error",{code:t,message:e});(n=yt(this,rc))==null||n.call(this,r),this.dispatchEvent(r)},H_=function(e,t){var n;if(yt(this,$r)===this.CLOSED)return;ln(this,$r,this.CONNECTING);const r=new vC("error",{code:t,message:e});(n=yt(this,rc))==null||n.call(this,r),this.dispatchEvent(r),ln(this,Yl,setTimeout(yt(this,G_),yt(this,Ku)))},G_=new WeakMap,Rp.CONNECTING=0,Rp.OPEN=1,Rp.CLOSED=2;function Vee(){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 dm(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function cP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...dm(t.headers),...dm(r.headers)}:t.headers};return e(n,a)}:e}let W1;W1=globalThis.crypto;async function Fee(e){return(await W1).getRandomValues(new Uint8Array(e))}async function Bee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await Fee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function qee(e){return await Bee(e)}async function Hee(e){const t=await(await W1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Gee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await qee(e),n=await Hee(t);return{code_verifier:t,code_challenge:n}}const rr=b7().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:uz.custom,message:"URL must be parseable",fatal:!0}),E$}).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"}),Zee=ar({resource:D().url(),authorization_servers:Ee(rr).optional(),jwks_uri:D().url().optional(),scopes_supported:Ee(D()).optional(),bearer_methods_supported:Ee(D()).optional(),resource_signing_alg_values_supported:Ee(D()).optional(),resource_name:D().optional(),resource_documentation:D().optional(),resource_policy_uri:D().url().optional(),resource_tos_uri:D().url().optional(),tls_client_certificate_bound_access_tokens:et().optional(),authorization_details_types_supported:Ee(D()).optional(),dpop_signing_alg_values_supported:Ee(D()).optional(),dpop_bound_access_tokens_required:et().optional()}),uP=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,registration_endpoint:rr.optional(),scopes_supported:Ee(D()).optional(),response_types_supported:Ee(D()),response_modes_supported:Ee(D()).optional(),grant_types_supported:Ee(D()).optional(),token_endpoint_auth_methods_supported:Ee(D()).optional(),token_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),service_documentation:rr.optional(),revocation_endpoint:rr.optional(),revocation_endpoint_auth_methods_supported:Ee(D()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),introspection_endpoint:D().optional(),introspection_endpoint_auth_methods_supported:Ee(D()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),code_challenge_methods_supported:Ee(D()).optional(),client_id_metadata_document_supported:et().optional()}),Kee=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,userinfo_endpoint:rr.optional(),jwks_uri:rr,registration_endpoint:rr.optional(),scopes_supported:Ee(D()).optional(),response_types_supported:Ee(D()),response_modes_supported:Ee(D()).optional(),grant_types_supported:Ee(D()).optional(),acr_values_supported:Ee(D()).optional(),subject_types_supported:Ee(D()),id_token_signing_alg_values_supported:Ee(D()),id_token_encryption_alg_values_supported:Ee(D()).optional(),id_token_encryption_enc_values_supported:Ee(D()).optional(),userinfo_signing_alg_values_supported:Ee(D()).optional(),userinfo_encryption_alg_values_supported:Ee(D()).optional(),userinfo_encryption_enc_values_supported:Ee(D()).optional(),request_object_signing_alg_values_supported:Ee(D()).optional(),request_object_encryption_alg_values_supported:Ee(D()).optional(),request_object_encryption_enc_values_supported:Ee(D()).optional(),token_endpoint_auth_methods_supported:Ee(D()).optional(),token_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),display_values_supported:Ee(D()).optional(),claim_types_supported:Ee(D()).optional(),claims_supported:Ee(D()).optional(),service_documentation:D().optional(),claims_locales_supported:Ee(D()).optional(),ui_locales_supported:Ee(D()).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()}),Wee=ce({...Kee.shape,...uP.pick({code_challenge_methods_supported:!0}).shape}),Yee=ce({access_token:D(),id_token:D().optional(),token_type:D(),expires_in:tN().optional(),scope:D().optional(),refresh_token:D().optional()}).strip(),Qee=ce({error:D(),error_description:D().optional(),error_uri:D().optional()}),bC=rr.optional().or(je("").transform(()=>{})),Xee=ce({redirect_uris:Ee(rr),token_endpoint_auth_method:D().optional(),grant_types:Ee(D()).optional(),response_types:Ee(D()).optional(),client_name:D().optional(),client_uri:rr.optional(),logo_uri:bC,scope:D().optional(),contacts:Ee(D()).optional(),tos_uri:bC,policy_uri:D().optional(),jwks_uri:rr.optional(),jwks:eo().optional(),software_id:D().optional(),software_version:D().optional(),software_statement:D().optional()}).strip(),Jee=ce({client_id:D(),client_secret:D().optional(),client_id_issued_at:Ze().optional(),client_secret_expires_at:Ze().optional()}).strip(),ete=Xee.merge(Jee);ce({error:D(),error_description:D().optional()}).strip();ce({token:D(),token_type_hint:D().optional()}).strip();function tte(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function nte({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 Wn 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 Z_ extends Wn{}Z_.errorCode="invalid_request";class fm extends Wn{}fm.errorCode="invalid_client";class hm extends Wn{}hm.errorCode="invalid_grant";class pm extends Wn{}pm.errorCode="unauthorized_client";class K_ extends Wn{}K_.errorCode="unsupported_grant_type";class W_ extends Wn{}W_.errorCode="invalid_scope";class Y_ extends Wn{}Y_.errorCode="access_denied";class dc extends Wn{}dc.errorCode="server_error";class Q_ extends Wn{}Q_.errorCode="temporarily_unavailable";class X_ extends Wn{}X_.errorCode="unsupported_response_type";class J_ extends Wn{}J_.errorCode="unsupported_token_type";class eb extends Wn{}eb.errorCode="invalid_token";class tb extends Wn{}tb.errorCode="method_not_allowed";class nb extends Wn{}nb.errorCode="too_many_requests";class mm extends Wn{}mm.errorCode="invalid_client_metadata";class rb extends Wn{}rb.errorCode="insufficient_scope";class ob extends Wn{}ob.errorCode="invalid_target";const rte={[Z_.errorCode]:Z_,[fm.errorCode]:fm,[hm.errorCode]:hm,[pm.errorCode]:pm,[K_.errorCode]:K_,[W_.errorCode]:W_,[Y_.errorCode]:Y_,[dc.errorCode]:dc,[Q_.errorCode]:Q_,[X_.errorCode]:X_,[J_.errorCode]:J_,[eb.errorCode]:eb,[tb.errorCode]:tb,[nb.errorCode]:nb,[mm.errorCode]:mm,[rb.errorCode]:rb,[ob.errorCode]:ob};class $o extends Error{constructor(t){super(t??"Unauthorized")}}function ote(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const V0="code",F0="S256";function ate(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&&ote(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 ste(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":ite(a,i,n);return;case"client_secret_post":lte(a,i,r);return;case"none":cte(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function ite(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 lte(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function cte(e,t){t.set("client_id",e)}async function dP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Qee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:l}=r,u=rte[a]||dc;return new u(i||"",l)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new dc(a)}}async function Ci(e,t){try{return await B0(e,t)}catch(n){if(n instanceof fm||n instanceof pm)return await e.invalidateCredentials?.("all"),await B0(e,t);if(n instanceof hm)return await e.invalidateCredentials?.("tokens"),await B0(e,t);throw n}}async function B0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let l,u;try{l=await fte(t,{resourceMetadataUrl:a},i),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await dte(t,e,l),f=await vte(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&&!ute(E))throw new mm(`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 wte(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 bte(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 _te(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 Wn)||b instanceof dc))throw b}const y=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:S}=await yte(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(w),"REDIRECT"}function ute(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function dte(e,t,n){const r=tte(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!nte({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 gm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=q0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const l=q0(e,"scope")||void 0,u=q0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:l,error:u}}function q0(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 fte(e,t,n=fetch){const r=await mte(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 Zee.parse(await r.json())}async function Y1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?Y1(e,void 0,n):void 0;throw r}}function hte(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function wC(e,t,n=fetch){return await Y1(e,{"MCP-Protocol-Version":t},n)}function pte(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function mte(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Xm;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const d=hte(t,a.pathname);l=new URL(d,r?.metadataServerUrl??a),l.search=a.search}let u=await wC(l,i,n);if(!r?.metadataUrl&&pte(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await wC(d,i,n)}return u}function gte(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 vte(e,{fetchFn:t=fetch,protocolVersion:n=Xm}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=gte(e);for(const{url:i,type:l}of a){const u=await Y1(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 ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return l==="oauth"?uP.parse(await u.json()):Wee.parse(await u.json())}}}async function yte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:l}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes(V0))throw new Error(`Incompatible auth server: does not support response type ${V0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(F0))throw new Error(`Incompatible auth server: does not support code challenge method ${F0}`)}else u=new URL("/authorize",e);const d=await Gee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",V0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",F0),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"),l&&u.searchParams.set("resource",l.href),{authorizationUrl:u,codeVerifier:f}}function fP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Q1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:l}){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=ate(r,m);ste(p,r,d,n)}const f=await(l??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await dP(f);return Yee.parse(await f.json())}async function hoe(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:l,addClientAuthentication:u,fetchFn:d}){const f=fP(r,a,i);return Q1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:l,fetchFn:d})}async function _te(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:l}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await Q1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:l});return{refresh_token:r,...d}}async function bte(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const l=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(l)),!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=fP(a,f,e.redirectUrl)}const d=await e.clientInformation();return Q1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function wte(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 dP(i);return ete.parse(await i.json())}class Ste extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class Ete{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=cP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Ci(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 $o;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=dm(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 Rp(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const l=await this._commonHeaders();l.set("Accept","text/event-stream");const u=await t(a,{...i,headers:l});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=gm(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 Ste(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(l){r(l),this.onerror?.(l),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let l;try{l=Zu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(l)}})}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 $o("No auth provider");if(await Ci(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("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:l,scope:u}=gm(a);if(this._resourceMetadataUrl=l,this._scope=u,await Ci(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;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 Rte="mcp";class xte{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,Rte),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=Zu.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 Tte extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=iP({onEvent:l=>{i.enqueue(l)},onError(l){t==="terminate"?i.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const Ote={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class zl extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let Cte=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=cP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Ote}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Ci(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 $o;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=dm(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 zl(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 l,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Tte({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:w}=await m.read();if(w)break;if(y.id&&(l=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const S=Zu.parse(JSON.parse(y.data));Pu(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:l,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:l,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 $o("No auth provider");if(await Ci(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("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:$_(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 l={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,l),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 zl(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:w}=gm(u);if(this._resourceMetadataUrl=y,this._scope=w,await Ci(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:w,error:S}=gm(u);if(S==="insufficient_scope"){const b=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===b)throw new zl(403,"Server returned 403 after trying upscoping");if(w&&(this._scope=w),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=b??void 0,await Ci(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new $o;return this.send(t)}}throw new zl(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),oX(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=>Zu.parse(w)):[Zu.parse(g)];for(const w of y)this.onmessage?.(w)}else throw await u.body?.cancel(),new zl(-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 zl(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 Ate extends Cte{constructor(t,n){super(t,n)}send(t,n){const r=Ite(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Ite(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 Nte extends sP{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},q1,n)}}const kte=async(e,t,n)=>{const r=Mte(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new Nte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,l,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(l),headers:d,signal:u})}}},Mte=(e,t,n)=>{if(e.type==="Websocket")return new xte(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:(l,u)=>fetch(l,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new Ete(new URL(e.url),i)}return new Ate(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},SC=e=>{try{return JSON.parse(e)}catch{return e}},dp=new Map,EC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?pr(e.inputSchema):void 0,outputSchema:e.outputSchema?pr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Pte(e){const t=n=>"connection"in e?kte({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)])return 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"?SC(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"?SC(E):void 0}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function l(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return dp.has(f)||dp.set(f,i()),await dp.get(f)}catch(m){console.error("Failed to list tools",m),dp.delete(f);return}}async function u(){return(await l()??[]).map(f=>EC(f,a))}return a.asTool=async()=>{const f=(await l()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return EC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Dte({connection:n}):global[t]}});function Dte(e){return Pte(e)}const Lte=ce({id:D().describe("Unique identifier for the entity"),title:D().describe("Human-readable title for the entity"),description:D().nullish().describe("Description of the entity"),created_at:D().datetime(),updated_at:D().datetime(),created_by:D().optional(),updated_by:D().optional()}),jte=ce({field:Ee(D()),operator:$t(["eq","gt","gte","lt","lte","in","like","contains"]),value:_t()}),hP=ua(()=>Lt([jte,ce({operator:$t(["and","or","not"]),conditions:Ee(hP)})])),$te=ce({field:Ee(D()),direction:$t(["asc","desc"]),nulls:$t(["first","last"]).optional()}),Ute=ce({where:hP.optional().describe("Filter expression"),orderBy:Ee($te).optional().describe("Sort expressions"),limit:Ze().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ze().int().min(0).optional().describe("Number of items to skip")});function zte(e){return ce({items:Ee(e).describe("Array of collection items"),totalCount:Ze().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:et().optional().describe("Whether there are more items available")})}const Vte=ce({id:D().describe("ID of the entity to retrieve")});function Fte(e){return ce({item:e.nullable().describe("The retrieved item, or null if not found")})}function Bte(e){return ce({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function qte(e){return ce({item:e.describe("The created entity with generated id")})}function Hte(e){return ce({id:D().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function Gte(e){return ce({item:e.describe("The updated entity")})}const Zte=ce({id:D().describe("ID of the entity to delete")});function Kte(e){return ce({item:e.describe("The deleted entity")})}function Wte(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:Ute,outputSchema:zte(t)},{name:`COLLECTION_${r}_GET`,inputSchema:Vte,outputSchema:Fte(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:Bte(t),outputSchema:qte(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:Hte(t),outputSchema:Gte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:Zte,outputSchema:Kte(t),opt:!0}),i}const Yte=ce({id:D(),name:D(),description:D().optional(),inputSchema:Et(D(),_t()),outputSchema:Et(D(),_t()).optional()}),Qte=Lte.extend({_meta:ce({"io.decocms":ce({id:D(),verified:et(),scopeName:D(),appName:D(),friendlyName:D().nullable().optional(),metadata:Et(D(),_t()).nullable().optional(),publishedAt:D().datetime().optional(),updatedAt:D().datetime().optional(),tools:Ee(Yte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:ce({$schema:D().optional(),_meta:Et(D(),_t()).optional(),name:D().describe("The server name (scope/app)"),title:D().optional().describe("User-friendly title"),description:D().optional().describe("Server description"),icons:Ee(ce({src:D(),mimeType:D().optional(),sizes:Ee(D()).optional(),theme:$t(["light","dark"]).optional()})).optional(),remotes:Ee(ce({type:$t(["http","stdio","sse"]),url:D().optional(),headers:Ee(_t()).optional()})).optional(),packages:Ee(_t()).optional(),repository:ce({url:D(),source:D().optional(),subfolder:D().optional()}).optional(),version:D().optional(),websiteUrl:D().optional()})});Wte("registry_app",Qte,{readOnly:!0});const Xte=ce({specversion:je("1.0").describe("CloudEvents specification version"),id:D().describe("Unique identifier for this event (UUID recommended)"),source:D().describe("Connection ID of the event publisher"),type:D().describe("Event type (e.g., 'order.created', 'user.signup')"),time:D().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:D().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:D().optional().default("application/json").describe("Content type of the data attribute"),dataschema:D().url().optional().describe("URI to the schema for the data attribute"),data:_t().optional().describe("Event payload (any JSON value)")});ce({events:Ee(Xte).min(1).describe("Batch of CloudEvents to process")});const Jte=ce({success:et().optional().describe("Whether this event was processed successfully"),error:D().optional().describe("Error message for this event"),retryAfter:Ze().int().positive().optional().describe("Re-deliver this event after this many ms")});ce({success:et().optional().describe("Batch success - applies to events not in results"),error:D().optional().describe("Batch error message - applies to events not in results"),processedCount:Ze().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ze().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Et(D(),Jte).optional().describe("Per-event results keyed by event ID")});ce({type:D().min(1).max(255).describe("Event type identifier"),subject:D().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:_t().optional().describe("Event payload"),deliverAt:D().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:D().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});ce({id:D().describe("Unique event ID"),type:D().describe("Event type"),source:D().describe("Source connection ID"),time:D().describe("Event timestamp")});ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")});ce({subscription:ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:et().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")})});const ene=ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")}),tne=ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:et().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")});ce({subscriptions:Ee(ene).describe("Desired subscriptions - system will create/update/delete to match")});ce({created:Ze().int().min(0).describe("Number of subscriptions created"),updated:Ze().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Ze().int().min(0).describe("Number of subscriptions removed"),unchanged:Ze().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:Ee(tne).describe("Current subscriptions after sync")});ce({subscriptionId:D().describe("Subscription ID to remove")});ce({success:et().describe("Whether unsubscribe was successful"),subscriptionId:D().describe("Subscription ID that was removed")});ce({eventId:D().describe("Event ID to cancel")});ce({success:et().describe("Whether cancellation was successful"),eventId:D().describe("Event ID that was cancelled")});ce({eventId:D().describe("Event ID to acknowledge")});ce({success:et().describe("Whether ACK was successful"),eventId:D().describe("Event ID that was acknowledged")});const nne=ce({prefix:D().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ze().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:D().optional().describe("Token for pagination from previous response"),delimiter:D().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),rne=ce({objects:Ee(ce({key:D().describe("Object key/path"),size:Ze().describe("Object size in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object")})),nextContinuationToken:D().optional().describe("Token for fetching next page of results"),isTruncated:et().describe("Whether there are more results available"),commonPrefixes:Ee(D()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),one=ce({key:D().describe("Object key/path to get metadata for")}),ane=ce({contentType:D().optional().describe("MIME type of the object"),contentLength:Ze().describe("Size of the object in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object"),metadata:Et(D(),D()).optional().describe("Custom metadata key-value pairs")}),sne=ce({key:D().describe("Object key/path to generate URL for"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),ine=ce({url:D().describe("Presigned URL for downloading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),lne=ce({key:D().describe("Object key/path for the upload"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:D().optional().describe("MIME type for the object being uploaded")}),cne=ce({url:D().describe("Presigned URL for uploading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),une=ce({key:D().describe("Object key/path to delete")}),dne=ce({success:et().describe("Whether the deletion was successful"),key:D().describe("The key that was deleted")}),fne=ce({keys:Ee(D()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),hne=ce({deleted:Ee(D()).describe("Array of successfully deleted keys"),errors:Ee(ce({key:D(),message:D()})).describe("Array of errors for failed deletions")}),pne=[{name:"LIST_OBJECTS",inputSchema:nne,outputSchema:rne},{name:"GET_OBJECT_METADATA",inputSchema:one,outputSchema:ane},{name:"GET_PRESIGNED_URL",inputSchema:sne,outputSchema:ine},{name:"PUT_PRESIGNED_URL",inputSchema:lne,outputSchema:cne},{name:"DELETE_OBJECT",inputSchema:une,outputSchema:dne},{name:"DELETE_OBJECTS",inputSchema:fne,outputSchema:hne}],pP=({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"}));pP.displayName="Folder";function RC(e,t,n,r){return e?e.startsWith("/")?`/${t}/${n}/${r}${e}`:e:`/${t}/${n}/${r}`}function mne(e){return{createRoutes:e,useParams:t=>Ql({strict:!1}),useSearch:t=>Om({strict:!1}),useNavigate:()=>{const t=vc(),{org:n,project:r,pluginId:a}=Ql({strict:!1});return i=>{const l=RC(i.to,n,r,a);return t({...i,to:l,params:{org:n,project:r,pluginId:a,...i.params}})}},useLocation:()=>hL(),Link:function(n){const{org:r,project:a,pluginId:i}=Ql({strict:!1}),l=RC(n.to,r,a,i);return x.jsx(Am,{...n,to:l,params:{org:r,project:a,pluginId:i,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var Mt;(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 l of a)i[l]=l;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of i)l[u]=a[u];return e.objectValues(l)},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 l in a)Object.prototype.hasOwnProperty.call(a,l)&&i.push(l);return i},e.find=(a,i)=>{for(const l of a)if(i(l))return l},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(l=>typeof l=="string"?`'${l}'`:l).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Mt||(Mt={}));var xC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xC||(xC={}));const Ve=Mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Is=e=>{switch(typeof e){case"undefined":return Ve.undefined;case"string":return Ve.string;case"number":return Number.isNaN(e)?Ve.nan:Ve.number;case"boolean":return Ve.boolean;case"function":return Ve.function;case"bigint":return Ve.bigint;case"symbol":return Ve.symbol;case"object":return Array.isArray(e)?Ve.array:e===null?Ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ve.promise:typeof Map<"u"&&e instanceof Map?Ve.map:typeof Set<"u"&&e instanceof Set?Ve.set:typeof Date<"u"&&e instanceof Date?Ve.date:Ve.object;default:return Ve.unknown}},Ne=Mt.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 Ha 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 l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof Ha))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Mt.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()}}Ha.create=e=>new Ha(e);const ab=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Mt.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Mt.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Mt.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${Mt.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}"`:Mt.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,Mt.assertNever(e)}return{message:n}};let gne=ab;function vne(){return gne}const yne=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],l={...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(l,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function De(e,t){const n=vne(),r=yne({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ab?void 0:ab].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 nt;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,l=await a.value;r.push({key:i,value:l})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:l}=a;if(i.status==="aborted"||l.status==="aborted")return nt;i.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[i.value]=l.value)}return{status:t.value,value:r}}}const nt=Object.freeze({status:"aborted"}),ju=e=>({status:"dirty",value:e}),Oo=e=>({status:"valid",value:e}),TC=e=>e.status==="aborted",OC=e=>e.status==="dirty",fc=e=>e.status==="valid",vm=e=>typeof Promise<"u"&&e instanceof Promise;var Ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ge||(Ge={}));class Hs{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 CC=(e,t)=>{if(fc(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 Ha(e.common.issues);return this._error=n,this._error}}};function mt(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:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Ot{get description(){return this._def.description}_getType(t){return Is(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Is(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:Is(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vm(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:Is(t)},a=this._parseSync({data:t,path:r.path,parent:r});return CC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Is(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return fc(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=>fc(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:Is(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(vm(a)?a:Promise.resolve(a));return CC(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 l=t(a),u=()=>i.addIssue({code:Ne.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!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 pc({schema:this,typeName:rt.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 zs.create(this,this._def)}nullable(){return mc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return wm.create(this,this._def)}or(t){return _m.create([this,t],this._def)}and(t){return bm.create(this,t,this._def)}transform(t){return new pc({...mt(this._def),schema:this,typeName:rt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new lb({...mt(this._def),innerType:this,defaultValue:n,typeName:rt.ZodDefault})}brand(){return new Vne({typeName:rt.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new cb({...mt(this._def),innerType:this,catchValue:n,typeName:rt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return X1.create(this,t)}readonly(){return ub.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _ne=/^c[^\s-]{8,}$/i,bne=/^[0-9a-z]+$/,wne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Sne=/^[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,Ene=/^[a-z0-9_-]{21}$/i,Rne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xne=/^[-+]?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)?)??$/,Tne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,One="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let H0;const Cne=/^(?:(?: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])$/,Ane=/^(?:(?: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])$/,Ine=/^(([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]))$/,Nne=/^(([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])$/,kne=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mne=/^([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])))",Pne=new RegExp(`^${mP}$`);function gP(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 Dne(e){return new RegExp(`^${gP(e)}$`)}function Lne(e){let t=`${mP}T${gP(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 jne(e,t){return!!((t==="v4"||!t)&&Cne.test(e)||(t==="v6"||!t)&&Ine.test(e))}function $ne(e,t){if(!Rne.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 Une(e,t){return!!((t==="v4"||!t)&&Ane.test(e)||(t==="v6"||!t)&&Nne.test(e))}class Ps extends Ot{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ve.string){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.string,received:i.parsedType}),nt}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),De(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),De(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 l=t.data.length>i.value,u=t.data.length<i.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Tne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"email",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")H0||(H0=new RegExp(One,"u")),H0.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Sne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Ene.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_ne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")bne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")wne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(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),De(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),De(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),De(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),De(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),De(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Lne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Pne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Dne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?xne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?jne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?$ne(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Une(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?kne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Mne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),r.dirty()):Mt.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,...Ge.errToObj(r)})}_addCheck(t){return new Ps({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ge.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,...Ge.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,...Ge.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ge.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ge.errToObj(n)})}nonempty(t){return this.min(1,Ge.errToObj(t))}trim(){return new Ps({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ps({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ps({...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}}Ps.create=e=>new Ps({checks:[],typeName:rt.ZodString,coerce:e?.coerce??!1,...mt(e)});function zne(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(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return i%l/10**a}class fd extends Ot{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)!==Ve.number){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.number,received:i.parsedType}),nt}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?Mt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),De(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),De(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),De(r,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?zne(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),De(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),De(r,{code:Ne.not_finite,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new fd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new fd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ge.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"&&Mt.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)}}fd.create=e=>new fd({checks:[],typeName:rt.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class hd extends Ot{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)!==Ve.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),De(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),De(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),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.bigint,received:n.parsedType}),nt}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new hd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new hd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.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}}hd.create=e=>new hd({checks:[],typeName:rt.ZodBigInt,coerce:e?.coerce??!1,...mt(e)});class sb extends Ot{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ve.boolean){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.boolean,received:r.parsedType}),nt}return Oo(t.data)}}sb.create=e=>new sb({typeName:rt.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class ym extends Ot{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ve.date){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.date,received:i.parsedType}),nt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_date}),nt}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),De(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),De(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Mt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ym({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ge.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}}ym.create=e=>new ym({checks:[],coerce:e?.coerce||!1,typeName:rt.ZodDate,...mt(e)});class AC extends Ot{_parse(t){if(this._getType(t)!==Ve.symbol){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.symbol,received:r.parsedType}),nt}return Oo(t.data)}}AC.create=e=>new AC({typeName:rt.ZodSymbol,...mt(e)});class IC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.undefined,received:r.parsedType}),nt}return Oo(t.data)}}IC.create=e=>new IC({typeName:rt.ZodUndefined,...mt(e)});class NC extends Ot{_parse(t){if(this._getType(t)!==Ve.null){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.null,received:r.parsedType}),nt}return Oo(t.data)}}NC.create=e=>new NC({typeName:rt.ZodNull,...mt(e)});class kC extends Ot{constructor(){super(...arguments),this._any=!0}_parse(t){return Oo(t.data)}}kC.create=e=>new kC({typeName:rt.ZodAny,...mt(e)});class MC extends Ot{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Oo(t.data)}}MC.create=e=>new MC({typeName:rt.ZodUnknown,...mt(e)});class Gs extends Ot{_parse(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.never,received:n.parsedType}),nt}}Gs.create=e=>new Gs({typeName:rt.ZodNever,...mt(e)});class PC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.void,received:r.parsedType}),nt}return Oo(t.data)}}PC.create=e=>new PC({typeName:rt.ZodVoid,...mt(e)});class ia extends Ot{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ve.array)return De(n,{code:Ne.invalid_type,expected:Ve.array,received:n.parsedType}),nt;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(De(n,{code:l?Ne.too_big:Ne.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?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&&(De(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&&(De(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((l,u)=>a.type._parseAsync(new Hs(n,l,n.path,u)))).then(l=>ro.mergeArray(r,l));const i=[...n.data].map((l,u)=>a.type._parseSync(new Hs(n,l,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ia({...this._def,minLength:{value:t,message:Ge.toString(n)}})}max(t,n){return new ia({...this._def,maxLength:{value:t,message:Ge.toString(n)}})}length(t,n){return new ia({...this._def,exactLength:{value:t,message:Ge.toString(n)}})}nonempty(t){return this.min(1,t)}}ia.create=(e,t)=>new ia({type:e,minLength:null,maxLength:null,exactLength:null,typeName:rt.ZodArray,...mt(t)});function Gl(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zs.create(Gl(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof ia?new ia({...e._def,type:Gl(e.element)}):e instanceof zs?zs.create(Gl(e.unwrap())):e instanceof mc?mc.create(Gl(e.unwrap())):e instanceof $i?$i.create(e.items.map(t=>Gl(t))):e}class Pn extends Ot{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=Mt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ve.object){const f=this._getOrReturnCtx(t);return De(f,{code:Ne.invalid_type,expected:Ve.object,received:f.parsedType}),nt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Gs&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Hs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Gs){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&&(De(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 Hs(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 Ge.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:Ge.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:rt.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 Mt.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 Mt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}deepPartial(){return Gl(this)}partial(t){const n={};for(const r of Mt.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 Mt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof zs;)i=i._def.innerType;n[r]=i}return new Pn({...this._def,shape:()=>n})}keyof(){return vP(Mt.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Gs.create(),typeName:rt.ZodObject,...mt(t)});Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Gs.create(),typeName:rt.ZodObject,...mt(t)});Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Gs.create(),typeName:rt.ZodObject,...mt(t)});class _m extends Ot{_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 l=i.map(u=>new Ha(u.ctx.common.issues));return De(n,{code:Ne.invalid_union,unionErrors:l}),nt}if(n.common.async)return Promise.all(r.map(async i=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let i;const l=[];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&&l.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=l.map(d=>new Ha(d));return De(n,{code:Ne.invalid_union,unionErrors:u}),nt}}get options(){return this._def.options}}_m.create=(e,t)=>new _m({options:e,typeName:rt.ZodUnion,...mt(t)});function ib(e,t){const n=Is(e),r=Is(t);if(e===t)return{valid:!0,data:e};if(n===Ve.object&&r===Ve.object){const a=Mt.objectKeys(t),i=Mt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of i){const d=ib(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ve.array&&r===Ve.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const l=e[i],u=t[i],d=ib(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ve.date&&r===Ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class bm extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,l)=>{if(TC(i)||TC(l))return nt;const u=ib(i.value,l.value);return u.valid?((OC(i)||OC(l))&&n.dirty(),{status:n.value,value:u.data}):(De(r,{code:Ne.invalid_intersection_types}),nt)};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,l])=>a(i,l)):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}))}}bm.create=(e,t,n)=>new bm({left:e,right:t,typeName:rt.ZodIntersection,...mt(n)});class $i extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.array)return De(r,{code:Ne.invalid_type,expected:Ve.array,received:r.parsedType}),nt;if(r.data.length<this._def.items.length)return De(r,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),nt;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new Hs(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(i).then(l=>ro.mergeArray(n,l)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new $i({...this._def,rest:t})}}$i.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $i({items:e,typeName:rt.ZodTuple,rest:null,...mt(t)})};class DC extends Ot{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!==Ve.map)return De(r,{code:Ne.invalid_type,expected:Ve.map,received:r.parsedType}),nt;const a=this._def.keyType,i=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new Hs(r,u,r.path,[f,"key"])),value:i._parse(new Hs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(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 l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}DC.create=(e,t,n)=>new DC({valueType:t,keyType:e,typeName:rt.ZodMap,...mt(n)});class pd extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.set)return De(r,{code:Ne.invalid_type,expected:Ve.set,received:r.parsedType}),nt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(De(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&&(De(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 l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return nt;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 Hs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new pd({...this._def,minSize:{value:t,message:Ge.toString(n)}})}max(t,n){return new pd({...this._def,maxSize:{value:t,message:Ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pd.create=(e,t)=>new pd({valueType:e,minSize:null,maxSize:null,typeName:rt.ZodSet,...mt(t)});class LC extends Ot{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})}}LC.create=(e,t)=>new LC({getter:e,typeName:rt.ZodLazy,...mt(t)});class jC extends Ot{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return De(n,{received:n.data,code:Ne.invalid_literal,expected:this._def.value}),nt}return{status:"valid",value:t.data}}get value(){return this._def.value}}jC.create=(e,t)=>new jC({value:e,typeName:rt.ZodLiteral,...mt(t)});function vP(e,t){return new hc({values:e,typeName:rt.ZodEnum,...mt(t)})}class hc extends Ot{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{expected:Mt.joinValues(r),received:n.parsedType,code:Ne.invalid_type}),nt}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 De(n,{received:n.data,code:Ne.invalid_enum_value,options:r}),nt}return Oo(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 hc.create(t,{...this._def,...n})}exclude(t,n=this._def){return hc.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}hc.create=vP;class $C extends Ot{_parse(t){const n=Mt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ve.string&&r.parsedType!==Ve.number){const a=Mt.objectValues(n);return De(r,{expected:Mt.joinValues(a),received:r.parsedType,code:Ne.invalid_type}),nt}if(this._cache||(this._cache=new Set(Mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Mt.objectValues(n);return De(r,{received:r.data,code:Ne.invalid_enum_value,options:a}),nt}return Oo(t.data)}get enum(){return this._def.values}}$C.create=(e,t)=>new $C({values:e,typeName:rt.ZodNativeEnum,...mt(t)});class wm extends Ot{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ve.promise&&n.common.async===!1)return De(n,{code:Ne.invalid_type,expected:Ve.promise,received:n.parsedType}),nt;const r=n.parsedType===Ve.promise?n.data:Promise.resolve(n.data);return Oo(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}wm.create=(e,t)=>new wm({type:e,typeName:rt.ZodPromise,...mt(t)});class pc extends Ot{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===rt.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:l=>{De(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const l=a.transform(r.data,i);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return nt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?nt:d.status==="dirty"||n.value==="dirty"?ju(d.value):d});{if(n.value==="aborted")return nt;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?nt:u.status==="dirty"||n.value==="dirty"?ju(u.value):u}}if(a.type==="refinement"){const l=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"?nt:(u.status==="dirty"&&n.dirty(),l(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"?nt:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fc(l))return nt;const u=a.transform(l.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(l=>fc(l)?Promise.resolve(a.transform(l.value,i)).then(u=>({status:n.value,value:u})):nt);Mt.assertNever(a)}}pc.create=(e,t,n)=>new pc({schema:e,typeName:rt.ZodEffects,effect:t,...mt(n)});pc.createWithPreprocess=(e,t,n)=>new pc({schema:t,effect:{type:"preprocess",transform:e},typeName:rt.ZodEffects,...mt(n)});class zs extends Ot{_parse(t){return this._getType(t)===Ve.undefined?Oo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zs.create=(e,t)=>new zs({innerType:e,typeName:rt.ZodOptional,...mt(t)});class mc extends Ot{_parse(t){return this._getType(t)===Ve.null?Oo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}mc.create=(e,t)=>new mc({innerType:e,typeName:rt.ZodNullable,...mt(t)});class lb extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}lb.create=(e,t)=>new lb({innerType:e,typeName:rt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class cb extends Ot{_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 vm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ha(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ha(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}cb.create=(e,t)=>new cb({innerType:e,typeName:rt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class UC extends Ot{_parse(t){if(this._getType(t)!==Ve.nan){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.nan,received:r.parsedType}),nt}return{status:"valid",value:t.data}}}UC.create=e=>new UC({typeName:rt.ZodNaN,...mt(e)});class Vne extends Ot{_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 X1 extends Ot{_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"?nt:i.status==="dirty"?(n.dirty(),ju(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"?nt: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 X1({in:t,out:n,typeName:rt.ZodPipeline})}}class ub extends Ot{_parse(t){const n=this._def.innerType._parse(t),r=a=>(fc(a)&&(a.value=Object.freeze(a.value)),a);return vm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}ub.create=(e,t)=>new ub({innerType:e,typeName:rt.ZodReadonly,...mt(t)});var rt;(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"})(rt||(rt={}));const Fne=Ps.create,Bne=sb.create;Gs.create;ia.create;const qne=Pn.create;_m.create;bm.create;$i.create;const Hne=hc.create;wm.create;zs.create;mc.create;const Gne=qne({path:Fne().optional().default(""),flat:Bne().optional().default(!1),view:Hne(["table","grid"]).optional().default("grid")}),Zne=mne(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>Jt(()=>import("./file-browser-C4JlHX7p.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,18]))),validateSearch:Gne})]}),Kne=A.lazy(()=>Jt(()=>import("./plugin-header-COGg6PEu.js"),__vite__mapDeps([19,7,20]))),Wne=A.lazy(()=>Jt(()=>import("./plugin-empty-state-BpFO_GZ3.js"),[])),Yne={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:pne,renderHeader:e=>x.jsx(Kne,{...e}),renderEmptyState:()=>x.jsx(Wne,{}),setup:e=>{const{registerSidebarGroup:t,registerPluginRoutes:n}=e;t({id:"object-storage",label:"Object Storage",items:[{icon:x.jsx(pP,{size:16}),label:"File browser"}],defaultExpanded:!0});const r=Zne.createRoutes(e);n(r)}},Qne="user-sandbox",Xne="Create embeddable integration flows for platform end-users";var Jne=(e,t,n,r,a,i,l,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=l&&y==="system"?g():y;m(w)}catch{}},ere=A.createContext(void 0),tre={setTheme:e=>{},themes:[]},moe=()=>{var e;return(e=A.useContext(ere))!=null?e:tre};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:l,themes:u,nonce:d,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,u,l,r,a]).slice(1,-1);return A.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${Jne.toString()})(${m})`}})});const Sm="org-admin",nre={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]===Sm},adminProject(e){return`${e}/${Sm}`}},yP=A.createContext(void 0),goe=()=>{const e=A.useContext(yP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},voe=e=>{const t=gc.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=nre.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const l=i;let u;t[3]!==l||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:l},t[3]=l,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(yP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},rre=ce({authorizationEndpoint:D().url(),tokenEndpoint:D().url(),introspectionEndpoint:D().url().optional(),clientId:D(),clientSecret:D().optional(),scopes:Ee(D()),grantType:$t(["authorization_code","client_credentials"])}),ore=ce({title:D().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),are=ce({name:D(),description:D().optional(),inputSchema:Et(D(),_t()),outputSchema:Et(D(),_t()).optional(),annotations:ore.optional(),_meta:Et(D(),_t()).optional()}),sre=ce({headers:Et(D(),D()).optional()}),ire=ce({command:D().describe("Command to run (e.g., 'npx', 'node')"),args:Ee(D()).optional().describe("Command arguments"),cwd:D().optional().describe("Working directory"),envVars:Et(D(),D()).optional().describe("Environment variables (encrypted in storage)")}),_P=ce({id:D().describe("Unique identifier for the connection"),title:D().describe("Human-readable name for the connection"),created_at:D().describe("When the connection was created"),updated_at:D().describe("When the connection was last updated"),created_by:D().describe("User ID who created the connection"),updated_by:D().optional().describe("User ID who last updated the connection"),organization_id:D().describe("Organization ID this connection belongs to"),description:D().nullable().describe("Description of the connection"),icon:D().nullable().describe("Icon URL for the connection"),app_name:D().nullable().describe("Associated app name"),app_id:D().nullable().describe("Associated app ID"),connection_type:$t(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:D().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:D().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:Lt([ire,sre]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:rre.nullable().describe("OAuth configuration"),configuration_state:Et(D(),_t()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:Ee(D()).nullable().optional().describe("Configuration scopes"),metadata:Et(D(),_t()).nullable().describe("Additional metadata (includes repository info)"),tools:Ee(are).nullable().describe("Discovered tools from MCP"),bindings:Ee(D()).nullable().describe("Detected bindings"),status:$t(["active","inactive","error"]).describe("Current status")});_P.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});_P.partial();function yoe(e){return e!=null&&"command"in e}function _oe(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const $u=ce({connection_id:D().describe("Connection ID"),selected_tools:Ee(D()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:Ee(D()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:Ee(D()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),bP=$u.extend({selected_tools:$u.shape.selected_tools.optional(),selected_resources:$u.shape.selected_resources.optional(),selected_prompts:$u.shape.selected_prompts.optional()}),boe=ce({id:D().describe("Unique identifier for the virtual MCP"),title:D().describe("Human-readable name for the virtual MCP"),description:D().nullable().describe("Description of the virtual MCP"),icon:D().nullable().describe("Icon URL for the virtual MCP"),created_at:D().describe("When the virtual MCP was created"),updated_at:D().describe("When the virtual MCP was last updated"),created_by:D().describe("User ID who created the virtual MCP"),updated_by:D().optional().describe("User ID who last updated the virtual MCP"),organization_id:D().describe("Organization ID this virtual MCP belongs to"),status:$t(["active","inactive"]).describe("Current status"),metadata:ce({instructions:D().nullable().describe("MCP server instructions")}).loose().describe("Additional metadata including MCP server instructions"),connections:Ee($u).describe("Connections with their selected tools, resources, and prompts")});ce({title:D().min(1).max(255).describe("Name for the virtual MCP"),description:D().nullable().optional().describe("Optional description"),icon:D().nullable().optional().describe("Optional icon URL"),status:$t(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:ce({instructions:D().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Ee(bP).describe("Connections to include/exclude (can be empty for exclusion mode)")});ce({title:D().min(1).max(255).optional().describe("New name"),description:D().nullable().optional().describe("New description (null to clear)"),icon:D().nullable().optional().describe("New icon URL (null to clear)"),status:$t(["active","inactive"]).optional().describe("New status"),metadata:ce({instructions:D().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Ee(bP).optional().describe("New connections (replaces existing)")});var zC;(function(e){e.Completable="McpCompletable"})(zC||(zC={}));const lre=[],cre={id:Qne,description:Xne,binding:lre},ure=[Yne,cre],Bi=eL({component:()=>x.jsx(nQ,{children:x.jsx(A.Suspense,{fallback:x.jsx(S4,{}),children:x.jsx(wA,{})})})}),dre=en({getParentRoute:()=>Bi,path:"/login",component:un(()=>Jt(()=>import("./login-CQ4DI182.js"),__vite__mapDeps([21,18,4,5,22]))),validateSearch:ua(()=>ce({next:D().optional(),client_id:D().optional(),redirect_uri:D().optional(),response_type:D().optional(),state:D().optional(),scope:D().optional(),code_challenge:D().optional(),code_challenge_method:D().optional()}))}),fre=en({getParentRoute:()=>Bi,path:"/auth/$pathname",component:un(()=>Jt(()=>import("./auth-catchall-Ddtu2gr8.js"),[]))}),hre=en({getParentRoute:()=>Bi,path:"/connect/$sessionId",component:un(()=>Jt(()=>import("./connect-B1f578pl.js"),__vite__mapDeps([23,24,18,4,5,25,26,27])))}),pre=en({getParentRoute:()=>Bi,path:"/store/$appName",component:un(()=>Jt(()=>import("./store-invite-DE3oTPEQ.js"),[])),validateSearch:ua(()=>ce({serverName:D().optional()}))}),mre=en({getParentRoute:()=>Bi,path:"/oauth/callback",component:un(()=>Jt(()=>import("./oauth-callback-DwNVkFW_.js"),__vite__mapDeps([28,15,26])))}),sg=en({getParentRoute:()=>Bi,id:"shell",component:un(()=>Jt(()=>import("./shell-layout-j0caJ6cv.js"),__vite__mapDeps([29,30,5,31,32,33,34,35,18,36,37,38,24,39,3,40,4,22,41,42,43,7,20,44,45,12,46,47,48,49,50,51,52,53,54,8,55,56,57,9,58,59,60,61,62,16,63,64,65,66,67,68,69,70,13,71,72,73,74,75,76,77,78,79,80,1,81,82,83,84])))}),gre=en({getParentRoute:()=>sg,path:"/",component:un(()=>Jt(()=>import("./home-D9pqYJxL.js"),__vite__mapDeps([85,25,5,73,8,7,67,48,75,4,22,77,78,53,54,49,18])))}),vre=en({getParentRoute:()=>sg,path:"/$org",beforeLoad:({params:e})=>{throw bb({to:"/$org/$project",params:{org:e.org,project:Sm}})}}),Rr=en({getParentRoute:()=>sg,path:"/$org/$project",component:un(()=>Jt(()=>import("./project-layout-D_GhuXhx.js"),__vite__mapDeps([86,71,24,33,4,5])))}),yre=en({getParentRoute:()=>Rr,path:"/",component:un(()=>Jt(()=>import("./page-BYKRtBSp.js"),__vite__mapDeps([87,30,5,31,32,33,34,35,18,36,37,38,24,39,3,40,4,22,41,42,43,7,20,44,45,12,46,47,48,49,50,51,52,53,54,8,55,56,57,9,58,59,60,61,62,16,63,64,66,65,88,67,89])))}),_re=en({getParentRoute:()=>Rr,path:"/tasks",component:un(()=>Jt(()=>import("./tasks-B5becd8b.js"),__vite__mapDeps([90,61,5,65,91,9,70])))}),bre=en({getParentRoute:()=>Rr,path:"/settings",component:un(()=>Jt(()=>import("./project-settings-YCZbbN-X.js"),__vite__mapDeps([92,65,5,91,9,18,33,4,22,69,53,54,24,79,35,37,38,93,94,95,96,97,62,15,67,42,43,7,20,17,31,78])))}),Ya=({params:e})=>{if(e.project!==Sm)throw bb({to:"/$org/$project",params:{org:e.org,project:e.project}})},wre=en({getParentRoute:()=>Rr,path:"/projects",beforeLoad:Ya,component:un(()=>Jt(()=>import("./projects-list-DK4ua0bt.js"),__vite__mapDeps([98,71,24,33,65,5,99,15,48,22,73,100,101,61,68,18,52,31,4,53,54,69,7,91,9])))}),Sre=en({getParentRoute:()=>Rr,path:"/members",beforeLoad:Ya,component:un(()=>Jt(()=>import("./members-DP31FB6R.js"),__vite__mapDeps([102,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,65,91,6,35,18,33,106,107,24,36,37,38,73,63,78,52,31,108,109,67,16,79,61,44,53,54,42,20,69,25,110,75,41])))}),Ere=en({getParentRoute:()=>Rr,path:"/mcps",beforeLoad:Ya,component:un(()=>Jt(()=>import("./connections-DMThZLY2.js"),__vite__mapDeps([111,62,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,112,25,63,8,113,61,44,65,114,73,24,33,72,37,38,97,78,91,52,31,53,54,42,20,69,35,18,115,110,116,59,16,117,67,101]))),validateSearch:ua(()=>ce({action:$t(["create"]).optional()}))}),Rre=en({getParentRoute:()=>Rr,path:"/mcps/$connectionId",beforeLoad:Ya,component:un(()=>Jt(()=>import("./connection-detail-Dc9842ih.js"),__vite__mapDeps([118,61,5,44,4,117,22,67,16,119,50,43,88,80,18,33,15,37,38,120,26,115,24,45,107,35,95,97,94,96,62,93,42,7,20,121,27,30,31,32,34,36,39,3,40,41,12,46,47,48,49,51,52,53,54,8,55,56,57,9,58,59,60,63,64,91,122,123,65,124,103,81,14,104,105,99,25,110,114,73,72,125,74,78,113,116,75,100,101,126,127]))),validateSearch:ua(()=>ce({tab:D().optional()}))}),xre=en({getParentRoute:()=>Rr,path:"/mcps/$connectionId/$collectionName/$itemId",beforeLoad:Ya,component:un(()=>Jt(()=>import("./collection-detail-CVwTrXbU.js"),__vite__mapDeps([128,61,5,44,4,35,18,33,119,50,43,88,80,15,53,54,22,69,123,65,42,7,20,8,60,49,39,3,58,129,75,91,9,120,26,115,24,45,107,37,38,95,97,94,96,62,93,67,121,27,30,31,32,34,36,40,41,12,46,47,48,51,52,55,56,57,59,16,63,64,125,84,104,130,108,131,81]))),validateSearch:ua(()=>ce({replayId:D().optional()}))}),Tre=en({getParentRoute:()=>Rr,path:"/monitoring",beforeLoad:Ya,component:un(()=>Jt(()=>import("./monitoring-CEJjhEzo.js"),__vite__mapDeps([132,99,15,48,22,5,65,91,9,61,44,4,50,43,63,20,41,7,58,10,133,107,129,60,49,105,121,106,39,3,35,18,33,34,12,67,16,6,42,130,69,122,79,54,115,24,57]))),validateSearch:ua(()=>ce({tab:$t(["logs","analytics"]).default("logs"),from:D().default("now-24h"),to:D().default("now"),connectionId:Ee(D()).optional().default([]),virtualMcpId:Ee(D()).optional().default([]),tool:D().default(""),status:$t(["all","success","errors"]).default("all"),search:D().default(""),page:Ze().optional(),streaming:et().default(!0),propertyFilters:D().default(""),hideSystem:et().default(!1)}))}),wP=en({getParentRoute:()=>Rr,path:"/store",beforeLoad:Ya,component:un(()=>Jt(()=>import("./page-UBkAPmC5.js"),__vite__mapDeps([134,65,5,91,9,133,74,15,48,2,3,97,33,35,18,135,99,22,136,50,43,4,116,109,67,59,25,96,41,7,20,75,42,61,37,38,40,24])))}),Ore=en({getParentRoute:()=>wP,path:"/$appName",component:un(()=>Jt(()=>import("./mcp-server-detail-CWlOVXjE.js"),__vite__mapDeps([137,8,15,65,5,50,43,4,113,20,67,81,9,82,61,126,24,45,96,103,55,7,12,14,104,105,99,48,22,25,123,127,122,63,116,136,109,59,91,37,38,35,18,33,115,40,94,95,97,62,135,138]))),validateSearch:ua(()=>ce({registryId:D().optional(),serverName:D().optional(),itemId:D().optional()}))}),Cre=en({getParentRoute:()=>Rr,path:"/agents",beforeLoad:Ya,component:un(()=>Jt(()=>import("./agents-DSOm54r8.js"),__vite__mapDeps([139,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,65,91,112,25,61,44,114,73,24,33,72,64,34,35,18,78,110,16,57,140,101]))),validateSearch:ua(()=>ce({action:$t(["create"]).optional()}))}),Are=en({getParentRoute:()=>Rr,path:"/agents/$agentId",beforeLoad:Ya,component:un(()=>Jt(()=>import("./agent-detail-CNliY0im.js"),__vite__mapDeps([141,32,33,34,35,18,36,37,38,24,39,3,40,4,5,22,41,42,43,7,20,44,45,12,46,47,48,61,50,119,88,80,15,63,79,69,9,11,129,67,89,131,91,123,65,99,6,52,31,115,51,135,58,138,140]))),validateSearch:ua(()=>ce({tab:D().optional()}))}),Ire=en({getParentRoute:()=>Rr,path:"/workflows",component:un(()=>Jt(()=>import("./workflow-COg9B_We.js"),__vite__mapDeps([142,33,124,62,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,25,58,110,56,114,73,24,72,16,125,74,61,95,78,35,18,67,123,65,44,91,37,38,47,76])))}),SP=en({getParentRoute:()=>Rr,path:"/$pluginId",component:un(()=>Jt(()=>import("./dynamic-plugin-layout-C3YR0WSk.js"),__vite__mapDeps([143,15,38,1,24,35,18,33,83,4,5,65])))}),Nre=[],kre=[],EP=[];ure.forEach(e=>{if(!e.setup)return;const t={parentRoute:SP,routing:{createRoute:en,lazyRouteComponent:un},registerRootSidebarItem:n=>Nre.push({pluginId:e.id,...n}),registerSidebarGroup:n=>kre.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{EP.push(...n)}};e.setup(t)});const Mre=SP.addChildren(EP),Pre=wP.addChildren([Ore]),Dre=[yre,_re,bre,wre,Sre,Ere,Rre,xre,Tre,Pre,Cre,Are,Ire,Mre],Lre=Rr.addChildren(Dre),jre=sg.addChildren([gre,vre,Lre]),$re=Bi.addChildren([jre,dre,fre,mre,hre,pre]),Ure=cL({routeTree:$re}),zre=document.getElementById("root");GD.createRoot(zre).render(x.jsx(A.StrictMode,{children:x.jsx(fL,{router:Ure})}));export{ooe as $,ioe as A,GB as B,_P as C,YB as D,eoe as E,WV as F,KB as G,WB as H,ZB as I,toe as J,JC as K,nre as L,Kre as M,Zre as N,Sm as O,voe as P,Lte as Q,QG as R,S4 as S,QB as T,qG as U,boe as V,HG as W,GG as X,ZG as Y,KG as Z,roe as _,Ql as a,tk as a$,aoe as a0,noe as a1,Cm as a2,pn as a3,pP as a4,N5 as a5,RM as a6,TM as a7,u5 as a8,dx as a9,od as aA,AN as aB,Hb as aC,qb as aD,_H as aE,bH as aF,Jre as aG,Xre as aH,Qre as aI,iZ as aJ,lZ as aK,sZ as aL,Am as aM,ure as aN,md as aO,Z0 as aP,Yu as aQ,p5 as aR,or as aS,Lr as aT,r5 as aU,gr as aV,db as aW,bd as aX,ht as aY,nk as aZ,Bo as a_,qre as aa,Bre as ab,S$ as ac,PA as ad,fte as ae,vte as af,hoe as ag,Ci as ah,Hre as ai,Ee as aj,$t as ak,Bn as al,wd as am,lt as an,EZ as ao,mk as ap,Vi as aq,O5 as ar,Tk as as,$s as at,yH as au,Wa as av,Gb as aw,vk as ax,$N as ay,Zb as az,loe as b,yA as b$,qo as b0,Cte as b1,sP as b2,Ga as b3,NH as b4,kH as b5,Ck as b6,Wte as b7,Et as b8,eo as b9,cY as bA,HW as bB,soe as bC,Gre as bD,FV as bE,zV as bF,LV as bG,Ur as bH,BC as bI,b5 as bJ,E5 as bK,C5 as bL,R5 as bM,x5 as bN,I5 as bO,fx as bP,A5 as bQ,T5 as bR,LJ as bS,oP as bT,pt as bU,Cee as bV,Vre as bW,gA as bX,Zs as bY,Fa as bZ,eZ as b_,BI as ba,ar as bb,Ze as bc,Lt as bd,et as be,je as bf,_t as bg,ua as bh,vd as bi,pr as bj,Zne as bk,Jt as bl,Nre as bm,moe as bn,oV as bo,Fre as bp,Er as bq,HV as br,ee as bs,Tte as bt,u7 as bu,Yre as bv,eN as bw,WI as bx,Wre as by,kre as bz,gc as c,oO as c0,tH as c1,Ho as c2,ad as c3,t1 as c4,lc as c5,qs as c6,ca as c7,Go as c8,ak as c9,rH as ca,sH as cb,oH as cc,Hq as cd,foe as ce,coe as d,uoe as e,Om as f,Pj as g,fa as h,yoe as i,x as j,da as k,wA as l,vc as m,ZV as n,ce as o,_oe as p,EN as q,A as r,D as s,vT as t,goe as u,KV as v,pN as w,vF as x,XC as y,y5 as z};
174
+ `&&r++}}return[t,n]}class vC 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(yC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(yC(this),n)}}function zee(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function U_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(U_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${U_(e.cause)}`:e.message:`${e}`}function yC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var lP=e=>{throw TypeError(e)},K1=(e,t,n)=>t.has(e)||lP("Cannot "+n),yt=(e,t,n)=>(K1(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>t.has(e)?lP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ln=(e,t,n,r)=>(K1(e,t,"write to private field"),t.set(e,n),n),za=(e,t,n)=>(K1(e,t,"access private method"),n),$r,Ri,Bl,Ep,um,Ku,Yl,Wu,ks,ql,rc,Hl,Du,Lo,z_,V_,F_,_C,B_,q_,Lu,H_,G_;class Rp extends EventTarget{constructor(t,n){var r,a;super(),zn(this,Lo),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,zn(this,$r),zn(this,Ri),zn(this,Bl),zn(this,Ep),zn(this,um),zn(this,Ku),zn(this,Yl),zn(this,Wu,null),zn(this,ks),zn(this,ql),zn(this,rc,null),zn(this,Hl,null),zn(this,Du,null),zn(this,V_,async i=>{var l;yt(this,ql).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){za(this,Lo,Lu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?ln(this,Bl,new URL(i.url)):ln(this,Bl,void 0),f!==200){za(this,Lo,Lu).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){za(this,Lo,Lu).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(yt(this,$r)===this.CLOSED)return;ln(this,$r,this.OPEN);const p=new Event("open");if((l=yt(this,Du))==null||l.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){za(this,Lo,Lu).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&&yt(this,ql).feed(g.decode(b,{stream:!S})),S&&(w=!1,yt(this,ql).reset(),za(this,Lo,H_).call(this))}while(w)}),zn(this,F_,i=>{ln(this,ks,void 0),!(i.name==="AbortError"||i.type==="aborted")&&za(this,Lo,H_).call(this,U_(i))}),zn(this,B_,i=>{typeof i.id=="string"&&ln(this,Wu,i.id);const l=new MessageEvent(i.event||"message",{data:i.data,origin:yt(this,Bl)?yt(this,Bl).origin:yt(this,Ri).origin,lastEventId:i.id||""});yt(this,Hl)&&(!i.event||i.event==="message")&&yt(this,Hl).call(this,l),this.dispatchEvent(l)}),zn(this,q_,i=>{ln(this,Ku,i)}),zn(this,G_,()=>{ln(this,Yl,void 0),yt(this,$r)===this.CONNECTING&&za(this,Lo,z_).call(this)});try{if(t instanceof URL)ln(this,Ri,t);else if(typeof t=="string")ln(this,Ri,new URL(t,Vee()));else throw new Error("Invalid URL")}catch{throw zee("An invalid or illegal string was specified")}ln(this,ql,iP({onEvent:yt(this,B_),onRetry:yt(this,q_)})),ln(this,$r,this.CONNECTING),ln(this,Ku,3e3),ln(this,um,(r=n?.fetch)!=null?r:globalThis.fetch),ln(this,Ep,(a=n?.withCredentials)!=null?a:!1),za(this,Lo,z_).call(this)}get readyState(){return yt(this,$r)}get url(){return yt(this,Ri).href}get withCredentials(){return yt(this,Ep)}get onerror(){return yt(this,rc)}set onerror(t){ln(this,rc,t)}get onmessage(){return yt(this,Hl)}set onmessage(t){ln(this,Hl,t)}get onopen(){return yt(this,Du)}set onopen(t){ln(this,Du,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(){yt(this,Yl)&&clearTimeout(yt(this,Yl)),yt(this,$r)!==this.CLOSED&&(yt(this,ks)&&yt(this,ks).abort(),ln(this,$r,this.CLOSED),ln(this,ks,void 0))}}$r=new WeakMap,Ri=new WeakMap,Bl=new WeakMap,Ep=new WeakMap,um=new WeakMap,Ku=new WeakMap,Yl=new WeakMap,Wu=new WeakMap,ks=new WeakMap,ql=new WeakMap,rc=new WeakMap,Hl=new WeakMap,Du=new WeakMap,Lo=new WeakSet,z_=function(){ln(this,$r,this.CONNECTING),ln(this,ks,new AbortController),yt(this,um)(yt(this,Ri),za(this,Lo,_C).call(this)).then(yt(this,V_)).catch(yt(this,F_))},V_=new WeakMap,F_=new WeakMap,_C=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...yt(this,Wu)?{"Last-Event-ID":yt(this,Wu)}:void 0},cache:"no-store",signal:(e=yt(this,ks))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},B_=new WeakMap,q_=new WeakMap,Lu=function(e,t){var n;yt(this,$r)!==this.CLOSED&&ln(this,$r,this.CLOSED);const r=new vC("error",{code:t,message:e});(n=yt(this,rc))==null||n.call(this,r),this.dispatchEvent(r)},H_=function(e,t){var n;if(yt(this,$r)===this.CLOSED)return;ln(this,$r,this.CONNECTING);const r=new vC("error",{code:t,message:e});(n=yt(this,rc))==null||n.call(this,r),this.dispatchEvent(r),ln(this,Yl,setTimeout(yt(this,G_),yt(this,Ku)))},G_=new WeakMap,Rp.CONNECTING=0,Rp.OPEN=1,Rp.CLOSED=2;function Vee(){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 dm(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function cP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...dm(t.headers),...dm(r.headers)}:t.headers};return e(n,a)}:e}let W1;W1=globalThis.crypto;async function Fee(e){return(await W1).getRandomValues(new Uint8Array(e))}async function Bee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await Fee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function qee(e){return await Bee(e)}async function Hee(e){const t=await(await W1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Gee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await qee(e),n=await Hee(t);return{code_verifier:t,code_challenge:n}}const rr=b7().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:uz.custom,message:"URL must be parseable",fatal:!0}),E$}).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"}),Zee=ar({resource:D().url(),authorization_servers:Ee(rr).optional(),jwks_uri:D().url().optional(),scopes_supported:Ee(D()).optional(),bearer_methods_supported:Ee(D()).optional(),resource_signing_alg_values_supported:Ee(D()).optional(),resource_name:D().optional(),resource_documentation:D().optional(),resource_policy_uri:D().url().optional(),resource_tos_uri:D().url().optional(),tls_client_certificate_bound_access_tokens:et().optional(),authorization_details_types_supported:Ee(D()).optional(),dpop_signing_alg_values_supported:Ee(D()).optional(),dpop_bound_access_tokens_required:et().optional()}),uP=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,registration_endpoint:rr.optional(),scopes_supported:Ee(D()).optional(),response_types_supported:Ee(D()),response_modes_supported:Ee(D()).optional(),grant_types_supported:Ee(D()).optional(),token_endpoint_auth_methods_supported:Ee(D()).optional(),token_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),service_documentation:rr.optional(),revocation_endpoint:rr.optional(),revocation_endpoint_auth_methods_supported:Ee(D()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),introspection_endpoint:D().optional(),introspection_endpoint_auth_methods_supported:Ee(D()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),code_challenge_methods_supported:Ee(D()).optional(),client_id_metadata_document_supported:et().optional()}),Kee=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,userinfo_endpoint:rr.optional(),jwks_uri:rr,registration_endpoint:rr.optional(),scopes_supported:Ee(D()).optional(),response_types_supported:Ee(D()),response_modes_supported:Ee(D()).optional(),grant_types_supported:Ee(D()).optional(),acr_values_supported:Ee(D()).optional(),subject_types_supported:Ee(D()),id_token_signing_alg_values_supported:Ee(D()),id_token_encryption_alg_values_supported:Ee(D()).optional(),id_token_encryption_enc_values_supported:Ee(D()).optional(),userinfo_signing_alg_values_supported:Ee(D()).optional(),userinfo_encryption_alg_values_supported:Ee(D()).optional(),userinfo_encryption_enc_values_supported:Ee(D()).optional(),request_object_signing_alg_values_supported:Ee(D()).optional(),request_object_encryption_alg_values_supported:Ee(D()).optional(),request_object_encryption_enc_values_supported:Ee(D()).optional(),token_endpoint_auth_methods_supported:Ee(D()).optional(),token_endpoint_auth_signing_alg_values_supported:Ee(D()).optional(),display_values_supported:Ee(D()).optional(),claim_types_supported:Ee(D()).optional(),claims_supported:Ee(D()).optional(),service_documentation:D().optional(),claims_locales_supported:Ee(D()).optional(),ui_locales_supported:Ee(D()).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()}),Wee=ce({...Kee.shape,...uP.pick({code_challenge_methods_supported:!0}).shape}),Yee=ce({access_token:D(),id_token:D().optional(),token_type:D(),expires_in:tN().optional(),scope:D().optional(),refresh_token:D().optional()}).strip(),Qee=ce({error:D(),error_description:D().optional(),error_uri:D().optional()}),bC=rr.optional().or(je("").transform(()=>{})),Xee=ce({redirect_uris:Ee(rr),token_endpoint_auth_method:D().optional(),grant_types:Ee(D()).optional(),response_types:Ee(D()).optional(),client_name:D().optional(),client_uri:rr.optional(),logo_uri:bC,scope:D().optional(),contacts:Ee(D()).optional(),tos_uri:bC,policy_uri:D().optional(),jwks_uri:rr.optional(),jwks:eo().optional(),software_id:D().optional(),software_version:D().optional(),software_statement:D().optional()}).strip(),Jee=ce({client_id:D(),client_secret:D().optional(),client_id_issued_at:Ze().optional(),client_secret_expires_at:Ze().optional()}).strip(),ete=Xee.merge(Jee);ce({error:D(),error_description:D().optional()}).strip();ce({token:D(),token_type_hint:D().optional()}).strip();function tte(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function nte({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 Wn 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 Z_ extends Wn{}Z_.errorCode="invalid_request";class fm extends Wn{}fm.errorCode="invalid_client";class hm extends Wn{}hm.errorCode="invalid_grant";class pm extends Wn{}pm.errorCode="unauthorized_client";class K_ extends Wn{}K_.errorCode="unsupported_grant_type";class W_ extends Wn{}W_.errorCode="invalid_scope";class Y_ extends Wn{}Y_.errorCode="access_denied";class dc extends Wn{}dc.errorCode="server_error";class Q_ extends Wn{}Q_.errorCode="temporarily_unavailable";class X_ extends Wn{}X_.errorCode="unsupported_response_type";class J_ extends Wn{}J_.errorCode="unsupported_token_type";class eb extends Wn{}eb.errorCode="invalid_token";class tb extends Wn{}tb.errorCode="method_not_allowed";class nb extends Wn{}nb.errorCode="too_many_requests";class mm extends Wn{}mm.errorCode="invalid_client_metadata";class rb extends Wn{}rb.errorCode="insufficient_scope";class ob extends Wn{}ob.errorCode="invalid_target";const rte={[Z_.errorCode]:Z_,[fm.errorCode]:fm,[hm.errorCode]:hm,[pm.errorCode]:pm,[K_.errorCode]:K_,[W_.errorCode]:W_,[Y_.errorCode]:Y_,[dc.errorCode]:dc,[Q_.errorCode]:Q_,[X_.errorCode]:X_,[J_.errorCode]:J_,[eb.errorCode]:eb,[tb.errorCode]:tb,[nb.errorCode]:nb,[mm.errorCode]:mm,[rb.errorCode]:rb,[ob.errorCode]:ob};class $o extends Error{constructor(t){super(t??"Unauthorized")}}function ote(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const V0="code",F0="S256";function ate(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&&ote(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 ste(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":ite(a,i,n);return;case"client_secret_post":lte(a,i,r);return;case"none":cte(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function ite(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 lte(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function cte(e,t){t.set("client_id",e)}async function dP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Qee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:l}=r,u=rte[a]||dc;return new u(i||"",l)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new dc(a)}}async function Ci(e,t){try{return await B0(e,t)}catch(n){if(n instanceof fm||n instanceof pm)return await e.invalidateCredentials?.("all"),await B0(e,t);if(n instanceof hm)return await e.invalidateCredentials?.("tokens"),await B0(e,t);throw n}}async function B0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let l,u;try{l=await fte(t,{resourceMetadataUrl:a},i),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await dte(t,e,l),f=await vte(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&&!ute(E))throw new mm(`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 wte(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 bte(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 _te(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 Wn)||b instanceof dc))throw b}const y=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:S}=await yte(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(w),"REDIRECT"}function ute(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function dte(e,t,n){const r=tte(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!nte({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 gm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=q0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const l=q0(e,"scope")||void 0,u=q0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:l,error:u}}function q0(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 fte(e,t,n=fetch){const r=await mte(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 Zee.parse(await r.json())}async function Y1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?Y1(e,void 0,n):void 0;throw r}}function hte(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function wC(e,t,n=fetch){return await Y1(e,{"MCP-Protocol-Version":t},n)}function pte(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function mte(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Xm;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const d=hte(t,a.pathname);l=new URL(d,r?.metadataServerUrl??a),l.search=a.search}let u=await wC(l,i,n);if(!r?.metadataUrl&&pte(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await wC(d,i,n)}return u}function gte(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 vte(e,{fetchFn:t=fetch,protocolVersion:n=Xm}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=gte(e);for(const{url:i,type:l}of a){const u=await Y1(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 ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return l==="oauth"?uP.parse(await u.json()):Wee.parse(await u.json())}}}async function yte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:l}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes(V0))throw new Error(`Incompatible auth server: does not support response type ${V0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(F0))throw new Error(`Incompatible auth server: does not support code challenge method ${F0}`)}else u=new URL("/authorize",e);const d=await Gee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",V0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",F0),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"),l&&u.searchParams.set("resource",l.href),{authorizationUrl:u,codeVerifier:f}}function fP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Q1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:l}){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=ate(r,m);ste(p,r,d,n)}const f=await(l??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await dP(f);return Yee.parse(await f.json())}async function hoe(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:l,addClientAuthentication:u,fetchFn:d}){const f=fP(r,a,i);return Q1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:l,fetchFn:d})}async function _te(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:l}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await Q1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:l});return{refresh_token:r,...d}}async function bte(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const l=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(l)),!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=fP(a,f,e.redirectUrl)}const d=await e.clientInformation();return Q1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function wte(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 dP(i);return ete.parse(await i.json())}class Ste extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class Ete{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=cP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Ci(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 $o;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=dm(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 Rp(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const l=await this._commonHeaders();l.set("Accept","text/event-stream");const u=await t(a,{...i,headers:l});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=gm(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 Ste(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(l){r(l),this.onerror?.(l),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let l;try{l=Zu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(l)}})}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 $o("No auth provider");if(await Ci(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("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:l,scope:u}=gm(a);if(this._resourceMetadataUrl=l,this._scope=u,await Ci(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;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 Rte="mcp";class xte{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,Rte),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=Zu.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 Tte extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=iP({onEvent:l=>{i.enqueue(l)},onError(l){t==="terminate"?i.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const Ote={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class zl extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let Cte=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=cP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Ote}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Ci(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 $o;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=dm(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 zl(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 l,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Tte({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:w}=await m.read();if(w)break;if(y.id&&(l=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const S=Zu.parse(JSON.parse(y.data));Pu(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:l,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:l,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 $o("No auth provider");if(await Ci(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("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:$_(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 l={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,l),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 zl(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:w}=gm(u);if(this._resourceMetadataUrl=y,this._scope=w,await Ci(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:w,error:S}=gm(u);if(S==="insufficient_scope"){const b=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===b)throw new zl(403,"Server returned 403 after trying upscoping");if(w&&(this._scope=w),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=b??void 0,await Ci(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new $o;return this.send(t)}}throw new zl(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),oX(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=>Zu.parse(w)):[Zu.parse(g)];for(const w of y)this.onmessage?.(w)}else throw await u.body?.cancel(),new zl(-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 zl(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 Ate extends Cte{constructor(t,n){super(t,n)}send(t,n){const r=Ite(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Ite(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 Nte extends sP{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},q1,n)}}const kte=async(e,t,n)=>{const r=Mte(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new Nte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,l,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(l),headers:d,signal:u})}}},Mte=(e,t,n)=>{if(e.type==="Websocket")return new xte(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:(l,u)=>fetch(l,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new Ete(new URL(e.url),i)}return new Ate(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},SC=e=>{try{return JSON.parse(e)}catch{return e}},dp=new Map,EC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?pr(e.inputSchema):void 0,outputSchema:e.outputSchema?pr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Pte(e){const t=n=>"connection"in e?kte({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)])return 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"?SC(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"?SC(E):void 0}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function l(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return dp.has(f)||dp.set(f,i()),await dp.get(f)}catch(m){console.error("Failed to list tools",m),dp.delete(f);return}}async function u(){return(await l()??[]).map(f=>EC(f,a))}return a.asTool=async()=>{const f=(await l()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return EC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Dte({connection:n}):global[t]}});function Dte(e){return Pte(e)}const Lte=ce({id:D().describe("Unique identifier for the entity"),title:D().describe("Human-readable title for the entity"),description:D().nullish().describe("Description of the entity"),created_at:D().datetime(),updated_at:D().datetime(),created_by:D().optional(),updated_by:D().optional()}),jte=ce({field:Ee(D()),operator:$t(["eq","gt","gte","lt","lte","in","like","contains"]),value:_t()}),hP=ua(()=>Lt([jte,ce({operator:$t(["and","or","not"]),conditions:Ee(hP)})])),$te=ce({field:Ee(D()),direction:$t(["asc","desc"]),nulls:$t(["first","last"]).optional()}),Ute=ce({where:hP.optional().describe("Filter expression"),orderBy:Ee($te).optional().describe("Sort expressions"),limit:Ze().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ze().int().min(0).optional().describe("Number of items to skip")});function zte(e){return ce({items:Ee(e).describe("Array of collection items"),totalCount:Ze().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:et().optional().describe("Whether there are more items available")})}const Vte=ce({id:D().describe("ID of the entity to retrieve")});function Fte(e){return ce({item:e.nullable().describe("The retrieved item, or null if not found")})}function Bte(e){return ce({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function qte(e){return ce({item:e.describe("The created entity with generated id")})}function Hte(e){return ce({id:D().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function Gte(e){return ce({item:e.describe("The updated entity")})}const Zte=ce({id:D().describe("ID of the entity to delete")});function Kte(e){return ce({item:e.describe("The deleted entity")})}function Wte(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:Ute,outputSchema:zte(t)},{name:`COLLECTION_${r}_GET`,inputSchema:Vte,outputSchema:Fte(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:Bte(t),outputSchema:qte(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:Hte(t),outputSchema:Gte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:Zte,outputSchema:Kte(t),opt:!0}),i}const Yte=ce({id:D(),name:D(),description:D().optional(),inputSchema:Et(D(),_t()),outputSchema:Et(D(),_t()).optional()}),Qte=Lte.extend({_meta:ce({"io.decocms":ce({id:D(),verified:et(),scopeName:D(),appName:D(),friendlyName:D().nullable().optional(),metadata:Et(D(),_t()).nullable().optional(),publishedAt:D().datetime().optional(),updatedAt:D().datetime().optional(),tools:Ee(Yte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:ce({$schema:D().optional(),_meta:Et(D(),_t()).optional(),name:D().describe("The server name (scope/app)"),title:D().optional().describe("User-friendly title"),description:D().optional().describe("Server description"),icons:Ee(ce({src:D(),mimeType:D().optional(),sizes:Ee(D()).optional(),theme:$t(["light","dark"]).optional()})).optional(),remotes:Ee(ce({type:$t(["http","stdio","sse"]),url:D().optional(),headers:Ee(_t()).optional()})).optional(),packages:Ee(_t()).optional(),repository:ce({url:D(),source:D().optional(),subfolder:D().optional()}).optional(),version:D().optional(),websiteUrl:D().optional()})});Wte("registry_app",Qte,{readOnly:!0});const Xte=ce({specversion:je("1.0").describe("CloudEvents specification version"),id:D().describe("Unique identifier for this event (UUID recommended)"),source:D().describe("Connection ID of the event publisher"),type:D().describe("Event type (e.g., 'order.created', 'user.signup')"),time:D().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:D().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:D().optional().default("application/json").describe("Content type of the data attribute"),dataschema:D().url().optional().describe("URI to the schema for the data attribute"),data:_t().optional().describe("Event payload (any JSON value)")});ce({events:Ee(Xte).min(1).describe("Batch of CloudEvents to process")});const Jte=ce({success:et().optional().describe("Whether this event was processed successfully"),error:D().optional().describe("Error message for this event"),retryAfter:Ze().int().positive().optional().describe("Re-deliver this event after this many ms")});ce({success:et().optional().describe("Batch success - applies to events not in results"),error:D().optional().describe("Batch error message - applies to events not in results"),processedCount:Ze().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ze().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Et(D(),Jte).optional().describe("Per-event results keyed by event ID")});ce({type:D().min(1).max(255).describe("Event type identifier"),subject:D().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:_t().optional().describe("Event payload"),deliverAt:D().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:D().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});ce({id:D().describe("Unique event ID"),type:D().describe("Event type"),source:D().describe("Source connection ID"),time:D().describe("Event timestamp")});ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")});ce({subscription:ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:et().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")})});const ene=ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")}),tne=ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:et().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")});ce({subscriptions:Ee(ene).describe("Desired subscriptions - system will create/update/delete to match")});ce({created:Ze().int().min(0).describe("Number of subscriptions created"),updated:Ze().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Ze().int().min(0).describe("Number of subscriptions removed"),unchanged:Ze().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:Ee(tne).describe("Current subscriptions after sync")});ce({subscriptionId:D().describe("Subscription ID to remove")});ce({success:et().describe("Whether unsubscribe was successful"),subscriptionId:D().describe("Subscription ID that was removed")});ce({eventId:D().describe("Event ID to cancel")});ce({success:et().describe("Whether cancellation was successful"),eventId:D().describe("Event ID that was cancelled")});ce({eventId:D().describe("Event ID to acknowledge")});ce({success:et().describe("Whether ACK was successful"),eventId:D().describe("Event ID that was acknowledged")});const nne=ce({prefix:D().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ze().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:D().optional().describe("Token for pagination from previous response"),delimiter:D().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),rne=ce({objects:Ee(ce({key:D().describe("Object key/path"),size:Ze().describe("Object size in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object")})),nextContinuationToken:D().optional().describe("Token for fetching next page of results"),isTruncated:et().describe("Whether there are more results available"),commonPrefixes:Ee(D()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),one=ce({key:D().describe("Object key/path to get metadata for")}),ane=ce({contentType:D().optional().describe("MIME type of the object"),contentLength:Ze().describe("Size of the object in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object"),metadata:Et(D(),D()).optional().describe("Custom metadata key-value pairs")}),sne=ce({key:D().describe("Object key/path to generate URL for"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),ine=ce({url:D().describe("Presigned URL for downloading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),lne=ce({key:D().describe("Object key/path for the upload"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:D().optional().describe("MIME type for the object being uploaded")}),cne=ce({url:D().describe("Presigned URL for uploading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),une=ce({key:D().describe("Object key/path to delete")}),dne=ce({success:et().describe("Whether the deletion was successful"),key:D().describe("The key that was deleted")}),fne=ce({keys:Ee(D()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),hne=ce({deleted:Ee(D()).describe("Array of successfully deleted keys"),errors:Ee(ce({key:D(),message:D()})).describe("Array of errors for failed deletions")}),pne=[{name:"LIST_OBJECTS",inputSchema:nne,outputSchema:rne},{name:"GET_OBJECT_METADATA",inputSchema:one,outputSchema:ane},{name:"GET_PRESIGNED_URL",inputSchema:sne,outputSchema:ine},{name:"PUT_PRESIGNED_URL",inputSchema:lne,outputSchema:cne},{name:"DELETE_OBJECT",inputSchema:une,outputSchema:dne},{name:"DELETE_OBJECTS",inputSchema:fne,outputSchema:hne}],pP=({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"}));pP.displayName="Folder";function RC(e,t,n,r){return e?e.startsWith("/")?`/${t}/${n}/${r}${e}`:e:`/${t}/${n}/${r}`}function mne(e){return{createRoutes:e,useParams:t=>Ql({strict:!1}),useSearch:t=>Om({strict:!1}),useNavigate:()=>{const t=vc(),{org:n,project:r,pluginId:a}=Ql({strict:!1});return i=>{const l=RC(i.to,n,r,a);return t({...i,to:l,params:{org:n,project:r,pluginId:a,...i.params}})}},useLocation:()=>hL(),Link:function(n){const{org:r,project:a,pluginId:i}=Ql({strict:!1}),l=RC(n.to,r,a,i);return x.jsx(Am,{...n,to:l,params:{org:r,project:a,pluginId:i,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var Mt;(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 l of a)i[l]=l;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of i)l[u]=a[u];return e.objectValues(l)},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 l in a)Object.prototype.hasOwnProperty.call(a,l)&&i.push(l);return i},e.find=(a,i)=>{for(const l of a)if(i(l))return l},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(l=>typeof l=="string"?`'${l}'`:l).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Mt||(Mt={}));var xC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(xC||(xC={}));const Ve=Mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Is=e=>{switch(typeof e){case"undefined":return Ve.undefined;case"string":return Ve.string;case"number":return Number.isNaN(e)?Ve.nan:Ve.number;case"boolean":return Ve.boolean;case"function":return Ve.function;case"bigint":return Ve.bigint;case"symbol":return Ve.symbol;case"object":return Array.isArray(e)?Ve.array:e===null?Ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ve.promise:typeof Map<"u"&&e instanceof Map?Ve.map:typeof Set<"u"&&e instanceof Set?Ve.set:typeof Date<"u"&&e instanceof Date?Ve.date:Ve.object;default:return Ve.unknown}},Ne=Mt.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 Ha 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 l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof Ha))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Mt.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()}}Ha.create=e=>new Ha(e);const ab=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Mt.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Mt.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Mt.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${Mt.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}"`:Mt.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,Mt.assertNever(e)}return{message:n}};let gne=ab;function vne(){return gne}const yne=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],l={...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(l,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function De(e,t){const n=vne(),r=yne({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ab?void 0:ab].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 nt;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,l=await a.value;r.push({key:i,value:l})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:l}=a;if(i.status==="aborted"||l.status==="aborted")return nt;i.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[i.value]=l.value)}return{status:t.value,value:r}}}const nt=Object.freeze({status:"aborted"}),ju=e=>({status:"dirty",value:e}),Oo=e=>({status:"valid",value:e}),TC=e=>e.status==="aborted",OC=e=>e.status==="dirty",fc=e=>e.status==="valid",vm=e=>typeof Promise<"u"&&e instanceof Promise;var Ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ge||(Ge={}));class Hs{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 CC=(e,t)=>{if(fc(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 Ha(e.common.issues);return this._error=n,this._error}}};function mt(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:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Ot{get description(){return this._def.description}_getType(t){return Is(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Is(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:Is(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vm(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:Is(t)},a=this._parseSync({data:t,path:r.path,parent:r});return CC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Is(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return fc(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=>fc(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:Is(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(vm(a)?a:Promise.resolve(a));return CC(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 l=t(a),u=()=>i.addIssue({code:Ne.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!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 pc({schema:this,typeName:rt.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 zs.create(this,this._def)}nullable(){return mc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return wm.create(this,this._def)}or(t){return _m.create([this,t],this._def)}and(t){return bm.create(this,t,this._def)}transform(t){return new pc({...mt(this._def),schema:this,typeName:rt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new lb({...mt(this._def),innerType:this,defaultValue:n,typeName:rt.ZodDefault})}brand(){return new Vne({typeName:rt.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new cb({...mt(this._def),innerType:this,catchValue:n,typeName:rt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return X1.create(this,t)}readonly(){return ub.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _ne=/^c[^\s-]{8,}$/i,bne=/^[0-9a-z]+$/,wne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Sne=/^[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,Ene=/^[a-z0-9_-]{21}$/i,Rne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xne=/^[-+]?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)?)??$/,Tne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,One="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let H0;const Cne=/^(?:(?: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])$/,Ane=/^(?:(?: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])$/,Ine=/^(([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]))$/,Nne=/^(([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])$/,kne=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mne=/^([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])))",Pne=new RegExp(`^${mP}$`);function gP(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 Dne(e){return new RegExp(`^${gP(e)}$`)}function Lne(e){let t=`${mP}T${gP(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 jne(e,t){return!!((t==="v4"||!t)&&Cne.test(e)||(t==="v6"||!t)&&Ine.test(e))}function $ne(e,t){if(!Rne.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 Une(e,t){return!!((t==="v4"||!t)&&Ane.test(e)||(t==="v6"||!t)&&Nne.test(e))}class Ps extends Ot{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ve.string){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.string,received:i.parsedType}),nt}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),De(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),De(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 l=t.data.length>i.value,u=t.data.length<i.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Tne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"email",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")H0||(H0=new RegExp(One,"u")),H0.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Sne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Ene.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_ne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")bne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")wne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(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),De(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),De(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),De(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),De(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),De(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Lne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Pne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Dne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?xne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?jne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?$ne(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Une(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?kne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Mne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),r.dirty()):Mt.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,...Ge.errToObj(r)})}_addCheck(t){return new Ps({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ge.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,...Ge.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,...Ge.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ge.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ge.errToObj(n)})}nonempty(t){return this.min(1,Ge.errToObj(t))}trim(){return new Ps({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ps({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ps({...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}}Ps.create=e=>new Ps({checks:[],typeName:rt.ZodString,coerce:e?.coerce??!1,...mt(e)});function zne(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(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return i%l/10**a}class fd extends Ot{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)!==Ve.number){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.number,received:i.parsedType}),nt}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?Mt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),De(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),De(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),De(r,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?zne(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),De(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),De(r,{code:Ne.not_finite,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new fd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new fd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ge.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"&&Mt.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)}}fd.create=e=>new fd({checks:[],typeName:rt.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class hd extends Ot{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)!==Ve.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),De(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),De(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),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.bigint,received:n.parsedType}),nt}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new hd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new hd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.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}}hd.create=e=>new hd({checks:[],typeName:rt.ZodBigInt,coerce:e?.coerce??!1,...mt(e)});class sb extends Ot{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ve.boolean){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.boolean,received:r.parsedType}),nt}return Oo(t.data)}}sb.create=e=>new sb({typeName:rt.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class ym extends Ot{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ve.date){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.date,received:i.parsedType}),nt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_date}),nt}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),De(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),De(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Mt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ym({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ge.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}}ym.create=e=>new ym({checks:[],coerce:e?.coerce||!1,typeName:rt.ZodDate,...mt(e)});class AC extends Ot{_parse(t){if(this._getType(t)!==Ve.symbol){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.symbol,received:r.parsedType}),nt}return Oo(t.data)}}AC.create=e=>new AC({typeName:rt.ZodSymbol,...mt(e)});class IC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.undefined,received:r.parsedType}),nt}return Oo(t.data)}}IC.create=e=>new IC({typeName:rt.ZodUndefined,...mt(e)});class NC extends Ot{_parse(t){if(this._getType(t)!==Ve.null){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.null,received:r.parsedType}),nt}return Oo(t.data)}}NC.create=e=>new NC({typeName:rt.ZodNull,...mt(e)});class kC extends Ot{constructor(){super(...arguments),this._any=!0}_parse(t){return Oo(t.data)}}kC.create=e=>new kC({typeName:rt.ZodAny,...mt(e)});class MC extends Ot{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Oo(t.data)}}MC.create=e=>new MC({typeName:rt.ZodUnknown,...mt(e)});class Gs extends Ot{_parse(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.never,received:n.parsedType}),nt}}Gs.create=e=>new Gs({typeName:rt.ZodNever,...mt(e)});class PC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.void,received:r.parsedType}),nt}return Oo(t.data)}}PC.create=e=>new PC({typeName:rt.ZodVoid,...mt(e)});class ia extends Ot{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ve.array)return De(n,{code:Ne.invalid_type,expected:Ve.array,received:n.parsedType}),nt;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(De(n,{code:l?Ne.too_big:Ne.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?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&&(De(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&&(De(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((l,u)=>a.type._parseAsync(new Hs(n,l,n.path,u)))).then(l=>ro.mergeArray(r,l));const i=[...n.data].map((l,u)=>a.type._parseSync(new Hs(n,l,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ia({...this._def,minLength:{value:t,message:Ge.toString(n)}})}max(t,n){return new ia({...this._def,maxLength:{value:t,message:Ge.toString(n)}})}length(t,n){return new ia({...this._def,exactLength:{value:t,message:Ge.toString(n)}})}nonempty(t){return this.min(1,t)}}ia.create=(e,t)=>new ia({type:e,minLength:null,maxLength:null,exactLength:null,typeName:rt.ZodArray,...mt(t)});function Gl(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zs.create(Gl(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof ia?new ia({...e._def,type:Gl(e.element)}):e instanceof zs?zs.create(Gl(e.unwrap())):e instanceof mc?mc.create(Gl(e.unwrap())):e instanceof $i?$i.create(e.items.map(t=>Gl(t))):e}class Pn extends Ot{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=Mt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ve.object){const f=this._getOrReturnCtx(t);return De(f,{code:Ne.invalid_type,expected:Ve.object,received:f.parsedType}),nt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Gs&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Hs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Gs){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&&(De(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 Hs(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 Ge.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:Ge.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:rt.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 Mt.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 Mt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}deepPartial(){return Gl(this)}partial(t){const n={};for(const r of Mt.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 Mt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof zs;)i=i._def.innerType;n[r]=i}return new Pn({...this._def,shape:()=>n})}keyof(){return vP(Mt.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Gs.create(),typeName:rt.ZodObject,...mt(t)});Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Gs.create(),typeName:rt.ZodObject,...mt(t)});Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Gs.create(),typeName:rt.ZodObject,...mt(t)});class _m extends Ot{_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 l=i.map(u=>new Ha(u.ctx.common.issues));return De(n,{code:Ne.invalid_union,unionErrors:l}),nt}if(n.common.async)return Promise.all(r.map(async i=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let i;const l=[];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&&l.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=l.map(d=>new Ha(d));return De(n,{code:Ne.invalid_union,unionErrors:u}),nt}}get options(){return this._def.options}}_m.create=(e,t)=>new _m({options:e,typeName:rt.ZodUnion,...mt(t)});function ib(e,t){const n=Is(e),r=Is(t);if(e===t)return{valid:!0,data:e};if(n===Ve.object&&r===Ve.object){const a=Mt.objectKeys(t),i=Mt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of i){const d=ib(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ve.array&&r===Ve.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const l=e[i],u=t[i],d=ib(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ve.date&&r===Ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class bm extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,l)=>{if(TC(i)||TC(l))return nt;const u=ib(i.value,l.value);return u.valid?((OC(i)||OC(l))&&n.dirty(),{status:n.value,value:u.data}):(De(r,{code:Ne.invalid_intersection_types}),nt)};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,l])=>a(i,l)):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}))}}bm.create=(e,t,n)=>new bm({left:e,right:t,typeName:rt.ZodIntersection,...mt(n)});class $i extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.array)return De(r,{code:Ne.invalid_type,expected:Ve.array,received:r.parsedType}),nt;if(r.data.length<this._def.items.length)return De(r,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),nt;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new Hs(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(i).then(l=>ro.mergeArray(n,l)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new $i({...this._def,rest:t})}}$i.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $i({items:e,typeName:rt.ZodTuple,rest:null,...mt(t)})};class DC extends Ot{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!==Ve.map)return De(r,{code:Ne.invalid_type,expected:Ve.map,received:r.parsedType}),nt;const a=this._def.keyType,i=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new Hs(r,u,r.path,[f,"key"])),value:i._parse(new Hs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(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 l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}DC.create=(e,t,n)=>new DC({valueType:t,keyType:e,typeName:rt.ZodMap,...mt(n)});class pd extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.set)return De(r,{code:Ne.invalid_type,expected:Ve.set,received:r.parsedType}),nt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(De(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&&(De(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 l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return nt;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 Hs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new pd({...this._def,minSize:{value:t,message:Ge.toString(n)}})}max(t,n){return new pd({...this._def,maxSize:{value:t,message:Ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pd.create=(e,t)=>new pd({valueType:e,minSize:null,maxSize:null,typeName:rt.ZodSet,...mt(t)});class LC extends Ot{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})}}LC.create=(e,t)=>new LC({getter:e,typeName:rt.ZodLazy,...mt(t)});class jC extends Ot{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return De(n,{received:n.data,code:Ne.invalid_literal,expected:this._def.value}),nt}return{status:"valid",value:t.data}}get value(){return this._def.value}}jC.create=(e,t)=>new jC({value:e,typeName:rt.ZodLiteral,...mt(t)});function vP(e,t){return new hc({values:e,typeName:rt.ZodEnum,...mt(t)})}class hc extends Ot{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{expected:Mt.joinValues(r),received:n.parsedType,code:Ne.invalid_type}),nt}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 De(n,{received:n.data,code:Ne.invalid_enum_value,options:r}),nt}return Oo(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 hc.create(t,{...this._def,...n})}exclude(t,n=this._def){return hc.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}hc.create=vP;class $C extends Ot{_parse(t){const n=Mt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ve.string&&r.parsedType!==Ve.number){const a=Mt.objectValues(n);return De(r,{expected:Mt.joinValues(a),received:r.parsedType,code:Ne.invalid_type}),nt}if(this._cache||(this._cache=new Set(Mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Mt.objectValues(n);return De(r,{received:r.data,code:Ne.invalid_enum_value,options:a}),nt}return Oo(t.data)}get enum(){return this._def.values}}$C.create=(e,t)=>new $C({values:e,typeName:rt.ZodNativeEnum,...mt(t)});class wm extends Ot{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ve.promise&&n.common.async===!1)return De(n,{code:Ne.invalid_type,expected:Ve.promise,received:n.parsedType}),nt;const r=n.parsedType===Ve.promise?n.data:Promise.resolve(n.data);return Oo(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}wm.create=(e,t)=>new wm({type:e,typeName:rt.ZodPromise,...mt(t)});class pc extends Ot{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===rt.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:l=>{De(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const l=a.transform(r.data,i);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return nt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?nt:d.status==="dirty"||n.value==="dirty"?ju(d.value):d});{if(n.value==="aborted")return nt;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?nt:u.status==="dirty"||n.value==="dirty"?ju(u.value):u}}if(a.type==="refinement"){const l=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"?nt:(u.status==="dirty"&&n.dirty(),l(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"?nt:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fc(l))return nt;const u=a.transform(l.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(l=>fc(l)?Promise.resolve(a.transform(l.value,i)).then(u=>({status:n.value,value:u})):nt);Mt.assertNever(a)}}pc.create=(e,t,n)=>new pc({schema:e,typeName:rt.ZodEffects,effect:t,...mt(n)});pc.createWithPreprocess=(e,t,n)=>new pc({schema:t,effect:{type:"preprocess",transform:e},typeName:rt.ZodEffects,...mt(n)});class zs extends Ot{_parse(t){return this._getType(t)===Ve.undefined?Oo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zs.create=(e,t)=>new zs({innerType:e,typeName:rt.ZodOptional,...mt(t)});class mc extends Ot{_parse(t){return this._getType(t)===Ve.null?Oo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}mc.create=(e,t)=>new mc({innerType:e,typeName:rt.ZodNullable,...mt(t)});class lb extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}lb.create=(e,t)=>new lb({innerType:e,typeName:rt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class cb extends Ot{_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 vm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ha(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ha(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}cb.create=(e,t)=>new cb({innerType:e,typeName:rt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class UC extends Ot{_parse(t){if(this._getType(t)!==Ve.nan){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.nan,received:r.parsedType}),nt}return{status:"valid",value:t.data}}}UC.create=e=>new UC({typeName:rt.ZodNaN,...mt(e)});class Vne extends Ot{_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 X1 extends Ot{_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"?nt:i.status==="dirty"?(n.dirty(),ju(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"?nt: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 X1({in:t,out:n,typeName:rt.ZodPipeline})}}class ub extends Ot{_parse(t){const n=this._def.innerType._parse(t),r=a=>(fc(a)&&(a.value=Object.freeze(a.value)),a);return vm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}ub.create=(e,t)=>new ub({innerType:e,typeName:rt.ZodReadonly,...mt(t)});var rt;(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"})(rt||(rt={}));const Fne=Ps.create,Bne=sb.create;Gs.create;ia.create;const qne=Pn.create;_m.create;bm.create;$i.create;const Hne=hc.create;wm.create;zs.create;mc.create;const Gne=qne({path:Fne().optional().default(""),flat:Bne().optional().default(!1),view:Hne(["table","grid"]).optional().default("grid")}),Zne=mne(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>Jt(()=>import("./file-browser-DBOCTon5.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,18]))),validateSearch:Gne})]}),Kne=A.lazy(()=>Jt(()=>import("./plugin-header-DxKd-JRE.js"),__vite__mapDeps([19,7,20]))),Wne=A.lazy(()=>Jt(()=>import("./plugin-empty-state-CIjn_En1.js"),[])),Yne={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:pne,renderHeader:e=>x.jsx(Kne,{...e}),renderEmptyState:()=>x.jsx(Wne,{}),setup:e=>{const{registerSidebarGroup:t,registerPluginRoutes:n}=e;t({id:"object-storage",label:"Object Storage",items:[{icon:x.jsx(pP,{size:16}),label:"File browser"}],defaultExpanded:!0});const r=Zne.createRoutes(e);n(r)}},Qne="user-sandbox",Xne="Create embeddable integration flows for platform end-users";var Jne=(e,t,n,r,a,i,l,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=l&&y==="system"?g():y;m(w)}catch{}},ere=A.createContext(void 0),tre={setTheme:e=>{},themes:[]},moe=()=>{var e;return(e=A.useContext(ere))!=null?e:tre};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:l,themes:u,nonce:d,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,u,l,r,a]).slice(1,-1);return A.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${Jne.toString()})(${m})`}})});const Sm="org-admin",nre={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]===Sm},adminProject(e){return`${e}/${Sm}`}},yP=A.createContext(void 0),goe=()=>{const e=A.useContext(yP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},voe=e=>{const t=gc.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=nre.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const l=i;let u;t[3]!==l||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:l},t[3]=l,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(yP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},rre=ce({authorizationEndpoint:D().url(),tokenEndpoint:D().url(),introspectionEndpoint:D().url().optional(),clientId:D(),clientSecret:D().optional(),scopes:Ee(D()),grantType:$t(["authorization_code","client_credentials"])}),ore=ce({title:D().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),are=ce({name:D(),description:D().optional(),inputSchema:Et(D(),_t()),outputSchema:Et(D(),_t()).optional(),annotations:ore.optional(),_meta:Et(D(),_t()).optional()}),sre=ce({headers:Et(D(),D()).optional()}),ire=ce({command:D().describe("Command to run (e.g., 'npx', 'node')"),args:Ee(D()).optional().describe("Command arguments"),cwd:D().optional().describe("Working directory"),envVars:Et(D(),D()).optional().describe("Environment variables (encrypted in storage)")}),_P=ce({id:D().describe("Unique identifier for the connection"),title:D().describe("Human-readable name for the connection"),created_at:D().describe("When the connection was created"),updated_at:D().describe("When the connection was last updated"),created_by:D().describe("User ID who created the connection"),updated_by:D().optional().describe("User ID who last updated the connection"),organization_id:D().describe("Organization ID this connection belongs to"),description:D().nullable().describe("Description of the connection"),icon:D().nullable().describe("Icon URL for the connection"),app_name:D().nullable().describe("Associated app name"),app_id:D().nullable().describe("Associated app ID"),connection_type:$t(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:D().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:D().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:Lt([ire,sre]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:rre.nullable().describe("OAuth configuration"),configuration_state:Et(D(),_t()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:Ee(D()).nullable().optional().describe("Configuration scopes"),metadata:Et(D(),_t()).nullable().describe("Additional metadata (includes repository info)"),tools:Ee(are).nullable().describe("Discovered tools from MCP"),bindings:Ee(D()).nullable().describe("Detected bindings"),status:$t(["active","inactive","error"]).describe("Current status")});_P.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});_P.partial();function yoe(e){return e!=null&&"command"in e}function _oe(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const $u=ce({connection_id:D().describe("Connection ID"),selected_tools:Ee(D()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:Ee(D()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:Ee(D()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),bP=$u.extend({selected_tools:$u.shape.selected_tools.optional(),selected_resources:$u.shape.selected_resources.optional(),selected_prompts:$u.shape.selected_prompts.optional()}),boe=ce({id:D().describe("Unique identifier for the virtual MCP"),title:D().describe("Human-readable name for the virtual MCP"),description:D().nullable().describe("Description of the virtual MCP"),icon:D().nullable().describe("Icon URL for the virtual MCP"),created_at:D().describe("When the virtual MCP was created"),updated_at:D().describe("When the virtual MCP was last updated"),created_by:D().describe("User ID who created the virtual MCP"),updated_by:D().optional().describe("User ID who last updated the virtual MCP"),organization_id:D().describe("Organization ID this virtual MCP belongs to"),status:$t(["active","inactive"]).describe("Current status"),metadata:ce({instructions:D().nullable().describe("MCP server instructions")}).loose().describe("Additional metadata including MCP server instructions"),connections:Ee($u).describe("Connections with their selected tools, resources, and prompts")});ce({title:D().min(1).max(255).describe("Name for the virtual MCP"),description:D().nullable().optional().describe("Optional description"),icon:D().nullable().optional().describe("Optional icon URL"),status:$t(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:ce({instructions:D().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Ee(bP).describe("Connections to include/exclude (can be empty for exclusion mode)")});ce({title:D().min(1).max(255).optional().describe("New name"),description:D().nullable().optional().describe("New description (null to clear)"),icon:D().nullable().optional().describe("New icon URL (null to clear)"),status:$t(["active","inactive"]).optional().describe("New status"),metadata:ce({instructions:D().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Ee(bP).optional().describe("New connections (replaces existing)")});var zC;(function(e){e.Completable="McpCompletable"})(zC||(zC={}));const lre=[],cre={id:Qne,description:Xne,binding:lre},ure=[Yne,cre],Bi=eL({component:()=>x.jsx(nQ,{children:x.jsx(A.Suspense,{fallback:x.jsx(S4,{}),children:x.jsx(wA,{})})})}),dre=en({getParentRoute:()=>Bi,path:"/login",component:un(()=>Jt(()=>import("./login-DX4NlTrd.js"),__vite__mapDeps([21,18,4,5,22]))),validateSearch:ua(()=>ce({next:D().optional(),client_id:D().optional(),redirect_uri:D().optional(),response_type:D().optional(),state:D().optional(),scope:D().optional(),code_challenge:D().optional(),code_challenge_method:D().optional()}))}),fre=en({getParentRoute:()=>Bi,path:"/auth/$pathname",component:un(()=>Jt(()=>import("./auth-catchall-CBFb2pC-.js"),[]))}),hre=en({getParentRoute:()=>Bi,path:"/connect/$sessionId",component:un(()=>Jt(()=>import("./connect--hPmG576.js"),__vite__mapDeps([23,24,18,4,5,25,26,27])))}),pre=en({getParentRoute:()=>Bi,path:"/store/$appName",component:un(()=>Jt(()=>import("./store-invite-Bg3OdZwq.js"),[])),validateSearch:ua(()=>ce({serverName:D().optional()}))}),mre=en({getParentRoute:()=>Bi,path:"/oauth/callback",component:un(()=>Jt(()=>import("./oauth-callback-CjSC6FG1.js"),__vite__mapDeps([28,15,26])))}),sg=en({getParentRoute:()=>Bi,id:"shell",component:un(()=>Jt(()=>import("./shell-layout-DlF3XvPK.js"),__vite__mapDeps([29,30,5,31,32,33,34,35,18,36,37,38,24,39,3,40,4,22,41,42,43,7,20,44,45,12,46,47,48,49,50,51,52,53,54,8,55,56,57,9,58,59,60,61,62,16,63,64,65,66,67,68,69,70,13,71,72,73,74,75,76,77,78,79,80,1,81,82,83,84])))}),gre=en({getParentRoute:()=>sg,path:"/",component:un(()=>Jt(()=>import("./home-BIvstm5O.js"),__vite__mapDeps([85,25,5,73,8,7,67,48,75,4,22,77,78,53,54,49,18])))}),vre=en({getParentRoute:()=>sg,path:"/$org",beforeLoad:({params:e})=>{throw bb({to:"/$org/$project",params:{org:e.org,project:Sm}})}}),Rr=en({getParentRoute:()=>sg,path:"/$org/$project",component:un(()=>Jt(()=>import("./project-layout-DOGEQwDl.js"),__vite__mapDeps([86,71,24,33,4,5])))}),yre=en({getParentRoute:()=>Rr,path:"/",component:un(()=>Jt(()=>import("./page-jq7pkske.js"),__vite__mapDeps([87,30,5,31,32,33,34,35,18,36,37,38,24,39,3,40,4,22,41,42,43,7,20,44,45,12,46,47,48,49,50,51,52,53,54,8,55,56,57,9,58,59,60,61,62,16,63,64,66,65,88,67,89])))}),_re=en({getParentRoute:()=>Rr,path:"/tasks",component:un(()=>Jt(()=>import("./tasks-Bl2i_lGW.js"),__vite__mapDeps([90,61,5,65,91,9,70])))}),bre=en({getParentRoute:()=>Rr,path:"/settings",component:un(()=>Jt(()=>import("./project-settings-DPjoRdOS.js"),__vite__mapDeps([92,65,5,91,9,18,33,4,22,69,53,54,24,79,35,37,38,93,94,95,96,97,62,15,67,42,43,7,20,17,31,78])))}),Ya=({params:e})=>{if(e.project!==Sm)throw bb({to:"/$org/$project",params:{org:e.org,project:e.project}})},wre=en({getParentRoute:()=>Rr,path:"/projects",beforeLoad:Ya,component:un(()=>Jt(()=>import("./projects-list-BSPk4OqL.js"),__vite__mapDeps([98,71,24,33,65,5,99,15,48,22,73,100,101,61,68,18,52,31,4,53,54,69,7,91,9])))}),Sre=en({getParentRoute:()=>Rr,path:"/members",beforeLoad:Ya,component:un(()=>Jt(()=>import("./members-BigA6ZKR.js"),__vite__mapDeps([102,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,65,91,6,35,18,33,106,107,24,36,37,38,73,63,78,52,31,108,109,67,16,79,61,44,53,54,42,20,69,25,110,75,41])))}),Ere=en({getParentRoute:()=>Rr,path:"/mcps",beforeLoad:Ya,component:un(()=>Jt(()=>import("./connections-ShazCLrP.js"),__vite__mapDeps([111,62,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,112,25,63,8,113,61,44,65,114,73,24,33,72,37,38,97,78,91,52,31,53,54,42,20,69,35,18,115,110,116,59,16,117,67,101]))),validateSearch:ua(()=>ce({action:$t(["create"]).optional()}))}),Rre=en({getParentRoute:()=>Rr,path:"/mcps/$connectionId",beforeLoad:Ya,component:un(()=>Jt(()=>import("./connection-detail-8nT6j66Y.js"),__vite__mapDeps([118,61,5,44,4,117,22,67,16,119,50,43,88,80,18,33,15,37,38,120,26,115,24,45,107,35,95,97,94,96,62,93,42,7,20,121,27,30,31,32,34,36,39,3,40,41,12,46,47,48,49,51,52,53,54,8,55,56,57,9,58,59,60,63,64,91,122,123,65,124,103,81,14,104,105,99,25,110,114,73,72,125,74,78,113,116,75,100,101,126,127]))),validateSearch:ua(()=>ce({tab:D().optional()}))}),xre=en({getParentRoute:()=>Rr,path:"/mcps/$connectionId/$collectionName/$itemId",beforeLoad:Ya,component:un(()=>Jt(()=>import("./collection-detail-mD5cqpxJ.js"),__vite__mapDeps([128,61,5,44,4,35,18,33,119,50,43,88,80,15,53,54,22,69,123,65,42,7,20,8,60,49,39,3,58,129,75,91,9,120,26,115,24,45,107,37,38,95,97,94,96,62,93,67,121,27,30,31,32,34,36,40,41,12,46,47,48,51,52,55,56,57,59,16,63,64,125,84,104,130,108,131,81]))),validateSearch:ua(()=>ce({replayId:D().optional()}))}),Tre=en({getParentRoute:()=>Rr,path:"/monitoring",beforeLoad:Ya,component:un(()=>Jt(()=>import("./monitoring-cMb0Xapp.js"),__vite__mapDeps([132,99,15,48,22,5,65,91,9,61,44,4,50,43,63,20,41,7,58,10,133,107,129,60,49,105,121,106,39,3,35,18,33,34,12,67,16,6,42,130,69,122,79,54,115,24,57]))),validateSearch:ua(()=>ce({tab:$t(["logs","analytics"]).default("logs"),from:D().default("now-24h"),to:D().default("now"),connectionId:Ee(D()).optional().default([]),virtualMcpId:Ee(D()).optional().default([]),tool:D().default(""),status:$t(["all","success","errors"]).default("all"),search:D().default(""),page:Ze().optional(),streaming:et().default(!0),propertyFilters:D().default(""),hideSystem:et().default(!1)}))}),wP=en({getParentRoute:()=>Rr,path:"/store",beforeLoad:Ya,component:un(()=>Jt(()=>import("./page-BDwNfQ-N.js"),__vite__mapDeps([134,65,5,91,9,133,74,15,48,2,3,97,33,35,18,135,99,22,136,50,43,4,116,109,67,59,25,96,41,7,20,75,42,61,37,38,40,24])))}),Ore=en({getParentRoute:()=>wP,path:"/$appName",component:un(()=>Jt(()=>import("./mcp-server-detail-BZkrf0kt.js"),__vite__mapDeps([137,8,15,65,5,50,43,4,113,20,67,81,9,82,61,126,24,45,96,103,55,7,12,14,104,105,99,48,22,25,123,127,122,63,116,136,109,59,91,37,38,35,18,33,115,40,94,95,97,62,135,138]))),validateSearch:ua(()=>ce({registryId:D().optional(),serverName:D().optional(),itemId:D().optional()}))}),Cre=en({getParentRoute:()=>Rr,path:"/agents",beforeLoad:Ya,component:un(()=>Jt(()=>import("./agents-DUQt1GSW.js"),__vite__mapDeps([139,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,65,91,112,25,61,44,114,73,24,33,72,64,34,35,18,78,110,16,57,140,101]))),validateSearch:ua(()=>ce({action:$t(["create"]).optional()}))}),Are=en({getParentRoute:()=>Rr,path:"/agents/$agentId",beforeLoad:Ya,component:un(()=>Jt(()=>import("./agent-detail-BqrAf6oD.js"),__vite__mapDeps([141,32,33,34,35,18,36,37,38,24,39,3,40,4,5,22,41,42,43,7,20,44,45,12,46,47,48,61,50,119,88,80,15,63,79,69,9,11,129,67,89,131,91,123,65,99,6,52,31,115,51,135,58,138,140]))),validateSearch:ua(()=>ce({tab:D().optional()}))}),Ire=en({getParentRoute:()=>Rr,path:"/workflows",component:un(()=>Jt(()=>import("./workflow-BrBoF9SG.js"),__vite__mapDeps([142,33,124,62,103,4,5,81,9,55,7,12,14,50,43,104,105,99,15,48,22,25,58,110,56,114,73,24,72,16,125,74,61,95,78,35,18,67,123,65,44,91,37,38,47,76])))}),SP=en({getParentRoute:()=>Rr,path:"/$pluginId",component:un(()=>Jt(()=>import("./dynamic-plugin-layout-D9dQ0ajA.js"),__vite__mapDeps([143,15,38,1,24,35,18,33,83,4,5,65])))}),Nre=[],kre=[],EP=[];ure.forEach(e=>{if(!e.setup)return;const t={parentRoute:SP,routing:{createRoute:en,lazyRouteComponent:un},registerRootSidebarItem:n=>Nre.push({pluginId:e.id,...n}),registerSidebarGroup:n=>kre.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{EP.push(...n)}};e.setup(t)});const Mre=SP.addChildren(EP),Pre=wP.addChildren([Ore]),Dre=[yre,_re,bre,wre,Sre,Ere,Rre,xre,Tre,Pre,Cre,Are,Ire,Mre],Lre=Rr.addChildren(Dre),jre=sg.addChildren([gre,vre,Lre]),$re=Bi.addChildren([jre,dre,fre,mre,hre,pre]),Ure=cL({routeTree:$re}),zre=document.getElementById("root");GD.createRoot(zre).render(x.jsx(A.StrictMode,{children:x.jsx(fL,{router:Ure})}));export{ooe as $,ioe as A,GB as B,_P as C,YB as D,eoe as E,WV as F,KB as G,WB as H,ZB as I,toe as J,JC as K,nre as L,Kre as M,Zre as N,Sm as O,voe as P,Lte as Q,QG as R,S4 as S,QB as T,qG as U,boe as V,HG as W,GG as X,ZG as Y,KG as Z,roe as _,Ql as a,Bo as a$,aoe as a0,noe as a1,Cm as a2,pn as a3,pP as a4,N5 as a5,RM as a6,TM as a7,u5 as a8,dx as a9,od as aA,AN as aB,Hb as aC,qb as aD,_H as aE,bH as aF,Jre as aG,Xre as aH,Qre as aI,iZ as aJ,lZ as aK,sZ as aL,Am as aM,ure as aN,md as aO,Z0 as aP,Yu as aQ,p5 as aR,or as aS,Lr as aT,r5 as aU,gr as aV,db as aW,Od as aX,bd as aY,ht as aZ,nk as a_,qre as aa,Bre as ab,S$ as ac,PA as ad,fte as ae,vte as af,hoe as ag,Ci as ah,Hre as ai,Ee as aj,$t as ak,Bn as al,wd as am,lt as an,EZ as ao,mk as ap,Vi as aq,O5 as ar,Tk as as,$s as at,yH as au,Wa as av,Gb as aw,vk as ax,$N as ay,Zb as az,loe as b,eZ as b$,tk as b0,qo as b1,Cte as b2,sP as b3,Ga as b4,NH as b5,kH as b6,Ck as b7,Wte as b8,Et as b9,kre as bA,cY as bB,HW as bC,soe as bD,Gre as bE,FV as bF,zV as bG,LV as bH,Ur as bI,BC as bJ,b5 as bK,E5 as bL,C5 as bM,R5 as bN,x5 as bO,I5 as bP,fx as bQ,A5 as bR,T5 as bS,LJ as bT,oP as bU,pt as bV,Cee as bW,Vre as bX,gA as bY,Zs as bZ,Fa as b_,eo as ba,BI as bb,ar as bc,Ze as bd,Lt as be,et as bf,je as bg,_t as bh,ua as bi,vd as bj,pr as bk,Zne as bl,Jt as bm,Nre as bn,moe as bo,oV as bp,Fre as bq,Er as br,HV as bs,ee as bt,Tte as bu,u7 as bv,Yre as bw,eN as bx,WI as by,Wre as bz,gc as c,yA as c0,oO as c1,tH as c2,Ho as c3,ad as c4,t1 as c5,lc as c6,qs as c7,ca as c8,Go as c9,ak as ca,rH as cb,sH as cc,oH as cd,Hq as ce,foe as cf,coe as d,uoe as e,Om as f,Pj as g,fa as h,yoe as i,x as j,da as k,wA as l,vc as m,ZV as n,ce as o,_oe as p,EN as q,A as r,D as s,vT as t,goe as u,KV as v,pN as w,vF as x,XC as y,y5 as z};