ghost 6.52.0 → 6.52.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/components/tryghost-kg-card-factory-5.2.3.tgz +0 -0
- package/components/tryghost-kg-clean-basic-html-4.3.3.tgz +0 -0
- package/components/tryghost-kg-converters-1.2.3.tgz +0 -0
- package/components/tryghost-kg-default-cards-10.3.3.tgz +0 -0
- package/components/tryghost-kg-default-nodes-2.1.3.tgz +0 -0
- package/components/tryghost-kg-default-transforms-1.3.3.tgz +0 -0
- package/components/tryghost-kg-html-to-lexical-1.3.3.tgz +0 -0
- package/components/tryghost-kg-lexical-html-renderer-1.4.3.tgz +0 -0
- package/components/tryghost-kg-markdown-html-renderer-7.2.3.tgz +0 -0
- package/components/tryghost-kg-utils-1.1.3.tgz +0 -0
- package/core/built/admin/assets/Growth-CczbRexv.js +3 -0
- package/core/built/admin/assets/Newsletters-rFycX4x8.js +1 -0
- package/core/built/admin/assets/Overview-DFubBJaR.js +1 -0
- package/core/built/admin/assets/Web-BDE2lN4_.js +2 -0
- package/core/built/admin/assets/{account-migration-DiS76mRS.js → account-migration-gvH5a8ea.js} +1 -1
- package/core/built/admin/assets/audience-CMWMCxFS.js +1 -0
- package/core/built/admin/assets/{automated-emails-Cel18g7S.js → automated-emails-293Lcj5S.js} +1 -1
- package/core/built/admin/assets/automations-BxnjfCKn.js +1 -0
- package/core/built/admin/assets/automations-kPr44AmD.js +1 -0
- package/core/built/admin/assets/bluesky-sharing-Cww54F3Y.js +1 -0
- package/core/built/admin/assets/{chunk.912.9d6df5a6da679d905bbf.js → chunk.251.dd82df30188bb633b4ae.js} +9 -9
- package/core/built/admin/assets/{chunk.730.2457b7fede040aa52c88.js → chunk.341.20e7d2936dfa5877deea.js} +3 -3
- package/core/built/admin/assets/{chunk.524.d6d399b571454ea0234d.js → chunk.524.697bf0ded48e7c994fc3.js} +5 -5
- package/core/built/admin/assets/{chunk.582.50a9a5cbab6996daf0fe.js → chunk.582.6b742e9ba932688c442c.js} +6 -6
- package/core/built/admin/assets/{code-editor-view-BLGzcLub.js → code-editor-view-DSY5RHLf.js} +1 -1
- package/core/built/admin/assets/comments-BwNUmaNM.js +1 -0
- package/core/built/admin/assets/constants-c-JNF9c2.js +1 -0
- package/core/built/admin/assets/container-CD33Rm0u.js +1 -0
- package/core/built/admin/assets/content-helpers-CNBPrwsi.js +1 -0
- package/core/built/admin/assets/date-range-select-BkkNN98H.js +1 -0
- package/core/built/admin/assets/disabled-sources-indicator-ChHTF69d.js +1 -0
- package/core/built/admin/assets/{domain-2REz20SO.js → domain-CGk9SMa-.js} +1 -1
- package/core/built/admin/assets/dropzone-9zocztX0.js +5 -0
- package/core/built/admin/assets/{edit-profile-7QEh0VtN.js → edit-profile-C0B2Kbsl.js} +1 -1
- package/core/built/admin/assets/editor-Bz2Sm2O8.js +8 -0
- package/core/built/admin/assets/{esm-CEtFqV1y.js → esm-CsHLKmLh.js} +1 -1
- package/core/built/admin/assets/explore-CpRAMnx7.js +1 -0
- package/core/built/admin/assets/feed-BRoOWghO.js +1 -0
- package/core/built/admin/assets/filter-sources-DhxqZID1.js +1 -0
- package/core/built/admin/assets/{filters-DUy8rzI5.js → filters-B8nLLYGO.js} +1 -1
- package/core/built/admin/assets/{gh-chart-DdBGmBS8.js → gh-chart-Cqy9gGq7.js} +1 -1
- package/core/built/admin/assets/{gift-link-modal-CSgyxenA.js → gift-link-modal-v55u0VUL.js} +1 -1
- package/core/built/admin/assets/growth-BIfM3w1p.js +1 -0
- package/core/built/admin/assets/{inbox-CTD-ix6u.js → inbox-CDX57fXK.js} +11 -11
- package/core/built/admin/assets/index-B5yxmQNp.js +69 -0
- package/core/built/admin/assets/inline-DdrWe7D3.js +1 -0
- package/core/built/admin/assets/{input-group-DkR63-nk.js → input-group-DUPGQck1.js} +1 -1
- package/core/built/admin/assets/{koenig-lexical-D09TwwLs.js → koenig-lexical-CUVpp-dC.js} +1 -1
- package/core/built/admin/assets/{kpi-card-Fr_HJH78.js → kpi-card-DyDbok3h.js} +1 -1
- package/core/built/admin/assets/kpi-helpers-Bx9IHIMq.js +1 -0
- package/core/built/admin/assets/{kpi-tabs-Dc4Nt4a5.js → kpi-tabs-DmUcThFc.js} +1 -1
- package/core/built/admin/assets/labels-DLL8dl-7.js +1 -0
- package/core/built/admin/assets/layout-B7K3SmL0.js +1 -0
- package/core/built/admin/assets/{links-CfAB2Yeq.js → link-helpers-DHG_8GIT.js} +1 -1
- package/core/built/admin/assets/list-page-COAUFrmV.js +1 -0
- package/core/built/admin/assets/members-BxWs_mjq.js +10 -0
- package/core/built/admin/assets/{modals-Bu-1Uxdc.js → modals-DF2sECo6.js} +4 -4
- package/core/built/admin/assets/moderation-DYKTx5x0.js +1 -0
- package/core/built/admin/assets/newsletter-C-ZD1dI8.js +1 -0
- package/core/built/admin/assets/note-oaRdU_5z.js +1 -0
- package/core/built/admin/assets/notifications-BF4fAiP1.js +1 -0
- package/core/built/admin/assets/{nql-lang-CvCSOQG3.js → nql-lang-BoHzkNg5.js} +1 -1
- package/core/built/admin/assets/{onboarding-route-BDaa9hd3.js → onboarding-route-SS-e9Aeb.js} +1 -1
- package/core/built/admin/assets/overview-Cbn6bIoR.js +1 -0
- package/core/built/admin/assets/post-analytics-Bk9-KEgB.js +1 -0
- package/core/built/admin/assets/post-analytics-context-C8t_048I.js +1 -0
- package/core/built/admin/assets/post-analytics-header-xTjcg4H0.js +1 -0
- package/core/built/admin/assets/post-analytics-provider-CqnWwLMk.js +1 -0
- package/core/built/admin/assets/{post-share-modal-59Ujf4t1.js → post-share-modal-ZUCX7JZo.js} +1 -1
- package/core/built/admin/assets/preferences-BgjgxiBB.js +5 -0
- package/core/built/admin/assets/profile-qIwaxKTm.js +1 -0
- package/core/built/admin/assets/{router-provider-DcttGCQn.js → router-provider-S8Wf6jdu.js} +1 -1
- package/core/built/admin/assets/select-Cp27ScMR.js +1 -0
- package/core/built/admin/assets/{settings-dLraw6et.js → settings-CdDfyF90.js} +1 -1
- package/core/built/admin/assets/{settings-CIslWMfh.js → settings-CynBh-YN.js} +4 -4
- package/core/built/admin/assets/{share-modal-CI3E67kW.js → share-modal-DTIFYNI1.js} +1 -1
- package/core/built/admin/assets/social-urls-DVvRfwEp.js +16 -0
- package/core/built/admin/assets/{sort-button-BYwI0xdN.js → sort-button-BHh5Ba1K.js} +1 -1
- package/core/built/admin/assets/source-icon--egCE7iN.js +1 -0
- package/core/built/admin/assets/stats-DkqCtrPh.js +1 -0
- package/core/built/admin/assets/stats-view-BvWWxegf.js +1 -0
- package/core/built/admin/assets/step-1-DWjw7rIn.js +1 -0
- package/core/built/admin/assets/{step-2-CVOvLQ2n.js → step-2-D1LrETIB.js} +1 -1
- package/core/built/admin/assets/{step-3-BsVXcpWU.js → step-3-BAdJdZw4.js} +2 -2
- package/core/built/admin/assets/{tabs-Bw8aEqsd.js → tabs-DSrHPjWP.js} +1 -1
- package/core/built/admin/assets/tags-BWZqBj19.js +1 -0
- package/core/built/admin/assets/{textarea-CNaqhk5P.js → textarea-CUVQjsrM.js} +1 -1
- package/core/built/admin/assets/{toggle-group-CMp1taHd.js → toggle-group-CrFpl-Xz.js} +1 -1
- package/core/built/admin/assets/{topic-filter-D2_9eEw4.js → topic-filter-jAxwwd9I.js} +1 -1
- package/core/built/admin/assets/types-uYQ1HgqL.js +1 -0
- package/core/built/admin/assets/url-helpers-CCyfRrKj.js +1 -0
- package/core/built/admin/assets/use-analytics-data-DXG7mpgK.js +1 -0
- package/core/built/admin/assets/use-filter-params-EoQBXfP3.js +1 -0
- package/core/built/admin/assets/use-growth-stats-DJoXxVfD.js +1 -0
- package/core/built/admin/assets/use-post-referrers-B-onYbuS.js +1 -0
- package/core/built/admin/assets/use-reply-chain-data-D8IFALoz.js +1 -0
- package/core/built/admin/assets/{use-tinybird-query-CNCaUn39.js → use-tinybird-query-BSL3iVCc.js} +1 -1
- package/core/built/admin/assets/{use-tinybird-token-1T80Odca.js → use-tinybird-token-DHgOnrNu.js} +1 -1
- package/core/built/admin/assets/virtual-list-AQrbRAXP.js +1 -0
- package/core/built/admin/assets/web-zEFi98DS.js +1 -0
- package/core/built/admin/index.html +6 -6
- package/core/server/services/automations/automations-api.js +20 -0
- package/core/server/services/automations/automations-api.ts +31 -0
- package/core/server/services/automations/poll.js +7 -7
- package/core/server/services/automations/poll.ts +12 -9
- package/core/server/services/email-analytics/email-analytics-provider-mailgun.js +2 -2
- package/core/server/services/email-analytics/email-analytics-service-wrapper.js +1 -4
- package/core/server/services/email-analytics/email-analytics-service.js +5 -7
- package/core/server/services/webhooks/serialize.js +6 -5
- package/package.json +1 -1
- package/pnpm-lock.yaml +14 -14
- package/pnpm-workspace.yaml +5 -0
- package/core/built/admin/assets/Growth-Dx0vv-BS.js +0 -3
- package/core/built/admin/assets/Newsletters-v1GnbUjW.js +0 -1
- package/core/built/admin/assets/Overview-BgM7o-Z8.js +0 -1
- package/core/built/admin/assets/Web-DRv-83Ow.js +0 -2
- package/core/built/admin/assets/automations-DFLgH14-.js +0 -1
- package/core/built/admin/assets/automations-Dc4DUKBb.js +0 -1
- package/core/built/admin/assets/bluesky-sharing-Dk1RTUaz.js +0 -1
- package/core/built/admin/assets/comments-DgH1rC7w.js +0 -1
- package/core/built/admin/assets/constants-BlvYJTqz.js +0 -1
- package/core/built/admin/assets/content-helpers-BEgGpvyE.js +0 -1
- package/core/built/admin/assets/editor-u3BPqQed.js +0 -8
- package/core/built/admin/assets/en-DA2zVD_n.js +0 -1
- package/core/built/admin/assets/explore-BgHmdFVz.js +0 -1
- package/core/built/admin/assets/feed-Cs7-F3I5.js +0 -1
- package/core/built/admin/assets/filter-query-core-D6GjHUFB.js +0 -1
- package/core/built/admin/assets/growth-IkQZ1ZV9.js +0 -1
- package/core/built/admin/assets/index-BMhs4O3N.js +0 -69
- package/core/built/admin/assets/inline-C1CpHxuO.js +0 -1
- package/core/built/admin/assets/kpis-BTZ8cyw-.js +0 -1
- package/core/built/admin/assets/labels-sA9m188H.js +0 -5
- package/core/built/admin/assets/layout-szLkuQ88.js +0 -1
- package/core/built/admin/assets/list-page-DWkOdljb.js +0 -1
- package/core/built/admin/assets/main-layout-B-K8KliJ.js +0 -1
- package/core/built/admin/assets/members-PNNhalbu.js +0 -10
- package/core/built/admin/assets/moderation-DqnsNTiw.js +0 -1
- package/core/built/admin/assets/newsletter-BhuQeWFL.js +0 -1
- package/core/built/admin/assets/note-DFy2JTpP.js +0 -1
- package/core/built/admin/assets/notifications-BVu-JOkB.js +0 -1
- package/core/built/admin/assets/overview-Bhg8M7VS.js +0 -1
- package/core/built/admin/assets/pagemenu-C4paivNj.js +0 -1
- package/core/built/admin/assets/post-analytics-BhQUmZyA.js +0 -1
- package/core/built/admin/assets/post-analytics-context-Dy17HR1_.js +0 -1
- package/core/built/admin/assets/post-analytics-header-DAQep1VQ.js +0 -1
- package/core/built/admin/assets/posts/_react-dom-Blmuc0OL.js +0 -21
- package/core/built/admin/assets/posts/alert-dialog-DBJeQQTK.js +0 -154
- package/core/built/admin/assets/posts/app-provider-BJr9fdEC.js +0 -22
- package/core/built/admin/assets/posts/app-utils-9O53Czfw.js +0 -83
- package/core/built/admin/assets/posts/automations-BM0oBTjO.js +0 -275
- package/core/built/admin/assets/posts/automations-Dbp-gdHS.js +0 -223
- package/core/built/admin/assets/posts/avatar-kOk1tTvT.js +0 -144
- package/core/built/admin/assets/posts/badge-DnByIHe9.js +0 -25
- package/core/built/admin/assets/posts/button-Dd8Xreln.js +0 -40844
- package/core/built/admin/assets/posts/chunk-KS7C4IRE-ECXkcZq6.js +0 -7740
- package/core/built/admin/assets/posts/comments-D-7hbbdw.js +0 -8032
- package/core/built/admin/assets/posts/data-list-DdD_glQ-.js +0 -14219
- package/core/built/admin/assets/posts/dialog-DDkTy_np.js +0 -229
- package/core/built/admin/assets/posts/editor-D7-01KV_.js +0 -14633
- package/core/built/admin/assets/posts/empty-indicator-Ze-bwJ27.js +0 -38
- package/core/built/admin/assets/posts/filters-CmKfKtpS.js +0 -5611
- package/core/built/admin/assets/posts/get-site-timezone-DVbWc-NA.js +0 -39
- package/core/built/admin/assets/posts/growth-DlhFUzVg.js +0 -299
- package/core/built/admin/assets/posts/heading-BBl-8tMC.js +0 -92
- package/core/built/admin/assets/posts/hooks-gZAmj4Al.js +0 -5429
- package/core/built/admin/assets/posts/input-DuPLeCGW.js +0 -16
- package/core/built/admin/assets/posts/input-surface-ClwNIxfd.js +0 -17
- package/core/built/admin/assets/posts/jsx-runtime-BfZnKD4L.js +0 -95
- package/core/built/admin/assets/posts/koenig-lexical-DCHiJJou.js +0 -77579
- package/core/built/admin/assets/posts/kpis-Fsx0XmYK.js +0 -2061
- package/core/built/admin/assets/posts/label-D1wSl69p.js +0 -32
- package/core/built/admin/assets/posts/links-DLozzgMh.js +0 -1243
- package/core/built/admin/assets/posts/loading-indicator-BgU2kK3v.js +0 -44
- package/core/built/admin/assets/posts/main-layout-DDlTMrnF.js +0 -15
- package/core/built/admin/assets/posts/newsletter-DAQJ1GLe.js +0 -736
- package/core/built/admin/assets/posts/overview-G3MfRm-S.js +0 -426
- package/core/built/admin/assets/posts/page-header-CanFyB95.js +0 -284
- package/core/built/admin/assets/posts/popover-Cta8ZDHJ.js +0 -221
- package/core/built/admin/assets/posts/post-analytics-cS07-wo_.js +0 -121
- package/core/built/admin/assets/posts/post-analytics-context-D868SMoq.js +0 -150
- package/core/built/admin/assets/posts/post-analytics-header-CZYiuaEL.js +0 -42249
- package/core/built/admin/assets/posts/post-share-modal-BJfswZzf.js +0 -352
- package/core/built/admin/assets/posts/posts-CpusjBC0.js +0 -37
- package/core/built/admin/assets/posts/posts-app-context-CPC7dOlt.js +0 -26
- package/core/built/admin/assets/posts/posts.js +0 -145
- package/core/built/admin/assets/posts/router-provider-DrqpOc8m.js +0 -114
- package/core/built/admin/assets/posts/separator-DAZNzARU.js +0 -37
- package/core/built/admin/assets/posts/settings-CMfUn5Hq.js +0 -66
- package/core/built/admin/assets/posts/shade-app-DLbeExcd-NeEZjE3R.js +0 -4764
- package/core/built/admin/assets/posts/sheet-CEuv-0a5.js +0 -62
- package/core/built/admin/assets/posts/site-WJ6ldary.js +0 -10
- package/core/built/admin/assets/posts/skeleton-CO0qCdQF.js +0 -2426
- package/core/built/admin/assets/posts/source-icon-Bs6o84W3.js +0 -143
- package/core/built/admin/assets/posts/stats-B1Z8H0JT.js +0 -92
- package/core/built/admin/assets/posts/table-CbJ9bOpM.js +0 -77
- package/core/built/admin/assets/posts/tabs-BvzzwQ4P.js +0 -242
- package/core/built/admin/assets/posts/tags-D-4TwsD0.js +0 -462
- package/core/built/admin/assets/posts/tooltip-BI7VtFUY.js +0 -380
- package/core/built/admin/assets/posts/update-queries-DiUznIQ1.js +0 -60
- package/core/built/admin/assets/posts/users-UgRPrTKW.js +0 -83
- package/core/built/admin/assets/posts/value-DF_wOhJe.js +0 -415
- package/core/built/admin/assets/posts/virtual-list-window-DP63Onpm.js +0 -853
- package/core/built/admin/assets/posts/web-axp2l3kK.js +0 -8077
- package/core/built/admin/assets/preferences-ChOzBKcF.js +0 -5
- package/core/built/admin/assets/profile-DlcrYKay.js +0 -1
- package/core/built/admin/assets/select-BbtNHCBq.js +0 -1
- package/core/built/admin/assets/social-urls-DVzIHh2W.js +0 -16
- package/core/built/admin/assets/source-icon-Uuhttjun.js +0 -1
- package/core/built/admin/assets/source-utils-BchD0sF0.js +0 -1
- package/core/built/admin/assets/stats-CrlPzgdd.js +0 -1
- package/core/built/admin/assets/stats-view-UNMhTMCZ.js +0 -1
- package/core/built/admin/assets/step-1-C2HY6pyi.js +0 -1
- package/core/built/admin/assets/tags-DjCsJo0X.js +0 -1
- package/core/built/admin/assets/typeof-Ca-duI-z.js +0 -1
- package/core/built/admin/assets/url-helpers-DxA844rA.js +0 -1
- package/core/built/admin/assets/use-growth-stats-DNIGdI8h.js +0 -1
- package/core/built/admin/assets/use-reply-chain-data-DtEC2Azp.js +0 -1
- package/core/built/admin/assets/virtual-list-window-BTXGwpf5.js +0 -1
- package/core/built/admin/assets/web-Cj8VEw3s.js +0 -1
- /package/core/built/admin/assets/{chunk.912.9d6df5a6da679d905bbf.js.LICENSE.txt → chunk.251.dd82df30188bb633b4ae.js.LICENSE.txt} +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-CT46_f_J.js","./rolldown-runtime-DAXXjFlN.js","./react-Bb3IsNbi.js","./inbox-CTD-ix6u.js","./jsx-runtime-CtMZ-PAS.js","./chunk-KS7C4IRE-DG9HTHQ3.js","./preload-helper-DYl5dUZ5.js","./router-provider-DcttGCQn.js","./framework-provider-i7X1c1ST.js","./button-DiwO9Rof.js","./dist-B7kX8alP.js","./clsx-CjueKrWZ.js","./empty-indicator-Cl63eDpB.js","./layout-szLkuQ88.js","./topic-filter-D2_9eEw4.js","./use-reply-chain-data-DtEC2Azp.js","./feed-Cs7-F3I5.js","./note-DFy2JTpP.js","./notifications-BVu-JOkB.js","./explore-BgHmdFVz.js","./profile-DlcrYKay.js","./tabs-Bw8aEqsd.js","./dist-B_Ahe-Z8.js","./react-dom-C6aoWSfl.js","./Combination-BPFTKsTn.js","./dist-CsekE4FL.js","./edit-profile-7QEh0VtN.js","./label-BKEvlvuF.js","./dist-CqWm6lIL.js","./textarea-CNaqhk5P.js","./social-web-handle-CvfIKPww.js","./settings-dLraw6et.js","./preferences-ChOzBKcF.js","./toggle-group-CMp1taHd.js","./moderation-DqnsNTiw.js","./bluesky-sharing-Dk1RTUaz.js","./account-migration-DiS76mRS.js","./field-Bwl66vll.js","./domain-2REz20SO.js","./inline-C1CpHxuO.js","./step-1-C2HY6pyi.js","./users-Y8qhvF1q.js","./hooks-tBACnBdQ.js","./dist-duxRDcQu.js","./update-queries-C4CnvJaW.js","./step-2-CVOvLQ2n.js","./avatar-flipboard-Lz3F9fNT.js","./step-3-BsVXcpWU.js","./post-analytics-context-Dy17HR1_.js","./use-tinybird-token-1T80Odca.js","./posts-D_gBhqmK.js","./constants-BlvYJTqz.js","./post-analytics-BhQUmZyA.js","./analytics-53FOa2wq.js","./post-share-modal-59Ujf4t1.js","./share-modal-CI3E67kW.js","./main-layout-B-K8KliJ.js","./overview-Bhg8M7VS.js","./use-tinybird-query-CNCaUn39.js","./pagemenu-C4paivNj.js","./post-helpers-C5OQMBoi.js","./links-CfAB2Yeq.js","./_baseAssignValue-C_vooEQc.js","./chart-DmRrxCRv.js","./value-8xOwwyZS.js","./prop-types-DeUPn3oD.js","./PolarAngleAxis-D4SNKRGT.js","./gh-chart-DdBGmBS8.js","./post-analytics-header-DAQep1VQ.js","./gift-link-modal-CSgyxenA.js","./gift-links-bR_JDdWo.js","./pages-DcOlizuD.js","./get-site-timezone-HgL0jI_F.js","./data-list-D3nkd86L.js","./kpi-card-Fr_HJH78.js","./kpi-card-B2y2dMMS.js","./growth-IkQZ1ZV9.js","./currency-CQsJu8iC.js","./source-utils-BchD0sF0.js","./table-rH2MyJm6.js","./stats-CrlPzgdd.js","./source-icon-Uuhttjun.js","./member-route-0Aa52Ntz.js","./kpis-BTZ8cyw-.js","./kpi-tabs-Dc4Nt4a5.js","./web-Cj8VEw3s.js","./filters-DUy8rzI5.js","./switch-Dy6asCQw.js","./dist-CaHNiF20.js","./dist-JLOy8o0Q.js","./select-BbtNHCBq.js","./en-DA2zVD_n.js","./newsletter-BhuQeWFL.js","./use-simple-pagination-CH6qw-vr.js","./tags-DjCsJo0X.js","./list-page-DWkOdljb.js","./virtual-list-window-BTXGwpf5.js","./comments-DgH1rC7w.js","./dist-CNlBOype.js","./nql-BsgFMd93.js","./filter-query-core-D6GjHUFB.js","./nql-lang-CvCSOQG3.js","./typeof-Ca-duI-z.js","./automations-DFLgH14-.js","./automations-Dc4DUKBb.js","./editor-u3BPqQed.js","./automated-emails-Cel18g7S.js","./offers-BYodCS47.js","./input-group-DkR63-nk.js","./newsletters-BEvO0JE3.js","./editor-DtxX27Jz.css","./Overview-BgM7o-Z8.js","./stats-view-UNMhTMCZ.js","./use-growth-stats-DNIGdI8h.js","./url-helpers-DxA844rA.js","./Web-DRv-83Ow.js","./content-helpers-BEgGpvyE.js","./Growth-Dx0vv-BS.js","./sort-button-BYwI0xdN.js","./tiers-74aPYtWv.js","./referrers-B0RVWBfE.js","./Newsletters-v1GnbUjW.js","./members-PNNhalbu.js","./labels-sA9m188H.js","./onboarding-route-BDaa9hd3.js","./settings-CIslWMfh.js","./esm-CEtFqV1y.js","./dist-DLRDZ5Qa.js","./dist-CNbTQjTb.js","./social-urls-DVzIHh2W.js","./isEmail-BOfC647y.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e,r as t,t as n}from"./rolldown-runtime-DAXXjFlN.js";import{t as r}from"./react-Bb3IsNbi.js";import{t as i}from"./react-dom-C6aoWSfl.js";import{s as a,t as o}from"./framework-provider-i7X1c1ST.js";import{D as s,E as c,O as l,a as u,f as d,i as f,n as p,r as m,s as h,t as g}from"./hooks-tBACnBdQ.js";import{t as _}from"./jsx-runtime-CtMZ-PAS.js";import{a as v,n as y,r as b,t as x}from"./dist-B7kX8alP.js";import{n as S,t as C}from"./dist-B_Ahe-Z8.js";import{t as w}from"./clsx-CjueKrWZ.js";import{a as T,c as E,d as D,f as O,i as ee,l as te,o as ne,p as k,s as re,t as ie,u as A}from"./Combination-BPFTKsTn.js";import{n as j,r as M,t as ae}from"./dist-CsekE4FL.js";import{a as oe,i as se,n as ce,r as le,t as ue}from"./dist-CaHNiF20.js";import{t as N}from"./preload-helper-DYl5dUZ5.js";import{t as de}from"./dist-CqWm6lIL.js";import{d as P,h as fe,l as F,o as pe,r as I,s as me,t as he,u as ge}from"./chunk-KS7C4IRE-DG9HTHQ3.js";import{a as _e,c as ve,i as ye,n as be,o as xe,r as Se,s as Ce,t as we}from"./router-provider-DcttGCQn.js";import{$t as Te,A as Ee,An as De,B as Oe,C as ke,Dt as Ae,F as je,Ft as Me,Gn as Ne,It as Pe,J as Fe,Jt as Ie,Kn as L,Kt as Le,L as Re,M as ze,Mn as Be,Nn as Ve,On as He,Ot as Ue,Pt as We,Q as Ge,Qt as Ke,R as qe,Rt as Je,V as Ye,Vn as Xe,Wn as Ze,Xn as Qe,Z as $e,_n as et,a as tt,an as nt,at as rt,b as it,bt as at,c as ot,d as st,dt as ct,er as lt,f as ut,fn as dt,ft,gt as pt,hn as mt,ht,i as gt,jt as _t,kn as vt,l as yt,ln as bt,m as xt,mn as St,n as Ct,nn as wt,nr as Tt,ot as Et,qn as Dt,qt as Ot,s as kt,sn as At,st as jt,t as R,tr as Mt,vt as Nt,xt as Pt,y as Ft,zn as It}from"./button-DiwO9Rof.js";import{a as Lt,d as Rt,i as zt,l as Bt,m as Vt,n as Ht,o as Ut,t as Wt}from"./users-Y8qhvF1q.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Gt=n((e=>{var t=i();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),z=e(r(),1),Kt=Gt(),B=_(),qt=(0,z.createContext)(void 0),Jt=({appSettings:e,children:t})=>{let n={appSettings:e,externalNavigate:e=>{window.location.href=e}};return(0,B.jsx)(qt.Provider,{value:n,children:t})},Yt=()=>{let e=(0,z.useContext)(qt);if(e===void 0)throw Error(`useAppContext must be used within an AppProvider`);return e},Xt=()=>{let e=(0,z.useContext)(qt);return e?e.appSettings?.analytics?.webAnalytics===!0:!0},Zt=`Separator`,Qt=`horizontal`,$t=[`horizontal`,`vertical`],en=z.forwardRef((e,t)=>{let{decorative:n,orientation:r=Qt,...i}=e,a=tn(r)?r:Qt,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,B.jsx)(C.div,{"data-orientation":a,...o,...i,ref:t})});en.displayName=Zt;function tn(e){return $t.includes(e)}var nn=en;function rn(e){let t=e+`CollectionProvider`,[n,r]=M(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=z.useRef(null),a=z.useRef(new Map).current;return(0,B.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=y(s),l=z.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=v(t,a(s,n).collectionRef);return(0,B.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=y(u),p=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),s=v(t,o),c=a(u,n);return z.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,B.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return z.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var an=z.createContext(void 0);function on(e){let t=z.useContext(an);return e||t||`ltr`}var sn=`rovingFocusGroup.onEntryFocus`,cn={bubbles:!1,cancelable:!0},ln=`RovingFocusGroup`,[un,dn,fn]=rn(ln),[pn,mn]=M(ln,[fn]),[hn,gn]=pn(ln),_n=z.forwardRef((e,t)=>(0,B.jsx)(un.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(un.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,B.jsx)(vn,{...e,ref:t})})}));_n.displayName=ln;var vn=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=z.useRef(null),p=v(t,f),m=on(a),[h,g]=D({prop:o,defaultProp:s??null,onChange:c,caller:ln}),[_,y]=z.useState(!1),b=ae(l),x=dn(n),S=z.useRef(!1),[w,T]=z.useState(0);return z.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(sn,b),()=>e.removeEventListener(sn,b)},[b]),(0,B.jsx)(hn,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:z.useCallback(e=>g(e),[g]),onItemShiftTab:z.useCallback(()=>y(!0),[]),onFocusableItemAdd:z.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:z.useCallback(()=>T(e=>e-1),[]),children:(0,B.jsx)(C.div,{tabIndex:_||w===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:k(e.onMouseDown,()=>{S.current=!0}),onFocus:k(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(sn,cn);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);wn([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:k(e.onBlur,()=>y(!1))})})}),yn=`RovingFocusGroupItem`,bn=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=O(),l=a||c,u=gn(yn,n),d=u.currentTabStopId===l,f=dn(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return z.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,B.jsx)(un.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,B.jsx)(C.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:k(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:k(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:k(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Cn(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Tn(n,r+1):n.slice(r+1)}setTimeout(()=>wn(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});bn.displayName=yn;var xn={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Sn(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Cn(e,t,n){let r=Sn(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return xn[r]}function wn(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Tn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var En=_n,Dn=bn,On=`Popover`,[kn,An]=M(On,[oe]),jn=oe(),[Mn,Nn]=kn(On),Pn=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=jn(t),c=z.useRef(null),[l,u]=z.useState(!1),[d,f]=D({prop:r,defaultProp:i??!1,onChange:a,caller:On});return(0,B.jsx)(se,{...s,children:(0,B.jsx)(Mn,{scope:t,contentId:O(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:z.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:z.useCallback(()=>u(!0),[]),onCustomAnchorRemove:z.useCallback(()=>u(!1),[]),modal:o,children:n})})};Pn.displayName=On;var Fn=`PopoverAnchor`,In=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Nn(Fn,n),a=jn(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return z.useEffect(()=>(o(),()=>s()),[o,s]),(0,B.jsx)(ue,{...a,...r,ref:t})});In.displayName=Fn;var Ln=`PopoverTrigger`,Rn=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Nn(Ln,n),a=jn(n),o=v(t,i.triggerRef),s=(0,B.jsx)(C.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":$n(i.open),...r,ref:o,onClick:k(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,B.jsx)(ue,{asChild:!0,...a,children:s})});Rn.displayName=Ln;var zn=`PopoverPortal`,[Bn,Vn]=kn(zn,{forceMount:void 0}),Hn=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Nn(zn,t);return(0,B.jsx)(Bn,{scope:t,forceMount:n,children:(0,B.jsx)(A,{present:n||a.open,children:(0,B.jsx)(T,{asChild:!0,container:i,children:r})})})};Hn.displayName=zn;var Un=`PopoverContent`,Wn=z.forwardRef((e,t)=>{let n=Vn(Un,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Nn(Un,e.__scopePopover);return(0,B.jsx)(A,{present:r||a.open,children:a.modal?(0,B.jsx)(Kn,{...i,ref:t}):(0,B.jsx)(qn,{...i,ref:t})})});Wn.displayName=Un;var Gn=y(`PopoverContent.RemoveScroll`),Kn=z.forwardRef((e,t)=>{let n=Nn(Un,e.__scopePopover),r=z.useRef(null),i=v(t,r),a=z.useRef(!1);return z.useEffect(()=>{let e=r.current;if(e)return ee(e)},[]),(0,B.jsx)(ie,{as:Gn,allowPinchZoom:!0,children:(0,B.jsx)(Jn,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:k(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),qn=z.forwardRef((e,t)=>{let n=Nn(Un,e.__scopePopover),r=z.useRef(!1),i=z.useRef(!1);return(0,B.jsx)(Jn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Jn=z.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Nn(Un,n),p=jn(n);return re(),(0,B.jsx)(ne,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(E,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,B.jsx)(le,{"data-state":$n(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Yn=`PopoverClose`,Xn=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Nn(Yn,n);return(0,B.jsx)(C.button,{type:`button`,...r,ref:t,onClick:k(e.onClick,()=>i.onOpenChange(!1))})});Xn.displayName=Yn;var Zn=`PopoverArrow`,Qn=z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=jn(n);return(0,B.jsx)(ce,{...i,...r,ref:t})});Qn.displayName=Zn;function $n(e){return e?`open`:`closed`}var er=Pn,tr=In,nr=Rn,rr=Hn,ir=Wn,ar=Xn,[or,sr]=M(`Form`),cr=`Form`,[lr,ur]=or(cr),[dr,fr]=or(cr),pr=z.forwardRef((e,t)=>{let{__scopeForm:n,onClearServerErrors:r=()=>{},...i}=e,a=v(t,z.useRef(null)),[o,s]=z.useState({}),c=z.useCallback(e=>o[e],[o]),l=z.useCallback((e,t)=>s(n=>({...n,[e]:{...n[e]??{},...t}})),[]),u=z.useCallback(e=>{s(t=>({...t,[e]:void 0})),_(t=>({...t,[e]:{}}))},[]),[d,f]=z.useState({}),p=z.useCallback(e=>d[e]??[],[d]),m=z.useCallback((e,t)=>{f(n=>({...n,[e]:[...n[e]??[],t]}))},[]),h=z.useCallback((e,t)=>{f(n=>({...n,[e]:(n[e]??[]).filter(e=>e.id!==t)}))},[]),[g,_]=z.useState({}),y=z.useCallback(e=>g[e]??{},[g]),b=z.useCallback((e,t)=>{_(n=>({...n,[e]:{...n[e]??{},...t}}))},[]),[x,S]=z.useState({});return(0,B.jsx)(lr,{scope:n,getFieldValidity:c,onFieldValidityChange:l,getFieldCustomMatcherEntries:p,onFieldCustomMatcherEntryAdd:m,onFieldCustomMatcherEntryRemove:h,getFieldCustomErrors:y,onFieldCustomErrorsChange:b,onFieldValiditionClear:u,children:(0,B.jsx)(dr,{scope:n,onFieldMessageIdAdd:z.useCallback((e,t)=>{S(n=>{let r=new Set(n[e]).add(t);return{...n,[e]:r}})},[]),onFieldMessageIdRemove:z.useCallback((e,t)=>{S(n=>{let r=new Set(n[e]);return r.delete(t),{...n,[e]:r}})},[]),getFieldDescription:z.useCallback(e=>Array.from(x[e]??[]).join(` `)||void 0,[x]),children:(0,B.jsx)(C.form,{...i,ref:a,onInvalid:k(e.onInvalid,e=>{let t=Lr(e.currentTarget);t===e.target&&t.focus(),e.preventDefault()}),onSubmit:k(e.onSubmit,r,{checkForDefaultPrevented:!1}),onReset:k(e.onReset,r)})})})});pr.displayName=cr;var mr=`FormField`,[hr,gr]=or(mr),_r=z.forwardRef((e,t)=>{let{__scopeForm:n,name:r,serverInvalid:i=!1,...a}=e,o=ur(mr,n).getFieldValidity(r);return(0,B.jsx)(hr,{scope:n,id:O(),name:r,serverInvalid:i,children:(0,B.jsx)(C.div,{"data-valid":Hr(o,i),"data-invalid":Ur(o,i),...a,ref:t})})});_r.displayName=mr;var vr=`FormLabel`,yr=z.forwardRef((e,t)=>{let{__scopeForm:n,...r}=e,i=ur(vr,n),a=gr(vr,n),o=r.htmlFor||a.id,s=i.getFieldValidity(a.name);return(0,B.jsx)(de,{"data-valid":Hr(s,a.serverInvalid),"data-invalid":Ur(s,a.serverInvalid),...r,ref:t,htmlFor:o})});yr.displayName=vr;var br=`FormControl`,xr=z.forwardRef((e,t)=>{let{__scopeForm:n,...r}=e,i=ur(br,n),a=gr(br,n),o=fr(br,n),s=z.useRef(null),c=v(t,s),l=r.name||a.name,u=r.id||a.id,d=i.getFieldCustomMatcherEntries(l),{onFieldValidityChange:f,onFieldCustomErrorsChange:p,onFieldValiditionClear:m}=i,h=z.useCallback(async e=>{if(Vr(e.validity)){let t=Nr(e.validity);f(l,t);return}let t=e.form?new FormData(e.form):new FormData,n=[e.value,t],r=[],i=[];d.forEach(e=>{Rr(e,n)?i.push(e):zr(e)&&r.push(e)});let a=r.map(({id:e,match:t})=>[e,t(...n)]),o=Object.fromEntries(a),s=Object.values(o).some(Boolean),c=s;e.setCustomValidity(c?Sr:``);let u=Nr(e.validity);if(f(l,u),p(l,o),!s&&i.length>0){let t=i.map(({id:e,match:t})=>t(...n).then(t=>[e,t])),r=await Promise.all(t),a=Object.fromEntries(r),o=Object.values(a).some(Boolean);e.setCustomValidity(o?Sr:``);let s=Nr(e.validity);f(l,s),p(l,a)}},[d,l,p,f]);z.useEffect(()=>{let e=s.current;if(e){let t=()=>h(e);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}},[h]);let g=z.useCallback(()=>{let e=s.current;e&&(e.setCustomValidity(``),m(l))},[l,m]);z.useEffect(()=>{let e=s.current?.form;if(e)return e.addEventListener(`reset`,g),()=>e.removeEventListener(`reset`,g)},[g]),z.useEffect(()=>{let e=s.current,t=e?.closest(`form`);if(t&&a.serverInvalid){let n=Lr(t);n===e&&n.focus()}},[a.serverInvalid]);let _=i.getFieldValidity(l);return(0,B.jsx)(C.input,{"data-valid":Hr(_,a.serverInvalid),"data-invalid":Ur(_,a.serverInvalid),"aria-invalid":a.serverInvalid?!0:void 0,"aria-describedby":o.getFieldDescription(l),title:``,...r,ref:c,id:u,name:l,onInvalid:k(e.onInvalid,e=>{let t=e.currentTarget;h(t)}),onChange:k(e.onChange,e=>{g()})})});xr.displayName=br;var Sr=`This value is not valid`,Cr={badInput:Sr,patternMismatch:`This value does not match the required pattern`,rangeOverflow:`This value is too large`,rangeUnderflow:`This value is too small`,stepMismatch:`This value does not match the required step`,tooLong:`This value is too long`,tooShort:`This value is too short`,typeMismatch:`This value does not match the required type`,valid:void 0,valueMissing:`This value is missing`},wr=`FormMessage`,Tr=z.forwardRef((e,t)=>{let{match:n,name:r,...i}=e,a=gr(wr,e.__scopeForm),o=r??a.name;return n===void 0?(0,B.jsx)(Or,{...i,ref:t,name:o,children:e.children||Sr}):typeof n==`function`?(0,B.jsx)(Dr,{match:n,...i,ref:t,name:o}):(0,B.jsx)(Er,{match:n,...i,ref:t,name:o})});Tr.displayName=wr;var Er=z.forwardRef((e,t)=>{let{match:n,forceMatch:r=!1,name:i,children:a,...o}=e,s=ur(wr,o.__scopeForm).getFieldValidity(i);return r||s?.[n]?(0,B.jsx)(Or,{ref:t,...o,name:i,children:a??Cr[n]}):null}),Dr=z.forwardRef((e,t)=>{let{match:n,forceMatch:r=!1,name:i,id:a,children:o,...s}=e,c=ur(wr,s.__scopeForm),l=v(t,z.useRef(null)),u=O(),d=a??u,f=z.useMemo(()=>({id:d,match:n}),[d,n]),{onFieldCustomMatcherEntryAdd:p,onFieldCustomMatcherEntryRemove:m}=c;z.useEffect(()=>(p(i,f),()=>m(i,f.id)),[f,i,p,m]);let h=c.getFieldValidity(i),g=c.getFieldCustomErrors(i)[d];return r||h&&!Vr(h)&&g?(0,B.jsx)(Or,{id:d,ref:l,...s,name:i,children:o??Sr}):null}),Or=z.forwardRef((e,t)=>{let{__scopeForm:n,id:r,name:i,...a}=e,o=fr(wr,n),s=O(),c=r??s,{onFieldMessageIdAdd:l,onFieldMessageIdRemove:u}=o;return z.useEffect(()=>(l(i,c),()=>u(i,c)),[i,c,l,u]),(0,B.jsx)(C.span,{id:c,...a,ref:t})}),kr=`FormValidityState`,Ar=e=>{let{__scopeForm:t,name:n,children:r}=e,i=ur(kr,t),a=gr(kr,t),o=n??a.name;return(0,B.jsx)(B.Fragment,{children:r(i.getFieldValidity(o))})};Ar.displayName=kr;var jr=`FormSubmit`,Mr=z.forwardRef((e,t)=>{let{__scopeForm:n,...r}=e;return(0,B.jsx)(C.button,{type:`submit`,...r,ref:t})});Mr.displayName=jr;function Nr(e){let t={};for(let n in e)t[n]=e[n];return t}function Pr(e){return e instanceof HTMLElement}function Fr(e){return`validity`in e}function Ir(e){return Fr(e)&&(e.validity.valid===!1||e.getAttribute(`aria-invalid`)===`true`)}function Lr(e){let t=e.elements,[n]=Array.from(t).filter(Pr).filter(Ir);return n}function Rr(e,t){return e.match.constructor.name===`AsyncFunction`||Br(e.match,t)}function zr(e){return e.match.constructor.name===`Function`}function Br(e,t){return e(...t)instanceof Promise}function Vr(e){let t=!1;for(let n in e){let r=n;if(r!==`valid`&&r!==`customError`&&e[r]){t=!0;break}}return t}function Hr(e,t){if(e?.valid===!0&&!t)return!0}function Ur(e,t){if(e?.valid===!1||t)return!0}var Wr=pr,Gr=_r,Kr=xr,qr=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Jr=`VisuallyHidden`,Yr=z.forwardRef((e,t)=>(0,B.jsx)(C.span,{...e,ref:t,style:{...qr,...e.style}}));Yr.displayName=Jr;var Xr=Yr,[Zr,Qr]=M(`Tooltip`,[oe]),$r=oe(),ei=`TooltipProvider`,ti=700,ni=`tooltip.open`,[ri,ii]=Zr(ei),ai=e=>{let{__scopeTooltip:t,delayDuration:n=ti,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=z.useRef(!0),s=z.useRef(!1),c=z.useRef(0);return z.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,B.jsx)(ri,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:z.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:z.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:z.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};ai.displayName=ei;var oi=`Tooltip`,[si,ci]=Zr(oi),li=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=ii(oi,e.__scopeTooltip),l=$r(t),[u,d]=z.useState(null),f=O(),p=z.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=z.useRef(!1),[_,v]=D({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(ni))):c.onClose(),a?.(e)},caller:oi}),y=z.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=z.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=z.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=z.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return z.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,B.jsx)(se,{...l,children:(0,B.jsx)(si,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:z.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:z.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};li.displayName=oi;var ui=`TooltipTrigger`,di=z.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ci(ui,n),a=ii(ui,n),o=$r(n),s=v(t,z.useRef(null),i.onTriggerChange),c=z.useRef(!1),l=z.useRef(!1),u=z.useCallback(()=>c.current=!1,[]);return z.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,B.jsx)(ue,{asChild:!0,...o,children:(0,B.jsx)(C.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:k(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:k(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:k(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:k(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:k(e.onBlur,i.onClose),onClick:k(e.onClick,i.onClose)})})});di.displayName=ui;var fi=`TooltipPortal`,[pi,mi]=Zr(fi,{forceMount:void 0}),hi=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=ci(fi,t);return(0,B.jsx)(pi,{scope:t,forceMount:n,children:(0,B.jsx)(A,{present:n||a.open,children:(0,B.jsx)(T,{asChild:!0,container:i,children:r})})})};hi.displayName=fi;var gi=`TooltipContent`,_i=z.forwardRef((e,t)=>{let n=mi(gi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=ci(gi,e.__scopeTooltip);return(0,B.jsx)(A,{present:r||o.open,children:o.disableHoverableContent?(0,B.jsx)(Si,{side:i,...a,ref:t}):(0,B.jsx)(vi,{side:i,...a,ref:t})})}),vi=z.forwardRef((e,t)=>{let n=ci(gi,e.__scopeTooltip),r=ii(gi,e.__scopeTooltip),i=z.useRef(null),a=v(t,i),[o,s]=z.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=z.useCallback(()=>{s(null),d(!1)},[d]),p=z.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Ei(r,Ti(r,n.getBoundingClientRect())),a=Di(t.getBoundingClientRect()),o=ki([...i,...a]);s(o),d(!0)},[d]);return z.useEffect(()=>()=>f(),[f]),z.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),z.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Oi(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,B.jsx)(Si,{...e,ref:a})}),[yi,bi]=Zr(oi,{isInside:!1}),xi=b(`TooltipContent`),Si=z.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=ci(gi,n),l=$r(n),{onClose:u}=c;return z.useEffect(()=>(document.addEventListener(ni,u),()=>document.removeEventListener(ni,u)),[u]),z.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,B.jsx)(E,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,B.jsxs)(le,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,B.jsx)(xi,{children:r}),(0,B.jsx)(yi,{scope:n,isInside:!0,children:(0,B.jsx)(Xr,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});_i.displayName=gi;var Ci=`TooltipArrow`,wi=z.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=$r(n);return bi(Ci,n).isInside?null:(0,B.jsx)(ce,{...i,...r,ref:t})});wi.displayName=Ci;function Ti(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Ei(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Di(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Oi(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ki(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Ai(t)}function Ai(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var ji=ai,Mi=li,Ni=di,Pi=hi,Fi=_i,Ii=`Avatar`,[Li,Ri]=M(Ii),zi=[0,()=>void 0],[Bi,Vi]=Li(Ii),Hi=z.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=z.useState(`idle`),[o,s]=Yi();return(0,B.jsx)(Bi,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:o,setImageCount:s,children:(0,B.jsx)(C.span,{...r,ref:t})})});Hi.displayName=Ii;var Ui=`AvatarImage`,Wi=z.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i,...a}=e,o=Vi(Ui,n);Xi(o.setImageCount);let s=qi(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:o.imageLoadingStatus,setLoadingStatus:o.setImageLoadingStatus}),c=ae(e=>{i?.(e)}),l=z.useRef(s);return j(()=>{let e=l.current;l.current=s,s!==e&&c(s)},[s,c]),s===`loaded`?(0,B.jsx)(C.img,{...a,ref:t,src:r}):null});Wi.displayName=Ui;var Gi=`AvatarFallback`,Ki=z.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=Vi(Gi,n),[o,s]=z.useState(r===void 0);return z.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,B.jsx)(C.span,{...i,ref:t}):null});Ki.displayName=Gi;function qi(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return j(()=>{if(!e){n(`error`);return}let t=new window.Image,a=e=>{let t=e.currentTarget;n(Ji(t))},o=()=>n(`error`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(Ji(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(`idle`)}},[e,i,r,n]),t}function Ji(e){return e.complete?e.naturalWidth>0?`loaded`:`error`:`loading`}function Yi(){let e=zi;{e=z.useState(0);let[t]=e,n=z.useRef(!1);z.useEffect(()=>{t>1&&!n.current&&(n.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[t])}return e}function Xi(e){z.useEffect(()=>(e(e=>e+1),()=>{e(e=>e-1)}),[e])}var Zi=`FeaturebaseTokenResponseType`,Qi={staleTime:7200*60*1e3,refetchInterval:8640*60*1e3,refetchIntervalInBackground:!0},$i=m({dataType:Zi,path:`/featurebase/token/`}),ea=(e={})=>$i({...Qi,...e}),ta=function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},na=`ConfigResponseType`,ra=na,ia=m({dataType:na,path:`/config/`}),aa=e=>!!e?.hostSettings?.managedEmail?.enabled,oa=e=>{let t=e?.hostSettings?.managedEmail?.sendingDomain;return typeof t==`string`&&t.length>0},sa=e=>e?.hostSettings?.managedEmail?.sendingDomain,ca=`https://do.featurebase.app/js/sdk.js`,la=null;function ua(){return la||=new Promise((e,t)=>{let n=document.querySelector(`script[src="${ca}"]`);if(n){if(window.Featurebase){e();return}n.addEventListener(`load`,()=>e(),{once:!0}),n.addEventListener(`error`,t,{once:!0});return}let r=document.createElement(`script`);r.src=ca,r.onload=()=>e(),r.onerror=e=>{r.remove(),la=null;let n=Error(`[Featurebase] Failed to load SDK from ${ca}`,{cause:e});console.error(n),t(n)},document.head.appendChild(r)}),la}var da=()=>typeof document>`u`?`light`:document.documentElement.classList.contains(`dark`)?`dark`:`light`,fa=null;function pa(e,t,n){return fa||(fa=ua().then(()=>new Promise((r,i)=>{window.Featurebase?.(`initialize_feedback_widget`,{organization:e,theme:t,featurebaseJwt:n},e=>{e?(fa=null,i(e)):r()})})),fa.catch(()=>{fa=null}),fa)}function ma(){let{data:e}=ia(),[t,n]=(0,z.useState)(!1),{organization:r,enabled:i}=e?.config.featurebase??{},a=!!i,{data:o}=ea({enabled:a&&t}),s=o?.featurebase?.token;(0,z.useEffect)(()=>{t&&ua().catch(e=>{console.error(`[Featurebase] Failed to load SDK:`,e)})},[t]);let c=(0,z.useRef)(ta());(0,z.useEffect)(()=>{!t||!r||!s||pa(r,da(),s).then(()=>c.current.resolve(),e=>{console.error(`[Featurebase] Failed to initialize widget:`,e),c.current.reject(e),c.current=ta(),n(!1)})},[r,s,t]);let l=(0,z.useCallback)(()=>{a&&n(!0)},[a]);return{isAvailable:a,openFeedbackWidget:(0,z.useCallback)(e=>{a&&(n(!0),c.current.promise.then(()=>{window.postMessage({target:`FeaturebaseWidget`,data:{action:`openFeedbackWidget`,...e?.board&&{setBoard:e.board}}},`*`)}))},[a]),preloadFeedbackWidget:l}}var ha={"2xs":`text-2xs`,xs:`text-xs`,sm:`text-sm`,md:`text-md`,lg:`text-lg`,xl:`text-xl`,"2xl":`text-2xl`,"3xl":`text-3xl`},ga={regular:`font-normal`,medium:`font-medium`,semibold:`font-semibold`,bold:`font-bold`},_a={primary:`text-text-primary`,secondary:`text-text-secondary`,tertiary:`text-text-tertiary`},va={none:`leading-none`,snug:`leading-snug`,normal:`leading-normal`,relaxed:`leading-relaxed`,tight:`leading-tight`,tighter:`leading-tighter`,supertight:`leading-supertight`,body:`leading-body`,heading:`leading-heading`},ya=z.forwardRef(function({as:e=`p`,className:t,size:n=`md`,weight:r=`regular`,tone:i=`primary`,leading:a=`body`,truncate:o=!1,...s},c){return(0,B.jsx)(e,{ref:c,className:L(ha[n],ga[r],_a[i],va[a],o&&`truncate`,t),...s})});ya.displayName=`Text`;var ba=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ya,{ref:n,as:`h1`,className:L(`scroll-m-20 leading-[1.1em] tracking-tighter`,e),size:`2xl`,weight:`bold`,...t}));ba.displayName=`H1`;var xa=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ya,{ref:n,as:`h2`,className:L(`scroll-m-20 tracking-tighter first:mt-0`,e),size:`xl`,weight:`bold`,...t}));xa.displayName=`H2`;var Sa=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ya,{ref:n,as:`h3`,className:L(`scroll-m-20 tracking-tight`,e),size:`lg`,weight:`semibold`,...t}));Sa.displayName=`H3`;var Ca=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ya,{ref:n,as:`h4`,className:L(`scroll-m-20 tracking-tight`,e),size:`md`,weight:`semibold`,...t}));Ca.displayName=`H4`;var wa=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ya,{ref:n,as:`div`,className:L(`tracking-wide uppercase`,e),size:`sm`,tone:`secondary`,weight:`medium`,...t}));wa.displayName=`HTable`;var Ta=Object.defineProperty,Ea=(e,t)=>{let n={};for(var r in e)Ta(n,r,{get:e[r],enumerable:!0});return t||Ta(n,Symbol.toStringTag,{value:`Module`}),n},Da=Ea({default:()=>Oa}),Oa=e=>(0,B.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,height:24,width:24,id:`Alert-Triangle--Streamline-Ultimate`,...e,children:[(0,B.jsx)(`desc`,{children:`Alert Triangle Streamline Icon: https://streamlinehq.com`}),(0,B.jsx)(`path`,{d:`m23.77 20.57 -10 -19A2 2 0 0 0 12 0.5a2 2 0 0 0 -1.77 1.07l-10 19a2 2 0 0 0 0.06 2A2 2 0 0 0 2 23.5h20a2 2 0 0 0 1.77 -2.93ZM11 8.5a1 1 0 0 1 2 0v6a1 1 0 0 1 -2 0ZM12.05 20a1.53 1.53 0 0 1 -1.52 -1.47A1.48 1.48 0 0 1 12 17a1.53 1.53 0 0 1 1.52 1.47A1.48 1.48 0 0 1 12.05 20Z`,fill:`currentColor`,strokeWidth:1})]}),ka=Ea({default:()=>Aa}),Aa=e=>(0,B.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,height:24,width:24,id:`Information-Circle--Streamline-Ultimate`,...e,children:[(0,B.jsx)(`desc`,{children:`Information Circle Streamline Icon: https://streamlinehq.com`}),(0,B.jsx)(`path`,{d:`M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm0.25 5a1.5 1.5 0 1 1 -1.5 1.5 1.5 1.5 0 0 1 1.5 -1.5Zm2.25 13.5h-4a1 1 0 0 1 0 -2h0.75a0.25 0.25 0 0 0 0.25 -0.25v-4.5a0.25 0.25 0 0 0 -0.25 -0.25h-0.75a1 1 0 0 1 0 -2h1a2 2 0 0 1 2 2v4.75a0.25 0.25 0 0 0 0.25 0.25h0.75a1 1 0 0 1 0 2Z`,fill:`currentcolor`,strokeWidth:1})]}),ja=Ea({default:()=>Ma}),Ma=e=>(0,B.jsxs)(`svg`,{height:16,id:`Skull-2--Streamline-Ultimate`,viewBox:`0 0 16 16`,width:16,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,B.jsx)(`desc`,{children:`
|
|
3
|
-
Skull 2 Streamline Icon: https://streamlinehq.com
|
|
4
|
-
`}),(0,B.jsxs)(`g`,{children:[(0,B.jsx)(`path`,{d:`M12.333333333333332 7.333333333333333a4.333333333333333 4.333333333333333 0 1 0 -7.333333333333333 3.126666666666667v1.88a1 1 0 0 0 2 0 1 1 0 0 0 2 0 1 1 0 1 0 2 0v-1.88a4.326666666666666 4.326666666666666 0 0 0 1.3333333333333333 -3.126666666666667Zm-6.253333333333334 1a1 1 0 1 1 1 -1 1 1 0 0 1 -1 1Zm4 0a1 1 0 1 1 1 -1 1 1 0 0 1 -1 1Z`,fill:`currentColor`,strokeWidth:.6667}),(0,B.jsx)(`path`,{d:`m1.8666666666666665 3.28 1.22 1.22a0.3466666666666667 0.3466666666666667 0 0 0 0.26666666666666666 0.09333333333333334 0.35333333333333333 0.35333333333333333 0 0 0 0.24666666666666665 -0.14666666666666667 5.133333333333333 5.133333333333333 0 0 1 0.8066666666666666 -0.9733333333333333 0.3133333333333333 0.3133333333333333 0 0 0 0.09999999999999999 -0.2333333333333333 0.3666666666666667 0.3666666666666667 0 0 0 -0.09333333333333334 -0.24666666666666665L3.28 1.8666666666666665A1.1666666666666665 1.1666666666666665 0 0 0 1.8399999999999999 0.11333333333333334a0.6666666666666666 0.6666666666666666 0 0 0 -0.3666666666666667 0.48l-0.09999999999999999 0.5133333333333333a0.31999999999999995 0.31999999999999995 0 0 1 -0.26 0.26666666666666666l-0.52 0.09999999999999999a0.6666666666666666 0.6666666666666666 0 0 0 -0.48 0.3666666666666667A1.1666666666666665 1.1666666666666665 0 0 0 1.8666666666666665 3.28Z`,fill:`currentColor`,strokeWidth:.6667}),(0,B.jsx)(`path`,{d:`M12.4 4.446666666666666a0.35333333333333333 0.35333333333333333 0 0 0 0.24666666666666665 0.14666666666666667 0.3466666666666667 0.3466666666666667 0 0 0 0.26666666666666666 -0.09333333333333334l1.22 -1.22a1.1666666666666665 1.1666666666666665 0 0 0 1.7533333333333332 -1.44 0.6666666666666666 0.6666666666666666 0 0 0 -0.48 -0.3666666666666667l-0.52 -0.09999999999999999a0.31999999999999995 0.31999999999999995 0 0 1 -0.26 -0.26666666666666666l-0.09999999999999999 -0.5133333333333333a0.6666666666666666 0.6666666666666666 0 0 0 -0.3666666666666667 -0.48 1.1666666666666665 1.1666666666666665 0 0 0 -1.44 1.7533333333333332l-1.1333333333333333 1.1266666666666665a0.3666666666666667 0.3666666666666667 0 0 0 -0.09333333333333334 0.24666666666666665 0.3133333333333333 0.3133333333333333 0 0 0 0.09999999999999999 0.2333333333333333 5.133333333333333 5.133333333333333 0 0 1 0.8066666666666666 0.9733333333333333Z`,fill:`currentColor`,strokeWidth:.6667}),(0,B.jsx)(`path`,{d:`M3.6 11.559999999999999a0.33999999999999997 0.33999999999999997 0 0 0 -0.26666666666666666 -0.15333333333333332 0.3466666666666667 0.3466666666666667 0 0 0 -0.26666666666666666 0.09333333333333334l-1.2 1.22a1.1666666666666665 1.1666666666666665 0 0 0 -1.7533333333333332 1.44 0.6666666666666666 0.6666666666666666 0 0 0 0.48 0.3666666666666667l0.52 0.09999999999999999a0.31999999999999995 0.31999999999999995 0 0 1 0.26 0.26666666666666666l0.09999999999999999 0.5133333333333333a0.6666666666666666 0.6666666666666666 0 0 0 0.3666666666666667 0.48 1.1666666666666665 1.1666666666666665 0 0 0 1.44 -1.7533333333333332l1.1333333333333333 -1.1266666666666665a0.36 0.36 0 0 0 0.09333333333333334 -0.24 0.31999999999999995 0.31999999999999995 0 0 0 -0.09999999999999999 -0.24 5.333333333333333 5.333333333333333 0 0 1 -0.8066666666666666 -0.9666666666666666Z`,fill:`currentColor`,strokeWidth:.6667}),(0,B.jsx)(`path`,{d:`m14.133333333333333 12.719999999999999 -1.22 -1.22a0.3466666666666667 0.3466666666666667 0 0 0 -0.26666666666666666 -0.09333333333333334 0.33999999999999997 0.33999999999999997 0 0 0 -0.24666666666666665 0.15333333333333332 5.333333333333333 5.333333333333333 0 0 1 -0.8066666666666666 0.9666666666666666 0.31999999999999995 0.31999999999999995 0 0 0 -0.09999999999999999 0.24 0.36 0.36 0 0 0 0.09333333333333334 0.24l1.1333333333333333 1.1266666666666665a1.1666666666666665 1.1666666666666665 0 0 0 1.44 1.7533333333333332 0.6666666666666666 0.6666666666666666 0 0 0 0.3666666666666667 -0.48l0.09999999999999999 -0.5133333333333333a0.31999999999999995 0.31999999999999995 0 0 1 0.26 -0.26666666666666666l0.52 -0.09999999999999999a0.6666666666666666 0.6666666666666666 0 0 0 0.48 -0.3666666666666667 1.1666666666666665 1.1666666666666665 0 0 0 -1.7533333333333332 -1.44Z`,fill:`currentColor`,strokeWidth:.6667})]})]}),Na=Ea({default:()=>Pa}),Pa=e=>(0,B.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,height:24,width:24,id:`Check-Circle-1--Streamline-Ultimate`,...e,children:[(0,B.jsx)(`desc`,{children:`Check Circle 1 Streamline Icon: https://streamlinehq.com`}),(0,B.jsx)(`path`,{d:`M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm6.93 8.2 -6.85 9.29a1 1 0 0 1 -1.43 0.19l-4.89 -3.91a1 1 0 0 1 -0.15 -1.41A1 1 0 0 1 7 12.21l4.08 3.26L17.32 7a1 1 0 0 1 1.39 -0.21 1 1 0 0 1 0.22 1.41Z`,fill:`currentcolor`,strokeWidth:1})]}),Fa=Ea({default:()=>Ia}),Ia=e=>(0,B.jsxs)(`svg`,{viewBox:`-0.75 -0.75 20 20`,xmlns:`http://www.w3.org/2000/svg`,height:24,width:24,...e,children:[(0,B.jsx)(`desc`,{children:`Typography`}),(0,B.jsx)(`path`,{d:`m0.578125 9.827354166666668 8.09375 0`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5}),(0,B.jsx)(`path`,{d:`m12.140625 13.296104166666666 5.78125 0`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5}),(0,B.jsx)(`path`,{d:`M12.140625 16.764854166666666V10.40625a2.890625 2.890625 0 0 1 5.78125 0v6.359375`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5}),(0,B.jsx)(`path`,{d:`M0.578125 16.764854166666666V5.78125a4.046875 4.046875 0 0 1 8.09375 0v10.984375`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5})]}),La=Ze(``,{variants:{size:{sm:`size-3`,md:`size-4`,lg:`size-6`,xl:`size-8`}},defaultVariants:{size:`md`}}),Ra=Object.entries(Object.assign({"../../assets/icons/error-fill.svg":Da,"../../assets/icons/info-fill.svg":ka,"../../assets/icons/skull-and-bones.svg":ja,"../../assets/icons/success-fill.svg":Na,"../../assets/icons/typography.svg":Fa})).reduce((e,[t,n])=>{let r=lt(t.match(/[^/]+(?=\.svg$)/)?.[0]??``),i=e=>{let{size:t,className:r,...i}=e,a=L(La({size:t,className:r}));return z.createElement(n.default,{...i,className:a})};return i.displayName=`Icon.${r}`,e[r]=i,e},{}),za=Ra,Ba=z.createContext({isDirty:!1,setGlobalDirtyState:()=>{}}),Va=({children:e})=>{let[t,n]=(0,z.useState)([]),r=(0,z.useCallback)((e,t)=>{n(n=>t&&!n.includes(e)?[...n,e]:!t&&n.includes(e)?n.filter(t=>t!==e):n)},[]);return(0,B.jsx)(Ba.Provider,{value:{isDirty:t.length>0,setGlobalDirtyState:r},children:e})},Ha=e(i(),1);function Ua(e){if(!e||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))}var Wa=e=>{switch(e){case`success`:return qa;case`info`:return Ya;case`warning`:return Ja;case`error`:return Xa;default:return null}},Ga=Array(12).fill(0),Ka=({visible:e,className:t})=>z.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},z.createElement(`div`,{className:`sonner-spinner`},Ga.map((e,t)=>z.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),qa=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},z.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`})),Ja=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},z.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`})),Ya=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},z.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`})),Xa=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},z.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`})),Za=z.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`},z.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),z.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Qa=()=>{let[e,t]=z.useState(document.hidden);return z.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},$a=1,eo=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:$a++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],z.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(no(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||$a++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},to=(e,t)=>{let n=t?.id||$a++;return eo.addToast({title:e,...t,id:n}),n},no=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ro=Object.assign(to,{success:eo.success,info:eo.info,warning:eo.warning,error:eo.error,custom:eo.custom,message:eo.message,promise:eo.promise,dismiss:eo.dismiss,loading:eo.loading},{getHistory:()=>eo.toasts,getToasts:()=>eo.getActiveToasts()});Ua(`[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 io(e){return e.label!==void 0}var ao=3,oo=`24px`,so=`16px`,co=4e3,lo=356,uo=14,fo=45,po=200;function mo(...e){return e.filter(Boolean).join(` `)}function ho(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var go=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=z.useState(null),[O,ee]=z.useState(null),[te,ne]=z.useState(!1),[k,re]=z.useState(!1),[ie,A]=z.useState(!1),[j,M]=z.useState(!1),[ae,oe]=z.useState(!1),[se,ce]=z.useState(0),[le,ue]=z.useState(0),N=z.useRef(n.duration||y||co),de=z.useRef(null),P=z.useRef(null),fe=c===0,F=c+1<=o,pe=n.type,I=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,ge=z.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=z.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=z.useMemo(()=>n.duration||y||co,[n.duration,y]),ye=z.useRef(0),be=z.useRef(0),xe=z.useRef(0),Se=z.useRef(null),[Ce,we]=b.split(`-`),Te=z.useMemo(()=>s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=Qa(),De=n.invert||t,Oe=pe===`loading`;be.current=z.useMemo(()=>ge*x+Te,[ge,Te]),z.useEffect(()=>{N.current=ve},[ve]),z.useEffect(()=>{ne(!0)},[]),z.useEffect(()=>{let e=P.current;if(e){let t=e.getBoundingClientRect().height;return ue(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),z.useLayoutEffect(()=>{if(!te)return;let e=P.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ue(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[te,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=z.useCallback(()=>{re(!0),ce(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},po)},[n,d,a,be]);z.useEffect(()=>{if(n.promise&&pe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;N.current-=e}xe.current=new Date().getTime()})():N.current!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},N.current)),()=>clearTimeout(e)},[u,i,n,pe,Ee,ke]),z.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return w?.loading?z.createElement(`div`,{className:mo(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":pe===`loading`},w.loading):z.createElement(Ka,{className:mo(C?.loader,n?.classNames?.loader),visible:pe===`loading`})}let je=n.icon||w?.[pe]||Wa(pe);return z.createElement(`li`,{tabIndex:0,ref:P,className:mo(_,me,C?.toast,n?.classNames?.toast,C?.default,C?.[pe],n?.classNames?.[pe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":te,"data-promise":!!n.promise,"data-swiped":ae,"data-removed":k,"data-visible":F,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":fe,"data-swiping":ie,"data-dismissible":I,"data-type":pe,"data-invert":De,"data-swipe-out":j,"data-swipe-direction":O,"data-expanded":!!(u||S&&te),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${k?se:be.current}px`,"--initial-height":S?`auto`:`${le}px`,...m,...n.style},onDragEnd:()=>{A(!1),D(null),Se.current=null},onPointerDown:e=>{e.button!==2&&(Oe||!I||(de.current=new Date,ce(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(A(!0),Se.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(j||!I)return;Se.current=null;let e=Number(P.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(P.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-de.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=fo||a>.11){ce(be.current),n.onDismiss==null||n.onDismiss.call(n,n),ee(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),M(!0);return}else{var o,s;(o=P.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=P.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}oe(!1),A(!1),D(null)},onPointerMove:t=>{var n,r;if(!Se.current||!I||window.getSelection()?.toString().length>0)return;let i=t.clientY-Se.current.y,a=t.clientX-Se.current.x,o=e.swipeDirections??ho(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&oe(!0),(n=P.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=P.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},_e&&!n.jsx&&pe!==`loading`?z.createElement(`button`,{"aria-label":T,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!I?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:mo(C?.closeButton,n?.classNames?.closeButton)},w?.close??Za):null,(pe||n.icon||n.promise)&&n.icon!==null&&(w?.[pe]!==null||n.icon)?z.createElement(`div`,{"data-icon":``,className:mo(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,z.createElement(`div`,{"data-content":``,className:mo(C?.content,n?.classNames?.content)},z.createElement(`div`,{"data-title":``,className:mo(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?z.createElement(`div`,{"data-description":``,className:mo(v,he,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),z.isValidElement(n.cancel)?n.cancel:n.cancel&&io(n.cancel)?z.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{io(n.cancel)&&I&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:mo(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,z.isValidElement(n.action)?n.action:n.action&&io(n.action)?z.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{io(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ke())},className:mo(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function _o(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function vo(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?so:oo;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var yo=z.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=ao,toastOptions:g,dir:_=_o(),gap:v=uo,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=z.useState([]),C=z.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=z.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=z.useState([]),[D,O]=z.useState(!1),[ee,te]=z.useState(!1),[ne,k]=z.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),re=z.useRef(null),ie=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),A=z.useRef(null),j=z.useRef(!1),M=z.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||eo.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return z.useEffect(()=>eo.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{Ha.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),z.useEffect(()=>{if(d!==`system`){k(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?k(`dark`):k(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{k(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{k(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),z.useEffect(()=>{x.length<=1&&O(!1)},[x]),z.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=re.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===re.current||re.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),z.useEffect(()=>{if(re.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,j.current=!1)}},[re.current]),z.createElement(`section`,{ref:t,"aria-label":`${b} ${ie}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?z.createElement(`ol`,{key:t,dir:_===`auto`?_o():_,tabIndex:-1,ref:re,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ne,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${lo}px`,"--gap":`${v}px`,...m,...vo(l,u)},onBlur:e=>{j.current&&!e.currentTarget.contains(e.relatedTarget)&&(j.current=!1,A.current&&=(A.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j.current||(j.current=!0,A.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{ee||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||te(!0)},onPointerUp:()=>te(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>z.createElement(go,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ee,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:M,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),bo=({...e})=>(0,B.jsx)(yo,{className:`toaster group`,style:{"--normal-bg":`var(--background)`,"--normal-text":`var(--foreground)`,"--normal-border":`var(--border)`},theme:`light`,...e}),xo=(0,z.createContext)({isAnyTextFieldFocused:!1,setFocusState:()=>{},darkMode:!1}),So=()=>(0,z.useContext)(xo),Co=()=>{let e=So();if(!e)throw Error(`useFocusContext must be used within a FocusProvider`);return e},wo=()=>{let[e,t]=(0,z.useState)(!1);return(0,z.useEffect)(()=>(t(!0),()=>t(!1)),[]),e?(0,Ha.createPortal)((0,B.jsx)(`div`,{className:Eo,style:{width:`unset`,height:`unset`},children:(0,B.jsx)(bo,{icons:{error:(0,B.jsx)(Ra.ErrorFill,{className:`text-red`}),success:(0,B.jsx)(Ra.SuccessFill,{className:`text-green`}),info:(0,B.jsx)(Ra.InfoFill,{className:`text-text-tertiary`})},position:`bottom-left`,toastOptions:{classNames:{title:`mt-[-1px]! text-md! font-semibold! leading-tighter! tracking-[0.1px]!`,description:`text-text-primary! text-sm! mt-px!`,icon:`ml-0!`},style:{alignItems:`flex-start`,maxWidth:`290px`}}})}),document.body):null},To=({darkMode:e,children:t})=>{let[n,r]=(0,z.useState)(!1);return(0,B.jsx)(xo.Provider,{value:{isAnyTextFieldFocused:n,setFocusState:e=>{r(e)},darkMode:e},children:(0,B.jsxs)(Va,{children:[t,(0,B.jsx)(wo,{})]})})},Eo=`shade shade-admin shade-activitypub shade-stats shade-posts`,Do=({darkMode:e,fetchKoenigLexical:t,className:n,children:r,...i})=>(0,B.jsx)(`div`,{className:w(`shade`,n),...i,children:(0,B.jsx)(To,{darkMode:e,children:r})}),Oo=[`Enter`,` `],ko=[`ArrowDown`,`PageUp`,`Home`],Ao=[`ArrowUp`,`PageDown`,`End`],jo=[...ko,...Ao],Mo={ltr:[...Oo,`ArrowRight`],rtl:[...Oo,`ArrowLeft`]},No={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Po=`Menu`,[Fo,Io,Lo]=rn(Po),[Ro,zo]=M(Po,[Lo,oe,mn]),Bo=oe(),Vo=mn(),[Ho,Uo]=Ro(Po),[Wo,Go]=Ro(Po),Ko=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Bo(t),[c,l]=z.useState(null),u=z.useRef(!1),d=ae(a),f=on(i);return z.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),z.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,B.jsx)(se,{...s,children:(0,B.jsx)(Ho,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,B.jsx)(Wo,{scope:t,onClose:z.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Ko.displayName=Po;var qo=`MenuAnchor`,Jo=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Bo(n);return(0,B.jsx)(ue,{...i,...r,ref:t})});Jo.displayName=qo;var Yo=`MenuPortal`,[Xo,Zo]=Ro(Yo,{forceMount:void 0}),Qo=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Uo(Yo,t);return(0,B.jsx)(Xo,{scope:t,forceMount:n,children:(0,B.jsx)(A,{present:n||a.open,children:(0,B.jsx)(T,{asChild:!0,container:i,children:r})})})};Qo.displayName=Yo;var $o=`MenuContent`,[es,ts]=Ro($o),ns=z.forwardRef((e,t)=>{let n=Zo($o,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Uo($o,e.__scopeMenu),o=Go($o,e.__scopeMenu);return(0,B.jsx)(Fo.Provider,{scope:e.__scopeMenu,children:(0,B.jsx)(A,{present:r||a.open,children:(0,B.jsx)(Fo.Slot,{scope:e.__scopeMenu,children:o.modal?(0,B.jsx)(rs,{...i,ref:t}):(0,B.jsx)(is,{...i,ref:t})})})})}),rs=z.forwardRef((e,t)=>{let n=Uo($o,e.__scopeMenu),r=z.useRef(null),i=v(t,r);return z.useEffect(()=>{let e=r.current;if(e)return ee(e)},[]),(0,B.jsx)(os,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:k(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),is=z.forwardRef((e,t)=>{let n=Uo($o,e.__scopeMenu);return(0,B.jsx)(os,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),as=y(`MenuContent.ScrollLock`),os=z.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Uo($o,n),_=Go($o,n),y=Bo(n),b=Vo(n),x=Io(n),[S,C]=z.useState(null),w=z.useRef(null),T=v(t,w,g.onContentChange),D=z.useRef(0),O=z.useRef(``),ee=z.useRef(0),te=z.useRef(null),A=z.useRef(`right`),j=z.useRef(0),M=m?ie:z.Fragment,ae=m?{as,allowPinchZoom:!0}:void 0,oe=e=>{let t=O.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Ws(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};z.useEffect(()=>()=>window.clearTimeout(D.current),[]),re();let se=z.useCallback(e=>A.current===te.current?.side&&Ks(e,te.current?.area),[]);return(0,B.jsx)(es,{scope:n,searchRef:O,onItemEnter:z.useCallback(e=>{se(e)&&e.preventDefault()},[se]),onItemLeave:z.useCallback(e=>{se(e)||(w.current?.focus(),C(null))},[se]),onTriggerLeave:z.useCallback(e=>{se(e)&&e.preventDefault()},[se]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:z.useCallback(e=>{te.current=e},[]),children:(0,B.jsx)(M,{...ae,children:(0,B.jsx)(ne,{asChild:!0,trapped:i,onMountAutoFocus:k(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,B.jsx)(E,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,B.jsx)(En,{asChild:!0,...b,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:k(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,B.jsx)(le,{role:`menu`,"aria-orientation":`vertical`,"data-state":zs(g.open),"data-radix-menu-content":``,dir:_.dir,...y,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:k(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&oe(e.key));let i=w.current;if(e.target!==i||!jo.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);Ao.includes(e.key)&&a.reverse(),Hs(a)}),onBlur:k(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:k(e.onPointerMove,qs(e=>{let t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>j.current?`right`:`left`;A.current=t,j.current=e.clientX}}))})})})})})})});ns.displayName=$o;var ss=`MenuGroup`,cs=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,B.jsx)(C.div,{role:`group`,...r,ref:t})});cs.displayName=ss;var ls=`MenuLabel`,us=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,B.jsx)(C.div,{...r,ref:t})});us.displayName=ls;var ds=`MenuItem`,fs=`menu.itemSelect`,ps=z.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=z.useRef(null),o=Go(ds,e.__scopeMenu),s=ts(ds,e.__scopeMenu),c=v(t,a),l=z.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(fs,{bubbles:!0,cancelable:!0});e.addEventListener(fs,e=>r?.(e),{once:!0}),S(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,B.jsx)(ms,{...i,ref:c,disabled:n,onClick:k(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:k(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:k(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Oo.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ps.displayName=ds;var ms=z.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=ts(ds,n),s=Vo(n),c=z.useRef(null),l=v(t,c),[u,d]=z.useState(!1),[f,p]=z.useState(``);return z.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,B.jsx)(Fo.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,B.jsx)(Dn,{asChild:!0,...s,focusable:!r,children:(0,B.jsx)(C.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:k(e.onPointerMove,qs(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:k(e.onPointerLeave,qs(e=>o.onItemLeave(e))),onFocus:k(e.onFocus,()=>d(!0)),onBlur:k(e.onBlur,()=>d(!1))})})})}),hs=`MenuCheckboxItem`,gs=z.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,B.jsx)(ws,{scope:e.__scopeMenu,checked:n,children:(0,B.jsx)(ps,{role:`menuitemcheckbox`,"aria-checked":Bs(n)?`mixed`:n,...i,ref:t,"data-state":Vs(n),onSelect:k(i.onSelect,()=>r?.(Bs(n)?!0:!n),{checkForDefaultPrevented:!1})})})});gs.displayName=hs;var _s=`MenuRadioGroup`,[vs,ys]=Ro(_s,{value:void 0,onValueChange:()=>{}}),bs=z.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=ae(r);return(0,B.jsx)(vs,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,B.jsx)(cs,{...i,ref:t})})});bs.displayName=_s;var xs=`MenuRadioItem`,Ss=z.forwardRef((e,t)=>{let{value:n,...r}=e,i=ys(xs,e.__scopeMenu),a=n===i.value;return(0,B.jsx)(ws,{scope:e.__scopeMenu,checked:a,children:(0,B.jsx)(ps,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Vs(a),onSelect:k(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ss.displayName=xs;var Cs=`MenuItemIndicator`,[ws,Ts]=Ro(Cs,{checked:!1}),Es=z.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Ts(Cs,n);return(0,B.jsx)(A,{present:r||Bs(a.checked)||a.checked===!0,children:(0,B.jsx)(C.span,{...i,ref:t,"data-state":Vs(a.checked)})})});Es.displayName=Cs;var Ds=`MenuSeparator`,Os=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,B.jsx)(C.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Os.displayName=Ds;var ks=`MenuArrow`,As=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Bo(n);return(0,B.jsx)(ce,{...i,...r,ref:t})});As.displayName=ks;var js=`MenuSub`,[Ms,Ns]=Ro(js),Ps=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Uo(js,t),o=Bo(t),[s,c]=z.useState(null),[l,u]=z.useState(null),d=ae(i);return z.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,B.jsx)(se,{...o,children:(0,B.jsx)(Ho,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,B.jsx)(Ms,{scope:t,contentId:O(),triggerId:O(),trigger:s,onTriggerChange:c,children:n})})})};Ps.displayName=js;var Fs=`MenuSubTrigger`,Is=z.forwardRef((e,t)=>{let n=Uo(Fs,e.__scopeMenu),r=Go(Fs,e.__scopeMenu),i=Ns(Fs,e.__scopeMenu),a=ts(Fs,e.__scopeMenu),o=z.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=z.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);z.useEffect(()=>u,[u]),z.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=v(t,i.onTriggerChange);return(0,B.jsx)(Jo,{asChild:!0,...l,children:(0,B.jsx)(ms,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":zs(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:k(e.onPointerMove,qs(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:k(e.onPointerLeave,qs(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:k(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Mo[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Is.displayName=Fs;var Ls=`MenuSubContent`,Rs=z.forwardRef((e,t)=>{let n=Zo($o,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=Uo($o,e.__scopeMenu),s=Go($o,e.__scopeMenu),c=Ns(Ls,e.__scopeMenu),l=z.useRef(null),u=v(t,l);return(0,B.jsx)(Fo.Provider,{scope:e.__scopeMenu,children:(0,B.jsx)(A,{present:r||o.open,children:(0,B.jsx)(Fo.Slot,{scope:e.__scopeMenu,children:(0,B.jsx)(os,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:k(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:k(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:k(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=No[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Rs.displayName=Ls;function zs(e){return e?`open`:`closed`}function Bs(e){return e===`indeterminate`}function Vs(e){return Bs(e)?`indeterminate`:e?`checked`:`unchecked`}function Hs(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Us(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ws(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Us(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Gs(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ks(e,t){return t?Gs({x:e.clientX,y:e.clientY},t):!1}function qs(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Js=Ko,Ys=Jo,Xs=Qo,Zs=ns,Qs=cs,$s=us,ec=ps,tc=gs,nc=bs,rc=Ss,ic=Es,ac=Os,oc=As,sc=Ps,cc=Is,lc=Rs,uc=`DropdownMenu`,[dc,fc]=M(uc,[zo]),pc=zo(),[mc,hc]=dc(uc),gc=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=pc(t),l=z.useRef(null),[u,d]=D({prop:i,defaultProp:a??!1,onChange:o,caller:uc});return(0,B.jsx)(mc,{scope:t,triggerId:O(),triggerRef:l,contentId:O(),open:u,onOpenChange:d,onOpenToggle:z.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,B.jsx)(Js,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};gc.displayName=uc;var _c=`DropdownMenuTrigger`,vc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=hc(_c,n),o=pc(n),s=v(t,a.triggerRef);return(0,B.jsx)(Ys,{asChild:!0,...o,children:(0,B.jsx)(C.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:k(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:k(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});vc.displayName=_c;var yc=`DropdownMenuPortal`,bc=e=>{let{__scopeDropdownMenu:t,...n}=e,r=pc(t);return(0,B.jsx)(Xs,{...r,...n})};bc.displayName=yc;var xc=`DropdownMenuContent`,Sc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=hc(xc,n),a=pc(n),o=z.useRef(!1);return(0,B.jsx)(Zs,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:k(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:k(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.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)`}})});Sc.displayName=xc;var Cc=`DropdownMenuGroup`,wc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(Qs,{...i,...r,ref:t})});wc.displayName=Cc;var Tc=`DropdownMenuLabel`,Ec=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)($s,{...i,...r,ref:t})});Ec.displayName=Tc;var Dc=`DropdownMenuItem`,Oc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(ec,{...i,...r,ref:t})});Oc.displayName=Dc;var kc=`DropdownMenuCheckboxItem`,Ac=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(tc,{...i,...r,ref:t})});Ac.displayName=kc;var jc=`DropdownMenuRadioGroup`,Mc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(nc,{...i,...r,ref:t})});Mc.displayName=jc;var Nc=`DropdownMenuRadioItem`,Pc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(rc,{...i,...r,ref:t})});Pc.displayName=Nc;var Fc=`DropdownMenuItemIndicator`,Ic=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(ic,{...i,...r,ref:t})});Ic.displayName=Fc;var Lc=`DropdownMenuSeparator`,Rc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(ac,{...i,...r,ref:t})});Rc.displayName=Lc;var zc=`DropdownMenuArrow`,Bc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(oc,{...i,...r,ref:t})});Bc.displayName=zc;var Vc=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=pc(t),[s,c]=D({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,B.jsx)(sc,{...o,open:s,onOpenChange:c,children:n})},Hc=`DropdownMenuSubTrigger`,Uc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(cc,{...i,...r,ref:t})});Uc.displayName=Hc;var Wc=`DropdownMenuSubContent`,Gc=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=pc(n);return(0,B.jsx)(lc,{...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)`}})});Gc.displayName=Wc;var Kc=gc,qc=vc,Jc=bc,Yc=Sc,Xc=wc,Zc=Ec,Qc=Oc,$c=Ac,el=Pc,tl=Ic,nl=Rc,rl=Vc,il=Uc,al=Gc,ol=Kc,sl=qc,cl=Xc,ll=rl,ul=z.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,B.jsxs)(il,{ref:i,className:L(`flex cursor-default items-center gap-2 rounded-xs px-2 py-1.5 text-control outline-hidden select-none hover:bg-interactive-hover focus:bg-interactive-hover data-[state=open]:bg-interactive-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,B.jsx)(St,{className:`ml-auto`})]}));ul.displayName=il.displayName;var dl=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{className:Eo,children:(0,B.jsx)(al,{ref:n,className:L(`z-50 min-w-[8rem] overflow-hidden rounded-md border border-border/60 bg-surface-elevated-2 p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/30`,e),...t})}));dl.displayName=al.displayName;var fl=z.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,B.jsx)(Jc,{children:(0,B.jsx)(`div`,{className:Eo,children:(0,B.jsx)(Yc,{ref:r,className:L(`z-50 min-w-[8rem] overflow-hidden rounded-md border border-border/60 bg-surface-elevated-2 p-1 text-popover-foreground shadow-md dark:border-border/30`,`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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),sideOffset:t,...n})})}));fl.displayName=Yc.displayName;var pl=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(Qc,{ref:r,className:L(`relative flex cursor-pointer items-center gap-2 rounded-xs px-2 py-1.5 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),...n}));pl.displayName=Qc.displayName;var ml=z.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,B.jsxs)($c,{ref:i,checked:n,className:L(`relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...r,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,B.jsx)(tl,{children:(0,B.jsx)(et,{className:`size-4`})})}),t]}));ml.displayName=$c.displayName;var hl=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsxs)(el,{ref:r,className:L(`relative flex cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-control outline-hidden transition-colors select-none focus:bg-interactive-hover focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,B.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,B.jsx)(tl,{children:(0,B.jsx)(At,{className:`size-2 fill-current`})})}),t]}));hl.displayName=el.displayName;var gl=z.forwardRef(({className:e,inset:t,...n},r)=>(0,B.jsx)(Zc,{ref:r,className:L(`px-2 py-1.5 text-control font-semibold`,t&&`pl-8`,e),...n}));gl.displayName=Zc.displayName;var _l=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(nl,{ref:n,className:L(`-mx-1 my-1 h-px bg-muted`,e),...t}));_l.displayName=nl.displayName;var vl=({className:e,...t})=>(0,B.jsx)(`span`,{className:L(`ml-auto text-xs tracking-wider opacity-60`,e),...t});vl.displayName=`DropdownMenuShortcut`;function V(e){return()=>e().then(({default:e})=>({Component:e}))}var yl=(0,z.createContext)(void 0);function bl(){let e=(0,z.useContext)(yl);if(e===void 0)throw Error(`useEmberContext must be used within an EmberProvider`);return e}var xl=z.memo(function(){let e=(0,z.useRef)(null),{isFallbackPresent:t}=bl();return(0,z.useLayoutEffect)(()=>{if(e.current){let t=document.getElementById(`ember-app`);if(t)e.current.appendChild(t);else throw Error(`Ember app not found`)}return()=>{let e=document.getElementById(`ember-app`);if(e)document.body.appendChild(e);else throw Error(`Ember app not found`)}},[]),(0,B.jsx)(`div`,{ref:e,hidden:!t,className:`h-full w-full`})});function Sl({children:e}){let[t,n]=(0,z.useState)(0),r=(0,z.useCallback)(()=>{n(e=>e+1)},[]),i=(0,z.useCallback)(()=>{n(e=>Math.max(0,e-1))},[]),a={isFallbackPresent:t>0,registerFallback:r,unregisterFallback:i};return(0,B.jsx)(yl.Provider,{value:a,children:e})}function Cl(){let{registerFallback:e,unregisterFallback:t}=bl();return(0,z.useEffect)(()=>(e(),()=>{t()}),[e,t]),null}var wl={integration:`IntegrationsResponseType`,invite:`InvitesResponseType`,offer:`OffersResponseType`,newsletter:`NewslettersResponseType`,recommendation:`RecommendationResponseType`,setting:`SettingsResponseType`,theme:`ThemesResponseType`,tier:`TiersResponseType`,user:`UsersResponseType`,post:`PostsResponseType`,member:`MembersResponseType`,comment:`CommentsResponseType`,tag:`TagsResponseType`,label:`LabelsResponseType`,webhook:`WebhooksResponseType`};function Tl(e){if(typeof window>`u`)return()=>{};if(window.EmberBridge?.state)return e(window.EmberBridge.state),()=>{};let t=setInterval(()=>{window.EmberBridge?.state&&(clearInterval(t),e(window.EmberBridge.state))},100);return()=>clearInterval(t)}function El(e,t){let n=null,r=!0,i=Tl(i=>{r&&(i.on(e,t),n=()=>i.off(e,t))});return()=>{r=!1,i(),n?.()}}function Dl(){let e=a();(0,z.useEffect)(()=>El(`emberDataChange`,t=>{let{modelName:n}=t,r=wl[n];r&&e.invalidateQueries({predicate:e=>e.queryKey[0]===r})}),[e])}function Ol(){let e=a();(0,z.useEffect)(()=>El(`emberAuthChange`,t=>{t.isAuthenticated&&e.invalidateQueries()}),[e])}function kl(){let[e,t]=(0,z.useState)(null);return(0,z.useEffect)(()=>El(`subscriptionChange`,e=>{t(e)}),[]),e}function Al(e){return El(`openGiftLinkModal`,e)}function jl(e){return El(`sidebarVisibilityChange`,e)}function Ml(){return window.EmberBridge?.state.sidebarVisible??!0}function Nl(){return(0,z.useSyncExternalStore)(jl,Ml,Ml)}var Pl={getRouteUrl:e=>e,isRouteActive:()=>!1};function Fl(){let[e,t]=(0,z.useState)(()=>window.EmberBridge?.state??null),[,n]=(0,z.useState)(0);return(0,z.useEffect)(()=>{if(!e)return Tl(t);let r=()=>{n(e=>e+1)};return e.on(`routeChange`,r),()=>e.off(`routeChange`,r)},[e]),e?{getRouteUrl:e.getRouteUrl,isRouteActive:e.isRouteActive}:Pl}function Il(){let{data:e}=ia(),t=kl();return!(!e?.config?.hostSettings?.forceUpgrade||t?.subscription?.status===`active`)}function Ll(){let e=Il(),t=P().some(e=>e.handle?.allowInForceUpgrade===!0);return e&&!t?(0,B.jsx)(we,{to:`/pro`,replace:!0}):(0,B.jsx)(I,{})}var Rl=`Dialog`,[zl,Bl]=M(Rl),[Vl,Hl]=zl(Rl),Ul=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=z.useRef(null),c=z.useRef(null),[l,u]=D({prop:r,defaultProp:i??!1,onChange:a,caller:Rl});return(0,B.jsx)(Vl,{scope:t,triggerRef:s,contentRef:c,contentId:O(),titleId:O(),descriptionId:O(),open:l,onOpenChange:u,onOpenToggle:z.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Ul.displayName=Rl;var Wl=`DialogTrigger`,Gl=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Hl(Wl,n),a=v(t,i.triggerRef);return(0,B.jsx)(C.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":du(i.open),...r,ref:a,onClick:k(e.onClick,i.onOpenToggle)})});Gl.displayName=Wl;var Kl=`DialogPortal`,[ql,Jl]=zl(Kl,{forceMount:void 0}),Yl=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Hl(Kl,t);return(0,B.jsx)(ql,{scope:t,forceMount:n,children:z.Children.map(r,e=>(0,B.jsx)(A,{present:n||a.open,children:(0,B.jsx)(T,{asChild:!0,container:i,children:e})}))})};Yl.displayName=Kl;var Xl=`DialogOverlay`,Zl=z.forwardRef((e,t)=>{let n=Jl(Xl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Hl(Xl,e.__scopeDialog);return a.modal?(0,B.jsx)(A,{present:r||a.open,children:(0,B.jsx)($l,{...i,ref:t})}):null});Zl.displayName=Xl;var Ql=y(`DialogOverlay.RemoveScroll`),$l=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Hl(Xl,n),a=v(t,te());return(0,B.jsx)(ie,{as:Ql,allowPinchZoom:!0,shards:[i.contentRef],children:(0,B.jsx)(C.div,{"data-state":du(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),eu=`DialogContent`,tu=z.forwardRef((e,t)=>{let n=Jl(eu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Hl(eu,e.__scopeDialog);return(0,B.jsx)(A,{present:r||a.open,children:a.modal?(0,B.jsx)(nu,{...i,ref:t}):(0,B.jsx)(ru,{...i,ref:t})})});tu.displayName=eu;var nu=z.forwardRef((e,t)=>{let n=Hl(eu,e.__scopeDialog),r=z.useRef(null),i=v(t,n.contentRef,r);return z.useEffect(()=>{let e=r.current;if(e)return ee(e)},[]),(0,B.jsx)(iu,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:k(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:k(e.onFocusOutside,e=>e.preventDefault())})}),ru=z.forwardRef((e,t)=>{let n=Hl(eu,e.__scopeDialog),r=z.useRef(!1),i=z.useRef(!1);return(0,B.jsx)(iu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),iu=z.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Hl(eu,n);return re(),(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(ne,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,B.jsx)(E,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":du(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),au=`DialogTitle`,ou=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Hl(au,n);return(0,B.jsx)(C.h2,{id:i.titleId,...r,ref:t})});ou.displayName=au;var su=`DialogDescription`,cu=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Hl(su,n);return(0,B.jsx)(C.p,{id:i.descriptionId,...r,ref:t})});cu.displayName=su;var lu=`DialogClose`,uu=z.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Hl(lu,n);return(0,B.jsx)(C.button,{type:`button`,...r,ref:t,onClick:k(e.onClick,()=>i.onOpenChange(!1))})});uu.displayName=lu;function du(e){return e?`open`:`closed`}var fu=Ul,pu=Gl,mu=Yl,hu=uu,gu=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Zl,{ref:n,className:L(`fixed inset-0 z-50 transform-gpu bg-black/30 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 dark:bg-black/60`,e),...t}));gu.displayName=Zl.displayName;var _u=z.forwardRef(({className:e,children:t,...n},r)=>(0,B.jsx)(mu,{children:(0,B.jsxs)(`div`,{className:Eo,children:[(0,B.jsx)(gu,{}),(0,B.jsx)(tu,{ref:r,className:L(`fixed top-[8vmin] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] transform-gpu gap-6 bg-surface-elevated-2 p-6 shadow-lg outline-hidden duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:rounded-lg`,e),...n,children:t})]})}));_u.displayName=tu.displayName;var vu=({className:e,...t})=>(0,B.jsx)(`div`,{className:L(`flex flex-col gap-y-1.5 text-center sm:text-left`,e),...t});vu.displayName=`DialogHeader`;var yu=({className:e,...t})=>(0,B.jsx)(`div`,{className:L(`flex flex-col-reverse sm:flex-row sm:items-end sm:justify-end sm:gap-2 [&_button]:min-w-20`,e),...t});yu.displayName=`DialogFooter`;var bu=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ou,{ref:n,className:L(`text-xl leading-none font-semibold tracking-tight`,e),...t}));bu.displayName=ou.displayName;var xu=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(cu,{ref:n,className:L(`text-muted-foreground`,e),...t}));xu.displayName=cu.displayName;var Su=e(Tt(),1),Cu=e=>e.format(`YYYY-MM-DD`),wu=e=>Math.round(e/100),Tu=e=>{if(!e.length)return{min:0,max:1};let t=e.map(e=>Number(e.value)),n=Math.min(...t),r=Math.max(...t);if(n===r){let e=n;return{min:Math.max(0,e-1),max:e+1}}let i=.02;n=Math.max(0,n-n*i),r+=r*i;let a=r-n,o=10**Math.floor(Math.log10(a)),s=Math.round(r/o)*o;r=s<r?Math.ceil(r/o)*o:s;let c=Math.round(n/o)*o;if(n=c>n?Math.floor(n/o)*o:c,n=Math.max(0,n),n===r){let e=(n+r)/2,t=Math.max(Math.abs(e)*i,o);n=Math.max(0,Math.floor(e-t)),r=Math.ceil(e+t)}return n=Math.max(0,n),{min:n,max:r}},Eu=(e,t)=>{if(!e.length)return 40;let n=Math.max(...e.map(e=>t(e).length));return Math.max(20,n*8+20)},Du=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,Su.default)(e).tz(t).startOf(`day`),r=(0,Su.default)().tz(t).startOf(`day`).diff(n,`days`)+1;return Math.max(r,1)},Ou=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,Su.default)().tz(t).endOf(`day`),r;return r=e===-1?(0,Su.default)().tz(t).startOf(`year`):(0,Su.default)().tz(t).subtract(e-1,`days`).startOf(`day`),{startDate:r,endDate:n,timezone:t}},ku=(e,t,n=`value`,r=`avg`)=>{if(!e.length)return[];if(t>=91&&t<=356){let t=[],i=(0,Su.default)(e[0].date).startOf(`week`),a=0,o=0,s=0;return e.forEach((c,l)=>{let u=(0,Su.default)(c.date);u.isSame(i,`week`)?(a+=Number(c[n]),o+=1,s=Number(c[n])):(t.push({...e[l-1],date:i.format(`YYYY-MM-DD`),[n]:r===`sum`?a:r===`avg`?o>0?a/o:0:s}),i=u.startOf(`week`),a=Number(c[n]),o=1,s=Number(c[n])),l===e.length-1&&t.push({...c,date:i.format(`YYYY-MM-DD`),[n]:r===`sum`?a:r===`avg`?o>0?a/o:0:s})}),t}else if(t>356){let t=[],i=(0,Su.default)(e[0].date).startOf(`month`),a=0,o=0,s=0;return e.forEach((c,l)=>{let u=(0,Su.default)(c.date);u.isSame(i,`month`)?(a+=Number(c[n]),o+=1,s=Number(c[n])):(t.push({...e[l-1],date:i.format(`YYYY-MM-DD`),[n]:r===`sum`?a:r===`avg`?o>0?a/o:0:s}),i=u.startOf(`month`),a=Number(c[n]),o=1,s=Number(c[n])),l===e.length-1&&t.push({...c,date:i.format(`YYYY-MM-DD`),[n]:r===`sum`?a:r===`avg`?o>0?a/o:0:s})}),t}return e},Au=(e,t,n=!1,r=!1)=>t===1&&r?(0,Su.default)(e).format(`h:mma`):t===1&&n?(0,Su.default)(e).format(`MMM D, h:mma`):t>365?(0,Su.default)(e).format(`MMM YYYY`):t>=91?`Week of ${Dt(e)}`:Dt(e),ju=e=>e.name&&e.name.trim()||e.email||`Unknown Member`,Mu=e=>{let t=ju(e),n=t.split(` `);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t.substring(0,2).toUpperCase()},Nu=ji,Pu=Mi,Fu=Ni,Iu=z.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,B.jsx)(Pi,{children:(0,B.jsx)(`div`,{className:Eo,children:(0,B.jsx)(Fi,{ref:r,className:L(`z-50 animate-in overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 dark:bg-popover dark:text-popover-foreground`,e),sideOffset:t,...n})})}));Iu.displayName=Fi.displayName;var Lu=({open:e,defaultOpen:t,onOpenChange:n,children:r,...i})=>{let a=e!==void 0,[o,s]=z.useState(t??!1),c=a?e:o,l=z.useCallback(e=>{a||s(e),n?.(e)},[a,n]),u=z.useRef(l);return z.useEffect(()=>{u.current=l},[l]),z.useEffect(()=>{if(!c)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),u.current(!1))};return document.addEventListener(`keydown`,e,{capture:!0}),()=>document.removeEventListener(`keydown`,e,{capture:!0})},[c]),(0,B.jsx)(er,{...i,open:c,onOpenChange:l,children:r})},Ru=nr,zu=ar,Bu=z.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,B.jsx)(rr,{children:(0,B.jsx)(`div`,{className:Eo,children:(0,B.jsx)(ir,{ref:i,align:t,className:L(`z-50 origin-(--radix-popover-content-transform-origin) rounded-md border border-border/60 bg-surface-elevated-2 p-5 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/30`,e),sideOffset:n,...r})})}));Bu.displayName=ir.displayName;var Vu={base:`rounded-md border border-control-border bg-surface-elevated transition-colors dark:bg-transparent`,focusSelf:`focus-visible:outline-hidden focus-visible:bg-transparent focus-visible:border-focus-ring focus-visible:ring-2 focus-visible:ring-focus-ring/25`,focusWithin:`has-[:focus-visible]:outline-hidden has-[:focus-visible]:bg-transparent has-[:focus-visible]:border-focus-ring has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-focus-ring/25`,invalidSelf:`aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-destructive/20 dark:aria-[invalid=true]:ring-destructive/40`,invalidWithin:`has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-destructive/20 dark:has-[[aria-invalid=true]]:ring-destructive/40`,disabledSelf:`disabled:cursor-not-allowed disabled:opacity-50`};function Hu(e=`self`){return e===`self`?L(Vu.base,Vu.focusSelf,Vu.invalidSelf,Vu.disabledSelf):L(Vu.base,Vu.focusWithin,Vu.invalidWithin)}var Uu=z.forwardRef(({className:e,type:t,...n},r)=>(0,B.jsx)(`input`,{ref:r,className:L(Hu(`self`),`flex h-9 w-full px-3 py-1 text-control file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground`,e),type:t,...n}));Uu.displayName=`Input`;var Wu=`AlertDialog`,[Gu,Ku]=M(Wu,[Bl]),qu=Bl(),Ju=e=>{let{__scopeAlertDialog:t,...n}=e,r=qu(t);return(0,B.jsx)(Ul,{...r,...n,modal:!0})};Ju.displayName=Wu;var Yu=`AlertDialogTrigger`,Xu=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=qu(n);return(0,B.jsx)(Gl,{...i,...r,ref:t})});Xu.displayName=Yu;var Zu=`AlertDialogPortal`,Qu=e=>{let{__scopeAlertDialog:t,...n}=e,r=qu(t);return(0,B.jsx)(Yl,{...r,...n})};Qu.displayName=Zu;var $u=`AlertDialogOverlay`,ed=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=qu(n);return(0,B.jsx)(Zl,{...i,...r,ref:t})});ed.displayName=$u;var td=`AlertDialogContent`,[nd,rd]=Gu(td),id=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=qu(n),o=v(t,z.useRef(null)),s=z.useRef(null);return(0,B.jsx)(nd,{scope:n,cancelRef:s,children:(0,B.jsx)(tu,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:k(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});id.displayName=td;var ad=`AlertDialogTitle`,od=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=qu(n);return(0,B.jsx)(ou,{...i,...r,ref:t})});od.displayName=ad;var sd=`AlertDialogDescription`,cd=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=qu(n);return(0,B.jsx)(cu,{...i,...r,ref:t})});cd.displayName=sd;var ld=`AlertDialogAction`,ud=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=qu(n);return(0,B.jsx)(uu,{...i,...r,ref:t})});ud.displayName=ld;var dd=`AlertDialogCancel`,fd=z.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=rd(dd,n),a=qu(n),o=v(t,i);return(0,B.jsx)(uu,{...a,...r,ref:o})});fd.displayName=dd;var pd=Ju,md=Xu,hd=Qu,gd=ed,_d=id,vd=ud,yd=fd,bd=od,xd=cd,Sd=pd,Cd=md,wd=hd,Td=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(gd,{className:L(`fixed inset-0 z-50 transform-gpu bg-black/30 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 dark:bg-black/60`,e),...t,ref:n}));Td.displayName=gd.displayName;var Ed=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(wd,{children:(0,B.jsxs)(`div`,{className:Eo,children:[(0,B.jsx)(Td,{onClick:e=>e.stopPropagation()}),(0,B.jsx)(_d,{ref:n,className:L(`fixed top-[20%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-surface-elevated-2 p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg`,e),...t})]})}));Ed.displayName=_d.displayName;var Dd=({className:e,...t})=>(0,B.jsx)(`div`,{className:L(`flex flex-col gap-y-2 text-center sm:text-left`,e),...t});Dd.displayName=`AlertDialogHeader`;var Od=({className:e,...t})=>(0,B.jsx)(`div`,{className:L(`flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2 [&>button]:min-w-20`,e),...t});Od.displayName=`AlertDialogFooter`;var kd=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(bd,{ref:n,className:L(`text-xl font-semibold`,e),...t}));kd.displayName=bd.displayName;var Ad=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(xd,{ref:n,className:L(`text-base`,e),...t}));Ad.displayName=xd.displayName;var jd=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(vd,{ref:n,className:L(Ct(),e),...t}));jd.displayName=vd.displayName;var Md=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(yd,{ref:n,className:L(Ct({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));Md.displayName=yd.displayName;var Nd=(0,z.lazy)(()=>N(()=>import(`./dist-CT46_f_J.js`),__vite__mapDeps([0,1,2]),import.meta.url)),Pd=e=>(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{}),children:(0,B.jsx)(Nd,{...e})}),Fd=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Wi,{ref:n,className:L(`aspect-square size-full`,e),...t}));Fd.displayName=Wi.displayName;var Id=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Ki,{ref:n,className:L(`flex size-full items-center justify-center rounded-full bg-muted [&_svg]:size-4`,e),...t}));Id.displayName=Ki.displayName;function Ld({src:e}){let[t,n]=z.useState(!1);return z.useEffect(()=>{n(!1)},[e]),(0,B.jsx)(`img`,{alt:``,className:L(`absolute inset-0 size-full object-cover`,!t&&`invisible`),src:e,onLoad:e=>{let{naturalWidth:t,naturalHeight:r}=e.currentTarget;t>1&&r>1&&n(!0)}})}var Rd=z.forwardRef(({className:e,children:t,src:n,name:r,email:i,...a},o)=>{let s={name:r||void 0,email:i||void 0},c=!!(r||i),l=c?Mu(s):null,u=c?Mt(ju(s),`45`,`55`):void 0;return(0,B.jsx)(Hi,{ref:o,className:L(`relative flex size-8 shrink-0 overflow-hidden rounded-full`,e),...a,children:t??(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Id,{className:L(`text-xs text-muted-foreground md:text-sm [&_svg]:size-3 md:[&_svg]:size-4`,c&&`font-semibold text-white`),style:c?{backgroundColor:u}:void 0,children:l??(0,B.jsx)(ot,{})}),n&&(0,B.jsx)(Ld,{src:n})]})})});Rd.displayName=Hi.displayName;var zd=Ze(`inline-flex items-center rounded-xs border px-1.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:outline-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground/70`,destructive:`border-transparent bg-destructive/20 text-destructive`,success:`border-transparent bg-green/20 text-green`,warning:`border-transparent bg-state-warning/20 text-yellow-600`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function Bd({className:e,variant:t,...n}){return(0,B.jsx)(`div`,{className:L(zd({variant:t}),e),...n})}var Vd=Ze(`relative block rounded-lg transition-all duration-300`,{variants:{variant:{default:`border border-border-default bg-surface-panel shadow-sm hover:shadow-md`,gradient:[`cursor-pointer bg-surface-elevated`,`shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_28%),7px_6px_42px_8px_rgb(202_103_255_/_32%)]`,`dark:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_36%),7px_6px_42px_8px_rgb(202_103_255_/_38%)]`,`hover:shadow-[-7px_-4px_42px_10px_rgb(75_225_226_/_38%),7px_8px_42px_10px_rgb(202_103_255_/_42%)]`,`dark:hover:shadow-[-7px_-4px_42px_10px_rgb(75_225_226_/_50%),7px_8px_42px_10px_rgb(202_103_255_/_52%)]`,`hover:translate-y-[-2px] hover:scale-[1.01]`],info:`border border-state-info/40 bg-state-info/10`,success:`border border-state-success/40 bg-state-success/10`,warning:`border border-state-warning/40 bg-state-warning/10`,destructive:`bg-surface-panel shadow-sm`},size:{sm:`p-2 text-sm`,md:`p-3`,lg:`p-4`}},defaultVariants:{variant:`default`,size:`md`}}),Hd=z.forwardRef((e,t)=>{let{variant:n,size:r,dismissible:i=!1,onDismiss:a,role:o=`status`,className:s,children:c,...l}=e,u=e=>{e.preventDefault(),e.stopPropagation(),i&&a&&a()};return(0,B.jsxs)(`div`,{ref:t,className:L(Vd({variant:n,size:r}),s),role:o,...l,children:[i&&(0,B.jsx)(R,{"aria-label":`Dismiss notification`,className:`absolute top-1 right-1 size-8 text-text-secondary hover:bg-transparent hover:text-text-primary`,size:`icon`,variant:`ghost`,onClick:u,children:(0,B.jsx)(tt,{className:`size-5`})}),c]})});Hd.displayName=`Banner`;var Ud=z.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,B.jsx)(nn,{ref:i,className:L(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),decorative:n,orientation:t,...r}));Ud.displayName=nn.displayName;var Wd,Gd=`HoverCard`,[Kd,qd]=M(Gd,[oe]),Jd=oe(),[Yd,Xd]=Kd(Gd),Zd=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,c=Jd(t),l=z.useRef(0),u=z.useRef(0),d=z.useRef(!1),f=z.useRef(!1),[p,m]=D({prop:r,defaultProp:i??!1,onChange:a,caller:Gd}),h=z.useCallback(()=>{clearTimeout(u.current),l.current=window.setTimeout(()=>m(!0),o)},[o,m]),g=z.useCallback(()=>{clearTimeout(l.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),_=z.useCallback(()=>m(!1),[m]);return z.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(u.current)},[]),(0,B.jsx)(Yd,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:_,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,B.jsx)(se,{...c,children:n})})};Zd.displayName=Gd;var Qd=`HoverCardTrigger`,$d=z.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=Xd(Qd,n),a=Jd(n);return(0,B.jsx)(ue,{asChild:!0,...a,children:(0,B.jsx)(C.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:k(e.onPointerEnter,uf(i.onOpen)),onPointerLeave:k(e.onPointerLeave,uf(i.onClose)),onFocus:k(e.onFocus,i.onOpen),onBlur:k(e.onBlur,i.onClose),onTouchStart:k(e.onTouchStart,e=>e.preventDefault())})})});$d.displayName=Qd;var ef=`HoverCardPortal`,[tf,nf]=Kd(ef,{forceMount:void 0}),rf=e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Xd(ef,t);return(0,B.jsx)(tf,{scope:t,forceMount:n,children:(0,B.jsx)(A,{present:n||a.open,children:(0,B.jsx)(T,{asChild:!0,container:i,children:r})})})};rf.displayName=ef;var af=`HoverCardContent`,of=z.forwardRef((e,t)=>{let n=nf(af,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Xd(af,e.__scopeHoverCard);return(0,B.jsx)(A,{present:r||a.open,children:(0,B.jsx)(sf,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:k(e.onPointerEnter,uf(a.onOpen)),onPointerLeave:k(e.onPointerLeave,uf(a.onClose)),ref:t})})});of.displayName=af;var sf=z.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,c=Xd(af,n),l=Jd(n),u=z.useRef(null),d=v(t,u),[f,p]=z.useState(!1);return z.useEffect(()=>{if(f){let e=document.body;return Wd=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Wd,e.style.webkitUserSelect=Wd}}},[f]),z.useEffect(()=>{if(u.current){let e=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(c.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),z.useEffect(()=>{u.current&&df(u.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,B.jsx)(E,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:k(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:(0,B.jsx)(le,{...l,...s,onPointerDown:k(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?`text`:void 0,WebkitUserSelect:f?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),cf=`HoverCardArrow`,lf=z.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=Jd(n);return(0,B.jsx)(ce,{...i,...r,ref:t})});lf.displayName=cf;function uf(e){return t=>t.pointerType===`touch`?void 0:e()}function df(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var ff=Zd,pf=$d,mf=rf,hf=of,gf=ff,_f=pf,vf=z.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,B.jsx)(mf,{children:(0,B.jsx)(`div`,{className:Eo,children:(0,B.jsx)(hf,{ref:i,align:t,className:L(`pointer-events-auto z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),sideOffset:n,...r})})}));vf.displayName=hf.displayName;var yf=Ze(`rounded-full`,{variants:{variant:{neutral:`bg-muted`,info:`bg-state-info`,success:`bg-state-success`,error:`bg-state-danger`,warning:`bg-state-warning`},state:{idle:``,active:`animate-pulse`,inactive:`border-2 bg-transparent`},size:{sm:`size-2`,md:`size-3`,lg:`size-4`}},compoundVariants:[{variant:`neutral`,state:`inactive`,className:`border-muted-foreground`},{variant:`info`,state:`inactive`,className:`border-state-info`},{variant:`success`,state:`inactive`,className:`border-state-success`},{variant:`error`,state:`inactive`,className:`border-state-danger`},{variant:`warning`,state:`inactive`,className:`border-state-warning`}],defaultVariants:{variant:`success`,state:`idle`,size:`sm`}});function bf({className:e,variant:t,state:n,size:r,label:i,...a}){return(0,B.jsxs)(`span`,{className:`inline-flex items-center`,...a,children:[(0,B.jsx)(`span`,{"aria-hidden":`true`,className:L(yf({variant:t,state:n,size:r}),e)}),i&&(0,B.jsx)(`span`,{className:`sr-only`,children:i})]})}function xf({className:e,...t}){return(0,B.jsx)(`kbd`,{className:L(`pointer-events-none m-0 inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-xs border-none bg-muted px-1 font-sans text-xs font-medium text-muted-foreground shadow-none select-none text-shadow-none`,`[&_svg:not([class*='size-'])]:size-3`,`[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10`,e),"data-slot":`kbd`,...t})}function H({containerClassName:e,count:t=1,randomize:n=!1,minWidth:r=70,maxWidth:i=100,className:a,...o}){let{randomWidths:s,keys:c}=(0,z.useMemo)(()=>{let e=[],a=[];for(let o=0;o<t;o++){if(n){let t=Math.floor((i-r)/5),n=r+Math.floor(Math.random()*(t+1))*5;e.push(`${n}%`)}a.push(`skeleton-${o}`)}return{randomWidths:e,keys:a}},[t,n,r,i]);return(0,B.jsx)(`span`,{className:e,children:Array.from({length:t}).map((e,t)=>(0,B.jsxs)(z.Fragment,{children:[(0,B.jsx)(`span`,{className:L(`inline-flex w-full animate-pulse rounded-[2px] bg-primary/10 leading-none`,a),style:n?{width:s[t]}:void 0,...o,children:``}),(0,B.jsx)(`br`,{})]},c[t]))})}var Sf=z.forwardRef(({className:e,lines:t=5,...n},r)=>t<1?(0,B.jsx)(B.Fragment,{}):(0,B.jsx)(`div`,{ref:r,className:L(`flex flex-col gap-2`,e),...n,children:Array.from({length:t},(e,t)=>{let n=`66%`;switch(t%5){case 0:n=`57%`;break;case 1:n=`33%`;break;case 2:n=`40%`;break;case 3:n=`48%`;break;case 4:n=`24%`;break}return(0,B.jsxs)(`div`,{className:`flex justify-between gap-6`,children:[(0,B.jsx)(`div`,{className:`grow`,style:{maxWidth:n},children:(0,B.jsx)(H,{})}),(0,B.jsx)(H,{className:`w-[60px] self-end`})]},t)})}));Sf.displayName=`SkeletonTable`;var Cf=({size:e=`md`,color:t=`dark`,className:n=``})=>{let r=`relative mx-0 my-[-0.5] box-border inline-block animate-spin rounded-full before:z-10 before:block before:rounded-full before:content-['']`;switch(e){case`sm`:r+=` h-[16px] w-[16px] border-2 before:mt-[10px] before:h-[3px] before:w-[3px]`;break;case`md`:r+=` h-[20px] w-[20px] border-2 before:mt-[13px] before:h-[3px] before:w-[3px]`;break;default:r+=` h-[50px] w-[50px] border before:mt-[7px] before:h-[7px] before:w-[7px]`;break}switch(t){case`light`:r+=` border-white/20 before:bg-white dark:border-black/10 dark:before:bg-black`;break;default:r+=` border-black/10 before:bg-black dark:border-white/20 dark:before:bg-white`;break}return(0,B.jsx)(`div`,{className:`${r} ${n}`})},wf=()=>(0,B.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3`,children:(0,B.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full`,children:(0,B.jsxs)(`div`,{className:`-mt-1.5 flex items-end gap-2`,children:[(0,B.jsx)(H,{className:`h-10 w-3`}),(0,B.jsx)(H,{className:`h-14 w-3`}),(0,B.jsx)(H,{className:`h-6 w-3`})]})})}),Tf=({className:e=``,children:t})=>(0,B.jsx)(`div`,{className:`my-10 flex flex-col items-center gap-1 text-sm text-text-secondary ${e}`,children:t}),Ef=({className:e=``,children:t})=>(0,B.jsx)(`div`,{className:`text-text-tertiary [&>svg]:size-8 [&>svg]:stroke-[1px] ${e}`,children:t}),Df=Ul,Of=Gl,kf=Yl,Af=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Zl,{className:L(`fixed inset-0 z-50 bg-black/10 duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t,ref:n}));Af.displayName=Zl.displayName;var jf=Ze(`fixed z-50 gap-4 bg-surface-elevated p-8 shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:animate-in data-[state=open]:duration-500`,{variants:{side:{top:`inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,bottom:`inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,left:`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,right:`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`}},defaultVariants:{side:`right`}}),Mf=z.forwardRef(({side:e=`right`,className:t,children:n,...r},i)=>(0,B.jsx)(kf,{children:(0,B.jsxs)(`div`,{className:Eo,children:[(0,B.jsx)(Af,{}),(0,B.jsxs)(tu,{ref:i,className:L(jf({side:e}),t),...r,children:[(0,B.jsxs)(uu,{className:`fixed top-4 right-4 z-50 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,B.jsx)(tt,{className:`size-4`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),n]})]})}));Mf.displayName=tu.displayName;var Nf=({className:e,...t})=>(0,B.jsx)(`div`,{className:L(`flex flex-col space-y-1 text-center sm:text-left`,e),...t});Nf.displayName=`SheetHeader`;var Pf=({className:e,...t})=>(0,B.jsx)(`div`,{className:L(`flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2`,e),...t});Pf.displayName=`SheetFooter`;var Ff=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(ou,{ref:n,className:L(`text-xl font-semibold text-foreground`,e),...t}));Ff.displayName=ou.displayName;var If=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(cu,{ref:n,className:L(`text-sm text-muted-foreground`,e),...t}));If.displayName=cu.displayName;var Lf=801;function Rf(){return window.innerWidth<Lf}function zf(){let[e,t]=z.useState(Rf());return z.useEffect(()=>{let e=window.matchMedia(`(max-width: ${Lf-1}px)`),n=()=>{t(Rf())};return e.addEventListener(`change`,n),t(Rf()),()=>e.removeEventListener(`change`,n)},[]),e}var Bf=`sidebar:state`,Vf=3600*24*7,Hf=`300px`,Uf=`28rem`,Wf=`4rem`,Gf=`b`,Kf=`(--control-height)`,qf=z.createContext(null);function Jf(){let e=z.useContext(qf);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}var Yf=z.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o},s)=>{let c=zf(),[l,u]=z.useState(!1),d=z.useId(),[f,p]=z.useState(e),m=t??f,h=z.useCallback(e=>{let t=typeof e==`function`?e(m):e;n?n(t):p(t),document.cookie=`${Bf}=${t}; path=/; max-age=${Vf}`},[n,m]),g=z.useCallback(()=>c?u(e=>!e):h(e=>!e),[c,h,u]);z.useEffect(()=>{let e=e=>{e.key===Gf&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]);let _=m?`expanded`:`collapsed`,v=z.useMemo(()=>({state:_,open:m,setOpen:h,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:g,sidebarId:d}),[_,m,h,c,l,u,g,d]);return(0,B.jsx)(qf.Provider,{value:v,children:(0,B.jsx)(Nu,{delayDuration:0,children:(0,B.jsx)(`div`,{ref:s,className:L(`group/sidebar-wrapper relative flex size-full has-[[data-variant=inset]]:bg-sidebar`,r),style:{"--sidebar-width":Hf,"--sidebar-width-icon":Wf,...i},...o,children:a})})})});Yf.displayName=`SidebarProvider`;var Xf=z.forwardRef(({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a},o)=>{let{isMobile:s,state:c,openMobile:l,setOpenMobile:u,sidebarId:d}=Jf();return n===`none`?(0,B.jsx)(`div`,{ref:o,className:L(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),id:d,role:`navigation`,...a,children:i}):s?(0,B.jsx)(Df,{open:l,onOpenChange:u,...a,children:(0,B.jsx)(Mf,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,id:d,role:`navigation`,side:e,style:{"--sidebar-width":Uf},children:(0,B.jsx)(`div`,{className:`flex size-full flex-col`,children:i})})}):(0,B.jsxs)(`div`,{ref:o,className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":c===`collapsed`?n:``,"data-side":e,"data-state":c,"data-variant":t,id:d,role:`navigation`,children:[(0,B.jsx)(`div`,{className:L(`relative h-full w-(--sidebar-width) bg-transparent`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_1.6rem)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,B.jsx)(`div`,{className:L(`absolute inset-y-0 z-10 hidden h-full w-(--sidebar-width) md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_1.6rem_+2px)]`:`border-sidebar-border group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,B.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow`,"data-sidebar":`sidebar`,children:i})})]})});Xf.displayName=`Sidebar`;var Zf=z.forwardRef(({children:e,className:t,onClick:n,...r},i)=>{let{toggleSidebar:a,open:o,openMobile:s,isMobile:c,sidebarId:l}=Jf();return(0,B.jsx)(R,{ref:i,"aria-controls":l,"aria-expanded":c?s:o,className:L(`size-7`,t),"data-sidebar":`trigger`,size:`icon`,variant:`ghost`,onClick:e=>{n?.(e),a()},...r,children:e||(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Et,{}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})})});Zf.displayName=`SidebarTrigger`;var Qf=z.forwardRef(({className:e,...t},n)=>{let{toggleSidebar:r}=Jf();return(0,B.jsx)(`button`,{ref:n,"aria-label":`Toggle Sidebar`,className:L(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),"data-sidebar":`rail`,tabIndex:-1,title:`Toggle Sidebar`,type:`button`,onClick:r,...t})});Qf.displayName=`SidebarRail`;var $f=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`main`,{ref:n,className:L(`relative flex h-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2`,e),...t}));$f.displayName=`SidebarInset`;var ep=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Uu,{ref:n,className:L(`w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring`,`h-${Kf}`,e),"data-sidebar":`input`,...t}));ep.displayName=`SidebarInput`;var tp=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:L(`flex flex-col gap-2 p-2`,e),"data-sidebar":`header`,...t}));tp.displayName=`SidebarHeader`;var np=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:L(`flex flex-col gap-2 p-2`,e),"data-sidebar":`footer`,...t}));np.displayName=`SidebarFooter`;var rp=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(Ud,{ref:n,className:L(`mx-2 w-auto bg-sidebar-border`,e),"data-sidebar":`separator`,...t}));rp.displayName=`SidebarSeparator`;var ip=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:L(`flex min-h-0 flex-1 flex-col gap-4 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),"data-sidebar":`content`,...t}));ip.displayName=`SidebarContent`;var ap=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:L(`relative flex w-full min-w-0 flex-col p-2`,e),"data-sidebar":`group`,...t}));ap.displayName=`SidebarGroup`;var op=z.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,B.jsx)(t?x:`div`,{ref:r,className:L(`flex shrink-0 items-center rounded-md px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-all duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,`h-${Kf}`,e),"data-sidebar":`group-label`,...n}));op.displayName=`SidebarGroupLabel`;var sp=z.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,B.jsx)(t?x:`button`,{ref:r,className:L(`absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:md:hidden`,`group-data-[collapsible=icon]:hidden`,e),"data-sidebar":`group-action`,...n}));sp.displayName=`SidebarGroupAction`;var cp=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:L(`w-full text-control`,e),"data-sidebar":`group-content`,...t}));cp.displayName=`SidebarGroupContent`;var lp=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`ul`,{ref:n,className:L(`flex w-full min-w-0 flex-col gap-px`,e),"data-sidebar":`menu`,...t}));lp.displayName=`SidebarMenu`;var up=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`li`,{ref:n,className:L(`group/menu-item relative`,e),"data-sidebar":`menu-item`,...t}));up.displayName=`SidebarMenuItem`;var dp=Ze(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md px-3 py-2 text-left text-control font-medium text-sidebar-foreground ring-sidebar-ring outline-hidden transition-all group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:hover:bg-sidebar-accent data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground dark:hover:bg-gray-900/30 dark:data-[active=true]:hover:bg-sidebar-accent [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground dark:hover:bg-gray-900/30`,outline:`border border-sidebar-border bg-background hover:border-sidebar-accent hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`},size:{default:`h-${Kf} text-control`,sm:`h-7 text-sm`,lg:`h-12 text-md group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}}),fp=z.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o},s)=>{let c=e?x:`button`,{isMobile:l,state:u}=Jf(),d=(0,B.jsx)(c,{ref:s,className:L(dp({variant:n,size:r}),a),"data-active":t,"data-sidebar":`menu-button`,"data-size":r,...o});return i?(typeof i==`string`&&(i={children:i}),(0,B.jsxs)(Pu,{children:[(0,B.jsx)(Fu,{asChild:!0,children:d}),(0,B.jsx)(Iu,{align:`center`,hidden:u!==`collapsed`||l,side:`right`,...i})]})):d});fp.displayName=`SidebarMenuButton`;var pp=z.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>(0,B.jsx)(t?x:`button`,{ref:i,className:L(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:md:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:opacity-0`,e),"data-sidebar":`menu-action`,...r}));pp.displayName=`SidebarMenuAction`;var mp=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`div`,{ref:n,className:L(`pointer-events-none absolute right-2 flex items-center justify-center rounded-md px-1 text-sm font-medium text-text-secondary tabular-nums select-none dark:text-gray-800`,`peer-hover/menu-button: peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1.5`,`peer-data-[size=default]/menu-button:top-2`,`peer-data-[size=lg]/menu-button:top-3`,`group-data-[collapsible=icon]:hidden`,e),"data-sidebar":`menu-badge`,...t}));mp.displayName=`SidebarMenuBadge`;var hp=z.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{let i=z.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,B.jsxs)(`div`,{ref:r,className:L(`flex items-center gap-2 rounded-md px-3`,`h-${Kf}`,e),"data-sidebar":`menu-skeleton`,...n,children:[t&&(0,B.jsx)(H,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,B.jsx)(H,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})});hp.displayName=`SidebarMenuSkeleton`;var gp=z.forwardRef(({className:e,...t},n)=>(0,B.jsx)(`ul`,{ref:n,className:L(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-0.5 border-l border-sidebar-border px-3 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),"data-sidebar":`menu-sub`,...t}));gp.displayName=`SidebarMenuSub`;var _p=z.forwardRef(({...e},t)=>(0,B.jsx)(`li`,{ref:t,...e}));_p.displayName=`SidebarMenuSubItem`;var vp=z.forwardRef(({asChild:e=!1,size:t=`md`,isActive:n,className:r,...i},a)=>(0,B.jsx)(e?x:`a`,{ref:a,className:L(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-3 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,r),"data-active":n,"data-sidebar":`menu-sub-button`,"data-size":t,...i}));vp.displayName=`SidebarMenuSubButton`;function yp(e){return typeof e==`object`&&!!e&&`hideAdminSidebar`in e&&e.hideAdminSidebar===!0}function bp(){let e=Nl(),t=P().some(e=>yp(e.handle));return e&&!t}var xp=`SettingsResponseType`,Sp=m({dataType:xp,path:`/settings/`,defaultSearchParams:{group:`site,theme,private,members,portal,newsletter,email,labs,slack,unsplash,views,firstpromoter,editor,comments,analytics,announcement,pintura,donations,security,social_web,explore,transistor`}}),Cp=p({method:`PUT`,path:()=>`/settings/`,body:e=>({settings:e.map(({key:e,value:t})=>({key:e,value:t}))}),updateQueries:{dataType:xp,emberUpdateType:`createOrUpdate`,update:e=>({...e,settings:e.settings})},invalidateQueries:{filters:{predicate(e){return e.queryKey[0]!==xp}}}}),wp=p({method:`POST`,path:()=>`/settings/access_code/regenerate/`,updateQueries:{dataType:xp,emberUpdateType:`createOrUpdate`,update:e=>({...e,settings:e.settings})},invalidateQueries:{filters:{predicate(e){return e.queryKey[0]!==xp}}}}),Tp=p({method:`DELETE`,path:()=>`/settings/stripe/connect/`,invalidateQueries:{dataType:xp}}),Ep=p({method:`POST`,path:()=>`/slack/test/`});function Dp(e){return e.replace(/^[a-z]/,e=>e.toUpperCase()).replace(/_/g,` `).replace(RegExp(`\\b(${[`API`,`CTA`,`RSS`].join(`|`)})\\b`,`ig`),e=>e.toUpperCase())}function Op(e,t){return t.map(t=>e?.find(e=>e.key===t)?.value)}function kp(e,t){return e&&e.find(e=>e.key===t)?.value||null}function Ap(e,t){if(e)return e.find(e=>e.key===t)?.is_read_only||!1}function jp(e,t){let n=t=>e.some(e=>e.key===t&&e.value),r=n(`stripe_secret_key`)&&n(`stripe_publishable_key`),i=n(`stripe_connect_secret_key`)&&n(`stripe_connect_publishable_key`);return t.stripeDirect?r:i||r}var Mp=m({dataType:`SiteResponseType`,path:`/site/`});function Np(e){let t=new URL(e.url),n=t.pathname.endsWith(`/`)?t.pathname:`${t.pathname}/`;return`${t.origin}${n}`}function Pp(e,t){if(aa(t)&&oa(t))return sa(t)||``;let n=new URL(e.url).hostname||``;return n.startsWith(`www.`)?n.replace(/^(www)\.(?=[^/]*\..{2,5})/,``):n}function Fp(e,t,n){let r=Pp(t,n);return e===`noreply`?`noreply@${r}`:e}var Ip=navigator.userAgent.indexOf(`Mac`)===-1?`ctrl`:`command`,Lp=Ip===`command`?`⌘K`:`Ctrl+K`,Rp=e=>{e.preventDefault();let t=new KeyboardEvent(`keydown`,{key:`k`,keyCode:75,metaKey:Ip===`command`,ctrlKey:Ip===`ctrl`});document.dispatchEvent(t)};function zp({...e}){let{data:t}=u(),n=Mp(),r=Sp(),i=n.data?.site.title??``,a=n.data?.site.icon??`https://static.ghost.org/v4.0.0/images/ghost-orb-1.png`,o=kp(r.data?.settings,`is_private`)??!1,s=t&&!Bt(t);return(0,B.jsx)(tp,{...e,children:(0,B.jsxs)(`div`,{className:`flex flex-col items-stretch gap-5`,children:[(0,B.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,B.jsxs)(`div`,{className:`flex w-full min-w-0 items-center gap-2`,children:[(0,B.jsx)(`div`,{className:`h-8 w-8 flex-shrink-0 rounded-md border-0 bg-transparent`,children:(0,B.jsx)(`img`,{src:a,alt:`Site icon`,className:`h-full w-full rounded-md object-cover`})}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center justify-between gap-2`,children:[(0,B.jsx)(`div`,{className:`min-w-0 overflow-hidden text-lg font-semibold text-ellipsis whitespace-nowrap text-foreground`,children:i}),o&&(0,B.jsx)(`a`,{"aria-label":`Open access settings`,className:`shrink-0`,href:`#/settings/members`,children:(0,B.jsxs)(Bd,{className:`gap-1 border-transparent bg-orange-100 px-1.5 py-0 text-[11px] leading-5 font-semibold text-orange-700 transition-colors hover:bg-orange-200 dark:bg-orange-500/20 dark:text-orange-300 dark:hover:bg-orange-500/30`,variant:`secondary`,children:[(0,B.jsx)(Ue,{className:`size-3`,strokeWidth:2.25}),`Private`]})})]})]})}),s&&(0,B.jsxs)(R,{variant:`outline`,className:`flex h-(--control-height) items-center justify-between rounded-full border-transparent bg-white pr-2 text-base text-muted-foreground shadow-xs hover:bg-background hover:text-gray-700 hover:shadow-sm dark:border-gray-900/50 dark:bg-gray-900/30 dark:hover:border-gray-900/80 dark:hover:text-gray-400 [&_svg]:stroke-2`,onClick:Rp,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Ye,{className:`text-muted-foreground`}),`Search site`]}),(0,B.jsx)(xf,{className:`bg-transparent text-gray-500 shadow-none dark:text-gray-800`,style:{textShadow:`none`},children:Lp})]})]})})}var Bp;function U(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Vp=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Hp=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Bp=globalThis).__zod_globalConfig??(Bp.__zod_globalConfig={});var Up=globalThis.__zod_globalConfig;function Wp(e){return e&&Object.assign(Up,e),Up}function Gp(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Kp(e,t){return typeof t==`bigint`?t.toString():t}function qp(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Jp(e){return e==null}function Yp(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Xp(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Zp=Symbol(`evaluating`);function W(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Zp)return r===void 0&&(r=Zp,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Qp(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $p(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function em(e){return JSON.stringify(e)}function tm(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var nm=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function rm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var im=qp(()=>{if(Up.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function am(e){if(rm(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(rm(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function om(e){return am(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var sm=new Set([`string`,`number`,`symbol`]);function cm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function lm(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function G(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function um(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var dm={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function fm(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return lm(e,$p(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Qp(this,`shape`,e),e},checks:[]}))}function pm(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return lm(e,$p(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Qp(this,`shape`,r),r},checks:[]}))}function mm(e,t){if(!am(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return lm(e,$p(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Qp(this,`shape`,n),n}}))}function hm(e,t){if(!am(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return lm(e,$p(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Qp(this,`shape`,n),n}}))}function gm(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return lm(e,$p(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Qp(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _m(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return lm(t,$p(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Qp(this,`shape`,i),i},checks:[]}))}function vm(e,t,n){return lm(t,$p(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Qp(this,`shape`,i),i}}))}function ym(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function bm(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function xm(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Sm(e){return typeof e==`string`?e:e?.message}function Cm(e,t,n){let r=e.message?e.message:Sm(e.inst?._zod.def?.error?.(e))??Sm(t?.error?.(e))??Sm(n.customError?.(e))??Sm(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function wm(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Tm(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Em=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Kp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dm=U(`$ZodError`,Em),Om=U(`$ZodError`,Em,{Parent:Error});function km(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Am(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var jm=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Vp;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Cm(e,a,Wp())));throw nm(t,i?.callee),t}return o.value},Mm=jm(Om),Nm=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Cm(e,a,Wp())));throw nm(t,i?.callee),t}return o.value},Pm=Nm(Om),Fm=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Vp;return a.issues.length?{success:!1,error:new(e??Dm)(a.issues.map(e=>Cm(e,i,Wp())))}:{success:!0,data:a.value}},Im=Fm(Om),Lm=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Cm(e,i,Wp())))}:{success:!0,data:a.value}},Rm=Lm(Om),zm=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return jm(e)(t,n,i)},Bm=e=>(t,n,r)=>jm(e)(t,n,r),Vm=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nm(e)(t,n,i)},Hm=e=>async(t,n,r)=>Nm(e)(t,n,r),Um=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Fm(e)(t,n,i)},Wm=e=>(t,n,r)=>Fm(e)(t,n,r),Gm=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Lm(e)(t,n,i)},Km=e=>async(t,n,r)=>Lm(e)(t,n,r),qm=/^[cC][0-9a-z]{6,}$/,Jm=/^[0-9a-z]+$/,Ym=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Xm=/^[0-9a-vA-V]{20}$/,Zm=/^[A-Za-z0-9]{27}$/,Qm=/^[a-zA-Z0-9_-]{21}$/,$m=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eh=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,th=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rh=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function ih(){return new RegExp(rh,`u`)}var ah=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sh=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ch=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uh=/^[A-Za-z0-9_-]*$/,dh=/^https?$/,fh=/^\+[1-9]\d{6,14}$/,ph=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,mh=RegExp(`^${ph}$`);function hh(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gh(e){return RegExp(`^${hh(e)}$`)}function _h(e){let t=hh({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ph}T(?:${r})$`)}var vh=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},yh=/^-?\d+$/,bh=/^-?\d+(?:\.\d+)?$/,xh=/^(?:true|false)$/i,Sh=/^[^A-Z]*$/,Ch=/^[^a-z]*$/,wh=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Th={number:`number`,bigint:`bigint`,object:`date`},Eh=U(`$ZodCheckLessThan`,(e,t)=>{wh.init(e,t);let n=Th[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dh=U(`$ZodCheckGreaterThan`,(e,t)=>{wh.init(e,t);let n=Th[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Oh=U(`$ZodCheckMultipleOf`,(e,t)=>{wh.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Xp(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),kh=U(`$ZodCheckNumberFormat`,(e,t)=>{wh.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=dm[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=yh)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ah=U(`$ZodCheckMaxLength`,(e,t)=>{var n;wh.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Jp(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=wm(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jh=U(`$ZodCheckMinLength`,(e,t)=>{var n;wh.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Jp(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=wm(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mh=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;wh.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Jp(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=wm(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Nh=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;wh.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ph=U(`$ZodCheckRegex`,(e,t)=>{Nh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Fh=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Sh,Nh.init(e,t)}),Ih=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ch,Nh.init(e,t)}),Lh=U(`$ZodCheckIncludes`,(e,t)=>{wh.init(e,t);let n=cm(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Rh=U(`$ZodCheckStartsWith`,(e,t)=>{wh.init(e,t);let n=RegExp(`^${cm(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),zh=U(`$ZodCheckEndsWith`,(e,t)=>{wh.init(e,t);let n=RegExp(`.*${cm(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Bh=U(`$ZodCheckOverwrite`,(e,t)=>{wh.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Vh=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
5
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
6
|
-
`))}},Hh={major:4,minor:4,patch:3},K=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Hh;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=ym(e),i;for(let a of t){if(a._zod.def.when){if(bm(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Vp;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ym(e,t))});else{if(e.issues.length===t)continue;r||=ym(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ym(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Vp;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Vp;return o.then(e=>t(e,r,a))}return t(o,r,a)}}W(e,`~standard`,()=>({validate:t=>{try{let n=Im(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Rm(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Uh=U(`$ZodString`,(e,t)=>{K.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??vh(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),q=U(`$ZodStringFormat`,(e,t)=>{Nh.init(e,t),Uh.init(e,t)}),Wh=U(`$ZodGUID`,(e,t)=>{t.pattern??=eh,q.init(e,t)}),Gh=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=th(e)}else t.pattern??=th();q.init(e,t)}),Kh=U(`$ZodEmail`,(e,t)=>{t.pattern??=nh,q.init(e,t)}),qh=U(`$ZodURL`,(e,t)=>{q.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===dh.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Jh=U(`$ZodEmoji`,(e,t)=>{t.pattern??=ih(),q.init(e,t)}),Yh=U(`$ZodNanoID`,(e,t)=>{t.pattern??=Qm,q.init(e,t)}),Xh=U(`$ZodCUID`,(e,t)=>{t.pattern??=qm,q.init(e,t)}),Zh=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Jm,q.init(e,t)}),Qh=U(`$ZodULID`,(e,t)=>{t.pattern??=Ym,q.init(e,t)}),$h=U(`$ZodXID`,(e,t)=>{t.pattern??=Xm,q.init(e,t)}),eg=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Zm,q.init(e,t)}),tg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=_h(t),q.init(e,t)}),ng=U(`$ZodISODate`,(e,t)=>{t.pattern??=mh,q.init(e,t)}),rg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=gh(t),q.init(e,t)}),ig=U(`$ZodISODuration`,(e,t)=>{t.pattern??=$m,q.init(e,t)}),ag=U(`$ZodIPv4`,(e,t)=>{t.pattern??=ah,q.init(e,t),e._zod.bag.format=`ipv4`}),og=U(`$ZodIPv6`,(e,t)=>{t.pattern??=oh,q.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),sg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=sh,q.init(e,t)}),cg=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ch,q.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function lg(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var ug=U(`$ZodBase64`,(e,t)=>{t.pattern??=lh,q.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{lg(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function dg(e){if(!uh.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return lg(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var fg=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=uh,q.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{dg(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),pg=U(`$ZodE164`,(e,t)=>{t.pattern??=fh,q.init(e,t)});function mg(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var hg=U(`$ZodJWT`,(e,t)=>{q.init(e,t),e._zod.check=n=>{mg(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),gg=U(`$ZodNumber`,(e,t)=>{K.init(e,t),e._zod.pattern=e._zod.bag.pattern??bh,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),_g=U(`$ZodNumberFormat`,(e,t)=>{kh.init(e,t),gg.init(e,t)}),vg=U(`$ZodBoolean`,(e,t)=>{K.init(e,t),e._zod.pattern=xh,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),yg=U(`$ZodUnknown`,(e,t)=>{K.init(e,t),e._zod.parse=e=>e}),bg=U(`$ZodNever`,(e,t)=>{K.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),xg=U(`$ZodDate`,(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}});function Sg(e,t,n){e.issues.length&&t.issues.push(...xm(n,e.issues)),t.value[n]=e.value}var Cg=U(`$ZodArray`,(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Sg(t,n,e))):Sg(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function wg(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...xm(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Tg(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=um(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Eg(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>wg(e,n,i,t,u,d))):wg(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Dg=U(`$ZodObject`,(e,t)=>{if(K.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=qp(()=>Tg(t));W(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=rm,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>wg(n,t,e,s,r,i))):wg(a,t,e,s,r,i)}return i?Eg(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Og=U(`$ZodObjectJIT`,(e,t)=>{Dg.init(e,t);let n=e._zod.parse,r=qp(()=>Tg(t)),i=e=>{let t=new Vh([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=em(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=em(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
7
|
-
if (${n}.issues.length) {
|
|
8
|
-
if (${o} in input) {
|
|
9
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
10
|
-
...iss,
|
|
11
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
12
|
-
})));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (${n}.value === undefined) {
|
|
17
|
-
if (${o} in input) {
|
|
18
|
-
newResult[${o}] = undefined;
|
|
19
|
-
}
|
|
20
|
-
} else {
|
|
21
|
-
newResult[${o}] = ${n}.value;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
`):c?t.write(`
|
|
25
|
-
if (${n}.issues.length) {
|
|
26
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
27
|
-
...iss,
|
|
28
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
29
|
-
})));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (${n}.value === undefined) {
|
|
33
|
-
if (${o} in input) {
|
|
34
|
-
newResult[${o}] = undefined;
|
|
35
|
-
}
|
|
36
|
-
} else {
|
|
37
|
-
newResult[${o}] = ${n}.value;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
`):t.write(`
|
|
41
|
-
const ${n}_present = ${o} in input;
|
|
42
|
-
if (${n}.issues.length) {
|
|
43
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
44
|
-
...iss,
|
|
45
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
46
|
-
})));
|
|
47
|
-
}
|
|
48
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
49
|
-
payload.issues.push({
|
|
50
|
-
code: "invalid_type",
|
|
51
|
-
expected: "nonoptional",
|
|
52
|
-
input: undefined,
|
|
53
|
-
path: [${o}]
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (${n}_present) {
|
|
58
|
-
if (${n}.value === undefined) {
|
|
59
|
-
newResult[${o}] = undefined;
|
|
60
|
-
} else {
|
|
61
|
-
newResult[${o}] = ${n}.value;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=rm,s=!Up.jitless,c=s&&im.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Eg([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function kg(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ym(e));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(e=>e.issues.map(e=>Cm(e,r,Wp())))}),t)}var Ag=U(`$ZodUnion`,(e,t)=>{K.init(e,t),W(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),W(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),W(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),W(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Yp(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>kg(t,r,e,i)):kg(o,r,e,i)}}),jg=U(`$ZodIntersection`,(e,t)=>{K.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Ng(e,t,n)):Ng(e,i,a)}});function Mg(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(am(e)&&am(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Mg(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Mg(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ng(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),ym(e))return e;let o=Mg(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Pg=U(`$ZodRecord`,(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!am(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Cm(e,r,Wp())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...xm(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...xm(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&bh.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Cm(e,r,Wp())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...xm(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...xm(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Fg=U(`$ZodEnum`,(e,t)=>{K.init(e,t);let n=Gp(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>sm.has(typeof e)).map(e=>typeof e==`string`?cm(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ig=U(`$ZodLiteral`,(e,t)=>{if(K.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?cm(e):e?cm(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Lg=U(`$ZodTransform`,(e,t)=>{K.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Hp(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Vp;return n.value=i,n.fallback=!0,n}});function Rg(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var zg=U(`$ZodOptional`,(e,t)=>{K.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,W(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),W(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Yp(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Rg(e,r)):Rg(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Bg=U(`$ZodExactOptional`,(e,t)=>{zg.init(e,t),W(e._zod,`values`,()=>t.innerType._zod.values),W(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Vg=U(`$ZodNullable`,(e,t)=>{K.init(e,t),W(e._zod,`optin`,()=>t.innerType._zod.optin),W(e._zod,`optout`,()=>t.innerType._zod.optout),W(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Yp(e.source)}|null)$`):void 0}),W(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Hg=U(`$ZodDefault`,(e,t)=>{K.init(e,t),e._zod.optin=`optional`,W(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Ug(e,t)):Ug(r,t)}});function Ug(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Wg=U(`$ZodPrefault`,(e,t)=>{K.init(e,t),e._zod.optin=`optional`,W(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Gg=U(`$ZodNonOptional`,(e,t)=>{K.init(e,t),W(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Kg(t,e)):Kg(i,e)}});function Kg(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var qg=U(`$ZodCatch`,(e,t)=>{K.init(e,t),e._zod.optin=`optional`,W(e._zod,`optout`,()=>t.innerType._zod.optout),W(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Cm(e,n,Wp()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Cm(e,n,Wp()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Jg=U(`$ZodPipe`,(e,t)=>{K.init(e,t),W(e._zod,`values`,()=>t.in._zod.values),W(e._zod,`optin`,()=>t.in._zod.optin),W(e._zod,`optout`,()=>t.out._zod.optout),W(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Yg(e,t.in,n)):Yg(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Yg(e,t.out,n)):Yg(r,t.out,n)}});function Yg(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Xg=U(`$ZodCodec`,(e,t)=>{K.init(e,t),W(e._zod,`values`,()=>t.in._zod.values),W(e._zod,`optin`,()=>t.in._zod.optin),W(e._zod,`optout`,()=>t.out._zod.optout),W(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Zg(e,t,n)):Zg(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Zg(e,t,n)):Zg(r,t,n)}}});function Zg(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Qg(e,r,t.out,n)):Qg(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Qg(e,r,t.in,n)):Qg(e,r,t.in,n)}}function Qg(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var $g=U(`$ZodReadonly`,(e,t)=>{K.init(e,t),W(e._zod,`propValues`,()=>t.innerType._zod.propValues),W(e._zod,`values`,()=>t.innerType._zod.values),W(e._zod,`optin`,()=>t.innerType?._zod?.optin),W(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e_):e_(r)}});function e_(e){return e.value=Object.freeze(e.value),e}var t_=U(`$ZodCustom`,(e,t)=>{wh.init(e,t),K.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>n_(t,n,r,e));n_(i,n,r,e)}});function n_(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Tm(e))}}var r_,i_=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function a_(){return new i_}(r_=globalThis).__zod_globalRegistry??(r_.__zod_globalRegistry=a_());var o_=globalThis.__zod_globalRegistry;function s_(e,t){return new e({type:`string`,...G(t)})}function c_(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...G(t)})}function l_(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...G(t)})}function u_(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...G(t)})}function d_(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...G(t)})}function f_(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...G(t)})}function p_(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...G(t)})}function m_(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...G(t)})}function h_(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...G(t)})}function g_(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...G(t)})}function __(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...G(t)})}function v_(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...G(t)})}function y_(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...G(t)})}function b_(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...G(t)})}function x_(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...G(t)})}function S_(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...G(t)})}function C_(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...G(t)})}function w_(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...G(t)})}function T_(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...G(t)})}function E_(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...G(t)})}function D_(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...G(t)})}function O_(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...G(t)})}function k_(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...G(t)})}function A_(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...G(t)})}function j_(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...G(t)})}function M_(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...G(t)})}function N_(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...G(t)})}function P_(e,t){return new e({type:`number`,checks:[],...G(t)})}function F_(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...G(t)})}function I_(e,t){return new e({type:`boolean`,...G(t)})}function L_(e){return new e({type:`unknown`})}function R_(e,t){return new e({type:`never`,...G(t)})}function z_(e,t){return new e({type:`date`,...G(t)})}function B_(e,t){return new Eh({check:`less_than`,...G(t),value:e,inclusive:!1})}function V_(e,t){return new Eh({check:`less_than`,...G(t),value:e,inclusive:!0})}function H_(e,t){return new Dh({check:`greater_than`,...G(t),value:e,inclusive:!1})}function U_(e,t){return new Dh({check:`greater_than`,...G(t),value:e,inclusive:!0})}function W_(e,t){return new Oh({check:`multiple_of`,...G(t),value:e})}function G_(e,t){return new Ah({check:`max_length`,...G(t),maximum:e})}function K_(e,t){return new jh({check:`min_length`,...G(t),minimum:e})}function q_(e,t){return new Mh({check:`length_equals`,...G(t),length:e})}function J_(e,t){return new Ph({check:`string_format`,format:`regex`,...G(t),pattern:e})}function Y_(e){return new Fh({check:`string_format`,format:`lowercase`,...G(e)})}function X_(e){return new Ih({check:`string_format`,format:`uppercase`,...G(e)})}function Z_(e,t){return new Lh({check:`string_format`,format:`includes`,...G(t),includes:e})}function Q_(e,t){return new Rh({check:`string_format`,format:`starts_with`,...G(t),prefix:e})}function $_(e,t){return new zh({check:`string_format`,format:`ends_with`,...G(t),suffix:e})}function ev(e){return new Bh({check:`overwrite`,tx:e})}function tv(e){return ev(t=>t.normalize(e))}function nv(){return ev(e=>e.trim())}function rv(){return ev(e=>e.toLowerCase())}function iv(){return ev(e=>e.toUpperCase())}function av(){return ev(e=>tm(e))}function ov(e,t,n){return new e({type:`array`,element:t,...G(n)})}function sv(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...G(n)})}function cv(e,t){let n=lv(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Tm(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Tm(r))}},e(t.value,t)),t);return n}function lv(e,t){let n=new wh({check:`custom`,...G(t)});return n._zod.check=e,n}function uv(e,t){let n=G(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??Xg,c=e.Boolean??vg,l=new s({type:`pipe`,in:new(e.String??Uh)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}function dv(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??o_,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 fv(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,fv(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&hv(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function pv(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
66
|
-
|
|
67
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function mv(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let 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){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:_v(t,`input`,e.processors),output:_v(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function hv(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return hv(r.element,n);if(r.type===`set`)return hv(r.valueType,n);if(r.type===`lazy`)return hv(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 hv(r.innerType,n);if(r.type===`intersection`)return hv(r.left,n)||hv(r.right,n);if(r.type===`record`||r.type===`map`)return hv(r.keyType,n)||hv(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:hv(r.in,n)||hv(r.out,n);if(r.type===`object`){for(let e in r.shape)if(hv(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(hv(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(hv(e,n))return!0;return!!(r.rest&&hv(r.rest,n))}return!1}var gv=(e,t={})=>n=>{let r=dv({...n,processors:t});return fv(e,r),pv(r,e),mv(r,e)},_v=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=dv({...i??{},target:a,io:t,processors:n});return fv(e,o),pv(o,e),mv(o,e)},vv={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},yv=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=vv[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},bv=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},xv=(e,t,n,r)=>{n.type=`boolean`},Sv=(e,t,n,r)=>{n.not={}},Cv=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},wv=(e,t,n,r)=>{let i=e._zod.def,a=Gp(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Tv=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ev=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Dv=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ov=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=fv(a.element,t,{...r,path:[...r.path,`items`]})},kv=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=fv(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=fv(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Av=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>fv(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},jv=(e,t,n,r)=>{let i=e._zod.def,a=fv(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=fv(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Mv=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=fv(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=fv(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=fv(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Nv=(e,t,n,r)=>{let i=e._zod.def,a=fv(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Pv=(e,t,n,r)=>{let i=e._zod.def;fv(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Fv=(e,t,n,r)=>{let i=e._zod.def;fv(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Iv=(e,t,n,r)=>{let i=e._zod.def;fv(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Lv=(e,t,n,r)=>{let i=e._zod.def;fv(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Rv=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;fv(o,t,r);let s=t.seen.get(e);s.ref=o},zv=(e,t,n,r)=>{let i=e._zod.def;fv(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Bv=(e,t,n,r)=>{let i=e._zod.def;fv(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Vv=U(`ZodISODateTime`,(e,t)=>{tg.init(e,t),py.init(e,t)});function Hv(e){return A_(Vv,e)}var Uv=U(`ZodISODate`,(e,t)=>{ng.init(e,t),py.init(e,t)});function Wv(e){return j_(Uv,e)}var Gv=U(`ZodISOTime`,(e,t)=>{rg.init(e,t),py.init(e,t)});function Kv(e){return M_(Gv,e)}var qv=U(`ZodISODuration`,(e,t)=>{ig.init(e,t),py.init(e,t)});function Jv(e){return N_(qv,e)}var Yv=U(`ZodError`,(e,t)=>{Dm.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Am(e,t)},flatten:{value:t=>km(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Kp,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Kp,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Xv=jm(Yv),Zv=Nm(Yv),Qv=Fm(Yv),$v=Lm(Yv),ey=zm(Yv),ty=Bm(Yv),ny=Vm(Yv),ry=Hm(Yv),iy=Um(Yv),ay=Wm(Yv),oy=Gm(Yv),sy=Km(Yv),cy=new WeakMap;function ly(e,t,n){let r=Object.getPrototypeOf(e),i=cy.get(r);if(i||(i=new Set,cy.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var J=U(`ZodType`,(e,t)=>(K.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:_v(e,`input`),output:_v(e,`output`)}}),e.toJSONSchema=gv(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Xv(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Qv(e,t,n),e.parseAsync=async(t,n)=>Zv(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>$v(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ey(e,t,n),e.decode=(t,n)=>ty(e,t,n),e.encodeAsync=async(t,n)=>ny(e,t,n),e.decodeAsync=async(t,n)=>ry(e,t,n),e.safeEncode=(t,n)=>iy(e,t,n),e.safeDecode=(t,n)=>ay(e,t,n),e.safeEncodeAsync=async(t,n)=>oy(e,t,n),e.safeDecodeAsync=async(t,n)=>sy(e,t,n),ly(e,`ZodType`,{check(...e){let t=this.def;return this.clone($p(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return lm(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(kb(e,t))},superRefine(e,t){return this.check(Ab(e,t))},overwrite(e){return this.check(ev(e))},optional(){return lb(this)},exactOptional(){return db(this)},nullable(){return pb(this)},nullish(){return lb(pb(this))},nonoptional(e){return yb(this,e)},array(){return Ky(this)},or(e){return Zy([this,e])},and(e){return $y(this,e)},transform(e){return Cb(this,sb(e))},default(e){return hb(this,e)},prefault(e){return _b(this,e)},catch(e){return xb(this,e)},pipe(e){return Cb(this,e)},readonly(){return Db(this)},describe(e){let t=this.clone();return o_.add(t,{description:e}),t},meta(...e){if(e.length===0)return o_.get(this);let t=this.clone();return o_.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return o_.get(e)?.description},configurable:!0}),e)),uy=U(`_ZodString`,(e,t)=>{Uh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yv(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ly(e,`_ZodString`,{regex(...e){return this.check(J_(...e))},includes(...e){return this.check(Z_(...e))},startsWith(...e){return this.check(Q_(...e))},endsWith(...e){return this.check($_(...e))},min(...e){return this.check(K_(...e))},max(...e){return this.check(G_(...e))},length(...e){return this.check(q_(...e))},nonempty(...e){return this.check(K_(1,...e))},lowercase(e){return this.check(Y_(e))},uppercase(e){return this.check(X_(e))},trim(){return this.check(nv())},normalize(...e){return this.check(tv(...e))},toLowerCase(){return this.check(rv())},toUpperCase(){return this.check(iv())},slugify(){return this.check(av())}})}),dy=U(`ZodString`,(e,t)=>{Uh.init(e,t),uy.init(e,t),e.email=t=>e.check(c_(my,t)),e.url=t=>e.check(m_(_y,t)),e.jwt=t=>e.check(k_(My,t)),e.emoji=t=>e.check(h_(vy,t)),e.guid=t=>e.check(l_(hy,t)),e.uuid=t=>e.check(u_(gy,t)),e.uuidv4=t=>e.check(d_(gy,t)),e.uuidv6=t=>e.check(f_(gy,t)),e.uuidv7=t=>e.check(p_(gy,t)),e.nanoid=t=>e.check(g_(yy,t)),e.guid=t=>e.check(l_(hy,t)),e.cuid=t=>e.check(__(by,t)),e.cuid2=t=>e.check(v_(xy,t)),e.ulid=t=>e.check(y_(Sy,t)),e.base64=t=>e.check(E_(ky,t)),e.base64url=t=>e.check(D_(Ay,t)),e.xid=t=>e.check(b_(Cy,t)),e.ksuid=t=>e.check(x_(wy,t)),e.ipv4=t=>e.check(S_(Ty,t)),e.ipv6=t=>e.check(C_(Ey,t)),e.cidrv4=t=>e.check(w_(Dy,t)),e.cidrv6=t=>e.check(T_(Oy,t)),e.e164=t=>e.check(O_(jy,t)),e.datetime=t=>e.check(Hv(t)),e.date=t=>e.check(Wv(t)),e.time=t=>e.check(Kv(t)),e.duration=t=>e.check(Jv(t))});function fy(e){return s_(dy,e)}var py=U(`ZodStringFormat`,(e,t)=>{q.init(e,t),uy.init(e,t)}),my=U(`ZodEmail`,(e,t)=>{Kh.init(e,t),py.init(e,t)}),hy=U(`ZodGUID`,(e,t)=>{Wh.init(e,t),py.init(e,t)}),gy=U(`ZodUUID`,(e,t)=>{Gh.init(e,t),py.init(e,t)}),_y=U(`ZodURL`,(e,t)=>{qh.init(e,t),py.init(e,t)}),vy=U(`ZodEmoji`,(e,t)=>{Jh.init(e,t),py.init(e,t)}),yy=U(`ZodNanoID`,(e,t)=>{Yh.init(e,t),py.init(e,t)}),by=U(`ZodCUID`,(e,t)=>{Xh.init(e,t),py.init(e,t)}),xy=U(`ZodCUID2`,(e,t)=>{Zh.init(e,t),py.init(e,t)}),Sy=U(`ZodULID`,(e,t)=>{Qh.init(e,t),py.init(e,t)}),Cy=U(`ZodXID`,(e,t)=>{$h.init(e,t),py.init(e,t)}),wy=U(`ZodKSUID`,(e,t)=>{eg.init(e,t),py.init(e,t)}),Ty=U(`ZodIPv4`,(e,t)=>{ag.init(e,t),py.init(e,t)}),Ey=U(`ZodIPv6`,(e,t)=>{og.init(e,t),py.init(e,t)}),Dy=U(`ZodCIDRv4`,(e,t)=>{sg.init(e,t),py.init(e,t)}),Oy=U(`ZodCIDRv6`,(e,t)=>{cg.init(e,t),py.init(e,t)}),ky=U(`ZodBase64`,(e,t)=>{ug.init(e,t),py.init(e,t)}),Ay=U(`ZodBase64URL`,(e,t)=>{fg.init(e,t),py.init(e,t)}),jy=U(`ZodE164`,(e,t)=>{pg.init(e,t),py.init(e,t)}),My=U(`ZodJWT`,(e,t)=>{hg.init(e,t),py.init(e,t)}),Ny=U(`ZodNumber`,(e,t)=>{gg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bv(e,t,n,r),ly(e,`ZodNumber`,{gt(e,t){return this.check(H_(e,t))},gte(e,t){return this.check(U_(e,t))},min(e,t){return this.check(U_(e,t))},lt(e,t){return this.check(B_(e,t))},lte(e,t){return this.check(V_(e,t))},max(e,t){return this.check(V_(e,t))},int(e){return this.check(Iy(e))},safe(e){return this.check(Iy(e))},positive(e){return this.check(H_(0,e))},nonnegative(e){return this.check(U_(0,e))},negative(e){return this.check(B_(0,e))},nonpositive(e){return this.check(V_(0,e))},multipleOf(e,t){return this.check(W_(e,t))},step(e,t){return this.check(W_(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Py(e){return P_(Ny,e)}var Fy=U(`ZodNumberFormat`,(e,t)=>{_g.init(e,t),Ny.init(e,t)});function Iy(e){return F_(Fy,e)}var Ly=U(`ZodBoolean`,(e,t)=>{vg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xv(e,t,n,r)});function Ry(e){return I_(Ly,e)}var zy=U(`ZodUnknown`,(e,t)=>{yg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function By(){return L_(zy)}var Vy=U(`ZodNever`,(e,t)=>{bg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sv(e,t,n,r)});function Hy(e){return R_(Vy,e)}var Uy=U(`ZodDate`,(e,t)=>{xg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cv(e,t,n,r),e.min=(t,n)=>e.check(U_(t,n)),e.max=(t,n)=>e.check(V_(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Wy(e){return z_(Uy,e)}var Gy=U(`ZodArray`,(e,t)=>{Cg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ov(e,t,n,r),e.element=t.element,ly(e,`ZodArray`,{min(e,t){return this.check(K_(e,t))},nonempty(e){return this.check(K_(1,e))},max(e,t){return this.check(G_(e,t))},length(e,t){return this.check(q_(e,t))},unwrap(){return this.element}})});function Ky(e,t){return ov(Gy,e,t)}var qy=U(`ZodObject`,(e,t)=>{Og.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kv(e,t,n,r),W(e,`shape`,()=>t.shape),ly(e,`ZodObject`,{keyof(){return rb(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:By()})},loose(){return this.clone({...this._zod.def,catchall:By()})},strict(){return this.clone({...this._zod.def,catchall:Hy()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return mm(this,e)},safeExtend(e){return hm(this,e)},merge(e){return gm(this,e)},pick(e){return fm(this,e)},omit(e){return pm(this,e)},partial(...e){return _m(cb,this,e[0])},required(...e){return vm(vb,this,e[0])}})});function Jy(e,t){return new qy({type:`object`,shape:e??{},...G(t)})}function Yy(e,t){return new qy({type:`object`,shape:e,catchall:By(),...G(t)})}var Xy=U(`ZodUnion`,(e,t)=>{Ag.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Av(e,t,n,r),e.options=t.options});function Zy(e,t){return new Xy({type:`union`,options:e,...G(t)})}var Qy=U(`ZodIntersection`,(e,t)=>{jg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jv(e,t,n,r)});function $y(e,t){return new Qy({type:`intersection`,left:e,right:t})}var eb=U(`ZodRecord`,(e,t)=>{Pg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mv(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function tb(e,t,n){return!t||!t._zod?new eb({type:`record`,keyType:fy(),valueType:e,...G(t)}):new eb({type:`record`,keyType:e,valueType:t,...G(n)})}var nb=U(`ZodEnum`,(e,t)=>{Fg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wv(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new nb({...t,checks:[],...G(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new nb({...t,checks:[],...G(r),entries:i})}});function rb(e,t){return new nb({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...G(t)})}var ib=U(`ZodLiteral`,(e,t)=>{Ig.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tv(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ab(e,t){return new ib({type:`literal`,values:Array.isArray(e)?e:[e],...G(t)})}var ob=U(`ZodTransform`,(e,t)=>{Lg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dv(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Hp(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Tm(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Tm(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function sb(e){return new ob({type:`transform`,transform:e})}var cb=U(`ZodOptional`,(e,t)=>{zg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lb(e){return new cb({type:`optional`,innerType:e})}var ub=U(`ZodExactOptional`,(e,t)=>{Bg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function db(e){return new ub({type:`optional`,innerType:e})}var fb=U(`ZodNullable`,(e,t)=>{Vg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function pb(e){return new fb({type:`nullable`,innerType:e})}var mb=U(`ZodDefault`,(e,t)=>{Hg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hb(e,t){return new mb({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():om(t)}})}var gb=U(`ZodPrefault`,(e,t)=>{Wg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _b(e,t){return new gb({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():om(t)}})}var vb=U(`ZodNonOptional`,(e,t)=>{Gg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yb(e,t){return new vb({type:`nonoptional`,innerType:e,...G(t)})}var bb=U(`ZodCatch`,(e,t)=>{qg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xb(e,t){return new bb({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Sb=U(`ZodPipe`,(e,t)=>{Jg.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rv(e,t,n,r),e.in=t.in,e.out=t.out});function Cb(e,t){return new Sb({type:`pipe`,in:e,out:t})}var wb=U(`ZodCodec`,(e,t)=>{Sb.init(e,t),Xg.init(e,t)});function Tb(e,t,n){return new wb({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var Eb=U(`ZodReadonly`,(e,t)=>{$g.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zv(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Db(e){return new Eb({type:`readonly`,innerType:e})}var Ob=U(`ZodCustom`,(e,t)=>{t_.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ev(e,t,n,r)});function kb(e,t={}){return sv(Ob,e,t)}function Ab(e,t){return cv(e,t)}var jb=(...e)=>uv({Codec:wb,Boolean:Ly,String:dy},...e),Mb=Tb(Hv({offset:!0}),Wy(),{decode:e=>new Date(e),encode:e=>e.toISOString()}),Nb=Jy({posts:Ky(Yy({slug:fy(),title:fy(),custom_excerpt:fy().nullish(),url:fy().url(),published_at:Mb,featured:jb(),feature_image:fy().url().nullish(),html:fy().nullish()}).transform(e=>({slug:e.slug,title:e.title,customExcerpt:e.custom_excerpt,url:e.url,publishedAt:e.published_at,featured:e.featured,featureImage:e.feature_image,html:e.html}))).default([]),changelogUrl:fy().url().default(`https://ghost.org/changelog`)}).transform(e=>({entries:e.posts,changelogUrl:e.changelogUrl})),Pb=()=>l({queryKey:[`changelog`],queryFn:async()=>{let e=await fetch(`https://ghost.org/changelog.json`);if(!e.ok)throw Error(`Failed to fetch changelog: ${e.status}`);let t=await e.json();return Nb.parse(t)},staleTime:1/0});function Fb(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ib(e,t){let n={...e};for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=t[r],a=e[r];i!==void 0&&(Fb(i)&&Fb(a)?n[r]=Ib(a,i):n[r]=i)}return n}var Lb=Yy({lastSeenDate:Mb.optional().catch(void 0)}),Rb={completedSteps:[],checklistState:`pending`,startedAt:void 0},zb=Yy({completedSteps:Ky(fy()).default(Rb.completedSteps).catch(Rb.completedSteps),checklistState:rb([`pending`,`started`,`completed`,`dismissed`]).default(Rb.checklistState).catch(Rb.checklistState),startedAt:Mb.optional().catch(Rb.startedAt)}),Bb={expanded:{posts:!0,members:!0},menu:{visible:!0}},Vb=Yy({expanded:Jy({posts:Ry(),members:Ry().default(!0)}),menu:Jy({visible:Ry()})}),Hb=Yy({whatsNew:Lb.optional().catch(void 0),nightShift:rb([`light`,`dark`,`system`]).optional().catch(`light`),onboarding:zb.default(Rb).catch(Rb),navigation:Vb.default(Bb).catch(Bb)}),Ub=e=>[`userPreferences`,e?.id,e?.accessibility];function Wb(e){let{data:t}=u();return l({...e,queryKey:Ub(t),queryFn:()=>{if(!t)throw Error(`User not loaded`);let e=t.accessibility||`{}`,n=JSON.parse(e),r=n&&typeof n==`object`&&!Array.isArray(n)?n:{};return r.nightShift===!0?r.nightShift=`dark`:r.nightShift===!1&&(r.nightShift=`light`),Hb.parse(r)},enabled:!!t,keepPreviousData:!0,staleTime:1/0,cacheTime:0})}var Gb=()=>{let e=a(),{data:t}=u(),{mutateAsync:n}=Vt();return s({mutationFn:async r=>{if(!t)throw Error(`User is not loaded`);let i=Ib(e.getQueryData(Ub(t))??Hb.parse({}),r),a=Hb.encode(i);await n({...t,accessibility:JSON.stringify(a)})}})};function Kb(){return{lastSeenDate:new Date}}var qb=(e,t)=>[`whatsNew`,e?.whatsNew?.lastSeenDate?.toISOString(),t?.publishedAt.toISOString()],Jb=()=>{let{data:e,isSuccess:t}=Wb(),{data:n,isSuccess:r}=Pb(),{mutateAsync:i}=Gb(),a=!!e?.whatsNew?.lastSeenDate;(0,z.useEffect)(()=>{!a&&t&&i({whatsNew:Kb()})},[a,t,i]);let o=n?.entries[0];return l({queryKey:qb(e,o),queryFn:()=>{if(!o)return{hasNew:!1};let t=e.whatsNew.lastSeenDate;return{hasNew:o.publishedAt>t}},enabled:r&&a,staleTime:1/0,cacheTime:0})},Yb=()=>{let{data:e}=Pb(),{mutateAsync:t}=Gb();return s({mutationFn:async()=>{let n=e?.entries[0];if(!n)return;let r={lastSeenDate:n.publishedAt};await t({whatsNew:r})}})};function Xb(e){return e.toLocaleDateString(`en-GB`,{day:`2-digit`,month:`long`,year:`numeric`})}function Zb({entry:e}){return(0,B.jsxs)(`a`,{className:`-mx-2 flex items-start gap-6 rounded-md p-2 transition-colors hover:bg-muted/80`,"data-test-entry":!0,href:e.url,rel:`noopener noreferrer`,target:`_blank`,children:[e.featureImage&&(0,B.jsx)(`img`,{alt:e.title,className:`h-[110px] w-40 flex-shrink-0 rounded object-cover`,"data-test-entry-image":!0,src:e.featureImage}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`mt-1.5 text-[17px] font-semibold text-foreground`,"data-test-entry-title":!0,children:e.title}),(0,B.jsx)(`p`,{className:`line-clamp-2 text-sm leading-[1.45] text-gray-700`,"data-test-entry-excerpt":!0,children:e.customExcerpt}),(0,B.jsx)(`span`,{className:`text-sm text-gray-600`,"data-test-entry-date":!0,children:Xb(e.publishedAt)})]})]})}function Qb({open:e,onOpenChange:t}){let{data:n}=Pb(),{mutate:r}=Yb();return(0,z.useEffect)(()=>{e&&r()},[e,r]),(0,B.jsx)(fu,{open:e,onOpenChange:t,children:(0,B.jsxs)(_u,{className:`flex max-h-[85vh] max-w-2xl flex-col`,"data-test-modal":`whats-new`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`whats-new-modal-title`,children:[(0,B.jsx)(vu,{children:(0,B.jsx)(bu,{id:`whats-new-modal-title`,"data-test-modal-title":!0,className:`text-2xl tracking-tighter`,children:`What’s new?`})}),n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`section`,{className:`-mx-6 flex-1 space-y-2 overflow-y-auto px-6`,"data-test-entries":!0,children:n.entries.map(e=>(0,B.jsx)(Zb,{entry:e},e.slug))}),(0,B.jsxs)(yu,{className:`flex-row justify-between gap-3 sm:justify-between`,children:[(0,B.jsx)(R,{asChild:!0,variant:`outline`,children:(0,B.jsx)(`a`,{href:`${n.changelogUrl}#/portal/signup`,rel:`noopener noreferrer`,target:`_blank`,children:`Turn on notifications`})}),(0,B.jsx)(R,{asChild:!0,children:(0,B.jsx)(`a`,{href:n.changelogUrl,rel:`noopener noreferrer`,target:`_blank`,children:`All updates →`})})]})]}):(0,B.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-12`,children:(0,B.jsx)(Cf,{size:`lg`})})]})})}function $b(){return typeof window>`u`||typeof window.matchMedia!=`function`?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function ex(e){document.documentElement.classList.toggle(`dark`,e===`dark`)}function tx(){return typeof window<`u`&&!!window.EmberBridge}async function nx(){await window.EmberBridge?.state.preloadAdminThemeStylesheet?.()}function rx(e,t){window.EmberBridge?.state.applyAdminThemePreference?window.EmberBridge.state.applyAdminThemePreference(e):ex(t)}function ix(){let{data:e}=Wb(),{mutateAsync:t,isLoading:n}=Gb(),[r,i]=(0,z.useState)($b),[a,o]=(0,z.useState)(null),[s,c]=(0,z.useState)(!1),l=(0,z.useRef)(!1),u=e?.nightShift??`light`,d=a??u,f=d===`system`?r:d;return(0,z.useEffect)(()=>{if(tx()||typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>{i(e.matches?`dark`:`light`)};return i(e.matches?`dark`:`light`),typeof e.addEventListener==`function`?e.addEventListener(`change`,t):e.addListener(t),()=>{typeof e.removeEventListener==`function`?e.removeEventListener(`change`,t):e.removeListener(t)}},[]),(0,z.useEffect)(()=>{tx()||ex(f)},[f]),(0,z.useEffect)(()=>{a!==null&&u===a&&o(null)},[a,u]),{theme:d,resolvedTheme:f,setTheme:(0,z.useCallback)(async e=>{if(!(l.current||e===d)){l.current=!0,c(!0),o(e);try{let n=e===`system`?r:e;await nx().catch(e=>{console.error(`[Theme] Failed to preload admin theme stylesheet:`,e)}),rx(e,n),await t({nightShift:e})}catch(e){o(null),rx(d,f),console.error(`[Theme] Failed to update appearance preference:`,e)}finally{l.current=!1,c(!1)}}},[t,f,r,d]),isSettingTheme:n||s}}function ax(){let e=kl();return{showUpgradeBanner:!!e?.subscription?.isActiveTrial,trialDaysRemaining:e?.subscription?.trial_end?Math.ceil((new Date(e.subscription.trial_end).getTime()-Date.now())/(1e3*60*60*24)):0}}function ox({children:e,...t}){return(0,B.jsx)(`span`,{className:`flex-1`,...t,children:e})}var sx=({children:e,...t})=>(0,B.jsx)(pl,{className:`cursor-pointer text-base`,asChild:!0,...t,children:e});sx.Label=ox;function cx(e){let t=u();return(0,B.jsxs)(Rd,{...e,children:[t.data?.profile_image&&(0,B.jsx)(Fd,{src:t.data?.profile_image}),(0,B.jsx)(Id,{className:`text-foreground-muted hover:text-foreground`,children:(0,B.jsx)(ot,{})})]})}function lx({name:e,email:t,children:n}){return(0,B.jsx)(`div`,{className:`p-3`,children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[n,(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,B.jsx)(`span`,{className:`truncate text-base font-semibold text-foreground`,children:e}),(0,B.jsx)(`span`,{className:`text-foreground-muted truncate text-sm`,children:t})]})]})})}function ux(e){if(e)try{let t=new URL(e);return t.searchParams.set(`admin`,`1`),t.href}catch{return e}}function dx(){return(0,B.jsx)(sx,{children:(0,B.jsxs)(he,{to:`/settings/staff/${u().data?.slug}`,children:[(0,B.jsx)(ot,{}),(0,B.jsx)(sx.Label,{children:`Your profile`})]})})}var fx=[{value:`dark`,label:`Dark`,Icon:ct},{value:`light`,label:`Light`,Icon:ze},{value:`system`,label:`System`,Icon:ft}],px=Object.fromEntries(fx.map(({value:e,label:t})=>[e,t]));function mx(){let{theme:e,setTheme:t,isSettingTheme:n}=ix();return(0,B.jsxs)(ll,{children:[(0,B.jsxs)(ul,{className:`cursor-pointer gap-2 text-base [&>svg:last-child]:-ml-1.5 [&>svg:last-child]:size-3.5 [&>svg:last-child]:text-muted-foreground`,"data-test-nav":`appearance`,children:[(0,B.jsx)(jt,{}),(0,B.jsx)(sx.Label,{children:`Appearance`}),(0,B.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:px[e]})]}),(0,B.jsx)(dl,{alignOffset:-4,className:`min-w-36`,children:fx.map(({value:r,label:i,Icon:a})=>(0,B.jsxs)(pl,{disabled:n,"aria-label":`${i} appearance`,"data-test-theme-option":r,onSelect:()=>{t(r)},children:[(0,B.jsx)(a,{}),(0,B.jsx)(`span`,{className:`flex-1`,children:i}),e===r&&(0,B.jsx)(et,{"aria-hidden":`true`,className:`text-muted-foreground`})]},r))})]})}function hx(){return(0,B.jsxs)(sx,{asChild:!1,onSelect:()=>{let{apiRoot:e,adminRoot:t}=d();fetch(`${e}/session`,{method:`DELETE`}).then(()=>{window.location.href=t}).catch(e=>{console.error(e)})},children:[(0,B.jsx)(Ae,{}),(0,B.jsx)(sx.Label,{children:`Sign out`})]})}function gx(e){let t=u(),{data:n}=Jb(),{showUpgradeBanner:r}=ax();return(0,B.jsxs)(ol,{...e,children:[(0,B.jsx)(sl,{asChild:!0,children:(0,B.jsxs)(fp,{size:`lg`,className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground`,"aria-label":`User menu`,children:[(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(cx,{}),n?.hasNew&&(0,B.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5`,children:(0,B.jsx)(bf,{variant:`success`,size:`sm`,label:`New updates available`,"data-test-whats-new-avatar-badge":!0})})]}),(0,B.jsxs)(`div`,{className:`grid flex-1 text-left text-base leading-tight`,children:[(0,B.jsx)(`span`,{className:`truncate font-semibold`,children:t.data?.name}),(0,B.jsx)(`span`,{className:`-mt-px truncate text-sm text-muted-foreground dark:text-gray-800`,children:t.data?.email})]}),(0,B.jsx)(dt,{className:`ml-auto size-4 text-grey-700`,"data-test-nav":`arrow-down`})]})}),(0,B.jsxs)(fl,{align:`start`,sideOffset:10,className:`w-[var(--radix-dropdown-menu-trigger-width)] dark:bg-surface-elevated-2 ${r?`shadow-[0_18px_80px_0_rgba(0,0,0,0.07),0_7.52px_33.422px_0_rgba(0,0,0,0.05),0_4.021px_17.869px_0_rgba(0,0,0,0.04),0_2.254px_10.017px_0_rgba(0,0,0,0.04),0_1.197px_5.32px_0_rgba(0,0,0,0.03),0_0.498px_2.214px_0_rgba(0,0,0,0.02)]`:``}`,children:[(0,B.jsx)(lx,{name:t.data?.name,email:t.data?.email,children:(0,B.jsx)(cx,{})}),(0,B.jsx)(_l,{}),(0,B.jsxs)(sx,{"data-test-nav":`whatsnew`,asChild:!1,onSelect:()=>{e.onOpenWhatsNew?.()},children:[(0,B.jsx)(je,{}),(0,B.jsx)(sx.Label,{children:`What’s new?`}),n?.hasNew&&(0,B.jsx)(`div`,{className:`flex flex-1 justify-end`,children:(0,B.jsx)(bf,{variant:`success`,size:`sm`,label:`New updates available`,"data-test-whats-new-menu-badge":!0})})]}),(0,B.jsx)(dx,{}),(0,B.jsx)(_l,{}),(0,B.jsx)(sx,{children:(0,B.jsxs)(`a`,{href:`https://ghost.org/resources?utm_source=admin&utm_campaign=resources`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,B.jsx)(vt,{}),(0,B.jsx)(sx.Label,{children:`Resources & guides`})]})}),(0,B.jsx)(mx,{}),(0,B.jsx)(_l,{}),(0,B.jsx)(hx,{})]})]})}function _x(){let e=u(),t=ux(Mp().data?.site.url??``);return(0,B.jsxs)(ol,{children:[(0,B.jsx)(sl,{asChild:!0,children:(0,B.jsx)(`button`,{className:`flex items-center justify-center rounded-full border border-border bg-background p-0.5 shadow-lg transition-shadow hover:shadow-xl focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:bg-muted`,"aria-label":`Open user menu`,children:(0,B.jsx)(cx,{className:`h-11 w-11`})})}),(0,B.jsxs)(fl,{align:`start`,side:`top`,sideOffset:10,className:`mb-2 min-w-56`,children:[(0,B.jsx)(lx,{name:e.data?.name,email:e.data?.email,children:(0,B.jsx)(cx,{})}),(0,B.jsx)(_l,{}),(0,B.jsx)(sx,{children:(0,B.jsxs)(he,{to:`/posts`,children:[(0,B.jsx)(Ot,{}),(0,B.jsx)(sx.Label,{children:`Posts`})]})}),(0,B.jsx)(sx,{children:(0,B.jsxs)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,children:[(0,B.jsx)(Ke,{}),(0,B.jsx)(sx.Label,{children:`View site`})]})}),(0,B.jsx)(_l,{}),(0,B.jsx)(dx,{}),(0,B.jsx)(mx,{}),(0,B.jsx)(_l,{}),(0,B.jsx)(hx,{})]})]})}var vx=`CustomThemeSettingsResponseType`,yx=vx,bx=m({dataType:vx,path:`/custom_theme_settings/`}),xx=p({method:`PUT`,path:()=>`/custom_theme_settings/`,body:e=>({custom_theme_settings:e}),updateQueries:{emberUpdateType:`skip`,dataType:vx,update:e=>e}}),Sx=`ThemesResponseType`,Cx=m({dataType:Sx,path:`/themes/`}),wx=m({dataType:Sx,path:`/themes/active/`}),Tx=p({method:`PUT`,path:e=>`/themes/${e}/activate/`,updateQueries:{dataType:Sx,emberUpdateType:`createOrUpdate`,update:(e,t)=>({...t,themes:t.themes.map(t=>e.themes.find(({name:e})=>e===t.name)||{...t,active:!1})})},invalidateQueries:{dataType:yx}}),Ex=p({method:`DELETE`,path:e=>`/themes/${e}/`,updateQueries:{dataType:Sx,emberUpdateType:`delete`,update:(e,t,n)=>({...t,themes:t.themes.filter(e=>e.name!==n)})}}),Dx=p({method:`POST`,path:()=>`/themes/install/`,searchParams:e=>({source:`github`,ref:e}),updateQueries:{dataType:Sx,emberUpdateType:`createOrUpdate`,update:(e,t)=>t&&{...t,themes:[...t.themes,...e.themes]}}}),Ox=p({method:`POST`,path:()=>`/themes/upload/`,body:({file:e})=>{let t=new FormData;return t.append(`file`,e),t},updateQueries:{dataType:Sx,emberUpdateType:`createOrUpdate`,update:(e,t)=>t&&{...t,themes:[...t.themes,...e.themes]}}});function kx(e){return e.active}function Ax(e){return e.name.toLowerCase()===`source`}function jx(e){return e.name.toLowerCase()===`casper`}function Mx(e){return Ax(e)||jx(e)}function Nx(e){return!Ax(e)&&!jx(e)&&!kx(e)}function Px(e){return e.code===`GS110-NO-MISSING-PAGE-BUILDER-USAGE`&&!!e.failures?.[0]?.message?.includes(`show_title_and_feature_image`)}function Fx(){let{data:e}=u(),{data:t}=wx({enabled:!(e&&Bt(e))}),n=t?.themes?.[0],r=n?.errors??[],i=n?.warnings??[],a=r.filter(e=>!Px(e));return{hasErrors:a.length>0,errors:a,warnings:i}}function Ix({error:e}){let[t,n]=(0,z.useState)(!1);return(0,B.jsxs)(`li`,{className:`border-b border-border last:border-0`,children:[(0,B.jsxs)(`button`,{className:`flex w-full items-center gap-2 py-3 text-left text-sm font-medium`,type:`button`,onClick:()=>n(!t),children:[(0,B.jsx)(St,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200 ${t?`rotate-90`:``}`}),(0,B.jsx)(`span`,{children:e.rule})]}),t&&(0,B.jsxs)(`div`,{className:`pb-3 pl-6 text-sm text-muted-foreground`,children:[(0,B.jsx)(`p`,{dangerouslySetInnerHTML:{__html:e.details}}),e.failures?.length>0&&(0,B.jsxs)(`div`,{className:`mt-2`,children:[(0,B.jsx)(`h6`,{className:`text-xs font-semibold text-muted-foreground uppercase`,children:`Affected files:`}),(0,B.jsx)(`ul`,{className:`mt-1 list-disc pl-4`,children:e.failures.map((e,t)=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`code`,{className:`text-xs`,children:e.ref}),e.message&&(0,B.jsxs)(B.Fragment,{children:[`: `,e.message]})]},t))})]})]})]})}function Lx({open:e,onOpenChange:t,errors:n,warnings:r}){return(0,B.jsx)(fu,{open:e,onOpenChange:t,children:(0,B.jsxs)(_u,{className:`flex max-h-[85vh] max-w-lg flex-col`,children:[(0,B.jsx)(vu,{children:(0,B.jsx)(bu,{className:`text-2xl tracking-tighter`,children:`Theme errors`})}),(0,B.jsxs)(`section`,{className:`-mx-6 flex-1 overflow-y-auto px-6`,children:[n.length>0&&(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h2`,{className:`mb-1 text-sm font-semibold`,children:`Errors`}),(0,B.jsx)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:`Highly recommended to fix, functionality could be restricted`}),(0,B.jsx)(`ul`,{className:`border-t border-border`,children:n.map((e,t)=>(0,B.jsx)(Ix,{error:e},t))})]}),r.length>0&&(0,B.jsxs)(`div`,{className:n.length>0?`mt-4`:``,children:[(0,B.jsx)(`h2`,{className:`mb-1 text-sm font-semibold`,children:`Warnings`}),(0,B.jsx)(`ul`,{className:`border-t border-border`,children:r.map((e,t)=>(0,B.jsx)(Ix,{error:e},t))})]})]}),(0,B.jsx)(yu,{children:(0,B.jsx)(R,{onClick:()=>t(!1),children:`OK`})})]})})}function Rx(){let{hasErrors:e,errors:t,warnings:n}=Fx(),[r,i]=(0,z.useState)(!1);return e?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Hd,{className:`mx-2 cursor-pointer`,role:`status`,size:`md`,variant:`destructive`,onClick:()=>i(!0),children:(0,B.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,B.jsx)(Ft,{className:`mt-0.5 size-4 shrink-0 text-red`}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`font-semibold text-red`,children:`Your theme has errors`}),(0,B.jsx)(`div`,{className:`text-sm text-foreground`,children:`Some functionality on your site may be limited →`})]})]})}),(0,B.jsx)(Lx,{errors:t,open:r,warnings:n,onOpenChange:i})]}):null}var zx=``+new URL(`ghost-pro-logo-YKA724rW.png`,import.meta.url).href,Bx=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAP0AAABCCAYAAACcqdBcAAANo0lEQVR4Ae3dBXBbV9rG8VPmVmVulTJXZW5lKoPLlLoKs6OA47DlMDhxmJNrCoPjhlENlQIqc6uPYUnLvOv9j/bMzh2P5GMdQXSd8878DBPdq9BzWJYwlfoyZcqUKVOmTDU2Nh6Hs3ERLsCpOArCMIz0ycSTHI0b8Br8GI95sDAXszEXCzEXo1GMPJwJkTqGYaQr5B50RC8MRTu0hR9jMQuzMQ8W6rAMy9GADViDpZiAAApxHU6ByA6GYUJ/MwYhgB4oRRkqMBlD0QEv4lE8jrZ4FT60w2t4A8/hLZTBwmJpJrriepwBkXmGYUJ/IkowFt0wDSuwChUYjL4oliajFuuwFBZmYDwGow9KUYKXkI+X0B6laEA9ypCL4yAMw8hM6N2oQG9U4B1MRwc8iudRgirswjYswXiUohg90Q8BzMZqvIt9OCBtxgJUohTdUY3lGINLIdLLMEzo81AqLUYdfMiHH5OxBbXw4nwcDdECZ+ButMMkBLELW7AeK1GBiViCRXgcIj0Mw4S+AKUox0aMwGPoAgsLsQjPQaRAG/TFFmzEYqzCClRgIVajA46CSB3DMKEvQgmmYSN64m1UYIr0Kk6FSLETUIhNWIptWIbFmI616IWjIQzDSD70z6A/ZmINeqIMkzESAVwNkWbHw4d5WIvNWIXpWIfuEA7kghteCMM43KF/GEMxUwatLyoxQuqNkyAy6FKUohrbEMR8NKAYwiEqEYa9fBCGkUqJhmsgKrAJQzEPg1COVyAOoxJUYDt2oxa78AaEA8jAm9BnBxP6ozACY7EWZahBCcbgvixYPDsH3TEY9TL867ENd5rQG5LwhHJ9nlBeEBE0tkIRBP/553zcDWEn+KDEX1QOAqjGDMxHOYbgIYgsca4M/igsxwbswUacZUKf9fywEJJcqQ17gYcwhNF4BAl7CD+EJOQX8cnV8vGYiukYjXkYgochssyl8GEKamTwv8AsE/qs5kHTcqc48BE0Hply/YmE/hkZ+HnogRUow5MQWepBvIK5qMFWfI08E/qsVZiu0EeHuLKHP7LleyEEH+KS8/ShmI5yjMYaFEFkuafxMmqwGLuwHaeY0Gclf9pC/3GeZQIfFYQQfIhLvg6+FgvwKpZisENOvB2FtrZFx5X4FE+b0GelKekIvSfkdZmwS7K3V/X0w1CHSnTGGpwO4RBnwIcq1GAdgjjahD7rBNMT+nyvCbpdvj9u4GUwNmE1XsNy5EE4zN0oxxIsw348n4ZTdD4EYEmV8MMT5/F+BJShj/8clfAlEQwP/KiEJQVQCJfm34G3yT0D8MMLoRBJT+gLfCboEmCphvYbZFjewC6cAOFAr2EN6rAaFkQKuBGEqsK2AFfCXm5V6FGGCOKVlUBAfAhBVtL3dEH+/pRVDy+EZGsk4j7easJtQp++0HfAOgzBTIyAcKhTMd32wpzduAIiCW8jgpaXDHYCoS9DKIF7u3QaKEWVKe4ZRiK1FjLwWuU1oU9f6KehAcOwDm0hHCwfm7EY61CcVA+vX+rQ61dQP5xawde5pw8C/mwM/ez/rY5rwn/NbOz4Xd/Ghz59Lua1/Fqz1w//9wmNr37dWT5ejeeJPmfDzzc37v/Nx1F1P1ndOOzfx6c+9HKxbhtWYApm4iEIBzsZ67EctVie4kW3MPxwS15UIVaF4IcngQCFYElBqEOhvncEFgJSc/f1Q9j4mml4piCAKQgiEqORC2Zj6FtSv/7rb6IhjtVgtKT++0//29jnx+HN/j4Ie/R5mrsH4U9p6G/DVizCDEzC5RAO1wnrYGEXhAZvgkPrAJqWlUAww/BCua8ta0oLwzkFrgRGBRG4FKvtAcXCYSGEFIAFKTvm9IkUPbBW6GXFCy333dLie/CcKQt9HrbI0M/DWLggHO4SbIeFzZoNmV9jay0SI0Dq0KvPn1fFuUZ133rN6Ytqt0Hoo7Jg9d5W0eH6k1+8EcWwPPo9gYwbXHvod/5yr7wW8vrhPJYe2j5ikFOF+A0HQ/p/TSkQ/frr33/faC9GBSkJfQH2YD3KUYbjIRzuaGxENVaiCEJJHTSXxjV6+/Tqo6sRxahEhknrsExYscXmbU2hJ6wxH8O82h7KmIFlFBB3nk7wYzUaPN+bjfaaI3tx1e9BNh5Jh/5FHMC76IfBOBaiFViOxajDJIeH3hMrKYrghvSnMcqFxzB8rT30hNMeuGZCrw4sX8cc1tMw2K9RNh709kmHvhs+xi70RClOgGgFJmExqrFF57ioRg8XTFPo3YrQB+Numam5FKvvAcX2YSU8rTD0DNW7JBV6Hhcz9AzblfP9ePdhxJF06P34GjvQDQNa0bvJDEGd9L5GY+ZTLsypgxnMUOjDinm5SqSZVXw3IgkcTHK3ltAPJ5CyCOp3CYQ+frjpuZs895tNr1M1Pvqhly9U6YOvsBNdUIKLIFoBP6qwBLtwmcZx00gL97K9ijBnd+jV1/vUwW8afoeGXgaz6VaaDK069PJ6evam4Y41n2/xPr69+D6p0BdjP95HZ/TA7RCtQA/MkaHfhhshWkoxtI0gKDW3Bed2fui1T/r5HRJ65sz/Zxdzr5ygxQw9DYPyerlQpxF6RSOlObzvgHfxKbrK75+AaAVKMR2LsRkeCA1VSLQi8EA4fXgfgxt+BFV/B3Bld+gVJefQBDXxfXrZIEyUC28aoVdcox/6p7AZX6A3itAeohWYgSmoRT1ugtBUn+ARWQ9EBkNfH3f9Qc2lfyJONgDxRzt+B4Q+Ovcm3ADYe48Oz9krVy2sRUcBDPEB8L3yQI192iCfo1l+TvXFWFvQDv0tWIdPUIq26INjIByuFnOxGBbaQGgog70ikr3CsBRBSWfoA4p9fOUZAI3tSShP901x2JxeTTGn59itcl+dhkXZMMQ7ucfXSYf+JkxECJNQhP44D8LBTsE7sCDfRlvr0FGhep6uloHQe5PorevVuw5q8JnQq0PddFeAhkFOH9RDezkySDr0l8mQ70UtOqI7roVwsAexEjXYik4pGtYHILIt9FJQ42W4vRV79Bqh1xreF7am0BNMZW9vnwbwdczgcx/5uDh79JqhPwovYj0OysB3wZMQDjYa87EbM3EPhIYQ7BXMup5e3duH4YnzAzHiPV7YeBCCBW+cRsQT58/laeGiYWWTexU6NvQSAY1xMEcCZ/Tl3F6WDDX3jj5eXq9oGPRfT+/BZHyLseiFHhAOdTp2YhU2YzBOSPECXghByZIqEUBhxhfyJExR7J8HEWoSPFVQrXj3ksIJvuY/GO/316SRdTk59PTSykM4BD8aZkUpAq8X+pNRhP3Yhn6oxHEQDtQX62Twx6AAQpMXuhVG7wyH3oUQtCrO70PnfmG4k/w79Tk59LK3Vy7AEeborxHsmFt+7PErDuNohF4G/37U4CtMwETkQDjMbdiBvZiFASn4ibh+RKBbIbgyEnoJAY2QetUjE/3Aa5x9sHRC72TyZb1R6oYo+dCfhP74DO9jPMohHOQcDMXX+BAzcVVGfiCmugKKnrNQI/QRqK6pUoQ2CD9civv4EASlf68mAs38EI+A/vDeUIdeksdvG/A1alAlgyQc4Fy8iQaEsFL3x18r9p6nwG3jgVcqVPxHFoeRB174JA9cWXAvyL87wJOy1XtjiiL0gNyrr8cPWOSQBb1jkIcx+BB7MRWnQSTBgr1Ch+cNHQz9N7swb3ahxF/eA6hEAz6Wny+DyGJ5GIIQ9qMuBT/nz6XYc1YJ6J9wM/Tf1kq+Wy2MAo/gg5I8ydYHg7EV+zADIks9i3FYgn1Yh9cgkuRNcjW5PvPDe8PDkBaNRn4IQvbmavK96IfBj0P4DL4sfNPK17EUZQhhL8pwYppCb2me1Vdfa5jePqW8bgjBB6jJYehTGIW+MvSf4laILHAVxmEKumMzPsJsnA+hpP/KszLF/rOlOFuefib4niM7+LkBCAjBhxaTZ9dfwHD0wyfYj7MgDpNL8QbmYCiKsRSfYVYaghVUbE/Vw0I9wurtOiODwXcTgPARFvgICiEkIb9oOdnbl6A/BuEr7MGVEBl0IXLRFSNRgsFYgbAM/r0QepJ//7bsDLxBB+ZjyhqUgWilQc8Pgt7d64Kwk1+0nDyeW4gy+DEA3+BzFECk2Vl4GM+jCOMwAJOxGD9gDW6GkLIl+EF4IQ4Xw9C98Gw8YxtO98Zu/ARvp2mB7iIZ9kfwAPyYhArMw0x8g0W4ECIDvKhCCLEqjHr4zfzdcHToJTdeRwmK0Q9rEcFQnA2RAtfhbhn025CDqbAwDRXy8w/ohtMhDhMX3JLIRoaRinPtr6InhqA/5uA/sQtP41jNnv06PIF7cQtuQi/MQADDMRLLsUBjhd4wTOg1HYdH8ZYM5RhMxHYZ/g1oD9WbZZyANngMhcjBnTL05bAwEMMxG2twILGffmMYRqpf3JKHInSGX4b/fYRxEMNwHVy4Crl4ES+jPYrwBLx4QAZ6NRZhMZbZTtnNQhuIdDIME3q143ELXpFexyAZ/v/F/+NzTEU/tJOhfxqP4Tm0Rz0OYiM2YB5qpDyIxBmGkYljsRcjB20xFiuxG+/hM/yn9AO+w//jf/EpdmEHRiHXzNuzjWFCr3aWbYFuEOZhI/bjG+lDzEIn3AQXhGEYTgi92nG4DNfLz8dk+PkNw4TeMAwTesMwHMGE3jAME3rDMP4BH+ffJ5px0JYAAAAASUVORK5CYII=`;function Vx({trialDaysRemaining:e}){return(0,B.jsxs)(Hd,{variant:`gradient`,size:`lg`,className:`mx-2 flex flex-col items-stretch`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`img`,{src:zx,alt:`Ghost Pro`,className:`max-h-[33px] dark:hidden`}),(0,B.jsx)(`img`,{src:Bx,alt:`Ghost Pro`,className:`hidden max-h-[33px] dark:block`})]}),(0,B.jsx)(`div`,{className:`mt-3 text-base font-semibold`,children:`Unlock every feature`}),(0,B.jsxs)(`div`,{className:`mt-2 mb-4 text-sm text-gray-700`,children:[`Choose a plan to access the full power of Ghost right away, you have `,(0,B.jsxs)(`span`,{className:`font-semibold text-foreground`,children:[e,` days`]}),` free trial remaining.`]}),(0,B.jsx)(R,{asChild:!0,children:(0,B.jsx)(`a`,{href:`#/pro/billing/plans`,children:`Upgrade now`})})]})}function Hx(){let{data:e}=Jb(),{data:t}=Pb(),{mutate:n}=Yb(),[r,i]=(0,z.useState)(!1);if(r||!e?.hasNew)return null;let a=t?.entries[0];return a?(0,B.jsx)(Hd,{"data-test-toast":`whats-new`,className:`mx-2`,role:`status`,"aria-label":`What’s new notification`,"aria-live":`polite`,variant:`gradient`,dismissible:!0,onDismiss:()=>{i(!0),n()},children:(0,B.jsxs)(`a`,{href:a.url,target:`_blank`,rel:`noopener noreferrer`,className:`block pr-8`,onClick:()=>{n()},"data-test-toast-link":!0,children:[(0,B.jsxs)(`div`,{className:`mb-2 flex items-center gap-2`,children:[(0,B.jsx)(je,{className:`size-4 text-purple-600 dark:text-purple`}),(0,B.jsx)(`span`,{className:`text-xs font-semibold tracking-wide text-gray-700 uppercase dark:text-gray-400`,children:`What’s new?`})]}),(0,B.jsx)(`div`,{className:`mb-1 text-base font-semibold text-gray-900 dark:text-foreground`,"data-test-toast-title":!0,children:a.title}),(0,B.jsx)(`div`,{className:`text-sm text-gray-700`,"data-test-toast-excerpt":!0,children:a.customExcerpt})]})}):null}function Ux(){let{data:e}=Jb(),{data:t}=Pb(),n=t?.entries[0];return{showWhatsNewBanner:!!e?.hasNew&&!!n}}function Wx(){let{hasErrors:e}=Fx(),{showUpgradeBanner:t,trialDaysRemaining:n}=ax(),{showWhatsNewBanner:r}=Ux();return Nl()?e?{bannerType:`theme-errors`,banner:(0,B.jsx)(Rx,{}),hasBanner:!0}:t?{bannerType:`upgrade`,banner:(0,B.jsx)(Vx,{trialDaysRemaining:n}),hasBanner:!0}:r?{bannerType:`whats-new`,banner:(0,B.jsx)(Hx,{}),hasBanner:!0}:{bannerType:null,banner:null,hasBanner:!1}:{bannerType:null,banner:null,hasBanner:!1}}function Gx({...e}){let[t,n]=(0,z.useState)(!1),{hasBanner:r}=Wx();return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(np,{...e,children:(0,B.jsx)(ap,{className:r?`pt-3`:``,children:(0,B.jsx)(lp,{children:(0,B.jsx)(up,{children:(0,B.jsx)(gx,{onOpenWhatsNew:()=>n(!0)})})})})}),(0,B.jsx)(Qb,{open:t,onOpenChange:n})]})}function Kx({banner:e}){let t=Wx(),n=e??t.banner;return n?(0,B.jsx)(`div`,{className:`fixed bottom-[92px] left-3 z-50 max-w-[276px]`,children:n}):null}var qx=[],Jx=(0,z.createContext)(void 0),Yx=({children:e})=>{let t=F(),[n,r]=(0,z.useState)(()=>{let e=localStorage.getItem(`featureFlags`);return e?JSON.parse(e):Xx()});(0,z.useEffect)(()=>{let e=Zx(t.search);Object.keys(e).length>0&&r(t=>{let n={...t,...e};return localStorage.setItem(`featureFlags`,JSON.stringify(n)),n})},[t.search]);let i={isEnabled:e=>n[e]??!1,flags:n,allFlags:qx};return(0,B.jsx)(Jx.Provider,{value:i,children:e})},Xx=()=>qx.reduce((e,t)=>({...e,[t]:!1}),{}),Zx=e=>{let t=new URLSearchParams(e),n={};return qx.forEach(e=>{let r=t.get(e);r===`ON`?n[e]=!0:r===`OFF`&&(n[e]=!1)}),n},Qx=()=>{let e=(0,z.useContext)(Jx);if(e===void 0)throw Error(`useFeatureFlags must be used within a FeatureFlagsProvider`);return e};function $x(){let e=P().find(e=>e.handle===`activitypub-basepath`)?.pathname??``;return e.endsWith(`/`)?e.slice(0,-1):e}function eS(){let e=_e(),t=$x();return(0,z.useCallback)((n,r)=>{if(typeof n==`number`){e(n,r);return}n.startsWith(`/`)?e(`${t}${n}`,r):e(n,r)},[e,t])}var tS=({className:e,onClick:t})=>{let n=eS(),{previousPath:r}=ve();return(0,B.jsx)(R,{className:L(`size-8 rounded-full bg-white/85 px-2 backdrop-blur-md focus-visible:ring-0 dark:bg-transparent dark:text-white [&_svg]:size-6`,e),variant:`ghost`,onClick:()=>{if(t){t();return}n(r?-1:`/`)},children:(0,B.jsx)(It,{size:20,strokeWidth:1.25})})},nS=()=>{let e=pe(eE,F().pathname);if(!e)return null;let t=e.map(e=>e.route).filter(e=>e.pageTitle);return t[t.length-1]||e[e.length-1].route};function rS(){let e=P(),t=e.findIndex(e=>e.handle===`activitypub-basepath`);if(t===-1)return``;let n=e[t+1];if(!n)return``;let r=e[t].pathname,i=n.pathname,a=i.startsWith(r)?i.slice(r.length):i;return a=a.replace(/^\//,``),a.split(`/`)[0]}var iS=({title:e,backIcon:t})=>t?(0,B.jsx)(tS,{className:`-ml-2`}):(0,B.jsx)(ba,{className:`!text-[1.5rem] font-semibold tracking-normal`,children:e}),aS=({onToggleMobileSidebar:e})=>(0,B.jsx)(R,{className:`px:0 mr-[-9px] w-[34px] rounded-full bg-white/85 backdrop-blur-md lg:hidden dark:bg-black/85 dark:text-white`,variant:`ghost`,onClick:e,children:(0,B.jsx)(at,{className:`size-5!`})}),oS=({onToggleMobileSidebar:e,showBorder:t=!0})=>{let{canGoBack:n}=ve(),r=rS(),i=xe(),a=nS(),o=!1;r===`profile`&&(o=!0),r===`notes`&&n&&(o=!0);let s=n&&i||a?.showBackButton===!0;return(0,B.jsx)(B.Fragment,{children:o?(0,B.jsxs)(`div`,{className:`sticky top-5 left-0 z-50 inline-block max-lg:flex max-lg:items-center max-lg:justify-between max-lg:pr-[15.5px] max-md:top-4`,children:[(0,B.jsx)(`div`,{children:s&&(0,B.jsx)(tS,{className:`ml-6 max-md:ml-[10px]`})}),!s&&(0,B.jsx)(aS,{onToggleMobileSidebar:e})]}):(0,B.jsx)(`div`,{className:`sticky top-0 z-50 bg-white/85 backdrop-blur-md dark:bg-background`,children:(0,B.jsxs)(`div`,{className:`relative flex h-[72px] items-center justify-between gap-5 px-[min(4vw,24px)] max-md:h-[68px] ${t?`before:absolute before:inset-x-[min(4vw,24px)] before:bottom-0 before:block before:border-b before:border-gray-200 before:content-[""] dark:before:border-gray-950`:``}`,children:[(0,B.jsx)(iS,{backIcon:s,title:a?.pageTitle||``}),(0,B.jsx)(aS,{onToggleMobileSidebar:e})]})})})};function sS(e){if(e.handle)return e.handle;if(!e.preferredUsername||!e.id)return`@unknown@unknown`;try{return`@${e.preferredUsername}@${new URL(e.id).hostname.replace(/^www\./,``)}`}catch{return`@unknown@unknown`}}function cS(){return{destination:{handle:``,apId:``},aliases:[]}}function lS(e){return e===null||!(`destination`in e)?cS():{destination:e.destination,aliases:`aliases`in e&&Array.isArray(e.aliases)?e.aliases:[]}}var uS={Note:0,Article:1,Tombstone:2},dS=e=>typeof e==`object`&&!!e&&`statusCode`in e&&`message`in e&&typeof e.statusCode==`number`&&typeof e.message==`string`,fS=class{apiUrl;authApiUrl;handle;fetch;constructor(e,t,n,r=window.fetch.bind(window)){this.apiUrl=e,this.authApiUrl=t,this.handle=n,this.fetch=r}async getToken(){try{return(await(await this.fetch(this.authApiUrl)).json())?.identities?.[0]?.token||null}catch{return null}}async fetchJSON(e,t=`GET`,n){let r={method:t,headers:{Authorization:`Bearer ${await this.getToken()}`,Accept:`application/activity+json`}};n&&(r.body=JSON.stringify(n),r.headers[`Content-Type`]=`application/json`);let i=await this.fetch(e,r);if(i.status===204||i.status===202)return null;if(!i.ok){let e={message:`Something went wrong, please try again.`,statusCode:i.status};try{let t=await i.json(),n=t.message||t.error;n&&(e.message=n),t.code&&(e.code=t.code)}catch{}throw e}return await i.json()}async blockDomain(e){let t=new URL(`.ghost/activitypub/v1/actions/block/domain/${encodeURIComponent(e.href)}`,this.apiUrl);return await this.fetchJSON(t,`POST`),!0}async unblockDomain(e){let t=new URL(`.ghost/activitypub/v1/actions/unblock/domain/${encodeURIComponent(e.href)}`,this.apiUrl);return await this.fetchJSON(t,`POST`),!0}async block(e){let t=new URL(`.ghost/activitypub/v1/actions/block/${encodeURIComponent(e.href)}`,this.apiUrl);return await this.fetchJSON(t,`POST`),!0}async unblock(e){let t=new URL(`.ghost/activitypub/v1/actions/unblock/${encodeURIComponent(e.href)}`,this.apiUrl);return await this.fetchJSON(t,`POST`),!0}async follow(e){let t=new URL(`.ghost/activitypub/v1/actions/follow/${e}`,this.apiUrl);return await this.fetchJSON(t,`POST`)}async unfollow(e){let t=new URL(`.ghost/activitypub/v1/actions/unfollow/${e}`,this.apiUrl);return await this.fetchJSON(t,`POST`)}async like(e){let t=new URL(`.ghost/activitypub/v1/actions/like/${encodeURIComponent(e)}`,this.apiUrl);await this.fetchJSON(t,`POST`)}async unlike(e){let t=new URL(`.ghost/activitypub/v1/actions/unlike/${encodeURIComponent(e)}`,this.apiUrl);await this.fetchJSON(t,`POST`)}async repost(e){let t=new URL(`.ghost/activitypub/v1/actions/repost/${encodeURIComponent(e)}`,this.apiUrl);await this.fetchJSON(t,`POST`)}async derepost(e){let t=new URL(`.ghost/activitypub/v1/actions/derepost/${encodeURIComponent(e)}`,this.apiUrl);await this.fetchJSON(t,`POST`)}async reply(e,t,n){let r=new URL(`.ghost/activitypub/v1/actions/reply/${encodeURIComponent(e)}`,this.apiUrl),i={content:t};return n&&(i.image=n),await this.fetchJSON(r,`POST`,i)}async note(e,t){let n=new URL(`.ghost/activitypub/v1/actions/note`,this.apiUrl),r={content:e};return t&&(r.image=t),(await this.fetchJSON(n,`POST`,r)).post}async delete(e){let t=new URL(`.ghost/activitypub/v1/post/${encodeURIComponent(e)}`,this.apiUrl);await this.fetchJSON(t,`DELETE`)}get userApiUrl(){return new URL(`.ghost/activitypub/users/${this.handle}`,this.apiUrl)}async getUser(){return await this.fetchJSON(this.userApiUrl)}get searchApiUrl(){return new URL(`.ghost/activitypub/v1/actions/search`,this.apiUrl)}async search(e){let t=this.searchApiUrl;t.searchParams.set(`query`,e);let n=await this.fetchJSON(t,`GET`);return n&&`accounts`in n?n:{accounts:[]}}async getThread(e){let t=new URL(`.ghost/activitypub/v1/thread/${encodeURIComponent(e)}`,this.apiUrl);return await this.fetchJSON(t)}async getAccount(e){let t=new URL(`.ghost/activitypub/v1/account/${e}`,this.apiUrl);return await this.fetchJSON(t)}async getAccountFollows(e,t,n){let r=new URL(`.ghost/activitypub/v1/account/${e}/follows/${t}`,this.apiUrl);n&&r.searchParams.set(`next`,n);let i=await this.fetchJSON(r);return i===null||!(`accounts`in i)?{accounts:[],next:null}:{accounts:Array.isArray(i.accounts)?i.accounts:[],next:`next`in i&&typeof i.next==`string`?i.next:null}}async getAccountAliases(){let e=new URL(`.ghost/activitypub/v1/aliases`,this.apiUrl);return lS(await this.fetchJSON(e))}async getDomain(){let e=new URL(`.ghost/activitypub/v1/domain`,this.apiUrl);return await this.fetchJSON(e)}async updateDomain(e){let t=new URL(`.ghost/activitypub/v1/domain`,this.apiUrl);return await this.fetchJSON(t,`PUT`,{domain:e})}async validateDomain(e){let t=new URL(`.ghost/activitypub/v1/domain/validate`,this.apiUrl);return await this.fetchJSON(t,`POST`,{domain:e})}async addAccountAlias(e){let t=new URL(`.ghost/activitypub/v1/aliases`,this.apiUrl);return lS(await this.fetchJSON(t,`POST`,{sourceHandle:e}))}async removeAccountAlias(e){let t=new URL(`.ghost/activitypub/v1/aliases`,this.apiUrl);return lS(await this.fetchJSON(t,`DELETE`,{actorUri:e}))}async getFeed(e){return this.getPaginatedPosts(`.ghost/activitypub/v1/feed/notes`,e)}async getInbox(e){return this.getPaginatedPosts(`.ghost/activitypub/v1/feed/reader`,e)}async getDiscoveryFeed(e,t){let n=`.ghost/activitypub/v1/feed/discover/${e}`;return this.getPaginatedPosts(n,t)}async getExploreAccounts(e,t){let n=`.ghost/activitypub/v1/explore/${e}`;return this.getPaginatedExploreAccounts(n,t)}async getTopics(){let e=new URL(`.ghost/activitypub/v1/topics`,this.apiUrl),t=await this.fetchJSON(e);return{topics:t&&`topics`in t&&Array.isArray(t.topics)?t.topics:[]}}async getRecommendations(e){let t=new URL(`.ghost/activitypub/v1/recommendations`,this.apiUrl);e&&t.searchParams.set(`limit`,e.toString());let n=await this.fetchJSON(t);return{accounts:n&&`accounts`in n&&Array.isArray(n.accounts)?n.accounts:[]}}async getPostsByAccount(e,t){return this.getPaginatedPosts(`.ghost/activitypub/v1/posts/${e}`,t)}async getPostsLikedByAccount(e){return this.getPaginatedPosts(`.ghost/activitypub/v1/posts/me/liked`,e)}async getPaginatedPosts(e,t){let n=new URL(e,this.apiUrl);t&&n.searchParams.set(`next`,t);let r=await this.fetchJSON(n);return r===null||!(`posts`in r)?{posts:[],next:null}:{posts:Array.isArray(r.posts)?r.posts:[],next:`next`in r&&typeof r.next==`string`?r.next:null}}async getNotifications(e){let t=new URL(`.ghost/activitypub/v1/notifications`,this.apiUrl);e&&t.searchParams.set(`next`,e);let n=await this.fetchJSON(t);return n===null||!(`notifications`in n)?{notifications:[],next:null}:{notifications:Array.isArray(n.notifications)?n.notifications:[],next:`next`in n&&typeof n.next==`string`?n.next:null}}async getNotificationsCount(){let e=new URL(`.ghost/activitypub/v1/notifications/unread/count`,this.apiUrl),t=await this.fetchJSON(e);return t===null?{count:0}:{count:typeof t.count==`number`?t.count:0}}async resetNotificationsCount(){let e=new URL(`.ghost/activitypub/v1/notifications/unread/reset`,this.apiUrl);return await this.fetchJSON(e,`PUT`),!0}async getBlockedAccounts(e){let t=new URL(`.ghost/activitypub/v1/blocks/accounts`,this.apiUrl);e&&t.searchParams.set(`next`,e);let n=await this.fetchJSON(t);return n===null?{accounts:[],next:null}:{accounts:`blocked_accounts`in n&&Array.isArray(n.blocked_accounts)?n.blocked_accounts:[],next:`next`in n&&typeof n.next==`string`?n.next:null}}async getBlockedDomains(e){let t=new URL(`.ghost/activitypub/v1/blocks/domains`,this.apiUrl);e&&t.searchParams.set(`next`,e);let n=await this.fetchJSON(t);return n===null?{domains:[],next:null}:{domains:`blocked_domains`in n&&Array.isArray(n.blocked_domains)?n.blocked_domains:[],next:`next`in n&&typeof n.next==`string`?n.next:null}}async getPaginatedExploreAccounts(e,t){let n=new URL(e,this.apiUrl);t&&n.searchParams.set(`next`,t);let r=await this.fetchJSON(n);return r===null||!(`accounts`in r)?{accounts:[],next:null}:{accounts:Array.isArray(r.accounts)?r.accounts:[],next:`next`in r&&typeof r.next==`string`?r.next:null}}async getPost(e){let t=new URL(`.ghost/activitypub/v1/post/${encodeURIComponent(e)}`,this.apiUrl);return await this.fetchJSON(t)}async getReplies(e,t){let n=new URL(`.ghost/activitypub/v1/replies/${encodeURIComponent(e)}`,this.apiUrl);return t&&n.searchParams.set(`next`,t),await this.fetchJSON(n)}async updateAccount({name:e,username:t,bio:n,avatarUrl:r,bannerImageUrl:i}){let a=new URL(`.ghost/activitypub/v1/account`,this.apiUrl);await this.fetchJSON(a,`PUT`,{name:e,username:t,bio:n,avatarUrl:r,bannerImageUrl:i})}async upload(e){let t=new URL(`.ghost/activitypub/v1/upload/image`,this.apiUrl),n=new FormData;n.append(`file`,e);let r=await this.getToken(),i=await this.fetch(t,{method:`POST`,headers:{Authorization:`Bearer ${r}`},body:n});if(!i.ok)throw{message:`Upload failed`,statusCode:i.status};return(await i.json()).fileUrl}async enableBluesky(){let e=new URL(`.ghost/activitypub/v2/actions/bluesky/enable`,this.apiUrl);await this.fetchJSON(e,`POST`)}async disableBluesky(){let e=new URL(`.ghost/activitypub/v2/actions/bluesky/disable`,this.apiUrl);await this.fetchJSON(e,`POST`)}async confirmBlueskyHandle(){let e=new URL(`.ghost/activitypub/v2/actions/bluesky/confirm-handle`,this.apiUrl),t=await this.fetchJSON(e,`POST`);return t===null||!(`handle`in t)||typeof t.handle!=`string`?``:String(t.handle)}},pS=`pending-`;function mS(){return`${pS}${crypto.randomUUID()}`}function hS(e){return e.startsWith(pS)}function gS(e,t,n,r){let i={id:e.url,icon:e.icon,name:e.name,preferredUsername:e.preferredUsername,"@context":``,discoverable:!1,featured:``,followers:``,following:``,image:{url:``},inbox:``,manuallyApprovesFollowers:!1,outbox:``,publicKey:{id:``,owner:``,publicKeyPem:``},published:``,summary:``,type:`Person`,url:``};return{id:t,type:`Create`,actor:i,object:{type:`Note`,name:``,content:n,summary:null,url:``,attributedTo:i,image:r||``,published:new Date().toISOString(),attachment:[],preview:{type:`Note`,content:n},id:t,replyCount:0,likeCount:0,liked:!1,reposted:!1,repostCount:0,authored:!0,"@context":``},"@context":``,to:``}}function _S(e){return e.replace(/\n/g,`<br />`)}function vS(e){let t=``;t=e.repostedBy===null?`Create`:`Announce`;let n={id:e.author.url,icon:{url:e.author.avatarUrl},name:e.author.name,handle:e.author.handle,preferredUsername:e.author.handle.split(`@`)[1],followedByMe:e.author.followedByMe,"@context":``,discoverable:!1,featured:``,followers:``,following:``,image:{url:``},inbox:``,manuallyApprovesFollowers:!1,outbox:``,publicKey:{id:``,owner:``,publicKeyPem:``},published:``,summary:``,type:`Person`,url:``},r=null;e.repostedBy!==null&&(r={id:e.repostedBy.url,icon:{url:e.repostedBy.avatarUrl},name:e.repostedBy.name,handle:e.repostedBy.handle,preferredUsername:e.repostedBy.handle.split(`@`)[1],followedByMe:e.repostedBy.followedByMe,"@context":``,discoverable:!1,featured:``,followers:``,following:``,image:{url:``},inbox:``,manuallyApprovesFollowers:!1,outbox:``,publicKey:{id:``,owner:``,publicKeyPem:``},published:``,summary:``,type:`Person`,url:``});let i=`Note`;e.type===uS.Article?i=`Article`:e.type===uS.Tombstone&&(i=`Tombstone`);let a={type:i,name:e.title,content:e.content,summary:e.summary,url:e.url,attributedTo:n,image:e.featureImageUrl??``,published:e.publishedAt,attachment:e.attachments,preview:{type:``,content:e.excerpt},id:e.id,replyCount:e.replyCount,likeCount:e.likeCount,liked:e.likedByMe,reposted:e.repostedByMe,repostCount:e.repostCount,authored:e.authoredByMe===!0,metadata:e.metadata,"@context":``};return{id:e.id,type:t,actor:r===null?n:r,object:a,"@context":``,to:``}}var yS;async function Y(){return yS||=(await(await fetch(`/ghost/api/admin/site/`)).json()).site.url,yS}function X(e,t){return new fS(new URL(t),new URL(`/ghost/api/admin/identities/`,window.location.origin),e)}function bS(e=`Rate limit exceeded`,t=`You've made too many requests. Please try again later.`){ro.error(e,{description:t})}function xS(e=`Action failed`,t=`This user has restricted who can interact with their account.`){ro.error(e,{description:t})}var Z={outbox:e=>[`outbox`,e],liked:e=>[`liked`,e],user:e=>[`user`,e],profilePosts:e=>e===null?[`profile_posts`]:[`profile_posts`,e],account:e=>[`account`,e],accountAliases:e=>[`account_aliases`,e],accountDomain:e=>[`account_domain`,e],accountFollows:(e,t)=>[`account_follows`,e,t],searchResults:e=>[`search_results`,e],suggestedProfiles:(e,t)=>[`suggested_profiles`,e,t],exploreProfiles:e=>[`explore_profiles`,e],replyChain:e=>e===null?[`reply_chain`]:[`reply_chain`,e],feed:[`feed`],inbox:[`inbox`],discoveryFeed:[`discovery_feed`],postsByAccount:[`account_posts`],postsLikedByAccount:[`account_liked_posts`],notifications:e=>[`notifications`,e],notificationsCount:e=>[`notifications_count`,e],blockedAccounts:e=>[`blocked_accounts`,e],blockedDomains:e=>[`blocked_domains`,e],topics:()=>[`topics`]};function SS(e,t,n){let r=[Z.feed,Z.inbox,Z.discoveryFeed,Z.postsLikedByAccount,Z.profilePosts(null)];for(let i of r)e.setQueriesData(i,e=>e===void 0?e:{...e,pages:e.pages.map(e=>({...e,posts:e.posts.map(e=>e.object.id===t?{...e,object:{...e.object,liked:n,likeCount:Math.max(n?(e.object.likeCount||0)+1:(e.object.likeCount||0)-1,0)}}:e)}))}),i===Z.postsLikedByAccount&&(e.setQueriesData(i,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:n?e.posts:e.posts.filter(e=>e.object.id!==t)}))}),n&&e.invalidateQueries({queryKey:Z.postsLikedByAccount}))}function CS(e,t,n,r){let i=[Z.feed,Z.inbox,Z.discoveryFeed,Z.profilePosts(`index`)];t!==`index`&&i.push(Z.profilePosts(t));let a=n.split(`@`)[1];for(let t of i)e.setQueriesData(t,e=>e===void 0?e:{...e,pages:e.pages.map(e=>({...e,posts:e.posts.map(e=>e.type!==`Announce`&&e.actor?.preferredUsername===a?{...e,actor:{...e.actor,followedByMe:r}}:e.type===`Announce`&&typeof e.object.attributedTo==`object`&&e.object.attributedTo&&!Array.isArray(e.object.attributedTo)&&`preferredUsername`in e.object.attributedTo&&e.object.attributedTo.preferredUsername===a?{...e,object:{...e.object,attributedTo:{...e.object.attributedTo,followedByMe:r}}}:e)}))});let o=Z.replyChain(null);e.setQueriesData(o,e=>{if(!e)return e;let t=e=>e.author.handle===n?{...e,author:{...e.author,followedByMe:r}}:e;return{...e,post:t(e.post),ancestors:{...e.ancestors,chain:e.ancestors.chain.map(t)},children:e.children.map(e=>({...e,post:t(e.post),chain:e.chain.map(t)}))}})}function wS(e,t,n){e.getQueryCache().getAll().forEach(r=>{let i=r.queryKey;Array.isArray(i)&&i[0]===`account_follows`&&e.setQueryData(i,e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,accounts:e.accounts.map(e=>e.handle===t?{...e,isFollowing:n}:e)}))}:e)})}function TS(e,t,n){let r=Z.replyChain(null);e.setQueriesData(r,e=>{if(!e)return e;let r=e=>e.id===t?{...e,likedByMe:n,likeCount:Math.max(n?(e.likeCount||0)+1:(e.likeCount||0)-1,0)}:e;return{...e,post:r(e.post),ancestors:{...e.ancestors,chain:e.ancestors.chain.map(r)},children:e.children.map(e=>({...e,post:r(e.post),chain:e.chain.map(r)}))}}),e.setQueryData(Z.account(`index`),e=>e&&{...e,likedCount:Math.max(0,e.likedCount+(n?1:-1))})}function ES(e,t,n,r){let i=Z.notifications(t);e.setQueriesData({queryKey:i},e=>{if(!e||!e.pages)return e;try{return{...e,pages:e.pages.map(e=>!e||!e.notifications?e:{...e,notifications:e.notifications.map(e=>!e||!e.post?e:e.post.id===n?{...e,post:{...e.post,likedByMe:r,likeCount:Math.max(r?e.post.likeCount+1:e.post.likeCount-1,0)}}:e)})}}catch{return e}})}function DS(e,t,n,r){let i=Z.notifications(t);e.setQueriesData({queryKey:i},e=>{if(!e||!e.pages)return e;try{return{...e,pages:e.pages.map(e=>!e||!e.notifications?e:{...e,notifications:e.notifications.map(e=>!e||!e.post?e:e.post.id===n?{...e,post:{...e.post,repostedByMe:r,repostCount:Math.max(r?e.post.repostCount+1:e.post.repostCount-1,0)}}:e)})}}catch{return e}})}function OS(e,t,n,r){let i=Z.notifications(t);e.setQueriesData({queryKey:i},e=>{if(!e||!e.pages)return e;try{return{...e,pages:e.pages.map(e=>!e||!e.notifications?e:{...e,notifications:e.notifications.map(e=>!e||!e.post?e:e.post.id===n?{...e,post:{...e.post,replyCount:Math.max((e.post.replyCount??0)+r,0)}}:e)})}}catch{return e}})}function kS(e,t,n){let r=[Z.feed,Z.inbox,Z.discoveryFeed,Z.profilePosts(`index`),Z.postsLikedByAccount];for(let i of r)e.setQueriesData(i,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:e.posts.map(e=>e.object.id===t?{...e,object:{...e.object,replyCount:Math.max((e.object.replyCount??0)+n,0)}}:e)}))})}function AS(e,t,n){let r=Z.replyChain(null);e.setQueriesData({queryKey:r,exact:!1},e=>{if(!e)return e;let r=e=>e.id===t?{...e,replyCount:Math.max((e.replyCount||0)+n,0)}:e;return{...e,post:r(e.post),ancestors:{...e.ancestors,chain:e.ancestors.chain.map(r)},children:e.children.map(e=>({...e,post:r(e.post),chain:e.chain.map(r)}))}})}function jS(e){return c({queryKey:Z.blockedAccounts(e),refetchOnMount:`always`,async queryFn({pageParam:t}){return X(e,await Y()).getBlockedAccounts(t)},getNextPageParam(e){return e.next}})}function MS(e){return c({queryKey:Z.blockedDomains(e),refetchOnMount:`always`,async queryFn({pageParam:t}){return X(e,await Y()).getBlockedDomains(t)},getNextPageParam(e){return e.next}})}function NS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).like(t)},onMutate:n=>{SS(t,n,!0),TS(t,n,!0),ES(t,e,n,!0)},onError(n,r){SS(t,r,!1),TS(t,r,!1),ES(t,e,r,!1),n.statusCode===403&&xS(),n.statusCode===429&&bS()}})}function PS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).unlike(t)},onMutate:n=>{SS(t,n,!1),TS(t,n,!1),ES(t,e,n,!1)},onError(e){e.statusCode===429&&bS()}})}function FS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).blockDomain(new URL(t.url))},onMutate:e=>{e.handle&&t.setQueryData(Z.account(e.handle),e=>e&&{...e,domainBlockedByMe:!0,followedByMe:!1,followsMe:!1})},onError(e){e.statusCode===429&&bS()}})}function IS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).unblockDomain(new URL(t.url))},onMutate:e=>{e.handle&&t.setQueryData(Z.account(e.handle),e=>e&&{...e,domainBlockedByMe:!1})},onError(e){e.statusCode===429&&bS()}})}function LS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).block(new URL(t.apId))},onMutate:e=>{t.setQueryData(Z.account(e.handle),e=>e&&{...e,blockedByMe:!0,followedByMe:!1,followsMe:!1}),t.invalidateQueries({queryKey:Z.feed}),t.invalidateQueries({queryKey:Z.inbox}),t.invalidateQueries({queryKey:Z.discoveryFeed})},onError(e){e.statusCode===429&&bS()}})}function RS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).unblock(new URL(t.apId))},onMutate:e=>{t.setQueryData(Z.account(e.handle),e=>e&&{...e,blockedByMe:!1})},onError(e){e.statusCode===429&&bS()}})}function zS(e,t,n){let r=[Z.feed,Z.inbox,Z.discoveryFeed,Z.profilePosts(null)];for(let i of r)e.setQueriesData(i,e=>e===void 0?e:{...e,pages:e.pages.map(e=>({...e,posts:e.posts.map(e=>e.object.id===t?{...e,object:{...e.object,reposted:n,repostCount:Math.max(n?e.object.repostCount+1:e.object.repostCount-1,0)}}:e)}))})}function BS(e,t,n){let r=Z.replyChain(null);e.setQueriesData(r,e=>{if(!e)return e;let r=e=>e.id===t?{...e,repostedByMe:n,repostCount:Math.max(n?(e.repostCount||0)+1:(e.repostCount||0)-1,0)}:e;return{...e,post:r(e.post),ancestors:{...e.ancestors,chain:e.ancestors.chain.map(r)},children:e.children.map(e=>({...e,post:r(e.post),chain:e.chain.map(r)}))}})}function VS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).repost(t)},onMutate:n=>{zS(t,n,!0),BS(t,n,!0),DS(t,e,n,!0)},onError(n,r){zS(t,r,!1),BS(t,r,!1),DS(t,e,r,!1),n.statusCode===403&&xS(),n.statusCode===429&&bS()}})}function HS(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).derepost(t)},onMutate:n=>{zS(t,n,!1),BS(t,n,!1),DS(t,e,n,!1)},onError(e){e.statusCode===429&&bS()}})}function US(e){return l({queryKey:Z.user(e),async queryFn(){return X(e,await Y()).getUser()}})}function WS(e,t,n){let r=a();return s({async mutationFn(t){return X(e,await Y()).unfollow(t)},onSuccess(n,i){let a=Z.account(i===`me`?`index`:i);r.setQueryData(a,e=>e&&{...e,followedByMe:!1,followerCount:e.followerCount-1<0?0:e.followerCount-1});let o=Z.accountFollows(i,`followers`);r.setQueryData(o,e=>{if(!e?.pages?.[0])return e;let t=r.getQueryData(Z.account(`index`));return t?{...e,pages:e.pages.map(e=>({...e,accounts:e.accounts.filter(e=>e.name!==t.name)}))}:e});let s=Z.account(`index`);r.setQueryData(s,e=>e&&{...e,followingCount:e.followingCount-1});let c=e===`index`?`me`:e,l=Z.accountFollows(c,`following`);r.getQueryData(l)?r.setQueryData(l,e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,accounts:e.accounts.filter(e=>e.handle!==i)}))}:e):r.invalidateQueries({queryKey:l}),wS(r,i,!1),r.setQueryData(Z.exploreProfiles(e),e=>{if(!e)return e;let t=e.pages.map(e=>{let t=Object.entries(e.results).reduce((e,[t,n])=>{let r=n.sites.map(e=>e.handle===i?{...e,followedByMe:!1,followerCount:Math.max(0,e.followerCount-1)}:e);return e[t]={...n,sites:r},e},{});return{...e,results:t}});return{...e,pages:t}}),r.setQueriesData({queryKey:[`suggested_profiles`],exact:!1},e=>e&&e.map(e=>e.handle===i?{...e,followedByMe:!1,followerCount:Math.max(0,e.followerCount-1)}:e)),CS(r,e,i,!1),t()},onError:e=>{e.statusCode===429&&bS(),n()}})}function GS(e,t,n){let r=a();return s({async mutationFn(t){return X(e,await Y()).follow(t)},onSuccess(n,i){let a=Z.account(i===`me`?`index`:i);r.setQueryData(a,e=>e&&{...e,followedByMe:!0,followerCount:e.followerCount+1});let o=Z.account(`index`);r.setQueryData(o,e=>e&&{...e,followingCount:e.followingCount+1});let s=Z.accountFollows(i,`followers`),c=e===`index`?`me`:e,l=Z.accountFollows(c,`following`);r.getQueryData(l)?r.setQueryData(l,e=>{if(!e?.pages?.[0])return e;let t=r.getQueryData(Z.account(i===`me`?`index`:i));if(!t)return e;let n={id:t.id,name:t.name,handle:t.handle,avatarUrl:t.avatarUrl,blockedByMe:t.blockedByMe,domainBlockedByMe:t.domainBlockedByMe,isFollowing:!0};return{...e,pages:[{...e.pages[0],accounts:[n,...e.pages[0].accounts]},...e.pages.slice(1)]}}):r.invalidateQueries({queryKey:l}),wS(r,i,!0),r.setQueryData(Z.exploreProfiles(e),e=>{if(!e)return e;let t=e.pages.map(e=>{let t=Object.entries(e.results).reduce((e,[t,n])=>{let r=n.sites.map(e=>e.handle===i?{...e,followedByMe:!0,followerCount:e.followerCount+1}:e);return e[t]={...n,sites:r},e},{});return{...e,results:t}});return{...e,pages:t}}),r.setQueriesData({queryKey:[`suggested_profiles`],exact:!1},e=>e&&e.map(e=>e.handle===i?{...e,followedByMe:!0,followerCount:e.followerCount+1}:e)),r.setQueryData(s,e=>{if(!e?.pages?.[0])return e;let t=r.getQueryData(Z.account(`index`));if(!t)return e;let n={id:t.url,type:`Person`,preferredUsername:`index`,name:t.name,url:t.url,handle:`index@${new URL(t.url).hostname}`,icon:{type:`Image`,url:t.avatarUrl},isFollowing:!1};return{...e,pages:[{...e.pages[0],accounts:[n,...e.pages[0].accounts]},...e.pages.slice(1)]}}),CS(r,e,i,!0),t()},onError(e){n(),e.statusCode===429&&bS(),e.statusCode===403&&xS()}})}function KS(e,t){let n=a(),r=Z.searchResults(t);return{searchQuery:l({queryKey:r,enabled:t.length>0,refetchOnMount:`always`,async queryFn(){return X(e,await Y()).search(t)}}),updateAccountSearchResult:(e,t)=>{n.setQueryData(r,n=>n&&{...n,accounts:n.accounts.map(n=>n.id===e?{...n,...t}:n)})}}}function qS(e,t,n,r){e.setQueryData(t,e=>e&&{...e,pages:e.pages.map((e,t)=>t===0?{...e,[n]:[r,...e[n]]}:e)})}function JS(e,t,n,r,i){e.setQueryData(t,e=>e&&{...e,pages:e.pages.map(e=>({...e,[n]:e[n].map(e=>e.id===r?i(e):e)}))})}function YS(e,t,n,r){e.setQueryData(t,e=>e&&{...e,pages:e.pages.map(e=>({...e,[n]:e[n].filter(e=>e.id!==r)}))})}function XS(e,t){let n=a();return s({async mutationFn({inReplyTo:t,content:n,imageUrl:r,altText:i}){let a=X(e,await Y()),o=r?{url:r,altText:i}:void 0;return a.reply(t,n,o)},onMutate:({inReplyTo:r})=>{if(!t)throw Error(`Cannot create reply without actor props`);let i=mS();return kS(n,r,1),AS(n,r,1),OS(n,e,r,1),{id:i}},onSuccess:(e,t)=>{if(e.id===void 0)throw Error(`Activity returned from API has no id`);n.invalidateQueries({queryKey:Z.replyChain(t.inReplyTo)})},onError(t,r){console.error(t),kS(n,r.inReplyTo,-1),AS(n,r.inReplyTo,-1),OS(n,e,r.inReplyTo,-1),t.statusCode===403&&xS(),t.statusCode===429&&bS(),ro.error(`An error occurred while sending your reply.`)}})}function ZS(e,t){let n=a(),r=Z.feed,i=Z.outbox(e),o=Z.profilePosts(`index`);return s({async mutationFn({content:t,imageUrl:n,altText:r}){let i=X(e,await Y()),a=n?{url:n,altText:r}:void 0;return i.note(t,a)},onMutate:({content:e,imageUrl:a})=>{if(!t)throw Error(`Cannot create note without actor props`);let s=_S(e),c=mS(),l=gS(t,c,s,a);return qS(n,r,`posts`,l),qS(n,i,`data`,l),qS(n,o,`posts`,l),{id:c}},onSuccess:(e,t,a)=>{if(e.id===void 0)throw Error(`Post returned from API has no id`);let s=vS(e);JS(n,r,`posts`,a?.id??``,()=>s),JS(n,i,`data`,a?.id??``,()=>s),JS(n,o,`posts`,a?.id??``,()=>s)},onError(e,t,a){console.error(e),YS(n,r,`posts`,a?.id??``),YS(n,i,`data`,a?.id??``),YS(n,o,`posts`,a?.id??``),e.statusCode===429&&bS(),ro.error(`An error occurred while posting your note.`)}})}function QS(e,t,n){let r=n?.enabled!==!1;return l({queryKey:Z.account(t===`me`?`index`:t),enabled:r,async queryFn(){return X(e,await Y()).getAccount(t)}})}function $S(e,t){let n=a();return c({queryKey:Z.accountFollows(e,t),async queryFn({pageParam:r}){let i=await X(`index`,await Y()).getAccountFollows(e,t,r);return i.accounts&&i.accounts.forEach(e=>{n.setQueryData(Z.account(e.handle),e)}),i},getNextPageParam(e){return e.next}})}function eC(e){return l({queryKey:Z.accountAliases(e),async queryFn(){return X(e,await Y()).getAccountAliases()}})}function tC(e){return l({queryKey:Z.accountDomain(e),async queryFn(){return X(e,await Y()).getDomain()}})}function nC(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).updateDomain(t)},onSuccess(n){t.setQueryData(Z.accountDomain(e),n),t.invalidateQueries({queryKey:Z.account(e)})}})}function rC(e){return s({async mutationFn(t){return X(e,await Y()).validateDomain(t)}})}function iC(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).addAccountAlias(t)},onSuccess(n){t.setQueryData(Z.accountAliases(e),n)}})}function aC(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).removeAccountAlias(t)},onSuccess(n){t.setQueryData(Z.accountAliases(e),n)}})}function oC(e){let t=Z.feed,n=a();return{feedQuery:c({queryKey:t,enabled:e.enabled,staleTime:60*1e3,async queryFn({pageParam:e}){return X(`index`,await Y()).getFeed(e).then(e=>({posts:e.posts.map(vS),next:e.next}))},getNextPageParam(e){return e.next}}),updateFeedActivity:(e,r)=>{JS(n,t,`posts`,e,e=>({...e,...r}))}}}function sC(e){let t=Z.inbox,n=a();return{inboxQuery:c({queryKey:t,enabled:e.enabled,staleTime:20*1e3,async queryFn({pageParam:e}){return X(`index`,await Y()).getInbox(e).then(e=>({posts:e.posts.map(vS),next:e.next}))},getNextPageParam(e){return e.next}}),updateInboxActivity:(e,r)=>{JS(n,t,`posts`,e,e=>({...e,...r}))}}}function cC(e){let t=[...Z.discoveryFeed,e.topic],n=a();return{discoveryFeedQuery:c({queryKey:t,enabled:e.enabled,staleTime:20*1e3,async queryFn({pageParam:t}){return X(`index`,await Y()).getDiscoveryFeed(e.topic,t).then(e=>({posts:e.posts.map(vS),next:e.next}))},getNextPageParam(e){return e.next}}),updateDiscoveryFeedActivity:(e,r)=>{JS(n,t,`posts`,e,e=>({...e,...r}))}}}function lC(e,t){let n=Z.profilePosts(e===`me`?`index`:e),r=a();return{postsByAccountQuery:c({queryKey:n,enabled:t.enabled,async queryFn({pageParam:t}){return X(`index`,await Y()).getPostsByAccount(e,t).then(e=>({posts:e.posts.map(vS),next:e.next})).catch(()=>({posts:[],next:null}))},getNextPageParam(e){return e.next}}),updatePostsByAccount:(e,t)=>{JS(r,n,`posts`,e,e=>({...e,...t}))}}}function uC(e){let t=Z.postsLikedByAccount,n=a();return{postsLikedByAccountQuery:c({queryKey:t,enabled:e.enabled,async queryFn({pageParam:e}){return X(`index`,await Y()).getPostsLikedByAccount(e).then(e=>({posts:e.posts.map(vS),next:e.next}))},getNextPageParam(e){return e.next}}),updatePostsLikedByAccount:(e,r)=>{JS(n,t,`posts`,e,e=>({...e,...r}))}}}function dC(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).delete(t.id)},onMutate:({id:n,parentId:r})=>{let i=t.getQueryData(Z.feed);t.setQueryData(Z.feed,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:e.posts.filter(e=>e.id!==n).map(e=>e.object.id===r?{...e,object:{...e.object,replyCount:e.object.replyCount-1}}:e)}))});let a=t.getQueryData(Z.inbox);t.setQueryData(Z.inbox,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:e.posts.filter(e=>e.id!==n).map(e=>e.object.id===r?{...e,object:{...e.object,replyCount:e.object.replyCount-1}}:e)}))}),r&&OS(t,e,r,-1);let o=Z.outbox(e),s=t.getQueryData(o);t.setQueryData(o,e=>e&&{...e,pages:e.pages.map(e=>({...e,data:e.data.filter(e=>e.object.id!==n)}))});let c=Z.liked(e),l=t.getQueryData(c),u=!1;t.setQueryData(c,e=>e&&{...e,pages:e.pages.map(e=>(u=e.data.some(e=>e.object.id===n),{...e,data:e.data.filter(e=>e.object.id!==n)}))}),[Z.feed,Z.inbox,Z.discoveryFeed,Z.profilePosts(`index`),Z.postsLikedByAccount].some(e=>t.getQueryData(e)?.pages.some(e=>e.posts.some(e=>e.id===n&&e.object.liked)))&&t.setQueryData(Z.account(e===`me`?`index`:e),e=>e&&{...e,likedCount:Math.max(0,e.likedCount-1)});let d=Z.profilePosts(null),f=t.getQueriesData(d);t.setQueriesData(d,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:e.posts.filter(e=>e.object.id!==n)}))});let p=[],m;u&&(p=Z.account(e===`me`?`index`:e),m=t.getQueryData(p),t.setQueryData(p,e=>e&&{...e,likedCount:e.likedCount-1<0?0:e.likedCount-1}));let h=Z.profilePosts(`index`),g=t.getQueryData(h);t.setQueryData(h,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:e.posts.filter(e=>e.object.id!==n)}))});let _=Z.postsLikedByAccount,v=t.getQueryData(_);return t.setQueryData(_,e=>e&&{...e,pages:e.pages.map(e=>({...e,posts:e.posts.filter(e=>e.object.id!==n)}))}),r&&t.setQueriesData({queryKey:[`reply_chain`],exact:!1},e=>{if(!e)return e;let t=e.children.filter(e=>e.post.id!==n).map(e=>({...e,chain:e.chain.filter(e=>e.id!==n)})),i=e.post;return e.post.id===r&&(i={...e.post,replyCount:Math.max(0,(e.post.replyCount||0)-1)}),{...e,post:i,children:t}}),{previousFeed:{key:Z.feed,data:i},previousInbox:{key:Z.inbox,data:a},previousOutbox:{key:o,data:s},previousLiked:{key:c,data:l},previousProfilePosts:{key:d,data:f},previousAccount:u?{key:p,data:m}:null,previousPostsByAccount:{key:Z.profilePosts(`index`),data:g},previousPostsLikedByAccount:{key:Z.postsLikedByAccount,data:v}}},onError:(e,n,r)=>{r&&(t.setQueryData(r.previousFeed.key,r.previousFeed.data),t.setQueryData(r.previousInbox.key,r.previousInbox.data),t.setQueryData(r.previousOutbox.key,r.previousOutbox.data),t.setQueryData(r.previousLiked.key,r.previousLiked.data),t.setQueriesData(r.previousProfilePosts.key,r.previousProfilePosts.data),r.previousAccount&&t.setQueryData(r.previousAccount.key,r.previousAccount.data),r.previousPostsByAccount&&t.setQueryData(Z.profilePosts(`index`),r.previousPostsByAccount),r.previousPostsLikedByAccount&&t.setQueryData(Z.postsLikedByAccount,r.previousPostsLikedByAccount))},onSuccess:(e,{parentId:n})=>{t.invalidateQueries({queryKey:[`reply_chain`]}),n&&(t.invalidateQueries({queryKey:Z.feed}),t.invalidateQueries({queryKey:Z.inbox}))}})}function fC(e){return c({queryKey:Z.notifications(e),async queryFn({pageParam:t}){return X(e,await Y()).getNotifications(t)},getNextPageParam(e){return e.next}})}function pC(e,t){let n=l({queryKey:Z.replyChain(t),enabled:!!t,async queryFn(){if(!t)throw Error(`Post ID is required`);let n=X(e,await Y());try{return await n.getReplies(t)}catch(e){if(dS(e)&&e.statusCode===404)return await n.getPost(t),await n.getReplies(t);throw e}}}),[r,i]=(0,z.useState)(null),[a,o]=(0,z.useState)(null);(0,z.useEffect)(()=>{n.data?i(n.data):n.error&&o(n.error)},[n.data,n.error]);let s=(0,z.useCallback)(async()=>{if(!(!r?.ancestors.hasMore||!r?.ancestors.chain[0]))try{let t=await X(e,await Y()).getReplies(r.ancestors.chain[0].id);i(e=>e&&{...e,ancestors:{chain:[...t.ancestors.chain,...e.ancestors.chain],hasMore:t.ancestors.hasMore}})}catch(e){o(e instanceof Error?e:Error(`Failed to load more ancestors`))}},[e,r?.ancestors.hasMore,r?.ancestors.chain]),c=(0,z.useCallback)(async()=>{if(r?.next&&t)try{let n=await X(e,await Y()).getReplies(t,r.next);i(e=>e&&{...e,children:[...e.children,...n.children],next:n.next})}catch(e){o(e instanceof Error?e:Error(`Failed to load more children`))}},[e,r?.next,t]),u=(0,z.useCallback)(async t=>{if(r?.children[t]?.hasMore)try{let n=X(e,await Y()),a=r.children[t],o=a.chain.length>1?a.chain[a.chain.length-2]:a.post,s=await n.getReplies(o.id),c=s.children[0].chain;i(e=>{if(!e)return e;let n=[...e.children];return n[t]={...a,chain:[...a.chain,...c],hasMore:s.children[0].hasMore},{...e,children:n}})}catch(e){o(e instanceof Error?e:Error(`Failed to load more child replies`))}},[e,r]);return{data:r,isLoading:n.isLoading,error:a,loadMoreAncestors:s,loadMoreChildren:c,loadMoreChildReplies:u,hasMoreAncestors:!!r?.ancestors.hasMore,hasMoreChildren:!!r?.next,hasMoreChildReplies:e=>!!r?.children[e]?.hasMore}}function mC(e){let t=a();return s({async mutationFn(t){return X(e,await Y()).updateAccount(t)},onSuccess(){t.invalidateQueries({queryKey:Z.account(`index`)}),t.invalidateQueries({queryKey:Z.accountDomain(`index`)})}})}async function hC(e){return X(`index`,await Y()).upload(e)}function gC(e,t=!0){let n=(0,z.useCallback)(async()=>await Y(),[]),r=(0,z.useCallback)(async()=>X(e,await n()),[e,n]);return l({queryKey:Z.notificationsCount(e),enabled:t,async queryFn(){return(await(await r()).getNotificationsCount()).count}})}function _C(e){let t=a(),n=(0,z.useCallback)(async()=>await Y(),[]),r=(0,z.useCallback)(async()=>X(e,await n()),[e,n]);return s({async mutationFn(){return t.setQueryData(Z.notificationsCount(e),0),(await r()).resetNotificationsCount()}})}function vC(e,t){let n=a(),r=[...Z.exploreProfiles(e),t];return{exploreProfilesQuery:c({queryKey:r,staleTime:3600*1e3,async queryFn({pageParam:r}){let i=await X(e,await Y()).getExploreAccounts(t,r);return i.accounts.forEach(e=>{n.setQueryData(Z.account(e.handle),e)}),{accounts:i.accounts,next:i.next}},getNextPageParam(e){return e.next}}),updateExploreProfile:(e,t)=>{n.setQueryData(r,n=>{if(!n)return n;let r=n.pages.map(n=>{let r=n.accounts.map(n=>n.id===e?{...n,...t}:n);return{...n,accounts:r}});return{...n,pages:r}})}}}function yC(e,t=3){let n=a(),r=Z.suggestedProfiles(e,t);return{suggestedProfilesQuery:l({queryKey:r,async queryFn(){let e=(await X(`index`,await Y()).getRecommendations(t)).accounts;return e.length>0&&e.forEach(e=>{n.setQueryData(Z.account(e.handle),e)}),e.length>0?e:null},retry:!1,staleTime:3600*1e3}),updateSuggestedProfile:(e,t)=>{n.setQueryData(r,n=>n&&n.map(n=>n.id===e?{...n,...t}:n))}}}function bC(){return{topicsQuery:l({queryKey:Z.topics(),async queryFn(){return X(`index`,await Y()).getTopics()},staleTime:1440*60*1e3,retry:!1})}}function xC(e,t){let n=Z.account(`index`);e.setQueryData(n,e=>e&&{...e,...t})}function SC(e){let t=a();return s({async mutationFn(){return X(e,await Y()).enableBluesky()},onSuccess(){xC(t,{blueskyEnabled:!0,blueskyHandleConfirmed:!1,blueskyHandle:null}),t.invalidateQueries({queryKey:Z.accountFollows(`index`,`following`)})},onError(e){e.statusCode===429&&bS()}})}function CC(e){let t=a();return s({async mutationFn(){return X(e,await Y()).disableBluesky()},onSuccess(){xC(t,{blueskyEnabled:!1,blueskyHandleConfirmed:!1,blueskyHandle:null}),t.invalidateQueries({queryKey:Z.accountFollows(`index`,`following`)})},onError(e){e.statusCode===429&&bS()}})}function wC(e){let t=a();return s({async mutationFn(){return X(e,await Y()).confirmBlueskyHandle()},onSuccess(e){e!==``&&xC(t,{blueskyEnabled:!0,blueskyHandleConfirmed:!0,blueskyHandle:e})},onError(e){e.statusCode===429&&bS()}})}var TC=null,EC=({onFollow:e,onUnfollow:t,authorHandle:n,followedByMe:r})=>{let[,i]=z.useReducer(e=>e+1,0),a=TC===n&&!r;return(0,B.jsx)(R,{className:`absolute -right-1.5 bottom-px z-10 flex size-4 items-center justify-center rounded-full p-0 outline-2 outline-white transition-transform hover:scale-105 active:scale-100 dark:outline-black`,title:a?`Unfollow`:`Follow`,onClick:r=>{a?(t(r),setTimeout(()=>{TC=null,i()},0)):(TC=n,i(),e(r))},children:a?(0,B.jsx)(et,{className:`-mb-px size-3! stroke-[2.4]!`}):(0,B.jsx)($e,{className:`size-[14px]! stroke-2!`})})},DC=({author:e,size:t,isLoading:n=!1,disabled:r=!1,className:i=``,showFollowButton:a=!1})=>{let o=20,s=`shrink-0 items-center justify-center rounded-full relative z-10 flex bg-black/5 dark:bg-gray-900 ${t===`lg`||r?``:`cursor-pointer`} ${i}`,c=`z-10 object-cover rounded-full outline-[0.5px] outline-offset-[-0.5px] outline-black/10`,[l,u]=(0,z.useState)(e?.icon?.url),d=eS(),f=GS(`index`,()=>{ro.success(`Followed ${e?.name}`)},()=>{ro.error(`Failed to follow`)}),p=WS(`index`,()=>{ro.info(`Unfollowed ${e?.name}`)},()=>{ro.error(`Failed to unfollow`)});switch((0,z.useEffect)(()=>{u(e?.icon?.url)},[e?.icon?.url]),t){case`2xs`:o=10,s=w(`size-4`,s),c=w(`size-4`,c);break;case`xs`:o=12,s=w(`size-6`,s),c=w(`size-6`,c);break;case`notification`:o=16,s=w(`size-9`,s),c=w(`size-9`,c);break;case`sm`:s=w(`size-10`,s),c=w(`size-10`,c);break;case`md`:s=w(`size-[60px]`,s),c=w(`size-[60px]`,c);break;case`lg`:o=32,s=w(`size-22`,s),c=w(`size-22`,c);break;default:s=w(`size-10`,s),c=w(`size-10`,c);break}if(!e||n)return(0,B.jsx)(H,{className:c,containerClassName:s});let m=sS(e),h=e=>{e.stopPropagation(),d(`/profile/${m}`)},g=e=>{e.stopPropagation(),f.mutate(m)},_=e=>{e.stopPropagation(),p.mutate(m)},v=a||TC===m;return l?(0,B.jsxs)(`div`,{className:s,onClick:t===`lg`||r?void 0:h,children:[(0,B.jsx)(`img`,{className:c,referrerPolicy:`no-referrer`,src:l,onError:()=>u(void 0)}),v&&(0,B.jsx)(EC,{authorHandle:m,followedByMe:!1,onFollow:g,onUnfollow:_})]}):(0,B.jsxs)(`div`,{className:s,onClick:r?void 0:h,children:[(0,B.jsx)(yt,{className:`text-gray-600`,size:o,strokeWidth:1.5}),v&&(0,B.jsx)(EC,{authorHandle:m,followedByMe:!1,onFollow:g,onUnfollow:_})]})},OC=({trigger:e,onCopyLink:t,onDelete:n,allowDelete:r=!1,disabled:i=!1,layout:a,followedByMe:o=!1,authoredByMe:s=!1,onFollow:c=()=>{},onUnfollow:l=()=>{}})=>(0,B.jsxs)(Sd,{children:[(0,B.jsxs)(Lu,{children:[(0,B.jsx)(Ru,{disabled:i,asChild:!0,onClick:e=>e.stopPropagation(),children:e}),(0,B.jsx)(Bu,{align:`${a===`modal`?`start`:`end`}`,alignOffset:a===`modal`?-12:0,className:`p-2`,children:(0,B.jsxs)(`div`,{className:`flex w-48 flex-col`,children:[(!r||a===`inbox`)&&(0,B.jsx)(zu,{asChild:!0,children:(0,B.jsxs)(R,{className:`justify-start`,variant:`ghost`,onClick:e=>{e.stopPropagation(),t()},children:[(0,B.jsx)(_t,{}),`Copy link`]})}),!s&&(0,B.jsx)(zu,{asChild:!0,children:(0,B.jsxs)(R,{className:`justify-start`,variant:`ghost`,onClick:e=>{e.stopPropagation(),o?l():c()},children:[o?(0,B.jsx)(ut,{}):(0,B.jsx)(st,{}),o?`Unfollow`:`Follow`]})}),r&&(0,B.jsx)(Cd,{asChild:!0,children:(0,B.jsx)(zu,{asChild:!0,children:(0,B.jsxs)(R,{className:`justify-start text-red hover:bg-red/5 hover:text-red`,variant:`ghost`,onClick:e=>e.stopPropagation(),children:[(0,B.jsx)(ke,{}),`Delete`]})})})]})})]}),(0,B.jsxs)(Ed,{onClick:e=>e.stopPropagation(),children:[(0,B.jsxs)(Dd,{children:[(0,B.jsx)(kd,{children:`Delete this post?`}),(0,B.jsx)(Ad,{children:a===`inbox`?`This will remove the post from the Ghost social web, but it will remain on your website.`:(0,B.jsx)(B.Fragment,{children:`If you delete this post, you won't be able to restore it.`})})]}),(0,B.jsxs)(Od,{children:[(0,B.jsx)(Md,{onClick:e=>e.stopPropagation(),children:`Cancel`}),(0,B.jsx)(jd,{className:Ct({variant:`destructive`}),onClick:e=>{e.stopPropagation(),n()},children:`Delete`})]})]})]});function kC(e){let[t,n]=(0,z.useState)({images:[],currentIndex:0,isOpen:!1}),r=e=>{let t=yT(e);if(!t)return[];if(Array.isArray(t))return t.map((e,t)=>({url:e.url,alt:e.name||`Image-${t}`}));if(t.mediaType?.startsWith(`image/`)||t.type===`Image`)return[{url:t.url,alt:t.name||`Image`}];if(e.image){let t;if(t=typeof e.image==`string`?e.image:e.image?.url,t)return[{url:t,alt:`Image`}]}return[]};return{lightboxState:t,openLightbox:t=>{if(!e)return;let i=r(e),a=i.findIndex(e=>e.url===t);a!==-1&&n({images:i,currentIndex:a,isOpen:!0})},closeLightbox:()=>{n(e=>({...e,isOpen:!1}))},navigateToIndex:e=>{n(t=>({...t,currentIndex:e}))}}}var AC=({images:e,currentIndex:t,isOpen:n,onClose:r,onNavigate:i})=>{let a=t===0,o=t===e.length-1,s=(0,z.useCallback)(()=>{e.length<=1||o||i((t+1)%e.length)},[e.length,o,t,i]),c=(0,z.useCallback)(()=>{e.length<=1||a||i((t-1+e.length)%e.length)},[e.length,a,t,i]);return(0,z.useEffect)(()=>{let e=e=>{n&&(e.key===`ArrowRight`&&!o?s():e.key===`ArrowLeft`&&!a&&c())};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[n,t,e.length,s,c,o,a]),!n||e.length===0?null:(0,B.jsx)(fu,{open:n,onOpenChange:e=>{e||r()},children:(0,B.jsxs)(_u,{className:`top-[50%] h-[100vh] max-h-[100vh] w-[100vw] max-w-[100vw] translate-y-[-50%] items-center border-none bg-transparent p-0 shadow-none data-[state=closed]:zoom-out-100 data-[state=closed]:slide-out-to-top-[50%] data-[state=open]:zoom-in-100 data-[state=open]:slide-in-from-top-[50%]`,onClick:()=>r(),children:[(0,B.jsx)(`img`,{alt:e[t].alt,className:`mx-auto max-h-[90vh] max-w-[90vw] object-contain`,src:e[t].url,onClick:e=>e.stopPropagation()}),e.length>1&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(R,{className:`absolute top-1/2 left-5 size-11 -translate-y-1/2 rounded-full bg-black/50 p-0 pr-0.5 hover:bg-black/70`,disabled:a,onClick:e=>{e.stopPropagation(),c()},children:[(0,B.jsx)(mt,{className:`size-6!`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Previous image`})]}),(0,B.jsxs)(R,{className:`absolute top-1/2 right-5 size-11 -translate-y-1/2 rounded-full bg-black/50 p-0 pl-0.5 hover:bg-black/70`,disabled:o,onClick:e=>{e.stopPropagation(),s()},children:[(0,B.jsx)(St,{className:`size-6!`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Next image`})]})]}),(0,B.jsx)(hu,{asChild:!0,children:(0,B.jsxs)(R,{className:`absolute top-5 right-5 size-11 rounded-full bg-black/50 p-0 hover:bg-black/70`,children:[(0,B.jsx)(tt,{className:`size-5!`}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})})},jC=()=>{},MC=({className:e,following:t,handle:n,variant:r=`default`,onFollow:i=jC,onUnfollow:a=jC,"data-testid":o})=>{let[s,c]=(0,z.useState)(t),l=WS(`index`,()=>{},()=>{c(!0)}),u=GS(`index`,()=>{},()=>{c(!1)}),d=async()=>{s?(c(!1),a(),l.mutate(n)):(c(!0),i(),u.mutate(n))};(0,z.useEffect)(()=>{c(t)},[t]);let f=s?`Following`:`Follow`;return r===`link`?(0,B.jsx)(R,{className:w(`p-0 font-medium`,s?`text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white`:`text-purple hover:text-black dark:hover:text-white`,e),"data-testid":o,variant:`link`,onClick:e=>{e?.preventDefault(),e?.stopPropagation(),d()},children:f}):(0,B.jsx)(R,{className:w(`min-w-[90px]`,e),"data-testid":o,title:s?`Click to unfollow`:``,variant:s?`outline`:`default`,onClick:e=>{e?.preventDefault(),e?.stopPropagation(),d()},children:f})};function NC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PC(e){if(Array.isArray(e))return e}function FC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function IC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LC(e,t){return PC(e)||FC(e,t)||RC(e,t)||IC()}function RC(e,t){if(e){if(typeof e==`string`)return NC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?NC(e,t):void 0}}var zC=Object.entries,BC=Object.setPrototypeOf,VC=Object.isFrozen,HC=Object.getPrototypeOf,UC=Object.getOwnPropertyDescriptor,WC=Object.freeze,GC=Object.seal,KC=Object.create,qC=typeof Reflect<`u`&&Reflect,JC=qC.apply,YC=qC.construct;WC||=function(e){return e},GC||=function(e){return e},JC||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},YC||=function(e){return new e(...[...arguments].slice(1))};var XC=gw(Array.prototype.forEach),ZC=gw(Array.prototype.lastIndexOf),QC=gw(Array.prototype.pop),$C=gw(Array.prototype.push),ew=gw(Array.prototype.splice),tw=Array.isArray,nw=gw(String.prototype.toLowerCase),rw=gw(String.prototype.toString),iw=gw(String.prototype.match),aw=gw(String.prototype.replace),ow=gw(String.prototype.indexOf),sw=gw(String.prototype.trim),cw=gw(Number.prototype.toString),lw=gw(Boolean.prototype.toString),uw=typeof BigInt>`u`?null:gw(BigInt.prototype.toString),dw=typeof Symbol>`u`?null:gw(Symbol.prototype.toString),fw=gw(Object.prototype.hasOwnProperty),pw=gw(Object.prototype.toString),mw=gw(RegExp.prototype.test),hw=_w(TypeError);function gw(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return JC(e,t,n)}}function _w(e){return function(){return YC(e,[...arguments])}}function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nw;if(BC&&BC(e,null),!tw(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(VC(t)||(t[r]=e),i=e)}e[i]=!0}return e}function vw(e){for(let t=0;t<e.length;t++)fw(e,t)||(e[t]=null);return e}function yw(e){let t=KC(null);for(let r of zC(e)){var n=LC(r,2);let i=n[0],a=n[1];fw(e,i)&&(tw(a)?t[i]=vw(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=yw(a):t[i]=a)}return t}function bw(e){switch(typeof e){case`string`:return e;case`number`:return cw(e);case`boolean`:return lw(e);case`bigint`:return uw?uw(e):`0`;case`symbol`:return dw?dw(e):`Symbol()`;case`undefined`:return pw(e);case`function`:case`object`:{if(e===null)return pw(e);let t=e,n=xw(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:pw(e)}return pw(e)}default:return pw(e)}}function xw(e,t){for(;e!==null;){let n=UC(e,t);if(n){if(n.get)return gw(n.get);if(typeof n.value==`function`)return gw(n.value)}e=HC(e)}function n(){return null}return n}function Sw(e){try{return mw(e,``),!0}catch{return!1}}var Cw=WC(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ww=WC(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Tw=WC([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ew=WC([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Dw=WC(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ow=WC([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),kw=WC([`#text`]),Aw=WC(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),jw=WC(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Mw=WC(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Nw=WC([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Pw=GC(/{{[\w\W]*|^[\w\W]*}}/g),Fw=GC(/<%[\w\W]*|^[\w\W]*%>/g),Iw=GC(/\${[\w\W]*/g),Lw=GC(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rw=GC(/^aria-[\-\w]+$/),zw=GC(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Bw=GC(/^(?:\w+script|data):/i),Vw=GC(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Hw=GC(/^html$/i),Uw=GC(/^[a-z][.\w]*(-[.\w]+)+$/i),Ww=GC(/<[/\w!]/g),Gw=GC(/<[/\w]/g),Kw=GC(/<\/no(script|embed|frames)/i),qw=GC(/\/>/i),Jw={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Yw=function(){return typeof window>`u`?null:window},Xw=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Zw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Qw=function(e,t,n,r){return fw(e,t)&&tw(e[t])?Q(r.base?yw(r.base):{},e[t],r.transform):n};function $w(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yw(),t=e=>$w(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==Jw.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=xw(d,`cloneNode`),p=xw(d,`remove`),m=xw(d,`nextSibling`),h=xw(d,`childNodes`),g=xw(d,`parentNode`),_=xw(d,`shadowRoot`),v=xw(d,`attributes`),y=o&&o.prototype?xw(o.prototype,`nodeType`):null,b=o&&o.prototype?xw(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw hw(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},O=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},ee=function(){return w||=(C=Xw(u,i),!0),C},te=n,ne=te.implementation,k=te.createNodeIterator,re=te.createDocumentFragment,ie=te.getElementsByTagName,A=r.importNode,j=Zw();t.isSupported=typeof zC==`function`&&typeof g==`function`&&ne&&ne.createHTMLDocument!==void 0;let M=Pw,ae=Fw,oe=Iw,se=Lw,ce=Rw,le=Bw,ue=Vw,N=Uw,de=zw,P=null,fe=Q({},[...Cw,...ww,...Tw,...Dw,...kw]),F=null,pe=Q({},[...Aw,...jw,...Mw,...Nw]),I=Object.seal(KC(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),me=null,he=null,ge=Object.seal(KC(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),_e=!0,ve=!0,ye=!1,be=!0,xe=!1,Se=!0,Ce=!1,we=!1,Te=null,Ee=null,De=!1,Oe=!1,ke=!1,Ae=!1,je=!0,Me=!1,Ne=`user-content-`,Pe=!0,Fe=!1,Ie={},L=null,Le=Q({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Re=null,ze=Q({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Be=null,Ve=Q({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),He=`http://www.w3.org/1998/Math/MathML`,Ue=`http://www.w3.org/2000/svg`,We=`http://www.w3.org/1999/xhtml`,Ge=We,Ke=!1,qe=null,Je=Q({},[He,Ue,We],rw),Ye=WC([`mi`,`mo`,`mn`,`ms`,`mtext`]),Xe=Q({},Ye),Ze=WC([`annotation-xml`]),Qe=Q({},Ze),$e=Q({},[`title`,`style`,`font`,`a`,`script`]),et=null,tt=[`application/xhtml+xml`,`text/html`],nt=null,rt=null,it=n.createElement(`form`),at=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rt&&rt===e)return;(!e||typeof e!=`object`)&&(e={}),e=yw(e),et=tt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,nt=et===`application/xhtml+xml`?rw:nw,P=Qw(e,`ALLOWED_TAGS`,fe,{transform:nt}),F=Qw(e,`ALLOWED_ATTR`,pe,{transform:nt}),qe=Qw(e,`ALLOWED_NAMESPACES`,Je,{transform:rw}),Be=Qw(e,`ADD_URI_SAFE_ATTR`,Ve,{transform:nt,base:Ve}),Re=Qw(e,`ADD_DATA_URI_TAGS`,ze,{transform:nt,base:ze}),L=Qw(e,`FORBID_CONTENTS`,Le,{transform:nt}),me=Qw(e,`FORBID_TAGS`,yw({}),{transform:nt}),he=Qw(e,`FORBID_ATTR`,yw({}),{transform:nt}),Ie=fw(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?yw(e.USE_PROFILES):e.USE_PROFILES:!1,_e=e.ALLOW_ARIA_ATTR!==!1,ve=e.ALLOW_DATA_ATTR!==!1,ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,be=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xe=e.SAFE_FOR_TEMPLATES||!1,Se=e.SAFE_FOR_XML!==!1,Ce=e.WHOLE_DOCUMENT||!1,Oe=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Ae=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,je=e.SANITIZE_DOM!==!1,Me=e.SANITIZE_NAMED_PROPS||!1,Pe=e.KEEP_CONTENT!==!1,Fe=e.IN_PLACE||!1,de=Sw(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:zw,Ge=typeof e.NAMESPACE==`string`?e.NAMESPACE:We,Xe=fw(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?yw(e.MATHML_TEXT_INTEGRATION_POINTS):Q({},Ye),Qe=fw(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?yw(e.HTML_INTEGRATION_POINTS):Q({},Ze);let t=fw(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?yw(e.CUSTOM_ELEMENT_HANDLING):KC(null);if(I=KC(null),fw(t,`tagNameCheck`)&&at(t.tagNameCheck)&&(I.tagNameCheck=t.tagNameCheck),fw(t,`attributeNameCheck`)&&at(t.attributeNameCheck)&&(I.attributeNameCheck=t.attributeNameCheck),fw(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(I.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),GC(I),xe&&(ve=!1),ke&&(Oe=!0),Ie&&(P=Q({},kw),F=KC(null),Ie.html===!0&&(Q(P,Cw),Q(F,Aw)),Ie.svg===!0&&(Q(P,ww),Q(F,jw),Q(F,Nw)),Ie.svgFilters===!0&&(Q(P,Tw),Q(F,jw),Q(F,Nw)),Ie.mathMl===!0&&(Q(P,Dw),Q(F,Mw),Q(F,Nw))),ge.tagCheck=null,ge.attributeCheck=null,fw(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?ge.tagCheck=e.ADD_TAGS:tw(e.ADD_TAGS)&&(P===fe&&(P=yw(P)),Q(P,e.ADD_TAGS,nt))),fw(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?ge.attributeCheck=e.ADD_ATTR:tw(e.ADD_ATTR)&&(F===pe&&(F=yw(F)),Q(F,e.ADD_ATTR,nt))),fw(e,`ADD_URI_SAFE_ATTR`)&&tw(e.ADD_URI_SAFE_ATTR)&&Q(Be,e.ADD_URI_SAFE_ATTR,nt),fw(e,`FORBID_CONTENTS`)&&tw(e.FORBID_CONTENTS)&&(L===Le&&(L=yw(L)),Q(L,e.FORBID_CONTENTS,nt)),fw(e,`ADD_FORBID_CONTENTS`)&&tw(e.ADD_FORBID_CONTENTS)&&(L===Le&&(L=yw(L)),Q(L,e.ADD_FORBID_CONTENTS,nt)),Pe&&(P[`#text`]=!0),Ce&&Q(P,[`html`,`head`,`body`]),P.table&&(Q(P,[`tbody`]),delete me.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw hw(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw hw(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=ee()),x&&typeof S==`string`&&(S=D(``)));WC&&WC(e),rt=e},st=Q({},[...ww,...Tw,...Ew]),ct=Q({},[...Dw,...Ow]),lt=function(e,t,n){return t.namespaceURI===We?e===`svg`:t.namespaceURI===He?e===`svg`&&(n===`annotation-xml`||Xe[n]):!!st[e]},ut=function(e,t,n){return t.namespaceURI===We?e===`math`:t.namespaceURI===Ue?e===`math`&&Qe[n]:!!ct[e]},dt=function(e,t,n){return t.namespaceURI===Ue&&!Qe[n]||t.namespaceURI===He&&!Xe[n]?!1:!ct[e]&&($e[e]||!st[e])},ft=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Ge,tagName:`template`});let n=nw(e.tagName),r=nw(t.tagName);return qe[e.namespaceURI]?e.namespaceURI===Ue?lt(n,t,r):e.namespaceURI===He?ut(n,t,r):e.namespaceURI===We?dt(n,t,r):!!(et===`application/xhtml+xml`&&qe[e.namespaceURI]):!1},pt=function(e){$C(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw hw(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},mt=function(e){let t=h(e);if(t){let e=[];XC(t,t=>{$C(e,t)}),XC(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},ht=function(e,n){try{$C(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{$C(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Oe||ke)try{pt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},gt=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||F[nt(i)]))try{e.removeAttribute(i)}catch{}}},_t=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===Jw.element&>(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},vt=function(e){let t=null,r=null;if(De)e=`<remove></remove>`+e;else{let t=iw(e,/^[\r\n\t ]+/);r=t&&t[0]}et===`application/xhtml+xml`&&Ge===We&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?D(e):e;if(Ge===We)try{t=new l().parseFromString(i,et)}catch{}if(!t||!t.documentElement){t=ne.createDocument(Ge,`template`,null);try{t.documentElement.innerHTML=Ke?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ge===We?ie.call(t,Ce?`html`:`body`)[0]:Ce?t.documentElement:a},yt=function(e){return k.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bt=function(e){return e=aw(e,M,` `),e=aw(e,ae,` `),e=aw(e,oe,` `),e},xt=function(e){e.normalize();let t=k.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=bt(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&XC(r,e=>{Ct(e.content)&&xt(e.content)})},St=function(e){let t=b?b(e):null;return typeof t!=`string`||nt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Ct=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===Jw.documentFragment}catch{return!1}},wt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Tt(e,n,r){e.length!==0&&XC(e,e=>{e.call(t,n,r,rt)})}let Et=function(e,t){return!!(Se&&e.hasChildNodes()&&!wt(e.firstElementChild)&&mw(Ww,e.textContent)&&mw(Ww,e.innerHTML)||Se&&e.namespaceURI===We&&t===`style`&&wt(e.firstElementChild)||e.nodeType===Jw.processingInstruction||Se&&e.nodeType===Jw.comment&&mw(Gw,e.data))},Dt=function(e,t){if(!me[t]&&jt(t)&&(I.tagNameCheck instanceof RegExp&&mw(I.tagNameCheck,t)||I.tagNameCheck instanceof Function&&I.tagNameCheck(t)))return!1;if(Pe&&!L[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Fe?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return pt(e),!0},Ot=function(e){if(Tt(j.beforeSanitizeElements,e,null),St(e))return pt(e),!0;let n=nt(b?b(e):e.nodeName);if(Tt(j.uponSanitizeElement,e,{tagName:n,allowedTags:P}),Et(e,n))return pt(e),!0;if(me[n]||!(ge.tagCheck instanceof Function&&ge.tagCheck(n))&&!P[n])return Dt(e,n);if((y?y(e):e.nodeType)===Jw.element&&!ft(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&mw(Kw,e.innerHTML))return pt(e),!0;if(xe&&e.nodeType===Jw.text){let n=bt(e.textContent);e.textContent!==n&&($C(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Tt(j.afterSanitizeElements,e,null),!1},kt=function(e,t,r){if(he[t]||je&&(t===`id`||t===`name`)&&(r in n||r in it))return!1;let i=F[t]||ge.attributeCheck instanceof Function&&ge.attributeCheck(t,e);if(!(ve&&mw(se,t))&&!(_e&&mw(ce,t))){if(!i){if(!(jt(e)&&(I.tagNameCheck instanceof RegExp&&mw(I.tagNameCheck,e)||I.tagNameCheck instanceof Function&&I.tagNameCheck(e))&&(I.attributeNameCheck instanceof RegExp&&mw(I.attributeNameCheck,t)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(t,e))||t===`is`&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&mw(I.tagNameCheck,r)||I.tagNameCheck instanceof Function&&I.tagNameCheck(r))))return!1}else if(!Be[t]&&!mw(de,aw(r,ue,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ow(r,`data:`)===0&&Re[e])&&!(ye&&!mw(le,aw(r,ue,``)))&&r)return!1}return!0},At=Q({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),jt=function(e){return!At[nw(e)]&&mw(N,e)},R=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return O(r)}return r},Mt=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),St(e)?pt(e):QC(t.removed)}catch{ht(n,e)}},Nt=function(e){Tt(j.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||St(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},r=t.length,i=nt(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=nt(o),u=c,d=o===`value`?u:sw(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Tt(j.uponSanitizeAttribute,e,n),d=n.attrValue,Me&&(l===`id`||l===`name`)&&ow(d,Ne)!==0&&(ht(o,e),d=Ne+d),Se&&mw(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){ht(o,e);continue}if(l===`attributename`&&iw(d,`href`)){ht(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){ht(o,e);continue}if(!be&&mw(qw,d)){ht(o,e);continue}if(xe&&(d=bt(d)),!kt(i,l,d)){ht(o,e);continue}d=R(i,l,s,d),d!==u&&Mt(e,o,s,d)}}Tt(j.afterSanitizeAttributes,e,null)},Pt=function(e){let t=null,n=yt(e);for(Tt(j.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Tt(j.uponSanitizeShadowNode,t,null),Ot(t),Nt(t),Ct(t.content)&&Pt(t.content),(y?y(t):t.nodeType)===Jw.element){let e=_(t);Ct(e)&&(Ft(e),Pt(e))}Tt(j.afterSanitizeShadowDOM,e,null)},Ft=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pt(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===Jw.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&nt(e)===`template`){let e=n.content;Ct(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Ct(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ke=!e,Ke&&(e=`<!-->`),typeof e!=`string`&&!wt(e)&&(e=bw(e),typeof e!=`string`))throw hw(`dirty is not a string, aborting`);if(!t.isSupported)return e;we?(P=Te,F=Ee):ot(n),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(P=yw(P)),j.uponSanitizeAttribute.length>0&&(F=yw(F)),t.removed=[];let c=Fe&&typeof e!=`string`&&wt(e);if(c){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=nt(t);if(!P[e]||me[e])throw hw(`root node is forbidden and cannot be sanitized in-place`)}if(St(e))throw hw(`root node is clobbered and cannot be sanitized in-place`);try{Ft(e)}catch(t){throw mt(e),t}}else if(wt(e))i=vt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Jw.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Ft(a);else{if(!Oe&&!xe&&!Ce&&e.indexOf(`<`)===-1)return x&&Ae?D(e):e;if(i=vt(e),!i)return Oe?null:Ae?S:``}i&&De&&pt(i.firstChild);let l=yt(c?e:i);try{for(;o=l.nextNode();)Ot(o),Nt(o),Ct(o.content)&&Pt(o.content)}catch(t){throw c&&mt(e),t}if(c)return XC(t.removed,e=>{e.element&&_t(e.element)}),xe&&xt(e),e;if(Oe){if(xe&&xt(i),ke)for(s=re.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(F.shadowroot||F.shadowrootmode)&&(s=A.call(r,s,!0)),s}let u=Ce?i.outerHTML:i.innerHTML;return Ce&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&mw(Hw,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
69
|
-
`+u),xe&&(u=bt(u)),x&&Ae?D(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ot(e),we=!0,Te=P,Ee=F},t.clearConfig=function(){rt=null,we=!1,Te=null,Ee=null,x=C,S=``},t.isValidAttribute=function(e,t,n){rt||ot({});let r=nt(e),i=nt(t);return kt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&fw(j,e)&&$C(j[e],t)},t.removeHook=function(e,t){if(fw(j,e)){if(t!==void 0){let n=ZC(j[e],t);return n===-1?void 0:ew(j[e],n,1)[0]}return QC(j[e])}},t.removeHooks=function(e){fw(j,e)&&(j[e]=[])},t.removeAllHooks=function(){j=Zw()},t}var eT=$w(),tT=[`http:`,`https:`,`mailto:`];function nT(e){try{let t=new URL(e);return tT.includes(t.protocol)}catch{return!1}}function rT(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function iT(e){return eT.sanitize(e)}function aT(e,t=[]){if(t.length===0)return e.replace(/<br\s*\/?>/gi,` `).replace(/<\/p>\s*<p>|<\/div>\s*<div>|<\/h[1-6]>\s*<|<\/li>\s*<li>|<\/a>/gi,` `).replace(/<[^>]*>/g,``).replace(/\s+/g,` `).trim();let n=t.map(e=>e.toLowerCase()),r={},i=0,a=e.replace(/<\/(h[1-6]|p|div|li|blockquote|pre)>/gi,`<br>`);for(let e of n){let t=RegExp(`<${e}[^>]*>.*?<\\/${e}>|<${e}[^>]*\\/?>`,`gis`);a=a.replace(t,e=>{let t=`__EXCLUDED_TAG_${i+=1}__`;return r[t]=e,t})}let o=a;n.includes(`br`)||(o=a.replace(/<br\s*\/?>/gi,` `));let s=o.replace(/<[^>]*>/g,``).replace(/\s+/g,` `).trim();for(let[e,t]of Object.entries(r))s=s.replace(e,t);return s}var oT=e=>{let t=document.createElement(`div`);t.innerHTML=e;let n=t.getElementsByTagName(`a`);for(let e=0;e<n.length;e++)(n[e].getAttribute(`href`)||``).match(/^\s*(javascript|data|vbscript):/i)&&n[e].removeAttribute(`href`),n[e].setAttribute(`target`,`_blank`),n[e].setAttribute(`rel`,`noopener noreferrer`);return t.innerHTML},sT=e=>{let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelectorAll(`.kg-video-card video`);for(let e=0;e<n.length;e++){let t=n[e];t.setAttribute(`playsinline`,``),t.setAttribute(`webkit-playsinline`,``),t.setAttribute(`x5-playsinline`,``),t.hasAttribute(`autoplay`)&&(t.setAttribute(`muted`,``),t.muted=!0)}return t.innerHTML},cT=e=>`preferredUsername`in e,lT=({actor:e,children:t,disabled:n=!1,side:r=`bottom`,align:i=`start`,isCurrentUser:a=!1})=>{let[o,s]=(0,z.useState)(!1),c=eS(),l=e?.handle;!l&&e&&cT(e)&&(l=sS(e));let u=n||!l&&!e,d=QS(`index`,l||``,{enabled:o&&!!l}),f=d.isFetching||d.isLoading,p=d.error,m=d.data?typeof d.data.followerCount==`number`&&typeof d.data.followingCount==`number`&&d.data.bio!==void 0:!1;if((0,z.useEffect)(()=>{!o||!l||!m&&!f&&!p&&d.refetch({cancelRefetch:!1})},[d,f,p,m,o,l]),u)return(0,B.jsx)(B.Fragment,{children:t});let h=d.data||e,g=h?.handle??l??``,_=h?.name??``,v=h?.avatarUrl??(e&&cT(e)?e.icon?.url:null)??null,y=!!h?.followsMe,b=typeof h?.followingCount==`number`?h.followingCount:Number(h?.followingCount)||0,x=typeof h?.followerCount==`number`?h.followerCount:Number(h?.followerCount)||0,S=h?.bio?oT(aT(h.bio,[`a`])):void 0,C=()=>{g&&c(`/profile/${g}`)};return(0,B.jsxs)(gf,{onOpenChange:s,children:[(0,B.jsx)(_f,{asChild:!0,children:t}),(0,B.jsx)(vf,{align:i,className:`w-[320px] cursor-default rounded-2xl border-0 p-5 text-left text-gray-900 shadow-lg outline-hidden dark:bg-surface-elevated-2`,side:r,sideOffset:12,onClick:e=>e.stopPropagation(),children:(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex justify-between`,children:[(0,B.jsxs)(Rd,{className:`size-14 cursor-pointer`,onClick:C,children:[v&&(0,B.jsx)(Fd,{alt:_,className:`rounded-full outline-[0.5px] outline-offset-[-0.5px] outline-black/10`,src:v,onError:e=>{e.target.src=``,e.target.style.display=`none`}}),(0,B.jsx)(Id,{className:`bg-gray-200 text-sm font-semibold text-gray-700 dark:bg-gray-800 dark:text-gray-200`,children:(0,B.jsx)(yt,{className:`size-5 text-gray-500 dark:text-gray-400`,strokeWidth:1.5})})]}),!a&&(0,B.jsx)(MC,{following:!!h?.followedByMe,handle:g,type:`primary`})]}),(0,B.jsxs)(`div`,{className:`flex cursor-pointer flex-col items-start`,onClick:C,children:[(0,B.jsx)(Sa,{className:`w-full truncate`,children:_}),(0,B.jsxs)(`div`,{className:`flex w-full gap-2`,children:[(0,B.jsx)(`span`,{className:`truncate text-gray-700 dark:text-gray-600`,children:g}),y&&!a&&(0,B.jsx)(Bd,{className:`mt-px whitespace-nowrap`,variant:`secondary`,children:`Follows you`})]})]})]}),(0,B.jsx)(`div`,{className:`flex gap-3 dark:text-gray-300`,children:f?(0,B.jsx)(H,{className:`h-4 w-32`}):!p&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`span`,{className:`cursor-pointer hover:underline`,onClick:()=>{g&&c(`/profile/${g}/following`)},children:[(0,B.jsx)(`span`,{className:`font-bold text-black dark:text-white`,children:Ne(b)}),` `,`Following`]}),(0,B.jsxs)(`span`,{className:`cursor-pointer hover:underline`,onClick:()=>{g&&c(`/profile/${g}/followers`)},children:[(0,B.jsx)(`span`,{className:`font-bold text-black dark:text-white`,children:Ne(x)}),` `,`Followers`]})]})}),f?(0,B.jsx)(H,{className:`h-4 w-48`}):!p&&S?(0,B.jsx)(`div`,{dangerouslySetInnerHTML:{__html:iT(S)},className:`leading-tight dark:text-gray-300 [&_.invisible]:hidden [&_a]:text-[#00a4eb] [&_a:hover]:underline`}):null]})})]})},uT=(e={})=>{let[t,n]=(0,z.useState)(!1),r=F();return(0,z.useEffect)(()=>{let t=t=>{if(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLElement&&t.target.isContentEditable||t.target instanceof HTMLSelectElement||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey)return;let i=document.querySelector(`[role="dialog"][data-state="open"]`);if(!(i&&(e.componentRef?.current)?.closest(`[role="dialog"]`)!==i))switch(t.key.toLowerCase()){case`n`:i||(t.preventDefault(),e.onOpenNewNote?e.onOpenNewNote():n(!0));break;case`r`:e.isReplyAvailable&&e.onOpenReply&&(r.pathname.includes(`/notes/`)||r.pathname.includes(`/reader/`))&&(t.preventDefault(),e.onOpenReply());break}};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e,r.pathname]),{isNewNoteModalOpen:t,setIsNewNoteModalOpen:n}},dT=({actor:e,object:t,likeCount:n,commentCount:r,repostCount:i,layout:a,disabled:o=!1,buttonClassName:s=``,onLikeClick:c,onCommentClick:l,onReplyCountChange:u})=>{let[d,f]=(0,z.useState)(t.liked),[p,m]=(0,z.useState)(t.reposted),[h,g]=(0,z.useState)(!1),_=(0,z.useRef)(null);uT({isReplyAvailable:!l&&a!==`reply`,onOpenReply:()=>g(!0),componentRef:_}),(0,z.useEffect)(()=>{f(t.liked),m(t.reposted)},[t.liked,t.reposted]),(0,z.useEffect)(()=>{C(i)},[i]);let v=NS(`index`),y=PS(`index`),b=VS(`index`),x=HS(`index`),[S,C]=(0,z.useState)(i),w=async e=>{e.stopPropagation(),d?y.mutate(t.id):v.mutate(t.id,{onError(){f(!1)}}),f(!d),c()},T=e=>{e.stopPropagation(),l?l():g(!0)},E=`px-2 gap-1.5 font-normal text-md [&_svg]:size-[18px] transition-color ap-action-button text-gray-900 hover:text-gray-900 hover:bg-black/[3%] dark:hover:bg-gray-950 dark:text-gray-600 ${s}`;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{ref:_,className:`flex ${a!==`inbox`&&`gap-1`}`,children:[(0,B.jsxs)(R,{className:`${E} ${d&&`text-pink-500 hover:text-pink-500`}`,"data-testid":`like-button`,disabled:o,id:`like`,title:`${d?`Undo like`:`Like`}`,variant:`ghost`,onClick:e=>{e?.stopPropagation(),e&&w(e)},children:[(0,B.jsx)(Pe,{className:`${d&&`fill-pink-500 text-pink-500`}`}),a!==`inbox`&&(0,B.jsx)(Pd,{className:n===0?`-ml-1.5 w-0 overflow-hidden`:``,spinTiming:{duration:300},value:n})]}),(0,B.jsxs)(R,{className:`${E}`,"data-testid":`reply-button`,disabled:o,id:`comment`,title:`Reply`,variant:`ghost`,onClick:T,children:[(0,B.jsx)(Nt,{className:`-mr-px`}),a!==`inbox`&&r>0&&Qe(r)]}),(0,B.jsxs)(R,{className:`${E} ${p&&`text-green-500 hover:text-green-500`}`,"data-testid":`repost-button`,disabled:o,id:`repost`,title:`${p?`Undo repost`:`Repost`}`,variant:`ghost`,onClick:e=>{e?.stopPropagation(),p?(x.mutate(t.id),C(S-1)):(b.mutate(t.id,{onError(){m(!1),C(S-1)}}),C(S+1)),m(!p)},children:[(0,B.jsx)(Fe,{className:`${p&&`text-green-500`}`}),a!==`inbox`&&(0,B.jsx)(Pd,{className:S===0?`-ml-1.5 w-0 overflow-hidden`:``,spinTiming:{duration:300},value:S})]})]}),h&&(0,B.jsx)(AT,{open:h,replyTo:{object:t,actor:e},onOpenChange:e=>{g(e)},onReply:()=>{u?.(1),g(!1)},onReplyError:()=>{u?.(-1)}})]})};function fT(e){let t=e.replace(/<[^>]*>/g,``).split(/\s+/).filter(e=>e.length>0).length;return`${Math.ceil(t/275)} min read`}var pT=(e,t,n)=>{n?.stopPropagation(),t(typeof e==`string`?`/profile/${e}`:`/profile/${sS(e)}`)},mT=e=>{let t=new Date,n=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=n(t),i=n(new Date(t.getTime()-1440*60*1e3)),a=n(e);return a.getTime()===r.getTime()?hT(e):a.getTime()===i.getTime()?`Yesterday`:gT(e)},hT=e=>{let t=Math.floor((new Date().getTime()-e.getTime())/1e3);if(t<1)return`Just now`;if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m`:`${Math.floor(n/60)}h`},gT=e=>{let t=new Date,n=e.getDate(),r=e.toLocaleString(`default`,{month:`short`});return e.getFullYear()===t.getFullYear()?`${n} ${r}`:`${n} ${r} ${e.getFullYear()}`};function _T(e){return new Date(e).toLocaleDateString(`default`,{year:`numeric`,month:`short`,day:`2-digit`})+`, `+new Date(e).toLocaleTimeString(`default`,{hour:`2-digit`,minute:`2-digit`})}function vT(e,t=!0){let n=new Date(e?.published??e?.createdAt??new Date),r=_T(n),i=mT(n);return t&&!e.url?.includes(`/.ghost/activitypub`)?(0,B.jsx)(`a`,{className:`whitespace-nowrap text-gray-700 hover:underline`,href:e.url,rel:`noreferrer`,target:`_blank`,title:r,onClick:e=>e.stopPropagation(),children:i}):(0,B.jsx)(`span`,{className:`whitespace-nowrap text-gray-700`,children:i})}function yT(e){let t;if(e.image&&(t=typeof e.image==`string`?{type:`Image`,url:e.image}:{type:e.image.type??`Image`,mediaType:e.image.mediaType,url:e.image.url}),e.type===`Note`&&!t&&(t=e.attachment),!t)return null;if(Array.isArray(t)){if(t.length===0)return null;if(t.length===1)return t[0]}return t}function bT(e,t,n,r){let i=yT(e);if(!i)return null;let a=e=>n=>{n.stopPropagation(),t&&t(e)},o=e=>{r&&r(e)},s=(e,t=!1)=>(0,B.jsx)(`div`,{className:`${e} ${t?`min-h-[200px]`:``} flex w-full items-center justify-center bg-gray-100 dark:bg-gray-950/30`,children:(0,B.jsx)(Me,{className:`text-gray-400`,size:24,strokeWidth:1.5})});if(Array.isArray(i)){let e=i.length,r=``;return e===1?r=`grid-cols-1`:e>=2&&e<=4?r=`grid-cols-2 auto-rows-[150px]`:e>4&&(r=`grid-cols-3 auto-rows-[150px]`),(0,B.jsx)(`div`,{className:`attachment-gallery mt-3 grid w-full ${r} gap-2`,children:i.map((r,i)=>{let c=`size-full rounded-md outline-1 -outline-offset-1 outline-black/10 ${e===3&&i===0?`row-span-2`:``}`;return n&&n.has(r.url)?s(c,e===1):(0,B.jsx)(`img`,{alt:r.name||`Image-${i}`,className:`${c} cursor-pointer object-cover`,referrerPolicy:`no-referrer`,src:r.url,onClick:t?a(r.url):void 0,onError:()=>o(r.url)},r.url)})})}switch(i.mediaType){case`image/jpeg`:case`image/png`:case`image/gif`:case`image/webp`:return n&&n.has(i.url)?s(`${e.type===`Article`?`w-full rounded-t-md`:`mt-3 max-h-[420px] rounded-md outline-1 -outline-offset-1 outline-black/10`}`,!0):(0,B.jsx)(`img`,{alt:i.name||`Image`,className:`cursor-pointer ${e.type===`Article`?`w-full rounded-t-md`:`mt-3 max-h-[420px] rounded-md outline-1 -outline-offset-1 outline-black/10`}`,referrerPolicy:`no-referrer`,src:i.url,onClick:t?a(i.url):void 0,onError:()=>o(i.url)});case`video/mp4`:case`video/webm`:return(0,B.jsx)(`div`,{className:`relative mt-3 mb-4`,children:(0,B.jsx)(`video`,{className:`h-[300px] w-full rounded object-cover`,src:i.url,controls:!0})});case`audio/mpeg`:case`audio/ogg`:return(0,B.jsx)(`div`,{className:`relative mt-2 mb-4 w-full`,children:(0,B.jsx)(`audio`,{className:`w-full`,src:i.url,controls:!0})});default:if(e.image||i.type===`Image`){let r=e.type===`Article`?`cursor-pointer aspect-[16/7.55] w-full rounded-t-md object-cover`:`cursor-pointer mt-3 max-h-[420px] rounded-md outline-1 -outline-offset-1 outline-black/10`,c;return c=e.image?typeof e.image==`string`?e.image:e.image?.url:i.url,n&&n.has(c)?s(r,!0):(0,B.jsx)(`img`,{alt:i.name||`Image`,className:r,referrerPolicy:`no-referrer`,src:c,onClick:t?a(c):void 0,onError:()=>o(c)})}return null}}function xT(e,t){let n=yT(e),r=`ml-8 md:ml-9 shrink-0 rounded-md h-[91px] w-[121px] relative hidden @md/inbox-item:block`,i=w(`object-cover outline-1 -outline-offset-1 outline-black/[0.05]`,r);if(t)return(0,B.jsx)(H,{className:`${i} outline-0`});if(!n)return null;if(Array.isArray(n))return(0,B.jsx)(`img`,{className:i,referrerPolicy:`no-referrer`,src:n[0].url});switch(n.mediaType){case`image/jpeg`:case`image/png`:case`image/gif`:return(0,B.jsx)(`img`,{className:i,referrerPolicy:`no-referrer`,src:n.url});case`video/mp4`:case`video/webm`:return(0,B.jsxs)(`div`,{className:r,children:[(0,B.jsx)(`video`,{className:`h-[80px] w-full rounded object-cover`,src:n.url}),(0,B.jsx)(`div`,{className:`absolute inset-0 rounded bg-gray-900 opacity-50`}),(0,B.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,B.jsx)(Ge,{color:`white`,fill:`white`,size:40})})]});case`audio/mpeg`:case`audio/ogg`:return(0,B.jsx)(`div`,{className:`ml-8 w-[120px]`,children:(0,B.jsx)(`div`,{className:`relative mt-2 mb-4 w-full`,children:(0,B.jsx)(`audio`,{className:`w-full`,src:n.url,controls:!0})})});default:return e.image?(0,B.jsx)(`img`,{className:i,referrerPolicy:`no-referrer`,src:typeof e.image==`string`?e.image:e.image?.url}):null}}var ST=()=>{},CT=(0,B.jsx)(Fe,{className:`shrink-0 text-gray-700 dark:text-gray-600`,size:16,strokeWidth:1.5}),wT=({actor:e,allowDelete:t=!1,object:n,parentId:r=void 0,layout:i,type:a,commentCount:o=0,repostCount:s=0,likeCount:c=0,showHeader:l=!0,last:u,isLoading:d,isPending:f=!1,isCompact:p=!1,isChainContinuation:m=!1,isChainParent:h=!1,onClick:g=ST,onDelete:_=ST,showStats:v=!0})=>{let y=new Date(n?.published??new Date).toLocaleDateString(`default`,{year:`numeric`,month:`short`,day:`2-digit`})+`, `+new Date(n?.published??new Date).toLocaleTimeString(`default`,{hour:`2-digit`,minute:`2-digit`}),[,b]=(0,z.useState)(!1),[x,S]=(0,z.useState)(new Set),C=(0,z.useRef)(null),[w,T]=(0,z.useState)(!1),E=dC(`index`),D=eS(),O=GS(`index`,()=>{ro.success(`Followed ${A?.name}`)},()=>{ro.error(`Failed to follow`)}),ee=WS(`index`,()=>{ro.info(`Unfollowed ${A?.name}`)},()=>{ro.error(`Failed to unfollow`)});(0,z.useEffect)(()=>{let e=C.current;e&&T(e.scrollHeight>e.clientHeight)},[n?.content]),(0,z.useEffect)(()=>{let e=C.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[data-profile]`);if(t){let n=t.getAttribute(`data-profile`)?.trim();/^@([\w.-]+)@([\w-]+\.[\w.-]+[a-zA-Z])$/.test(n||``)&&n&&(e.preventDefault(),e.stopPropagation(),pT(n,D))}};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}},[D,n?.content]);let te=()=>{},ne=()=>{f||g()},k=()=>{E.mutate({id:n.id,parentId:r}),_()},re=async()=>{n?.url&&(await navigator.clipboard.writeText(n.url),b(!0),ro.success(`Link copied`),setTimeout(()=>b(!1),2e3))},ie=e=>{S(t=>new Set(t).add(e))},A=e;a===`Announce`&&(A=typeof n.attributedTo==`object`?n.attributedTo:e);let j=A?sS(A):null,M=A?.followedByMe||!1,ae=a===`Announce`?typeof n.attributedTo==`object`&&n.attributedTo&&!Array.isArray(n.attributedTo)&&`authored`in n.attributedTo?n.attributedTo.authored:typeof n.attributedTo==`object`&&n.attributedTo&&!Array.isArray(n.attributedTo)&&typeof e==`object`&&e&&n.attributedTo.id===e.id:n.authored,oe=a===`Announce`?n.reposted??!1:n.authored,se=()=>{j&&O.mutate(j)},ce=()=>{j&&ee.mutate(j)},le=(0,B.jsx)(R,{className:`relative z-10 size-[34px] rounded-md ${i===`inbox`||i===`modal`?`text-gray-900 hover:text-gray-900 dark:text-gray-600 dark:hover:text-gray-600`:`text-gray-500 hover:text-gray-500`} dark:hover:bg-gray-950 [&_svg]:size-5`,"data-testid":`menu-button`,variant:`ghost`,children:(0,B.jsx)(Te,{})}),{lightboxState:ue,openLightbox:N,closeLightbox:de,navigateToIndex:P}=kC(n);return i===`feed`?(0,B.jsxs)(B.Fragment,{children:[n&&(0,B.jsxs)(`div`,{className:`group/article relative -mx-4 ${f?`pointer-events-none`:`cursor-pointer`} rounded-lg p-6 px-4 pb-[18px]`,"data-layout":`feed`,"data-object-id":n.id,onClick:ne,children:[a===`Announce`&&(0,B.jsxs)(`div`,{className:`z-10 mb-2 flex items-center gap-1.5 text-gray-700 dark:text-gray-600`,children:[CT,(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 text-sm`,children:[(0,B.jsx)(lT,{actor:e,align:`center`,isCurrentUser:oe,children:(0,B.jsx)(`span`,{className:`break-anywhere truncate hover:underline`,onClick:t=>{pT(e,D,t)},children:e.name})}),`reposted`]})]}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2.5`,"data-test-activity":!0,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(lT,{actor:A,isCurrentUser:ae,children:(0,B.jsxs)(`div`,{className:`flex min-w-0 grow items-center gap-3`,children:[(0,B.jsx)(DC,{author:A,disabled:f,showFollowButton:!ae&&!M}),(0,B.jsxs)(`div`,{className:`flex min-w-0 grow flex-col`,onClick:e=>{f||pT(A,D,e)},children:[(0,B.jsx)(`span`,{className:`break-anywhere min-w-0 truncate font-semibold ${p?`text-lg`:`text-md`} ${f?``:`hover-underline`} dark:text-white`,"data-test-activity-heading":!0,children:d?(0,B.jsx)(H,{className:`w-24`}):A.name}),(0,B.jsxs)(`div`,{className:`flex w-full text-md text-gray-700 dark:text-gray-600`,children:[(0,B.jsx)(`span`,{className:`truncate ${f?``:`hover-underline`}`,children:d?(0,B.jsx)(H,{className:`w-56`}):sS(A)}),(0,B.jsx)(`div`,{className:`ml-1 before:mr-1 ${!d&&`before:content-["·"]`}`,title:`${y}`,children:d?(0,B.jsx)(H,{className:`w-4`}):vT(n,f===!1&&!n.authored)})]})]})]})}),(0,B.jsx)(OC,{allowDelete:t,authoredByMe:ae,disabled:f,followedByMe:M,layout:`feed`,trigger:le,onCopyLink:re,onDelete:k,onFollow:se,onUnfollow:ce})]}),(0,B.jsx)(`div`,{className:`relative col-start-2 col-end-3 w-full gap-4 pl-[52px]`,children:(0,B.jsxs)(`div`,{className:`flex flex-col`,children:[(0,B.jsx)(`div`,{className:``,children:n.type===`Article`?(0,B.jsxs)(`div`,{className:`rounded-md border border-gray-200 transition-colors hover:bg-gray-100 dark:border-gray-950 dark:hover:bg-gray-950`,children:[bT(n,ne,x,ie),(0,B.jsxs)(`div`,{className:`p-5`,children:[(0,B.jsx)(`div`,{className:`break-anywhere mb-1 line-clamp-2 text-lg leading-tight font-semibold tracking-tight text-pretty`,"data-test-activity-heading":!0,children:n.name}),(0,B.jsx)(`div`,{className:`break-anywhere line-clamp-3 leading-[1.4em]`,children:n.preview?.content})]})]}):(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(`div`,{className:`ap-note-content break-anywhere line-clamp-[10] leading-[1.4285714286] tracking-[-0.006em] text-pretty text-gray-900 dark:text-gray-300 [&_p+p]:mt-3`,children:d?(0,B.jsx)(H,{count:2}):(0,B.jsx)(`div`,{dangerouslySetInnerHTML:{__html:iT(oT(n.content||``)??``)},ref:C,onClick:e=>{let t=e.target;(t.tagName===`A`||t.closest(`a`))&&e.stopPropagation()}})}),w&&(0,B.jsx)(`button`,{className:`mt-1 text-blue-600`,type:`button`,children:`Show more`}),bT(n,N,x,ie)]})}),(0,B.jsx)(`div`,{className:`space-between relative z-[30] mt-1 ml-[-8px] flex`,children:d?(0,B.jsx)(H,{className:`ml-2 w-18`}):v&&(0,B.jsx)(dT,{actor:A,commentCount:o,disabled:f,layout:i,likeCount:c,object:n,repostCount:s,onLikeClick:te})})]})})]})]}),(0,B.jsx)(AC,{currentIndex:ue.currentIndex,images:ue.images,isOpen:ue.isOpen,onClose:de,onNavigate:P})]}):i===`modal`?(0,B.jsxs)(B.Fragment,{children:[n&&(0,B.jsxs)(`div`,{"data-object-id":n.id,children:[(0,B.jsxs)(`div`,{className:`group/article relative`,"data-layout":`modal`,onClick:ne,children:[(0,B.jsxs)(`div`,{className:`z-10 -my-1 grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-3 pt-4 pb-3`,"data-test-activity":!0,children:[l&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`relative z-10 pt-[3px]`,children:(0,B.jsx)(DC,{author:A,showFollowButton:!ae&&!M})}),(0,B.jsxs)(`div`,{className:`relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]`,onClick:e=>{f||pT(A,D,e)},children:[(0,B.jsxs)(`div`,{className:`flex w-full`,children:[(0,B.jsx)(`span`,{className:`break-anywhere min-w-0 truncate font-semibold whitespace-nowrap after:mx-1 after:font-normal after:text-gray-700 after:content-["·"] after:dark:text-gray-600`,"data-test-activity-heading":!0,children:A.name}),(0,B.jsx)(`div`,{children:vT(n,!n.authored)})]}),(0,B.jsx)(`div`,{className:`flex w-full`,children:(0,B.jsx)(`span`,{className:`min-w-0 truncate text-gray-700 dark:text-gray-600`,children:sS(A)})})]})]}),(0,B.jsx)(`div`,{className:`relative z-10 col-start-1 col-end-3 w-full gap-4`,children:(0,B.jsxs)(`div`,{className:`flex flex-col items-start`,children:[n.name&&(0,B.jsx)(Ca,{className:`break-anywhere mb-1 leading-tight`,"data-test-activity-heading":!0,children:n.name}),(0,B.jsx)(`div`,{dangerouslySetInnerHTML:{__html:iT(oT(n.content||``)??``)},ref:C,className:`ap-note-content-large break-anywhere text-[1.6rem] tracking-[-0.011em] text-pretty text-gray-900 dark:text-gray-300 [&_p+p]:mt-3`}),bT(n,N,x,ie),(0,B.jsx)(`div`,{className:`space-between mt-3 ml-[-8px] flex`,children:v&&(0,B.jsx)(dT,{actor:A,commentCount:o,layout:i,likeCount:c,object:n,repostCount:s,onLikeClick:te})})]})})]}),(0,B.jsx)(`div`,{className:`absolute -inset-x-3 -inset-y-0 z-0 rounded transition-colors max-lg:hidden`})]}),(0,B.jsx)(`div`,{className:`mt-3 h-px bg-gray-200 dark:bg-gray-950`})]}),(0,B.jsx)(AC,{currentIndex:ue.currentIndex,images:ue.images,isOpen:ue.isOpen,onClose:de,onNavigate:P})]}):i===`reply`?(0,B.jsxs)(B.Fragment,{children:[n&&(0,B.jsxs)(`div`,{className:`group/article relative ${p?`pb-6`:m?`pb-5`:`py-5`} ${f?`pointer-events-none`:`cursor-pointer`}`,"data-layout":`reply`,"data-object-id":n.id,onClick:ne,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2.5 border-b-gray-200`,"data-test-activity":!0,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(lT,{actor:A,isCurrentUser:ae,children:(0,B.jsxs)(`div`,{className:`flex min-w-0 grow items-center gap-3`,children:[(0,B.jsx)(DC,{author:A,disabled:f,showFollowButton:!ae&&!M}),(0,B.jsxs)(`div`,{className:`flex min-w-0 grow flex-col`,onClick:e=>{f||pT(A,D,e)},children:[(0,B.jsxs)(`div`,{className:`flex`,children:[(0,B.jsx)(`span`,{className:`break-anywhere min-w-0 truncate font-semibold whitespace-nowrap text-black after:mx-1 after:font-normal after:text-gray-700 after:content-["·"] dark:text-white`,"data-test-activity-heading":!0,children:A.name}),(0,B.jsx)(`div`,{children:vT(n,f===!1&&!n.authored)})]}),(0,B.jsx)(`div`,{className:`flex`,children:(0,B.jsx)(`span`,{className:`truncate text-gray-700`,children:sS(A)})})]})]})}),!p&&(0,B.jsx)(OC,{allowDelete:t,authoredByMe:ae,disabled:f,followedByMe:M,layout:`reply`,trigger:le,onCopyLink:re,onDelete:k,onFollow:se,onUnfollow:ce})]}),(0,B.jsx)(`div`,{className:`relative z-10 col-start-2 col-end-3 w-full gap-4 pl-[52px]`,children:(0,B.jsxs)(`div`,{className:`flex flex-col items-start`,children:[n.type===`Article`&&bT(n,ne,x,ie),n.name&&(0,B.jsx)(Ca,{className:`break-anywhere mt-2.5 leading-tight text-pretty`,"data-test-activity-heading":!0,children:n.name}),n.preview&&n.type===`Article`?(0,B.jsx)(`div`,{className:`mt-1 line-clamp-3 leading-tight`,children:n.preview.content}):(0,B.jsx)(`div`,{dangerouslySetInnerHTML:{__html:iT(oT(n.content||``)??``)},ref:C,className:`ap-note-content break-anywhere tracking-[-0.006em] text-pretty text-gray-900 dark:text-gray-300 [&_p+p]:mt-3`}),n.type===`Note`&&bT(n,N,x,ie),n.type===`Article`&&(0,B.jsx)(R,{className:`mt-3 w-full`,id:`read-more`,variant:`secondary`,children:`Read more`}),!p&&(0,B.jsx)(`div`,{className:`space-between mt-2 ml-[-8px] flex`,children:v&&(0,B.jsx)(dT,{actor:A,commentCount:o,disabled:f,layout:i,likeCount:c,object:n,repostCount:s,onLikeClick:te})})]})})]}),!u&&(0,B.jsx)(`div`,{className:`absolute left-[19px] ${p?`top-[51px] bottom-[8px]`:m?`top-[51px] bottom-[5px]`:h?`top-[71px] bottom-[5px]`:`top-[71px] bottom-[-7px]`} z-0 w-[2px] rounded-sm bg-gray-200 dark:bg-gray-950`})]}),(0,B.jsx)(AC,{currentIndex:ue.currentIndex,images:ue.images,isOpen:ue.isOpen,onClose:de,onNavigate:P})]}):i===`inbox`?(0,B.jsx)(B.Fragment,{children:n&&(0,B.jsxs)(`div`,{className:`group/article @container/inbox-item relative -mx-4 -my-px flex min-h-[112px] min-w-0 cursor-pointer items-center justify-between rounded-lg p-6 hover:bg-gray-100 dark:hover:bg-gray-950/50`,"data-layout":`inbox`,"data-object-id":n.id,onClick:ne,children:[(0,B.jsxs)(`div`,{className:`w-full min-w-0`,children:[(0,B.jsx)(`div`,{className:`z-10 mb-1.5 flex w-full min-w-0 items-center gap-1.5 text-sm group-hover/article:border-transparent`,children:d?(0,B.jsx)(H,{className:`w-24`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(lT,{actor:A,isCurrentUser:ae,children:(0,B.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,B.jsx)(DC,{author:A,size:`2xs`}),(0,B.jsx)(`span`,{className:`min-w-0 truncate font-semibold text-gray-900 hover:underline dark:text-gray-600`,"data-test-activity-heading":!0,onClick:e=>{pT(A,D,e)},children:A.name})]})}),a===`Announce`&&(0,B.jsxs)(`span`,{className:`z-10 flex items-center gap-1 text-gray-700 dark:text-gray-600`,children:[CT,(0,B.jsx)(lT,{actor:e,align:`center`,isCurrentUser:oe,children:(0,B.jsx)(`span`,{className:`line-clamp-1 hover:underline`,onClick:t=>{pT(e,D,t)},children:e.name})}),` reposted`]}),(0,B.jsx)(`span`,{className:`shrink-0 whitespace-nowrap text-gray-600 before:mr-1 before:content-["·"]`,title:`${y}`,children:vT(n,!n.authored)})]})}),(0,B.jsxs)(`div`,{className:`flex`,children:[(0,B.jsxs)(`div`,{className:`flex min-h-[73px] w-full min-w-0 flex-col items-start justify-start gap-1`,children:[(0,B.jsx)(Ca,{className:`break-anywhere line-clamp-2 w-full max-w-[600px] leading-tight text-pretty`,"data-test-activity-heading":!0,children:d?(0,B.jsx)(H,{className:`w-full max-w-96`}):n.name?n.name:(0,B.jsx)(`span`,{dangerouslySetInnerHTML:{__html:iT(aT(n.content||``))}})}),(0,B.jsx)(`div`,{className:`ap-note-content break-anywhere line-clamp-2 w-full max-w-[600px] text-base leading-normal text-pretty text-gray-900 dark:text-gray-300 [&_p+p]:mt-3`,children:d?(0,B.jsx)(H,{count:2}):(0,B.jsx)(`div`,{dangerouslySetInnerHTML:{__html:iT(aT(n.preview?.content??n.content??``))}})}),(0,B.jsx)(`span`,{className:`mt-1 shrink-0 text-sm leading-none whitespace-nowrap text-gray-600`,children:d?(0,B.jsx)(H,{className:`w-16`}):n.content&&`${fT(n.content)}`})]}),(0,B.jsxs)(`div`,{className:`invisible absolute top-8 right-3 z-[49] flex -translate-y-1/2 rounded-lg bg-white p-1 shadow-md group-hover/article:visible dark:bg-black`,children:[v&&(0,B.jsx)(dT,{actor:A,commentCount:o,layout:i,likeCount:c,object:n,repostCount:s,onLikeClick:te}),(0,B.jsx)(OC,{allowDelete:t,authoredByMe:ae,followedByMe:M,layout:`inbox`,trigger:le,onCopyLink:re,onDelete:k,onFollow:se,onUnfollow:ce})]})]})]}),xT(n,d)]})}):(0,B.jsx)(B.Fragment,{})},TT=5*1024*1024,ET=`Image must be less than 5MB in size.`,DT=async e=>{try{let t=await fetch(e,{mode:`cors`});if(!t.ok)throw Error(`Failed to fetch image: ${t.status}`);let n=await t.blob();return new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=t,r.readAsDataURL(n)})}catch{return e}},OT=e=>new Promise(t=>{let n=new Image;n.onload=()=>{URL.revokeObjectURL(n.src),t(n.width===n.height)},n.src=URL.createObjectURL(e)}),kT=`Image must be square.`,AT=({children:e,replyTo:t,onReply:n,onReplyError:r,onOpenChange:i,...a})=>{let{data:o}=US(`index`),s=ZS(`index`,o),c=XS(`index`,o),{data:l,isLoading:u}=QS(`index`,`me`),[d,f]=(0,z.useState)(!1),p=(0,z.useRef)(null),m=(0,z.useRef)(null),[h,g]=(0,z.useState)(null),[_,v]=(0,z.useState)(!1),y=(0,z.useRef)(null),[b,x]=(0,z.useState)(``),[S,C]=(0,z.useState)(null),[w,T]=(0,z.useState)(``),[E,D]=(0,z.useState)(!1),[O,ee]=(0,z.useState)(!1),[te,ne]=(0,z.useState)(!1),k=eS();(0,z.useEffect)(()=>{a.open!==void 0&&f(a.open)},[a.open]),(0,z.useEffect)(()=>{if(a.open===void 0?d:a.open){let e=setTimeout(()=>{ne(!0)},300);return()=>clearTimeout(e)}else ne(!1)},[d,a.open]);let re=!b.trim()||!o||O||b.length>500,ie=(0,z.useCallback)(async()=>{let e=b.trim();if(!(!e||!o))try{ee(!0),t?(await c.mutateAsync({inReplyTo:t.object.id,content:e,imageUrl:S||void 0,altText:w||void 0}),n?.()):(await s.mutateAsync({content:e,imageUrl:S||void 0,altText:w||void 0}),k(`/notes`)),f(!1),i&&i(!1),ro.success(t?`Reply posted`:`Note posted`)}catch{t&&r?.()}finally{ee(!1)}},[b,o,t,c,s,S,w,n,r,f,k,i]),A=e=>{x(e.target.value)};(0,z.useEffect)(()=>{p.current&&(p.current.style.height=`auto`,p.current.style.height=`${p.current.scrollHeight}px`)},[b]),(0,z.useEffect)(()=>{if((a.open===void 0?d:a.open)&&p.current){let e=setTimeout(()=>{p.current?.focus()},100);return()=>clearTimeout(e)}},[d,a.open]),(0,z.useEffect)(()=>{if(E&&m.current){let e=setTimeout(()=>{m.current?.focus()},100);return()=>clearTimeout(e)}},[E]),(0,z.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),!re&&!_&&ie())};if(a.open===void 0?d:a.open)return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[d,a.open,re,_,ie]);let j=(0,z.useCallback)(async e=>{let t=e.clipboardData?.items;if(t)for(let n=0;n<t.length;n++){let r=t[n];if(r.type.indexOf(`image`)!==-1){e.preventDefault();let t=r.getAsFile();if(t){if(t.size>5242880){ro.error(ET);return}let e=URL.createObjectURL(t);g(e),await M(t)}break}}},[]);(0,z.useEffect)(()=>{if(a.open===void 0?d:a.open)return document.addEventListener(`paste`,j),()=>document.removeEventListener(`paste`,j)},[d,a.open,j]);let M=async e=>{try{v(!0);let t=await hC(e);C(t)}catch(e){g(null);let t=`Failed to upload image. Try again.`;if(e&&typeof e==`object`&&`statusCode`in e)switch(e.statusCode){case 413:t=`Image size exceeds limit.`;break;case 415:t=`The file type is not supported.`;break;default:}ro.error(t)}finally{v(!1)}},ae=async e=>{let t=e.target.files;if(t&&t.length>0){let n=t[0];if(n.size>5242880){ro.error(ET),e.target.value=``;return}let r=URL.createObjectURL(n);g(r),await M(n)}},oe=e=>{e.stopPropagation(),g(null),C(null),T(``),D(!1),h&&URL.revokeObjectURL(h),y.current&&(y.current.value=``)},se=e=>{e.stopPropagation(),D(!E)},ce=()=>{p.current?.focus()};(0,z.useEffect)(()=>()=>{h&&URL.revokeObjectURL(h)},[h]);let le=`What's new?`;if(t){let e=t.object.attributedTo||{};typeof e==`object`&&`preferredUsername`in e&&`id`in e&&(le=`Reply to ${sS(e)}...`)}return(0,B.jsxs)(fu,{open:a.open===void 0?d:a.open,onOpenChange:e=>{e&&(x(``),g(null),C(null),T(``),D(!1),h&&URL.revokeObjectURL(h),y.current&&(y.current.value=``)),f(e),i&&i(e)},...a.open===void 0?a:{},children:[(0,B.jsx)(pu,{asChild:!0,children:e}),(0,B.jsxs)(_u,{className:`max-h-[80vh] min-h-[240px] gap-0 overflow-y-auto pb-0`,"data-testid":`new-note-modal`,onClick:e=>e.stopPropagation(),children:[(0,B.jsxs)(vu,{className:`hidden`,children:[(0,B.jsx)(bu,{children:t?`Reply`:`New note`}),(0,B.jsx)(xu,{children:`Post your thoughts to the Social web`})]}),t&&(0,B.jsx)(wT,{actor:t.actor,allowDelete:!1,commentCount:t.object.replyCount??0,isCompact:!0,layout:`reply`,likeCount:t.object.likeCount??0,object:t.object,repostCount:t.object.repostCount??0,type:t.object.type===`Article`?`Article`:`Note`,onClick:()=>{}}),(0,B.jsxs)(`div`,{className:`flex ${h?``:`min-h-36`} cursor-text items-start gap-3`,onClick:ce,children:[(0,B.jsx)(`div`,{className:`sticky top-0`,children:(0,B.jsx)(DC,{author:o})}),(0,B.jsx)(Wr,{asChild:!0,children:(0,B.jsxs)(`div`,{className:`-mt-0.5 flex w-full flex-col gap-0.5`,children:[u?(0,B.jsx)(H,{className:`w-10`}):(0,B.jsx)(`span`,{className:`break-anywhere min-w-0 truncate font-semibold whitespace-nowrap text-black dark:text-white`,children:l?.name}),(0,B.jsx)(Gr,{name:`content`,asChild:!0,children:(0,B.jsx)(Kr,{asChild:!0,children:(0,B.jsx)(`textarea`,{ref:p,autoFocus:!0,className:`ap-textarea break-anywhere w-full resize-none bg-transparent text-[1.5rem] dark:placeholder:text-gray-700`,"data-testid":`note-textarea`,placeholder:le,rows:1,value:b,onChange:A,onPaste:j})})}),(0,B.jsx)(Gr,{name:`image`,asChild:!0,children:(0,B.jsx)(Kr,{asChild:!0,children:(0,B.jsx)(`input`,{ref:y,accept:`image/jpeg,image/png,image/webp,image/gif`,className:`hidden`,type:`file`,onChange:ae})})})]})})]}),h&&(0,B.jsxs)(`div`,{className:`group relative mt-6 flex min-h-[200px] w-full items-center justify-center`,children:[(0,B.jsx)(`img`,{alt:`Image attachment preview`,className:`max-h-[320px] w-full rounded-sm object-cover outline-1 -outline-offset-1 outline-black/10 ${_&&`opacity-10`}`,src:h}),_&&(0,B.jsx)(`div`,{className:`absolute leading-[0]`,children:(0,B.jsx)(Cf,{size:`md`})}),(0,B.jsx)(R,{className:`absolute top-3 right-3 size-8 bg-black/60 text-white opacity-0 group-hover:opacity-100 hover:bg-black/80`,onClick:oe,children:(0,B.jsx)(ke,{})}),!_&&(0,B.jsx)(R,{className:`absolute bottom-3 left-3 h-6 px-2 py-0 text-white ${E?`bg-green-500 hover:bg-green-500`:`bg-black/60 hover:bg-black/80`}`,onClick:se,children:`Alt`})]}),h&&!_&&E&&(0,B.jsx)(`div`,{className:`mt-1`,children:(0,B.jsx)(Uu,{ref:m,className:`w-full border-0 bg-transparent px-0 focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-(--color-popover) dark:text-white dark:placeholder:text-gray-800`,placeholder:`Type alt text for image (optional)`,type:`text`,value:w,onChange:e=>T(e.target.value)})}),(0,B.jsxs)(yu,{className:`${te?`sticky`:`static`} bottom-0 flex-row bg-background py-6 dark:bg-surface-elevated-2`,children:[(0,B.jsx)(R,{className:`mr-auto w-[34px] min-w-0!`,variant:`outline`,onClick:()=>y.current?.click(),children:(0,B.jsx)(We,{})}),(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsxs)(`div`,{className:`text-sm ${b.length>=500?`text-red-500`:b.length>=500*.9?`text-yellow-600`:`text-gray-500`}`,children:[b.length,`/`,500]}),(0,B.jsx)(R,{className:`min-w-16`,"data-testid":`post-button`,disabled:re||_,onClick:ie,children:O?(0,B.jsx)(Cf,{color:`light`,size:`sm`}):`Post`})]})]})]})]})};function jT(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}function MT(e,t){let n=jT(e);return JSON.stringify({...n,...t})}var NT=()=>{let{data:e}=u(),{mutateAsync:t}=Vt(),n=z.useMemo(()=>e?.accessibility&&jT(e.accessibility).apOnboarding||{},[e?.accessibility]),r=z.useCallback(async n=>{if(!e)return;let r=jT(e.accessibility),i=MT(e.accessibility,{apOnboarding:{...r.apOnboarding,...n}});await t({...e,accessibility:i})},[e,t]);return{isOnboarded:!!n.welcomeStepsFinished,isExplainerClosed:!!n.exploreExplainerClosed,setOnboarded:e=>r({welcomeStepsFinished:e}),setExplainerClosed:e=>r({exploreExplainerClosed:e})}},PT=()=>(0,B.jsx)(`div`,{className:`h-full pt-14`,children:(0,B.jsx)(I,{})}),FT=t({default:()=>PT,useOnboardingStatus:()=>NT}),IT=()=>{let e=eS();function t(){e(`/notes/https%3A%2F%2Factivitypub.ghost.org%2F.ghost%2Factivitypub%2Fnote%2F6d6d7f57-b656-4caa-ba9e-efa1d9a4b3fb`)}return(0,B.jsxs)(`div`,{className:`z-20 w-full bg-white dark:bg-background`,children:[(0,B.jsxs)(`div`,{className:`flex w-full flex-col gap-0.5 border-t border-gray-200 bg-white px-3 pt-6 dark:border-gray-950 dark:bg-background`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(pt,{className:`text-purple-500`,size:20,strokeWidth:1.5}),(0,B.jsx)(Ca,{children:`Beta feedback`})]}),(0,B.jsx)(`span`,{className:`text-sm text-gray-700 dark:text-gray-600`,children:`Something not working? Let us know`}),(0,B.jsx)(R,{className:`mt-2 dark:bg-gray-950/70 dark:hover:bg-gray-900`,variant:`secondary`,onClick:t,children:`Send feedback`})]}),(0,B.jsxs)(`div`,{className:`-mb-1 ml-3 flex items-center gap-1.5 pt-4 pb-2 text-xs text-gray-400`,children:[(0,B.jsx)(`a`,{className:`text-xs font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white`,href:`https://ghost.org/help/social-web/`,rel:`noreferrer`,target:`_blank`,children:`Help`}),`⋅`,(0,B.jsx)(`a`,{className:`text-xs font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white`,href:`https://activitypub.ghost.org/archive`,rel:`noreferrer`,target:`_blank`,children:`Updates`})]})]})},LT=({children:e,url:t=null,onClick:n,"data-testid":r,isSelected:i=!1})=>{let a=z.Children.toArray(e),o=(0,B.jsx)(`div`,{className:`relative flex w-full max-w-[620px] cursor-pointer flex-col before:absolute before:inset-x-[-16px] before:inset-y-[-1px] before:rounded-md before:bg-gray-50 before:transition-opacity hover:z-10 hover:cursor-pointer hover:border-b-transparent hover:before:opacity-100 dark:before:bg-gray-950 ${i?`z-10 before:opacity-100`:`before:opacity-0`}`,"data-testid":r,onClick:()=>{!t&&n&&n()},children:(0,B.jsxs)(`div`,{className:`relative z-10 flex w-full items-center gap-3 py-3`,children:[a[0],a[1],a[2]]})});return t?(0,B.jsx)(`a`,{href:t,rel:`noreferrer`,target:`_blank`,onClick:e=>{n&&(e.preventDefault(),n())},children:o}):o},RT=()=>{let e=eS(),{suggestedProfilesQuery:t}=yC(`index`,3),{data:n,isLoading:r}=t,i=r?[,,,].fill(null):n||[],{resetStack:a}=ve();return!r&&(!n||n.length===0)?null:(0,B.jsxs)(`div`,{className:`border-t border-gray-200 px-3 pt-6 dark:border-gray-950 [@media(max-height:740px)]:hidden`,children:[(0,B.jsxs)(`div`,{className:`mb-3 flex flex-col gap-0.5`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(Je,{className:`text-purple-500`,size:20,strokeWidth:1.5}),(0,B.jsx)(Ca,{children:`Follow suggestions`})]}),(0,B.jsx)(`span`,{className:`text-sm text-gray-700 dark:text-gray-600`,children:`Accounts you might be interested in`})]}),(0,B.jsx)(`ul`,{className:`grow`,children:i.map((t,n)=>{let i=t?.id||`loading-${n}`,a=t?.name||``,o=t?.handle||``,s=t?.avatarUrl||``,c;switch(n){case 0:c=`[@media(max-height:740px)]:hidden`;break;case 1:c=`[@media(max-height:800px)]:hidden`;break;case 2:c=`[@media(max-height:860px)]:hidden`;break}return(0,B.jsx)(z.Fragment,{children:(0,B.jsx)(`li`,{className:c,children:(0,B.jsx)(lT,{actor:t,align:`center`,isCurrentUser:!1,side:`left`,children:(0,B.jsx)(`div`,{children:(0,B.jsxs)(LT,{onClick:()=>{!r&&t&&pT(t,e)},children:[r?(0,B.jsx)(H,{className:`z-10 size-10`}):(0,B.jsx)(DC,{author:{icon:{url:s},name:a,handle:o},showFollowButton:!0}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,B.jsx)(`span`,{className:`block max-w-[190px] truncate font-semibold text-black dark:text-white`,children:r?(0,B.jsx)(H,{className:`w-24`}):a}),(0,B.jsx)(`span`,{className:`block max-w-[190px] truncate text-sm text-gray-700 dark:text-gray-600`,children:r?(0,B.jsx)(H,{className:`w-40`}):o})]})]})})})},i)},i)})}),(0,B.jsx)(R,{className:`p-0 font-medium text-purple hover:text-black dark:hover:text-white`,variant:`link`,onClick:()=>{a(),e(`/explore`)},children:`Find more →`})]})},zT=({profile:e,update:t,isLoading:n,onOpenChange:r})=>{let i=()=>{t(e.id,{followedByMe:!0})},a=()=>{t(e.id,{followedByMe:!1})},o=eS();return(0,B.jsx)(lT,{actor:e,align:`center`,isCurrentUser:!1,side:`left`,children:(0,B.jsx)(`div`,{children:(0,B.jsxs)(LT,{onClick:()=>{r?.(!1),o(`/profile/${e.handle}`)},children:[(0,B.jsx)(DC,{author:{icon:{url:e.avatarUrl},name:e.name,handle:e.handle},onClick:()=>r?.(!1)}),(0,B.jsxs)(`div`,{className:`break-anywhere flex grow flex-col`,children:[(0,B.jsx)(`span`,{className:`line-clamp-1 font-semibold text-black dark:text-white`,children:n?(0,B.jsx)(H,{className:`w-full max-w-64`}):e.name}),(0,B.jsx)(`span`,{className:`line-clamp-1 text-sm text-gray-700 dark:text-gray-600`,children:n?(0,B.jsx)(H,{className:`w-24`}):e.handle})]}),n?(0,B.jsx)(`div`,{className:`inline-flex items-center`,children:(0,B.jsx)(H,{className:`w-12`})}):(0,B.jsx)(MC,{className:`ml-auto`,following:e.followedByMe,handle:e.handle,type:`secondary`,onFollow:i,onUnfollow:a})]},e.id)})})},BT=({onOpenChange:e})=>{let{suggestedProfilesQuery:t,updateSuggestedProfile:n}=yC(`index`,5),{data:r=[],isLoading:i}=t;return!i&&(!r||r.length===0)?null:(0,B.jsx)(`div`,{className:`mb-[-15px] flex flex-col gap-3 pt-2`,children:(0,B.jsx)(`div`,{className:`flex flex-col`,children:(i?[,,,,,].fill(null):r||[]).map((t,r)=>(0,B.jsx)(z.Fragment,{children:(0,B.jsx)(zT,{isLoading:i,profile:t||{id:``,name:``,handle:``,avatarUrl:``,bio:``,followerCount:0,followingCount:0,followedByMe:!1},update:n,onOpenChange:e})},t?.id||`loading-${r}`))})})};function VT(e,t,n,r){var i=this,a=(0,z.useRef)(null),o=(0,z.useRef)(0),s=(0,z.useRef)(0),c=(0,z.useRef)(null),l=(0,z.useRef)([]),u=(0,z.useRef)(),d=(0,z.useRef)(),f=(0,z.useRef)(e),p=(0,z.useRef)(!0),m=(0,z.useRef)(),h=(0,z.useRef)();f.current=e;var g=typeof window<`u`,_=!t&&t!==0&&g;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=+t||0;var v=!!(n||={}).leading,y=!(`trailing`in n)||!!n.trailing,b=!!n.flushOnExit&&y,x=`maxWait`in n,S=`debounceOnServer`in n&&!!n.debounceOnServer,C=x?Math.max(+n.maxWait||0,t):null,w=(0,z.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,o.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){_&&cancelAnimationFrame(c.current),c.current=_?requestAnimationFrame(e):setTimeout(e,t)},w=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||x&&e-o.current>=C},T=function(t){return c.current=null,y&&l.current?e(t):(l.current=u.current=null,d.current)},E=function e(){var r=Date.now();if(v&&s.current===o.current&&D(),w(r))return T(r);if(p.current){var i=t-(r-a.current);n(e,x?Math.min(i,C-(r-o.current)):i)}},D=function(){r&&r({})},O=function(){if(g||S){var r,s=Date.now(),f=w(s);if(l.current=[].slice.call(arguments),u.current=i,a.current=s,b&&!m.current&&(m.current=function(){globalThis.document?.visibilityState===`hidden`&&h.current.flush()},(r=globalThis.document)==null||r.addEventListener==null||r.addEventListener(`visibilitychange`,m.current)),f){if(!c.current&&p.current)return o.current=a.current,n(E,t),v?e(a.current):d.current;if(x)return n(E,t),e(a.current)}return c.current||n(E,t),d.current}};return O.cancel=function(){var e=c.current;e&&(_?cancelAnimationFrame(c.current):clearTimeout(c.current)),o.current=0,l.current=a.current=u.current=c.current=null,e&&r&&r({})},O.isPending=function(){return!!c.current},O.flush=function(){return c.current?T(Date.now()):d.current},O},[v,x,t,C,y,b,_,g,S,r]);return h.current=w,(0,z.useEffect)(function(){return p.current=!0,function(){var e;b&&h.current.flush(),m.current&&=((e=globalThis.document)==null||e.removeEventListener==null||e.removeEventListener(`visibilitychange`,m.current),null),p.current=!1}},[b]),w}function HT(e,t){return e===t}function UT(e,t,n){var r=n&&n.equalityFn||HT,i=(0,z.useRef)(e),a=(0,z.useState)({})[1],o=VT((0,z.useCallback)(function(e){i.current=e,a({})},[a]),t,n,a),s=(0,z.useRef)(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}var WT=80,GT=({onOpenChange:e,query:t,setQuery:n})=>{let r=(0,z.useRef)(null),i=(0,z.useRef)([]),a=(0,z.useRef)(0),o=eS(),[s]=UT(t,300),c=t.length>=2,{searchQuery:l,updateAccountSearchResult:u}=KS(`index`,c?s:``),{data:d,isFetching:f,isFetched:p}=l,{suggestedProfilesQuery:m}=yC(`index`,5),{data:h,isLoading:g}=m,_=g||h&&h.length>0,{topicsQuery:v}=bC(),{data:y}=v,{data:b}=QS(`index`,`me`),[x,S]=(0,z.useState)([]),[C,w]=(0,z.useState)(null),[T,E]=(0,z.useState)(0),D=(0,z.useMemo)(()=>{let e=y?.topics||[];if(!c||e.length===0)return[];let n=t.toLowerCase();return e.filter(e=>e.slug===`following`?!1:e.name.toLowerCase().startsWith(n)||e.slug.toLowerCase().startsWith(n))},[t,c,y?.topics]),O=(0,z.useMemo)(()=>[...D.map(e=>({type:`topic`,data:e})),...x.map(e=>({type:`account`,data:e}))],[D,x]);(0,z.useEffect)(()=>{if(!c){S([]),w(null);return}p&&(d?.accounts&&d.accounts.length>0?(S(d.accounts),w(`results`),E(0)):(S([]),w(`none`),E(0)))},[d?.accounts,p,c]);let ee=f&&c,te=t.length<2||!C&&c&&D.length===0,ne=!te&&C===`none`&&D.length===0,k=!te&&(x.length>0||D.length>0);return(0,z.useEffect)(()=>{r.current?.focus()},[]),(0,z.useEffect)(()=>{let e=i.current[T];if(!e)return;let t=e.closest(`[data-radix-scroll-area-viewport]`)||e.closest(`.overflow-y-auto`);if(!t){e.scrollIntoView({block:`nearest`});return}let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.top<n.top+WT?t.scrollTo({top:t.scrollTop-(n.top+WT-r.top),behavior:`smooth`}):r.bottom>n.bottom-WT&&t.scrollTo({top:t.scrollTop+(r.bottom-n.bottom+WT),behavior:`smooth`})},[T]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`sticky -top-6 z-30 -mt-6 flex h-[72px] shrink-0 items-center gap-2 bg-white pt-3 pb-2 before:pointer-events-none before:absolute before:-inset-x-6 before:bottom-0 before:h-0 before:border-b before:border-b-gray-200 before:content-[""] dark:bg-surface-elevated-2 dark:before:border-b-gray-950`,children:[(0,B.jsx)(Ye,{className:`text-gray-600`,size:18,strokeWidth:1.5}),(0,B.jsx)(Uu,{ref:r,autoComplete:`off`,className:`flex h-10 w-full items-center rounded-lg border-0 bg-transparent px-0 py-1.5 text-lg !shadow-none !outline-none focus-visible:!border-0 focus-visible:bg-transparent focus-visible:!shadow-none focus-visible:!ring-0 focus-visible:!outline-0 dark:bg-surface-elevated-2 dark:text-white dark:placeholder:text-gray-800`,placeholder:`Search by name, handle, or URL...`,title:`Search`,type:`text`,value:t,onChange:e=>n(e.target.value),onKeyDown:t=>{if(!(!k||O.length===0)){if(t.key===`ArrowDown`||t.key===`ArrowUp`){t.preventDefault();let e=Date.now();if(e-a.current<50)return;a.current=e,t.key===`ArrowDown`?E(e=>(e+1)%O.length):E(e=>(e-1+O.length)%O.length)}else if(t.key===`Enter`){let n=O[T];if(!n)return;t.preventDefault(),e?.(!1),n.type===`topic`?o(`/explore/${n.data.slug}`):o(`/profile/${n.data.handle}`)}}}}),ee&&(0,B.jsx)(Cf,{className:`absolute! right-0 mr-0.5 shrink-0`,size:`sm`})]}),(0,B.jsxs)(`div`,{className:`h-full`,children:[ne&&(0,B.jsx)(`div`,{className:`flex h-full items-center justify-center pb-14`,children:(0,B.jsxs)(Tf,{children:[(0,B.jsx)(Ef,{children:(0,B.jsx)(yt,{})}),`No users matching this handle or account URL`]})}),k&&(0,B.jsx)(`div`,{className:`mt-[-14px] pb-2`,children:O.map((t,n)=>{let r=n===T;if(t.type===`topic`)return(0,B.jsx)(`div`,{ref:e=>i.current[n]=e,children:(0,B.jsxs)(LT,{isSelected:r,onClick:()=>{e?.(!1),o(`/explore/${t.data.slug}`)},children:[(0,B.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-900`,children:(0,B.jsx)(Je,{className:`text-gray-700 dark:text-gray-500`,size:18,strokeWidth:1.5})}),(0,B.jsxs)(`div`,{className:`flex flex-col`,children:[(0,B.jsx)(`span`,{className:`font-semibold text-black dark:text-white`,children:t.data.name}),(0,B.jsx)(`span`,{className:`text-sm text-gray-700 dark:text-gray-600`,children:`Topic`})]})]})},t.data.slug);let a=t.data,s=a.handle===b?.handle;return(0,B.jsx)(lT,{actor:a,align:`center`,isCurrentUser:s,side:`left`,children:(0,B.jsx)(`div`,{ref:e=>i.current[n]=e,children:(0,B.jsxs)(LT,{isSelected:r,onClick:()=>{e?.(!1),o(`/profile/${a.handle}`)},children:[(0,B.jsx)(DC,{author:{icon:{url:a.avatarUrl},name:a.name,handle:a.handle}}),(0,B.jsxs)(`div`,{className:`break-anywhere flex flex-col`,children:[(0,B.jsx)(`span`,{className:`line-clamp-1 font-semibold text-black dark:text-white`,children:a.name}),(0,B.jsx)(`span`,{className:`line-clamp-1 text-sm text-gray-700 dark:text-gray-600`,children:a.handle})]}),a.blockedByMe||a.domainBlockedByMe?(0,B.jsx)(R,{className:`pointer-events-none ml-auto min-w-[90px]`,variant:`destructive`,children:`Blocked`}):s?null:(0,B.jsx)(MC,{className:`ml-auto`,following:a.followedByMe,handle:a.handle,type:`secondary`,onFollow:()=>u(a.id,{followedByMe:!0}),onUnfollow:()=>u(a.id,{followedByMe:!1})})]})})},a.id)})}),te&&_&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ca,{children:`More people to follow`}),(0,B.jsx)(BT,{onOpenChange:e})]})]})]})},KT=()=>(0,B.jsxs)(`div`,{className:`inline-flex h-9 w-full items-center justify-start gap-2 rounded-full bg-gray-100 px-3 font-normal text-gray-600 hover:bg-gray-200 hover:text-gray-600 dark:bg-gray-950/70 dark:text-gray-700 dark:hover:bg-gray-950 [&_svg]:size-[18px]`,children:[(0,B.jsx)(Ye,{size:18,strokeWidth:1.5}),` Search the social web`]}),qT=z.forwardRef(({to:e,children:t,count:n,...r},i)=>{let a=F(),{resetStack:o}=ve(),s=$x(),c=e&&e.startsWith(`/`)?`${s}${e}`:e,l=L(`h-8 justify-start font-medium text-gray-800 dark:text-gray-500 dark:hover:bg-gray-950/70 [&_svg]:size-[18px]`,c&&(a.pathname===c||a.pathname.startsWith(`${c}/`))&&`bg-gray-100 font-semibold text-black dark:bg-gray-950/70 dark:text-white`),u=n&&n>0?(0,B.jsx)(`span`,{className:L(`ml-auto flex h-5 min-w-[20px] items-center justify-center rounded-full bg-purple-500 px-1.5 py-1 text-xs font-semibold text-white`),children:Qe(n)}):null;return c?(0,B.jsx)(R,{className:l,variant:`ghost`,asChild:!0,children:(0,B.jsxs)(he,{to:c,onClick:()=>{o(),ye(c)},children:[t,u]})}):(0,B.jsxs)(R,{ref:i,className:l,variant:`ghost`,onClick:r.onClick,...r,children:[t,u]})});qT.displayName=`SidebarMenuLink`;var JT=({isMobileSidebarOpen:e})=>{let{allFlags:t,flags:n}=Qx(),[r,i]=z.useState(!1),[a,o]=z.useState(``),{data:s}=u(),c=F(),l=$x(),{data:d}=gC(s?.slug||``),f=_C(s?.slug||``),{topicsQuery:p}=bC(),{data:m,isLoading:h}=p,g=!h&&m&&m.topics.length===0;z.useEffect(()=>{c.pathname===`${l}/notifications`&&d&&d>0&&f.mutate()},[c.pathname,l,d,f]);let _=z.useCallback(()=>{d&&d>0&&f.mutate()},[d,f]);return(0,B.jsx)(`div`,{className:`sticky top-0 flex min-h-screen w-[320px] flex-col border-l border-gray-200 pr-6 transition-transform duration-300 ease-in-out max-lg:fixed max-lg:inset-y-0 max-lg:right-0 max-lg:z-50 max-lg:border-0 max-lg:bg-white max-lg:shadow-xl max-md:bottom-[72px] max-md:min-h-[auto] max-md:overflow-y-scroll dark:border-gray-950 max-lg:dark:bg-black ${e?`max-lg:translate-x-0`:`max-lg:translate-x-full`}`,children:(0,B.jsxs)(`div`,{className:`flex grow flex-col justify-between`,children:[(0,B.jsxs)(`div`,{className:`isolate flex w-full flex-col items-start gap-6 pt-5 pl-6`,children:[(0,B.jsx)(`div`,{className:`flex w-full items-center`,children:(0,B.jsxs)(fu,{open:r,onOpenChange:i,children:[(0,B.jsx)(pu,{className:`mt-0.5 w-full`,children:(0,B.jsx)(KT,{})}),(0,B.jsx)(_u,{className:`flex h-full max-h-[452px] flex-col overflow-y-auto pb-0`,children:(0,B.jsx)(GT,{query:a,setQuery:o,onOpenChange:i})})]})}),(0,B.jsxs)(`div`,{className:`flex w-full flex-col gap-px`,children:[(0,B.jsxs)(qT,{to:`/reader`,children:[(0,B.jsx)(De,{size:18,strokeWidth:1.5}),`Reader`]}),(0,B.jsxs)(qT,{to:`/notes`,children:[(0,B.jsx)(Nt,{size:18,strokeWidth:1.5}),`Notes`]}),(0,B.jsxs)(qT,{count:c.pathname===`${l}/notifications`?void 0:d,to:`/notifications`,onClick:_,children:[(0,B.jsx)(Be,{size:18,strokeWidth:1.5}),`Notifications`]}),g?(0,B.jsx)(R,{className:`inline-flex w-full items-center gap-2 rounded-sm px-3 py-2.5 text-left font-medium text-gray-800 transition-colors hover:bg-gray-100 dark:text-gray-500 dark:hover:bg-gray-950/70`,variant:`ghost`,asChild:!0,children:(0,B.jsxs)(`a`,{href:`https://explore.ghost.org/social-web`,rel:`noopener noreferrer`,target:`_blank`,children:[(0,B.jsx)(Je,{size:18,strokeWidth:1.5}),`Explore`,(0,B.jsx)(Ke,{className:`ml-auto`,size:14,strokeWidth:1.5})]})}):(0,B.jsxs)(qT,{to:`/explore`,children:[(0,B.jsx)(Je,{size:18,strokeWidth:1.5}),`Explore`]}),(0,B.jsxs)(qT,{to:`/profile`,children:[(0,B.jsx)(ot,{size:18,strokeWidth:1.5}),`Profile`]}),(0,B.jsxs)(qT,{to:`/preferences`,children:[(0,B.jsx)(qe,{size:18,strokeWidth:1.5}),`Preferences`]})]}),(0,B.jsx)(AT,{children:(0,B.jsxs)(R,{className:`h-9 rounded-full bg-purple-500 px-3 text-white hover:bg-purple-600 dark:hover:bg-purple-600`,children:[(0,B.jsx)(Ie,{}),`New note`]})}),(0,B.jsx)(RT,{}),t.map(e=>n[e]?(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-1 pl-3 opacity-50`,children:[(0,B.jsx)(`span`,{className:`font-mono text-xs`,children:e}),(0,B.jsx)(`span`,{className:`inline-flex items-center rounded bg-green-100 px-1 py-0.5 text-xs font-medium text-green-800`,children:`ON`})]},e):(0,B.jsx)(B.Fragment,{}))]}),(0,B.jsx)(`div`,{className:`sticky bottom-0 flex items-center gap-2 bg-white pb-4 pl-4 dark:bg-background`,children:(0,B.jsx)(IT,{})})]})})};JT.displayName=`Sidebar`;var YT=({children:e,...t})=>{let{isOnboarded:n}=NT(),r=$x(),{data:i,isLoading:a}=u(),o=(0,z.useRef)(null),[s,c]=(0,z.useState)(!1),l=rS(),{topicsQuery:d}=bC(),{data:f}=d,p=f&&f.topics.length>0,{isNewNoteModalOpen:m,setIsNewNoteModalOpen:h}=uT(),g=()=>{c(!s)},_=()=>{c(!1)};return a||!i?null:n?(0,B.jsxs)(`div`,{ref:o,className:`h-screen w-full ${n&&`overflow-y-auto`}`,"data-scrollable-container":!0,children:[(0,B.jsx)(Se,{containerRef:o}),(0,B.jsx)(`div`,{className:`relative mx-auto flex max-w-page flex-col`,...t,children:n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`block grid-cols-[auto_320px] items-start lg:grid`,children:[(0,B.jsxs)(`div`,{className:`z-0 min-w-0`,children:[(0,B.jsx)(oS,{showBorder:!(l===`reader`&&p)&&l!==`explore`,onToggleMobileSidebar:g}),(0,B.jsx)(`div`,{className:`px-[min(4vw,24px)]`,children:e})]}),(0,B.jsx)(JT,{isMobileSidebarOpen:s,onCloseMobileSidebar:_})]}),s&&(0,B.jsx)(`div`,{className:`fixed inset-0 z-40 lg:hidden`,onClick:_})]}):(0,B.jsx)(PT,{})}),(0,B.jsx)(AT,{open:m,onOpenChange:h})]}):(0,B.jsx)(we,{to:`${r}/welcome`,replace:!0})},XT=({children:e})=>(0,B.jsx)(`div`,{className:`flex max-h-12 max-w-12 grow-0 items-center justify-center rounded-full bg-gray-100 p-3 text-gray-700 dark:bg-gray-950/70 [&_svg]:size-8 [&_svg]:stroke-1`,children:e}),ZT=({children:e,className:t})=>(0,B.jsx)(`div`,{className:`mx-auto mt-[24vh] flex max-w-[500px] flex-col items-center gap-5 text-center text-gray-700 ${t||``}`,children:e}),QT=({statusCode:e,errorCode:t})=>{let n=fe(),r=_e();return n?(0,B.jsx)(YT,{children:(0,B.jsxs)(ZT,{children:[(0,B.jsx)(XT,{children:(0,B.jsx)(Oe,{})}),(0,B.jsx)(Ca,{className:`-mb-4`,children:`Oops, page not found!`}),(0,B.jsx)(`div`,{children:`We couldn't find the page you were looking for. It may have been moved, deleted, or never existed in the first place.`})]})}):e===429?(0,B.jsxs)(ZT,{className:`mt-[50vh] -translate-y-1/2`,children:[(0,B.jsx)(XT,{children:(0,B.jsx)(Ft,{})}),(0,B.jsx)(Ca,{className:`-mb-4`,children:`Rate limit exceeded`}),(0,B.jsx)(`div`,{children:`You've made too many requests. Please try again in a moment.`}),(0,B.jsx)(R,{asChild:!0,children:(0,B.jsx)(`a`,{href:`https://ghost.org/help/social-web/`,rel:`noopener noreferrer`,target:`_blank`,children:`Learn more →`})})]}):e===403?t===`ROLE_MISSING`||t===`SITE_MISSING`?(0,B.jsxs)(ZT,{className:`mt-[50vh] -translate-y-1/2`,children:[(0,B.jsx)(XT,{children:(0,B.jsx)(Re,{})}),(0,B.jsx)(Ca,{className:`-mb-4`,children:`Site not configured correctly`}),(0,B.jsx)(`div`,{children:`This feature can't be used because the site isn't set up correctly. If you manage this site, check your settings or server logs, or contact support.`}),(0,B.jsx)(R,{asChild:!0,children:(0,B.jsx)(`a`,{href:`https://ghost.org/help/social-web/`,rel:`noopener noreferrer`,target:`_blank`,children:`Learn more →`})})]}):(0,B.jsxs)(ZT,{className:`mt-[50vh] -translate-y-1/2`,children:[(0,B.jsx)(XT,{children:(0,B.jsx)(Ve,{})}),(0,B.jsx)(Ca,{className:`-mb-4`,children:`Account suspended`}),(0,B.jsx)(`div`,{children:`Your account has been suspended due to policy violations.`}),(0,B.jsx)(R,{asChild:!0,children:(0,B.jsx)(`a`,{href:`https://ghost.org/help/social-web/`,rel:`noopener noreferrer`,target:`_blank`,children:`Learn more →`})})]}):e===410&&t===`INVALID_VERSION`?(0,B.jsxs)(ZT,{className:`mt-[50vh] -translate-y-1/2`,children:[(0,B.jsx)(XT,{children:(0,B.jsx)(nt,{})}),(0,B.jsx)(Ca,{className:`-mb-4`,children:`New version available`}),(0,B.jsx)(`div`,{children:`We've made some updates! Refresh your page to see what's new`}),(0,B.jsx)(R,{asChild:!0,children:(0,B.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),children:`Refresh your page`})})]}):(0,B.jsx)(`div`,{className:`admin-x-container-error`,children:(0,B.jsxs)(`div`,{className:`admin-x-error max-w-xl`,children:[(0,B.jsx)(`h1`,{children:`Loading interrupted`}),(0,B.jsx)(`p`,{children:`They say life is a series of trials and tribulations. This moment right here? It's a tribulation. Our app was supposed to load, and yet here we are. Loadless. Click back to the dashboard to try again.`}),(0,B.jsx)(`a`,{className:`cursor-pointer text-green`,onClick:e=>{e.preventDefault(),r(`/analytics/`,{crossApp:!0})},children:`← Back to the homepage`})]})})},$T=t({default:()=>QT}),eE=[{path:`activitypub`,element:(0,B.jsx)(I,{}),errorElement:(0,B.jsx)(QT,{}),handle:`activitypub-basepath`,children:[{index:!0,element:(0,B.jsx)(we,{to:`reader`})},{path:`inbox`,element:(0,B.jsx)(we,{to:`../reader`,replace:!0})},{path:`feed`,element:(0,B.jsx)(we,{to:`../notes`,replace:!0})},{path:`reader`,lazy:V(()=>N(()=>import(`./inbox-CTD-ix6u.js`),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url)),pageTitle:`Reader`},{path:`reader/:postId`,lazy:V(()=>N(()=>import(`./inbox-CTD-ix6u.js`),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url)),pageTitle:`Reader`},{path:`notes`,lazy:V(()=>N(()=>import(`./feed-Cs7-F3I5.js`),__vite__mapDeps([16,1,2,4,9,10,11,13]),import.meta.url)),pageTitle:`Notes`},{path:`notes/:postId`,lazy:V(()=>N(()=>import(`./note-DFy2JTpP.js`),__vite__mapDeps([17,1,2,4,5,6,7,8,9,10,11,15]),import.meta.url)),pageTitle:`Note`},{path:`notifications`,lazy:V(()=>N(()=>import(`./notifications-BVu-JOkB.js`),__vite__mapDeps([18,1,2,4,9,10,11,13]),import.meta.url)),pageTitle:`Notifications`},{path:`explore`,lazy:V(()=>N(()=>import(`./explore-BgHmdFVz.js`),__vite__mapDeps([19,1,2,4,5,6,9,10,11,13,14]),import.meta.url)),pageTitle:`Explore`},{path:`explore/:topic`,lazy:V(()=>N(()=>import(`./explore-BgHmdFVz.js`),__vite__mapDeps([19,1,2,4,5,6,9,10,11,13,14]),import.meta.url)),pageTitle:`Explore`},{path:`profile`,lazy:V(()=>N(()=>import(`./profile-DlcrYKay.js`),__vite__mapDeps([20,1,2,4,21,22,23,10,24,25,9,11,5,6,7,8,26,27,28,29,30,13,31]),import.meta.url)),pageTitle:`Profile`},{path:`profile/likes`,lazy:V(()=>N(()=>import(`./profile-DlcrYKay.js`),__vite__mapDeps([20,1,2,4,21,22,23,10,24,25,9,11,5,6,7,8,26,27,28,29,30,13,31]),import.meta.url)),pageTitle:`Profile`},{path:`profile/following`,lazy:V(()=>N(()=>import(`./profile-DlcrYKay.js`),__vite__mapDeps([20,1,2,4,21,22,23,10,24,25,9,11,5,6,7,8,26,27,28,29,30,13,31]),import.meta.url)),pageTitle:`Profile`},{path:`profile/followers`,lazy:V(()=>N(()=>import(`./profile-DlcrYKay.js`),__vite__mapDeps([20,1,2,4,21,22,23,10,24,25,9,11,5,6,7,8,26,27,28,29,30,13,31]),import.meta.url)),pageTitle:`Profile`},{path:`profile/:handle/:tab?`,lazy:V(()=>N(()=>import(`./profile-DlcrYKay.js`),__vite__mapDeps([20,1,2,4,21,22,23,10,24,25,9,11,5,6,7,8,26,27,28,29,30,13,31]),import.meta.url)),pageTitle:`Profile`},{path:`preferences`,lazy:V(()=>N(()=>import(`./preferences-ChOzBKcF.js`),__vite__mapDeps([32,1,2,4,9,10,11,33,22,23,24,25,13,31,5,6,26,27,28,29,30]),import.meta.url)),pageTitle:`Preferences`},{path:`preferences/moderation`,lazy:V(()=>N(()=>import(`./moderation-DqnsNTiw.js`),__vite__mapDeps([34,1,2,4,21,22,23,10,24,25,9,11,13]),import.meta.url)),pageTitle:`Moderation`,showBackButton:!0},{path:`preferences/bluesky-sharing`,lazy:V(()=>N(()=>import(`./bluesky-sharing-Dk1RTUaz.js`),__vite__mapDeps([35,1,2,4,9,10,11,26,27,28,22,23,29,30,13]),import.meta.url)),showBackButton:!0},{path:`preferences/move`,lazy:V(()=>N(()=>import(`./account-migration-DiS76mRS.js`),__vite__mapDeps([36,1,2,4,9,10,11,37,27,28,22,23,13]),import.meta.url)),pageTitle:`Account migration`,showBackButton:!0},{path:`preferences/handle`,lazy:V(()=>N(()=>import(`./domain-2REz20SO.js`),__vite__mapDeps([38,1,2,4,9,10,11,39,37,27,28,22,23,13,30]),import.meta.url)),pageTitle:`Handle`,showBackButton:!0},{path:`welcome`,lazy:V(()=>N(()=>Promise.resolve().then(()=>FT),void 0,import.meta.url)),pageTitle:`Welcome`,children:[{path:``,element:(0,B.jsx)(we,{to:`1`,replace:!0})},{path:`1`,lazy:V(()=>N(()=>import(`./step-1-C2HY6pyi.js`),__vite__mapDeps([40,1,2,4,9,10,11,41,42,8,43,44]),import.meta.url))},{path:`2`,lazy:V(()=>N(()=>import(`./step-2-CVOvLQ2n.js`),__vite__mapDeps([45,1,2,4,9,10,11,46]),import.meta.url))},{path:`3`,lazy:V(()=>N(()=>import(`./step-3-BsVXcpWU.js`),__vite__mapDeps([47,1,2,4,9,10,11,46]),import.meta.url))},{path:`*`,element:(0,B.jsx)(we,{to:`1`,replace:!0})}]},{path:`*`,lazy:V(()=>N(()=>Promise.resolve().then(()=>$T),void 0,import.meta.url))}]}];function tE(){return(0,B.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,B.jsx)(`path`,{d:`M3.6349 20.3723C3.80192 20.5393 4.00019 20.6718 4.21841 20.7622C4.43663 20.8525 4.67052 20.8991 4.90672 20.8991C5.14291 20.8991 5.3768 20.8525 5.59502 20.7622C5.81324 20.6718 6.01152 20.5393 6.17853 20.3723C6.34555 20.2052 6.47804 20.007 6.56843 19.7888C6.65882 19.5705 6.70534 19.3366 6.70534 19.1004C6.70534 18.8643 6.65882 18.6304 6.56843 18.4121C6.47804 18.1939 6.34555 17.9956 6.17853 17.8286C5.84123 17.4913 5.38374 17.3018 4.90672 17.3018C4.42969 17.3018 3.9722 17.4913 3.6349 17.8286C3.29759 18.1659 3.10809 18.6234 3.10809 19.1004C3.10809 19.5775 3.29759 20.035 3.6349 20.3723ZM17.7153 6.17951C17.8823 6.34653 18.0806 6.47901 18.2988 6.5694C18.517 6.65979 18.7509 6.70632 18.9871 6.70632C19.2233 6.70632 19.4572 6.65979 19.6754 6.5694C19.8936 6.47901 20.0919 6.34653 20.2589 6.17951C20.4259 6.01249 20.5584 5.81421 20.6488 5.596C20.7392 5.37778 20.7857 5.14389 20.7857 4.90769C20.7857 4.67149 20.7392 4.43761 20.6488 4.21939C20.5584 4.00117 20.4259 3.80289 20.2589 3.63587C19.9216 3.29857 19.4641 3.10907 18.9871 3.10907C18.5101 3.10907 18.0526 3.29857 17.7153 3.63587C17.378 3.97318 17.1885 4.43067 17.1885 4.90769C17.1885 5.38472 17.378 5.8422 17.7153 6.17951ZM7.50655 12.0023C7.50655 13.1946 7.98019 14.3381 8.82329 15.1812C9.66639 16.0243 10.8099 16.4979 12.0022 16.4979C13.1945 16.4979 14.338 16.0243 15.1811 15.1812C16.0242 14.3381 16.4978 13.1946 16.4978 12.0023C16.4978 10.81 16.0242 9.66647 15.1811 8.82337C14.338 7.98027 13.1945 7.50663 12.0022 7.50663C10.8099 7.50663 9.66639 7.98027 8.82329 8.82337C7.98019 9.66647 7.50655 10.81 7.50655 12.0023Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,B.jsx)(`path`,{d:`M8.79319 21.5246C10.5669 22.1224 12.4724 22.2127 14.2947 21.7854C16.1171 21.3581 17.7838 20.4302 19.1069 19.1062C20.4302 17.7827 21.3577 16.116 21.7848 14.2937C22.2119 12.4715 22.1217 10.5662 21.5243 8.79251M2.47582 15.2081C1.87829 13.4342 1.78805 11.5287 2.21527 9.70622C2.64249 7.88378 3.57019 6.21687 4.89383 4.89332C6.21747 3.56977 7.88445 2.64219 9.70692 2.21511C11.5294 1.78802 13.4349 1.87839 15.2088 2.47605`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function nE({path:e,activeOnSubpath:t=!1}){return ge((t&&e?`${e}/*`:e)||``)!==null}function $({children:e,...t}){return(0,B.jsx)(up,{...t,children:e})}var rE=z.createContext(null);function iE(){let e=z.useContext(rE);if(!e)throw Error(`NavMenuItem.Collapsible components must be used within NavMenuItem.Collapsible`);return e}function aE({children:e,expanded:t,id:n,onExpandedChange:r}){let i={expanded:t,id:n,onExpandedChange:r};return(0,B.jsx)(rE.Provider,{value:i,children:e})}function oE({ariaLabel:e,children:t}){let{expanded:n,id:r,onExpandedChange:i}=iE();return(0,B.jsxs)($,{children:[(0,B.jsx)(R,{"aria-controls":r,"aria-expanded":n,"aria-label":e,variant:`ghost`,size:`icon`,className:`hover:text-gray-black absolute top-0 left-3 h-(--control-height) w-auto p-0 text-md text-sidebar-accent-foreground transition-all group-hover/menu-item:opacity-100 hover:bg-transparent focus-visible:opacity-100 sidebar:opacity-0`,onClick:()=>void i(!n),children:(0,B.jsx)(St,{size:16,className:`transition-all ${n?`rotate-[90deg]`:``}`})}),t]})}function sE({children:e}){let{expanded:t,id:n}=iE();return(0,B.jsx)(`div`,{id:n,className:`grid transition-all duration-200 ease-out ${t?`grid-rows-[1fr]`:`-mb-px grid-rows-[0fr]`}`,children:(0,B.jsx)(`div`,{className:`flex flex-col gap-px overflow-hidden`,children:t?e:null})})}function cE({to:e,target:t,rel:n,activeOnSubpath:r=!1,isActive:i,children:a,...o}){let s=`#/${e?.replace(/^\/?#\//,``)}`,c=nE({path:e,activeOnSubpath:r}),l=i===void 0?c:i,{isMobile:u,setOpenMobile:d}=Jf(),f=()=>{u&&d(!1)};return(0,B.jsx)(fp,{asChild:!0,isActive:l,...o,children:(0,B.jsx)(`a`,{href:t===`_blank`?e:s,rel:t===`_blank`?n??`noopener noreferrer`:n,target:t,"aria-current":l?`page`:void 0,onClick:f,children:a})})}function lE({children:e,...t}){return(0,B.jsx)(`span`,{...t,className:L(`min-w-0 truncate`,t.className),children:e})}function uE({children:e,className:t,...n}){return(0,B.jsx)($,{className:`before:absolute before:inset-y-0 before:left-5 before:z-10 before:w-px before:bg-sidebar-accent`,children:(0,B.jsx)(`div`,{className:`min-w-0 pl-7`,children:(0,B.jsx)($.Link,{className:L(`w-full min-w-0 pl-2 focus-visible:ring-inset`,t),...n,children:e})})})}function dE({onClick:e,children:t,...n}){let{isMobile:r,setOpenMobile:i}=Jf();return(0,B.jsx)(fp,{onClick:()=>{r&&i(!1),e?.()},...n,children:t})}$.Link=cE,$.Label=lE,$.SubmenuItem=uE,$.Button=dE,$.Collapsible=aE,$.CollapsibleItem=oE,$.CollapsibleMenu=sE;function fE({...e}){let{data:t}=u(),{data:n}=Sp(),r=kp(n?.settings,`social_web_enabled`)??!1,i=ux(Mp().data?.site.url),{data:a=0}=gC(t?.slug||``,r),o=nE({path:`network`,activeOnSubpath:!0}),s=nE({path:`activitypub`,activeOnSubpath:!0}),c=a>0&&!o&&!s;return!t||!Ut(t)?null:(0,B.jsx)(ap,{...e,children:(0,B.jsx)(cp,{children:(0,B.jsxs)(lp,{children:[(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`analytics`,activeOnSubpath:!0,children:[(0,B.jsx)(it,{}),(0,B.jsx)($.Label,{children:`Analytics`})]})}),r&&(0,B.jsxs)($,{children:[(0,B.jsxs)($.Link,{to:`network`,isActive:o||s,children:[(0,B.jsx)(tE,{}),(0,B.jsx)($.Label,{children:`Network`})]}),c&&(0,B.jsx)(mp,{children:a})]}),(0,B.jsxs)($,{className:`group/viewsite relative`,children:[(0,B.jsxs)($.Link,{to:`site`,children:[(0,B.jsx)(Xe,{}),(0,B.jsx)($.Label,{children:`View site`})]}),(0,B.jsx)(`a`,{href:i,target:`_blank`,"aria-label":`View site in new tab`,rel:`noopener noreferrer`,className:`absolute top-0 right-0 flex size-8 items-center justify-center rounded-full text-gray-700 opacity-0 ring-sidebar-ring outline-hidden transition-all group-hover/viewsite:opacity-100 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:opacity-100 focus-visible:ring-2`,children:(0,B.jsx)(Ke,{size:16})})]})]})})})}var pE=`MembersResponseType`,mE=`/members/`,hE={limit:`1`},gE=()=>[pE,h(mE,hE)],_E=m({dataType:pE,path:mE}),vE=m({dataType:pE,path:mE,defaultSearchParams:hE});function yE(){let{data:e}=vE();return e?.meta?.pagination.total}var bE=p({method:`POST`,path:()=>`/members/`,body:e=>({members:[e]}),invalidateQueries:{dataType:pE}});function xE(e){return typeof e.meta?.stats?.imported==`number`}function SE({file:e,labels:t=[],mapping:n={}}){let r=new FormData;r.append(`membersfile`,e);for(let e of t)r.append(`labels`,e);for(let[e,t]of Object.entries(n))t&&r.append(`mapping[${e}]`,t);return r}var CE=p({method:`POST`,retry:!1,path:()=>`/members/upload/`,body:SE,invalidateQueries:{dataType:pE}});f({dataType:pE,path:e=>`/members/${e}/`});var wE=p({method:`POST`,path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:`CommentsResponseType`}}),TE=p({method:`POST`,path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:`CommentsResponseType`}}),EE=g({dataType:pE,path:mE,defaultSearchParams:{include:`labels,tiers`,limit:`100`,order:`created_at desc`},defaultNextPageParams:(e,t)=>{if(e.meta?.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{let{pages:t}=e,n=t.flatMap(e=>e.members),r=t[t.length-1].meta;return{members:n,meta:r,isEnd:r?r.pagination.pages===r.pagination.page:!0}}});function DE(e){return!e?.filter&&!e?.search}function OE(e,t){let n=a(),r=e.data?.meta?.pagination?.total,i=DE(t);(0,z.useEffect)(()=>{if(!(i&&!e.isError&&!e.isPlaceholderData&&!e.isPreviousData&&typeof r==`number`))return;let t=gE(),a=n.getQueryState(t),o=a?.data,s=o?.meta?.pagination;if(!a||!o||!s)return;let c=s.total===r,l=a.dataUpdatedAt<=e.dataUpdatedAt;c||!l||n.setQueryData(t,{...o,meta:{...o.meta,pagination:{...s,total:r}}},{updatedAt:e.dataUpdatedAt})},[n,i,r,e.dataUpdatedAt,e.isError,e.isPlaceholderData,e.isPreviousData])}function kE(e={}){let t=EE(e);return OE(t,e.searchParams),t}function AE({filter:e,search:t,all:n}){if(!n&&!e&&!t)throw Error(`Bulk operation requires a filter, search, or all flag`);let r={};return n&&(r.all=`true`),e&&(r.filter=e),t&&(r.search=t),r}var jE=p({method:`PUT`,path:()=>`/members/bulk/`,body:({action:e})=>({bulk:{action:e.type,meta:e.meta||{},newsletter:e.newsletter}}),searchParams:AE,invalidateQueries:{dataType:pE}}),ME=p({method:`DELETE`,path:()=>`/members/`,searchParams:AE,invalidateQueries:{dataType:pE}}),NE=()=>Wb({select:e=>e.navigation}),PE=()=>{let{mutateAsync:e}=Gb();return s({mutationFn:async t=>{await e({navigation:t})}})},FE=e=>{let{data:t}=NE(),{mutateAsync:n}=PE();return[t?.expanded[e]??!0,async r=>n({expanded:{...t?.expanded??Bb.expanded,[e]:r}})]},IE=(0,z.createContext)(void 0),LE=()=>{let e=(0,z.useContext)(IE);if(e===void 0)throw Error(`useAppContext must be used within an AppProvider`);return e},RE=({children:e,value:t})=>{let n=(0,z.useContext)(qt),r=t.externalNavigate??n?.externalNavigate;if(!r)throw Error(`External navigate function is required`);let i={externalNavigate:r,fromAnalytics:!1,...n,...t};return(0,B.jsx)(IE.Provider,{value:i,children:e})},zE=[{path:``,errorElement:(0,B.jsx)(Ce,{onBackToDashboard:()=>{}}),children:[{path:`posts/analytics/:postId`,lazy:async()=>{let[{default:e},{default:t}]=await Promise.all([N(()=>import(`./post-analytics-context-Dy17HR1_.js`).then(e=>e.t),__vite__mapDeps([48,1,2,4,49,42,8,11,43,50,5,6,51]),import.meta.url),N(()=>import(`./post-analytics-BhQUmZyA.js`),__vite__mapDeps([52,1,2,4,50,42,8,11,43,53,5,6,54,9,10,55,48,49,51,56]),import.meta.url)]);return{element:(0,B.jsx)(e,{children:(0,B.jsx)(t,{})})}},children:[{path:``,lazy:V(()=>N(()=>import(`./overview-Bhg8M7VS.js`),__vite__mapDeps([57,1,2,4,58,42,8,11,43,24,23,10,22,25,49,59,9,60,5,6,7,61,62,63,64,65,66,67,68,50,53,41,44,54,55,48,51,69,70,71,72,73,12,74,75,76,77,78,79,80,81,82,83,21,84]),import.meta.url))},{path:`web`,lazy:V(()=>N(()=>import(`./web-Cj8VEw3s.js`),__vite__mapDeps([85,1,2,4,58,42,8,11,43,24,23,10,22,25,49,59,9,53,5,6,7,86,87,88,89,90,68,50,60,41,44,54,55,48,51,69,70,71,72,73,12,91,83,21,78,67,62,63,64,65,84,81]),import.meta.url))},{path:`growth`,lazy:V(()=>N(()=>import(`./growth-IkQZ1ZV9.js`),__vite__mapDeps([76,1,2,4,59,58,42,8,11,43,24,23,10,22,25,49,9,77,78,5,6,7,68,50,53,60,41,44,54,55,48,51,69,70,71,72,12,79,80,81,75,82]),import.meta.url))},{path:`newsletter`,lazy:V(()=>N(()=>import(`./newsletter-BhuQeWFL.js`),__vite__mapDeps([92,1,2,42,8,4,11,43,21,22,23,10,24,25,9,59,58,49,50,60,5,6,7,61,62,63,64,65,66,68,53,41,44,54,55,48,51,69,70,71,72,73,93,80,75,82]),import.meta.url))}]},{path:`tags`,children:[{index:!0,lazy:V(()=>N(()=>import(`./tags-DjCsJo0X.js`),__vite__mapDeps([94,1,2,42,8,4,11,43,5,6,9,10,95,39,12,79,33,22,23,24,25,56,96]),import.meta.url))},{path:`:tagSlug`,element:null}]},{path:`comments`,lazy:V(()=>N(()=>import(`./comments-DgH1rC7w.js`),__vite__mapDeps([97,1,2,42,8,4,11,43,21,22,23,10,24,25,9,98,88,89,99,5,6,95,39,86,87,12,27,28,100,50,101,102,71,56,72,96]),import.meta.url))},{path:`automations`,children:[{index:!0,lazy:V(()=>N(()=>import(`./automations-DFLgH14-.js`),__vite__mapDeps([103,1,2,42,8,4,11,43,5,6,9,10,95,39,79,41,44,104,56]),import.meta.url))},{path:`:id`,handle:{hideAdminSidebar:!0},lazy:V(()=>N(()=>import(`./editor-u3BPqQed.js`),__vite__mapDeps([105,1,2,23,8,4,42,11,43,22,10,24,25,21,9,6,106,99,44,107,50,5,7,64,37,27,28,108,109,104,110]),import.meta.url))}]},{path:`*`,element:(0,B.jsx)(Ce,{onBackToDashboard:()=>{}})}]}],BE=Jy({name:fy(),route:fy(),color:fy().optional(),icon:fy().optional(),filter:tb(fy(),fy().nullable())});function VE(e){return e.trim().toLowerCase()}function HE(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1}function UE(e,t){return e.route===t.route&&HE(e.filter,t.filter)}function WE(e,t){return e.flatMap((e,n)=>UE(e,t)?[n]:[])}function GE(e,t,n){let r=VE(t.name);return e.some((e,i)=>i!==n&&e.route===t.route&&VE(e.name)===r)}function KE(e){try{let t=JSON.parse(e);return Array.isArray(t)?{ok:!0,views:t.flatMap(e=>{let t=BE.safeParse(e);return t.success?[t.data]:[]})}:(console.error(`Failed to parse shared_views setting:`,Error(`shared_views is not an array`)),{ok:!0,views:[]})}catch{return{ok:!1,error:Error(`shared_views JSON parse failed`)}}}function qE(e){return{midgrey:`#7C8B9A`,blue:`#14b8ff`,green:`#30cf43`,red:`#f50b23`,teal:`#4dcddc`,purple:`#8e42ff`,yellow:`#ffb41f`,orange:`#fe8b05`,pink:`#fb2d8d`}[e]||`#7C8B9A`}function JE(e){let{data:t}=Sp();return(0,z.useMemo)(()=>{let n=KE(kp(t?.settings,`shared_views`)??`[]`);return n.ok?e?n.views.filter(t=>t.route===e):n.views:(console.error(`Failed to parse shared_views setting:`,n.error),[])},[t,e])}function YE({views:e}){return e.length===0?null:(0,B.jsx)(B.Fragment,{children:e.map(e=>(0,B.jsxs)($.SubmenuItem,{to:e.to,isActive:e.isActive,title:e.name,children:[(0,B.jsx)($.Label,{className:e.color?`grow`:void 0,children:e.name}),e.color&&(0,B.jsx)(`span`,{className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:qE(e.color)},"data-color":e.color,"aria-hidden":`true`})]},e.key))})}function XE(e=`posts`){let t=Fl(),n=JE(e);return(0,z.useMemo)(()=>n.map(n=>{let r=t.getRouteUrl(e,n.filter);return{key:r,name:n.name,to:r,isActive:t.isRouteActive(e,n.filter),color:n.color}}),[e,t,n])}function ZE({route:e=`posts`}){return(0,B.jsx)(YE,{views:XE(e)})}function QE(e){return e.route===`members`&&typeof e.filter.filter==`string`&&e.filter.filter.length>0}function $E(e){return`members?${new URLSearchParams({filter:e}).toString()}`}function eD(e,t,n){return e===`/members`?new URLSearchParams(t).get(`filter`)===n:!1}function tD(){let e=F(),t=JE(`members`);return(0,z.useMemo)(()=>t.filter(QE).map(t=>({key:`${t.name}:${t.filter.filter}`,name:t.name,to:$E(t.filter.filter),isActive:eD(e.pathname,e.search,t.filter.filter)})),[e.pathname,e.search,t])}function nD(){return(0,B.jsx)(YE,{views:tD()})}var rD=e=>{let{data:t}=ia();return t?.config.labs?.[e]??!1},iD=[`member`,`member.new`,`members-activity`];function aD({isActive:e,to:t}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)($.Link,{to:t,isActive:e,children:[(0,B.jsx)(rt,{className:`pointer-events-none opacity-0 transition-all sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0 sidebar:group-has-[button:focus-visible]/menu-item:opacity-0`}),(0,B.jsx)($.Label,{children:`Posts`})]}),(0,B.jsx)(`a`,{href:`#/editor/post`,"aria-label":`Create new post`,className:`absolute top-0 right-0 flex size-8 items-center justify-center rounded-full p-0 text-gray-700 ring-sidebar-ring outline-hidden transition-all hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 dark:text-gray-800 dark:hover:text-white`,children:(0,B.jsx)($e,{size:20,className:`mt-px stroke-[1.5px]!`})})]})}function oD({collapsible:e,count:t,isActive:n,to:r}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)($.Link,{to:r,isActive:n,children:[(0,B.jsx)(kt,{className:e?`pointer-events-none opacity-0 transition-all sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0 sidebar:group-has-[button:focus-visible]/menu-item:opacity-0`:``}),(0,B.jsx)($.Label,{children:`Members`})]}),t!=null&&(0,B.jsx)(mp,{children:Qe(t)})]})}function sD({...e}){let{data:t}=u(),{data:n}=Sp(),[r,i]=FE(`posts`),[a,o]=FE(`members`),s=XE(`posts`),c=tD(),l=c.length>0,d=yE(),f=Fl(),p=rD(`automations`),m=nE({path:`members`,activeOnSubpath:!0}),h=t&&Lt(t),g=t&&zt(t),_=t&&Ht(t),v=kp(n?.settings,`comments_enabled`),y=!!g&&v!==`off`,b=f.isRouteActive(`posts`,{type:`draft`}),x=f.isRouteActive(`posts`,{type:`scheduled`}),S=f.isRouteActive(`posts`,{type:`published`}),C=b||x||S||s.some(e=>e.isActive),w=r,T=l&&c.some(e=>e.isActive),E=a,D=m?!T||!E:f.isRouteActive(iD),O=f.getRouteUrl(`posts`),ee=f.isRouteActive(`posts`)||!w&&C;return(0,B.jsx)(ap,{...e,children:(0,B.jsx)(cp,{children:(0,B.jsxs)(lp,{children:[(0,B.jsxs)($.Collapsible,{expanded:w,id:`posts-submenu`,onExpandedChange:i,children:[(0,B.jsx)($.CollapsibleItem,{ariaLabel:`Toggle post views`,children:(0,B.jsx)(aD,{isActive:ee,to:O})}),(0,B.jsxs)($.CollapsibleMenu,{children:[(0,B.jsx)($.SubmenuItem,{to:`posts?type=draft`,isActive:b,children:(0,B.jsx)($.Label,{children:`Drafts`})}),(0,B.jsx)($.SubmenuItem,{to:`posts?type=scheduled`,isActive:x,children:(0,B.jsx)($.Label,{children:`Scheduled`})}),(0,B.jsx)($.SubmenuItem,{to:`posts?type=published`,isActive:S,children:(0,B.jsx)($.Label,{children:`Published`})}),(0,B.jsx)(ZE,{})]})]}),(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:f.getRouteUrl(`pages`),isActive:f.isRouteActive(`pages`),children:[(0,B.jsx)(Le,{}),(0,B.jsx)($.Label,{children:`Pages`})]})}),h&&(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`tags`,activeOnSubpath:!0,children:[(0,B.jsx)(Ee,{}),(0,B.jsx)($.Label,{children:`Tags`})]})}),g&&(0,B.jsx)(B.Fragment,{children:l?(0,B.jsxs)($.Collapsible,{expanded:E,id:`members-submenu`,onExpandedChange:o,children:[(0,B.jsx)($.CollapsibleItem,{ariaLabel:`Toggle member views`,children:(0,B.jsx)(oD,{collapsible:!0,count:d,isActive:D,to:`members`})}),(0,B.jsx)($.CollapsibleMenu,{children:(0,B.jsx)(nD,{})})]}):(0,B.jsx)($,{children:(0,B.jsx)(oD,{collapsible:!1,count:d,isActive:D,to:`members`})})}),y&&(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`comments`,activeOnSubpath:!0,children:[(0,B.jsx)(ht,{}),(0,B.jsx)($.Label,{children:`Comments`})]})}),_&&p&&(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`automations`,activeOnSubpath:!0,children:[(0,B.jsx)(gt,{}),(0,B.jsx)($.Label,{children:`Automations`})]})})]})})})}function cD({...e}){let{data:t}=u(),{data:n}=ia(),{isAvailable:r,openFeedbackWidget:i,preloadFeedbackWidget:a}=ma();if(!t)return null;let o=n?.config.hostSettings?.billing?.enabled&&Rt(t),s=r&&!Bt(t);return!o&&!s?null:(0,B.jsx)(ap,{...e,children:(0,B.jsx)(cp,{children:(0,B.jsxs)(lp,{children:[o&&(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`pro`,children:[(0,B.jsx)(wt,{}),(0,B.jsx)($.Label,{children:`Ghost(Pro)`})]})}),s&&(0,B.jsx)($,{children:(0,B.jsxs)($.Button,{onClick:i,onMouseEnter:a,onFocus:a,children:[(0,B.jsx)(Nt,{}),(0,B.jsx)($.Label,{children:`Feedback`})]})})]})})})}function lD({...e}){let{data:t}=u(),n=t&&Wt(t);return(0,B.jsx)(ap,{...e,children:(0,B.jsx)(cp,{children:(0,B.jsxs)(lp,{children:[n&&(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`settings`,children:[(0,B.jsx)(Re,{}),(0,B.jsx)($.Label,{children:`Settings`})]})}),(0,B.jsx)($,{children:(0,B.jsxs)($.Link,{to:`https://ghost.org/help?utm_source=admin&utm_campaign=help`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,B.jsx)(bt,{}),(0,B.jsx)($.Label,{children:`Help`})]})})]})})})}function uD(){let{banner:e,bannerType:t}=Wx(),n=``;return t===`theme-errors`?n=`pb-[110px]`:t===`upgrade`?n=`pb-[254px]`:t===`whats-new`&&(n=`pb-[180px]`),(0,B.jsxs)(ip,{className:`justify-between px-3 pt-4 pb-1`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2 sidebar:gap-4`,children:[(0,B.jsx)(fE,{}),(0,B.jsx)(sD,{}),(0,B.jsx)(cD,{})]}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2 sidebar:gap-4 ${n}`,children:[(0,B.jsx)(Kx,{banner:e}),(0,B.jsx)(lD,{className:`pb-0`})]})]})}function dD({...e}){return(0,B.jsxs)(Xf,{...e,children:[(0,B.jsx)(zp,{className:`px-5 pt-5 pb-0`}),(0,B.jsx)(uD,{}),(0,B.jsx)(Gx,{className:`gap-0 p-3`})]})}var fD=1.5;function pD({to:e,activeOnSubpath:t=!1,children:n,...r}){let i=nE({path:e,activeOnSubpath:t}),a=`#/${e?.replace(/^\/?#\//,``)}`;return(0,B.jsx)(R,{asChild:!0,className:`w-full max-w-16 min-w-9 rounded-full hover:bg-sidebar-accent hover:text-sidebar-accent-foreground ${i?`bg-sidebar-accent text-sidebar-accent-foreground`:`bg-transparent`}`,...r,variant:`ghost`,size:`icon`,"data-active":i,children:(0,B.jsx)(`a`,{href:a,children:n})})}function mD(){let{isMobile:e}=Jf(),t=bp();return!e||!t?(0,B.jsx)(B.Fragment,{}):(0,B.jsx)(`div`,{className:`safe-area-inset-bottom fixed right-0 bottom-0 left-0 z-50 h-[var(--mobile-navbar-height)] border-t border-sidebar-border bg-sidebar/80 backdrop-blur-md sidebar:hidden`,children:(0,B.jsxs)(`div`,{className:`mx-auto grid h-full w-full max-w-[300px] grid-cols-4 items-center justify-items-center px-5`,children:[(0,B.jsxs)(pD,{activeOnSubpath:!0,to:`analytics`,children:[(0,B.jsx)(it,{strokeWidth:fD}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Analytics`})]}),(0,B.jsxs)(pD,{activeOnSubpath:!0,to:`posts`,children:[(0,B.jsx)(rt,{strokeWidth:fD}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Posts`})]}),(0,B.jsxs)(pD,{activeOnSubpath:!0,to:`members`,children:[(0,B.jsx)(kt,{strokeWidth:fD}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Members`})]}),(0,B.jsxs)(Zf,{className:`h-9 rounded-full px-8 hover:bg-transparent`,children:[(0,B.jsx)(Te,{strokeWidth:fD}),(0,B.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})]})})}function hD({children:e}){let{data:t}=u(),n=bp();return t&&Bt(t)?(0,B.jsxs)(`div`,{className:`relative h-full bg-background`,children:[(0,B.jsx)(`main`,{className:`flex h-full flex-col overflow-y-auto`,children:(0,B.jsx)(`div`,{className:`flex-1`,children:e})}),(0,B.jsx)(`div`,{className:`fixed bottom-3.5 left-3.5 z-20 lg:bottom-8 lg:left-8`,children:(0,B.jsx)(_x,{})})]}):(0,B.jsxs)(Yf,{open:!!t&&n,children:[n&&(0,B.jsx)(dD,{}),(0,B.jsxs)($f,{className:`overflow-y-auto bg-background sidebar:max-h-full ${n?`max-h-[calc(100%-var(--mobile-navbar-height))]`:`max-h-full`}`,children:[(0,B.jsx)(`main`,{className:`flex-1`,children:e}),(0,B.jsx)(mD,{})]})]})}function gD(){let{data:e}=u();return Ol(),Dl(),(0,B.jsx)(Sl,{children:e?(0,B.jsxs)(hD,{children:[(0,B.jsx)(I,{}),(0,B.jsx)(xl,{})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Cl,{}),(0,B.jsx)(xl,{})]})})}var _D=(0,z.createContext)(void 0),vD=()=>{let e=(0,z.useContext)(_D);if(e===void 0)throw Error(`useAnalytics must be used within an AnalyticsProvider`);return e},yD={today:{name:`Today`,value:1},last7Days:{name:`Last 7 days`,value:7},last30Days:{name:`Last 30 days`,value:31},last3Months:{name:`Last 90 days`,value:91},yearToDate:{name:`Year to date`,value:-1},last12Months:{name:`Last 12 months`,value:372},allTime:{name:`All time`,value:1e3}},bD=Object.values(yD),xD={GB:`United Kingdom`,KR:`South Korea`,LA:`Laos`,MD:`Moldova`,SY:`Syria`,"mobile-ios":`iOS`,"mobile-android":`Android`,macos:`macOS`,"google.com":`Google`,"ghost.org":`Ghost`,"bing.com":`Bing`,"bsky.app":`Bluesky`,"yahoo.com":`Yahoo`,"duckduckgo.com":`DuckDuckGo`,unknown:`Unknown`,Others:`Unknown`,Other:`Unknown`,NULL:`Unknown`,ᴺᵁᴸᴸ:`Unknown`},SD=[`NULL`,`ᴺᵁᴸᴸ`,``,`Others`,`Other`],CD=`https://static.ghost.org/v5.0.0/images/globe-icon.svg`,wD={PUBLIC:1,FREE:2,PAID:4},TD=wD.PUBLIC|wD.FREE|wD.PAID,ED=[{name:`Public visitors`,value:`undefined`,bit:wD.PUBLIC},{name:`Free members`,value:`free`,bit:wD.FREE},{name:`Paid members`,value:`paid`,bit:wD.PAID}],DD=({children:e})=>{let[t,n]=(0,z.useState)(bD[2].value),[r,i]=(0,z.useState)(null);return(0,B.jsx)(_D.Provider,{value:{range:t,setRange:n,selectedNewsletterId:r,setSelectedNewsletterId:i},children:e})},OD=[{index:!0,lazy:V(()=>N(()=>import(`./Overview-BgM7o-Z8.js`),__vite__mapDeps([111,1,2,4,58,42,8,11,43,24,23,10,22,25,49,59,9,50,53,60,7,5,6,67,62,63,64,65,12,112,90,88,89,80,113,77,74,114,54,55]),import.meta.url))},{path:`web`,lazy:V(()=>N(()=>import(`./Web-DRv-83Ow.js`),__vite__mapDeps([115,1,2,4,21,22,23,10,24,25,9,11,58,42,8,43,49,59,53,78,5,6,7,67,62,63,64,65,86,87,88,89,73,12,91,93,112,90,80,84,116,114]),import.meta.url))},{path:`growth`,lazy:V(()=>N(()=>import(`./Growth-Dx0vv-BS.js`),__vite__mapDeps([117,1,2,4,11,21,22,23,10,24,25,9,59,58,42,8,43,49,77,78,5,6,7,62,63,64,65,66,67,118,79,90,88,89,12,119,44,112,80,113,84,116,114,120]),import.meta.url))},{path:`newsletters`,lazy:V(()=>N(()=>import(`./Newsletters-v1GnbUjW.js`),__vite__mapDeps([121,1,2,4,21,22,23,10,24,25,9,11,59,58,42,8,43,49,5,6,7,63,62,64,65,67,118,79,90,88,89,12,109,44,112,80,84]),import.meta.url))}],kD=()=>{let{data:e,isError:t,isLoading:n}=u();return e?(0,B.jsx)(we,{replace:!0,to:`/settings/staff/${e.slug}`}):t||!n?(0,B.jsx)(we,{replace:!0,to:`/`}):null},AD=(0,z.lazy)(()=>N(()=>import(`./gift-link-modal-CSgyxenA.js`).then(e=>e.n),__vite__mapDeps([69,1,2,42,8,4,11,43,58,24,23,10,22,25,49,50,53,9,55,70,51,71]),import.meta.url));function jD(){let[e,t]=(0,z.useState)(null),[n,r]=(0,z.useState)(!1);return(0,z.useEffect)(()=>Al(e=>{t(e),r(!0)}),[]),e?(0,B.jsx)(z.Suspense,{fallback:null,children:(0,B.jsx)(AD,{open:n,postId:e.id,resource:e.resource,source:`context-menu`,onOpenChange:r},`${e.resource}:${e.id}`)}):null}function MD(){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Cl,{}),(0,B.jsx)(jD,{})]})}function ND(){let{data:e,isError:t,isLoading:n}=u();return e?zt(e)?(0,B.jsx)(I,{}):(0,B.jsx)(we,{replace:!0,to:`/`}):t||!n?(0,B.jsx)(we,{replace:!0,to:`/`}):null}var PD=[{description:`Craft a look that reflects your brand and style.`,icon:He,id:`customize-design`,route:`/settings/design/edit?ref=setup`,title:`Customize your design`},{description:`Get to know a writing experience you'll love.`,icon:rt,id:`first-post`,route:`/editor/post`,title:`Explore the editor`},{description:`Add members and grow your readership.`,icon:xt,id:`build-audience`,route:`/members`,title:`Build your audience`},{description:`Expand your reach on social media.`,icon:Pt,id:`share-publication`,route:void 0,title:`Share your publication`}],FD=new Date(`2026-04-30T00:00:00.000Z`);function ID(e){return e?e>=FD:!1}function LD(){let{data:e,isLoading:t}=u(),{data:n,isLoading:r}=Wb(),{mutateAsync:i}=Gb(),a=(0,z.useRef)(!1),o=(0,z.useMemo)(()=>n?.onboarding.completedSteps||[],[n?.onboarding.completedSteps]),s=(0,z.useMemo)(()=>new Set(o),[o]),c=n?.onboarding.checklistState||`pending`,l=n?.onboarding.startedAt,d=ID(l),f=e?Rt(e):!1,p=f&&c===`started`&&d,m=PD.find(e=>!s.has(e.id))?.id,h=PD.every(e=>s.has(e.id)),g=(0,z.useCallback)(e=>i({onboarding:e}),[i]),_=(0,z.useCallback)(async e=>{s.has(e)||await g({completedSteps:[...o,e]})},[s,o,g]),v=(0,z.useCallback)(()=>g({checklistState:`dismissed`}),[g]);(0,z.useEffect)(()=>{t||r||!f||c!==`started`||d||a.current||(a.current=!0,v().catch(e=>{a.current=!1,console.error(e)}))},[c,v,d,f,r,t]);let y=(0,z.useCallback)(()=>g({completedSteps:[],checklistState:`started`,startedAt:new Date}),[g]);return{allStepsCompleted:h,checklistState:c,completeChecklist:(0,z.useCallback)(()=>g({checklistState:`completed`}),[g]),completedSteps:o,dismissChecklist:v,hasActiveStartedAt:d,isOwner:f,shouldShowChecklist:p,isLoading:t||r,markStepCompleted:_,nextStep:m,startChecklist:y}}function RD({children:e}){let t=F(),n=LD();if(n.isLoading)return null;if(n.shouldShowChecklist){let e=`${t.pathname}${t.search}`;return(0,B.jsx)(we,{replace:!0,to:`/setup/onboarding?returnTo=${encodeURIComponent(e)}`})}return e}function zD(){return(0,B.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`h1`,{className:`text-2xl font-bold`,children:`404`}),(0,B.jsx)(`span`,{className:`text-grey-500`,"aria-hidden":`true`,children:`|`}),(0,B.jsx)(`h2`,{className:`text-lg text-grey-700`,children:`Page not found`})]})})}var BD=[`/`,`/dashboard`,`/site`,`/launch`,`/setup`,`/signin/*`,`/signout`,`/signup/*`,`/reset/*`,`/pro/*`,`/posts/analytics/:postId/mentions`,`/posts/analytics/:postId/debug`,`/restore`,`/editor/*`,`/tags/new`,`/explore/*`,`/migrate/*`,`/members/new`,`/members/:member_id`,`/members-activity`,`/designsandbox`,`/mentions`],VD={allowInForceUpgrade:!0},HD=BD.map(e=>({path:e,Component:Cl,handle:VD})),UD={path:`/members`,element:(0,B.jsx)(ND,{}),handle:VD,children:[{index:!0,lazy:V(()=>N(()=>import(`./members-PNNhalbu.js`),__vite__mapDeps([122,1,2,42,8,4,11,43,99,107,44,50,5,6,7,9,10,95,39,86,23,24,22,25,87,88,89,90,123,65,12,108,79,41,109,119,100,101,102,71,56,72,82,96]),import.meta.url))},{path:`import`,lazy:V(()=>N(()=>import(`./members-PNNhalbu.js`),__vite__mapDeps([122,1,2,42,8,4,11,43,99,107,44,50,5,6,7,9,10,95,39,86,23,24,22,25,87,88,89,90,123,65,12,108,79,41,109,119,100,101,102,71,56,72,82,96]),import.meta.url))}]},WD=[{element:(0,B.jsx)(Ll,{}),children:[{path:`/tags/:tagSlug`,Component:Cl,handle:VD},UD,{element:(0,B.jsx)(RE,{value:{fromAnalytics:!0},children:(0,B.jsx)(I,{})}),children:zE[0].children.filter(e=>e.path!==`*`)},{path:`analytics`,element:(0,B.jsx)(RD,{children:(0,B.jsx)(DD,{children:(0,B.jsx)(I,{})})}),children:OD},{path:`setup/onboarding`,lazy:V(()=>N(()=>import(`./onboarding-route-BDaa9hd3.js`),__vite__mapDeps([124,1,2,4,5,6,7,8,9,10,11,55]),import.meta.url))},{path:`network`,loader:()=>me(`/activitypub`)},{path:`my-profile`,Component:kD,handle:{allowInForceUpgrade:!0}},{path:``,element:(0,B.jsx)(Yx,{children:(0,B.jsx)(I,{})}),children:eE},{path:`settings/*`,lazy:V(()=>N(()=>import(`./settings-CIslWMfh.js`),__vite__mapDeps([125,1,2,23,8,4,42,11,43,10,22,126,127,128,129,21,24,25,9,88,6,102,87,89,130,106,99,44,107,50,53,41,109,119,90,123,65,29,33,120,70]),import.meta.url)),handle:{allowInForceUpgrade:!0}},{path:`/posts`,Component:MD,handle:VD},{path:`/pages`,Component:MD,handle:VD},...HD,{path:`*`,Component:zD}]}],GD=[`http:`,`https:`,`mailto:`,`tel:`];function KD(e){if(e.match(/^[a-z]+:/i))try{let t=new URL(e);return GD.includes(t.protocol)?(window.location.href=e,!0):!1}catch{let t=e.startsWith(`/`)?e:`/${e}`;return window.location.hash=t,!0}else{let t=e.startsWith(`/`)?e:`/${e}`;return window.location.hash=t,!0}}function qD({children:e}){let{data:t}=Sp();return(0,B.jsx)(Jt,{appSettings:(0,z.useMemo)(()=>{if(!t?.settings)return;let e=t.settings;return{paidMembersEnabled:kp(e,`paid_members_enabled`)??!1,newslettersEnabled:kp(e,`editor_default_email_recipients`)!==`disabled`,analytics:{emailTrackOpens:kp(e,`email_track_opens`)??!1,emailTrackClicks:kp(e,`email_track_clicks`)??!1,membersTrackSources:kp(e,`members_track_sources`)??!1,outboundLinkTagging:kp(e,`outbound_link_tagging`)??!1,webAnalytics:kp(e,`web_analytics_enabled`)??!1}}},[t]),children:e})}(0,Kt.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(z.StrictMode,{children:(0,B.jsx)(o,{ghostVersion:``,externalNavigate:e=>{KD(e.route)},unsplashConfig:{Authorization:`Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`,"Accept-Version":`v1`,"Content-Type":`application/json`,"App-Pragma":`no-cache`,"X-Unsplash-Cache":!0},sentryDSN:null,onUpdate:(e,t)=>{window.EmberBridge?.state.onUpdate(e,t)},onInvalidate:e=>{window.EmberBridge?.state.onInvalidate(e)},onDelete:(e,t)=>{window.EmberBridge?.state.onDelete(e,t)},children:(0,B.jsx)(be,{prefix:`/`,routes:WD,children:(0,B.jsx)(qD,{children:(0,B.jsx)(Do,{className:`shade-admin`,darkMode:!1,fetchKoenigLexical:null,children:(0,B.jsx)(gD,{})})})})})}));export{MC as $,Bu as $n,Co as $r,Py as $t,VT as A,En as Ai,H as An,cl as Ar,rC as At,wT as B,jd as Bn,ec as Br,Ax as Bt,wE as C,Gr as Ci,Nf as Cn,Ul as Cr,yC as Ct,XT as D,er as Di,Ef as Dn,ol as Dr,nC as Dt,QT as E,ir as Ei,Tf as En,Yl as Er,RS as Et,ET as F,Yt as Fi,zd as Fn,Ys as Fr,tS as Ft,dT as G,Dd as Gn,rc as Gr,Cx as Gt,vT as H,Ed as Hn,$s as Hr,jx as Ht,TT as I,Xt as Ii,Rd as In,oc as Ir,eS as It,rT as J,Uu as Jn,sc as Jr,Ox as Jt,lT as K,kd as Kn,Js as Kr,Ex as Kt,kT as L,Gt as Li,Id as Ln,tc as Lr,$x as Lt,LT as M,on as Mi,Ud as Mn,_l as Mr,hS as Mt,NT as N,rn as Ni,Hd as Nn,vl as Nr,dS as Nt,ZT as O,nr as Oi,wf as On,ml as Or,mC as Ot,AT as P,nn as Pi,Bd as Pn,sl as Pr,sS as Pt,aT as Q,zu as Qn,Eo as Qr,Yy as Qt,DT as R,Fd as Rn,Zs as Rr,kx as Rt,jE as S,Kr as Si,If as Sn,pu as Sr,pC as St,CE as T,tr as Ti,Of as Tn,Zl as Tr,IS as Tt,pT as U,Ad as Un,Xs as Ur,Tx as Ut,bT as V,Md as Vn,ic as Vr,Nx as Vt,fT as W,Od as Wn,nc as Wr,wx as Wt,oT as X,Vu as Xn,cc as Xr,xx as Xt,nT as Y,Hu as Yn,lc as Yr,bx as Yt,iT as Z,Lu as Zn,zo as Zr,ab as Zt,xE as _,Fi as _i,Cp as _n,_u as _r,sC as _t,ED as a,Ca as ai,Dm as an,Eu as ar,QS as at,kE as b,Ni as bi,Df as bn,vu as br,uC as bt,yD as c,ma as ci,Np as cn,ju as cr,LS as ct,vD as d,aa as di,kp as dn,Ou as dr,wC as dt,ro as ei,Jy as en,Ru as er,DC as et,WE as f,sa as fi,Op as fn,Du as fr,CC as ft,LE as g,Wi as gi,Tp as gn,hu as gr,oC as gt,BE as h,Ki as hi,Sp as hn,fu as hr,vC as ht,wD as i,Sa as ii,Pm as in,Fu as ir,$S as it,UT as j,mn as ji,Sf as jn,pl as jr,vS as jt,YT as k,Dn as ki,Cf as kn,fl as kr,US as kt,bD as l,ra as li,Mp as ln,Cu as lr,jS as lt,KE as m,Hi as mi,Ap as mn,ku as mr,SC as mt,PD as n,ba as ni,fy as nn,Iu as nr,eC as nt,CD as o,wa as oi,Fp as on,wu as or,iC as ot,GE as p,ia as pi,Dp as pn,Tu as pr,cC as pt,sT as q,Cd as qn,ac as qr,Dx as qt,TD as r,xa as ri,Mm as rn,Nu as rr,tC as rt,xD as s,ya as si,Pp as sn,Au as sr,FS as st,LD as t,za as ti,tb as tn,Pu as tr,hC as tt,SD as u,oa as ui,jp as un,Mu as ur,MS as ut,bE as v,ji as vi,wp as vn,xu as vr,fC as vt,TE as w,Wr as wi,Ff as wn,tu as wr,bC as wt,ME as x,qr as xi,Mf as xn,bu as xr,aC as xt,_E as y,Mi as yi,Ep as yn,yu as yr,lC as yt,OT as z,Sd as zn,Qs as zr,Mx as zt};
|