decocms 2.299.0 → 2.300.1
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.
- package/dist/client/assets/{AlertCircle-aQgTv3kr.js → AlertCircle-CtSiN7Dh.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-C_pLc5t-.js → ArrowNarrowLeft-CjMD5YtT.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Bws5ir-q.js → ArrowUpRight-VGEco3p8.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cwc7BvQq.js → CheckCircle-BOjQcSoZ.js} +1 -1
- package/dist/client/assets/{ChevronDown-C4MI00HX.js → ChevronDown-B21GyFLP.js} +1 -1
- package/dist/client/assets/{ChevronRight-DDkghuaf.js → ChevronRight-C7fFXCXU.js} +1 -1
- package/dist/client/assets/{ChevronUp-BjFGxYUb.js → ChevronUp-DLJe-Ifh.js} +1 -1
- package/dist/client/assets/{Container-U4v06cth.js → Container-DVwtR0PY.js} +1 -1
- package/dist/client/assets/{DotsVertical-BCK2nFhn.js → DotsVertical-_1yE4PFi.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C_yQygSO.js → LinkExternal01-BeNjIA73.js} +1 -1
- package/dist/client/assets/{Lock01-rLvN1xbd.js → Lock01-y9D26Lk9.js} +1 -1
- package/dist/client/assets/{Palette-CA95sDHj.js → Palette-xIvgAE_U.js} +1 -1
- package/dist/client/assets/{Play-BlOman6C.js → Play-esUCyQh5.js} +1 -1
- package/dist/client/assets/{Plus-B5soxpbi.js → Plus-8zlfW9Nb.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-onzNEsM4.js → RefreshCcw01-DV-_PfmV.js} +1 -1
- package/dist/client/assets/{SearchMd-fvAW1pa8.js → SearchMd-BgpZuBQH.js} +1 -1
- package/dist/client/assets/{Settings02-Cro6-7q4.js → Settings02-B2DHZxlV.js} +1 -1
- package/dist/client/assets/{Shield01-DtWtqZJ1.js → Shield01-CewVSi37.js} +1 -1
- package/dist/client/assets/{Star01-BHGJRtit.js → Star01-DupDdRAe.js} +1 -1
- package/dist/client/assets/{Sun-C6J9iUe_.js → Sun-B1MYWGMj.js} +1 -1
- package/dist/client/assets/{Tool01-DeRpug6W.js → Tool01-73PH4njb.js} +1 -1
- package/dist/client/assets/{Trash01-BSFNbfe8.js → Trash01-_-2EAUWH.js} +1 -1
- package/dist/client/assets/{User01-C-8Fo7RS.js → User01-DLnrd0WJ.js} +1 -1
- package/dist/client/assets/{Users03-C25Ink_E.js → Users03-CtQ_adLe.js} +1 -1
- package/dist/client/assets/{X-Cf3FFZEE.js → X-DavTUkoo.js} +1 -1
- package/dist/client/assets/{XCircle-CLM44_6-.js → XCircle-BKeTm8Ww.js} +1 -1
- package/dist/client/assets/{XClose-B9H_q-Ab.js → XClose-BpjQA_dF.js} +1 -1
- package/dist/client/assets/{Zap-BQvzqOLx.js → Zap-DT_tBFfJ.js} +1 -1
- package/dist/client/assets/{ZapSquare-CjSpwpWX.js → ZapSquare-BL-_ZEqM.js} +1 -1
- package/dist/client/assets/{accordion-YUzrCziW.js → accordion-pRq2Jalt.js} +1 -1
- package/dist/client/assets/{agent-icon-CyFFhaia.js → agent-icon-DnE1m294.js} +1 -1
- package/dist/client/assets/{agents-list-W7eiHZAH.js → agents-list-BoAFCp78.js} +1 -1
- package/dist/client/assets/ai-providers-CAEYBEbx.js +1 -0
- package/dist/client/assets/{alert-dialog-BRriT9Rx.js → alert-dialog-DvcLf48w.js} +1 -1
- package/dist/client/assets/{auth-catchall-dvNJT_HW.js → auth-catchall-CAJD1PoQ.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dr5BqZcR.js → automation-list-row-DsEcFwqj.js} +1 -1
- package/dist/client/assets/{automations-DThDEBhK.js → automations-0IJqtFMr.js} +1 -1
- package/dist/client/assets/{avatar-DZ7Lcia3.js → avatar-B1YFr91G.js} +1 -1
- package/dist/client/assets/{badge-CNKFpwCQ.js → badge-BnwDLyJj.js} +1 -1
- package/dist/client/assets/{brand-context-FHNmQTmw.js → brand-context-D5_IL-aX.js} +1 -1
- package/dist/client/assets/{card-DVXldwSE.js → card-Hve9iIpZ.js} +1 -1
- package/dist/client/assets/{chat-context-clHOazkR.js → chat-context-C2vjARhO.js} +1 -1
- package/dist/client/assets/{checkbox-EVw79nds.js → checkbox-DmWLCJJH.js} +1 -1
- package/dist/client/assets/{collection-detail-C13v-yoJ.js → collection-detail-D8wvqyeL.js} +1 -1
- package/dist/client/assets/{collection-display-button-BM4OZbbR.js → collection-display-button-CQ2KlZSu.js} +1 -1
- package/dist/client/assets/{collection-search-DoSMDd39.js → collection-search-D_mJKf_N.js} +1 -1
- package/dist/client/assets/{collection-search-DjqZM35U.js → collection-search-DffILLk0.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-jyvgWmq5.js → collection-table-wrapper-fO254CQy.js} +1 -1
- package/dist/client/assets/{collection-tabs-Nu6UZ0Wa.js → collection-tabs-Bcs-_tfj.js} +1 -1
- package/dist/client/assets/{collections-_TpL4Kbd.js → collections-CISD8jzc.js} +1 -1
- package/dist/client/assets/{command-BGK9JNiv.js → command-CsVFknP_.js} +1 -1
- package/dist/client/assets/{connection-card-h503T7yE.js → connection-card-aTu5Xl4N.js} +1 -1
- package/dist/client/assets/{connection-detail-E3ZTKIWY.js → connection-detail-BUr0xwe0.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B5DiwUxU.js → connection-form-helpers-BEHWki2e.js} +1 -1
- package/dist/client/assets/{connections-Ba8EED2x.js → connections-BJwQ4V76.js} +1 -1
- package/dist/client/assets/{constants-lTcLVS5n.js → constants-BwurOShK.js} +1 -1
- package/dist/client/assets/{constants-CiJRSGoE.js → constants-DZ5y4NEu.js} +1 -1
- package/dist/client/assets/{dialog-BRB-AdlQ.js → dialog-BSlhJimL.js} +1 -1
- package/dist/client/assets/{domain-settings-vcc_x35P.js → domain-settings-D65HSgmV.js} +1 -1
- package/dist/client/assets/{drawer-rKfRlJNC.js → drawer-DwurUbp0.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DaYjsctt.js → dropdown-menu-Dn3K1Gpo.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Bs-dtzIc.js → dynamic-plugin-layout-uzPcJgAD.js} +1 -1
- package/dist/client/assets/{empty-state-DpWDEkDd.js → empty-state-B4R6bbr3.js} +1 -1
- package/dist/client/assets/{empty-state-DLaWKneQ.js → empty-state-DbgILpoj.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DIDviCIp.js → extract-connection-data-Bp5NDOhQ.js} +1 -1
- package/dist/client/assets/{features-CE8oBb9H.js → features-MuQDQTKd.js} +1 -1
- package/dist/client/assets/{form-mI6GLCMQ.js → form-DTt4fIHo.js} +1 -1
- package/dist/client/assets/{general-27HuvgYf.js → general-C7YvzevF.js} +1 -1
- package/dist/client/assets/index-B4J1yAvl.css +1 -0
- package/dist/client/assets/{index-Ccm19Owr.js → index-BJz9Oj-t.js} +1 -1
- package/dist/client/assets/{index-B11-oLok.js → index-BTM4S0x-.js} +1 -1
- package/dist/client/assets/{index-D8ZWoKb1.js → index-BZwRn_mX.js} +1 -1
- package/dist/client/assets/index-CKNbLfs9.js +1 -0
- package/dist/client/assets/{index-cC9WxUf7.js → index-COQkJrV6.js} +1 -1
- package/dist/client/assets/{index-BdrUauLh.js → index-CbEM9IOV.js} +1 -1
- package/dist/client/assets/{index-oMBghIJJ.js → index-D1LVHcIe.js} +1 -1
- package/dist/client/assets/{index-BLqORW7O.js → index-D9wcQMm5.js} +1 -1
- package/dist/client/assets/{index-WenLlWbb.js → index-DBY00Q2Z.js} +19 -19
- package/dist/client/assets/{index-C4eEdhdn.js → index-DHKldY3y.js} +1 -1
- package/dist/client/assets/{index-hcEg81hB.js → index-DRnP8Xhy.js} +10 -10
- package/dist/client/assets/{index-CHiZkXhm.js → index-Day-HjXR.js} +1 -1
- package/dist/client/assets/{index-CD-vU91r.js → index-XlHohbXo.js} +1 -1
- package/dist/client/assets/{index-DHZDsons.js → index-h0Ny6VA2.js} +1 -1
- package/dist/client/assets/{index-B3FEpuQw.js → index-uTtq-reU.js} +1 -1
- package/dist/client/assets/{index-B3zZp_Qu.js → index-ygN6PiaU.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DkM0VxlF.js → infiniteQueryObserver-BFZ15R1_.js} +1 -1
- package/dist/client/assets/{input-Cuud93wX.js → input-liZY-axz.js} +1 -1
- package/dist/client/assets/{integration-icon-CsrRg2Lu.js → integration-icon-Cz-seBmA.js} +1 -1
- package/dist/client/assets/{label-Bk3DQN0Y.js → label-CrXFAdsO.js} +1 -1
- package/dist/client/assets/{layout-BtQea4Qg.js → layout-bMTJXFfz.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-CbbipZjJ.js → lean-canvas-recruit-modal-DZ6knxg9.js} +1 -1
- package/dist/client/assets/{login-BgZ8a57W.js → login-CWW3hrOg.js} +1 -1
- package/dist/client/assets/{members-BrEtD2C0.js → members-DKWnDmHd.js} +1 -1
- package/dist/client/assets/{monaco-editor-B5h0xAd0.js → monaco-editor-Cx68yuxi.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-FmuYstq7.js → monitoring-stats-row-BFqk7UYd.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D2JxS3R_.js → oauth-callback-ai-provider-ONRq40Il.js} +1 -1
- package/dist/client/assets/{oauth-callback-BOHYAMsk.js → oauth-callback-nz50ugwL.js} +1 -1
- package/dist/client/assets/{onboarding-Dls-YBag.js → onboarding-CbZyKtbC.js} +1 -1
- package/dist/client/assets/{org-layout-B0WpG86a.js → org-layout-DkS2FRIV.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-fSkxW1jN.js → org-plugin-layout-DnoycXXu.js} +1 -1
- package/dist/client/assets/{pair-CqYfP4a_.js → pair-rqe3skqp.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C3M4-bHq.js → plugin-empty-state-DAJtqa_X.js} +1 -1
- package/dist/client/assets/{plugin-header-Bhl8FTKN.js → plugin-header-DnTysGuR.js} +1 -1
- package/dist/client/assets/{plugin-layout-DOuAk8f9.js → plugin-layout-Zl5kAJLg.js} +1 -1
- package/dist/client/assets/{popover-BWawolwL.js → popover-B6ijC2Zf.js} +1 -1
- package/dist/client/assets/{profile-DKggoElb.js → profile-Wj3GJkbr.js} +1 -1
- package/dist/client/assets/{project-app-view-BTqqbkYN.js → project-app-view-DufFnF1s.js} +1 -1
- package/dist/client/assets/registry-D49ZAHvu.js +2 -0
- package/dist/client/assets/{registry-layout-Bcb0ETu2.js → registry-layout-BvfKYFzg.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B0aP_BYa.js → required-auth-layout-CKQlCfyf.js} +1 -1
- package/dist/client/assets/{reset-password-DAQu9CHm.js → reset-password-4dmtvYgx.js} +1 -1
- package/dist/client/assets/{roles-CV8Id8qK.js → roles-DlsIbipv.js} +1 -1
- package/dist/client/assets/{scroll-area-0g8Z_dWS.js → scroll-area-D_0eTXQI.js} +1 -1
- package/dist/client/assets/{search-input-jyuCy7Ai.js → search-input-CbBz2_I7.js} +1 -1
- package/dist/client/assets/{select-hpzuL2n7.js → select-DwQCWni4.js} +1 -1
- package/dist/client/assets/{select-model-CtHOnPsy.js → select-model-CSzGroxj.js} +1 -1
- package/dist/client/assets/{settings-layout-ClllTp0r.js → settings-layout-D2TzHadG.js} +1 -1
- package/dist/client/assets/{settings-section-DTpTGGC-.js → settings-section-CVNbjkC4.js} +1 -1
- package/dist/client/assets/{shell-layout-B405kN5F.js → shell-layout-BK74oWLU.js} +1 -1
- package/dist/client/assets/{skeleton-B9GboYxM.js → skeleton-DnMJGIDK.js} +1 -1
- package/dist/client/assets/{sso-Dh1NgG1u.js → sso-ByZblLmU.js} +1 -1
- package/dist/client/assets/{store-2uy2qIUV.js → store-D02KrT4m.js} +1 -1
- package/dist/client/assets/store-registry-C02mfQOQ.js +2 -0
- package/dist/client/assets/{switch-CD5xHhwa.js → switch-BwYbkaPM.js} +1 -1
- package/dist/client/assets/{table-Bl-CW2Ey.js → table-dOL69UsN.js} +1 -1
- package/dist/client/assets/{tabs-8bRAvOFB.js → tabs-CGg7lV45.js} +1 -1
- package/dist/client/assets/{task-status-Df19deFg.js → task-status-DAgh3LfT.js} +1 -1
- package/dist/client/assets/{textarea-0ebJKTCS.js → textarea-CkxfQbxI.js} +1 -1
- package/dist/client/assets/{toggle-group-BqrVPEZw.js → toggle-group-C5VhmQig.js} +1 -1
- package/dist/client/assets/{tools-list-1YgWwNhM.js → tools-list-CwM3RxlF.js} +1 -1
- package/dist/client/assets/{tooltip-CGmvkTM6.js → tooltip-CUw8WpYG.js} +1 -1
- package/dist/client/assets/{types-CN-G9hqy.js → types-slR7lXH6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BtZzelvz.js → use-ai-providers-DespFg1Y.js} +1 -1
- package/dist/client/assets/{use-collections-DjbmBbmU.js → use-collections-CDG0ivO9.js} +1 -1
- package/dist/client/assets/{use-connection-CffI5S47.js → use-connection-DDedfw7l.js} +1 -1
- package/dist/client/assets/{use-copy-DNx2iDfI.js → use-copy-Czy0YFNn.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BFp1mbc9.js → use-create-virtual-mcp-Bhi93QNY.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D5TlUkky.js → use-decopilot-events-DkzJQYGR.js} +1 -1
- package/dist/client/assets/{use-delete-connection-O5X9Xo4O.js → use-delete-connection-CG2J3Cjn.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-FZg8WuOv.js → use-infinite-scroll-qjXoMT8U.js} +1 -1
- package/dist/client/assets/{use-list-state-CbWjR069.js → use-list-state-D2VmPCpI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CxZifaYv.js → use-mcp-tools-nd8RTEJZ.js} +1 -1
- package/dist/client/assets/{use-members-CXQMD9Vu.js → use-members-BWz4qY4v.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C0C5E43c.js → use-navigate-to-agent-Dj0boPYr.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Dy4G77my.js → use-org-auth-client-_7iLBAbg.js} +1 -1
- package/dist/client/assets/{use-org-sso-Drj77Zm1.js → use-org-sso-CXTYwYuw.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DmSBxwGY.js → use-organization-roles-BmJJrwum.js} +1 -1
- package/dist/client/assets/{use-organization-settings--1KNcya1.js → use-organization-settings-C516uAxZ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BaBm7Ii1.js → use-registry-connections-BH65PVKK.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BDL4IJ6A.js → use-status-sounds-COJng9ez.js} +1 -1
- package/dist/client/assets/{use-tasks-DF42FEXc.js → use-tasks-BMtiaufW.js} +1 -1
- package/dist/client/assets/{use-view-mode-CBcjjJZG.js → use-view-mode-B3HPjSsa.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CTmQF3FY.js → use-virtual-mcp-Dkco3wCF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-mbgOLEDd.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DZGLPMRe.js +1 -0
- package/dist/client/assets/{user-DNhBNgsY.js → user-BCVAIUhB.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-KbDgQNkg.js → view-mode-toggle-Bbj9P-zr.js} +1 -1
- package/dist/client/assets/{workflow-DZzf5GRI.js → workflow-DZKRFLJh.js} +1 -1
- package/dist/client/assets/workflow-detail-Bm0PdrL9.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/node_modules/ansi-regex/index.d.ts +33 -0
- package/dist/server/node_modules/ansi-regex/index.js +14 -0
- package/dist/server/node_modules/{ansi-styles → ansi-regex}/package.json +20 -13
- package/dist/server/node_modules/ansi-regex/readme.md +66 -0
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-D112U5ed.js +0 -1
- package/dist/client/assets/index-CLgHTXwu.js +0 -1
- package/dist/client/assets/index-DT63_YMm.css +0 -1
- package/dist/client/assets/registry-BOvZQpcE.js +0 -2
- package/dist/client/assets/store-registry-LkT6leWD.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BugVQNDu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CMPA3kQv.js +0 -1
- package/dist/client/assets/workflow-detail-OXlDN5sZ.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
- package/dist/server/node_modules/environment/index.d.ts +0 -74
- package/dist/server/node_modules/environment/index.js +0 -47
- package/dist/server/node_modules/environment/license +0 -9
- package/dist/server/node_modules/environment/package.json +0 -74
- package/dist/server/node_modules/environment/readme.md +0 -94
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +0 -18
- package/dist/server/node_modules/escape-string-regexp/index.js +0 -11
- package/dist/server/node_modules/escape-string-regexp/package.json +0 -43
- package/dist/server/node_modules/escape-string-regexp/readme.md +0 -29
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
- package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
- package/dist/server/node_modules/string-width/index.d.ts +0 -39
- package/dist/server/node_modules/string-width/index.js +0 -82
- package/dist/server/node_modules/string-width/license +0 -9
- package/dist/server/node_modules/string-width/package.json +0 -64
- package/dist/server/node_modules/string-width/readme.md +0 -66
- /package/dist/server/node_modules/{ansi-styles → ansi-regex}/license +0 -0
- /package/dist/server/node_modules/{escape-string-regexp → mimic-fn}/license +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-DnTysGuR.js","assets/ChevronDown-B21GyFLP.js","assets/login-CWW3hrOg.js","assets/input-liZY-axz.js","assets/reset-password-4dmtvYgx.js","assets/shell-layout-BK74oWLU.js","assets/dialog-BSlhJimL.js","assets/X-DavTUkoo.js","assets/required-auth-layout-CKQlCfyf.js","assets/use-tasks-BMtiaufW.js","assets/use-collections-CDG0ivO9.js","assets/constants-DZ5y4NEu.js","assets/use-organization-settings-C516uAxZ.js","assets/use-org-sso-CXTYwYuw.js","assets/Lock01-y9D26Lk9.js","assets/onboarding-CbZyKtbC.js","assets/label-CrXFAdsO.js","assets/Users03-CtQ_adLe.js","assets/CheckCircle-BOjQcSoZ.js","assets/Palette-xIvgAE_U.js","assets/index-CKNbLfs9.js","assets/index-D1LVHcIe.js","assets/tooltip-CUw8WpYG.js","assets/index-BJz9Oj-t.js","assets/agent-icon-DnE1m294.js","assets/AlertCircle-CtSiN7Dh.js","assets/Tool01-73PH4njb.js","assets/XClose-BpjQA_dF.js","assets/RefreshCcw01-DV-_PfmV.js","assets/ArrowNarrowLeft-CjMD5YtT.js","assets/XCircle-BKeTm8Ww.js","assets/ArrowUpRight-VGEco3p8.js","assets/ZapSquare-BL-_ZEqM.js","assets/ChevronRight-C7fFXCXU.js","assets/ChevronUp-DLJe-Ifh.js","assets/DotsVertical-_1yE4PFi.js","assets/Container-DVwtR0PY.js","assets/Star01-DupDdRAe.js","assets/SearchMd-BgpZuBQH.js","assets/LinkExternal01-BeNjIA73.js","assets/Sun-B1MYWGMj.js","assets/Play-esUCyQh5.js","assets/Plus-8zlfW9Nb.js","assets/Settings02-B2DHZxlV.js","assets/Shield01-CewVSi37.js","assets/Trash01-_-2EAUWH.js","assets/User01-DLnrd0WJ.js","assets/Zap-DT_tBFfJ.js","assets/pair-rqe3skqp.js","assets/index-COQkJrV6.js","assets/use-copy-Czy0YFNn.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-slR7lXH6.js","assets/chat-context-C2vjARhO.js","assets/use-virtual-mcp-Dkco3wCF.js","assets/use-ai-providers-DespFg1Y.js","assets/use-decopilot-events-DkzJQYGR.js","assets/create-sse-subscription-CxkOgzKf.js","assets/integration-icon-Cz-seBmA.js","assets/skeleton-DnMJGIDK.js","assets/popover-B6ijC2Zf.js","assets/drawer-DwurUbp0.js","assets/avatar-B1YFr91G.js","assets/alert-dialog-DvcLf48w.js","assets/form-DTt4fIHo.js","assets/index-D9wcQMm5.js","assets/use-mcp-tools-nd8RTEJZ.js","assets/index-DHKldY3y.js","assets/switch-BwYbkaPM.js","assets/use-connection-DDedfw7l.js","assets/lean-canvas-recruit-modal-DZ6knxg9.js","assets/use-navigate-to-agent-Dj0boPYr.js","assets/collection-search-D_mJKf_N.js","assets/checkbox-DmWLCJJH.js","assets/extract-connection-data-Bp5NDOhQ.js","assets/constants-BwurOShK.js","assets/collections-CISD8jzc.js","assets/tabs-CGg7lV45.js","assets/dropdown-menu-Dn3K1Gpo.js","assets/select-DwQCWni4.js","assets/toggle-group-C5VhmQig.js","assets/select-model-CSzGroxj.js","assets/ai-providers-logos-D6a8kmGH.js","assets/settings-section-CVNbjkC4.js","assets/card-Hve9iIpZ.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/index-BTM4S0x-.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-aTu5Xl4N.js","assets/use-registry-connections-BH65PVKK.js","assets/useInfiniteQuery-mbgOLEDd.js","assets/infiniteQueryObserver-BFZ15R1_.js","assets/collection-tabs-Bcs-_tfj.js","assets/badge-BnwDLyJj.js","assets/textarea-CkxfQbxI.js","assets/connection-form-helpers-BEHWki2e.js","assets/use-infinite-scroll-qjXoMT8U.js","assets/useSuspenseInfiniteQuery-DZGLPMRe.js","assets/collection-search-DffILLk0.js","assets/use-create-virtual-mcp-Bhi93QNY.js","assets/empty-state-DbgILpoj.js","assets/task-status-DAgh3LfT.js","assets/index-DBY00Q2Z.js","assets/command-CsVFknP_.js","assets/index-BZwRn_mX.js","assets/use-status-sounds-COJng9ez.js","assets/accordion-pRq2Jalt.js","assets/user-BCVAIUhB.js","assets/tools-list-CwM3RxlF.js","assets/scroll-area-D_0eTXQI.js","assets/view-mode-toggle-Bbj9P-zr.js","assets/automation-list-row-DsEcFwqj.js","assets/search-input-CbBz2_I7.js","assets/index-DDGTF8rc.css","assets/index-Day-HjXR.js","assets/settings-layout-D2TzHadG.js","assets/connections-BJwQ4V76.js","assets/collection-display-button-CQ2KlZSu.js","assets/use-delete-connection-CG2J3Cjn.js","assets/use-list-state-D2VmPCpI.js","assets/use-view-mode-B3HPjSsa.js","assets/connection-detail-BUr0xwe0.js","assets/index-CbEM9IOV.js","assets/index-h0Ny6VA2.js","assets/index-ygN6PiaU.js","assets/use-members-BWz4qY4v.js","assets/use-org-auth-client-_7iLBAbg.js","assets/layout-bMTJXFfz.js","assets/monitoring-stats-row-BFqk7UYd.js","assets/collection-detail-D8wvqyeL.js","assets/index-uTtq-reU.js","assets/monaco-editor-Cx68yuxi.js","assets/empty-state-B4R6bbr3.js","assets/index-XlHohbXo.js","assets/table-dOL69UsN.js","assets/general-C7YvzevF.js","assets/domain-settings-D65HSgmV.js","assets/features-MuQDQTKd.js","assets/brand-context-D5_IL-aX.js","assets/ai-providers-CAEYBEbx.js","assets/members-DKWnDmHd.js","assets/collection-table-wrapper-fO254CQy.js","assets/use-organization-roles-BmJJrwum.js","assets/roles-DlsIbipv.js","assets/sso-ByZblLmU.js","assets/profile-Wj3GJkbr.js","assets/store-D02KrT4m.js","assets/workflow-DZKRFLJh.js","assets/workflow-detail-Bm0PdrL9.js","assets/org-plugin-layout-DnoycXXu.js","assets/plugin-layout-Zl5kAJLg.js","assets/agents-list-BoAFCp78.js","assets/automations-0IJqtFMr.js","assets/dynamic-plugin-layout-uzPcJgAD.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function z$(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const F$="modulepreload",B$=function(e){return"/"+e},X2={},At=function(t,n,r){let i=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 c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=l(n.map(f=>{if(f=B$(f),f in X2)return;X2[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":F$,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var Jae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v_={exports:{}},Bu={};var J2;function V$(){if(J2)return Bu;J2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Bu.Fragment=t,Bu.jsx=n,Bu.jsxs=n,Bu}var eO;function q$(){return eO||(eO=1,v_.exports=V$()),v_.exports}var T=q$(),__={exports:{}},Vu={},y_={exports:{}},b_={};var tO;function H$(){return tO||(tO=1,(function(e){function t(q,W){var ee=q.length;q.push(W);e:for(;0<ee;){var ae=ee-1>>>1,Q=q[ae];if(0<i(Q,W))q[ae]=W,q[ee]=Q,ee=ae;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],ee=q.pop();if(ee!==W){q[0]=ee;e:for(var ae=0,Q=q.length,k=Q>>>1;ae<k;){var K=2*(ae+1)-1,V=q[K],D=K+1,F=q[D];if(0>i(V,ee))D<Q&&0>i(F,V)?(q[ae]=F,q[D]=ee,ae=D):(q[ae]=V,q[K]=ee,ae=K);else if(D<Q&&0>i(F,ee))q[ae]=F,q[D]=ee,ae=D;else break e}}return W}function i(q,W){var ee=q.sortIndex-W.sortIndex;return ee!==0?ee:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],m=1,p=null,g=3,v=!1,y=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,C(q),!y)if(n(d)!==null)y=!0,A||(A=!0,B());else{var W=n(f);W!==null&&re(O,W.startTime-q)}}var A=!1,M=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(M),M=-1),v=!0;var ee=g;try{t:{for(C(q),p=n(d);p!==null&&!(p.expirationTime>q&&H());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var Q=ae(p.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){p.callback=Q,C(q),W=!0;break t}p===n(d)&&r(d),C(q)}else r(d);p=n(d)}if(p!==null)W=!0;else{var k=n(f);k!==null&&re(O,k.startTime-q),W=!1}}break e}finally{p=null,g=ee,v=!1}W=void 0}}finally{W?B():A=!1}}}var B;if(typeof R=="function")B=function(){R(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=j,B=function(){Z.postMessage(null)}}else B=function(){S(j,0)};function re(q,W){M=S(function(){q(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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var ee=g;g=W;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return W()}finally{g=ee}},e.unstable_scheduleCallback=function(q,W,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,q={id:m++,callback:W,priorityLevel:q,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ae?(q.sortIndex=ee,t(f,q),n(d)===null&&q===n(f)&&(b?(E(M),M=-1):b=!0,re(O,ee-ae))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,B()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var ee=g;g=W;try{return q.apply(this,arguments)}finally{g=ee}}}})(b_)),b_}var nO;function G$(){return nO||(nO=1,y_.exports=H$()),y_.exports}var w_={exports:{}},rt={};var rO;function K$(){if(rO)return rt;rO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=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 v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,K,V){this.props=k,this.context=K,this.refs=x,this.updater=V||y}S.prototype.isReactComponent={},S.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,K,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function R(k,K,V){this.props=k,this.context=K,this.refs=x,this.updater=V||y}var C=R.prototype=new E;C.constructor=R,b(C,S.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,K,V){var D=V.ref;return{$$typeof:e,type:k,key:K,ref:D!==void 0?D:null,props:V}}function H(k,K){return L(k.type,K,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function B(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(V){return K[V]})}var U=/\/+/g;function Z(k,K){return typeof k=="object"&&k!==null&&k.key!=null?B(""+k.key):K.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,K,V,D,F){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case m:return fe=k._init,q(fe(k._payload),K,V,D,F)}}if(fe)return F=F(k),fe=D===""?"."+Z(k,0):D,O(F)?(V="",fe!=null&&(V=fe.replace(U,"$&/")+"/"),q(F,K,V,"",function(Ue){return Ue})):F!=null&&(j(F)&&(F=H(F,V+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(U,"$&/")+"/")+fe)),K.push(F)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,K,V,X,F);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,K,V,X,F);else if(X==="object"){if(typeof k.then=="function")return q(re(k),K,V,D,F);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,K,V){if(k==null)return k;var D=[],F=0;return q(k,D,"","",function(X){return K.call(V,X,F++)}),D}function ee(k){if(k._status===-1){var K=k._result;K=K(),K.then(function(V){(k._status===0||k._status===-1)&&(k._status=1,k._result=V)},function(V){(k._status===0||k._status===-1)&&(k._status=2,k._result=V)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,K,V){W(k,function(){K.apply(this,arguments)},V)},count:function(k){var K=0;return W(k,function(){K++}),K},toArray:function(k){return W(k,function(K){return K})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return rt.Activity=p,rt.Children=Q,rt.Component=S,rt.Fragment=n,rt.Profiler=i,rt.PureComponent=R,rt.StrictMode=r,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,rt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},rt.cache=function(k){return function(){return k.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(k,K,V){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),F=k.key;if(K!=null)for(X in K.key!==void 0&&(F=""+K.key),K)!P.call(K,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&K.ref===void 0||(D[X]=K[X]);var X=arguments.length-2;if(X===1)D.children=V;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,F,D)},rt.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},rt.createElement=function(k,K,V){var D,F={},X=null;if(K!=null)for(D in K.key!==void 0&&(X=""+K.key),K)P.call(K,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=K[D]);var fe=arguments.length-2;if(fe===1)F.children=V;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];F.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)F[D]===void 0&&(F[D]=fe[D]);return L(k,X,F)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(k){return{$$typeof:c,render:k}},rt.isValidElement=j,rt.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:ee}},rt.memo=function(k,K){return{$$typeof:f,type:k,compare:K===void 0?null:K}},rt.startTransition=function(k){var K=M.T,V={};M.T=V;try{var D=k(),F=M.S;F!==null&&F(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,ae)}catch(X){ae(X)}finally{K!==null&&V.types!==null&&(K.types=V.types),M.T=K}},rt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},rt.use=function(k){return M.H.use(k)},rt.useActionState=function(k,K,V){return M.H.useActionState(k,K,V)},rt.useCallback=function(k,K){return M.H.useCallback(k,K)},rt.useContext=function(k){return M.H.useContext(k)},rt.useDebugValue=function(){},rt.useDeferredValue=function(k,K){return M.H.useDeferredValue(k,K)},rt.useEffect=function(k,K){return M.H.useEffect(k,K)},rt.useEffectEvent=function(k){return M.H.useEffectEvent(k)},rt.useId=function(){return M.H.useId()},rt.useImperativeHandle=function(k,K,V){return M.H.useImperativeHandle(k,K,V)},rt.useInsertionEffect=function(k,K){return M.H.useInsertionEffect(k,K)},rt.useLayoutEffect=function(k,K){return M.H.useLayoutEffect(k,K)},rt.useMemo=function(k,K){return M.H.useMemo(k,K)},rt.useOptimistic=function(k,K){return M.H.useOptimistic(k,K)},rt.useReducer=function(k,K,V){return M.H.useReducer(k,K,V)},rt.useRef=function(k){return M.H.useRef(k)},rt.useState=function(k){return M.H.useState(k)},rt.useSyncExternalStore=function(k,K,V){return M.H.useSyncExternalStore(k,K,V)},rt.useTransition=function(){return M.H.useTransition()},rt.version="19.2.5",rt}var iO;function ca(){return iO||(iO=1,w_.exports=K$()),w_.exports}var S_={exports:{}},yr={};var oO;function Z$(){if(oO)return yr;oO=1;var e=ca();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},i=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,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 c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yr.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 s(d,f,null,m)},yr.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()}},yr.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))},yr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=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:v}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(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)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=c(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})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=c(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)},yr.requestFormReset=function(d){r.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},yr.useFormStatus=function(){return l.H.useHostTransitionStatus()},yr.version="19.2.5",yr}var sO;function IM(){if(sO)return S_.exports;sO=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(),S_.exports=Z$(),S_.exports}var aO;function Y$(){if(aO)return Vu;aO=1;var e=G$(),t=ca(),n=IM();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,u=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(u=a.return),o=a.return;while(o)}return a.tag===3?u:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function d(o){if(s(o)!==o)throw Error(r(188))}function f(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var u=o,h=a;;){var _=u.return;if(_===null)break;var w=_.alternate;if(w===null){if(h=_.return,h!==null){u=h;continue}break}if(_.child===w.child){for(w=_.child;w;){if(w===u)return d(_),o;if(w===h)return d(_),a;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=_,h=w;else{for(var N=!1,$=_.child;$;){if($===u){N=!0,u=_,h=w;break}if($===h){N=!0,h=_,u=w;break}$=$.sibling}if(!N){for($=w.child;$;){if($===u){N=!0,u=w,h=_;break}if($===h){N=!0,h=w,u=_;break}$=$.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:a}function m(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=m(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function B(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function Z(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 b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case R:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return a=o.displayName||null,a!==null?a:Z(o.type)||"Memo";case P:a=o._payload,o=o._init;try{return Z(o(a))}catch{}}return null}var re=Array.isArray,q=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,ee={pending:!1,data:null,method:null,action:null},ae=[],Q=-1;function k(o){return{current:o}}function K(o){0>Q||(o.current=ae[Q],ae[Q]=null,Q--)}function V(o,a){Q++,ae[Q]=o.current,o.current=a}var D=k(null),F=k(null),X=k(null),fe=k(null);function pe(o,a){switch(V(X,a),V(F,o),V(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?w2(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=w2(a),o=S2(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(D),V(D,o)}function xe(){K(D),K(F),K(X)}function Ue(o){o.memoizedState!==null&&V(fe,o);var a=D.current,u=S2(a,o.type);a!==u&&(V(F,o),V(D,u))}function Y(o){F.current===o&&(K(D),K(F)),fe.current===o&&(K(fe),ju._currentValue=ee)}var te,ve;function se(o){if(te===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",ve=-1<u.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+te+o+ve}var we=!1;function Oe(o,a){if(!o||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var he=ge}Reflect.construct(o,[],Se)}else{try{Se.call()}catch(ge){he=ge}o.call(Se.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Se=o())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),N=w[0],$=w[1];if(N&&$){var J=N.split(`
|
|
@@ -45,7 +45,7 @@ Error generating stack: `+h.message+`
|
|
|
45
45
|
|
|
46
46
|
`)}v.write("payload.value = newResult;"),v.write("return payload;");const E=v.compile();return(R,C)=>E(g,R,C)};let s;const l=Bd,c=!qP.jitless,f=c&&Tz.value,m=t.catchall;let p;e._zod.parse=(g,v)=>{p??(p=r.value);const y=g.value;return l(y)?c&&f&&v?.async===!1&&v.jitless!==!0?(s||(s=i(t.shape)),g=s(g,v),m?sN([],y,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function sT(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const i=e.filter(s=>!bc(s));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(l=>oa(l,r,ia())))}),t)}const aN=_e("$ZodUnion",(e,t)=>{Bt.init(e,t),Ct(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ct(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ct(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ct(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>gw(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,s)=>{if(n)return r(i,s);let l=!1;const c=[];for(const d of t.options){const f=d._zod.run({value:i.value,issues:[]},s);if(f instanceof Promise)c.push(f),l=!0;else{if(f.issues.length===0)return f;c.push(f)}}return l?Promise.all(c).then(d=>sT(d,i,e,s)):sT(c,i,e,s)}}),EF=_e("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,aN.init(e,t);const n=e._zod.parse;Ct(e._zod,"propValues",()=>{const i={};for(const s of t.options){const l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[c,d]of Object.entries(l)){i[c]||(i[c]=new Set);for(const f of d)i[c].add(f)}}return i});const r=Pg(()=>{const i=t.options,s=new Map;for(const l of i){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of c){if(s.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);s.set(d,l)}}return s});e._zod.parse=(i,s)=>{const l=i.value;if(!Bd(l))return i.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),i;const c=r.value.get(l?.[t.discriminator]);return c?c._zod.run(i,s):t.unionFallback?n(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),i)}}),xF=_e("$ZodIntersection",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,s=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([d,f])=>aT(n,d,f)):aT(n,s,l)}});function Rb(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(Lc(e)&&Lc(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),i={...e,...t};for(const s of r){const l=Rb(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};i[s]=l.data}return{valid:!0,data:i}}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 i=e[r],s=t[r],l=Rb(i,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function aT(e,t,n){const r=new Map;let i;for(const c of t.issues)if(c.code==="unrecognized_keys"){i??(i=c);for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(c);const s=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length&&i&&e.issues.push({...i,keys:s}),bc(e))return e;const l=Rb(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 RF=_e("$ZodTuple",(e,t)=>{Bt.init(e,t);const n=t.items;e._zod.parse=(r,i)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const l=[],c=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=c===-1?0:n.length-c;if(!t.rest){const m=s.length>n.length,p=s.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:s,inst:e,origin:"array"}),r}let f=-1;for(const m of n){if(f++,f>=s.length&&f>=d)continue;const p=m._zod.run({value:s[f],issues:[]},i);p instanceof Promise?l.push(p.then(g=>Kh(g,r,f))):Kh(p,r,f)}if(t.rest){const m=s.slice(n.length);for(const p of m){f++;const g=t.rest._zod.run({value:p,issues:[]},i);g instanceof Promise?l.push(g.then(v=>Kh(v,r,f))):Kh(g,r,f)}}return l.length?Promise.all(l).then(()=>r):r}});function Kh(e,t,n){e.issues.length&&t.issues.push(...Ka(n,e.issues)),t.value[n]=e.value}const OF=_e("$ZodRecord",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Lc(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const s=[],l=t.keyType._zod.values;if(l){n.value={};const c=new Set;for(const f of l)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){c.add(typeof f=="number"?f.toString():f);const m=t.valueType._zod.run({value:i[f],issues:[]},r);m instanceof Promise?s.push(m.then(p=>{p.issues.length&&n.issues.push(...Ka(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Ka(f,m.issues)),n.value[f]=m.value)}let d;for(const f in i)c.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:d})}else{n.value={};for(const c of Reflect.ownKeys(i)){if(c==="__proto__")continue;let d=t.keyType._zod.run({value:c,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&JP.test(c)&&d.issues.length){const p=t.keyType._zod.run({value:Number(c),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[c]=i[c]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>oa(p,r,ia())),input:c,path:[c],inst:e});continue}const m=t.valueType._zod.run({value:i[c],issues:[]},r);m instanceof Promise?s.push(m.then(p=>{p.issues.length&&n.issues.push(...Ka(c,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...Ka(c,m.issues)),n.value[d.value]=m.value)}}return s.length?Promise.all(s).then(()=>n):n}}),TF=_e("$ZodEnum",(e,t)=>{Bt.init(e,t);const n=HP(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>Cz.has(typeof i)).map(i=>typeof i=="string"?$c(i):i.toString()).join("|")})$`),e._zod.parse=(i,s)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),CF=_e("$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"?$c(r):r?$c(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),AF=_e("$ZodFile",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),IF=_e("$ZodTransform",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VP(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Tc;return n.value=i,n}});function lT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const lN=_e("$ZodOptional",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ct(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ct(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${gw(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>lT(s,n.value)):lT(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),MF=_e("$ZodExactOptional",(e,t)=>{lN.init(e,t),Ct(e._zod,"values",()=>t.innerType._zod.values),Ct(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),PF=_e("$ZodNullable",(e,t)=>{Bt.init(e,t),Ct(e._zod,"optin",()=>t.innerType._zod.optin),Ct(e._zod,"optout",()=>t.innerType._zod.optout),Ct(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${gw(n.source)}|null)$`):void 0}),Ct(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)}),NF=_e("$ZodDefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",Ct(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 i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>cT(s,t)):cT(i,t)}});function cT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const kF=_e("$ZodPrefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",Ct(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))}),DF=_e("$ZodNonOptional",(e,t)=>{Bt.init(e,t),Ct(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 i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>uT(s,e)):uT(i,e)}});function uT(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 LF=_e("$ZodCatch",(e,t)=>{Bt.init(e,t),Ct(e._zod,"optin",()=>t.innerType._zod.optin),Ct(e._zod,"optout",()=>t.innerType._zod.optout),Ct(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>oa(l,r,ia()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>oa(s,r,ia()))},input:n.value}),n.issues=[]),n)}}),$F=_e("$ZodPipe",(e,t)=>{Bt.init(e,t),Ct(e._zod,"values",()=>t.in._zod.values),Ct(e._zod,"optin",()=>t.in._zod.optin),Ct(e._zod,"optout",()=>t.out._zod.optout),Ct(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(l=>Zh(l,t.in,r)):Zh(s,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(s=>Zh(s,t.out,r)):Zh(i,t.out,r)}});function Zh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const jF=_e("$ZodReadonly",(e,t)=>{Bt.init(e,t),Ct(e._zod,"propValues",()=>t.innerType._zod.propValues),Ct(e._zod,"values",()=>t.innerType._zod.values),Ct(e._zod,"optin",()=>t.innerType?._zod?.optin),Ct(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(dT):dT(i)}});function dT(e){return e.value=Object.freeze(e.value),e}const UF=_e("$ZodLazy",(e,t)=>{Bt.init(e,t),Ct(e._zod,"innerType",()=>t.getter()),Ct(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ct(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ct(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ct(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),zF=_e("$ZodCustom",(e,t)=>{mr.init(e,t),Bt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(s=>fT(s,n,r,e));fT(i,n,r,e)}});function fT(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(Vd(i))}}var hT;class FF{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 i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function BF(){return new FF}(hT=globalThis).__zod_globalRegistry??(hT.__zod_globalRegistry=BF());const md=globalThis.__zod_globalRegistry;function VF(e,t){return new e({type:"string",...Fe(t)})}function qF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Fe(t)})}function pT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Fe(t)})}function HF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Fe(t)})}function GF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Fe(t)})}function KF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Fe(t)})}function ZF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Fe(t)})}function cN(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Fe(t)})}function YF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Fe(t)})}function WF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Fe(t)})}function QF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Fe(t)})}function XF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Fe(t)})}function JF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Fe(t)})}function eB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Fe(t)})}function tB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Fe(t)})}function nB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Fe(t)})}function rB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Fe(t)})}function iB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Fe(t)})}function oB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Fe(t)})}function sB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Fe(t)})}function aB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Fe(t)})}function lB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Fe(t)})}function cB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Fe(t)})}function uB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Fe(t)})}function dB(e,t){return new e({type:"string",format:"date",check:"string_format",...Fe(t)})}function fB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Fe(t)})}function hB(e,t){return new e({type:"string",format:"duration",check:"string_format",...Fe(t)})}function pB(e,t){return new e({type:"number",checks:[],...Fe(t)})}function mB(e,t){return new e({type:"number",coerce:!0,checks:[],...Fe(t)})}function gB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Fe(t)})}function vB(e,t){return new e({type:"boolean",...Fe(t)})}function _B(e,t){return new e({type:"boolean",coerce:!0,...Fe(t)})}function yB(e,t){return new e({type:"undefined",...Fe(t)})}function bB(e,t){return new e({type:"null",...Fe(t)})}function wB(e){return new e({type:"any"})}function SB(e){return new e({type:"unknown"})}function EB(e,t){return new e({type:"never",...Fe(t)})}function mT(e,t){return new tN({check:"less_than",...Fe(t),value:e,inclusive:!1})}function H_(e,t){return new tN({check:"less_than",...Fe(t),value:e,inclusive:!0})}function gT(e,t){return new nN({check:"greater_than",...Fe(t),value:e,inclusive:!1})}function G_(e,t){return new nN({check:"greater_than",...Fe(t),value:e,inclusive:!0})}function vT(e,t){return new R9({check:"multiple_of",...Fe(t),value:e})}function xB(e,t){return new T9({check:"max_size",...Fe(t),maximum:e})}function RB(e,t){return new C9({check:"min_size",...Fe(t),minimum:e})}function uN(e,t){return new A9({check:"max_length",...Fe(t),maximum:e})}function Pm(e,t){return new I9({check:"min_length",...Fe(t),minimum:e})}function dN(e,t){return new M9({check:"length_equals",...Fe(t),length:e})}function OB(e,t){return new P9({check:"string_format",format:"regex",...Fe(t),pattern:e})}function TB(e){return new N9({check:"string_format",format:"lowercase",...Fe(e)})}function CB(e){return new k9({check:"string_format",format:"uppercase",...Fe(e)})}function AB(e,t){return new D9({check:"string_format",format:"includes",...Fe(t),includes:e})}function IB(e,t){return new L9({check:"string_format",format:"starts_with",...Fe(t),prefix:e})}function MB(e,t){return new $9({check:"string_format",format:"ends_with",...Fe(t),suffix:e})}function PB(e,t){return new j9({check:"mime_type",mime:e,...Fe(t)})}function Zc(e){return new U9({check:"overwrite",tx:e})}function NB(e){return Zc(t=>t.normalize(e))}function kB(){return Zc(e=>e.trim())}function DB(){return Zc(e=>e.toLowerCase())}function LB(){return Zc(e=>e.toUpperCase())}function $B(){return Zc(e=>Oz(e))}function jB(e,t,n){return new e({type:"array",element:t,...Fe(n)})}function UB(e,t){return new e({type:"file",...Fe(t)})}function zB(e,t,n){const r=Fe(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function FB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Fe(n)})}function BB(e){const t=VB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Vd(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(Vd(i))}},e(n.value,n)));return t}function VB(e,t){const n=new mr({check:"custom",...Fe(t)});return n._zod.check=e,n}function Nm(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??md,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 nn(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;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,v=t.processors[i.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);v(e,t,g,m)}const p=e._zod.parent;p&&(l.ref||(l.ref=p),nn(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"&&Mr(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 km(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 c=e.metadataRegistry.get(l[0])?.id;if(c){const d=r.get(c);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,l[0])}}const i=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(l[0])?.id,g=e.external.uri??(y=>y);if(p)return{ref:g(p)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(l[1]===n)return{ref:"#"};const f=`#/${c}/`,m=l[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},s=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:d,defId:f}=i(l);c.def={...c.schema},f&&(c.defId=f);const m=c.schema;for(const p in m)delete m[p];m.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.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 c=l[1];if(t===l[0]){s(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){s(l);continue}}if(e.metadataRegistry.get(l[0])?.id){s(l);continue}if(c.cycle){s(l);continue}if(c.count>1&&e.reused==="ref"){s(l);continue}}}function Dm(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 c=e.seen.get(l);if(c.ref===null)return;const d=c.def??c.schema,f={...d},m=c.ref;if(c.ref=null,m){r(m);const g=e.seen.get(m),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),l._zod.parent===m)for(const b in d)b==="$ref"||b==="allOf"||b in f||delete d[b];if(v.$ref&&g.def)for(const b in d)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(d[b])===JSON.stringify(g.def[b])&&delete d[b]}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 v in d)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(d[v])===JSON.stringify(g.def[v])&&delete d[v]}e.override({zodSchema:l,jsonSchema:d,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$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");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const s=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Lm(t,"input",e.processors),output:Lm(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Mr(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 Mr(r.element,n);if(r.type==="set")return Mr(r.valueType,n);if(r.type==="lazy")return Mr(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 Mr(r.innerType,n);if(r.type==="intersection")return Mr(r.left,n)||Mr(r.right,n);if(r.type==="record"||r.type==="map")return Mr(r.keyType,n)||Mr(r.valueType,n);if(r.type==="pipe")return Mr(r.in,n)||Mr(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Mr(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Mr(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Mr(i,n))return!0;return!!(r.rest&&Mr(r.rest,n))}return!1}const qB=(e,t={})=>n=>{const r=Nm({...n,processors:t});return nn(e,r),km(r,e),Dm(r,e)},Lm=(e,t,n={})=>r=>{const{libraryOptions:i,target:s}=r??{},l=Nm({...i??{},target:s,io:t,processors:n});return nn(e,l),km(l,e),Dm(l,e)},HB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fN=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:s,maximum:l,format:c,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof l=="number"&&(i.maxLength=l),c&&(i.format=HB[c]??c,i.format===""&&delete i.format,c==="time"&&delete i.format),f&&(i.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?i.pattern=m[0].source:m.length>1&&(i.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},hN=(e,t,n,r)=>{const i=n,{minimum:s,maximum:l,format:c,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof c=="string"&&c.includes("int")?i.type="integer":i.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=m,i.exclusiveMinimum=!0):i.exclusiveMinimum=m),typeof s=="number"&&(i.minimum=s,typeof m=="number"&&t.target!=="draft-04"&&(m>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=f,i.exclusiveMaximum=!0):i.exclusiveMaximum=f),typeof l=="number"&&(i.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},pN=(e,t,n,r)=>{n.type="boolean"},GB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},KB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},mN=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},gN=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ZB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},vN=(e,t,n,r)=>{n.not={}},_N=(e,t,n,r)=>{},yN=(e,t,n,r)=>{},YB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},bN=(e,t,n,r)=>{const i=e._zod.def,s=HP(i.entries);s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},wN=(e,t,n,r)=>{const i=e._zod.def,s=[];for(const l of i.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");s.push(Number(l))}else s.push(l);if(s.length!==0)if(s.length===1){const l=s[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),s.every(l=>typeof l=="boolean")&&(n.type="boolean"),s.every(l=>l===null)&&(n.type="null"),n.enum=s},WB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},QB=(e,t,n,r)=>{const i=n,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=s.source},SN=(e,t,n,r)=>{const i=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:c,mime:d}=e._zod.bag;l!==void 0&&(s.minLength=l),c!==void 0&&(s.maxLength=c),d?d.length===1?(s.contentMediaType=d[0],Object.assign(i,s)):(Object.assign(i,s),i.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(i,s)},XB=(e,t,n,r)=>{n.type="boolean"},EN=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},JB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},xN=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},eV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},tV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},RN=(e,t,n,r)=>{const i=n,s=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof c=="number"&&(i.maxItems=c),i.type="array",i.items=nn(s.element,t,{...r,path:[...r.path,"items"]})},ON=(e,t,n,r)=>{const i=n,s=e._zod.def;i.type="object",i.properties={};const l=s.shape;for(const f in l)i.properties[f]=nn(l[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(l)),d=new Set([...c].filter(f=>{const m=s.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(i.required=Array.from(d)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=nn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},TN=(e,t,n,r)=>{const i=e._zod.def,s=i.inclusive===!1,l=i.options.map((c,d)=>nn(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",d]}));s?n.oneOf=l:n.anyOf=l},CN=(e,t,n,r)=>{const i=e._zod.def,s=nn(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=nn(i.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,d=[...c(s)?s.allOf:[s],...c(l)?l.allOf:[l]];n.allOf=d},AN=(e,t,n,r)=>{const i=n,s=e._zod.def;i.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=s.items.map((g,v)=>nn(g,t,{...r,path:[...r.path,l,v]})),f=s.rest?nn(s.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=d,f&&(i.items=f)):t.target==="openapi-3.0"?(i.items={anyOf:d},f&&i.items.anyOf.push(f),i.minItems=d.length,f||(i.maxItems=d.length)):(i.items=d,f&&(i.additionalItems=f));const{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(i.minItems=m),typeof p=="number"&&(i.maxItems=p)},IN=(e,t,n,r)=>{const i=n,s=e._zod.def;i.type="object";const l=s.keyType,d=l._zod.bag?.patterns;if(s.mode==="loose"&&d&&d.size>0){const m=nn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const p of d)i.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=nn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=nn(s.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&&(i.required=m)}},MN=(e,t,n,r)=>{const i=e._zod.def,s=nn(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},PN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},NN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},kN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},DN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},LN=(e,t,n,r)=>{const i=e._zod.def,s=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;nn(s,t,r);const l=t.seen.get(e);l.ref=s},$N=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,n.readOnly=!0},nV=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},bw=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},jN=(e,t,n,r)=>{const i=e._zod.innerType;nn(i,t,r);const s=t.seen.get(e);s.ref=i},_T={string:fN,number:hN,boolean:pN,bigint:GB,symbol:KB,null:mN,undefined:gN,void:ZB,never:vN,any:_N,unknown:yN,date:YB,enum:bN,literal:wN,nan:WB,template_literal:QB,file:SN,success:XB,custom:EN,function:JB,transform:xN,map:eV,set:tV,array:RN,object:ON,union:TN,intersection:CN,tuple:AN,record:IN,nullable:MN,nonoptional:PN,default:NN,prefault:kN,catch:DN,pipe:LN,readonly:$N,promise:nV,optional:bw,lazy:jN};function cle(e,t){if("_idmap"in e){const r=e,i=Nm({...t,processors:_T}),s={};for(const d of r._idmap.entries()){const[f,m]=d;nn(m,i)}const l={},c={registry:r,uri:t?.uri,defs:s};i.external=c;for(const d of r._idmap.entries()){const[f,m]=d;km(i,m),l[f]=Dm(i,m)}if(Object.keys(s).length>0){const d=i.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:s}}return{schemas:l}}const n=Nm({...t,processors:_T});return nn(e,n),km(n,e),Dm(n,e)}const rV=_e("ZodISODateTime",(e,t)=>{J9.init(e,t),_n.init(e,t)});function UN(e){return uB(rV,e)}const iV=_e("ZodISODate",(e,t)=>{eF.init(e,t),_n.init(e,t)});function oV(e){return dB(iV,e)}const sV=_e("ZodISOTime",(e,t)=>{tF.init(e,t),_n.init(e,t)});function aV(e){return fB(sV,e)}const lV=_e("ZodISODuration",(e,t)=>{nF.init(e,t),_n.init(e,t)});function cV(e){return hB(lV,e)}const uV=(e,t)=>{_w.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Uz(e,n)},flatten:{value:n=>jz(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xb,2)}},isEmpty:{get(){return e.issues.length===0}}})},ji=_e("ZodError",uV,{Parent:Error}),dV=kg(ji),fV=Dg(ji),hV=Lg(ji),pV=$g(ji),mV=qz(ji),gV=Hz(ji),vV=Gz(ji),_V=Kz(ji),yV=Zz(ji),bV=Yz(ji),wV=Wz(ji),SV=Qz(ji),Gt=_e("ZodType",(e,t)=>(Bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Lm(e,"input"),output:Lm(e,"output")}}),e.toJSONSchema=qB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(da(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)=>fa(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>dV(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>hV(e,n,r),e.parseAsync=async(n,r)=>fV(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>pV(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>mV(e,n,r),e.decode=(n,r)=>gV(e,n,r),e.encodeAsync=async(n,r)=>vV(e,n,r),e.decodeAsync=async(n,r)=>_V(e,n,r),e.safeEncode=(n,r)=>yV(e,n,r),e.safeDecode=(n,r)=>bV(e,n,r),e.safeEncodeAsync=async(n,r)=>wV(e,n,r),e.safeDecodeAsync=async(n,r)=>SV(e,n,r),e.refine=(n,r)=>e.check(vq(n,r)),e.superRefine=n=>e.check(_q(n)),e.overwrite=n=>e.check(Zc(n)),e.optional=()=>En(e),e.exactOptional=()=>rq(e),e.nullable=()=>wT(e),e.nullish=()=>En(wT(e)),e.nonoptional=n=>cq(e,n),e.array=()=>Ie(e),e.or=n=>rn([e,n]),e.and=n=>Ew(e,n),e.transform=n=>Tb(e,KN(n)),e.default=n=>sq(e,n),e.prefault=n=>lq(e,n),e.catch=n=>dq(e,n),e.pipe=n=>Tb(e,n),e.readonly=()=>pq(e),e.describe=n=>{const r=e.clone();return md.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return md.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return md.get(e);const r=e.clone();return md.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),zN=_e("_ZodString",(e,t)=>{yw.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(r,i,s)=>fN(e,r,i);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(OB(...r)),e.includes=(...r)=>e.check(AB(...r)),e.startsWith=(...r)=>e.check(IB(...r)),e.endsWith=(...r)=>e.check(MB(...r)),e.min=(...r)=>e.check(Pm(...r)),e.max=(...r)=>e.check(uN(...r)),e.length=(...r)=>e.check(dN(...r)),e.nonempty=(...r)=>e.check(Pm(1,...r)),e.lowercase=r=>e.check(TB(r)),e.uppercase=r=>e.check(CB(r)),e.trim=()=>e.check(kB()),e.normalize=(...r)=>e.check(NB(...r)),e.toLowerCase=()=>e.check(DB()),e.toUpperCase=()=>e.check(LB()),e.slugify=()=>e.check($B())}),EV=_e("ZodString",(e,t)=>{yw.init(e,t),zN.init(e,t),e.email=n=>e.check(qF(xV,n)),e.url=n=>e.check(cN(FN,n)),e.jwt=n=>e.check(cB(zV,n)),e.emoji=n=>e.check(YF(OV,n)),e.guid=n=>e.check(pT(yT,n)),e.uuid=n=>e.check(HF(Yh,n)),e.uuidv4=n=>e.check(GF(Yh,n)),e.uuidv6=n=>e.check(KF(Yh,n)),e.uuidv7=n=>e.check(ZF(Yh,n)),e.nanoid=n=>e.check(WF(TV,n)),e.guid=n=>e.check(pT(yT,n)),e.cuid=n=>e.check(QF(CV,n)),e.cuid2=n=>e.check(XF(AV,n)),e.ulid=n=>e.check(JF(IV,n)),e.base64=n=>e.check(sB($V,n)),e.base64url=n=>e.check(aB(jV,n)),e.xid=n=>e.check(eB(MV,n)),e.ksuid=n=>e.check(tB(PV,n)),e.ipv4=n=>e.check(nB(NV,n)),e.ipv6=n=>e.check(rB(kV,n)),e.cidrv4=n=>e.check(iB(DV,n)),e.cidrv6=n=>e.check(oB(LV,n)),e.e164=n=>e.check(lB(UV,n)),e.datetime=n=>e.check(UN(n)),e.date=n=>e.check(oV(n)),e.time=n=>e.check(aV(n)),e.duration=n=>e.check(cV(n))});function z(e){return VF(EV,e)}const _n=_e("ZodStringFormat",(e,t)=>{hn.init(e,t),zN.init(e,t)}),xV=_e("ZodEmail",(e,t)=>{q9.init(e,t),_n.init(e,t)}),yT=_e("ZodGUID",(e,t)=>{B9.init(e,t),_n.init(e,t)}),Yh=_e("ZodUUID",(e,t)=>{V9.init(e,t),_n.init(e,t)}),FN=_e("ZodURL",(e,t)=>{H9.init(e,t),_n.init(e,t)});function RV(e){return cN(FN,e)}const OV=_e("ZodEmoji",(e,t)=>{G9.init(e,t),_n.init(e,t)}),TV=_e("ZodNanoID",(e,t)=>{K9.init(e,t),_n.init(e,t)}),CV=_e("ZodCUID",(e,t)=>{Z9.init(e,t),_n.init(e,t)}),AV=_e("ZodCUID2",(e,t)=>{Y9.init(e,t),_n.init(e,t)}),IV=_e("ZodULID",(e,t)=>{W9.init(e,t),_n.init(e,t)}),MV=_e("ZodXID",(e,t)=>{Q9.init(e,t),_n.init(e,t)}),PV=_e("ZodKSUID",(e,t)=>{X9.init(e,t),_n.init(e,t)}),NV=_e("ZodIPv4",(e,t)=>{rF.init(e,t),_n.init(e,t)}),kV=_e("ZodIPv6",(e,t)=>{iF.init(e,t),_n.init(e,t)}),DV=_e("ZodCIDRv4",(e,t)=>{oF.init(e,t),_n.init(e,t)}),LV=_e("ZodCIDRv6",(e,t)=>{sF.init(e,t),_n.init(e,t)}),$V=_e("ZodBase64",(e,t)=>{aF.init(e,t),_n.init(e,t)}),jV=_e("ZodBase64URL",(e,t)=>{cF.init(e,t),_n.init(e,t)}),UV=_e("ZodE164",(e,t)=>{uF.init(e,t),_n.init(e,t)}),zV=_e("ZodJWT",(e,t)=>{fF.init(e,t),_n.init(e,t)}),ww=_e("ZodNumber",(e,t)=>{iN.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(r,i,s)=>hN(e,r,i),e.gt=(r,i)=>e.check(gT(r,i)),e.gte=(r,i)=>e.check(G_(r,i)),e.min=(r,i)=>e.check(G_(r,i)),e.lt=(r,i)=>e.check(mT(r,i)),e.lte=(r,i)=>e.check(H_(r,i)),e.max=(r,i)=>e.check(H_(r,i)),e.int=r=>e.check(bT(r)),e.safe=r=>e.check(bT(r)),e.positive=r=>e.check(gT(0,r)),e.nonnegative=r=>e.check(G_(0,r)),e.negative=r=>e.check(mT(0,r)),e.nonpositive=r=>e.check(H_(0,r)),e.multipleOf=(r,i)=>e.check(vT(r,i)),e.step=(r,i)=>e.check(vT(r,i)),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 St(e){return pB(ww,e)}const FV=_e("ZodNumberFormat",(e,t)=>{hF.init(e,t),ww.init(e,t)});function bT(e){return gB(FV,e)}const BN=_e("ZodBoolean",(e,t)=>{pF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pN(e,n,r)});function Pt(e){return vB(BN,e)}const BV=_e("ZodUndefined",(e,t)=>{mF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gN(e,n)});function ule(e){return yB(BV,e)}const VV=_e("ZodNull",(e,t)=>{gF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mN(e,n,r)});function VN(e){return bB(VV,e)}const qV=_e("ZodAny",(e,t)=>{vF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>_N()});function HV(){return wB(qV)}const GV=_e("ZodUnknown",(e,t)=>{_F.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yN()});function Xt(){return SB(GV)}const KV=_e("ZodNever",(e,t)=>{yF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vN(e,n,r)});function qN(e){return EB(KV,e)}const ZV=_e("ZodArray",(e,t)=>{bF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RN(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Pm(n,r)),e.nonempty=n=>e.check(Pm(1,n)),e.max=(n,r)=>e.check(uN(n,r)),e.length=(n,r)=>e.check(dN(n,r)),e.unwrap=()=>e.element});function Ie(e,t){return jB(ZV,e,t)}const Sw=_e("ZodObject",(e,t)=>{SF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ON(e,n,r,i),Ct(e,"shape",()=>t.shape),e.keyof=()=>dn(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Xt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Xt()}),e.strict=()=>e.clone({...e._zod.def,catchall:qN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Nz(e,n),e.safeExtend=n=>kz(e,n),e.merge=n=>Dz(e,n),e.pick=n=>Mz(e,n),e.omit=n=>Pz(e,n),e.partial=(...n)=>Lz(ZN,e,n[0]),e.required=(...n)=>$z(YN,e,n[0])});function Ee(e,t){const n={type:"object",shape:e??{},...Fe(t)};return new Sw(n)}function dle(e,t){return new Sw({type:"object",shape:e,catchall:qN(),...Fe(t)})}function hr(e,t){return new Sw({type:"object",shape:e,catchall:Xt(),...Fe(t)})}const HN=_e("ZodUnion",(e,t)=>{aN.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TN(e,n,r,i),e.options=t.options});function rn(e,t){return new HN({type:"union",options:e,...Fe(t)})}const YV=_e("ZodDiscriminatedUnion",(e,t)=>{HN.init(e,t),EF.init(e,t)});function GN(e,t,n){return new YV({type:"union",options:t,discriminator:e,...Fe(n)})}const WV=_e("ZodIntersection",(e,t)=>{xF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>CN(e,n,r,i)});function Ew(e,t){return new WV({type:"intersection",left:e,right:t})}const QV=_e("ZodTuple",(e,t)=>{RF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AN(e,n,r,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function fle(e,t,n){const r=t instanceof Bt,i=r?n:t,s=r?t:null;return new QV({type:"tuple",items:e,rest:s,...Fe(i)})}const XV=_e("ZodRecord",(e,t)=>{OF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IN(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Ut(e,t,n){return new XV({type:"record",keyType:e,valueType:t,...Fe(n)})}const Ob=_e("ZodEnum",(e,t)=>{TF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(r,i,s)=>bN(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Ob({...t,checks:[],...Fe(i),entries:s})},e.exclude=(r,i)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new Ob({...t,checks:[],...Fe(i),entries:s})}});function dn(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ob({type:"enum",entries:n,...Fe(t)})}const JV=_e("ZodLiteral",(e,t)=>{CF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>wN(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 Ye(e,t){return new JV({type:"literal",values:Array.isArray(e)?e:[e],...Fe(t)})}const eq=_e("ZodFile",(e,t)=>{AF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>SN(e,n,r),e.min=(n,r)=>e.check(RB(n,r)),e.max=(n,r)=>e.check(xB(n,r)),e.mime=(n,r)=>e.check(PB(Array.isArray(n)?n:[n],r))});function hle(e){return UB(eq,e)}const tq=_e("ZodTransform",(e,t)=>{IF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xN(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VP(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Vd(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Vd(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n)):(n.value=i,n)}});function KN(e){return new tq({type:"transform",transform:e})}const ZN=_e("ZodOptional",(e,t)=>{lN.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bw(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function En(e){return new ZN({type:"optional",innerType:e})}const nq=_e("ZodExactOptional",(e,t)=>{MF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bw(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function rq(e){return new nq({type:"optional",innerType:e})}const iq=_e("ZodNullable",(e,t)=>{PF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function wT(e){return new iq({type:"nullable",innerType:e})}const oq=_e("ZodDefault",(e,t)=>{NF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sq(e,t){return new oq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():KP(t)}})}const aq=_e("ZodPrefault",(e,t)=>{kF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function lq(e,t){return new aq({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():KP(t)}})}const YN=_e("ZodNonOptional",(e,t)=>{DF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function cq(e,t){return new YN({type:"nonoptional",innerType:e,...Fe(t)})}const uq=_e("ZodCatch",(e,t)=>{LF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dq(e,t){return new uq({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const fq=_e("ZodPipe",(e,t)=>{$F.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>LN(e,n,r,i),e.in=t.in,e.out=t.out});function Tb(e,t){return new fq({type:"pipe",in:e,out:t})}const hq=_e("ZodReadonly",(e,t)=>{jF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$N(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function pq(e){return new hq({type:"readonly",innerType:e})}const mq=_e("ZodLazy",(e,t)=>{UF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jN(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function ul(e){return new mq({type:"lazy",getter:e})}const xw=_e("ZodCustom",(e,t)=>{zF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>EN(e,n)});function gq(e,t){return zB(xw,e??(()=>!0),t)}function vq(e,t={}){return FB(xw,e,t)}function _q(e){return BB(e)}function ple(e,t={}){const n=new xw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Fe(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 Rw(e,t){return Tb(KN(e),t)}const yq={custom:"custom"};function WN(e){return mB(ww,e)}function ST(e){return _B(BN,e)}function Re(...e){return BP(hw(e))}function bq(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Mn({error:e,localization:t,localizeErrors:n=!0}){var r;const i="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:i;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const s=e.error.code;if(t?.[s])return t[s]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||i}function dl(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Cb(e,t){for(const n in e)if(e[n]===t)return n}function qd(e,t){let n=z().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 wq={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"},Sq={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"},Eq={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."},xq={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."},Rq={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},Oq={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},Tq={...Rq,...Oq},Cq={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Aq={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Iq={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Mq={INVALID_SESSION_TOKEN:"Invalid session token"},Pq={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"},Nq={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"},kq={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"},Dq={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"},Lq={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"},$q={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"},jq={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"},Uq={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",...xq,...wq,...Sq,...Eq,...Tq,...Cq,...Aq,...Iq,...Mq,...Pq,...Nq,...kq,...Dq,...Lq,...$q,...jq},zq={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},ET={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},xT={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function Fq(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 Bq=e=>{switch(e){case"success":return Hq;case"info":return Kq;case"warning":return Gq;case"error":return Zq;default:return null}},Vq=Array(12).fill(0),qq=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},Vq.map((n,r)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Hq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),Gq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.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"})),Kq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),Zq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),Yq=ne.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"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Wq=()=>{const[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ab=1;class Qq{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,...i}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ab++,l=this.toasts.find(d=>d.id===s),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...t,id:s,title:r}),{...d,...t,id:s,dismissible:c,title:r}):d):this.addToast({title:r,...i,dismissible:c,id:s}),s},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 i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,l;const c=i.then(async f=>{if(l=["resolve",f],ne.isValidElement(f))s=!1,this.create({id:r,type:"default",message:f});else if(Jq(f)&&!f.ok){s=!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,y=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...y})}else if(f instanceof Error){s=!1;const p=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,y=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...y})}else if(n.success!==void 0){s=!1;const p=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,y=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...y})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){s=!1;const m=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,v=typeof m=="object"&&!ne.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...v})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>c.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||Ab++;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 Kr=new Qq,Xq=(e,t)=>{const n=t?.id||Ab++;return Kr.addToast({title:e,...t,id:n}),n},Jq=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",eH=Xq,tH=()=>Kr.toasts,nH=()=>Kr.getActiveToasts(),RT=Object.assign(eH,{success:Kr.success,info:Kr.info,warning:Kr.warning,error:Kr.error,custom:Kr.custom,message:Kr.message,promise:Kr.promise,dismiss:Kr.dismiss,loading:Kr.loading},{getHistory:tH,getToasts:nH});Fq("[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 Wh(e){return e.label!==void 0}const rH=3,iH="24px",oH="16px",OT=4e3,sH=356,aH=14,lH=45,cH=200;function fo(...e){return e.filter(Boolean).join(" ")}function uH(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const dH=e=>{var t,n,r,i,s,l,c,d,f;const{invert:m,toast:p,unstyled:g,interacting:v,setHeights:y,visibleToasts:b,heights:x,index:S,toasts:E,expanded:R,removeToast:C,defaultRichColors:O,closeButton:A,style:M,cancelButtonStyle:P,actionButtonStyle:L,className:H="",descriptionClassName:j="",duration:B,position:U,gap:Z,expandByDefault:re,classNames:q,icons:W,closeButtonAriaLabel:ee="Close toast"}=e,[ae,Q]=ne.useState(null),[k,K]=ne.useState(null),[V,D]=ne.useState(!1),[F,X]=ne.useState(!1),[fe,pe]=ne.useState(!1),[xe,Ue]=ne.useState(!1),[Y,te]=ne.useState(!1),[ve,se]=ne.useState(0),[we,Oe]=ne.useState(0),nt=ne.useRef(p.duration||B||OT),ot=ne.useRef(null),Be=ne.useRef(null),Xe=S===0,Ne=S+1<=b,Pe=p.type,Me=p.dismissible!==!1,G=p.className||"",oe=p.descriptionClassName||"",le=ne.useMemo(()=>x.findIndex(Ge=>Ge.toastId===p.id)||0,[x,p.id]),Ae=ne.useMemo(()=>{var Ge;return(Ge=p.closeButton)!=null?Ge:A},[p.closeButton,A]),Ce=ne.useMemo(()=>p.duration||B||OT,[p.duration,B]),Te=ne.useRef(0),De=ne.useRef(0),Je=ne.useRef(0),et=ne.useRef(null),[gt,Rt]=U.split("-"),vt=ne.useMemo(()=>x.reduce((Ge,ct,Jt)=>Jt>=le?Ge:Ge+ct.height,0),[x,le]),Nn=Wq(),Mo=p.invert||m,Fi=Pe==="loading";De.current=ne.useMemo(()=>le*Z+vt,[le,vt]),ne.useEffect(()=>{nt.current=Ce},[Ce]),ne.useEffect(()=>{D(!0)},[]),ne.useEffect(()=>{const Ge=Be.current;if(Ge){const ct=Ge.getBoundingClientRect().height;return Oe(ct),y(Jt=>[{toastId:p.id,height:ct,position:p.position},...Jt]),()=>y(Jt=>Jt.filter(Kt=>Kt.toastId!==p.id))}},[y,p.id]),ne.useLayoutEffect(()=>{if(!V)return;const Ge=Be.current,ct=Ge.style.height;Ge.style.height="auto";const Jt=Ge.getBoundingClientRect().height;Ge.style.height=ct,Oe(Jt),y(Kt=>Kt.find(Dt=>Dt.toastId===p.id)?Kt.map(Dt=>Dt.toastId===p.id?{...Dt,height:Jt}:Dt):[{toastId:p.id,height:Jt,position:p.position},...Kt])},[V,p.title,p.description,y,p.id,p.jsx,p.action,p.cancel]);const Ze=ne.useCallback(()=>{X(!0),se(De.current),y(Ge=>Ge.filter(ct=>ct.toastId!==p.id)),setTimeout(()=>{C(p)},cH)},[p,C,y,De]);ne.useEffect(()=>{if(p.promise&&Pe==="loading"||p.duration===1/0||p.type==="loading")return;let Ge;return R||v||Nn?(()=>{if(Je.current<Te.current){const Kt=new Date().getTime()-Te.current;nt.current=nt.current-Kt}Je.current=new Date().getTime()})():nt.current!==1/0&&(Te.current=new Date().getTime(),Ge=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ze()},nt.current)),()=>clearTimeout(Ge)},[R,v,p,Pe,Nn,Ze]),ne.useEffect(()=>{p.delete&&(Ze(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ze,p.delete]);function ut(){var Ge;if(W?.loading){var ct;return ne.createElement("div",{className:fo(q?.loader,p==null||(ct=p.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":Pe==="loading"},W.loading)}return ne.createElement(qq,{className:fo(q?.loader,p==null||(Ge=p.classNames)==null?void 0:Ge.loader),visible:Pe==="loading"})}const Ot=p.icon||W?.[Pe]||Bq(Pe);var it,kt;return ne.createElement("li",{tabIndex:0,ref:Be,className:fo(H,G,q?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,q?.default,q?.[Pe],p==null||(n=p.classNames)==null?void 0:n[Pe]),"data-sonner-toast":"","data-rich-colors":(it=p.richColors)!=null?it:O,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":V,"data-promise":!!p.promise,"data-swiped":Y,"data-removed":F,"data-visible":Ne,"data-y-position":gt,"data-x-position":Rt,"data-index":S,"data-front":Xe,"data-swiping":fe,"data-dismissible":Me,"data-type":Pe,"data-invert":Mo,"data-swipe-out":xe,"data-swipe-direction":k,"data-expanded":!!(R||re&&V),"data-testid":p.testId,style:{"--index":S,"--toasts-before":S,"--z-index":E.length-S,"--offset":`${F?ve:De.current}px`,"--initial-height":re?"auto":`${we}px`,...M,...p.style},onDragEnd:()=>{pe(!1),Q(null),et.current=null},onPointerDown:Ge=>{Ge.button!==2&&(Fi||!Me||(ot.current=new Date,se(De.current),Ge.target.setPointerCapture(Ge.pointerId),Ge.target.tagName!=="BUTTON"&&(pe(!0),et.current={x:Ge.clientX,y:Ge.clientY})))},onPointerUp:()=>{var Ge,ct,Jt;if(xe||!Me)return;et.current=null;const Kt=Number(((Ge=Be.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_r=Number(((ct=Be.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dt=new Date().getTime()-((Jt=ot.current)==null?void 0:Jt.getTime()),on=ae==="x"?Kt:_r,gi=Math.abs(on)/Dt;if(Math.abs(on)>=lH||gi>.11){se(De.current),p.onDismiss==null||p.onDismiss.call(p,p),K(ae==="x"?Kt>0?"right":"left":_r>0?"down":"up"),Ze(),Ue(!0);return}else{var rr,Lr;(rr=Be.current)==null||rr.style.setProperty("--swipe-amount-x","0px"),(Lr=Be.current)==null||Lr.style.setProperty("--swipe-amount-y","0px")}te(!1),pe(!1),Q(null)},onPointerMove:Ge=>{var ct,Jt,Kt;if(!et.current||!Me||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const Dt=Ge.clientY-et.current.y,on=Ge.clientX-et.current.x;var gi;const rr=(gi=e.swipeDirections)!=null?gi:uH(U);!ae&&(Math.abs(on)>1||Math.abs(Dt)>1)&&Q(Math.abs(on)>Math.abs(Dt)?"x":"y");let Lr={x:0,y:0};const pl=Bi=>1/(1.5+Math.abs(Bi)/20);if(ae==="y"){if(rr.includes("top")||rr.includes("bottom"))if(rr.includes("top")&&Dt<0||rr.includes("bottom")&&Dt>0)Lr.y=Dt;else{const Bi=Dt*pl(Dt);Lr.y=Math.abs(Bi)<Math.abs(Dt)?Bi:Dt}}else if(ae==="x"&&(rr.includes("left")||rr.includes("right")))if(rr.includes("left")&&on<0||rr.includes("right")&&on>0)Lr.x=on;else{const Bi=on*pl(on);Lr.x=Math.abs(Bi)<Math.abs(on)?Bi:on}(Math.abs(Lr.x)>0||Math.abs(Lr.y)>0)&&te(!0),(Jt=Be.current)==null||Jt.style.setProperty("--swipe-amount-x",`${Lr.x}px`),(Kt=Be.current)==null||Kt.style.setProperty("--swipe-amount-y",`${Lr.y}px`)}},Ae&&!p.jsx&&Pe!=="loading"?ne.createElement("button",{"aria-label":ee,"data-disabled":Fi,"data-close-button":!0,onClick:Fi||!Me?()=>{}:()=>{Ze(),p.onDismiss==null||p.onDismiss.call(p,p)},className:fo(q?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(kt=W?.close)!=null?kt:Yq):null,(Pe||p.icon||p.promise)&&p.icon!==null&&(W?.[Pe]!==null||p.icon)?ne.createElement("div",{"data-icon":"",className:fo(q?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ut():null,p.type!=="loading"?Ot:null):null,ne.createElement("div",{"data-content":"",className:fo(q?.content,p==null||(s=p.classNames)==null?void 0:s.content)},ne.createElement("div",{"data-title":"",className:fo(q?.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?ne.createElement("div",{"data-description":"",className:fo(j,oe,q?.description,p==null||(c=p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),ne.isValidElement(p.cancel)?p.cancel:p.cancel&&Wh(p.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:Ge=>{Wh(p.cancel)&&Me&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ge),Ze())},className:fo(q?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ne.isValidElement(p.action)?p.action:p.action&&Wh(p.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||L,onClick:Ge=>{Wh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ge),!Ge.defaultPrevented&&Ze())},className:fo(q?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function TT(){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 fH(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",c=s?oH:iH;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}`]=c:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const hH=ne.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:v,duration:y,style:b,visibleToasts:x=rH,toastOptions:S,dir:E=TT(),gap:R=aH,icons:C,containerAriaLabel:O="Notifications"}=t,[A,M]=ne.useState([]),P=ne.useMemo(()=>r?A.filter(V=>V.toasterId===r):A.filter(V=>!V.toasterId),[A,r]),L=ne.useMemo(()=>Array.from(new Set([s].concat(P.filter(V=>V.position).map(V=>V.position)))),[P,s]),[H,j]=ne.useState([]),[B,U]=ne.useState(!1),[Z,re]=ne.useState(!1),[q,W]=ne.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=ne.useRef(null),ae=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=ne.useRef(null),k=ne.useRef(!1),K=ne.useCallback(V=>{M(D=>{var F;return(F=D.find(X=>X.id===V.id))!=null&&F.delete||Kr.dismiss(V.id),D.filter(({id:X})=>X!==V.id)})},[]);return ne.useEffect(()=>Kr.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{M(D=>D.map(F=>F.id===V.id?{...F,delete:!0}:F))});return}setTimeout(()=>{fP.flushSync(()=>{M(D=>{const F=D.findIndex(X=>X.id===V.id);return F!==-1?[...D.slice(0,F),{...D[F],...V},...D.slice(F+1)]:[V,...D]})})})}),[A]),ne.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 V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{V.addListener(({matches:F})=>{try{W(F?"dark":"light")}catch(X){console.error(X)}})}},[g]),ne.useEffect(()=>{A.length<=1&&U(!1)},[A]),ne.useEffect(()=>{const V=D=>{var F;if(l.every(pe=>D[pe]||D.code===pe)){var fe;U(!0),(fe=ee.current)==null||fe.focus()}D.code==="Escape"&&(document.activeElement===ee.current||(F=ee.current)!=null&&F.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[l]),ne.useEffect(()=>{if(ee.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,k.current=!1)}},[ee.current]),ne.createElement("section",{ref:n,"aria-label":`${O} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((V,D)=>{var F;const[X,fe]=V.split("-");return P.length?ne.createElement("ol",{key:V,dir:E==="auto"?TT():E,tabIndex:-1,ref:ee,className:f,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":X,"data-x-position":fe,style:{"--front-toast-height":`${((F=H[0])==null?void 0:F.height)||0}px`,"--width":`${sH}px`,"--gap":`${R}px`,...b,...fH(m,p)},onBlur:pe=>{k.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(k.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||k.current||(k.current=!0,Q.current=pe.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{Z||U(!1)},onDragEnd:()=>U(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||re(!0)},onPointerUp:()=>re(!1)},P.filter(pe=>!pe.position&&D===0||pe.position===V).map((pe,xe)=>{var Ue,Y;return ne.createElement(dH,{key:pe.id,icons:C,index:xe,toast:pe,defaultRichColors:v,duration:(Ue=S?.duration)!=null?Ue:y,className:S?.className,descriptionClassName:S?.descriptionClassName,invert:i,visibleToasts:x,closeButton:(Y=S?.closeButton)!=null?Y:d,interacting:Z,position:V,style:S?.style,unstyled:S?.unstyled,classNames:S?.classNames,cancelButtonStyle:S?.cancelButtonStyle,actionButtonStyle:S?.actionButtonStyle,closeButtonAriaLabel:S?.closeButtonAriaLabel,removeToast:K,toasts:P.filter(te=>te.position==pe.position),heights:H.filter(te=>te.position==pe.position),setHeights:j,expandByDefault:c,gap:R,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),QN=I.createContext({});function XN(){return I.useContext(QN)}var K_,CT;function pH(){if(CT)return K_;CT=1;var e=function(){};return K_=e,K_}var mH=pH();const gH=la(mH);function vH({async:e,appendTo:t,defer:n,id:r,nonce:i,src:s}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),i&&l.setAttribute("nonce",i),l.src=s,(t==="head"?document.head:document.body).appendChild(l)}var _H=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let Id=null,Hd=!1;const $m=new Set,jm=new Set,yH=typeof window<"u",Cc="___grecaptcha_cfg",JN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function bH(){if(!yH)return;function e(n){if(Hd)n();else{window[Cc]||(window[Cc]={});const r=window[Cc];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(){Hd=!0;for(const n of jm)n();jm.clear()}window[JN]=t}function wH({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:i=!1}){const s=i?"recaptcha.net":"google.com",l=r?"enterprise.js":"api.js",c=new URLSearchParams({render:n});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${s}/recaptcha/${l}?${c.toString()}`}function SH({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:i}){const s={id:"google-recaptcha-v3"},l=wH({language:e,onLoadCallbackName:JN,render:t,useEnterprise:r,useRecaptchaNet:i});if(Id){if(Id!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Id=l,vH(Object.assign(Object.assign(Object.assign({},s),n),{src:l}))}function EH(e){if(!window[Cc])return;const t=window[Cc];t.clients&&delete t.clients[e]}function xH(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,i=_H(t,["onLoadCallback","onLoadCallbackName"]);if($m.size===0&&bH(),SH(i),$m.add(e),n&&(Hd?n():jm.add(n)),r){let s=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};Hd?s():jm.add(s)}}function RH(e){var t,n,r;$m.delete(e),$m.size===0&&(window.grecaptcha=void 0,window[Cc]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Id}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Id=null,Hd=!1)}let AT=!1;function OH({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:i,useEnterprise:s,useRecaptchaNet:l}){var c,d,f,m,p,g,v;const y=I.useId(),[b,x]=I.useState(null),[S,E]=I.useState(null),R=I.useRef(!1);I.useEffect(()=>{function M(){var P;const L=s?(P=window.grecaptcha)===null||P===void 0?void 0:P.enterprise:window.grecaptcha;if(!L)throw new Error("reCAPTCHA not found");if(!L.ready)throw new Error("reCAPTCHA ready callback not found");L.ready(()=>{x(L)})}return xH(y,{language:n,onLoadCallback:M,onLoadCallbackName:i?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:i?.appendTo,async:i?.async,defer:i?.defer,id:i?.id,nonce:i?.nonce},useEnterprise:s,useRecaptchaNet:l}),()=>{RH(y),x(null)}},[e?.element,y,n,r,i?.appendTo,i?.async,i?.defer,i?.id,i?.nonce,i?.onLoadCallbackName,s,l]),I.useEffect(()=>{var M,P,L;if(!e?.element||!b?.render)return;const H={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((M=e.parameters)===null||M===void 0?void 0:M.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},j=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!j)throw new Error("reCAPTCHA container element not found");const B=b.render(j,H);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&(AT||(gH(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),AT=!0),(L=j.querySelector(".grecaptcha-badge"))===null||L===void 0||L.style.setProperty("display","none")),E(B),R.current=!0,()=>{E(null),R.current=!1,EH(B),j.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.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,(v=e?.parameters)===null||v===void 0?void 0:v.theme,b,r]);const C=!!e?.element,O=C?S:r,A=I.useMemo(()=>O!==null&&b?.execute?M=>{if(O===null||!b?.execute)throw new Error("reCAPTCHA has not been loaded");return C&&!R.current?(console.warn("Client ID not mounted"),null):b.execute(O,{action:M})}:void 0,[O,b,C]);return T.jsx(QN.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:b},children:t})}var TH=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()}}},Ti=new TH;function CH(){return()=>{}}function us(){return I.useSyncExternalStore(CH,()=>!0,()=>!1)}function e3(){const[e,t]=I.useState();return I.useEffect(()=>{const n=()=>{const i=document.documentElement.getAttribute("lang");t(i??void 0)};n();const r=new MutationObserver(i=>{for(const s of i)s.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function Ow(){const[e,t]=I.useState("light");return I.useEffect(()=>{const n=()=>{var i;const s=document.documentElement.classList.contains("dark")||((i=document.documentElement.getAttribute("style"))==null?void 0:i.includes("color-scheme: dark"));t(s?"dark":"light")};n();const r=new MutationObserver(i=>{for(const s of i)(s.attributeName==="style"||s.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function AH({children:e}){const t=us(),{captcha:n}=I.useContext(ht);return n?.provider!=="google-recaptcha-v3"?e:T.jsxs(OH,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&T.jsx("style",{children:`
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){s(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){s(l);continue}}if(e.metadataRegistry.get(l[0])?.id){s(l);continue}if(c.cycle){s(l);continue}if(c.count>1&&e.reused==="ref"){s(l);continue}}}function Dm(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 c=e.seen.get(l);if(c.ref===null)return;const d=c.def??c.schema,f={...d},m=c.ref;if(c.ref=null,m){r(m);const g=e.seen.get(m),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),l._zod.parent===m)for(const b in d)b==="$ref"||b==="allOf"||b in f||delete d[b];if(v.$ref&&g.def)for(const b in d)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(d[b])===JSON.stringify(g.def[b])&&delete d[b]}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 v in d)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(d[v])===JSON.stringify(g.def[v])&&delete d[v]}e.override({zodSchema:l,jsonSchema:d,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$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");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const s=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Lm(t,"input",e.processors),output:Lm(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Mr(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 Mr(r.element,n);if(r.type==="set")return Mr(r.valueType,n);if(r.type==="lazy")return Mr(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 Mr(r.innerType,n);if(r.type==="intersection")return Mr(r.left,n)||Mr(r.right,n);if(r.type==="record"||r.type==="map")return Mr(r.keyType,n)||Mr(r.valueType,n);if(r.type==="pipe")return Mr(r.in,n)||Mr(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Mr(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Mr(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Mr(i,n))return!0;return!!(r.rest&&Mr(r.rest,n))}return!1}const qB=(e,t={})=>n=>{const r=Nm({...n,processors:t});return nn(e,r),km(r,e),Dm(r,e)},Lm=(e,t,n={})=>r=>{const{libraryOptions:i,target:s}=r??{},l=Nm({...i??{},target:s,io:t,processors:n});return nn(e,l),km(l,e),Dm(l,e)},HB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fN=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:s,maximum:l,format:c,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof l=="number"&&(i.maxLength=l),c&&(i.format=HB[c]??c,i.format===""&&delete i.format,c==="time"&&delete i.format),f&&(i.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?i.pattern=m[0].source:m.length>1&&(i.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},hN=(e,t,n,r)=>{const i=n,{minimum:s,maximum:l,format:c,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof c=="string"&&c.includes("int")?i.type="integer":i.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=m,i.exclusiveMinimum=!0):i.exclusiveMinimum=m),typeof s=="number"&&(i.minimum=s,typeof m=="number"&&t.target!=="draft-04"&&(m>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=f,i.exclusiveMaximum=!0):i.exclusiveMaximum=f),typeof l=="number"&&(i.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},pN=(e,t,n,r)=>{n.type="boolean"},GB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},KB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},mN=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},gN=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ZB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},vN=(e,t,n,r)=>{n.not={}},_N=(e,t,n,r)=>{},yN=(e,t,n,r)=>{},YB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},bN=(e,t,n,r)=>{const i=e._zod.def,s=HP(i.entries);s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},wN=(e,t,n,r)=>{const i=e._zod.def,s=[];for(const l of i.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");s.push(Number(l))}else s.push(l);if(s.length!==0)if(s.length===1){const l=s[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),s.every(l=>typeof l=="boolean")&&(n.type="boolean"),s.every(l=>l===null)&&(n.type="null"),n.enum=s},WB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},QB=(e,t,n,r)=>{const i=n,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=s.source},SN=(e,t,n,r)=>{const i=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:c,mime:d}=e._zod.bag;l!==void 0&&(s.minLength=l),c!==void 0&&(s.maxLength=c),d?d.length===1?(s.contentMediaType=d[0],Object.assign(i,s)):(Object.assign(i,s),i.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(i,s)},XB=(e,t,n,r)=>{n.type="boolean"},EN=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},JB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},xN=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},eV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},tV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},RN=(e,t,n,r)=>{const i=n,s=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof c=="number"&&(i.maxItems=c),i.type="array",i.items=nn(s.element,t,{...r,path:[...r.path,"items"]})},ON=(e,t,n,r)=>{const i=n,s=e._zod.def;i.type="object",i.properties={};const l=s.shape;for(const f in l)i.properties[f]=nn(l[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(l)),d=new Set([...c].filter(f=>{const m=s.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(i.required=Array.from(d)),s.catchall?._zod.def.type==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=nn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},TN=(e,t,n,r)=>{const i=e._zod.def,s=i.inclusive===!1,l=i.options.map((c,d)=>nn(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",d]}));s?n.oneOf=l:n.anyOf=l},CN=(e,t,n,r)=>{const i=e._zod.def,s=nn(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=nn(i.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,d=[...c(s)?s.allOf:[s],...c(l)?l.allOf:[l]];n.allOf=d},AN=(e,t,n,r)=>{const i=n,s=e._zod.def;i.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=s.items.map((g,v)=>nn(g,t,{...r,path:[...r.path,l,v]})),f=s.rest?nn(s.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=d,f&&(i.items=f)):t.target==="openapi-3.0"?(i.items={anyOf:d},f&&i.items.anyOf.push(f),i.minItems=d.length,f||(i.maxItems=d.length)):(i.items=d,f&&(i.additionalItems=f));const{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(i.minItems=m),typeof p=="number"&&(i.maxItems=p)},IN=(e,t,n,r)=>{const i=n,s=e._zod.def;i.type="object";const l=s.keyType,d=l._zod.bag?.patterns;if(s.mode==="loose"&&d&&d.size>0){const m=nn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const p of d)i.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=nn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=nn(s.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&&(i.required=m)}},MN=(e,t,n,r)=>{const i=e._zod.def,s=nn(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},PN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},NN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},kN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},DN=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},LN=(e,t,n,r)=>{const i=e._zod.def,s=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;nn(s,t,r);const l=t.seen.get(e);l.ref=s},$N=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType,n.readOnly=!0},nV=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},bw=(e,t,n,r)=>{const i=e._zod.def;nn(i.innerType,t,r);const s=t.seen.get(e);s.ref=i.innerType},jN=(e,t,n,r)=>{const i=e._zod.innerType;nn(i,t,r);const s=t.seen.get(e);s.ref=i},_T={string:fN,number:hN,boolean:pN,bigint:GB,symbol:KB,null:mN,undefined:gN,void:ZB,never:vN,any:_N,unknown:yN,date:YB,enum:bN,literal:wN,nan:WB,template_literal:QB,file:SN,success:XB,custom:EN,function:JB,transform:xN,map:eV,set:tV,array:RN,object:ON,union:TN,intersection:CN,tuple:AN,record:IN,nullable:MN,nonoptional:PN,default:NN,prefault:kN,catch:DN,pipe:LN,readonly:$N,promise:nV,optional:bw,lazy:jN};function cle(e,t){if("_idmap"in e){const r=e,i=Nm({...t,processors:_T}),s={};for(const d of r._idmap.entries()){const[f,m]=d;nn(m,i)}const l={},c={registry:r,uri:t?.uri,defs:s};i.external=c;for(const d of r._idmap.entries()){const[f,m]=d;km(i,m),l[f]=Dm(i,m)}if(Object.keys(s).length>0){const d=i.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:s}}return{schemas:l}}const n=Nm({...t,processors:_T});return nn(e,n),km(n,e),Dm(n,e)}const rV=_e("ZodISODateTime",(e,t)=>{J9.init(e,t),_n.init(e,t)});function UN(e){return uB(rV,e)}const iV=_e("ZodISODate",(e,t)=>{eF.init(e,t),_n.init(e,t)});function oV(e){return dB(iV,e)}const sV=_e("ZodISOTime",(e,t)=>{tF.init(e,t),_n.init(e,t)});function aV(e){return fB(sV,e)}const lV=_e("ZodISODuration",(e,t)=>{nF.init(e,t),_n.init(e,t)});function cV(e){return hB(lV,e)}const uV=(e,t)=>{_w.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Uz(e,n)},flatten:{value:n=>jz(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xb,2)}},isEmpty:{get(){return e.issues.length===0}}})},ji=_e("ZodError",uV,{Parent:Error}),dV=kg(ji),fV=Dg(ji),hV=Lg(ji),pV=$g(ji),mV=qz(ji),gV=Hz(ji),vV=Gz(ji),_V=Kz(ji),yV=Zz(ji),bV=Yz(ji),wV=Wz(ji),SV=Qz(ji),Gt=_e("ZodType",(e,t)=>(Bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Lm(e,"input"),output:Lm(e,"output")}}),e.toJSONSchema=qB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(da(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)=>fa(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>dV(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>hV(e,n,r),e.parseAsync=async(n,r)=>fV(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>pV(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>mV(e,n,r),e.decode=(n,r)=>gV(e,n,r),e.encodeAsync=async(n,r)=>vV(e,n,r),e.decodeAsync=async(n,r)=>_V(e,n,r),e.safeEncode=(n,r)=>yV(e,n,r),e.safeDecode=(n,r)=>bV(e,n,r),e.safeEncodeAsync=async(n,r)=>wV(e,n,r),e.safeDecodeAsync=async(n,r)=>SV(e,n,r),e.refine=(n,r)=>e.check(vq(n,r)),e.superRefine=n=>e.check(_q(n)),e.overwrite=n=>e.check(Zc(n)),e.optional=()=>En(e),e.exactOptional=()=>rq(e),e.nullable=()=>wT(e),e.nullish=()=>En(wT(e)),e.nonoptional=n=>cq(e,n),e.array=()=>Ie(e),e.or=n=>rn([e,n]),e.and=n=>Ew(e,n),e.transform=n=>Tb(e,KN(n)),e.default=n=>sq(e,n),e.prefault=n=>lq(e,n),e.catch=n=>dq(e,n),e.pipe=n=>Tb(e,n),e.readonly=()=>pq(e),e.describe=n=>{const r=e.clone();return md.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return md.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return md.get(e);const r=e.clone();return md.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),zN=_e("_ZodString",(e,t)=>{yw.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(r,i,s)=>fN(e,r,i);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(OB(...r)),e.includes=(...r)=>e.check(AB(...r)),e.startsWith=(...r)=>e.check(IB(...r)),e.endsWith=(...r)=>e.check(MB(...r)),e.min=(...r)=>e.check(Pm(...r)),e.max=(...r)=>e.check(uN(...r)),e.length=(...r)=>e.check(dN(...r)),e.nonempty=(...r)=>e.check(Pm(1,...r)),e.lowercase=r=>e.check(TB(r)),e.uppercase=r=>e.check(CB(r)),e.trim=()=>e.check(kB()),e.normalize=(...r)=>e.check(NB(...r)),e.toLowerCase=()=>e.check(DB()),e.toUpperCase=()=>e.check(LB()),e.slugify=()=>e.check($B())}),EV=_e("ZodString",(e,t)=>{yw.init(e,t),zN.init(e,t),e.email=n=>e.check(qF(xV,n)),e.url=n=>e.check(cN(FN,n)),e.jwt=n=>e.check(cB(zV,n)),e.emoji=n=>e.check(YF(OV,n)),e.guid=n=>e.check(pT(yT,n)),e.uuid=n=>e.check(HF(Yh,n)),e.uuidv4=n=>e.check(GF(Yh,n)),e.uuidv6=n=>e.check(KF(Yh,n)),e.uuidv7=n=>e.check(ZF(Yh,n)),e.nanoid=n=>e.check(WF(TV,n)),e.guid=n=>e.check(pT(yT,n)),e.cuid=n=>e.check(QF(CV,n)),e.cuid2=n=>e.check(XF(AV,n)),e.ulid=n=>e.check(JF(IV,n)),e.base64=n=>e.check(sB($V,n)),e.base64url=n=>e.check(aB(jV,n)),e.xid=n=>e.check(eB(MV,n)),e.ksuid=n=>e.check(tB(PV,n)),e.ipv4=n=>e.check(nB(NV,n)),e.ipv6=n=>e.check(rB(kV,n)),e.cidrv4=n=>e.check(iB(DV,n)),e.cidrv6=n=>e.check(oB(LV,n)),e.e164=n=>e.check(lB(UV,n)),e.datetime=n=>e.check(UN(n)),e.date=n=>e.check(oV(n)),e.time=n=>e.check(aV(n)),e.duration=n=>e.check(cV(n))});function z(e){return VF(EV,e)}const _n=_e("ZodStringFormat",(e,t)=>{hn.init(e,t),zN.init(e,t)}),xV=_e("ZodEmail",(e,t)=>{q9.init(e,t),_n.init(e,t)}),yT=_e("ZodGUID",(e,t)=>{B9.init(e,t),_n.init(e,t)}),Yh=_e("ZodUUID",(e,t)=>{V9.init(e,t),_n.init(e,t)}),FN=_e("ZodURL",(e,t)=>{H9.init(e,t),_n.init(e,t)});function RV(e){return cN(FN,e)}const OV=_e("ZodEmoji",(e,t)=>{G9.init(e,t),_n.init(e,t)}),TV=_e("ZodNanoID",(e,t)=>{K9.init(e,t),_n.init(e,t)}),CV=_e("ZodCUID",(e,t)=>{Z9.init(e,t),_n.init(e,t)}),AV=_e("ZodCUID2",(e,t)=>{Y9.init(e,t),_n.init(e,t)}),IV=_e("ZodULID",(e,t)=>{W9.init(e,t),_n.init(e,t)}),MV=_e("ZodXID",(e,t)=>{Q9.init(e,t),_n.init(e,t)}),PV=_e("ZodKSUID",(e,t)=>{X9.init(e,t),_n.init(e,t)}),NV=_e("ZodIPv4",(e,t)=>{rF.init(e,t),_n.init(e,t)}),kV=_e("ZodIPv6",(e,t)=>{iF.init(e,t),_n.init(e,t)}),DV=_e("ZodCIDRv4",(e,t)=>{oF.init(e,t),_n.init(e,t)}),LV=_e("ZodCIDRv6",(e,t)=>{sF.init(e,t),_n.init(e,t)}),$V=_e("ZodBase64",(e,t)=>{aF.init(e,t),_n.init(e,t)}),jV=_e("ZodBase64URL",(e,t)=>{cF.init(e,t),_n.init(e,t)}),UV=_e("ZodE164",(e,t)=>{uF.init(e,t),_n.init(e,t)}),zV=_e("ZodJWT",(e,t)=>{fF.init(e,t),_n.init(e,t)}),ww=_e("ZodNumber",(e,t)=>{iN.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(r,i,s)=>hN(e,r,i),e.gt=(r,i)=>e.check(gT(r,i)),e.gte=(r,i)=>e.check(G_(r,i)),e.min=(r,i)=>e.check(G_(r,i)),e.lt=(r,i)=>e.check(mT(r,i)),e.lte=(r,i)=>e.check(H_(r,i)),e.max=(r,i)=>e.check(H_(r,i)),e.int=r=>e.check(bT(r)),e.safe=r=>e.check(bT(r)),e.positive=r=>e.check(gT(0,r)),e.nonnegative=r=>e.check(G_(0,r)),e.negative=r=>e.check(mT(0,r)),e.nonpositive=r=>e.check(H_(0,r)),e.multipleOf=(r,i)=>e.check(vT(r,i)),e.step=(r,i)=>e.check(vT(r,i)),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 St(e){return pB(ww,e)}const FV=_e("ZodNumberFormat",(e,t)=>{hF.init(e,t),ww.init(e,t)});function bT(e){return gB(FV,e)}const BN=_e("ZodBoolean",(e,t)=>{pF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pN(e,n,r)});function Pt(e){return vB(BN,e)}const BV=_e("ZodUndefined",(e,t)=>{mF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gN(e,n)});function ule(e){return yB(BV,e)}const VV=_e("ZodNull",(e,t)=>{gF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mN(e,n,r)});function VN(e){return bB(VV,e)}const qV=_e("ZodAny",(e,t)=>{vF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>_N()});function HV(){return wB(qV)}const GV=_e("ZodUnknown",(e,t)=>{_F.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yN()});function Xt(){return SB(GV)}const KV=_e("ZodNever",(e,t)=>{yF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vN(e,n,r)});function qN(e){return EB(KV,e)}const ZV=_e("ZodArray",(e,t)=>{bF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RN(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(Pm(n,r)),e.nonempty=n=>e.check(Pm(1,n)),e.max=(n,r)=>e.check(uN(n,r)),e.length=(n,r)=>e.check(dN(n,r)),e.unwrap=()=>e.element});function Ie(e,t){return jB(ZV,e,t)}const Sw=_e("ZodObject",(e,t)=>{SF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ON(e,n,r,i),Ct(e,"shape",()=>t.shape),e.keyof=()=>dn(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Xt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Xt()}),e.strict=()=>e.clone({...e._zod.def,catchall:qN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Nz(e,n),e.safeExtend=n=>kz(e,n),e.merge=n=>Dz(e,n),e.pick=n=>Mz(e,n),e.omit=n=>Pz(e,n),e.partial=(...n)=>Lz(ZN,e,n[0]),e.required=(...n)=>$z(YN,e,n[0])});function Ee(e,t){const n={type:"object",shape:e??{},...Fe(t)};return new Sw(n)}function dle(e,t){return new Sw({type:"object",shape:e,catchall:qN(),...Fe(t)})}function hr(e,t){return new Sw({type:"object",shape:e,catchall:Xt(),...Fe(t)})}const HN=_e("ZodUnion",(e,t)=>{aN.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TN(e,n,r,i),e.options=t.options});function rn(e,t){return new HN({type:"union",options:e,...Fe(t)})}const YV=_e("ZodDiscriminatedUnion",(e,t)=>{HN.init(e,t),EF.init(e,t)});function GN(e,t,n){return new YV({type:"union",options:t,discriminator:e,...Fe(n)})}const WV=_e("ZodIntersection",(e,t)=>{xF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>CN(e,n,r,i)});function Ew(e,t){return new WV({type:"intersection",left:e,right:t})}const QV=_e("ZodTuple",(e,t)=>{RF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AN(e,n,r,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function fle(e,t,n){const r=t instanceof Bt,i=r?n:t,s=r?t:null;return new QV({type:"tuple",items:e,rest:s,...Fe(i)})}const XV=_e("ZodRecord",(e,t)=>{OF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IN(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Ut(e,t,n){return new XV({type:"record",keyType:e,valueType:t,...Fe(n)})}const Ob=_e("ZodEnum",(e,t)=>{TF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(r,i,s)=>bN(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Ob({...t,checks:[],...Fe(i),entries:s})},e.exclude=(r,i)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new Ob({...t,checks:[],...Fe(i),entries:s})}});function dn(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ob({type:"enum",entries:n,...Fe(t)})}const JV=_e("ZodLiteral",(e,t)=>{CF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>wN(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 Ye(e,t){return new JV({type:"literal",values:Array.isArray(e)?e:[e],...Fe(t)})}const eq=_e("ZodFile",(e,t)=>{AF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>SN(e,n,r),e.min=(n,r)=>e.check(RB(n,r)),e.max=(n,r)=>e.check(xB(n,r)),e.mime=(n,r)=>e.check(PB(Array.isArray(n)?n:[n],r))});function hle(e){return UB(eq,e)}const tq=_e("ZodTransform",(e,t)=>{IF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xN(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VP(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Vd(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Vd(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n)):(n.value=i,n)}});function KN(e){return new tq({type:"transform",transform:e})}const ZN=_e("ZodOptional",(e,t)=>{lN.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bw(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function En(e){return new ZN({type:"optional",innerType:e})}const nq=_e("ZodExactOptional",(e,t)=>{MF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bw(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function rq(e){return new nq({type:"optional",innerType:e})}const iq=_e("ZodNullable",(e,t)=>{PF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function wT(e){return new iq({type:"nullable",innerType:e})}const oq=_e("ZodDefault",(e,t)=>{NF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sq(e,t){return new oq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():KP(t)}})}const aq=_e("ZodPrefault",(e,t)=>{kF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function lq(e,t){return new aq({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():KP(t)}})}const YN=_e("ZodNonOptional",(e,t)=>{DF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function cq(e,t){return new YN({type:"nonoptional",innerType:e,...Fe(t)})}const uq=_e("ZodCatch",(e,t)=>{LF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DN(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dq(e,t){return new uq({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const fq=_e("ZodPipe",(e,t)=>{$F.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>LN(e,n,r,i),e.in=t.in,e.out=t.out});function Tb(e,t){return new fq({type:"pipe",in:e,out:t})}const hq=_e("ZodReadonly",(e,t)=>{jF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$N(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function pq(e){return new hq({type:"readonly",innerType:e})}const mq=_e("ZodLazy",(e,t)=>{UF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>jN(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function ul(e){return new mq({type:"lazy",getter:e})}const xw=_e("ZodCustom",(e,t)=>{zF.init(e,t),Gt.init(e,t),e._zod.processJSONSchema=(n,r,i)=>EN(e,n)});function gq(e,t){return zB(xw,e??(()=>!0),t)}function vq(e,t={}){return FB(xw,e,t)}function _q(e){return BB(e)}function ple(e,t={}){const n=new xw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Fe(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 Rw(e,t){return Tb(KN(e),t)}const yq={custom:"custom"};function WN(e){return mB(ww,e)}function ST(e){return _B(BN,e)}function Re(...e){return BP(hw(e))}function bq(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Mn({error:e,localization:t,localizeErrors:n=!0}){var r;const i="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:i;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const s=e.error.code;if(t?.[s])return t[s]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||i}function dl(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Cb(e,t){for(const n in e)if(e[n]===t)return n}function qd(e,t){let n=z().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 wq={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"},Sq={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"},Eq={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."},xq={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."},Rq={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},Oq={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},Tq={...Rq,...Oq},Cq={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Aq={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Iq={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Mq={INVALID_SESSION_TOKEN:"Invalid session token"},Pq={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"},Nq={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"},kq={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"},Dq={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"},Lq={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"},$q={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"},jq={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"},Uq={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",...xq,...wq,...Sq,...Eq,...Tq,...Cq,...Aq,...Iq,...Mq,...Pq,...Nq,...kq,...Dq,...Lq,...$q,...jq},zq={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},ET={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},xT={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function Fq(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 Bq=e=>{switch(e){case"success":return Hq;case"info":return Kq;case"warning":return Gq;case"error":return Zq;default:return null}},Vq=Array(12).fill(0),qq=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},Vq.map((n,r)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Hq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),Gq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.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"})),Kq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),Zq=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.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"})),Yq=ne.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"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Wq=()=>{const[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ab=1;class Qq{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,...i}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ab++,l=this.toasts.find(d=>d.id===s),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...t,id:s,title:r}),{...d,...t,id:s,dismissible:c,title:r}):d):this.addToast({title:r,...i,dismissible:c,id:s}),s},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 i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,l;const c=i.then(async f=>{if(l=["resolve",f],ne.isValidElement(f))s=!1,this.create({id:r,type:"default",message:f});else if(Jq(f)&&!f.ok){s=!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,y=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...y})}else if(f instanceof Error){s=!1;const p=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,y=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...y})}else if(n.success!==void 0){s=!1;const p=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,y=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...y})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){s=!1;const m=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,v=typeof m=="object"&&!ne.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...v})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>c.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||Ab++;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 Kr=new Qq,Xq=(e,t)=>{const n=t?.id||Ab++;return Kr.addToast({title:e,...t,id:n}),n},Jq=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",eH=Xq,tH=()=>Kr.toasts,nH=()=>Kr.getActiveToasts(),RT=Object.assign(eH,{success:Kr.success,info:Kr.info,warning:Kr.warning,error:Kr.error,custom:Kr.custom,message:Kr.message,promise:Kr.promise,dismiss:Kr.dismiss,loading:Kr.loading},{getHistory:tH,getToasts:nH});Fq("[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 Wh(e){return e.label!==void 0}const rH=3,iH="24px",oH="16px",OT=4e3,sH=356,aH=14,lH=45,cH=200;function fo(...e){return e.filter(Boolean).join(" ")}function uH(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const dH=e=>{var t,n,r,i,s,l,c,d,f;const{invert:m,toast:p,unstyled:g,interacting:v,setHeights:y,visibleToasts:b,heights:x,index:S,toasts:E,expanded:R,removeToast:C,defaultRichColors:O,closeButton:A,style:M,cancelButtonStyle:P,actionButtonStyle:L,className:H="",descriptionClassName:j="",duration:B,position:U,gap:Z,expandByDefault:re,classNames:q,icons:W,closeButtonAriaLabel:ee="Close toast"}=e,[ae,Q]=ne.useState(null),[k,K]=ne.useState(null),[V,D]=ne.useState(!1),[F,X]=ne.useState(!1),[fe,pe]=ne.useState(!1),[xe,Ue]=ne.useState(!1),[Y,te]=ne.useState(!1),[ve,se]=ne.useState(0),[we,Oe]=ne.useState(0),nt=ne.useRef(p.duration||B||OT),ot=ne.useRef(null),Be=ne.useRef(null),Xe=S===0,Ne=S+1<=b,Pe=p.type,Me=p.dismissible!==!1,G=p.className||"",oe=p.descriptionClassName||"",le=ne.useMemo(()=>x.findIndex(Ge=>Ge.toastId===p.id)||0,[x,p.id]),Ae=ne.useMemo(()=>{var Ge;return(Ge=p.closeButton)!=null?Ge:A},[p.closeButton,A]),Ce=ne.useMemo(()=>p.duration||B||OT,[p.duration,B]),Te=ne.useRef(0),De=ne.useRef(0),Je=ne.useRef(0),et=ne.useRef(null),[gt,Rt]=U.split("-"),vt=ne.useMemo(()=>x.reduce((Ge,ct,Jt)=>Jt>=le?Ge:Ge+ct.height,0),[x,le]),Nn=Wq(),Mo=p.invert||m,Fi=Pe==="loading";De.current=ne.useMemo(()=>le*Z+vt,[le,vt]),ne.useEffect(()=>{nt.current=Ce},[Ce]),ne.useEffect(()=>{D(!0)},[]),ne.useEffect(()=>{const Ge=Be.current;if(Ge){const ct=Ge.getBoundingClientRect().height;return Oe(ct),y(Jt=>[{toastId:p.id,height:ct,position:p.position},...Jt]),()=>y(Jt=>Jt.filter(Kt=>Kt.toastId!==p.id))}},[y,p.id]),ne.useLayoutEffect(()=>{if(!V)return;const Ge=Be.current,ct=Ge.style.height;Ge.style.height="auto";const Jt=Ge.getBoundingClientRect().height;Ge.style.height=ct,Oe(Jt),y(Kt=>Kt.find(Dt=>Dt.toastId===p.id)?Kt.map(Dt=>Dt.toastId===p.id?{...Dt,height:Jt}:Dt):[{toastId:p.id,height:Jt,position:p.position},...Kt])},[V,p.title,p.description,y,p.id,p.jsx,p.action,p.cancel]);const Ze=ne.useCallback(()=>{X(!0),se(De.current),y(Ge=>Ge.filter(ct=>ct.toastId!==p.id)),setTimeout(()=>{C(p)},cH)},[p,C,y,De]);ne.useEffect(()=>{if(p.promise&&Pe==="loading"||p.duration===1/0||p.type==="loading")return;let Ge;return R||v||Nn?(()=>{if(Je.current<Te.current){const Kt=new Date().getTime()-Te.current;nt.current=nt.current-Kt}Je.current=new Date().getTime()})():nt.current!==1/0&&(Te.current=new Date().getTime(),Ge=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ze()},nt.current)),()=>clearTimeout(Ge)},[R,v,p,Pe,Nn,Ze]),ne.useEffect(()=>{p.delete&&(Ze(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ze,p.delete]);function ut(){var Ge;if(W?.loading){var ct;return ne.createElement("div",{className:fo(q?.loader,p==null||(ct=p.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":Pe==="loading"},W.loading)}return ne.createElement(qq,{className:fo(q?.loader,p==null||(Ge=p.classNames)==null?void 0:Ge.loader),visible:Pe==="loading"})}const Ot=p.icon||W?.[Pe]||Bq(Pe);var it,kt;return ne.createElement("li",{tabIndex:0,ref:Be,className:fo(H,G,q?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,q?.default,q?.[Pe],p==null||(n=p.classNames)==null?void 0:n[Pe]),"data-sonner-toast":"","data-rich-colors":(it=p.richColors)!=null?it:O,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":V,"data-promise":!!p.promise,"data-swiped":Y,"data-removed":F,"data-visible":Ne,"data-y-position":gt,"data-x-position":Rt,"data-index":S,"data-front":Xe,"data-swiping":fe,"data-dismissible":Me,"data-type":Pe,"data-invert":Mo,"data-swipe-out":xe,"data-swipe-direction":k,"data-expanded":!!(R||re&&V),"data-testid":p.testId,style:{"--index":S,"--toasts-before":S,"--z-index":E.length-S,"--offset":`${F?ve:De.current}px`,"--initial-height":re?"auto":`${we}px`,...M,...p.style},onDragEnd:()=>{pe(!1),Q(null),et.current=null},onPointerDown:Ge=>{Ge.button!==2&&(Fi||!Me||(ot.current=new Date,se(De.current),Ge.target.setPointerCapture(Ge.pointerId),Ge.target.tagName!=="BUTTON"&&(pe(!0),et.current={x:Ge.clientX,y:Ge.clientY})))},onPointerUp:()=>{var Ge,ct,Jt;if(xe||!Me)return;et.current=null;const Kt=Number(((Ge=Be.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_r=Number(((ct=Be.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dt=new Date().getTime()-((Jt=ot.current)==null?void 0:Jt.getTime()),on=ae==="x"?Kt:_r,gi=Math.abs(on)/Dt;if(Math.abs(on)>=lH||gi>.11){se(De.current),p.onDismiss==null||p.onDismiss.call(p,p),K(ae==="x"?Kt>0?"right":"left":_r>0?"down":"up"),Ze(),Ue(!0);return}else{var rr,Lr;(rr=Be.current)==null||rr.style.setProperty("--swipe-amount-x","0px"),(Lr=Be.current)==null||Lr.style.setProperty("--swipe-amount-y","0px")}te(!1),pe(!1),Q(null)},onPointerMove:Ge=>{var ct,Jt,Kt;if(!et.current||!Me||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const Dt=Ge.clientY-et.current.y,on=Ge.clientX-et.current.x;var gi;const rr=(gi=e.swipeDirections)!=null?gi:uH(U);!ae&&(Math.abs(on)>1||Math.abs(Dt)>1)&&Q(Math.abs(on)>Math.abs(Dt)?"x":"y");let Lr={x:0,y:0};const pl=Bi=>1/(1.5+Math.abs(Bi)/20);if(ae==="y"){if(rr.includes("top")||rr.includes("bottom"))if(rr.includes("top")&&Dt<0||rr.includes("bottom")&&Dt>0)Lr.y=Dt;else{const Bi=Dt*pl(Dt);Lr.y=Math.abs(Bi)<Math.abs(Dt)?Bi:Dt}}else if(ae==="x"&&(rr.includes("left")||rr.includes("right")))if(rr.includes("left")&&on<0||rr.includes("right")&&on>0)Lr.x=on;else{const Bi=on*pl(on);Lr.x=Math.abs(Bi)<Math.abs(on)?Bi:on}(Math.abs(Lr.x)>0||Math.abs(Lr.y)>0)&&te(!0),(Jt=Be.current)==null||Jt.style.setProperty("--swipe-amount-x",`${Lr.x}px`),(Kt=Be.current)==null||Kt.style.setProperty("--swipe-amount-y",`${Lr.y}px`)}},Ae&&!p.jsx&&Pe!=="loading"?ne.createElement("button",{"aria-label":ee,"data-disabled":Fi,"data-close-button":!0,onClick:Fi||!Me?()=>{}:()=>{Ze(),p.onDismiss==null||p.onDismiss.call(p,p)},className:fo(q?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(kt=W?.close)!=null?kt:Yq):null,(Pe||p.icon||p.promise)&&p.icon!==null&&(W?.[Pe]!==null||p.icon)?ne.createElement("div",{"data-icon":"",className:fo(q?.icon,p==null||(i=p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ut():null,p.type!=="loading"?Ot:null):null,ne.createElement("div",{"data-content":"",className:fo(q?.content,p==null||(s=p.classNames)==null?void 0:s.content)},ne.createElement("div",{"data-title":"",className:fo(q?.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?ne.createElement("div",{"data-description":"",className:fo(j,oe,q?.description,p==null||(c=p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),ne.isValidElement(p.cancel)?p.cancel:p.cancel&&Wh(p.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:Ge=>{Wh(p.cancel)&&Me&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ge),Ze())},className:fo(q?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ne.isValidElement(p.action)?p.action:p.action&&Wh(p.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||L,onClick:Ge=>{Wh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ge),!Ge.defaultPrevented&&Ze())},className:fo(q?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function TT(){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 fH(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,l=s?"--mobile-offset":"--offset",c=s?oH:iH;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}`]=c:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const hH=ne.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:v,duration:y,style:b,visibleToasts:x=rH,toastOptions:S,dir:E=TT(),gap:R=aH,icons:C,containerAriaLabel:O="Notifications"}=t,[A,M]=ne.useState([]),P=ne.useMemo(()=>r?A.filter(V=>V.toasterId===r):A.filter(V=>!V.toasterId),[A,r]),L=ne.useMemo(()=>Array.from(new Set([s].concat(P.filter(V=>V.position).map(V=>V.position)))),[P,s]),[H,j]=ne.useState([]),[B,U]=ne.useState(!1),[Z,re]=ne.useState(!1),[q,W]=ne.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=ne.useRef(null),ae=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=ne.useRef(null),k=ne.useRef(!1),K=ne.useCallback(V=>{M(D=>{var F;return(F=D.find(X=>X.id===V.id))!=null&&F.delete||Kr.dismiss(V.id),D.filter(({id:X})=>X!==V.id)})},[]);return ne.useEffect(()=>Kr.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{M(D=>D.map(F=>F.id===V.id?{...F,delete:!0}:F))});return}setTimeout(()=>{fP.flushSync(()=>{M(D=>{const F=D.findIndex(X=>X.id===V.id);return F!==-1?[...D.slice(0,F),{...D[F],...V},...D.slice(F+1)]:[V,...D]})})})}),[A]),ne.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 V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{V.addListener(({matches:F})=>{try{W(F?"dark":"light")}catch(X){console.error(X)}})}},[g]),ne.useEffect(()=>{A.length<=1&&U(!1)},[A]),ne.useEffect(()=>{const V=D=>{var F;if(l.every(pe=>D[pe]||D.code===pe)){var fe;U(!0),(fe=ee.current)==null||fe.focus()}D.code==="Escape"&&(document.activeElement===ee.current||(F=ee.current)!=null&&F.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[l]),ne.useEffect(()=>{if(ee.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,k.current=!1)}},[ee.current]),ne.createElement("section",{ref:n,"aria-label":`${O} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((V,D)=>{var F;const[X,fe]=V.split("-");return P.length?ne.createElement("ol",{key:V,dir:E==="auto"?TT():E,tabIndex:-1,ref:ee,className:f,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":X,"data-x-position":fe,style:{"--front-toast-height":`${((F=H[0])==null?void 0:F.height)||0}px`,"--width":`${sH}px`,"--gap":`${R}px`,...b,...fH(m,p)},onBlur:pe=>{k.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(k.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||k.current||(k.current=!0,Q.current=pe.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{Z||U(!1)},onDragEnd:()=>U(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||re(!0)},onPointerUp:()=>re(!1)},P.filter(pe=>!pe.position&&D===0||pe.position===V).map((pe,xe)=>{var Ue,Y;return ne.createElement(dH,{key:pe.id,icons:C,index:xe,toast:pe,defaultRichColors:v,duration:(Ue=S?.duration)!=null?Ue:y,className:S?.className,descriptionClassName:S?.descriptionClassName,invert:i,visibleToasts:x,closeButton:(Y=S?.closeButton)!=null?Y:d,interacting:Z,position:V,style:S?.style,unstyled:S?.unstyled,classNames:S?.classNames,cancelButtonStyle:S?.cancelButtonStyle,actionButtonStyle:S?.actionButtonStyle,closeButtonAriaLabel:S?.closeButtonAriaLabel,removeToast:K,toasts:P.filter(te=>te.position==pe.position),heights:H.filter(te=>te.position==pe.position),setHeights:j,expandByDefault:c,gap:R,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),QN=I.createContext({});function XN(){return I.useContext(QN)}var K_,CT;function pH(){if(CT)return K_;CT=1;var e=function(){};return K_=e,K_}var mH=pH();const gH=la(mH);function vH({async:e,appendTo:t,defer:n,id:r,nonce:i,src:s}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),i&&l.setAttribute("nonce",i),l.src=s,(t==="head"?document.head:document.body).appendChild(l)}var _H=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let Id=null,Hd=!1;const $m=new Set,jm=new Set,yH=typeof window<"u",Cc="___grecaptcha_cfg",JN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function bH(){if(!yH)return;function e(n){if(Hd)n();else{window[Cc]||(window[Cc]={});const r=window[Cc];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(){Hd=!0;for(const n of jm)n();jm.clear()}window[JN]=t}function wH({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:i=!1}){const s=i?"recaptcha.net":"google.com",l=r?"enterprise.js":"api.js",c=new URLSearchParams({render:n});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${s}/recaptcha/${l}?${c.toString()}`}function SH({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:i}){const s={id:"google-recaptcha-v3"},l=wH({language:e,onLoadCallbackName:JN,render:t,useEnterprise:r,useRecaptchaNet:i});if(Id){if(Id!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Id=l,vH(Object.assign(Object.assign(Object.assign({},s),n),{src:l}))}function EH(e){if(!window[Cc])return;const t=window[Cc];t.clients&&delete t.clients[e]}function xH(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,i=_H(t,["onLoadCallback","onLoadCallbackName"]);if($m.size===0&&bH(),SH(i),$m.add(e),n&&(Hd?n():jm.add(n)),r){let s=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};Hd?s():jm.add(s)}}function RH(e){var t,n,r;$m.delete(e),$m.size===0&&(window.grecaptcha=void 0,window[Cc]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Id}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Id=null,Hd=!1)}let AT=!1;function OH({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:i,useEnterprise:s,useRecaptchaNet:l}){var c,d,f,m,p,g,v;const y=I.useId(),[b,x]=I.useState(null),[S,E]=I.useState(null),R=I.useRef(!1);I.useEffect(()=>{function M(){var P;const L=s?(P=window.grecaptcha)===null||P===void 0?void 0:P.enterprise:window.grecaptcha;if(!L)throw new Error("reCAPTCHA not found");if(!L.ready)throw new Error("reCAPTCHA ready callback not found");L.ready(()=>{x(L)})}return xH(y,{language:n,onLoadCallback:M,onLoadCallbackName:i?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:i?.appendTo,async:i?.async,defer:i?.defer,id:i?.id,nonce:i?.nonce},useEnterprise:s,useRecaptchaNet:l}),()=>{RH(y),x(null)}},[e?.element,y,n,r,i?.appendTo,i?.async,i?.defer,i?.id,i?.nonce,i?.onLoadCallbackName,s,l]),I.useEffect(()=>{var M,P,L;if(!e?.element||!b?.render)return;const H={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((M=e.parameters)===null||M===void 0?void 0:M.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},j=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!j)throw new Error("reCAPTCHA container element not found");const B=b.render(j,H);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&(AT||(gH(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),AT=!0),(L=j.querySelector(".grecaptcha-badge"))===null||L===void 0||L.style.setProperty("display","none")),E(B),R.current=!0,()=>{E(null),R.current=!1,EH(B),j.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.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,(v=e?.parameters)===null||v===void 0?void 0:v.theme,b,r]);const C=!!e?.element,O=C?S:r,A=I.useMemo(()=>O!==null&&b?.execute?M=>{if(O===null||!b?.execute)throw new Error("reCAPTCHA has not been loaded");return C&&!R.current?(console.warn("Client ID not mounted"),null):b.execute(O,{action:M})}:void 0,[O,b,C]);return T.jsx(QN.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:b},children:t})}var TH=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()}}},Ti=new TH;function CH(){return()=>{}}function us(){return I.useSyncExternalStore(CH,()=>!0,()=>!1)}function e4(){const[e,t]=I.useState();return I.useEffect(()=>{const n=()=>{const i=document.documentElement.getAttribute("lang");t(i??void 0)};n();const r=new MutationObserver(i=>{for(const s of i)s.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function Ow(){const[e,t]=I.useState("light");return I.useEffect(()=>{const n=()=>{var i;const s=document.documentElement.classList.contains("dark")||((i=document.documentElement.getAttribute("style"))==null?void 0:i.includes("color-scheme: dark"));t(s?"dark":"light")};n();const r=new MutationObserver(i=>{for(const s of i)(s.attributeName==="style"||s.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function AH({children:e}){const t=us(),{captcha:n}=I.useContext(ht);return n?.provider!=="google-recaptcha-v3"?e:T.jsxs(OH,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&T.jsx("style",{children:`
|
|
49
49
|
.grecaptcha-badge {
|
|
50
50
|
visibility: hidden;
|
|
51
51
|
border-radius: var(--radius) !important;
|
|
@@ -58,7 +58,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
58
58
|
.dark .grecaptcha-badge {
|
|
59
59
|
border-color: var(--input) !important;
|
|
60
60
|
}
|
|
61
|
-
`}),T.jsx(IH,{}),e]})}function IH(){const{executeRecaptcha:e}=XN(),{theme:t}=Ow(),{lang:n}=e3();return I.useEffect(()=>{if(!e)return;(async()=>{const i=document.querySelector("iframe[title='reCAPTCHA']");if(i){const s=new URL(i.src);s.searchParams.set("theme",t),n&&s.searchParams.set("hl",n),i.src=s.toString()}})()},[e,t,n]),null}function MH({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=I.useContext(ht),{pathMode:i,slug:s}=t||{};let l,c,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(i==="slug"){const v=e||s;l=m?.find(y=>y.slug===v),c=p,d=g}else{const{data:v,isPending:y,isRefetching:b,refetch:x}=n();f=x,l=v,c=y,d=b}return I.useMemo(()=>({data:l,isPending:c,isRefetching:d,refetch:f}),[l,c,d,f])}var PH=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:i}=I.useContext(ht),{slug:s,pathMode:l,personalPath:c}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=MH(),{refetch:v}=e(),{data:y}=e();return I.useEffect(()=>{d?.user.id&&(f||y)&&(g?.(),v?.())},[d?.user.id]),I.useEffect(()=>{p||m||s&&l==="slug"&&!f&&r(c||i)},[f,p,m,s,l,c,r,i]),null},NH=({href:e,className:t,children:n})=>T.jsx("a",{className:t,href:e,children:n}),kH=e=>{window.location.href=e},DH=e=>{window.location.replace(e)},LH=({variant:e="default",message:t})=>{e==="default"?RT(t):RT[e](t)},ht=I.createContext({}),$H=({children:e,authClient:t,account:n,avatar:r,deleteUser:i,social:s,genericOAuth:l,basePath:c="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:v=3600*24,hooks:y,mutators:b,localization:x,localizeErrors:S=!0,nameRequired:E=!0,organization:R,teams:C,signUp:O=!0,toast:A=LH,viewPaths:M,navigate:P,replace:L,Link:H=NH,emailVerification:j,...B})=>{const U=t,Z=I.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),re=I.useMemo(()=>{if(j)return j===!0?{otp:!1}:{otp:j.otp??!1}},[j]),q=I.useMemo(()=>{var Y;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:ET}:{basePath:((Y=n.basePath)!=null&&Y.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...ET,...n.viewPaths}}},[n]),W=I.useMemo(()=>{if(i)return i===!0?{}:i},[i]),ee=I.useMemo(()=>{if(s)return s},[s]),ae=I.useMemo(()=>{if(l)return l},[l]),Q=I.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),k=I.useMemo(()=>{if(O!==!1)return O===!0||O===void 0?{fields:["name"]}:{fields:O.fields||["name"]}},[O]),K=I.useMemo(()=>{var Y;if(!R)return;if(R===!0)return{basePath:"/organization",viewPaths:xT,customRoles:[]};let te;R.logo===!0?te={extension:"png",size:128}:R.logo&&(te={upload:R.logo.upload,delete:R.logo.delete,extension:R.logo.extension||"png",size:R.logo.size||(R.logo.upload?256:128)});const ve=(Y=R.basePath)!=null&&Y.endsWith("/")?R.basePath.slice(0,-1):R.basePath;return{...R,logo:te,basePath:ve??"/organization",customRoles:R.customRoles||[],viewPaths:{...xT,...R.viewPaths}}},[R]),V=I.useMemo(()=>{var Y,te;if(!(!C||!K))return C===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:C.enabled??!0,customRoles:C.customRoles||[],colors:{count:((Y=C.colors)==null?void 0:Y.count)??5,prefix:((te=C.colors)==null?void 0:te.prefix)??"team"}}},[C,K]),D=I.useMemo(()=>({deleteApiKey:Y=>U.apiKey.delete({...Y,fetchOptions:{throw:!0}}),deletePasskey:Y=>U.passkey.deletePasskey({...Y,fetchOptions:{throw:!0}}),revokeDeviceSession:Y=>U.multiSession.revoke({...Y,fetchOptions:{throw:!0}}),revokeSession:Y=>U.revokeSession({...Y,fetchOptions:{throw:!0}}),setActiveSession:Y=>U.multiSession.setActive({...Y,fetchOptions:{throw:!0}}),updateOrganization:Y=>U.organization.update({...Y,fetchOptions:{throw:!0}}),updateTeam:Y=>U.$fetch("/organization/update-team",{method:"POST",body:Y,throw:!0}),updateUser:Y=>U.updateUser({...Y,fetchOptions:{throw:!0}}),unlinkAccount:Y=>U.unlinkAccount({...Y,fetchOptions:{throw:!0}})}),[U]),F=I.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>ii({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Y=>ii({queryFn:()=>U.accountInfo(Y),cacheKey:`accountInfo:${JSON.stringify(Y)}`}),useListDeviceSessions:()=>ii({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>ii({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>ii({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:Y=>ii({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:Y}),cacheKey:`hasPermission:${JSON.stringify(Y)}`}),useInvitation:Y=>ii({queryFn:()=>U.organization.getInvitation(Y),cacheKey:`invitation:${JSON.stringify(Y)}`}),useListInvitations:Y=>ii({queryFn:()=>{var te;return U.$fetch(`/organization/list-invitations?organizationId=${((te=Y?.query)==null?void 0:te.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Y)}`}),useListUserInvitations:()=>ii({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Y=>ii({queryFn:()=>{var te;return U.$fetch(`/organization/list-members?organizationId=${((te=Y?.query)==null?void 0:te.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Y)}`}),useListTeams:Y=>ii({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${Y?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Y)}`}),useListTeamMembers:Y=>ii({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:Y?.teamId?{query:{teamId:Y.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Y)}`}),useListUserTeams:()=>ii({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),X=I.useMemo(()=>({...zq,...M}),[M]),fe=I.useMemo(()=>({...Uq,...x}),[x]),pe=I.useMemo(()=>({...F,...y}),[F,y]),xe=I.useMemo(()=>({...D,...b}),[D,b]);d=d.endsWith("/")?d.slice(0,-1):d,c=c.endsWith("/")?c.slice(0,-1):c;const{data:Ue}=pe.useSession();return T.jsxs(ht.Provider,{value:{authClient:U,avatar:Z,basePath:c==="/"?"":c,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:Q,deleteUser:W,emailVerification:re,freshAge:v,genericOAuth:ae,hooks:pe,mutators:xe,localization:fe,localizeErrors:S,nameRequired:E,organization:K,teams:V,account:q,signUp:k,social:ee,toast:A,navigate:P||kH,replace:L||P||DH,viewPaths:X,Link:H,...B},children:[Ue&&K&&T.jsx(PH,{}),f?.provider==="google-recaptcha-v3"?T.jsx(AH,{children:e}):e]})};function ii({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:i},toast:s,localization:l,localizeErrors:c}=I.useContext(ht),{data:d,isPending:f}=i(),m=I.useRef(e);m.current=e;const p=t||e.toString(),g=I.useSyncExternalStore(I.useCallback(R=>Ti.subscribe(p,R),[p]),I.useCallback(()=>Ti.get(p),[p]),I.useCallback(()=>Ti.get(p),[p])),v=I.useRef(!1),y=I.useRef(void 0),[b,x]=I.useState(null),S=I.useCallback(async()=>{const R=Ti.getInFlightRequest(p);if(R){try{const O=await R;O.error?x(O.error):x(null)}catch(O){x(O)}return}g?.data!==void 0&&Ti.setRefetching(p,!0);const C=m.current();Ti.setInFlightRequest(p,C);try{const{data:O,error:A}=await C;A?(x(A),s({variant:"error",message:Mn({error:A,localization:l,localizeErrors:c})})):x(null),Ti.set(p,O)}catch(O){const A=O;x(A),s({variant:"error",message:Mn({error:A,localization:l,localizeErrors:c})})}finally{Ti.setRefetching(p,!1),Ti.removeInFlightRequest(p)}},[p,s,l,c,g]);I.useEffect(()=>{var R;const C=(R=d?.user)==null?void 0:R.id;if(!d){Ti.setRefetching(p,!1),Ti.clear(p),v.current=!1,y.current=void 0;return}const O=y.current!==void 0&&y.current!==C;O&&Ti.clear(p);const A=g?.data!==void 0,M=!g||Date.now()-g.timestamp>n;(!v.current||!A||O||A&&M)&&(!A||M)&&(v.current=!0,S()),y.current=C},[d,(r=d?.user)==null?void 0:r.id,p,S,g,n]);const E=f||g?.data===void 0&&!b;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:b,refetch:S}}const jH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),t3=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var UH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const zH=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...c},d)=>I.createElement("svg",{ref:d,...UH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:t3("lucide",i),...c},[...l.map(([f,m])=>I.createElement(f,m)),...Array.isArray(s)?s:[s]]));const Or=(e,t)=>{const n=I.forwardRef(({className:r,...i},s)=>I.createElement(zH,{ref:s,iconNode:t,className:t3(`lucide-${jH(e)}`,r),...i}));return n.displayName=`${e}`,n};const FH=Or("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const BH=Or("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const n3=Or("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const VH=Or("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const qH=Or("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const HH=Or("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const GH=Or("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const Rr=Or("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const r3=Or("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const i3=Or("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const KH=Or("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const ZH=Or("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const IT=Or("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const YH=Or("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const WH=Or("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const QH=Or("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var sf=e=>e.type==="checkbox",Za=e=>e instanceof Date,Dr=e=>e==null;const o3=e=>typeof e=="object";var In=e=>!Dr(e)&&!Array.isArray(e)&&o3(e)&&!Za(e),s3=e=>In(e)&&e.target?sf(e.target)?e.target.checked:e.target.value:e,a3=(e,t)=>t.split(".").some((n,r,i)=>!isNaN(Number(n))&&e.has(i.slice(0,r).join("."))),XH=e=>{const t=e.constructor&&e.constructor.prototype;return In(t)&&t.hasOwnProperty("isPrototypeOf")},Tw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Un(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Tw&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(In(e)&&XH(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=Un(e[i]));return r}var Ug=e=>/^\w*$/.test(e),mn=e=>e===void 0,Cw=e=>Array.isArray(e)?e.filter(Boolean):[],Aw=e=>Cw(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,n)=>{if(!t||!In(e))return n;const i=(Ug(t)?[t]:Aw(t)).reduce((s,l)=>Dr(s)?void 0:s[l],e);return mn(i)||i===e?mn(e[t])?n:e[t]:i},li=e=>typeof e=="boolean",Er=e=>typeof e=="function",Ft=(e,t,n)=>{let r=-1;const i=Ug(t)?[t]:Aw(t),s=i.length,l=s-1;for(;++r<s;){const c=i[r];let d=n;if(r!==l){const f=e[c];d=In(f)||Array.isArray(f)?f:isNaN(+i[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=d,e=e[c]}};const Zs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Xi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Yi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Z_="form",l3="root",Iw=ne.createContext(null);Iw.displayName="HookFormControlContext";const Mw=()=>ne.useContext(Iw);var c3=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const l=s;return t._proxyFormState[l]!==Xi.all&&(t._proxyFormState[l]=!r||Xi.all),n&&(n[l]=!0),e[l]}});return i};const Pw=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function u3(e){const t=Mw(),{control:n=t,disabled:r,name:i,exact:s}=e||{},[l,c]=ne.useState(n._formState),d=ne.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pw(()=>n._subscribe({name:i,formState:d.current,exact:s,callback:f=>{!r&&c({...n._formState,...f})}}),[i,r,s]),ne.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ne.useMemo(()=>c3(l,n,d.current,!1),[l,n])}var xr=e=>typeof e=="string",Ib=(e,t,n,r,i)=>xr(e)?(r&&t.watch.add(e),Le(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Le(n,s))):(r&&(t.watchAll=!0),n),Mb=e=>Dr(e)||!o3(e);function ci(e,t,n=new WeakSet){if(e===t)return!0;if(Mb(e)||Mb(t))return Object.is(e,t);if(Za(e)&&Za(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const l=e[s];if(!(s in t))return!1;if(s!=="ref"){const c=t[s];if(Za(l)&&Za(c)||(In(l)||Array.isArray(l))&&(In(c)||Array.isArray(c))?!ci(l,c,n):!Object.is(l,c))return!1}}return!0}function JH(e){const t=Mw(),{control:n=t,name:r,defaultValue:i,disabled:s,exact:l,compute:c}=e||{},d=ne.useRef(i),f=ne.useRef(c),m=ne.useRef(void 0),p=ne.useRef(n),g=ne.useRef(r);f.current=c;const[v,y]=ne.useState(()=>{const C=n._getWatch(r,d.current);return f.current?f.current(C):C}),b=ne.useCallback(C=>{const O=Ib(r,n._names,C||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),x=ne.useCallback(C=>{if(!s){const O=Ib(r,n._names,C||n._formValues,!1,d.current);if(f.current){const A=f.current(O);ci(A,m.current)||(y(A),m.current=A)}else y(O)}},[n._formValues,n._names,s,r]);Pw(()=>((p.current!==n||!ci(g.current,r))&&(p.current=n,g.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:C=>{x(C.values)}})),[n,l,r,x]),ne.useEffect(()=>n._removeUnmounted());const S=p.current!==n,E=g.current,R=ne.useMemo(()=>{if(s)return null;const C=!S&&!ci(E,r);return S||C?b():null},[s,S,r,E,b]);return R!==null?R:v}function eG(e){const t=Mw(),{name:n,disabled:r,control:i=t,shouldUnregister:s,defaultValue:l,exact:c=!0}=e,d=a3(i._names.array,n),f=ne.useMemo(()=>Le(i._formValues,n,Le(i._defaultValues,n,l)),[i,n,l]),m=JH({control:i,name:n,defaultValue:f,exact:c}),p=u3({control:i,name:n,exact:c}),g=ne.useRef(e),v=ne.useRef(i.register(n,{...e.rules,value:m,...li(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const y=ne.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Le(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Le(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Le(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Le(p.validatingFields,n)},error:{enumerable:!0,get:()=>Le(p.errors,n)}}),[p,n]),b=ne.useCallback(R=>v.current.onChange({target:{value:s3(R),name:n},type:Zs.CHANGE}),[n]),x=ne.useCallback(()=>v.current.onBlur({target:{value:Le(i._formValues,n),name:n},type:Zs.BLUR}),[n,i._formValues]),S=ne.useCallback(R=>{const C=Le(i._fields,n);C&&C._f&&R&&(C._f.ref={focus:()=>Er(R.focus)&&R.focus(),select:()=>Er(R.select)&&R.select(),setCustomValidity:O=>Er(R.setCustomValidity)&&R.setCustomValidity(O),reportValidity:()=>Er(R.reportValidity)&&R.reportValidity()})},[i._fields,n]),E=ne.useMemo(()=>({name:n,value:m,...li(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:b,onBlur:x,ref:S}),[n,r,p.disabled,b,x,S,m]);return ne.useEffect(()=>{const R=i._options.shouldUnregister||s;i.register(n,{...g.current.rules,...li(g.current.disabled)?{disabled:g.current.disabled}:{}});const C=(O,A)=>{const M=Le(i._fields,O);M&&M._f&&(M._f.mount=A)};if(C(n,!0),R){const O=Un(Le(i._options.defaultValues,n,g.current.defaultValue));Ft(i._defaultValues,n,O),mn(Le(i._formValues,n))&&Ft(i._formValues,n,O)}return!d&&i.register(n),()=>{(d?R&&!i._state.action:R)?i.unregister(n):C(n,!1)}},[n,i,d,s]),ne.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),ne.useMemo(()=>({field:E,formState:p,fieldState:y}),[E,p,y])}const tG=e=>e.render(eG(e)),Nw=ne.createContext(null);Nw.displayName="HookFormContext";const nG=()=>ne.useContext(Nw),rG=e=>{const{children:t,watch:n,getValues:r,getFieldState:i,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:v,control:y,register:b,setFocus:x,subscribe:S}=e,E=ne.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:v,control:y,register:b,setFocus:x,subscribe:S}),[l,y,f,i,r,g,b,p,m,s,x,c,S,d,v,n]);return ne.createElement(Nw.Provider,{value:E},ne.createElement(Iw.Provider,{value:E.control},t))};var kw=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Md=e=>Array.isArray(e)?e:[e],MT=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}};function d3(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];if(i&&In(i)&&s){const l=d3(i,s);In(l)&&(n[r]=l)}else e[r]&&(n[r]=s)}return n}var Sr=e=>In(e)&&!Object.keys(e).length,Dw=e=>e.type==="file",Um=e=>{if(!Tw)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},f3=e=>e.type==="select-multiple",Lw=e=>e.type==="radio",iG=e=>Lw(e)||sf(e),Y_=e=>Um(e)&&e.isConnected;function oG(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(Dr(e)){e=void 0;break}e=e[t[r]],r++}return e}function sG(e){for(const t in e)if(e.hasOwnProperty(t)&&!mn(e[t]))return!1;return!0}function zn(e,t){if(xr(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:Ug(t)?[t]:Aw(t),r=n.length===1?e:oG(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(In(r)&&Sr(r)||Array.isArray(r)&&sG(r))&&zn(e,n.slice(0,-1)),e}var aG=e=>{for(const t in e)if(Er(e[t]))return!0;return!1};function h3(e){return Array.isArray(e)||In(e)&&!aG(e)}function Pb(e,t={}){for(const n in e){const r=e[n];h3(r)?(t[n]=Array.isArray(r)?[]:{},Pb(r,t[n])):mn(r)||(t[n]=!0)}return t}function gd(e,t,n){n||(n=Pb(t));for(const r in e){const i=e[r];if(h3(i))mn(t)||Mb(n[r])?n[r]=Pb(i,Array.isArray(i)?[]:{}):gd(i,Dr(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!ci(i,s)}}return n}const PT={value:!1,isValid:!1},NT={value:!0,isValid:!0};var p3=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!mn(e[0].attributes.value)?mn(e[0].value)||e[0].value===""?NT:{value:e[0].value,isValid:!0}:NT:PT}return PT},m3=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>mn(e)?e:t?e===""?NaN:e&&+e:n&&xr(e)?new Date(e):r?r(e):e;const kT={isValid:!1,value:null};var g3=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,kT):kT;function DT(e){const t=e.ref;return Dw(t)?t.files:Lw(t)?g3(e.refs).value:f3(t)?[...t.selectedOptions].map(({value:n})=>n):sf(t)?p3(e.refs).value:m3(mn(t.value)?e.ref.value:t.value,e)}var lG=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cG=(e,t,n,r)=>{const i={};for(const s of e){const l=Le(t,s);l&&Ft(i,s,l._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},zm=e=>e instanceof RegExp,Wu=e=>mn(e)?e:zm(e)?e.source:In(e)?zm(e.value)?e.value.source:e.value:e,LT=e=>({isOnSubmit:!e||e===Xi.onSubmit,isOnBlur:e===Xi.onBlur,isOnChange:e===Xi.onChange,isOnAll:e===Xi.all,isOnTouch:e===Xi.onTouched});const $T="AsyncFunction";var uG=e=>!!e&&!!e.validate&&!!(Er(e.validate)&&e.validate.constructor.name===$T||In(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===$T)),dG=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),jT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Pd=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=Le(e,i);if(s){const{_f:l,...c}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],i)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Pd(c,t))break}else if(In(c)&&Pd(c,t))break}}};function UT(e,t,n){const r=Le(e,n);if(r||Ug(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),l=Le(t,s),c=Le(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(c&&c.type)return{name:s,error:c};if(c&&c.root&&c.root.type)return{name:`${s}.root`,error:c.root};i.pop()}return{name:n}}var fG=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return Sr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||Xi.all))},hG=(e,t,n)=>!e||!t||e===t||Md(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),pG=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,mG=(e,t)=>!Cw(Le(e,t)).length&&zn(e,t),gG=(e,t,n)=>{const r=Md(Le(e,n));return Ft(r,l3,t[n]),Ft(e,n,r),e};function zT(e,t,n="validate"){if(xr(e)||Array.isArray(e)&&e.every(xr)||li(e)&&!e)return{type:n,message:xr(e)?e:"",ref:t}}var ec=e=>In(e)&&!zm(e)?e:{value:e,message:""},FT=async(e,t,n,r,i,s)=>{const{ref:l,refs:c,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:v,validate:y,name:b,valueAsNumber:x,mount:S}=e._f,E=Le(n,b);if(!S||t.has(b))return{};const R=c?c[0]:l,C=B=>{i&&R.reportValidity&&(R.setCustomValidity(li(B)?"":B||""),R.reportValidity())},O={},A=Lw(l),M=sf(l),P=A||M,L=(x||Dw(l))&&mn(l.value)&&mn(E)||Um(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||x&&typeof E=="number"&&isNaN(E),H=kw.bind(null,b,r,O),j=(B,U,Z,re=Yi.maxLength,q=Yi.minLength)=>{const W=B?U:Z;O[b]={type:B?re:q,message:W,ref:l,...H(B?re:q,W)}};if(s?!Array.isArray(E)||!E.length:d&&(!P&&(L||Dr(E))||li(E)&&!E||M&&!p3(c).isValid||A&&!g3(c).isValid)){const{value:B,message:U}=xr(d)?{value:!!d,message:d}:ec(d);if(B&&(O[b]={type:Yi.required,message:U,ref:R,...H(Yi.required,U)},!r))return C(U),O}if(!L&&(!Dr(p)||!Dr(g))){let B,U;const Z=ec(g),re=ec(p);if(!Dr(E)&&!isNaN(E)){const q=l.valueAsNumber||E&&+E;Dr(Z.value)||(B=q>Z.value),Dr(re.value)||(U=q<re.value)}else{const q=l.valueAsDate||new Date(E),W=Q=>new Date(new Date().toDateString()+" "+Q),ee=l.type=="time",ae=l.type=="week";xr(Z.value)&&E&&(B=ee?W(E)>W(Z.value):ae?E>Z.value:q>new Date(Z.value)),xr(re.value)&&E&&(U=ee?W(E)<W(re.value):ae?E<re.value:q<new Date(re.value))}if((B||U)&&(j(!!B,Z.message,re.message,Yi.max,Yi.min),!r))return C(O[b].message),O}if((f||m)&&!L&&(xr(E)||s&&Array.isArray(E))){const B=ec(f),U=ec(m),Z=!Dr(B.value)&&E.length>+B.value,re=!Dr(U.value)&&E.length<+U.value;if((Z||re)&&(j(Z,B.message,U.message),!r))return C(O[b].message),O}if(v&&!L&&xr(E)){const{value:B,message:U}=ec(v);if(zm(B)&&!E.match(B)&&(O[b]={type:Yi.pattern,message:U,ref:l,...H(Yi.pattern,U)},!r))return C(U),O}if(y){if(Er(y)){const B=await y(E,n),U=zT(B,R);if(U&&(O[b]={...U,...H(Yi.validate,U.message)},!r))return C(U.message),O}else if(In(y)){let B={};for(const U in y){if(!Sr(B)&&!r)break;const Z=zT(await y[U](E,n),R,U);Z&&(B={...Z,...H(U,Z.message)},C(Z.message),r&&(O[b]=B))}if(!Sr(B)&&(O[b]={ref:R,...B},!r))return O}}return C(!0),O};const vG={mode:Xi.onSubmit,reValidateMode:Xi.onChange,shouldFocusError:!0};function _G(e={}){let t={...vG,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Er(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=In(t.defaultValues)||In(t.values)?Un(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Un(i),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const v={array:MT(),state:MT()},y=t.criteriaMode===Xi.all,b=G=>oe=>{clearTimeout(f),f=setTimeout(G,oe)},x=async G=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||G)){let oe;t.resolver?(oe=Sr((await L()).errors),S()):oe=await B({fields:r,onlyCheckValid:!0,eventType:Zs.VALID}),oe!==n.isValid&&v.state.next({isValid:oe})}},S=(G,oe)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((G||Array.from(c.mount)).forEach(le=>{le&&(oe?Ft(n.validatingFields,le,oe):zn(n.validatingFields,le))}),v.state.next({validatingFields:n.validatingFields,isValidating:!Sr(n.validatingFields)}))},E=G=>{const oe=gd(i,s),le=lG(G);Ft(n.dirtyFields,le,Le(oe,le))},R=(G,oe=[],le,Ae,Ce=!0,Te=!0)=>{if(Ae&&le&&!t.disabled){if(l.action=!0,Te&&Array.isArray(Le(r,G))){const De=le(Le(r,G),Ae.argA,Ae.argB);Ce&&Ft(r,G,De)}if(Te&&Array.isArray(Le(n.errors,G))){const De=le(Le(n.errors,G),Ae.argA,Ae.argB);Ce&&Ft(n.errors,G,De),mG(n.errors,G)}if((p.touchedFields||g.touchedFields)&&Te&&Array.isArray(Le(n.touchedFields,G))){const De=le(Le(n.touchedFields,G),Ae.argA,Ae.argB);Ce&&Ft(n.touchedFields,G,De)}(p.dirtyFields||g.dirtyFields)&&E(G),v.state.next({name:G,isDirty:Z(G,oe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ft(s,G,oe)},C=(G,oe)=>{Ft(n.errors,G,oe),v.state.next({errors:n.errors})},O=G=>{n.errors=G,v.state.next({errors:n.errors,isValid:!1})},A=(G,oe,le,Ae)=>{const Ce=Le(r,G);if(Ce){const Te=Le(s,G,mn(le)?Le(i,G):le);mn(Te)||Ae&&Ae.defaultChecked||oe?Ft(s,G,oe?Te:DT(Ce._f)):W(G,Te),l.mount&&!l.action&&x()}},M=(G,oe,le,Ae,Ce)=>{let Te=!1,De=!1;const Je={name:G};if(!t.disabled){if(!le||Ae){(p.isDirty||g.isDirty)&&(De=n.isDirty,n.isDirty=Je.isDirty=Z(),Te=De!==Je.isDirty);const et=ci(Le(i,G),oe);De=!!Le(n.dirtyFields,G),et?zn(n.dirtyFields,G):Ft(n.dirtyFields,G,!0),Je.dirtyFields=n.dirtyFields,Te=Te||(p.dirtyFields||g.dirtyFields)&&De!==!et}if(le){const et=Le(n.touchedFields,G);et||(Ft(n.touchedFields,G,le),Je.touchedFields=n.touchedFields,Te=Te||(p.touchedFields||g.touchedFields)&&et!==le)}Te&&Ce&&v.state.next(Je)}return Te?Je:{}},P=(G,oe,le,Ae)=>{const Ce=Le(n.errors,G),Te=(p.isValid||g.isValid)&&li(oe)&&n.isValid!==oe;if(t.delayError&&le?(d=b(()=>C(G,le)),d(t.delayError)):(clearTimeout(f),d=null,le?Ft(n.errors,G,le):zn(n.errors,G)),(le?!ci(Ce,le):Ce)||!Sr(Ae)||Te){const De={...Ae,...Te&&li(oe)?{isValid:oe}:{},errors:n.errors,name:G};n={...n,...De},v.state.next(De)}},L=async G=>(S(G,!0),await t.resolver(s,t.context,cG(G||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),H=async G=>{const{errors:oe}=await L(G);if(S(G),G)for(const le of G){const Ae=Le(oe,le);Ae?Ft(n.errors,le,Ae):zn(n.errors,le)}else n.errors=oe;return oe},j=async({name:G,eventType:oe})=>{if(e.validate){const le=await e.validate({formValues:s,formState:n,name:G,eventType:oe});if(In(le))for(const Ae in le)le[Ae]&&fe(`${Z_}.${Ae}`,{message:xr(le.message)?le.message:"",type:Yi.validate});else xr(le)||!le?fe(Z_,{message:le||"",type:Yi.validate}):X(Z_);return le}return!0},B=async({fields:G,onlyCheckValid:oe,name:le,eventType:Ae,context:Ce={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ce.runRootValidation=!0,!await j({name:le,eventType:Ae})&&(Ce.valid=!1,oe)))return Ce.valid;for(const Te in G){const De=G[Te];if(De){const{_f:Je,...et}=De;if(Je){const gt=c.array.has(Je.name),Rt=De._f&&uG(De._f);Rt&&p.validatingFields&&S([Je.name],!0);const vt=await FT(De,c.disabled,s,y,t.shouldUseNativeValidation&&!oe,gt);if(Rt&&p.validatingFields&&S([Je.name]),vt[Je.name]&&(Ce.valid=!1,oe)||(!oe&&(Le(vt,Je.name)?gt?gG(n.errors,vt,Je.name):Ft(n.errors,Je.name,vt[Je.name]):zn(n.errors,Je.name)),e.shouldUseNativeValidation&&vt[Je.name]))break}!Sr(et)&&await B({context:Ce,onlyCheckValid:oe,fields:et,name:Te,eventType:Ae})}}return Ce.valid},U=()=>{for(const G of c.unMount){const oe=Le(r,G);oe&&(oe._f.refs?oe._f.refs.every(le=>!Y_(le)):!Y_(oe._f.ref))&&Y(G)}c.unMount=new Set},Z=(G,oe)=>!t.disabled&&(G&&oe&&Ft(s,G,oe),!ci(D(),i)),re=(G,oe,le)=>Ib(G,c,{...l.mount?s:mn(oe)?i:xr(G)?{[G]:oe}:oe},le,oe),q=G=>Cw(Le(l.mount?s:i,G,t.shouldUnregister?Le(i,G,[]):[])),W=(G,oe,le={})=>{const Ae=Le(r,G);let Ce=oe;if(Ae){const Te=Ae._f;Te&&(!Te.disabled&&Ft(s,G,m3(oe,Te)),Ce=Um(Te.ref)&&Dr(oe)?"":oe,f3(Te.ref)?[...Te.ref.options].forEach(De=>De.selected=Ce.includes(De.value)):Te.refs?sf(Te.ref)?Te.refs.forEach(De=>{(!De.defaultChecked||!De.disabled)&&(Array.isArray(Ce)?De.checked=!!Ce.find(Je=>Je===De.value):De.checked=Ce===De.value||!!Ce)}):Te.refs.forEach(De=>De.checked=De.value===Ce):Dw(Te.ref)?Te.ref.value="":(Te.ref.value=Ce,Te.ref.type||v.state.next({name:G,values:Un(s)})))}(le.shouldDirty||le.shouldTouch)&&M(G,Ce,le.shouldTouch,le.shouldDirty,!0),le.shouldValidate&&V(G)},ee=(G,oe,le)=>{for(const Ae in oe){if(!oe.hasOwnProperty(Ae))return;const Ce=oe[Ae],Te=G+"."+Ae,De=Le(r,Te);(c.array.has(G)||In(Ce)||De&&!De._f)&&!Za(Ce)?ee(Te,Ce,le):W(Te,Ce,le)}},ae=(G,oe,le={})=>{const Ae=Le(r,G),Ce=c.array.has(G),Te=Un(oe),De=Le(s,G),Je=ci(De,Te);if(Ft(s,G,Te),Ce)v.array.next({name:G,values:Un(s)}),le.shouldDirty&&(E(G),v.state.next({name:G,dirtyFields:n.dirtyFields,isDirty:Z(G,Te)}));else{const et=Array.isArray(Te)&&!Te.length||Sr(Te);!Ae||Ae._f||Dr(Te)||et?W(G,Te,le):ee(G,Te,le)}Je||(jT(G,c)?v.state.next({...n,name:G,values:Un(s)}):v.state.next({name:l.mount?G:void 0,values:Un(s)}))},Q=G=>{const oe=Er(G)?G(s):G;ci(s,oe)||(s={...s,...oe},v.state.next({...n,values:s}))},k=async G=>{l.mount=!0;const oe=G.target;let le=oe.name,Ae=!0;const Ce=Le(r,le),Te=et=>{Ae=Number.isNaN(et)||Za(et)&&isNaN(et.getTime())||ci(et,Le(s,le,et))},De=LT(t.mode),Je=LT(t.reValidateMode);if(Ce){let et,gt;const Rt=oe.type?DT(Ce._f):s3(G),vt=G.type===Zs.BLUR||G.type===Zs.FOCUS_OUT,Nn=!dG(Ce._f)&&!e.validate&&!t.resolver&&!Le(n.errors,le)&&!Ce._f.deps||pG(vt,Le(n.touchedFields,le),n.isSubmitted,Je,De),Mo=jT(le,c,vt);Ft(s,le,Rt),vt?(!oe||!oe.readOnly)&&(Ce._f.onBlur&&Ce._f.onBlur(G),d&&d(0)):Ce._f.onChange&&Ce._f.onChange(G);const Fi=M(le,Rt,vt),Ze=!Sr(Fi)||Mo;if(!vt&&v.state.next({name:le,type:G.type,values:Un(s)}),Nn)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?vt&&x():vt||x()),Ze&&v.state.next({name:le,...Mo?{}:Fi});if(!t.resolver&&e.validate&&await j({name:le,eventType:G.type}),!vt&&Mo&&v.state.next({...n}),t.resolver){const{errors:ut}=await L([le]);if(S([le]),Te(Rt),Ae){const Ot=UT(n.errors,r,le),it=UT(ut,r,Ot.name||le);et=it.error,le=it.name,gt=Sr(ut)}}else S([le],!0),et=(await FT(Ce,c.disabled,s,y,t.shouldUseNativeValidation))[le],S([le]),Te(Rt),Ae&&(et?gt=!1:(p.isValid||g.isValid)&&(gt=await B({fields:r,onlyCheckValid:!0,name:le,eventType:G.type})));Ae&&(Ce._f.deps&&(!Array.isArray(Ce._f.deps)||Ce._f.deps.length>0)&&V(Ce._f.deps),P(le,gt,et,Fi))}},K=(G,oe)=>{if(Le(n.errors,oe)&&G.focus)return G.focus(),1},V=async(G,oe={})=>{let le,Ae;const Ce=Md(G);if(t.resolver){const Te=await H(mn(G)?G:Ce);le=Sr(Te),Ae=G?!Ce.some(De=>Le(Te,De)):le}else G?(Ae=(await Promise.all(Ce.map(async Te=>{const De=Le(r,Te);return await B({fields:De&&De._f?{[Te]:De}:De,eventType:Zs.TRIGGER})}))).every(Boolean),!(!Ae&&!n.isValid)&&x()):Ae=le=await B({fields:r,name:G,eventType:Zs.TRIGGER});return v.state.next({...!xr(G)||(p.isValid||g.isValid)&&le!==n.isValid?{}:{name:G},...t.resolver||!G?{isValid:le}:{},errors:n.errors}),oe.shouldFocus&&!Ae&&Pd(r,K,G?Ce:c.mount),Ae},D=(G,oe)=>{let le={...l.mount?s:i};return oe&&(le=d3(oe.dirtyFields?n.dirtyFields:n.touchedFields,le)),mn(G)?le:xr(G)?Le(le,G):G.map(Ae=>Le(le,Ae))},F=(G,oe)=>({invalid:!!Le((oe||n).errors,G),isDirty:!!Le((oe||n).dirtyFields,G),error:Le((oe||n).errors,G),isValidating:!!Le(n.validatingFields,G),isTouched:!!Le((oe||n).touchedFields,G)}),X=G=>{const oe=G?Md(G):void 0;oe?.forEach(le=>zn(n.errors,le)),oe?oe.forEach(le=>{v.state.next({name:le,errors:n.errors})}):v.state.next({errors:{}})},fe=(G,oe,le)=>{const Ae=(Le(r,G,{_f:{}})._f||{}).ref,Ce=Le(n.errors,G)||{},{ref:Te,message:De,type:Je,...et}=Ce;Ft(n.errors,G,{...et,...oe,ref:Ae}),v.state.next({name:G,errors:n.errors,isValid:!1}),le&&le.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},pe=(G,oe)=>Er(G)?v.state.subscribe({next:le=>"values"in le&&G(le.values||re(void 0,oe),le)}):re(G,oe,!0),xe=G=>v.state.subscribe({next:oe=>{if(hG(G.name,oe.name,G.exact)&&fG(oe,G.formState||p,Ne,G.reRenderRoot)){const le={...s};G.callback({values:le,...n,...oe,defaultValues:i})}}}).unsubscribe,Ue=G=>(l.mount=!0,g={...g,...G.formState},xe({...G,formState:{...m,...G.formState}})),Y=(G,oe={})=>{for(const le of G?Md(G):c.mount)c.mount.delete(le),c.array.delete(le),oe.keepValue||(zn(r,le),zn(s,le)),!oe.keepError&&zn(n.errors,le),!oe.keepDirty&&zn(n.dirtyFields,le),!oe.keepTouched&&zn(n.touchedFields,le),!oe.keepIsValidating&&zn(n.validatingFields,le),!t.shouldUnregister&&!oe.keepDefaultValue&&zn(i,le);v.state.next({values:Un(s)}),v.state.next({...n,...oe.keepDirty?{isDirty:Z()}:{}}),!oe.keepIsValid&&x()},te=({disabled:G,name:oe})=>{if(li(G)&&l.mount||G||c.disabled.has(oe)){const Ce=c.disabled.has(oe)!==!!G;G?c.disabled.add(oe):c.disabled.delete(oe),Ce&&l.mount&&!l.action&&x()}},ve=(G,oe={})=>{let le=Le(r,G);const Ae=li(oe.disabled)||li(t.disabled),Ce=!c.registerName.has(G)&&le&&le._f&&!le._f.mount;return Ft(r,G,{...le||{},_f:{...le&&le._f?le._f:{ref:{name:G}},name:G,mount:!0,...oe}}),c.mount.add(G),le&&!Ce?te({disabled:li(oe.disabled)?oe.disabled:t.disabled,name:G}):A(G,!0,oe.value),{...Ae?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:Wu(oe.min),max:Wu(oe.max),minLength:Wu(oe.minLength),maxLength:Wu(oe.maxLength),pattern:Wu(oe.pattern)}:{},name:G,onChange:k,onBlur:k,ref:Te=>{if(Te){c.registerName.add(G),ve(G,oe),c.registerName.delete(G),le=Le(r,G);const De=mn(Te.value)&&Te.querySelectorAll&&Te.querySelectorAll("input,select,textarea")[0]||Te,Je=iG(De),et=le._f.refs||[];if(Je?et.find(gt=>gt===De):De===le._f.ref)return;Ft(r,G,{_f:{...le._f,...Je?{refs:[...et.filter(Y_),De,...Array.isArray(Le(i,G))?[{}]:[]],ref:{type:De.type,name:G}}:{ref:De}}}),A(G,!1,void 0,De)}else le=Le(r,G,{}),le._f&&(le._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(a3(c.array,G)&&l.action)&&c.unMount.add(G)}}},se=()=>t.shouldFocusError&&Pd(r,K,c.mount),we=G=>{li(G)&&(v.state.next({disabled:G}),Pd(r,(oe,le)=>{const Ae=Le(r,le);Ae&&(oe.disabled=Ae._f.disabled||G,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(Ce=>{Ce.disabled=Ae._f.disabled||G}))},0,!1))},Oe=(G,oe)=>async le=>{let Ae;le&&(le.preventDefault&&le.preventDefault(),le.persist&&le.persist());let Ce=Un(s);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Te,values:De}=await L();S(),n.errors=Te,Ce=Un(De)}else await B({fields:r,eventType:Zs.SUBMIT});if(c.disabled.size)for(const Te of c.disabled)zn(Ce,Te);if(zn(n.errors,l3),Sr(n.errors)){v.state.next({errors:{}});try{await G(Ce,le)}catch(Te){Ae=Te}}else oe&&await oe({...n.errors},le),se(),setTimeout(se);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},nt=(G,oe={})=>{Le(r,G)&&(mn(oe.defaultValue)?ae(G,Un(Le(i,G))):(ae(G,oe.defaultValue),Ft(i,G,Un(oe.defaultValue))),oe.keepTouched||zn(n.touchedFields,G),oe.keepDirty||(zn(n.dirtyFields,G),n.isDirty=oe.defaultValue?Z(G,Un(Le(i,G))):Z()),oe.keepError||(zn(n.errors,G),p.isValid&&x()),v.state.next({...n}))},ot=(G,oe={})=>{const le=G?Un(G):i,Ae=Un(le),Ce=Sr(G),Te=Ce?i:Ae;if(oe.keepDefaultValues||(i=le),!oe.keepValues){if(oe.keepDirtyValues){const De=new Set([...c.mount,...Object.keys(gd(i,s))]);for(const Je of Array.from(De)){const et=Le(n.dirtyFields,Je),gt=Le(s,Je),Rt=Le(Te,Je);et&&!mn(gt)?Ft(Te,Je,gt):!et&&!mn(Rt)&&ae(Je,Rt)}}else{if(Tw&&mn(G))for(const De of c.mount){const Je=Le(r,De);if(Je&&Je._f){const et=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(Um(et)){const gt=et.closest("form");if(gt){gt.reset();break}}}}if(oe.keepFieldsRef)for(const De of c.mount)ae(De,Le(Te,De));else r={}}s=t.shouldUnregister?oe.keepDefaultValues?Un(i):{}:Un(Te),v.array.next({values:{...Te}}),v.state.next({values:{...Te}})}c={mount:oe.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues||!t.shouldUnregister&&!Sr(Te),l.watch=!!t.shouldUnregister,l.keepIsValid=!!oe.keepIsValid,l.action=!1,oe.keepErrors||(n.errors={}),v.state.next({submitCount:oe.keepSubmitCount?n.submitCount:0,isDirty:Ce?!1:oe.keepDirty?n.isDirty:!!(oe.keepDefaultValues&&!ci(G,i)),isSubmitted:oe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ce?{}:oe.keepDirtyValues?oe.keepDefaultValues&&s?gd(i,s):n.dirtyFields:oe.keepDefaultValues&&G?gd(i,G):oe.keepDirty?n.dirtyFields:{},touchedFields:oe.keepTouched?n.touchedFields:{},errors:oe.keepErrors?n.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Be=(G,oe)=>ot(Er(G)?G(s):G,{...t.resetOptions,...oe}),Xe=(G,oe={})=>{const le=Le(r,G),Ae=le&&le._f;if(Ae){const Ce=Ae.refs?Ae.refs[0]:Ae.ref;Ce.focus&&setTimeout(()=>{Ce.focus(),oe.shouldSelect&&Er(Ce.select)&&Ce.select()})}},Ne=G=>{n={...n,...G}},Me={control:{register:ve,unregister:Y,getFieldState:F,handleSubmit:Oe,setError:fe,_subscribe:xe,_runSchema:L,_updateIsValidating:S,_focusError:se,_getWatch:re,_getDirty:Z,_setValid:x,_setFieldArray:R,_setDisabledField:te,_setErrors:O,_getFieldArray:q,_reset:ot,_resetDefaultValues:()=>Er(t.defaultValues)&&t.defaultValues().then(G=>{Be(G,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:we,_subjects:v,_proxyFormState:p,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(G){l=G},get _defaultValues(){return i},get _names(){return c},set _names(G){c=G},get _formState(){return n},get _options(){return t},set _options(G){t={...t,...G}}},subscribe:Ue,trigger:V,register:ve,handleSubmit:Oe,watch:pe,setValue:ae,setValues:Q,getValues:D,reset:Be,resetField:nt,clearErrors:X,unregister:Y,setError:fe,setFocus:Xe,getFieldState:F};return{...Me,formControl:Me}}function Oo(e={}){const t=ne.useRef(void 0),n=ne.useRef(void 0),[r,i]=ne.useState({isDirty:!1,isValidating:!1,isLoading:Er(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Er(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Er(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=_G(e);t.current={...c,formState:r}}const s=t.current.control;return s._options=e,Pw(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(c=>({...c,isReady:!0})),s._formState.isReady=!0,l},[s]),ne.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),ne.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),ne.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),ne.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),ne.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),ne.useEffect(()=>{var l;e.values&&!ci(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((l=s._options.resetOptions)===null||l===void 0)&&l.keepIsValid||s._setValid(),n.current=e.values,i(c=>({...c}))):s._resetDefaultValues()},[s,e.values]),ne.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=ne.useMemo(()=>c3(r,s),[s,r]),t.current}function BT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function af(...e){return t=>{let n=!1;const r=e.map(i=>{const s=BT(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():BT(e[i],null)}}}}function Wn(...e){return I.useCallback(af(...e),e)}var yG=Symbol.for("react.lazy"),Fm=W1[" use ".trim().toString()];function bG(e){return typeof e=="object"&&e!==null&&"then"in e}function v3(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yG&&"_payload"in e&&bG(e._payload)}function _3(e){const t=wG(e),n=I.forwardRef((r,i)=>{let{children:s,...l}=r;v3(s)&&typeof Fm=="function"&&(s=Fm(s._payload));const c=I.Children.toArray(s),d=c.find(EG);if(d){const f=d.props.children,m=c.map(p=>p===d?I.Children.count(f)>1?I.Children.only(null):I.isValidElement(f)?f.props.children:null:p);return T.jsx(t,{...l,ref:i,children:I.isValidElement(f)?I.cloneElement(f,void 0,m):null})}return T.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var $w=_3("Slot");function wG(e){const t=I.forwardRef((n,r)=>{let{children:i,...s}=n;if(v3(i)&&typeof Fm=="function"&&(i=Fm(i._payload)),I.isValidElement(i)){const l=RG(i),c=xG(s,i.props);return i.type!==I.Fragment&&(c.ref=r?af(r,l):l),I.cloneElement(i,c)}return I.Children.count(i)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SG=Symbol("radix.slottable");function EG(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SG}function xG(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const d=s(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function RG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const VT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qT=hw,y3=(e,t)=>n=>{var r;if(t?.variants==null)return qT(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,l=Object.keys(i).map(f=>{const m=n?.[f],p=s?.[f];if(m===null)return null;const g=VT(m)||VT(p);return i[f][g]}),c=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...v}=m;return Object.entries(v).every(y=>{let[b,x]=y;return Array.isArray(x)?x.includes({...s,...c}[b]):{...s,...c}[b]===x})?[...f,p,g]:f},[]);return qT(e,l,d,n?.class,n?.className)},HT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Le(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Nb=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?HT(r.ref,n,e):r&&r.refs&&r.refs.forEach(i=>HT(i,n,e))}},GT=(e,t)=>{t.shouldUseNativeValidation&&Nb(e,t);const n={};for(const r in e){const i=Le(t.fields,r),s=Object.assign(e[r]||{},{ref:i&&i.ref});if(OG(t.names||Object.keys(e),r)){const l=Object.assign({},Le(n,r));Ft(l,"root",s),Ft(n,r,l)}else Ft(n,r,s)}return n},OG=(e,t)=>{const n=KT(t);return e.some(r=>KT(r).match(`^${n}\\.\\d+`))};function KT(e){return e.replace(/\]|\[/g,"")}function ZT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function TG(e,t){for(var n={};e.length;){var r=e[0],i=r.code,s=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=kw(l,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function CG(e,t){for(var n={};e.length;){var r=e[0],i=r.code,s=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:i};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=kw(l,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function To(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,i,s){try{return Promise.resolve(ZT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return s.shouldUseNativeValidation&&Nb({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:GT(TG(l.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,i,s){try{return Promise.resolve(ZT(function(){return Promise.resolve((n.mode==="sync"?zz:Fz)(e,r,t)).then(function(l){return s.shouldUseNativeValidation&&Nb({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof _w})(l))return{values:{},errors:GT(CG(l.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}function lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function AG(e,t){const n=I.createContext(t),r=s=>{const{children:l,...c}=s,d=I.useMemo(()=>c,Object.values(c));return T.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function i(s){const l=I.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function fl(e,t=[]){let n=[];function r(s,l){const c=I.createContext(l),d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:v,...y}=p,b=g?.[e]?.[d]||c,x=I.useMemo(()=>y,Object.values(y));return T.jsx(b.Provider,{value:x,children:v})};f.displayName=s+"Provider";function m(p,g){const v=g?.[e]?.[d]||c,y=I.useContext(v);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[f,m]}const i=()=>{const s=n.map(l=>I.createContext(l));return function(c){const d=c?.[e]||s;return I.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,IG(i,...t)]}function IG(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const p=d(s)[`__scope${f}`];return{...c,...p}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var to=globalThis?.document?I.useLayoutEffect:()=>{},MG=W1[" useId ".trim().toString()]||(()=>{}),PG=0;function ta(e){const[t,n]=I.useState(MG());return to(()=>{n(r=>r??String(PG++))},[e]),e||(t?`radix-${t}`:"")}var NG=W1[" useInsertionEffect ".trim().toString()]||to;function lf({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,l]=kG({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const m=I.useRef(e!==void 0);I.useEffect(()=>{const p=m.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const f=I.useCallback(m=>{if(c){const p=DG(m)?m(e):m;p!==e&&l.current?.(p)}else s(m)},[c,e,s,l]);return[d,f]}function kG({defaultProp:e,onChange:t}){const[n,r]=I.useState(e),i=I.useRef(n),s=I.useRef(t);return NG(()=>{s.current=t},[t]),I.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}function DG(e){return typeof e=="function"}function Gd(e){const t=LG(e),n=I.forwardRef((r,i)=>{const{children:s,...l}=r,c=I.Children.toArray(s),d=c.find($G);if(d){const f=d.props.children,m=c.map(p=>p===d?I.Children.count(f)>1?I.Children.only(null):I.isValidElement(f)?f.props.children:null:p);return T.jsx(t,{...l,ref:i,children:I.isValidElement(f)?I.cloneElement(f,void 0,m):null})}return T.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function LG(e){const t=I.forwardRef((n,r)=>{const{children:i,...s}=n;if(I.isValidElement(i)){const l=UG(i),c=jG(s,i.props);return i.type!==I.Fragment&&(c.ref=r?af(r,l):l),I.cloneElement(i,c)}return I.Children.count(i)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var b3=Symbol("radix.slottable");function mle(e){const t=({children:n})=>T.jsx(T.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=b3,t}function $G(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===b3}function jG(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const d=s(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function UG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yn=zG.reduce((e,t)=>{const n=Gd(`Primitive.${t}`),r=I.forwardRef((i,s)=>{const{asChild:l,...c}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function w3(e,t){e&&Ig.flushSync(()=>e.dispatchEvent(t))}function no(e){const t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(...n)=>t.current?.(...n),[])}function FG(e,t=globalThis?.document){const n=no(e);I.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var BG="DismissableLayer",kb="dismissableLayer.update",VG="dismissableLayer.pointerDownOutside",qG="dismissableLayer.focusOutside",YT,S3=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jw=I.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=e,f=I.useContext(S3),[m,p]=I.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=I.useState({}),y=Wn(t,M=>p(M)),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),E=m?b.indexOf(m):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,C=E>=S,O=KG(M=>{const P=M.target,L=[...f.branches].some(H=>H.contains(P));!C||L||(i?.(M),l?.(M),M.defaultPrevented||c?.())},g),A=ZG(M=>{const P=M.target;[...f.branches].some(H=>H.contains(P))||(s?.(M),l?.(M),M.defaultPrevented||c?.())},g);return FG(M=>{E===f.layers.size-1&&(r?.(M),!M.defaultPrevented&&c&&(M.preventDefault(),c()))},g),I.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(YT=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),WT(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=YT)}},[m,g,n,f]),I.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),WT())},[m,f]),I.useEffect(()=>{const M=()=>v({});return document.addEventListener(kb,M),()=>document.removeEventListener(kb,M)},[]),T.jsx(yn.div,{...d,ref:y,style:{pointerEvents:R?C?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,A.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,O.onPointerDownCapture)})});jw.displayName=BG;var HG="DismissableLayerBranch",GG=I.forwardRef((e,t)=>{const n=I.useContext(S3),r=I.useRef(null),i=Wn(t,r);return I.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),T.jsx(yn.div,{...e,ref:i})});GG.displayName=HG;function KG(e,t=globalThis?.document){const n=no(e),r=I.useRef(!1),i=I.useRef(()=>{});return I.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let d=function(){E3(VG,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZG(e,t=globalThis?.document){const n=no(e),r=I.useRef(!1);return I.useEffect(()=>{const i=s=>{s.target&&!r.current&&E3(qG,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WT(){const e=new CustomEvent(kb);document.dispatchEvent(e)}function E3(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?w3(i,s):i.dispatchEvent(s)}var W_="focusScope.autoFocusOnMount",Q_="focusScope.autoFocusOnUnmount",QT={bubbles:!1,cancelable:!0},YG="FocusScope",Uw=I.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=e,[c,d]=I.useState(null),f=no(i),m=no(s),p=I.useRef(null),g=Wn(t,b=>d(b)),v=I.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;I.useEffect(()=>{if(r){let b=function(R){if(v.paused||!c)return;const C=R.target;c.contains(C)?p.current=C:Ks(p.current,{select:!0})},x=function(R){if(v.paused||!c)return;const C=R.relatedTarget;C!==null&&(c.contains(C)||Ks(p.current,{select:!0}))},S=function(R){if(document.activeElement===document.body)for(const O of R)O.removedNodes.length>0&&Ks(c)};document.addEventListener("focusin",b),document.addEventListener("focusout",x);const E=new MutationObserver(S);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",x),E.disconnect()}}},[r,c,v.paused]),I.useEffect(()=>{if(c){JT.add(v);const b=document.activeElement;if(!c.contains(b)){const S=new CustomEvent(W_,QT);c.addEventListener(W_,f),c.dispatchEvent(S),S.defaultPrevented||(WG(tK(x3(c)),{select:!0}),document.activeElement===b&&Ks(c))}return()=>{c.removeEventListener(W_,f),setTimeout(()=>{const S=new CustomEvent(Q_,QT);c.addEventListener(Q_,m),c.dispatchEvent(S),S.defaultPrevented||Ks(b??document.body,{select:!0}),c.removeEventListener(Q_,m),JT.remove(v)},0)}}},[c,f,m,v]);const y=I.useCallback(b=>{if(!n&&!r||v.paused)return;const x=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,S=document.activeElement;if(x&&S){const E=b.currentTarget,[R,C]=QG(E);R&&C?!b.shiftKey&&S===C?(b.preventDefault(),n&&Ks(R,{select:!0})):b.shiftKey&&S===R&&(b.preventDefault(),n&&Ks(C,{select:!0})):S===E&&b.preventDefault()}},[n,r,v.paused]);return T.jsx(yn.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});Uw.displayName=YG;function WG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ks(r,{select:t}),document.activeElement!==n)return}function QG(e){const t=x3(e),n=XT(t,e),r=XT(t.reverse(),e);return[n,r]}function x3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XT(e,t){for(const n of e)if(!XG(n,{upTo:t}))return n}function XG(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JG(e){return e instanceof HTMLInputElement&&"select"in e}function Ks(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JG(e)&&t&&e.select()}}var JT=eK();function eK(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=eC(e,t),e.unshift(t)},remove(t){e=eC(e,t),e[0]?.resume()}}}function eC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tK(e){return e.filter(t=>t.tagName!=="A")}var nK="Portal",zw=I.forwardRef((e,t)=>{const{container:n,...r}=e,[i,s]=I.useState(!1);to(()=>s(!0),[]);const l=n||i&&globalThis?.document?.body;return l?fP.createPortal(T.jsx(yn.div,{...r,ref:t}),l):null});zw.displayName=nK;function rK(e,t){return I.useReducer((n,r)=>t[n][r]??n,e)}var ds=e=>{const{present:t,children:n}=e,r=iK(t),i=typeof n=="function"?n({present:r.isPresent}):I.Children.only(n),s=Wn(r.ref,oK(i));return typeof n=="function"||r.isPresent?I.cloneElement(i,{ref:s}):null};ds.displayName="Presence";function iK(e){const[t,n]=I.useState(),r=I.useRef(null),i=I.useRef(e),s=I.useRef("none"),l=e?"mounted":"unmounted",[c,d]=rK(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const f=Qh(r.current);s.current=c==="mounted"?f:"none"},[c]),to(()=>{const f=r.current,m=i.current;if(m!==e){const g=s.current,v=Qh(f);e?d("MOUNT"):v==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),to(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=v=>{const b=Qh(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&b&&(d("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=v=>{v.target===t&&(s.current=Qh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:I.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Qh(e){return e?.animationName||"none"}function oK(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var X_=0;function R3(){I.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tC()),document.body.insertAdjacentElement("beforeend",e[1]??tC()),X_++,()=>{X_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),X_--}},[])}function tC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _o=function(){return _o=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},_o.apply(this,arguments)};function O3(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sK(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var cm="right-scroll-bar-position",um="width-before-scroll-bar",aK="with-scroll-bars-hidden",lK="--removed-body-scroll-bar-size";function J_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function cK(e,t){var n=I.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var uK=typeof window<"u"?I.useLayoutEffect:I.useEffect,nC=new WeakMap;function dK(e,t){var n=cK(null,function(r){return e.forEach(function(i){return J_(i,r)})});return uK(function(){var r=nC.get(n);if(r){var i=new Set(r),s=new Set(e),l=n.current;i.forEach(function(c){s.has(c)||J_(c,null)}),s.forEach(function(c){i.has(c)||J_(c,l)})}nC.set(n,e)},[e]),n}function fK(e){return e}function hK(e,t){t===void 0&&(t=fK);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var d=function(){var m=l;l=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return i}function pK(e){e===void 0&&(e={});var t=hK(null);return t.options=_o({async:!0,ssr:!1},e),t}var T3=function(e){var t=e.sideCar,n=O3(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return I.createElement(r,_o({},n))};T3.isSideCarExport=!0;function mK(e,t){return e.useMedium(t),T3}var C3=pK(),ey=function(){},zg=I.forwardRef(function(e,t){var n=I.useRef(null),r=I.useState({onScrollCapture:ey,onWheelCapture:ey,onTouchMoveCapture:ey}),i=r[0],s=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,y=e.noIsolation,b=e.inert,x=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,R=e.gapMode,C=O3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,A=dK([n,t]),M=_o(_o({},C),i);return I.createElement(I.Fragment,null,m&&I.createElement(O,{sideCar:C3,removeScrollBar:f,shards:p,noRelative:v,noIsolation:y,inert:b,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:R}),l?I.cloneElement(I.Children.only(c),_o(_o({},M),{ref:A})):I.createElement(E,_o({},M,{className:d,ref:A}),c))});zg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zg.classNames={fullWidth:um,zeroRight:cm};var gK=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gK();return t&&e.setAttribute("nonce",t),e}function _K(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bK=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vK())&&(_K(t,n),yK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wK=function(){var e=bK();return function(t,n){I.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},A3=function(){var e=wK(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},SK={left:0,top:0,right:0,gap:0},ty=function(e){return parseInt(e||"",10)||0},EK=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[ty(n),ty(r),ty(i)]},xK=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return SK;var t=EK(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},RK=A3(),Ac="data-scroll-locked",OK=function(e,t,n,r){var i=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
61
|
+
`}),T.jsx(IH,{}),e]})}function IH(){const{executeRecaptcha:e}=XN(),{theme:t}=Ow(),{lang:n}=e4();return I.useEffect(()=>{if(!e)return;(async()=>{const i=document.querySelector("iframe[title='reCAPTCHA']");if(i){const s=new URL(i.src);s.searchParams.set("theme",t),n&&s.searchParams.set("hl",n),i.src=s.toString()}})()},[e,t,n]),null}function MH({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=I.useContext(ht),{pathMode:i,slug:s}=t||{};let l,c,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(i==="slug"){const v=e||s;l=m?.find(y=>y.slug===v),c=p,d=g}else{const{data:v,isPending:y,isRefetching:b,refetch:x}=n();f=x,l=v,c=y,d=b}return I.useMemo(()=>({data:l,isPending:c,isRefetching:d,refetch:f}),[l,c,d,f])}var PH=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:i}=I.useContext(ht),{slug:s,pathMode:l,personalPath:c}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=MH(),{refetch:v}=e(),{data:y}=e();return I.useEffect(()=>{d?.user.id&&(f||y)&&(g?.(),v?.())},[d?.user.id]),I.useEffect(()=>{p||m||s&&l==="slug"&&!f&&r(c||i)},[f,p,m,s,l,c,r,i]),null},NH=({href:e,className:t,children:n})=>T.jsx("a",{className:t,href:e,children:n}),kH=e=>{window.location.href=e},DH=e=>{window.location.replace(e)},LH=({variant:e="default",message:t})=>{e==="default"?RT(t):RT[e](t)},ht=I.createContext({}),$H=({children:e,authClient:t,account:n,avatar:r,deleteUser:i,social:s,genericOAuth:l,basePath:c="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:v=3600*24,hooks:y,mutators:b,localization:x,localizeErrors:S=!0,nameRequired:E=!0,organization:R,teams:C,signUp:O=!0,toast:A=LH,viewPaths:M,navigate:P,replace:L,Link:H=NH,emailVerification:j,...B})=>{const U=t,Z=I.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),re=I.useMemo(()=>{if(j)return j===!0?{otp:!1}:{otp:j.otp??!1}},[j]),q=I.useMemo(()=>{var Y;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:ET}:{basePath:((Y=n.basePath)!=null&&Y.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...ET,...n.viewPaths}}},[n]),W=I.useMemo(()=>{if(i)return i===!0?{}:i},[i]),ee=I.useMemo(()=>{if(s)return s},[s]),ae=I.useMemo(()=>{if(l)return l},[l]),Q=I.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),k=I.useMemo(()=>{if(O!==!1)return O===!0||O===void 0?{fields:["name"]}:{fields:O.fields||["name"]}},[O]),K=I.useMemo(()=>{var Y;if(!R)return;if(R===!0)return{basePath:"/organization",viewPaths:xT,customRoles:[]};let te;R.logo===!0?te={extension:"png",size:128}:R.logo&&(te={upload:R.logo.upload,delete:R.logo.delete,extension:R.logo.extension||"png",size:R.logo.size||(R.logo.upload?256:128)});const ve=(Y=R.basePath)!=null&&Y.endsWith("/")?R.basePath.slice(0,-1):R.basePath;return{...R,logo:te,basePath:ve??"/organization",customRoles:R.customRoles||[],viewPaths:{...xT,...R.viewPaths}}},[R]),V=I.useMemo(()=>{var Y,te;if(!(!C||!K))return C===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:C.enabled??!0,customRoles:C.customRoles||[],colors:{count:((Y=C.colors)==null?void 0:Y.count)??5,prefix:((te=C.colors)==null?void 0:te.prefix)??"team"}}},[C,K]),D=I.useMemo(()=>({deleteApiKey:Y=>U.apiKey.delete({...Y,fetchOptions:{throw:!0}}),deletePasskey:Y=>U.passkey.deletePasskey({...Y,fetchOptions:{throw:!0}}),revokeDeviceSession:Y=>U.multiSession.revoke({...Y,fetchOptions:{throw:!0}}),revokeSession:Y=>U.revokeSession({...Y,fetchOptions:{throw:!0}}),setActiveSession:Y=>U.multiSession.setActive({...Y,fetchOptions:{throw:!0}}),updateOrganization:Y=>U.organization.update({...Y,fetchOptions:{throw:!0}}),updateTeam:Y=>U.$fetch("/organization/update-team",{method:"POST",body:Y,throw:!0}),updateUser:Y=>U.updateUser({...Y,fetchOptions:{throw:!0}}),unlinkAccount:Y=>U.unlinkAccount({...Y,fetchOptions:{throw:!0}})}),[U]),F=I.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>ii({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Y=>ii({queryFn:()=>U.accountInfo(Y),cacheKey:`accountInfo:${JSON.stringify(Y)}`}),useListDeviceSessions:()=>ii({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>ii({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>ii({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:Y=>ii({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:Y}),cacheKey:`hasPermission:${JSON.stringify(Y)}`}),useInvitation:Y=>ii({queryFn:()=>U.organization.getInvitation(Y),cacheKey:`invitation:${JSON.stringify(Y)}`}),useListInvitations:Y=>ii({queryFn:()=>{var te;return U.$fetch(`/organization/list-invitations?organizationId=${((te=Y?.query)==null?void 0:te.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Y)}`}),useListUserInvitations:()=>ii({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Y=>ii({queryFn:()=>{var te;return U.$fetch(`/organization/list-members?organizationId=${((te=Y?.query)==null?void 0:te.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Y)}`}),useListTeams:Y=>ii({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${Y?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Y)}`}),useListTeamMembers:Y=>ii({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:Y?.teamId?{query:{teamId:Y.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Y)}`}),useListUserTeams:()=>ii({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),X=I.useMemo(()=>({...zq,...M}),[M]),fe=I.useMemo(()=>({...Uq,...x}),[x]),pe=I.useMemo(()=>({...F,...y}),[F,y]),xe=I.useMemo(()=>({...D,...b}),[D,b]);d=d.endsWith("/")?d.slice(0,-1):d,c=c.endsWith("/")?c.slice(0,-1):c;const{data:Ue}=pe.useSession();return T.jsxs(ht.Provider,{value:{authClient:U,avatar:Z,basePath:c==="/"?"":c,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:Q,deleteUser:W,emailVerification:re,freshAge:v,genericOAuth:ae,hooks:pe,mutators:xe,localization:fe,localizeErrors:S,nameRequired:E,organization:K,teams:V,account:q,signUp:k,social:ee,toast:A,navigate:P||kH,replace:L||P||DH,viewPaths:X,Link:H,...B},children:[Ue&&K&&T.jsx(PH,{}),f?.provider==="google-recaptcha-v3"?T.jsx(AH,{children:e}):e]})};function ii({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:i},toast:s,localization:l,localizeErrors:c}=I.useContext(ht),{data:d,isPending:f}=i(),m=I.useRef(e);m.current=e;const p=t||e.toString(),g=I.useSyncExternalStore(I.useCallback(R=>Ti.subscribe(p,R),[p]),I.useCallback(()=>Ti.get(p),[p]),I.useCallback(()=>Ti.get(p),[p])),v=I.useRef(!1),y=I.useRef(void 0),[b,x]=I.useState(null),S=I.useCallback(async()=>{const R=Ti.getInFlightRequest(p);if(R){try{const O=await R;O.error?x(O.error):x(null)}catch(O){x(O)}return}g?.data!==void 0&&Ti.setRefetching(p,!0);const C=m.current();Ti.setInFlightRequest(p,C);try{const{data:O,error:A}=await C;A?(x(A),s({variant:"error",message:Mn({error:A,localization:l,localizeErrors:c})})):x(null),Ti.set(p,O)}catch(O){const A=O;x(A),s({variant:"error",message:Mn({error:A,localization:l,localizeErrors:c})})}finally{Ti.setRefetching(p,!1),Ti.removeInFlightRequest(p)}},[p,s,l,c,g]);I.useEffect(()=>{var R;const C=(R=d?.user)==null?void 0:R.id;if(!d){Ti.setRefetching(p,!1),Ti.clear(p),v.current=!1,y.current=void 0;return}const O=y.current!==void 0&&y.current!==C;O&&Ti.clear(p);const A=g?.data!==void 0,M=!g||Date.now()-g.timestamp>n;(!v.current||!A||O||A&&M)&&(!A||M)&&(v.current=!0,S()),y.current=C},[d,(r=d?.user)==null?void 0:r.id,p,S,g,n]);const E=f||g?.data===void 0&&!b;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:b,refetch:S}}const jH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),t4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var UH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const zH=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...c},d)=>I.createElement("svg",{ref:d,...UH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:t4("lucide",i),...c},[...l.map(([f,m])=>I.createElement(f,m)),...Array.isArray(s)?s:[s]]));const Or=(e,t)=>{const n=I.forwardRef(({className:r,...i},s)=>I.createElement(zH,{ref:s,iconNode:t,className:t4(`lucide-${jH(e)}`,r),...i}));return n.displayName=`${e}`,n};const FH=Or("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const BH=Or("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const n4=Or("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const VH=Or("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const qH=Or("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const HH=Or("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const GH=Or("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const Rr=Or("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const r4=Or("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const i4=Or("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const KH=Or("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const ZH=Or("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const IT=Or("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const YH=Or("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const WH=Or("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const QH=Or("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var sf=e=>e.type==="checkbox",Za=e=>e instanceof Date,Dr=e=>e==null;const o4=e=>typeof e=="object";var In=e=>!Dr(e)&&!Array.isArray(e)&&o4(e)&&!Za(e),s4=e=>In(e)&&e.target?sf(e.target)?e.target.checked:e.target.value:e,a4=(e,t)=>t.split(".").some((n,r,i)=>!isNaN(Number(n))&&e.has(i.slice(0,r).join("."))),XH=e=>{const t=e.constructor&&e.constructor.prototype;return In(t)&&t.hasOwnProperty("isPrototypeOf")},Tw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Un(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Tw&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(In(e)&&XH(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=Un(e[i]));return r}var Ug=e=>/^\w*$/.test(e),mn=e=>e===void 0,Cw=e=>Array.isArray(e)?e.filter(Boolean):[],Aw=e=>Cw(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,n)=>{if(!t||!In(e))return n;const i=(Ug(t)?[t]:Aw(t)).reduce((s,l)=>Dr(s)?void 0:s[l],e);return mn(i)||i===e?mn(e[t])?n:e[t]:i},li=e=>typeof e=="boolean",Er=e=>typeof e=="function",Ft=(e,t,n)=>{let r=-1;const i=Ug(t)?[t]:Aw(t),s=i.length,l=s-1;for(;++r<s;){const c=i[r];let d=n;if(r!==l){const f=e[c];d=In(f)||Array.isArray(f)?f:isNaN(+i[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=d,e=e[c]}};const Zs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Xi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Yi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Z_="form",l4="root",Iw=ne.createContext(null);Iw.displayName="HookFormControlContext";const Mw=()=>ne.useContext(Iw);var c4=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const l=s;return t._proxyFormState[l]!==Xi.all&&(t._proxyFormState[l]=!r||Xi.all),n&&(n[l]=!0),e[l]}});return i};const Pw=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function u4(e){const t=Mw(),{control:n=t,disabled:r,name:i,exact:s}=e||{},[l,c]=ne.useState(n._formState),d=ne.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pw(()=>n._subscribe({name:i,formState:d.current,exact:s,callback:f=>{!r&&c({...n._formState,...f})}}),[i,r,s]),ne.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ne.useMemo(()=>c4(l,n,d.current,!1),[l,n])}var xr=e=>typeof e=="string",Ib=(e,t,n,r,i)=>xr(e)?(r&&t.watch.add(e),Le(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Le(n,s))):(r&&(t.watchAll=!0),n),Mb=e=>Dr(e)||!o4(e);function ci(e,t,n=new WeakSet){if(e===t)return!0;if(Mb(e)||Mb(t))return Object.is(e,t);if(Za(e)&&Za(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const l=e[s];if(!(s in t))return!1;if(s!=="ref"){const c=t[s];if(Za(l)&&Za(c)||(In(l)||Array.isArray(l))&&(In(c)||Array.isArray(c))?!ci(l,c,n):!Object.is(l,c))return!1}}return!0}function JH(e){const t=Mw(),{control:n=t,name:r,defaultValue:i,disabled:s,exact:l,compute:c}=e||{},d=ne.useRef(i),f=ne.useRef(c),m=ne.useRef(void 0),p=ne.useRef(n),g=ne.useRef(r);f.current=c;const[v,y]=ne.useState(()=>{const C=n._getWatch(r,d.current);return f.current?f.current(C):C}),b=ne.useCallback(C=>{const O=Ib(r,n._names,C||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),x=ne.useCallback(C=>{if(!s){const O=Ib(r,n._names,C||n._formValues,!1,d.current);if(f.current){const A=f.current(O);ci(A,m.current)||(y(A),m.current=A)}else y(O)}},[n._formValues,n._names,s,r]);Pw(()=>((p.current!==n||!ci(g.current,r))&&(p.current=n,g.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:C=>{x(C.values)}})),[n,l,r,x]),ne.useEffect(()=>n._removeUnmounted());const S=p.current!==n,E=g.current,R=ne.useMemo(()=>{if(s)return null;const C=!S&&!ci(E,r);return S||C?b():null},[s,S,r,E,b]);return R!==null?R:v}function eG(e){const t=Mw(),{name:n,disabled:r,control:i=t,shouldUnregister:s,defaultValue:l,exact:c=!0}=e,d=a4(i._names.array,n),f=ne.useMemo(()=>Le(i._formValues,n,Le(i._defaultValues,n,l)),[i,n,l]),m=JH({control:i,name:n,defaultValue:f,exact:c}),p=u4({control:i,name:n,exact:c}),g=ne.useRef(e),v=ne.useRef(i.register(n,{...e.rules,value:m,...li(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const y=ne.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Le(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Le(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Le(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Le(p.validatingFields,n)},error:{enumerable:!0,get:()=>Le(p.errors,n)}}),[p,n]),b=ne.useCallback(R=>v.current.onChange({target:{value:s4(R),name:n},type:Zs.CHANGE}),[n]),x=ne.useCallback(()=>v.current.onBlur({target:{value:Le(i._formValues,n),name:n},type:Zs.BLUR}),[n,i._formValues]),S=ne.useCallback(R=>{const C=Le(i._fields,n);C&&C._f&&R&&(C._f.ref={focus:()=>Er(R.focus)&&R.focus(),select:()=>Er(R.select)&&R.select(),setCustomValidity:O=>Er(R.setCustomValidity)&&R.setCustomValidity(O),reportValidity:()=>Er(R.reportValidity)&&R.reportValidity()})},[i._fields,n]),E=ne.useMemo(()=>({name:n,value:m,...li(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:b,onBlur:x,ref:S}),[n,r,p.disabled,b,x,S,m]);return ne.useEffect(()=>{const R=i._options.shouldUnregister||s;i.register(n,{...g.current.rules,...li(g.current.disabled)?{disabled:g.current.disabled}:{}});const C=(O,A)=>{const M=Le(i._fields,O);M&&M._f&&(M._f.mount=A)};if(C(n,!0),R){const O=Un(Le(i._options.defaultValues,n,g.current.defaultValue));Ft(i._defaultValues,n,O),mn(Le(i._formValues,n))&&Ft(i._formValues,n,O)}return!d&&i.register(n),()=>{(d?R&&!i._state.action:R)?i.unregister(n):C(n,!1)}},[n,i,d,s]),ne.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),ne.useMemo(()=>({field:E,formState:p,fieldState:y}),[E,p,y])}const tG=e=>e.render(eG(e)),Nw=ne.createContext(null);Nw.displayName="HookFormContext";const nG=()=>ne.useContext(Nw),rG=e=>{const{children:t,watch:n,getValues:r,getFieldState:i,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:v,control:y,register:b,setFocus:x,subscribe:S}=e,E=ne.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:v,control:y,register:b,setFocus:x,subscribe:S}),[l,y,f,i,r,g,b,p,m,s,x,c,S,d,v,n]);return ne.createElement(Nw.Provider,{value:E},ne.createElement(Iw.Provider,{value:E.control},t))};var kw=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Md=e=>Array.isArray(e)?e:[e],MT=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}};function d4(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];if(i&&In(i)&&s){const l=d4(i,s);In(l)&&(n[r]=l)}else e[r]&&(n[r]=s)}return n}var Sr=e=>In(e)&&!Object.keys(e).length,Dw=e=>e.type==="file",Um=e=>{if(!Tw)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},f4=e=>e.type==="select-multiple",Lw=e=>e.type==="radio",iG=e=>Lw(e)||sf(e),Y_=e=>Um(e)&&e.isConnected;function oG(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(Dr(e)){e=void 0;break}e=e[t[r]],r++}return e}function sG(e){for(const t in e)if(e.hasOwnProperty(t)&&!mn(e[t]))return!1;return!0}function zn(e,t){if(xr(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:Ug(t)?[t]:Aw(t),r=n.length===1?e:oG(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(In(r)&&Sr(r)||Array.isArray(r)&&sG(r))&&zn(e,n.slice(0,-1)),e}var aG=e=>{for(const t in e)if(Er(e[t]))return!0;return!1};function h4(e){return Array.isArray(e)||In(e)&&!aG(e)}function Pb(e,t={}){for(const n in e){const r=e[n];h4(r)?(t[n]=Array.isArray(r)?[]:{},Pb(r,t[n])):mn(r)||(t[n]=!0)}return t}function gd(e,t,n){n||(n=Pb(t));for(const r in e){const i=e[r];if(h4(i))mn(t)||Mb(n[r])?n[r]=Pb(i,Array.isArray(i)?[]:{}):gd(i,Dr(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!ci(i,s)}}return n}const PT={value:!1,isValid:!1},NT={value:!0,isValid:!0};var p4=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!mn(e[0].attributes.value)?mn(e[0].value)||e[0].value===""?NT:{value:e[0].value,isValid:!0}:NT:PT}return PT},m4=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>mn(e)?e:t?e===""?NaN:e&&+e:n&&xr(e)?new Date(e):r?r(e):e;const kT={isValid:!1,value:null};var g4=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,kT):kT;function DT(e){const t=e.ref;return Dw(t)?t.files:Lw(t)?g4(e.refs).value:f4(t)?[...t.selectedOptions].map(({value:n})=>n):sf(t)?p4(e.refs).value:m4(mn(t.value)?e.ref.value:t.value,e)}var lG=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cG=(e,t,n,r)=>{const i={};for(const s of e){const l=Le(t,s);l&&Ft(i,s,l._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},zm=e=>e instanceof RegExp,Wu=e=>mn(e)?e:zm(e)?e.source:In(e)?zm(e.value)?e.value.source:e.value:e,LT=e=>({isOnSubmit:!e||e===Xi.onSubmit,isOnBlur:e===Xi.onBlur,isOnChange:e===Xi.onChange,isOnAll:e===Xi.all,isOnTouch:e===Xi.onTouched});const $T="AsyncFunction";var uG=e=>!!e&&!!e.validate&&!!(Er(e.validate)&&e.validate.constructor.name===$T||In(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===$T)),dG=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),jT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Pd=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=Le(e,i);if(s){const{_f:l,...c}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],i)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Pd(c,t))break}else if(In(c)&&Pd(c,t))break}}};function UT(e,t,n){const r=Le(e,n);if(r||Ug(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),l=Le(t,s),c=Le(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(c&&c.type)return{name:s,error:c};if(c&&c.root&&c.root.type)return{name:`${s}.root`,error:c.root};i.pop()}return{name:n}}var fG=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return Sr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||Xi.all))},hG=(e,t,n)=>!e||!t||e===t||Md(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),pG=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,mG=(e,t)=>!Cw(Le(e,t)).length&&zn(e,t),gG=(e,t,n)=>{const r=Md(Le(e,n));return Ft(r,l4,t[n]),Ft(e,n,r),e};function zT(e,t,n="validate"){if(xr(e)||Array.isArray(e)&&e.every(xr)||li(e)&&!e)return{type:n,message:xr(e)?e:"",ref:t}}var ec=e=>In(e)&&!zm(e)?e:{value:e,message:""},FT=async(e,t,n,r,i,s)=>{const{ref:l,refs:c,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:v,validate:y,name:b,valueAsNumber:x,mount:S}=e._f,E=Le(n,b);if(!S||t.has(b))return{};const R=c?c[0]:l,C=B=>{i&&R.reportValidity&&(R.setCustomValidity(li(B)?"":B||""),R.reportValidity())},O={},A=Lw(l),M=sf(l),P=A||M,L=(x||Dw(l))&&mn(l.value)&&mn(E)||Um(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||x&&typeof E=="number"&&isNaN(E),H=kw.bind(null,b,r,O),j=(B,U,Z,re=Yi.maxLength,q=Yi.minLength)=>{const W=B?U:Z;O[b]={type:B?re:q,message:W,ref:l,...H(B?re:q,W)}};if(s?!Array.isArray(E)||!E.length:d&&(!P&&(L||Dr(E))||li(E)&&!E||M&&!p4(c).isValid||A&&!g4(c).isValid)){const{value:B,message:U}=xr(d)?{value:!!d,message:d}:ec(d);if(B&&(O[b]={type:Yi.required,message:U,ref:R,...H(Yi.required,U)},!r))return C(U),O}if(!L&&(!Dr(p)||!Dr(g))){let B,U;const Z=ec(g),re=ec(p);if(!Dr(E)&&!isNaN(E)){const q=l.valueAsNumber||E&&+E;Dr(Z.value)||(B=q>Z.value),Dr(re.value)||(U=q<re.value)}else{const q=l.valueAsDate||new Date(E),W=Q=>new Date(new Date().toDateString()+" "+Q),ee=l.type=="time",ae=l.type=="week";xr(Z.value)&&E&&(B=ee?W(E)>W(Z.value):ae?E>Z.value:q>new Date(Z.value)),xr(re.value)&&E&&(U=ee?W(E)<W(re.value):ae?E<re.value:q<new Date(re.value))}if((B||U)&&(j(!!B,Z.message,re.message,Yi.max,Yi.min),!r))return C(O[b].message),O}if((f||m)&&!L&&(xr(E)||s&&Array.isArray(E))){const B=ec(f),U=ec(m),Z=!Dr(B.value)&&E.length>+B.value,re=!Dr(U.value)&&E.length<+U.value;if((Z||re)&&(j(Z,B.message,U.message),!r))return C(O[b].message),O}if(v&&!L&&xr(E)){const{value:B,message:U}=ec(v);if(zm(B)&&!E.match(B)&&(O[b]={type:Yi.pattern,message:U,ref:l,...H(Yi.pattern,U)},!r))return C(U),O}if(y){if(Er(y)){const B=await y(E,n),U=zT(B,R);if(U&&(O[b]={...U,...H(Yi.validate,U.message)},!r))return C(U.message),O}else if(In(y)){let B={};for(const U in y){if(!Sr(B)&&!r)break;const Z=zT(await y[U](E,n),R,U);Z&&(B={...Z,...H(U,Z.message)},C(Z.message),r&&(O[b]=B))}if(!Sr(B)&&(O[b]={ref:R,...B},!r))return O}}return C(!0),O};const vG={mode:Xi.onSubmit,reValidateMode:Xi.onChange,shouldFocusError:!0};function _G(e={}){let t={...vG,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Er(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=In(t.defaultValues)||In(t.values)?Un(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Un(i),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const v={array:MT(),state:MT()},y=t.criteriaMode===Xi.all,b=G=>oe=>{clearTimeout(f),f=setTimeout(G,oe)},x=async G=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||G)){let oe;t.resolver?(oe=Sr((await L()).errors),S()):oe=await B({fields:r,onlyCheckValid:!0,eventType:Zs.VALID}),oe!==n.isValid&&v.state.next({isValid:oe})}},S=(G,oe)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((G||Array.from(c.mount)).forEach(le=>{le&&(oe?Ft(n.validatingFields,le,oe):zn(n.validatingFields,le))}),v.state.next({validatingFields:n.validatingFields,isValidating:!Sr(n.validatingFields)}))},E=G=>{const oe=gd(i,s),le=lG(G);Ft(n.dirtyFields,le,Le(oe,le))},R=(G,oe=[],le,Ae,Ce=!0,Te=!0)=>{if(Ae&&le&&!t.disabled){if(l.action=!0,Te&&Array.isArray(Le(r,G))){const De=le(Le(r,G),Ae.argA,Ae.argB);Ce&&Ft(r,G,De)}if(Te&&Array.isArray(Le(n.errors,G))){const De=le(Le(n.errors,G),Ae.argA,Ae.argB);Ce&&Ft(n.errors,G,De),mG(n.errors,G)}if((p.touchedFields||g.touchedFields)&&Te&&Array.isArray(Le(n.touchedFields,G))){const De=le(Le(n.touchedFields,G),Ae.argA,Ae.argB);Ce&&Ft(n.touchedFields,G,De)}(p.dirtyFields||g.dirtyFields)&&E(G),v.state.next({name:G,isDirty:Z(G,oe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ft(s,G,oe)},C=(G,oe)=>{Ft(n.errors,G,oe),v.state.next({errors:n.errors})},O=G=>{n.errors=G,v.state.next({errors:n.errors,isValid:!1})},A=(G,oe,le,Ae)=>{const Ce=Le(r,G);if(Ce){const Te=Le(s,G,mn(le)?Le(i,G):le);mn(Te)||Ae&&Ae.defaultChecked||oe?Ft(s,G,oe?Te:DT(Ce._f)):W(G,Te),l.mount&&!l.action&&x()}},M=(G,oe,le,Ae,Ce)=>{let Te=!1,De=!1;const Je={name:G};if(!t.disabled){if(!le||Ae){(p.isDirty||g.isDirty)&&(De=n.isDirty,n.isDirty=Je.isDirty=Z(),Te=De!==Je.isDirty);const et=ci(Le(i,G),oe);De=!!Le(n.dirtyFields,G),et?zn(n.dirtyFields,G):Ft(n.dirtyFields,G,!0),Je.dirtyFields=n.dirtyFields,Te=Te||(p.dirtyFields||g.dirtyFields)&&De!==!et}if(le){const et=Le(n.touchedFields,G);et||(Ft(n.touchedFields,G,le),Je.touchedFields=n.touchedFields,Te=Te||(p.touchedFields||g.touchedFields)&&et!==le)}Te&&Ce&&v.state.next(Je)}return Te?Je:{}},P=(G,oe,le,Ae)=>{const Ce=Le(n.errors,G),Te=(p.isValid||g.isValid)&&li(oe)&&n.isValid!==oe;if(t.delayError&&le?(d=b(()=>C(G,le)),d(t.delayError)):(clearTimeout(f),d=null,le?Ft(n.errors,G,le):zn(n.errors,G)),(le?!ci(Ce,le):Ce)||!Sr(Ae)||Te){const De={...Ae,...Te&&li(oe)?{isValid:oe}:{},errors:n.errors,name:G};n={...n,...De},v.state.next(De)}},L=async G=>(S(G,!0),await t.resolver(s,t.context,cG(G||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),H=async G=>{const{errors:oe}=await L(G);if(S(G),G)for(const le of G){const Ae=Le(oe,le);Ae?Ft(n.errors,le,Ae):zn(n.errors,le)}else n.errors=oe;return oe},j=async({name:G,eventType:oe})=>{if(e.validate){const le=await e.validate({formValues:s,formState:n,name:G,eventType:oe});if(In(le))for(const Ae in le)le[Ae]&&fe(`${Z_}.${Ae}`,{message:xr(le.message)?le.message:"",type:Yi.validate});else xr(le)||!le?fe(Z_,{message:le||"",type:Yi.validate}):X(Z_);return le}return!0},B=async({fields:G,onlyCheckValid:oe,name:le,eventType:Ae,context:Ce={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ce.runRootValidation=!0,!await j({name:le,eventType:Ae})&&(Ce.valid=!1,oe)))return Ce.valid;for(const Te in G){const De=G[Te];if(De){const{_f:Je,...et}=De;if(Je){const gt=c.array.has(Je.name),Rt=De._f&&uG(De._f);Rt&&p.validatingFields&&S([Je.name],!0);const vt=await FT(De,c.disabled,s,y,t.shouldUseNativeValidation&&!oe,gt);if(Rt&&p.validatingFields&&S([Je.name]),vt[Je.name]&&(Ce.valid=!1,oe)||(!oe&&(Le(vt,Je.name)?gt?gG(n.errors,vt,Je.name):Ft(n.errors,Je.name,vt[Je.name]):zn(n.errors,Je.name)),e.shouldUseNativeValidation&&vt[Je.name]))break}!Sr(et)&&await B({context:Ce,onlyCheckValid:oe,fields:et,name:Te,eventType:Ae})}}return Ce.valid},U=()=>{for(const G of c.unMount){const oe=Le(r,G);oe&&(oe._f.refs?oe._f.refs.every(le=>!Y_(le)):!Y_(oe._f.ref))&&Y(G)}c.unMount=new Set},Z=(G,oe)=>!t.disabled&&(G&&oe&&Ft(s,G,oe),!ci(D(),i)),re=(G,oe,le)=>Ib(G,c,{...l.mount?s:mn(oe)?i:xr(G)?{[G]:oe}:oe},le,oe),q=G=>Cw(Le(l.mount?s:i,G,t.shouldUnregister?Le(i,G,[]):[])),W=(G,oe,le={})=>{const Ae=Le(r,G);let Ce=oe;if(Ae){const Te=Ae._f;Te&&(!Te.disabled&&Ft(s,G,m4(oe,Te)),Ce=Um(Te.ref)&&Dr(oe)?"":oe,f4(Te.ref)?[...Te.ref.options].forEach(De=>De.selected=Ce.includes(De.value)):Te.refs?sf(Te.ref)?Te.refs.forEach(De=>{(!De.defaultChecked||!De.disabled)&&(Array.isArray(Ce)?De.checked=!!Ce.find(Je=>Je===De.value):De.checked=Ce===De.value||!!Ce)}):Te.refs.forEach(De=>De.checked=De.value===Ce):Dw(Te.ref)?Te.ref.value="":(Te.ref.value=Ce,Te.ref.type||v.state.next({name:G,values:Un(s)})))}(le.shouldDirty||le.shouldTouch)&&M(G,Ce,le.shouldTouch,le.shouldDirty,!0),le.shouldValidate&&V(G)},ee=(G,oe,le)=>{for(const Ae in oe){if(!oe.hasOwnProperty(Ae))return;const Ce=oe[Ae],Te=G+"."+Ae,De=Le(r,Te);(c.array.has(G)||In(Ce)||De&&!De._f)&&!Za(Ce)?ee(Te,Ce,le):W(Te,Ce,le)}},ae=(G,oe,le={})=>{const Ae=Le(r,G),Ce=c.array.has(G),Te=Un(oe),De=Le(s,G),Je=ci(De,Te);if(Ft(s,G,Te),Ce)v.array.next({name:G,values:Un(s)}),le.shouldDirty&&(E(G),v.state.next({name:G,dirtyFields:n.dirtyFields,isDirty:Z(G,Te)}));else{const et=Array.isArray(Te)&&!Te.length||Sr(Te);!Ae||Ae._f||Dr(Te)||et?W(G,Te,le):ee(G,Te,le)}Je||(jT(G,c)?v.state.next({...n,name:G,values:Un(s)}):v.state.next({name:l.mount?G:void 0,values:Un(s)}))},Q=G=>{const oe=Er(G)?G(s):G;ci(s,oe)||(s={...s,...oe},v.state.next({...n,values:s}))},k=async G=>{l.mount=!0;const oe=G.target;let le=oe.name,Ae=!0;const Ce=Le(r,le),Te=et=>{Ae=Number.isNaN(et)||Za(et)&&isNaN(et.getTime())||ci(et,Le(s,le,et))},De=LT(t.mode),Je=LT(t.reValidateMode);if(Ce){let et,gt;const Rt=oe.type?DT(Ce._f):s4(G),vt=G.type===Zs.BLUR||G.type===Zs.FOCUS_OUT,Nn=!dG(Ce._f)&&!e.validate&&!t.resolver&&!Le(n.errors,le)&&!Ce._f.deps||pG(vt,Le(n.touchedFields,le),n.isSubmitted,Je,De),Mo=jT(le,c,vt);Ft(s,le,Rt),vt?(!oe||!oe.readOnly)&&(Ce._f.onBlur&&Ce._f.onBlur(G),d&&d(0)):Ce._f.onChange&&Ce._f.onChange(G);const Fi=M(le,Rt,vt),Ze=!Sr(Fi)||Mo;if(!vt&&v.state.next({name:le,type:G.type,values:Un(s)}),Nn)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?vt&&x():vt||x()),Ze&&v.state.next({name:le,...Mo?{}:Fi});if(!t.resolver&&e.validate&&await j({name:le,eventType:G.type}),!vt&&Mo&&v.state.next({...n}),t.resolver){const{errors:ut}=await L([le]);if(S([le]),Te(Rt),Ae){const Ot=UT(n.errors,r,le),it=UT(ut,r,Ot.name||le);et=it.error,le=it.name,gt=Sr(ut)}}else S([le],!0),et=(await FT(Ce,c.disabled,s,y,t.shouldUseNativeValidation))[le],S([le]),Te(Rt),Ae&&(et?gt=!1:(p.isValid||g.isValid)&&(gt=await B({fields:r,onlyCheckValid:!0,name:le,eventType:G.type})));Ae&&(Ce._f.deps&&(!Array.isArray(Ce._f.deps)||Ce._f.deps.length>0)&&V(Ce._f.deps),P(le,gt,et,Fi))}},K=(G,oe)=>{if(Le(n.errors,oe)&&G.focus)return G.focus(),1},V=async(G,oe={})=>{let le,Ae;const Ce=Md(G);if(t.resolver){const Te=await H(mn(G)?G:Ce);le=Sr(Te),Ae=G?!Ce.some(De=>Le(Te,De)):le}else G?(Ae=(await Promise.all(Ce.map(async Te=>{const De=Le(r,Te);return await B({fields:De&&De._f?{[Te]:De}:De,eventType:Zs.TRIGGER})}))).every(Boolean),!(!Ae&&!n.isValid)&&x()):Ae=le=await B({fields:r,name:G,eventType:Zs.TRIGGER});return v.state.next({...!xr(G)||(p.isValid||g.isValid)&&le!==n.isValid?{}:{name:G},...t.resolver||!G?{isValid:le}:{},errors:n.errors}),oe.shouldFocus&&!Ae&&Pd(r,K,G?Ce:c.mount),Ae},D=(G,oe)=>{let le={...l.mount?s:i};return oe&&(le=d4(oe.dirtyFields?n.dirtyFields:n.touchedFields,le)),mn(G)?le:xr(G)?Le(le,G):G.map(Ae=>Le(le,Ae))},F=(G,oe)=>({invalid:!!Le((oe||n).errors,G),isDirty:!!Le((oe||n).dirtyFields,G),error:Le((oe||n).errors,G),isValidating:!!Le(n.validatingFields,G),isTouched:!!Le((oe||n).touchedFields,G)}),X=G=>{const oe=G?Md(G):void 0;oe?.forEach(le=>zn(n.errors,le)),oe?oe.forEach(le=>{v.state.next({name:le,errors:n.errors})}):v.state.next({errors:{}})},fe=(G,oe,le)=>{const Ae=(Le(r,G,{_f:{}})._f||{}).ref,Ce=Le(n.errors,G)||{},{ref:Te,message:De,type:Je,...et}=Ce;Ft(n.errors,G,{...et,...oe,ref:Ae}),v.state.next({name:G,errors:n.errors,isValid:!1}),le&&le.shouldFocus&&Ae&&Ae.focus&&Ae.focus()},pe=(G,oe)=>Er(G)?v.state.subscribe({next:le=>"values"in le&&G(le.values||re(void 0,oe),le)}):re(G,oe,!0),xe=G=>v.state.subscribe({next:oe=>{if(hG(G.name,oe.name,G.exact)&&fG(oe,G.formState||p,Ne,G.reRenderRoot)){const le={...s};G.callback({values:le,...n,...oe,defaultValues:i})}}}).unsubscribe,Ue=G=>(l.mount=!0,g={...g,...G.formState},xe({...G,formState:{...m,...G.formState}})),Y=(G,oe={})=>{for(const le of G?Md(G):c.mount)c.mount.delete(le),c.array.delete(le),oe.keepValue||(zn(r,le),zn(s,le)),!oe.keepError&&zn(n.errors,le),!oe.keepDirty&&zn(n.dirtyFields,le),!oe.keepTouched&&zn(n.touchedFields,le),!oe.keepIsValidating&&zn(n.validatingFields,le),!t.shouldUnregister&&!oe.keepDefaultValue&&zn(i,le);v.state.next({values:Un(s)}),v.state.next({...n,...oe.keepDirty?{isDirty:Z()}:{}}),!oe.keepIsValid&&x()},te=({disabled:G,name:oe})=>{if(li(G)&&l.mount||G||c.disabled.has(oe)){const Ce=c.disabled.has(oe)!==!!G;G?c.disabled.add(oe):c.disabled.delete(oe),Ce&&l.mount&&!l.action&&x()}},ve=(G,oe={})=>{let le=Le(r,G);const Ae=li(oe.disabled)||li(t.disabled),Ce=!c.registerName.has(G)&&le&&le._f&&!le._f.mount;return Ft(r,G,{...le||{},_f:{...le&&le._f?le._f:{ref:{name:G}},name:G,mount:!0,...oe}}),c.mount.add(G),le&&!Ce?te({disabled:li(oe.disabled)?oe.disabled:t.disabled,name:G}):A(G,!0,oe.value),{...Ae?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:Wu(oe.min),max:Wu(oe.max),minLength:Wu(oe.minLength),maxLength:Wu(oe.maxLength),pattern:Wu(oe.pattern)}:{},name:G,onChange:k,onBlur:k,ref:Te=>{if(Te){c.registerName.add(G),ve(G,oe),c.registerName.delete(G),le=Le(r,G);const De=mn(Te.value)&&Te.querySelectorAll&&Te.querySelectorAll("input,select,textarea")[0]||Te,Je=iG(De),et=le._f.refs||[];if(Je?et.find(gt=>gt===De):De===le._f.ref)return;Ft(r,G,{_f:{...le._f,...Je?{refs:[...et.filter(Y_),De,...Array.isArray(Le(i,G))?[{}]:[]],ref:{type:De.type,name:G}}:{ref:De}}}),A(G,!1,void 0,De)}else le=Le(r,G,{}),le._f&&(le._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(a4(c.array,G)&&l.action)&&c.unMount.add(G)}}},se=()=>t.shouldFocusError&&Pd(r,K,c.mount),we=G=>{li(G)&&(v.state.next({disabled:G}),Pd(r,(oe,le)=>{const Ae=Le(r,le);Ae&&(oe.disabled=Ae._f.disabled||G,Array.isArray(Ae._f.refs)&&Ae._f.refs.forEach(Ce=>{Ce.disabled=Ae._f.disabled||G}))},0,!1))},Oe=(G,oe)=>async le=>{let Ae;le&&(le.preventDefault&&le.preventDefault(),le.persist&&le.persist());let Ce=Un(s);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Te,values:De}=await L();S(),n.errors=Te,Ce=Un(De)}else await B({fields:r,eventType:Zs.SUBMIT});if(c.disabled.size)for(const Te of c.disabled)zn(Ce,Te);if(zn(n.errors,l4),Sr(n.errors)){v.state.next({errors:{}});try{await G(Ce,le)}catch(Te){Ae=Te}}else oe&&await oe({...n.errors},le),se(),setTimeout(se);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(n.errors)&&!Ae,submitCount:n.submitCount+1,errors:n.errors}),Ae)throw Ae},nt=(G,oe={})=>{Le(r,G)&&(mn(oe.defaultValue)?ae(G,Un(Le(i,G))):(ae(G,oe.defaultValue),Ft(i,G,Un(oe.defaultValue))),oe.keepTouched||zn(n.touchedFields,G),oe.keepDirty||(zn(n.dirtyFields,G),n.isDirty=oe.defaultValue?Z(G,Un(Le(i,G))):Z()),oe.keepError||(zn(n.errors,G),p.isValid&&x()),v.state.next({...n}))},ot=(G,oe={})=>{const le=G?Un(G):i,Ae=Un(le),Ce=Sr(G),Te=Ce?i:Ae;if(oe.keepDefaultValues||(i=le),!oe.keepValues){if(oe.keepDirtyValues){const De=new Set([...c.mount,...Object.keys(gd(i,s))]);for(const Je of Array.from(De)){const et=Le(n.dirtyFields,Je),gt=Le(s,Je),Rt=Le(Te,Je);et&&!mn(gt)?Ft(Te,Je,gt):!et&&!mn(Rt)&&ae(Je,Rt)}}else{if(Tw&&mn(G))for(const De of c.mount){const Je=Le(r,De);if(Je&&Je._f){const et=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(Um(et)){const gt=et.closest("form");if(gt){gt.reset();break}}}}if(oe.keepFieldsRef)for(const De of c.mount)ae(De,Le(Te,De));else r={}}s=t.shouldUnregister?oe.keepDefaultValues?Un(i):{}:Un(Te),v.array.next({values:{...Te}}),v.state.next({values:{...Te}})}c={mount:oe.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues||!t.shouldUnregister&&!Sr(Te),l.watch=!!t.shouldUnregister,l.keepIsValid=!!oe.keepIsValid,l.action=!1,oe.keepErrors||(n.errors={}),v.state.next({submitCount:oe.keepSubmitCount?n.submitCount:0,isDirty:Ce?!1:oe.keepDirty?n.isDirty:!!(oe.keepDefaultValues&&!ci(G,i)),isSubmitted:oe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ce?{}:oe.keepDirtyValues?oe.keepDefaultValues&&s?gd(i,s):n.dirtyFields:oe.keepDefaultValues&&G?gd(i,G):oe.keepDirty?n.dirtyFields:{},touchedFields:oe.keepTouched?n.touchedFields:{},errors:oe.keepErrors?n.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Be=(G,oe)=>ot(Er(G)?G(s):G,{...t.resetOptions,...oe}),Xe=(G,oe={})=>{const le=Le(r,G),Ae=le&&le._f;if(Ae){const Ce=Ae.refs?Ae.refs[0]:Ae.ref;Ce.focus&&setTimeout(()=>{Ce.focus(),oe.shouldSelect&&Er(Ce.select)&&Ce.select()})}},Ne=G=>{n={...n,...G}},Me={control:{register:ve,unregister:Y,getFieldState:F,handleSubmit:Oe,setError:fe,_subscribe:xe,_runSchema:L,_updateIsValidating:S,_focusError:se,_getWatch:re,_getDirty:Z,_setValid:x,_setFieldArray:R,_setDisabledField:te,_setErrors:O,_getFieldArray:q,_reset:ot,_resetDefaultValues:()=>Er(t.defaultValues)&&t.defaultValues().then(G=>{Be(G,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:we,_subjects:v,_proxyFormState:p,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(G){l=G},get _defaultValues(){return i},get _names(){return c},set _names(G){c=G},get _formState(){return n},get _options(){return t},set _options(G){t={...t,...G}}},subscribe:Ue,trigger:V,register:ve,handleSubmit:Oe,watch:pe,setValue:ae,setValues:Q,getValues:D,reset:Be,resetField:nt,clearErrors:X,unregister:Y,setError:fe,setFocus:Xe,getFieldState:F};return{...Me,formControl:Me}}function Oo(e={}){const t=ne.useRef(void 0),n=ne.useRef(void 0),[r,i]=ne.useState({isDirty:!1,isValidating:!1,isLoading:Er(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Er(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Er(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=_G(e);t.current={...c,formState:r}}const s=t.current.control;return s._options=e,Pw(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(c=>({...c,isReady:!0})),s._formState.isReady=!0,l},[s]),ne.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),ne.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),ne.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),ne.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),ne.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),ne.useEffect(()=>{var l;e.values&&!ci(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((l=s._options.resetOptions)===null||l===void 0)&&l.keepIsValid||s._setValid(),n.current=e.values,i(c=>({...c}))):s._resetDefaultValues()},[s,e.values]),ne.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=ne.useMemo(()=>c4(r,s),[s,r]),t.current}function BT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function af(...e){return t=>{let n=!1;const r=e.map(i=>{const s=BT(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():BT(e[i],null)}}}}function Wn(...e){return I.useCallback(af(...e),e)}var yG=Symbol.for("react.lazy"),Fm=W1[" use ".trim().toString()];function bG(e){return typeof e=="object"&&e!==null&&"then"in e}function v4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yG&&"_payload"in e&&bG(e._payload)}function _4(e){const t=wG(e),n=I.forwardRef((r,i)=>{let{children:s,...l}=r;v4(s)&&typeof Fm=="function"&&(s=Fm(s._payload));const c=I.Children.toArray(s),d=c.find(EG);if(d){const f=d.props.children,m=c.map(p=>p===d?I.Children.count(f)>1?I.Children.only(null):I.isValidElement(f)?f.props.children:null:p);return T.jsx(t,{...l,ref:i,children:I.isValidElement(f)?I.cloneElement(f,void 0,m):null})}return T.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var $w=_4("Slot");function wG(e){const t=I.forwardRef((n,r)=>{let{children:i,...s}=n;if(v4(i)&&typeof Fm=="function"&&(i=Fm(i._payload)),I.isValidElement(i)){const l=RG(i),c=xG(s,i.props);return i.type!==I.Fragment&&(c.ref=r?af(r,l):l),I.cloneElement(i,c)}return I.Children.count(i)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SG=Symbol("radix.slottable");function EG(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SG}function xG(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const d=s(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function RG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const VT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qT=hw,y4=(e,t)=>n=>{var r;if(t?.variants==null)return qT(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,l=Object.keys(i).map(f=>{const m=n?.[f],p=s?.[f];if(m===null)return null;const g=VT(m)||VT(p);return i[f][g]}),c=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...v}=m;return Object.entries(v).every(y=>{let[b,x]=y;return Array.isArray(x)?x.includes({...s,...c}[b]):{...s,...c}[b]===x})?[...f,p,g]:f},[]);return qT(e,l,d,n?.class,n?.className)},HT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Le(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Nb=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?HT(r.ref,n,e):r&&r.refs&&r.refs.forEach(i=>HT(i,n,e))}},GT=(e,t)=>{t.shouldUseNativeValidation&&Nb(e,t);const n={};for(const r in e){const i=Le(t.fields,r),s=Object.assign(e[r]||{},{ref:i&&i.ref});if(OG(t.names||Object.keys(e),r)){const l=Object.assign({},Le(n,r));Ft(l,"root",s),Ft(n,r,l)}else Ft(n,r,s)}return n},OG=(e,t)=>{const n=KT(t);return e.some(r=>KT(r).match(`^${n}\\.\\d+`))};function KT(e){return e.replace(/\]|\[/g,"")}function ZT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function TG(e,t){for(var n={};e.length;){var r=e[0],i=r.code,s=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=kw(l,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function CG(e,t){for(var n={};e.length;){var r=e[0],i=r.code,s=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:i};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=kw(l,t,n,i,f?[].concat(f,r.message):r.message)}e.shift()}return n}function To(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,i,s){try{return Promise.resolve(ZT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return s.shouldUseNativeValidation&&Nb({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:GT(TG(l.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,i,s){try{return Promise.resolve(ZT(function(){return Promise.resolve((n.mode==="sync"?zz:Fz)(e,r,t)).then(function(l){return s.shouldUseNativeValidation&&Nb({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof _w})(l))return{values:{},errors:GT(CG(l.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}function lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function AG(e,t){const n=I.createContext(t),r=s=>{const{children:l,...c}=s,d=I.useMemo(()=>c,Object.values(c));return T.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function i(s){const l=I.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function fl(e,t=[]){let n=[];function r(s,l){const c=I.createContext(l),d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:v,...y}=p,b=g?.[e]?.[d]||c,x=I.useMemo(()=>y,Object.values(y));return T.jsx(b.Provider,{value:x,children:v})};f.displayName=s+"Provider";function m(p,g){const v=g?.[e]?.[d]||c,y=I.useContext(v);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[f,m]}const i=()=>{const s=n.map(l=>I.createContext(l));return function(c){const d=c?.[e]||s;return I.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,IG(i,...t)]}function IG(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const p=d(s)[`__scope${f}`];return{...c,...p}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var to=globalThis?.document?I.useLayoutEffect:()=>{},MG=W1[" useId ".trim().toString()]||(()=>{}),PG=0;function ta(e){const[t,n]=I.useState(MG());return to(()=>{n(r=>r??String(PG++))},[e]),e||(t?`radix-${t}`:"")}var NG=W1[" useInsertionEffect ".trim().toString()]||to;function lf({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,l]=kG({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:i;{const m=I.useRef(e!==void 0);I.useEffect(()=>{const p=m.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const f=I.useCallback(m=>{if(c){const p=DG(m)?m(e):m;p!==e&&l.current?.(p)}else s(m)},[c,e,s,l]);return[d,f]}function kG({defaultProp:e,onChange:t}){const[n,r]=I.useState(e),i=I.useRef(n),s=I.useRef(t);return NG(()=>{s.current=t},[t]),I.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}function DG(e){return typeof e=="function"}function Gd(e){const t=LG(e),n=I.forwardRef((r,i)=>{const{children:s,...l}=r,c=I.Children.toArray(s),d=c.find($G);if(d){const f=d.props.children,m=c.map(p=>p===d?I.Children.count(f)>1?I.Children.only(null):I.isValidElement(f)?f.props.children:null:p);return T.jsx(t,{...l,ref:i,children:I.isValidElement(f)?I.cloneElement(f,void 0,m):null})}return T.jsx(t,{...l,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function LG(e){const t=I.forwardRef((n,r)=>{const{children:i,...s}=n;if(I.isValidElement(i)){const l=UG(i),c=jG(s,i.props);return i.type!==I.Fragment&&(c.ref=r?af(r,l):l),I.cloneElement(i,c)}return I.Children.count(i)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var b4=Symbol("radix.slottable");function mle(e){const t=({children:n})=>T.jsx(T.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=b4,t}function $G(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===b4}function jG(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...c)=>{const d=s(...c);return i(...c),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function UG(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yn=zG.reduce((e,t)=>{const n=Gd(`Primitive.${t}`),r=I.forwardRef((i,s)=>{const{asChild:l,...c}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function w4(e,t){e&&Ig.flushSync(()=>e.dispatchEvent(t))}function no(e){const t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(...n)=>t.current?.(...n),[])}function FG(e,t=globalThis?.document){const n=no(e);I.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var BG="DismissableLayer",kb="dismissableLayer.update",VG="dismissableLayer.pointerDownOutside",qG="dismissableLayer.focusOutside",YT,S4=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jw=I.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=e,f=I.useContext(S4),[m,p]=I.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=I.useState({}),y=Wn(t,M=>p(M)),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),E=m?b.indexOf(m):-1,R=f.layersWithOutsidePointerEventsDisabled.size>0,C=E>=S,O=KG(M=>{const P=M.target,L=[...f.branches].some(H=>H.contains(P));!C||L||(i?.(M),l?.(M),M.defaultPrevented||c?.())},g),A=ZG(M=>{const P=M.target;[...f.branches].some(H=>H.contains(P))||(s?.(M),l?.(M),M.defaultPrevented||c?.())},g);return FG(M=>{E===f.layers.size-1&&(r?.(M),!M.defaultPrevented&&c&&(M.preventDefault(),c()))},g),I.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(YT=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),WT(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=YT)}},[m,g,n,f]),I.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),WT())},[m,f]),I.useEffect(()=>{const M=()=>v({});return document.addEventListener(kb,M),()=>document.removeEventListener(kb,M)},[]),T.jsx(yn.div,{...d,ref:y,style:{pointerEvents:R?C?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,A.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,O.onPointerDownCapture)})});jw.displayName=BG;var HG="DismissableLayerBranch",GG=I.forwardRef((e,t)=>{const n=I.useContext(S4),r=I.useRef(null),i=Wn(t,r);return I.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),T.jsx(yn.div,{...e,ref:i})});GG.displayName=HG;function KG(e,t=globalThis?.document){const n=no(e),r=I.useRef(!1),i=I.useRef(()=>{});return I.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let d=function(){E4(VG,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZG(e,t=globalThis?.document){const n=no(e),r=I.useRef(!1);return I.useEffect(()=>{const i=s=>{s.target&&!r.current&&E4(qG,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function WT(){const e=new CustomEvent(kb);document.dispatchEvent(e)}function E4(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?w4(i,s):i.dispatchEvent(s)}var W_="focusScope.autoFocusOnMount",Q_="focusScope.autoFocusOnUnmount",QT={bubbles:!1,cancelable:!0},YG="FocusScope",Uw=I.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=e,[c,d]=I.useState(null),f=no(i),m=no(s),p=I.useRef(null),g=Wn(t,b=>d(b)),v=I.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;I.useEffect(()=>{if(r){let b=function(R){if(v.paused||!c)return;const C=R.target;c.contains(C)?p.current=C:Ks(p.current,{select:!0})},x=function(R){if(v.paused||!c)return;const C=R.relatedTarget;C!==null&&(c.contains(C)||Ks(p.current,{select:!0}))},S=function(R){if(document.activeElement===document.body)for(const O of R)O.removedNodes.length>0&&Ks(c)};document.addEventListener("focusin",b),document.addEventListener("focusout",x);const E=new MutationObserver(S);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",x),E.disconnect()}}},[r,c,v.paused]),I.useEffect(()=>{if(c){JT.add(v);const b=document.activeElement;if(!c.contains(b)){const S=new CustomEvent(W_,QT);c.addEventListener(W_,f),c.dispatchEvent(S),S.defaultPrevented||(WG(tK(x4(c)),{select:!0}),document.activeElement===b&&Ks(c))}return()=>{c.removeEventListener(W_,f),setTimeout(()=>{const S=new CustomEvent(Q_,QT);c.addEventListener(Q_,m),c.dispatchEvent(S),S.defaultPrevented||Ks(b??document.body,{select:!0}),c.removeEventListener(Q_,m),JT.remove(v)},0)}}},[c,f,m,v]);const y=I.useCallback(b=>{if(!n&&!r||v.paused)return;const x=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,S=document.activeElement;if(x&&S){const E=b.currentTarget,[R,C]=QG(E);R&&C?!b.shiftKey&&S===C?(b.preventDefault(),n&&Ks(R,{select:!0})):b.shiftKey&&S===R&&(b.preventDefault(),n&&Ks(C,{select:!0})):S===E&&b.preventDefault()}},[n,r,v.paused]);return T.jsx(yn.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});Uw.displayName=YG;function WG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ks(r,{select:t}),document.activeElement!==n)return}function QG(e){const t=x4(e),n=XT(t,e),r=XT(t.reverse(),e);return[n,r]}function x4(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XT(e,t){for(const n of e)if(!XG(n,{upTo:t}))return n}function XG(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function JG(e){return e instanceof HTMLInputElement&&"select"in e}function Ks(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JG(e)&&t&&e.select()}}var JT=eK();function eK(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=eC(e,t),e.unshift(t)},remove(t){e=eC(e,t),e[0]?.resume()}}}function eC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tK(e){return e.filter(t=>t.tagName!=="A")}var nK="Portal",zw=I.forwardRef((e,t)=>{const{container:n,...r}=e,[i,s]=I.useState(!1);to(()=>s(!0),[]);const l=n||i&&globalThis?.document?.body;return l?fP.createPortal(T.jsx(yn.div,{...r,ref:t}),l):null});zw.displayName=nK;function rK(e,t){return I.useReducer((n,r)=>t[n][r]??n,e)}var ds=e=>{const{present:t,children:n}=e,r=iK(t),i=typeof n=="function"?n({present:r.isPresent}):I.Children.only(n),s=Wn(r.ref,oK(i));return typeof n=="function"||r.isPresent?I.cloneElement(i,{ref:s}):null};ds.displayName="Presence";function iK(e){const[t,n]=I.useState(),r=I.useRef(null),i=I.useRef(e),s=I.useRef("none"),l=e?"mounted":"unmounted",[c,d]=rK(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const f=Qh(r.current);s.current=c==="mounted"?f:"none"},[c]),to(()=>{const f=r.current,m=i.current;if(m!==e){const g=s.current,v=Qh(f);e?d("MOUNT"):v==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),to(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=v=>{const b=Qh(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&b&&(d("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=v=>{v.target===t&&(s.current=Qh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:I.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Qh(e){return e?.animationName||"none"}function oK(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var X_=0;function R4(){I.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tC()),document.body.insertAdjacentElement("beforeend",e[1]??tC()),X_++,()=>{X_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),X_--}},[])}function tC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _o=function(){return _o=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},_o.apply(this,arguments)};function O4(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sK(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var cm="right-scroll-bar-position",um="width-before-scroll-bar",aK="with-scroll-bars-hidden",lK="--removed-body-scroll-bar-size";function J_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function cK(e,t){var n=I.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var uK=typeof window<"u"?I.useLayoutEffect:I.useEffect,nC=new WeakMap;function dK(e,t){var n=cK(null,function(r){return e.forEach(function(i){return J_(i,r)})});return uK(function(){var r=nC.get(n);if(r){var i=new Set(r),s=new Set(e),l=n.current;i.forEach(function(c){s.has(c)||J_(c,null)}),s.forEach(function(c){i.has(c)||J_(c,l)})}nC.set(n,e)},[e]),n}function fK(e){return e}function hK(e,t){t===void 0&&(t=fK);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var d=function(){var m=l;l=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return i}function pK(e){e===void 0&&(e={});var t=hK(null);return t.options=_o({async:!0,ssr:!1},e),t}var T4=function(e){var t=e.sideCar,n=O4(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return I.createElement(r,_o({},n))};T4.isSideCarExport=!0;function mK(e,t){return e.useMedium(t),T4}var C4=pK(),ey=function(){},zg=I.forwardRef(function(e,t){var n=I.useRef(null),r=I.useState({onScrollCapture:ey,onWheelCapture:ey,onTouchMoveCapture:ey}),i=r[0],s=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,y=e.noIsolation,b=e.inert,x=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,R=e.gapMode,C=O4(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,A=dK([n,t]),M=_o(_o({},C),i);return I.createElement(I.Fragment,null,m&&I.createElement(O,{sideCar:C4,removeScrollBar:f,shards:p,noRelative:v,noIsolation:y,inert:b,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:R}),l?I.cloneElement(I.Children.only(c),_o(_o({},M),{ref:A})):I.createElement(E,_o({},M,{className:d,ref:A}),c))});zg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zg.classNames={fullWidth:um,zeroRight:cm};var gK=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gK();return t&&e.setAttribute("nonce",t),e}function _K(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bK=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vK())&&(_K(t,n),yK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wK=function(){var e=bK();return function(t,n){I.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},A4=function(){var e=wK(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},SK={left:0,top:0,right:0,gap:0},ty=function(e){return parseInt(e||"",10)||0},EK=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[ty(n),ty(r),ty(i)]},xK=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return SK;var t=EK(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},RK=A4(),Ac="data-scroll-locked",OK=function(e,t,n,r){var i=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
62
62
|
.`.concat(aK,` {
|
|
63
63
|
overflow: hidden `).concat(r,`;
|
|
64
64
|
padding-right: `).concat(c,"px ").concat(r,`;
|
|
@@ -95,14 +95,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
95
95
|
body[`).concat(Ac,`] {
|
|
96
96
|
`).concat(lK,": ").concat(c,`px;
|
|
97
97
|
}
|
|
98
|
-
`)},rC=function(){var e=parseInt(document.body.getAttribute(Ac)||"0",10);return isFinite(e)?e:0},TK=function(){I.useEffect(function(){return document.body.setAttribute(Ac,(rC()+1).toString()),function(){var e=rC()-1;e<=0?document.body.removeAttribute(Ac):document.body.setAttribute(Ac,e.toString())}},[])},CK=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;TK();var s=I.useMemo(function(){return xK(i)},[i]);return I.createElement(RK,{styles:OK(s,!t,i,n?"":"!important")})},Db=!1;if(typeof window<"u")try{var Xh=Object.defineProperty({},"passive",{get:function(){return Db=!0,!0}});window.addEventListener("test",Xh,Xh),window.removeEventListener("test",Xh,Xh)}catch{Db=!1}var tc=Db?{passive:!1}:!1,AK=function(e){return e.tagName==="TEXTAREA"},
|
|
98
|
+
`)},rC=function(){var e=parseInt(document.body.getAttribute(Ac)||"0",10);return isFinite(e)?e:0},TK=function(){I.useEffect(function(){return document.body.setAttribute(Ac,(rC()+1).toString()),function(){var e=rC()-1;e<=0?document.body.removeAttribute(Ac):document.body.setAttribute(Ac,e.toString())}},[])},CK=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;TK();var s=I.useMemo(function(){return xK(i)},[i]);return I.createElement(RK,{styles:OK(s,!t,i,n?"":"!important")})},Db=!1;if(typeof window<"u")try{var Xh=Object.defineProperty({},"passive",{get:function(){return Db=!0,!0}});window.addEventListener("test",Xh,Xh),window.removeEventListener("test",Xh,Xh)}catch{Db=!1}var tc=Db?{passive:!1}:!1,AK=function(e){return e.tagName==="TEXTAREA"},I4=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!AK(e)&&n[t]==="visible")},IK=function(e){return I4(e,"overflowY")},MK=function(e){return I4(e,"overflowX")},iC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=M4(e,r);if(i){var s=P4(e,r),l=s[1],c=s[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PK=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},NK=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},M4=function(e,t){return e==="v"?IK(t):MK(t)},P4=function(e,t){return e==="v"?PK(t):NK(t)},kK=function(e,t){return e==="h"&&t==="rtl"?-1:1},DK=function(e,t,n,r,i){var s=kK(e,window.getComputedStyle(t).direction),l=s*r,c=n.target,d=t.contains(c),f=!1,m=l>0,p=0,g=0;do{if(!c)break;var v=P4(e,c),y=v[0],b=v[1],x=v[2],S=b-x-s*y;(y||S)&&M4(e,c)&&(p+=S,g+=y);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},Jh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oC=function(e){return[e.deltaX,e.deltaY]},sC=function(e){return e&&"current"in e?e.current:e},LK=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$K=function(e){return`
|
|
99
99
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
100
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
-
`)},jK=0,nc=[];function UK(e){var t=I.useRef([]),n=I.useRef([0,0]),r=I.useRef(),i=I.useState(jK++)[0],s=I.useState(
|
|
101
|
+
`)},jK=0,nc=[];function UK(e){var t=I.useRef([]),n=I.useRef([0,0]),r=I.useRef(),i=I.useState(jK++)[0],s=I.useState(A4)[0],l=I.useRef(e);I.useEffect(function(){l.current=e},[e]),I.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=sK([e.lockRef.current],(e.shards||[]).map(sC),!0).filter(Boolean);return b.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=I.useCallback(function(b,x){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var S=Jh(b),E=n.current,R="deltaX"in b?b.deltaX:E[0]-S[0],C="deltaY"in b?b.deltaY:E[1]-S[1],O,A=b.target,M=Math.abs(R)>Math.abs(C)?"h":"v";if("touches"in b&&M==="h"&&A.type==="range")return!1;var P=window.getSelection(),L=P&&P.anchorNode,H=L?L===A||L.contains(A):!1;if(H)return!1;var j=iC(M,A);if(!j)return!0;if(j?O=M:(O=M==="v"?"h":"v",j=iC(M,A)),!j)return!1;if(!r.current&&"changedTouches"in b&&(R||C)&&(r.current=O),!O)return!0;var B=r.current||O;return DK(B,x,b,B==="h"?R:C)},[]),d=I.useCallback(function(b){var x=b;if(!(!nc.length||nc[nc.length-1]!==s)){var S="deltaY"in x?oC(x):Jh(x),E=t.current.filter(function(O){return O.name===x.type&&(O.target===x.target||x.target===O.shadowParent)&&LK(O.delta,S)})[0];if(E&&E.should){x.cancelable&&x.preventDefault();return}if(!E){var R=(l.current.shards||[]).map(sC).filter(Boolean).filter(function(O){return O.contains(x.target)}),C=R.length>0?c(x,R[0]):!l.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),f=I.useCallback(function(b,x,S,E){var R={name:b,delta:x,target:S,should:E,shadowParent:zK(S)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(C){return C!==R})},1)},[]),m=I.useCallback(function(b){n.current=Jh(b),r.current=void 0},[]),p=I.useCallback(function(b){f(b.type,oC(b),b.target,c(b,e.lockRef.current))},[]),g=I.useCallback(function(b){f(b.type,Jh(b),b.target,c(b,e.lockRef.current))},[]);I.useEffect(function(){return nc.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,tc),document.addEventListener("touchmove",d,tc),document.addEventListener("touchstart",m,tc),function(){nc=nc.filter(function(b){return b!==s}),document.removeEventListener("wheel",d,tc),document.removeEventListener("touchmove",d,tc),document.removeEventListener("touchstart",m,tc)}},[]);var v=e.removeScrollBar,y=e.inert;return I.createElement(I.Fragment,null,y?I.createElement(s,{styles:$K(i)}):null,v?I.createElement(CK,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FK=mK(C4,UK);var Fw=I.forwardRef(function(e,t){return I.createElement(zg,_o({},e,{ref:t,sideCar:FK}))});Fw.classNames=zg.classNames;var BK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rc=new WeakMap,ep=new WeakMap,tp={},ny=0,N4=function(e){return e&&(e.host||N4(e.parentNode))},VK=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=N4(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},qK=function(e,t,n,r){var i=VK(t,Array.isArray(e)?e:[e]);tp[n]||(tp[n]=new WeakMap);var s=tp[n],l=[],c=new Set,d=new Set(i),f=function(p){!p||c.has(p)||(c.add(p),f(p.parentNode))};i.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(c.has(g))m(g);else try{var v=g.getAttribute(r),y=v!==null&&v!=="false",b=(rc.get(g)||0)+1,x=(s.get(g)||0)+1;rc.set(g,b),s.set(g,x),l.push(g),b===1&&y&&ep.set(g,!0),x===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return m(t),c.clear(),ny++,function(){l.forEach(function(p){var g=rc.get(p)-1,v=s.get(p)-1;rc.set(p,g),s.set(p,v),g||(ep.has(p)||p.removeAttribute(r),ep.delete(p)),v||p.removeAttribute(n)}),ny--,ny||(rc=new WeakMap,rc=new WeakMap,ep=new WeakMap,tp={})}},k4=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=BK(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),qK(r,i,n,"aria-hidden")):function(){return null}},Fg="Dialog",[D4,gle]=fl(Fg),[HK,oo]=D4(Fg),L4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=I.useRef(null),d=I.useRef(null),[f,m]=lf({prop:r,defaultProp:i??!1,onChange:s,caller:Fg});return T.jsx(HK,{scope:t,triggerRef:c,contentRef:d,contentId:ta(),titleId:ta(),descriptionId:ta(),open:f,onOpenChange:m,onOpenToggle:I.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};L4.displayName=Fg;var $4="DialogTrigger",j4=I.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=oo($4,n),s=Wn(t,i.triggerRef);return T.jsx(yn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":qw(i.open),...r,ref:s,onClick:lt(e.onClick,i.onOpenToggle)})});j4.displayName=$4;var Bw="DialogPortal",[GK,U4]=D4(Bw,{forceMount:void 0}),z4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=oo(Bw,t);return T.jsx(GK,{scope:t,forceMount:n,children:I.Children.map(r,l=>T.jsx(ds,{present:n||s.open,children:T.jsx(zw,{asChild:!0,container:i,children:l})}))})};z4.displayName=Bw;var Bm="DialogOverlay",F4=I.forwardRef((e,t)=>{const n=U4(Bm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=oo(Bm,e.__scopeDialog);return s.modal?T.jsx(ds,{present:r||s.open,children:T.jsx(ZK,{...i,ref:t})}):null});F4.displayName=Bm;var KK=Gd("DialogOverlay.RemoveScroll"),ZK=I.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=oo(Bm,n);return T.jsx(Fw,{as:KK,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(yn.div,{"data-state":qw(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),il="DialogContent",B4=I.forwardRef((e,t)=>{const n=U4(il,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=oo(il,e.__scopeDialog);return T.jsx(ds,{present:r||s.open,children:s.modal?T.jsx(YK,{...i,ref:t}):T.jsx(WK,{...i,ref:t})})});B4.displayName=il;var YK=I.forwardRef((e,t)=>{const n=oo(il,e.__scopeDialog),r=I.useRef(null),i=Wn(t,n.contentRef,r);return I.useEffect(()=>{const s=r.current;if(s)return k4(s)},[]),T.jsx(V4,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:lt(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:lt(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&s.preventDefault()}),onFocusOutside:lt(e.onFocusOutside,s=>s.preventDefault())})}),WK=I.forwardRef((e,t)=>{const n=oo(il,e.__scopeDialog),r=I.useRef(!1),i=I.useRef(!1);return T.jsx(V4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;n.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),V4=I.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...l}=e,c=oo(il,n),d=I.useRef(null),f=Wn(t,d);return R4(),T.jsxs(T.Fragment,{children:[T.jsx(Uw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:T.jsx(jw,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":qw(c.open),...l,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(QK,{titleId:c.titleId}),T.jsx(JK,{contentRef:d,descriptionId:c.descriptionId})]})]})}),Vw="DialogTitle",q4=I.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=oo(Vw,n);return T.jsx(yn.h2,{id:i.titleId,...r,ref:t})});q4.displayName=Vw;var H4="DialogDescription",G4=I.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=oo(H4,n);return T.jsx(yn.p,{id:i.descriptionId,...r,ref:t})});G4.displayName=H4;var K4="DialogClose",Z4=I.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=oo(K4,n);return T.jsx(yn.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,()=>i.onOpenChange(!1))})});Z4.displayName=K4;function qw(e){return e?"open":"closed"}var Y4="DialogTitleWarning",[vle,W4]=AG(Y4,{contentName:il,titleName:Vw,docsSlug:"dialog"}),QK=({titleId:e})=>{const t=W4(Y4),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
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 I.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},XK="DialogDescriptionWarning",JK=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${W3(XK).contentName}}.`;return I.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},eZ=L3,tZ=j3,nZ=z3,rZ=F3,iZ=B3,oZ=q3,sZ=G3,aZ=Z3;function Q3(e){const t=e+"CollectionProvider",[n,r]=fl(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=b=>{const{scope:x,children:S}=b,E=ne.useRef(null),R=ne.useRef(new Map).current;return T.jsx(i,{scope:x,itemMap:R,collectionRef:E,children:S})};l.displayName=t;const c=e+"CollectionSlot",d=Gd(c),f=ne.forwardRef((b,x)=>{const{scope:S,children:E}=b,R=s(c,S),C=Wn(x,R.collectionRef);return T.jsx(d,{ref:C,children:E})});f.displayName=c;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=Gd(m),v=ne.forwardRef((b,x)=>{const{scope:S,children:E,...R}=b,C=ne.useRef(null),O=Wn(x,C),A=s(m,S);return ne.useEffect(()=>(A.itemMap.set(C,{ref:C,...R}),()=>{A.itemMap.delete(C)})),T.jsx(g,{[p]:"",ref:O,children:E})});v.displayName=m;function y(b){const x=s(e+"CollectionConsumer",b);return ne.useCallback(()=>{const E=x.collectionRef.current;if(!E)return[];const R=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((A,M)=>R.indexOf(A.ref.current)-R.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:l,Slot:f,ItemSlot:v},y,r]}var lZ=I.createContext(void 0);function X3(e){const t=I.useContext(lZ);return e||t||"ltr"}const cZ=["top","right","bottom","left"],sa=Math.min,di=Math.max,Vm=Math.round,np=Math.floor,Eo=e=>({x:e,y:e}),uZ={left:"right",right:"left",bottom:"top",top:"bottom"};function Lb(e,t,n){return di(e,sa(t,n))}function ls(e,t){return typeof e=="function"?e(t):e}function cs(e){return e.split("-")[0]}function Yc(e){return e.split("-")[1]}function Hw(e){return e==="x"?"y":"x"}function Gw(e){return e==="y"?"height":"width"}function bo(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Kw(e){return Hw(bo(e))}function dZ(e,t,n){n===void 0&&(n=!1);const r=Yc(e),i=Kw(e),s=Gw(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=qm(l)),[l,qm(l)]}function fZ(e){const t=qm(e);return[$b(e),t,$b(t)]}function $b(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const aC=["left","right"],lC=["right","left"],hZ=["top","bottom"],pZ=["bottom","top"];function mZ(e,t,n){switch(e){case"top":case"bottom":return n?t?lC:aC:t?aC:lC;case"left":case"right":return t?hZ:pZ;default:return[]}}function gZ(e,t,n,r){const i=Yc(e);let s=mZ(cs(e),n==="start",r);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map($b)))),s}function qm(e){const t=cs(e);return uZ[t]+e.slice(t.length)}function vZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function J3(e){return typeof e!="number"?vZ(e):{top:e,right:e,bottom:e,left:e}}function Hm(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function cC(e,t,n){let{reference:r,floating:i}=e;const s=bo(t),l=Kw(t),c=Gw(l),d=cs(t),f=s==="y",m=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[c]/2-i[c]/2;let v;switch(d){case"top":v={x:m,y:r.y-i.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Yc(t)){case"start":v[l]-=g*(n&&f?-1:1);break;case"end":v[l]+=g*(n&&f?-1:1);break}return v}async function _Z(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=ls(t,e),y=J3(v),x=c[g?p==="floating"?"reference":"floating":p],S=Hm(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),E=p==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},O=Hm(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:R,strategy:d}):E);return{top:(S.top-O.top+y.top)/C.y,bottom:(O.bottom-S.bottom+y.bottom)/C.y,left:(S.left-O.left+y.left)/C.x,right:(O.right-S.right+y.right)/C.x}}const yZ=50,bZ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:_Z},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:p}=cC(f,r,d),g=r,v=0;const y={};for(let b=0;b<s.length;b++){const x=s[b];if(!x)continue;const{name:S,fn:E}=x,{x:R,y:C,data:O,reset:A}=await E({x:m,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:c,elements:{reference:e,floating:t}});m=R??m,p=C??p,y[S]={...y[S],...O},A&&v<yZ&&(v++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(f=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:m,y:p}=cC(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:i,middlewareData:y}},wZ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:m=0}=ls(e,t)||{};if(f==null)return{};const p=J3(m),g={x:n,y:r},v=Kw(i),y=Gw(v),b=await l.getDimensions(f),x=v==="y",S=x?"top":"left",E=x?"bottom":"right",R=x?"clientHeight":"clientWidth",C=s.reference[y]+s.reference[v]-g[v]-s.floating[y],O=g[v]-s.reference[v],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let M=A?A[R]:0;(!M||!await(l.isElement==null?void 0:l.isElement(A)))&&(M=c.floating[R]||s.floating[y]);const P=C/2-O/2,L=M/2-b[y]/2-1,H=sa(p[S],L),j=sa(p[E],L),B=H,U=M-b[y]-j,Z=M/2-b[y]/2+P,re=Lb(B,Z,U),q=!d.arrow&&Yc(i)!=null&&Z!==re&&s.reference[y]/2-(Z<B?H:j)-b[y]/2<0,W=q?Z<B?Z-B:Z-U:0;return{[v]:g[v]+W,data:{[v]:re,centerOffset:Z-re-W,...q&&{alignmentOffset:W}},reset:q}}}),SZ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...x}=ls(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=cs(i),E=bo(c),R=cs(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=g||(R||!b?[qm(c)]:fZ(c)),A=y!=="none";!g&&A&&O.push(...gZ(c,b,y,C));const M=[c,...O],P=await d.detectOverflow(t,x),L=[];let H=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&L.push(P[S]),p){const Z=dZ(i,l,C);L.push(P[Z[0]],P[Z[1]])}if(H=[...H,{placement:i,overflows:L}],!L.every(Z=>Z<=0)){var j,B;const Z=(((j=s.flip)==null?void 0:j.index)||0)+1,re=M[Z];if(re&&(!(p==="alignment"?E!==bo(re):!1)||H.every(ee=>bo(ee.placement)===E?ee.overflows[0]>0:!0)))return{data:{index:Z,overflows:H},reset:{placement:re}};let q=(B=H.filter(W=>W.overflows[0]<=0).sort((W,ee)=>W.overflows[1]-ee.overflows[1])[0])==null?void 0:B.placement;if(!q)switch(v){case"bestFit":{var U;const W=(U=H.filter(ee=>{if(A){const ae=bo(ee.placement);return ae===E||ae==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ae=>ae>0).reduce((ae,Q)=>ae+Q,0)]).sort((ee,ae)=>ee[1]-ae[1])[0])==null?void 0:U[0];W&&(q=W);break}case"initialPlacement":q=c;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function uC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dC(e){return cZ.some(t=>e[t]>=0)}const EZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=ls(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=uC(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:dC(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...s,altBoundary:!0}),c=uC(l,n.floating);return{data:{escapedOffsets:c,escaped:dC(c)}}}default:return{}}}}},e4=new Set(["left","top"]);async function xZ(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=cs(n),c=Yc(n),d=bo(n)==="y",f=e4.has(l)?-1:1,m=s&&d?-1:1,p=ls(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),d?{x:v*m,y:g*f}:{x:g*f,y:v*m}}const RZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:l,middlewareData:c}=t,d=await xZ(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:l}}}}},OZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:S=>{let{x:E,y:R}=S;return{x:E,y:R}}},...f}=ls(e,t),m={x:n,y:r},p=await s.detectOverflow(t,f),g=bo(cs(i)),v=Hw(g);let y=m[v],b=m[g];if(l){const S=v==="y"?"top":"left",E=v==="y"?"bottom":"right",R=y+p[S],C=y-p[E];y=Lb(R,y,C)}if(c){const S=g==="y"?"top":"left",E=g==="y"?"bottom":"right",R=b+p[S],C=b-p[E];b=Lb(R,b,C)}const x=d.fn({...t,[v]:y,[g]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:l,[g]:c}}}}}},TZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=ls(e,t),m={x:n,y:r},p=bo(i),g=Hw(p);let v=m[g],y=m[p];const b=ls(c,t),x=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const R=g==="y"?"height":"width",C=s.reference[g]-s.floating[R]+x.mainAxis,O=s.reference[g]+s.reference[R]-x.mainAxis;v<C?v=C:v>O&&(v=O)}if(f){var S,E;const R=g==="y"?"width":"height",C=e4.has(cs(i)),O=s.reference[p]-s.floating[R]+(C&&((S=l.offset)==null?void 0:S[p])||0)+(C?0:x.crossAxis),A=s.reference[p]+s.reference[R]+(C?0:((E=l.offset)==null?void 0:E[p])||0)-(C?x.crossAxis:0);y<O?y=O:y>A&&(y=A)}return{[g]:v,[p]:y}}}},CZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:l,elements:c}=t,{apply:d=()=>{},...f}=ls(e,t),m=await l.detectOverflow(t,f),p=cs(i),g=Yc(i),v=bo(i)==="y",{width:y,height:b}=s.floating;let x,S;p==="top"||p==="bottom"?(x=p,S=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(S=p,x=g==="end"?"top":"bottom");const E=b-m.top-m.bottom,R=y-m.left-m.right,C=sa(b-m[x],E),O=sa(y-m[S],R),A=!t.middlewareData.shift;let M=C,P=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=E),A&&!g){const H=di(m.left,0),j=di(m.right,0),B=di(m.top,0),U=di(m.bottom,0);v?P=y-2*(H!==0||j!==0?H+j:di(m.left,m.right)):M=b-2*(B!==0||U!==0?B+U:di(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:M});const L=await l.getDimensions(c.floating);return y!==L.width||b!==L.height?{reset:{rects:!0}}:{}}}};function Bg(){return typeof window<"u"}function Wc(e){return t4(e)?(e.nodeName||"").toLowerCase():"#document"}function hi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Co(e){var t;return(t=(t4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function t4(e){return Bg()?e instanceof Node||e instanceof hi(e).Node:!1}function ro(e){return Bg()?e instanceof Element||e instanceof hi(e).Element:!1}function fs(e){return Bg()?e instanceof HTMLElement||e instanceof hi(e).HTMLElement:!1}function fC(e){return!Bg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hi(e).ShadowRoot}function cf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=io(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function AZ(e){return/^(table|td|th)$/.test(Wc(e))}function Vg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const IZ=/transform|translate|scale|rotate|perspective|filter/,MZ=/paint|layout|strict|content/,ka=e=>!!e&&e!=="none";let ry;function Zw(e){const t=ro(e)?io(e):e;return ka(t.transform)||ka(t.translate)||ka(t.scale)||ka(t.rotate)||ka(t.perspective)||!Yw()&&(ka(t.backdropFilter)||ka(t.filter))||IZ.test(t.willChange||"")||MZ.test(t.contain||"")}function PZ(e){let t=aa(e);for(;fs(t)&&!jc(t);){if(Zw(t))return t;if(Vg(t))return null;t=aa(t)}return null}function Yw(){return ry==null&&(ry=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ry}function jc(e){return/^(html|body|#document)$/.test(Wc(e))}function io(e){return hi(e).getComputedStyle(e)}function qg(e){return ro(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function aa(e){if(Wc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fC(e)&&e.host||Co(e);return fC(t)?t.host:t}function n4(e){const t=aa(e);return jc(t)?e.ownerDocument?e.ownerDocument.body:e.body:fs(t)&&cf(t)?t:n4(t)}function Kd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=n4(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),l=hi(i);if(s){const c=jb(l);return t.concat(l,l.visualViewport||[],cf(i)?i:[],c&&n?Kd(c):[])}else return t.concat(i,Kd(i,[],n))}function jb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function r4(e){const t=io(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=fs(e),s=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Vm(n)!==s||Vm(r)!==l;return c&&(n=s,r=l),{width:n,height:r,$:c}}function Ww(e){return ro(e)?e:e.contextElement}function Ic(e){const t=Ww(e);if(!fs(t))return Eo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=r4(t);let l=(s?Vm(n.width):n.width)/r,c=(s?Vm(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const NZ=Eo(0);function i4(e){const t=hi(e);return!Yw()||!t.visualViewport?NZ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kZ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hi(e)?!1:t}function ol(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ww(e);let l=Eo(1);t&&(r?ro(r)&&(l=Ic(r)):l=Ic(e));const c=kZ(s,n,r)?i4(s):Eo(0);let d=(i.left+c.x)/l.x,f=(i.top+c.y)/l.y,m=i.width/l.x,p=i.height/l.y;if(s){const g=hi(s),v=r&&ro(r)?hi(r):r;let y=g,b=jb(y);for(;b&&r&&v!==y;){const x=Ic(b),S=b.getBoundingClientRect(),E=io(b),R=S.left+(b.clientLeft+parseFloat(E.paddingLeft))*x.x,C=S.top+(b.clientTop+parseFloat(E.paddingTop))*x.y;d*=x.x,f*=x.y,m*=x.x,p*=x.y,d+=R,f+=C,y=hi(b),b=jb(y)}}return Hm({width:m,height:p,x:d,y:f})}function Hg(e,t){const n=qg(e).scrollLeft;return t?t.left+n:ol(Co(e)).left+n}function o4(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function DZ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",l=Co(r),c=t?Vg(t.floating):!1;if(r===l||c&&s)return n;let d={scrollLeft:0,scrollTop:0},f=Eo(1);const m=Eo(0),p=fs(r);if((p||!p&&!s)&&((Wc(r)!=="body"||cf(l))&&(d=qg(r)),p)){const v=ol(r);f=Ic(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const g=l&&!p&&!s?o4(l,d):Eo(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 LZ(e){return Array.from(e.getClientRects())}function $Z(e){const t=Co(e),n=qg(e),r=e.ownerDocument.body,i=di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Hg(e);const c=-n.scrollTop;return io(r).direction==="rtl"&&(l+=di(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:l,y:c}}const hC=25;function jZ(e,t){const n=hi(e),r=Co(e),i=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,c=0,d=0;if(i){s=i.width,l=i.height;const m=Yw();(!m||m&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const f=Hg(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),v=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-v);y<=hC&&(s-=y)}else f<=hC&&(s+=f);return{width:s,height:l,x:c,y:d}}function UZ(e,t){const n=ol(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=fs(e)?Ic(e):Eo(1),l=e.clientWidth*s.x,c=e.clientHeight*s.y,d=i*s.x,f=r*s.y;return{width:l,height:c,x:d,y:f}}function pC(e,t,n){let r;if(t==="viewport")r=jZ(e,n);else if(t==="document")r=$Z(Co(e));else if(ro(t))r=UZ(t,n);else{const i=i4(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Hm(r)}function s4(e,t){const n=aa(e);return n===t||!ro(n)||jc(n)?!1:io(n).position==="fixed"||s4(n,t)}function zZ(e,t){const n=t.get(e);if(n)return n;let r=Kd(e,[],!1).filter(c=>ro(c)&&Wc(c)!=="body"),i=null;const s=io(e).position==="fixed";let l=s?aa(e):e;for(;ro(l)&&!jc(l);){const c=io(l),d=Zw(l);!d&&c.position==="fixed"&&(i=null),(s?!d&&!i:!d&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||cf(l)&&!d&&s4(e,l))?r=r.filter(m=>m!==l):i=c,l=aa(l)}return t.set(e,r),r}function FZ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Vg(t)?[]:zZ(t,this._c):[].concat(n),r],c=pC(t,l[0],i);let d=c.top,f=c.right,m=c.bottom,p=c.left;for(let g=1;g<l.length;g++){const v=pC(t,l[g],i);d=di(v.top,d),f=sa(v.right,f),m=sa(v.bottom,m),p=di(v.left,p)}return{width:f-p,height:m-d,x:p,y:d}}function BZ(e){const{width:t,height:n}=r4(e);return{width:t,height:n}}function VZ(e,t,n){const r=fs(t),i=Co(t),s=n==="fixed",l=ol(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=Eo(0);function f(){d.x=Hg(i)}if(r||!r&&!s)if((Wc(t)!=="body"||cf(i))&&(c=qg(t)),r){const v=ol(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else i&&f();s&&!r&&i&&f();const m=i&&!r&&!s?o4(i,c):Eo(0),p=l.left+c.scrollLeft-d.x-m.x,g=l.top+c.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function iy(e){return io(e).position==="static"}function mC(e,t){if(!fs(e)||io(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Co(e)===n&&(n=n.ownerDocument.body),n}function a4(e,t){const n=hi(e);if(Vg(e))return n;if(!fs(e)){let i=aa(e);for(;i&&!jc(i);){if(ro(i)&&!iy(i))return i;i=aa(i)}return n}let r=mC(e,t);for(;r&&AZ(r)&&iy(r);)r=mC(r,t);return r&&jc(r)&&iy(r)&&!Zw(r)?n:r||PZ(e)||n}const qZ=async function(e){const t=this.getOffsetParent||a4,n=this.getDimensions,r=await n(e.floating);return{reference:VZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HZ(e){return io(e).direction==="rtl"}const GZ={convertOffsetParentRelativeRectToViewportRelativeRect:DZ,getDocumentElement:Co,getClippingRect:FZ,getOffsetParent:a4,getElementRects:qZ,getClientRects:LZ,getDimensions:BZ,getScale:Ic,isElement:ro,isRTL:HZ};function l4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KZ(e,t){let n=null,r;const i=Co(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:v}=f;if(c||t(),!g||!v)return;const y=np(p),b=np(i.clientWidth-(m+g)),x=np(i.clientHeight-(p+v)),S=np(m),R={rootMargin:-y+"px "+-b+"px "+-x+"px "+-S+"px",threshold:di(0,sa(1,d))||1};let C=!0;function O(A){const M=A[0].intersectionRatio;if(M!==d){if(!C)return l();M?l(!1,M):r=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!l4(f,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(O,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,R)}n.observe(e)}return l(!0),s}function ZZ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ww(e),m=i||s?[...f?Kd(f):[],...t?Kd(t):[]]:[];m.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const p=f&&c?KZ(f,n):null;let g=-1,v=null;l&&(v=new ResizeObserver(S=>{let[E]=S;E&&E.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(t)})),n()}),f&&!d&&v.observe(f),t&&v.observe(t));let y,b=d?ol(e):null;d&&x();function x(){const S=ol(e);b&&!l4(b,S)&&n(),b=S,y=requestAnimationFrame(x)}return n(),()=>{var S;m.forEach(E=>{i&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),p?.(),(S=v)==null||S.disconnect(),v=null,d&&cancelAnimationFrame(y)}}const YZ=RZ,WZ=OZ,QZ=SZ,XZ=CZ,JZ=EZ,gC=wZ,eY=TZ,tY=(e,t,n)=>{const r=new Map,i={platform:GZ,...n},s={...i.platform,_c:r};return bZ(e,t,{...i,platform:s})};var nY=typeof document<"u",rY=function(){},dm=nY?I.useLayoutEffect:rY;function Gm(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,i;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(!Gm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Gm(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function c4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vC(e,t){const n=c4(e);return Math.round(t*n)/n}function oy(e){const t=I.useRef(e);return dm(()=>{t.current=e}),t}function iY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[m,p]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=I.useState(r);Gm(g,r)||v(r);const[y,b]=I.useState(null),[x,S]=I.useState(null),E=I.useCallback(ee=>{ee!==A.current&&(A.current=ee,b(ee))},[]),R=I.useCallback(ee=>{ee!==M.current&&(M.current=ee,S(ee))},[]),C=s||y,O=l||x,A=I.useRef(null),M=I.useRef(null),P=I.useRef(m),L=d!=null,H=oy(d),j=oy(i),B=oy(f),U=I.useCallback(()=>{if(!A.current||!M.current)return;const ee={placement:t,strategy:n,middleware:g};j.current&&(ee.platform=j.current),tY(A.current,M.current,ee).then(ae=>{const Q={...ae,isPositioned:B.current!==!1};Z.current&&!Gm(P.current,Q)&&(P.current=Q,Ig.flushSync(()=>{p(Q)}))})},[g,t,n,j,B]);dm(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(ee=>({...ee,isPositioned:!1})))},[f]);const Z=I.useRef(!1);dm(()=>(Z.current=!0,()=>{Z.current=!1}),[]),dm(()=>{if(C&&(A.current=C),O&&(M.current=O),C&&O){if(H.current)return H.current(C,O,U);U()}},[C,O,U,H,L]);const re=I.useMemo(()=>({reference:A,floating:M,setReference:E,setFloating:R}),[E,R]),q=I.useMemo(()=>({reference:C,floating:O}),[C,O]),W=I.useMemo(()=>{const ee={position:n,left:0,top:0};if(!q.floating)return ee;const ae=vC(q.floating,m.x),Q=vC(q.floating,m.y);return c?{...ee,transform:"translate("+ae+"px, "+Q+"px)",...c4(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ae,top:Q}},[n,c,q.floating,m.x,m.y]);return I.useMemo(()=>({...m,update:U,refs:re,elements:q,floatingStyles:W}),[m,U,re,q,W])}const oY=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gC({element:r.current,padding:i}).fn(n):{}:r?gC({element:r,padding:i}).fn(n):{}}}},sY=(e,t)=>{const n=YZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},aY=(e,t)=>{const n=WZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},lY=(e,t)=>({fn:eY(e).fn,options:[e,t]}),cY=(e,t)=>{const n=QZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},uY=(e,t)=>{const n=XZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},dY=(e,t)=>{const n=JZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},fY=(e,t)=>{const n=oY(e);return{name:n.name,fn:n.fn,options:[e,t]}};var hY="Arrow",u4=I.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return T.jsx(yn.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});u4.displayName=hY;var pY=u4;function d4(e){const[t,n]=I.useState(void 0);return to(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Qw="Popper",[f4,h4]=fl(Qw),[mY,p4]=f4(Qw),m4=e=>{const{__scopePopper:t,children:n}=e,[r,i]=I.useState(null);return T.jsx(mY,{scope:t,anchor:r,onAnchorChange:i,children:n})};m4.displayName=Qw;var g4="PopperAnchor",v4=I.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=p4(g4,n),l=I.useRef(null),c=Wn(t,l),d=I.useRef(null);return I.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&s.onAnchorChange(d.current)}),r?null:T.jsx(yn.div,{...i,ref:c})});v4.displayName=g4;var Xw="PopperContent",[gY,vY]=f4(Xw),_4=I.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:y,...b}=e,x=p4(Xw,n),[S,E]=I.useState(null),R=Wn(t,fe=>E(fe)),[C,O]=I.useState(null),A=d4(C),M=A?.width??0,P=A?.height??0,L=r+(s!=="center"?"-"+s:""),H=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},j=Array.isArray(f)?f:[f],B=j.length>0,U={padding:H,boundary:j.filter(yY),altBoundary:B},{refs:Z,floatingStyles:re,placement:q,isPositioned:W,middlewareData:ee}=iY({strategy:"fixed",placement:L,whileElementsMounted:(...fe)=>ZZ(...fe,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[sY({mainAxis:i+P,alignmentAxis:l}),d&&aY({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?lY():void 0,...U}),d&&cY({...U}),uY({...U,apply:({elements:fe,rects:pe,availableWidth:xe,availableHeight:Ue})=>{const{width:Y,height:te}=pe.reference,ve=fe.floating.style;ve.setProperty("--radix-popper-available-width",`${xe}px`),ve.setProperty("--radix-popper-available-height",`${Ue}px`),ve.setProperty("--radix-popper-anchor-width",`${Y}px`),ve.setProperty("--radix-popper-anchor-height",`${te}px`)}}),C&&fY({element:C,padding:c}),bY({arrowWidth:M,arrowHeight:P}),g&&dY({strategy:"referenceHidden",...U})]}),[ae,Q]=w4(q),k=no(y);to(()=>{W&&k?.()},[W,k]);const K=ee.arrow?.x,V=ee.arrow?.y,D=ee.arrow?.centerOffset!==0,[F,X]=I.useState();return to(()=>{S&&X(window.getComputedStyle(S).zIndex)},[S]),T.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:W?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(" "),...ee.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(gY,{scope:n,placedSide:ae,onArrowChange:O,arrowX:K,arrowY:V,shouldHideArrow:D,children:T.jsx(yn.div,{"data-side":ae,"data-align":Q,...b,ref:R,style:{...b.style,animation:W?void 0:"none"}})})})});_4.displayName=Xw;var y4="PopperArrow",_Y={top:"bottom",right:"left",bottom:"top",left:"right"},b4=I.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=vY(y4,r),l=_Y[s.placedSide];return T.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:T.jsx(pY,{...i,ref:n,style:{...i.style,display:"block"}})})});b4.displayName=y4;function yY(e){return e!==null}var bY=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=w4(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(i.arrow?.x??0)+c/2,v=(i.arrow?.y??0)+d/2;let y="",b="";return f==="bottom"?(y=l?p:`${g}px`,b=`${-d}px`):f==="top"?(y=l?p:`${g}px`,b=`${r.floating.height+d}px`):f==="right"?(y=`${-d}px`,b=l?p:`${v}px`):f==="left"&&(y=`${r.floating.width+d}px`,b=l?p:`${v}px`),{data:{x:y,y:b}}}});function w4(e){const[t,n="center"]=e.split("-");return[t,n]}var S4=m4,wY=v4,SY=_4,EY=b4,sy="rovingFocusGroup.onEntryFocus",xY={bubbles:!1,cancelable:!0},uf="RovingFocusGroup",[Ub,E4,RY]=Q3(uf),[OY,x4]=fl(uf,[RY]),[TY,CY]=OY(uf),R4=I.forwardRef((e,t)=>T.jsx(Ub.Provider,{scope:e.__scopeRovingFocusGroup,children:T.jsx(Ub.Slot,{scope:e.__scopeRovingFocusGroup,children:T.jsx(AY,{...e,ref:t})})}));R4.displayName=uf;var AY=I.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=I.useRef(null),v=Wn(t,g),y=X3(s),[b,x]=lf({prop:l,defaultProp:c??null,onChange:d,caller:uf}),[S,E]=I.useState(!1),R=no(f),C=E4(n),O=I.useRef(!1),[A,M]=I.useState(0);return I.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(sy,R),()=>P.removeEventListener(sy,R)},[R]),T.jsx(TY,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:b,onItemFocus:I.useCallback(P=>x(P),[x]),onItemShiftTab:I.useCallback(()=>E(!0),[]),onFocusableItemAdd:I.useCallback(()=>M(P=>P+1),[]),onFocusableItemRemove:I.useCallback(()=>M(P=>P-1),[]),children:T.jsx(yn.div,{tabIndex:S||A===0?-1:0,"data-orientation":r,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{O.current=!0}),onFocus:lt(e.onFocus,P=>{const L=!O.current;if(P.target===P.currentTarget&&L&&!S){const H=new CustomEvent(sy,xY);if(P.currentTarget.dispatchEvent(H),!H.defaultPrevented){const j=C().filter(q=>q.focusable),B=j.find(q=>q.active),U=j.find(q=>q.id===b),re=[B,U,...j].filter(Boolean).map(q=>q.ref.current);C4(re,m)}}O.current=!1}),onBlur:lt(e.onBlur,()=>E(!1))})})}),O4="RovingFocusGroupItem",T4=I.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:l,...c}=e,d=ta(),f=s||d,m=CY(O4,n),p=m.currentTabStopId===f,g=E4(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:b}=m;return I.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),T.jsx(Ub.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:T.jsx(yn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:lt(e.onMouseDown,x=>{r?m.onItemFocus(f):x.preventDefault()}),onFocus:lt(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:lt(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){m.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const S=PY(x,m.orientation,m.dir);if(S!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let R=g().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")R.reverse();else if(S==="prev"||S==="next"){S==="prev"&&R.reverse();const C=R.indexOf(x.currentTarget);R=m.loop?NY(R,C+1):R.slice(C+1)}setTimeout(()=>C4(R))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:b!=null}):l})})});T4.displayName=O4;var IY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PY(e,t,n){const r=MY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return IY[r]}function C4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function NY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kY=R4,DY=T4,zb=["Enter"," "],LY=["ArrowDown","PageUp","Home"],A4=["ArrowUp","PageDown","End"],$Y=[...LY,...A4],jY={ltr:[...zb,"ArrowRight"],rtl:[...zb,"ArrowLeft"]},UY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},df="Menu",[Zd,zY,FY]=Q3(df),[hl,I4]=fl(df,[FY,h4,x4]),ff=h4(),M4=x4(),[P4,ha]=hl(df),[BY,hf]=hl(df),N4=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:s,modal:l=!0}=e,c=ff(t),[d,f]=I.useState(null),m=I.useRef(!1),p=no(s),g=X3(i);return I.useEffect(()=>{const v=()=>{m.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>m.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),T.jsx(S4,{...c,children:T.jsx(P4,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:T.jsx(BY,{scope:t,onClose:I.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};N4.displayName=df;var VY="MenuAnchor",Jw=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ff(n);return T.jsx(wY,{...i,...r,ref:t})});Jw.displayName=VY;var eS="MenuPortal",[qY,k4]=hl(eS,{forceMount:void 0}),D4=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,s=ha(eS,t);return T.jsx(qY,{scope:t,forceMount:n,children:T.jsx(ds,{present:n||s.open,children:T.jsx(zw,{asChild:!0,container:i,children:r})})})};D4.displayName=eS;var Di="MenuContent",[HY,tS]=hl(Di),L4=I.forwardRef((e,t)=>{const n=k4(Di,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=ha(Di,e.__scopeMenu),l=hf(Di,e.__scopeMenu);return T.jsx(Zd.Provider,{scope:e.__scopeMenu,children:T.jsx(ds,{present:r||s.open,children:T.jsx(Zd.Slot,{scope:e.__scopeMenu,children:l.modal?T.jsx(GY,{...i,ref:t}):T.jsx(KY,{...i,ref:t})})})})}),GY=I.forwardRef((e,t)=>{const n=ha(Di,e.__scopeMenu),r=I.useRef(null),i=Wn(t,r);return I.useEffect(()=>{const s=r.current;if(s)return k3(s)},[]),T.jsx(nS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),KY=I.forwardRef((e,t)=>{const n=ha(Di,e.__scopeMenu);return T.jsx(nS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ZY=Gd("MenuContent.ScrollLock"),nS=I.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:v,disableOutsideScroll:y,...b}=e,x=ha(Di,n),S=hf(Di,n),E=ff(n),R=M4(n),C=zY(n),[O,A]=I.useState(null),M=I.useRef(null),P=Wn(t,M,x.onContentChange),L=I.useRef(0),H=I.useRef(""),j=I.useRef(0),B=I.useRef(null),U=I.useRef("right"),Z=I.useRef(0),re=y?Fw:I.Fragment,q=y?{as:ZY,allowPinchZoom:!0}:void 0,W=ae=>{const Q=H.current+ae,k=C().filter(fe=>!fe.disabled),K=document.activeElement,V=k.find(fe=>fe.ref.current===K)?.textValue,D=k.map(fe=>fe.textValue),F=sW(D,Q,V),X=k.find(fe=>fe.textValue===F)?.ref.current;(function fe(pe){H.current=pe,window.clearTimeout(L.current),pe!==""&&(L.current=window.setTimeout(()=>fe(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};I.useEffect(()=>()=>window.clearTimeout(L.current),[]),R3();const ee=I.useCallback(ae=>U.current===B.current?.side&&lW(ae,B.current?.area),[]);return T.jsx(HY,{scope:n,searchRef:H,onItemEnter:I.useCallback(ae=>{ee(ae)&&ae.preventDefault()},[ee]),onItemLeave:I.useCallback(ae=>{ee(ae)||(M.current?.focus(),A(null))},[ee]),onTriggerLeave:I.useCallback(ae=>{ee(ae)&&ae.preventDefault()},[ee]),pointerGraceTimerRef:j,onPointerGraceIntentChange:I.useCallback(ae=>{B.current=ae},[]),children:T.jsx(re,{...q,children:T.jsx(Uw,{asChild:!0,trapped:i,onMountAutoFocus:lt(s,ae=>{ae.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:T.jsx(jw,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:v,children:T.jsx(kY,{asChild:!0,...R,dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:A,onEntryFocus:lt(d,ae=>{S.isUsingKeyboardRef.current||ae.preventDefault()}),preventScrollOnEntryFocus:!0,children:T.jsx(SY,{role:"menu","aria-orientation":"vertical","data-state":J4(x.open),"data-radix-menu-content":"",dir:S.dir,...E,...b,ref:P,style:{outline:"none",...b.style},onKeyDown:lt(b.onKeyDown,ae=>{const k=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,K=ae.ctrlKey||ae.altKey||ae.metaKey,V=ae.key.length===1;k&&(ae.key==="Tab"&&ae.preventDefault(),!K&&V&&W(ae.key));const D=M.current;if(ae.target!==D||!$Y.includes(ae.key))return;ae.preventDefault();const X=C().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);A4.includes(ae.key)&&X.reverse(),iW(X)}),onBlur:lt(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(L.current),H.current="")}),onPointerMove:lt(e.onPointerMove,Yd(ae=>{const Q=ae.target,k=Z.current!==ae.clientX;if(ae.currentTarget.contains(Q)&&k){const K=ae.clientX>Z.current?"right":"left";U.current=K,Z.current=ae.clientX}}))})})})})})})});L4.displayName=Di;var YY="MenuGroup",rS=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return T.jsx(yn.div,{role:"group",...r,ref:t})});rS.displayName=YY;var WY="MenuLabel",$4=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return T.jsx(yn.div,{...r,ref:t})});$4.displayName=WY;var Km="MenuItem",_C="menu.itemSelect",Gg=I.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,s=I.useRef(null),l=hf(Km,e.__scopeMenu),c=tS(Km,e.__scopeMenu),d=Wn(t,s),f=I.useRef(!1),m=()=>{const p=s.current;if(!n&&p){const g=new CustomEvent(_C,{bubbles:!0,cancelable:!0});p.addEventListener(_C,v=>r?.(v),{once:!0}),w3(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return T.jsx(j4,{...i,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=c.searchRef.current!=="";n||g&&p.key===" "||zb.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Gg.displayName=Km;var j4=I.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=e,l=tS(Km,n),c=M4(n),d=I.useRef(null),f=Wn(t,d),[m,p]=I.useState(!1),[g,v]=I.useState("");return I.useEffect(()=>{const y=d.current;y&&v((y.textContent??"").trim())},[s.children]),T.jsx(Zd.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:T.jsx(DY,{asChild:!0,...c,focusable:!r,children:T.jsx(yn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:f,onPointerMove:lt(e.onPointerMove,Yd(y=>{r?l.onItemLeave(y):(l.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lt(e.onPointerLeave,Yd(y=>l.onItemLeave(y))),onFocus:lt(e.onFocus,()=>p(!0)),onBlur:lt(e.onBlur,()=>p(!1))})})})}),QY="MenuCheckboxItem",U4=I.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return T.jsx(q4,{scope:e.__scopeMenu,checked:n,children:T.jsx(Gg,{role:"menuitemcheckbox","aria-checked":Zm(n)?"mixed":n,...i,ref:t,"data-state":sS(n),onSelect:lt(i.onSelect,()=>r?.(Zm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});U4.displayName=QY;var z4="MenuRadioGroup",[XY,JY]=hl(z4,{value:void 0,onValueChange:()=>{}}),F4=I.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,s=no(r);return T.jsx(XY,{scope:e.__scopeMenu,value:n,onValueChange:s,children:T.jsx(rS,{...i,ref:t})})});F4.displayName=z4;var B4="MenuRadioItem",V4=I.forwardRef((e,t)=>{const{value:n,...r}=e,i=JY(B4,e.__scopeMenu),s=n===i.value;return T.jsx(q4,{scope:e.__scopeMenu,checked:s,children:T.jsx(Gg,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":sS(s),onSelect:lt(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});V4.displayName=B4;var iS="MenuItemIndicator",[q4,eW]=hl(iS,{checked:!1}),H4=I.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,s=eW(iS,n);return T.jsx(ds,{present:r||Zm(s.checked)||s.checked===!0,children:T.jsx(yn.span,{...i,ref:t,"data-state":sS(s.checked)})})});H4.displayName=iS;var tW="MenuSeparator",G4=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return T.jsx(yn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});G4.displayName=tW;var nW="MenuArrow",K4=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ff(n);return T.jsx(EY,{...i,...r,ref:t})});K4.displayName=nW;var oS="MenuSub",[rW,Z4]=hl(oS),Y4=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,s=ha(oS,t),l=ff(t),[c,d]=I.useState(null),[f,m]=I.useState(null),p=no(i);return I.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),T.jsx(S4,{...l,children:T.jsx(P4,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:T.jsx(rW,{scope:t,contentId:ta(),triggerId:ta(),trigger:c,onTriggerChange:d,children:n})})})};Y4.displayName=oS;var vd="MenuSubTrigger",W4=I.forwardRef((e,t)=>{const n=ha(vd,e.__scopeMenu),r=hf(vd,e.__scopeMenu),i=Z4(vd,e.__scopeMenu),s=tS(vd,e.__scopeMenu),l=I.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,f={__scopeMenu:e.__scopeMenu},m=I.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return I.useEffect(()=>m,[m]),I.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),d(null)}},[c,d]),T.jsx(Jw,{asChild:!0,...f,children:T.jsx(j4,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":J4(n.open),...e,ref:af(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lt(e.onPointerMove,Yd(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:lt(e.onPointerLeave,Yd(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const v=n.content?.dataset.side,y=v==="right",b=y?-5:5,x=g[y?"left":"right"],S=g[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x,y:g.top},{x:S,y:g.top},{x:S,y:g.bottom},{x,y:g.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:lt(e.onKeyDown,p=>{const g=s.searchRef.current!=="";e.disabled||g&&p.key===" "||jY[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});W4.displayName=vd;var Q4="MenuSubContent",X4=I.forwardRef((e,t)=>{const n=k4(Di,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=ha(Di,e.__scopeMenu),l=hf(Di,e.__scopeMenu),c=Z4(Q4,e.__scopeMenu),d=I.useRef(null),f=Wn(t,d);return T.jsx(Zd.Provider,{scope:e.__scopeMenu,children:T.jsx(ds,{present:r||s.open,children:T.jsx(Zd.Slot,{scope:e.__scopeMenu,children:T.jsx(nS,{id:c.contentId,"aria-labelledby":c.triggerId,...i,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!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:lt(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:lt(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=UY[l.dir].includes(m.key);p&&g&&(s.onOpenChange(!1),c.trigger?.focus(),m.preventDefault())})})})})})});X4.displayName=Q4;function J4(e){return e?"open":"closed"}function Zm(e){return e==="indeterminate"}function sS(e){return Zm(e)?"indeterminate":e?"checked":"unchecked"}function iW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function oW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function sW(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=oW(e,Math.max(s,0));i.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function aW(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],d=t[l],f=c.x,m=c.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(i=!i)}return i}function lW(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return aW(n,t)}function Yd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cW=N4,uW=Jw,dW=D4,fW=L4,hW=rS,pW=$4,mW=Gg,gW=U4,vW=F4,_W=V4,yW=H4,bW=G4,wW=K4,SW=Y4,EW=W4,xW=X4,Kg="DropdownMenu",[RW]=fl(Kg,[I4]),Tr=I4(),[OW,ek]=RW(Kg),tk=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,d=Tr(t),f=I.useRef(null),[m,p]=lf({prop:i,defaultProp:s??!1,onChange:l,caller:Kg});return T.jsx(OW,{scope:t,triggerId:ta(),triggerRef:f,contentId:ta(),open:m,onOpenChange:p,onOpenToggle:I.useCallback(()=>p(g=>!g),[p]),modal:c,children:T.jsx(cW,{...d,open:m,onOpenChange:p,dir:r,modal:c,children:n})})};tk.displayName=Kg;var nk="DropdownMenuTrigger",rk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,s=ek(nk,n),l=Tr(n);return T.jsx(uW,{asChild:!0,...l,children:T.jsx(yn.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:af(t,s.triggerRef),onPointerDown:lt(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:lt(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});rk.displayName=nk;var TW="DropdownMenuPortal",ik=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tr(t);return T.jsx(dW,{...r,...n})};ik.displayName=TW;var ok="DropdownMenuContent",sk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ek(ok,n),s=Tr(n),l=I.useRef(!1);return T.jsx(fW,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,c=>{l.current||i.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!i.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)"}})});sk.displayName=ok;var CW="DropdownMenuGroup",AW=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(hW,{...i,...r,ref:t})});AW.displayName=CW;var IW="DropdownMenuLabel",ak=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(pW,{...i,...r,ref:t})});ak.displayName=IW;var MW="DropdownMenuItem",lk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(mW,{...i,...r,ref:t})});lk.displayName=MW;var PW="DropdownMenuCheckboxItem",ck=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(gW,{...i,...r,ref:t})});ck.displayName=PW;var NW="DropdownMenuRadioGroup",uk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(vW,{...i,...r,ref:t})});uk.displayName=NW;var kW="DropdownMenuRadioItem",dk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(_W,{...i,...r,ref:t})});dk.displayName=kW;var DW="DropdownMenuItemIndicator",fk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(yW,{...i,...r,ref:t})});fk.displayName=DW;var LW="DropdownMenuSeparator",hk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(bW,{...i,...r,ref:t})});hk.displayName=LW;var $W="DropdownMenuArrow",jW=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(wW,{...i,...r,ref:t})});jW.displayName=$W;var UW=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:s}=e,l=Tr(t),[c,d]=lf({prop:r,defaultProp:s??!1,onChange:i,caller:"DropdownMenuSub"});return T.jsx(SW,{...l,open:c,onOpenChange:d,children:n})},zW="DropdownMenuSubTrigger",pk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(EW,{...i,...r,ref:t})});pk.displayName=zW;var FW="DropdownMenuSubContent",mk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(xW,{...i,...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)"}})});mk.displayName=FW;var BW=tk,VW=rk,qW=ik,HW=sk,_le=ak,GW=lk,yle=ck,ble=uk,wle=dk,Sle=fk,Ele=hk,xle=UW,Rle=pk,Ole=mk,KW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pf=KW.reduce((e,t)=>{const n=_3(`Primitive.${t}`),r=I.forwardRef((i,s)=>{const{asChild:l,...c}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ZW="Label",gk=I.forwardRef((e,t)=>T.jsx(pf.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));gk.displayName=ZW;var YW=gk;function WW(e,t=[]){let n=[];function r(s,l){const c=I.createContext(l);c.displayName=s+"Context";const d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:v,...y}=p,b=g?.[e]?.[d]||c,x=I.useMemo(()=>y,Object.values(y));return T.jsx(b.Provider,{value:x,children:v})};f.displayName=s+"Provider";function m(p,g){const v=g?.[e]?.[d]||c,y=I.useContext(v);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[f,m]}const i=()=>{const s=n.map(l=>I.createContext(l));return function(c){const d=c?.[e]||s;return I.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,QW(i,...t)]}function QW(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const p=d(s)[`__scope${f}`];return{...c,...p}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var XW=cP();function JW(){return XW.useSyncExternalStore(eQ,()=>!0,()=>!1)}function eQ(){return()=>{}}var aS="Avatar",[tQ]=WW(aS),[nQ,vk]=tQ(aS),_k=I.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=I.useState("idle");return T.jsx(nQ,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:T.jsx(pf.span,{...r,ref:t})})});_k.displayName=aS;var yk="AvatarImage",bk=I.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,l=vk(yk,n),c=rQ(r,s),d=no(f=>{i(f),l.onImageLoadingStatusChange(f)});return to(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?T.jsx(pf.img,{...s,ref:t,src:r}):null});bk.displayName=yk;var wk="AvatarFallback",Sk=I.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=vk(wk,n),[l,c]=I.useState(r===void 0);return I.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(d)}},[r]),l&&s.imageLoadingStatus!=="loaded"?T.jsx(pf.span,{...i,ref:t}):null});Sk.displayName=wk;function yC(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function rQ(e,{referrerPolicy:t,crossOrigin:n}){const r=JW(),i=I.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[l,c]=I.useState(()=>yC(s,e));return to(()=>{c(yC(s,e))},[s,e]),to(()=>{const d=p=>()=>{c(p)};if(!s)return;const f=d("loaded"),m=d("error");return s.addEventListener("load",f),s.addEventListener("error",m),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",f),s.removeEventListener("error",m)}},[s,n,t]),l}var iQ=_k,oQ=bk,sQ=Sk;function aQ(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function lS(e,t,n=""){const r=aQ(e),i=e?.length;if(!r||t!==void 0){const l=n&&`"${n}" `,c="",d=r?`length=${i}`:`type=${typeof e}`,f=l+"expected Uint8Array"+c+", got "+d;throw r?new RangeError(f):new TypeError(f)}return e}function bC(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 lQ(e,t){lS(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new RangeError('"digestInto() output" expected to be of length >='+n)}function Fb(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ay(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ho(e,t){return e<<32-t|e>>>t}const cQ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",uQ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function dQ(e){if(lS(e),cQ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=uQ[e[n]];return t}function fQ(e,t={}){const n=(i,s)=>e(s).update(i).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}const hQ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function pQ(e,t,n){return e&t^~e&n}function mQ(e,t,n){return e&t^e&n^t&n}class gQ{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,i){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=ay(this.buffer)}update(t){bC(this),lS(t);const{view:n,buffer:r,blockLen:i}=this,s=t.length;for(let l=0;l<s;){const c=Math.min(i-this.pos,s-l);if(c===i){const d=ay(t);for(;i<=s-l;l+=i)this.process(d,l);continue}r.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){bC(this),lQ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:l}=this;n[l++]=128,Fb(this.buffer.subarray(l)),this.padOffset>i-l&&(this.process(r,0),l=0);for(let p=l;p<i;p++)n[p]=0;r.setBigUint64(i-8,BigInt(this.length*8),s),this.process(r,0);const c=ay(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++)c.setUint32(4*p,m[p],s)}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:i,finished:s,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=s,t.length=i,t.pos=c,i%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Fs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vQ=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]),Bs=new Uint32Array(64);class _Q extends gQ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:i,E:s,F:l,G:c,H:d}=this;return[t,n,r,i,s,l,c,d]}set(t,n,r,i,s,l,c,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=l|0,this.G=c|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)Bs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=Bs[p-15],v=Bs[p-2],y=ho(g,7)^ho(g,18)^g>>>3,b=ho(v,17)^ho(v,19)^v>>>10;Bs[p]=b+Bs[p-7]+y+Bs[p-16]|0}let{A:r,B:i,C:s,D:l,E:c,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=ho(c,6)^ho(c,11)^ho(c,25),v=m+g+pQ(c,d,f)+vQ[p]+Bs[p]|0,b=(ho(r,2)^ho(r,13)^ho(r,22))+mQ(r,i,s)|0;m=f,f=d,d=c,c=l+v|0,l=s,s=i,i=r,r=v+b|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,l=l+this.D|0,c=c+this.E|0,d=d+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,i,s,l,c,d,f,m)}roundClean(){Fb(Bs)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Fb(this.buffer)}}class yQ extends _Q{A=Fs[0]|0;B=Fs[1]|0;C=Fs[2]|0;D=Fs[3]|0;E=Fs[4]|0;F=Fs[5]|0;G=Fs[6]|0;H=Fs[7]|0;constructor(){super(32)}}const bQ=fQ(()=>new yQ,hQ(1));function wQ(e){const t=I.useRef({value:e,previous:e});return I.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Zg="Checkbox",[SQ]=fl(Zg),[EQ,cS]=SQ(Zg);function xQ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:l,name:c,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,v]=lf({prop:n,defaultProp:i??!1,onChange:d,caller:Zg}),[y,b]=I.useState(null),[x,S]=I.useState(null),E=I.useRef(!1),R=y?!!l||!!y.closest("form"):!0,C={checked:g,disabled:s,setChecked:v,control:y,setControl:b,name:c,form:l,value:m,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:na(i)?!1:i,isFormControl:R,bubbleInput:x,setBubbleInput:S};return T.jsx(EQ,{scope:t,...C,children:RQ(p)?p(C):r})}var Ek="CheckboxTrigger",xk=I.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:l,disabled:c,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:y}=cS(Ek,e),b=Wn(i,m),x=I.useRef(d);return I.useEffect(()=>{const S=s?.form;if(S){const E=()=>p(x.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[s,p]),T.jsx(yn.button,{type:"button",role:"checkbox","aria-checked":na(d)?"mixed":d,"aria-required":f,"data-state":Ik(d),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:b,onKeyDown:lt(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:lt(n,S=>{p(E=>na(E)?!0:!E),y&&v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})});xk.displayName=Ek;var Rk=I.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:c,value:d,onCheckedChange:f,form:m,...p}=e;return T.jsx(xQ,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:c,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>T.jsxs(T.Fragment,{children:[T.jsx(xk,{...p,ref:t,__scopeCheckbox:n}),g&&T.jsx(Ak,{__scopeCheckbox:n})]})})});Rk.displayName=Zg;var Ok="CheckboxIndicator",Tk=I.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=cS(Ok,n);return T.jsx(ds,{present:r||na(s.checked)||s.checked===!0,children:T.jsx(yn.span,{"data-state":Ik(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Tk.displayName=Ok;var Ck="CheckboxBubbleInput",Ak=I.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:l,required:c,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:v}=cS(Ck,e),y=Wn(n,v),b=wQ(s),x=d4(r);I.useEffect(()=>{const E=g;if(!E)return;const R=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(R,"checked").set,A=!i.current;if(b!==s&&O){const M=new Event("click",{bubbles:A});E.indeterminate=na(s),O.call(E,na(s)?!1:s),E.dispatchEvent(M)}},[g,b,s,i]);const S=I.useRef(na(s)?!1:s);return T.jsx(yn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??S.current,required:c,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ak.displayName=Ck;function RQ(e){return typeof e=="function"}function na(e){return e==="indeterminate"}function Ik(e){return na(e)?"indeterminate":e?"checked":"unchecked"}var Mc=(e,t,n)=>new Promise((r,i)=>{var s=d=>{try{c(n.next(d))}catch(f){i(f)}},l=d=>{try{c(n.throw(d))}catch(f){i(f)}},c=d=>d.done?r(d.value):Promise.resolve(d.value).then(s,l);c((n=n.apply(e,t)).next())}),fm=class extends Error{},OQ=class extends Error{},TQ=e=>Math.exp(e)*150,CQ=(e,...t)=>Mc(void 0,[e,...t],function*(n,{attempts:r=4}={}){var i;let s;for(let l=0;l<r;l++)try{return yield n()}catch(c){s=c,yield new Promise(d=>setTimeout(d,TQ(l)))}throw new fm((i=s?.message)!=null?i:"Exhausted all retries")}),Qu,Mk="captchaFoxOnLoad",wC=`https://cdn.captchafox.com/api.js?render=explicit&onload=${Mk}`;function AQ(){return Mc(this,arguments,function*({nonce:e}={}){return Qu&&document.querySelector(`script[src="${wC}"]`)||(Qu=new Promise((t,n)=>{window[Mk]=t;const r=document.createElement("script");r.src=wC,r.async=!0,r.defer=!0,r.onerror=i=>{r.remove(),Qu=void 0,n(i)},e&&(r.nonce=e),document.body.appendChild(r)})),Qu})}function IQ(){return Mc(this,arguments,function*(e={}){return CQ(()=>AQ(e))})}var MQ=e=>{window._tsdk={n:e,v:"1.12.0"}},ic=()=>typeof window?.captchafox<"u",Pk=I.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:i,className:s,nonce:l,i18n:c,hideClose:d,onError:f,onVerify:m,onLoad:p,onFail:g,onClose:v,onChallengeChange:y,onChallengeOpen:b},x)=>{const[S,E]=I.useState(),[R,C]=I.useState(),O=I.useRef(!1),A=I.useRef(),M=I.useRef(),P=I.useRef(),L=I.useRef(!1);I.useImperativeHandle(x,()=>({getResponse(){return!ic()||!R?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(R)},reset(){if(!ic()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(R)},remove(){if(!ic()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(R)},execute:()=>Mc(void 0,null,function*(){if(L.current)return Promise.reject(new fm);if(!ic()||!R)return j();try{return yield window.captchafox.execute(R)}catch(Z){const re=B(Z);return Promise.reject(re)}})}),[R]),I.useEffect(()=>{R&&p?.()},[R]),I.useEffect(()=>(MQ("rj"),()=>{H()}),[]),I.useEffect(()=>{S&&(O.current?ic()&&U():IQ({nonce:l}).then(()=>Mc(void 0,null,function*(){ic()&&(O.current=!0,yield U())})).catch(Z=>{var re;f?.(Z),L.current=!0,(re=P.current)==null||re.call(P),console.error("[CaptchaFox] Could not load script:",Z)}))},[S,t,n,r,d]);const H=()=>{clearTimeout(M.current)},j=()=>new Promise((Z,re)=>{P.current=()=>{H(),re(new fm)},M.current=setTimeout(()=>{re(new OQ("Execute timed out"))},e*1e3),A.current=q=>{H(),window.captchafox.execute(q).then(Z).catch(W=>{const ee=B(W);re(ee)})}}),B=Z=>Z!=="challenge-aborted"&&Z!=="rate-limited"?new fm:Z,U=()=>Mc(void 0,null,function*(){var Z,re,q;if((Z=window.captchafox)==null||Z.remove(R),!S||((re=S?.children)==null?void 0:re.length)===1)return;const W=yield(q=window.captchafox)==null?void 0:q.render(S,{lang:n,sitekey:t,mode:r,theme:i,i18n:c,hideClose:d,onError:f,onFail:g,onClose:v,onVerify:m,onChallengeChange:y,onChallengeOpen:b});W&&(C(W),A.current&&(A.current(W),A.current=void 0))});return ne.createElement("div",{ref:E,id:R,className:s})});Pk.displayName="CaptchaFox";var PQ=Object.defineProperty,NQ=Object.defineProperties,kQ=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,Nk=Object.prototype.hasOwnProperty,kk=Object.prototype.propertyIsEnumerable,Bb=(e,t,n)=>t in e?PQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,si=(e,t)=>{for(var n in t||(t={}))Nk.call(t,n)&&Bb(e,n,t[n]);if(Ym)for(var n of Ym(t))kk.call(t,n)&&Bb(e,n,t[n]);return e},Dk=(e,t)=>NQ(e,kQ(t)),DQ=(e,t)=>{var n={};for(var r in e)Nk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ym)for(var r of Ym(e))t.indexOf(r)<0&&kk.call(e,r)&&(n[r]=e[r]);return n},tr=(e,t,n)=>(Bb(e,typeof t!="symbol"?t+"":t,n),n),Uc=(e,t,n)=>new Promise((r,i)=>{var s=d=>{try{c(n.next(d))}catch(f){i(f)}},l=d=>{try{c(n.throw(d))}catch(f){i(f)}},c=d=>d.done?r(d.value):Promise.resolve(d.value).then(s,l);c((n=n.apply(e,t)).next())}),LQ="hCaptcha-script",hm="hCaptchaOnLoad",SC="script-error",Ys="@hCaptcha/loader";function $Q(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function Lk(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function $k(e){return e||document.head}function jQ(e){var t;e.setTag("source",Ys),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",si({},UQ())),e.setContext("device",Dk(si({},FQ()),{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 UQ(){var e,t,n,r,i,s;let l=navigator.userAgent,c,d;return l.indexOf("Firefox")!==-1?(c="Firefox",d=(e=l.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):l.indexOf("Edg")!==-1?(c="Microsoft Edge",d=(t=l.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):l.indexOf("Chrome")!==-1&&l.indexOf("Safari")!==-1?(c="Chrome",d=(n=l.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):l.indexOf("Safari")!==-1&&l.indexOf("Chrome")===-1?(c="Safari",d=(r=l.match(/Version\/([\d.]+)/))==null?void 0:r[1]):l.indexOf("Opera")!==-1||l.indexOf("OPR")!==-1?(c="Opera",d=(i=l.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:i[2]):l.indexOf("MSIE")!==-1||l.indexOf("Trident")!==-1?(c="Internet Explorer",d=(s=l.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:s[2]):(c="Unknown",d="Unknown"),{name:c,version:d}}function zQ(e){return new Promise(t=>setTimeout(t,e))}function FQ(){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 BQ=class jk{constructor(t){tr(this,"_parent"),tr(this,"breadcrumbs",[]),tr(this,"context",{}),tr(this,"extra",{}),tr(this,"tags",{}),tr(this,"request"),tr(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new jk(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=si(si({},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,i)=>{var s;return r.breadcrumbs=[...(s=r.breadcrumbs)!=null?s:[],...i.breadcrumbs],r.extra=si(si({},r.extra),i.extra),r.contexts=si(si({},r.contexts),i.context),r.tags=si(si({},r.tags),i.tags),i.user&&(r.user=i.user),i.request&&(r.request=i.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},VQ=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qQ=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,HQ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,GQ=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,rp="?",EC="An unknown error occurred",KQ="0.0.4";function ZQ(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function br(e){return(e+256).toString(16).substring(1)}function YQ(){let e=ZQ(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,br(e[0])+br(e[1])+br(e[2])+br(e[3])+"-"+br(e[4])+br(e[5])+"-"+br(e[6])+br(e[7])+"-"+br(e[8])+br(e[9])+"-"+br(e[10])+br(e[11])+br(e[12])+br(e[13])+br(e[14])+br(e[15])}var WQ=[[VQ,"chrome"],[HQ,"winjs"],[qQ,"gecko"]];function QQ(e){var t,n,r,i;if(!e.stack)return null;let s=[],l=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
105
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return I.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},XK="DialogDescriptionWarning",JK=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${W4(XK).contentName}}.`;return I.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},eZ=L4,tZ=j4,nZ=z4,rZ=F4,iZ=B4,oZ=q4,sZ=G4,aZ=Z4;function Q4(e){const t=e+"CollectionProvider",[n,r]=fl(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=b=>{const{scope:x,children:S}=b,E=ne.useRef(null),R=ne.useRef(new Map).current;return T.jsx(i,{scope:x,itemMap:R,collectionRef:E,children:S})};l.displayName=t;const c=e+"CollectionSlot",d=Gd(c),f=ne.forwardRef((b,x)=>{const{scope:S,children:E}=b,R=s(c,S),C=Wn(x,R.collectionRef);return T.jsx(d,{ref:C,children:E})});f.displayName=c;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=Gd(m),v=ne.forwardRef((b,x)=>{const{scope:S,children:E,...R}=b,C=ne.useRef(null),O=Wn(x,C),A=s(m,S);return ne.useEffect(()=>(A.itemMap.set(C,{ref:C,...R}),()=>{A.itemMap.delete(C)})),T.jsx(g,{[p]:"",ref:O,children:E})});v.displayName=m;function y(b){const x=s(e+"CollectionConsumer",b);return ne.useCallback(()=>{const E=x.collectionRef.current;if(!E)return[];const R=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((A,M)=>R.indexOf(A.ref.current)-R.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:l,Slot:f,ItemSlot:v},y,r]}var lZ=I.createContext(void 0);function X4(e){const t=I.useContext(lZ);return e||t||"ltr"}const cZ=["top","right","bottom","left"],sa=Math.min,di=Math.max,Vm=Math.round,np=Math.floor,Eo=e=>({x:e,y:e}),uZ={left:"right",right:"left",bottom:"top",top:"bottom"};function Lb(e,t,n){return di(e,sa(t,n))}function ls(e,t){return typeof e=="function"?e(t):e}function cs(e){return e.split("-")[0]}function Yc(e){return e.split("-")[1]}function Hw(e){return e==="x"?"y":"x"}function Gw(e){return e==="y"?"height":"width"}function bo(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Kw(e){return Hw(bo(e))}function dZ(e,t,n){n===void 0&&(n=!1);const r=Yc(e),i=Kw(e),s=Gw(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=qm(l)),[l,qm(l)]}function fZ(e){const t=qm(e);return[$b(e),t,$b(t)]}function $b(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const aC=["left","right"],lC=["right","left"],hZ=["top","bottom"],pZ=["bottom","top"];function mZ(e,t,n){switch(e){case"top":case"bottom":return n?t?lC:aC:t?aC:lC;case"left":case"right":return t?hZ:pZ;default:return[]}}function gZ(e,t,n,r){const i=Yc(e);let s=mZ(cs(e),n==="start",r);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map($b)))),s}function qm(e){const t=cs(e);return uZ[t]+e.slice(t.length)}function vZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function J4(e){return typeof e!="number"?vZ(e):{top:e,right:e,bottom:e,left:e}}function Hm(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function cC(e,t,n){let{reference:r,floating:i}=e;const s=bo(t),l=Kw(t),c=Gw(l),d=cs(t),f=s==="y",m=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[c]/2-i[c]/2;let v;switch(d){case"top":v={x:m,y:r.y-i.height};break;case"bottom":v={x:m,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Yc(t)){case"start":v[l]-=g*(n&&f?-1:1);break;case"end":v[l]+=g*(n&&f?-1:1);break}return v}async function _Z(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=ls(t,e),y=J4(v),x=c[g?p==="floating"?"reference":"floating":p],S=Hm(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),E=p==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},O=Hm(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:R,strategy:d}):E);return{top:(S.top-O.top+y.top)/C.y,bottom:(O.bottom-S.bottom+y.bottom)/C.y,left:(S.left-O.left+y.left)/C.x,right:(O.right-S.right+y.right)/C.x}}const yZ=50,bZ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:_Z},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:p}=cC(f,r,d),g=r,v=0;const y={};for(let b=0;b<s.length;b++){const x=s[b];if(!x)continue;const{name:S,fn:E}=x,{x:R,y:C,data:O,reset:A}=await E({x:m,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:f,platform:c,elements:{reference:e,floating:t}});m=R??m,p=C??p,y[S]={...y[S],...O},A&&v<yZ&&(v++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(f=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:m,y:p}=cC(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:i,middlewareData:y}},wZ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:m=0}=ls(e,t)||{};if(f==null)return{};const p=J4(m),g={x:n,y:r},v=Kw(i),y=Gw(v),b=await l.getDimensions(f),x=v==="y",S=x?"top":"left",E=x?"bottom":"right",R=x?"clientHeight":"clientWidth",C=s.reference[y]+s.reference[v]-g[v]-s.floating[y],O=g[v]-s.reference[v],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let M=A?A[R]:0;(!M||!await(l.isElement==null?void 0:l.isElement(A)))&&(M=c.floating[R]||s.floating[y]);const P=C/2-O/2,L=M/2-b[y]/2-1,H=sa(p[S],L),j=sa(p[E],L),B=H,U=M-b[y]-j,Z=M/2-b[y]/2+P,re=Lb(B,Z,U),q=!d.arrow&&Yc(i)!=null&&Z!==re&&s.reference[y]/2-(Z<B?H:j)-b[y]/2<0,W=q?Z<B?Z-B:Z-U:0;return{[v]:g[v]+W,data:{[v]:re,centerOffset:Z-re-W,...q&&{alignmentOffset:W}},reset:q}}}),SZ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...x}=ls(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=cs(i),E=bo(c),R=cs(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=g||(R||!b?[qm(c)]:fZ(c)),A=y!=="none";!g&&A&&O.push(...gZ(c,b,y,C));const M=[c,...O],P=await d.detectOverflow(t,x),L=[];let H=((r=s.flip)==null?void 0:r.overflows)||[];if(m&&L.push(P[S]),p){const Z=dZ(i,l,C);L.push(P[Z[0]],P[Z[1]])}if(H=[...H,{placement:i,overflows:L}],!L.every(Z=>Z<=0)){var j,B;const Z=(((j=s.flip)==null?void 0:j.index)||0)+1,re=M[Z];if(re&&(!(p==="alignment"?E!==bo(re):!1)||H.every(ee=>bo(ee.placement)===E?ee.overflows[0]>0:!0)))return{data:{index:Z,overflows:H},reset:{placement:re}};let q=(B=H.filter(W=>W.overflows[0]<=0).sort((W,ee)=>W.overflows[1]-ee.overflows[1])[0])==null?void 0:B.placement;if(!q)switch(v){case"bestFit":{var U;const W=(U=H.filter(ee=>{if(A){const ae=bo(ee.placement);return ae===E||ae==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(ae=>ae>0).reduce((ae,Q)=>ae+Q,0)]).sort((ee,ae)=>ee[1]-ae[1])[0])==null?void 0:U[0];W&&(q=W);break}case"initialPlacement":q=c;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function uC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dC(e){return cZ.some(t=>e[t]>=0)}const EZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=ls(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=uC(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:dC(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...s,altBoundary:!0}),c=uC(l,n.floating);return{data:{escapedOffsets:c,escaped:dC(c)}}}default:return{}}}}},e3=new Set(["left","top"]);async function xZ(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=cs(n),c=Yc(n),d=bo(n)==="y",f=e3.has(l)?-1:1,m=s&&d?-1:1,p=ls(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),d?{x:v*m,y:g*f}:{x:g*f,y:v*m}}const RZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:l,middlewareData:c}=t,d=await xZ(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:l}}}}},OZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:S=>{let{x:E,y:R}=S;return{x:E,y:R}}},...f}=ls(e,t),m={x:n,y:r},p=await s.detectOverflow(t,f),g=bo(cs(i)),v=Hw(g);let y=m[v],b=m[g];if(l){const S=v==="y"?"top":"left",E=v==="y"?"bottom":"right",R=y+p[S],C=y-p[E];y=Lb(R,y,C)}if(c){const S=g==="y"?"top":"left",E=g==="y"?"bottom":"right",R=b+p[S],C=b-p[E];b=Lb(R,b,C)}const x=d.fn({...t,[v]:y,[g]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:l,[g]:c}}}}}},TZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=ls(e,t),m={x:n,y:r},p=bo(i),g=Hw(p);let v=m[g],y=m[p];const b=ls(c,t),x=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const R=g==="y"?"height":"width",C=s.reference[g]-s.floating[R]+x.mainAxis,O=s.reference[g]+s.reference[R]-x.mainAxis;v<C?v=C:v>O&&(v=O)}if(f){var S,E;const R=g==="y"?"width":"height",C=e3.has(cs(i)),O=s.reference[p]-s.floating[R]+(C&&((S=l.offset)==null?void 0:S[p])||0)+(C?0:x.crossAxis),A=s.reference[p]+s.reference[R]+(C?0:((E=l.offset)==null?void 0:E[p])||0)-(C?x.crossAxis:0);y<O?y=O:y>A&&(y=A)}return{[g]:v,[p]:y}}}},CZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:l,elements:c}=t,{apply:d=()=>{},...f}=ls(e,t),m=await l.detectOverflow(t,f),p=cs(i),g=Yc(i),v=bo(i)==="y",{width:y,height:b}=s.floating;let x,S;p==="top"||p==="bottom"?(x=p,S=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(S=p,x=g==="end"?"top":"bottom");const E=b-m.top-m.bottom,R=y-m.left-m.right,C=sa(b-m[x],E),O=sa(y-m[S],R),A=!t.middlewareData.shift;let M=C,P=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=E),A&&!g){const H=di(m.left,0),j=di(m.right,0),B=di(m.top,0),U=di(m.bottom,0);v?P=y-2*(H!==0||j!==0?H+j:di(m.left,m.right)):M=b-2*(B!==0||U!==0?B+U:di(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:M});const L=await l.getDimensions(c.floating);return y!==L.width||b!==L.height?{reset:{rects:!0}}:{}}}};function Bg(){return typeof window<"u"}function Wc(e){return t3(e)?(e.nodeName||"").toLowerCase():"#document"}function hi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Co(e){var t;return(t=(t3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function t3(e){return Bg()?e instanceof Node||e instanceof hi(e).Node:!1}function ro(e){return Bg()?e instanceof Element||e instanceof hi(e).Element:!1}function fs(e){return Bg()?e instanceof HTMLElement||e instanceof hi(e).HTMLElement:!1}function fC(e){return!Bg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hi(e).ShadowRoot}function cf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=io(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function AZ(e){return/^(table|td|th)$/.test(Wc(e))}function Vg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const IZ=/transform|translate|scale|rotate|perspective|filter/,MZ=/paint|layout|strict|content/,ka=e=>!!e&&e!=="none";let ry;function Zw(e){const t=ro(e)?io(e):e;return ka(t.transform)||ka(t.translate)||ka(t.scale)||ka(t.rotate)||ka(t.perspective)||!Yw()&&(ka(t.backdropFilter)||ka(t.filter))||IZ.test(t.willChange||"")||MZ.test(t.contain||"")}function PZ(e){let t=aa(e);for(;fs(t)&&!jc(t);){if(Zw(t))return t;if(Vg(t))return null;t=aa(t)}return null}function Yw(){return ry==null&&(ry=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ry}function jc(e){return/^(html|body|#document)$/.test(Wc(e))}function io(e){return hi(e).getComputedStyle(e)}function qg(e){return ro(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function aa(e){if(Wc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fC(e)&&e.host||Co(e);return fC(t)?t.host:t}function n3(e){const t=aa(e);return jc(t)?e.ownerDocument?e.ownerDocument.body:e.body:fs(t)&&cf(t)?t:n3(t)}function Kd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=n3(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),l=hi(i);if(s){const c=jb(l);return t.concat(l,l.visualViewport||[],cf(i)?i:[],c&&n?Kd(c):[])}else return t.concat(i,Kd(i,[],n))}function jb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function r3(e){const t=io(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=fs(e),s=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Vm(n)!==s||Vm(r)!==l;return c&&(n=s,r=l),{width:n,height:r,$:c}}function Ww(e){return ro(e)?e:e.contextElement}function Ic(e){const t=Ww(e);if(!fs(t))return Eo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=r3(t);let l=(s?Vm(n.width):n.width)/r,c=(s?Vm(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const NZ=Eo(0);function i3(e){const t=hi(e);return!Yw()||!t.visualViewport?NZ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kZ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hi(e)?!1:t}function ol(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ww(e);let l=Eo(1);t&&(r?ro(r)&&(l=Ic(r)):l=Ic(e));const c=kZ(s,n,r)?i3(s):Eo(0);let d=(i.left+c.x)/l.x,f=(i.top+c.y)/l.y,m=i.width/l.x,p=i.height/l.y;if(s){const g=hi(s),v=r&&ro(r)?hi(r):r;let y=g,b=jb(y);for(;b&&r&&v!==y;){const x=Ic(b),S=b.getBoundingClientRect(),E=io(b),R=S.left+(b.clientLeft+parseFloat(E.paddingLeft))*x.x,C=S.top+(b.clientTop+parseFloat(E.paddingTop))*x.y;d*=x.x,f*=x.y,m*=x.x,p*=x.y,d+=R,f+=C,y=hi(b),b=jb(y)}}return Hm({width:m,height:p,x:d,y:f})}function Hg(e,t){const n=qg(e).scrollLeft;return t?t.left+n:ol(Co(e)).left+n}function o3(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function DZ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",l=Co(r),c=t?Vg(t.floating):!1;if(r===l||c&&s)return n;let d={scrollLeft:0,scrollTop:0},f=Eo(1);const m=Eo(0),p=fs(r);if((p||!p&&!s)&&((Wc(r)!=="body"||cf(l))&&(d=qg(r)),p)){const v=ol(r);f=Ic(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}const g=l&&!p&&!s?o3(l,d):Eo(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 LZ(e){return Array.from(e.getClientRects())}function $Z(e){const t=Co(e),n=qg(e),r=e.ownerDocument.body,i=di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Hg(e);const c=-n.scrollTop;return io(r).direction==="rtl"&&(l+=di(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:l,y:c}}const hC=25;function jZ(e,t){const n=hi(e),r=Co(e),i=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,c=0,d=0;if(i){s=i.width,l=i.height;const m=Yw();(!m||m&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const f=Hg(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),v=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-v);y<=hC&&(s-=y)}else f<=hC&&(s+=f);return{width:s,height:l,x:c,y:d}}function UZ(e,t){const n=ol(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=fs(e)?Ic(e):Eo(1),l=e.clientWidth*s.x,c=e.clientHeight*s.y,d=i*s.x,f=r*s.y;return{width:l,height:c,x:d,y:f}}function pC(e,t,n){let r;if(t==="viewport")r=jZ(e,n);else if(t==="document")r=$Z(Co(e));else if(ro(t))r=UZ(t,n);else{const i=i3(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Hm(r)}function s3(e,t){const n=aa(e);return n===t||!ro(n)||jc(n)?!1:io(n).position==="fixed"||s3(n,t)}function zZ(e,t){const n=t.get(e);if(n)return n;let r=Kd(e,[],!1).filter(c=>ro(c)&&Wc(c)!=="body"),i=null;const s=io(e).position==="fixed";let l=s?aa(e):e;for(;ro(l)&&!jc(l);){const c=io(l),d=Zw(l);!d&&c.position==="fixed"&&(i=null),(s?!d&&!i:!d&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||cf(l)&&!d&&s3(e,l))?r=r.filter(m=>m!==l):i=c,l=aa(l)}return t.set(e,r),r}function FZ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Vg(t)?[]:zZ(t,this._c):[].concat(n),r],c=pC(t,l[0],i);let d=c.top,f=c.right,m=c.bottom,p=c.left;for(let g=1;g<l.length;g++){const v=pC(t,l[g],i);d=di(v.top,d),f=sa(v.right,f),m=sa(v.bottom,m),p=di(v.left,p)}return{width:f-p,height:m-d,x:p,y:d}}function BZ(e){const{width:t,height:n}=r3(e);return{width:t,height:n}}function VZ(e,t,n){const r=fs(t),i=Co(t),s=n==="fixed",l=ol(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=Eo(0);function f(){d.x=Hg(i)}if(r||!r&&!s)if((Wc(t)!=="body"||cf(i))&&(c=qg(t)),r){const v=ol(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else i&&f();s&&!r&&i&&f();const m=i&&!r&&!s?o3(i,c):Eo(0),p=l.left+c.scrollLeft-d.x-m.x,g=l.top+c.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function iy(e){return io(e).position==="static"}function mC(e,t){if(!fs(e)||io(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Co(e)===n&&(n=n.ownerDocument.body),n}function a3(e,t){const n=hi(e);if(Vg(e))return n;if(!fs(e)){let i=aa(e);for(;i&&!jc(i);){if(ro(i)&&!iy(i))return i;i=aa(i)}return n}let r=mC(e,t);for(;r&&AZ(r)&&iy(r);)r=mC(r,t);return r&&jc(r)&&iy(r)&&!Zw(r)?n:r||PZ(e)||n}const qZ=async function(e){const t=this.getOffsetParent||a3,n=this.getDimensions,r=await n(e.floating);return{reference:VZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HZ(e){return io(e).direction==="rtl"}const GZ={convertOffsetParentRelativeRectToViewportRelativeRect:DZ,getDocumentElement:Co,getClippingRect:FZ,getOffsetParent:a3,getElementRects:qZ,getClientRects:LZ,getDimensions:BZ,getScale:Ic,isElement:ro,isRTL:HZ};function l3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KZ(e,t){let n=null,r;const i=Co(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:v}=f;if(c||t(),!g||!v)return;const y=np(p),b=np(i.clientWidth-(m+g)),x=np(i.clientHeight-(p+v)),S=np(m),R={rootMargin:-y+"px "+-b+"px "+-x+"px "+-S+"px",threshold:di(0,sa(1,d))||1};let C=!0;function O(A){const M=A[0].intersectionRatio;if(M!==d){if(!C)return l();M?l(!1,M):r=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!l3(f,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(O,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,R)}n.observe(e)}return l(!0),s}function ZZ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ww(e),m=i||s?[...f?Kd(f):[],...t?Kd(t):[]]:[];m.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const p=f&&c?KZ(f,n):null;let g=-1,v=null;l&&(v=new ResizeObserver(S=>{let[E]=S;E&&E.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(t)})),n()}),f&&!d&&v.observe(f),t&&v.observe(t));let y,b=d?ol(e):null;d&&x();function x(){const S=ol(e);b&&!l3(b,S)&&n(),b=S,y=requestAnimationFrame(x)}return n(),()=>{var S;m.forEach(E=>{i&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),p?.(),(S=v)==null||S.disconnect(),v=null,d&&cancelAnimationFrame(y)}}const YZ=RZ,WZ=OZ,QZ=SZ,XZ=CZ,JZ=EZ,gC=wZ,eY=TZ,tY=(e,t,n)=>{const r=new Map,i={platform:GZ,...n},s={...i.platform,_c:r};return bZ(e,t,{...i,platform:s})};var nY=typeof document<"u",rY=function(){},dm=nY?I.useLayoutEffect:rY;function Gm(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,i;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(!Gm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Gm(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function c3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vC(e,t){const n=c3(e);return Math.round(t*n)/n}function oy(e){const t=I.useRef(e);return dm(()=>{t.current=e}),t}function iY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[m,p]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=I.useState(r);Gm(g,r)||v(r);const[y,b]=I.useState(null),[x,S]=I.useState(null),E=I.useCallback(ee=>{ee!==A.current&&(A.current=ee,b(ee))},[]),R=I.useCallback(ee=>{ee!==M.current&&(M.current=ee,S(ee))},[]),C=s||y,O=l||x,A=I.useRef(null),M=I.useRef(null),P=I.useRef(m),L=d!=null,H=oy(d),j=oy(i),B=oy(f),U=I.useCallback(()=>{if(!A.current||!M.current)return;const ee={placement:t,strategy:n,middleware:g};j.current&&(ee.platform=j.current),tY(A.current,M.current,ee).then(ae=>{const Q={...ae,isPositioned:B.current!==!1};Z.current&&!Gm(P.current,Q)&&(P.current=Q,Ig.flushSync(()=>{p(Q)}))})},[g,t,n,j,B]);dm(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(ee=>({...ee,isPositioned:!1})))},[f]);const Z=I.useRef(!1);dm(()=>(Z.current=!0,()=>{Z.current=!1}),[]),dm(()=>{if(C&&(A.current=C),O&&(M.current=O),C&&O){if(H.current)return H.current(C,O,U);U()}},[C,O,U,H,L]);const re=I.useMemo(()=>({reference:A,floating:M,setReference:E,setFloating:R}),[E,R]),q=I.useMemo(()=>({reference:C,floating:O}),[C,O]),W=I.useMemo(()=>{const ee={position:n,left:0,top:0};if(!q.floating)return ee;const ae=vC(q.floating,m.x),Q=vC(q.floating,m.y);return c?{...ee,transform:"translate("+ae+"px, "+Q+"px)",...c3(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ae,top:Q}},[n,c,q.floating,m.x,m.y]);return I.useMemo(()=>({...m,update:U,refs:re,elements:q,floatingStyles:W}),[m,U,re,q,W])}const oY=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gC({element:r.current,padding:i}).fn(n):{}:r?gC({element:r,padding:i}).fn(n):{}}}},sY=(e,t)=>{const n=YZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},aY=(e,t)=>{const n=WZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},lY=(e,t)=>({fn:eY(e).fn,options:[e,t]}),cY=(e,t)=>{const n=QZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},uY=(e,t)=>{const n=XZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},dY=(e,t)=>{const n=JZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},fY=(e,t)=>{const n=oY(e);return{name:n.name,fn:n.fn,options:[e,t]}};var hY="Arrow",u3=I.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return T.jsx(yn.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});u3.displayName=hY;var pY=u3;function d3(e){const[t,n]=I.useState(void 0);return to(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Qw="Popper",[f3,h3]=fl(Qw),[mY,p3]=f3(Qw),m3=e=>{const{__scopePopper:t,children:n}=e,[r,i]=I.useState(null);return T.jsx(mY,{scope:t,anchor:r,onAnchorChange:i,children:n})};m3.displayName=Qw;var g3="PopperAnchor",v3=I.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=p3(g3,n),l=I.useRef(null),c=Wn(t,l),d=I.useRef(null);return I.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&s.onAnchorChange(d.current)}),r?null:T.jsx(yn.div,{...i,ref:c})});v3.displayName=g3;var Xw="PopperContent",[gY,vY]=f3(Xw),_3=I.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:y,...b}=e,x=p3(Xw,n),[S,E]=I.useState(null),R=Wn(t,fe=>E(fe)),[C,O]=I.useState(null),A=d3(C),M=A?.width??0,P=A?.height??0,L=r+(s!=="center"?"-"+s:""),H=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},j=Array.isArray(f)?f:[f],B=j.length>0,U={padding:H,boundary:j.filter(yY),altBoundary:B},{refs:Z,floatingStyles:re,placement:q,isPositioned:W,middlewareData:ee}=iY({strategy:"fixed",placement:L,whileElementsMounted:(...fe)=>ZZ(...fe,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[sY({mainAxis:i+P,alignmentAxis:l}),d&&aY({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?lY():void 0,...U}),d&&cY({...U}),uY({...U,apply:({elements:fe,rects:pe,availableWidth:xe,availableHeight:Ue})=>{const{width:Y,height:te}=pe.reference,ve=fe.floating.style;ve.setProperty("--radix-popper-available-width",`${xe}px`),ve.setProperty("--radix-popper-available-height",`${Ue}px`),ve.setProperty("--radix-popper-anchor-width",`${Y}px`),ve.setProperty("--radix-popper-anchor-height",`${te}px`)}}),C&&fY({element:C,padding:c}),bY({arrowWidth:M,arrowHeight:P}),g&&dY({strategy:"referenceHidden",...U})]}),[ae,Q]=w3(q),k=no(y);to(()=>{W&&k?.()},[W,k]);const K=ee.arrow?.x,V=ee.arrow?.y,D=ee.arrow?.centerOffset!==0,[F,X]=I.useState();return to(()=>{S&&X(window.getComputedStyle(S).zIndex)},[S]),T.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:W?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(" "),...ee.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:T.jsx(gY,{scope:n,placedSide:ae,onArrowChange:O,arrowX:K,arrowY:V,shouldHideArrow:D,children:T.jsx(yn.div,{"data-side":ae,"data-align":Q,...b,ref:R,style:{...b.style,animation:W?void 0:"none"}})})})});_3.displayName=Xw;var y3="PopperArrow",_Y={top:"bottom",right:"left",bottom:"top",left:"right"},b3=I.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=vY(y3,r),l=_Y[s.placedSide];return T.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:T.jsx(pY,{...i,ref:n,style:{...i.style,display:"block"}})})});b3.displayName=y3;function yY(e){return e!==null}var bY=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=w3(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(i.arrow?.x??0)+c/2,v=(i.arrow?.y??0)+d/2;let y="",b="";return f==="bottom"?(y=l?p:`${g}px`,b=`${-d}px`):f==="top"?(y=l?p:`${g}px`,b=`${r.floating.height+d}px`):f==="right"?(y=`${-d}px`,b=l?p:`${v}px`):f==="left"&&(y=`${r.floating.width+d}px`,b=l?p:`${v}px`),{data:{x:y,y:b}}}});function w3(e){const[t,n="center"]=e.split("-");return[t,n]}var S3=m3,wY=v3,SY=_3,EY=b3,sy="rovingFocusGroup.onEntryFocus",xY={bubbles:!1,cancelable:!0},uf="RovingFocusGroup",[Ub,E3,RY]=Q4(uf),[OY,x3]=fl(uf,[RY]),[TY,CY]=OY(uf),R3=I.forwardRef((e,t)=>T.jsx(Ub.Provider,{scope:e.__scopeRovingFocusGroup,children:T.jsx(Ub.Slot,{scope:e.__scopeRovingFocusGroup,children:T.jsx(AY,{...e,ref:t})})}));R3.displayName=uf;var AY=I.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=I.useRef(null),v=Wn(t,g),y=X4(s),[b,x]=lf({prop:l,defaultProp:c??null,onChange:d,caller:uf}),[S,E]=I.useState(!1),R=no(f),C=E3(n),O=I.useRef(!1),[A,M]=I.useState(0);return I.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(sy,R),()=>P.removeEventListener(sy,R)},[R]),T.jsx(TY,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:b,onItemFocus:I.useCallback(P=>x(P),[x]),onItemShiftTab:I.useCallback(()=>E(!0),[]),onFocusableItemAdd:I.useCallback(()=>M(P=>P+1),[]),onFocusableItemRemove:I.useCallback(()=>M(P=>P-1),[]),children:T.jsx(yn.div,{tabIndex:S||A===0?-1:0,"data-orientation":r,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{O.current=!0}),onFocus:lt(e.onFocus,P=>{const L=!O.current;if(P.target===P.currentTarget&&L&&!S){const H=new CustomEvent(sy,xY);if(P.currentTarget.dispatchEvent(H),!H.defaultPrevented){const j=C().filter(q=>q.focusable),B=j.find(q=>q.active),U=j.find(q=>q.id===b),re=[B,U,...j].filter(Boolean).map(q=>q.ref.current);C3(re,m)}}O.current=!1}),onBlur:lt(e.onBlur,()=>E(!1))})})}),O3="RovingFocusGroupItem",T3=I.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:l,...c}=e,d=ta(),f=s||d,m=CY(O3,n),p=m.currentTabStopId===f,g=E3(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:b}=m;return I.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),T.jsx(Ub.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:T.jsx(yn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:lt(e.onMouseDown,x=>{r?m.onItemFocus(f):x.preventDefault()}),onFocus:lt(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:lt(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){m.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const S=PY(x,m.orientation,m.dir);if(S!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let R=g().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")R.reverse();else if(S==="prev"||S==="next"){S==="prev"&&R.reverse();const C=R.indexOf(x.currentTarget);R=m.loop?NY(R,C+1):R.slice(C+1)}setTimeout(()=>C3(R))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:b!=null}):l})})});T3.displayName=O3;var IY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PY(e,t,n){const r=MY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return IY[r]}function C3(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function NY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kY=R3,DY=T3,zb=["Enter"," "],LY=["ArrowDown","PageUp","Home"],A3=["ArrowUp","PageDown","End"],$Y=[...LY,...A3],jY={ltr:[...zb,"ArrowRight"],rtl:[...zb,"ArrowLeft"]},UY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},df="Menu",[Zd,zY,FY]=Q4(df),[hl,I3]=fl(df,[FY,h3,x3]),ff=h3(),M3=x3(),[P3,ha]=hl(df),[BY,hf]=hl(df),N3=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:s,modal:l=!0}=e,c=ff(t),[d,f]=I.useState(null),m=I.useRef(!1),p=no(s),g=X4(i);return I.useEffect(()=>{const v=()=>{m.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>m.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),T.jsx(S3,{...c,children:T.jsx(P3,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:T.jsx(BY,{scope:t,onClose:I.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};N3.displayName=df;var VY="MenuAnchor",Jw=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ff(n);return T.jsx(wY,{...i,...r,ref:t})});Jw.displayName=VY;var eS="MenuPortal",[qY,k3]=hl(eS,{forceMount:void 0}),D3=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,s=ha(eS,t);return T.jsx(qY,{scope:t,forceMount:n,children:T.jsx(ds,{present:n||s.open,children:T.jsx(zw,{asChild:!0,container:i,children:r})})})};D3.displayName=eS;var Di="MenuContent",[HY,tS]=hl(Di),L3=I.forwardRef((e,t)=>{const n=k3(Di,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=ha(Di,e.__scopeMenu),l=hf(Di,e.__scopeMenu);return T.jsx(Zd.Provider,{scope:e.__scopeMenu,children:T.jsx(ds,{present:r||s.open,children:T.jsx(Zd.Slot,{scope:e.__scopeMenu,children:l.modal?T.jsx(GY,{...i,ref:t}):T.jsx(KY,{...i,ref:t})})})})}),GY=I.forwardRef((e,t)=>{const n=ha(Di,e.__scopeMenu),r=I.useRef(null),i=Wn(t,r);return I.useEffect(()=>{const s=r.current;if(s)return k4(s)},[]),T.jsx(nS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),KY=I.forwardRef((e,t)=>{const n=ha(Di,e.__scopeMenu);return T.jsx(nS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ZY=Gd("MenuContent.ScrollLock"),nS=I.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:v,disableOutsideScroll:y,...b}=e,x=ha(Di,n),S=hf(Di,n),E=ff(n),R=M3(n),C=zY(n),[O,A]=I.useState(null),M=I.useRef(null),P=Wn(t,M,x.onContentChange),L=I.useRef(0),H=I.useRef(""),j=I.useRef(0),B=I.useRef(null),U=I.useRef("right"),Z=I.useRef(0),re=y?Fw:I.Fragment,q=y?{as:ZY,allowPinchZoom:!0}:void 0,W=ae=>{const Q=H.current+ae,k=C().filter(fe=>!fe.disabled),K=document.activeElement,V=k.find(fe=>fe.ref.current===K)?.textValue,D=k.map(fe=>fe.textValue),F=sW(D,Q,V),X=k.find(fe=>fe.textValue===F)?.ref.current;(function fe(pe){H.current=pe,window.clearTimeout(L.current),pe!==""&&(L.current=window.setTimeout(()=>fe(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};I.useEffect(()=>()=>window.clearTimeout(L.current),[]),R4();const ee=I.useCallback(ae=>U.current===B.current?.side&&lW(ae,B.current?.area),[]);return T.jsx(HY,{scope:n,searchRef:H,onItemEnter:I.useCallback(ae=>{ee(ae)&&ae.preventDefault()},[ee]),onItemLeave:I.useCallback(ae=>{ee(ae)||(M.current?.focus(),A(null))},[ee]),onTriggerLeave:I.useCallback(ae=>{ee(ae)&&ae.preventDefault()},[ee]),pointerGraceTimerRef:j,onPointerGraceIntentChange:I.useCallback(ae=>{B.current=ae},[]),children:T.jsx(re,{...q,children:T.jsx(Uw,{asChild:!0,trapped:i,onMountAutoFocus:lt(s,ae=>{ae.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:T.jsx(jw,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:v,children:T.jsx(kY,{asChild:!0,...R,dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:A,onEntryFocus:lt(d,ae=>{S.isUsingKeyboardRef.current||ae.preventDefault()}),preventScrollOnEntryFocus:!0,children:T.jsx(SY,{role:"menu","aria-orientation":"vertical","data-state":J3(x.open),"data-radix-menu-content":"",dir:S.dir,...E,...b,ref:P,style:{outline:"none",...b.style},onKeyDown:lt(b.onKeyDown,ae=>{const k=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,K=ae.ctrlKey||ae.altKey||ae.metaKey,V=ae.key.length===1;k&&(ae.key==="Tab"&&ae.preventDefault(),!K&&V&&W(ae.key));const D=M.current;if(ae.target!==D||!$Y.includes(ae.key))return;ae.preventDefault();const X=C().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);A3.includes(ae.key)&&X.reverse(),iW(X)}),onBlur:lt(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(L.current),H.current="")}),onPointerMove:lt(e.onPointerMove,Yd(ae=>{const Q=ae.target,k=Z.current!==ae.clientX;if(ae.currentTarget.contains(Q)&&k){const K=ae.clientX>Z.current?"right":"left";U.current=K,Z.current=ae.clientX}}))})})})})})})});L3.displayName=Di;var YY="MenuGroup",rS=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return T.jsx(yn.div,{role:"group",...r,ref:t})});rS.displayName=YY;var WY="MenuLabel",$3=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return T.jsx(yn.div,{...r,ref:t})});$3.displayName=WY;var Km="MenuItem",_C="menu.itemSelect",Gg=I.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,s=I.useRef(null),l=hf(Km,e.__scopeMenu),c=tS(Km,e.__scopeMenu),d=Wn(t,s),f=I.useRef(!1),m=()=>{const p=s.current;if(!n&&p){const g=new CustomEvent(_C,{bubbles:!0,cancelable:!0});p.addEventListener(_C,v=>r?.(v),{once:!0}),w4(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return T.jsx(j3,{...i,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=c.searchRef.current!=="";n||g&&p.key===" "||zb.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Gg.displayName=Km;var j3=I.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=e,l=tS(Km,n),c=M3(n),d=I.useRef(null),f=Wn(t,d),[m,p]=I.useState(!1),[g,v]=I.useState("");return I.useEffect(()=>{const y=d.current;y&&v((y.textContent??"").trim())},[s.children]),T.jsx(Zd.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:T.jsx(DY,{asChild:!0,...c,focusable:!r,children:T.jsx(yn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:f,onPointerMove:lt(e.onPointerMove,Yd(y=>{r?l.onItemLeave(y):(l.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lt(e.onPointerLeave,Yd(y=>l.onItemLeave(y))),onFocus:lt(e.onFocus,()=>p(!0)),onBlur:lt(e.onBlur,()=>p(!1))})})})}),QY="MenuCheckboxItem",U3=I.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return T.jsx(q3,{scope:e.__scopeMenu,checked:n,children:T.jsx(Gg,{role:"menuitemcheckbox","aria-checked":Zm(n)?"mixed":n,...i,ref:t,"data-state":sS(n),onSelect:lt(i.onSelect,()=>r?.(Zm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});U3.displayName=QY;var z3="MenuRadioGroup",[XY,JY]=hl(z3,{value:void 0,onValueChange:()=>{}}),F3=I.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,s=no(r);return T.jsx(XY,{scope:e.__scopeMenu,value:n,onValueChange:s,children:T.jsx(rS,{...i,ref:t})})});F3.displayName=z3;var B3="MenuRadioItem",V3=I.forwardRef((e,t)=>{const{value:n,...r}=e,i=JY(B3,e.__scopeMenu),s=n===i.value;return T.jsx(q3,{scope:e.__scopeMenu,checked:s,children:T.jsx(Gg,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":sS(s),onSelect:lt(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});V3.displayName=B3;var iS="MenuItemIndicator",[q3,eW]=hl(iS,{checked:!1}),H3=I.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,s=eW(iS,n);return T.jsx(ds,{present:r||Zm(s.checked)||s.checked===!0,children:T.jsx(yn.span,{...i,ref:t,"data-state":sS(s.checked)})})});H3.displayName=iS;var tW="MenuSeparator",G3=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return T.jsx(yn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});G3.displayName=tW;var nW="MenuArrow",K3=I.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=ff(n);return T.jsx(EY,{...i,...r,ref:t})});K3.displayName=nW;var oS="MenuSub",[rW,Z3]=hl(oS),Y3=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,s=ha(oS,t),l=ff(t),[c,d]=I.useState(null),[f,m]=I.useState(null),p=no(i);return I.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),T.jsx(S3,{...l,children:T.jsx(P3,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:T.jsx(rW,{scope:t,contentId:ta(),triggerId:ta(),trigger:c,onTriggerChange:d,children:n})})})};Y3.displayName=oS;var vd="MenuSubTrigger",W3=I.forwardRef((e,t)=>{const n=ha(vd,e.__scopeMenu),r=hf(vd,e.__scopeMenu),i=Z3(vd,e.__scopeMenu),s=tS(vd,e.__scopeMenu),l=I.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,f={__scopeMenu:e.__scopeMenu},m=I.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return I.useEffect(()=>m,[m]),I.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),d(null)}},[c,d]),T.jsx(Jw,{asChild:!0,...f,children:T.jsx(j3,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":J3(n.open),...e,ref:af(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lt(e.onPointerMove,Yd(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:lt(e.onPointerLeave,Yd(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const v=n.content?.dataset.side,y=v==="right",b=y?-5:5,x=g[y?"left":"right"],S=g[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x,y:g.top},{x:S,y:g.top},{x:S,y:g.bottom},{x,y:g.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:lt(e.onKeyDown,p=>{const g=s.searchRef.current!=="";e.disabled||g&&p.key===" "||jY[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});W3.displayName=vd;var Q3="MenuSubContent",X3=I.forwardRef((e,t)=>{const n=k3(Di,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=ha(Di,e.__scopeMenu),l=hf(Di,e.__scopeMenu),c=Z3(Q3,e.__scopeMenu),d=I.useRef(null),f=Wn(t,d);return T.jsx(Zd.Provider,{scope:e.__scopeMenu,children:T.jsx(ds,{present:r||s.open,children:T.jsx(Zd.Slot,{scope:e.__scopeMenu,children:T.jsx(nS,{id:c.contentId,"aria-labelledby":c.triggerId,...i,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!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:lt(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:lt(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=UY[l.dir].includes(m.key);p&&g&&(s.onOpenChange(!1),c.trigger?.focus(),m.preventDefault())})})})})})});X3.displayName=Q3;function J3(e){return e?"open":"closed"}function Zm(e){return e==="indeterminate"}function sS(e){return Zm(e)?"indeterminate":e?"checked":"unchecked"}function iW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function oW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function sW(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=oW(e,Math.max(s,0));i.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function aW(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],d=t[l],f=c.x,m=c.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(i=!i)}return i}function lW(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return aW(n,t)}function Yd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cW=N3,uW=Jw,dW=D3,fW=L3,hW=rS,pW=$3,mW=Gg,gW=U3,vW=F3,_W=V3,yW=H3,bW=G3,wW=K3,SW=Y3,EW=W3,xW=X3,Kg="DropdownMenu",[RW]=fl(Kg,[I3]),Tr=I3(),[OW,ek]=RW(Kg),tk=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,d=Tr(t),f=I.useRef(null),[m,p]=lf({prop:i,defaultProp:s??!1,onChange:l,caller:Kg});return T.jsx(OW,{scope:t,triggerId:ta(),triggerRef:f,contentId:ta(),open:m,onOpenChange:p,onOpenToggle:I.useCallback(()=>p(g=>!g),[p]),modal:c,children:T.jsx(cW,{...d,open:m,onOpenChange:p,dir:r,modal:c,children:n})})};tk.displayName=Kg;var nk="DropdownMenuTrigger",rk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,s=ek(nk,n),l=Tr(n);return T.jsx(uW,{asChild:!0,...l,children:T.jsx(yn.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:af(t,s.triggerRef),onPointerDown:lt(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:lt(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});rk.displayName=nk;var TW="DropdownMenuPortal",ik=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tr(t);return T.jsx(dW,{...r,...n})};ik.displayName=TW;var ok="DropdownMenuContent",sk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ek(ok,n),s=Tr(n),l=I.useRef(!1);return T.jsx(fW,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,c=>{l.current||i.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!i.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)"}})});sk.displayName=ok;var CW="DropdownMenuGroup",AW=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(hW,{...i,...r,ref:t})});AW.displayName=CW;var IW="DropdownMenuLabel",ak=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(pW,{...i,...r,ref:t})});ak.displayName=IW;var MW="DropdownMenuItem",lk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(mW,{...i,...r,ref:t})});lk.displayName=MW;var PW="DropdownMenuCheckboxItem",ck=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(gW,{...i,...r,ref:t})});ck.displayName=PW;var NW="DropdownMenuRadioGroup",uk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(vW,{...i,...r,ref:t})});uk.displayName=NW;var kW="DropdownMenuRadioItem",dk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(_W,{...i,...r,ref:t})});dk.displayName=kW;var DW="DropdownMenuItemIndicator",fk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(yW,{...i,...r,ref:t})});fk.displayName=DW;var LW="DropdownMenuSeparator",hk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(bW,{...i,...r,ref:t})});hk.displayName=LW;var $W="DropdownMenuArrow",jW=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(wW,{...i,...r,ref:t})});jW.displayName=$W;var UW=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:s}=e,l=Tr(t),[c,d]=lf({prop:r,defaultProp:s??!1,onChange:i,caller:"DropdownMenuSub"});return T.jsx(SW,{...l,open:c,onOpenChange:d,children:n})},zW="DropdownMenuSubTrigger",pk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(EW,{...i,...r,ref:t})});pk.displayName=zW;var FW="DropdownMenuSubContent",mk=I.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Tr(n);return T.jsx(xW,{...i,...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)"}})});mk.displayName=FW;var BW=tk,VW=rk,qW=ik,HW=sk,_le=ak,GW=lk,yle=ck,ble=uk,wle=dk,Sle=fk,Ele=hk,xle=UW,Rle=pk,Ole=mk,KW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pf=KW.reduce((e,t)=>{const n=_4(`Primitive.${t}`),r=I.forwardRef((i,s)=>{const{asChild:l,...c}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ZW="Label",gk=I.forwardRef((e,t)=>T.jsx(pf.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));gk.displayName=ZW;var YW=gk;function WW(e,t=[]){let n=[];function r(s,l){const c=I.createContext(l);c.displayName=s+"Context";const d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:v,...y}=p,b=g?.[e]?.[d]||c,x=I.useMemo(()=>y,Object.values(y));return T.jsx(b.Provider,{value:x,children:v})};f.displayName=s+"Provider";function m(p,g){const v=g?.[e]?.[d]||c,y=I.useContext(v);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[f,m]}const i=()=>{const s=n.map(l=>I.createContext(l));return function(c){const d=c?.[e]||s;return I.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return i.scopeName=e,[r,QW(i,...t)]}function QW(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const p=d(s)[`__scope${f}`];return{...c,...p}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var XW=cP();function JW(){return XW.useSyncExternalStore(eQ,()=>!0,()=>!1)}function eQ(){return()=>{}}var aS="Avatar",[tQ]=WW(aS),[nQ,vk]=tQ(aS),_k=I.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=I.useState("idle");return T.jsx(nQ,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:T.jsx(pf.span,{...r,ref:t})})});_k.displayName=aS;var yk="AvatarImage",bk=I.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,l=vk(yk,n),c=rQ(r,s),d=no(f=>{i(f),l.onImageLoadingStatusChange(f)});return to(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?T.jsx(pf.img,{...s,ref:t,src:r}):null});bk.displayName=yk;var wk="AvatarFallback",Sk=I.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=vk(wk,n),[l,c]=I.useState(r===void 0);return I.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(d)}},[r]),l&&s.imageLoadingStatus!=="loaded"?T.jsx(pf.span,{...i,ref:t}):null});Sk.displayName=wk;function yC(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function rQ(e,{referrerPolicy:t,crossOrigin:n}){const r=JW(),i=I.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[l,c]=I.useState(()=>yC(s,e));return to(()=>{c(yC(s,e))},[s,e]),to(()=>{const d=p=>()=>{c(p)};if(!s)return;const f=d("loaded"),m=d("error");return s.addEventListener("load",f),s.addEventListener("error",m),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",f),s.removeEventListener("error",m)}},[s,n,t]),l}var iQ=_k,oQ=bk,sQ=Sk;function aQ(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function lS(e,t,n=""){const r=aQ(e),i=e?.length;if(!r||t!==void 0){const l=n&&`"${n}" `,c="",d=r?`length=${i}`:`type=${typeof e}`,f=l+"expected Uint8Array"+c+", got "+d;throw r?new RangeError(f):new TypeError(f)}return e}function bC(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 lQ(e,t){lS(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new RangeError('"digestInto() output" expected to be of length >='+n)}function Fb(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ay(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ho(e,t){return e<<32-t|e>>>t}const cQ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",uQ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function dQ(e){if(lS(e),cQ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=uQ[e[n]];return t}function fQ(e,t={}){const n=(i,s)=>e(s).update(i).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}const hQ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function pQ(e,t,n){return e&t^~e&n}function mQ(e,t,n){return e&t^e&n^t&n}class gQ{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,i){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=ay(this.buffer)}update(t){bC(this),lS(t);const{view:n,buffer:r,blockLen:i}=this,s=t.length;for(let l=0;l<s;){const c=Math.min(i-this.pos,s-l);if(c===i){const d=ay(t);for(;i<=s-l;l+=i)this.process(d,l);continue}r.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){bC(this),lQ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:l}=this;n[l++]=128,Fb(this.buffer.subarray(l)),this.padOffset>i-l&&(this.process(r,0),l=0);for(let p=l;p<i;p++)n[p]=0;r.setBigUint64(i-8,BigInt(this.length*8),s),this.process(r,0);const c=ay(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++)c.setUint32(4*p,m[p],s)}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:i,finished:s,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=s,t.length=i,t.pos=c,i%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Fs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vQ=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]),Bs=new Uint32Array(64);class _Q extends gQ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:i,E:s,F:l,G:c,H:d}=this;return[t,n,r,i,s,l,c,d]}set(t,n,r,i,s,l,c,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=l|0,this.G=c|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)Bs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=Bs[p-15],v=Bs[p-2],y=ho(g,7)^ho(g,18)^g>>>3,b=ho(v,17)^ho(v,19)^v>>>10;Bs[p]=b+Bs[p-7]+y+Bs[p-16]|0}let{A:r,B:i,C:s,D:l,E:c,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=ho(c,6)^ho(c,11)^ho(c,25),v=m+g+pQ(c,d,f)+vQ[p]+Bs[p]|0,b=(ho(r,2)^ho(r,13)^ho(r,22))+mQ(r,i,s)|0;m=f,f=d,d=c,c=l+v|0,l=s,s=i,i=r,r=v+b|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,l=l+this.D|0,c=c+this.E|0,d=d+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,i,s,l,c,d,f,m)}roundClean(){Fb(Bs)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Fb(this.buffer)}}class yQ extends _Q{A=Fs[0]|0;B=Fs[1]|0;C=Fs[2]|0;D=Fs[3]|0;E=Fs[4]|0;F=Fs[5]|0;G=Fs[6]|0;H=Fs[7]|0;constructor(){super(32)}}const bQ=fQ(()=>new yQ,hQ(1));function wQ(e){const t=I.useRef({value:e,previous:e});return I.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Zg="Checkbox",[SQ]=fl(Zg),[EQ,cS]=SQ(Zg);function xQ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:l,name:c,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,v]=lf({prop:n,defaultProp:i??!1,onChange:d,caller:Zg}),[y,b]=I.useState(null),[x,S]=I.useState(null),E=I.useRef(!1),R=y?!!l||!!y.closest("form"):!0,C={checked:g,disabled:s,setChecked:v,control:y,setControl:b,name:c,form:l,value:m,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:na(i)?!1:i,isFormControl:R,bubbleInput:x,setBubbleInput:S};return T.jsx(EQ,{scope:t,...C,children:RQ(p)?p(C):r})}var Ek="CheckboxTrigger",xk=I.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:l,disabled:c,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:y}=cS(Ek,e),b=Wn(i,m),x=I.useRef(d);return I.useEffect(()=>{const S=s?.form;if(S){const E=()=>p(x.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[s,p]),T.jsx(yn.button,{type:"button",role:"checkbox","aria-checked":na(d)?"mixed":d,"aria-required":f,"data-state":Ik(d),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:b,onKeyDown:lt(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:lt(n,S=>{p(E=>na(E)?!0:!E),y&&v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})});xk.displayName=Ek;var Rk=I.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:c,value:d,onCheckedChange:f,form:m,...p}=e;return T.jsx(xQ,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:c,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>T.jsxs(T.Fragment,{children:[T.jsx(xk,{...p,ref:t,__scopeCheckbox:n}),g&&T.jsx(Ak,{__scopeCheckbox:n})]})})});Rk.displayName=Zg;var Ok="CheckboxIndicator",Tk=I.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=cS(Ok,n);return T.jsx(ds,{present:r||na(s.checked)||s.checked===!0,children:T.jsx(yn.span,{"data-state":Ik(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Tk.displayName=Ok;var Ck="CheckboxBubbleInput",Ak=I.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:l,required:c,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:v}=cS(Ck,e),y=Wn(n,v),b=wQ(s),x=d3(r);I.useEffect(()=>{const E=g;if(!E)return;const R=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(R,"checked").set,A=!i.current;if(b!==s&&O){const M=new Event("click",{bubbles:A});E.indeterminate=na(s),O.call(E,na(s)?!1:s),E.dispatchEvent(M)}},[g,b,s,i]);const S=I.useRef(na(s)?!1:s);return T.jsx(yn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??S.current,required:c,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ak.displayName=Ck;function RQ(e){return typeof e=="function"}function na(e){return e==="indeterminate"}function Ik(e){return na(e)?"indeterminate":e?"checked":"unchecked"}var Mc=(e,t,n)=>new Promise((r,i)=>{var s=d=>{try{c(n.next(d))}catch(f){i(f)}},l=d=>{try{c(n.throw(d))}catch(f){i(f)}},c=d=>d.done?r(d.value):Promise.resolve(d.value).then(s,l);c((n=n.apply(e,t)).next())}),fm=class extends Error{},OQ=class extends Error{},TQ=e=>Math.exp(e)*150,CQ=(e,...t)=>Mc(void 0,[e,...t],function*(n,{attempts:r=4}={}){var i;let s;for(let l=0;l<r;l++)try{return yield n()}catch(c){s=c,yield new Promise(d=>setTimeout(d,TQ(l)))}throw new fm((i=s?.message)!=null?i:"Exhausted all retries")}),Qu,Mk="captchaFoxOnLoad",wC=`https://cdn.captchafox.com/api.js?render=explicit&onload=${Mk}`;function AQ(){return Mc(this,arguments,function*({nonce:e}={}){return Qu&&document.querySelector(`script[src="${wC}"]`)||(Qu=new Promise((t,n)=>{window[Mk]=t;const r=document.createElement("script");r.src=wC,r.async=!0,r.defer=!0,r.onerror=i=>{r.remove(),Qu=void 0,n(i)},e&&(r.nonce=e),document.body.appendChild(r)})),Qu})}function IQ(){return Mc(this,arguments,function*(e={}){return CQ(()=>AQ(e))})}var MQ=e=>{window._tsdk={n:e,v:"1.12.0"}},ic=()=>typeof window?.captchafox<"u",Pk=I.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:i,className:s,nonce:l,i18n:c,hideClose:d,onError:f,onVerify:m,onLoad:p,onFail:g,onClose:v,onChallengeChange:y,onChallengeOpen:b},x)=>{const[S,E]=I.useState(),[R,C]=I.useState(),O=I.useRef(!1),A=I.useRef(),M=I.useRef(),P=I.useRef(),L=I.useRef(!1);I.useImperativeHandle(x,()=>({getResponse(){return!ic()||!R?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(R)},reset(){if(!ic()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(R)},remove(){if(!ic()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}C(void 0),window.captchafox.remove(R)},execute:()=>Mc(void 0,null,function*(){if(L.current)return Promise.reject(new fm);if(!ic()||!R)return j();try{return yield window.captchafox.execute(R)}catch(Z){const re=B(Z);return Promise.reject(re)}})}),[R]),I.useEffect(()=>{R&&p?.()},[R]),I.useEffect(()=>(MQ("rj"),()=>{H()}),[]),I.useEffect(()=>{S&&(O.current?ic()&&U():IQ({nonce:l}).then(()=>Mc(void 0,null,function*(){ic()&&(O.current=!0,yield U())})).catch(Z=>{var re;f?.(Z),L.current=!0,(re=P.current)==null||re.call(P),console.error("[CaptchaFox] Could not load script:",Z)}))},[S,t,n,r,d]);const H=()=>{clearTimeout(M.current)},j=()=>new Promise((Z,re)=>{P.current=()=>{H(),re(new fm)},M.current=setTimeout(()=>{re(new OQ("Execute timed out"))},e*1e3),A.current=q=>{H(),window.captchafox.execute(q).then(Z).catch(W=>{const ee=B(W);re(ee)})}}),B=Z=>Z!=="challenge-aborted"&&Z!=="rate-limited"?new fm:Z,U=()=>Mc(void 0,null,function*(){var Z,re,q;if((Z=window.captchafox)==null||Z.remove(R),!S||((re=S?.children)==null?void 0:re.length)===1)return;const W=yield(q=window.captchafox)==null?void 0:q.render(S,{lang:n,sitekey:t,mode:r,theme:i,i18n:c,hideClose:d,onError:f,onFail:g,onClose:v,onVerify:m,onChallengeChange:y,onChallengeOpen:b});W&&(C(W),A.current&&(A.current(W),A.current=void 0))});return ne.createElement("div",{ref:E,id:R,className:s})});Pk.displayName="CaptchaFox";var PQ=Object.defineProperty,NQ=Object.defineProperties,kQ=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,Nk=Object.prototype.hasOwnProperty,kk=Object.prototype.propertyIsEnumerable,Bb=(e,t,n)=>t in e?PQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,si=(e,t)=>{for(var n in t||(t={}))Nk.call(t,n)&&Bb(e,n,t[n]);if(Ym)for(var n of Ym(t))kk.call(t,n)&&Bb(e,n,t[n]);return e},Dk=(e,t)=>NQ(e,kQ(t)),DQ=(e,t)=>{var n={};for(var r in e)Nk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ym)for(var r of Ym(e))t.indexOf(r)<0&&kk.call(e,r)&&(n[r]=e[r]);return n},tr=(e,t,n)=>(Bb(e,typeof t!="symbol"?t+"":t,n),n),Uc=(e,t,n)=>new Promise((r,i)=>{var s=d=>{try{c(n.next(d))}catch(f){i(f)}},l=d=>{try{c(n.throw(d))}catch(f){i(f)}},c=d=>d.done?r(d.value):Promise.resolve(d.value).then(s,l);c((n=n.apply(e,t)).next())}),LQ="hCaptcha-script",hm="hCaptchaOnLoad",SC="script-error",Ys="@hCaptcha/loader";function $Q(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function Lk(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function $k(e){return e||document.head}function jQ(e){var t;e.setTag("source",Ys),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",si({},UQ())),e.setContext("device",Dk(si({},FQ()),{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 UQ(){var e,t,n,r,i,s;let l=navigator.userAgent,c,d;return l.indexOf("Firefox")!==-1?(c="Firefox",d=(e=l.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):l.indexOf("Edg")!==-1?(c="Microsoft Edge",d=(t=l.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):l.indexOf("Chrome")!==-1&&l.indexOf("Safari")!==-1?(c="Chrome",d=(n=l.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):l.indexOf("Safari")!==-1&&l.indexOf("Chrome")===-1?(c="Safari",d=(r=l.match(/Version\/([\d.]+)/))==null?void 0:r[1]):l.indexOf("Opera")!==-1||l.indexOf("OPR")!==-1?(c="Opera",d=(i=l.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:i[2]):l.indexOf("MSIE")!==-1||l.indexOf("Trident")!==-1?(c="Internet Explorer",d=(s=l.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:s[2]):(c="Unknown",d="Unknown"),{name:c,version:d}}function zQ(e){return new Promise(t=>setTimeout(t,e))}function FQ(){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 BQ=class jk{constructor(t){tr(this,"_parent"),tr(this,"breadcrumbs",[]),tr(this,"context",{}),tr(this,"extra",{}),tr(this,"tags",{}),tr(this,"request"),tr(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new jk(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=si(si({},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,i)=>{var s;return r.breadcrumbs=[...(s=r.breadcrumbs)!=null?s:[],...i.breadcrumbs],r.extra=si(si({},r.extra),i.extra),r.contexts=si(si({},r.contexts),i.context),r.tags=si(si({},r.tags),i.tags),i.user&&(r.user=i.user),i.request&&(r.request=i.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},VQ=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qQ=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,HQ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,GQ=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,rp="?",EC="An unknown error occurred",KQ="0.0.4";function ZQ(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function br(e){return(e+256).toString(16).substring(1)}function YQ(){let e=ZQ(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,br(e[0])+br(e[1])+br(e[2])+br(e[3])+"-"+br(e[4])+br(e[5])+"-"+br(e[6])+br(e[7])+"-"+br(e[8])+br(e[9])+"-"+br(e[10])+br(e[11])+br(e[12])+br(e[13])+br(e[14])+br(e[15])}var WQ=[[VQ,"chrome"],[HQ,"winjs"],[qQ,"gecko"]];function QQ(e){var t,n,r,i;if(!e.stack)return null;let s=[],l=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
106
106
|
`))!=null?r:[];for(let c=0;c<l.length;++c){let d=null,f=null,m=null;for(let[p,g]of WQ)if(f=p.exec(l[c]),f){m=g;break}if(!(!f||!m)){if(m==="chrome")d={filename:(i=f[2])!=null&&i.startsWith("address at ")?f[2].substring(11):f[2],function:f[1]||rp,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||rp,lineno:+f[3],colno:f[4]?+f[4]:null};else if(m==="gecko")c===0&&!f[5]&&e.columnNumber!==void 0&&s.length>0&&(s[0].column=e.columnNumber+1),d={filename:f[3],function:f[1]||rp,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=rp),s.push(d)}}return s.length?s.reverse():null}function XQ(e){let t=QQ(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function JQ(e){let t=GQ.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),i=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(i?"/"+i:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function eX(e,t,n){var r,i;let s=si({event_id:YQ().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:KQ},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){s.message=(i=(r=e.error)==null?void 0:r.message)!=null?i:"Unknown error",s.fingerprint=[s.message];let l=[],c=e.error;for(let d=0;d<5&&c&&(l.push(XQ(c)),!(!c.cause||!(c.cause instanceof Error)));d++)c=c.cause;s.exception={values:l.reverse()}}return e.type==="message"&&(s.message=e.message,s.level=e.level),s}function tX(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,i=DQ(n,["message"]),s=new Error(typeof r=="string"?r:EC);return Object.assign(s,i)}let t=new Error(EC);return Object.assign(t,{cause:e})}function nX(e,t,n){return Uc(this,null,function*(){var r,i;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let s;if(n){let d=new AbortController;s=d.signal,setTimeout(()=>d.abort(),n)}let l=yield fetch(e,Dk(si({},t),{signal:s})),c=yield l.text();return{status:l.status,body:c}}return yield new Promise((s,l)=>{var c,d;let f=new XMLHttpRequest;if(f.open((c=t?.method)!=null?c:"GET",e),f.onload=()=>s({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(s){return{status:0,body:(i=(r=s?.toString)==null?void 0:r.call(s))!=null?i:"Unknown error"}}})}var qr,Vb=(qr=class{constructor(e){tr(this,"apiURL"),tr(this,"dsn"),tr(this,"environment"),tr(this,"release"),tr(this,"sampleRate"),tr(this,"debug"),tr(this,"_scope"),tr(this,"shouldBuffer",!1),tr(this,"bufferlimit",20),tr(this,"buffer",[]);var t,n,r,i,s;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 BQ,this.apiURL=JQ(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(i=e.buffer)!=null?i:!1,this.bufferlimit=(s=e.bufferLimit)!=null?s:20}static init(e){qr._instance||(qr._instance=new qr(e))}static get instance(){if(!qr._instance)throw new Error("Sentry has not been initialized");return qr._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return qr.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){qr.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:tX(e),scope:t??this._scope})}static captureException(e,t){qr.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){qr.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 Uc(this,null,function*(){try{this.log("Sending sentry event",e);let n=eX(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},i={type:"event"},s=JSON.stringify(r)+`
|
|
107
107
|
`+JSON.stringify(i)+`
|
|
108
108
|
`+JSON.stringify(n),l=yield nX(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:s},t);this.log("Sentry response",l.status),l.status!==200&&(console.log(l.body),console.error("Failed to send event to Sentry",l))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return Uc(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return qr.instance.flush(e)}static reset(){qr._instance=void 0}},tr(qr,"_instance"),qr),rX="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",iX="2.3.0",oX="production";function sX(e=!0){if(!e)return xC();Vb.init({dsn:rX,release:iX,environment:oX});let t=Vb.scope;return jQ(t),xC(t)}function xC(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&Vb.captureException(t,e)}}}function aX({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:i="https://js.hcaptcha.com",cleanup:s=!1,secureApi:l=!1,scriptSource:c=""}={},d){let f=$k(e),m=Lk(f);return new Promise((p,g)=>{let v=m.document.createElement("script");v.id=LQ,c?v.src=`${c}?onload=${hm}`:l?v.src=`${i}/1/secure-api.js?onload=${hm}`:v.src=`${i}/1/api.js?onload=${hm}`,v.crossOrigin=r,v.async=n;let y=(b,x)=>{try{!l&&s&&f.removeChild(v),x(b)}catch(S){g(S)}};v.onload=b=>y(b,p),v.onerror=b=>{d&&d(v.src),y(b,g)},v.src+=t!==""?`&${t}`:"",f.appendChild(v)})}var ip=[];function lX(e={cleanup:!1},t){try{t.addBreadcrumb({category:Ys,message:"hCaptcha loader params",data:e});let n=$k(e.scriptLocation),r=Lk(n),i=ip.find(({scope:l})=>l===r.window);if(i)return t.addBreadcrumb({category:Ys,message:"hCaptcha already loaded"}),i.promise;let s=new Promise((l,c)=>Uc(this,null,function*(){try{r.window[hm]=()=>{t.addBreadcrumb({category:Ys,message:"hCaptcha script called onload function"}),l(r.window.hcaptcha)};let d=$Q({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield aX(si({query:d},e),f=>{t.captureRequest({url:f,method:"GET"})}),t.addBreadcrumb({category:Ys,message:"hCaptcha loaded",data:i})}catch{t.addBreadcrumb({category:Ys,message:"hCaptcha failed to load"});let f=ip.findIndex(m=>m.scope===r.window);f!==-1&&ip.splice(f,1),c(new Error(SC))}}));return ip.push({promise:s,scope:r.window}),s}catch(n){return t.captureException(n),Promise.reject(new Error(SC))}}function Uk(e,t,n=0){return Uc(this,null,function*(){var r,i;let s=(r=e.maxRetries)!=null?r:2,l=(i=e.retryDelay)!=null?i:1e3,c=n<s?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield lX(e,t)}catch(d){return t.addBreadcrumb({category:Ys,message:c}),n>=s?(t.captureException(d),Promise.reject(d)):(t.addBreadcrumb({category:Ys,message:`Waiting ${l}ms before retry attempt ${n+1}`}),yield zQ(l),n+=1,Uk(e,t,n))}})}function cX(){return Uc(this,arguments,function*(e={}){let t=sX(e.sentry);return yield Uk(e,t)})}function RC(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function OC(e){return e||document.head}var uX=class extends I.Component{constructor(t){super(t),this._hcaptcha=void 0,this.renderCaptcha=this.renderCaptcha.bind(this),this.resetCaptcha=this.resetCaptcha.bind(this),this.removeCaptcha=this.removeCaptcha.bind(this),this.isReady=this.isReady.bind(this),this._onReady=null,this.loadCaptcha=this.loadCaptcha.bind(this),this.handleOnLoad=this.handleOnLoad.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleExpire=this.handleExpire.bind(this),this.handleError=this.handleError.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.handleChallengeExpired=this.handleChallengeExpired.bind(this),this.ref=I.createRef(),this.apiScriptRequested=!1,this.sentryHub=null,this.captchaId="",this._pendingExecute=null,this.state={isApiReady:!1,isRemoved:!1,elementId:t.id}}componentDidMount(){let t=OC(this.props.scriptLocation),n=RC(t);if(this._hcaptcha=n.window.hcaptcha||void 0,typeof this._hcaptcha<"u"){this.setState({isApiReady:!0},()=>{this.renderCaptcha()});return}this.loadCaptcha()}componentWillUnmount(){let t=this._hcaptcha,n=this.captchaId;if(this._cancelPendingExecute("react-component-unmounted"),!!this.isReady())try{t.reset(n),t.remove(n)}catch{}finally{this.captchaId="",this._onReady=null}}shouldComponentUpdate(t,n){return!(this.state.isApiReady!==n.isApiReady||this.state.isRemoved!==n.isRemoved)}componentDidUpdate(t){["sitekey","size","theme","tabindex","languageOverride","endpoint"].every(n=>t[n]===this.props[n])||this.removeCaptcha(()=>{this.renderCaptcha()})}loadCaptcha(){if(this.apiScriptRequested)return;let{apihost:t,assethost:n,endpoint:r,host:i,imghost:s,languageOverride:l,reCaptchaCompat:c,reportapi:d,sentry:f,custom:m,loadAsync:p,scriptLocation:g,scriptSource:v,secureApi:y,cleanup:b=!0,userJourneys:x}=this.props;cX({render:"explicit",apihost:t,assethost:n,endpoint:r,hl:l,host:i,imghost:s,recaptchacompat:c===!1?"off":null,reportapi:d,sentry:f,custom:m,loadAsync:p,scriptLocation:g,scriptSource:v,secureApi:y,cleanup:b,uj:x!==void 0?x:!1}).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}renderCaptcha(t){let{onReady:n}=this.props,{isApiReady:r}=this.state,i=this.captchaId;if(!r||i)return;let s=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),l=this._hcaptcha.render(this.ref.current,s);this.captchaId=l,this.setState({isRemoved:!1},()=>{t&&t(),n&&n(),this._onReady&&this._onReady(l)})}resetCaptcha(){let t=this._hcaptcha,n=this.captchaId;this.isReady()&&(t.reset(n),this._cancelPendingExecute("hcaptcha-reset"))}removeCaptcha(t){let n=this._hcaptcha,r=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},()=>{this.captchaId="",n.remove(r),t&&t()})}handleOnLoad(){this.setState({isApiReady:!0},()=>{let t=OC(this.props.scriptLocation),n=RC(t);this._hcaptcha=n.window.hcaptcha,this.renderCaptcha(()=>{let{onLoad:r}=this.props;r&&r()})})}handleSubmit(t){let{onVerify:n}=this.props,{isRemoved:r}=this.state,i=this._hcaptcha,s=this.captchaId;if(typeof i>"u"||r)return;let l=i.getResponse(s),c=i.getRespKey(s);n&&n(l,c)}handleExpire(){let{onExpire:t}=this.props,n=this._hcaptcha,r=this.captchaId;this.isReady()&&(n.reset(r),t&&t())}handleError(t){let{onError:n}=this.props,r=this._hcaptcha,i=this.captchaId;this.isReady()&&r.reset(i),n&&n(t)}isReady(){let{isApiReady:t,isRemoved:n}=this.state;return t&&!n}_cancelPendingExecute(t){if(!this._pendingExecute)return;let n=this._pendingExecute;this._pendingExecute=null;let r=new Error(t);n.reject(r)}handleOpen(){!this.isReady()||!this.props.onOpen||this.props.onOpen()}handleClose(){!this.isReady()||!this.props.onClose||this.props.onClose()}handleChallengeExpired(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()}execute(t=null){t=typeof t=="object"?t:null;try{let n=this._hcaptcha,r=this.captchaId;if(t&&t.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return t&&t.async?new Promise((s,l)=>{this._pendingExecute={resolve:s,reject:l},this._onReady=c=>{if(this._pendingExecute)try{let d=n.execute(c,t);d&&typeof d.then=="function"?d.then(f=>{this._pendingExecute=null,s(f)}).catch(f=>{this._pendingExecute=null,l(f)}):(this._pendingExecute=null,l(new Error("hcaptcha-execute-no-promise")))}catch(d){this._pendingExecute=null,l(d)}}}):(this._onReady=s=>{n.execute(s,t)},null);let i=n.execute(r,t);return t&&t.async&&i&&typeof i.then=="function"?new Promise((s,l)=>{this._pendingExecute={resolve:s,reject:l},i.then(c=>{this._pendingExecute=null,s(c)}).catch(c=>{this._pendingExecute=null,l(c)})}):i}catch(n){return t&&t.async?Promise.reject(n):null}}close(){let t=this._hcaptcha,n=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return t.close(n)}setData(t){let n=this._hcaptcha,r=this.captchaId;this.isReady()&&(t&&typeof t!="object"&&(t=null),n.setData(r,t))}getResponse(){return this._hcaptcha.getResponse(this.captchaId)}getRespKey(){return this._hcaptcha.getRespKey(this.captchaId)}render(){let{elementId:t}=this.state;return I.createElement("div",{ref:this.ref,id:t})}};I.createContext();var dX=uX,fX=I.forwardRef(({as:e="div",...t},n)=>T.jsx(e,{...t,ref:n}));const hX="https://challenges.cloudflare.com/turnstile/v0/api.js",pX="cf-turnstile-script",zk="onloadTurnstileCallback",Fk=e=>!!document.getElementById(e),mX=({render:e="explicit",onLoadCallbackName:t=zk,scriptOptions:{nonce:n="",defer:r=!0,async:i=!0,id:s="",appendTo:l,onError:c,crossOrigin:d=""}={}})=>{let f=s||"cf-turnstile-script";if(Fk(f))return;let m=document.createElement("script");m.id=f,m.src=`${hX}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${m.src}"]`)&&(m.defer=!!r,m.async=!!i,n&&(m.nonce=n),d&&(m.crossOrigin=d),c&&(m.onerror=c,delete window[t]),(l==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},Da={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function gX(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function vX(e=pX){let[t,n]=I.useState(!1);return I.useEffect(()=>{let r=()=>{Fk(e)&&n(!0)},i=new MutationObserver(r);return i.observe(document,{childList:!0,subtree:!0}),r(),()=>{i.disconnect()}},[e]),t}let Nd="unloaded",Bk;const _X=new Promise((e,t)=>{Bk={resolve:e,reject:t},Nd==="ready"&&e(void 0)}),TC=(e=zk)=>(Nd==="unloaded"&&(Nd="loading",window[e]=()=>{Bk.resolve(),Nd="ready",delete window[e]}),_X),Vk=I.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:i,onWidgetLoad:s,onSuccess:l,onExpire:c,onError:d,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g,onLoadScript:v,id:y,style:b,as:x="div",injectScript:S=!0,rerenderOnCallbackChange:E=!1,...R}=e,C=r.size,O=I.useCallback(()=>C===void 0?{}:r.execution==="execute"?Da.invisible:r.appearance==="interaction-only"?Da.interactionOnly:Da[C],[r.execution,C,r.appearance]),[A,M]=I.useState(O()),P=I.useRef(null),[L,H]=I.useState(!1),j=I.useRef(void 0),B=I.useRef(!1),U=y||"cf-turnstile",Z=I.useRef({onSuccess:l,onError:d,onExpire:c,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g});I.useEffect(()=>{E||(Z.current={onSuccess:l,onError:d,onExpire:c,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g})});let re=n?.id||"cf-turnstile-script",q=vX(re),W=n?.onLoadCallbackName||"onloadTurnstileCallback",ee=r.appearance||"always",ae=I.useMemo(()=>({sitekey:i,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:gX(C),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled??!0,callback:k=>{B.current=!0,E?l?.(k):Z.current.onSuccess?.(k)},"error-callback":E?d:(...k)=>Z.current.onError?.(...k),"expired-callback":E?c:(...k)=>Z.current.onExpire?.(...k),"before-interactive-callback":E?f:(...k)=>Z.current.onBeforeInteractive?.(...k),"after-interactive-callback":E?m:(...k)=>Z.current.onAfterInteractive?.(...k),"unsupported-callback":E?p:(...k)=>Z.current.onUnsupported?.(...k),"timeout-callback":E?g:(...k)=>Z.current.onTimeout?.(...k)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,i,C,E,E?l:null,E?d:null,E?c:null,E?f:null,E?m:null,E?p:null,E?g:null]),Q=I.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return I.useEffect(function(){S&&!L&&(TC(W),mX({onLoadCallbackName:W,scriptOptions:{...n,id:re}}))},[S,L,n,re,W]),I.useEffect(function(){Nd!=="ready"&&TC(W).then(()=>H(!0)).catch(console.error)},[W]),I.useEffect(function(){if(!P.current||!L)return;let k=!1;return(async()=>k||!P.current||(j.current=window.turnstile.render(P.current,ae),j.current&&s?.(j.current)))(),()=>{k=!0,j.current&&(window.turnstile.remove(j.current),B.current=!1)}},[U,L,ae]),I.useImperativeHandle(t,()=>{let{turnstile:k}=window;return{getResponse(){if(!k?.getResponse||!j.current||!Q()){console.warn("Turnstile has not been loaded");return}return k.getResponse(j.current)},async getResponsePromise(K=3e4,V=100){return new Promise((D,F)=>{let X,fe=async()=>{if(B.current&&window.turnstile&&j.current)try{let pe=window.turnstile.getResponse(j.current);return X&&clearTimeout(X),pe?D(pe):F(Error("No response received"))}catch(pe){return X&&clearTimeout(X),console.warn("Failed to get response",pe),F(Error("Failed to get response"))}X||=setTimeout(()=>{X&&clearTimeout(X),F(Error("Timeout"))},K),await new Promise(pe=>setTimeout(pe,V)),await fe()};fe()})},reset(){if(!k?.reset||!j.current||!Q()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&M(Da.invisible);try{B.current=!1,k.reset(j.current)}catch(K){console.warn(`Failed to reset Turnstile widget ${j.current}`,K)}},remove(){if(!k?.remove||!j.current||!Q()){console.warn("Turnstile has not been loaded");return}M(Da.invisible),B.current=!1,k.remove(j.current),j.current=null},render(){if(!k?.render||!P.current||!Q()||j.current){console.warn("Turnstile has not been loaded or container not found");return}let K=k.render(P.current,ae);return j.current=K,j.current&&s?.(j.current),r.execution!=="execute"&&M(C?Da[C]:{}),K},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!k?.execute||!P.current||!j.current||!Q()){console.warn("Turnstile has not been loaded or container not found");return}k.execute(P.current),M(C?Da[C]:{})},isExpired(){return!k?.isExpired||!j.current||!Q()?(console.warn("Turnstile has not been loaded"),!1):k.isExpired(j.current)}}},[j,r.execution,C,ae,P,Q,L,s]),I.useEffect(()=>{if(L||!q)return;if(window.turnstile){H(!0);return}let k=setInterval(()=>{window.turnstile&&(H(!0),clearInterval(k))},50);return()=>{clearInterval(k)}},[L,q]),I.useEffect(()=>{M(O())},[r.execution,C,ee]),I.useEffect(()=>{!q||typeof v!="function"||v()},[q]),T.jsx(fX,{ref:P,as:x,id:U,style:{...A,...b},...R})});Vk.displayName="Turnstile";var ly={exports:{}},cy,CC;function yX(){if(CC)return cy;CC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cy=e,cy}var uy,AC;function bX(){if(AC)return uy;AC=1;var e=yX();function t(){}function n(){}return n.resetWarningCache=t,uy=function(){function r(l,c,d,f,m,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},uy}var IC;function uS(){return IC||(IC=1,ly.exports=bX()()),ly.exports}var wX=uS();const Hr=la(wX);var SX=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qb.apply(this,arguments)}function EX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function op(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Hb(e,t)}function Hb(e,t){return Hb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hb(e,t)}var Yg=(function(e){xX(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(op(r)),r.handleErrored=r.handleErrored.bind(op(r)),r.handleChange=r.handleChange.bind(op(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(op(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(s,l){i.executionResolve=s,i.executionReject=l,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var s=document.createElement("div");this._widgetId=i(s,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(s)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var s=EX(i,SX);return I.createElement("div",qb({},s,{ref:this.handleRecaptchaRef}))},t})(I.Component);Yg.displayName="ReCAPTCHA";Yg.propTypes={sitekey:Hr.string.isRequired,onChange:Hr.func,grecaptcha:Hr.object,theme:Hr.oneOf(["dark","light"]),type:Hr.oneOf(["image","audio"]),tabindex:Hr.number,onExpired:Hr.func,onErrored:Hr.func,size:Hr.oneOf(["compact","normal","invisible"]),stoken:Hr.string,hl:Hr.string,badge:Hr.oneOf(["bottomright","bottomleft","inline"]),isolated:Hr.bool};Yg.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var dy={exports:{}},zt={};var MC;function RX(){if(MC)return zt;MC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function R(O){if(typeof O=="object"&&O!==null){var A=O.$$typeof;switch(A){case t:switch(O=O.type,O){case d:case f:case r:case s:case i:case p:return O;default:switch(O=O&&O.$$typeof,O){case c:case m:case y:case v:case l:return O;default:return A}}case n:return A}}}function C(O){return R(O)===f}return zt.AsyncMode=d,zt.ConcurrentMode=f,zt.ContextConsumer=c,zt.ContextProvider=l,zt.Element=t,zt.ForwardRef=m,zt.Fragment=r,zt.Lazy=y,zt.Memo=v,zt.Portal=n,zt.Profiler=s,zt.StrictMode=i,zt.Suspense=p,zt.isAsyncMode=function(O){return C(O)||R(O)===d},zt.isConcurrentMode=C,zt.isContextConsumer=function(O){return R(O)===c},zt.isContextProvider=function(O){return R(O)===l},zt.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},zt.isForwardRef=function(O){return R(O)===m},zt.isFragment=function(O){return R(O)===r},zt.isLazy=function(O){return R(O)===y},zt.isMemo=function(O){return R(O)===v},zt.isPortal=function(O){return R(O)===n},zt.isProfiler=function(O){return R(O)===s},zt.isStrictMode=function(O){return R(O)===i},zt.isSuspense=function(O){return R(O)===p},zt.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===r||O===f||O===s||O===i||O===p||O===g||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===v||O.$$typeof===l||O.$$typeof===c||O.$$typeof===m||O.$$typeof===x||O.$$typeof===S||O.$$typeof===E||O.$$typeof===b)},zt.typeOf=R,zt}var PC;function OX(){return PC||(PC=1,dy.exports=RX()),dy.exports}var fy,NC;function TX(){if(NC)return fy;NC=1;var e=OX(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=i;function l(y){return e.isMemo(y)?i:s[y.$$typeof]||t}var c=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function v(y,b,x){if(typeof b!="string"){if(g){var S=p(b);S&&S!==g&&v(y,S,x)}var E=d(b);f&&(E=E.concat(f(b)));for(var R=l(y),C=l(b),O=0;O<E.length;++O){var A=E[O];if(!n[A]&&!(x&&x[A])&&!(C&&C[A])&&!(R&&R[A])){var M=m(b,A);try{c(y,A,M)}catch{}}}}return y}return fy=v,fy}var CX=TX();const AX=la(CX);function Gb(){return Gb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gb.apply(this,arguments)}function IX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function MX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Ki={},PX=0;function NX(e,t){return t=t||{},function(r){var i=r.displayName||r.name||"Component",s=(function(c){MX(d,c);function d(m,p){var g;return g=c.call(this,m,p)||this,g.state={},g.__scriptURL="",g}var f=d.prototype;return f.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+PX++),this.__scriptLoaderID},f.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},f.asyncScriptLoaderHandleLoad=function(p){var g=this;this.setState(p,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},f.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Ki[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var g in p.observers)p.observers[g](p);delete window[t.callbackName]},f.componentDidMount=function(){var p=this,g=this.setupScriptURL(),v=this.asyncScriptLoaderGetScriptLoaderID(),y=t,b=y.globalName,x=y.callbackName,S=y.scriptId;if(b&&typeof window[b]<"u"&&(Ki[g]={loaded:!0,observers:{}}),Ki[g]){var E=Ki[g];if(E&&(E.loaded||E.errored)){this.asyncScriptLoaderHandleLoad(E);return}E.observers[v]=function(M){return p.asyncScriptLoaderHandleLoad(M)};return}var R={};R[v]=function(M){return p.asyncScriptLoaderHandleLoad(M)},Ki[g]={loaded:!1,observers:R};var C=document.createElement("script");C.src=g,C.async=!0;for(var O in t.attributes)C.setAttribute(O,t.attributes[O]);S&&(C.id=S);var A=function(P){if(Ki[g]){var L=Ki[g],H=L.observers;for(var j in H)P(H[j])&&delete H[j]}};x&&typeof window<"u"&&(window[x]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),C.onload=function(){var M=Ki[g];M&&(M.loaded=!0,A(function(P){return x?!1:(P(M),!0)}))},C.onerror=function(){var M=Ki[g];M&&(M.errored=!0,A(function(P){return P(M),!0}))},document.body.appendChild(C)},f.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),v=0;v<g.length;v+=1)g[v].src.indexOf(p)>-1&&g[v].parentNode&&g[v].parentNode.removeChild(g[v]);var y=Ki[p];y&&(delete y.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Ki[p])},f.render=function(){var p=t.globalName,g=this.props;g.asyncScriptOnLoad;var v=g.forwardedRef,y=IX(g,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(y[p]=typeof window[p]<"u"?window[p]:void 0),y.ref=v,I.createElement(r,y)},d})(I.Component),l=I.forwardRef(function(c,d){return I.createElement(s,Gb({},c,{forwardedRef:d}))});return l.displayName="AsyncScriptLoader("+i+")",l.propTypes={asyncScriptOnLoad:Hr.func},AX(l,r)}}var Kb="onloadcallback",kX="grecaptcha";function Zb(){return typeof window<"u"&&window.recaptchaOptions||{}}function DX(){var e=Zb(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Kb+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Kb+"&render=explicit"}const LX=NX(DX,{callbackName:Kb,globalName:kX,attributes:Zb().nonce?{nonce:Zb().nonce}:{}})(Yg);function $X(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 qk=ne.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}),mf=()=>{const e=ne.useContext(qk);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};$X(`[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(
|
|
@@ -126,14 +126,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
126
126
|
--nojs-bg: black !important;
|
|
127
127
|
--nojs-fg: white !important;
|
|
128
128
|
}
|
|
129
|
-
}`,oc={},vy,UC;function s5(){return UC||(UC=1,vy={L:1,M:0,Q:3,H:2}),vy}var _y,zC;function a5(){return zC||(zC=1,_y={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),_y}var yy,FC;function xJ(){if(FC)return yy;FC=1;var e=a5();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},yy=t,yy}var by,BC;function RJ(){if(BC)return by;BC=1;var e=s5();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var i=t.getRsBlockTable(n,r);if(i==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var s=i.length/3,l=new Array,c=0;c<s;c++)for(var d=i[c*3+0],f=i[c*3+1],m=i[c*3+2],p=0;p<d;p++)l.push(new t(f,m));return l},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},by=t,by}var wy,VC;function OJ(){if(VC)return wy;VC=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},wy=e,wy}var Sy,qC;function l5(){if(qC)return Sy;qC=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return Sy=e,Sy}var Ey,HC;function c5(){if(HC)return Ey;HC=1;var e=l5();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var i=0;i<n.length&&n[i]==0;)i++;this.num=new Array(n.length-i+r);for(var s=0;s<n.length-i;s++)this.num[s]=n[s+i]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),i=0;i<this.getLength();i++)for(var s=0;s<n.getLength();s++)r[i+s]^=e.gexp(e.glog(this.get(i))+e.glog(n.get(s)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),i=new Array(this.getLength()),s=0;s<this.getLength();s++)i[s]=this.get(s);for(var s=0;s<n.getLength();s++)i[s]^=e.gexp(e.glog(n.get(s))+r);return new t(i,0).mod(n)}},Ey=t,Ey}var xy,GC;function TJ(){if(GC)return xy;GC=1;var e=a5(),t=c5(),n=l5(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){for(var l=s<<10;i.getBCHDigit(l)-i.getBCHDigit(i.G15)>=0;)l^=i.G15<<i.getBCHDigit(l)-i.getBCHDigit(i.G15);return(s<<10|l)^i.G15_MASK},getBCHTypeNumber:function(s){for(var l=s<<12;i.getBCHDigit(l)-i.getBCHDigit(i.G18)>=0;)l^=i.G18<<i.getBCHDigit(l)-i.getBCHDigit(i.G18);return s<<12|l},getBCHDigit:function(s){for(var l=0;s!=0;)l++,s>>>=1;return l},getPatternPosition:function(s){return i.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,l,c){switch(s){case r.PATTERN000:return(l+c)%2==0;case r.PATTERN001:return l%2==0;case r.PATTERN010:return c%3==0;case r.PATTERN011:return(l+c)%3==0;case r.PATTERN100:return(Math.floor(l/2)+Math.floor(c/3))%2==0;case r.PATTERN101:return l*c%2+l*c%3==0;case r.PATTERN110:return(l*c%2+l*c%3)%2==0;case r.PATTERN111:return(l*c%3+(l+c)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){for(var l=new t([1],0),c=0;c<s;c++)l=l.multiply(new t([1,n.gexp(c)],0));return l},getLengthInBits:function(s,l){if(1<=l&&l<10)switch(s){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(l<27)switch(s){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(l<41)switch(s){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+l)},getLostPoint:function(s){for(var l=s.getModuleCount(),c=0,d=0;d<l;d++)for(var f=0;f<l;f++){for(var m=0,p=s.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||l<=d+g))for(var v=-1;v<=1;v++)f+v<0||l<=f+v||g==0&&v==0||p==s.isDark(d+g,f+v)&&m++;m>5&&(c+=3+m-5)}for(var d=0;d<l-1;d++)for(var f=0;f<l-1;f++){var y=0;s.isDark(d,f)&&y++,s.isDark(d+1,f)&&y++,s.isDark(d,f+1)&&y++,s.isDark(d+1,f+1)&&y++,(y==0||y==4)&&(c+=3)}for(var d=0;d<l;d++)for(var f=0;f<l-6;f++)s.isDark(d,f)&&!s.isDark(d,f+1)&&s.isDark(d,f+2)&&s.isDark(d,f+3)&&s.isDark(d,f+4)&&!s.isDark(d,f+5)&&s.isDark(d,f+6)&&(c+=40);for(var f=0;f<l;f++)for(var d=0;d<l-6;d++)s.isDark(d,f)&&!s.isDark(d+1,f)&&s.isDark(d+2,f)&&s.isDark(d+3,f)&&s.isDark(d+4,f)&&!s.isDark(d+5,f)&&s.isDark(d+6,f)&&(c+=40);for(var b=0,f=0;f<l;f++)for(var d=0;d<l;d++)s.isDark(d,f)&&b++;var x=Math.abs(100*b/l/l-50)/5;return c+=x*10,c}};return xy=i,xy}var Ry,KC;function CJ(){if(KC)return Ry;KC=1;var e=xJ(),t=RJ(),n=OJ(),r=TJ(),i=c5();function s(c,d){this.typeNumber=c,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var l=s.prototype;return l.addData=function(c){var d=new e(c);this.dataList.push(d),this.dataCache=null},l.isDark=function(c,d){if(c<0||this.moduleCount<=c||d<0||this.moduleCount<=d)throw new Error(c+","+d);return this.modules[c][d]},l.getModuleCount=function(){return this.moduleCount},l.make=function(){if(this.typeNumber<1){var c=1;for(c=1;c<40;c++){for(var d=t.getRSBlocks(c,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,c)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=c}this.makeImpl(!1,this.getBestMaskPattern())},l.makeImpl=function(c,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(c,d),this.typeNumber>=7&&this.setupTypeNumber(c),this.dataCache==null&&(this.dataCache=s.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},l.setupPositionProbePattern=function(c,d){for(var f=-1;f<=7;f++)if(!(c+f<=-1||this.moduleCount<=c+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[c+f][d+m]=!0:this.modules[c+f][d+m]=!1)},l.getBestMaskPattern=function(){for(var c=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||c>m)&&(c=m,d=f)}return d},l.createMovieClip=function(c,d,f){var m=c.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var v=g*p,y=0;y<this.modules[g].length;y++){var b=y*p,x=this.modules[g][y];x&&(m.beginFill(0,100),m.moveTo(b,v),m.lineTo(b+p,v),m.lineTo(b+p,v+p),m.lineTo(b,v+p),m.endFill())}return m},l.setupTimingPattern=function(){for(var c=8;c<this.moduleCount-8;c++)this.modules[c][6]==null&&(this.modules[c][6]=c%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},l.setupPositionAdjustPattern=function(){for(var c=r.getPatternPosition(this.typeNumber),d=0;d<c.length;d++)for(var f=0;f<c.length;f++){var m=c[d],p=c[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var v=-2;v<=2;v++)g==-2||g==2||v==-2||v==2||g==0&&v==0?this.modules[m+g][p+v]=!0:this.modules[m+g][p+v]=!1}},l.setupTypeNumber=function(c){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!c&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!c&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},l.setupTypeInfo=function(c,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!c&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!c&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!c},l.mapData=function(c,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var y=0;y<2;y++)if(this.modules[m][v-y]==null){var b=!1;g<c.length&&(b=(c[g]>>>p&1)==1);var x=r.getMask(d,m,v-y);x&&(b=!b),this.modules[m][v-y]=b,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},s.PAD0=236,s.PAD1=17,s.createData=function(c,d,f){for(var m=t.getRSBlocks(c,d),p=new n,g=0;g<f.length;g++){var v=f[g];p.put(v.mode,4),p.put(v.getLength(),r.getLengthInBits(v.mode,c)),v.write(p)}for(var y=0,g=0;g<m.length;g++)y+=m[g].dataCount;if(p.getLengthInBits()>y*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+y*8+")");for(p.getLengthInBits()+4<=y*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=y*8||(p.put(s.PAD0,8),p.getLengthInBits()>=y*8));)p.put(s.PAD1,8);return s.createBytes(p,m)},s.createBytes=function(c,d){for(var f=0,m=0,p=0,g=new Array(d.length),v=new Array(d.length),y=0;y<d.length;y++){var b=d[y].dataCount,x=d[y].totalCount-b;m=Math.max(m,b),p=Math.max(p,x),g[y]=new Array(b);for(var S=0;S<g[y].length;S++)g[y][S]=255&c.buffer[S+f];f+=b;var E=r.getErrorCorrectPolynomial(x),R=new i(g[y],E.getLength()-1),C=R.mod(E);v[y]=new Array(E.getLength()-1);for(var S=0;S<v[y].length;S++){var O=S+C.getLength()-v[y].length;v[y][S]=O>=0?C.get(O):0}}for(var A=0,S=0;S<d.length;S++)A+=d[S].totalCount;for(var M=new Array(A),P=0,S=0;S<m;S++)for(var y=0;y<d.length;y++)S<g[y].length&&(M[P++]=g[y][S]);for(var S=0;S<p;S++)for(var y=0;y<d.length;y++)S<v[y].length&&(M[P++]=v[y][S]);return M},Ry=s,Ry}var lp={},ZC;function AJ(){if(ZC)return lp;ZC=1,Object.defineProperty(lp,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=uS(),n=s(t),r=ca(),i=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function l(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var c={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,v=f.fgD,y=f.fgColor,b=f.size,x=f.title,S=f.viewBoxSize,E=f.xmlns,R=E===void 0?"http://www.w3.org/2000/svg":E,C=l(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return i.default.createElement("svg",e({},C,{height:b,ref:m,viewBox:"0 0 "+S+" "+S,width:b,xmlns:R}),x?i.default.createElement("title",null,x):null,i.default.createElement("path",{d:g,fill:p}),i.default.createElement("path",{d:v,fill:y}))});return d.displayName="QRCodeSvg",d.propTypes=c,lp.default=d,lp}var YC;function IJ(){if(YC)return oc;YC=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.QRCode=void 0;var e=Object.assign||function(b){for(var x=1;x<arguments.length;x++){var S=arguments[x];for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(b[E]=S[E])}return b},t=uS(),n=p(t),r=s5(),i=p(r),s=CJ(),l=p(s),c=ca(),d=p(c),f=AJ(),m=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function g(b,x){var S={};for(var E in b)x.indexOf(E)>=0||Object.prototype.hasOwnProperty.call(b,E)&&(S[E]=b[E]);return S}var v={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},y=(0,c.forwardRef)(function(b,x){var S=b.bgColor,E=S===void 0?"#FFFFFF":S,R=b.fgColor,C=R===void 0?"#000000":R,O=b.level,A=O===void 0?"L":O,M=b.size,P=M===void 0?256:M,L=b.value,H=g(b,["bgColor","fgColor","level","size","value"]),j=new l.default(-1,i.default[A]);j.addData(L),j.make();var B=j.modules;return d.default.createElement(m.default,e({},H,{bgColor:E,bgD:B.map(function(U,Z){return U.map(function(re,q){return re?"":"M "+q+" "+Z+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:C,fgD:B.map(function(U,Z){return U.map(function(re,q){return re?"M "+q+" "+Z+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:x,size:P,viewBoxSize:B.length}))});return oc.QRCode=y,y.displayName="QRCode",y.propTypes=v,oc.default=y,oc}var MJ=IJ();const PJ=la(MJ);var NJ="Separator",WC="horizontal",kJ=["horizontal","vertical"],u5=I.forwardRef((e,t)=>{const{decorative:n,orientation:r=WC,...i}=e,s=DJ(r)?r:WC,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return T.jsx(pf.div,{"data-orientation":s,...c,...i,ref:t})});u5.displayName=NJ;function DJ(e){return kJ.includes(e)}var LJ=u5;function $J(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:i,viewPaths:s,replace:l}=I.useContext(ht),{data:c,isPending:d,error:f,refetch:m}=r(),p=c;return I.useEffect(()=>{if(!n||d||p)return;const v=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;l(`${i}/${s[t]}?redirectTo=${encodeURIComponent(v)}`)},[d,p,i,s,l,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function Wd({className:e,...t}){return T.jsx("div",{"data-slot":"card",className:Re("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function fS({className:e,...t}){return T.jsx("div",{"data-slot":"card-header",className:Re("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function d5({className:e,...t}){return T.jsx("div",{"data-slot":"card-title",className:Re("leading-none font-semibold",e),...t})}function f5({className:e,...t}){return T.jsx("div",{"data-slot":"card-description",className:Re("text-muted-foreground text-sm",e),...t})}function hS({className:e,...t}){return T.jsx("div",{"data-slot":"card-content",className:Re("px-6",e),...t})}function QC({className:e,...t}){return T.jsx("div",{"data-slot":"card-footer",className:Re("flex items-center px-6 [.border-t]:pt-6",e),...t})}function is({className:e,...t}){return T.jsx("div",{"data-slot":"skeleton",className:Re("bg-accent animate-pulse rounded-md",e),...t})}var jJ=y3("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function tn({className:e,variant:t,size:n,asChild:r=!1,...i}){const s=r?$w:"button";return T.jsx(s,{"data-slot":"button",className:Re(jJ({variant:t,size:n,className:e})),...i})}async function UJ(e,t,n,r){const i=await zJ(e),s=document.createElement("canvas");s.width=s.height=n;const l=s.getContext("2d"),c=Math.min(i.width,i.height),d=(i.width-c)/2,f=(i.height-c)/2,m=c,p=c;l?.drawImage(i,d,f,m,p,0,0,n,n);const g=await new Promise(v=>s.toBlob(v,`image/${r}`));return new File([g],`${t}.${r}`,{type:`image/${r}`})}async function zJ(e){return new Promise((t,n)=>{const r=new Image,i=new FileReader;i.onload=s=>{var l;r.src=(l=s.target)==null?void 0:l.result},r.onload=()=>t(r),r.onerror=s=>n(s),i.readAsDataURL(e)})}async function FJ(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function BJ({...e}){return T.jsx(BW,{"data-slot":"dropdown-menu",...e})}function VJ({...e}){return T.jsx(VW,{"data-slot":"dropdown-menu-trigger",...e})}function qJ({className:e,sideOffset:t=4,...n}){return T.jsx(qW,{children:T.jsx(HW,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Re("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function XC({className:e,inset:t,variant:n="default",...r}){return T.jsx(GW,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Re("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function h5({className:e,...t}){return T.jsx(YW,{"data-slot":"label",className:Re("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Ao=rG,p5=I.createContext({}),Tn=({...e})=>T.jsx(p5.Provider,{value:{name:e.name},children:T.jsx(tG,{...e})}),pS=()=>{const e=I.useContext(p5),t=I.useContext(m5),{getFieldState:n}=nG(),r=u3({name:e.name}),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},m5=I.createContext({});function Cn({className:e,...t}){const n=I.useId();return T.jsx(m5.Provider,{value:{id:n},children:T.jsx("div",{"data-slot":"form-item",className:Re("grid gap-2",e),...t})})}function An({className:e,...t}){const{error:n,formItemId:r}=pS();return T.jsx(h5,{"data-slot":"form-label","data-error":!!n,className:Re("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Vn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=pS();return T.jsx($w,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function Kn({className:e,...t}){const{error:n,formMessageId:r}=pS(),i=n?String(n?.message??""):t.children;return i?T.jsx("p",{"data-slot":"form-message",id:r,className:Re("text-destructive text-sm",e),...t,children:i}):null}function Ji({className:e,type:t,...n}){return T.jsx("input",{type:t,"data-slot":"input",className:Re("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function g5({className:e,...t}){return T.jsx(iQ,{"data-slot":"avatar",className:Re("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function v5({className:e,...t}){return T.jsx(oQ,{"data-slot":"avatar-image",className:Re("aspect-square size-full",e),...t})}function _5({className:e,...t}){return T.jsx(sQ,{"data-slot":"avatar-fallback",className:Re("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function HJ({className:e,classNames:t,isPending:n,size:r,organization:i,localization:s,...l}){const{localization:c,avatar:d}=I.useContext(ht),f=I.useMemo(()=>({...c,...s}),[c,s]),m=i?.name,p=i?.logo;return n?T.jsx(is,{className:Re("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):T.jsxs(g5,{className:Re("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...l,children:[d?.Image?T.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):T.jsx(v5,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),T.jsx(_5,{className:Re("text-foreground",t?.fallback),delayMs:p?600:void 0,children:T.jsx(BH,{className:Re("size-[50%]",t?.fallbackIcon)})})]})}function y5({className:e,classNames:t,isPending:n,size:r,organization:i,localization:s}){const{localization:l}=I.useContext(ht),c={...l,...s};return T.jsxs("div",{className:Re("flex items-center gap-2 truncate",e,t?.base),children:[T.jsx(HJ,{className:Re(r!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:c,organization:i,size:r}),T.jsx("div",{className:Re("flex flex-col truncate text-left leading-tight",t?.content),children:n?T.jsxs(T.Fragment,{children:[T.jsx(is,{className:Re("max-w-full",r==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),r!=="sm"&&T.jsx(is,{className:Re("mt-1.5 max-w-full",r==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):T.jsxs(T.Fragment,{children:[T.jsx("span",{className:Re("truncate font-semibold",r==="lg"?"text-base":"text-sm",t?.title),children:i?.name||c?.ORGANIZATION}),r!=="sm"&&i?.slug&&T.jsx("span",{className:Re("truncate opacity-70",r==="lg"?"text-sm":"text-xs",t?.subtitle),children:i.slug})]})})]})}function GJ(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),i=new TextEncoder().encode(n),s=dQ(bQ(i)),l=t?.jpg?".jpg":"";let c=`https://gravatar.com/avatar/${s}${l}`;const d=new URLSearchParams;t?.size&&d.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&d.append("d",t.d),t?.forceDefault&&d.append("f","y");const f=d.toString();return f&&(c+=`?${f}`),c}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function KJ({className:e,classNames:t,isPending:n,size:r,user:i,localization:s,...l}){const{localization:c,gravatar:d,avatar:f}=I.useContext(ht),m={...c,...s},p=i?.displayName||i?.name||i?.fullName||i?.firstName||i?.displayUsername||i?.username||i?.email,g=i?.image||i?.avatar||i?.avatarUrl,v=d&&i?.email?GJ(i.email,d===!0?void 0:d):null,y=d?v:g;return n?T.jsx(is,{className:Re("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):T.jsxs(g5,{className:Re("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...l,children:[f?.Image?T.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:y||""}):T.jsx(v5,{alt:p||m?.USER,className:t?.image,src:y||void 0}),T.jsx(_5,{className:Re("text-foreground uppercase",t?.fallback),delayMs:y?600:void 0,children:ZJ(p)||T.jsx(WH,{className:Re("size-[50%]",t?.fallbackIcon)})})]})}var ZJ=e=>e?.slice(0,2);function mS({className:e,...t}){return T.jsx(Rk,{"data-slot":"checkbox",className:Re("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:T.jsx(Tk,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:T.jsx(n3,{className:"size-3.5"})})})}function YJ({className:e,...t}){return T.jsx("textarea",{"data-slot":"textarea",className:Re("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var WJ=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),QJ=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),XJ=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),JJ=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),T.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),eee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),tee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),T.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),T.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),T.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),T.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),T.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),T.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),nee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),T.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),T.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),T.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),ree=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),iee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),oee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),see=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),T.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),aee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),T.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),T.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),T.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),lee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),cee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),T.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),uee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),dee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),fee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),hee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),T.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),T.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),pee=({className:e})=>T.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[T.jsx("style",{type:"text/css",children:`
|
|
129
|
+
}`,oc={},vy,UC;function s5(){return UC||(UC=1,vy={L:1,M:0,Q:3,H:2}),vy}var _y,zC;function a5(){return zC||(zC=1,_y={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),_y}var yy,FC;function xJ(){if(FC)return yy;FC=1;var e=a5();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},yy=t,yy}var by,BC;function RJ(){if(BC)return by;BC=1;var e=s5();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var i=t.getRsBlockTable(n,r);if(i==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var s=i.length/3,l=new Array,c=0;c<s;c++)for(var d=i[c*3+0],f=i[c*3+1],m=i[c*3+2],p=0;p<d;p++)l.push(new t(f,m));return l},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},by=t,by}var wy,VC;function OJ(){if(VC)return wy;VC=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},wy=e,wy}var Sy,qC;function l5(){if(qC)return Sy;qC=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return Sy=e,Sy}var Ey,HC;function c5(){if(HC)return Ey;HC=1;var e=l5();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var i=0;i<n.length&&n[i]==0;)i++;this.num=new Array(n.length-i+r);for(var s=0;s<n.length-i;s++)this.num[s]=n[s+i]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),i=0;i<this.getLength();i++)for(var s=0;s<n.getLength();s++)r[i+s]^=e.gexp(e.glog(this.get(i))+e.glog(n.get(s)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),i=new Array(this.getLength()),s=0;s<this.getLength();s++)i[s]=this.get(s);for(var s=0;s<n.getLength();s++)i[s]^=e.gexp(e.glog(n.get(s))+r);return new t(i,0).mod(n)}},Ey=t,Ey}var xy,GC;function TJ(){if(GC)return xy;GC=1;var e=a5(),t=c5(),n=l5(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){for(var l=s<<10;i.getBCHDigit(l)-i.getBCHDigit(i.G15)>=0;)l^=i.G15<<i.getBCHDigit(l)-i.getBCHDigit(i.G15);return(s<<10|l)^i.G15_MASK},getBCHTypeNumber:function(s){for(var l=s<<12;i.getBCHDigit(l)-i.getBCHDigit(i.G18)>=0;)l^=i.G18<<i.getBCHDigit(l)-i.getBCHDigit(i.G18);return s<<12|l},getBCHDigit:function(s){for(var l=0;s!=0;)l++,s>>>=1;return l},getPatternPosition:function(s){return i.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,l,c){switch(s){case r.PATTERN000:return(l+c)%2==0;case r.PATTERN001:return l%2==0;case r.PATTERN010:return c%3==0;case r.PATTERN011:return(l+c)%3==0;case r.PATTERN100:return(Math.floor(l/2)+Math.floor(c/3))%2==0;case r.PATTERN101:return l*c%2+l*c%3==0;case r.PATTERN110:return(l*c%2+l*c%3)%2==0;case r.PATTERN111:return(l*c%3+(l+c)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){for(var l=new t([1],0),c=0;c<s;c++)l=l.multiply(new t([1,n.gexp(c)],0));return l},getLengthInBits:function(s,l){if(1<=l&&l<10)switch(s){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(l<27)switch(s){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(l<41)switch(s){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+l)},getLostPoint:function(s){for(var l=s.getModuleCount(),c=0,d=0;d<l;d++)for(var f=0;f<l;f++){for(var m=0,p=s.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||l<=d+g))for(var v=-1;v<=1;v++)f+v<0||l<=f+v||g==0&&v==0||p==s.isDark(d+g,f+v)&&m++;m>5&&(c+=3+m-5)}for(var d=0;d<l-1;d++)for(var f=0;f<l-1;f++){var y=0;s.isDark(d,f)&&y++,s.isDark(d+1,f)&&y++,s.isDark(d,f+1)&&y++,s.isDark(d+1,f+1)&&y++,(y==0||y==4)&&(c+=3)}for(var d=0;d<l;d++)for(var f=0;f<l-6;f++)s.isDark(d,f)&&!s.isDark(d,f+1)&&s.isDark(d,f+2)&&s.isDark(d,f+3)&&s.isDark(d,f+4)&&!s.isDark(d,f+5)&&s.isDark(d,f+6)&&(c+=40);for(var f=0;f<l;f++)for(var d=0;d<l-6;d++)s.isDark(d,f)&&!s.isDark(d+1,f)&&s.isDark(d+2,f)&&s.isDark(d+3,f)&&s.isDark(d+4,f)&&!s.isDark(d+5,f)&&s.isDark(d+6,f)&&(c+=40);for(var b=0,f=0;f<l;f++)for(var d=0;d<l;d++)s.isDark(d,f)&&b++;var x=Math.abs(100*b/l/l-50)/5;return c+=x*10,c}};return xy=i,xy}var Ry,KC;function CJ(){if(KC)return Ry;KC=1;var e=xJ(),t=RJ(),n=OJ(),r=TJ(),i=c5();function s(c,d){this.typeNumber=c,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var l=s.prototype;return l.addData=function(c){var d=new e(c);this.dataList.push(d),this.dataCache=null},l.isDark=function(c,d){if(c<0||this.moduleCount<=c||d<0||this.moduleCount<=d)throw new Error(c+","+d);return this.modules[c][d]},l.getModuleCount=function(){return this.moduleCount},l.make=function(){if(this.typeNumber<1){var c=1;for(c=1;c<40;c++){for(var d=t.getRSBlocks(c,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,c)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=c}this.makeImpl(!1,this.getBestMaskPattern())},l.makeImpl=function(c,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(c,d),this.typeNumber>=7&&this.setupTypeNumber(c),this.dataCache==null&&(this.dataCache=s.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},l.setupPositionProbePattern=function(c,d){for(var f=-1;f<=7;f++)if(!(c+f<=-1||this.moduleCount<=c+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[c+f][d+m]=!0:this.modules[c+f][d+m]=!1)},l.getBestMaskPattern=function(){for(var c=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||c>m)&&(c=m,d=f)}return d},l.createMovieClip=function(c,d,f){var m=c.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var v=g*p,y=0;y<this.modules[g].length;y++){var b=y*p,x=this.modules[g][y];x&&(m.beginFill(0,100),m.moveTo(b,v),m.lineTo(b+p,v),m.lineTo(b+p,v+p),m.lineTo(b,v+p),m.endFill())}return m},l.setupTimingPattern=function(){for(var c=8;c<this.moduleCount-8;c++)this.modules[c][6]==null&&(this.modules[c][6]=c%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},l.setupPositionAdjustPattern=function(){for(var c=r.getPatternPosition(this.typeNumber),d=0;d<c.length;d++)for(var f=0;f<c.length;f++){var m=c[d],p=c[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var v=-2;v<=2;v++)g==-2||g==2||v==-2||v==2||g==0&&v==0?this.modules[m+g][p+v]=!0:this.modules[m+g][p+v]=!1}},l.setupTypeNumber=function(c){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!c&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!c&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},l.setupTypeInfo=function(c,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!c&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!c&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!c},l.mapData=function(c,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var y=0;y<2;y++)if(this.modules[m][v-y]==null){var b=!1;g<c.length&&(b=(c[g]>>>p&1)==1);var x=r.getMask(d,m,v-y);x&&(b=!b),this.modules[m][v-y]=b,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},s.PAD0=236,s.PAD1=17,s.createData=function(c,d,f){for(var m=t.getRSBlocks(c,d),p=new n,g=0;g<f.length;g++){var v=f[g];p.put(v.mode,4),p.put(v.getLength(),r.getLengthInBits(v.mode,c)),v.write(p)}for(var y=0,g=0;g<m.length;g++)y+=m[g].dataCount;if(p.getLengthInBits()>y*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+y*8+")");for(p.getLengthInBits()+4<=y*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=y*8||(p.put(s.PAD0,8),p.getLengthInBits()>=y*8));)p.put(s.PAD1,8);return s.createBytes(p,m)},s.createBytes=function(c,d){for(var f=0,m=0,p=0,g=new Array(d.length),v=new Array(d.length),y=0;y<d.length;y++){var b=d[y].dataCount,x=d[y].totalCount-b;m=Math.max(m,b),p=Math.max(p,x),g[y]=new Array(b);for(var S=0;S<g[y].length;S++)g[y][S]=255&c.buffer[S+f];f+=b;var E=r.getErrorCorrectPolynomial(x),R=new i(g[y],E.getLength()-1),C=R.mod(E);v[y]=new Array(E.getLength()-1);for(var S=0;S<v[y].length;S++){var O=S+C.getLength()-v[y].length;v[y][S]=O>=0?C.get(O):0}}for(var A=0,S=0;S<d.length;S++)A+=d[S].totalCount;for(var M=new Array(A),P=0,S=0;S<m;S++)for(var y=0;y<d.length;y++)S<g[y].length&&(M[P++]=g[y][S]);for(var S=0;S<p;S++)for(var y=0;y<d.length;y++)S<v[y].length&&(M[P++]=v[y][S]);return M},Ry=s,Ry}var lp={},ZC;function AJ(){if(ZC)return lp;ZC=1,Object.defineProperty(lp,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=uS(),n=s(t),r=ca(),i=s(r);function s(f){return f&&f.__esModule?f:{default:f}}function l(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var c={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,v=f.fgD,y=f.fgColor,b=f.size,x=f.title,S=f.viewBoxSize,E=f.xmlns,R=E===void 0?"http://www.w3.org/2000/svg":E,C=l(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return i.default.createElement("svg",e({},C,{height:b,ref:m,viewBox:"0 0 "+S+" "+S,width:b,xmlns:R}),x?i.default.createElement("title",null,x):null,i.default.createElement("path",{d:g,fill:p}),i.default.createElement("path",{d:v,fill:y}))});return d.displayName="QRCodeSvg",d.propTypes=c,lp.default=d,lp}var YC;function IJ(){if(YC)return oc;YC=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.QRCode=void 0;var e=Object.assign||function(b){for(var x=1;x<arguments.length;x++){var S=arguments[x];for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(b[E]=S[E])}return b},t=uS(),n=p(t),r=s5(),i=p(r),s=CJ(),l=p(s),c=ca(),d=p(c),f=AJ(),m=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function g(b,x){var S={};for(var E in b)x.indexOf(E)>=0||Object.prototype.hasOwnProperty.call(b,E)&&(S[E]=b[E]);return S}var v={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},y=(0,c.forwardRef)(function(b,x){var S=b.bgColor,E=S===void 0?"#FFFFFF":S,R=b.fgColor,C=R===void 0?"#000000":R,O=b.level,A=O===void 0?"L":O,M=b.size,P=M===void 0?256:M,L=b.value,H=g(b,["bgColor","fgColor","level","size","value"]),j=new l.default(-1,i.default[A]);j.addData(L),j.make();var B=j.modules;return d.default.createElement(m.default,e({},H,{bgColor:E,bgD:B.map(function(U,Z){return U.map(function(re,q){return re?"":"M "+q+" "+Z+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:C,fgD:B.map(function(U,Z){return U.map(function(re,q){return re?"M "+q+" "+Z+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:x,size:P,viewBoxSize:B.length}))});return oc.QRCode=y,y.displayName="QRCode",y.propTypes=v,oc.default=y,oc}var MJ=IJ();const PJ=la(MJ);var NJ="Separator",WC="horizontal",kJ=["horizontal","vertical"],u5=I.forwardRef((e,t)=>{const{decorative:n,orientation:r=WC,...i}=e,s=DJ(r)?r:WC,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return T.jsx(pf.div,{"data-orientation":s,...c,...i,ref:t})});u5.displayName=NJ;function DJ(e){return kJ.includes(e)}var LJ=u5;function $J(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:i,viewPaths:s,replace:l}=I.useContext(ht),{data:c,isPending:d,error:f,refetch:m}=r(),p=c;return I.useEffect(()=>{if(!n||d||p)return;const v=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;l(`${i}/${s[t]}?redirectTo=${encodeURIComponent(v)}`)},[d,p,i,s,l,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function Wd({className:e,...t}){return T.jsx("div",{"data-slot":"card",className:Re("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function fS({className:e,...t}){return T.jsx("div",{"data-slot":"card-header",className:Re("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function d5({className:e,...t}){return T.jsx("div",{"data-slot":"card-title",className:Re("leading-none font-semibold",e),...t})}function f5({className:e,...t}){return T.jsx("div",{"data-slot":"card-description",className:Re("text-muted-foreground text-sm",e),...t})}function hS({className:e,...t}){return T.jsx("div",{"data-slot":"card-content",className:Re("px-6",e),...t})}function QC({className:e,...t}){return T.jsx("div",{"data-slot":"card-footer",className:Re("flex items-center px-6 [.border-t]:pt-6",e),...t})}function is({className:e,...t}){return T.jsx("div",{"data-slot":"skeleton",className:Re("bg-accent animate-pulse rounded-md",e),...t})}var jJ=y4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function tn({className:e,variant:t,size:n,asChild:r=!1,...i}){const s=r?$w:"button";return T.jsx(s,{"data-slot":"button",className:Re(jJ({variant:t,size:n,className:e})),...i})}async function UJ(e,t,n,r){const i=await zJ(e),s=document.createElement("canvas");s.width=s.height=n;const l=s.getContext("2d"),c=Math.min(i.width,i.height),d=(i.width-c)/2,f=(i.height-c)/2,m=c,p=c;l?.drawImage(i,d,f,m,p,0,0,n,n);const g=await new Promise(v=>s.toBlob(v,`image/${r}`));return new File([g],`${t}.${r}`,{type:`image/${r}`})}async function zJ(e){return new Promise((t,n)=>{const r=new Image,i=new FileReader;i.onload=s=>{var l;r.src=(l=s.target)==null?void 0:l.result},r.onload=()=>t(r),r.onerror=s=>n(s),i.readAsDataURL(e)})}async function FJ(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function BJ({...e}){return T.jsx(BW,{"data-slot":"dropdown-menu",...e})}function VJ({...e}){return T.jsx(VW,{"data-slot":"dropdown-menu-trigger",...e})}function qJ({className:e,sideOffset:t=4,...n}){return T.jsx(qW,{children:T.jsx(HW,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Re("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function XC({className:e,inset:t,variant:n="default",...r}){return T.jsx(GW,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Re("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function h5({className:e,...t}){return T.jsx(YW,{"data-slot":"label",className:Re("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Ao=rG,p5=I.createContext({}),Tn=({...e})=>T.jsx(p5.Provider,{value:{name:e.name},children:T.jsx(tG,{...e})}),pS=()=>{const e=I.useContext(p5),t=I.useContext(m5),{getFieldState:n}=nG(),r=u4({name:e.name}),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},m5=I.createContext({});function Cn({className:e,...t}){const n=I.useId();return T.jsx(m5.Provider,{value:{id:n},children:T.jsx("div",{"data-slot":"form-item",className:Re("grid gap-2",e),...t})})}function An({className:e,...t}){const{error:n,formItemId:r}=pS();return T.jsx(h5,{"data-slot":"form-label","data-error":!!n,className:Re("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Vn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=pS();return T.jsx($w,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function Kn({className:e,...t}){const{error:n,formMessageId:r}=pS(),i=n?String(n?.message??""):t.children;return i?T.jsx("p",{"data-slot":"form-message",id:r,className:Re("text-destructive text-sm",e),...t,children:i}):null}function Ji({className:e,type:t,...n}){return T.jsx("input",{type:t,"data-slot":"input",className:Re("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function g5({className:e,...t}){return T.jsx(iQ,{"data-slot":"avatar",className:Re("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function v5({className:e,...t}){return T.jsx(oQ,{"data-slot":"avatar-image",className:Re("aspect-square size-full",e),...t})}function _5({className:e,...t}){return T.jsx(sQ,{"data-slot":"avatar-fallback",className:Re("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function HJ({className:e,classNames:t,isPending:n,size:r,organization:i,localization:s,...l}){const{localization:c,avatar:d}=I.useContext(ht),f=I.useMemo(()=>({...c,...s}),[c,s]),m=i?.name,p=i?.logo;return n?T.jsx(is,{className:Re("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):T.jsxs(g5,{className:Re("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...l,children:[d?.Image?T.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):T.jsx(v5,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),T.jsx(_5,{className:Re("text-foreground",t?.fallback),delayMs:p?600:void 0,children:T.jsx(BH,{className:Re("size-[50%]",t?.fallbackIcon)})})]})}function y5({className:e,classNames:t,isPending:n,size:r,organization:i,localization:s}){const{localization:l}=I.useContext(ht),c={...l,...s};return T.jsxs("div",{className:Re("flex items-center gap-2 truncate",e,t?.base),children:[T.jsx(HJ,{className:Re(r!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:c,organization:i,size:r}),T.jsx("div",{className:Re("flex flex-col truncate text-left leading-tight",t?.content),children:n?T.jsxs(T.Fragment,{children:[T.jsx(is,{className:Re("max-w-full",r==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),r!=="sm"&&T.jsx(is,{className:Re("mt-1.5 max-w-full",r==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):T.jsxs(T.Fragment,{children:[T.jsx("span",{className:Re("truncate font-semibold",r==="lg"?"text-base":"text-sm",t?.title),children:i?.name||c?.ORGANIZATION}),r!=="sm"&&i?.slug&&T.jsx("span",{className:Re("truncate opacity-70",r==="lg"?"text-sm":"text-xs",t?.subtitle),children:i.slug})]})})]})}function GJ(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),i=new TextEncoder().encode(n),s=dQ(bQ(i)),l=t?.jpg?".jpg":"";let c=`https://gravatar.com/avatar/${s}${l}`;const d=new URLSearchParams;t?.size&&d.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&d.append("d",t.d),t?.forceDefault&&d.append("f","y");const f=d.toString();return f&&(c+=`?${f}`),c}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function KJ({className:e,classNames:t,isPending:n,size:r,user:i,localization:s,...l}){const{localization:c,gravatar:d,avatar:f}=I.useContext(ht),m={...c,...s},p=i?.displayName||i?.name||i?.fullName||i?.firstName||i?.displayUsername||i?.username||i?.email,g=i?.image||i?.avatar||i?.avatarUrl,v=d&&i?.email?GJ(i.email,d===!0?void 0:d):null,y=d?v:g;return n?T.jsx(is,{className:Re("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):T.jsxs(g5,{className:Re("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...l,children:[f?.Image?T.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:y||""}):T.jsx(v5,{alt:p||m?.USER,className:t?.image,src:y||void 0}),T.jsx(_5,{className:Re("text-foreground uppercase",t?.fallback),delayMs:y?600:void 0,children:ZJ(p)||T.jsx(WH,{className:Re("size-[50%]",t?.fallbackIcon)})})]})}var ZJ=e=>e?.slice(0,2);function mS({className:e,...t}){return T.jsx(Rk,{"data-slot":"checkbox",className:Re("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:T.jsx(Tk,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:T.jsx(n4,{className:"size-3.5"})})})}function YJ({className:e,...t}){return T.jsx("textarea",{"data-slot":"textarea",className:Re("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var WJ=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),QJ=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),XJ=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),JJ=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),T.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),eee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),tee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),T.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),T.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),T.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),T.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),T.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),T.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),nee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),T.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),T.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),T.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),ree=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),iee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),oee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),see=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),T.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),aee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),T.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),T.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),T.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),lee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),cee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),T.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),uee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),dee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:T.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),fee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),hee=({className:e})=>T.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),T.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),T.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),pee=({className:e})=>T.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[T.jsx("style",{type:"text/css",children:`
|
|
130
130
|
.st0{fill:#FFFFFF}
|
|
131
131
|
.st1{fill:#9146FF}
|
|
132
132
|
`}),T.jsx("title",{children:"Asset 2"}),T.jsxs("g",{children:[T.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),T.jsx("g",{children:T.jsxs("g",{children:[T.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),T.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),T.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),mee=({className:e})=>T.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:T.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),gee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),vee=({className:e})=>T.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),_ee=({className:e})=>T.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:T.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),yee=[{provider:"apple",name:"Apple",icon:WJ},{provider:"discord",name:"Discord",icon:QJ},{provider:"dropbox",name:"Dropbox",icon:XJ},{provider:"facebook",name:"Facebook",icon:JJ},{provider:"github",name:"GitHub",icon:eee},{provider:"gitlab",name:"GitLab",icon:tee},{provider:"google",name:"Google",icon:nee},{provider:"huggingface",name:"Hugging Face",icon:ree},{provider:"kick",name:"Kick",icon:iee},{provider:"linear",name:"Linear",icon:oee},{provider:"linkedin",name:"LinkedIn",icon:see},{provider:"microsoft",name:"Microsoft",icon:aee},{provider:"notion",name:"Notion",icon:lee},{provider:"reddit",name:"Reddit",icon:cee},{provider:"roblox",name:"Roblox",icon:uee},{provider:"slack",name:"Slack",icon:dee},{provider:"spotify",name:"Spotify",icon:fee},{provider:"tiktok",name:"TikTok",icon:hee},{provider:"twitch",name:"Twitch",icon:pee},{provider:"vercel",name:"Vercel",icon:mee},{provider:"vk",name:"VK",icon:gee},{provider:"twitter",name:"X",icon:vee},{provider:"zoom",name:"Zoom",icon:_ee}],bee=["/sign-up/email","/sign-in/email","/forget-password"],wee=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\/([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function gf({localization:e}){const{captcha:t,localization:n}=I.useContext(ht);e={...n,...e};const r=I.useRef(null),{executeRecaptcha:i}=XN(),s=async d=>{if(!t)throw new Error(e.MISSING_RESPONSE);let f;switch(t.provider){case"google-recaptcha-v3":{const m=wee(d);f=await i?.(m);break}case"google-recaptcha-v2-checkbox":{f=r.current.getValue();break}case"google-recaptcha-v2-invisible":{f=await r.current.executeAsync();break}case"cloudflare-turnstile":{f=r.current.getResponse();break}case"hcaptcha":{f=r.current.getResponse();break}case"captchafox":{f=r.current.getResponse();break}}if(!f)throw new Error(e.MISSING_RESPONSE);return f};return{captchaRef:r,getCaptchaHeaders:async d=>{if(!t)return;if((t.endpoints||bee).includes(d))return{"x-captcha-response":await s(d)}},resetCaptcha:()=>{var d,f,m,p,g,v,y,b;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(f=(d=r.current)==null?void 0:d.reset)==null||f.call(d);break}case"cloudflare-turnstile":{(p=(m=r.current)==null?void 0:m.reset)==null||p.call(m);break}case"hcaptcha":{(v=(g=r.current)==null?void 0:g.resetCaptcha)==null||v.call(g);break}case"captchafox":{(b=(y=r.current)==null?void 0:y.reset)==null||b.call(y);break}}}}}function See({className:e,localization:t}){const n=us(),{captcha:r,localization:i}=I.useContext(ht),s={...i,...t};return r?r.hideBadge?T.jsxs(T.Fragment,{children:[T.jsx("style",{children:`
|
|
133
133
|
.grecaptcha-badge { visibility: hidden; }
|
|
134
134
|
`}),T.jsxs("p",{className:Re("text-muted-foreground text-xs",e),children:[s.PROTECTED_BY_RECAPTCHA," ",s.BY_CONTINUING_YOU_AGREE," Google"," ",T.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:s.PRIVACY_POLICY})," ","&"," ",T.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:s.TERMS_OF_SERVICE}),"."]})]}):n?T.jsx("style",{children:`
|
|
135
135
|
.grecaptcha-badge { visibility: visible !important; }
|
|
136
|
-
`}):null:null}function Eee({ref:e}){const{captcha:t}=I.useContext(ht),{theme:n}=Ow(),{lang:r}=
|
|
136
|
+
`}):null:null}function Eee({ref:e}){const{captcha:t}=I.useContext(ht),{theme:n}=Ow(),{lang:r}=e4();return I.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?T.jsxs(T.Fragment,{children:[T.jsx("style",{children:`
|
|
137
137
|
.grecaptcha-badge {
|
|
138
138
|
border-radius: var(--radius) !important;
|
|
139
139
|
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
@@ -152,7 +152,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
152
152
|
pointer-events: none;
|
|
153
153
|
display: none;
|
|
154
154
|
}
|
|
155
|
-
`})]})]})}function Io({redirectTo:e}){const{redirectTo:t}=I.useContext(ht),[n,r]=I.useState(!1),{navigate:i,hooks:{useSession:s},onSessionChange:l}=I.useContext(ht),{refetch:c}=s();return{onSuccess:I.useCallback(async()=>{r(!0),await c?.(),l&&await l(),r(!1);const f=e||dl("redirectTo")||t;i(f)},[c,l,i,e,t]),isPending:n}}function b5({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=I.useContext(ht),r=t?.(),i=I.useRef(!1),{onSuccess:s}=Io({redirectTo:e});return I.useEffect(()=>{if(!i.current){if(!n){i.current=!0,s();return}r||(i.current=!0,s())}},[r,n,s]),T.jsx(Rr,{className:"animate-spin"})}function gS({className:e,containerClassName:t,...n}){return T.jsx(o5,{"data-slot":"input-otp",containerClassName:Re("flex items-center gap-2 has-disabled:opacity-50",t),className:Re("disabled:cursor-not-allowed",e),...n})}function sc({className:e,...t}){return T.jsx("div",{"data-slot":"input-otp-group",className:Re("flex items-center",e),...t})}function Jn({index:e,className:t,...n}){const r=I.useContext(i5),{char:i,hasFakeCaret:s,isActive:l}=r?.slots[e]??{};return T.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:Re("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[i,s&&T.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:T.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Oy({...e}){return T.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:T.jsx(KH,{})})}function vS({otpSeparators:e=0}){return e===0?T.jsxs(sc,{children:[T.jsx(Jn,{index:0}),T.jsx(Jn,{index:1}),T.jsx(Jn,{index:2}),T.jsx(Jn,{index:3}),T.jsx(Jn,{index:4}),T.jsx(Jn,{index:5})]}):e===1?T.jsxs(T.Fragment,{children:[T.jsxs(sc,{children:[T.jsx(Jn,{index:0}),T.jsx(Jn,{index:1}),T.jsx(Jn,{index:2})]}),T.jsx(Oy,{}),T.jsxs(sc,{children:[T.jsx(Jn,{index:3}),T.jsx(Jn,{index:4}),T.jsx(Jn,{index:5})]})]}):T.jsxs(T.Fragment,{children:[T.jsxs(sc,{children:[T.jsx(Jn,{index:0}),T.jsx(Jn,{index:1})]}),T.jsx(Oy,{}),T.jsxs(sc,{children:[T.jsx(Jn,{index:2}),T.jsx(Jn,{index:3})]}),T.jsx(Oy,{}),T.jsxs(sc,{children:[T.jsx(Jn,{index:4}),T.jsx(Jn,{index:5})]})]})}function JC(e){const[t,n]=I.useState();return t?T.jsx(Oee,{...e,email:t}):T.jsx(Ree,{...e,setEmail:n})}function Ree({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:i,setEmail:s}){const l=us(),{captchaRef:c,getCaptchaHeaders:d}=gf({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=I.useContext(ht);r={...m,...r};const v=Ee({email:z().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),y=Oo({resolver:To(v),defaultValues:{email:""}});n=n||y.formState.isSubmitting,I.useEffect(()=>{i?.(y.formState.isSubmitting)},[y.formState.isSubmitting,i]);async function b({email:x}){const S={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:x,type:"sign-in",fetchOptions:S}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),s(x)}catch(E){p({variant:"error",message:Mn({error:E,localization:r,localizeErrors:g})})}}return T.jsx(Ao,{...y,children:T.jsxs("form",{method:"POST",onSubmit:y.handleSubmit(b),noValidate:l,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:y.control,name:"email",render:({field:x})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...x})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(vf,{ref:c,localization:r,action:"/email-otp/send-verification-otp"}),T.jsx(tn,{type:"submit",disabled:n,className:Re("w-full",t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function Oee({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:i=0,redirectTo:s,setIsSubmitting:l,email:c}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=I.useContext(ht);r={...f,...r};const{onSuccess:g,isPending:v}=Io({redirectTo:s}),y=Ee({code:z().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),b=Oo({resolver:To(y),defaultValues:{code:""}});n=n||b.formState.isSubmitting||v,I.useEffect(()=>{l?.(b.formState.isSubmitting||v)},[b.formState.isSubmitting,v,l]);async function x({code:S}){try{await d.signIn.emailOtp({email:c,otp:S,fetchOptions:{throw:!0}}),await g()}catch(E){m({variant:"error",message:Mn({error:E,localization:r,localizeErrors:p})}),b.reset()}}return T.jsx(Ao,{...b,children:T.jsxs("form",{method:"POST",onSubmit:b.handleSubmit(x),className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:b.control,name:"code",render:({field:S})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.EMAIL_OTP}),T.jsx(Vn,{children:T.jsx(gS,{...S,maxLength:6,onChange:E=>{S.onChange(E),E.length===6&&b.handleSubmit(x)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:T.jsx(vS,{otpSeparators:i})})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx("div",{className:"grid gap-4",children:T.jsxs(tn,{type:"submit",disabled:n,className:Re(t?.button,t?.primaryButton),children:[n&&T.jsx(Rr,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function Tee({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:i,callbackURL:s,isSubmitting:l,redirectTo:c,setIsSubmitting:d}){const[f,m]=I.useState(!0),[p,g]=I.useState(30),{authClient:v,localization:y,toast:b,localizeErrors:x,navigate:S,basePath:E,viewPaths:R}=I.useContext(ht);t={...y,...t};const C=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:O,isPending:A}=Io({redirectTo:c}),M=Ee({code:z().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),P=Oo({resolver:To(M),defaultValues:{code:""}}),L=l||P.formState.isSubmitting||A;I.useEffect(()=>{d?.(P.formState.isSubmitting||A)},[P.formState.isSubmitting,A,d]),I.useEffect(()=>{if(p>0){const B=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(B)}else m(!1)},[p]);async function H({code:B}){try{const U=await v.emailOtp.verifyEmail({email:C,otp:B,fetchOptions:{throw:!0}});"token"in U&&U.token?await O():(S(`${E}/${R.SIGN_IN}${window.location.search}`),b({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){b({variant:"error",message:Mn({error:U,localization:t,localizeErrors:x})}),P.reset()}}async function j(){if(!f){m(!0),g(30);try{await v.emailOtp.sendVerificationOtp({email:C,type:"email-verification",fetchOptions:{throw:!0}}),b({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(B){b({variant:"error",message:Mn({error:B,localization:t,localizeErrors:x})}),m(!1),g(0)}}}return C?T.jsx(Ao,{...P,children:T.jsxs("form",{method:"POST",onSubmit:P.handleSubmit(H),className:Re("grid w-full gap-6",n,r?.base),children:[T.jsx(Tn,{control:P.control,name:"code",render:({field:B})=>T.jsxs(Cn,{children:[T.jsx(An,{className:r?.label,children:t.EMAIL_OTP}),T.jsx(Vn,{children:T.jsx(gS,{...B,maxLength:6,onChange:U=>{B.onChange(U),U.length===6&&P.handleSubmit(H)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:L,children:T.jsx(vS,{otpSeparators:i})})}),T.jsx(Kn,{className:r?.error})]})}),T.jsxs("div",{className:"grid gap-4",children:[T.jsxs(tn,{type:"submit",disabled:L,className:Re(r?.button,r?.primaryButton),children:[L&&T.jsx(Rr,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),T.jsx(tn,{type:"button",variant:"outline",onClick:j,disabled:f||L,className:Re("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&T.jsx(tn,{type:"button",variant:"ghost",onClick:e,disabled:L,className:"w-full",children:t.CANCEL})]})]})}):T.jsx("div",{className:Re("grid w-full gap-6",n),children:T.jsxs("div",{className:"text-center",children:[T.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),T.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function Cee({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:i}){const s=us(),{captchaRef:l,getCaptchaHeaders:c,resetCaptcha:d}=gf({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:v,toast:y,viewPaths:b,localizeErrors:x}=I.useContext(ht);r={...g,...r};const S=Ee({email:z().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=Oo({resolver:To(S),defaultValues:{email:""}});n=n||E.formState.isSubmitting,I.useEffect(()=>{i?.(E.formState.isSubmitting)},[E.formState.isSubmitting,i]);async function R({email:C}){try{const O={throw:!0,headers:await c("/forget-password")};await f.requestPasswordReset({email:C,redirectTo:`${p}${m}/${b.RESET_PASSWORD}`,fetchOptions:O}),y({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),v(`${m}/${b.SIGN_IN}${window.location.search}`)}catch(O){y({variant:"error",message:Mn({error:O,localization:r,localizeErrors:x})}),d()}}return T.jsx(Ao,{...E,children:T.jsxs("form",{method:"POST",onSubmit:E.handleSubmit(R),noValidate:s,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:E.control,name:"email",render:({field:C})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...C})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(vf,{ref:l,localization:r,action:"/forget-password"}),T.jsx(tn,{type:"submit",disabled:n,className:Re("w-full",t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function eA({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,redirectTo:s,setIsSubmitting:l}){const c=us(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=gf({localization:i}),{authClient:p,basePath:g,baseURL:v,persistClient:y,localization:b,redirectTo:x,viewPaths:S,toast:E,localizeErrors:R}=I.useContext(ht);i={...b,...i};const C=I.useCallback(()=>s||dl("redirectTo")||x,[s,x]),O=I.useCallback(()=>`${v}${n||(y?`${g}/${S.CALLBACK}?redirectTo=${encodeURIComponent(C())}`:C())}`,[n,y,g,S,v,C]),A=Ee({email:z().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),M=Oo({resolver:To(A),defaultValues:{email:""}});r=r||M.formState.isSubmitting,I.useEffect(()=>{l?.(M.formState.isSubmitting)},[M.formState.isSubmitting,l]);async function P({email:L}){try{const H={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:L,callbackURL:O(),fetchOptions:H}),E({variant:"success",message:i.MAGIC_LINK_EMAIL}),M.reset()}catch(H){E({variant:"error",message:Mn({error:H,localization:i,localizeErrors:R})}),m()}}return T.jsx(Ao,{...M,children:T.jsxs("form",{method:"POST",onSubmit:M.handleSubmit(P),noValidate:c,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:M.control,name:"email",render:({field:L})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:r,...L})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(vf,{ref:d,localization:i,action:"/sign-in/magic-link"}),T.jsx(tn,{type:"submit",disabled:r,className:Re("w-full",t?.button,t?.primaryButton),children:r?T.jsx(Rr,{className:"animate-spin"}):i.MAGIC_LINK_ACTION})]})})}function Aee({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:i,setIsSubmitting:s}){const{authClient:l,localization:c,toast:d,localizeErrors:f}=I.useContext(ht);r={...c,...r};const{onSuccess:m,isPending:p}=Io({redirectTo:i}),g=Ee({code:z().min(1,{message:r.BACKUP_CODE_REQUIRED})}),v=Oo({resolver:To(g),defaultValues:{code:""}});n=n||v.formState.isSubmitting||p,I.useEffect(()=>{s?.(v.formState.isSubmitting||p)},[v.formState.isSubmitting,p,s]);async function y({code:b}){try{await l.twoFactor.verifyBackupCode({code:b,fetchOptions:{throw:!0}}),await m()}catch(x){d({variant:"error",message:Mn({error:x,localization:r,localizeErrors:f})}),v.reset()}}return T.jsx(Ao,{...v,children:T.jsxs("form",{method:"POST",onSubmit:v.handleSubmit(y),className:Re("grid gap-6",e,t?.base),children:[T.jsx(Tn,{control:v.control,name:"code",render:({field:b})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.BACKUP_CODE}),T.jsx(Vn,{children:T.jsx(Ji,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...b})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(tn,{type:"submit",disabled:n,className:Re(t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function Iee({className:e,classNames:t,localization:n,passwordValidation:r}){const i=I.useRef(!1),{authClient:s,basePath:l,credentials:c,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=I.useContext(ht),v=c?.confirmPassword,y=c?.passwordValidation;n={...d,...n},r={...y,...r};const b=Ee({newPassword:qd(r,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:v?qd(r,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):z().optional()}).refine(R=>!v||R.newPassword===R.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),x=Oo({resolver:To(b),defaultValues:{newPassword:"",confirmPassword:""}}),S=x.formState.isSubmitting;I.useEffect(()=>{if(i.current)return;i.current=!0;const C=new URLSearchParams(window.location.search).get("token");(!C||C==="INVALID_TOKEN")&&(m(`${l}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[l,m,p,f,n]);async function E({newPassword:R}){try{const O=new URLSearchParams(window.location.search).get("token");await s.resetPassword({newPassword:R,token:O,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${l}/${f.SIGN_IN}${window.location.search}`)}catch(C){p({variant:"error",message:Mn({error:C,localization:n,localizeErrors:g})}),x.reset()}}return T.jsx(Ao,{...x,children:T.jsxs("form",{method:"POST",onSubmit:x.handleSubmit(E),className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:x.control,name:"newPassword",render:({field:R})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:n.NEW_PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:S,...R})}),T.jsx(Kn,{className:t?.error})]})}),v&&T.jsx(Tn,{control:x.control,name:"confirmPassword",render:({field:R})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:n.CONFIRM_PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:S,...R})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(tn,{type:"submit",disabled:S,className:Re("w-full",t?.button,t?.primaryButton),children:S?T.jsx(Rr,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function Mee({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:i,setIsSubmitting:s,passwordValidation:l,callbackURL:c}){const d=us(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=gf({localization:r}),{authClient:g,basePath:v,credentials:y,localization:b,viewPaths:x,navigate:S,toast:E,Link:R,localizeErrors:C,emailVerification:O}=I.useContext(ht),A=y?.rememberMe,M=y?.username,P=y?.passwordValidation;r={...b,...r},l={...P,...l};const{onSuccess:L,isPending:H}=Io({redirectTo:i}),j=Ee({email:M?z().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):z().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:qd(l,r),rememberMe:Pt().optional()}),B=Oo({resolver:To(j),defaultValues:{email:"",password:"",rememberMe:!A}});n=n||B.formState.isSubmitting||H,I.useEffect(()=>{s?.(B.formState.isSubmitting||H)},[B.formState.isSubmitting,H,s]);async function U({email:Z,password:re,rememberMe:q}){var W;try{let ee={};if(M&&!bq(Z)){const ae={throw:!0,headers:await m("/sign-in/username")};ee=await g.signIn.username({username:Z,password:re,rememberMe:q,fetchOptions:ae,callbackURL:c})}else{const ae={throw:!0,headers:await m("/sign-in/email")};ee=await g.signIn.email({email:Z,password:re,rememberMe:q,fetchOptions:ae,callbackURL:c})}ee.twoFactorRedirect?S(`${v}/${x.TWO_FACTOR}${window.location.search}`):await L()}catch(ee){B.resetField("password"),p(),E({variant:"error",message:Mn({error:ee,localization:r,localizeErrors:C})}),O?.otp&&((W=ee?.error)==null?void 0:W.code)==="EMAIL_NOT_VERIFIED"&&S(`${v}/${x.EMAIL_VERIFICATION}?email=${encodeURIComponent(Z)}`)}}return T.jsx(Ao,{...B,children:T.jsxs("form",{method:"POST",onSubmit:B.handleSubmit(U),noValidate:d,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:B.control,name:"email",render:({field:Z})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:M?r.USERNAME:r.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:M?"username":"email",className:t?.input,type:M?"text":"email",placeholder:M?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...Z})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:B.control,name:"password",render:({field:Z})=>T.jsxs(Cn,{children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(An,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&T.jsx(R,{className:Re("text-sm hover:underline",t?.forgotPasswordLink),href:`${v}/${x.FORGOT_PASSWORD}${d?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...Z})}),T.jsx(Kn,{className:t?.error})]})}),A&&T.jsx(Tn,{control:B.control,name:"rememberMe",render:({field:Z})=>T.jsxs(Cn,{className:"flex",children:[T.jsx(Vn,{children:T.jsx(mS,{checked:Z.value,onCheckedChange:Z.onChange,disabled:n})}),T.jsx(An,{children:r.REMEMBER_ME})]})}),T.jsx(vf,{ref:f,localization:r,action:"/sign-in/email"}),T.jsx(tn,{type:"submit",disabled:n,className:Re("w-full",t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function Pee({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,redirectTo:s,setIsSubmitting:l,passwordValidation:c}){var d,f,m,p,g,v;const y=us(),{captchaRef:b,getCaptchaHeaders:x,resetCaptcha:S}=gf({localization:i}),{additionalFields:E,authClient:R,basePath:C,baseURL:O,credentials:A,localization:M,nameRequired:P,persistClient:L,redirectTo:H,signUp:j,viewPaths:B,navigate:U,toast:Z,avatar:re,localizeErrors:q,emailVerification:W}=I.useContext(ht),ee=A?.confirmPassword,ae=A?.username,Q=A?.usernameRequired??!0,k=A?.passwordValidation,K=j?.fields;i={...M,...i},c={...k,...c};const V=I.useRef(null),[D,F]=I.useState(null),[X,fe]=I.useState(!1),pe=I.useCallback(()=>s||dl("redirectTo")||H,[s,H]),xe=I.useCallback(()=>`${O}${n||(L?`${C}/${B.CALLBACK}?redirectTo=${encodeURIComponent(pe())}`:pe())}`,[n,L,C,B,O,pe]),{onSuccess:Ue,isPending:Y}=Io({redirectTo:s}),te={email:z().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:qd(c,i),name:K?.includes("name")&&P?z().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):z().optional(),image:z().optional(),username:ae&&Q?z().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):z().optional(),confirmPassword:ee?qd(c,{PASSWORD_REQUIRED:i.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:i.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:i.PASSWORD_TOO_LONG,INVALID_PASSWORD:i.INVALID_PASSWORD}):z().optional()},ve={};if(K)for(const Ne of K){if(Ne==="name"||Ne==="image")continue;const Pe=E?.[Ne];if(!Pe)continue;let Me;Pe.type==="number"?Me=Pe.required?Rw(G=>G?Number(G):void 0,St({message:((d=Pe.errorMessage)==null?void 0:d.invalid)??`${Pe.label} ${i.IS_INVALID}`})):WN({message:((f=Pe.errorMessage)==null?void 0:f.invalid)??`${Pe.label} ${i.IS_INVALID}`}).optional():Pe.type==="boolean"?Me=Pe.required?ST({message:((m=Pe.errorMessage)==null?void 0:m.invalid)??`${Pe.label} ${i.IS_INVALID}`}).refine(G=>G===!0,{message:((p=Pe.errorMessage)==null?void 0:p.required)??`${Pe.label} ${i.IS_REQUIRED}`}):ST({message:((g=Pe.errorMessage)==null?void 0:g.invalid)??`${Pe.label} ${i.IS_INVALID}`}).optional():Me=Pe.required?z().min(1,((v=Pe.errorMessage)==null?void 0:v.required)??`${Pe.label} ${i.IS_REQUIRED}`):z().optional(),ve[Ne]=Me}const se=Ee(te).extend(ve).refine(Ne=>ee?Ne.password===Ne.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),we={email:"",password:"",...ee&&{confirmPassword:""},...K?.includes("name")?{name:""}:{},...ae?{username:""}:{},...K?.includes("image")&&re?{image:""}:{}};if(K)for(const Ne of K){if(Ne==="name"||Ne==="image")continue;const Pe=E?.[Ne];Pe&&(we[Ne]=Pe.type==="boolean"?!1:"")}const Oe=Oo({resolver:To(se),defaultValues:we});r=r||Oe.formState.isSubmitting||Y,I.useEffect(()=>{l?.(Oe.formState.isSubmitting||Y)},[Oe.formState.isSubmitting,Y,l]);const nt=async Ne=>{if(re){fe(!0);try{const Pe=await UJ(Ne,crypto.randomUUID(),re.size,re.extension);let Me;re.upload?Me=await re.upload(Pe):Me=await FJ(Pe),Me?(F(Me),Oe.setValue("image",Me)):(F(null),Oe.setValue("image",""))}catch(Pe){console.error(Pe),Z({variant:"error",message:Mn({error:Pe,localization:i,localizeErrors:q})})}fe(!1)}},ot=()=>{F(null),Oe.setValue("image","")},Be=()=>{var Ne;return(Ne=V.current)==null?void 0:Ne.click()};async function Xe({email:Ne,password:Pe,name:Me,username:G,confirmPassword:oe,image:le,...Ae}){var Ce,Te;try{for(const[gt,Rt]of Object.entries(Ae)){const vt=E?.[gt];if(vt?.validate&&typeof Rt=="string"&&!await vt.validate(Rt)){Oe.setError(gt,{message:((Ce=vt.errorMessage)==null?void 0:Ce.validate)??((Te=vt.errorMessage)==null?void 0:Te.invalid)??`${vt.label} ${i.IS_INVALID}`});return}}const De={throw:!0,headers:await x("/sign-up/email")},Je={};G!==void 0&&(!Q&&(G===null||G===""||typeof G=="string"&&G.trim()==="")||(Je.username=G)),le!==void 0&&(Je.image=le);const et=await R.signUp.email({email:Ne,password:Pe,name:Me||"",...Je,...Ae,callbackURL:xe(),fetchOptions:De});"token"in et&&et.token?await Ue():W?.otp?U(`${C}/${B.EMAIL_VERIFICATION}?email=${encodeURIComponent(Ne)}`):(U(`${C}/${B.SIGN_IN}${window.location.search}`),Z({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(De){Z({variant:"error",message:Mn({error:De,localization:i,localizeErrors:q})}),Oe.resetField("password"),Oe.resetField("confirmPassword"),S()}}return T.jsx(Ao,{...Oe,children:T.jsxs("form",{method:"POST",onSubmit:Oe.handleSubmit(Xe),noValidate:y,className:Re("grid w-full gap-6",e,t?.base),children:[K?.includes("image")&&re&&T.jsxs(T.Fragment,{children:[T.jsx("input",{ref:V,accept:"image/*",disabled:X,hidden:!0,type:"file",onChange:Ne=>{var Pe;const Me=(Pe=Ne.target.files)==null?void 0:Pe.item(0);Me&&nt(Me),Ne.target.value=""}}),T.jsx(Tn,{control:Oe.control,name:"image",render:()=>T.jsxs(Cn,{children:[T.jsx(An,{children:i.AVATAR}),T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs(BJ,{children:[T.jsx(VJ,{asChild:!0,children:T.jsx(tn,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:T.jsx(KJ,{isPending:X,className:"size-16",user:D?{name:Oe.watch("name"),email:Oe.watch("email"),image:D}:null,localization:i})})}),T.jsxs(qJ,{align:"start",onCloseAutoFocus:Ne=>Ne.preventDefault(),children:[T.jsxs(XC,{onClick:Be,disabled:X,children:[T.jsx(VH,{}),i.UPLOAD_AVATAR]}),D&&T.jsxs(XC,{onClick:ot,disabled:X,variant:"destructive",children:[T.jsx(YH,{}),i.DELETE_AVATAR]})]})]}),T.jsxs(tn,{type:"button",variant:"outline",onClick:Be,disabled:X,children:[X&&T.jsx(Rr,{className:"animate-spin"}),i.UPLOAD]})]}),T.jsx(Kn,{})]})})]}),K?.includes("name")&&T.jsx(Tn,{control:Oe.control,name:"name",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsxs(An,{className:t?.label,children:[i.NAME,!P&&T.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:"name",className:t?.input,placeholder:i.NAME_PLACEHOLDER,disabled:r,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),ae&&T.jsx(Tn,{control:Oe.control,name:"username",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsxs(An,{className:t?.label,children:[i.USERNAME,!Q&&T.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:"username",className:t?.input,placeholder:i.USERNAME_PLACEHOLDER,disabled:r,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:Oe.control,name:"email",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:"email",className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:r,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:Oe.control,name:"password",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:i.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),ee&&T.jsx(Tn,{control:Oe.control,name:"confirmPassword",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.CONFIRM_PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:i.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),K?.filter(Ne=>Ne!=="name"&&Ne!=="image").map(Ne=>{const Pe=E?.[Ne];return Pe?Pe.type==="boolean"?T.jsx(Tn,{control:Oe.control,name:Ne,render:({field:Me})=>T.jsxs(Cn,{className:"flex",children:[T.jsx(Vn,{children:T.jsx(mS,{checked:Me.value,onCheckedChange:Me.onChange,disabled:r})}),T.jsx(An,{className:t?.label,children:Pe.label}),T.jsx(Kn,{className:t?.error})]})},Ne):T.jsx(Tn,{control:Oe.control,name:Ne,render:({field:Me})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:Pe.label}),T.jsx(Vn,{children:Pe.type==="number"?T.jsx(Ji,{className:t?.input,type:"number",placeholder:Pe.placeholder||(typeof Pe.label=="string"?Pe.label:""),disabled:r,...Me,value:Me.value}):Pe.multiline?T.jsx(YJ,{className:t?.input,placeholder:Pe.placeholder||(typeof Pe.label=="string"?Pe.label:""),disabled:r,...Me,value:Me.value}):T.jsx(Ji,{className:t?.input,type:"text",placeholder:Pe.placeholder||(typeof Pe.label=="string"?Pe.label:""),disabled:r,...Me,value:Me.value})}),T.jsx(Kn,{className:t?.error})]})},Ne):(console.error(`Additional field ${Ne} not found`),null)}),T.jsx(vf,{ref:b,localization:i,action:"/sign-up/email"}),T.jsx(tn,{type:"submit",disabled:r,className:Re("w-full",t?.button,t?.primaryButton),children:r?T.jsx(Rr,{className:"animate-spin"}):i.SIGN_UP_ACTION})]})})}function Nee({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:i=0,redirectTo:s,setIsSubmitting:l}){var c;const d=us(),f=d?dl("totpURI"):null,m=I.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:v},localization:y,twoFactor:b,viewPaths:x,toast:S,Link:E,localizeErrors:R}=I.useContext(ht);r={...y,...r};const{onSuccess:C,isPending:O}=Io({redirectTo:s}),{data:A}=v(),M=(c=A?.user)==null?void 0:c.twoFactorEnabled,[P,L]=I.useState(b?.length===1?b[0]:null),[H,j]=I.useState(!1),[B,U]=I.useState(0),Z=Ee({code:z().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:Pt().optional()}),re=Oo({resolver:To(Z),defaultValues:{code:""}});n=n||re.formState.isSubmitting||O,I.useEffect(()=>{l?.(re.formState.isSubmitting||O)},[re.formState.isSubmitting,O,l]),I.useEffect(()=>{P==="otp"&&B<=0&&!m.current&&(m.current=!0,q())},[P]),I.useEffect(()=>{if(B<=0)return;const ee=setTimeout(()=>{U(ae=>ae-1)},1e3);return()=>clearTimeout(ee)},[B]);const q=async()=>{if(!(H||B>0)){try{j(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(ee){S({variant:"error",message:Mn({error:ee,localization:r,localizeErrors:R})}),ee.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,j(!1)}};async function W({code:ee,trustDevice:ae}){try{await(P==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:ee,trustDevice:ae,fetchOptions:{throw:!0}}),await C(),A&&!M&&S({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(Q){S({variant:"error",message:Mn({error:Q,localization:r,localizeErrors:R})}),re.reset()}}return T.jsx(Ao,{...re,children:T.jsxs("form",{method:"POST",onSubmit:re.handleSubmit(W),className:Re("grid w-full gap-6",e,t?.base),children:[b?.includes("totp")&&f&&P==="totp"&&T.jsxs("div",{className:"space-y-3",children:[T.jsx(h5,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),T.jsx(PJ,{className:Re("border shadow-xs",t?.qrCode),value:f})]}),P!==null&&T.jsxs(T.Fragment,{children:[T.jsx(Tn,{control:re.control,name:"code",render:({field:ee})=>T.jsxs(Cn,{children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(An,{className:t?.label,children:r.ONE_TIME_PASSWORD}),T.jsx(E,{className:Re("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${x.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),T.jsx(Vn,{children:T.jsx(gS,{...ee,maxLength:6,onChange:ae=>{ee.onChange(ae),ae.length===6&&re.handleSubmit(W)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:T.jsx(vS,{otpSeparators:i})})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:re.control,name:"trustDevice",render:({field:ee})=>T.jsxs(Cn,{className:"flex",children:[T.jsx(Vn,{children:T.jsx(mS,{checked:ee.value,onCheckedChange:ee.onChange,disabled:n,className:t?.checkbox})}),T.jsx(An,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),T.jsxs("div",{className:"grid gap-4",children:[P!==null&&T.jsxs(tn,{type:"submit",disabled:n,className:Re(t?.button,t?.primaryButton),children:[n&&T.jsx(Rr,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),P==="otp"&&b?.includes("otp")&&T.jsxs(tn,{type:"button",variant:"outline",onClick:q,disabled:B>0||H||n,className:Re(t?.button,t?.outlineButton),children:[H?T.jsx(Rr,{className:"animate-spin"}):T.jsx(IT,{className:t?.icon}),r.RESEND_CODE,B>0&&` (${B})`]}),P!=="otp"&&b?.includes("otp")&&T.jsxs(tn,{type:"button",variant:"secondary",className:Re(t?.button,t?.secondaryButton),onClick:()=>L("otp"),disabled:n,children:[T.jsx(IT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),P!=="totp"&&b?.includes("totp")&&T.jsxs(tn,{type:"button",variant:"secondary",className:Re(t?.button,t?.secondaryButton),onClick:()=>L("totp"),disabled:n,children:[T.jsx(ZH,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function w5({redirectTo:e}){const t=I.useRef(!1),{authClient:n,basePath:r,viewPaths:i}=I.useContext(ht),{onSuccess:s}=Io({redirectTo:e||`${r}/${i.SIGN_IN}`});return I.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(s))},[n,s]),T.jsx(Rr,{className:"animate-spin"})}function kee({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,pathname:s,redirectTo:l,view:c,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:v,emailOTP:y,signUp:b,twoFactor:x,viewPaths:S,replace:E}=I.useContext(ht),R=!!b;if(i={...g,...i},I.useEffect(()=>{s&&!Cb(S,s)&&(console.error(`Invalid auth view: ${s}`),E(`${m}/${S.SIGN_IN}${window.location.search}`))},[s,S,m,E]),c=c||Cb(S,s)||"SIGN_IN",I.useEffect(()=>{let C=!1;c==="MAGIC_LINK"&&(!v||!p&&!y)&&(C=!0),c==="EMAIL_OTP"&&(!y||!p&&!v)&&(C=!0),c==="SIGN_UP"&&!R&&(C=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(c)&&(C=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(c)&&!x&&(C=!0),C&&E(`${m}/${S.SIGN_IN}${window.location.search}`)},[m,c,S,p,E,y,R,v,x]),c==="SIGN_OUT")return T.jsx(w5,{redirectTo:l});if(c==="CALLBACK")return T.jsx(b5,{redirectTo:l});if(c==="SIGN_IN")return p?T.jsx(Mee,{className:e,classNames:t,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f,callbackURL:n}):v?T.jsx(eA,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):y?T.jsx(JC,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):null;if(c==="TWO_FACTOR")return T.jsx(Nee,{className:e,classNames:t,localization:i,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="RECOVER_ACCOUNT")return T.jsx(Aee,{className:e,classNames:t,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="MAGIC_LINK")return T.jsx(eA,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="EMAIL_OTP")return T.jsx(JC,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="EMAIL_VERIFICATION")return T.jsx(Tee,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="FORGOT_PASSWORD")return T.jsx(Cee,{className:e,classNames:t,localization:i,isSubmitting:r,setIsSubmitting:f});if(c==="RESET_PASSWORD")return T.jsx(Iee,{className:e,classNames:t,localization:i});if(c==="SIGN_UP")return R&&T.jsx(Pee,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f})}function Dee({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:i,replace:s,toast:l}=I.useContext(ht),c=I.useMemo(()=>({...r,...n}),[r,n]),{data:d}=$J(),[f,m]=I.useState(null);return I.useEffect(()=>{const p=dl("invitationId");if(!p){l({variant:"error",message:c.INVITATION_NOT_FOUND}),s(i);return}m(p)},[c.INVITATION_NOT_FOUND,l,s,i]),!d||!f?T.jsx(S5,{className:e,classNames:t}):T.jsx(Lee,{className:e,classNames:t,localization:c,invitationId:f})}function Lee({className:e,classNames:t,localization:n,invitationId:r}){var i;const{authClient:s,hooks:{useInvitation:l},localization:c,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=I.useContext(ht),v=I.useMemo(()=>({...c,...n}),[c,n]),[y,b]=I.useState(!1),[x,S]=I.useState(!1),E=y||x,{data:R,isPending:C}=l({query:{id:r}}),O=I.useCallback(()=>dl("redirectTo")||f,[f]);I.useEffect(()=>{if(!(C||!r)){if(!R){p({variant:"error",message:v.INVITATION_NOT_FOUND}),m(f);return}(R.status!=="pending"||new Date(R.expiresAt)<new Date)&&(p({variant:"error",message:new Date(R.expiresAt)<new Date?v.INVITATION_EXPIRED:v.INVITATION_NOT_FOUND}),m(f))}},[R,C,r,v,p,m,f]);const A=async()=>{S(!0);try{await s.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:v.INVITATION_ACCEPTED||"Invitation accepted"}),m(O())}catch(j){p({variant:"error",message:Mn({error:j,localization:v,localizeErrors:g})}),S(!1)}},M=async()=>{b(!0);try{await s.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:v.INVITATION_REJECTED}),m(f)}catch(j){p({variant:"error",message:Mn({error:j,localization:v,localizeErrors:g})}),b(!1)}},H=((i=[...[{role:"owner",label:v.OWNER},{role:"admin",label:v.ADMIN},{role:"member",label:v.MEMBER}],...d?.customRoles||[]].find(j=>j.role===R?.role))==null?void 0:i.label)||R?.role;return R?T.jsxs(Wd,{className:Re("w-full max-w-sm",e,t?.base),children:[T.jsxs(fS,{className:Re("justify-items-center text-center",t?.header),children:[T.jsx(d5,{className:Re("text-lg md:text-xl",t?.title),children:v.ACCEPT_INVITATION}),T.jsx(f5,{className:Re("text-xs md:text-sm",t?.description),children:v.ACCEPT_INVITATION_DESCRIPTION})]}),T.jsxs(hS,{className:Re("flex flex-col gap-6 truncate",t?.content),children:[T.jsxs(Wd,{className:Re("flex-row items-center p-4"),children:[T.jsx(y5,{organization:{id:R.organizationId,name:R.organizationName,slug:R.organizationSlug,logo:R.organizationLogo,createdAt:new Date},localization:v}),T.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:H})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[T.jsxs(tn,{variant:"outline",className:Re(t?.button,t?.outlineButton),onClick:M,disabled:E,children:[y?T.jsx(Rr,{className:"animate-spin"}):T.jsx(QH,{}),v.REJECT]}),T.jsxs(tn,{className:Re(t?.button,t?.primaryButton),onClick:A,disabled:E,children:[x?T.jsx(Rr,{className:"animate-spin"}):T.jsx(n3,{}),v.ACCEPT]})]})]})]}):T.jsx(S5,{className:e,classNames:t})}var S5=({className:e,classNames:t,localization:n})=>T.jsxs(Wd,{className:Re("w-full max-w-sm",e,t?.base),children:[T.jsxs(fS,{className:Re("justify-items-center",t?.header),children:[T.jsx(is,{className:Re("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),T.jsx(is,{className:Re("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),T.jsxs(hS,{className:Re("flex flex-col gap-6 truncate",t?.content),children:[T.jsxs(Wd,{className:Re("flex-row items-center p-4"),children:[T.jsx(y5,{isPending:!0,localization:n}),T.jsx(is,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[T.jsx(is,{className:"h-9 w-full"}),T.jsx(is,{className:"h-9 w-full"})]})]})]});function tA({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return T.jsx(LJ,{"data-slot":"separator",decorative:n,orientation:t,className:Re("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function $ee({classNames:e,isSubmitting:t,localization:n,view:r}){var i,s,l,c;const{viewPaths:d,navigate:f,basePath:m}=I.useContext(ht);return T.jsxs(tn,{className:Re("w-full",(i=e?.form)==null?void 0:i.button,(s=e?.form)==null?void 0:s.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?T.jsx(r3,{className:(l=e?.form)==null?void 0:l.icon}):T.jsx(i3,{className:(c=e?.form)==null?void 0:c.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function jee({classNames:e,isSubmitting:t,localization:n,view:r}){var i,s,l,c;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=I.useContext(ht);return T.jsxs(tn,{className:Re("w-full",(i=e?.form)==null?void 0:i.button,(s=e?.form)==null?void 0:s.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="MAGIC_LINK"||!p?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?T.jsx(r3,{className:(l=e?.form)==null?void 0:l.icon}):T.jsx(i3,{className:(c=e?.form)==null?void 0:c.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function Uee({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:i,localizeErrors:s}=I.useContext(ht),l=I.useRef(!1);e=I.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:c}=Io({redirectTo:t});return I.useEffect(()=>{if(!l.current){l.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:c}})}catch(d){i({variant:"error",message:Mn({error:d,localization:e,localizeErrors:s})})}}},[n,e,s,c,i]),null}function zee({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:i}){var s,l;const{authClient:c,localization:d,toast:f,localizeErrors:m}=I.useContext(ht);n={...d,...n};const{onSuccess:p}=Io({redirectTo:r}),g=async()=>{i?.(!0);try{const v=await c.signIn.passkey({fetchOptions:{throw:!0}});v?.error?(f({variant:"error",message:Mn({error:v.error,localization:n,localizeErrors:m})}),i?.(!1)):p()}catch(v){f({variant:"error",message:Mn({error:v,localization:n,localizeErrors:m})}),i?.(!1)}};return T.jsxs(tn,{className:Re("w-full",(s=e?.form)==null?void 0:s.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[T.jsx(GH,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function nA({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,other:s,provider:l,redirectTo:c,socialLayout:d,setIsSubmitting:f}){var m,p,g,v;const{authClient:y,basePath:b,baseURL:x,persistClient:S,redirectTo:E,viewPaths:R,social:C,genericOAuth:O,toast:A,localizeErrors:M}=I.useContext(ht),P=I.useCallback(()=>c||dl("redirectTo")||E,[c,E]),L=I.useCallback(()=>`${x}${n||(S?`${b}/${R.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,S,b,R,x,P]),H=async()=>{f(!0);try{if(s){const j={providerId:l.provider,callbackURL:L(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(j),setTimeout(()=>{f(!1)},1e4)):await y.signIn.oauth2(j)}else{const j={provider:l.provider,callbackURL:L(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(j),setTimeout(()=>{f(!1)},1e4)):await y.signIn.social(j)}}catch(j){A({variant:"error",message:Mn({error:j,localization:i,localizeErrors:M})}),f(!1)}};return T.jsxs(tn,{className:Re(d==="vertical"?"w-full":"grow",e,(m=t?.form)==null?void 0:m.button,(p=t?.form)==null?void 0:p.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:H,children:[l.icon&&T.jsx(l.icon,{className:(v=t?.form)==null?void 0:v.icon}),d==="grid"&&l.name,d==="vertical"&&`${i.SIGN_IN_WITH} ${l.name}`]})}function Ale({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:i,localization:s,path:l,pathname:c,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,v,y,b,x,S;const E=us(),{basePath:R,credentials:C,localization:O,magicLink:A,emailOTP:M,oneTap:P,passkey:L,signUp:H,social:j,genericOAuth:B,viewPaths:U,Link:Z}=I.useContext(ht);s={...O,...s};let re=f;re==="auto"&&(re=C&&j?.providers&&j.providers.length>2?"horizontal":"vertical");const q=l??c?.split("/").pop(),W=m||Cb(U,q)||"SIGN_IN",[ee,ae]=I.useState(!1);if(I.useEffect(()=>{const k=()=>ae(!1);return window.addEventListener("pagehide",k),()=>{ae(!1),window.removeEventListener("pagehide",k)}},[]),W==="CALLBACK")return T.jsx(b5,{redirectTo:d});if(W==="SIGN_OUT")return T.jsx(w5,{redirectTo:d});if(W==="ACCEPT_INVITATION")return T.jsx(Dee,{className:e,classNames:t});const Q=!C&&!A&&!M?s.DISABLED_CREDENTIALS_DESCRIPTION:s[`${W}_DESCRIPTION`];return T.jsxs(Wd,{className:Re("w-full max-w-sm",e,t?.base),children:[T.jsx(fS,{className:t?.header,children:r||T.jsxs(T.Fragment,{children:[T.jsx(d5,{className:Re("text-lg md:text-xl",t?.title),children:s[W]}),Q&&T.jsx(f5,{className:Re("text-xs md:text-sm",t?.description),children:Q})]})}),T.jsxs(hS,{className:Re("grid gap-6",t?.content),children:[P&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(W)&&T.jsx(Uee,{localization:s,redirectTo:d}),(C||A||M)&&T.jsxs("div",{className:"grid gap-4",children:[T.jsx(kee,{classNames:t?.form,callbackURL:n,isSubmitting:ee,localization:s,otpSeparators:p,view:W,redirectTo:d,setIsSubmitting:ae}),A&&(C&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(W)||M&&W==="EMAIL_OTP")&&T.jsx(jee,{classNames:t,localization:s,view:W,isSubmitting:ee}),M&&(C&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(W)||A&&["SIGN_IN","MAGIC_LINK"].includes(W))&&T.jsx($ee,{classNames:t,localization:s,view:W,isSubmitting:ee})]}),W!=="RESET_PASSWORD"&&W!=="EMAIL_VERIFICATION"&&(((g=j?.providers)==null?void 0:g.length)||((v=B?.providers)==null?void 0:v.length)||W==="SIGN_IN"&&L)&&T.jsxs(T.Fragment,{children:[(C||A||M)&&T.jsxs("div",{className:Re("flex items-center gap-2",t?.continueWith),children:[T.jsx(tA,{className:Re("!w-auto grow",t?.separator)}),T.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:s.OR_CONTINUE_WITH}),T.jsx(tA,{className:Re("!w-auto grow",t?.separator)})]}),T.jsxs("div",{className:"grid gap-4",children:[(((y=j?.providers)==null?void 0:y.length)||((b=B?.providers)==null?void 0:b.length))&&T.jsxs("div",{className:Re("flex w-full items-center justify-between gap-4",re==="horizontal"&&"flex-wrap",re==="vertical"&&"flex-col",re==="grid"&&"grid grid-cols-2"),children:[(x=j?.providers)==null?void 0:x.map(k=>{const K=yee.find(V=>V.provider===k);return K?T.jsx(nA,{classNames:t,callbackURL:n,isSubmitting:ee,localization:s,provider:K,redirectTo:d,setIsSubmitting:ae,socialLayout:re},k):null}),(S=B?.providers)==null?void 0:S.map(k=>T.jsx(nA,{classNames:t,callbackURL:n,isSubmitting:ee,localization:s,provider:k,redirectTo:d,setIsSubmitting:ae,socialLayout:re,other:!0},k.provider))]}),L&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(W)&&T.jsx(zee,{classNames:t,isSubmitting:ee,localization:s,redirectTo:d,setIsSubmitting:ae})]})]})]}),i&&T.jsx(QC,{className:t?.footer,children:i}),C&&H&&T.jsxs(QC,{className:Re("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?s.DONT_HAVE_AN_ACCOUNT:W==="SIGN_UP"?s.ALREADY_HAVE_AN_ACCOUNT:T.jsx(FH,{className:"size-3"}),W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"||W==="SIGN_UP"?T.jsx(Z,{className:Re("text-foreground underline",t?.footerLink),href:`${R}/${U[W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:T.jsx(tn,{variant:"link",size:"sm",className:Re("px-0 text-foreground underline",t?.footerLink),children:W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?s.SIGN_UP:s.SIGN_IN})}):T.jsx(tn,{variant:"link",size:"sm",className:Re("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:s.GO_BACK})]})]})}function Ile({children:e}){const{hooks:{useSession:t}}=I.useContext(ht),{isPending:n}=t();return n?e:null}function Mle({children:e}){const{hooks:{useSession:t}}=I.useContext(ht),{data:n}=t();return n?e:null}function Ple({children:e}){const{hooks:{useSession:t}}=I.useContext(ht),{data:n,isPending:r}=t();return!n&&!r?e:null}function Fee(e){const t=Ro.c(8),{children:n}=e,r=rf();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={basePath:"/",pathMode:"slug"},t[0]=i):i=t[0];let s,l;t[1]!==r?(s=d=>r({to:d}),l=d=>r({to:d,replace:!0}),t[1]=r,t[2]=s,t[3]=l):(s=t[2],l=t[3]);let c;return t[4]!==n||t[5]!==s||t[6]!==l?(c=T.jsx($H,{authClient:Mg,redirectTo:"/",organization:i,navigate:s,replace:l,Link:Bee,children:n}),t[4]=n,t[5]=s,t[6]=l,t[7]=c):c=t[7],c}function Bee(e){const{href:t,className:n,children:r,...i}=e;return T.jsx(dw,{to:t,className:n,...i,children:r})}var me=typeof window<"u"?window:void 0,Yn=typeof globalThis<"u"?globalThis:me;typeof self>"u"&&(Yn.self=Yn),typeof File>"u"&&(Yn.File=function(){});var fi=Yn?.navigator,$e=Yn?.document,ur=Yn?.location,Qb=Yn?.fetch,Xb=Yn!=null&&Yn.XMLHttpRequest&&"withCredentials"in new Yn.XMLHttpRequest?Yn.XMLHttpRequest:void 0,rA=Yn?.AbortController,Vee=Yn?.CompressionStream,Gr=fi?.userAgent,We=me??{},iA="1.372.3",Nr={DEBUG:!1,LIB_VERSION:iA,LIB_NAME:"web",JS_SDK_VERSION:iA};function oA(e,t,n,r,i,s,l){try{var c=e[s](l),d=c.value}catch(f){return void n(f)}c.done?t(d):Promise.resolve(d).then(r,i)}function Pi(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var s=e.apply(t,n);function l(d){oA(s,r,i,l,c,"next",d)}function c(d){oA(s,r,i,l,c,"throw",d)}l(void 0)}))}}function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(null,arguments)}function E5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jb(){return Jb=Pi((function*(e,t,n){t===void 0&&(t=!0);try{var r=new CompressionStream("gzip"),i=r.writable.getWriter(),s=i.write(new TextEncoder().encode(e)).then((()=>i.close())).catch((function(){var d=Pi((function*(f){try{yield i.abort(f)}catch{}throw f}));return function(f){return d.apply(this,arguments)}})()),l=new Response(r.readable).blob(),[c]=yield Promise.all([l,s]);return c}catch(d){if(n!=null&&n.rethrow)throw d;return t&&console.error("Failed to gzip compress data",d),null}})),Jb.apply(this,arguments)}var qee=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],sA=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return qee.concat(t).some((r=>{var i=r.toLowerCase();return n.indexOf(i)!==-1}))},Hee=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function bt(e,t){return e.indexOf(t)!==-1}var Wg=function(e){return e.trim()},e1=function(e){return e.replace(/^\$/,"")},x5=Object.prototype,R5=x5.hasOwnProperty,Qg=x5.toString,Mt=Array.isArray||function(e){return Qg.call(e)==="[object Array]"},rs=e=>typeof e=="function",On=e=>e===Object(e)&&!Mt(e),wc=e=>{if(On(e)){for(var t in e)if(R5.call(e,t))return!1;return!0}return!1},ze=e=>e===void 0,vn=e=>Qg.call(e)=="[object String]",pm=e=>vn(e)&&e.trim().length===0,hs=e=>e===null,wt=e=>ze(e)||hs(e),$i=e=>Qg.call(e)=="[object Number]"&&e==e,mc=e=>$i(e)&&e>0,wo=e=>Qg.call(e)==="[object Boolean]",Gee=e=>e instanceof FormData,Kee=e=>bt(Hee,e);function O5(e){return e===null||typeof e!="object"}function Qm(e,t){return{}.toString.call(e)==="[object "+t+"]"}function _S(e){return typeof Event<"u"&&(function(t,n){try{return t instanceof n}catch{return!1}})(e,Event)}var Zee=[!0,"true",1,"1","yes"],Ty=e=>bt(Zee,e),Yee=[!1,"false",0,"0","no"];function So(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),$i(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),So(i||n,t,n,r))}class Wee{constructor(t){this.$t={},this.zt=t.zt,this.Ut=So(t.bucketSize,0,100,t.Gt),this.Wt=So(t.refillRate,0,this.Ut,t.Gt),this.Xt=So(t.refillInterval,0,864e5,t.Gt)}Jt(t,n){var r=Math.floor((n-t.lastAccess)/this.Xt);r>0&&(t.tokens=Math.min(t.tokens+r*this.Wt,this.Ut),t.lastAccess=t.lastAccess+r*this.Xt)}consumeRateLimit(t){var n,r=Date.now(),i=String(t),s=this.$t[i];return s?this.Jt(s,r):this.$t[i]=s={tokens:this.Ut,lastAccess:r},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.zt)==null||n.call(this,t)),s.tokens===0)}stop(){this.$t={}}}var cp,aA,Cy,pi="Mobile",Xm="iOS",ss="Android",zc="Tablet",T5=ss+" "+zc,C5="iPad",A5="Apple",I5=A5+" Watch",kd="Safari",Fc="BlackBerry",M5="Samsung",P5=M5+"Browser",N5=M5+" Internet",Ja="Chrome",Qee=Ja+" OS",k5=Ja+" "+Xm,yS="Internet Explorer",D5=yS+" "+pi,bS="Opera",Xee=bS+" Mini",wS="Edge",L5="Microsoft "+wS,Pc="Firefox",$5=Pc+" "+Xm,Xd="Nintendo",Jd="PlayStation",Nc="Xbox",j5=ss+" "+pi,U5=pi+" "+kd,_d="Windows",t1=_d+" Phone",lA="Nokia",n1="Ouya",z5="Generic",Jee=z5+" "+pi.toLowerCase(),F5=z5+" "+zc.toLowerCase(),r1="Konqueror",Pr="(\\d+(\\.\\d+)?)",Ay=new RegExp("Version/"+Pr),ete=new RegExp(Nc,"i"),tte=new RegExp(Jd+" \\w+","i"),nte=new RegExp(Xd+" \\w+","i"),SS=new RegExp(Fc+"|PlayBook|BB10","i"),rte={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},B5=function(e,t){return t=t||"",bt(e," OPR/")&&bt(e,"Mini")?Xee:bt(e," OPR/")?bS:SS.test(e)?Fc:bt(e,"IE"+pi)||bt(e,"WPDesktop")?D5:bt(e,P5)?N5:bt(e,wS)||bt(e,"Edg/")?L5:bt(e,"FBIOS")?"Facebook "+pi:bt(e,"UCWEB")||bt(e,"UCBrowser")?"UC Browser":bt(e,"CriOS")?k5:bt(e,"CrMo")||bt(e,Ja)?Ja:bt(e,ss)&&bt(e,kd)?j5:bt(e,"FxiOS")?$5:bt(e.toLowerCase(),r1.toLowerCase())?r1:((n,r)=>r&&bt(r,A5)||(function(i){return bt(i,kd)&&!bt(i,Ja)&&!bt(i,ss)})(n))(e,t)?bt(e,pi)?U5:kd:bt(e,Pc)?Pc:bt(e,"MSIE")||bt(e,"Trident/")?yS:bt(e,"Gecko")?Pc:""},ite={[D5]:[new RegExp("rv:"+Pr)],[L5]:[new RegExp(wS+"?\\/"+Pr)],[Ja]:[new RegExp("("+Ja+"|CrMo)\\/"+Pr)],[k5]:[new RegExp("CriOS\\/"+Pr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Pr)],[kd]:[Ay],[U5]:[Ay],[bS]:[new RegExp("(Opera|OPR)\\/"+Pr)],[Pc]:[new RegExp(Pc+"\\/"+Pr)],[$5]:[new RegExp("FxiOS\\/"+Pr)],[r1]:[new RegExp("Konqueror[:/]?"+Pr,"i")],[Fc]:[new RegExp(Fc+" "+Pr),Ay],[j5]:[new RegExp("android\\s"+Pr,"i")],[N5]:[new RegExp(P5+"\\/"+Pr)],[yS]:[new RegExp("(rv:|MSIE )"+Pr)],Mozilla:[new RegExp("rv:"+Pr)]},ote=function(e,t){var n=B5(e,t),r=ite[n];if(ze(r))return null;for(var i=0;r.length>i;i++){var s=e.match(r[i]);if(s)return parseFloat(s[s.length-2])}return null},cA=[[new RegExp(Nc+"; "+Nc+" (.*?)[);]","i"),e=>[Nc,e&&e[1]||""]],[new RegExp(Xd,"i"),[Xd,""]],[new RegExp(Jd,"i"),[Jd,""]],[SS,[Fc,""]],[new RegExp(_d,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[t1,""];if(new RegExp(pi).test(t)&&!/IEMobile\b/.test(t))return[_d+" "+pi,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=rte[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[_d,r]}return[_d,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Xm,[e[3],e[4],e[5]||"0"].join(".")]:[Xm,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=ze(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+ss+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ss+")","i"),e=>e&&e[2]?[ss,[e[2],e[3],e[4]||"0"].join(".")]:[ss,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Qee,""]],[/Linux|debian/i,["Linux",""]]],uA=function(e){return nte.test(e)?Xd:tte.test(e)?Jd:ete.test(e)?Nc:new RegExp(n1,"i").test(e)?n1:new RegExp("("+t1+"|WPDesktop)","i").test(e)?t1:/iPad/.test(e)?C5:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?I5:SS.test(e)?Fc:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(lA,"i").test(e)?lA:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(pi).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?ss:T5:new RegExp("(pda|"+pi+")","i").test(e)?Jee:new RegExp(zc,"i").test(e)&&!new RegExp(zc+" pc","i").test(e)?F5:""},ste=e=>e instanceof Error,V5={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},ate=V5.info;function q5(e){if(wo(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(Mt(e))return{arrayValue:{values:e.map((t=>q5(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function dA(e){var t=[];for(var n in e){var r=e[n];hs(r)||ze(r)||t.push({key:n,value:q5(r)})}return t}function lte(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return Cy&&n.length===aA||(aA=n.length,Cy=n.reduce(((r,i)=>{cp||(cp={});var s=cp[i];if(s)r[s[0]]=s[1];else for(var l=e(i),c=l.length-1;c>=0;c--){var d=l[c],f=d?.filename,m=t[i];if(f&&m){r[f]=m,cp[i]=[f,m];break}}return r}),{})),Cy}}class cte{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,n,0).apply(t),s=this.buildParsingContext(n),l=this.parseStacktrace(i,s);return{$exception_list:this.convertToExceptionList(l,r),$exception_level:"error"}}modifyFrames(t){var n=this;return Pi((function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&Mt(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t}))()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,i;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),ke({},t,{cause:r,stack:i})}applyChunkIds(t,n){return t.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return Pi((function*(){var r=t;for(var i of n.modifiers)r=yield i(r);return r}))()}convertToExceptionList(t,n){var r,i,s,l={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(i=n.handled)===null||i===void 0||i,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,ke({},n,{handled:!0}))),c}buildParsingContext(t){var n;return{chunkIdMap:lte(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var i=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(t,n,l);return this.applyCoercers(s,c)}};return ke({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:s=>i(s,r),next:s=>i(s,r+1)})}}var Bc="?";function i1(e,t,n,r,i){var s={platform:e,filename:t,function:n==="<anonymous>"?Bc:n,in_app:!0};return ze(r)||(s.lineno=r),ze(i)||(s.colno=i),s}var H5=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Bc,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},ute=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dte=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fte=/\((\S*)(?::(\d+))(?::(\d+))\)/,hte=(e,t)=>{var n=ute.exec(e);if(n){var[,r,i,s]=n;return i1(t,r,Bc,+i,+s)}var l=dte.exec(e);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=fte.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[d,f]=H5(l[1]||Bc,l[2]);return i1(t,f,d,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},pte=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mte=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gte=(e,t)=>{var n=pte.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=mte.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],s=n[1]||Bc;return[s,i]=H5(s,i),i1(t,i,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},fA=/\(error: (.*)\)/;class vte{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=vn(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return Qm(t,"DOMException")}isDOMError(t){return Qm(t,"DOMError")}}class _te{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(t){return t.stacktrace||t.stack||void 0}}class yte{constructor(){}match(t){return Qm(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r;return n.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var bte=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class wte{match(t){return typeof t=="string"}coerce(t,n){var r,[i,s]=this.getInfos(t);return{type:i??"Error",value:s??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,i=t.match(bte);return i&&(n=i[1],r=i[2]),[n,r]}}var Ste=["fatal","error","warning","log","info","debug"];function G5(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}class Ete{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,i=this.getErrorPropertyFromObject(t);return i?n.apply(i):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return _S(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+G5(t)}isSeverityLevel(t){return vn(t)&&!pm(t)&&Ste.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if({}.hasOwnProperty.call(t,n)){var r=t[n];if(ste(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class xte{match(t){return _S(t)}coerce(t,n){var r,i=t.constructor.name;return{type:i,value:i+" captured as exception with keys: "+G5(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Rte{match(t){return O5(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Ote{match(t){return Qm(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!_S(t))return!1;try{var n=t.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(t,n){var r,i=this.getUnhandledRejectionReason(t);return O5(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var Jm="$message",eg="$timestamp",Tte=new Set([Jm,eg]),Iy={enabled:!0,max_bytes:32768};function tg(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:Iy.enabled,max_bytes:Ate(e.max_bytes,Iy.max_bytes)}:ke({},Iy)}class Cte{constructor(t){this.Kt=[],this.Qt=0,this.Bt=tg(t)}setConfig(t){this.Bt=tg(t),this.er()}add(t){var n=(function(i){var s=(function(m){var p=new WeakSet;try{return JSON.stringify(m,((g,v)=>{if(typeof v=="bigint")return v.toString();if(typeof v!="function"&&typeof v!="symbol"){if(v instanceof Date)return v.toISOString();if(v instanceof Error)return{name:v.name,message:v.message,stack:v.stack};if(v&&typeof v=="object"){if(p.has(v))return"[Circular]";p.add(v)}return v}}))}catch{return}})(i);if(s)try{var l=JSON.parse(s);if(!On(l))return;var c=l,d=c[Jm],f=c[eg];return!vn(d)||d.trim().length===0||!vn(f)&&!$i(f)?void 0:{step:c,json:s}}catch{return}})(t);if(n){var r=(function(i){if(typeof TextEncoder<"u")return new TextEncoder().encode(i).length;for(var s=encodeURIComponent(i),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);r>this.Bt.max_bytes||(this.Kt.push({step:n.step,bytes:r}),this.Qt+=r,this.er())}}getAttachable(){return this.Kt.map((t=>t.step))}clear(){this.Kt=[],this.Qt=0}size(){return this.Kt.length}er(){for(;this.Qt>this.Bt.max_bytes&&this.Kt.length>0;){var t=this.Kt.shift();t&&(this.Qt-=t.bytes)}}}function Ate(e,t){if(!$i(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var K5=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={C(i){if(me&&(Nr.DEBUG||We.POSTHOG_DEBUG||n)&&!ze(me.console)&&me.console){for(var s=("__rrweb_original__"in me.console[i])?me.console[i].__rrweb_original__:me.console[i],l=arguments.length,c=new Array(l>1?l-1:0),d=1;l>d;d++)c[d-1]=arguments[d];s(e,...c)}},info(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];r.C("log",...s)},warn(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];r.C("warn",...s)},error(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];r.C("error",...s)},critical(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];console.error(e,...s)},uninitializedWarning(i){r.error("You must initialize PostHog before calling "+i)},createLogger:(i,s)=>K5(e+" "+i,s)};return r},je=K5("[PostHog.js]"),fn=je.createLogger,Ite=fn("[ExternalScriptsLoader]"),My=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Ite.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=$e?.querySelectorAll("script");if(r){for(var i,s=function(){if(r[l].src===t){var d=r[l];return d.__posthog_loading_callback_fired?{v:n()}:(d.addEventListener("load",(f=>{d.__posthog_loading_callback_fired=!0,n(void 0,f)})),d.onerror=f=>n(f),{v:void 0})}},l=0;r.length>l;l++)if(i=s())return i.v}var c=()=>{if(!$e)return n("document not found");var d=$e.createElement("script");if(d.type="text/javascript",d.crossOrigin="anonymous",d.src=t,d.onload=p=>{d.__posthog_loading_callback_fired=!0,n(void 0,p)},d.onerror=p=>n(p),e.config.prepare_external_dependency_script&&(d=e.config.prepare_external_dependency_script(d)),!d)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")$e.head.appendChild(d);else{var f,m=$e.querySelectorAll("body > script");m.length>0?(f=m[0].parentNode)==null||f.insertBefore(d,m[0]):$e.body.appendChild(d)}};$e!=null&&$e.body?c():$e?.addEventListener("DOMContentLoaded",c)};We.__PosthogExtensions__=We.__PosthogExtensions__||{},We.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!=="remote-config"){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var i="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;i=i+"&t="+Math.floor(Date.now()/s)*s}r=e.requestRouter.endpointFor("assets",i)}My(e,r,n)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");My(e,l,n)}},We.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);My(e,r,n)};var Z5="$people_distinct_id",ng="$device_id",yd="__alias",bd="__timers",o1="$autocapture_disabled_server_side",s1="$heatmaps_enabled_server_side",a1="$exception_capture_enabled_server_side",l1="$error_tracking_suppression_rules",c1="$error_tracking_capture_extension_exceptions",u1="$web_vitals_enabled_server_side",ES="$dead_clicks_enabled_server_side",d1="$product_tours_enabled_server_side",f1="$web_vitals_allowed_metrics",wd="$session_recording_remote_config",Y5="$replay_override_sampling",W5="$replay_override_linked_flag",Q5="$replay_override_url_trigger",X5="$replay_override_event_trigger",rg="$sesid",xS="$session_is_sampled",Sc="$enabled_feature_flags",mm="$active_feature_flags",Sd="$early_access_features",h1="$feature_flag_details",p1="$feature_flag_payloads",m1="$feature_flag_request_id",ns="$override_feature_flags",gc="$override_feature_flag_payloads",Ed="$stored_person_properties",Va="$stored_group_properties",g1="$surveys",v1="$surveys_activated",gm="ph_product_tours",Dd="$flag_call_reported",_1="$flag_call_reported_session_id",y1="$feature_flag_errors",ig="$feature_flag_evaluated_at",Wi="$user_state",b1="$client_session_props",w1="$capture_rate_limit",S1="$initial_campaign_params",E1="$initial_referrer_info",og="$initial_person_info",sg="$epp",J5="__POSTHOG_TOOLBAR__",up="$posthog_cookieless",eD="$sdk_debug_extensions_init_method",tD="$sdk_debug_extensions_init_time_ms",nD="$sdk_debug_recording_script_not_loaded",RS="PostHog loadExternalDependency extension not found.",qa="on_reject",os="always",ac="anonymous",lc="identified",x1="identified_only",ag="visibilitychange",lg="beforeunload",vc="$pageview",Py="$pageleave",Ny="$identify",hA="$groupidentify";function dp(e,t){Mt(e)&&e.forEach(t)}function ln(e,t){if(!wt(e))if(Mt(e))e.forEach(t);else if(Gee(e))e.forEach(((r,i)=>t(r,i)));else for(var n in e)R5.call(e,n)&&t(e[n],n)}var Sn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var s in i)i[s]!==void 0&&(e[s]=i[s]);return e};function vm(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var pA=function(e){try{return e()}catch{return}},Mte=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(i){je.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),je.critical(i)}}},OS=function(e){var t={};return ln(e,(function(n,r){(vn(n)&&n.length>0||$i(n))&&(t[r]=n)})),t},Pte=["herokuapp.com","vercel.app","netlify.app"];function Nte(e){var t=e?.hostname;if(!vn(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of Pte)if(n===r)return!1;return!0}function Bn(e,t,n,r){var{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:s})}function rD(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return $i(e)&&isFinite(e)&&Math.floor(e)===e});class cg{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new cg(s)}toString(){for(var t="",n=0;this.bytes.length>n;n++)t=t+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new cg(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;16>n;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class kte{constructor(){this.I=0,this.S=0,this.k=new Dte}generate(){var t=this.generateOrAbort();if(ze(t)){this.I=0;var n=this.generateOrAbort();if(ze(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.I)this.I=t,this.A();else{if(this.I>=t+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return cg.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var mA,iD=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};me&&!ze(me.crypto)&&crypto.getRandomValues&&(iD=e=>crypto.getRandomValues(e));class Dte{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(iD(this.T),this.N=0),this.T[this.N++]}}var Ws=()=>Lte().toString(),Lte=()=>(mA||(mA=new kte)).generate(),td="",$te=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,yo={R:()=>!!$e,B(e){je.error("cookieStore error: "+e)},O(e){if($e){try{for(var t=e+"=",n=$e.cookie.split(";").filter((s=>s.length)),r=0;n.length>r;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}},Z(e){var t;try{t=JSON.parse(yo.O(e))||{}}catch{}return t},M(e,t,n,r,i){if($e)try{var s="",l="",c=(function(m,p){if(p){var g=(function(y,b){if(b===void 0&&(b=$e),td)return td;if(!b||["localhost","127.0.0.1"].includes(y))return"";for(var x=y.split("."),S=Math.min(x.length,8),E="dmn_chk_"+Ws();!td&&S--;){var R=x.slice(S).join("."),C=E+"=1;domain=."+R+";path=/";b.cookie=C+";max-age=3",b.cookie.includes(E)&&(b.cookie=C+";max-age=0",td=R)}return td})(m);if(!g){var v=(y=>{var b=y.match($te);return b?b[0]:""})(m);v!==g&&je.info("Warning: cookie subdomain discovery mismatch",v,g),g=v}return g?"; domain=."+g:""}return""})($e.location.hostname,r);if(n){var d=new Date;d.setTime(d.getTime()+864e5*n),s="; expires="+d.toUTCString()}i&&(l="; secure");var f=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+c+l;return f.length>3686.4&&je.warn("cookieStore warning: large cookie, len="+f.length),$e.cookie=f,f}catch{return}},F(e,t){if($e!=null&&$e.cookie)try{yo.M(e,"",-1,t)}catch{return}}},ky=null,gn={R(){if(!hs(ky))return ky;var e=!0;if(ze(me))e=!1;else try{var t="__mplssupport__";gn.M(t,"xyz"),gn.O(t)!=='"xyz"'&&(e=!1),gn.F(t)}catch{e=!1}return e||je.error("localStorage unsupported; falling back to cookie store"),ky=e,e},B(e){je.error("localStorage error: "+e)},O(e){try{return me?.localStorage.getItem(e)}catch(t){gn.B(t)}return null},Z(e){try{return JSON.parse(gn.O(e))||{}}catch{}return null},M(e,t){try{me?.localStorage.setItem(e,JSON.stringify(t))}catch(n){gn.B(n)}},F(e){try{me?.localStorage.removeItem(e)}catch(t){gn.B(t)}}},jte=[ng,"distinct_id",rg,xS,sg,og,Wi],fp={},Ute={R:()=>!0,B(e){je.error("memoryStorage error: "+e)},O:e=>fp[e]||null,Z:e=>fp[e]||null,M(e,t){fp[e]=t},F(e){delete fp[e]}},$a=null,dr={R(){if(!hs($a))return $a;if($a=!0,ze(me))$a=!1;else try{var e="__support__";dr.M(e,"xyz"),dr.O(e)!=='"xyz"'&&($a=!1),dr.F(e)}catch{$a=!1}return $a},B(e){je.error("sessionStorage error: ",e)},O(e){try{return me?.sessionStorage.getItem(e)}catch(t){dr.B(t)}return null},Z(e){try{return JSON.parse(dr.O(e))||null}catch{}return null},M(e,t){try{me?.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){dr.B(n)}},F(e){try{me?.sessionStorage.removeItem(e)}catch(t){dr.B(t)}}};class zte{constructor(t){this._instance=t}get Bt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.Bt.cookieless_mode===os||this.isRejected()||this.consent===-1&&this.Bt.cookieless_mode===qa}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Bt.opt_out_capturing_by_default}optInOut(t){this.nr.M(this.sr,t?1:0,this.Bt.cookie_expiration,this.Bt.cross_subdomain_cookie,this.Bt.secure_cookie)}reset(){this.nr.F(this.sr,this.Bt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.O(this.sr);return Ty(t)?1:bt(Yee,t)?0:-1}get nr(){var t=this.Bt.opt_out_capturing_persistence_type,n=t==="localStorage"?gn:yo;if(!this.ar||this.ar!==n){this.ar=n;var r=t==="localStorage"?yo:gn;r.O(this.sr)&&(this.ar.O(this.sr)||this.optInOut(Ty(r.O(this.sr))),r.F(this.sr,this.Bt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.Bt.respect_dnt&&[fi?.doNotTrack,fi?.msDoNotTrack,We.doNotTrack].some((t=>Ty(t)))}}var hp=fn("[Dead Clicks]"),Fte=()=>!0,Bte=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(ES)),r=e.instance.config.capture_dead_clicks;return wo(r)?r:!!On(r)||n};class gA{get lazyLoadedDeadClicksAutocapture(){return this.lr}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[ES]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ur((()=>{this.hr()})):this.stop()}ur(t){var n,r;(n=We.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(i=>{i?hp.error("failed to load script",i):t()}))}hr(){var t;if($e){if(!this.lr&&(t=We.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=On(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.lr=We.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.lr.start($e),hp.info("starting...")}}else hp.error("`document` not found. Cannot start.")}stop(){this.lr&&(this.lr.stop(),this.lr=void 0,hp.info("stopping..."))}}var Dy=fn("[SegmentIntegration]"),oD="posthog-js";function sD(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=t===void 0?{}:t;return c=>{var d,f,m,p,g;if(s!=="*"&&!s.includes(c.level)||!e.__loaded)return c;c.tags||(c.tags={});var v=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());c.tags["PostHog Person URL"]=v,e.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var y,b=((d=c.exception)==null?void 0:d.values)||[],x=b.map((E=>ke({},E,{stacktrace:E.stacktrace?ke({},E.stacktrace,{type:"raw",frames:(E.stacktrace.frames||[]).map((R=>ke({},R,{platform:"web:javascript"})))}):void 0}))),S={$exception_message:((f=b[0])==null?void 0:f.value)||c.message,$exception_type:(m=b[0])==null?void 0:m.type,$exception_level:c.level,$exception_list:x,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((p=b[0])==null?void 0:p.value)||c.message,$sentry_exception_type:(g=b[0])==null?void 0:g.type,$sentry_tags:c.tags};return n&&r&&(S.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+c.event_id),l&&((y=e.exceptions)==null||y.sendExceptionEvent(S)),c}}class Vte{constructor(t,n,r,i,s,l){this.name=oD,this.setupOnce=function(c){c(sD(t,{organization:n,projectId:r,prefix:i,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class vA{constructor(t){this.cr=(n,r,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(je.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:i}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,n){var r,i=this.gr(t,n);return this.dr={pathname:(r=me?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),i}doPageLeave(t){var n;return this.gr(t,(n=this.dr)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,n){var r=this.dr;if(!r)return{$pageview_id:n};var i={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:d,maxContentHeight:f,lastContentY:m,maxContentY:p}=s;if(!(ze(l)||ze(c)||ze(d)||ze(f)||ze(m)||ze(p))){l=Math.ceil(l),c=Math.ceil(c),d=Math.ceil(d),f=Math.ceil(f),m=Math.ceil(m),p=Math.ceil(p);var g=l>1?So(c/l,0,1,je):1,v=l>1?So(d/l,0,1,je):1,y=f>1?So(m/f,0,1,je):1,b=f>1?So(p/f,0,1,je):1;i=Sn(i,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:g,$prev_pageview_max_scroll:d,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:m,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:p,$prev_pageview_max_content_percentage:b})}}return r.pathname&&(i.$prev_pageview_pathname=r.pathname),r.timestamp&&(i.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),i}}var qte={[Z5]:{exposure:"hidden"},[yd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[bd]:{exposure:"hidden"},[o1]:{exposure:"event"},[s1]:{exposure:"hidden"},[a1]:{exposure:"event"},[l1]:{exposure:"hidden"},[c1]:{exposure:"event"},[u1]:{exposure:"event"},[ES]:{exposure:"event"},[d1]:{exposure:"hidden"},[f1]:{exposure:"event"},[wd]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[rg]:{exposure:"hidden"},[xS]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[Sc]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!On(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[mm]:{exposure:"event"},[Sd]:{exposure:"hidden"},[h1]:{exposure:"hidden"},[p1]:{exposure:"event"},[m1]:{exposure:"event"},[ns]:{exposure:"event"},[gc]:{exposure:"hidden"},[Ed]:{exposure:"hidden"},[Va]:{exposure:"hidden"},[g1]:{exposure:"hidden"},[v1]:{exposure:"event"},[gm]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Dd]:{exposure:"hidden"},[_1]:{exposure:"hidden"},[y1]:{exposure:"hidden"},[ig]:{exposure:"hidden"},[Wi]:{exposure:"hidden"},[b1]:{exposure:"hidden"},[w1]:{exposure:"hidden"},[S1]:{exposure:"hidden"},[E1]:{exposure:"hidden"},[og]:{exposure:"hidden"},[sg]:{exposure:"hidden"},[Y5]:{exposure:"event"},[W5]:{exposure:"event"},[Q5]:{exposure:"event"},[X5]:{exposure:"event"},[eD]:{exposure:"event"},[tD]:{exposure:"event"},[nD]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},Hte=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],ug=e=>{var t=$e?.createElement("a");return ze(t)?null:(t.href=e,t)},dg=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var s=r[i].split("=");if(s[0]===t){n=s;break}}if(!Mt(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{je.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},ef=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],s=(r[0]||"").split("?"),l=s[1],c=s[0],d=(l||"").split("&"),f=[],m=0;d.length>m;m++){var p=d[m].split("=");Mt(p)&&(t.includes(p[0])?f.push(p[0]+"="+n):f.push(d[m]))}var g=c;return l!=null&&(g+="?"+f.join("&")),i!=null&&(g+="#"+i),g},fg=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},pp="https?://(.*)",Vc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Gte=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Vc],tf="<masked>",Kte=["li_fat_id"];function aD(e,t,n){if(!$e)return{};var r,i=t?[...Vc,...n||[]]:[],s=lD(ef($e.URL,i,tf),e),l=(r={},ln(Kte,(function(c){var d=yo.O(c);r[c]=d||null})),r);return Sn(l,s)}function lD(e,t){var n=Gte.concat(t||[]),r={};return ln(n,(function(i){var s=dg(e,i);r[i]=s||null})),r}function cD(e){var t=(function(s){return s?s.search(pp+"google.([^/?]*)")===0?"google":s.search(pp+"bing.com")===0?"bing":s.search(pp+"yahoo.com")===0?"yahoo":s.search(pp+"duckduckgo.com")===0?"duckduckgo":null:null})(e),n=t!="yahoo"?"q":"p",r={};if(!hs(t)){r.$search_engine=t;var i=$e?dg($e.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function _A(){return navigator.language||navigator.userLanguage}var hg="$direct";function uD(){return $e?.referrer||hg}function dD(e,t){var n=e?[...Vc,...t||[]]:[],r=ur?.href.substring(0,1e3);return{r:uD().substring(0,1e3),u:r?ef(r,n,tf):void 0}}function fD(e){var t,{r:n,u:r}=e,i={$referrer:n,$referring_domain:n==null?void 0:n==hg?hg:(t=ug(n))==null?void 0:t.host};if(r){i.$current_url=r;var s=ug(r);i.$host=s?.host,i.$pathname=s?.pathname;var l=lD(r);Sn(i,l)}if(n){var c=cD(n);Sn(i,c)}return i}function hD(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Zte(){try{return new Date().getTimezoneOffset()}catch{return}}var Yte=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Ly{constructor(t,n){this.Bt=t,this.props={},this.mr=!1,this.yr=(r=>{var i="";return r.token&&(i=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+i+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&je.info("Persistence loaded",t.persistence,ke({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this._r}br(t){Yte.indexOf(t.persistence.toLowerCase())===-1&&(je.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=(function(i){i===void 0&&(i=[]);var s=[...jte,...i];return ke({},gn,{Z(l){try{var c={};try{c=yo.Z(l)||{}}catch{}var d=Sn(c,JSON.parse(gn.O(l)||"{}"));return gn.M(l,d),d}catch{}return null},M(l,c,d,f,m,p){try{gn.M(l,c,void 0,void 0,p);var g={};s.forEach((v=>{c[v]&&(g[v]=c[v])})),Object.keys(g).length&&yo.M(l,g,d,f,m,p)}catch(v){gn.B(v)}},F(l,c){try{me?.localStorage.removeItem(l),yo.F(l,c)}catch(d){gn.B(d)}}})})(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&gn.R()?gn:r==="localstorage+cookie"&&n.R()?n:r==="sessionstorage"&&dr.R()?dr:r==="memory"?Ute:r==="cookie"?yo:n.R()?n:yo}wr(t){var n=t??this.Bt.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[ig];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return ln(this.props,((n,r)=>{var i=(s=>{var l=qte[s];if(l)return l;for(var[c,d]of Hte)if(s.indexOf(c)===0)return d})(r);if(i?.exposure==="derived"){if(i.shouldSkipFromEventProperties!=null&&i.shouldSkipFromEventProperties(n,r===Sc?()=>this.wr():()=>!1))return;i.transformToEventProperties&&Sn(t,i.transformToEventProperties(n))}else i&&i.exposure!=="event"||(t[r]=n)})),t}load(){if(!this._r){var t=this.nr.Z(this.yr);t&&(this.props=Sn({},t))}}save(){this._r||this.nr.M(this.yr,this.props,this.Ir,this.Cr,this.Sr,this.Bt.debug)}remove(){this.nr.F(this.yr,!1),this.nr.F(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(On(t)){ze(n)&&(n="None"),this.Ir=ze(r)?this.kr:r;var i=!1;if(ln(t,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Tr(l,s),i=!0)})),i)return this.save(),!0}return!1}register(t,n){if(On(t)){this.Ir=ze(n)?this.kr:n;var r=!1;if(ln(t,((i,s)=>{t.hasOwnProperty(s)&&this.props[s]!==i&&(this.Tr(s,i),r=!0)})),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Ar(t),this.save())}update_campaign_params(){if(!this.mr){var t=aD(this.Bt.custom_campaign_params,this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties);wc(OS(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=$e?.referrer)?cD(t):{})}update_referrer_info(){var t;this.register_once({$referrer:uD(),$referring_domain:$e!=null&&$e.referrer&&((t=ug($e.referrer))==null?void 0:t.host)||hg},void 0)}set_initial_person_info(){this.props[S1]||this.props[E1]||this.register_once({[og]:dD(this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};ln([E1,S1],(l=>{var c=this.props[l];c&&ln(c,(function(d,f){t["$initial_"+e1(f)]=d}))}));var n,r,i=this.props[og];if(i){var s=(n=fD(i),r={},ln(n,(function(l,c){r["$initial_"+e1(c)]=l})),r);Sn(t,s)}return t}safe_merge(t){return ln(this.props,(function(n,r){r in t||(t[r]=n)})),t}update_config(t,n,r){if(this.kr=this.Ir=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence||!((l,c)=>{if(l.length!==c.length)return!1;var d=[...l].sort(),f=[...c].sort();return d.every(((m,p)=>m===f[p]))})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var i=this.br(t),s=this.props;this.clear(),this.nr=i,this.props=s,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_secure(t){t!==this.Sr&&(this.Sr=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[bd]||{};r[t]=n,this.Tr(bd,r),this.save()}remove_event_timer(t){var n=this.props[bd]||{},r=n[t];return ze(r)||(delete n[t],this.Tr(bd,n),this.save()),r}get_property(t){return this.props[t]}set_property(t,n){this.Tr(t,n),this.save()}Tr(t,n){this.props[t]=n}Ar(t){delete this.props[t]}}var nd={Activation:"events",Cancellation:"cancelEvents"},$y={Popover:"popover",API:"api",Widget:"widget"},xd={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},jy={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},R1={Popover:"popover",Inline:"inline"},Wte={SHOWN:"product tour shown"},yA={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},bA=fn("[RateLimiter]");class Qte{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((i=>{bA.info((i||"events")+" is quota limited."),this.serverLimits[i]=new Date().getTime()+6e4}))}catch(i){return void bA.warn('could not rate limit - continuing. Error: "'+i?.message+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,i;t===void 0&&(t=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),d=(n=(r=this.instance.persistence)==null?void 0:r.get_property(w1))!==null&&n!==void 0?n:{tokens:s,last:c};d.tokens+=(c-d.last)/1e3*l,d.last=c,d.tokens>s&&(d.tokens=s);var f=1>d.tokens;return f||t||(d.tokens=Math.max(0,d.tokens-1)),!f||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=f,(i=this.instance.persistence)==null||i.set_property(w1,d),{isRateLimited:f,remainingTokens:d.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var rd=fn("[RemoteConfig]");class pD{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=We._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Er(t){var n,r;(n=We.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Rr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){t(n.json)}})}load(){try{if(this.remoteConfig)return rd.info("Using preloaded remote config",this.remoteConfig),this.Nr(this.remoteConfig),void this.Mr();if(this._instance.Fr())return void rd.warn("Remote config is disabled. Falling back to local config.");this.Er((t=>{if(!t)return rd.info("No config found after loading remote JS config. Falling back to JSON."),void this.Rr((n=>{this.Nr(n),this.Mr()}));this.Nr(t),this.Mr()}))}catch(t){rd.error("Error loading remote config",t)}}stop(){this.Or&&(clearInterval(this.Or),this.Or=void 0)}refresh(){this._instance.Fr()||$e?.visibilityState==="hidden"||this._instance.reloadFeatureFlags()}Mr(){var t;if(!this.Or){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Or=setInterval((()=>{this.refresh()}),n))}}Nr(t){var n;t||rd.error("Failed to fetch remote config from PostHog."),this._instance.Nr(t??{}),t?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var mo={GZipJS:"gzip-js",Base64:"base64"},Li=Uint8Array,Zr=Uint16Array,qc=Uint32Array,TS=new Li([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),CS=new Li([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wA=new Li([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mD=function(e,t){for(var n=new Zr(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new qc(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)i[s]=s-n[r]<<5|r;return[n,i]},gD=mD(TS,2),O1=gD[1];gD[0][28]=258,O1[258]=28;for(var SA=mD(CS,0)[1],vD=new Zr(32768),cn=0;32768>cn;++cn){var cc=(43690&cn)>>>1|(21845&cn)<<1;vD[cn]=((65280&(cc=(61680&(cc=(52428&cc)>>>2|(13107&cc)<<2))>>>4|(3855&cc)<<4))>>>8|(255&cc)<<8)>>>1}var Ld=function(e,t,n){for(var r=e.length,i=0,s=new Zr(t);r>i;++i)++s[e[i]-1];var l,c=new Zr(t);for(i=0;t>i;++i)c[i]=c[i-1]+s[i-1]<<1;for(l=new Zr(r),i=0;r>i;++i)l[i]=vD[c[e[i]-1]++]>>>15-e[i];return l},sl=new Li(288);for(cn=0;144>cn;++cn)sl[cn]=8;for(cn=144;256>cn;++cn)sl[cn]=9;for(cn=256;280>cn;++cn)sl[cn]=7;for(cn=280;288>cn;++cn)sl[cn]=8;var pg=new Li(32);for(cn=0;32>cn;++cn)pg[cn]=5;var Xte=Ld(sl,9),Jte=Ld(pg,5),_D=function(e){return(e/8>>0)+(7&e&&1)},yD=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Zr?Zr:e instanceof qc?qc:Li)(n-t);return r.set(e.subarray(t,n)),r},Qo=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},id=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Uy=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new Li(0),0];if(i==1){var l=new Li(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(O,A){return O.f-A.f})),n.push({s:-1,f:25001});var c=n[0],d=n[1],f=0,m=1,p=2;for(n[0]={s:-1,f:c.f+d.f,l:c,r:d};m!=i-1;)c=n[n[p].f>n[f].f?f++:p++],d=n[f!=m&&n[p].f>n[f].f?f++:p++],n[m++]={s:-1,f:c.f+d.f,l:c,r:d};var g=s[0].s;for(r=1;i>r;++r)s[r].s>g&&(g=s[r].s);var v=new Zr(g+1),y=T1(n[m-1],v,0);if(y>t){r=0;var b=0,x=y-t,S=1<<x;for(s.sort((function(O,A){return v[A.s]-v[O.s]||O.f-A.f}));i>r;++r){var E=s[r].s;if(t>=v[E])break;b+=S-(1<<y-v[E]),v[E]=t}for(b>>>=x;b>0;){var R=s[r].s;t>v[R]?b-=1<<t-v[R]++-1:++r}for(;r>=0&&b;--r){var C=s[r].s;v[C]==t&&(--v[C],++b)}y=t}return[new Li(v),y]},T1=function(e,t,n){return e.s==-1?Math.max(T1(e.l,t,n+1),T1(e.r,t,n+1)):t[e.s]=n},EA=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Zr(++t),r=0,i=e[0],s=1,l=function(d){n[r++]=d},c=1;t>=c;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[n.subarray(0,r),t]},od=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},C1=function(e,t,n){var r=n.length,i=_D(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;r>s;++s)e[i+s+4]=n[s];return 8*(i+4+r)},xA=function(e,t,n,r,i,s,l,c,d,f,m){Qo(t,m++,n),++i[256];for(var p=Uy(i,15),g=p[0],v=p[1],y=Uy(s,15),b=y[0],x=y[1],S=EA(g),E=S[0],R=S[1],C=EA(b),O=C[0],A=C[1],M=new Zr(19),P=0;E.length>P;++P)M[31&E[P]]++;for(P=0;O.length>P;++P)M[31&O[P]]++;for(var L=Uy(M,7),H=L[0],j=L[1],B=19;B>4&&!H[wA[B-1]];--B);var U,Z,re,q,W=f+5<<3,ee=od(i,sl)+od(s,pg)+l,ae=od(i,g)+od(s,b)+l+14+3*B+od(M,H)+(2*M[16]+3*M[17]+7*M[18]);if(ee>=W&&ae>=W)return C1(t,m,e.subarray(d,d+f));if(Qo(t,m,1+(ee>ae)),m+=2,ee>ae){U=Ld(g,v),Z=g,re=Ld(b,x),q=b;var Q=Ld(H,j);for(Qo(t,m,R-257),Qo(t,m+5,A-1),Qo(t,m+10,B-4),m+=14,P=0;B>P;++P)Qo(t,m+3*P,H[wA[P]]);m+=3*B;for(var k=[E,O],K=0;2>K;++K){var V=k[K];for(P=0;V.length>P;++P)Qo(t,m,Q[D=31&V[P]]),m+=H[D],D>15&&(Qo(t,m,V[P]>>>5&127),m+=V[P]>>>12)}}else U=Xte,Z=sl,re=Jte,q=pg;for(P=0;c>P;++P)if(r[P]>255){var D;id(t,m,U[257+(D=r[P]>>>18&31)]),m+=Z[D+257],D>7&&(Qo(t,m,r[P]>>>23&31),m+=TS[D]);var F=31&r[P];id(t,m,re[F]),m+=q[F],F>3&&(id(t,m,r[P]>>>5&8191),m+=CS[F])}else id(t,m,U[r[P]]),m+=Z[r[P]];return id(t,m,U[256]),m+Z[256]},ene=new qc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tne=(function(){for(var e=new qc(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e})(),zy=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function nne(e,t){t===void 0&&(t={});var n=(function(){var p=4294967295;return{p(g){for(var v=p,y=0;g.length>y;++y)v=tne[255&v^g[y]]^v>>>8;p=v},d(){return 4294967295^p}}})(),r=e.length;n.p(e);var i,s,l,c,d,f=(c=10+((i=t).filename&&i.filename.length+1||0),d=8,(function(p,g,v,y,b,x){var S=p.length,E=new Li(y+S+5*(1+Math.floor(S/7e3))+b),R=E.subarray(y,E.length-b),C=0;if(!g||8>S)for(var O=0;S>=O;O+=65535){var A=O+65535;S>A?C=C1(R,C,p.subarray(O,A)):(R[O]=!0,C=C1(R,C,p.subarray(O,S)))}else{for(var M=ene[g-1],P=M>>>13,L=8191&M,H=(1<<v)-1,j=new Zr(32768),B=new Zr(H+1),U=Math.ceil(v/3),Z=2*U,re=function(Me){return(p[Me]^p[Me+1]<<U^p[Me+2]<<Z)&H},q=new qc(25e3),W=new Zr(288),ee=new Zr(32),ae=0,Q=0,k=(O=0,0),K=0,V=0;S>O;++O){var D=re(O),F=32767&O,X=B[D];if(j[F]=X,B[D]=F,O>=K){var fe=S-O;if((ae>7e3||k>24576)&&fe>423){C=xA(p,R,0,q,W,ee,Q,k,V,O-V,C),k=ae=Q=0,V=O;for(var pe=0;286>pe;++pe)W[pe]=0;for(pe=0;30>pe;++pe)ee[pe]=0}var xe=2,Ue=0,Y=L,te=F-X&32767;if(fe>2&&D==re(O-te))for(var ve=Math.min(P,fe)-1,se=Math.min(32767,O),we=Math.min(258,fe);se>=te&&--Y&&F!=X;){if(p[O+xe]==p[O+xe-te]){for(var Oe=0;we>Oe&&p[O+Oe]==p[O+Oe-te];++Oe);if(Oe>xe){if(xe=Oe,Ue=te,Oe>ve)break;var nt=Math.min(te,Oe-2),ot=0;for(pe=0;nt>pe;++pe){var Be=O-te+pe+32768&32767,Xe=Be-j[Be]+32768&32767;Xe>ot&&(ot=Xe,X=Be)}}}te+=(F=X)-(X=j[F])+32768&32767}if(Ue){q[k++]=268435456|O1[xe]<<18|SA[Ue];var Ne=31&O1[xe],Pe=31&SA[Ue];Q+=TS[Ne]+CS[Pe],++W[257+Ne],++ee[Pe],K=O+xe,++ae}else q[k++]=p[O],++W[p[O]]}}C=xA(p,R,!0,q,W,ee,Q,k,V,O-V,C)}return yD(E,0,y+_D(C)+b)})(s=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,d)),m=f.length;return(function(p,g){var v=g.filename;if(p[0]=31,p[1]=139,p[2]=8,p[8]=2>g.level?4:g.level==9?2:0,p[9]=3,g.mtime!=0&&zy(p,4,Math.floor(new Date(g.mtime||Date.now())/1e3)),v){p[3]=8;for(var y=0;v.length>=y;++y)p[y+10]=v.charCodeAt(y)}})(f,t),zy(f,m-8,n.d()),zy(f,m-4,r),f}var rne=!!Xb||!!Qb,bD="text/plain",RA=!1,Xg=function(e,t,n){var r;n===void 0&&(n=!0);var[i,s]=e.split("?"),l=ke({},t),c=(r=s?.split("&").map((f=>{var m,[p,g]=f.split("="),v=n&&(m=l[p])!==null&&m!==void 0?m:g;return delete l[p],p+"="+v})))!==null&&r!==void 0?r:[],d=(function(f,m){var p,g;m===void 0&&(m="&");var v=[];return ln(f,(function(y,b){ze(y)||ze(b)||b==="undefined"||(p=encodeURIComponent((x=>x instanceof File)(y)?y.name:y.toString()),g=encodeURIComponent(b),v[v.length]=g+"="+p)})),v.join(m)})(l);return d&&c.push(d),i+"?"+c.join("&")},Ec=(e,t)=>JSON.stringify(e,((n,r)=>typeof r=="bigint"?r.toString():r),t),Fy=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===mo.GZipJS){var r=nne((function(c,d){var f=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var m=new Li(c.length+(c.length>>>1)),p=0,g=function(x){m[p++]=x},v=0;f>v;++v){if(p+5>m.length){var y=new Li(p+8+(f-v<<1));y.set(m),m=y}var b=c.charCodeAt(v);128>b?g(b):2048>b?(g(192|b>>>6),g(128|63&b)):b>55295&&57344>b?(g(240|(b=65536+(1047552&b)|1023&c.charCodeAt(++v))>>>18),g(128|b>>>12&63),g(128|b>>>6&63),g(128|63&b)):(g(224|b>>>12),g(128|b>>>6&63),g(128|63&b))}return yD(m,0,p)})(Ec(t)),{mtime:0});return{contentType:bD,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===mo.Base64){var i=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((d,f)=>String.fromCharCode(parseInt(f,16)))))})(Ec(t)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:Ec(c)))(i);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=Ec(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},ine=(function(){var e=Pi((function*(t){var n=Ec(t.data),r=yield(function(s,l,c){return Jb.apply(this,arguments)})(n,Nr.DEBUG,{rethrow:!0});if(!r)return t;var i=yield r.arrayBuffer();return ke({},t,{tr:{contentType:bD,body:i,estimatedSize:i.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),OA=(e,t)=>Xg(e,{_:new Date().getTime().toString(),ver:Nr.JS_SDK_VERSION,compression:t}),_m=[];Qb&&_m.push({transport:"fetch",method(e){var t,n,{contentType:r,body:i,estimatedSize:s}=(t=Fy(e))!==null&&t!==void 0?t:{},l=new Headers;ln(e.headers,(function(m,p){l.append(p,m)})),r&&l.append("Content-Type",r);var c=e.url,d=null;if(rA){var f=new rA;d={signal:f.signal,timeout:setTimeout((()=>f.abort()),e.timeout)}}Qb(c,ke({method:e?.method||"GET",headers:l,keepalive:e.method==="POST"&&52428.8>(s||0),body:i,signal:(n=d)==null?void 0:n.signal},e.fetchOptions)).then((m=>m.text().then((p=>{var g={statusCode:m.status,text:p};if(m.status===200)try{g.json=JSON.parse(p)}catch(v){je.error(v)}e.callback==null||e.callback(g)})))).catch((m=>{je.error(m),e.callback==null||e.callback({statusCode:0,error:m})})).finally((()=>d?clearTimeout(d.timeout):null))}}),Xb&&_m.push({transport:"XHR",method(e){var t,n=new Xb;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:i}=(t=Fy(e))!==null&&t!==void 0?t:{};ln(e.headers,(function(s,l){n.setRequestHeader(l,s)})),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(s)}},n.send(i)}}),fi!=null&&fi.sendBeacon&&_m.push({transport:"sendBeacon",method(e){var t=Xg(e.url,{beacon:"1"});try{var n,{contentType:r,body:i}=(n=Fy(e))!==null&&n!==void 0?n:{};if(!i)return;var s=i instanceof Blob?i:new Blob([i],{type:r});fi.sendBeacon(t,s)}catch{}}});var A1=3e3;class one{constructor(t,n){this.Pr=!0,this.Lr=[],this.Dr=So(n?.flush_interval_ms||A1,250,5e3,je.createLogger("flush interval"),A1),this.Br=t}enqueue(t){this.Lr.push(t),this.jr||this.$r()}unload(){this.qr();var t=this.Lr.length>0?this.Zr():{},n=Object.values(t);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Br(ke({},r,{transport:"sendBeacon"}))}))}enable(){this.Pr=!1,this.$r()}$r(){var t=this;this.Pr||(this.jr=setTimeout((()=>{if(this.qr(),this.Lr.length>0){var n=this.Zr(),r=function(){var s=n[i],l=new Date().getTime();s.data&&Mt(s.data)&&ln(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.Br(s)};for(var i in n)r()}}),this.Dr))}qr(){clearTimeout(this.jr),this.jr=void 0}Zr(){var t={};return ln(this.Lr,(n=>{var r,i=n,s=(i?i.batchKey:null)||i.url;ze(t[s])&&(t[s]=ke({},i,{data:[]})),(r=t[s].data)==null||r.push(i.data)})),this.Lr=[],t}}var sne=["retriesPerformedSoFar"];class ane{constructor(t){this.Vr=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.zr=!0,!ze(me)&&"onLine"in me.navigator&&(this.zr=me.navigator.onLine,this.Ur=()=>{this.zr=!0,this.Yr()},this.Gr=()=>{this.zr=!1},Bn(me,"online",this.Ur),Bn(me,"offline",this.Gr))}get length(){return this.Lr.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=E5(t,sne);mc(n)&&(r.url=Xg(r.url,{retry_count:n})),this._instance._send_request(ke({},r,{callback:i=>{i.statusCode===200||i.statusCode>=400&&500>i.statusCode||(n??0)>=10?r.callback==null||r.callback(i):this.Wr(ke({retriesPerformedSoFar:n},r))}}))}Wr(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=(function(l){var c=3e3*Math.pow(2,l),d=c/2,f=Math.min(18e5,c),m=Math.random()-.5;return Math.ceil(f+m*(f-d))})(n),i=Date.now()+r;this.Lr.push({retryAt:i,requestOptions:t});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),je.warn(s),this.Vr||(this.Vr=!0,this.Xr())}Xr(){if(this.Jr&&clearTimeout(this.Jr),this.Lr.length===0)return this.Vr=!1,void(this.Jr=void 0);this.Jr=setTimeout((()=>{this.zr&&this.Lr.length>0&&this.Yr(),this.Xr()}),this.Hr)}Yr(){var t=Date.now(),n=[],r=this.Lr.filter((s=>t>s.retryAt||(n.push(s),!1)));if(this.Lr=n,r.length>0)for(var{requestOptions:i}of r)this.retriableRequest(i)}unload(){for(var{requestOptions:t}of(this.Jr&&(clearTimeout(this.Jr),this.Jr=void 0),this.Vr=!1,ze(me)||(this.Ur&&(me.removeEventListener("online",this.Ur),this.Ur=void 0),this.Gr&&(me.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Lr))try{this._instance._send_request(ke({},t,{transport:"sendBeacon"}))}catch(n){je.error(n)}this.Lr=[]}}class lne{constructor(t){this.Kr=()=>{var n,r,i,s;this.Qr||(this.Qr={});var l=this.scrollElement(),c=this.scrollY(),d=l?Math.max(0,l.scrollHeight-l.clientHeight):0,f=c+(l?.clientHeight||0),m=l?.scrollHeight||0;this.Qr.lastScrollY=Math.ceil(c),this.Qr.maxScrollY=Math.max(c,(n=this.Qr.maxScrollY)!==null&&n!==void 0?n:0),this.Qr.maxScrollHeight=Math.max(d,(r=this.Qr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Qr.lastContentY=f,this.Qr.maxContentY=Math.max(f,(i=this.Qr.maxContentY)!==null&&i!==void 0?i:0),this.Qr.maxContentHeight=Math.max(m,(s=this.Qr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Qr}resetContext(){var t=this.Qr;return setTimeout(this.Kr,0),t}startMeasuringScrollPosition(){Bn(me,"scroll",this.Kr,{capture:!0}),Bn(me,"scrollend",this.Kr,{capture:!0}),Bn(me,"resize",this.Kr)}scrollElement(){if(!this.ei)return me?.document.documentElement;var t=Mt(this.ei)?this.ei:[this.ei];for(var n of t){var r=me?.document.querySelector(n);if(r)return r}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return me&&(me.scrollY||me.pageYOffset||me.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return me&&(me.scrollX||me.pageXOffset||me.document.documentElement.scrollLeft)||0}}var cne=e=>dD(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class TA{constructor(t,n,r,i){this.ti=s=>{var l=this.ri();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.ii(this._instance)};this.ni.register({[b1]:c})}},this._instance=t,this.si=n,this.ni=r,this.ii=i||cne,this.si.onSessionId(this.ti)}ri(){return this.ni.props[b1]}getSetOnceProps(){var t,n=(t=this.ri())==null?void 0:t.props;return n?"r"in n?fD(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return ln(OS(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+e1(r)]=n})),t}}class AS{constructor(){this.oi={}}on(t,n){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(n),()=>{this.oi[t]=this.oi[t].filter((r=>r!==n))}}emit(t,n){for(var r of this.oi[t]||[])r(n);for(var i of this.oi["*"]||[])i(t,n)}}var By=fn("[SessionId]");class CA{on(t,n){return this.ai.on(t,n)}constructor(t,n,r){var i;if(this.li=[],this.ui=void 0,this.ai=new AS,this.hi=(f,m)=>!(!mc(f)||!mc(m))&&Math.abs(f-m)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===os)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Bt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=n||Ws,this.fi=r||Ws;var s=this.Bt.persistence_name||this.Bt.token;if(this._sessionTimeoutMs=1e3*So(this.Bt.session_idle_timeout_seconds||1800,60,36e3,By.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var l=dr.Z(this.gi),c=dr.Z(this.mi);l&&!c?this.ci=l:dr.F(this.gi),dr.M(this.mi,!0)}if((i=this.Bt.bootstrap)!=null&&i.sessionID)try{var d=(f=>{var m=this.Bt.bootstrap.sessionID.replace(/-/g,"");if(m.length!==32)throw new Error("Not a valid UUID");if(m[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(m.substring(0,12),16)})();this.bi(this.Bt.bootstrap.sessionID,new Date().getTime(),d)}catch(f){By.error("Invalid sessionID in bootstrap",f)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return ze(this.li)&&(this.li=[]),this.li.push(t),this.di&&t(this.di,this.ci),()=>{this.li=this.li.filter((n=>n!==t))}}yi(){return this.Bt.persistence!=="memory"&&!this.ni._r&&dr.R()}Ii(t){t!==this.ci&&(this.ci=t,this.yi()&&dr.M(this.gi,t))}Ci(){return this.ci?this.ci:this.yi()?dr.Z(this.gi):null}bi(t,n,r){t===this.di&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.di=t,this.ni.register({[rg]:[n,t,r]}))}Si(){var t=this.ni.props[rg];return Mt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.xi),this.xi=void 0,this.ui&&me&&(me.removeEventListener(lg,this.ui,{capture:!1}),this.ui=void 0),this.li=[]}wi(){this.ui=()=>{this.yi()&&dr.F(this.mi)},Bn(me,lg,this.ui,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.Bt.cookieless_mode===os)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[i,s,l]=this.Si(),c=this.Ci(),d=mc(l)&&Math.abs(r-l)>864e5,f=!1,m=!s,p=!m&&!t&&this.hi(r,i);m||p||d?(s=this.vi(),c=this.fi(),By.info("new session ID generated",{sessionId:s,windowId:c,changeReason:{noSessionId:m,activityTimeout:p,sessionPastMaximumLength:d}}),l=r,f=!0):c||(c=this.fi(),f=!0);var g=mc(i)&&t&&!d?i:r,v=mc(l)?l:new Date().getTime();return this.Ii(c),this.bi(s,g,v),t||this.pi(),f&&this.li.forEach((y=>y(s,c,f?{noSessionId:m,activityTimeout:p,sessionPastMaximumLength:d}:void 0))),{sessionId:s,windowId:c,sessionStartTimestamp:v,changeReason:f?{noSessionId:m,activityTimeout:p,sessionPastMaximumLength:d}:void 0,lastActivityTimestamp:i}}pi(){clearTimeout(this.xi),this.xi=setTimeout((()=>{var[t]=this.Si();if(this.hi(new Date().getTime(),t)){var n=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)}}var wD=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&sA(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((i=>sA(i?.brand,t))))return!0}catch{}return!!e.webdriver},mg=function(e,t){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function AA(e,t,n){return Ec({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var SD={exact:(e,t)=>t.some((n=>e.some((r=>n===r)))),is_not:(e,t)=>t.every((n=>e.every((r=>n!==r)))),regex:(e,t)=>t.some((n=>e.some((r=>mg(n,r))))),not_regex:(e,t)=>t.every((n=>e.every((r=>!mg(n,r))))),icontains:(e,t)=>t.map(mp).some((n=>e.map(mp).some((r=>n.includes(r))))),not_icontains:(e,t)=>t.map(mp).every((n=>e.map(mp).every((r=>!n.includes(r))))),gt:(e,t)=>t.some((n=>{var r=parseFloat(n);return!isNaN(r)&&e.some((i=>r>parseFloat(i)))})),lt:(e,t)=>t.some((n=>{var r=parseFloat(n);return!isNaN(r)&&e.some((i=>r<parseFloat(i)))}))},mp=e=>e.toLowerCase();function ED(e,t){return!e||Object.entries(e).every((n=>{var[r,i]=n,s=t?.[r];if(ze(s)||hs(s))return!1;var l=[String(s)],c=SD[i.operator];return!!c&&c(i.values,l)}))}var I1="custom",IA="i.posthog.com",une=/^\/static\//;class dne{constructor(t){this.ki={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+IA,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.ki[this.apiHost]||(this.ki[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":I1),this.ki[this.apiHost]}Ti(t){var n=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof n=="string"&&une.test(t))return n.trim().replace(/\/$/,"")||void 0}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(t==="assets"){var r=this.Ti(n);if(r)return""+r+n}if(this.region===I1)return this.apiHost+n;var i=IA+n;switch(t){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var Qt=fn("[Surveys]"),M1="seenSurvey_",fne=[$y.Popover,$y.Widget,$y.API],hne={ignoreConditions:!1,ignoreDelay:!1,displayType:R1.Popover},pne=fn("[PostHog ExternalIntegrations]"),mne={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class gne{constructor(t){this._instance=t}ur(t,n){var r;(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,(i=>{if(i)return pne.error("failed to load script",i);n()}))}startIfEnabledOrStop(){var t=this,n=function(l){var c,d,f;!i||(c=We.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||t.ur(mne[l],(()=>{var m;(m=We.__PosthogExtensions__)==null||(m=m.integrations)==null||(m=m[l])==null||m.start(t._instance)})),!i&&(d=We.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[l]&&((f=We.__PosthogExtensions__)==null||(f=f.integrations)==null||(f=f[l])==null||f.stop())};for(var[r,i]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var uc,$d={},Vy=0,P1=()=>{},MA='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',sd="Surveys module not available",PA="sanitize_properties is deprecated. Use before_send instead",xD="Invalid value for property_denylist config: ",_c="posthog",RD=!rne&&Gr?.indexOf("MSIE")===-1&&Gr?.indexOf("Mozilla")===-1,NA=e=>{var t;return ke({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Nte($e?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:P1,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:ur&&vn(ur?.search)&&ur.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(me==null||(t=me.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){je.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:x1,before_send:void 0,request_queue_config:{flush_interval_ms:A1},error_tracking:{},_onCapture:P1,__preview_eager_load_replay:!1},(n=>({rageclick:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},vne=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],kA=e=>{var t={};for(var[n,r]of vne)ze(e[n])||(t[r]=e[n]);var i=Sn({},t,e);return Mt(e.property_blacklist)&&(ze(e.property_denylist)?i.property_denylist=e.property_blacklist:Mt(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:je.error(xD+e.property_denylist)),i};class _ne{constructor(){this.__forceAllowLocalhost=!1}get Ai(){return this.__forceAllowLocalhost}set Ai(t){je.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Ni{Ei(t,n){if(t){var r=this.Ri.indexOf(t);r!==-1&&this.Ri.splice(r,1)}return this.Ri.push(n),n.initialize==null||n.initialize(),n}Ni(){return this.config.cookieless_mode===os||this.config.cookieless_mode===qa&&this.consent.isRejected()}get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new _ne,this.Mi=!1,this.version=Nr.LIB_VERSION,this.Fi=new AS,this.Ri=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=NA(),this.SentryIntegration=Vte,this.sentryIntegration=r=>(function(i,s){var l=sD(i,s);return{name:oD,processEvent:c=>l(c)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Oi=!1,this.Pi=null,this.Li=null,this.Di=null,this.scrollManager=new lne(this),this.pageViewManager=new vA(this),this.rateLimiter=new Qte(this),this.requestRouter=new dne(this),this.consent=new zte(this),this.externalIntegrations=new gne(this);var n=(t=Ni.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,i,s)=>{var l=vn(r)?{[r]:i}:r;this.setPersonProperties(l),s?.({})},set_once:(r,i,s)=>{var l=vn(r)?{[r]:i}:r;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(r=>je.info('send "'+r?.event+'"',r)))}init(t,n,r){if(r&&r!==_c){var i,s=(i=$d[r])!==null&&i!==void 0?i:new Ni;return s._init(t,n,r),$d[r]=s,$d[_c][r]=s,s}return this._init(t,n,r)}_init(t,n,r){var i,s;if(n===void 0&&(n={}),ze(t)||pm(t))return je.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Bi(n.debug),this.ji=n,this.$i=[],n.person_profiles?this.Li=n.person_profiles:n.process_person&&(this.Li=n.process_person),this.set_config(Sn({},NA(n.defaults),kA(n),{name:r,token:t})),this.config.on_xhr_error&&je.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:mo.GZipJS;var l=this.qi();this.persistence=new Ly(this.config,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Ly(ke({},this.config,{persistence:"sessionStorage"}),l);var c=ke({},this.persistence.props),d=ke({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Zi=new one((x=>this.Vi(x)),this.config.request_queue_config),this.Hi=new ane(this),this.__request_queue=[];var f=this.Ni();if(f||(this.sessionManager=new CA(this),this.sessionPropsManager=new TA(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(je.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.zi(f)}),0)):(je.info("Initializing extensions synchronously"),this.zi(f)),Nr.DEBUG=Nr.DEBUG||this.config.debug,Nr.DEBUG&&je.info("Starting in debug mode",{this:this,config:n,thisC:ke({},this.config),p:c,s:d}),!this.config.identity_distinct_id||(i=n.bootstrap)!=null&&i.distinctID||(n.bootstrap=ke({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var m=n.bootstrap.distinctID,p=this.get_distinct_id(),g=this.persistence.get_property(Wi);if(n.bootstrap.isIdentifiedID&&p!=null&&p!==m&&g===ac)this.identify(m);else if(n.bootstrap.isIdentifiedID&&p!=null&&p!==m&&g===lc)je.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var v=this.config.get_device_id(Ws()),y=n.bootstrap.isIdentifiedID?v:m;this.persistence.set_property(Wi,n.bootstrap.isIdentifiedID?lc:ac),this.register({distinct_id:m,$device_id:y})}}if(f)this.register_once({distinct_id:up,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(Ws());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(Wi,ac)}return Bn(me,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(x,S){var E=x.config.segment;if(!E)return S();(function(R,C){var O=R.config.segment;if(!O)return C();var A=P=>{var L=()=>P.anonymousId()||Ws();R.config.get_device_id=L,P.id()&&(R.register({distinct_id:P.id(),$device_id:L()}),R.persistence.set_property(Wi,lc)),C()},M=O.user();"then"in M&&rs(M.then)?M.then(A):A(M)})(x,(()=>{E.register((R=>{Promise&&Promise.resolve||Dy.warn("This browser does not have Promise support, and can not use the segment integration");var C=(O,A)=>{if(!A)return O;O.event.userId||O.event.anonymousId===R.get_distinct_id()||(Dy.info("No userId set, resetting PostHog"),R.reset()),O.event.userId&&O.event.userId!==R.get_distinct_id()&&(Dy.info("UserId set, identifying with PostHog"),R.identify(O.event.userId));var M=R.calculateEventProperties(A,O.event.properties);return O.event.properties=Object.assign({},M,O.event.properties),O};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:O=>C(O,O.event.event),page:O=>C(O,vc),identify:O=>C(O,Ny),screen:O=>C(O,"$screen")}})(x)).then((()=>{S()}))}))})(this,(()=>this.Ui())):this.Ui(),rs(this.config._onCapture)&&this.config._onCapture!==P1&&(je.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(x=>this.config._onCapture(x.event,x)))),this.config.ip&&je.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}zi(t){var n,r,i,s,l,c,d,f=performance.now(),m=ke({},Ni.__defaultExtensionClasses,this.config.__extensionClasses),p=[];m.featureFlags&&this.Ri.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new m.featureFlags(this)),m.exceptions&&this.Ri.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new m.exceptions(this)),m.historyAutocapture&&this.Ri.push(this.historyAutocapture=new m.historyAutocapture(this)),m.tracingHeaders&&this.Ri.push(new m.tracingHeaders(this)),m.siteApps&&this.Ri.push(this.siteApps=new m.siteApps(this)),m.sessionRecording&&!t&&this.Ri.push(this.sessionRecording=new m.sessionRecording(this)),this.config.disable_scroll_properties||p.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),m.autocapture&&this.Ri.push(this.autocapture=new m.autocapture(this)),m.surveys&&this.Ri.push(this.surveys=(i=this.surveys)!==null&&i!==void 0?i:new m.surveys(this)),m.logs&&this.Ri.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new m.logs(this)),m.conversations&&this.Ri.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new m.conversations(this)),m.productTours&&this.Ri.push(this.productTours=new m.productTours(this)),m.heatmaps&&this.Ri.push(this.heatmaps=new m.heatmaps(this)),m.webVitalsAutocapture&&this.Ri.push(this.webVitalsAutocapture=new m.webVitalsAutocapture(this)),m.exceptionObserver&&this.Ri.push(this.exceptionObserver=new m.exceptionObserver(this)),m.deadClicksAutocapture&&this.Ri.push(this.deadClicksAutocapture=new m.deadClicksAutocapture(this,Bte)),m.toolbar&&this.Ri.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new m.toolbar(this)),m.experiments&&this.Ri.push(this.experiments=(d=this.experiments)!==null&&d!==void 0?d:new m.experiments(this)),this.Ri.forEach((g=>{g.initialize&&p.push((()=>{g.initialize==null||g.initialize()}))})),p.push((()=>{if(this.Yi){var g=this.Yi;this.Yi=void 0,this.Nr(g)}})),this.Gi(p,f)}Gi(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout((()=>{this.Gi(t,n)}),0);var r=t.shift();if(r)try{r()}catch(s){je.error("Error initializing extension:",s)}}var i=Math.round(performance.now()-n);this.register_for_session({[eD]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[tD]:i}),this.config.__preview_deferred_init_extensions&&je.info("PostHog extensions initialized ("+i+"ms)")}Nr(t){var n;if(!$e||!$e.body)return je.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Nr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Yi=t),this.Wi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=bt(t.supportedCompression,mo.GZipJS)?mo.GZipJS:bt(t.supportedCompression,mo.Base64)?mo.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Li?this.Li:x1}),this.Ri.forEach((r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(t)))}Ui(){try{this.config.loaded(this)}catch(r){je.critical("`loaded` function failed",r)}if(this.Xi(),this.config.internal_or_test_user_hostname&&ur!=null&&ur.hostname){var t=ur.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.Ji()}),1),this.Ki=new pD(this),this.Ki.load()}Xi(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Zi)==null||t.enable())}_dom_loaded(){this.is_capturing()&&dp(this.__request_queue,(t=>this.Vi(t))),this.__request_queue=[],this.Xi()}_handle_unload(){var t,n,r,i;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Qi()&&this.capture(Py),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.Zi)==null||r.unload(),(i=this.Hi)==null||i.unload()):this.Qi()&&this.capture(Py,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(RD?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=Xg(t.url,{ip:this.config.ip?1:0}),t.headers=ke({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,i,s,l=ke({},n);l.timeout=l.timeout||6e4,l.url=OA(l.url,l.compression);var c=(r=l.transport)!==null&&r!==void 0?r:"fetch",d=_m.filter((m=>!l.disableTransport||!m.transport||!l.disableTransport.includes(m.transport))),f=(i=(s=(function(m,p){for(var g=0;m.length>g;g++)if(m[g].transport===c)return m[g]})(d))==null?void 0:s.method)!==null&&i!==void 0?i:d[0].method;if(!f)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===mo.GZipJS&&Vee&&!RA?ine(l).then((m=>{f(m)})).catch((m=>{if((p=>!(!p||typeof p!="object")&&("name"in p?String(p.name):"")==="NotReadableError")(m))return RA=!0,void f(ke({},l,{compression:void 0,url:OA(n.url,void 0)}));f(l)})):f(l)})(ke({},t,{callback:n=>{var r,i;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(i=this.config).on_request_error)==null||r.call(i,n),t.callback==null||t.callback(n)}}))))}Vi(t){this.Hi?this.Hi.retriableRequest(t):this._send_request(t)}_execute_array(t){Vy++;try{var n,r=[],i=[],s=[];dp(t,(c=>{c&&(Mt(n=c[0])?s.push(c):rs(c)?c.call(this):Mt(c)&&n==="alias"?r.push(c):Mt(c)&&n.indexOf("capture")!==-1&&rs(this[n])?s.push(c):i.push(c))}));var l=function(c,d){dp(c,(function(f){if(Mt(f[0])){var m=d;ln(f,(function(p){m=m[p[0]].apply(m,p.slice(1))}))}else d[f[0]].apply(d,f.slice(1))}))};l(r,this),l(i,this),l(s,this)}finally{Vy--}}push(t){if(Vy>0&&Mt(t)&&vn(t[0])){var n=Ni.prototype[t[0]];rs(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var i,s,l,c,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Zi){if(this.is_capturing())if(!ze(t)&&vn(t)){var f=!this.config.opt_out_useragent_filter&&this._is_bot();if(!f||this.config.__preview_capture_bot_pageviews){var m=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(m==null||!m.isRateLimited){n!=null&&n.$current_url&&!vn(n?.$current_url)&&(je.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.en||je.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var p=new Date,g=r?.timestamp||p,v=Ws(),y={uuid:v,event:t,properties:this.calculateEventProperties(t,n||{},g,v)};t===vc&&this.config.__preview_capture_bot_pageviews&&f&&(y.event="$bot_pageview",y.properties.$browser_type="bot"),m&&(y.properties.$lib_rate_limit_remaining_tokens=m.remainingTokens),r?.$set&&(y.$set=r?.$set);var b,x,S,E=this.tn(r?.$set_once,t!==hA,t===Ny);if(E&&(y.$set_once=E),r!=null&&r._noTruncate||(s=this.config.properties_string_max_length,l=y,c=L=>vn(L)?L.slice(0,s):L,d=new Set,y=(function L(H,j){return H!==Object(H)?c?c(H):H:d.has(H)?void 0:(d.add(H),Mt(H)?(B=[],dp(H,(U=>{B.push(L(U))}))):(B={},ln(H,((U,Z)=>{d.has(U)||(B[Z]=L(U))}))),B);var B})(l)),y.timestamp=g,ze(r?.timestamp)||(y.properties.$event_time_override_provided=!0,y.properties.$event_time_override_system_time=p),t===xd.DISMISSED||t===xd.SENT){var R=n?.[jy.SURVEY_ID],C=n?.[jy.SURVEY_ITERATION];(L=>{try{var H=(j=>((B,U)=>{var Z=""+M1+U.id;return U.current_iteration&&U.current_iteration>0&&(Z=""+M1+U.id+"_"+U.current_iteration),Z})(0,j))(L);if(localStorage.getItem(H))return;localStorage.setItem(H,"true")}catch(j){Qt.error("Failed to persist survey seen state",j)}})({id:R,current_iteration:C}),y.$set=ke({},y.$set,{[(b={id:R,current_iteration:C},x=t===xd.SENT?"responded":"dismissed",S="$survey_"+x+"/"+b.id,b.current_iteration&&b.current_iteration>0&&(S="$survey_"+x+"/"+b.id+"/"+b.current_iteration),S)]:!0})}else t===xd.SHOWN&&(y.$set=ke({},y.$set,{[jy.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===Wte.SHOWN){var O=n?.[yA.TOUR_TYPE];O&&(y.$set=ke({},y.$set,{[yA.TOUR_LAST_SEEN_DATE+"/"+O]:new Date().toISOString()}))}var A=ke({},y.properties.$set,y.$set);if(wc(A)||this.setPersonPropertiesForFlags(A),!wt(this.config.before_send)){var M=this.rn(y);if(!M)return;y=M}this.Fi.emit("eventCaptured",y);var P={method:"POST",url:(i=r?._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:y,compression:"best-available",batchKey:r?._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Vi(P):this.Zi.enqueue(P),y}je.critical("This capture call is ignored due to client rate limiting.")}}else je.error("No event name provided to posthog.capture")}else je.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(n=>t(n.event,n)))}calculateEventProperties(t,n,r,i,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(t),c=ke({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var d=ke({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=d.distinct_id,(!vn(c.distinct_id)&&!$i(c.distinct_id)||pm(c.distinct_id))&&je.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var f,m=(function(S,E){var R,C,O,A;if(!Gr)return{};var M,P,L,H,j,B,U,Z,re=S?[...Vc,...E||[]]:[],[q,W]=(function(ee){for(var ae=0;cA.length>ae;ae++){var[Q,k]=cA[ae],K=Q.exec(ee),V=K&&(rs(k)?k(K,ee):k);if(V)return V}return["",""]})(Gr);return Sn(OS({$os:q,$os_version:W,$browser:B5(Gr,navigator.vendor),$device:uA(Gr),$device_type:(P=Gr,L={userAgentDataPlatform:(R=navigator)==null||(R=R.userAgentData)==null?void 0:R.platform,maxTouchPoints:(C=navigator)==null?void 0:C.maxTouchPoints,screenWidth:me==null||(O=me.screen)==null?void 0:O.width,screenHeight:me==null||(A=me.screen)==null?void 0:A.height,devicePixelRatio:me?.devicePixelRatio},Z=uA(P),Z===C5||Z===T5||Z==="Kobo"||Z==="Kindle Fire"||Z===F5?zc:Z===Xd||Z===Nc||Z===Jd||Z===n1?"Console":Z===I5?"Wearable":Z?pi:L?.userAgentDataPlatform==="Android"&&((H=L?.maxTouchPoints)!==null&&H!==void 0?H:0)>0?600>Math.min((j=L?.screenWidth)!==null&&j!==void 0?j:0,(B=L?.screenHeight)!==null&&B!==void 0?B:0)/((U=L?.devicePixelRatio)!==null&&U!==void 0?U:1)?pi:zc:"Desktop"),$timezone:hD(),$timezone_offset:Zte()}),{$current_url:ef(ur?.href,re,tf),$host:ur?.host,$pathname:ur?.pathname,$raw_user_agent:Gr.length>1e3?Gr.substring(0,997)+"...":Gr,$browser_version:ote(Gr,navigator.vendor),$browser_language:_A(),$browser_language_prefix:(M=_A(),typeof M=="string"?M.split("-")[0]:void 0),$screen_height:me?.screen.height,$screen_width:me?.screen.width,$viewport_height:me?.innerHeight,$viewport_width:me?.innerWidth,$lib:Nr.LIB_NAME,$lib_version:Nr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:p,windowId:g}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());c.$session_id=p,c.$window_id=g}this.sessionPropsManager&&Sn(c,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&Sn(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(v=this.Hi)==null?void 0:v.length}catch(S){c.$sdk_debug_error_capturing_properties=String(S)}if(this.requestRouter.region===I1&&(c.$lib_custom_api_host=this.config.api_host),f=t!==vc||s?t!==Py||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),c=Sn(c,f),t===vc&&$e&&(c.title=$e.title),!ze(l)){var y=r.getTime()-l;c.$duration=parseFloat((y/1e3).toFixed(3))}Gr&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=Sn({},m,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),Mt(this.config.property_denylist)?ln(this.config.property_denylist,(function(S){delete c[S]})):je.error(xD+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(je.error(PA),c=b(c,t));var x=this.nn();return c.$process_person_profile=x,x&&!s&&this.sn("_calculate_event_properties"),c}tn(t,n,r){var i;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.nn()||this.Mi&&!r)return t;var s=this.persistence.get_initial_props(),l=(i=this.sessionPropsManager)==null?void 0:i.getSetOnceProps(),c=Sn({},s,l||{},t||{}),d=this.config.sanitize_properties;return d&&(je.error(PA),c=d(c,"$set_once")),n&&(this.Mi=!0),wc(c)?void 0:c}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var i;(i=this.persistence)==null||i.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}an(t,n){this.register({[t]:n})}getFeatureFlag(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(t,n)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,n,r){var i;(i=this.featureFlags)==null||i.updateFlags(t,n,r)}updateEarlyAccessFeatureEnrollment(t,n,r){var i;(i=this.featureFlags)==null||i.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){var i;return n===void 0&&(n=!1),(i=this.featureFlags)==null?void 0:i.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Fi.on(t,n)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:sd}),()=>{})}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(t,n):t([],{isLoaded:!1,error:sd})}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,n):t([],{isLoaded:!1,error:sd})}renderSurvey(t,n){var r;(r=this.surveys)==null||r.renderSurvey(t,n)}displaySurvey(t,n){var r;n===void 0&&(n=hne),(r=this.surveys)==null||r.displaySurvey(t,n)}cancelPendingSurvey(t){var n;(n=this.surveys)==null||n.cancelPendingSurvey(t)}canRenderSurvey(t){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(t))!==null&&n!==void 0?n:{visible:!1,disabledReason:sd}}canRenderSurveyAsync(t,n){var r,i;return n===void 0&&(n=!1),(r=(i=this.surveys)==null?void 0:i.canRenderSurveyAsync(t,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:sd})}ln(t){return!t||pm(t)?(je.critical("Unique user id has not been set in posthog.identify"),!1):t===up?(je.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(je.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,n,r){if(!this.__loaded||!this.persistence)return je.uninitializedWarning("posthog.identify");if($i(t)&&(t=t.toString(),je.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.ln(t)&&this.sn("posthog.identify")){var i=this.get_distinct_id();this.register({$user_id:t}),this.get_property(ng)||this.register_once({$had_persisted_distinct_id:!0,$device_id:i},""),t!==i&&t!==this.get_property(yd)&&(this.unregister(yd),this.register({distinct_id:t}));var s,l=(this.persistence.get_property(Wi)||ac)===ac;t!==i&&l?(this.persistence.set_property(Wi,lc),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(Ny,{distinct_id:t,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.Di=AA(t,n,r),(s=this.featureFlags)==null||s.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),t!==i&&(this.reloadFeatureFlags(),this.unregister(Dd))}}setPersonProperties(t,n){if((t||n)&&this.sn("posthog.setPersonProperties")){var r=AA(this.get_distinct_id(),t,n);this.Di!==r?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!0),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Di=r):je.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){var i=this.getGroups(),s=i[t]!==n;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:ke({},i,{[t]:n})}),s||r){var l={$group_type:t,$group_key:n};r&&(l.$group_set=r),this.capture(hA,l)}r&&this.setGroupPropertiesForFlags({[t]:r}),s&&!r&&this.reloadFeatureFlags()}else je.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(t,n))}resetGroupPropertiesForFlags(t){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(t)}reset(t){var n,r,i,s,l,c,d,f;if(je.info("reset"),!this.__loaded)return je.uninitializedWarning("posthog.reset");var m=this.get_property(ng);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),(i=this.surveys)==null||i.reset(),(s=this.Ki)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(d=this.persistence)==null||d.set_property(Wi,ac),(f=this.sessionManager)==null||f.resetSessionId(),this.Di=null,this.config.cookieless_mode===os)this.register_once({distinct_id:up,$device_id:null},"");else{var p=this.config.get_device_id(Ws());this.register_once({distinct_id:p,$device_id:t?p:m},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,n){var r;this.config.identity_distinct_id=t,this.config.identity_hash=n,this.alias(t),(r=this.conversations)==null||r.un()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var s,l=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return i;i+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-l,0)}return i}alias(t,n){return t===this.get_property(Z5)?(je.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(ze(n)&&(n=this.get_distinct_id()),t!==n?(this.an(yd,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(je.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=ke({},this.config);if(On(t)){var r,i,s,l,c,d,f,m,p,g;Sn(this.config,kA(t));var v=this.qi();(r=this.persistence)==null||r.update_config(this.config,n,v),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Ly(ke({},this.config,{persistence:"sessionStorage"}),v);var y=this.Bi(this.config.debug);wo(y)&&(this.config.debug=y),wo(this.config.debug)&&(this.config.debug?(Nr.DEBUG=!0,gn.R()&&gn.M("ph_debug",!0),je.info("set_config",{config:t,oldConfig:n,newConfig:ke({},this.config)})):(Nr.DEBUG=!1,gn.R()&&gn.F("ph_debug"))),(i=this.exceptionObserver)==null||i.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(d=this.heatmaps)==null||d.startIfEnabled(),(f=this.exceptionObserver)==null||f.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(p=this.surveys)==null||p.loadIfEnabled(),this.cn(),(g=this.externalIntegrations)==null||g.startIfEnabledOrStop()}}_overrideSDKInfo(t,n){Nr.LIB_NAME=t,Nr.LIB_VERSION=n}startSessionRecording(t){var n,r,i,s,l,c=t===!0,d={sampling:c||!(t==null||!t.sampling),linked_flag:c||!(t==null||!t.linked_flag),url_trigger:c||!(t==null||!t.url_trigger),event_trigger:c||!(t==null||!t.event_trigger)};Object.values(d).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),d.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),d.linked_flag&&((i=this.sessionRecording)==null||i.overrideLinkedFlag()),d.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),d.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),i=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(ke({},i,n))}}addExceptionStep(t,n){var r;(r=this.exceptions)==null||r.addExceptionStep(t,n)}captureLog(t){var n;(n=this.logs)==null||n.captureLog(t)}get logger(){var t,n;return(t=(n=this.logs)==null?void 0:n.logger)!==null&&t!==void 0?t:Ni.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(t))!==null&&n!==void 0&&n}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:_c;return n!==_c&&(n=_c+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(Wi))===lc||((n=this.sessionPersistence)==null?void 0:n.get_property(Wi))===lc}nn(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===x1&&!this._isIdentified()&&wc(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[yd])&&((n=this.persistence)==null||(n=n.props)==null||!n[sg]))}Qi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?(je.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(sg,!0),!0)}qi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==qa)}cn(){var t,n,r,i,s=this.qi();return((t=this.persistence)==null?void 0:t._r)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n._r)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==os){if(this.Ni()){var r,i,s,l,c;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(i=this.pageViewManager)==null||i.destroy(),this.sessionManager=new CA(this),this.pageViewManager=new vA(this),this.persistence&&(this.sessionPropsManager=new TA(this,this.sessionManager,this.persistence));var d,f=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Ni.__defaultExtensionClasses)==null?void 0:c.sessionRecording;f&&(this.sessionRecording=this.Ei(this.sessionRecording,new f(this)),this.Wi&&((d=this.sessionRecording)==null||d.onRemoteConfig==null||d.onRemoteConfig(this.Wi)))}var m,p;this.consent.optInOut(!0),this.cn(),this.Xi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==qa&&((m=this.surveys)==null||m.loadIfEnabled()),(ze(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((p=t?.captureEventName)!==null&&p!==void 0?p:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ji()}else je.warn(MA)}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!==os?(this.config.cookieless_mode===qa&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===qa&&(this.register({distinct_id:up,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.Ji())):je.warn(MA)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===os||(this.config.cookieless_mode===qa?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return fi?wD(fi,this.config.custom_blocked_useragents):void 0}Ji(){$e&&($e.visibilityState==="visible"?this.Oi||(this.Oi=!0,this.capture(vc,{title:$e.title},{send_instantly:!0}),this.Pi&&($e.removeEventListener(ag,this.Pi),this.Pi=null)):this.Pi||(this.Pi=this.Ji.bind(this),Bn($e,ag,this.Pi)))}debug(t){t===!1?(me?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(me?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Fr(){var t,n,r,i,s,l,c=this.ji||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(je.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",i=je,s=(n="advanced_disable_flags")in(t=c)&&!wt(t[n]),l=r in t&&!wt(t[r]),s?t[n]:!!l&&(i&&i.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]))}rn(t){if(wt(this.config.before_send))return t;var n=Mt(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var i of n){if(r=i(r),wt(r)){var s="Event '"+t.event+"' was rejected in beforeSend function";return Kee(t.event)?je.warn(s+". This can cause unexpected behavior."):je.info(s),null}r.properties&&!wc(r.properties)||je.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Bi(t){var n=wo(t)&&!t,r=gn.R()&&gn.O("ph_debug")==="true";return!n&&(!!r||t)}}function DA(e){return e instanceof Element&&(e.id===J5||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Jg(e){return!!e&&e.nodeType===1}function ra(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function OD(e){return!!e&&e.nodeType===3}function TD(e){return!!e&&e.nodeType===11}function IS(e){return e?Wg(e).split(/\s+/):[]}function LA(e){var t=me?.location.href;return!!(t&&e&&e.some((n=>t.match(n))))}function gg(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return IS(t)}function CD(e){return wt(e)?null:Wg(e).split(/(\s+)/).filter((t=>jd(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function nf(e){var t="";return k1(e)&&!ID(e)&&e.childNodes&&e.childNodes.length&&ln(e.childNodes,(function(n){var r;OD(n)&&n.textContent&&(t+=(r=CD(n.textContent))!==null&&r!==void 0?r:"")})),Wg(t)}function $A(e){return ze(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}Ni.__defaultExtensionClasses={},Ni.dn={trace:uc=()=>{},debug:uc,info:uc,warn:uc,error:uc,fatal:uc},(function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=Mte(e.prototype[t[n]])})(Ni,["identify"]);var MS=["a","button","form","input","select","textarea","label"];function jA(e,t){if(ze(t))return!0;var n,r=function(s){if(t.some((l=>s.matches(l))))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function AD(e){var t=e.parentNode;return!(!t||!Jg(t))&&t}var yne=["next","previous","prev",">","<"],UA=[".ph-no-rageclick",".ph-no-capture"],N1=e=>!e||ra(e,"html")||!Jg(e),zA=(e,t)=>{if(!me||N1(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!ra(i,"body");)if(TD(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var s=AD(i);if(!s)break;if(t||MS.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var l=me.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(s),i=s}return{parentIsUsefulElement:n,targetElementList:r}};function k1(e){for(var t=e;t.parentNode&&!ra(t,"body");t=t.parentNode){var n=gg(t);if(bt(n,"ph-sensitive")||bt(n,"ph-no-capture"))return!1}if(bt(gg(e),"ph-include"))return!0;var r=e.type||"";if(vn(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!vn(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ID(e){return!!(ra(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ra(e,"select")||ra(e,"textarea")||e.getAttribute("contenteditable")==="true")}var MD="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",bne=new RegExp("^(?:"+MD+")$"),wne=new RegExp(MD),PD="\\d{3}-?\\d{2}-?\\d{4}",Sne=new RegExp("^("+PD+")$"),Ene=new RegExp("("+PD+")");function jd(e,t){return t===void 0&&(t=!0),!(wt(e)||vn(e)&&(e=Wg(e),(t?bne:wne).test((e||"").replace(/[- ]/g,""))||(t?Sne:Ene).test(e)))}function FA(e){var t=nf(e);return jd(t=(t+" "+ND(e)).trim())?t:""}function ND(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ln(e.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var i=nf(n);t=(t+" "+i).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+ND(n)).trim())}catch(s){je.error("[AutoCapture]",s)}})),t}function BA(e){return e.replace(/"|\\"/g,'\\"')}function xne(e){var t=e.attr__class;return t?Mt(t)?t:IS(t):void 0}class VA{constructor(t){this.disabled=t===!1;var n=On(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(t-i.x)+Math.abs(n-i.y)<this.thresholdPx&&this.timeoutMs>r-i.timestamp){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var qy="$copy_autocapture",qA=fn("[AutoCapture]");function Hy(e,t){return t.length>e?t.slice(0,e)+"...":t}function Rne(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Jg(t));return t}function One(e,t){for(var n,r,{e:i,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:d}=t,f=[e],m=e;m.parentNode&&!ra(m,"body");)TD(m.parentNode)?(f.push(m.parentNode.host),m=m.parentNode.host):(f.push(m.parentNode),m=m.parentNode);var p,g,v=[],y={},b=!1,x=!1;if(ln(f,(O=>{var A=k1(O);O.tagName.toLowerCase()==="a"&&(b=O.getAttribute("href"),b=A&&b&&jd(b)&&b),bt(gg(O),"ph-no-capture")&&(x=!0),v.push((function(P,L,H,j){var B=P.tagName.toLowerCase(),U={tag_name:B};MS.indexOf(B)>-1&&!H&&(U.$el_text=B.toLowerCase()==="a"||B.toLowerCase()==="button"?Hy(1024,FA(P)):Hy(1024,nf(P)));var Z=gg(P);Z.length>0&&(U.classes=Z.filter((function(ee){return ee!==""}))),ln(P.attributes,(function(ee){var ae;if((!ID(P)||["name","id","class","aria-label"].indexOf(ee.name)!==-1)&&(j==null||!j.includes(ee.name))&&!L&&jd(ee.value)&&(!vn(ae=ee.name)||ae.substring(0,10)!=="_ngcontent"&&ae.substring(0,7)!=="_nghost")){var Q=ee.value;ee.name==="class"&&(Q=IS(Q).join(" ")),U["attr__"+ee.name]=Hy(1024,Q)}}));for(var re=1,q=1,W=P;W=Rne(W);)re++,W.tagName===P.tagName&&q++;return U.nth_child=re,U.nth_of_type=q,U})(O,s,l,c));var M=(function(P){if(!k1(P))return{};var L={};return ln(P.attributes,(function(H){if(H.name&&H.name.indexOf("data-ph-capture-attribute")===0){var j=H.name.replace("data-ph-capture-attribute-",""),B=H.value;j&&B&&jd(B)&&(L[j]=B)}})),L})(O);Sn(y,M)})),x)return{props:{},explicitNoCapture:x};if(l||(v[0].$el_text=e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?FA(e):nf(e)),b){var S,E;v[0].attr__href=b;var R=(S=ug(b))==null?void 0:S.host,C=me==null||(E=me.location)==null?void 0:E.host;R&&C&&R!==C&&(p=b)}return{props:Sn({$event_type:i.type,$ce_version:1},d?{}:{$elements:v},{$elements_chain:(g=v,(function(O){return O.map((A=>{var M,P,L="";if(A.tag_name&&(L+=A.tag_name),A.attr_class)for(var H of(A.attr_class.sort(),A.attr_class))L+="."+H.replace(/"/g,"");var j=ke({},A.text?{text:A.text}:{},{"nth-child":(M=A.nth_child)!==null&&M!==void 0?M:0,"nth-of-type":(P=A.nth_of_type)!==null&&P!==void 0?P:0},A.href?{href:A.href}:{},A.attr_id?{attr_id:A.attr_id}:{},A.attributes),B={};return vm(j).sort(((U,Z)=>{var[re]=U,[q]=Z;return re.localeCompare(q)})).forEach((U=>{var[Z,re]=U;return B[BA(Z.toString())]=BA(re.toString())})),(L+=":")+vm(B).map((U=>{var[Z,re]=U;return Z+'="'+re+'"'})).join("")})).join(";")})((function(O){return O.map((A=>{var M,P,L={text:(M=A.$el_text)==null?void 0:M.slice(0,400),tag_name:A.tag_name,href:(P=A.attr__href)==null?void 0:P.slice(0,2048),attr_class:xne(A),attr_id:A.attr__id,nth_child:A.nth_child,nth_of_type:A.nth_of_type,attributes:{}};return vm(A).filter((H=>{var[j]=H;return j.indexOf("attr__")===0})).forEach((H=>{var[j,B]=H;return L.attributes[j]=B})),L}))})(g)))},(n=v[0])!=null&&n.$el_text?{$el_text:(r=v[0])==null?void 0:r.$el_text}:{},p&&i.type==="click"?{$external_click_url:p}:{},y)}}var ad=fn("[ExceptionAutocapture]");function HA(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return rs(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var Tne=fn("[TracingHeaders]"),Vs=fn("[Web Vitals]"),GA=9e5,KA="disabled",ZA="lazy_loading",ld="awaiting_config",gp="missing_config";fn("[SessionRecording]"),fn("[SessionRecording]");var D1="[SessionRecording]",qs=fn(D1),Cne=fn("[Heatmaps]");function YA(e){return On(e)&&"clientX"in e&&"clientY"in e&&$i(e.clientX)&&$i(e.clientY)}var WA=fn("[Product Tours]"),Ane=["$set_once","$set"],Hs=fn("[SiteApps]"),QA="Error while initializing PostHog app with config id ";function dc(e,t,n){if(wt(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class Ine{constructor(t){this.vn=new AS,this.fn=(n,r)=>this.pn(n,r)&&this.gn(n,r)&&this.mn(n,r)&&this.yn(n,r),this.pn=(n,r)=>r==null||!r.event||n?.event===r?.event,this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,n;ze((t=this._instance)==null?void 0:t._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,i)=>{this.on(r,i)}))}register(t){var n,r;if(!ze((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach((l=>{var c,d;(c=this._n)==null||c.add(l),(d=l.steps)==null||d.forEach((f=>{var m;(m=this.bn)==null||m.add(f?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var i,s=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((d=>{d!=null&&d.selector&&s.add(d?.selector)}))})),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(t,n){var r;n!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(n?.event))&&this._n&&((r=this._n)==null?void 0:r.size)>0&&this._n.forEach((i=>{this.wn(n,i)&&this.vn.emit("actionCaptured",i.name)}))}In(t){this.onAction("actionCaptured",(n=>t(n)))}wn(t,n){if(n?.steps==null)return!1;for(var r of n.steps)if(this.fn(t,r))return!0;return!1}onAction(t,n){return this.vn.on(t,n)}gn(t,n){if(n!=null&&n.url){var r,i=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!i||typeof i!="string"||!dc(i,n.url,n.url_matching||"contains"))return!1}return!0}mn(t,n){return!!this.Cn(t,n)&&!!this.Sn(t,n)&&!!this.xn(t,n)}Cn(t,n){var r;if(n==null||!n.href)return!0;var i=this.kn(t);if(i.length>0)return i.some((c=>dc(c.href,n.href,n.href_matching||"exact")));var s,l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!l&&dc((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}Sn(t,n){var r;if(n==null||!n.text)return!0;var i=this.kn(t);if(i.length>0)return i.some((f=>dc(f.text,n.text,n.text_matching||"exact")||dc(f.$el_text,n.text,n.text_matching||"exact")));var s,l,c,d=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!d&&(s=(function(f){for(var m,p=[],g=/(?::|")text="(.*?)"/g;!wt(m=g.exec(f));)p.includes(m[1])||p.push(m[1]);return p})(d),l=n.text,c=n.text_matching||"exact",s.some((f=>dc(f,l,c))))}xn(t,n){var r,i;if(n==null||!n.selector)return!0;var s=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(t==null||(i=t.properties)==null?void 0:i.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}kn(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t?.properties.$elements}yn(t,n){return n==null||!n.properties||n.properties.length===0||ED(n.properties.reduce(((r,i)=>{var s=Mt(i.value)?i.value.map(String):i.value!=null?[String(i.value)]:[];return r[i.key]={values:s,operator:i.operator||"exact"},r}),{}),t?.properties)}}class Mne{constructor(t){this._instance=t,this.Tn=new Map,this.An=new Map,this.En=new Map}Rn(t,n){return!!t&&ED(t.propertyFilters,n?.properties)}Nn(t,n){var r=new Map;return t.forEach((i=>{var s;(s=i.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=r.get(l.name)||[];c.push(i.id),r.set(l.name,c)}}))})),r}Mn(t,n,r){var i=(r===nd.Activation?this.Tn:this.An).get(t),s=[];return this.Fn((l=>{s=l.filter((c=>i?.includes(c.id)))})),s.filter((l=>{var c,d=(c=l.conditions)==null||(c=c[r])==null||(c=c.values)==null?void 0:c.find((f=>f.name===t));return this.Rn(d,n)}))}register(t){var n;ze((n=this._instance)==null?void 0:n._addCaptureHook)||(this.On(t),this.Pn(t))}Pn(t){var n=t.filter((r=>{var i,s;return((i=r.conditions)==null?void 0:i.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Ln==null&&(this.Ln=new Ine(this._instance),this.Ln.init(),this.Ln.In((r=>{this.onAction(r)}))),n.forEach((r=>{var i,s,l,c,d;r.conditions&&(i=r.conditions)!=null&&i.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Ln)==null||c.register(r.conditions.actions.values),(d=r.conditions)==null||(d=d.actions)==null||(d=d.values)==null||d.forEach((f=>{if(f&&f.name){var m=this.En.get(f.name);m&&m.push(r.id),this.En.set(f.name,m||[r.id])}})))})))}On(t){var n,r=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),i=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));r.length===0&&i.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.Tn=this.Nn(t,nd.Activation),this.An=this.Nn(t,nd.Cancellation))}onEvent(t,n){var r,i=this.le(),s=this.Dn(),l=this.Bn(),c=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[s])||[];if(l===t&&n&&c.length>0){var d,f;i.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:c});var m=(n==null||(d=n.properties)==null?void 0:d.$survey_id)||(n==null||(f=n.properties)==null?void 0:f.$product_tour_id);if(m){var p=c.indexOf(m);0>p||(c.splice(p,1),this.jn(c))}}else{if(this.An.has(t)){var g=this.Mn(t,n,nd.Cancellation);g.length>0&&(i.info("cancel event matched, cancelling items",{event:t,itemsToCancel:g.map((y=>y.id))}),g.forEach((y=>{var b=c.indexOf(y.id);0>b||c.splice(b,1),this.$n(y.id)})),this.jn(c))}if(this.Tn.has(t)){i.info("event name matched",{event:t,eventPayload:n,items:this.Tn.get(t)});var v=this.Mn(t,n,nd.Activation);this.jn(c.concat(v.map((y=>y.id))||[]))}}}onAction(t){var n,r=this.Dn(),i=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[r])||[];this.En.has(t)&&this.jn(i.concat(this.En.get(t)||[]))}jn(t){var n=this.le(),r=[...new Set(t)].filter((i=>!this.qn(i)));n.info("updating activated items",{activatedItems:r}),this.Zn(r)}getActivatedIds(){var t,n=this.Dn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n])||[]}getEventToItemsMap(){return this.Tn}Vn(){return this.Ln}}class Pne extends Mne{constructor(t){super(t)}Dn(){return v1}Bn(){return xd.SHOWN}Fn(t){var n;(n=this._instance)==null||n.getSurveys(t)}$n(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}le(){return Qt}Zn(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[v1]:t})}qn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Gy="SDK is not enabled or survey functionality is not yet loaded",XA="Disabled. Not loading surveys.",Nne=me!=null&&me.location?fg(me.location.hash,"__posthog")||fg(location.hash,"state"):null,JA="_postHogToolbarParams",eI=fn("[Toolbar]"),Ar=fn("[FeatureFlags]"),ja=fn("[FeatureFlags]",{debugEnabled:!0}),Ky=`" failed. Feature flags didn't load in time.`,tI=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},nI=e=>{var t={};for(var[n,r]of vm(e||{}))r&&(t[n]=r);return t},Xo=fn("[Error tracking]"),rI="Refusing to render web experiment since the viewer is a likely bot",kne={icontains:(e,t)=>!!me&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!me&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!me&&mg(t.href,e),not_regex:(e,t)=>!!me&&!mg(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class wr{get Bt(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((i=>{wr.Hn("retrieved web experiments from the server"),n.zn=new Map,i.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(wr.Hn("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);vn(c)&&s.variants[c]&&n.Un(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var d in s.variants){var f=s.variants[d];wr.Yn(f)&&n.Un(s.name,d,f.transforms)}}))}),r)},this._instance=t,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())wr.Hn(rI);else if(!this.Bt.disable_web_experiments){if(wt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();wr.Hn("applying feature flags",t),t.forEach((n=>{var r;if(this.zn&&(r=this.zn)!=null&&r.has(n)){var i,s=this._instance.getFeatureFlag(n),l=(i=this.zn)==null?void 0:i.get(n);s&&l!=null&&l.variants[s]&&this.Un(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var t=wr.getWindowLocation();if(t!=null&&t.search){var n=dg(t?.search,"__experiment_id"),r=dg(t?.search,"__experiment_variant");n&&r&&(wr.Hn("previewing web experiments "+n+" && "+r),this.getWebExperiments((i=>{this.Gn(parseInt(n),r,i)}),!1,!0))}}loadIfEnabled(){this.Bt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this.Bt.disable_web_experiments&&!r)return t([]);var i=this._instance.get_property("$web_experiments");if(i&&!n)return t(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Bt.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(t,n,r){var i=r.filter((s=>s.id===t));i&&i.length>0&&(wr.Hn("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this.Un(i[0].name,n,i[0].variants[n].transforms))}static Yn(t){return!wt(t.conditions)&&wr.Wn(t)&&wr.Xn(t)}static Wn(t){var n;if(wt(t.conditions)||wt((n=t.conditions)==null?void 0:n.url))return!0;var r,i,s,l=wr.getWindowLocation();return!!l&&((r=t.conditions)==null||!r.url||kne[(i=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&i!==void 0?i:"icontains"](t.conditions.url,l))}static getWindowLocation(){return me?.location}static Xn(t){var n;if(wt(t.conditions)||wt((n=t.conditions)==null?void 0:n.utm))return!0;var r=aD();if(r.utm_source){var i,s,l,c,d,f,m,p,g=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,v=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==r.utm_source,y=(d=t.conditions)==null||(d=d.utm)==null||!d.utm_medium||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_medium)==r.utm_medium,b=(m=t.conditions)==null||(m=m.utm)==null||!m.utm_term||((p=t.conditions)==null||(p=p.utm)==null?void 0:p.utm_term)==r.utm_term;return g&&y&&b&&v}return!1}static Hn(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];je.info("[WebExperiments] "+t,r)}Un(t,n,r){this._is_bot()?wr.Hn(rI):n!=="control"?r.forEach((i=>{if(i.selector){var s;wr.Hn("applying transform of variant "+n+" for experiment "+t+" ",i);var l=(s=document)==null?void 0:s.querySelectorAll(i.selector);l?.forEach((c=>{var d=c;i.html&&(d.innerHTML=i.html),i.css&&d.setAttribute("style",i.css)}))}})):wr.Hn("Control variants leave the page unmodified.")}_is_bot(){return fi&&this._instance?wD(fi,this.Bt.custom_blocked_useragents):void 0}}var Ci=fn("[Conversations]"),Ua="Conversations not available yet.",ev={featureFlags:class{constructor(e){this.Jn=!1,this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Bt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}ls(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.Bt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}us(){return!!this.ls()&&(this.ss||this.Qn||(this.ss=!0,Ar.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.Bt.evaluation_contexts)!==null&&e!==void 0?e:this.Bt.evaluation_environments;return!this.Bt.evaluation_environments||this.Bt.evaluation_contexts||this.ns||(Ar.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||Ar.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:n}=this._instance,r=(e=(t=n.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(r).length){var i,s,l=(i=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&i!==void 0?i:{},c=Object.keys(r).filter((f=>!!r[f])).reduce(((f,m)=>(f[m]=r[m]||!1,f)),{}),d=Object.keys(l).filter((f=>c[f])).reduce(((f,m)=>(l[m]&&(f[m]=l[m]),f)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:d})}}updateFlags(e,t,n){var r=n!=null&&n.merge?this.getFlagVariants():{},i=n!=null&&n.merge?this.getFlagPayloads():{},s=ke({},r,e),l=ke({},i,t),c={};for(var[d,f]of Object.entries(s)){var m=typeof f=="string";c[d]={key:d,enabled:!!m||!!f,variant:m?f:void 0,reason:void 0,metadata:ze(l?.[d])?void 0:{id:0,version:void 0,description:void 0,payload:l[d]}}}this.receivedFeatureFlags({flags:c})}get hasLoadedFlags(){return this.Kn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(h1),t=this.os(ns),n=this.os(gc);if(!n&&!t)return e||{};var r=Sn({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var s of i){var l,c,d=r[s],f=t?.[s],m=ze(f)?(l=d?.enabled)!==null&&l!==void 0&&l:!!f,p=ze(f)?d.variant:typeof f=="string"?f:void 0,g=n?.[s],v=ke({},d,{enabled:m,variant:m?p??d?.variant:void 0});m!==d?.enabled&&(v.original_enabled=d?.enabled),p!==d?.variant&&(v.original_variant=d?.variant),g&&(v.metadata=ke({},d?.metadata,{payload:g,original_payload:d==null||(c=d.metadata)==null?void 0:c.payload})),r[s]=v}return this.Jn||(Ar.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getFlagVariants(){var e=this.os(Sc),t=this.os(ns);if(!t)return e||{};for(var n=Sn({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||(Ar.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var e=this.os(p1),t=this.os(gc);if(!t)return e||{};for(var n=Sn({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||(Ar.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.es||this.Bt.advanced_disable_feature_flags||this.ds||(this._instance.Fi.emit("featureFlagsReloading",!0),this.ds=setTimeout((()=>{this.vs()}),5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Kn||this.Qn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Fr())if(this.Qn)this.ts=!0;else{var n=this.Bt.token,r=this.os(ng),i={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:ke({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(Ed)||{}),group_properties:this.os(Va),timezone:hD()};hs(r)||ze(r)||(i.$device_id=r),(e!=null&&e.disableFlags||this.Bt.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.cs()&&(i.evaluation_contexts=this.hs());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Bt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Qn=!0,this._instance._send_request({method:"POST",url:s,data:i,compression:this.Bt.disable_compression?void 0:mo.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback:l=>{var c,d,f,m=!0;if(l.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),m=!1),this.Qn=!1,!i.disable_flags||this.ts){this.rs=!m;var p=[];l.error?l.error instanceof Error?p.push(l.error.name==="AbortError"?"timeout":"connection_error"):p.push("unknown_error"):l.statusCode!==200&&p.push("api_error_"+l.statusCode),(c=l.json)!=null&&c.errorsWhileComputingFlags&&p.push("errors_while_computing_flags");var g,v=!((d=l.json)==null||(d=d.quotaLimited)==null||!d.includes("feature_flags"));v&&p.push("quota_limited"),(f=this.ni)==null||f.register({[y1]:p}),v?Ar.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags((g=l.json)!==null&&g!==void 0?g:{},m,{partialResponse:!!this.Bt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var n;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var r=this.getFeatureFlagResult(e,t);return(n=r?.variant)!==null&&n!==void 0?n:r?.enabled}}else Ar.warn('getFeatureFlag for key "'+e+Ky)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var n=this.getFlagVariants(),r=e in n,i=n[e],s=this.getFlagPayloads()[e],l=String(i),c=this.os(m1)||void 0,d=this.os(ig)||void 0,f=this.os(Dd)||{};if(this.Bt.advanced_feature_flags_dedup_per_session){var m,p=this._instance.get_session_id(),g=this.os(_1);p&&p!==g&&(f={},(m=this.ni)==null||m.register({[Dd]:f,[_1]:p}))}if((t.send_event||!("send_event"in t))&&(!(e in f)||!f[e].includes(l))){var v,y,b,x,S,E,R,C,O,A;Mt(f[e])?f[e].push(l):f[e]=[l],(v=this.ni)==null||v.register({[Dd]:f});var M=this.getFeatureFlagDetails(e),P=[...(y=this.os(y1))!==null&&y!==void 0?y:[]];ze(i)&&P.push("flag_missing");var L={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:d,$feature_flag_bootstrapped_response:((b=this.Bt.bootstrap)==null||(b=b.featureFlags)==null?void 0:b[e])||null,$feature_flag_bootstrapped_payload:((x=this.Bt.bootstrap)==null||(x=x.featureFlagPayloads)==null?void 0:x[e])||null,$used_bootstrap_value:!this.rs};ze(M==null||(S=M.metadata)==null?void 0:S.version)||(L.$feature_flag_version=M.metadata.version);var H,j=(E=M==null||(R=M.reason)==null?void 0:R.description)!==null&&E!==void 0?E:M==null||(C=M.reason)==null?void 0:C.code;j&&(L.$feature_flag_reason=j),M!=null&&(O=M.metadata)!=null&&O.id&&(L.$feature_flag_id=M.metadata.id),ze(M?.original_variant)&&ze(M?.original_enabled)||(L.$feature_flag_original_response=ze(M.original_variant)?M.original_enabled:M.original_variant),M!=null&&(A=M.metadata)!=null&&A.original_payload&&(L.$feature_flag_original_payload=M==null||(H=M.metadata)==null?void 0:H.original_payload),P.length&&(L.$feature_flag_error=P.join(",")),this._instance.capture("$feature_flag_called",L)}if(r){var B=s;if(!ze(s))try{B=JSON.parse(s)}catch{}return{key:e,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:B}}}}else Ar.warn('getFeatureFlagResult for key "'+e+Ky)}getRemoteConfigPayload(e,t){var n=this.Bt.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(r.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Bt.disable_compression?void 0:mo.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback(i){var s,l=(s=i.json)==null?void 0:s.featureFlagPayloads;t(l?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Kn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return ze(n)?void 0:!!n}Ar.warn('isFeatureEnabled for key "'+e+Ky)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,n){if(this.ni){this.Kn=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,d,f,m,p){d===void 0&&(d={}),f===void 0&&(f={}),m===void 0&&(m={});var g=(P=>{var L=P.flags;return L?(P.featureFlags=Object.fromEntries(Object.keys(L).map((H=>{var j;return[H,(j=L[H].variant)!==null&&j!==void 0?j:L[H].enabled]}))),P.featureFlagPayloads=Object.fromEntries(Object.keys(L).filter((H=>L[H].enabled)).filter((H=>{var j;return(j=L[H].metadata)==null?void 0:j.payload})).map((H=>{var j;return[H,(j=L[H].metadata)==null?void 0:j.payload]})))):Ar.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),P})(l),v=g.flags,y=g.featureFlags,b=g.featureFlagPayloads;if(y){var x=l.requestId,S=l.evaluatedAt;if(Mt(y)){Ar.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var E={};if(y)for(var R=0;y.length>R;R++)E[y[R]]=!0;c&&c.register({[mm]:y,[Sc]:E})}else{var C=y,O=b,A=v;if(p!=null&&p.partialResponse)C=ke({},d,C),O=ke({},f,O),A=ke({},m,A);else if(l.errorsWhileComputingFlags)if(v){var M=new Set(Object.keys(v).filter((P=>{var L;return!((L=v[P])!=null&&L.failed)})));C=ke({},d,Object.fromEntries(Object.entries(C).filter((P=>{var[L]=P;return M.has(L)})))),O=ke({},f,Object.fromEntries(Object.entries(O||{}).filter((P=>{var[L]=P;return M.has(L)})))),A=ke({},m,Object.fromEntries(Object.entries(A||{}).filter((P=>{var[L]=P;return M.has(L)}))))}else C=ke({},d,C),O=ke({},f,O),A=ke({},m,A);c&&c.register(ke({[mm]:Object.keys(nI(C)),[Sc]:C||{},[p1]:O||{},[h1]:A||{}},x?{[m1]:x}:{},S?{[ig]:S}:{}))}}})(e,this.ni,r,i,s,n),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),Ar.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return Ar.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(ns),this.ni.unregister(gc),this.ps(),ja.info("All overrides cleared");if(Mt(e)){var t=tI(e);return this.ni.register({[ns]:t}),this.ps(),ja.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Jn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.ni.unregister(ns),ja.info("Flag overrides cleared");else if(r.flags){if(Mt(r.flags)){var i=tI(r.flags);this.ni.register({[ns]:i})}else this.ni.register({[ns]:r.flags});ja.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.ni.unregister(gc),ja.info("Payload overrides cleared")):r.payloads&&(this.ni.register({[gc]:r.payloads}),ja.info("Payload overrides set",{payloads:r.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[ns]:e}),this.ps(),ja.info("Flag overrides set",{flags:e});Ar.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Kn){var{flags:t,flagVariants:n}=this.gs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,i=(this.os(Sd)||[]).find((d=>d.flagKey===e)),s={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:s};i&&(l.$early_access_feature_name=i.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=ke({},this.getFlagVariants(),{[e]:t});(r=this.ni)==null||r.register({[mm]:Object.keys(nI(c)),[Sc]:c}),this.ps()}getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.os(Sd),i=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Bt.token+i),method:"GET",callback:s=>{var l,c;if(s.json){var d=s.json.earlyAccessFeatures;return(l=this.ni)==null||l.unregister(Sd),(c=this.ni)==null||c.register({[Sd]:d}),e(d)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((n=>t[n])),flagVariants:Object.keys(t).filter((n=>t[n])).reduce(((n,r)=>(n[r]=t[r],n)),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach((r=>r(t,n,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Ed)||{},r=e?.$set||(e!=null&&e.$set_once?{}:e),i=e?.$set_once,s={};if(i)for(var l in i)({}).hasOwnProperty.call(i,l)&&(l in n||(s[l]=i[l]));this._instance.register({[Ed]:ke({},n,s,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Ed)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Va)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=ke({},n[r],e[r]),delete e[r]})),this._instance.register({[Va]:ke({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(Va)||{};this._instance.register({[Va]:ke({},t,{[e]:{}})})}else this._instance.unregister(Va)}reset(){this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},Dne={sessionRecording:class{get Bt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===ld||this.bs===gp?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=KA,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw qs.error("started without valid sessionManager"),new Error(D1+" started without valid sessionManager. This is a bug.");if(this.Bt.cookieless_mode===os)throw new Error(D1+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(wd))==null||!e.enabled),n=!this.Bt.disable_session_recording,r=this.Bt.disable_session_recording||this._instance.consent.isOptedOut();return me&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var n=!ze(Object.assign)&&!ze(Array.from);this.ws&&n?(this.Is(e),qs.info("starting")):(this.bs=KA,this.stopRecording())}}Is(e){var t,n,r;this.ws&&(this.bs!==ld&&this.bs!==gp&&(this.bs=ZA),We!=null&&(t=We.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=We.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Cs(e):(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Ss,(i=>{if(i)return qs.error("could not load recorder",i);this.Cs(e)})))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}xs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}ks(){var e;(e=this.ni)==null||e.unregister(xS)}Ts(e,t){if(wt(e))return null;var n,r=$i(e)?e:parseFloat(e);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(qs.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}As(e){if(this.ni){var t,n,r=this.ni,i=()=>{var s,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Ts((s=this.Bt.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),d=this.Ts(l?.sampleRate,"remote config sampleRate"),f=c??d;wt(f)&&this.ks();var m=l?.minimumDurationMilliseconds;r.register({[wd]:ke({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:ke({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:f,minimumDurationMilliseconds:ze(m)?null:m,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};i(),(t=this._s)==null||t.call(this),this._s=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(i)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.As(e),void this.xs()):(this.As(e),void this.startIfEnabledOrStop()):(this.bs===ld&&(this.bs=gp,qs.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t="log"),(n=this.ys)!=null&&n.log?this.ys.log(e,t):qs.warn("log called before recorder was ready")}get Ss(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(wd);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Es(){var e,t=this._instance.get_property(wd);if(!t)return!1;var n=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-n}Cs(e){var t,n;if((t=We.__PosthogExtensions__)==null||!t.initSessionRecording)return qs.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[nD]:!0});if(this.ys||(this.ys=(n=We.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Es())return this.bs===gp||this.bs===ld?void 0:(this.bs=ld,qs.info("persisted remote config is stale, requesting fresh config before starting"),void new pD(this._instance).load());this.bs=ZA,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.ni)==null||t.register({[W5]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[Y5]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||(n=this.ni)==null||n.register({[e==="url"?Q5:X5]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.ys)==null||!n.tryAddCustomEvent(e,t))}}},Lne={autocapture:class{constructor(e){this.Rs=!1,this.Ns=null,this.Ms=!1,this.instance=e,this.rageclicks=new VA(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get Bt(){var e,t,n=On(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map((r=>new RegExp(r))),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map((r=>new RegExp(r))),n}Os(){if(this.isBrowserSupported()){if(me&&$e){var e=n=>{n=n||me?.event;try{this.Ps(n)}catch(r){qA.error("Failed to capture event",r)}};if(Bn($e,"submit",e,{capture:!0}),Bn($e,"change",e,{capture:!0}),Bn($e,"click",e,{capture:!0}),this.Bt.capture_copied_text){var t=n=>{this.Ps(n=n||me?.event,qy)};Bn($e,"copy",t,{capture:!0}),Bn($e,"cut",t,{capture:!0})}}}else qA.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Rs&&(this.Os(),this.Rs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Ms=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[o1]:!!e.autocapture_opt_out}),this.Ns=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,n=[];return(t=this.Fs)==null||t.forEach((r=>{var i=$e?.querySelectorAll(r);i?.forEach((s=>{e===s&&n.push(r)}))})),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[o1];if(hs(this.Ns)&&!wo(n)&&!this.instance.Fr())return!1;var r=(t=this.Ns)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!r}Ps(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=$A(e);OD(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&(function(p,g){if(!me||N1(p))return!1;var v,y,b;if(wo(g)?(v=!!g&&UA,y=void 0):(v=(b=g?.css_selector_ignorelist)!==null&&b!==void 0?b:UA,y=g?.content_ignorelist),v===!1)return!1;var{targetElementList:x}=zA(p,!1);return!(function(S,E){if(S===!1||ze(S))return!1;var R;if(S===!0)R=yne;else{if(!Mt(S))return!1;if(S.length>10)return je.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;R=S.map((C=>C.toLowerCase()))}return E.some((C=>{var{safeText:O,ariaLabel:A}=C;return R.some((M=>O.includes(M)||A.includes(M)))}))})(y,x.map((S=>{var E;return{safeText:nf(S).toLowerCase(),ariaLabel:((E=S.getAttribute("aria-label"))==null?void 0:E.toLowerCase().trim())||""}})))&&!jA(x,v)})(r,this.instance.config.rageclick)&&this.Ps(e,"$rageclick");var i=t===qy;if(r&&(function(p,g,v,y,b){var x,S,E,R;if(v===void 0&&(v=void 0),!me||N1(p)||(x=v)!=null&&x.url_allowlist&&!LA(v.url_allowlist)||(S=v)!=null&&S.url_ignorelist&&LA(v.url_ignorelist))return!1;if((E=v)!=null&&E.dom_event_allowlist){var C=v.dom_event_allowlist;if(C&&!C.some((L=>g.type===L)))return!1}var{parentIsUsefulElement:O,targetElementList:A}=zA(p,y);if(!(function(L,H){var j=H?.element_allowlist;if(ze(j))return!0;var B,U=function(re){if(j.some((q=>re.tagName.toLowerCase()===q)))return{v:!0}};for(var Z of L)if(B=U(Z))return B.v;return!1})(A,v)||!jA(A,(R=v)==null?void 0:R.css_selector_allowlist))return!1;var M=me.getComputedStyle(p);if(M&&M.getPropertyValue("cursor")==="pointer"&&g.type==="click")return!0;var P=p.tagName.toLowerCase();switch(P){case"html":return!1;case"form":return(b||["submit"]).indexOf(g.type)>=0;case"input":case"select":case"textarea":return(b||["change","click"]).indexOf(g.type)>=0;default:return O?(b||["click"]).indexOf(g.type)>=0:(b||["click"]).indexOf(g.type)>=0&&(MS.indexOf(P)>-1||p.getAttribute("contenteditable")==="true")}})(r,e,this.Bt,i,i?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:l}=One(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Bt.element_attribute_ignorelist,elementsChainAsString:this.Ms});if(l)return!1;var c=this.getElementSelectors(r);if(c&&c.length>0&&(s.$element_selectors=c),t===qy){var d,f=CD(me==null||(d=me.getSelection())==null?void 0:d.toString()),m=e.type||"clipboard";if(!f)return!1;s.$selected_content=f,s.$copy_type=m}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return rs($e?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ls=(me==null||(t=me.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(je.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,je.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(me&&me.history){var n=this;(e=me.history.pushState)!=null&&e.__posthog_wrapped__||HA(me.history,"pushState",(r=>function(i,s,l){r.call(this,i,s,l),n.Bs("pushState")})),(t=me.history.replaceState)!=null&&t.__posthog_wrapped__||HA(me.history,"replaceState",(r=>function(i,s,l){r.call(this,i,s,l),n.Bs("replaceState")})),this.js()}}Bs(e){try{var t,n=me==null||(t=me.location)==null?void 0:t.pathname;if(!n)return;n!==this.Ls&&this.isEnabled&&this._instance.capture(vc,{navigation_type:e}),this.Ls=n}catch(r){je.error("Error capturing "+e+" pageview",r)}}js(){if(!this.Ds){var e=()=>{this.Bs("popstate")};Bn(me,"popstate",e),this.Ds=()=>{me&&me.removeEventListener("popstate",e)}}}},heatmaps:class{get Bt(){return this.instance.config}constructor(e){var t;this.$s=!1,this.Rs=!1,this.qs=null,this.instance=e,this.$s=!((t=this.instance.persistence)==null||!t.props[s1]),this.rageclicks=new VA(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return On(this.Bt.capture_heatmaps)&&this.Bt.capture_heatmaps.flush_interval_milliseconds&&(e=this.Bt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return wt(this.Bt.capture_heatmaps)?wt(this.Bt.enable_heatmaps)?this.$s:this.Bt.enable_heatmaps:this.Bt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;Cne.info("starting..."),this.Zs(),this.Ft()}else{var e;clearInterval((e=this.qs)!==null&&e!==void 0?e:void 0),this.Vs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[s1]:t}),this.$s=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.T;return this.T=void 0,e}Hs(e){this.Tt(e.originalEvent,"deadclick")}Ft(){this.qs&&clearInterval(this.qs),this.qs=$e?.visibilityState==="visible"?setInterval(this.Yr.bind(this),this.flushIntervalMilliseconds):null}Zs(){me&&$e&&(this.zs=this.Yr.bind(this),Bn(me,lg,this.zs),this.Us=e=>this.Tt(e||me?.event),Bn($e,"click",this.Us,{capture:!0}),this.Ys=e=>this.Gs(e||me?.event),Bn($e,"mousemove",this.Ys,{capture:!0}),this.Ws=new gA(this.instance,Fte,this.Hs.bind(this)),this.Ws.startIfEnabledOrStop(),this.Xs=this.Ft.bind(this),Bn($e,ag,this.Xs),this.Rs=!0)}Vs(){var e;me&&$e&&(this.zs&&me.removeEventListener(lg,this.zs),this.Us&&$e.removeEventListener("click",this.Us,{capture:!0}),this.Ys&&$e.removeEventListener("mousemove",this.Ys,{capture:!0}),this.Xs&&$e.removeEventListener(ag,this.Xs),clearTimeout(this.Js),(e=this.Ws)==null||e.stop(),this.Rs=!1)}Ks(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),s=(function(l,c,d){for(var f=l;f&&Jg(f)&&!ra(f,"body");){if(f===d)return!1;if(bt(c,me?.getComputedStyle(f).position))return!0;f=AD(f)}return!1})($A(e),["fixed","sticky"],i);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:n),target_fixed:s,type:t}}Tt(e,t){var n;if(t===void 0&&(t="click"),!DA(e.target)&&YA(e)){var r=this.Ks(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Qs(ke({},r,{type:"rageclick"})),this.Qs(r)}}Gs(e){!DA(e.target)&&YA(e)&&(clearTimeout(this.Js),this.Js=setTimeout((()=>{this.Qs(this.Ks(e,"mousemove"))}),500))}Qs(e){if(me){var t=me.location.href,n=this.Bt.custom_personal_data_properties,r=this.Bt.mask_personal_data_properties?[...Vc,...n||[]]:[],i=ef(t,r,tf);this.T=this.T||{},this.T[i]||(this.T[i]=[]),this.T[i].push(e)}}Yr(){this.T&&!wc(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:gA,webVitalsAutocapture:class{constructor(e){var t;this.$s=!1,this.Rs=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.T.metrics.length!==0&&(this._instance.capture("$web_vitals",this.T.metrics.reduce(((n,r)=>ke({},n,{["$web_vitals_"+r.name+"_event"]:ke({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=n=>{var r,i=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0);if(ze(i))Vs.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.io();ze(s)||(wt(n?.name)||wt(n?.value)?Vs.error("Invalid metric received",n):!this.no||this.no>n.value?(this.T.url!==s&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),ze(this.T.url)&&(this.T.url=s),this.T.firstMetricTimestamp=ze(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.T.metrics.push(ke({},n,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.eo()):Vs.error("Ignoring metric with value >= "+this.no,n))}},this.so=()=>{if(!this.Rs){var n,r,i,s,l=We.__PosthogExtensions__;ze(l)||ze(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:i,onINP:s}=l.postHogWebVitalsCallbacks),n&&r&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ht.bind(this)),this.Rs=!0):Vs.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.$s=!((t=this._instance.persistence)==null||!t.props[u1]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=On(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return wt(n)?((t=this._instance.persistence)==null?void 0:t.props[f1])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(On(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=On(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=On(this.oo)&&$i(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:GA;return e>0&&6e4>=e?GA:e}get isEnabled(){var e=ur?.protocol;if(e!=="http:"&&e!=="https:")return Vs.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=On(this.oo)?this.oo.web_vitals:wo(this.oo)?this.oo:void 0;return wo(t)?t:this.$s}startIfEnabled(){this.isEnabled&&!this.Rs&&(Vs.info("enabled, starting..."),this.ur(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=On(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=On(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[u1]:t}),this._instance.persistence.register({[f1]:n})),this.$s=t,this.startIfEnabled()}}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?Vs.error("failed to load script",r):e()}))}io(){var e=me?me.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Vc,...t||[]]:[];return ef(e,n,tf)}Vs.error("Could not determine current URL")}}},$ne={exceptionObserver:class{constructor(e){var t,n,r;this.so=()=>{var i;if(me&&this.isEnabled&&(i=We.__PosthogExtensions__)!=null&&i.errorWrappingFunctions){var s=We.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=We.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=We.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.Bt.capture_unhandled_errors&&(this.ao=s(this.captureException.bind(this))),!this.lo&&this.Bt.capture_unhandled_rejections&&(this.lo=l(this.captureException.bind(this))),!this.uo&&this.Bt.capture_console_errors&&(this.uo=c(this.captureException.bind(this)))}catch(d){ad.error("failed to start",d),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[a1]),this.do=new Wee({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Gt:ad}),this.Bt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return On(e)?t=ke({},t,e):(ze(e)?this.co:e)&&(t=ke({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Bt.capture_console_errors||this.Bt.capture_unhandled_errors||this.Bt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ad.info("enabled"),this.ho(),this.ur(this.so)):this.ho()}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return ad.error("failed to load script",r);e()}))}ho(){var e,t,n;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.lo)==null||t.call(this),this.lo=void 0,(n=this.uo)==null||n.call(this),this.uo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[a1]:this.co}),this.Bt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.Bt=this.vo()}captureException(e){var t,n,r,i=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(i)?ad.info("Skipping exception capture because of client rate limiting.",{exception:i}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.fo=[],this.po=new cte([new vte,new Ote,new yte,new _te,new xte,new Ete,new wte,new Rte],(function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;i>l;l++)s[l-1]=arguments[l];return function(c,d){d===void 0&&(d=0);for(var f=[],m=c.split(`
|
|
155
|
+
`})]})]})}function Io({redirectTo:e}){const{redirectTo:t}=I.useContext(ht),[n,r]=I.useState(!1),{navigate:i,hooks:{useSession:s},onSessionChange:l}=I.useContext(ht),{refetch:c}=s();return{onSuccess:I.useCallback(async()=>{r(!0),await c?.(),l&&await l(),r(!1);const f=e||dl("redirectTo")||t;i(f)},[c,l,i,e,t]),isPending:n}}function b5({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=I.useContext(ht),r=t?.(),i=I.useRef(!1),{onSuccess:s}=Io({redirectTo:e});return I.useEffect(()=>{if(!i.current){if(!n){i.current=!0,s();return}r||(i.current=!0,s())}},[r,n,s]),T.jsx(Rr,{className:"animate-spin"})}function gS({className:e,containerClassName:t,...n}){return T.jsx(o5,{"data-slot":"input-otp",containerClassName:Re("flex items-center gap-2 has-disabled:opacity-50",t),className:Re("disabled:cursor-not-allowed",e),...n})}function sc({className:e,...t}){return T.jsx("div",{"data-slot":"input-otp-group",className:Re("flex items-center",e),...t})}function Jn({index:e,className:t,...n}){const r=I.useContext(i5),{char:i,hasFakeCaret:s,isActive:l}=r?.slots[e]??{};return T.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:Re("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[i,s&&T.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:T.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Oy({...e}){return T.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:T.jsx(KH,{})})}function vS({otpSeparators:e=0}){return e===0?T.jsxs(sc,{children:[T.jsx(Jn,{index:0}),T.jsx(Jn,{index:1}),T.jsx(Jn,{index:2}),T.jsx(Jn,{index:3}),T.jsx(Jn,{index:4}),T.jsx(Jn,{index:5})]}):e===1?T.jsxs(T.Fragment,{children:[T.jsxs(sc,{children:[T.jsx(Jn,{index:0}),T.jsx(Jn,{index:1}),T.jsx(Jn,{index:2})]}),T.jsx(Oy,{}),T.jsxs(sc,{children:[T.jsx(Jn,{index:3}),T.jsx(Jn,{index:4}),T.jsx(Jn,{index:5})]})]}):T.jsxs(T.Fragment,{children:[T.jsxs(sc,{children:[T.jsx(Jn,{index:0}),T.jsx(Jn,{index:1})]}),T.jsx(Oy,{}),T.jsxs(sc,{children:[T.jsx(Jn,{index:2}),T.jsx(Jn,{index:3})]}),T.jsx(Oy,{}),T.jsxs(sc,{children:[T.jsx(Jn,{index:4}),T.jsx(Jn,{index:5})]})]})}function JC(e){const[t,n]=I.useState();return t?T.jsx(Oee,{...e,email:t}):T.jsx(Ree,{...e,setEmail:n})}function Ree({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:i,setEmail:s}){const l=us(),{captchaRef:c,getCaptchaHeaders:d}=gf({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=I.useContext(ht);r={...m,...r};const v=Ee({email:z().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),y=Oo({resolver:To(v),defaultValues:{email:""}});n=n||y.formState.isSubmitting,I.useEffect(()=>{i?.(y.formState.isSubmitting)},[y.formState.isSubmitting,i]);async function b({email:x}){const S={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:x,type:"sign-in",fetchOptions:S}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),s(x)}catch(E){p({variant:"error",message:Mn({error:E,localization:r,localizeErrors:g})})}}return T.jsx(Ao,{...y,children:T.jsxs("form",{method:"POST",onSubmit:y.handleSubmit(b),noValidate:l,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:y.control,name:"email",render:({field:x})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...x})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(vf,{ref:c,localization:r,action:"/email-otp/send-verification-otp"}),T.jsx(tn,{type:"submit",disabled:n,className:Re("w-full",t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function Oee({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:i=0,redirectTo:s,setIsSubmitting:l,email:c}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=I.useContext(ht);r={...f,...r};const{onSuccess:g,isPending:v}=Io({redirectTo:s}),y=Ee({code:z().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),b=Oo({resolver:To(y),defaultValues:{code:""}});n=n||b.formState.isSubmitting||v,I.useEffect(()=>{l?.(b.formState.isSubmitting||v)},[b.formState.isSubmitting,v,l]);async function x({code:S}){try{await d.signIn.emailOtp({email:c,otp:S,fetchOptions:{throw:!0}}),await g()}catch(E){m({variant:"error",message:Mn({error:E,localization:r,localizeErrors:p})}),b.reset()}}return T.jsx(Ao,{...b,children:T.jsxs("form",{method:"POST",onSubmit:b.handleSubmit(x),className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:b.control,name:"code",render:({field:S})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.EMAIL_OTP}),T.jsx(Vn,{children:T.jsx(gS,{...S,maxLength:6,onChange:E=>{S.onChange(E),E.length===6&&b.handleSubmit(x)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:T.jsx(vS,{otpSeparators:i})})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx("div",{className:"grid gap-4",children:T.jsxs(tn,{type:"submit",disabled:n,className:Re(t?.button,t?.primaryButton),children:[n&&T.jsx(Rr,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function Tee({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:i,callbackURL:s,isSubmitting:l,redirectTo:c,setIsSubmitting:d}){const[f,m]=I.useState(!0),[p,g]=I.useState(30),{authClient:v,localization:y,toast:b,localizeErrors:x,navigate:S,basePath:E,viewPaths:R}=I.useContext(ht);t={...y,...t};const C=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:O,isPending:A}=Io({redirectTo:c}),M=Ee({code:z().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),P=Oo({resolver:To(M),defaultValues:{code:""}}),L=l||P.formState.isSubmitting||A;I.useEffect(()=>{d?.(P.formState.isSubmitting||A)},[P.formState.isSubmitting,A,d]),I.useEffect(()=>{if(p>0){const B=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(B)}else m(!1)},[p]);async function H({code:B}){try{const U=await v.emailOtp.verifyEmail({email:C,otp:B,fetchOptions:{throw:!0}});"token"in U&&U.token?await O():(S(`${E}/${R.SIGN_IN}${window.location.search}`),b({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){b({variant:"error",message:Mn({error:U,localization:t,localizeErrors:x})}),P.reset()}}async function j(){if(!f){m(!0),g(30);try{await v.emailOtp.sendVerificationOtp({email:C,type:"email-verification",fetchOptions:{throw:!0}}),b({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(B){b({variant:"error",message:Mn({error:B,localization:t,localizeErrors:x})}),m(!1),g(0)}}}return C?T.jsx(Ao,{...P,children:T.jsxs("form",{method:"POST",onSubmit:P.handleSubmit(H),className:Re("grid w-full gap-6",n,r?.base),children:[T.jsx(Tn,{control:P.control,name:"code",render:({field:B})=>T.jsxs(Cn,{children:[T.jsx(An,{className:r?.label,children:t.EMAIL_OTP}),T.jsx(Vn,{children:T.jsx(gS,{...B,maxLength:6,onChange:U=>{B.onChange(U),U.length===6&&P.handleSubmit(H)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:L,children:T.jsx(vS,{otpSeparators:i})})}),T.jsx(Kn,{className:r?.error})]})}),T.jsxs("div",{className:"grid gap-4",children:[T.jsxs(tn,{type:"submit",disabled:L,className:Re(r?.button,r?.primaryButton),children:[L&&T.jsx(Rr,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),T.jsx(tn,{type:"button",variant:"outline",onClick:j,disabled:f||L,className:Re("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&T.jsx(tn,{type:"button",variant:"ghost",onClick:e,disabled:L,className:"w-full",children:t.CANCEL})]})]})}):T.jsx("div",{className:Re("grid w-full gap-6",n),children:T.jsxs("div",{className:"text-center",children:[T.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),T.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function Cee({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:i}){const s=us(),{captchaRef:l,getCaptchaHeaders:c,resetCaptcha:d}=gf({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:v,toast:y,viewPaths:b,localizeErrors:x}=I.useContext(ht);r={...g,...r};const S=Ee({email:z().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=Oo({resolver:To(S),defaultValues:{email:""}});n=n||E.formState.isSubmitting,I.useEffect(()=>{i?.(E.formState.isSubmitting)},[E.formState.isSubmitting,i]);async function R({email:C}){try{const O={throw:!0,headers:await c("/forget-password")};await f.requestPasswordReset({email:C,redirectTo:`${p}${m}/${b.RESET_PASSWORD}`,fetchOptions:O}),y({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),v(`${m}/${b.SIGN_IN}${window.location.search}`)}catch(O){y({variant:"error",message:Mn({error:O,localization:r,localizeErrors:x})}),d()}}return T.jsx(Ao,{...E,children:T.jsxs("form",{method:"POST",onSubmit:E.handleSubmit(R),noValidate:s,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:E.control,name:"email",render:({field:C})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...C})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(vf,{ref:l,localization:r,action:"/forget-password"}),T.jsx(tn,{type:"submit",disabled:n,className:Re("w-full",t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function eA({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,redirectTo:s,setIsSubmitting:l}){const c=us(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=gf({localization:i}),{authClient:p,basePath:g,baseURL:v,persistClient:y,localization:b,redirectTo:x,viewPaths:S,toast:E,localizeErrors:R}=I.useContext(ht);i={...b,...i};const C=I.useCallback(()=>s||dl("redirectTo")||x,[s,x]),O=I.useCallback(()=>`${v}${n||(y?`${g}/${S.CALLBACK}?redirectTo=${encodeURIComponent(C())}`:C())}`,[n,y,g,S,v,C]),A=Ee({email:z().email({message:`${i.EMAIL} ${i.IS_INVALID}`})}),M=Oo({resolver:To(A),defaultValues:{email:""}});r=r||M.formState.isSubmitting,I.useEffect(()=>{l?.(M.formState.isSubmitting)},[M.formState.isSubmitting,l]);async function P({email:L}){try{const H={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:L,callbackURL:O(),fetchOptions:H}),E({variant:"success",message:i.MAGIC_LINK_EMAIL}),M.reset()}catch(H){E({variant:"error",message:Mn({error:H,localization:i,localizeErrors:R})}),m()}}return T.jsx(Ao,{...M,children:T.jsxs("form",{method:"POST",onSubmit:M.handleSubmit(P),noValidate:c,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:M.control,name:"email",render:({field:L})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:r,...L})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(vf,{ref:d,localization:i,action:"/sign-in/magic-link"}),T.jsx(tn,{type:"submit",disabled:r,className:Re("w-full",t?.button,t?.primaryButton),children:r?T.jsx(Rr,{className:"animate-spin"}):i.MAGIC_LINK_ACTION})]})})}function Aee({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:i,setIsSubmitting:s}){const{authClient:l,localization:c,toast:d,localizeErrors:f}=I.useContext(ht);r={...c,...r};const{onSuccess:m,isPending:p}=Io({redirectTo:i}),g=Ee({code:z().min(1,{message:r.BACKUP_CODE_REQUIRED})}),v=Oo({resolver:To(g),defaultValues:{code:""}});n=n||v.formState.isSubmitting||p,I.useEffect(()=>{s?.(v.formState.isSubmitting||p)},[v.formState.isSubmitting,p,s]);async function y({code:b}){try{await l.twoFactor.verifyBackupCode({code:b,fetchOptions:{throw:!0}}),await m()}catch(x){d({variant:"error",message:Mn({error:x,localization:r,localizeErrors:f})}),v.reset()}}return T.jsx(Ao,{...v,children:T.jsxs("form",{method:"POST",onSubmit:v.handleSubmit(y),className:Re("grid gap-6",e,t?.base),children:[T.jsx(Tn,{control:v.control,name:"code",render:({field:b})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:r.BACKUP_CODE}),T.jsx(Vn,{children:T.jsx(Ji,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...b})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(tn,{type:"submit",disabled:n,className:Re(t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function Iee({className:e,classNames:t,localization:n,passwordValidation:r}){const i=I.useRef(!1),{authClient:s,basePath:l,credentials:c,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=I.useContext(ht),v=c?.confirmPassword,y=c?.passwordValidation;n={...d,...n},r={...y,...r};const b=Ee({newPassword:qd(r,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:v?qd(r,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):z().optional()}).refine(R=>!v||R.newPassword===R.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),x=Oo({resolver:To(b),defaultValues:{newPassword:"",confirmPassword:""}}),S=x.formState.isSubmitting;I.useEffect(()=>{if(i.current)return;i.current=!0;const C=new URLSearchParams(window.location.search).get("token");(!C||C==="INVALID_TOKEN")&&(m(`${l}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[l,m,p,f,n]);async function E({newPassword:R}){try{const O=new URLSearchParams(window.location.search).get("token");await s.resetPassword({newPassword:R,token:O,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${l}/${f.SIGN_IN}${window.location.search}`)}catch(C){p({variant:"error",message:Mn({error:C,localization:n,localizeErrors:g})}),x.reset()}}return T.jsx(Ao,{...x,children:T.jsxs("form",{method:"POST",onSubmit:x.handleSubmit(E),className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:x.control,name:"newPassword",render:({field:R})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:n.NEW_PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:S,...R})}),T.jsx(Kn,{className:t?.error})]})}),v&&T.jsx(Tn,{control:x.control,name:"confirmPassword",render:({field:R})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:n.CONFIRM_PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:S,...R})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(tn,{type:"submit",disabled:S,className:Re("w-full",t?.button,t?.primaryButton),children:S?T.jsx(Rr,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function Mee({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:i,setIsSubmitting:s,passwordValidation:l,callbackURL:c}){const d=us(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=gf({localization:r}),{authClient:g,basePath:v,credentials:y,localization:b,viewPaths:x,navigate:S,toast:E,Link:R,localizeErrors:C,emailVerification:O}=I.useContext(ht),A=y?.rememberMe,M=y?.username,P=y?.passwordValidation;r={...b,...r},l={...P,...l};const{onSuccess:L,isPending:H}=Io({redirectTo:i}),j=Ee({email:M?z().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):z().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:qd(l,r),rememberMe:Pt().optional()}),B=Oo({resolver:To(j),defaultValues:{email:"",password:"",rememberMe:!A}});n=n||B.formState.isSubmitting||H,I.useEffect(()=>{s?.(B.formState.isSubmitting||H)},[B.formState.isSubmitting,H,s]);async function U({email:Z,password:re,rememberMe:q}){var W;try{let ee={};if(M&&!bq(Z)){const ae={throw:!0,headers:await m("/sign-in/username")};ee=await g.signIn.username({username:Z,password:re,rememberMe:q,fetchOptions:ae,callbackURL:c})}else{const ae={throw:!0,headers:await m("/sign-in/email")};ee=await g.signIn.email({email:Z,password:re,rememberMe:q,fetchOptions:ae,callbackURL:c})}ee.twoFactorRedirect?S(`${v}/${x.TWO_FACTOR}${window.location.search}`):await L()}catch(ee){B.resetField("password"),p(),E({variant:"error",message:Mn({error:ee,localization:r,localizeErrors:C})}),O?.otp&&((W=ee?.error)==null?void 0:W.code)==="EMAIL_NOT_VERIFIED"&&S(`${v}/${x.EMAIL_VERIFICATION}?email=${encodeURIComponent(Z)}`)}}return T.jsx(Ao,{...B,children:T.jsxs("form",{method:"POST",onSubmit:B.handleSubmit(U),noValidate:d,className:Re("grid w-full gap-6",e,t?.base),children:[T.jsx(Tn,{control:B.control,name:"email",render:({field:Z})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:M?r.USERNAME:r.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:M?"username":"email",className:t?.input,type:M?"text":"email",placeholder:M?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...Z})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:B.control,name:"password",render:({field:Z})=>T.jsxs(Cn,{children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(An,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&T.jsx(R,{className:Re("text-sm hover:underline",t?.forgotPasswordLink),href:`${v}/${x.FORGOT_PASSWORD}${d?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...Z})}),T.jsx(Kn,{className:t?.error})]})}),A&&T.jsx(Tn,{control:B.control,name:"rememberMe",render:({field:Z})=>T.jsxs(Cn,{className:"flex",children:[T.jsx(Vn,{children:T.jsx(mS,{checked:Z.value,onCheckedChange:Z.onChange,disabled:n})}),T.jsx(An,{children:r.REMEMBER_ME})]})}),T.jsx(vf,{ref:f,localization:r,action:"/sign-in/email"}),T.jsx(tn,{type:"submit",disabled:n,className:Re("w-full",t?.button,t?.primaryButton),children:n?T.jsx(Rr,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function Pee({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,redirectTo:s,setIsSubmitting:l,passwordValidation:c}){var d,f,m,p,g,v;const y=us(),{captchaRef:b,getCaptchaHeaders:x,resetCaptcha:S}=gf({localization:i}),{additionalFields:E,authClient:R,basePath:C,baseURL:O,credentials:A,localization:M,nameRequired:P,persistClient:L,redirectTo:H,signUp:j,viewPaths:B,navigate:U,toast:Z,avatar:re,localizeErrors:q,emailVerification:W}=I.useContext(ht),ee=A?.confirmPassword,ae=A?.username,Q=A?.usernameRequired??!0,k=A?.passwordValidation,K=j?.fields;i={...M,...i},c={...k,...c};const V=I.useRef(null),[D,F]=I.useState(null),[X,fe]=I.useState(!1),pe=I.useCallback(()=>s||dl("redirectTo")||H,[s,H]),xe=I.useCallback(()=>`${O}${n||(L?`${C}/${B.CALLBACK}?redirectTo=${encodeURIComponent(pe())}`:pe())}`,[n,L,C,B,O,pe]),{onSuccess:Ue,isPending:Y}=Io({redirectTo:s}),te={email:z().email({message:`${i.EMAIL} ${i.IS_INVALID}`}),password:qd(c,i),name:K?.includes("name")&&P?z().min(1,{message:`${i.NAME} ${i.IS_REQUIRED}`}):z().optional(),image:z().optional(),username:ae&&Q?z().min(1,{message:`${i.USERNAME} ${i.IS_REQUIRED}`}):z().optional(),confirmPassword:ee?qd(c,{PASSWORD_REQUIRED:i.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:i.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:i.PASSWORD_TOO_LONG,INVALID_PASSWORD:i.INVALID_PASSWORD}):z().optional()},ve={};if(K)for(const Ne of K){if(Ne==="name"||Ne==="image")continue;const Pe=E?.[Ne];if(!Pe)continue;let Me;Pe.type==="number"?Me=Pe.required?Rw(G=>G?Number(G):void 0,St({message:((d=Pe.errorMessage)==null?void 0:d.invalid)??`${Pe.label} ${i.IS_INVALID}`})):WN({message:((f=Pe.errorMessage)==null?void 0:f.invalid)??`${Pe.label} ${i.IS_INVALID}`}).optional():Pe.type==="boolean"?Me=Pe.required?ST({message:((m=Pe.errorMessage)==null?void 0:m.invalid)??`${Pe.label} ${i.IS_INVALID}`}).refine(G=>G===!0,{message:((p=Pe.errorMessage)==null?void 0:p.required)??`${Pe.label} ${i.IS_REQUIRED}`}):ST({message:((g=Pe.errorMessage)==null?void 0:g.invalid)??`${Pe.label} ${i.IS_INVALID}`}).optional():Me=Pe.required?z().min(1,((v=Pe.errorMessage)==null?void 0:v.required)??`${Pe.label} ${i.IS_REQUIRED}`):z().optional(),ve[Ne]=Me}const se=Ee(te).extend(ve).refine(Ne=>ee?Ne.password===Ne.confirmPassword:!0,{message:i.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),we={email:"",password:"",...ee&&{confirmPassword:""},...K?.includes("name")?{name:""}:{},...ae?{username:""}:{},...K?.includes("image")&&re?{image:""}:{}};if(K)for(const Ne of K){if(Ne==="name"||Ne==="image")continue;const Pe=E?.[Ne];Pe&&(we[Ne]=Pe.type==="boolean"?!1:"")}const Oe=Oo({resolver:To(se),defaultValues:we});r=r||Oe.formState.isSubmitting||Y,I.useEffect(()=>{l?.(Oe.formState.isSubmitting||Y)},[Oe.formState.isSubmitting,Y,l]);const nt=async Ne=>{if(re){fe(!0);try{const Pe=await UJ(Ne,crypto.randomUUID(),re.size,re.extension);let Me;re.upload?Me=await re.upload(Pe):Me=await FJ(Pe),Me?(F(Me),Oe.setValue("image",Me)):(F(null),Oe.setValue("image",""))}catch(Pe){console.error(Pe),Z({variant:"error",message:Mn({error:Pe,localization:i,localizeErrors:q})})}fe(!1)}},ot=()=>{F(null),Oe.setValue("image","")},Be=()=>{var Ne;return(Ne=V.current)==null?void 0:Ne.click()};async function Xe({email:Ne,password:Pe,name:Me,username:G,confirmPassword:oe,image:le,...Ae}){var Ce,Te;try{for(const[gt,Rt]of Object.entries(Ae)){const vt=E?.[gt];if(vt?.validate&&typeof Rt=="string"&&!await vt.validate(Rt)){Oe.setError(gt,{message:((Ce=vt.errorMessage)==null?void 0:Ce.validate)??((Te=vt.errorMessage)==null?void 0:Te.invalid)??`${vt.label} ${i.IS_INVALID}`});return}}const De={throw:!0,headers:await x("/sign-up/email")},Je={};G!==void 0&&(!Q&&(G===null||G===""||typeof G=="string"&&G.trim()==="")||(Je.username=G)),le!==void 0&&(Je.image=le);const et=await R.signUp.email({email:Ne,password:Pe,name:Me||"",...Je,...Ae,callbackURL:xe(),fetchOptions:De});"token"in et&&et.token?await Ue():W?.otp?U(`${C}/${B.EMAIL_VERIFICATION}?email=${encodeURIComponent(Ne)}`):(U(`${C}/${B.SIGN_IN}${window.location.search}`),Z({variant:"success",message:i.SIGN_UP_EMAIL}))}catch(De){Z({variant:"error",message:Mn({error:De,localization:i,localizeErrors:q})}),Oe.resetField("password"),Oe.resetField("confirmPassword"),S()}}return T.jsx(Ao,{...Oe,children:T.jsxs("form",{method:"POST",onSubmit:Oe.handleSubmit(Xe),noValidate:y,className:Re("grid w-full gap-6",e,t?.base),children:[K?.includes("image")&&re&&T.jsxs(T.Fragment,{children:[T.jsx("input",{ref:V,accept:"image/*",disabled:X,hidden:!0,type:"file",onChange:Ne=>{var Pe;const Me=(Pe=Ne.target.files)==null?void 0:Pe.item(0);Me&&nt(Me),Ne.target.value=""}}),T.jsx(Tn,{control:Oe.control,name:"image",render:()=>T.jsxs(Cn,{children:[T.jsx(An,{children:i.AVATAR}),T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs(BJ,{children:[T.jsx(VJ,{asChild:!0,children:T.jsx(tn,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:T.jsx(KJ,{isPending:X,className:"size-16",user:D?{name:Oe.watch("name"),email:Oe.watch("email"),image:D}:null,localization:i})})}),T.jsxs(qJ,{align:"start",onCloseAutoFocus:Ne=>Ne.preventDefault(),children:[T.jsxs(XC,{onClick:Be,disabled:X,children:[T.jsx(VH,{}),i.UPLOAD_AVATAR]}),D&&T.jsxs(XC,{onClick:ot,disabled:X,variant:"destructive",children:[T.jsx(YH,{}),i.DELETE_AVATAR]})]})]}),T.jsxs(tn,{type:"button",variant:"outline",onClick:Be,disabled:X,children:[X&&T.jsx(Rr,{className:"animate-spin"}),i.UPLOAD]})]}),T.jsx(Kn,{})]})})]}),K?.includes("name")&&T.jsx(Tn,{control:Oe.control,name:"name",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsxs(An,{className:t?.label,children:[i.NAME,!P&&T.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:"name",className:t?.input,placeholder:i.NAME_PLACEHOLDER,disabled:r,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),ae&&T.jsx(Tn,{control:Oe.control,name:"username",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsxs(An,{className:t?.label,children:[i.USERNAME,!Q&&T.jsx("span",{className:"ml-1 text-muted-foreground",children:i.OPTIONAL_BRACKETS})]}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:"username",className:t?.input,placeholder:i.USERNAME_PLACEHOLDER,disabled:r,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:Oe.control,name:"email",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.EMAIL}),T.jsx(Vn,{children:T.jsx(Ji,{autoComplete:"email",className:t?.input,type:"email",placeholder:i.EMAIL_PLACEHOLDER,disabled:r,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:Oe.control,name:"password",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:i.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),ee&&T.jsx(Tn,{control:Oe.control,name:"confirmPassword",render:({field:Ne})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:i.CONFIRM_PASSWORD}),T.jsx(Vn,{children:T.jsx(Qd,{autoComplete:"new-password",className:t?.input,placeholder:i.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...Ne,value:Ne.value})}),T.jsx(Kn,{className:t?.error})]})}),K?.filter(Ne=>Ne!=="name"&&Ne!=="image").map(Ne=>{const Pe=E?.[Ne];return Pe?Pe.type==="boolean"?T.jsx(Tn,{control:Oe.control,name:Ne,render:({field:Me})=>T.jsxs(Cn,{className:"flex",children:[T.jsx(Vn,{children:T.jsx(mS,{checked:Me.value,onCheckedChange:Me.onChange,disabled:r})}),T.jsx(An,{className:t?.label,children:Pe.label}),T.jsx(Kn,{className:t?.error})]})},Ne):T.jsx(Tn,{control:Oe.control,name:Ne,render:({field:Me})=>T.jsxs(Cn,{children:[T.jsx(An,{className:t?.label,children:Pe.label}),T.jsx(Vn,{children:Pe.type==="number"?T.jsx(Ji,{className:t?.input,type:"number",placeholder:Pe.placeholder||(typeof Pe.label=="string"?Pe.label:""),disabled:r,...Me,value:Me.value}):Pe.multiline?T.jsx(YJ,{className:t?.input,placeholder:Pe.placeholder||(typeof Pe.label=="string"?Pe.label:""),disabled:r,...Me,value:Me.value}):T.jsx(Ji,{className:t?.input,type:"text",placeholder:Pe.placeholder||(typeof Pe.label=="string"?Pe.label:""),disabled:r,...Me,value:Me.value})}),T.jsx(Kn,{className:t?.error})]})},Ne):(console.error(`Additional field ${Ne} not found`),null)}),T.jsx(vf,{ref:b,localization:i,action:"/sign-up/email"}),T.jsx(tn,{type:"submit",disabled:r,className:Re("w-full",t?.button,t?.primaryButton),children:r?T.jsx(Rr,{className:"animate-spin"}):i.SIGN_UP_ACTION})]})})}function Nee({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:i=0,redirectTo:s,setIsSubmitting:l}){var c;const d=us(),f=d?dl("totpURI"):null,m=I.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:v},localization:y,twoFactor:b,viewPaths:x,toast:S,Link:E,localizeErrors:R}=I.useContext(ht);r={...y,...r};const{onSuccess:C,isPending:O}=Io({redirectTo:s}),{data:A}=v(),M=(c=A?.user)==null?void 0:c.twoFactorEnabled,[P,L]=I.useState(b?.length===1?b[0]:null),[H,j]=I.useState(!1),[B,U]=I.useState(0),Z=Ee({code:z().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:Pt().optional()}),re=Oo({resolver:To(Z),defaultValues:{code:""}});n=n||re.formState.isSubmitting||O,I.useEffect(()=>{l?.(re.formState.isSubmitting||O)},[re.formState.isSubmitting,O,l]),I.useEffect(()=>{P==="otp"&&B<=0&&!m.current&&(m.current=!0,q())},[P]),I.useEffect(()=>{if(B<=0)return;const ee=setTimeout(()=>{U(ae=>ae-1)},1e3);return()=>clearTimeout(ee)},[B]);const q=async()=>{if(!(H||B>0)){try{j(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(ee){S({variant:"error",message:Mn({error:ee,localization:r,localizeErrors:R})}),ee.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,j(!1)}};async function W({code:ee,trustDevice:ae}){try{await(P==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:ee,trustDevice:ae,fetchOptions:{throw:!0}}),await C(),A&&!M&&S({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(Q){S({variant:"error",message:Mn({error:Q,localization:r,localizeErrors:R})}),re.reset()}}return T.jsx(Ao,{...re,children:T.jsxs("form",{method:"POST",onSubmit:re.handleSubmit(W),className:Re("grid w-full gap-6",e,t?.base),children:[b?.includes("totp")&&f&&P==="totp"&&T.jsxs("div",{className:"space-y-3",children:[T.jsx(h5,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),T.jsx(PJ,{className:Re("border shadow-xs",t?.qrCode),value:f})]}),P!==null&&T.jsxs(T.Fragment,{children:[T.jsx(Tn,{control:re.control,name:"code",render:({field:ee})=>T.jsxs(Cn,{children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(An,{className:t?.label,children:r.ONE_TIME_PASSWORD}),T.jsx(E,{className:Re("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${x.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),T.jsx(Vn,{children:T.jsx(gS,{...ee,maxLength:6,onChange:ae=>{ee.onChange(ae),ae.length===6&&re.handleSubmit(W)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:T.jsx(vS,{otpSeparators:i})})}),T.jsx(Kn,{className:t?.error})]})}),T.jsx(Tn,{control:re.control,name:"trustDevice",render:({field:ee})=>T.jsxs(Cn,{className:"flex",children:[T.jsx(Vn,{children:T.jsx(mS,{checked:ee.value,onCheckedChange:ee.onChange,disabled:n,className:t?.checkbox})}),T.jsx(An,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),T.jsxs("div",{className:"grid gap-4",children:[P!==null&&T.jsxs(tn,{type:"submit",disabled:n,className:Re(t?.button,t?.primaryButton),children:[n&&T.jsx(Rr,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),P==="otp"&&b?.includes("otp")&&T.jsxs(tn,{type:"button",variant:"outline",onClick:q,disabled:B>0||H||n,className:Re(t?.button,t?.outlineButton),children:[H?T.jsx(Rr,{className:"animate-spin"}):T.jsx(IT,{className:t?.icon}),r.RESEND_CODE,B>0&&` (${B})`]}),P!=="otp"&&b?.includes("otp")&&T.jsxs(tn,{type:"button",variant:"secondary",className:Re(t?.button,t?.secondaryButton),onClick:()=>L("otp"),disabled:n,children:[T.jsx(IT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),P!=="totp"&&b?.includes("totp")&&T.jsxs(tn,{type:"button",variant:"secondary",className:Re(t?.button,t?.secondaryButton),onClick:()=>L("totp"),disabled:n,children:[T.jsx(ZH,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function w5({redirectTo:e}){const t=I.useRef(!1),{authClient:n,basePath:r,viewPaths:i}=I.useContext(ht),{onSuccess:s}=Io({redirectTo:e||`${r}/${i.SIGN_IN}`});return I.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(s))},[n,s]),T.jsx(Rr,{className:"animate-spin"})}function kee({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,pathname:s,redirectTo:l,view:c,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:v,emailOTP:y,signUp:b,twoFactor:x,viewPaths:S,replace:E}=I.useContext(ht),R=!!b;if(i={...g,...i},I.useEffect(()=>{s&&!Cb(S,s)&&(console.error(`Invalid auth view: ${s}`),E(`${m}/${S.SIGN_IN}${window.location.search}`))},[s,S,m,E]),c=c||Cb(S,s)||"SIGN_IN",I.useEffect(()=>{let C=!1;c==="MAGIC_LINK"&&(!v||!p&&!y)&&(C=!0),c==="EMAIL_OTP"&&(!y||!p&&!v)&&(C=!0),c==="SIGN_UP"&&!R&&(C=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(c)&&(C=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(c)&&!x&&(C=!0),C&&E(`${m}/${S.SIGN_IN}${window.location.search}`)},[m,c,S,p,E,y,R,v,x]),c==="SIGN_OUT")return T.jsx(w5,{redirectTo:l});if(c==="CALLBACK")return T.jsx(b5,{redirectTo:l});if(c==="SIGN_IN")return p?T.jsx(Mee,{className:e,classNames:t,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f,callbackURL:n}):v?T.jsx(eA,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):y?T.jsx(JC,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):null;if(c==="TWO_FACTOR")return T.jsx(Nee,{className:e,classNames:t,localization:i,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="RECOVER_ACCOUNT")return T.jsx(Aee,{className:e,classNames:t,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="MAGIC_LINK")return T.jsx(eA,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="EMAIL_OTP")return T.jsx(JC,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="EMAIL_VERIFICATION")return T.jsx(Tee,{className:e,classNames:t,callbackURL:n,localization:i,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="FORGOT_PASSWORD")return T.jsx(Cee,{className:e,classNames:t,localization:i,isSubmitting:r,setIsSubmitting:f});if(c==="RESET_PASSWORD")return T.jsx(Iee,{className:e,classNames:t,localization:i});if(c==="SIGN_UP")return R&&T.jsx(Pee,{className:e,classNames:t,callbackURL:n,localization:i,redirectTo:l,isSubmitting:r,setIsSubmitting:f})}function Dee({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:i,replace:s,toast:l}=I.useContext(ht),c=I.useMemo(()=>({...r,...n}),[r,n]),{data:d}=$J(),[f,m]=I.useState(null);return I.useEffect(()=>{const p=dl("invitationId");if(!p){l({variant:"error",message:c.INVITATION_NOT_FOUND}),s(i);return}m(p)},[c.INVITATION_NOT_FOUND,l,s,i]),!d||!f?T.jsx(S5,{className:e,classNames:t}):T.jsx(Lee,{className:e,classNames:t,localization:c,invitationId:f})}function Lee({className:e,classNames:t,localization:n,invitationId:r}){var i;const{authClient:s,hooks:{useInvitation:l},localization:c,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=I.useContext(ht),v=I.useMemo(()=>({...c,...n}),[c,n]),[y,b]=I.useState(!1),[x,S]=I.useState(!1),E=y||x,{data:R,isPending:C}=l({query:{id:r}}),O=I.useCallback(()=>dl("redirectTo")||f,[f]);I.useEffect(()=>{if(!(C||!r)){if(!R){p({variant:"error",message:v.INVITATION_NOT_FOUND}),m(f);return}(R.status!=="pending"||new Date(R.expiresAt)<new Date)&&(p({variant:"error",message:new Date(R.expiresAt)<new Date?v.INVITATION_EXPIRED:v.INVITATION_NOT_FOUND}),m(f))}},[R,C,r,v,p,m,f]);const A=async()=>{S(!0);try{await s.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:v.INVITATION_ACCEPTED||"Invitation accepted"}),m(O())}catch(j){p({variant:"error",message:Mn({error:j,localization:v,localizeErrors:g})}),S(!1)}},M=async()=>{b(!0);try{await s.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:v.INVITATION_REJECTED}),m(f)}catch(j){p({variant:"error",message:Mn({error:j,localization:v,localizeErrors:g})}),b(!1)}},H=((i=[...[{role:"owner",label:v.OWNER},{role:"admin",label:v.ADMIN},{role:"member",label:v.MEMBER}],...d?.customRoles||[]].find(j=>j.role===R?.role))==null?void 0:i.label)||R?.role;return R?T.jsxs(Wd,{className:Re("w-full max-w-sm",e,t?.base),children:[T.jsxs(fS,{className:Re("justify-items-center text-center",t?.header),children:[T.jsx(d5,{className:Re("text-lg md:text-xl",t?.title),children:v.ACCEPT_INVITATION}),T.jsx(f5,{className:Re("text-xs md:text-sm",t?.description),children:v.ACCEPT_INVITATION_DESCRIPTION})]}),T.jsxs(hS,{className:Re("flex flex-col gap-6 truncate",t?.content),children:[T.jsxs(Wd,{className:Re("flex-row items-center p-4"),children:[T.jsx(y5,{organization:{id:R.organizationId,name:R.organizationName,slug:R.organizationSlug,logo:R.organizationLogo,createdAt:new Date},localization:v}),T.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:H})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[T.jsxs(tn,{variant:"outline",className:Re(t?.button,t?.outlineButton),onClick:M,disabled:E,children:[y?T.jsx(Rr,{className:"animate-spin"}):T.jsx(QH,{}),v.REJECT]}),T.jsxs(tn,{className:Re(t?.button,t?.primaryButton),onClick:A,disabled:E,children:[x?T.jsx(Rr,{className:"animate-spin"}):T.jsx(n4,{}),v.ACCEPT]})]})]})]}):T.jsx(S5,{className:e,classNames:t})}var S5=({className:e,classNames:t,localization:n})=>T.jsxs(Wd,{className:Re("w-full max-w-sm",e,t?.base),children:[T.jsxs(fS,{className:Re("justify-items-center",t?.header),children:[T.jsx(is,{className:Re("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),T.jsx(is,{className:Re("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),T.jsxs(hS,{className:Re("flex flex-col gap-6 truncate",t?.content),children:[T.jsxs(Wd,{className:Re("flex-row items-center p-4"),children:[T.jsx(y5,{isPending:!0,localization:n}),T.jsx(is,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[T.jsx(is,{className:"h-9 w-full"}),T.jsx(is,{className:"h-9 w-full"})]})]})]});function tA({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return T.jsx(LJ,{"data-slot":"separator",decorative:n,orientation:t,className:Re("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function $ee({classNames:e,isSubmitting:t,localization:n,view:r}){var i,s,l,c;const{viewPaths:d,navigate:f,basePath:m}=I.useContext(ht);return T.jsxs(tn,{className:Re("w-full",(i=e?.form)==null?void 0:i.button,(s=e?.form)==null?void 0:s.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?T.jsx(r4,{className:(l=e?.form)==null?void 0:l.icon}):T.jsx(i4,{className:(c=e?.form)==null?void 0:c.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function jee({classNames:e,isSubmitting:t,localization:n,view:r}){var i,s,l,c;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=I.useContext(ht);return T.jsxs(tn,{className:Re("w-full",(i=e?.form)==null?void 0:i.button,(s=e?.form)==null?void 0:s.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="MAGIC_LINK"||!p?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?T.jsx(r4,{className:(l=e?.form)==null?void 0:l.icon}):T.jsx(i4,{className:(c=e?.form)==null?void 0:c.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function Uee({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:i,localizeErrors:s}=I.useContext(ht),l=I.useRef(!1);e=I.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:c}=Io({redirectTo:t});return I.useEffect(()=>{if(!l.current){l.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:c}})}catch(d){i({variant:"error",message:Mn({error:d,localization:e,localizeErrors:s})})}}},[n,e,s,c,i]),null}function zee({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:i}){var s,l;const{authClient:c,localization:d,toast:f,localizeErrors:m}=I.useContext(ht);n={...d,...n};const{onSuccess:p}=Io({redirectTo:r}),g=async()=>{i?.(!0);try{const v=await c.signIn.passkey({fetchOptions:{throw:!0}});v?.error?(f({variant:"error",message:Mn({error:v.error,localization:n,localizeErrors:m})}),i?.(!1)):p()}catch(v){f({variant:"error",message:Mn({error:v,localization:n,localizeErrors:m})}),i?.(!1)}};return T.jsxs(tn,{className:Re("w-full",(s=e?.form)==null?void 0:s.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[T.jsx(GH,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function nA({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:i,other:s,provider:l,redirectTo:c,socialLayout:d,setIsSubmitting:f}){var m,p,g,v;const{authClient:y,basePath:b,baseURL:x,persistClient:S,redirectTo:E,viewPaths:R,social:C,genericOAuth:O,toast:A,localizeErrors:M}=I.useContext(ht),P=I.useCallback(()=>c||dl("redirectTo")||E,[c,E]),L=I.useCallback(()=>`${x}${n||(S?`${b}/${R.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,S,b,R,x,P]),H=async()=>{f(!0);try{if(s){const j={providerId:l.provider,callbackURL:L(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(j),setTimeout(()=>{f(!1)},1e4)):await y.signIn.oauth2(j)}else{const j={provider:l.provider,callbackURL:L(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(j),setTimeout(()=>{f(!1)},1e4)):await y.signIn.social(j)}}catch(j){A({variant:"error",message:Mn({error:j,localization:i,localizeErrors:M})}),f(!1)}};return T.jsxs(tn,{className:Re(d==="vertical"?"w-full":"grow",e,(m=t?.form)==null?void 0:m.button,(p=t?.form)==null?void 0:p.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:H,children:[l.icon&&T.jsx(l.icon,{className:(v=t?.form)==null?void 0:v.icon}),d==="grid"&&l.name,d==="vertical"&&`${i.SIGN_IN_WITH} ${l.name}`]})}function Ale({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:i,localization:s,path:l,pathname:c,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,v,y,b,x,S;const E=us(),{basePath:R,credentials:C,localization:O,magicLink:A,emailOTP:M,oneTap:P,passkey:L,signUp:H,social:j,genericOAuth:B,viewPaths:U,Link:Z}=I.useContext(ht);s={...O,...s};let re=f;re==="auto"&&(re=C&&j?.providers&&j.providers.length>2?"horizontal":"vertical");const q=l??c?.split("/").pop(),W=m||Cb(U,q)||"SIGN_IN",[ee,ae]=I.useState(!1);if(I.useEffect(()=>{const k=()=>ae(!1);return window.addEventListener("pagehide",k),()=>{ae(!1),window.removeEventListener("pagehide",k)}},[]),W==="CALLBACK")return T.jsx(b5,{redirectTo:d});if(W==="SIGN_OUT")return T.jsx(w5,{redirectTo:d});if(W==="ACCEPT_INVITATION")return T.jsx(Dee,{className:e,classNames:t});const Q=!C&&!A&&!M?s.DISABLED_CREDENTIALS_DESCRIPTION:s[`${W}_DESCRIPTION`];return T.jsxs(Wd,{className:Re("w-full max-w-sm",e,t?.base),children:[T.jsx(fS,{className:t?.header,children:r||T.jsxs(T.Fragment,{children:[T.jsx(d5,{className:Re("text-lg md:text-xl",t?.title),children:s[W]}),Q&&T.jsx(f5,{className:Re("text-xs md:text-sm",t?.description),children:Q})]})}),T.jsxs(hS,{className:Re("grid gap-6",t?.content),children:[P&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(W)&&T.jsx(Uee,{localization:s,redirectTo:d}),(C||A||M)&&T.jsxs("div",{className:"grid gap-4",children:[T.jsx(kee,{classNames:t?.form,callbackURL:n,isSubmitting:ee,localization:s,otpSeparators:p,view:W,redirectTo:d,setIsSubmitting:ae}),A&&(C&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(W)||M&&W==="EMAIL_OTP")&&T.jsx(jee,{classNames:t,localization:s,view:W,isSubmitting:ee}),M&&(C&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(W)||A&&["SIGN_IN","MAGIC_LINK"].includes(W))&&T.jsx($ee,{classNames:t,localization:s,view:W,isSubmitting:ee})]}),W!=="RESET_PASSWORD"&&W!=="EMAIL_VERIFICATION"&&(((g=j?.providers)==null?void 0:g.length)||((v=B?.providers)==null?void 0:v.length)||W==="SIGN_IN"&&L)&&T.jsxs(T.Fragment,{children:[(C||A||M)&&T.jsxs("div",{className:Re("flex items-center gap-2",t?.continueWith),children:[T.jsx(tA,{className:Re("!w-auto grow",t?.separator)}),T.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:s.OR_CONTINUE_WITH}),T.jsx(tA,{className:Re("!w-auto grow",t?.separator)})]}),T.jsxs("div",{className:"grid gap-4",children:[(((y=j?.providers)==null?void 0:y.length)||((b=B?.providers)==null?void 0:b.length))&&T.jsxs("div",{className:Re("flex w-full items-center justify-between gap-4",re==="horizontal"&&"flex-wrap",re==="vertical"&&"flex-col",re==="grid"&&"grid grid-cols-2"),children:[(x=j?.providers)==null?void 0:x.map(k=>{const K=yee.find(V=>V.provider===k);return K?T.jsx(nA,{classNames:t,callbackURL:n,isSubmitting:ee,localization:s,provider:K,redirectTo:d,setIsSubmitting:ae,socialLayout:re},k):null}),(S=B?.providers)==null?void 0:S.map(k=>T.jsx(nA,{classNames:t,callbackURL:n,isSubmitting:ee,localization:s,provider:k,redirectTo:d,setIsSubmitting:ae,socialLayout:re,other:!0},k.provider))]}),L&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(W)&&T.jsx(zee,{classNames:t,isSubmitting:ee,localization:s,redirectTo:d,setIsSubmitting:ae})]})]})]}),i&&T.jsx(QC,{className:t?.footer,children:i}),C&&H&&T.jsxs(QC,{className:Re("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?s.DONT_HAVE_AN_ACCOUNT:W==="SIGN_UP"?s.ALREADY_HAVE_AN_ACCOUNT:T.jsx(FH,{className:"size-3"}),W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"||W==="SIGN_UP"?T.jsx(Z,{className:Re("text-foreground underline",t?.footerLink),href:`${R}/${U[W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:T.jsx(tn,{variant:"link",size:"sm",className:Re("px-0 text-foreground underline",t?.footerLink),children:W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?s.SIGN_UP:s.SIGN_IN})}):T.jsx(tn,{variant:"link",size:"sm",className:Re("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:s.GO_BACK})]})]})}function Ile({children:e}){const{hooks:{useSession:t}}=I.useContext(ht),{isPending:n}=t();return n?e:null}function Mle({children:e}){const{hooks:{useSession:t}}=I.useContext(ht),{data:n}=t();return n?e:null}function Ple({children:e}){const{hooks:{useSession:t}}=I.useContext(ht),{data:n,isPending:r}=t();return!n&&!r?e:null}function Fee(e){const t=Ro.c(8),{children:n}=e,r=rf();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={basePath:"/",pathMode:"slug"},t[0]=i):i=t[0];let s,l;t[1]!==r?(s=d=>r({to:d}),l=d=>r({to:d,replace:!0}),t[1]=r,t[2]=s,t[3]=l):(s=t[2],l=t[3]);let c;return t[4]!==n||t[5]!==s||t[6]!==l?(c=T.jsx($H,{authClient:Mg,redirectTo:"/",organization:i,navigate:s,replace:l,Link:Bee,children:n}),t[4]=n,t[5]=s,t[6]=l,t[7]=c):c=t[7],c}function Bee(e){const{href:t,className:n,children:r,...i}=e;return T.jsx(dw,{to:t,className:n,...i,children:r})}var me=typeof window<"u"?window:void 0,Yn=typeof globalThis<"u"?globalThis:me;typeof self>"u"&&(Yn.self=Yn),typeof File>"u"&&(Yn.File=function(){});var fi=Yn?.navigator,$e=Yn?.document,ur=Yn?.location,Qb=Yn?.fetch,Xb=Yn!=null&&Yn.XMLHttpRequest&&"withCredentials"in new Yn.XMLHttpRequest?Yn.XMLHttpRequest:void 0,rA=Yn?.AbortController,Vee=Yn?.CompressionStream,Gr=fi?.userAgent,We=me??{},iA="1.372.3",Nr={DEBUG:!1,LIB_VERSION:iA,LIB_NAME:"web",JS_SDK_VERSION:iA};function oA(e,t,n,r,i,s,l){try{var c=e[s](l),d=c.value}catch(f){return void n(f)}c.done?t(d):Promise.resolve(d).then(r,i)}function Pi(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var s=e.apply(t,n);function l(d){oA(s,r,i,l,c,"next",d)}function c(d){oA(s,r,i,l,c,"throw",d)}l(void 0)}))}}function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(null,arguments)}function E5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jb(){return Jb=Pi((function*(e,t,n){t===void 0&&(t=!0);try{var r=new CompressionStream("gzip"),i=r.writable.getWriter(),s=i.write(new TextEncoder().encode(e)).then((()=>i.close())).catch((function(){var d=Pi((function*(f){try{yield i.abort(f)}catch{}throw f}));return function(f){return d.apply(this,arguments)}})()),l=new Response(r.readable).blob(),[c]=yield Promise.all([l,s]);return c}catch(d){if(n!=null&&n.rethrow)throw d;return t&&console.error("Failed to gzip compress data",d),null}})),Jb.apply(this,arguments)}var qee=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],sA=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return qee.concat(t).some((r=>{var i=r.toLowerCase();return n.indexOf(i)!==-1}))},Hee=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function bt(e,t){return e.indexOf(t)!==-1}var Wg=function(e){return e.trim()},e1=function(e){return e.replace(/^\$/,"")},x5=Object.prototype,R5=x5.hasOwnProperty,Qg=x5.toString,Mt=Array.isArray||function(e){return Qg.call(e)==="[object Array]"},rs=e=>typeof e=="function",On=e=>e===Object(e)&&!Mt(e),wc=e=>{if(On(e)){for(var t in e)if(R5.call(e,t))return!1;return!0}return!1},ze=e=>e===void 0,vn=e=>Qg.call(e)=="[object String]",pm=e=>vn(e)&&e.trim().length===0,hs=e=>e===null,wt=e=>ze(e)||hs(e),$i=e=>Qg.call(e)=="[object Number]"&&e==e,mc=e=>$i(e)&&e>0,wo=e=>Qg.call(e)==="[object Boolean]",Gee=e=>e instanceof FormData,Kee=e=>bt(Hee,e);function O5(e){return e===null||typeof e!="object"}function Qm(e,t){return{}.toString.call(e)==="[object "+t+"]"}function _S(e){return typeof Event<"u"&&(function(t,n){try{return t instanceof n}catch{return!1}})(e,Event)}var Zee=[!0,"true",1,"1","yes"],Ty=e=>bt(Zee,e),Yee=[!1,"false",0,"0","no"];function So(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),$i(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),So(i||n,t,n,r))}class Wee{constructor(t){this.$t={},this.zt=t.zt,this.Ut=So(t.bucketSize,0,100,t.Gt),this.Wt=So(t.refillRate,0,this.Ut,t.Gt),this.Xt=So(t.refillInterval,0,864e5,t.Gt)}Jt(t,n){var r=Math.floor((n-t.lastAccess)/this.Xt);r>0&&(t.tokens=Math.min(t.tokens+r*this.Wt,this.Ut),t.lastAccess=t.lastAccess+r*this.Xt)}consumeRateLimit(t){var n,r=Date.now(),i=String(t),s=this.$t[i];return s?this.Jt(s,r):this.$t[i]=s={tokens:this.Ut,lastAccess:r},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.zt)==null||n.call(this,t)),s.tokens===0)}stop(){this.$t={}}}var cp,aA,Cy,pi="Mobile",Xm="iOS",ss="Android",zc="Tablet",T5=ss+" "+zc,C5="iPad",A5="Apple",I5=A5+" Watch",kd="Safari",Fc="BlackBerry",M5="Samsung",P5=M5+"Browser",N5=M5+" Internet",Ja="Chrome",Qee=Ja+" OS",k5=Ja+" "+Xm,yS="Internet Explorer",D5=yS+" "+pi,bS="Opera",Xee=bS+" Mini",wS="Edge",L5="Microsoft "+wS,Pc="Firefox",$5=Pc+" "+Xm,Xd="Nintendo",Jd="PlayStation",Nc="Xbox",j5=ss+" "+pi,U5=pi+" "+kd,_d="Windows",t1=_d+" Phone",lA="Nokia",n1="Ouya",z5="Generic",Jee=z5+" "+pi.toLowerCase(),F5=z5+" "+zc.toLowerCase(),r1="Konqueror",Pr="(\\d+(\\.\\d+)?)",Ay=new RegExp("Version/"+Pr),ete=new RegExp(Nc,"i"),tte=new RegExp(Jd+" \\w+","i"),nte=new RegExp(Xd+" \\w+","i"),SS=new RegExp(Fc+"|PlayBook|BB10","i"),rte={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},B5=function(e,t){return t=t||"",bt(e," OPR/")&&bt(e,"Mini")?Xee:bt(e," OPR/")?bS:SS.test(e)?Fc:bt(e,"IE"+pi)||bt(e,"WPDesktop")?D5:bt(e,P5)?N5:bt(e,wS)||bt(e,"Edg/")?L5:bt(e,"FBIOS")?"Facebook "+pi:bt(e,"UCWEB")||bt(e,"UCBrowser")?"UC Browser":bt(e,"CriOS")?k5:bt(e,"CrMo")||bt(e,Ja)?Ja:bt(e,ss)&&bt(e,kd)?j5:bt(e,"FxiOS")?$5:bt(e.toLowerCase(),r1.toLowerCase())?r1:((n,r)=>r&&bt(r,A5)||(function(i){return bt(i,kd)&&!bt(i,Ja)&&!bt(i,ss)})(n))(e,t)?bt(e,pi)?U5:kd:bt(e,Pc)?Pc:bt(e,"MSIE")||bt(e,"Trident/")?yS:bt(e,"Gecko")?Pc:""},ite={[D5]:[new RegExp("rv:"+Pr)],[L5]:[new RegExp(wS+"?\\/"+Pr)],[Ja]:[new RegExp("("+Ja+"|CrMo)\\/"+Pr)],[k5]:[new RegExp("CriOS\\/"+Pr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Pr)],[kd]:[Ay],[U5]:[Ay],[bS]:[new RegExp("(Opera|OPR)\\/"+Pr)],[Pc]:[new RegExp(Pc+"\\/"+Pr)],[$5]:[new RegExp("FxiOS\\/"+Pr)],[r1]:[new RegExp("Konqueror[:/]?"+Pr,"i")],[Fc]:[new RegExp(Fc+" "+Pr),Ay],[j5]:[new RegExp("android\\s"+Pr,"i")],[N5]:[new RegExp(P5+"\\/"+Pr)],[yS]:[new RegExp("(rv:|MSIE )"+Pr)],Mozilla:[new RegExp("rv:"+Pr)]},ote=function(e,t){var n=B5(e,t),r=ite[n];if(ze(r))return null;for(var i=0;r.length>i;i++){var s=e.match(r[i]);if(s)return parseFloat(s[s.length-2])}return null},cA=[[new RegExp(Nc+"; "+Nc+" (.*?)[);]","i"),e=>[Nc,e&&e[1]||""]],[new RegExp(Xd,"i"),[Xd,""]],[new RegExp(Jd,"i"),[Jd,""]],[SS,[Fc,""]],[new RegExp(_d,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[t1,""];if(new RegExp(pi).test(t)&&!/IEMobile\b/.test(t))return[_d+" "+pi,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=rte[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[_d,r]}return[_d,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Xm,[e[3],e[4],e[5]||"0"].join(".")]:[Xm,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=ze(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+ss+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ss+")","i"),e=>e&&e[2]?[ss,[e[2],e[3],e[4]||"0"].join(".")]:[ss,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Qee,""]],[/Linux|debian/i,["Linux",""]]],uA=function(e){return nte.test(e)?Xd:tte.test(e)?Jd:ete.test(e)?Nc:new RegExp(n1,"i").test(e)?n1:new RegExp("("+t1+"|WPDesktop)","i").test(e)?t1:/iPad/.test(e)?C5:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?I5:SS.test(e)?Fc:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(lA,"i").test(e)?lA:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(pi).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?ss:T5:new RegExp("(pda|"+pi+")","i").test(e)?Jee:new RegExp(zc,"i").test(e)&&!new RegExp(zc+" pc","i").test(e)?F5:""},ste=e=>e instanceof Error,V5={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},ate=V5.info;function q5(e){if(wo(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(Mt(e))return{arrayValue:{values:e.map((t=>q5(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function dA(e){var t=[];for(var n in e){var r=e[n];hs(r)||ze(r)||t.push({key:n,value:q5(r)})}return t}function lte(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return Cy&&n.length===aA||(aA=n.length,Cy=n.reduce(((r,i)=>{cp||(cp={});var s=cp[i];if(s)r[s[0]]=s[1];else for(var l=e(i),c=l.length-1;c>=0;c--){var d=l[c],f=d?.filename,m=t[i];if(f&&m){r[f]=m,cp[i]=[f,m];break}}return r}),{})),Cy}}class cte{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,n,0).apply(t),s=this.buildParsingContext(n),l=this.parseStacktrace(i,s);return{$exception_list:this.convertToExceptionList(l,r),$exception_level:"error"}}modifyFrames(t){var n=this;return Pi((function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&Mt(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t}))()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,i;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),ke({},t,{cause:r,stack:i})}applyChunkIds(t,n){return t.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return Pi((function*(){var r=t;for(var i of n.modifiers)r=yield i(r);return r}))()}convertToExceptionList(t,n){var r,i,s,l={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(i=n.handled)===null||i===void 0||i,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,ke({},n,{handled:!0}))),c}buildParsingContext(t){var n;return{chunkIdMap:lte(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var i=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(t,n,l);return this.applyCoercers(s,c)}};return ke({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:s=>i(s,r),next:s=>i(s,r+1)})}}var Bc="?";function i1(e,t,n,r,i){var s={platform:e,filename:t,function:n==="<anonymous>"?Bc:n,in_app:!0};return ze(r)||(s.lineno=r),ze(i)||(s.colno=i),s}var H5=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Bc,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},ute=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dte=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fte=/\((\S*)(?::(\d+))(?::(\d+))\)/,hte=(e,t)=>{var n=ute.exec(e);if(n){var[,r,i,s]=n;return i1(t,r,Bc,+i,+s)}var l=dte.exec(e);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=fte.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[d,f]=H5(l[1]||Bc,l[2]);return i1(t,f,d,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},pte=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mte=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gte=(e,t)=>{var n=pte.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=mte.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],s=n[1]||Bc;return[s,i]=H5(s,i),i1(t,i,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},fA=/\(error: (.*)\)/;class vte{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=vn(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return Qm(t,"DOMException")}isDOMError(t){return Qm(t,"DOMError")}}class _te{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(t){return t.stacktrace||t.stack||void 0}}class yte{constructor(){}match(t){return Qm(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r;return n.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var bte=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class wte{match(t){return typeof t=="string"}coerce(t,n){var r,[i,s]=this.getInfos(t);return{type:i??"Error",value:s??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,i=t.match(bte);return i&&(n=i[1],r=i[2]),[n,r]}}var Ste=["fatal","error","warning","log","info","debug"];function G5(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}class Ete{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,i=this.getErrorPropertyFromObject(t);return i?n.apply(i):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return _S(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+G5(t)}isSeverityLevel(t){return vn(t)&&!pm(t)&&Ste.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if({}.hasOwnProperty.call(t,n)){var r=t[n];if(ste(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class xte{match(t){return _S(t)}coerce(t,n){var r,i=t.constructor.name;return{type:i,value:i+" captured as exception with keys: "+G5(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Rte{match(t){return O5(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Ote{match(t){return Qm(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!_S(t))return!1;try{var n=t.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(t,n){var r,i=this.getUnhandledRejectionReason(t);return O5(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var Jm="$message",eg="$timestamp",Tte=new Set([Jm,eg]),Iy={enabled:!0,max_bytes:32768};function tg(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:Iy.enabled,max_bytes:Ate(e.max_bytes,Iy.max_bytes)}:ke({},Iy)}class Cte{constructor(t){this.Kt=[],this.Qt=0,this.Bt=tg(t)}setConfig(t){this.Bt=tg(t),this.er()}add(t){var n=(function(i){var s=(function(m){var p=new WeakSet;try{return JSON.stringify(m,((g,v)=>{if(typeof v=="bigint")return v.toString();if(typeof v!="function"&&typeof v!="symbol"){if(v instanceof Date)return v.toISOString();if(v instanceof Error)return{name:v.name,message:v.message,stack:v.stack};if(v&&typeof v=="object"){if(p.has(v))return"[Circular]";p.add(v)}return v}}))}catch{return}})(i);if(s)try{var l=JSON.parse(s);if(!On(l))return;var c=l,d=c[Jm],f=c[eg];return!vn(d)||d.trim().length===0||!vn(f)&&!$i(f)?void 0:{step:c,json:s}}catch{return}})(t);if(n){var r=(function(i){if(typeof TextEncoder<"u")return new TextEncoder().encode(i).length;for(var s=encodeURIComponent(i),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);r>this.Bt.max_bytes||(this.Kt.push({step:n.step,bytes:r}),this.Qt+=r,this.er())}}getAttachable(){return this.Kt.map((t=>t.step))}clear(){this.Kt=[],this.Qt=0}size(){return this.Kt.length}er(){for(;this.Qt>this.Bt.max_bytes&&this.Kt.length>0;){var t=this.Kt.shift();t&&(this.Qt-=t.bytes)}}}function Ate(e,t){if(!$i(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var K5=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={C(i){if(me&&(Nr.DEBUG||We.POSTHOG_DEBUG||n)&&!ze(me.console)&&me.console){for(var s=("__rrweb_original__"in me.console[i])?me.console[i].__rrweb_original__:me.console[i],l=arguments.length,c=new Array(l>1?l-1:0),d=1;l>d;d++)c[d-1]=arguments[d];s(e,...c)}},info(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];r.C("log",...s)},warn(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];r.C("warn",...s)},error(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];r.C("error",...s)},critical(){for(var i=arguments.length,s=new Array(i),l=0;i>l;l++)s[l]=arguments[l];console.error(e,...s)},uninitializedWarning(i){r.error("You must initialize PostHog before calling "+i)},createLogger:(i,s)=>K5(e+" "+i,s)};return r},je=K5("[PostHog.js]"),fn=je.createLogger,Ite=fn("[ExternalScriptsLoader]"),My=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Ite.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=$e?.querySelectorAll("script");if(r){for(var i,s=function(){if(r[l].src===t){var d=r[l];return d.__posthog_loading_callback_fired?{v:n()}:(d.addEventListener("load",(f=>{d.__posthog_loading_callback_fired=!0,n(void 0,f)})),d.onerror=f=>n(f),{v:void 0})}},l=0;r.length>l;l++)if(i=s())return i.v}var c=()=>{if(!$e)return n("document not found");var d=$e.createElement("script");if(d.type="text/javascript",d.crossOrigin="anonymous",d.src=t,d.onload=p=>{d.__posthog_loading_callback_fired=!0,n(void 0,p)},d.onerror=p=>n(p),e.config.prepare_external_dependency_script&&(d=e.config.prepare_external_dependency_script(d)),!d)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")$e.head.appendChild(d);else{var f,m=$e.querySelectorAll("body > script");m.length>0?(f=m[0].parentNode)==null||f.insertBefore(d,m[0]):$e.body.appendChild(d)}};$e!=null&&$e.body?c():$e?.addEventListener("DOMContentLoaded",c)};We.__PosthogExtensions__=We.__PosthogExtensions__||{},We.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!=="remote-config"){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var i="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;i=i+"&t="+Math.floor(Date.now()/s)*s}r=e.requestRouter.endpointFor("assets",i)}My(e,r,n)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");My(e,l,n)}},We.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);My(e,r,n)};var Z5="$people_distinct_id",ng="$device_id",yd="__alias",bd="__timers",o1="$autocapture_disabled_server_side",s1="$heatmaps_enabled_server_side",a1="$exception_capture_enabled_server_side",l1="$error_tracking_suppression_rules",c1="$error_tracking_capture_extension_exceptions",u1="$web_vitals_enabled_server_side",ES="$dead_clicks_enabled_server_side",d1="$product_tours_enabled_server_side",f1="$web_vitals_allowed_metrics",wd="$session_recording_remote_config",Y5="$replay_override_sampling",W5="$replay_override_linked_flag",Q5="$replay_override_url_trigger",X5="$replay_override_event_trigger",rg="$sesid",xS="$session_is_sampled",Sc="$enabled_feature_flags",mm="$active_feature_flags",Sd="$early_access_features",h1="$feature_flag_details",p1="$feature_flag_payloads",m1="$feature_flag_request_id",ns="$override_feature_flags",gc="$override_feature_flag_payloads",Ed="$stored_person_properties",Va="$stored_group_properties",g1="$surveys",v1="$surveys_activated",gm="ph_product_tours",Dd="$flag_call_reported",_1="$flag_call_reported_session_id",y1="$feature_flag_errors",ig="$feature_flag_evaluated_at",Wi="$user_state",b1="$client_session_props",w1="$capture_rate_limit",S1="$initial_campaign_params",E1="$initial_referrer_info",og="$initial_person_info",sg="$epp",J5="__POSTHOG_TOOLBAR__",up="$posthog_cookieless",eD="$sdk_debug_extensions_init_method",tD="$sdk_debug_extensions_init_time_ms",nD="$sdk_debug_recording_script_not_loaded",RS="PostHog loadExternalDependency extension not found.",qa="on_reject",os="always",ac="anonymous",lc="identified",x1="identified_only",ag="visibilitychange",lg="beforeunload",vc="$pageview",Py="$pageleave",Ny="$identify",hA="$groupidentify";function dp(e,t){Mt(e)&&e.forEach(t)}function ln(e,t){if(!wt(e))if(Mt(e))e.forEach(t);else if(Gee(e))e.forEach(((r,i)=>t(r,i)));else for(var n in e)R5.call(e,n)&&t(e[n],n)}var Sn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i of n)for(var s in i)i[s]!==void 0&&(e[s]=i[s]);return e};function vm(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var pA=function(e){try{return e()}catch{return}},Mte=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(i){je.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),je.critical(i)}}},OS=function(e){var t={};return ln(e,(function(n,r){(vn(n)&&n.length>0||$i(n))&&(t[r]=n)})),t},Pte=["herokuapp.com","vercel.app","netlify.app"];function Nte(e){var t=e?.hostname;if(!vn(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of Pte)if(n===r)return!1;return!0}function Bn(e,t,n,r){var{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:s})}function rD(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return $i(e)&&isFinite(e)&&Math.floor(e)===e});class cg{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new cg(s)}toString(){for(var t="",n=0;this.bytes.length>n;n++)t=t+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new cg(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;16>n;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class kte{constructor(){this.I=0,this.S=0,this.k=new Dte}generate(){var t=this.generateOrAbort();if(ze(t)){this.I=0;var n=this.generateOrAbort();if(ze(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.I)this.I=t,this.A();else{if(this.I>=t+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return cg.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var mA,iD=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};me&&!ze(me.crypto)&&crypto.getRandomValues&&(iD=e=>crypto.getRandomValues(e));class Dte{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(iD(this.T),this.N=0),this.T[this.N++]}}var Ws=()=>Lte().toString(),Lte=()=>(mA||(mA=new kte)).generate(),td="",$te=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,yo={R:()=>!!$e,B(e){je.error("cookieStore error: "+e)},O(e){if($e){try{for(var t=e+"=",n=$e.cookie.split(";").filter((s=>s.length)),r=0;n.length>r;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}},Z(e){var t;try{t=JSON.parse(yo.O(e))||{}}catch{}return t},M(e,t,n,r,i){if($e)try{var s="",l="",c=(function(m,p){if(p){var g=(function(y,b){if(b===void 0&&(b=$e),td)return td;if(!b||["localhost","127.0.0.1"].includes(y))return"";for(var x=y.split("."),S=Math.min(x.length,8),E="dmn_chk_"+Ws();!td&&S--;){var R=x.slice(S).join("."),C=E+"=1;domain=."+R+";path=/";b.cookie=C+";max-age=3",b.cookie.includes(E)&&(b.cookie=C+";max-age=0",td=R)}return td})(m);if(!g){var v=(y=>{var b=y.match($te);return b?b[0]:""})(m);v!==g&&je.info("Warning: cookie subdomain discovery mismatch",v,g),g=v}return g?"; domain=."+g:""}return""})($e.location.hostname,r);if(n){var d=new Date;d.setTime(d.getTime()+864e5*n),s="; expires="+d.toUTCString()}i&&(l="; secure");var f=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+c+l;return f.length>3686.4&&je.warn("cookieStore warning: large cookie, len="+f.length),$e.cookie=f,f}catch{return}},F(e,t){if($e!=null&&$e.cookie)try{yo.M(e,"",-1,t)}catch{return}}},ky=null,gn={R(){if(!hs(ky))return ky;var e=!0;if(ze(me))e=!1;else try{var t="__mplssupport__";gn.M(t,"xyz"),gn.O(t)!=='"xyz"'&&(e=!1),gn.F(t)}catch{e=!1}return e||je.error("localStorage unsupported; falling back to cookie store"),ky=e,e},B(e){je.error("localStorage error: "+e)},O(e){try{return me?.localStorage.getItem(e)}catch(t){gn.B(t)}return null},Z(e){try{return JSON.parse(gn.O(e))||{}}catch{}return null},M(e,t){try{me?.localStorage.setItem(e,JSON.stringify(t))}catch(n){gn.B(n)}},F(e){try{me?.localStorage.removeItem(e)}catch(t){gn.B(t)}}},jte=[ng,"distinct_id",rg,xS,sg,og,Wi],fp={},Ute={R:()=>!0,B(e){je.error("memoryStorage error: "+e)},O:e=>fp[e]||null,Z:e=>fp[e]||null,M(e,t){fp[e]=t},F(e){delete fp[e]}},$a=null,dr={R(){if(!hs($a))return $a;if($a=!0,ze(me))$a=!1;else try{var e="__support__";dr.M(e,"xyz"),dr.O(e)!=='"xyz"'&&($a=!1),dr.F(e)}catch{$a=!1}return $a},B(e){je.error("sessionStorage error: ",e)},O(e){try{return me?.sessionStorage.getItem(e)}catch(t){dr.B(t)}return null},Z(e){try{return JSON.parse(dr.O(e))||null}catch{}return null},M(e,t){try{me?.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){dr.B(n)}},F(e){try{me?.sessionStorage.removeItem(e)}catch(t){dr.B(t)}}};class zte{constructor(t){this._instance=t}get Bt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.Bt.cookieless_mode===os||this.isRejected()||this.consent===-1&&this.Bt.cookieless_mode===qa}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Bt.opt_out_capturing_by_default}optInOut(t){this.nr.M(this.sr,t?1:0,this.Bt.cookie_expiration,this.Bt.cross_subdomain_cookie,this.Bt.secure_cookie)}reset(){this.nr.F(this.sr,this.Bt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.O(this.sr);return Ty(t)?1:bt(Yee,t)?0:-1}get nr(){var t=this.Bt.opt_out_capturing_persistence_type,n=t==="localStorage"?gn:yo;if(!this.ar||this.ar!==n){this.ar=n;var r=t==="localStorage"?yo:gn;r.O(this.sr)&&(this.ar.O(this.sr)||this.optInOut(Ty(r.O(this.sr))),r.F(this.sr,this.Bt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.Bt.respect_dnt&&[fi?.doNotTrack,fi?.msDoNotTrack,We.doNotTrack].some((t=>Ty(t)))}}var hp=fn("[Dead Clicks]"),Fte=()=>!0,Bte=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(ES)),r=e.instance.config.capture_dead_clicks;return wo(r)?r:!!On(r)||n};class gA{get lazyLoadedDeadClicksAutocapture(){return this.lr}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[ES]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ur((()=>{this.hr()})):this.stop()}ur(t){var n,r;(n=We.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(i=>{i?hp.error("failed to load script",i):t()}))}hr(){var t;if($e){if(!this.lr&&(t=We.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=On(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.lr=We.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.lr.start($e),hp.info("starting...")}}else hp.error("`document` not found. Cannot start.")}stop(){this.lr&&(this.lr.stop(),this.lr=void 0,hp.info("stopping..."))}}var Dy=fn("[SegmentIntegration]"),oD="posthog-js";function sD(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=t===void 0?{}:t;return c=>{var d,f,m,p,g;if(s!=="*"&&!s.includes(c.level)||!e.__loaded)return c;c.tags||(c.tags={});var v=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());c.tags["PostHog Person URL"]=v,e.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var y,b=((d=c.exception)==null?void 0:d.values)||[],x=b.map((E=>ke({},E,{stacktrace:E.stacktrace?ke({},E.stacktrace,{type:"raw",frames:(E.stacktrace.frames||[]).map((R=>ke({},R,{platform:"web:javascript"})))}):void 0}))),S={$exception_message:((f=b[0])==null?void 0:f.value)||c.message,$exception_type:(m=b[0])==null?void 0:m.type,$exception_level:c.level,$exception_list:x,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((p=b[0])==null?void 0:p.value)||c.message,$sentry_exception_type:(g=b[0])==null?void 0:g.type,$sentry_tags:c.tags};return n&&r&&(S.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+c.event_id),l&&((y=e.exceptions)==null||y.sendExceptionEvent(S)),c}}class Vte{constructor(t,n,r,i,s,l){this.name=oD,this.setupOnce=function(c){c(sD(t,{organization:n,projectId:r,prefix:i,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class vA{constructor(t){this.cr=(n,r,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(je.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:i}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,n){var r,i=this.gr(t,n);return this.dr={pathname:(r=me?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),i}doPageLeave(t){var n;return this.gr(t,(n=this.dr)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,n){var r=this.dr;if(!r)return{$pageview_id:n};var i={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:d,maxContentHeight:f,lastContentY:m,maxContentY:p}=s;if(!(ze(l)||ze(c)||ze(d)||ze(f)||ze(m)||ze(p))){l=Math.ceil(l),c=Math.ceil(c),d=Math.ceil(d),f=Math.ceil(f),m=Math.ceil(m),p=Math.ceil(p);var g=l>1?So(c/l,0,1,je):1,v=l>1?So(d/l,0,1,je):1,y=f>1?So(m/f,0,1,je):1,b=f>1?So(p/f,0,1,je):1;i=Sn(i,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:g,$prev_pageview_max_scroll:d,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:m,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:p,$prev_pageview_max_content_percentage:b})}}return r.pathname&&(i.$prev_pageview_pathname=r.pathname),r.timestamp&&(i.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),i}}var qte={[Z5]:{exposure:"hidden"},[yd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[bd]:{exposure:"hidden"},[o1]:{exposure:"event"},[s1]:{exposure:"hidden"},[a1]:{exposure:"event"},[l1]:{exposure:"hidden"},[c1]:{exposure:"event"},[u1]:{exposure:"event"},[ES]:{exposure:"event"},[d1]:{exposure:"hidden"},[f1]:{exposure:"event"},[wd]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[rg]:{exposure:"hidden"},[xS]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[Sc]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!On(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[mm]:{exposure:"event"},[Sd]:{exposure:"hidden"},[h1]:{exposure:"hidden"},[p1]:{exposure:"event"},[m1]:{exposure:"event"},[ns]:{exposure:"event"},[gc]:{exposure:"hidden"},[Ed]:{exposure:"hidden"},[Va]:{exposure:"hidden"},[g1]:{exposure:"hidden"},[v1]:{exposure:"event"},[gm]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Dd]:{exposure:"hidden"},[_1]:{exposure:"hidden"},[y1]:{exposure:"hidden"},[ig]:{exposure:"hidden"},[Wi]:{exposure:"hidden"},[b1]:{exposure:"hidden"},[w1]:{exposure:"hidden"},[S1]:{exposure:"hidden"},[E1]:{exposure:"hidden"},[og]:{exposure:"hidden"},[sg]:{exposure:"hidden"},[Y5]:{exposure:"event"},[W5]:{exposure:"event"},[Q5]:{exposure:"event"},[X5]:{exposure:"event"},[eD]:{exposure:"event"},[tD]:{exposure:"event"},[nD]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},Hte=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],ug=e=>{var t=$e?.createElement("a");return ze(t)?null:(t.href=e,t)},dg=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var s=r[i].split("=");if(s[0]===t){n=s;break}}if(!Mt(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{je.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},ef=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],s=(r[0]||"").split("?"),l=s[1],c=s[0],d=(l||"").split("&"),f=[],m=0;d.length>m;m++){var p=d[m].split("=");Mt(p)&&(t.includes(p[0])?f.push(p[0]+"="+n):f.push(d[m]))}var g=c;return l!=null&&(g+="?"+f.join("&")),i!=null&&(g+="#"+i),g},fg=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},pp="https?://(.*)",Vc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Gte=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Vc],tf="<masked>",Kte=["li_fat_id"];function aD(e,t,n){if(!$e)return{};var r,i=t?[...Vc,...n||[]]:[],s=lD(ef($e.URL,i,tf),e),l=(r={},ln(Kte,(function(c){var d=yo.O(c);r[c]=d||null})),r);return Sn(l,s)}function lD(e,t){var n=Gte.concat(t||[]),r={};return ln(n,(function(i){var s=dg(e,i);r[i]=s||null})),r}function cD(e){var t=(function(s){return s?s.search(pp+"google.([^/?]*)")===0?"google":s.search(pp+"bing.com")===0?"bing":s.search(pp+"yahoo.com")===0?"yahoo":s.search(pp+"duckduckgo.com")===0?"duckduckgo":null:null})(e),n=t!="yahoo"?"q":"p",r={};if(!hs(t)){r.$search_engine=t;var i=$e?dg($e.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function _A(){return navigator.language||navigator.userLanguage}var hg="$direct";function uD(){return $e?.referrer||hg}function dD(e,t){var n=e?[...Vc,...t||[]]:[],r=ur?.href.substring(0,1e3);return{r:uD().substring(0,1e3),u:r?ef(r,n,tf):void 0}}function fD(e){var t,{r:n,u:r}=e,i={$referrer:n,$referring_domain:n==null?void 0:n==hg?hg:(t=ug(n))==null?void 0:t.host};if(r){i.$current_url=r;var s=ug(r);i.$host=s?.host,i.$pathname=s?.pathname;var l=lD(r);Sn(i,l)}if(n){var c=cD(n);Sn(i,c)}return i}function hD(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Zte(){try{return new Date().getTimezoneOffset()}catch{return}}var Yte=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Ly{constructor(t,n){this.Bt=t,this.props={},this.mr=!1,this.yr=(r=>{var i="";return r.token&&(i=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+i+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&je.info("Persistence loaded",t.persistence,ke({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this._r}br(t){Yte.indexOf(t.persistence.toLowerCase())===-1&&(je.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=(function(i){i===void 0&&(i=[]);var s=[...jte,...i];return ke({},gn,{Z(l){try{var c={};try{c=yo.Z(l)||{}}catch{}var d=Sn(c,JSON.parse(gn.O(l)||"{}"));return gn.M(l,d),d}catch{}return null},M(l,c,d,f,m,p){try{gn.M(l,c,void 0,void 0,p);var g={};s.forEach((v=>{c[v]&&(g[v]=c[v])})),Object.keys(g).length&&yo.M(l,g,d,f,m,p)}catch(v){gn.B(v)}},F(l,c){try{me?.localStorage.removeItem(l),yo.F(l,c)}catch(d){gn.B(d)}}})})(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&gn.R()?gn:r==="localstorage+cookie"&&n.R()?n:r==="sessionstorage"&&dr.R()?dr:r==="memory"?Ute:r==="cookie"?yo:n.R()?n:yo}wr(t){var n=t??this.Bt.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[ig];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return ln(this.props,((n,r)=>{var i=(s=>{var l=qte[s];if(l)return l;for(var[c,d]of Hte)if(s.indexOf(c)===0)return d})(r);if(i?.exposure==="derived"){if(i.shouldSkipFromEventProperties!=null&&i.shouldSkipFromEventProperties(n,r===Sc?()=>this.wr():()=>!1))return;i.transformToEventProperties&&Sn(t,i.transformToEventProperties(n))}else i&&i.exposure!=="event"||(t[r]=n)})),t}load(){if(!this._r){var t=this.nr.Z(this.yr);t&&(this.props=Sn({},t))}}save(){this._r||this.nr.M(this.yr,this.props,this.Ir,this.Cr,this.Sr,this.Bt.debug)}remove(){this.nr.F(this.yr,!1),this.nr.F(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(On(t)){ze(n)&&(n="None"),this.Ir=ze(r)?this.kr:r;var i=!1;if(ln(t,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Tr(l,s),i=!0)})),i)return this.save(),!0}return!1}register(t,n){if(On(t)){this.Ir=ze(n)?this.kr:n;var r=!1;if(ln(t,((i,s)=>{t.hasOwnProperty(s)&&this.props[s]!==i&&(this.Tr(s,i),r=!0)})),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Ar(t),this.save())}update_campaign_params(){if(!this.mr){var t=aD(this.Bt.custom_campaign_params,this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties);wc(OS(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=$e?.referrer)?cD(t):{})}update_referrer_info(){var t;this.register_once({$referrer:uD(),$referring_domain:$e!=null&&$e.referrer&&((t=ug($e.referrer))==null?void 0:t.host)||hg},void 0)}set_initial_person_info(){this.props[S1]||this.props[E1]||this.register_once({[og]:dD(this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};ln([E1,S1],(l=>{var c=this.props[l];c&&ln(c,(function(d,f){t["$initial_"+e1(f)]=d}))}));var n,r,i=this.props[og];if(i){var s=(n=fD(i),r={},ln(n,(function(l,c){r["$initial_"+e1(c)]=l})),r);Sn(t,s)}return t}safe_merge(t){return ln(this.props,(function(n,r){r in t||(t[r]=n)})),t}update_config(t,n,r){if(this.kr=this.Ir=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence||!((l,c)=>{if(l.length!==c.length)return!1;var d=[...l].sort(),f=[...c].sort();return d.every(((m,p)=>m===f[p]))})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var i=this.br(t),s=this.props;this.clear(),this.nr=i,this.props=s,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_secure(t){t!==this.Sr&&(this.Sr=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[bd]||{};r[t]=n,this.Tr(bd,r),this.save()}remove_event_timer(t){var n=this.props[bd]||{},r=n[t];return ze(r)||(delete n[t],this.Tr(bd,n),this.save()),r}get_property(t){return this.props[t]}set_property(t,n){this.Tr(t,n),this.save()}Tr(t,n){this.props[t]=n}Ar(t){delete this.props[t]}}var nd={Activation:"events",Cancellation:"cancelEvents"},$y={Popover:"popover",API:"api",Widget:"widget"},xd={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},jy={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},R1={Popover:"popover",Inline:"inline"},Wte={SHOWN:"product tour shown"},yA={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},bA=fn("[RateLimiter]");class Qte{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((i=>{bA.info((i||"events")+" is quota limited."),this.serverLimits[i]=new Date().getTime()+6e4}))}catch(i){return void bA.warn('could not rate limit - continuing. Error: "'+i?.message+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,i;t===void 0&&(t=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),d=(n=(r=this.instance.persistence)==null?void 0:r.get_property(w1))!==null&&n!==void 0?n:{tokens:s,last:c};d.tokens+=(c-d.last)/1e3*l,d.last=c,d.tokens>s&&(d.tokens=s);var f=1>d.tokens;return f||t||(d.tokens=Math.max(0,d.tokens-1)),!f||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=f,(i=this.instance.persistence)==null||i.set_property(w1,d),{isRateLimited:f,remainingTokens:d.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var rd=fn("[RemoteConfig]");class pD{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=We._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Er(t){var n,r;(n=We.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Rr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){t(n.json)}})}load(){try{if(this.remoteConfig)return rd.info("Using preloaded remote config",this.remoteConfig),this.Nr(this.remoteConfig),void this.Mr();if(this._instance.Fr())return void rd.warn("Remote config is disabled. Falling back to local config.");this.Er((t=>{if(!t)return rd.info("No config found after loading remote JS config. Falling back to JSON."),void this.Rr((n=>{this.Nr(n),this.Mr()}));this.Nr(t),this.Mr()}))}catch(t){rd.error("Error loading remote config",t)}}stop(){this.Or&&(clearInterval(this.Or),this.Or=void 0)}refresh(){this._instance.Fr()||$e?.visibilityState==="hidden"||this._instance.reloadFeatureFlags()}Mr(){var t;if(!this.Or){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Or=setInterval((()=>{this.refresh()}),n))}}Nr(t){var n;t||rd.error("Failed to fetch remote config from PostHog."),this._instance.Nr(t??{}),t?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var mo={GZipJS:"gzip-js",Base64:"base64"},Li=Uint8Array,Zr=Uint16Array,qc=Uint32Array,TS=new Li([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),CS=new Li([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wA=new Li([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mD=function(e,t){for(var n=new Zr(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new qc(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)i[s]=s-n[r]<<5|r;return[n,i]},gD=mD(TS,2),O1=gD[1];gD[0][28]=258,O1[258]=28;for(var SA=mD(CS,0)[1],vD=new Zr(32768),cn=0;32768>cn;++cn){var cc=(43690&cn)>>>1|(21845&cn)<<1;vD[cn]=((65280&(cc=(61680&(cc=(52428&cc)>>>2|(13107&cc)<<2))>>>4|(3855&cc)<<4))>>>8|(255&cc)<<8)>>>1}var Ld=function(e,t,n){for(var r=e.length,i=0,s=new Zr(t);r>i;++i)++s[e[i]-1];var l,c=new Zr(t);for(i=0;t>i;++i)c[i]=c[i-1]+s[i-1]<<1;for(l=new Zr(r),i=0;r>i;++i)l[i]=vD[c[e[i]-1]++]>>>15-e[i];return l},sl=new Li(288);for(cn=0;144>cn;++cn)sl[cn]=8;for(cn=144;256>cn;++cn)sl[cn]=9;for(cn=256;280>cn;++cn)sl[cn]=7;for(cn=280;288>cn;++cn)sl[cn]=8;var pg=new Li(32);for(cn=0;32>cn;++cn)pg[cn]=5;var Xte=Ld(sl,9),Jte=Ld(pg,5),_D=function(e){return(e/8>>0)+(7&e&&1)},yD=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Zr?Zr:e instanceof qc?qc:Li)(n-t);return r.set(e.subarray(t,n)),r},Qo=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},id=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Uy=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new Li(0),0];if(i==1){var l=new Li(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(O,A){return O.f-A.f})),n.push({s:-1,f:25001});var c=n[0],d=n[1],f=0,m=1,p=2;for(n[0]={s:-1,f:c.f+d.f,l:c,r:d};m!=i-1;)c=n[n[p].f>n[f].f?f++:p++],d=n[f!=m&&n[p].f>n[f].f?f++:p++],n[m++]={s:-1,f:c.f+d.f,l:c,r:d};var g=s[0].s;for(r=1;i>r;++r)s[r].s>g&&(g=s[r].s);var v=new Zr(g+1),y=T1(n[m-1],v,0);if(y>t){r=0;var b=0,x=y-t,S=1<<x;for(s.sort((function(O,A){return v[A.s]-v[O.s]||O.f-A.f}));i>r;++r){var E=s[r].s;if(t>=v[E])break;b+=S-(1<<y-v[E]),v[E]=t}for(b>>>=x;b>0;){var R=s[r].s;t>v[R]?b-=1<<t-v[R]++-1:++r}for(;r>=0&&b;--r){var C=s[r].s;v[C]==t&&(--v[C],++b)}y=t}return[new Li(v),y]},T1=function(e,t,n){return e.s==-1?Math.max(T1(e.l,t,n+1),T1(e.r,t,n+1)):t[e.s]=n},EA=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Zr(++t),r=0,i=e[0],s=1,l=function(d){n[r++]=d},c=1;t>=c;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[n.subarray(0,r),t]},od=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},C1=function(e,t,n){var r=n.length,i=_D(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;r>s;++s)e[i+s+4]=n[s];return 8*(i+4+r)},xA=function(e,t,n,r,i,s,l,c,d,f,m){Qo(t,m++,n),++i[256];for(var p=Uy(i,15),g=p[0],v=p[1],y=Uy(s,15),b=y[0],x=y[1],S=EA(g),E=S[0],R=S[1],C=EA(b),O=C[0],A=C[1],M=new Zr(19),P=0;E.length>P;++P)M[31&E[P]]++;for(P=0;O.length>P;++P)M[31&O[P]]++;for(var L=Uy(M,7),H=L[0],j=L[1],B=19;B>4&&!H[wA[B-1]];--B);var U,Z,re,q,W=f+5<<3,ee=od(i,sl)+od(s,pg)+l,ae=od(i,g)+od(s,b)+l+14+3*B+od(M,H)+(2*M[16]+3*M[17]+7*M[18]);if(ee>=W&&ae>=W)return C1(t,m,e.subarray(d,d+f));if(Qo(t,m,1+(ee>ae)),m+=2,ee>ae){U=Ld(g,v),Z=g,re=Ld(b,x),q=b;var Q=Ld(H,j);for(Qo(t,m,R-257),Qo(t,m+5,A-1),Qo(t,m+10,B-4),m+=14,P=0;B>P;++P)Qo(t,m+3*P,H[wA[P]]);m+=3*B;for(var k=[E,O],K=0;2>K;++K){var V=k[K];for(P=0;V.length>P;++P)Qo(t,m,Q[D=31&V[P]]),m+=H[D],D>15&&(Qo(t,m,V[P]>>>5&127),m+=V[P]>>>12)}}else U=Xte,Z=sl,re=Jte,q=pg;for(P=0;c>P;++P)if(r[P]>255){var D;id(t,m,U[257+(D=r[P]>>>18&31)]),m+=Z[D+257],D>7&&(Qo(t,m,r[P]>>>23&31),m+=TS[D]);var F=31&r[P];id(t,m,re[F]),m+=q[F],F>3&&(id(t,m,r[P]>>>5&8191),m+=CS[F])}else id(t,m,U[r[P]]),m+=Z[r[P]];return id(t,m,U[256]),m+Z[256]},ene=new qc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tne=(function(){for(var e=new qc(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e})(),zy=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function nne(e,t){t===void 0&&(t={});var n=(function(){var p=4294967295;return{p(g){for(var v=p,y=0;g.length>y;++y)v=tne[255&v^g[y]]^v>>>8;p=v},d(){return 4294967295^p}}})(),r=e.length;n.p(e);var i,s,l,c,d,f=(c=10+((i=t).filename&&i.filename.length+1||0),d=8,(function(p,g,v,y,b,x){var S=p.length,E=new Li(y+S+5*(1+Math.floor(S/7e3))+b),R=E.subarray(y,E.length-b),C=0;if(!g||8>S)for(var O=0;S>=O;O+=65535){var A=O+65535;S>A?C=C1(R,C,p.subarray(O,A)):(R[O]=!0,C=C1(R,C,p.subarray(O,S)))}else{for(var M=ene[g-1],P=M>>>13,L=8191&M,H=(1<<v)-1,j=new Zr(32768),B=new Zr(H+1),U=Math.ceil(v/3),Z=2*U,re=function(Me){return(p[Me]^p[Me+1]<<U^p[Me+2]<<Z)&H},q=new qc(25e3),W=new Zr(288),ee=new Zr(32),ae=0,Q=0,k=(O=0,0),K=0,V=0;S>O;++O){var D=re(O),F=32767&O,X=B[D];if(j[F]=X,B[D]=F,O>=K){var fe=S-O;if((ae>7e3||k>24576)&&fe>423){C=xA(p,R,0,q,W,ee,Q,k,V,O-V,C),k=ae=Q=0,V=O;for(var pe=0;286>pe;++pe)W[pe]=0;for(pe=0;30>pe;++pe)ee[pe]=0}var xe=2,Ue=0,Y=L,te=F-X&32767;if(fe>2&&D==re(O-te))for(var ve=Math.min(P,fe)-1,se=Math.min(32767,O),we=Math.min(258,fe);se>=te&&--Y&&F!=X;){if(p[O+xe]==p[O+xe-te]){for(var Oe=0;we>Oe&&p[O+Oe]==p[O+Oe-te];++Oe);if(Oe>xe){if(xe=Oe,Ue=te,Oe>ve)break;var nt=Math.min(te,Oe-2),ot=0;for(pe=0;nt>pe;++pe){var Be=O-te+pe+32768&32767,Xe=Be-j[Be]+32768&32767;Xe>ot&&(ot=Xe,X=Be)}}}te+=(F=X)-(X=j[F])+32768&32767}if(Ue){q[k++]=268435456|O1[xe]<<18|SA[Ue];var Ne=31&O1[xe],Pe=31&SA[Ue];Q+=TS[Ne]+CS[Pe],++W[257+Ne],++ee[Pe],K=O+xe,++ae}else q[k++]=p[O],++W[p[O]]}}C=xA(p,R,!0,q,W,ee,Q,k,V,O-V,C)}return yD(E,0,y+_D(C)+b)})(s=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,d)),m=f.length;return(function(p,g){var v=g.filename;if(p[0]=31,p[1]=139,p[2]=8,p[8]=2>g.level?4:g.level==9?2:0,p[9]=3,g.mtime!=0&&zy(p,4,Math.floor(new Date(g.mtime||Date.now())/1e3)),v){p[3]=8;for(var y=0;v.length>=y;++y)p[y+10]=v.charCodeAt(y)}})(f,t),zy(f,m-8,n.d()),zy(f,m-4,r),f}var rne=!!Xb||!!Qb,bD="text/plain",RA=!1,Xg=function(e,t,n){var r;n===void 0&&(n=!0);var[i,s]=e.split("?"),l=ke({},t),c=(r=s?.split("&").map((f=>{var m,[p,g]=f.split("="),v=n&&(m=l[p])!==null&&m!==void 0?m:g;return delete l[p],p+"="+v})))!==null&&r!==void 0?r:[],d=(function(f,m){var p,g;m===void 0&&(m="&");var v=[];return ln(f,(function(y,b){ze(y)||ze(b)||b==="undefined"||(p=encodeURIComponent((x=>x instanceof File)(y)?y.name:y.toString()),g=encodeURIComponent(b),v[v.length]=g+"="+p)})),v.join(m)})(l);return d&&c.push(d),i+"?"+c.join("&")},Ec=(e,t)=>JSON.stringify(e,((n,r)=>typeof r=="bigint"?r.toString():r),t),Fy=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===mo.GZipJS){var r=nne((function(c,d){var f=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var m=new Li(c.length+(c.length>>>1)),p=0,g=function(x){m[p++]=x},v=0;f>v;++v){if(p+5>m.length){var y=new Li(p+8+(f-v<<1));y.set(m),m=y}var b=c.charCodeAt(v);128>b?g(b):2048>b?(g(192|b>>>6),g(128|63&b)):b>55295&&57344>b?(g(240|(b=65536+(1047552&b)|1023&c.charCodeAt(++v))>>>18),g(128|b>>>12&63),g(128|b>>>6&63),g(128|63&b)):(g(224|b>>>12),g(128|b>>>6&63),g(128|63&b))}return yD(m,0,p)})(Ec(t)),{mtime:0});return{contentType:bD,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===mo.Base64){var i=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((d,f)=>String.fromCharCode(parseInt(f,16)))))})(Ec(t)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:Ec(c)))(i);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=Ec(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},ine=(function(){var e=Pi((function*(t){var n=Ec(t.data),r=yield(function(s,l,c){return Jb.apply(this,arguments)})(n,Nr.DEBUG,{rethrow:!0});if(!r)return t;var i=yield r.arrayBuffer();return ke({},t,{tr:{contentType:bD,body:i,estimatedSize:i.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),OA=(e,t)=>Xg(e,{_:new Date().getTime().toString(),ver:Nr.JS_SDK_VERSION,compression:t}),_m=[];Qb&&_m.push({transport:"fetch",method(e){var t,n,{contentType:r,body:i,estimatedSize:s}=(t=Fy(e))!==null&&t!==void 0?t:{},l=new Headers;ln(e.headers,(function(m,p){l.append(p,m)})),r&&l.append("Content-Type",r);var c=e.url,d=null;if(rA){var f=new rA;d={signal:f.signal,timeout:setTimeout((()=>f.abort()),e.timeout)}}Qb(c,ke({method:e?.method||"GET",headers:l,keepalive:e.method==="POST"&&52428.8>(s||0),body:i,signal:(n=d)==null?void 0:n.signal},e.fetchOptions)).then((m=>m.text().then((p=>{var g={statusCode:m.status,text:p};if(m.status===200)try{g.json=JSON.parse(p)}catch(v){je.error(v)}e.callback==null||e.callback(g)})))).catch((m=>{je.error(m),e.callback==null||e.callback({statusCode:0,error:m})})).finally((()=>d?clearTimeout(d.timeout):null))}}),Xb&&_m.push({transport:"XHR",method(e){var t,n=new Xb;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:i}=(t=Fy(e))!==null&&t!==void 0?t:{};ln(e.headers,(function(s,l){n.setRequestHeader(l,s)})),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(s)}},n.send(i)}}),fi!=null&&fi.sendBeacon&&_m.push({transport:"sendBeacon",method(e){var t=Xg(e.url,{beacon:"1"});try{var n,{contentType:r,body:i}=(n=Fy(e))!==null&&n!==void 0?n:{};if(!i)return;var s=i instanceof Blob?i:new Blob([i],{type:r});fi.sendBeacon(t,s)}catch{}}});var A1=3e3;class one{constructor(t,n){this.Pr=!0,this.Lr=[],this.Dr=So(n?.flush_interval_ms||A1,250,5e3,je.createLogger("flush interval"),A1),this.Br=t}enqueue(t){this.Lr.push(t),this.jr||this.$r()}unload(){this.qr();var t=this.Lr.length>0?this.Zr():{},n=Object.values(t);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Br(ke({},r,{transport:"sendBeacon"}))}))}enable(){this.Pr=!1,this.$r()}$r(){var t=this;this.Pr||(this.jr=setTimeout((()=>{if(this.qr(),this.Lr.length>0){var n=this.Zr(),r=function(){var s=n[i],l=new Date().getTime();s.data&&Mt(s.data)&&ln(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.Br(s)};for(var i in n)r()}}),this.Dr))}qr(){clearTimeout(this.jr),this.jr=void 0}Zr(){var t={};return ln(this.Lr,(n=>{var r,i=n,s=(i?i.batchKey:null)||i.url;ze(t[s])&&(t[s]=ke({},i,{data:[]})),(r=t[s].data)==null||r.push(i.data)})),this.Lr=[],t}}var sne=["retriesPerformedSoFar"];class ane{constructor(t){this.Vr=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.zr=!0,!ze(me)&&"onLine"in me.navigator&&(this.zr=me.navigator.onLine,this.Ur=()=>{this.zr=!0,this.Yr()},this.Gr=()=>{this.zr=!1},Bn(me,"online",this.Ur),Bn(me,"offline",this.Gr))}get length(){return this.Lr.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=E5(t,sne);mc(n)&&(r.url=Xg(r.url,{retry_count:n})),this._instance._send_request(ke({},r,{callback:i=>{i.statusCode===200||i.statusCode>=400&&500>i.statusCode||(n??0)>=10?r.callback==null||r.callback(i):this.Wr(ke({retriesPerformedSoFar:n},r))}}))}Wr(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=(function(l){var c=3e3*Math.pow(2,l),d=c/2,f=Math.min(18e5,c),m=Math.random()-.5;return Math.ceil(f+m*(f-d))})(n),i=Date.now()+r;this.Lr.push({retryAt:i,requestOptions:t});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),je.warn(s),this.Vr||(this.Vr=!0,this.Xr())}Xr(){if(this.Jr&&clearTimeout(this.Jr),this.Lr.length===0)return this.Vr=!1,void(this.Jr=void 0);this.Jr=setTimeout((()=>{this.zr&&this.Lr.length>0&&this.Yr(),this.Xr()}),this.Hr)}Yr(){var t=Date.now(),n=[],r=this.Lr.filter((s=>t>s.retryAt||(n.push(s),!1)));if(this.Lr=n,r.length>0)for(var{requestOptions:i}of r)this.retriableRequest(i)}unload(){for(var{requestOptions:t}of(this.Jr&&(clearTimeout(this.Jr),this.Jr=void 0),this.Vr=!1,ze(me)||(this.Ur&&(me.removeEventListener("online",this.Ur),this.Ur=void 0),this.Gr&&(me.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Lr))try{this._instance._send_request(ke({},t,{transport:"sendBeacon"}))}catch(n){je.error(n)}this.Lr=[]}}class lne{constructor(t){this.Kr=()=>{var n,r,i,s;this.Qr||(this.Qr={});var l=this.scrollElement(),c=this.scrollY(),d=l?Math.max(0,l.scrollHeight-l.clientHeight):0,f=c+(l?.clientHeight||0),m=l?.scrollHeight||0;this.Qr.lastScrollY=Math.ceil(c),this.Qr.maxScrollY=Math.max(c,(n=this.Qr.maxScrollY)!==null&&n!==void 0?n:0),this.Qr.maxScrollHeight=Math.max(d,(r=this.Qr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Qr.lastContentY=f,this.Qr.maxContentY=Math.max(f,(i=this.Qr.maxContentY)!==null&&i!==void 0?i:0),this.Qr.maxContentHeight=Math.max(m,(s=this.Qr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Qr}resetContext(){var t=this.Qr;return setTimeout(this.Kr,0),t}startMeasuringScrollPosition(){Bn(me,"scroll",this.Kr,{capture:!0}),Bn(me,"scrollend",this.Kr,{capture:!0}),Bn(me,"resize",this.Kr)}scrollElement(){if(!this.ei)return me?.document.documentElement;var t=Mt(this.ei)?this.ei:[this.ei];for(var n of t){var r=me?.document.querySelector(n);if(r)return r}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return me&&(me.scrollY||me.pageYOffset||me.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return me&&(me.scrollX||me.pageXOffset||me.document.documentElement.scrollLeft)||0}}var cne=e=>dD(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class TA{constructor(t,n,r,i){this.ti=s=>{var l=this.ri();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.ii(this._instance)};this.ni.register({[b1]:c})}},this._instance=t,this.si=n,this.ni=r,this.ii=i||cne,this.si.onSessionId(this.ti)}ri(){return this.ni.props[b1]}getSetOnceProps(){var t,n=(t=this.ri())==null?void 0:t.props;return n?"r"in n?fD(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return ln(OS(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+e1(r)]=n})),t}}class AS{constructor(){this.oi={}}on(t,n){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(n),()=>{this.oi[t]=this.oi[t].filter((r=>r!==n))}}emit(t,n){for(var r of this.oi[t]||[])r(n);for(var i of this.oi["*"]||[])i(t,n)}}var By=fn("[SessionId]");class CA{on(t,n){return this.ai.on(t,n)}constructor(t,n,r){var i;if(this.li=[],this.ui=void 0,this.ai=new AS,this.hi=(f,m)=>!(!mc(f)||!mc(m))&&Math.abs(f-m)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===os)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Bt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=n||Ws,this.fi=r||Ws;var s=this.Bt.persistence_name||this.Bt.token;if(this._sessionTimeoutMs=1e3*So(this.Bt.session_idle_timeout_seconds||1800,60,36e3,By.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var l=dr.Z(this.gi),c=dr.Z(this.mi);l&&!c?this.ci=l:dr.F(this.gi),dr.M(this.mi,!0)}if((i=this.Bt.bootstrap)!=null&&i.sessionID)try{var d=(f=>{var m=this.Bt.bootstrap.sessionID.replace(/-/g,"");if(m.length!==32)throw new Error("Not a valid UUID");if(m[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(m.substring(0,12),16)})();this.bi(this.Bt.bootstrap.sessionID,new Date().getTime(),d)}catch(f){By.error("Invalid sessionID in bootstrap",f)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return ze(this.li)&&(this.li=[]),this.li.push(t),this.di&&t(this.di,this.ci),()=>{this.li=this.li.filter((n=>n!==t))}}yi(){return this.Bt.persistence!=="memory"&&!this.ni._r&&dr.R()}Ii(t){t!==this.ci&&(this.ci=t,this.yi()&&dr.M(this.gi,t))}Ci(){return this.ci?this.ci:this.yi()?dr.Z(this.gi):null}bi(t,n,r){t===this.di&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.di=t,this.ni.register({[rg]:[n,t,r]}))}Si(){var t=this.ni.props[rg];return Mt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.xi),this.xi=void 0,this.ui&&me&&(me.removeEventListener(lg,this.ui,{capture:!1}),this.ui=void 0),this.li=[]}wi(){this.ui=()=>{this.yi()&&dr.F(this.mi)},Bn(me,lg,this.ui,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.Bt.cookieless_mode===os)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[i,s,l]=this.Si(),c=this.Ci(),d=mc(l)&&Math.abs(r-l)>864e5,f=!1,m=!s,p=!m&&!t&&this.hi(r,i);m||p||d?(s=this.vi(),c=this.fi(),By.info("new session ID generated",{sessionId:s,windowId:c,changeReason:{noSessionId:m,activityTimeout:p,sessionPastMaximumLength:d}}),l=r,f=!0):c||(c=this.fi(),f=!0);var g=mc(i)&&t&&!d?i:r,v=mc(l)?l:new Date().getTime();return this.Ii(c),this.bi(s,g,v),t||this.pi(),f&&this.li.forEach((y=>y(s,c,f?{noSessionId:m,activityTimeout:p,sessionPastMaximumLength:d}:void 0))),{sessionId:s,windowId:c,sessionStartTimestamp:v,changeReason:f?{noSessionId:m,activityTimeout:p,sessionPastMaximumLength:d}:void 0,lastActivityTimestamp:i}}pi(){clearTimeout(this.xi),this.xi=setTimeout((()=>{var[t]=this.Si();if(this.hi(new Date().getTime(),t)){var n=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)}}var wD=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&sA(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((i=>sA(i?.brand,t))))return!0}catch{}return!!e.webdriver},mg=function(e,t){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function AA(e,t,n){return Ec({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var SD={exact:(e,t)=>t.some((n=>e.some((r=>n===r)))),is_not:(e,t)=>t.every((n=>e.every((r=>n!==r)))),regex:(e,t)=>t.some((n=>e.some((r=>mg(n,r))))),not_regex:(e,t)=>t.every((n=>e.every((r=>!mg(n,r))))),icontains:(e,t)=>t.map(mp).some((n=>e.map(mp).some((r=>n.includes(r))))),not_icontains:(e,t)=>t.map(mp).every((n=>e.map(mp).every((r=>!n.includes(r))))),gt:(e,t)=>t.some((n=>{var r=parseFloat(n);return!isNaN(r)&&e.some((i=>r>parseFloat(i)))})),lt:(e,t)=>t.some((n=>{var r=parseFloat(n);return!isNaN(r)&&e.some((i=>r<parseFloat(i)))}))},mp=e=>e.toLowerCase();function ED(e,t){return!e||Object.entries(e).every((n=>{var[r,i]=n,s=t?.[r];if(ze(s)||hs(s))return!1;var l=[String(s)],c=SD[i.operator];return!!c&&c(i.values,l)}))}var I1="custom",IA="i.posthog.com",une=/^\/static\//;class dne{constructor(t){this.ki={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+IA,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.ki[this.apiHost]||(this.ki[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":I1),this.ki[this.apiHost]}Ti(t){var n=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof n=="string"&&une.test(t))return n.trim().replace(/\/$/,"")||void 0}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(t==="assets"){var r=this.Ti(n);if(r)return""+r+n}if(this.region===I1)return this.apiHost+n;var i=IA+n;switch(t){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var Qt=fn("[Surveys]"),M1="seenSurvey_",fne=[$y.Popover,$y.Widget,$y.API],hne={ignoreConditions:!1,ignoreDelay:!1,displayType:R1.Popover},pne=fn("[PostHog ExternalIntegrations]"),mne={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class gne{constructor(t){this._instance=t}ur(t,n){var r;(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,(i=>{if(i)return pne.error("failed to load script",i);n()}))}startIfEnabledOrStop(){var t=this,n=function(l){var c,d,f;!i||(c=We.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||t.ur(mne[l],(()=>{var m;(m=We.__PosthogExtensions__)==null||(m=m.integrations)==null||(m=m[l])==null||m.start(t._instance)})),!i&&(d=We.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[l]&&((f=We.__PosthogExtensions__)==null||(f=f.integrations)==null||(f=f[l])==null||f.stop())};for(var[r,i]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var uc,$d={},Vy=0,P1=()=>{},MA='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',sd="Surveys module not available",PA="sanitize_properties is deprecated. Use before_send instead",xD="Invalid value for property_denylist config: ",_c="posthog",RD=!rne&&Gr?.indexOf("MSIE")===-1&&Gr?.indexOf("Mozilla")===-1,NA=e=>{var t;return ke({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Nte($e?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:P1,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:ur&&vn(ur?.search)&&ur.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(me==null||(t=me.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){je.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:x1,before_send:void 0,request_queue_config:{flush_interval_ms:A1},error_tracking:{},_onCapture:P1,__preview_eager_load_replay:!1},(n=>({rageclick:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},vne=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],kA=e=>{var t={};for(var[n,r]of vne)ze(e[n])||(t[r]=e[n]);var i=Sn({},t,e);return Mt(e.property_blacklist)&&(ze(e.property_denylist)?i.property_denylist=e.property_blacklist:Mt(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:je.error(xD+e.property_denylist)),i};class _ne{constructor(){this.__forceAllowLocalhost=!1}get Ai(){return this.__forceAllowLocalhost}set Ai(t){je.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Ni{Ei(t,n){if(t){var r=this.Ri.indexOf(t);r!==-1&&this.Ri.splice(r,1)}return this.Ri.push(n),n.initialize==null||n.initialize(),n}Ni(){return this.config.cookieless_mode===os||this.config.cookieless_mode===qa&&this.consent.isRejected()}get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new _ne,this.Mi=!1,this.version=Nr.LIB_VERSION,this.Fi=new AS,this.Ri=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=NA(),this.SentryIntegration=Vte,this.sentryIntegration=r=>(function(i,s){var l=sD(i,s);return{name:oD,processEvent:c=>l(c)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Oi=!1,this.Pi=null,this.Li=null,this.Di=null,this.scrollManager=new lne(this),this.pageViewManager=new vA(this),this.rateLimiter=new Qte(this),this.requestRouter=new dne(this),this.consent=new zte(this),this.externalIntegrations=new gne(this);var n=(t=Ni.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,i,s)=>{var l=vn(r)?{[r]:i}:r;this.setPersonProperties(l),s?.({})},set_once:(r,i,s)=>{var l=vn(r)?{[r]:i}:r;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(r=>je.info('send "'+r?.event+'"',r)))}init(t,n,r){if(r&&r!==_c){var i,s=(i=$d[r])!==null&&i!==void 0?i:new Ni;return s._init(t,n,r),$d[r]=s,$d[_c][r]=s,s}return this._init(t,n,r)}_init(t,n,r){var i,s;if(n===void 0&&(n={}),ze(t)||pm(t))return je.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Bi(n.debug),this.ji=n,this.$i=[],n.person_profiles?this.Li=n.person_profiles:n.process_person&&(this.Li=n.process_person),this.set_config(Sn({},NA(n.defaults),kA(n),{name:r,token:t})),this.config.on_xhr_error&&je.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:mo.GZipJS;var l=this.qi();this.persistence=new Ly(this.config,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Ly(ke({},this.config,{persistence:"sessionStorage"}),l);var c=ke({},this.persistence.props),d=ke({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Zi=new one((x=>this.Vi(x)),this.config.request_queue_config),this.Hi=new ane(this),this.__request_queue=[];var f=this.Ni();if(f||(this.sessionManager=new CA(this),this.sessionPropsManager=new TA(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(je.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.zi(f)}),0)):(je.info("Initializing extensions synchronously"),this.zi(f)),Nr.DEBUG=Nr.DEBUG||this.config.debug,Nr.DEBUG&&je.info("Starting in debug mode",{this:this,config:n,thisC:ke({},this.config),p:c,s:d}),!this.config.identity_distinct_id||(i=n.bootstrap)!=null&&i.distinctID||(n.bootstrap=ke({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var m=n.bootstrap.distinctID,p=this.get_distinct_id(),g=this.persistence.get_property(Wi);if(n.bootstrap.isIdentifiedID&&p!=null&&p!==m&&g===ac)this.identify(m);else if(n.bootstrap.isIdentifiedID&&p!=null&&p!==m&&g===lc)je.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var v=this.config.get_device_id(Ws()),y=n.bootstrap.isIdentifiedID?v:m;this.persistence.set_property(Wi,n.bootstrap.isIdentifiedID?lc:ac),this.register({distinct_id:m,$device_id:y})}}if(f)this.register_once({distinct_id:up,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(Ws());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(Wi,ac)}return Bn(me,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(x,S){var E=x.config.segment;if(!E)return S();(function(R,C){var O=R.config.segment;if(!O)return C();var A=P=>{var L=()=>P.anonymousId()||Ws();R.config.get_device_id=L,P.id()&&(R.register({distinct_id:P.id(),$device_id:L()}),R.persistence.set_property(Wi,lc)),C()},M=O.user();"then"in M&&rs(M.then)?M.then(A):A(M)})(x,(()=>{E.register((R=>{Promise&&Promise.resolve||Dy.warn("This browser does not have Promise support, and can not use the segment integration");var C=(O,A)=>{if(!A)return O;O.event.userId||O.event.anonymousId===R.get_distinct_id()||(Dy.info("No userId set, resetting PostHog"),R.reset()),O.event.userId&&O.event.userId!==R.get_distinct_id()&&(Dy.info("UserId set, identifying with PostHog"),R.identify(O.event.userId));var M=R.calculateEventProperties(A,O.event.properties);return O.event.properties=Object.assign({},M,O.event.properties),O};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:O=>C(O,O.event.event),page:O=>C(O,vc),identify:O=>C(O,Ny),screen:O=>C(O,"$screen")}})(x)).then((()=>{S()}))}))})(this,(()=>this.Ui())):this.Ui(),rs(this.config._onCapture)&&this.config._onCapture!==P1&&(je.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(x=>this.config._onCapture(x.event,x)))),this.config.ip&&je.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}zi(t){var n,r,i,s,l,c,d,f=performance.now(),m=ke({},Ni.__defaultExtensionClasses,this.config.__extensionClasses),p=[];m.featureFlags&&this.Ri.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new m.featureFlags(this)),m.exceptions&&this.Ri.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new m.exceptions(this)),m.historyAutocapture&&this.Ri.push(this.historyAutocapture=new m.historyAutocapture(this)),m.tracingHeaders&&this.Ri.push(new m.tracingHeaders(this)),m.siteApps&&this.Ri.push(this.siteApps=new m.siteApps(this)),m.sessionRecording&&!t&&this.Ri.push(this.sessionRecording=new m.sessionRecording(this)),this.config.disable_scroll_properties||p.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),m.autocapture&&this.Ri.push(this.autocapture=new m.autocapture(this)),m.surveys&&this.Ri.push(this.surveys=(i=this.surveys)!==null&&i!==void 0?i:new m.surveys(this)),m.logs&&this.Ri.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new m.logs(this)),m.conversations&&this.Ri.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new m.conversations(this)),m.productTours&&this.Ri.push(this.productTours=new m.productTours(this)),m.heatmaps&&this.Ri.push(this.heatmaps=new m.heatmaps(this)),m.webVitalsAutocapture&&this.Ri.push(this.webVitalsAutocapture=new m.webVitalsAutocapture(this)),m.exceptionObserver&&this.Ri.push(this.exceptionObserver=new m.exceptionObserver(this)),m.deadClicksAutocapture&&this.Ri.push(this.deadClicksAutocapture=new m.deadClicksAutocapture(this,Bte)),m.toolbar&&this.Ri.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new m.toolbar(this)),m.experiments&&this.Ri.push(this.experiments=(d=this.experiments)!==null&&d!==void 0?d:new m.experiments(this)),this.Ri.forEach((g=>{g.initialize&&p.push((()=>{g.initialize==null||g.initialize()}))})),p.push((()=>{if(this.Yi){var g=this.Yi;this.Yi=void 0,this.Nr(g)}})),this.Gi(p,f)}Gi(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout((()=>{this.Gi(t,n)}),0);var r=t.shift();if(r)try{r()}catch(s){je.error("Error initializing extension:",s)}}var i=Math.round(performance.now()-n);this.register_for_session({[eD]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[tD]:i}),this.config.__preview_deferred_init_extensions&&je.info("PostHog extensions initialized ("+i+"ms)")}Nr(t){var n;if(!$e||!$e.body)return je.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Nr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Yi=t),this.Wi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=bt(t.supportedCompression,mo.GZipJS)?mo.GZipJS:bt(t.supportedCompression,mo.Base64)?mo.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Li?this.Li:x1}),this.Ri.forEach((r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(t)))}Ui(){try{this.config.loaded(this)}catch(r){je.critical("`loaded` function failed",r)}if(this.Xi(),this.config.internal_or_test_user_hostname&&ur!=null&&ur.hostname){var t=ur.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.Ji()}),1),this.Ki=new pD(this),this.Ki.load()}Xi(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Zi)==null||t.enable())}_dom_loaded(){this.is_capturing()&&dp(this.__request_queue,(t=>this.Vi(t))),this.__request_queue=[],this.Xi()}_handle_unload(){var t,n,r,i;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Qi()&&this.capture(Py),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.Zi)==null||r.unload(),(i=this.Hi)==null||i.unload()):this.Qi()&&this.capture(Py,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(RD?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=Xg(t.url,{ip:this.config.ip?1:0}),t.headers=ke({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,i,s,l=ke({},n);l.timeout=l.timeout||6e4,l.url=OA(l.url,l.compression);var c=(r=l.transport)!==null&&r!==void 0?r:"fetch",d=_m.filter((m=>!l.disableTransport||!m.transport||!l.disableTransport.includes(m.transport))),f=(i=(s=(function(m,p){for(var g=0;m.length>g;g++)if(m[g].transport===c)return m[g]})(d))==null?void 0:s.method)!==null&&i!==void 0?i:d[0].method;if(!f)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===mo.GZipJS&&Vee&&!RA?ine(l).then((m=>{f(m)})).catch((m=>{if((p=>!(!p||typeof p!="object")&&("name"in p?String(p.name):"")==="NotReadableError")(m))return RA=!0,void f(ke({},l,{compression:void 0,url:OA(n.url,void 0)}));f(l)})):f(l)})(ke({},t,{callback:n=>{var r,i;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(i=this.config).on_request_error)==null||r.call(i,n),t.callback==null||t.callback(n)}}))))}Vi(t){this.Hi?this.Hi.retriableRequest(t):this._send_request(t)}_execute_array(t){Vy++;try{var n,r=[],i=[],s=[];dp(t,(c=>{c&&(Mt(n=c[0])?s.push(c):rs(c)?c.call(this):Mt(c)&&n==="alias"?r.push(c):Mt(c)&&n.indexOf("capture")!==-1&&rs(this[n])?s.push(c):i.push(c))}));var l=function(c,d){dp(c,(function(f){if(Mt(f[0])){var m=d;ln(f,(function(p){m=m[p[0]].apply(m,p.slice(1))}))}else d[f[0]].apply(d,f.slice(1))}))};l(r,this),l(i,this),l(s,this)}finally{Vy--}}push(t){if(Vy>0&&Mt(t)&&vn(t[0])){var n=Ni.prototype[t[0]];rs(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var i,s,l,c,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Zi){if(this.is_capturing())if(!ze(t)&&vn(t)){var f=!this.config.opt_out_useragent_filter&&this._is_bot();if(!f||this.config.__preview_capture_bot_pageviews){var m=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(m==null||!m.isRateLimited){n!=null&&n.$current_url&&!vn(n?.$current_url)&&(je.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.en||je.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var p=new Date,g=r?.timestamp||p,v=Ws(),y={uuid:v,event:t,properties:this.calculateEventProperties(t,n||{},g,v)};t===vc&&this.config.__preview_capture_bot_pageviews&&f&&(y.event="$bot_pageview",y.properties.$browser_type="bot"),m&&(y.properties.$lib_rate_limit_remaining_tokens=m.remainingTokens),r?.$set&&(y.$set=r?.$set);var b,x,S,E=this.tn(r?.$set_once,t!==hA,t===Ny);if(E&&(y.$set_once=E),r!=null&&r._noTruncate||(s=this.config.properties_string_max_length,l=y,c=L=>vn(L)?L.slice(0,s):L,d=new Set,y=(function L(H,j){return H!==Object(H)?c?c(H):H:d.has(H)?void 0:(d.add(H),Mt(H)?(B=[],dp(H,(U=>{B.push(L(U))}))):(B={},ln(H,((U,Z)=>{d.has(U)||(B[Z]=L(U))}))),B);var B})(l)),y.timestamp=g,ze(r?.timestamp)||(y.properties.$event_time_override_provided=!0,y.properties.$event_time_override_system_time=p),t===xd.DISMISSED||t===xd.SENT){var R=n?.[jy.SURVEY_ID],C=n?.[jy.SURVEY_ITERATION];(L=>{try{var H=(j=>((B,U)=>{var Z=""+M1+U.id;return U.current_iteration&&U.current_iteration>0&&(Z=""+M1+U.id+"_"+U.current_iteration),Z})(0,j))(L);if(localStorage.getItem(H))return;localStorage.setItem(H,"true")}catch(j){Qt.error("Failed to persist survey seen state",j)}})({id:R,current_iteration:C}),y.$set=ke({},y.$set,{[(b={id:R,current_iteration:C},x=t===xd.SENT?"responded":"dismissed",S="$survey_"+x+"/"+b.id,b.current_iteration&&b.current_iteration>0&&(S="$survey_"+x+"/"+b.id+"/"+b.current_iteration),S)]:!0})}else t===xd.SHOWN&&(y.$set=ke({},y.$set,{[jy.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===Wte.SHOWN){var O=n?.[yA.TOUR_TYPE];O&&(y.$set=ke({},y.$set,{[yA.TOUR_LAST_SEEN_DATE+"/"+O]:new Date().toISOString()}))}var A=ke({},y.properties.$set,y.$set);if(wc(A)||this.setPersonPropertiesForFlags(A),!wt(this.config.before_send)){var M=this.rn(y);if(!M)return;y=M}this.Fi.emit("eventCaptured",y);var P={method:"POST",url:(i=r?._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:y,compression:"best-available",batchKey:r?._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Vi(P):this.Zi.enqueue(P),y}je.critical("This capture call is ignored due to client rate limiting.")}}else je.error("No event name provided to posthog.capture")}else je.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(n=>t(n.event,n)))}calculateEventProperties(t,n,r,i,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(t),c=ke({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var d=ke({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=d.distinct_id,(!vn(c.distinct_id)&&!$i(c.distinct_id)||pm(c.distinct_id))&&je.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var f,m=(function(S,E){var R,C,O,A;if(!Gr)return{};var M,P,L,H,j,B,U,Z,re=S?[...Vc,...E||[]]:[],[q,W]=(function(ee){for(var ae=0;cA.length>ae;ae++){var[Q,k]=cA[ae],K=Q.exec(ee),V=K&&(rs(k)?k(K,ee):k);if(V)return V}return["",""]})(Gr);return Sn(OS({$os:q,$os_version:W,$browser:B5(Gr,navigator.vendor),$device:uA(Gr),$device_type:(P=Gr,L={userAgentDataPlatform:(R=navigator)==null||(R=R.userAgentData)==null?void 0:R.platform,maxTouchPoints:(C=navigator)==null?void 0:C.maxTouchPoints,screenWidth:me==null||(O=me.screen)==null?void 0:O.width,screenHeight:me==null||(A=me.screen)==null?void 0:A.height,devicePixelRatio:me?.devicePixelRatio},Z=uA(P),Z===C5||Z===T5||Z==="Kobo"||Z==="Kindle Fire"||Z===F5?zc:Z===Xd||Z===Nc||Z===Jd||Z===n1?"Console":Z===I5?"Wearable":Z?pi:L?.userAgentDataPlatform==="Android"&&((H=L?.maxTouchPoints)!==null&&H!==void 0?H:0)>0?600>Math.min((j=L?.screenWidth)!==null&&j!==void 0?j:0,(B=L?.screenHeight)!==null&&B!==void 0?B:0)/((U=L?.devicePixelRatio)!==null&&U!==void 0?U:1)?pi:zc:"Desktop"),$timezone:hD(),$timezone_offset:Zte()}),{$current_url:ef(ur?.href,re,tf),$host:ur?.host,$pathname:ur?.pathname,$raw_user_agent:Gr.length>1e3?Gr.substring(0,997)+"...":Gr,$browser_version:ote(Gr,navigator.vendor),$browser_language:_A(),$browser_language_prefix:(M=_A(),typeof M=="string"?M.split("-")[0]:void 0),$screen_height:me?.screen.height,$screen_width:me?.screen.width,$viewport_height:me?.innerHeight,$viewport_width:me?.innerWidth,$lib:Nr.LIB_NAME,$lib_version:Nr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:p,windowId:g}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());c.$session_id=p,c.$window_id=g}this.sessionPropsManager&&Sn(c,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&Sn(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(v=this.Hi)==null?void 0:v.length}catch(S){c.$sdk_debug_error_capturing_properties=String(S)}if(this.requestRouter.region===I1&&(c.$lib_custom_api_host=this.config.api_host),f=t!==vc||s?t!==Py||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),c=Sn(c,f),t===vc&&$e&&(c.title=$e.title),!ze(l)){var y=r.getTime()-l;c.$duration=parseFloat((y/1e3).toFixed(3))}Gr&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=Sn({},m,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),Mt(this.config.property_denylist)?ln(this.config.property_denylist,(function(S){delete c[S]})):je.error(xD+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(je.error(PA),c=b(c,t));var x=this.nn();return c.$process_person_profile=x,x&&!s&&this.sn("_calculate_event_properties"),c}tn(t,n,r){var i;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.nn()||this.Mi&&!r)return t;var s=this.persistence.get_initial_props(),l=(i=this.sessionPropsManager)==null?void 0:i.getSetOnceProps(),c=Sn({},s,l||{},t||{}),d=this.config.sanitize_properties;return d&&(je.error(PA),c=d(c,"$set_once")),n&&(this.Mi=!0),wc(c)?void 0:c}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var i;(i=this.persistence)==null||i.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}an(t,n){this.register({[t]:n})}getFeatureFlag(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(t,n)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,n,r){var i;(i=this.featureFlags)==null||i.updateFlags(t,n,r)}updateEarlyAccessFeatureEnrollment(t,n,r){var i;(i=this.featureFlags)==null||i.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){var i;return n===void 0&&(n=!1),(i=this.featureFlags)==null?void 0:i.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Fi.on(t,n)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:sd}),()=>{})}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(t,n):t([],{isLoaded:!1,error:sd})}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,n):t([],{isLoaded:!1,error:sd})}renderSurvey(t,n){var r;(r=this.surveys)==null||r.renderSurvey(t,n)}displaySurvey(t,n){var r;n===void 0&&(n=hne),(r=this.surveys)==null||r.displaySurvey(t,n)}cancelPendingSurvey(t){var n;(n=this.surveys)==null||n.cancelPendingSurvey(t)}canRenderSurvey(t){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(t))!==null&&n!==void 0?n:{visible:!1,disabledReason:sd}}canRenderSurveyAsync(t,n){var r,i;return n===void 0&&(n=!1),(r=(i=this.surveys)==null?void 0:i.canRenderSurveyAsync(t,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:sd})}ln(t){return!t||pm(t)?(je.critical("Unique user id has not been set in posthog.identify"),!1):t===up?(je.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(je.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,n,r){if(!this.__loaded||!this.persistence)return je.uninitializedWarning("posthog.identify");if($i(t)&&(t=t.toString(),je.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.ln(t)&&this.sn("posthog.identify")){var i=this.get_distinct_id();this.register({$user_id:t}),this.get_property(ng)||this.register_once({$had_persisted_distinct_id:!0,$device_id:i},""),t!==i&&t!==this.get_property(yd)&&(this.unregister(yd),this.register({distinct_id:t}));var s,l=(this.persistence.get_property(Wi)||ac)===ac;t!==i&&l?(this.persistence.set_property(Wi,lc),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(Ny,{distinct_id:t,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.Di=AA(t,n,r),(s=this.featureFlags)==null||s.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),t!==i&&(this.reloadFeatureFlags(),this.unregister(Dd))}}setPersonProperties(t,n){if((t||n)&&this.sn("posthog.setPersonProperties")){var r=AA(this.get_distinct_id(),t,n);this.Di!==r?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!0),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Di=r):je.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){var i=this.getGroups(),s=i[t]!==n;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:ke({},i,{[t]:n})}),s||r){var l={$group_type:t,$group_key:n};r&&(l.$group_set=r),this.capture(hA,l)}r&&this.setGroupPropertiesForFlags({[t]:r}),s&&!r&&this.reloadFeatureFlags()}else je.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(t,n))}resetGroupPropertiesForFlags(t){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(t)}reset(t){var n,r,i,s,l,c,d,f;if(je.info("reset"),!this.__loaded)return je.uninitializedWarning("posthog.reset");var m=this.get_property(ng);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),(i=this.surveys)==null||i.reset(),(s=this.Ki)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(d=this.persistence)==null||d.set_property(Wi,ac),(f=this.sessionManager)==null||f.resetSessionId(),this.Di=null,this.config.cookieless_mode===os)this.register_once({distinct_id:up,$device_id:null},"");else{var p=this.config.get_device_id(Ws());this.register_once({distinct_id:p,$device_id:t?p:m},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,n){var r;this.config.identity_distinct_id=t,this.config.identity_hash=n,this.alias(t),(r=this.conversations)==null||r.un()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var s,l=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return i;i+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-l,0)}return i}alias(t,n){return t===this.get_property(Z5)?(je.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(ze(n)&&(n=this.get_distinct_id()),t!==n?(this.an(yd,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(je.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=ke({},this.config);if(On(t)){var r,i,s,l,c,d,f,m,p,g;Sn(this.config,kA(t));var v=this.qi();(r=this.persistence)==null||r.update_config(this.config,n,v),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Ly(ke({},this.config,{persistence:"sessionStorage"}),v);var y=this.Bi(this.config.debug);wo(y)&&(this.config.debug=y),wo(this.config.debug)&&(this.config.debug?(Nr.DEBUG=!0,gn.R()&&gn.M("ph_debug",!0),je.info("set_config",{config:t,oldConfig:n,newConfig:ke({},this.config)})):(Nr.DEBUG=!1,gn.R()&&gn.F("ph_debug"))),(i=this.exceptionObserver)==null||i.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(d=this.heatmaps)==null||d.startIfEnabled(),(f=this.exceptionObserver)==null||f.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(p=this.surveys)==null||p.loadIfEnabled(),this.cn(),(g=this.externalIntegrations)==null||g.startIfEnabledOrStop()}}_overrideSDKInfo(t,n){Nr.LIB_NAME=t,Nr.LIB_VERSION=n}startSessionRecording(t){var n,r,i,s,l,c=t===!0,d={sampling:c||!(t==null||!t.sampling),linked_flag:c||!(t==null||!t.linked_flag),url_trigger:c||!(t==null||!t.url_trigger),event_trigger:c||!(t==null||!t.event_trigger)};Object.values(d).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),d.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),d.linked_flag&&((i=this.sessionRecording)==null||i.overrideLinkedFlag()),d.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),d.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),i=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(ke({},i,n))}}addExceptionStep(t,n){var r;(r=this.exceptions)==null||r.addExceptionStep(t,n)}captureLog(t){var n;(n=this.logs)==null||n.captureLog(t)}get logger(){var t,n;return(t=(n=this.logs)==null?void 0:n.logger)!==null&&t!==void 0?t:Ni.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(t))!==null&&n!==void 0&&n}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:_c;return n!==_c&&(n=_c+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(Wi))===lc||((n=this.sessionPersistence)==null?void 0:n.get_property(Wi))===lc}nn(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===x1&&!this._isIdentified()&&wc(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[yd])&&((n=this.persistence)==null||(n=n.props)==null||!n[sg]))}Qi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?(je.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(sg,!0),!0)}qi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==qa)}cn(){var t,n,r,i,s=this.qi();return((t=this.persistence)==null?void 0:t._r)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n._r)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==os){if(this.Ni()){var r,i,s,l,c;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(i=this.pageViewManager)==null||i.destroy(),this.sessionManager=new CA(this),this.pageViewManager=new vA(this),this.persistence&&(this.sessionPropsManager=new TA(this,this.sessionManager,this.persistence));var d,f=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Ni.__defaultExtensionClasses)==null?void 0:c.sessionRecording;f&&(this.sessionRecording=this.Ei(this.sessionRecording,new f(this)),this.Wi&&((d=this.sessionRecording)==null||d.onRemoteConfig==null||d.onRemoteConfig(this.Wi)))}var m,p;this.consent.optInOut(!0),this.cn(),this.Xi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==qa&&((m=this.surveys)==null||m.loadIfEnabled()),(ze(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((p=t?.captureEventName)!==null&&p!==void 0?p:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ji()}else je.warn(MA)}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!==os?(this.config.cookieless_mode===qa&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===qa&&(this.register({distinct_id:up,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.Ji())):je.warn(MA)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===os||(this.config.cookieless_mode===qa?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return fi?wD(fi,this.config.custom_blocked_useragents):void 0}Ji(){$e&&($e.visibilityState==="visible"?this.Oi||(this.Oi=!0,this.capture(vc,{title:$e.title},{send_instantly:!0}),this.Pi&&($e.removeEventListener(ag,this.Pi),this.Pi=null)):this.Pi||(this.Pi=this.Ji.bind(this),Bn($e,ag,this.Pi)))}debug(t){t===!1?(me?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(me?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Fr(){var t,n,r,i,s,l,c=this.ji||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(je.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",i=je,s=(n="advanced_disable_flags")in(t=c)&&!wt(t[n]),l=r in t&&!wt(t[r]),s?t[n]:!!l&&(i&&i.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]))}rn(t){if(wt(this.config.before_send))return t;var n=Mt(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var i of n){if(r=i(r),wt(r)){var s="Event '"+t.event+"' was rejected in beforeSend function";return Kee(t.event)?je.warn(s+". This can cause unexpected behavior."):je.info(s),null}r.properties&&!wc(r.properties)||je.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Bi(t){var n=wo(t)&&!t,r=gn.R()&&gn.O("ph_debug")==="true";return!n&&(!!r||t)}}function DA(e){return e instanceof Element&&(e.id===J5||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Jg(e){return!!e&&e.nodeType===1}function ra(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function OD(e){return!!e&&e.nodeType===3}function TD(e){return!!e&&e.nodeType===11}function IS(e){return e?Wg(e).split(/\s+/):[]}function LA(e){var t=me?.location.href;return!!(t&&e&&e.some((n=>t.match(n))))}function gg(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return IS(t)}function CD(e){return wt(e)?null:Wg(e).split(/(\s+)/).filter((t=>jd(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function nf(e){var t="";return k1(e)&&!ID(e)&&e.childNodes&&e.childNodes.length&&ln(e.childNodes,(function(n){var r;OD(n)&&n.textContent&&(t+=(r=CD(n.textContent))!==null&&r!==void 0?r:"")})),Wg(t)}function $A(e){return ze(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}Ni.__defaultExtensionClasses={},Ni.dn={trace:uc=()=>{},debug:uc,info:uc,warn:uc,error:uc,fatal:uc},(function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=Mte(e.prototype[t[n]])})(Ni,["identify"]);var MS=["a","button","form","input","select","textarea","label"];function jA(e,t){if(ze(t))return!0;var n,r=function(s){if(t.some((l=>s.matches(l))))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function AD(e){var t=e.parentNode;return!(!t||!Jg(t))&&t}var yne=["next","previous","prev",">","<"],UA=[".ph-no-rageclick",".ph-no-capture"],N1=e=>!e||ra(e,"html")||!Jg(e),zA=(e,t)=>{if(!me||N1(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!ra(i,"body");)if(TD(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var s=AD(i);if(!s)break;if(t||MS.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var l=me.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(s),i=s}return{parentIsUsefulElement:n,targetElementList:r}};function k1(e){for(var t=e;t.parentNode&&!ra(t,"body");t=t.parentNode){var n=gg(t);if(bt(n,"ph-sensitive")||bt(n,"ph-no-capture"))return!1}if(bt(gg(e),"ph-include"))return!0;var r=e.type||"";if(vn(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!vn(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ID(e){return!!(ra(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ra(e,"select")||ra(e,"textarea")||e.getAttribute("contenteditable")==="true")}var MD="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",bne=new RegExp("^(?:"+MD+")$"),wne=new RegExp(MD),PD="\\d{3}-?\\d{2}-?\\d{4}",Sne=new RegExp("^("+PD+")$"),Ene=new RegExp("("+PD+")");function jd(e,t){return t===void 0&&(t=!0),!(wt(e)||vn(e)&&(e=Wg(e),(t?bne:wne).test((e||"").replace(/[- ]/g,""))||(t?Sne:Ene).test(e)))}function FA(e){var t=nf(e);return jd(t=(t+" "+ND(e)).trim())?t:""}function ND(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ln(e.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var i=nf(n);t=(t+" "+i).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+ND(n)).trim())}catch(s){je.error("[AutoCapture]",s)}})),t}function BA(e){return e.replace(/"|\\"/g,'\\"')}function xne(e){var t=e.attr__class;return t?Mt(t)?t:IS(t):void 0}class VA{constructor(t){this.disabled=t===!1;var n=On(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(t-i.x)+Math.abs(n-i.y)<this.thresholdPx&&this.timeoutMs>r-i.timestamp){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var qy="$copy_autocapture",qA=fn("[AutoCapture]");function Hy(e,t){return t.length>e?t.slice(0,e)+"...":t}function Rne(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Jg(t));return t}function One(e,t){for(var n,r,{e:i,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:d}=t,f=[e],m=e;m.parentNode&&!ra(m,"body");)TD(m.parentNode)?(f.push(m.parentNode.host),m=m.parentNode.host):(f.push(m.parentNode),m=m.parentNode);var p,g,v=[],y={},b=!1,x=!1;if(ln(f,(O=>{var A=k1(O);O.tagName.toLowerCase()==="a"&&(b=O.getAttribute("href"),b=A&&b&&jd(b)&&b),bt(gg(O),"ph-no-capture")&&(x=!0),v.push((function(P,L,H,j){var B=P.tagName.toLowerCase(),U={tag_name:B};MS.indexOf(B)>-1&&!H&&(U.$el_text=B.toLowerCase()==="a"||B.toLowerCase()==="button"?Hy(1024,FA(P)):Hy(1024,nf(P)));var Z=gg(P);Z.length>0&&(U.classes=Z.filter((function(ee){return ee!==""}))),ln(P.attributes,(function(ee){var ae;if((!ID(P)||["name","id","class","aria-label"].indexOf(ee.name)!==-1)&&(j==null||!j.includes(ee.name))&&!L&&jd(ee.value)&&(!vn(ae=ee.name)||ae.substring(0,10)!=="_ngcontent"&&ae.substring(0,7)!=="_nghost")){var Q=ee.value;ee.name==="class"&&(Q=IS(Q).join(" ")),U["attr__"+ee.name]=Hy(1024,Q)}}));for(var re=1,q=1,W=P;W=Rne(W);)re++,W.tagName===P.tagName&&q++;return U.nth_child=re,U.nth_of_type=q,U})(O,s,l,c));var M=(function(P){if(!k1(P))return{};var L={};return ln(P.attributes,(function(H){if(H.name&&H.name.indexOf("data-ph-capture-attribute")===0){var j=H.name.replace("data-ph-capture-attribute-",""),B=H.value;j&&B&&jd(B)&&(L[j]=B)}})),L})(O);Sn(y,M)})),x)return{props:{},explicitNoCapture:x};if(l||(v[0].$el_text=e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?FA(e):nf(e)),b){var S,E;v[0].attr__href=b;var R=(S=ug(b))==null?void 0:S.host,C=me==null||(E=me.location)==null?void 0:E.host;R&&C&&R!==C&&(p=b)}return{props:Sn({$event_type:i.type,$ce_version:1},d?{}:{$elements:v},{$elements_chain:(g=v,(function(O){return O.map((A=>{var M,P,L="";if(A.tag_name&&(L+=A.tag_name),A.attr_class)for(var H of(A.attr_class.sort(),A.attr_class))L+="."+H.replace(/"/g,"");var j=ke({},A.text?{text:A.text}:{},{"nth-child":(M=A.nth_child)!==null&&M!==void 0?M:0,"nth-of-type":(P=A.nth_of_type)!==null&&P!==void 0?P:0},A.href?{href:A.href}:{},A.attr_id?{attr_id:A.attr_id}:{},A.attributes),B={};return vm(j).sort(((U,Z)=>{var[re]=U,[q]=Z;return re.localeCompare(q)})).forEach((U=>{var[Z,re]=U;return B[BA(Z.toString())]=BA(re.toString())})),(L+=":")+vm(B).map((U=>{var[Z,re]=U;return Z+'="'+re+'"'})).join("")})).join(";")})((function(O){return O.map((A=>{var M,P,L={text:(M=A.$el_text)==null?void 0:M.slice(0,400),tag_name:A.tag_name,href:(P=A.attr__href)==null?void 0:P.slice(0,2048),attr_class:xne(A),attr_id:A.attr__id,nth_child:A.nth_child,nth_of_type:A.nth_of_type,attributes:{}};return vm(A).filter((H=>{var[j]=H;return j.indexOf("attr__")===0})).forEach((H=>{var[j,B]=H;return L.attributes[j]=B})),L}))})(g)))},(n=v[0])!=null&&n.$el_text?{$el_text:(r=v[0])==null?void 0:r.$el_text}:{},p&&i.type==="click"?{$external_click_url:p}:{},y)}}var ad=fn("[ExceptionAutocapture]");function HA(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return rs(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var Tne=fn("[TracingHeaders]"),Vs=fn("[Web Vitals]"),GA=9e5,KA="disabled",ZA="lazy_loading",ld="awaiting_config",gp="missing_config";fn("[SessionRecording]"),fn("[SessionRecording]");var D1="[SessionRecording]",qs=fn(D1),Cne=fn("[Heatmaps]");function YA(e){return On(e)&&"clientX"in e&&"clientY"in e&&$i(e.clientX)&&$i(e.clientY)}var WA=fn("[Product Tours]"),Ane=["$set_once","$set"],Hs=fn("[SiteApps]"),QA="Error while initializing PostHog app with config id ";function dc(e,t,n){if(wt(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class Ine{constructor(t){this.vn=new AS,this.fn=(n,r)=>this.pn(n,r)&&this.gn(n,r)&&this.mn(n,r)&&this.yn(n,r),this.pn=(n,r)=>r==null||!r.event||n?.event===r?.event,this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,n;ze((t=this._instance)==null?void 0:t._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,i)=>{this.on(r,i)}))}register(t){var n,r;if(!ze((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach((l=>{var c,d;(c=this._n)==null||c.add(l),(d=l.steps)==null||d.forEach((f=>{var m;(m=this.bn)==null||m.add(f?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var i,s=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((d=>{d!=null&&d.selector&&s.add(d?.selector)}))})),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(t,n){var r;n!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(n?.event))&&this._n&&((r=this._n)==null?void 0:r.size)>0&&this._n.forEach((i=>{this.wn(n,i)&&this.vn.emit("actionCaptured",i.name)}))}In(t){this.onAction("actionCaptured",(n=>t(n)))}wn(t,n){if(n?.steps==null)return!1;for(var r of n.steps)if(this.fn(t,r))return!0;return!1}onAction(t,n){return this.vn.on(t,n)}gn(t,n){if(n!=null&&n.url){var r,i=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!i||typeof i!="string"||!dc(i,n.url,n.url_matching||"contains"))return!1}return!0}mn(t,n){return!!this.Cn(t,n)&&!!this.Sn(t,n)&&!!this.xn(t,n)}Cn(t,n){var r;if(n==null||!n.href)return!0;var i=this.kn(t);if(i.length>0)return i.some((c=>dc(c.href,n.href,n.href_matching||"exact")));var s,l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!l&&dc((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}Sn(t,n){var r;if(n==null||!n.text)return!0;var i=this.kn(t);if(i.length>0)return i.some((f=>dc(f.text,n.text,n.text_matching||"exact")||dc(f.$el_text,n.text,n.text_matching||"exact")));var s,l,c,d=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!d&&(s=(function(f){for(var m,p=[],g=/(?::|")text="(.*?)"/g;!wt(m=g.exec(f));)p.includes(m[1])||p.push(m[1]);return p})(d),l=n.text,c=n.text_matching||"exact",s.some((f=>dc(f,l,c))))}xn(t,n){var r,i;if(n==null||!n.selector)return!0;var s=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(t==null||(i=t.properties)==null?void 0:i.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}kn(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t?.properties.$elements}yn(t,n){return n==null||!n.properties||n.properties.length===0||ED(n.properties.reduce(((r,i)=>{var s=Mt(i.value)?i.value.map(String):i.value!=null?[String(i.value)]:[];return r[i.key]={values:s,operator:i.operator||"exact"},r}),{}),t?.properties)}}class Mne{constructor(t){this._instance=t,this.Tn=new Map,this.An=new Map,this.En=new Map}Rn(t,n){return!!t&&ED(t.propertyFilters,n?.properties)}Nn(t,n){var r=new Map;return t.forEach((i=>{var s;(s=i.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=r.get(l.name)||[];c.push(i.id),r.set(l.name,c)}}))})),r}Mn(t,n,r){var i=(r===nd.Activation?this.Tn:this.An).get(t),s=[];return this.Fn((l=>{s=l.filter((c=>i?.includes(c.id)))})),s.filter((l=>{var c,d=(c=l.conditions)==null||(c=c[r])==null||(c=c.values)==null?void 0:c.find((f=>f.name===t));return this.Rn(d,n)}))}register(t){var n;ze((n=this._instance)==null?void 0:n._addCaptureHook)||(this.On(t),this.Pn(t))}Pn(t){var n=t.filter((r=>{var i,s;return((i=r.conditions)==null?void 0:i.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Ln==null&&(this.Ln=new Ine(this._instance),this.Ln.init(),this.Ln.In((r=>{this.onAction(r)}))),n.forEach((r=>{var i,s,l,c,d;r.conditions&&(i=r.conditions)!=null&&i.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Ln)==null||c.register(r.conditions.actions.values),(d=r.conditions)==null||(d=d.actions)==null||(d=d.values)==null||d.forEach((f=>{if(f&&f.name){var m=this.En.get(f.name);m&&m.push(r.id),this.En.set(f.name,m||[r.id])}})))})))}On(t){var n,r=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),i=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));r.length===0&&i.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.Tn=this.Nn(t,nd.Activation),this.An=this.Nn(t,nd.Cancellation))}onEvent(t,n){var r,i=this.le(),s=this.Dn(),l=this.Bn(),c=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[s])||[];if(l===t&&n&&c.length>0){var d,f;i.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:c});var m=(n==null||(d=n.properties)==null?void 0:d.$survey_id)||(n==null||(f=n.properties)==null?void 0:f.$product_tour_id);if(m){var p=c.indexOf(m);0>p||(c.splice(p,1),this.jn(c))}}else{if(this.An.has(t)){var g=this.Mn(t,n,nd.Cancellation);g.length>0&&(i.info("cancel event matched, cancelling items",{event:t,itemsToCancel:g.map((y=>y.id))}),g.forEach((y=>{var b=c.indexOf(y.id);0>b||c.splice(b,1),this.$n(y.id)})),this.jn(c))}if(this.Tn.has(t)){i.info("event name matched",{event:t,eventPayload:n,items:this.Tn.get(t)});var v=this.Mn(t,n,nd.Activation);this.jn(c.concat(v.map((y=>y.id))||[]))}}}onAction(t){var n,r=this.Dn(),i=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[r])||[];this.En.has(t)&&this.jn(i.concat(this.En.get(t)||[]))}jn(t){var n=this.le(),r=[...new Set(t)].filter((i=>!this.qn(i)));n.info("updating activated items",{activatedItems:r}),this.Zn(r)}getActivatedIds(){var t,n=this.Dn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n])||[]}getEventToItemsMap(){return this.Tn}Vn(){return this.Ln}}class Pne extends Mne{constructor(t){super(t)}Dn(){return v1}Bn(){return xd.SHOWN}Fn(t){var n;(n=this._instance)==null||n.getSurveys(t)}$n(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}le(){return Qt}Zn(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[v1]:t})}qn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Gy="SDK is not enabled or survey functionality is not yet loaded",XA="Disabled. Not loading surveys.",Nne=me!=null&&me.location?fg(me.location.hash,"__posthog")||fg(location.hash,"state"):null,JA="_postHogToolbarParams",eI=fn("[Toolbar]"),Ar=fn("[FeatureFlags]"),ja=fn("[FeatureFlags]",{debugEnabled:!0}),Ky=`" failed. Feature flags didn't load in time.`,tI=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},nI=e=>{var t={};for(var[n,r]of vm(e||{}))r&&(t[n]=r);return t},Xo=fn("[Error tracking]"),rI="Refusing to render web experiment since the viewer is a likely bot",kne={icontains:(e,t)=>!!me&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!me&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!me&&mg(t.href,e),not_regex:(e,t)=>!!me&&!mg(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class wr{get Bt(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((i=>{wr.Hn("retrieved web experiments from the server"),n.zn=new Map,i.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(wr.Hn("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);vn(c)&&s.variants[c]&&n.Un(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var d in s.variants){var f=s.variants[d];wr.Yn(f)&&n.Un(s.name,d,f.transforms)}}))}),r)},this._instance=t,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())wr.Hn(rI);else if(!this.Bt.disable_web_experiments){if(wt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();wr.Hn("applying feature flags",t),t.forEach((n=>{var r;if(this.zn&&(r=this.zn)!=null&&r.has(n)){var i,s=this._instance.getFeatureFlag(n),l=(i=this.zn)==null?void 0:i.get(n);s&&l!=null&&l.variants[s]&&this.Un(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var t=wr.getWindowLocation();if(t!=null&&t.search){var n=dg(t?.search,"__experiment_id"),r=dg(t?.search,"__experiment_variant");n&&r&&(wr.Hn("previewing web experiments "+n+" && "+r),this.getWebExperiments((i=>{this.Gn(parseInt(n),r,i)}),!1,!0))}}loadIfEnabled(){this.Bt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this.Bt.disable_web_experiments&&!r)return t([]);var i=this._instance.get_property("$web_experiments");if(i&&!n)return t(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Bt.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(t,n,r){var i=r.filter((s=>s.id===t));i&&i.length>0&&(wr.Hn("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this.Un(i[0].name,n,i[0].variants[n].transforms))}static Yn(t){return!wt(t.conditions)&&wr.Wn(t)&&wr.Xn(t)}static Wn(t){var n;if(wt(t.conditions)||wt((n=t.conditions)==null?void 0:n.url))return!0;var r,i,s,l=wr.getWindowLocation();return!!l&&((r=t.conditions)==null||!r.url||kne[(i=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&i!==void 0?i:"icontains"](t.conditions.url,l))}static getWindowLocation(){return me?.location}static Xn(t){var n;if(wt(t.conditions)||wt((n=t.conditions)==null?void 0:n.utm))return!0;var r=aD();if(r.utm_source){var i,s,l,c,d,f,m,p,g=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,v=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==r.utm_source,y=(d=t.conditions)==null||(d=d.utm)==null||!d.utm_medium||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_medium)==r.utm_medium,b=(m=t.conditions)==null||(m=m.utm)==null||!m.utm_term||((p=t.conditions)==null||(p=p.utm)==null?void 0:p.utm_term)==r.utm_term;return g&&y&&b&&v}return!1}static Hn(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];je.info("[WebExperiments] "+t,r)}Un(t,n,r){this._is_bot()?wr.Hn(rI):n!=="control"?r.forEach((i=>{if(i.selector){var s;wr.Hn("applying transform of variant "+n+" for experiment "+t+" ",i);var l=(s=document)==null?void 0:s.querySelectorAll(i.selector);l?.forEach((c=>{var d=c;i.html&&(d.innerHTML=i.html),i.css&&d.setAttribute("style",i.css)}))}})):wr.Hn("Control variants leave the page unmodified.")}_is_bot(){return fi&&this._instance?wD(fi,this.Bt.custom_blocked_useragents):void 0}}var Ci=fn("[Conversations]"),Ua="Conversations not available yet.",ev={featureFlags:class{constructor(e){this.Jn=!1,this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Bt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}ls(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.Bt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}us(){return!!this.ls()&&(this.ss||this.Qn||(this.ss=!0,Ar.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.Bt.evaluation_contexts)!==null&&e!==void 0?e:this.Bt.evaluation_environments;return!this.Bt.evaluation_environments||this.Bt.evaluation_contexts||this.ns||(Ar.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||Ar.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:n}=this._instance,r=(e=(t=n.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(r).length){var i,s,l=(i=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&i!==void 0?i:{},c=Object.keys(r).filter((f=>!!r[f])).reduce(((f,m)=>(f[m]=r[m]||!1,f)),{}),d=Object.keys(l).filter((f=>c[f])).reduce(((f,m)=>(l[m]&&(f[m]=l[m]),f)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:d})}}updateFlags(e,t,n){var r=n!=null&&n.merge?this.getFlagVariants():{},i=n!=null&&n.merge?this.getFlagPayloads():{},s=ke({},r,e),l=ke({},i,t),c={};for(var[d,f]of Object.entries(s)){var m=typeof f=="string";c[d]={key:d,enabled:!!m||!!f,variant:m?f:void 0,reason:void 0,metadata:ze(l?.[d])?void 0:{id:0,version:void 0,description:void 0,payload:l[d]}}}this.receivedFeatureFlags({flags:c})}get hasLoadedFlags(){return this.Kn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(h1),t=this.os(ns),n=this.os(gc);if(!n&&!t)return e||{};var r=Sn({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var s of i){var l,c,d=r[s],f=t?.[s],m=ze(f)?(l=d?.enabled)!==null&&l!==void 0&&l:!!f,p=ze(f)?d.variant:typeof f=="string"?f:void 0,g=n?.[s],v=ke({},d,{enabled:m,variant:m?p??d?.variant:void 0});m!==d?.enabled&&(v.original_enabled=d?.enabled),p!==d?.variant&&(v.original_variant=d?.variant),g&&(v.metadata=ke({},d?.metadata,{payload:g,original_payload:d==null||(c=d.metadata)==null?void 0:c.payload})),r[s]=v}return this.Jn||(Ar.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getFlagVariants(){var e=this.os(Sc),t=this.os(ns);if(!t)return e||{};for(var n=Sn({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||(Ar.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var e=this.os(p1),t=this.os(gc);if(!t)return e||{};for(var n=Sn({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this.Jn||(Ar.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.es||this.Bt.advanced_disable_feature_flags||this.ds||(this._instance.Fi.emit("featureFlagsReloading",!0),this.ds=setTimeout((()=>{this.vs()}),5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Kn||this.Qn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Fr())if(this.Qn)this.ts=!0;else{var n=this.Bt.token,r=this.os(ng),i={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:ke({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(Ed)||{}),group_properties:this.os(Va),timezone:hD()};hs(r)||ze(r)||(i.$device_id=r),(e!=null&&e.disableFlags||this.Bt.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.cs()&&(i.evaluation_contexts=this.hs());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Bt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Qn=!0,this._instance._send_request({method:"POST",url:s,data:i,compression:this.Bt.disable_compression?void 0:mo.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback:l=>{var c,d,f,m=!0;if(l.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),m=!1),this.Qn=!1,!i.disable_flags||this.ts){this.rs=!m;var p=[];l.error?l.error instanceof Error?p.push(l.error.name==="AbortError"?"timeout":"connection_error"):p.push("unknown_error"):l.statusCode!==200&&p.push("api_error_"+l.statusCode),(c=l.json)!=null&&c.errorsWhileComputingFlags&&p.push("errors_while_computing_flags");var g,v=!((d=l.json)==null||(d=d.quotaLimited)==null||!d.includes("feature_flags"));v&&p.push("quota_limited"),(f=this.ni)==null||f.register({[y1]:p}),v?Ar.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags((g=l.json)!==null&&g!==void 0?g:{},m,{partialResponse:!!this.Bt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var n;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var r=this.getFeatureFlagResult(e,t);return(n=r?.variant)!==null&&n!==void 0?n:r?.enabled}}else Ar.warn('getFeatureFlag for key "'+e+Ky)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var n=this.getFlagVariants(),r=e in n,i=n[e],s=this.getFlagPayloads()[e],l=String(i),c=this.os(m1)||void 0,d=this.os(ig)||void 0,f=this.os(Dd)||{};if(this.Bt.advanced_feature_flags_dedup_per_session){var m,p=this._instance.get_session_id(),g=this.os(_1);p&&p!==g&&(f={},(m=this.ni)==null||m.register({[Dd]:f,[_1]:p}))}if((t.send_event||!("send_event"in t))&&(!(e in f)||!f[e].includes(l))){var v,y,b,x,S,E,R,C,O,A;Mt(f[e])?f[e].push(l):f[e]=[l],(v=this.ni)==null||v.register({[Dd]:f});var M=this.getFeatureFlagDetails(e),P=[...(y=this.os(y1))!==null&&y!==void 0?y:[]];ze(i)&&P.push("flag_missing");var L={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:d,$feature_flag_bootstrapped_response:((b=this.Bt.bootstrap)==null||(b=b.featureFlags)==null?void 0:b[e])||null,$feature_flag_bootstrapped_payload:((x=this.Bt.bootstrap)==null||(x=x.featureFlagPayloads)==null?void 0:x[e])||null,$used_bootstrap_value:!this.rs};ze(M==null||(S=M.metadata)==null?void 0:S.version)||(L.$feature_flag_version=M.metadata.version);var H,j=(E=M==null||(R=M.reason)==null?void 0:R.description)!==null&&E!==void 0?E:M==null||(C=M.reason)==null?void 0:C.code;j&&(L.$feature_flag_reason=j),M!=null&&(O=M.metadata)!=null&&O.id&&(L.$feature_flag_id=M.metadata.id),ze(M?.original_variant)&&ze(M?.original_enabled)||(L.$feature_flag_original_response=ze(M.original_variant)?M.original_enabled:M.original_variant),M!=null&&(A=M.metadata)!=null&&A.original_payload&&(L.$feature_flag_original_payload=M==null||(H=M.metadata)==null?void 0:H.original_payload),P.length&&(L.$feature_flag_error=P.join(",")),this._instance.capture("$feature_flag_called",L)}if(r){var B=s;if(!ze(s))try{B=JSON.parse(s)}catch{}return{key:e,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:B}}}}else Ar.warn('getFeatureFlagResult for key "'+e+Ky)}getRemoteConfigPayload(e,t){var n=this.Bt.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(r.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Bt.disable_compression?void 0:mo.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback(i){var s,l=(s=i.json)==null?void 0:s.featureFlagPayloads;t(l?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Kn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return ze(n)?void 0:!!n}Ar.warn('isFeatureEnabled for key "'+e+Ky)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,n){if(this.ni){this.Kn=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,d,f,m,p){d===void 0&&(d={}),f===void 0&&(f={}),m===void 0&&(m={});var g=(P=>{var L=P.flags;return L?(P.featureFlags=Object.fromEntries(Object.keys(L).map((H=>{var j;return[H,(j=L[H].variant)!==null&&j!==void 0?j:L[H].enabled]}))),P.featureFlagPayloads=Object.fromEntries(Object.keys(L).filter((H=>L[H].enabled)).filter((H=>{var j;return(j=L[H].metadata)==null?void 0:j.payload})).map((H=>{var j;return[H,(j=L[H].metadata)==null?void 0:j.payload]})))):Ar.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),P})(l),v=g.flags,y=g.featureFlags,b=g.featureFlagPayloads;if(y){var x=l.requestId,S=l.evaluatedAt;if(Mt(y)){Ar.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var E={};if(y)for(var R=0;y.length>R;R++)E[y[R]]=!0;c&&c.register({[mm]:y,[Sc]:E})}else{var C=y,O=b,A=v;if(p!=null&&p.partialResponse)C=ke({},d,C),O=ke({},f,O),A=ke({},m,A);else if(l.errorsWhileComputingFlags)if(v){var M=new Set(Object.keys(v).filter((P=>{var L;return!((L=v[P])!=null&&L.failed)})));C=ke({},d,Object.fromEntries(Object.entries(C).filter((P=>{var[L]=P;return M.has(L)})))),O=ke({},f,Object.fromEntries(Object.entries(O||{}).filter((P=>{var[L]=P;return M.has(L)})))),A=ke({},m,Object.fromEntries(Object.entries(A||{}).filter((P=>{var[L]=P;return M.has(L)}))))}else C=ke({},d,C),O=ke({},f,O),A=ke({},m,A);c&&c.register(ke({[mm]:Object.keys(nI(C)),[Sc]:C||{},[p1]:O||{},[h1]:A||{}},x?{[m1]:x}:{},S?{[ig]:S}:{}))}}})(e,this.ni,r,i,s,n),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),Ar.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return Ar.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(ns),this.ni.unregister(gc),this.ps(),ja.info("All overrides cleared");if(Mt(e)){var t=tI(e);return this.ni.register({[ns]:t}),this.ps(),ja.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Jn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.ni.unregister(ns),ja.info("Flag overrides cleared");else if(r.flags){if(Mt(r.flags)){var i=tI(r.flags);this.ni.register({[ns]:i})}else this.ni.register({[ns]:r.flags});ja.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.ni.unregister(gc),ja.info("Payload overrides cleared")):r.payloads&&(this.ni.register({[gc]:r.payloads}),ja.info("Payload overrides set",{payloads:r.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[ns]:e}),this.ps(),ja.info("Flag overrides set",{flags:e});Ar.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Kn){var{flags:t,flagVariants:n}=this.gs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,i=(this.os(Sd)||[]).find((d=>d.flagKey===e)),s={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:s};i&&(l.$early_access_feature_name=i.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=ke({},this.getFlagVariants(),{[e]:t});(r=this.ni)==null||r.register({[mm]:Object.keys(nI(c)),[Sc]:c}),this.ps()}getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.os(Sd),i=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Bt.token+i),method:"GET",callback:s=>{var l,c;if(s.json){var d=s.json.earlyAccessFeatures;return(l=this.ni)==null||l.unregister(Sd),(c=this.ni)==null||c.register({[Sd]:d}),e(d)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((n=>t[n])),flagVariants:Object.keys(t).filter((n=>t[n])).reduce(((n,r)=>(n[r]=t[r],n)),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach((r=>r(t,n,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Ed)||{},r=e?.$set||(e!=null&&e.$set_once?{}:e),i=e?.$set_once,s={};if(i)for(var l in i)({}).hasOwnProperty.call(i,l)&&(l in n||(s[l]=i[l]));this._instance.register({[Ed]:ke({},n,s,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Ed)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Va)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=ke({},n[r],e[r]),delete e[r]})),this._instance.register({[Va]:ke({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(Va)||{};this._instance.register({[Va]:ke({},t,{[e]:{}})})}else this._instance.unregister(Va)}reset(){this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},Dne={sessionRecording:class{get Bt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===ld||this.bs===gp?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=KA,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw qs.error("started without valid sessionManager"),new Error(D1+" started without valid sessionManager. This is a bug.");if(this.Bt.cookieless_mode===os)throw new Error(D1+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(wd))==null||!e.enabled),n=!this.Bt.disable_session_recording,r=this.Bt.disable_session_recording||this._instance.consent.isOptedOut();return me&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var n=!ze(Object.assign)&&!ze(Array.from);this.ws&&n?(this.Is(e),qs.info("starting")):(this.bs=KA,this.stopRecording())}}Is(e){var t,n,r;this.ws&&(this.bs!==ld&&this.bs!==gp&&(this.bs=ZA),We!=null&&(t=We.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=We.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Cs(e):(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Ss,(i=>{if(i)return qs.error("could not load recorder",i);this.Cs(e)})))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}xs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}ks(){var e;(e=this.ni)==null||e.unregister(xS)}Ts(e,t){if(wt(e))return null;var n,r=$i(e)?e:parseFloat(e);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(qs.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}As(e){if(this.ni){var t,n,r=this.ni,i=()=>{var s,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Ts((s=this.Bt.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),d=this.Ts(l?.sampleRate,"remote config sampleRate"),f=c??d;wt(f)&&this.ks();var m=l?.minimumDurationMilliseconds;r.register({[wd]:ke({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:ke({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:f,minimumDurationMilliseconds:ze(m)?null:m,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};i(),(t=this._s)==null||t.call(this),this._s=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(i)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.As(e),void this.xs()):(this.As(e),void this.startIfEnabledOrStop()):(this.bs===ld&&(this.bs=gp,qs.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t="log"),(n=this.ys)!=null&&n.log?this.ys.log(e,t):qs.warn("log called before recorder was ready")}get Ss(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(wd);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Es(){var e,t=this._instance.get_property(wd);if(!t)return!1;var n=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-n}Cs(e){var t,n;if((t=We.__PosthogExtensions__)==null||!t.initSessionRecording)return qs.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[nD]:!0});if(this.ys||(this.ys=(n=We.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Es())return this.bs===gp||this.bs===ld?void 0:(this.bs=ld,qs.info("persisted remote config is stale, requesting fresh config before starting"),void new pD(this._instance).load());this.bs=ZA,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.ni)==null||t.register({[W5]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[Y5]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||(n=this.ni)==null||n.register({[e==="url"?Q5:X5]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.ys)==null||!n.tryAddCustomEvent(e,t))}}},Lne={autocapture:class{constructor(e){this.Rs=!1,this.Ns=null,this.Ms=!1,this.instance=e,this.rageclicks=new VA(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get Bt(){var e,t,n=On(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map((r=>new RegExp(r))),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map((r=>new RegExp(r))),n}Os(){if(this.isBrowserSupported()){if(me&&$e){var e=n=>{n=n||me?.event;try{this.Ps(n)}catch(r){qA.error("Failed to capture event",r)}};if(Bn($e,"submit",e,{capture:!0}),Bn($e,"change",e,{capture:!0}),Bn($e,"click",e,{capture:!0}),this.Bt.capture_copied_text){var t=n=>{this.Ps(n=n||me?.event,qy)};Bn($e,"copy",t,{capture:!0}),Bn($e,"cut",t,{capture:!0})}}}else qA.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Rs&&(this.Os(),this.Rs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Ms=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[o1]:!!e.autocapture_opt_out}),this.Ns=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,n=[];return(t=this.Fs)==null||t.forEach((r=>{var i=$e?.querySelectorAll(r);i?.forEach((s=>{e===s&&n.push(r)}))})),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[o1];if(hs(this.Ns)&&!wo(n)&&!this.instance.Fr())return!1;var r=(t=this.Ns)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!r}Ps(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=$A(e);OD(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&(function(p,g){if(!me||N1(p))return!1;var v,y,b;if(wo(g)?(v=!!g&&UA,y=void 0):(v=(b=g?.css_selector_ignorelist)!==null&&b!==void 0?b:UA,y=g?.content_ignorelist),v===!1)return!1;var{targetElementList:x}=zA(p,!1);return!(function(S,E){if(S===!1||ze(S))return!1;var R;if(S===!0)R=yne;else{if(!Mt(S))return!1;if(S.length>10)return je.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;R=S.map((C=>C.toLowerCase()))}return E.some((C=>{var{safeText:O,ariaLabel:A}=C;return R.some((M=>O.includes(M)||A.includes(M)))}))})(y,x.map((S=>{var E;return{safeText:nf(S).toLowerCase(),ariaLabel:((E=S.getAttribute("aria-label"))==null?void 0:E.toLowerCase().trim())||""}})))&&!jA(x,v)})(r,this.instance.config.rageclick)&&this.Ps(e,"$rageclick");var i=t===qy;if(r&&(function(p,g,v,y,b){var x,S,E,R;if(v===void 0&&(v=void 0),!me||N1(p)||(x=v)!=null&&x.url_allowlist&&!LA(v.url_allowlist)||(S=v)!=null&&S.url_ignorelist&&LA(v.url_ignorelist))return!1;if((E=v)!=null&&E.dom_event_allowlist){var C=v.dom_event_allowlist;if(C&&!C.some((L=>g.type===L)))return!1}var{parentIsUsefulElement:O,targetElementList:A}=zA(p,y);if(!(function(L,H){var j=H?.element_allowlist;if(ze(j))return!0;var B,U=function(re){if(j.some((q=>re.tagName.toLowerCase()===q)))return{v:!0}};for(var Z of L)if(B=U(Z))return B.v;return!1})(A,v)||!jA(A,(R=v)==null?void 0:R.css_selector_allowlist))return!1;var M=me.getComputedStyle(p);if(M&&M.getPropertyValue("cursor")==="pointer"&&g.type==="click")return!0;var P=p.tagName.toLowerCase();switch(P){case"html":return!1;case"form":return(b||["submit"]).indexOf(g.type)>=0;case"input":case"select":case"textarea":return(b||["change","click"]).indexOf(g.type)>=0;default:return O?(b||["click"]).indexOf(g.type)>=0:(b||["click"]).indexOf(g.type)>=0&&(MS.indexOf(P)>-1||p.getAttribute("contenteditable")==="true")}})(r,e,this.Bt,i,i?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:l}=One(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Bt.element_attribute_ignorelist,elementsChainAsString:this.Ms});if(l)return!1;var c=this.getElementSelectors(r);if(c&&c.length>0&&(s.$element_selectors=c),t===qy){var d,f=CD(me==null||(d=me.getSelection())==null?void 0:d.toString()),m=e.type||"clipboard";if(!f)return!1;s.$selected_content=f,s.$copy_type=m}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return rs($e?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ls=(me==null||(t=me.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(je.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,je.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(me&&me.history){var n=this;(e=me.history.pushState)!=null&&e.__posthog_wrapped__||HA(me.history,"pushState",(r=>function(i,s,l){r.call(this,i,s,l),n.Bs("pushState")})),(t=me.history.replaceState)!=null&&t.__posthog_wrapped__||HA(me.history,"replaceState",(r=>function(i,s,l){r.call(this,i,s,l),n.Bs("replaceState")})),this.js()}}Bs(e){try{var t,n=me==null||(t=me.location)==null?void 0:t.pathname;if(!n)return;n!==this.Ls&&this.isEnabled&&this._instance.capture(vc,{navigation_type:e}),this.Ls=n}catch(r){je.error("Error capturing "+e+" pageview",r)}}js(){if(!this.Ds){var e=()=>{this.Bs("popstate")};Bn(me,"popstate",e),this.Ds=()=>{me&&me.removeEventListener("popstate",e)}}}},heatmaps:class{get Bt(){return this.instance.config}constructor(e){var t;this.$s=!1,this.Rs=!1,this.qs=null,this.instance=e,this.$s=!((t=this.instance.persistence)==null||!t.props[s1]),this.rageclicks=new VA(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return On(this.Bt.capture_heatmaps)&&this.Bt.capture_heatmaps.flush_interval_milliseconds&&(e=this.Bt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return wt(this.Bt.capture_heatmaps)?wt(this.Bt.enable_heatmaps)?this.$s:this.Bt.enable_heatmaps:this.Bt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;Cne.info("starting..."),this.Zs(),this.Ft()}else{var e;clearInterval((e=this.qs)!==null&&e!==void 0?e:void 0),this.Vs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[s1]:t}),this.$s=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.T;return this.T=void 0,e}Hs(e){this.Tt(e.originalEvent,"deadclick")}Ft(){this.qs&&clearInterval(this.qs),this.qs=$e?.visibilityState==="visible"?setInterval(this.Yr.bind(this),this.flushIntervalMilliseconds):null}Zs(){me&&$e&&(this.zs=this.Yr.bind(this),Bn(me,lg,this.zs),this.Us=e=>this.Tt(e||me?.event),Bn($e,"click",this.Us,{capture:!0}),this.Ys=e=>this.Gs(e||me?.event),Bn($e,"mousemove",this.Ys,{capture:!0}),this.Ws=new gA(this.instance,Fte,this.Hs.bind(this)),this.Ws.startIfEnabledOrStop(),this.Xs=this.Ft.bind(this),Bn($e,ag,this.Xs),this.Rs=!0)}Vs(){var e;me&&$e&&(this.zs&&me.removeEventListener(lg,this.zs),this.Us&&$e.removeEventListener("click",this.Us,{capture:!0}),this.Ys&&$e.removeEventListener("mousemove",this.Ys,{capture:!0}),this.Xs&&$e.removeEventListener(ag,this.Xs),clearTimeout(this.Js),(e=this.Ws)==null||e.stop(),this.Rs=!1)}Ks(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),s=(function(l,c,d){for(var f=l;f&&Jg(f)&&!ra(f,"body");){if(f===d)return!1;if(bt(c,me?.getComputedStyle(f).position))return!0;f=AD(f)}return!1})($A(e),["fixed","sticky"],i);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:n),target_fixed:s,type:t}}Tt(e,t){var n;if(t===void 0&&(t="click"),!DA(e.target)&&YA(e)){var r=this.Ks(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Qs(ke({},r,{type:"rageclick"})),this.Qs(r)}}Gs(e){!DA(e.target)&&YA(e)&&(clearTimeout(this.Js),this.Js=setTimeout((()=>{this.Qs(this.Ks(e,"mousemove"))}),500))}Qs(e){if(me){var t=me.location.href,n=this.Bt.custom_personal_data_properties,r=this.Bt.mask_personal_data_properties?[...Vc,...n||[]]:[],i=ef(t,r,tf);this.T=this.T||{},this.T[i]||(this.T[i]=[]),this.T[i].push(e)}}Yr(){this.T&&!wc(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:gA,webVitalsAutocapture:class{constructor(e){var t;this.$s=!1,this.Rs=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.T.metrics.length!==0&&(this._instance.capture("$web_vitals",this.T.metrics.reduce(((n,r)=>ke({},n,{["$web_vitals_"+r.name+"_event"]:ke({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=n=>{var r,i=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0);if(ze(i))Vs.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.io();ze(s)||(wt(n?.name)||wt(n?.value)?Vs.error("Invalid metric received",n):!this.no||this.no>n.value?(this.T.url!==s&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),ze(this.T.url)&&(this.T.url=s),this.T.firstMetricTimestamp=ze(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.T.metrics.push(ke({},n,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.eo()):Vs.error("Ignoring metric with value >= "+this.no,n))}},this.so=()=>{if(!this.Rs){var n,r,i,s,l=We.__PosthogExtensions__;ze(l)||ze(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:i,onINP:s}=l.postHogWebVitalsCallbacks),n&&r&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ht.bind(this)),this.Rs=!0):Vs.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.$s=!((t=this._instance.persistence)==null||!t.props[u1]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=On(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return wt(n)?((t=this._instance.persistence)==null?void 0:t.props[f1])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(On(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=On(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=On(this.oo)&&$i(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:GA;return e>0&&6e4>=e?GA:e}get isEnabled(){var e=ur?.protocol;if(e!=="http:"&&e!=="https:")return Vs.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=On(this.oo)?this.oo.web_vitals:wo(this.oo)?this.oo:void 0;return wo(t)?t:this.$s}startIfEnabled(){this.isEnabled&&!this.Rs&&(Vs.info("enabled, starting..."),this.ur(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=On(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=On(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[u1]:t}),this._instance.persistence.register({[f1]:n})),this.$s=t,this.startIfEnabled()}}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?Vs.error("failed to load script",r):e()}))}io(){var e=me?me.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Vc,...t||[]]:[];return ef(e,n,tf)}Vs.error("Could not determine current URL")}}},$ne={exceptionObserver:class{constructor(e){var t,n,r;this.so=()=>{var i;if(me&&this.isEnabled&&(i=We.__PosthogExtensions__)!=null&&i.errorWrappingFunctions){var s=We.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=We.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=We.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.Bt.capture_unhandled_errors&&(this.ao=s(this.captureException.bind(this))),!this.lo&&this.Bt.capture_unhandled_rejections&&(this.lo=l(this.captureException.bind(this))),!this.uo&&this.Bt.capture_console_errors&&(this.uo=c(this.captureException.bind(this)))}catch(d){ad.error("failed to start",d),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[a1]),this.do=new Wee({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Gt:ad}),this.Bt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return On(e)?t=ke({},t,e):(ze(e)?this.co:e)&&(t=ke({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Bt.capture_console_errors||this.Bt.capture_unhandled_errors||this.Bt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ad.info("enabled"),this.ho(),this.ur(this.so)):this.ho()}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return ad.error("failed to load script",r);e()}))}ho(){var e,t,n;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.lo)==null||t.call(this),this.lo=void 0,(n=this.uo)==null||n.call(this),this.uo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[a1]:this.co}),this.Bt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.Bt=this.vo()}captureException(e){var t,n,r,i=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(i)?ad.info("Skipping exception capture because of client rate limiting.",{exception:i}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.fo=[],this.po=new cte([new vte,new Ote,new yte,new _te,new xte,new Ete,new wte,new Rte],(function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;i>l;l++)s[l-1]=arguments[l];return function(c,d){d===void 0&&(d=0);for(var f=[],m=c.split(`
|
|
156
156
|
`),p=d;m.length>p;p++){var g=m[p];if(1024>=g.length){var v=fA.test(g)?g.replace(fA,"$1"):g;if(!v.match(/\S*Error: /)){for(var y of s){var b=y(v,r);if(b){f.push(b);break}}if(f.length>=50)break}}}return(function(x){if(!x.length)return[];var S=Array.from(x);return S.reverse(),S.slice(0,50).map((E=>{return ke({},E,{filename:E.filename||(R=S,R[R.length-1]||{}).filename,function:E.function||Bc});var R}))})(f)}})("web:javascript",hte,gte)),this._instance=e,this.fo=(t=(n=this._instance.persistence)==null?void 0:n.get_property(l1))!==null&&t!==void 0?t:[],this.mo=tg(this.yo()),this.bo=new Cte(this.mo)}onConfigChange(){this.mo=tg(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var i=(t=(n=e.errorTracking)==null?void 0:n.suppressionRules)!==null&&t!==void 0?t:[],s=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.fo=i,this._instance.persistence&&this._instance.persistence.register({[l1]:this.fo,[c1]:s})}}get _o(){var e,t=!!this._instance.get_property(c1),n=this._instance.config.error_tracking.captureExtensionExceptions;return(e=n??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!vn(e)||e.trim().length===0)return void Xo.warn("Ignoring exception step because message must be a non-empty string");var n=this.wo(t),{sanitizedProperties:r,droppedKeys:i}=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(s).reduce(((c,d)=>Tte.has(d)?(l.push(d),c):(c[d]=s[d],c)),{}),droppedKeys:l}})(n);i.length>0&&Xo.warn("Ignoring reserved exception step fields",{droppedKeys:i}),this.bo.add(ke({[Jm]:e,[eg]:new Date().toISOString()},r))}catch(s){Xo.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Io(t)){if(this.Co(t))return this.So("Exception dropped: matched a suppression rule"),void Xo.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.xo(t))return this.So("Exception dropped: thrown by a browser extension"),void Xo.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ko(t))return this.So("Exception dropped: thrown by the PostHog SDK"),void Xo.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.mo.enabled&&wt(e.$exception_steps)?this.To(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return r&&this.bo.clear(),r}catch(i){return Xo.error("Failed to capture exception event. Dropping this exception.",i),void this.bo.clear()}}catch(i){return void Xo.error("Failed to process exception event. Ignoring this exception.",i)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:ke({},e,{$exception_steps:t})}catch(n){return Xo.error("Failed to read buffered exception steps. Capturing exception without steps.",n),e}}So(e){this.mo.enabled&&this.bo.add({[Jm]:e,[eg]:new Date().toISOString()})}wo(e){return On(e)?ke({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Co(e){if(e.length===0)return!1;var t=e.reduce(((n,r)=>{var{type:i,value:s}=r;return vn(i)&&i.length>0&&n.$exception_types.push(i),vn(s)&&s.length>0&&n.$exception_values.push(s),n}),{$exception_types:[],$exception_values:[]});return this.fo.some((n=>{var r=n.values.map((i=>{var s,l=SD[i.operator],c=Mt(i.value)?i.value:[i.value],d=(s=t[i.key])!==null&&s!==void 0?s:[];return c.length>0&&l(c,d)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}xo(e){return e.flatMap((t=>{var n,r;return(n=(r=t.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,n,r,i,s=(t=(n=e[0].stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[],l=s[s.length-1];return(r=l==null||(i=l.filename)==null?void 0:i.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}Io(e){return!wt(e)&&Mt(e)}}},jne=ke({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Ao=null,this.Eo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[d1]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(d1)||this.ur((()=>this.Ro()))}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?WA.error("Could not load product tours script",r):e()}))}Ro(){var e;!this.Ao&&(e=We.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=We.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Mt(this.Eo)||t){var n=this.ni;if(n){var r=n.props[gm];if(Mt(r)&&!t)return this.Eo=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:i=>{var s=i.statusCode;if(s!==200||!i.json){var l="Product Tours API could not be loaded, status: "+s;return WA.error(l),void e([],{isLoaded:!1,error:l})}var c=Mt(i.json.product_tours)?i.json.product_tours:[];this.Eo=c,n&&n.register({[gm]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){wt(this.Ao)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Ao.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Ao)==null||t.showTourById(e)}previewTour(e){this.Ao?this.Ao.previewTour(e):this.ur((()=>{var t;this.Ro(),(t=this.Ao)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Ao)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Ao)==null||e.nextStep()}previousStep(){var e;(e=this.Ao)==null||e.previousStep()}clearCache(){var e;this.Eo=null,(e=this.ni)==null||e.unregister(gm)}resetTour(e){var t;(t=this.Ao)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Ao)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Ao)==null||t.cancelPendingTour(e)}}},ev),Une={siteApps:class{constructor(e){this._instance=e,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Mo(e,t){if(t){var n=this.globalsForEvent(t);this.No.push(n),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=We._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Mo.bind(this));this.Fo=()=>{e(),this.No=[],this.Fo=void 0}}}globalsForEvent(e){var t,n,r,i,s,l,c;if(!e)throw new Error("Event payload is required");var d={},f=this._instance.get_property("$groups")||[],m=this._instance.get_property("$stored_group_properties")||{};for(var[p,g]of Object.entries(m))d[p]={id:f[p],type:p,properties:g};var{$set_once:v,$set:y}=e;return{event:ke({},E5(e,Ane),{properties:ke({},e.properties,y?{$set:ke({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},y)}:{},v?{$set_once:ke({},(r=(i=e.properties)==null?void 0:i.$set_once)!==null&&r!==void 0?r:{},v)}:{}),elements_chain:(s=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:d}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var l;!t.errored&&this.No.length&&(Hs.info("Processing "+this.No.length+" events for site app with id "+e.id),this.No.forEach((c=>t.processEvent==null?void 0:t.processEvent(c))),t.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Fo)==null||l.call(this))},r=!1,i=l=>{t.errored=!l,t.loaded=!0,Hs.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),r&&n()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(l){i(l)}});s&&(t.processEvent=s),r=!0}catch(l){Hs.error(QA+e.id,l),i(!1)}if(r&&t.loaded)try{n()}catch(l){Hs.error("Error while processing buffered events PostHog app with config id "+e.id,l),t.errored=!0}}Oo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(t)}catch(r){Hs.error("Error while processing event "+e.event+" for site app "+n.id,r)}}}onRemoteConfig(e){var t,n,r,i=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(d=>this.Po(d)))):void Hs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Fo)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(d){var f;We["__$$ph_site_app_"+d]=i._instance,(f=We.__PosthogExtensions__)==null||f.loadSiteApp==null||f.loadSiteApp(i._instance,c,(m=>{if(m)return Hs.error(QA+d,m)}))};for(var{id:l,url:c}of e.siteApps)s(l)}else Hs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},zne={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,n,r=this.Bo()||[];ze(this.Lo)&&((t=We.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(r,this._instance.get_distinct_id(),this._instance.sessionManager)),ze(this.Do)&&((n=We.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(r,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return Tne.error("failed to load script",r);e()}))}Bo(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Bo()?this.ur(this.so):((e=this.Lo)==null||e.call(this),(t=this.Do)==null||t.call(this),this.Lo=void 0,this.Do=void 0)}}},Fne=ke({surveys:class{get Bt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.$o=!1,this.qo=[],this.Zo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Bt.disable_surveys){var t=e.surveys;if(wt(t))return Qt.warn("Flags not loaded yet. Not loading surveys.");var n=Mt(t);this.jo=n?t.length>0:t,Qt.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(n!=null&&n.startsWith(M1)||n!=null&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach((r=>localStorage.removeItem(r)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)Qt.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)Qt.info(XA);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())Qt.info("Not loading surveys in cookieless mode without consent.");else{var e=We?.__PosthogExtensions__;if(e){if(!ze(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var n=e.generateSurveys;if(n)return void this.Vo(n,t);var r=e.loadExternalDependency;if(!r)return void this.Ho(RS);r(this._instance,"surveys",(i=>{i||!e.generateSurveys?this.Ho("Could not load surveys script",i):this.Vo(e.generateSurveys,t)}))}catch(i){throw this.Ho("Error initializing surveys",i),i}finally{this.$o=!1}}}else Qt.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new Pne(this._instance),Qt.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){Qt.error(e,t),this.zo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.qo.push(e),this._surveyManager&&this.zo({isLoaded:!0}),()=>{this.qo=this.qo.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Bt.disable_surveys)return Qt.info(XA),e([]);var n,r=this._instance.get_property(g1);if(r&&!t)return e(r,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((i=>{var{surveys:s,context:l}=i;return e(s,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((i=>{n=i}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Bt.token),method:"GET",timeout:this.Bt.surveys_request_timeout_ms,callback:i=>{var s;this.Zo=null;var l=i.statusCode;if(l!==200||!i.json){var c="Surveys API could not be loaded, status: "+l;Qt.error(c);var d={isLoaded:!1,error:c};return e([],d),void(n==null||n({surveys:[],context:d}))}var f,m=i.json.surveys||[],p=m.filter((v=>(function(y){return!(!y.start_date||y.end_date)})(v)&&((function(y){var b;return!((b=y.conditions)==null||(b=b.events)==null||(b=b.values)==null||!b.length)})(v)||(function(y){var b;return!((b=y.conditions)==null||(b=b.actions)==null||(b=b.values)==null||!b.length)})(v))));p.length>0&&((f=this._surveyEventReceiver)==null||f.register(p)),(s=this._instance.persistence)==null||s.register({[g1]:m});var g={isLoaded:!0};e(m,g),n?.({surveys:m,context:g})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(n){Qt.error("Error in survey callback",n)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!wt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Qt.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((n=>{var r;t=(r=n.find((i=>i.id===e)))!==null&&r!==void 0?r:null})),t}Yo(e){if(wt(this._surveyManager))return{eligible:!1,reason:Gy};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(wt(this._surveyManager))return Qt.warn("init was not called"),{visible:!1,disabledReason:Gy};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return wt(this._surveyManager)?(Qt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Gy})):new Promise((n=>{this.getSurveys((r=>{var i,s=(i=r.find((c=>c.id===e)))!==null&&i!==void 0?i:null;if(s){var l=this.Yo(s);n({visible:l.eligible,disabledReason:l.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,n){var r;if(wt(this._surveyManager))Qt.warn("init was not called");else{var i=typeof e=="string"?this.Uo(e):e;if(i!=null&&i.id)if(fne.includes(i.type)){var s=$e?.querySelector(t);if(s)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(Qt.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Qt.info("Rendering survey "+i.id+" with delay of "+((l=i.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(i,s,n),Qt.info("Survey "+i.id+" rendered")}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s,n);Qt.warn("Survey element not found")}else Qt.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Qt.warn("Survey not found")}}displaySurvey(e,t){var n;if(wt(this._surveyManager))Qt.warn("init was not called");else{var r=this.Uo(e);if(r){var i=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=ke({},r,{appearance:ke({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==R1.Popover&&t.initialResponses&&Qt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(r);if(!s.visible)return void Qt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==R1.Inline?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else Qt.warn("Survey not found")}}cancelPendingSurvey(e){wt(this._surveyManager)?Qt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},ev),Bne={toolbar:class{constructor(e){this.instance=e}Go(e){We.ph_toolbar_state=e}Wo(){var e;return(e=We.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),rD(this.instance.config)||!me||!$e)return!1;e=e??me.location,n=n??me.history;try{if(!t){try{me.localStorage.setItem("test","test"),me.localStorage.removeItem("test")}catch{return!1}t=me?.localStorage}var r,i=Nne||fg(e.hash,"__posthog")||fg(e.hash,"state"),s=i?pA((()=>JSON.parse(atob(decodeURIComponent(i)))))||pA((()=>JSON.parse(decodeURIComponent(i)))):null;return s&&s.action==="ph_authorize"?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(JA)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Xo(e){var t=We.ph_load_toolbar||We.ph_load_editor;!wt(t)&&rs(t)?t(e,this.instance):eI.warn("No toolbar load function found")}loadToolbar(e){var t=!($e==null||!$e.getElementById(J5));if(!me||t)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=ke({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(me.localStorage.setItem(JA,JSON.stringify(ke({},r,{source:void 0}))),this.Wo()===2)this.Xo(r);else if(this.Wo()===0){var i;this.Go(1),(i=We.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return eI.error("[Toolbar] Failed to load",s),void this.Go(0);this.Go(2),this.Xo(r)})),Bn(me,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(r)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},Vne=ke({experiments:wr},ev),qne={conversations:class{constructor(e){this.Ko=void 0,this._conversationsManager=null,this.Qo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;wt(t)||(wo(t)?this.Ko=t:(this.Ko=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Ko=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Qo||this._instance.config.disable_conversations||rD(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=We?.__PosthogExtensions__;if(e&&!ze(this.Ko)&&this.Ko)if(this.ea&&this.ea.token){this.Qo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Qo=!1);var n=e.loadExternalDependency;if(!n)return void this.ra(RS);n(this._instance,"conversations",(r=>{r||!e.initConversations?this.ra("Could not load conversations script",r):this.ta(e.initConversations),this.Qo=!1}))}catch(r){this.ra("Error initializing conversations",r),this.Qo=!1}}else Ci.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Ci.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Ci.error("Cannot complete initialization: remote config is null")}ra(e,t){Ci.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():Ci.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!hs(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,n){var r=this;return Pi((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(Ci.warn(Ua),null)}))()}getMessages(e,t){var n=this;return Pi((function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(Ci.warn(Ua),null)}))()}markAsRead(e){var t=this;return Pi((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Ci.warn(Ua),null)}))()}getTickets(e){var t=this;return Pi((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Ci.warn(Ua),null)}))()}requestRestoreLink(e){var t=this;return Pi((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Ci.warn(Ua),null)}))()}restoreFromToken(e){var t=this;return Pi((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Ci.warn(Ua),null)}))()}restoreFromUrlToken(){var e=this;return Pi((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Ci.warn(Ua),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}un(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},Hne={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=fn("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.la=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=(t=e.logs)==null?void 0:t.captureConsoleLogs;!wt(n)&&n&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.oa=0,this.aa=0,this.la=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=We?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(n=>{var r;n||(r=e.logs)==null||!r.initializeLogs?this.Gt.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(RS)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,r,i,s,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(n=this._instance.config.logs)==null?void 0:n.flushIntervalMs)!==null&&t!==void 0?t:3e3,d=(r=(i=this._instance.config.logs)==null?void 0:i.maxLogsPerInterval)!==null&&r!==void 0?r:1e3,f=Date.now();if(c>f-this.aa||(this.aa=f,this.oa=0,this.la=!1),d>this.oa){this.oa++;var m=(function(p,g){var v=p.level||"info",{text:y,number:b}=V5[v]||ate,x=String(Date.now())+"000000",S={};g.distinctId&&(S.posthogDistinctId=g.distinctId),g.sessionId&&(S.sessionId=g.sessionId),g.currentUrl&&(S["url.full"]=g.currentUrl),g.screenName&&(S["screen.name"]=g.screenName),g.appState&&(S["app.state"]=g.appState),g.activeFeatureFlags&&g.activeFeatureFlags.length>0&&(S.feature_flags=g.activeFeatureFlags);var E=ke({},S,p.attributes||{}),R={timeUnixNano:x,observedTimeUnixNano:x,severityNumber:b,severityText:y,body:{stringValue:p.body},attributes:dA(E)};return p.trace_id&&(R.traceId=p.trace_id),p.span_id&&(R.spanId=p.span_id),ze(p.trace_flags)||(R.flags=p.trace_flags),R})(e,this.ua());this.sa.push({record:m}),((s=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&s!==void 0?s:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+d+" logs per "+c+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var n=this._instance.config.logs,r=ke({"service.name":n?.serviceName||"unknown_service"},n?.environment&&{"deployment.environment":n.environment},n?.serviceVersion&&{"service.version":n.serviceVersion},n?.resourceAttributes),i=(function(l,c,d,f){return{resourceLogs:[{resource:{attributes:dA(c)},scopeLogs:[{scope:{name:d,version:f},logRecords:l}]}]}})(t.map((l=>l.record)),r,Nr.LIB_NAME,Nr.LIB_VERSION),s=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:s,data:i,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.jr||(this.jr=setTimeout((()=>{this.jr=void 0,this.flushLogs()}),(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}ua(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(We!=null&&(e=We.location)!=null&&e.href&&(t.currentUrl=We.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}},Gne=ke({},ev,Dne,Lne,$ne,jne,Une,Fne,zne,Bne,Vne,qne,Hne);Ni.__defaultExtensionClasses=ke({},Gne);var iI,Qc=(iI=$d[_c]=new Ni,(function(){function e(){e.done||(e.done=!0,RD=!1,ln($d,(function(t){t._dom_loaded()})))}$e!=null&&$e.addEventListener?$e.readyState==="complete"?e():Bn($e,"DOMContentLoaded",e,{capture:!1}):me&&je.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),iI);let al=!1,L1=null;function Kne(e,t){al||typeof window>"u"||(Qc.init(e,{api_host:t,capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture"},person_profiles:"identified_only"}),al=!0)}function Zne(e,t){al&&Qc.identify(e,t)}function Yne(){al&&(Qc.reset(),L1=null)}function Nle(e,t){al&&Qc.capture(e,t)}function kle(e,t){al&&e!==L1&&(Qc.group("organization",e,t),L1=e)}function kD(e,t){if(al)try{Qc.captureException(e,t)}catch{}}let vp=null;function Wne({children:e}){const t=KM(),{data:n}=Mg.useSession();if(t.posthog){Kne(t.posthog.key,t.posthog.host);const r=n?.user?.id??null;r&&r!==vp?(Zne(r,{email:n?.user?.email,name:n?.user?.name}),vp=r):!r&&vp&&(Yne(),vp=null)}return T.jsx(T.Fragment,{children:e})}const PS=({size:e=24,color:t="currentColor",...n})=>I.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},I.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));PS.displayName="AlertTriangle";const DD=({size:e=24,color:t="currentColor",...n})=>I.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},I.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));DD.displayName="Dataflow03";const LD=({size:e=24,color:t="currentColor",...n})=>I.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},I.createElement("path",{d:"M12 2.25v2.5M12 18v4M5.75 12h-3.5m19 0h-1.5m-1.293 6.457-.707-.707m.914-12.334L17.25 6.83M4.922 19.078 7.75 16.25M5.129 5.209 7.25 7.33"}));LD.displayName="Loading01";const $D=({size:e=24,color:t="currentColor",...n})=>I.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},I.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));$D.displayName="RefreshCw01";function jD(){const e=Ro.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=T.jsx("div",{className:"flex items-center justify-center min-h-screen",children:T.jsx(LD,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}const Qne={from({org:e,project:t}){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}}},UD=I.createContext(void 0),Xne=()=>{const e=I.useContext(UD);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},Dle=()=>Xne().org,Lle=e=>{const t=Ro.c(10),{children:n,org:r,project:i}=e;let s;t[0]!==r.id||t[1]!==i.id?(s=Qne.from({org:r.id,project:i.id}),t[0]=r.id,t[1]=i.id,t[2]=s):s=t[2];const l=s;let c;t[3]!==l||t[4]!==r||t[5]!==i?(c={org:r,project:i,locator:l},t[3]=l,t[4]=r,t[5]=i,t[6]=c):c=t[6];const d=c;let f;return t[7]!==n||t[8]!==d?(f=T.jsx(UD.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},NS="2025-11-25",$le=[NS,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Jne="io.modelcontextprotocol/related-task",tv="2.0",pr=gq(e=>e!==null&&(typeof e=="object"||typeof e=="function")),zD=rn([z(),St().int()]),FD=z();hr({ttl:rn([St(),VN()]).optional(),pollInterval:St().optional()});const ere=Ee({ttl:St().optional()}),tre=Ee({taskId:z()}),kS=hr({progressToken:zD.optional(),[Jne]:tre.optional()}),mi=Ee({_meta:kS.optional()}),_f=mi.extend({task:ere.optional()}),jle=e=>_f.safeParse(e).success,gr=Ee({method:z(),params:mi.loose().optional()}),Ui=Ee({_meta:kS.optional()}),zi=Ee({method:z(),params:Ui.loose().optional()}),vr=hr({_meta:kS.optional()}),nv=rn([z(),St().int()]),BD=Ee({jsonrpc:Ye(tv),id:nv,...gr.shape}).strict(),Ule=e=>BD.safeParse(e).success,VD=Ee({jsonrpc:Ye(tv),...zi.shape}).strict(),zle=e=>VD.safeParse(e).success,DS=Ee({jsonrpc:Ye(tv),id:nv,result:vr}).strict(),Fle=e=>DS.safeParse(e).success;var vg;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(vg||(vg={}));const LS=Ee({jsonrpc:Ye(tv),id:nv.optional(),error:Ee({code:St().int(),message:z(),data:Xt().optional()})}).strict(),Ble=e=>LS.safeParse(e).success,Vle=rn([BD,VD,DS,LS]);rn([DS,LS]);const qD=vr.strict(),nre=Ui.extend({requestId:nv.optional(),reason:z().optional()}),HD=zi.extend({method:Ye("notifications/cancelled"),params:nre}),rre=Ee({src:z(),mimeType:z().optional(),sizes:Ie(z()).optional(),theme:dn(["light","dark"]).optional()}),yf=Ee({icons:Ie(rre).optional()}),Hc=Ee({name:z(),title:z().optional()}),GD=Hc.extend({...Hc.shape,...yf.shape,version:z(),websiteUrl:z().optional(),description:z().optional()}),ire=Ew(Ee({applyDefaults:Pt().optional()}),Ut(z(),Xt())),ore=Rw(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ew(Ee({form:ire.optional(),url:pr.optional()}),Ut(z(),Xt()).optional())),sre=hr({list:pr.optional(),cancel:pr.optional(),requests:hr({sampling:hr({createMessage:pr.optional()}).optional(),elicitation:hr({create:pr.optional()}).optional()}).optional()}),are=hr({list:pr.optional(),cancel:pr.optional(),requests:hr({tools:hr({call:pr.optional()}).optional()}).optional()}),lre=Ee({experimental:Ut(z(),pr).optional(),sampling:Ee({context:pr.optional(),tools:pr.optional()}).optional(),elicitation:ore.optional(),roots:Ee({listChanged:Pt().optional()}).optional(),tasks:sre.optional()}),cre=mi.extend({protocolVersion:z(),capabilities:lre,clientInfo:GD}),ure=gr.extend({method:Ye("initialize"),params:cre}),dre=Ee({experimental:Ut(z(),pr).optional(),logging:pr.optional(),completions:pr.optional(),prompts:Ee({listChanged:Pt().optional()}).optional(),resources:Ee({subscribe:Pt().optional(),listChanged:Pt().optional()}).optional(),tools:Ee({listChanged:Pt().optional()}).optional(),tasks:are.optional()}),fre=vr.extend({protocolVersion:z(),capabilities:dre,serverInfo:GD,instructions:z().optional()}),KD=zi.extend({method:Ye("notifications/initialized"),params:Ui.optional()}),qle=e=>KD.safeParse(e).success,ZD=gr.extend({method:Ye("ping"),params:mi.optional()}),hre=Ee({progress:St(),total:En(St()),message:En(z())}),pre=Ee({...Ui.shape,...hre.shape,progressToken:zD}),YD=zi.extend({method:Ye("notifications/progress"),params:pre}),mre=mi.extend({cursor:FD.optional()}),bf=gr.extend({params:mre.optional()}),wf=vr.extend({nextCursor:FD.optional()}),gre=dn(["working","input_required","completed","failed","cancelled"]),Sf=Ee({taskId:z(),status:gre,ttl:rn([St(),VN()]),createdAt:z(),lastUpdatedAt:z(),pollInterval:En(St()),statusMessage:En(z())}),WD=vr.extend({task:Sf}),vre=Ui.merge(Sf),QD=zi.extend({method:Ye("notifications/tasks/status"),params:vre}),XD=gr.extend({method:Ye("tasks/get"),params:mi.extend({taskId:z()})}),JD=vr.merge(Sf),e6=gr.extend({method:Ye("tasks/result"),params:mi.extend({taskId:z()})});vr.loose();const t6=bf.extend({method:Ye("tasks/list")}),n6=wf.extend({tasks:Ie(Sf)}),r6=gr.extend({method:Ye("tasks/cancel"),params:mi.extend({taskId:z()})}),Hle=vr.merge(Sf),i6=Ee({uri:z(),mimeType:En(z()),_meta:Ut(z(),Xt()).optional()}),o6=i6.extend({text:z()}),$S=z().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),s6=i6.extend({blob:$S}),Ef=dn(["user","assistant"]),Xc=Ee({audience:Ie(Ef).optional(),priority:St().min(0).max(1).optional(),lastModified:UN({offset:!0}).optional()}),a6=Ee({...Hc.shape,...yf.shape,uri:z(),description:En(z()),mimeType:En(z()),annotations:Xc.optional(),_meta:En(hr({}))}),_re=Ee({...Hc.shape,...yf.shape,uriTemplate:z(),description:En(z()),mimeType:En(z()),annotations:Xc.optional(),_meta:En(hr({}))}),yre=bf.extend({method:Ye("resources/list")}),bre=wf.extend({resources:Ie(a6)}),wre=bf.extend({method:Ye("resources/templates/list")}),Sre=wf.extend({resourceTemplates:Ie(_re)}),jS=mi.extend({uri:z()}),Ere=jS,xre=gr.extend({method:Ye("resources/read"),params:Ere}),Rre=vr.extend({contents:Ie(rn([o6,s6]))}),Ore=zi.extend({method:Ye("notifications/resources/list_changed"),params:Ui.optional()}),Tre=jS,Cre=gr.extend({method:Ye("resources/subscribe"),params:Tre}),Are=jS,Ire=gr.extend({method:Ye("resources/unsubscribe"),params:Are}),Mre=Ui.extend({uri:z()}),Pre=zi.extend({method:Ye("notifications/resources/updated"),params:Mre}),Nre=Ee({name:z(),description:En(z()),required:En(Pt())}),kre=Ee({...Hc.shape,...yf.shape,description:En(z()),arguments:En(Ie(Nre)),_meta:En(hr({}))}),Dre=bf.extend({method:Ye("prompts/list")}),Lre=wf.extend({prompts:Ie(kre)}),$re=mi.extend({name:z(),arguments:Ut(z(),z()).optional()}),jre=gr.extend({method:Ye("prompts/get"),params:$re}),US=Ee({type:Ye("text"),text:z(),annotations:Xc.optional(),_meta:Ut(z(),Xt()).optional()}),zS=Ee({type:Ye("image"),data:$S,mimeType:z(),annotations:Xc.optional(),_meta:Ut(z(),Xt()).optional()}),FS=Ee({type:Ye("audio"),data:$S,mimeType:z(),annotations:Xc.optional(),_meta:Ut(z(),Xt()).optional()}),Ure=Ee({type:Ye("tool_use"),name:z(),id:z(),input:Ut(z(),Xt()),_meta:Ut(z(),Xt()).optional()}),zre=Ee({type:Ye("resource"),resource:rn([o6,s6]),annotations:Xc.optional(),_meta:Ut(z(),Xt()).optional()}),Fre=a6.extend({type:Ye("resource_link")}),BS=rn([US,zS,FS,Fre,zre]),Bre=Ee({role:Ef,content:BS}),Vre=vr.extend({description:z().optional(),messages:Ie(Bre)}),qre=zi.extend({method:Ye("notifications/prompts/list_changed"),params:Ui.optional()}),Hre=Ee({title:z().optional(),readOnlyHint:Pt().optional(),destructiveHint:Pt().optional(),idempotentHint:Pt().optional(),openWorldHint:Pt().optional()}),Gre=Ee({taskSupport:dn(["required","optional","forbidden"]).optional()}),VS=Ee({...Hc.shape,...yf.shape,description:z().optional(),inputSchema:Ee({type:Ye("object"),properties:Ut(z(),pr).optional(),required:Ie(z()).optional()}).catchall(Xt()),outputSchema:Ee({type:Ye("object"),properties:Ut(z(),pr).optional(),required:Ie(z()).optional()}).catchall(Xt()).optional(),annotations:Hre.optional(),execution:Gre.optional(),_meta:Ut(z(),Xt()).optional()}),Kre=bf.extend({method:Ye("tools/list")}),Zre=wf.extend({tools:Ie(VS)}),l6=vr.extend({content:Ie(BS).default([]),structuredContent:Ut(z(),Xt()).optional(),isError:Pt().optional()});l6.or(vr.extend({toolResult:Xt()}));const Yre=_f.extend({name:z(),arguments:Ut(z(),Xt()).optional()}),Wre=gr.extend({method:Ye("tools/call"),params:Yre}),Qre=zi.extend({method:Ye("notifications/tools/list_changed"),params:Ui.optional()}),Gle=Ee({autoRefresh:Pt().default(!0),debounceMs:St().int().nonnegative().default(300)}),c6=dn(["debug","info","notice","warning","error","critical","alert","emergency"]),Xre=mi.extend({level:c6}),Jre=gr.extend({method:Ye("logging/setLevel"),params:Xre}),eie=Ui.extend({level:c6,logger:z().optional(),data:Xt()}),tie=zi.extend({method:Ye("notifications/message"),params:eie}),nie=Ee({name:z().optional()}),rie=Ee({hints:Ie(nie).optional(),costPriority:St().min(0).max(1).optional(),speedPriority:St().min(0).max(1).optional(),intelligencePriority:St().min(0).max(1).optional()}),iie=Ee({mode:dn(["auto","required","none"]).optional()}),oie=Ee({type:Ye("tool_result"),toolUseId:z().describe("The unique identifier for the corresponding tool call."),content:Ie(BS).default([]),structuredContent:Ee({}).loose().optional(),isError:Pt().optional(),_meta:Ut(z(),Xt()).optional()}),sie=GN("type",[US,zS,FS]),_g=GN("type",[US,zS,FS,Ure,oie]),aie=Ee({role:Ef,content:rn([_g,Ie(_g)]),_meta:Ut(z(),Xt()).optional()}),lie=_f.extend({messages:Ie(aie),modelPreferences:rie.optional(),systemPrompt:z().optional(),includeContext:dn(["none","thisServer","allServers"]).optional(),temperature:St().optional(),maxTokens:St().int(),stopSequences:Ie(z()).optional(),metadata:pr.optional(),tools:Ie(VS).optional(),toolChoice:iie.optional()}),cie=gr.extend({method:Ye("sampling/createMessage"),params:lie}),uie=vr.extend({model:z(),stopReason:En(dn(["endTurn","stopSequence","maxTokens"]).or(z())),role:Ef,content:sie}),die=vr.extend({model:z(),stopReason:En(dn(["endTurn","stopSequence","maxTokens","toolUse"]).or(z())),role:Ef,content:rn([_g,Ie(_g)])}),fie=Ee({type:Ye("boolean"),title:z().optional(),description:z().optional(),default:Pt().optional()}),hie=Ee({type:Ye("string"),title:z().optional(),description:z().optional(),minLength:St().optional(),maxLength:St().optional(),format:dn(["email","uri","date","date-time"]).optional(),default:z().optional()}),pie=Ee({type:dn(["number","integer"]),title:z().optional(),description:z().optional(),minimum:St().optional(),maximum:St().optional(),default:St().optional()}),mie=Ee({type:Ye("string"),title:z().optional(),description:z().optional(),enum:Ie(z()),default:z().optional()}),gie=Ee({type:Ye("string"),title:z().optional(),description:z().optional(),oneOf:Ie(Ee({const:z(),title:z()})),default:z().optional()}),vie=Ee({type:Ye("string"),title:z().optional(),description:z().optional(),enum:Ie(z()),enumNames:Ie(z()).optional(),default:z().optional()}),_ie=rn([mie,gie]),yie=Ee({type:Ye("array"),title:z().optional(),description:z().optional(),minItems:St().optional(),maxItems:St().optional(),items:Ee({type:Ye("string"),enum:Ie(z())}),default:Ie(z()).optional()}),bie=Ee({type:Ye("array"),title:z().optional(),description:z().optional(),minItems:St().optional(),maxItems:St().optional(),items:Ee({anyOf:Ie(Ee({const:z(),title:z()}))}),default:Ie(z()).optional()}),wie=rn([yie,bie]),Sie=rn([vie,_ie,wie]),Eie=rn([Sie,fie,hie,pie]),xie=_f.extend({mode:Ye("form").optional(),message:z(),requestedSchema:Ee({type:Ye("object"),properties:Ut(z(),Eie),required:Ie(z()).optional()})}),Rie=_f.extend({mode:Ye("url"),message:z(),elicitationId:z(),url:z().url()}),Oie=rn([xie,Rie]),Tie=gr.extend({method:Ye("elicitation/create"),params:Oie}),Cie=Ui.extend({elicitationId:z()}),Aie=zi.extend({method:Ye("notifications/elicitation/complete"),params:Cie}),Iie=vr.extend({action:dn(["accept","decline","cancel"]),content:Rw(e=>e===null?void 0:e,Ut(z(),rn([z(),St(),Pt(),Ie(z())])).optional())}),Mie=Ee({type:Ye("ref/resource"),uri:z()}),Pie=Ee({type:Ye("ref/prompt"),name:z()}),Nie=mi.extend({ref:rn([Pie,Mie]),argument:Ee({name:z(),value:z()}),context:Ee({arguments:Ut(z(),z()).optional()}).optional()}),kie=gr.extend({method:Ye("completion/complete"),params:Nie}),Die=vr.extend({completion:hr({values:Ie(z()).max(100),total:En(St().int()),hasMore:En(Pt())})}),Lie=Ee({uri:z().startsWith("file://"),name:z().optional(),_meta:Ut(z(),Xt()).optional()}),$ie=gr.extend({method:Ye("roots/list"),params:mi.optional()}),jie=vr.extend({roots:Ie(Lie)}),Uie=zi.extend({method:Ye("notifications/roots/list_changed"),params:Ui.optional()});rn([ZD,ure,kie,Jre,jre,Dre,yre,wre,xre,Cre,Ire,Wre,Kre,XD,e6,t6,r6]);rn([HD,YD,KD,Uie,QD]);rn([qD,uie,die,Iie,jie,JD,n6,WD]);rn([ZD,cie,Tie,$ie,XD,e6,t6,r6]);rn([HD,YD,tie,Pre,Ore,Qre,qre,QD,Aie]);rn([qD,fre,Die,Vre,Lre,bre,Sre,Rre,l6,Zre,JD,n6,WD]);class qS extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===vg.UrlElicitationRequired&&r){const i=r;if(i.elicitations)return new zie(i.elicitations,n)}return new qS(t,n,r)}}class zie extends qS{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(vg.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var _p={exports:{}},Zy={},Jo={},za={},Yy={},Wy={},Qy={},oI;function yg(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(E){if(super(),!e.IDENTIFIER.test(E))throw new Error("CodeGen: name must be a valid identifier");this.str=E}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(E){super(),this._items=typeof E=="string"?[E]:E}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const E=this._items[0];return E===""||E==='""'}get str(){var E;return(E=this._str)!==null&&E!==void 0?E:this._str=this._items.reduce((R,C)=>`${R}${C}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((R,C)=>(C instanceof n&&(R[C.str]=(R[C.str]||0)+1),R),{})}}e._Code=r,e.nil=new r("");function i(S,...E){const R=[S[0]];let C=0;for(;C<E.length;)c(R,E[C]),R.push(S[++C]);return new r(R)}e._=i;const s=new r("+");function l(S,...E){const R=[v(S[0])];let C=0;for(;C<E.length;)R.push(s),c(R,E[C]),R.push(s,v(S[++C]));return d(R),new r(R)}e.str=l;function c(S,E){E instanceof r?S.push(...E._items):E instanceof n?S.push(E):S.push(p(E))}e.addCodeArg=c;function d(S){let E=1;for(;E<S.length-1;){if(S[E]===s){const R=f(S[E-1],S[E+1]);if(R!==void 0){S.splice(E-1,3,R);continue}S[E++]="+"}E++}}function f(S,E){if(E==='""')return S;if(S==='""')return E;if(typeof S=="string")return E instanceof n||S[S.length-1]!=='"'?void 0:typeof E!="string"?`${S.slice(0,-1)}${E}"`:E[0]==='"'?S.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(S instanceof n))return`"${S}${E.slice(1)}`}function m(S,E){return E.emptyStr()?S:S.emptyStr()?E:l`${S}${E}`}e.strConcat=m;function p(S){return typeof S=="number"||typeof S=="boolean"||S===null?S:v(Array.isArray(S)?S.join(","):S)}function g(S){return new r(v(S))}e.stringify=g;function v(S){return JSON.stringify(S).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function y(S){return typeof S=="string"&&e.IDENTIFIER.test(S)?new r(`.${S}`):i`[${S}]`}e.getProperty=y;function b(S){if(typeof S=="string"&&e.IDENTIFIER.test(S))return new r(`${S}`);throw new Error(`CodeGen: invalid export name: ${S}, use explicit $id name mapping`)}e.getEsmExportName=b;function x(S){return new r(S.toString())}e.regexpCode=x})(Qy)),Qy}var Xy={},sI;function aI(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=yg();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,p;if(!((p=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=i;class s extends t.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(m)}[${p}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class c extends i{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?l:t.nil}}get(){return this._scope}name(f){return new s(f,this._newName(f))}value(f,m){var p;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:v}=g,y=(p=m.key)!==null&&p!==void 0?p:m.ref;let b=this._values[v];if(b){const E=b.get(y);if(E)return E}else b=this._values[v]=new Map;b.set(y,g);const x=this._scope[v]||(this._scope[v]=[]),S=x.length;return x[S]=m.ref,g.setValue(m,{property:v,itemIndex:S}),g}getValue(f,m){const p=this._values[f];if(p)return p.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,m,p){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},m,p)}_reduceValues(f,m,p={},g){let v=t.nil;for(const y in f){const b=f[y];if(!b)continue;const x=p[y]=p[y]||new Map;b.forEach(S=>{if(x.has(S))return;x.set(S,r.Started);let E=m(S);if(E){const R=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${R} ${S} = ${E};${this.opts._n}`}else if(E=g?.(S))v=(0,t._)`${v}${E}${this.opts._n}`;else throw new n(S);x.set(S,r.Completed)})}return v}}e.ValueScope=c})(Xy)),Xy}var lI;function pt(){return lI||(lI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=yg(),n=aI();var r=yg();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=aI();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(D,F){return this}}class l extends s{constructor(D,F,X){super(),this.varKind=D,this.name=F,this.rhs=X}render({es5:D,_n:F}){const X=D?n.varKinds.var:this.varKind,fe=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${fe};`+F}optimizeNames(D,F){if(D[this.name.str])return this.rhs&&(this.rhs=Z(this.rhs,D,F)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(D,F,X){super(),this.lhs=D,this.rhs=F,this.sideEffects=X}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,F){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=Z(this.rhs,D,F),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(D,this.rhs)}}class d extends c{constructor(D,F,X,fe){super(D,X,fe),this.op=F}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class f extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class m extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class g extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,F){return this.code=Z(this.code,D,F),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((F,X)=>F+X.render(D),"")}optimizeNodes(){const{nodes:D}=this;let F=D.length;for(;F--;){const X=D[F].optimizeNodes();Array.isArray(X)?D.splice(F,1,...X):X?D[F]=X:D.splice(F,1)}return D.length>0?this:void 0}optimizeNames(D,F){const{nodes:X}=this;let fe=X.length;for(;fe--;){const pe=X[fe];pe.optimizeNames(D,F)||(re(D,pe.names),X.splice(fe,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((D,F)=>B(D,F.names),{})}}class y extends v{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class b extends v{}class x extends y{}x.kind="else";class S extends y{constructor(D,F){super(F),this.condition=D}render(D){let F=`if(${this.condition})`+super.render(D);return this.else&&(F+="else "+this.else.render(D)),F}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let F=this.else;if(F){const X=F.optimizeNodes();F=this.else=Array.isArray(X)?new x(X):X}if(F)return D===!1?F instanceof S?F:F.nodes:this.nodes.length?this:new S(q(D),F instanceof S?[F]:F.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,F){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(D,F),!!(super.optimizeNames(D,F)||this.else))return this.condition=Z(this.condition,D,F),this}get names(){const D=super.names;return U(D,this.condition),this.else&&B(D,this.else.names),D}}S.kind="if";class E extends y{}E.kind="for";class R extends E{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,F){if(super.optimizeNames(D,F))return this.iteration=Z(this.iteration,D,F),this}get names(){return B(super.names,this.iteration.names)}}class C extends E{constructor(D,F,X,fe){super(),this.varKind=D,this.name=F,this.from=X,this.to=fe}render(D){const F=D.es5?n.varKinds.var:this.varKind,{name:X,from:fe,to:pe}=this;return`for(${F} ${X}=${fe}; ${X}<${pe}; ${X}++)`+super.render(D)}get names(){const D=U(super.names,this.from);return U(D,this.to)}}class O extends E{constructor(D,F,X,fe){super(),this.loop=D,this.varKind=F,this.name=X,this.iterable=fe}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,F){if(super.optimizeNames(D,F))return this.iterable=Z(this.iterable,D,F),this}get names(){return B(super.names,this.iterable.names)}}class A extends y{constructor(D,F,X){super(),this.name=D,this.args=F,this.async=X}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}A.kind="func";class M extends v{render(D){return"return "+super.render(D)}}M.kind="return";class P extends y{render(D){let F="try"+super.render(D);return this.catch&&(F+=this.catch.render(D)),this.finally&&(F+=this.finally.render(D)),F}optimizeNodes(){var D,F;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(D,F){var X,fe;return super.optimizeNames(D,F),(X=this.catch)===null||X===void 0||X.optimizeNames(D,F),(fe=this.finally)===null||fe===void 0||fe.optimizeNames(D,F),this}get names(){const D=super.names;return this.catch&&B(D,this.catch.names),this.finally&&B(D,this.finally.names),D}}class L extends y{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}L.kind="catch";class H extends y{render(D){return"finally"+super.render(D)}}H.kind="finally";class j{constructor(D,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
|
|
157
157
|
`:""},this._extScope=D,this._scope=new n.Scope({parent:D}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,F){const X=this._extScope.value(D,F);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(D,F){return this._extScope.getValue(D,F)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,F,X,fe){const pe=this._scope.toName(F);return X!==void 0&&fe&&(this._constants[pe.str]=X),this._leafNode(new l(D,pe,X)),pe}const(D,F,X){return this._def(n.varKinds.const,D,F,X)}let(D,F,X){return this._def(n.varKinds.let,D,F,X)}var(D,F,X){return this._def(n.varKinds.var,D,F,X)}assign(D,F,X){return this._leafNode(new c(D,F,X))}add(D,F){return this._leafNode(new d(D,e.operators.ADD,F))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new g(D)),this}object(...D){const F=["{"];for(const[X,fe]of D)F.length>1&&F.push(","),F.push(X),(X!==fe||this.opts.es5)&&(F.push(":"),(0,t.addCodeArg)(F,fe));return F.push("}"),new t._Code(F)}if(D,F,X){if(this._blockNode(new S(D)),F&&X)this.code(F).else().code(X).endIf();else if(F)this.code(F).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new S(D))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(S,x)}_for(D,F){return this._blockNode(D),F&&this.code(F).endFor(),this}for(D,F){return this._for(new R(D),F)}forRange(D,F,X,fe,pe=this.opts.es5?n.varKinds.var:n.varKinds.let){const xe=this._scope.toName(D);return this._for(new C(pe,xe,F,X),()=>fe(xe))}forOf(D,F,X,fe=n.varKinds.const){const pe=this._scope.toName(D);if(this.opts.es5){const xe=F instanceof t.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,t._)`${xe}.length`,Ue=>{this.var(pe,(0,t._)`${xe}[${Ue}]`),X(pe)})}return this._for(new O("of",fe,pe,F),()=>X(pe))}forIn(D,F,X,fe=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${F})`,X);const pe=this._scope.toName(D);return this._for(new O("in",fe,pe,F),()=>X(pe))}endFor(){return this._endBlockNode(E)}label(D){return this._leafNode(new f(D))}break(D){return this._leafNode(new m(D))}return(D){const F=new M;if(this._blockNode(F),this.code(D),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(D,F,X){if(!F&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const fe=new P;if(this._blockNode(fe),this.code(D),F){const pe=this.name("e");this._currNode=fe.catch=new L(pe),F(pe)}return X&&(this._currNode=fe.finally=new H,this.code(X)),this._endBlockNode(L,H)}throw(D){return this._leafNode(new p(D))}block(D,F){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(F),this}endBlock(D){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-F;if(X<0||D!==void 0&&X!==D)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${D} expected`);return this._nodes.length=F,this}func(D,F=t.nil,X,fe){return this._blockNode(new A(D,F,X)),fe&&this.code(fe).endFunc(),this}endFunc(){return this._endBlockNode(A)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,F){const X=this._currNode;if(X instanceof D||F&&X instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${D.kind}/${F.kind}`:D.kind}"`)}_elseNode(D){const F=this._currNode;if(!(F instanceof S))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const F=this._nodes;F[F.length-1]=D}}e.CodeGen=j;function B(V,D){for(const F in D)V[F]=(V[F]||0)+(D[F]||0);return V}function U(V,D){return D instanceof t._CodeOrName?B(V,D.names):V}function Z(V,D,F){if(V instanceof t.Name)return X(V);if(!fe(V))return V;return new t._Code(V._items.reduce((pe,xe)=>(xe instanceof t.Name&&(xe=X(xe)),xe instanceof t._Code?pe.push(...xe._items):pe.push(xe),pe),[]));function X(pe){const xe=F[pe.str];return xe===void 0||D[pe.str]!==1?pe:(delete D[pe.str],xe)}function fe(pe){return pe instanceof t._Code&&pe._items.some(xe=>xe instanceof t.Name&&D[xe.str]===1&&F[xe.str]!==void 0)}}function re(V,D){for(const F in D)V[F]=(V[F]||0)-(D[F]||0)}function q(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,t._)`!${K(V)}`}e.not=q;const W=k(e.operators.AND);function ee(...V){return V.reduce(W)}e.and=ee;const ae=k(e.operators.OR);function Q(...V){return V.reduce(ae)}e.or=Q;function k(V){return(D,F)=>D===t.nil?F:F===t.nil?D:(0,t._)`${K(D)} ${V} ${K(F)}`}function K(V){return V instanceof t.Name?V:(0,t._)`(${V})`}})(Wy)),Wy}var dt={},cI;function Nt(){if(cI)return dt;cI=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.checkStrictMode=dt.getErrorPath=dt.Type=dt.useFunc=dt.setEvaluated=dt.evaluatedPropsToName=dt.mergeEvaluated=dt.eachItem=dt.unescapeJsonPointer=dt.escapeJsonPointer=dt.escapeFragment=dt.unescapeFragment=dt.schemaRefOrVal=dt.schemaHasRulesButRef=dt.schemaHasRules=dt.checkUnknownRules=dt.alwaysValidSchema=dt.toHash=void 0;const e=pt(),t=yg();function n(O){const A={};for(const M of O)A[M]=!0;return A}dt.toHash=n;function r(O,A){return typeof A=="boolean"?A:Object.keys(A).length===0?!0:(i(O,A),!s(A,O.self.RULES.all))}dt.alwaysValidSchema=r;function i(O,A=O.schema){const{opts:M,self:P}=O;if(!M.strictSchema||typeof A=="boolean")return;const L=P.RULES.keywords;for(const H in A)L[H]||C(O,`unknown keyword: "${H}"`)}dt.checkUnknownRules=i;function s(O,A){if(typeof O=="boolean")return!O;for(const M in O)if(A[M])return!0;return!1}dt.schemaHasRules=s;function l(O,A){if(typeof O=="boolean")return!O;for(const M in O)if(M!=="$ref"&&A.all[M])return!0;return!1}dt.schemaHasRulesButRef=l;function c({topSchemaRef:O,schemaPath:A},M,P,L){if(!L){if(typeof M=="number"||typeof M=="boolean")return M;if(typeof M=="string")return(0,e._)`${M}`}return(0,e._)`${O}${A}${(0,e.getProperty)(P)}`}dt.schemaRefOrVal=c;function d(O){return p(decodeURIComponent(O))}dt.unescapeFragment=d;function f(O){return encodeURIComponent(m(O))}dt.escapeFragment=f;function m(O){return typeof O=="number"?`${O}`:O.replace(/~/g,"~0").replace(/\//g,"~1")}dt.escapeJsonPointer=m;function p(O){return O.replace(/~1/g,"/").replace(/~0/g,"~")}dt.unescapeJsonPointer=p;function g(O,A){if(Array.isArray(O))for(const M of O)A(M);else A(O)}dt.eachItem=g;function v({mergeNames:O,mergeToName:A,mergeValues:M,resultToName:P}){return(L,H,j,B)=>{const U=j===void 0?H:j instanceof e.Name?(H instanceof e.Name?O(L,H,j):A(L,H,j),j):H instanceof e.Name?(A(L,j,H),H):M(H,j);return B===e.Name&&!(U instanceof e.Name)?P(L,U):U}}dt.mergeEvaluated={props:v({mergeNames:(O,A,M)=>O.if((0,e._)`${M} !== true && ${A} !== undefined`,()=>{O.if((0,e._)`${A} === true`,()=>O.assign(M,!0),()=>O.assign(M,(0,e._)`${M} || {}`).code((0,e._)`Object.assign(${M}, ${A})`))}),mergeToName:(O,A,M)=>O.if((0,e._)`${M} !== true`,()=>{A===!0?O.assign(M,!0):(O.assign(M,(0,e._)`${M} || {}`),b(O,M,A))}),mergeValues:(O,A)=>O===!0?!0:{...O,...A},resultToName:y}),items:v({mergeNames:(O,A,M)=>O.if((0,e._)`${M} !== true && ${A} !== undefined`,()=>O.assign(M,(0,e._)`${A} === true ? true : ${M} > ${A} ? ${M} : ${A}`)),mergeToName:(O,A,M)=>O.if((0,e._)`${M} !== true`,()=>O.assign(M,A===!0?!0:(0,e._)`${M} > ${A} ? ${M} : ${A}`)),mergeValues:(O,A)=>O===!0?!0:Math.max(O,A),resultToName:(O,A)=>O.var("items",A)})};function y(O,A){if(A===!0)return O.var("props",!0);const M=O.var("props",(0,e._)`{}`);return A!==void 0&&b(O,M,A),M}dt.evaluatedPropsToName=y;function b(O,A,M){Object.keys(M).forEach(P=>O.assign((0,e._)`${A}${(0,e.getProperty)(P)}`,!0))}dt.setEvaluated=b;const x={};function S(O,A){return O.scopeValue("func",{ref:A,code:x[A.code]||(x[A.code]=new t._Code(A.code))})}dt.useFunc=S;var E;(function(O){O[O.Num=0]="Num",O[O.Str=1]="Str"})(E||(dt.Type=E={}));function R(O,A,M){if(O instanceof e.Name){const P=A===E.Num;return M?P?(0,e._)`"[" + ${O} + "]"`:(0,e._)`"['" + ${O} + "']"`:P?(0,e._)`"/" + ${O}`:(0,e._)`"/" + ${O}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return M?(0,e.getProperty)(O).toString():"/"+m(O)}dt.getErrorPath=R;function C(O,A,M=O.opts.strictSchema){if(M){if(A=`strict mode: ${A}`,M===!0)throw new Error(A);O.self.logger.warn(A)}}return dt.checkStrictMode=C,dt}var yp={},uI;function pa(){if(uI)return yp;uI=1,Object.defineProperty(yp,"__esModule",{value:!0});const e=pt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return yp.default=t,yp}var dI;function rv(){return dI||(dI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pt(),n=Nt(),r=pa();e.keywordError={message:({keyword:x})=>(0,t.str)`must pass "${x}" keyword validation`},e.keyword$DataError={message:({keyword:x,schemaType:S})=>S?(0,t.str)`"${x}" keyword must be ${S} ($data)`:(0,t.str)`"${x}" keyword is invalid ($data)`};function i(x,S=e.keywordError,E,R){const{it:C}=x,{gen:O,compositeRule:A,allErrors:M}=C,P=p(x,S,E);R??(A||M)?d(O,P):f(C,(0,t._)`[${P}]`)}e.reportError=i;function s(x,S=e.keywordError,E){const{it:R}=x,{gen:C,compositeRule:O,allErrors:A}=R,M=p(x,S,E);d(C,M),O||A||f(R,r.default.vErrors)}e.reportExtraError=s;function l(x,S){x.assign(r.default.errors,S),x.if((0,t._)`${r.default.vErrors} !== null`,()=>x.if(S,()=>x.assign((0,t._)`${r.default.vErrors}.length`,S),()=>x.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:x,keyword:S,schemaValue:E,data:R,errsCount:C,it:O}){if(C===void 0)throw new Error("ajv implementation error");const A=x.name("err");x.forRange("i",C,r.default.errors,M=>{x.const(A,(0,t._)`${r.default.vErrors}[${M}]`),x.if((0,t._)`${A}.instancePath === undefined`,()=>x.assign((0,t._)`${A}.instancePath`,(0,t.strConcat)(r.default.instancePath,O.errorPath))),x.assign((0,t._)`${A}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${S}`),O.opts.verbose&&(x.assign((0,t._)`${A}.schema`,E),x.assign((0,t._)`${A}.data`,R))})}e.extendErrors=c;function d(x,S){const E=x.const("err",S);x.if((0,t._)`${r.default.vErrors} === null`,()=>x.assign(r.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${r.default.vErrors}.push(${E})`),x.code((0,t._)`${r.default.errors}++`)}function f(x,S){const{gen:E,validateName:R,schemaEnv:C}=x;C.$async?E.throw((0,t._)`new ${x.ValidationError}(${S})`):(E.assign((0,t._)`${R}.errors`,S),E.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(x,S,E){const{createErrors:R}=x.it;return R===!1?(0,t._)`{}`:g(x,S,E)}function g(x,S,E={}){const{gen:R,it:C}=x,O=[v(C,E),y(x,E)];return b(x,S,O),R.object(...O)}function v({errorPath:x},{instancePath:S}){const E=S?(0,t.str)`${x}${(0,n.getErrorPath)(S,n.Type.Str)}`:x;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,E)]}function y({keyword:x,it:{errSchemaPath:S}},{schemaPath:E,parentSchema:R}){let C=R?S:(0,t.str)`${S}/${x}`;return E&&(C=(0,t.str)`${C}${(0,n.getErrorPath)(E,n.Type.Str)}`),[m.schemaPath,C]}function b(x,{params:S,message:E},R){const{keyword:C,data:O,schemaValue:A,it:M}=x,{opts:P,propertyName:L,topSchemaRef:H,schemaPath:j}=M;R.push([m.keyword,C],[m.params,typeof S=="function"?S(x):S||(0,t._)`{}`]),P.messages&&R.push([m.message,typeof E=="function"?E(x):E]),P.verbose&&R.push([m.schema,A],[m.parentSchema,(0,t._)`${H}${j}`],[r.default.data,O]),L&&R.push([m.propertyName,L])}})(Yy)),Yy}var fI;function Fie(){if(fI)return za;fI=1,Object.defineProperty(za,"__esModule",{value:!0}),za.boolOrEmptySchema=za.topBoolOrEmptySchema=void 0;const e=rv(),t=pt(),n=pa(),r={message:"boolean schema is false"};function i(c){const{gen:d,schema:f,validateName:m}=c;f===!1?l(c,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}za.topBoolOrEmptySchema=i;function s(c,d){const{gen:f,schema:m}=c;m===!1?(f.var(d,!1),l(c)):f.var(d,!0)}za.boolOrEmptySchema=s;function l(c,d){const{gen:f,data:m}=c,p={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(p,r,void 0,d)}return za}var cr={},Fa={},hI;function u6(){if(hI)return Fa;hI=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.getRules=Fa.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(i){return typeof i=="string"&&t.has(i)}Fa.isJSONType=n;function r(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return Fa.getRules=r,Fa}var es={},pI;function d6(){if(pI)return es;pI=1,Object.defineProperty(es,"__esModule",{value:!0}),es.shouldUseRule=es.shouldUseGroup=es.schemaHasRulesForType=void 0;function e({schema:r,self:i},s){const l=i.RULES.types[s];return l&&l!==!0&&t(r,l)}es.schemaHasRulesForType=e;function t(r,i){return i.rules.some(s=>n(r,s))}es.shouldUseGroup=t;function n(r,i){var s;return r[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(l=>r[l]!==void 0))}return es.shouldUseRule=n,es}var mI;function bg(){if(mI)return cr;mI=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.reportTypeError=cr.checkDataTypes=cr.checkDataType=cr.coerceAndCheckDataType=cr.getJSONTypes=cr.getSchemaTypes=cr.DataType=void 0;const e=u6(),t=d6(),n=rv(),r=pt(),i=Nt();var s;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(s||(cr.DataType=s={}));function l(E){const R=c(E.type);if(R.includes("null")){if(E.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!R.length&&E.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');E.nullable===!0&&R.push("null")}return R}cr.getSchemaTypes=l;function c(E){const R=Array.isArray(E)?E:E?[E]:[];if(R.every(e.isJSONType))return R;throw new Error("type must be JSONType or JSONType[]: "+R.join(","))}cr.getJSONTypes=c;function d(E,R){const{gen:C,data:O,opts:A}=E,M=m(R,A.coerceTypes),P=R.length>0&&!(M.length===0&&R.length===1&&(0,t.schemaHasRulesForType)(E,R[0]));if(P){const L=y(R,O,A.strictNumbers,s.Wrong);C.if(L,()=>{M.length?p(E,R,M):x(E)})}return P}cr.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function m(E,R){return R?E.filter(C=>f.has(C)||R==="array"&&C==="array"):[]}function p(E,R,C){const{gen:O,data:A,opts:M}=E,P=O.let("dataType",(0,r._)`typeof ${A}`),L=O.let("coerced",(0,r._)`undefined`);M.coerceTypes==="array"&&O.if((0,r._)`${P} == 'object' && Array.isArray(${A}) && ${A}.length == 1`,()=>O.assign(A,(0,r._)`${A}[0]`).assign(P,(0,r._)`typeof ${A}`).if(y(R,A,M.strictNumbers),()=>O.assign(L,A))),O.if((0,r._)`${L} !== undefined`);for(const j of C)(f.has(j)||j==="array"&&M.coerceTypes==="array")&&H(j);O.else(),x(E),O.endIf(),O.if((0,r._)`${L} !== undefined`,()=>{O.assign(A,L),g(E,L)});function H(j){switch(j){case"string":O.elseIf((0,r._)`${P} == "number" || ${P} == "boolean"`).assign(L,(0,r._)`"" + ${A}`).elseIf((0,r._)`${A} === null`).assign(L,(0,r._)`""`);return;case"number":O.elseIf((0,r._)`${P} == "boolean" || ${A} === null
|
|
158
158
|
|| (${P} == "string" && ${A} && ${A} == +${A})`).assign(L,(0,r._)`+${A}`);return;case"integer":O.elseIf((0,r._)`${P} === "boolean" || ${A} === null
|
|
@@ -168,4 +168,4 @@ ${r}
|
|
|
168
168
|
${r}
|
|
169
169
|
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
170
170
|
|
|
171
|
-
`),document.head.appendChild(r)}}function Xse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:GM.publicConfig(),queryFn:Wse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=HM(r),[s]=Zse();i.internalUrl&&Use(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Qse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Jse=new bj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function eae(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(hH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(jD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(wj,{client:Jse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Xse,{children:T.jsx(Lj,{children:T.jsx(Fee,{children:T.jsx(Wne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function tae(...e){return BP(hw(e))}const nae=y3("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=tae(nae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const CM="__mesh_chunk_reload_ts";function AM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class rce extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),kD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class rae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=AM(t);if(kD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(CM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(CM,String(s)),window.location.reload())}render(){return this.state.hasError&&AM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx($D,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const iae="MCP Workflows",oae="Create workflows using your MCP tools",sae=I.lazy(()=>At(()=>import("./plugin-header-Bhl8FTKN.js"),__vite__mapDeps([0,1]))),aae=I.lazy(()=>At(()=>import("./plugin-empty-state-C3M4-bHq.js"),[])),lae={id:iae,description:oae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(sae,{...e}),renderEmptyState:()=>T.jsx(aae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(DD,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},cae=[lae],ma=t7({component:()=>T.jsx(rae,{children:T.jsx(eae,{children:T.jsx(I.Suspense,{fallback:T.jsx(jD,{}),children:T.jsx(mP,{})})})})}),uae=mt({getParentRoute:()=>ma,path:"/login",component:It(()=>At(()=>import("./login-BgZ8a57W.js"),__vite__mapDeps([2,3]))),validateSearch:ul(()=>Ee({next:z().optional(),client_id:z().optional(),redirect_uri:z().optional(),response_type:z().optional(),state:z().optional(),scope:z().optional(),code_challenge:z().optional(),code_challenge_method:z().optional()}))}),dae=mt({getParentRoute:()=>ma,path:"/reset-password",component:It(()=>At(()=>import("./reset-password-DAQu9CHm.js"),__vite__mapDeps([4,3]))),validateSearch:ul(()=>Ee({token:z().optional(),error:z().optional()}))}),fae=mt({getParentRoute:()=>ma,path:"/auth/$pathname",component:It(()=>At(()=>import("./auth-catchall-dvNJT_HW.js"),[]))}),hae=mt({getParentRoute:()=>ma,path:"/oauth/callback",component:It(()=>At(()=>import("./oauth-callback-BOHYAMsk.js"),[]))}),pae=mt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:It(()=>At(()=>import("./oauth-callback-ai-provider-D2JxS3R_.js"),[]))}),rE=mt({getParentRoute:()=>ma,id:"shell",component:It(()=>At(()=>import("./shell-layout-B405kN5F.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),mae=mt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Oc({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Oc(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),gae=mt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Oc({to:"/"})},component:It(()=>At(()=>import("./onboarding-Dls-YBag.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=mt({getParentRoute:()=>rE,path:"/$org",component:It(()=>At(()=>import("./org-layout-B0WpG86a.js"),[]))}),oE=mt({getParentRoute:()=>iE,id:"org-shell",component:It(()=>At(()=>import("./index-CLgHTXwu.js"),__vite__mapDeps([20,21,22,7,23,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,39,14,40,41,42,43,44,45,46,47,5,6,8,9,10,11,12,13,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,16,3,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104])))}),sE=mt({getParentRoute:()=>oE,id:"agent-shell",component:It(()=>At(()=>import("./index-WenLlWbb.js"),__vite__mapDeps([105,68,6,7,69,3,70,10,11,71,72,55,28,73,38,74,1,14,24,25,26,27,29,30,31,32,17,18,33,34,35,36,37,19,21,22,39,40,41,42,43,44,45,46,47,75,76,77,62,59,67,54,56,57,58,9,12,5,8,13,48,49,50,51,52,53,78,65,16,79,80,81,82,60,83,84,85,63,64,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,106,107,61,23,66,101,102,103,104,108,109,110,111,112,113,114,115,116])))}),vae=Ee({virtualmcpid:z().optional(),tab:z().optional(),main:z().optional(),id:z().optional(),toolName:z().optional(),tasks:St().optional(),mainOpen:St().optional(),chat:St().optional(),autosend:z().optional()}),O6=mt({getParentRoute:()=>sE,path:"/$taskId",validateSearch:vae,component:()=>null}),_ae=mt({getParentRoute:()=>oE,path:"/",component:It(()=>At(()=>import("./index-CHiZkXhm.js"),__vite__mapDeps([117,59,36,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,37,19,38,21,22,7,39,14,40,41,42,43,44,45,46,47,60,11,55,10,12,71,72,6,73,74,70,75,76,77,62,67,68,69,3,54,56,57,58,9,5,8,13,48,49,50,51,52,53,78,65,16,79,80,81,82,83,84,85,63,64,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,102])))}),Pn=mt({getParentRoute:()=>iE,path:"/settings",component:It(()=>At(()=>import("./settings-layout-ClllTp0r.js"),__vite__mapDeps([118,21,22,7,29,32,17,33,14,44,46,47,108,89,57,58])))}),yae=mt({getParentRoute:()=>Pn,path:"/",beforeLoad:({params:e})=>{throw Oc({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),bae=mt({getParentRoute:()=>Pn,path:"/connections",component:It(()=>At(()=>import("./connections-Ba8EED2x.js"),__vite__mapDeps([119,76,77,120,79,1,33,35,27,22,113,96,115,38,95,91,90,92,70,10,11,12,93,94,75,85,59,36,24,25,26,28,29,30,31,32,17,18,34,37,19,21,7,39,14,40,41,42,43,44,45,46,47,103,121,64,99,122,123,74,6,62,65,16,3,80,97,55,98]))),validateSearch:ul(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),wae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug",component:It(()=>At(()=>import("./connection-detail-E3ZTKIWY.js"),__vite__mapDeps([124,76,77,103,98,3,42,45,125,11,67,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,21,22,7,39,14,40,41,43,44,46,47,70,10,126,127,75,92,12,80,107,61,55,102,72,111,96,53,128,129,63,78,59,65,16,121,64,130,131,90,73,85,79]))),validateSearch:ul(()=>Ee({tab:z().optional()}))}),Sae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug/$collectionName/$itemId",component:It(()=>At(()=>import("./collection-detail-C13v-yoJ.js"),__vite__mapDeps([132,103,10,11,65,16,3,97,130,21,22,7,133,126,77,127,55,134,49,109,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,39,14,40,41,42,43,44,45,46,47,96,80,113,70,67,6,88,79,59,112,66,135,58,53,125,75,76,92,12,107,61,102,72,90,111,52,54,56,57,9,5,8,13]))),validateSearch:ul(()=>Ee({replayId:z().optional()}))}),Eae=mt({getParentRoute:()=>Pn,path:"/monitor",component:It(()=>At(()=>import("./index-CD-vU91r.js"),__vite__mapDeps([136,115,38,21,22,7,103,96,61,1,30,41,24,25,26,27,28,29,31,32,17,18,33,34,35,36,37,19,39,14,40,42,43,44,45,46,47,134,49,128,129,70,10,11,55,3,74,106,107,80,112,97,95,69,16,59,63,85,131,127,67,90,100,94,137,99,93,48,50,51,6,52,53,54,56,57,58,9,12,5,8,13,104]))),validateSearch:ul(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:z().default("now-30m"),to:z().default("now"),connectionId:Ie(z()).optional().default([]),virtualMcpId:Ie(z()).optional().default([]),tool:z().default(""),status:dn(["all","success","errors"]).default("all"),search:z().default(""),page:St().optional(),streaming:Pt().default(!0),propertyFilters:z().default(""),hideSystem:Pt().default(!1)}))}),xae=mt({getParentRoute:()=>Pn,path:"/general",component:It(()=>At(()=>import("./general-27HuvgYf.js"),__vite__mapDeps([138,21,22,7,129,63,46,3,84,85,31,139,87,11,69,101,38,55,10,61,60,24,25,26,27,28,29,30,32,17,18,1,33,34,35,36,37,19,39,14,40,41,42,43,44,45,47,59,12])))}),Rae=mt({getParentRoute:()=>Pn,path:"/features",component:It(()=>At(()=>import("./features-CE8oBb9H.js"),__vite__mapDeps([140,21,22,7,12,11,69,36,84,85,31])))}),Oae=mt({getParentRoute:()=>Pn,path:"/brand-context",component:It(()=>At(()=>import("./brand-context-FHNmQTmw.js"),__vite__mapDeps([141,11,1,33,37,39,42,45,7,47,64,3,97,21,22,87])))}),Tae=mt({getParentRoute:()=>Pn,path:"/ai-providers",component:It(()=>At(()=>import("./ai-providers-D112U5ed.js"),__vite__mapDeps([142,82,74,1,3,6,7,62,22,80,34,60,26,28,38,43,56,11,54,55,10,57,58,9,12,83,47,25,18,45,21,84,85,31,69,81,63,46,64,86,51,87])))}),Cae=mt({getParentRoute:()=>Pn,path:"/members",component:It(()=>At(()=>import("./members-BrEtD2C0.js"),__vite__mapDeps([143,120,79,1,33,35,27,22,113,96,115,38,21,7,144,137,103,6,65,16,80,34,97,129,145,128,11,64,63,46,85,44,45,74,106,107,61,42])))}),Aae=mt({getParentRoute:()=>Pn,path:"/roles",component:It(()=>At(()=>import("./roles-CV8Id8qK.js"),__vite__mapDeps([146,145,129,96,64,79,1,33,35,14,42,45,144,137,27,21,22,7,103,115,38,83,59,36,24,25,26,28,29,30,31,32,17,18,34,37,19,39,40,41,43,44,46,47,99,74,100,94,11,73,128,70,10,56,63,69,84,85]))),validateSearch:ul(()=>Ee({role:z().optional()}))}),Iae=mt({getParentRoute:()=>Pn,path:"/sso",component:It(()=>At(()=>import("./sso-Dh1NgG1u.js"),__vite__mapDeps([147,139,87,11,69,84,85,31,21,22,7,3,13,45])))}),Mae=mt({getParentRoute:()=>Pn,path:"/profile",component:It(()=>At(()=>import("./profile-DKggoElb.js"),__vite__mapDeps([148,21,22,7,63,46,69,80,1,34,81,3,40,41,89,66,84,85,31])))}),Pae=mt({getParentRoute:()=>Pn,path:"/store",component:It(()=>At(()=>import("./store-2uy2qIUV.js"),__vite__mapDeps([149,25,33,42,45,3,69,60,63,46,61,70,10,11,21,22,7,92,12,84,85,31])))}),Nae=mt({getParentRoute:()=>Pn,path:"/registry",component:It(()=>At(()=>import("./registry-BOvZQpcE.js"),[]))}),kae=mt({getParentRoute:()=>Pn,path:"/store/registry",component:It(()=>At(()=>import("./store-registry-LkT6leWD.js"),[]))}),Dae=mt({getParentRoute:()=>Pn,path:"/workflows",component:It(()=>At(()=>import("./workflow-DZzf5GRI.js"),__vite__mapDeps([150,11,76,77,120,79,1,33,35,27,22,113,96,73,38,85,59,36,24,25,26,28,29,30,31,32,17,18,34,37,19,21,7,39,14,40,41,42,43,44,45,46,47,144,137,135,110,63,103,122,123,90,64,10,70,130])))}),Lae=mt({getParentRoute:()=>Pn,path:"/workflows/$itemId",component:It(()=>At(()=>import("./workflow-detail-OXlDN5sZ.js"),__vite__mapDeps([151,133,126,11,77,127,55,10,134,49,109,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,21,22,7,39,14,40,41,42,43,44,45,46,47,96,80,113,130,70,67,6,88,79,59,112,66,135,58,3])))}),$ae=mt({getParentRoute:()=>sE,path:"/plugins/$pluginId",component:It(()=>At(()=>import("./org-plugin-layout-fSkxW1jN.js"),__vite__mapDeps([152,153,70,10,11,43,21,22,7])))}),jae=mt({getParentRoute:()=>Pn,path:"/agents",component:It(()=>At(()=>import("./agents-list-W7eiHZAH.js"),__vite__mapDeps([154,79,1,33,35,17,71,11,72,55,10,6,7,28,73,38,74,70,14,24,25,26,27,29,30,31,32,18,34,36,37,19,21,22,39,40,41,42,43,44,45,46,47,75,76,77,62,59,67,85,86,51,103,102,64,115])))}),Uae=mt({getParentRoute:()=>Pn,path:"/automations",component:It(()=>At(()=>import("./automations-DThDEBhK.js"),__vite__mapDeps([155,42,47,115,38,21,22,7,103,114,64,79,1,33,35,24,25,26,27,28,29,30,31,32,17,18,34,36,37,19,39,14,40,41,43,44,45,46,55,10,11,72])))}),T6=mt({getParentRoute:()=>O6,path:"/$pluginId",component:It(()=>At(()=>import("./dynamic-plugin-layout-Bs-dtzIc.js"),__vite__mapDeps([156,153,70,10,11,43,21,22,7])))}),zae=[],Fae=[],Bae=[],C6=[];cae.forEach(e=>{if(!e.setup)return;const t={parentRoute:T6,routing:{createRoute:mt,lazyRouteComponent:It},registerRootSidebarItem:n=>zae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Fae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Bae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{C6.push(...n)}};e.setup(t)});const Vae=T6.addChildren(C6),qae=Pn.addChildren([yae,bae,wae,Sae,jae,Uae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Iae,Mae,Pae,kae,Nae,Dae,Lae]),Hae=O6.addChildren([Vae]),Gae=sE.addChildren([Hae,$ae]),Kae=oE.addChildren([_ae,Gae]),Zae=iE.addChildren([Kae,qae]),Yae=rE.addChildren([mae,Zae]),Wae=ma.addChildren([Yae,gae,uae,dae,fae,hae,pae]),Qae=u7({routeTree:Wae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Xae=document.getElementById("root");Q$.createRoot(Xae).render(T.jsx(I.StrictMode,{children:T.jsx(h7,{router:Qae})}));export{KM as $,Ile as A,Y1 as B,To as C,tG as D,rce as E,Jle as F,tce as G,Ee as H,St as I,z as J,GM as K,dw as L,$D as M,lle as N,mP as O,Zse as P,Hse as Q,Rg as R,jD as S,LJ as T,Yr as U,Xle as V,zae as W,Fae as X,iae as Y,DD as Z,At as _,kj as a,Ye as a$,ole as a0,xo as a1,eee as a2,ht as a3,no as a4,cW as a5,uW as a6,yn as a7,lt as a8,dW as a9,t4 as aA,sY as aB,cY as aC,aY as aD,ZZ as aE,Rle as aF,Bae as aG,ele as aH,Ut as aI,Xt as aJ,Ie as aK,JH as aL,Qle as aM,Wle as aN,qS as aO,vg as aP,DY as aQ,x4 as aR,X3 as aS,lf as aT,ta as aU,kY as aV,ds as aW,y3 as aX,$w as aY,Wr as aZ,Pt as a_,fW as aa,mW as ab,bW as ac,I4 as ad,fl as ae,hW as af,pW as ag,gW as ah,vW as ai,_W as aj,yW as ak,wW as al,EW as am,xW as an,Ig as ao,dn as ap,fC as aq,W1 as ar,iY as as,ro as at,Kd as au,Yw as av,jc as aw,aa as ax,fs as ay,io as az,Mg as b,nZ as b$,RV as b0,BP as b1,hw as b2,Rk as b3,Tk as b4,YW as b5,Wn as b6,wQ as b7,d4 as b8,Q3 as b9,wre as bA,xre as bB,Dre as bC,Zre as bD,Qre as bE,bre as bF,Sre as bG,Rre as bH,Ore as bI,Lre as bJ,qre as bK,Vle as bL,cae as bM,pV as bN,cle as bO,ple as bP,gq as bQ,ul as bR,VN as bS,GN as bT,dle as bU,nce as bV,rG as bW,nG as bX,u3 as bY,pf as bZ,eZ as b_,nae as ba,la as bb,ne as bc,Jae as bd,iZ as be,Dle as bf,uP as bg,ca as bh,as as bi,kle as bj,Lle as bk,rn as bl,ule as bm,qN as bn,zre as bo,Fre as bp,BS as bq,l6 as br,VS as bs,nv as bt,GD as bu,tie as bv,ZD as bw,Wre as bx,cie as by,yre as bz,tae as c,n6 as c$,rZ as c0,af as c1,qM as c2,Aj as c3,S4 as c4,wY as c5,zw as c6,h4 as c7,k3 as c8,Fw as c9,Yle as cA,eoe as cB,pt as cC,Hoe as cD,to as cE,XW as cF,fP as cG,Cle as cH,oZ as cI,sZ as cJ,tZ as cK,aZ as cL,Bz as cM,HD as cN,YD as cO,XD as cP,e6 as cQ,t6 as cR,r6 as cS,Fle as cT,Ble as cU,Ule as cV,zle as cW,Jne as cX,jle as cY,WD as cZ,JD as c_,Gd as ca,R3 as cb,Uw as cc,jw as cd,SY as ce,EY as cf,oQ as cg,sQ as ch,iQ as ci,Or as cj,ale as ck,QH as cl,YH as cm,HH as cn,n3 as co,HV as cp,ww as cq,EV as cr,fle as cs,ZV as ct,Ew as cu,Sw as cv,XV as cw,hle as cx,Zle as cy,_se as cz,uw as d,Hle as d0,QD as d1,Kle as d2,NS as d3,fre as d4,$le as d5,qD as d6,Die as d7,Vre as d8,Gle as d9,Tie as da,Iie as db,die as dc,uie as dd,qle as de,mle as df,BW as dg,VW as dh,GW as di,qW as dj,HW as dk,_le as dl,yle as dm,Ele as dn,xle as dp,Ole as dq,Sle as dr,wle as ds,ble as dt,vle as du,gle as dv,UM as dw,yO as dx,nle as dy,tle as dz,Ro as e,rf as f,cw as g,Mle as h,Ale as i,T as j,Ple as k,LD as l,ece as m,Nj as n,tw as o,PM as p,Zn as q,I as r,Xne as s,Nle as t,sle as u,ile as v,HM as w,RT as x,PS as y,Oo as z};
|
|
171
|
+
`),document.head.appendChild(r)}}function Xse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:GM.publicConfig(),queryFn:Wse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=HM(r),[s]=Zse();i.internalUrl&&Use(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Qse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Jse=new bj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function eae(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(hH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(jD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(wj,{client:Jse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Xse,{children:T.jsx(Lj,{children:T.jsx(Fee,{children:T.jsx(Wne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function tae(...e){return BP(hw(e))}const nae=y4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=tae(nae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const CM="__mesh_chunk_reload_ts";function AM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class rce extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),kD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class rae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=AM(t);if(kD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(CM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(CM,String(s)),window.location.reload())}render(){return this.state.hasError&&AM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx($D,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const iae="MCP Workflows",oae="Create workflows using your MCP tools",sae=I.lazy(()=>At(()=>import("./plugin-header-DnTysGuR.js"),__vite__mapDeps([0,1]))),aae=I.lazy(()=>At(()=>import("./plugin-empty-state-DAJtqa_X.js"),[])),lae={id:iae,description:oae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(sae,{...e}),renderEmptyState:()=>T.jsx(aae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(DD,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},cae=[lae],ma=t7({component:()=>T.jsx(rae,{children:T.jsx(eae,{children:T.jsx(I.Suspense,{fallback:T.jsx(jD,{}),children:T.jsx(mP,{})})})})}),uae=mt({getParentRoute:()=>ma,path:"/login",component:It(()=>At(()=>import("./login-CWW3hrOg.js"),__vite__mapDeps([2,3]))),validateSearch:ul(()=>Ee({next:z().optional(),client_id:z().optional(),redirect_uri:z().optional(),response_type:z().optional(),state:z().optional(),scope:z().optional(),code_challenge:z().optional(),code_challenge_method:z().optional()}))}),dae=mt({getParentRoute:()=>ma,path:"/reset-password",component:It(()=>At(()=>import("./reset-password-4dmtvYgx.js"),__vite__mapDeps([4,3]))),validateSearch:ul(()=>Ee({token:z().optional(),error:z().optional()}))}),fae=mt({getParentRoute:()=>ma,path:"/auth/$pathname",component:It(()=>At(()=>import("./auth-catchall-CAJD1PoQ.js"),[]))}),hae=mt({getParentRoute:()=>ma,path:"/oauth/callback",component:It(()=>At(()=>import("./oauth-callback-nz50ugwL.js"),[]))}),pae=mt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:It(()=>At(()=>import("./oauth-callback-ai-provider-ONRq40Il.js"),[]))}),rE=mt({getParentRoute:()=>ma,id:"shell",component:It(()=>At(()=>import("./shell-layout-BK74oWLU.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),mae=mt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Oc({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Oc(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),gae=mt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Oc({to:"/"})},component:It(()=>At(()=>import("./onboarding-CbZyKtbC.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=mt({getParentRoute:()=>rE,path:"/$org",component:It(()=>At(()=>import("./org-layout-DkS2FRIV.js"),[]))}),oE=mt({getParentRoute:()=>iE,id:"org-shell",component:It(()=>At(()=>import("./index-CKNbLfs9.js"),__vite__mapDeps([20,21,22,7,23,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,39,14,40,41,42,43,44,45,46,47,5,6,8,9,10,11,12,13,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,16,3,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104])))}),sE=mt({getParentRoute:()=>oE,id:"agent-shell",component:It(()=>At(()=>import("./index-DBY00Q2Z.js"),__vite__mapDeps([105,68,6,7,69,3,70,10,11,71,72,55,28,73,38,74,1,14,24,25,26,27,29,30,31,32,17,18,33,34,35,36,37,19,21,22,39,40,41,42,43,44,45,46,47,75,76,77,62,59,67,54,56,57,58,9,12,5,8,13,48,49,50,51,52,53,78,65,16,79,80,81,82,60,83,84,85,63,64,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,106,107,61,23,66,101,102,103,104,108,109,110,111,112,113,114,115,116])))}),vae=Ee({virtualmcpid:z().optional(),tab:z().optional(),main:z().optional(),id:z().optional(),toolName:z().optional(),tasks:St().optional(),mainOpen:St().optional(),chat:St().optional(),autosend:z().optional()}),O6=mt({getParentRoute:()=>sE,path:"/$taskId",validateSearch:vae,component:()=>null}),_ae=mt({getParentRoute:()=>oE,path:"/",component:It(()=>At(()=>import("./index-Day-HjXR.js"),__vite__mapDeps([117,59,36,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,37,19,38,21,22,7,39,14,40,41,42,43,44,45,46,47,60,11,55,10,12,71,72,6,73,74,70,75,76,77,62,67,68,69,3,54,56,57,58,9,5,8,13,48,49,50,51,52,53,78,65,16,79,80,81,82,83,84,85,63,64,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,102])))}),Pn=mt({getParentRoute:()=>iE,path:"/settings",component:It(()=>At(()=>import("./settings-layout-D2TzHadG.js"),__vite__mapDeps([118,21,22,7,29,32,17,33,14,44,46,47,108,89,57,58])))}),yae=mt({getParentRoute:()=>Pn,path:"/",beforeLoad:({params:e})=>{throw Oc({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),bae=mt({getParentRoute:()=>Pn,path:"/connections",component:It(()=>At(()=>import("./connections-BJwQ4V76.js"),__vite__mapDeps([119,76,77,120,79,1,33,35,27,22,113,96,115,38,95,91,90,92,70,10,11,12,93,94,75,85,59,36,24,25,26,28,29,30,31,32,17,18,34,37,19,21,7,39,14,40,41,42,43,44,45,46,47,103,121,64,99,122,123,74,6,62,65,16,3,80,97,55,98]))),validateSearch:ul(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),wae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug",component:It(()=>At(()=>import("./connection-detail-BUr0xwe0.js"),__vite__mapDeps([124,76,77,103,98,3,42,45,125,11,67,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,21,22,7,39,14,40,41,43,44,46,47,70,10,126,127,75,92,12,80,107,61,55,102,72,111,96,53,128,129,63,78,59,65,16,121,64,130,131,90,73,85,79]))),validateSearch:ul(()=>Ee({tab:z().optional()}))}),Sae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug/$collectionName/$itemId",component:It(()=>At(()=>import("./collection-detail-D8wvqyeL.js"),__vite__mapDeps([132,103,10,11,65,16,3,97,130,21,22,7,133,126,77,127,55,134,49,109,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,39,14,40,41,42,43,44,45,46,47,96,80,113,70,67,6,88,79,59,112,66,135,58,53,125,75,76,92,12,107,61,102,72,90,111,52,54,56,57,9,5,8,13]))),validateSearch:ul(()=>Ee({replayId:z().optional()}))}),Eae=mt({getParentRoute:()=>Pn,path:"/monitor",component:It(()=>At(()=>import("./index-XlHohbXo.js"),__vite__mapDeps([136,115,38,21,22,7,103,96,61,1,30,41,24,25,26,27,28,29,31,32,17,18,33,34,35,36,37,19,39,14,40,42,43,44,45,46,47,134,49,128,129,70,10,11,55,3,74,106,107,80,112,97,95,69,16,59,63,85,131,127,67,90,100,94,137,99,93,48,50,51,6,52,53,54,56,57,58,9,12,5,8,13,104]))),validateSearch:ul(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:z().default("now-30m"),to:z().default("now"),connectionId:Ie(z()).optional().default([]),virtualMcpId:Ie(z()).optional().default([]),tool:z().default(""),status:dn(["all","success","errors"]).default("all"),search:z().default(""),page:St().optional(),streaming:Pt().default(!0),propertyFilters:z().default(""),hideSystem:Pt().default(!1)}))}),xae=mt({getParentRoute:()=>Pn,path:"/general",component:It(()=>At(()=>import("./general-C7YvzevF.js"),__vite__mapDeps([138,21,22,7,129,63,46,3,84,85,31,139,87,11,69,101,38,55,10,61,60,24,25,26,27,28,29,30,32,17,18,1,33,34,35,36,37,19,39,14,40,41,42,43,44,45,47,59,12])))}),Rae=mt({getParentRoute:()=>Pn,path:"/features",component:It(()=>At(()=>import("./features-MuQDQTKd.js"),__vite__mapDeps([140,21,22,7,12,11,69,36,84,85,31])))}),Oae=mt({getParentRoute:()=>Pn,path:"/brand-context",component:It(()=>At(()=>import("./brand-context-D5_IL-aX.js"),__vite__mapDeps([141,11,1,33,37,39,42,45,7,47,64,3,97,21,22,87])))}),Tae=mt({getParentRoute:()=>Pn,path:"/ai-providers",component:It(()=>At(()=>import("./ai-providers-CAEYBEbx.js"),__vite__mapDeps([142,82,74,1,3,6,7,62,22,80,34,60,26,28,38,43,56,11,54,55,10,57,58,9,12,83,47,25,18,45,21,84,85,31,69,81,63,46,64,86,51,87])))}),Cae=mt({getParentRoute:()=>Pn,path:"/members",component:It(()=>At(()=>import("./members-DKWnDmHd.js"),__vite__mapDeps([143,120,79,1,33,35,27,22,113,96,115,38,21,7,144,137,103,6,65,16,80,34,97,129,145,128,11,64,63,46,85,44,45,74,106,107,61,42])))}),Aae=mt({getParentRoute:()=>Pn,path:"/roles",component:It(()=>At(()=>import("./roles-DlsIbipv.js"),__vite__mapDeps([146,145,129,96,64,79,1,33,35,14,42,45,144,137,27,21,22,7,103,115,38,83,59,36,24,25,26,28,29,30,31,32,17,18,34,37,19,39,40,41,43,44,46,47,99,74,100,94,11,73,128,70,10,56,63,69,84,85]))),validateSearch:ul(()=>Ee({role:z().optional()}))}),Iae=mt({getParentRoute:()=>Pn,path:"/sso",component:It(()=>At(()=>import("./sso-ByZblLmU.js"),__vite__mapDeps([147,139,87,11,69,84,85,31,21,22,7,3,13,45])))}),Mae=mt({getParentRoute:()=>Pn,path:"/profile",component:It(()=>At(()=>import("./profile-Wj3GJkbr.js"),__vite__mapDeps([148,21,22,7,63,46,69,80,1,34,81,3,40,41,89,66,84,85,31])))}),Pae=mt({getParentRoute:()=>Pn,path:"/store",component:It(()=>At(()=>import("./store-D02KrT4m.js"),__vite__mapDeps([149,25,33,42,45,3,69,60,63,46,61,70,10,11,21,22,7,92,12,84,85,31])))}),Nae=mt({getParentRoute:()=>Pn,path:"/registry",component:It(()=>At(()=>import("./registry-D49ZAHvu.js"),[]))}),kae=mt({getParentRoute:()=>Pn,path:"/store/registry",component:It(()=>At(()=>import("./store-registry-C02mfQOQ.js"),[]))}),Dae=mt({getParentRoute:()=>Pn,path:"/workflows",component:It(()=>At(()=>import("./workflow-DZKRFLJh.js"),__vite__mapDeps([150,11,76,77,120,79,1,33,35,27,22,113,96,73,38,85,59,36,24,25,26,28,29,30,31,32,17,18,34,37,19,21,7,39,14,40,41,42,43,44,45,46,47,144,137,135,110,63,103,122,123,90,64,10,70,130])))}),Lae=mt({getParentRoute:()=>Pn,path:"/workflows/$itemId",component:It(()=>At(()=>import("./workflow-detail-Bm0PdrL9.js"),__vite__mapDeps([151,133,126,11,77,127,55,10,134,49,109,24,25,26,27,28,29,30,31,32,17,18,1,33,34,35,36,37,19,38,21,22,7,39,14,40,41,42,43,44,45,46,47,96,80,113,130,70,67,6,88,79,59,112,66,135,58,3])))}),$ae=mt({getParentRoute:()=>sE,path:"/plugins/$pluginId",component:It(()=>At(()=>import("./org-plugin-layout-DnoycXXu.js"),__vite__mapDeps([152,153,70,10,11,43,21,22,7])))}),jae=mt({getParentRoute:()=>Pn,path:"/agents",component:It(()=>At(()=>import("./agents-list-BoAFCp78.js"),__vite__mapDeps([154,79,1,33,35,17,71,11,72,55,10,6,7,28,73,38,74,70,14,24,25,26,27,29,30,31,32,18,34,36,37,19,21,22,39,40,41,42,43,44,45,46,47,75,76,77,62,59,67,85,86,51,103,102,64,115])))}),Uae=mt({getParentRoute:()=>Pn,path:"/automations",component:It(()=>At(()=>import("./automations-0IJqtFMr.js"),__vite__mapDeps([155,42,47,115,38,21,22,7,103,114,64,79,1,33,35,24,25,26,27,28,29,30,31,32,17,18,34,36,37,19,39,14,40,41,43,44,45,46,55,10,11,72])))}),T6=mt({getParentRoute:()=>O6,path:"/$pluginId",component:It(()=>At(()=>import("./dynamic-plugin-layout-uzPcJgAD.js"),__vite__mapDeps([156,153,70,10,11,43,21,22,7])))}),zae=[],Fae=[],Bae=[],C6=[];cae.forEach(e=>{if(!e.setup)return;const t={parentRoute:T6,routing:{createRoute:mt,lazyRouteComponent:It},registerRootSidebarItem:n=>zae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Fae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Bae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{C6.push(...n)}};e.setup(t)});const Vae=T6.addChildren(C6),qae=Pn.addChildren([yae,bae,wae,Sae,jae,Uae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Iae,Mae,Pae,kae,Nae,Dae,Lae]),Hae=O6.addChildren([Vae]),Gae=sE.addChildren([Hae,$ae]),Kae=oE.addChildren([_ae,Gae]),Zae=iE.addChildren([Kae,qae]),Yae=rE.addChildren([mae,Zae]),Wae=ma.addChildren([Yae,gae,uae,dae,fae,hae,pae]),Qae=u7({routeTree:Wae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Xae=document.getElementById("root");Q$.createRoot(Xae).render(T.jsx(I.StrictMode,{children:T.jsx(h7,{router:Qae})}));export{KM as $,Ile as A,Y1 as B,To as C,tG as D,rce as E,Jle as F,tce as G,Ee as H,St as I,z as J,GM as K,dw as L,$D as M,lle as N,mP as O,Zse as P,Hse as Q,Rg as R,jD as S,LJ as T,Yr as U,Xle as V,zae as W,Fae as X,iae as Y,DD as Z,At as _,kj as a,Ye as a$,ole as a0,xo as a1,eee as a2,ht as a3,no as a4,cW as a5,uW as a6,yn as a7,lt as a8,dW as a9,t3 as aA,sY as aB,cY as aC,aY as aD,ZZ as aE,Rle as aF,Bae as aG,ele as aH,Ut as aI,Xt as aJ,Ie as aK,JH as aL,Qle as aM,Wle as aN,qS as aO,vg as aP,DY as aQ,x3 as aR,X4 as aS,lf as aT,ta as aU,kY as aV,ds as aW,y4 as aX,$w as aY,Wr as aZ,Pt as a_,fW as aa,mW as ab,bW as ac,I3 as ad,fl as ae,hW as af,pW as ag,gW as ah,vW as ai,_W as aj,yW as ak,wW as al,EW as am,xW as an,Ig as ao,dn as ap,fC as aq,W1 as ar,iY as as,ro as at,Kd as au,Yw as av,jc as aw,aa as ax,fs as ay,io as az,Mg as b,nZ as b$,RV as b0,BP as b1,hw as b2,Rk as b3,Tk as b4,YW as b5,Wn as b6,wQ as b7,d3 as b8,Q4 as b9,wre as bA,xre as bB,Dre as bC,Zre as bD,Qre as bE,bre as bF,Sre as bG,Rre as bH,Ore as bI,Lre as bJ,qre as bK,Vle as bL,cae as bM,pV as bN,cle as bO,ple as bP,gq as bQ,ul as bR,VN as bS,GN as bT,dle as bU,nce as bV,rG as bW,nG as bX,u4 as bY,pf as bZ,eZ as b_,nae as ba,la as bb,ne as bc,Jae as bd,iZ as be,Dle as bf,uP as bg,ca as bh,as as bi,kle as bj,Lle as bk,rn as bl,ule as bm,qN as bn,zre as bo,Fre as bp,BS as bq,l6 as br,VS as bs,nv as bt,GD as bu,tie as bv,ZD as bw,Wre as bx,cie as by,yre as bz,tae as c,n6 as c$,rZ as c0,af as c1,qM as c2,Aj as c3,S3 as c4,wY as c5,zw as c6,h3 as c7,k4 as c8,Fw as c9,Yle as cA,eoe as cB,pt as cC,Hoe as cD,to as cE,XW as cF,fP as cG,Cle as cH,oZ as cI,sZ as cJ,tZ as cK,aZ as cL,Bz as cM,HD as cN,YD as cO,XD as cP,e6 as cQ,t6 as cR,r6 as cS,Fle as cT,Ble as cU,Ule as cV,zle as cW,Jne as cX,jle as cY,WD as cZ,JD as c_,Gd as ca,R4 as cb,Uw as cc,jw as cd,SY as ce,EY as cf,oQ as cg,sQ as ch,iQ as ci,Or as cj,ale as ck,QH as cl,YH as cm,HH as cn,n4 as co,HV as cp,ww as cq,EV as cr,fle as cs,ZV as ct,Ew as cu,Sw as cv,XV as cw,hle as cx,Zle as cy,_se as cz,uw as d,Hle as d0,QD as d1,Kle as d2,NS as d3,fre as d4,$le as d5,qD as d6,Die as d7,Vre as d8,Gle as d9,Tie as da,Iie as db,die as dc,uie as dd,qle as de,mle as df,BW as dg,VW as dh,GW as di,qW as dj,HW as dk,_le as dl,yle as dm,Ele as dn,xle as dp,Ole as dq,Sle as dr,wle as ds,ble as dt,vle as du,gle as dv,UM as dw,yO as dx,nle as dy,tle as dz,Ro as e,rf as f,cw as g,Mle as h,Ale as i,T as j,Ple as k,LD as l,ece as m,Nj as n,tw as o,PM as p,Zn as q,I as r,Xne as s,Nle as t,sle as u,ile as v,HM as w,RT as x,PS as y,Oo as z};
|