ghost 6.25.0 → 6.25.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-i18n-6.25.1.tgz +0 -0
- package/components/{tryghost-parse-email-address-6.25.0.tgz → tryghost-parse-email-address-6.25.1.tgz} +0 -0
- package/core/built/admin/assets/{PolarAngleAxis-BNo3yZOE.js → PolarAngleAxis-C6ZeSpZB.js} +1 -1
- package/core/built/admin/assets/{_baseAssignValue-DwWJd_kU.js → _baseAssignValue-BKAl5FrV.js} +1 -1
- package/core/built/admin/assets/{a-large-small-DzN0AB7t.js → a-large-small-B_ulQCIs.js} +1 -1
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{code-editor-view-De3K_osj.mjs → code-editor-view-CBYT1gA1.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-bGxDzD13.mjs → index-CN5CixaU.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-5D8KqsFU.mjs → index-CPQODntW.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-BIUDn7ot.mjs → index-CgTfOd7g.mjs} +9 -9
- package/core/built/admin/assets/admin-x-settings/{modals-DuokUyAH.mjs → modals-_y-6HROx.mjs} +2 -2
- package/core/built/admin/assets/{at-sign-vqoOA4VZ.js → at-sign-B8xWKM0y.js} +1 -1
- package/core/built/admin/assets/{audience-CFjVlFTu.js → audience-CBOR--z9.js} +1 -1
- package/core/built/admin/assets/{avatar-flipboard-DuTJ0ty5.js → avatar-flipboard-IipGb_wZ.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-C1WkXrRJ.js → bluesky-sharing-CkI1QuAm.js} +1 -1
- package/core/built/admin/assets/{chart-Bs2L1q8g.js → chart-_slUcr-K.js} +1 -1
- package/core/built/admin/assets/{chunk.524.ed5714f505e821e549f3.js → chunk.524.5b9b463506a16221fc91.js} +6 -6
- package/core/built/admin/assets/{chunk.582.639cecaca9e77bd7dd4f.js → chunk.582.d8eae1661d753befaefd.js} +7 -7
- package/core/built/admin/assets/{chunk.603.5cb992da88800a9388f3.js → chunk.630.3dbb0231a2d871126a80.js} +4 -4
- package/core/built/admin/assets/{code-editor-view-DIH4grxv.js → code-editor-view-BWMqr2JV.js} +1 -1
- package/core/built/admin/assets/comments-BeoA0nfK.js +1 -0
- package/core/built/admin/assets/{content-helpers-Cr_DHEOl.js → content-helpers-CmTGdEmL.js} +1 -1
- package/core/built/admin/assets/{copy-w3c9zkaZ.js → copy-CDHcAPJw.js} +1 -1
- package/core/built/admin/assets/{data-list-D-K_XfF3.js → data-list-Crb1ffbp.js} +1 -1
- package/core/built/admin/assets/{deleted-feed-item-DK47iaMV.js → deleted-feed-item-DBW0zJQg.js} +1 -1
- package/core/built/admin/assets/{dropzone-BHWXAN0m.js → dropzone-B9JUsQlW.js} +3 -3
- package/core/built/admin/assets/{edit-profile-DCyHhZgx.js → edit-profile-Dz-IhetN.js} +1 -1
- package/core/built/admin/assets/{empty-indicator-DjmACVr2.js → empty-indicator-2QGnEbtY.js} +1 -1
- package/core/built/admin/assets/{en-Cl0b7CNW.js → en-BRQS1Z8j.js} +1 -1
- package/core/built/admin/assets/{feed-C5AauoXf.js → feed-T3kW9UJA.js} +1 -1
- package/core/built/admin/assets/filters-ChOMQQZW.js +1 -0
- package/core/built/admin/assets/{gh-chart-xjwu2HZo.js → gh-chart-fuWw60Ka.js} +1 -1
- package/core/built/admin/assets/{growth-DDyypj0q.js → growth-D9sCnmon.js} +1 -1
- package/core/built/admin/assets/{hash-Bowe71Lt.js → hash-CI1pQ1UC.js} +1 -1
- package/core/built/admin/assets/header-OevT95FI.js +1 -0
- package/core/built/admin/assets/{inbox-DS4qMjUb.js → inbox-DYY8-M1K.js} +1 -1
- package/core/built/admin/assets/{index-A6WmqYr6.js → index-8CZdLQzu.js} +1 -1
- package/core/built/admin/assets/{index-6Ag8SK_E.js → index-BDAOs7pI.js} +1 -1
- package/core/built/admin/assets/{index-B_XhekWb.js → index-BEEgMX-_.js} +1 -1
- package/core/built/admin/assets/index-BbveDn8H.css +1 -0
- package/core/built/admin/assets/{index-CfpTfwls.js → index-C-Cpbee5.js} +1 -1
- package/core/built/admin/assets/{index-4xuWCs9h.js → index-CCF2RKxR.js} +12 -12
- package/core/built/admin/assets/{index-JMWMnGGt.js → index-CEnfjH5h.js} +3 -3
- package/core/built/admin/assets/{index-N61Xkr32.js → index-CcFVbffG.js} +1 -1
- package/core/built/admin/assets/{index-CZK1A375.js → index-CyMlhfZJ.js} +1 -1
- package/core/built/admin/assets/{index-CFY2MOp4.js → index-DBZYUfjO.js} +1 -1
- package/core/built/admin/assets/{index-C8ssgmjI.js → index-DJa3pLmx.js} +1 -1
- package/core/built/admin/assets/{index-SDMWxO5r.js → index-DVqmhe-L.js} +1 -1
- package/core/built/admin/assets/{index-BCvRITTU.js → index-DW5aEj6O.js} +2 -2
- package/core/built/admin/assets/{index-CVvW6Q-y.js → index-DcFgRUSN.js} +1 -1
- package/core/built/admin/assets/{index-DX6vaEVx.js → index-DjgsxHeB.js} +1 -1
- package/core/built/admin/assets/{index-B8XuCPIT.js → index-mqQc8MVd.js} +1 -1
- package/core/built/admin/assets/{index-DqlHFtZD.js → index-qQZsxgFE.js} +1 -1
- package/core/built/admin/assets/{koenig-lexical-DL3I-AcK.js → koenig-lexical-CsbE6fpi.js} +1 -1
- package/core/built/admin/assets/kpis-Dw04ruBN.js +1 -0
- package/core/built/admin/assets/{label-DBwnwMrX.js → label-tBvn89sm.js} +1 -1
- package/core/built/admin/assets/{links-CnjcW0lg.js → links-Do4jcjIh.js} +1 -1
- package/core/built/admin/assets/{loader-circle-CGDGFypO.js → loader-circle-C8exRUku.js} +4 -4
- package/core/built/admin/assets/{lucide-react-BfVLf4Hw.js → lucide-react-4VO5Dwow.js} +1 -1
- package/core/built/admin/assets/{main-layout-C_UH037j.js → main-layout-BAqXRgAx.js} +1 -1
- package/core/built/admin/assets/{member-route-CKuE9uDU.js → member-route-D4n-RbQd.js} +1 -1
- package/core/built/admin/assets/members-DRLgwCgJ.js +15 -0
- package/core/built/admin/assets/{message-square-text-BDJyLbG2.js → message-square-text-CC_1bY-Q.js} +5 -5
- package/core/built/admin/assets/{minus-BM0xhFIQ.js → minus-DSyx9DCe.js} +1 -1
- package/core/built/admin/assets/{modals-B6ZySU0x.js → modals-AryZr_DA.js} +1 -1
- package/core/built/admin/assets/{moderation-CQMIGpv1.js → moderation-DwKm9LO-.js} +1 -1
- package/core/built/admin/assets/{newsletter-Dexg7vU8.js → newsletter-C0rydPGS.js} +1 -1
- package/core/built/admin/assets/{newsletters-CT4k07rm.js → newsletters-DKdmxfDG.js} +1 -1
- package/core/built/admin/assets/{note-CiemurXq.js → note-996Zos9G.js} +1 -1
- package/core/built/admin/assets/{overview-9TwqfzGq.js → overview-r17hlWAB.js} +1 -1
- package/core/built/admin/assets/{pagemenu-Dq744OgH.js → pagemenu-DzpB1AkZ.js} +17 -17
- package/core/built/admin/assets/{post-analytics-CcRhLDKA.js → post-analytics-AwufPVFE.js} +1 -1
- package/core/built/admin/assets/{post-analytics-context-COgn3d86.js → post-analytics-context-GFe0lMc-.js} +1 -1
- package/core/built/admin/assets/{post-analytics-header-DtBp2QSX.js → post-analytics-header-DmGyNvP9.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-BlOEKX3-.js → post-share-modal-CTpdCS2X.js} +1 -1
- package/core/built/admin/assets/posts/{comments-C4rwkXWy.mjs → comments-Cvt31uBs.mjs} +32 -31
- package/core/built/admin/assets/posts/{dialog-Chkt119L.mjs → dialog-DaViJlnd.mjs} +3 -3
- package/core/built/admin/assets/posts/{dropdown-menu-CvSs_ay2.mjs → dropdown-menu-B4KGMiRI.mjs} +5 -5
- package/core/built/admin/assets/posts/{empty-indicator-GyeO28CG.mjs → empty-indicator-BaD6pCXM.mjs} +2 -2
- package/core/built/admin/assets/posts/{filters-BD3A2GlB.mjs → filters-BsCI4RJg.mjs} +11 -7
- package/core/built/admin/assets/posts/{get-site-timezone-Baeue4hE.mjs → get-site-timezone-Bo-iI2bI.mjs} +2 -2
- package/core/built/admin/assets/posts/{growth-kmVbKjBt.mjs → growth-BJxIDp2o.mjs} +14 -14
- package/core/built/admin/assets/posts/header-7zhnErbb.mjs +100 -0
- package/core/built/admin/assets/posts/{heading-DV_WQJh4.mjs → heading-BCDx_eVF.mjs} +2 -2
- package/core/built/admin/assets/posts/{hooks-DQhsid0U.mjs → hooks-DQL2O_El.mjs} +2 -2
- package/core/built/admin/assets/posts/{index-CVum5OE6.mjs → index-0mEgtljt.mjs} +3 -3
- package/core/built/admin/assets/posts/{index-Bl1ReYmV.mjs → index-BTzJVQ6S.mjs} +10 -10
- package/core/built/admin/assets/posts/{input-C7qFEkmt.mjs → input-DaHXv92f.mjs} +2 -2
- package/core/built/admin/assets/posts/{kpis-DteuJY-D.mjs → kpis-GRsx6fPV.mjs} +10 -10
- package/core/built/admin/assets/posts/{links-eoZr0T0x.mjs → links-B1q_pqE9.mjs} +4 -4
- package/core/built/admin/assets/posts/{loading-indicator-Dj1SCL40.mjs → loading-indicator-DiYqXomj.mjs} +3 -3
- package/core/built/admin/assets/posts/{main-layout-Ct-TA0TH.mjs → main-layout-DeqPTJTe.mjs} +2 -2
- package/core/built/admin/assets/posts/{members-BY9oPKo4.mjs → members-LABk5yI5.mjs} +3055 -2831
- package/core/built/admin/assets/posts/{newsletter-BR1tln6E.mjs → newsletter-C_nbHBaP.mjs} +15 -15
- package/core/built/admin/assets/posts/{overview-j1ANMAQ2.mjs → overview-AJnKv4Ze.mjs} +16 -16
- package/core/built/admin/assets/posts/{post-analytics-DnG-Rolr.mjs → post-analytics-b_CKsePp.mjs} +6 -6
- package/core/built/admin/assets/posts/{post-analytics-context-hiKFF4yE.mjs → post-analytics-context-D6jtpxxm.mjs} +5 -5
- package/core/built/admin/assets/posts/{post-analytics-header-OqAJ8SUL.mjs → post-analytics-header-R5UF_tF0.mjs} +11 -11
- package/core/built/admin/assets/posts/{post-share-modal-BWfujDu2.mjs → post-share-modal-y4BEOajk.mjs} +4 -4
- package/core/built/admin/assets/posts/{posts-CS9tqSJC.mjs → posts-C2hNrf1c.mjs} +2 -2
- package/core/built/admin/assets/posts/posts.js +1 -1
- package/core/built/admin/assets/posts/{reply-CX_EQh9X.mjs → reply-2Uvi3Kxb.mjs} +2 -2
- package/core/built/admin/assets/posts/{search-BqzdnPQb.mjs → search-se7meOnL.mjs} +2 -2
- package/core/built/admin/assets/posts/{select-CD5WLIrZ.mjs → select-DpUpauFg.mjs} +8 -8
- package/core/built/admin/assets/posts/{separator-DFPLsWCc.mjs → separator-CdBM46dw.mjs} +3 -3
- package/core/built/admin/assets/posts/{settings-lnEt3Kb-.mjs → settings-Chhj9xKP.mjs} +2 -2
- package/core/built/admin/assets/posts/{sheet-CkLfUqdH.mjs → sheet--k3SiDko.mjs} +3 -3
- package/core/built/admin/assets/posts/{skeleton-BZCi-IYy.mjs → skeleton-CUSLSLoY.mjs} +3 -3
- package/core/built/admin/assets/posts/{source-icon-C0k2hDC_.mjs → source-icon-BjYUIoXN.mjs} +3 -3
- package/core/built/admin/assets/posts/{stats-AHbSTqzG.mjs → stats-BRdXKaxM.mjs} +4 -4
- package/core/built/admin/assets/posts/{table-DMrf6wp5.mjs → table-Bgi_UcfL.mjs} +2 -2
- package/core/built/admin/assets/posts/{tabs-BH8GNJCe.mjs → tabs-DT8Bh72E.mjs} +14 -14
- package/core/built/admin/assets/posts/{tags-C5VV8Gd0.mjs → tags-BCFLnZYl.mjs} +61 -60
- package/core/built/admin/assets/posts/{tags-DucujdYI.mjs → tags-Kv2q0o3p.mjs} +2 -2
- package/core/built/admin/assets/posts/{use-scroll-restoration-C7A3TpAz.mjs → use-scroll-restoration-CLAUAal3.mjs} +6 -6
- package/core/built/admin/assets/posts/{virtual-list-window-BIGoc0th.mjs → virtual-list-window-CQDEqNBL.mjs} +180 -274
- package/core/built/admin/assets/posts/{web-DczNailO.mjs → web-CqN0MQU6.mjs} +18 -18
- package/core/built/admin/assets/{posts-Dr3u9yOp.js → posts-GvXDuhVG.js} +1 -1
- package/core/built/admin/assets/{referrers-6As_USul.js → referrers-Bd9pW-WX.js} +1 -1
- package/core/built/admin/assets/{repeat-D-Ki-Cg5.js → repeat-y6HlMgGO.js} +2 -2
- package/core/built/admin/assets/{reply-C4V0xZ2U.js → reply-Cc8ryI5v.js} +2 -2
- package/core/built/admin/assets/{select-Dt579MbD.js → select-CGr_5qad.js} +1 -1
- package/core/built/admin/assets/{settings-BMsoTszq.js → settings-BPsfSgg3.js} +1 -1
- package/core/built/admin/assets/{settings-Ck1Hqs1x.js → settings-BTd0Adha.js} +4 -4
- package/core/built/admin/assets/{sort-button-Bn325H3y.js → sort-button-k76_5HR2.js} +1 -1
- package/core/built/admin/assets/{source-icon-CNqsYZeA.js → source-icon-DMt0UskC.js} +1 -1
- package/core/built/admin/assets/{sprout-C9DbfYGe.js → sprout-Td9eaOoY.js} +2 -2
- package/core/built/admin/assets/{square-CWrI0H4v.js → square-Df8vEYlG.js} +1 -1
- package/core/built/admin/assets/stats/{audience-DBW5Xu1c.mjs → audience-DMTObpL8.mjs} +3 -3
- package/core/built/admin/assets/stats/{content-helpers-BR6DcWwH.mjs → content-helpers-ReMp9KJN.mjs} +4 -4
- package/core/built/admin/assets/stats/{index-CFvGHbAV.mjs → index-6L-yLKFX.mjs} +8 -8
- package/core/built/admin/assets/stats/{index-BuS4r1cs.mjs → index-CIUyjeP-.mjs} +5 -5
- package/core/built/admin/assets/stats/{index-DKS4mzS-.mjs → index-CMSDpQm3.mjs} +11 -7
- package/core/built/admin/assets/stats/{index-ZjicrvMA.mjs → index-Ca-_KJzy.mjs} +5 -5
- package/core/built/admin/assets/stats/{index-TeAxlGlY.mjs → index-CfO5yPSP.mjs} +5 -5
- package/core/built/admin/assets/stats/{sort-button-DbwzvVKL.mjs → sort-button-BB_M2CdZ.mjs} +3 -3
- package/core/built/admin/assets/stats/{stats-BatzfgdA.mjs → stats-B2nnuLeU.mjs} +2 -2
- package/core/built/admin/assets/stats/stats.js +1 -1
- package/core/built/admin/assets/stats/{tabs-B32ptD5t.mjs → tabs-DjJG-d3O.mjs} +3 -3
- package/core/built/admin/assets/stats/{use-growth-stats-DmTT2gKd.mjs → use-growth-stats-BMT5M7l6.mjs} +3 -3
- package/core/built/admin/assets/{stats-G4Ge9ETb.js → stats-Bs9ZbmXX.js} +1 -1
- package/core/built/admin/assets/{stats-view-Bx3oDAIW.js → stats-view-BWoPuaLz.js} +1 -1
- package/core/built/admin/assets/{step-1-y3anLU0g.js → step-1-BUvsuCs0.js} +1 -1
- package/core/built/admin/assets/{step-2-Dr1lGnHU.js → step-2-DI9ekXls.js} +1 -1
- package/core/built/admin/assets/{step-3-C_d2hvMs.js → step-3-DzT_XhaS.js} +2 -2
- package/core/built/admin/assets/{table-CbN_vbUx.js → table-BKqaEGAm.js} +1 -1
- package/core/built/admin/assets/{tabs-DFJzY5np.js → tabs-G6Ql8vbf.js} +1 -1
- package/core/built/admin/assets/tags-BHm-dlBs.js +1 -0
- package/core/built/admin/assets/{tags-Ddg8oG2Y.js → tags-_taMP0sJ.js} +1 -1
- package/core/built/admin/assets/{textarea-DikWsYMt.js → textarea-DcVuGYYq.js} +1 -1
- package/core/built/admin/assets/{tiers-B7qV_8mO.js → tiers-kv-xBoqQ.js} +1 -1
- package/core/built/admin/assets/{toggle-group-tXaaTD7P.js → toggle-group-DsatLdt7.js} +1 -1
- package/core/built/admin/assets/{topic-filter-bQtscKE6.js → topic-filter-DkJyIuAf.js} +1 -1
- package/core/built/admin/assets/{trash--VS50LgS.js → trash-BeZZgbn-.js} +1 -1
- package/core/built/admin/assets/{upload-Dz-DI9rQ.js → upload-BG7KNIn7.js} +4 -4
- package/core/built/admin/assets/{use-growth-stats-DNVioFUq.js → use-growth-stats-CNGdl44N.js} +1 -1
- package/core/built/admin/assets/{use-scroll-restoration-CxWEiCuS.js → use-scroll-restoration-CQ3w0W98.js} +1 -1
- package/core/built/admin/assets/{use-simple-pagination-BA6xsVQO.js → use-simple-pagination-BeIJ_5Vv.js} +1 -1
- package/core/built/admin/assets/{user-plus-B0tpOnLM.js → user-plus-CMxR50-Y.js} +1 -1
- package/core/built/admin/assets/{user-round-check-caJYm0bB.js → user-round-check-2nhPmqP3.js} +1 -1
- package/core/built/admin/assets/virtual-list-window-Uq8oKYVG.js +4 -0
- package/core/built/admin/assets/{wallet-cards-DBM65lA_.js → wallet-cards-CJcVzH0D.js} +1 -1
- package/core/built/admin/assets/{web-CSXixG1S.js → web-BPwTFKrc.js} +1 -1
- package/core/built/admin/index.html +5 -5
- package/core/server/services/members/service.js +0 -22
- package/core/server/services/verification/verification-webhook-service.js +2 -2
- package/core/server/services/verification/verification-webhook-service.ts +2 -2
- package/core/server/services/verification-trigger.js +34 -69
- package/core/shared/labs.js +2 -2
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/components/tryghost-i18n-6.25.0.tgz +0 -0
- package/core/built/admin/assets/comments-gAnA10dK.js +0 -1
- package/core/built/admin/assets/filters-DzSJ1ez3.js +0 -1
- package/core/built/admin/assets/index-Chp0ODAU.css +0 -1
- package/core/built/admin/assets/kpis-Bm-hIEkf.js +0 -1
- package/core/built/admin/assets/members-CzztojNk.js +0 -15
- package/core/built/admin/assets/tags-D5g9tXZU.js +0 -1
- package/core/built/admin/assets/virtual-list-window-JdKgHS9L.js +0 -4
- package/core/shared/config/env/config.testing-browser.json +0 -98
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CCF2RKxR.js","./minus-DSyx9DCe.js","./deleted-feed-item-DBW0zJQg.js","./trash-BeZZgbn-.js","./topic-filter-DkJyIuAf.js","./empty-indicator-2QGnEbtY.js","./inbox-DYY8-M1K.js","./feed-T3kW9UJA.js","./hash-CI1pQ1UC.js","./note-996Zos9G.js","./index-mqQc8MVd.js","./at-sign-B8xWKM0y.js","./user-round-check-2nhPmqP3.js","./reply-Cc8ryI5v.js","./index-CcFVbffG.js","./sprout-Td9eaOoY.js","./index-qQZsxgFE.js","./tags-_taMP0sJ.js","./edit-profile-Dz-IhetN.js","./label-tBvn89sm.js","./textarea-DcVuGYYq.js","./tabs-G6Ql8vbf.js","./lucide-react-4VO5Dwow.js","./a-large-small-B_ulQCIs.js","./wallet-cards-CJcVzH0D.js","./upload-BG7KNIn7.js","./loader-circle-C8exRUku.js","./copy-CDHcAPJw.js","./message-square-text-CC_1bY-Q.js","./user-plus-CMxR50-Y.js","./square-Df8vEYlG.js","./repeat-y6HlMgGO.js","./settings-BPsfSgg3.js","./index-DJa3pLmx.js","./toggle-group-DsatLdt7.js","./moderation-DwKm9LO-.js","./bluesky-sharing-CkI1QuAm.js","./step-1-BUvsuCs0.js","./step-2-DI9ekXls.js","./avatar-flipboard-IipGb_wZ.js","./step-3-DzT_XhaS.js","./post-analytics-context-GFe0lMc-.js","./posts-GvXDuhVG.js","./post-analytics-AwufPVFE.js","./main-layout-BAqXRgAx.js","./post-share-modal-CTpdCS2X.js","./overview-r17hlWAB.js","./growth-D9sCnmon.js","./source-icon-DMt0UskC.js","./source-utils-B1S3ZHA2.js","./pagemenu-DzpB1AkZ.js","./table-BKqaEGAm.js","./member-route-D4n-RbQd.js","./post-analytics-header-DmGyNvP9.js","./get-site-timezone-BDBAcjmq.js","./post-helpers-gInwAwEv.js","./currency-fEUUCkj0.js","./stats-Bs9ZbmXX.js","./data-list-Crb1ffbp.js","./links-Do4jcjIh.js","./chart-_slUcr-K.js","./_baseAssignValue-BKAl5FrV.js","./index-BDAOs7pI.js","./PolarAngleAxis-C6ZeSpZB.js","./kpis-Dw04ruBN.js","./gh-chart-fuWw60Ka.js","./web-BPwTFKrc.js","./select-CGr_5qad.js","./en-BRQS1Z8j.js","./filters-ChOMQQZW.js","./newsletter-C0rydPGS.js","./use-simple-pagination-BeIJ_5Vv.js","./tags-BHm-dlBs.js","./header-OevT95FI.js","./virtual-list-window-Uq8oKYVG.js","./comments-BeoA0nfK.js","./use-scroll-restoration-CQ3w0W98.js","./index-DBZYUfjO.js","./members-DRLgwCgJ.js","./dropzone-B9JUsQlW.js","./newsletters-DKdmxfDG.js","./tiers-kv-xBoqQ.js","./index-DjgsxHeB.js","./index-DcFgRUSN.js","./stats-view-BWoPuaLz.js","./audience-CBOR--z9.js","./use-growth-stats-CNGdl44N.js","./index-8CZdLQzu.js","./content-helpers-CmTGdEmL.js","./index-DW5aEj6O.js","./sort-button-k76_5HR2.js","./referrers-Bd9pW-WX.js","./index-C-Cpbee5.js","./settings-BTd0Adha.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function jA(e,t){for(var o=0;o<t.length;o++){const n=t[o];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in e)){const a=Object.getOwnPropertyDescriptor(n,r);a&&Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function o(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(r){if(r.ep)return;r.ep=!0;const a=o(r);fetch(r.href,a)}})();var ic0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _R(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function n(){var r=!1;try{r=this instanceof n}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),o}var ob={exports:{}},$c={},nb={exports:{}},z1={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -597,7 +597,7 @@ _0.version="2.24.0";HU($1);_0.fn=g0;_0.min=CQ;_0.max=NQ;_0.now=_Q;_0.utc=Dt;_0.u
|
|
|
597
597
|
* See the LICENSE file in the root directory of this source tree.
|
|
598
598
|
*/const RK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xd=K0("x",RK),U3=Ao("inline-flex items-center justify-center gap-2 rounded-md text-sm whitespace-nowrap transition-colors focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.5px]",{variants:{variant:{default:"bg-primary font-medium text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive font-medium text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background font-medium hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary font-medium text-secondary-foreground hover:bg-secondary/80 dark:bg-gray-925/70 dark:hover:bg-gray-900",ghost:"font-medium hover:bg-accent hover:text-accent-foreground",link:"font-medium text-primary underline-offset-4 hover:underline",dropdown:"border border-input bg-background hover:bg-accent hover:text-accent-foreground"},size:{default:"h-[34px] px-3 py-2",sm:"h-7 rounded-md px-3 text-xs [&_svg]:size-3",lg:"h-11 rounded-md px-8 text-md font-semibold",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),i1=p.forwardRef(({className:e,variant:t,size:o,asChild:n=!1,children:r,...a},i)=>{const l=n?pc:"button",z=t==="dropdown"?b.jsxs(b.Fragment,{children:[r,b.jsx(lZ,{className:"-mr-0.5! -ml-1! size-4 stroke-[2px]! opacity-50",strokeWidth:2})]}):r;return b.jsx(l,{ref:i,className:R0(U3({variant:t,size:o,className:e})),...a,children:z})});i1.displayName="Button";function yK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const wK=e=>{switch(e){case"success":return kK;case"info":return NK;case"warning":return CK;case"error":return _K;default:return null}},LK=Array(12).fill(0),xK=({visible:e,className:t})=>M0.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},M0.createElement("div",{className:"sonner-spinner"},LK.map((o,n)=>M0.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),kK=M0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M0.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"})),CK=M0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M0.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"})),NK=M0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M0.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"})),_K=M0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M0.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"})),EK=M0.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"},M0.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M0.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),BK=()=>{const[e,t]=M0.useState(document.hidden);return M0.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Vz=1;class SK{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:n,...r}=t,a=typeof t?.id=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:Vz++,i=this.toasts.find(z=>z.id===a),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(z=>z.id===a?(this.publish({...z,...t,id:a,title:n}),{...z,...t,id:a,dismissible:l,title:n}):z):this.addToast({title:n,...r,dismissible:l,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(n=>n({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let n;o.loading!==void 0&&(n=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,i;const l=r.then(async u=>{if(i=["resolve",u],M0.isValidElement(u))a=!1,this.create({id:n,type:"default",message:u});else if(PK(u)&&!u.ok){a=!1;const O=typeof o.error=="function"?await o.error(`HTTP error! status: ${u.status}`):o.error,h=typeof o.description=="function"?await o.description(`HTTP error! status: ${u.status}`):o.description,g=typeof O=="object"&&!M0.isValidElement(O)?O:{message:O};this.create({id:n,type:"error",description:h,...g})}else if(u instanceof Error){a=!1;const O=typeof o.error=="function"?await o.error(u):o.error,h=typeof o.description=="function"?await o.description(u):o.description,g=typeof O=="object"&&!M0.isValidElement(O)?O:{message:O};this.create({id:n,type:"error",description:h,...g})}else if(o.success!==void 0){a=!1;const O=typeof o.success=="function"?await o.success(u):o.success,h=typeof o.description=="function"?await o.description(u):o.description,g=typeof O=="object"&&!M0.isValidElement(O)?O:{message:O};this.create({id:n,type:"success",description:h,...g})}}).catch(async u=>{if(i=["reject",u],o.error!==void 0){a=!1;const f=typeof o.error=="function"?await o.error(u):o.error,O=typeof o.description=="function"?await o.description(u):o.description,q=typeof f=="object"&&!M0.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:O,...q})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),o.finally==null||o.finally.call(o)}),z=()=>new Promise((u,f)=>l.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:z}:Object.assign(n,{unwrap:z})},this.custom=(t,o)=>{const n=o?.id||Vz++;return this.create({jsx:t(n),id:n,...o}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const A2=new SK,TK=(e,t)=>{const o=t?.id||Vz++;return A2.addToast({title:e,...t,id:o}),o},PK=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jK=TK,XK=()=>A2.toasts,DK=()=>A2.getActiveToasts(),Te=Object.assign(jK,{success:A2.success,info:A2.info,warning:A2.warning,error:A2.error,custom:A2.custom,message:A2.message,promise:A2.promise,dismiss:A2.dismiss,loading:A2.loading},{getHistory:XK,getToasts:DK});yK("[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 Ti(e){return e.label!==void 0}const IK=3,FK="24px",HK="16px",Uf=4e3,UK=356,VK=14,QK=45,$K=200;function xt(...e){return e.filter(Boolean).join(" ")}function GK(e){const[t,o]=e.split("-"),n=[];return t&&n.push(t),o&&n.push(o),n}const ZK=e=>{var t,o,n,r,a,i,l,z,u;const{invert:f,toast:O,unstyled:h,interacting:q,setHeights:g,visibleToasts:W,heights:v,index:y,toasts:k,expanded:C,removeToast:L,defaultRichColors:x,closeButton:w,style:P,cancelButtonStyle:H,actionButtonStyle:o0,className:Y="",descriptionClassName:Z="",duration:n0,position:J,gap:i0,expandByDefault:L0,classNames:K,icons:m0,closeButtonAriaLabel:$="Close toast"}=e,[X,G]=M0.useState(null),[N,I]=M0.useState(null),[c0,h0]=M0.useState(!1),[d0,v0]=M0.useState(!1),[u0,e0]=M0.useState(!1),[S0,T0]=M0.useState(!1),[$0,h1]=M0.useState(!1),[B,t0]=M0.useState(0),[r0,A0]=M0.useState(0),j0=M0.useRef(O.duration||n0||Uf),J0=M0.useRef(null),a1=M0.useRef(null),o1=y===0,q1=y+1<=W,C1=O.type,Ce=O.dismissible!==!1,rt=O.className||"",c2=O.descriptionClassName||"",K1=M0.useMemo(()=>v.findIndex(Y0=>Y0.toastId===O.id)||0,[v,O.id]),X1=M0.useMemo(()=>{var Y0;return(Y0=O.closeButton)!=null?Y0:w},[O.closeButton,w]),a2=M0.useMemo(()=>O.duration||n0||Uf,[O.duration,n0]),ct=M0.useRef(0),qe=M0.useRef(0),s2=M0.useRef(0),be=M0.useRef(null),[_2,E2]=J.split("-"),Ne=M0.useMemo(()=>v.reduce((Y0,B1,n1)=>n1>=K1?Y0:Y0+B1.height,0),[v,K1]),Ge=BK(),B2=O.invert||f,je=C1==="loading";qe.current=M0.useMemo(()=>K1*i0+Ne,[K1,Ne]),M0.useEffect(()=>{j0.current=a2},[a2]),M0.useEffect(()=>{h0(!0)},[]),M0.useEffect(()=>{const Y0=a1.current;if(Y0){const B1=Y0.getBoundingClientRect().height;return A0(B1),g(n1=>[{toastId:O.id,height:B1,position:O.position},...n1]),()=>g(n1=>n1.filter(H1=>H1.toastId!==O.id))}},[g,O.id]),M0.useLayoutEffect(()=>{if(!c0)return;const Y0=a1.current,B1=Y0.style.height;Y0.style.height="auto";const n1=Y0.getBoundingClientRect().height;Y0.style.height=B1,A0(n1),g(H1=>H1.find(E=>E.toastId===O.id)?H1.map(E=>E.toastId===O.id?{...E,height:n1}:E):[{toastId:O.id,height:n1,position:O.position},...H1])},[c0,O.title,O.description,g,O.id,O.jsx,O.action,O.cancel]);const _e=M0.useCallback(()=>{v0(!0),t0(qe.current),g(Y0=>Y0.filter(B1=>B1.toastId!==O.id)),setTimeout(()=>{L(O)},$K)},[O,L,g,qe]);M0.useEffect(()=>{if(O.promise&&C1==="loading"||O.duration===1/0||O.type==="loading")return;let Y0;return C||q||Ge?(()=>{if(s2.current<ct.current){const H1=new Date().getTime()-ct.current;j0.current=j0.current-H1}s2.current=new Date().getTime()})():(()=>{j0.current!==1/0&&(ct.current=new Date().getTime(),Y0=setTimeout(()=>{O.onAutoClose==null||O.onAutoClose.call(O,O),_e()},j0.current))})(),()=>clearTimeout(Y0)},[C,q,O,C1,Ge,_e]),M0.useEffect(()=>{O.delete&&(_e(),O.onDismiss==null||O.onDismiss.call(O,O))},[_e,O.delete]);function i2(){var Y0;if(m0?.loading){var B1;return M0.createElement("div",{className:xt(K?.loader,O==null||(B1=O.classNames)==null?void 0:B1.loader,"sonner-loader"),"data-visible":C1==="loading"},m0.loading)}return M0.createElement(xK,{className:xt(K?.loader,O==null||(Y0=O.classNames)==null?void 0:Y0.loader),visible:C1==="loading"})}const Ze=O.icon||m0?.[C1]||wK(C1);var p2,m2;return M0.createElement("li",{tabIndex:0,ref:a1,className:xt(Y,rt,K?.toast,O==null||(t=O.classNames)==null?void 0:t.toast,K?.default,K?.[C1],O==null||(o=O.classNames)==null?void 0:o[C1]),"data-sonner-toast":"","data-rich-colors":(p2=O.richColors)!=null?p2:x,"data-styled":!(O.jsx||O.unstyled||h),"data-mounted":c0,"data-promise":!!O.promise,"data-swiped":$0,"data-removed":d0,"data-visible":q1,"data-y-position":_2,"data-x-position":E2,"data-index":y,"data-front":o1,"data-swiping":u0,"data-dismissible":Ce,"data-type":C1,"data-invert":B2,"data-swipe-out":S0,"data-swipe-direction":N,"data-expanded":!!(C||L0&&c0),"data-testid":O.testId,style:{"--index":y,"--toasts-before":y,"--z-index":k.length-y,"--offset":`${d0?B:qe.current}px`,"--initial-height":L0?"auto":`${r0}px`,...P,...O.style},onDragEnd:()=>{e0(!1),G(null),be.current=null},onPointerDown:Y0=>{Y0.button!==2&&(je||!Ce||(J0.current=new Date,t0(qe.current),Y0.target.setPointerCapture(Y0.pointerId),Y0.target.tagName!=="BUTTON"&&(e0(!0),be.current={x:Y0.clientX,y:Y0.clientY})))},onPointerUp:()=>{var Y0,B1,n1;if(S0||!Ce)return;be.current=null;const H1=Number(((Y0=a1.current)==null?void 0:Y0.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),S2=Number(((B1=a1.current)==null?void 0:B1.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),E=new Date().getTime()-((n1=J0.current)==null?void 0:n1.getTime()),D=X==="x"?H1:S2,V=Math.abs(D)/E;if(Math.abs(D)>=QK||V>.11){t0(qe.current),O.onDismiss==null||O.onDismiss.call(O,O),I(X==="x"?H1>0?"right":"left":S2>0?"down":"up"),_e(),T0(!0);return}else{var s0,f0;(s0=a1.current)==null||s0.style.setProperty("--swipe-amount-x","0px"),(f0=a1.current)==null||f0.style.setProperty("--swipe-amount-y","0px")}h1(!1),e0(!1),G(null)},onPointerMove:Y0=>{var B1,n1,H1;if(!be.current||!Ce||((B1=window.getSelection())==null?void 0:B1.toString().length)>0)return;const E=Y0.clientY-be.current.y,D=Y0.clientX-be.current.x;var V;const s0=(V=e.swipeDirections)!=null?V:GK(J);!X&&(Math.abs(D)>1||Math.abs(E)>1)&&G(Math.abs(D)>Math.abs(E)?"x":"y");let f0={x:0,y:0};const y0=w0=>1/(1.5+Math.abs(w0)/20);if(X==="y"){if(s0.includes("top")||s0.includes("bottom"))if(s0.includes("top")&&E<0||s0.includes("bottom")&&E>0)f0.y=E;else{const w0=E*y0(E);f0.y=Math.abs(w0)<Math.abs(E)?w0:E}}else if(X==="x"&&(s0.includes("left")||s0.includes("right")))if(s0.includes("left")&&D<0||s0.includes("right")&&D>0)f0.x=D;else{const w0=D*y0(D);f0.x=Math.abs(w0)<Math.abs(D)?w0:D}(Math.abs(f0.x)>0||Math.abs(f0.y)>0)&&h1(!0),(n1=a1.current)==null||n1.style.setProperty("--swipe-amount-x",`${f0.x}px`),(H1=a1.current)==null||H1.style.setProperty("--swipe-amount-y",`${f0.y}px`)}},X1&&!O.jsx&&C1!=="loading"?M0.createElement("button",{"aria-label":$,"data-disabled":je,"data-close-button":!0,onClick:je||!Ce?()=>{}:()=>{_e(),O.onDismiss==null||O.onDismiss.call(O,O)},className:xt(K?.closeButton,O==null||(n=O.classNames)==null?void 0:n.closeButton)},(m2=m0?.close)!=null?m2:EK):null,(C1||O.icon||O.promise)&&O.icon!==null&&(m0?.[C1]!==null||O.icon)?M0.createElement("div",{"data-icon":"",className:xt(K?.icon,O==null||(r=O.classNames)==null?void 0:r.icon)},O.promise||O.type==="loading"&&!O.icon?O.icon||i2():null,O.type!=="loading"?Ze:null):null,M0.createElement("div",{"data-content":"",className:xt(K?.content,O==null||(a=O.classNames)==null?void 0:a.content)},M0.createElement("div",{"data-title":"",className:xt(K?.title,O==null||(i=O.classNames)==null?void 0:i.title)},O.jsx?O.jsx:typeof O.title=="function"?O.title():O.title),O.description?M0.createElement("div",{"data-description":"",className:xt(Z,c2,K?.description,O==null||(l=O.classNames)==null?void 0:l.description)},typeof O.description=="function"?O.description():O.description):null),M0.isValidElement(O.cancel)?O.cancel:O.cancel&&Ti(O.cancel)?M0.createElement("button",{"data-button":!0,"data-cancel":!0,style:O.cancelButtonStyle||H,onClick:Y0=>{Ti(O.cancel)&&Ce&&(O.cancel.onClick==null||O.cancel.onClick.call(O.cancel,Y0),_e())},className:xt(K?.cancelButton,O==null||(z=O.classNames)==null?void 0:z.cancelButton)},O.cancel.label):null,M0.isValidElement(O.action)?O.action:O.action&&Ti(O.action)?M0.createElement("button",{"data-button":!0,"data-action":!0,style:O.actionButtonStyle||o0,onClick:Y0=>{Ti(O.action)&&(O.action.onClick==null||O.action.onClick.call(O.action,Y0),!Y0.defaultPrevented&&_e())},className:xt(K?.actionButton,O==null||(u=O.classNames)==null?void 0:u.actionButton)},O.action.label):null)};function Vf(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function KK(e,t){const o={};return[e,t].forEach((n,r)=>{const a=r===1,i=a?"--mobile-offset":"--offset",l=a?HK:FK;function z(u){["top","right","bottom","left"].forEach(f=>{o[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?z(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?o[`${i}-${u}`]=l:o[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):z(l)}),o}const YK=M0.forwardRef(function(t,o){const{id:n,invert:r,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:z,className:u,offset:f,mobileOffset:O,theme:h="light",richColors:q,duration:g,style:W,visibleToasts:v=IK,toastOptions:y,dir:k=Vf(),gap:C=VK,icons:L,containerAriaLabel:x="Notifications"}=t,[w,P]=M0.useState([]),H=M0.useMemo(()=>n?w.filter(c0=>c0.toasterId===n):w.filter(c0=>!c0.toasterId),[w,n]),o0=M0.useMemo(()=>Array.from(new Set([a].concat(H.filter(c0=>c0.position).map(c0=>c0.position)))),[H,a]),[Y,Z]=M0.useState([]),[n0,J]=M0.useState(!1),[i0,L0]=M0.useState(!1),[K,m0]=M0.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=M0.useRef(null),X=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=M0.useRef(null),N=M0.useRef(!1),I=M0.useCallback(c0=>{P(h0=>{var d0;return(d0=h0.find(v0=>v0.id===c0.id))!=null&&d0.delete||A2.dismiss(c0.id),h0.filter(({id:v0})=>v0!==c0.id)})},[]);return M0.useEffect(()=>A2.subscribe(c0=>{if(c0.dismiss){requestAnimationFrame(()=>{P(h0=>h0.map(d0=>d0.id===c0.id?{...d0,delete:!0}:d0))});return}setTimeout(()=>{xu.flushSync(()=>{P(h0=>{const d0=h0.findIndex(v0=>v0.id===c0.id);return d0!==-1?[...h0.slice(0,d0),{...h0[d0],...c0},...h0.slice(d0+1)]:[c0,...h0]})})})}),[w]),M0.useEffect(()=>{if(h!=="system"){m0(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?m0("dark"):m0("light")),typeof window>"u")return;const c0=window.matchMedia("(prefers-color-scheme: dark)");try{c0.addEventListener("change",({matches:h0})=>{m0(h0?"dark":"light")})}catch{c0.addListener(({matches:d0})=>{try{m0(d0?"dark":"light")}catch(v0){console.error(v0)}})}},[h]),M0.useEffect(()=>{w.length<=1&&J(!1)},[w]),M0.useEffect(()=>{const c0=h0=>{var d0;if(i.every(e0=>h0[e0]||h0.code===e0)){var u0;J(!0),(u0=$.current)==null||u0.focus()}h0.code==="Escape"&&(document.activeElement===$.current||(d0=$.current)!=null&&d0.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",c0),()=>document.removeEventListener("keydown",c0)},[i]),M0.useEffect(()=>{if($.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,N.current=!1)}},[$.current]),M0.createElement("section",{ref:o,"aria-label":`${x} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},o0.map((c0,h0)=>{var d0;const[v0,u0]=c0.split("-");return H.length?M0.createElement("ol",{key:c0,dir:k==="auto"?Vf():k,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":v0,"data-x-position":u0,style:{"--front-toast-height":`${((d0=Y[0])==null?void 0:d0.height)||0}px`,"--width":`${UK}px`,"--gap":`${C}px`,...W,...KK(f,O)},onBlur:e0=>{N.current&&!e0.currentTarget.contains(e0.relatedTarget)&&(N.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:e0=>{e0.target instanceof HTMLElement&&e0.target.dataset.dismissible==="false"||N.current||(N.current=!0,G.current=e0.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{i0||J(!1)},onDragEnd:()=>J(!1),onPointerDown:e0=>{e0.target instanceof HTMLElement&&e0.target.dataset.dismissible==="false"||L0(!0)},onPointerUp:()=>L0(!1)},H.filter(e0=>!e0.position&&h0===0||e0.position===c0).map((e0,S0)=>{var T0,$0;return M0.createElement(ZK,{key:e0.id,icons:L,index:S0,toast:e0,defaultRichColors:q,duration:(T0=y?.duration)!=null?T0:g,className:y?.className,descriptionClassName:y?.descriptionClassName,invert:r,visibleToasts:v,closeButton:($0=y?.closeButton)!=null?$0:z,interacting:i0,position:c0,style:y?.style,unstyled:y?.unstyled,classNames:y?.classNames,cancelButtonStyle:y?.cancelButtonStyle,actionButtonStyle:y?.actionButtonStyle,closeButtonAriaLabel:y?.closeButtonAriaLabel,removeToast:I,toasts:H.filter(h1=>h1.position==e0.position),heights:Y.filter(h1=>h1.position==e0.position),setHeights:Z,expandByDefault:l,gap:C,expanded:n0,swipeDirections:t.swipeDirections})})):null}))}),JK=({...e})=>b.jsx(YK,{className:"toaster group",style:{"--normal-bg":"var(--background)","--normal-text":"var(--foreground)","--normal-border":"var(--border)"},theme:"light",...e}),eY=M0.createContext({isDirty:!1,setGlobalDirtyState:()=>{}}),tY=({children:e})=>{const[t,o]=p.useState([]),n=p.useCallback((r,a)=>{o(i=>a&&!i.includes(r)?[...i,r]:!a&&i.includes(r)?i.filter(l=>l!==r):i)},[]);return b.jsx(eY.Provider,{value:{isDirty:t.length>0,setGlobalDirtyState:n},children:e})},oY=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Alert-Triangle--Streamline-Ultimate",...e},p.createElement("desc",null,"Alert Triangle Streamline Icon: https://streamlinehq.com"),p.createElement("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})),nY="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Alert-Triangle--Streamline-Ultimate'%3e%3cdesc%3eAlert%20Triangle%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='m23.77%2020.57%20-10%20-19A2%202%200%200%200%2012%200.5a2%202%200%200%200%20-1.77%201.07l-10%2019a2%202%200%200%200%200.06%202A2%202%200%200%200%202%2023.5h20a2%202%200%200%200%201.77%20-2.93ZM11%208.5a1%201%200%200%201%202%200v6a1%201%200%200%201%20-2%200ZM12.05%2020a1.53%201.53%200%200%201%20-1.52%20-1.47A1.48%201.48%200%200%201%2012%2017a1.53%201.53%200%200%201%201.52%201.47A1.48%201.48%200%200%201%2012.05%2020Z'%20fill='currentColor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",rY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:oY,default:nY},Symbol.toStringTag,{value:"Module"})),cY=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Information-Circle--Streamline-Ultimate",...e},p.createElement("desc",null,"Information Circle Streamline Icon: https://streamlinehq.com"),p.createElement("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})),aY="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Information-Circle--Streamline-Ultimate'%3e%3cdesc%3eInformation%20Circle%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='M12%200a12%2012%200%201%200%2012%2012A12%2012%200%200%200%2012%200Zm0.25%205a1.5%201.5%200%201%201%20-1.5%201.5%201.5%201.5%200%200%201%201.5%20-1.5Zm2.25%2013.5h-4a1%201%200%200%201%200%20-2h0.75a0.25%200.25%200%200%200%200.25%20-0.25v-4.5a0.25%200.25%200%200%200%20-0.25%20-0.25h-0.75a1%201%200%200%201%200%20-2h1a2%202%200%200%201%202%202v4.75a0.25%200.25%200%200%200%200.25%200.25h0.75a1%201%200%200%201%200%202Z'%20fill='currentcolor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",sY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:cY,default:aY},Symbol.toStringTag,{value:"Module"})),iY=e=>p.createElement("svg",{height:16,id:"Skull-2--Streamline-Ultimate",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("desc",null,`
|
|
599
599
|
Skull 2 Streamline Icon: https://streamlinehq.com
|
|
600
|
-
`),p.createElement("g",null,p.createElement("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}),p.createElement("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}),p.createElement("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}),p.createElement("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}),p.createElement("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}))),pY="data:image/svg+xml,%3csvg%20height='16'%20id='Skull-2--Streamline-Ultimate'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdesc%3e%20Skull%202%20Streamline%20Icon:%20https://streamlinehq.com%20%3c/desc%3e%3cg%3e%3cpath%20d='M12.333333333333332%207.333333333333333a4.333333333333333%204.333333333333333%200%201%200%20-7.333333333333333%203.126666666666667v1.88a1%201%200%200%200%202%200%201%201%200%200%200%202%200%201%201%200%201%200%202%200v-1.88a4.326666666666666%204.326666666666666%200%200%200%201.3333333333333333%20-3.126666666666667Zm-6.253333333333334%201a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Zm4%200a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m1.8666666666666665%203.28%201.22%201.22a0.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%200.09333333333333334%200.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%20-0.14666666666666667%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%20-0.9733333333333333%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%20-0.2333333333333333%200.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%20-0.24666666666666665L3.28%201.8666666666666665A1.1666666666666665%201.1666666666666665%200%200%200%201.8399999999999999%200.11333333333333334a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%200.48l-0.09999999999999999%200.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%200.26666666666666666l-0.52%200.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%20-0.48%200.3666666666666667A1.1666666666666665%201.1666666666666665%200%200%200%201.8666666666666665%203.28Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M12.4%204.446666666666666a0.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%200.14666666666666667%200.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%20-0.09333333333333334l1.22%20-1.22a1.1666666666666665%201.1666666666666665%200%200%200%201.7533333333333332%20-1.44%200.6666666666666666%200.6666666666666666%200%200%200%20-0.48%20-0.3666666666666667l-0.52%20-0.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%20-0.26666666666666666l-0.09999999999999999%20-0.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%20-0.48%201.1666666666666665%201.1666666666666665%200%200%200%20-1.44%201.7533333333333332l-1.1333333333333333%201.1266666666666665a0.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%200.24666666666666665%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%200.2333333333333333%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%200.9733333333333333Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M3.6%2011.559999999999999a0.33999999999999997%200.33999999999999997%200%200%200%20-0.26666666666666666%20-0.15333333333333332%200.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%200.09333333333333334l-1.2%201.22a1.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%201.44%200.6666666666666666%200.6666666666666666%200%200%200%200.48%200.3666666666666667l0.52%200.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%200.26%200.26666666666666666l0.09999999999999999%200.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%200.48%201.1666666666666665%201.1666666666666665%200%200%200%201.44%20-1.7533333333333332l1.1333333333333333%20-1.1266666666666665a0.36%200.36%200%200%200%200.09333333333333334%20-0.24%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%20-0.24%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%20-0.9666666666666666Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m14.133333333333333%2012.719999999999999%20-1.22%20-1.22a0.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%20-0.09333333333333334%200.33999999999999997%200.33999999999999997%200%200%200%20-0.24666666666666665%200.15333333333333332%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%200.9666666666666666%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%200.24%200.36%200.36%200%200%200%200.09333333333333334%200.24l1.1333333333333333%201.1266666666666665a1.1666666666666665%201.1666666666666665%200%200%200%201.44%201.7533333333333332%200.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%20-0.48l0.09999999999999999%20-0.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%200.26%20-0.26666666666666666l0.52%20-0.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%200.48%20-0.3666666666666667%201.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%20-1.44Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",MY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:iY,default:pY},Symbol.toStringTag,{value:"Module"})),lY=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Check-Circle-1--Streamline-Ultimate",...e},p.createElement("desc",null,"Check Circle 1 Streamline Icon: https://streamlinehq.com"),p.createElement("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})),bY="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Check-Circle-1--Streamline-Ultimate'%3e%3cdesc%3eCheck%20Circle%201%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='M12%200a12%2012%200%201%200%2012%2012A12%2012%200%200%200%2012%200Zm6.93%208.2%20-6.85%209.29a1%201%200%200%201%20-1.43%200.19l-4.89%20-3.91a1%201%200%200%201%20-0.15%20-1.41A1%201%200%200%201%207%2012.21l4.08%203.26L17.32%207a1%201%200%200%201%201.39%20-0.21%201%201%200%200%201%200.22%201.41Z'%20fill='currentcolor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",zY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:lY,default:bY},Symbol.toStringTag,{value:"Module"})),uY=e=>p.createElement("svg",{viewBox:"-0.75 -0.75 20 20",xmlns:"http://www.w3.org/2000/svg",height:24,width:24,...e},p.createElement("desc",null,"Typography"),p.createElement("path",{d:"m0.578125 9.827354166666668 8.09375 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"m12.140625 13.296104166666666 5.78125 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("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}),p.createElement("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})),dY="data:image/svg+xml,%3csvg%20viewBox='-0.75%20-0.75%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20width='24'%3e%3cdesc%3eTypography%3c/desc%3e%3cpath%20d='m0.578125%209.827354166666668%208.09375%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='m12.140625%2013.296104166666666%205.78125%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M12.140625%2016.764854166666666V10.40625a2.890625%202.890625%200%200%201%205.78125%200v6.359375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M0.578125%2016.764854166666666V5.78125a4.046875%204.046875%200%200%201%208.09375%200v10.984375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3c/svg%3e",OY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:uY,default:dY},Symbol.toStringTag,{value:"Module"})),fY=Ao("",{variants:{size:{sm:"size-3",md:"size-4",lg:"size-6",xl:"size-8"}},defaultVariants:{size:"md"}}),AY=Object.assign({"../../assets/icons/error-fill.svg":rY,"../../assets/icons/info-fill.svg":sY,"../../assets/icons/skull-and-bones.svg":MY,"../../assets/icons/success-fill.svg":zY,"../../assets/icons/typography.svg":OY}),pp=Object.entries(AY).reduce((e,[t,o])=>{var n;const r=((n=t.match(/[^/]+(?=\.svg$)/))==null?void 0:n[0])??"",a=SG(r),i=l=>{const{size:z,className:u,...f}=l,O=R0(fY({size:z,className:u}));return M0.createElement(o.ReactComponent,{...f,className:O})};return i.displayName=`Icon.${a}`,e[a]=i,e},{}),Tc0=pp,hY=p.createContext({isAnyTextFieldFocused:!1,setFocusState:()=>{},darkMode:!1}),qY=()=>{const[e,t]=p.useState(!1);return p.useEffect(()=>(t(!0),()=>t(!1)),[]),e?Sa.createPortal(b.jsx("div",{className:ho,style:{width:"unset",height:"unset"},children:b.jsx(JK,{icons:{error:b.jsx(pp.ErrorFill,{className:"text-red"}),success:b.jsx(pp.SuccessFill,{className:"text-green"}),info:b.jsx(pp.InfoFill,{className:"text-gray-500"})},position:"bottom-left",toastOptions:{classNames:{title:"mt-[-1px]! text-md! font-semibold! leading-tighter! tracking-[0.1px]!",description:"text-gray-900! dark:text-gray-300! text-sm! mt-px!",icon:"ml-0!"},style:{alignItems:"flex-start",maxWidth:"290px"}}})}),document.body):null},mY=({darkMode:e,children:t})=>{const[o,n]=p.useState(!1),r=a=>{n(a)};return b.jsx(hY.Provider,{value:{isAnyTextFieldFocused:o,setFocusState:r,darkMode:e},children:b.jsxs(tY,{children:[t,b.jsx(qY,{})]})})},ho="shade shade-admin shade-activitypub shade-stats shade-posts",gY=({darkMode:e,fetchKoenigLexical:t,className:o,children:n,...r})=>{const a=se("shade",o);return b.jsx("div",{className:a,...r,children:b.jsx(mY,{darkMode:e,children:n})})},WY=pU,vY=MU,RY=lU,Z9=p.forwardRef(({className:e,...t},o)=>b.jsx(E8,{className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t,ref:o}));Z9.displayName=E8.displayName;const K9=p.forwardRef(({className:e,...t},o)=>b.jsx(RY,{children:b.jsxs("div",{className:ho,children:[b.jsx(Z9,{onClick:n=>n.stopPropagation()}),b.jsx(B8,{ref:o,className:R0("fixed left-[50%] top-[20%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg",e),...t})]})}));K9.displayName=B8.displayName;const Y9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-2 text-center sm:text-left",e),...t});Y9.displayName="AlertDialogHeader";const J9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2 [&>button]:min-w-20",e),...t});J9.displayName="AlertDialogFooter";const em=p.forwardRef(({className:e,...t},o)=>b.jsx(P8,{ref:o,className:R0("text-xl font-semibold",e),...t}));em.displayName=P8.displayName;const tm=p.forwardRef(({className:e,...t},o)=>b.jsx(j8,{ref:o,className:R0("text-base",e),...t}));tm.displayName=j8.displayName;const om=p.forwardRef(({className:e,...t},o)=>b.jsx(S8,{ref:o,className:R0(U3(),e),...t}));om.displayName=S8.displayName;const nm=p.forwardRef(({className:e,...t},o)=>b.jsx(T8,{ref:o,className:R0(U3({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));nm.displayName=T8.displayName;const yY=p.lazy(()=>m1(()=>import("./index-B_XhekWb.js"),[],import.meta.url)),Qf=e=>b.jsx(p.Suspense,{fallback:b.jsx("div",{}),children:b.jsx(yY,{...e})}),Dd=p.forwardRef(({className:e,...t},o)=>b.jsx(J7,{ref:o,className:R0("relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full",e),...t}));Dd.displayName=J7.displayName;const Id=p.forwardRef(({className:e,...t},o)=>b.jsx(eq,{ref:o,className:R0("aspect-square h-full w-full",e),...t}));Id.displayName=eq.displayName;const Fd=p.forwardRef(({className:e,...t},o)=>b.jsx(tq,{ref:o,className:R0("flex h-full w-full items-center justify-center rounded-full bg-muted [&_svg]:size-4",e),...t}));Fd.displayName=tq.displayName;const wY=Ao("inline-flex items-center rounded-xs border px-1.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-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",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function LY({className:e,variant:t,...o}){return b.jsx("div",{className:R0(wY({variant:t}),e),...o})}const xY=Ao("relative block rounded-lg transition-all duration-300",{variants:{variant:{default:"border border-border bg-background shadow-sm hover:shadow-md dark:border-gray-900 dark:bg-gray-925",gradient:["cursor-pointer border border-gray-100 bg-white dark:border-gray-950 dark:bg-black","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-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950/30",success:"border border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950/30",warning:"border border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950/30",destructive:"bg-white shadow-sm dark:bg-gray-950"},size:{sm:"p-2 text-sm",md:"p-3",lg:"p-4"}},defaultVariants:{variant:"default",size:"md"}}),V3=p.forwardRef((e,t)=>{const{variant:o,size:n,dismissible:r=!1,onDismiss:a,role:i="status",className:l,children:z,...u}=e,f=O=>{O.preventDefault(),O.stopPropagation(),r&&a&&a()};return b.jsxs("div",{ref:t,className:R0(xY({variant:o,size:n}),l),role:i,...u,children:[r&&b.jsx(i1,{"aria-label":"Dismiss notification",className:"absolute top-1 right-1 size-8 text-gray-600 dark:text-gray-500 dark:hover:text-gray-300",size:"icon",variant:"ghost",onClick:f,children:b.jsx(Xd,{className:"size-5"})}),z]})});V3.displayName="Banner";const rs=dd,rm=Od,kY=fd,CY=x3,cm=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{ref:o,className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t}));cm.displayName=Ka.displayName;const Mc=p.forwardRef(({className:e,children:t,...o},n)=>b.jsx(kY,{children:b.jsxs("div",{className:ho,children:[b.jsx(cm,{}),b.jsx(Ya,{ref:n,className:R0("fixed left-[50%] top-[8vmin] z-50 grid w-full max-w-lg translate-x-[-50%] gap-6 bg-background dark:bg-[#101114] p-6 shadow-lg duration-200 transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg outline-hidden",e),...o,children:t})]})}));Mc.displayName=Ya.displayName;const Q3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col gap-y-1.5 text-center sm:text-left",e),...t});Q3.displayName="DialogHeader";const $3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2 sm:items-end [&_button]:min-w-20",e),...t});$3.displayName="DialogFooter";const G3=p.forwardRef(({className:e,...t},o)=>b.jsx(Ja,{ref:o,className:R0("text-xl font-semibold leading-none tracking-tight",e),...t}));G3.displayName=Ja.displayName;const am=p.forwardRef(({className:e,...t},o)=>b.jsx(es,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));am.displayName=es.displayName;var Qz=["Enter"," "],NY=["ArrowDown","PageUp","Home"],sm=["ArrowUp","PageDown","End"],_Y=[...NY,...sm],EY={ltr:[...Qz,"ArrowRight"],rtl:[...Qz,"ArrowLeft"]},BY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cs="Menu",[ka,SY,TY]=p7(cs),[Kn,im]=Y2(cs,[TY,bn,b7]),Z3=bn(),pm=b7(),[PY,Yn]=Kn(cs),[jY,as]=Kn(cs),Mm=e=>{const{__scopeMenu:t,open:o=!1,children:n,dir:r,onOpenChange:a,modal:i=!0}=e,l=Z3(t),[z,u]=p.useState(null),f=p.useRef(!1),O=Tt(a),h=M7(r);return p.useEffect(()=>{const q=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",q,{capture:!0}),()=>{document.removeEventListener("keydown",q,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),b.jsx(z3,{...l,children:b.jsx(PY,{scope:t,open:o,onOpenChange:O,content:z,onContentChange:u,children:b.jsx(jY,{scope:t,onClose:p.useCallback(()=>O(!1),[O]),isUsingKeyboardRef:f,dir:h,modal:i,children:n})})})};Mm.displayName=cs;var XY="MenuAnchor",Hd=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=Z3(o);return b.jsx(Fa,{...r,...n,ref:t})});Hd.displayName=XY;var Ud="MenuPortal",[DY,lm]=Kn(Ud,{forceMount:void 0}),bm=e=>{const{__scopeMenu:t,forceMount:o,children:n,container:r}=e,a=Yn(Ud,t);return b.jsx(DY,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(rc,{asChild:!0,container:r,children:n})})})};bm.displayName=Ud;var Q2="MenuContent",[IY,Vd]=Kn(Q2),zm=p.forwardRef((e,t)=>{const o=lm(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=as(Q2,e.__scopeMenu);return b.jsx(ka.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(ka.Slot,{scope:e.__scopeMenu,children:i.modal?b.jsx(FY,{...r,ref:t}):b.jsx(HY,{...r,ref:t})})})})}),FY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu),n=p.useRef(null),r=E1(t,n);return p.useEffect(()=>{const a=n.current;if(a)return Ju(a)},[]),b.jsx(Qd,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:B0(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),HY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu);return b.jsx(Qd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),UY=Qr("MenuContent.ScrollLock"),Qd=p.forwardRef((e,t)=>{const{__scopeMenu:o,loop:n=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:z,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,disableOutsideScroll:g,...W}=e,v=Yn(Q2,o),y=as(Q2,o),k=Z3(o),C=pm(o),L=SY(o),[x,w]=p.useState(null),P=p.useRef(null),H=E1(t,P,v.onContentChange),o0=p.useRef(0),Y=p.useRef(""),Z=p.useRef(0),n0=p.useRef(null),J=p.useRef("right"),i0=p.useRef(0),L0=g?q3:p.Fragment,K=g?{as:UY,allowPinchZoom:!0}:void 0,m0=X=>{const G=Y.current+X,N=L().filter(u0=>!u0.disabled),I=document.activeElement,c0=N.find(u0=>u0.ref.current===I)?.textValue,h0=N.map(u0=>u0.textValue),d0=nJ(h0,G,c0),v0=N.find(u0=>u0.textValue===d0)?.ref.current;(function u0(e0){Y.current=e0,window.clearTimeout(o0.current),e0!==""&&(o0.current=window.setTimeout(()=>u0(""),1e3))})(G),v0&&setTimeout(()=>v0.focus())};p.useEffect(()=>()=>window.clearTimeout(o0.current),[]),Yu();const $=p.useCallback(X=>J.current===n0.current?.side&&cJ(X,n0.current?.area),[]);return b.jsx(IY,{scope:o,searchRef:Y,onItemEnter:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),onItemLeave:p.useCallback(X=>{$(X)||(P.current?.focus(),w(null))},[$]),onTriggerLeave:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:p.useCallback(X=>{n0.current=X},[]),children:b.jsx(L0,{...K,children:b.jsx(A3,{asChild:!0,trapped:r,onMountAutoFocus:B0(a,X=>{X.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:b.jsx(nc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,children:b.jsx(Hj,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:B0(z,X=>{y.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(u3,{role:"menu","aria-orientation":"vertical","data-state":xm(v.open),"data-radix-menu-content":"",dir:y.dir,...k,...W,ref:H,style:{outline:"none",...W.style},onKeyDown:B0(W.onKeyDown,X=>{const N=X.target.closest("[data-radix-menu-content]")===X.currentTarget,I=X.ctrlKey||X.altKey||X.metaKey,c0=X.key.length===1;N&&(X.key==="Tab"&&X.preventDefault(),!I&&c0&&m0(X.key));const h0=P.current;if(X.target!==h0||!_Y.includes(X.key))return;X.preventDefault();const v0=L().filter(u0=>!u0.disabled).map(u0=>u0.ref.current);sm.includes(X.key)&&v0.reverse(),tJ(v0)}),onBlur:B0(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(o0.current),Y.current="")}),onPointerMove:B0(e.onPointerMove,Ca(X=>{const G=X.target,N=i0.current!==X.clientX;if(X.currentTarget.contains(G)&&N){const I=X.clientX>i0.current?"right":"left";J.current=I,i0.current=X.clientX}}))})})})})})})});zm.displayName=Q2;var VY="MenuGroup",$d=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"group",...n,ref:t})});$d.displayName=VY;var QY="MenuLabel",um=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{...n,ref:t})});um.displayName=QY;var Xp="MenuItem",$f="menu.itemSelect",K3=p.forwardRef((e,t)=>{const{disabled:o=!1,onSelect:n,...r}=e,a=p.useRef(null),i=as(Xp,e.__scopeMenu),l=Vd(Xp,e.__scopeMenu),z=E1(t,a),u=p.useRef(!1),f=()=>{const O=a.current;if(!o&&O){const h=new CustomEvent($f,{bubbles:!0,cancelable:!0});O.addEventListener($f,q=>n?.(q),{once:!0}),Sh(O,h),h.defaultPrevented?u.current=!1:i.onClose()}};return b.jsx(dm,{...r,ref:z,disabled:o,onClick:B0(e.onClick,f),onPointerDown:O=>{e.onPointerDown?.(O),u.current=!0},onPointerUp:B0(e.onPointerUp,O=>{u.current||O.currentTarget?.click()}),onKeyDown:B0(e.onKeyDown,O=>{const h=l.searchRef.current!=="";o||h&&O.key===" "||Qz.includes(O.key)&&(O.currentTarget.click(),O.preventDefault())})})});K3.displayName=Xp;var dm=p.forwardRef((e,t)=>{const{__scopeMenu:o,disabled:n=!1,textValue:r,...a}=e,i=Vd(Xp,o),l=pm(o),z=p.useRef(null),u=E1(t,z),[f,O]=p.useState(!1),[h,q]=p.useState("");return p.useEffect(()=>{const g=z.current;g&&q((g.textContent??"").trim())},[a.children]),b.jsx(ka.ItemSlot,{scope:o,disabled:n,textValue:r??h,children:b.jsx(Uj,{asChild:!0,...l,focusable:!n,children:b.jsx(R1.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:B0(e.onPointerMove,Ca(g=>{n?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B0(e.onPointerLeave,Ca(g=>i.onItemLeave(g))),onFocus:B0(e.onFocus,()=>O(!0)),onBlur:B0(e.onBlur,()=>O(!1))})})})}),$Y="MenuCheckboxItem",Om=p.forwardRef((e,t)=>{const{checked:o=!1,onCheckedChange:n,...r}=e;return b.jsx(mm,{scope:e.__scopeMenu,checked:o,children:b.jsx(K3,{role:"menuitemcheckbox","aria-checked":Dp(o)?"mixed":o,...r,ref:t,"data-state":Zd(o),onSelect:B0(r.onSelect,()=>n?.(Dp(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Om.displayName=$Y;var fm="MenuRadioGroup",[GY,ZY]=Kn(fm,{value:void 0,onValueChange:()=>{}}),Am=p.forwardRef((e,t)=>{const{value:o,onValueChange:n,...r}=e,a=Tt(n);return b.jsx(GY,{scope:e.__scopeMenu,value:o,onValueChange:a,children:b.jsx($d,{...r,ref:t})})});Am.displayName=fm;var hm="MenuRadioItem",qm=p.forwardRef((e,t)=>{const{value:o,...n}=e,r=ZY(hm,e.__scopeMenu),a=o===r.value;return b.jsx(mm,{scope:e.__scopeMenu,checked:a,children:b.jsx(K3,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Zd(a),onSelect:B0(n.onSelect,()=>r.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});qm.displayName=hm;var Gd="MenuItemIndicator",[mm,KY]=Kn(Gd,{checked:!1}),gm=p.forwardRef((e,t)=>{const{__scopeMenu:o,forceMount:n,...r}=e,a=KY(Gd,o);return b.jsx(q2,{present:n||Dp(a.checked)||a.checked===!0,children:b.jsx(R1.span,{...r,ref:t,"data-state":Zd(a.checked)})})});gm.displayName=Gd;var YY="MenuSeparator",Wm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Wm.displayName=YY;var JY="MenuArrow",vm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=Z3(o);return b.jsx(d3,{...r,...n,ref:t})});vm.displayName=JY;var eJ="MenuSub",[Pc0,Rm]=Kn(eJ),za="MenuSubTrigger",ym=p.forwardRef((e,t)=>{const o=Yn(za,e.__scopeMenu),n=as(za,e.__scopeMenu),r=Rm(za,e.__scopeMenu),a=Vd(za,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:z}=a,u={__scopeMenu:e.__scopeMenu},f=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>f,[f]),p.useEffect(()=>{const O=l.current;return()=>{window.clearTimeout(O),z(null)}},[l,z]),b.jsx(Hd,{asChild:!0,...u,children:b.jsx(dm,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":r.contentId,"data-state":xm(o.open),...e,ref:Vn(t,r.onTriggerChange),onClick:O=>{e.onClick?.(O),!(e.disabled||O.defaultPrevented)&&(O.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:B0(e.onPointerMove,Ca(O=>{a.onItemEnter(O),!O.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100))})),onPointerLeave:B0(e.onPointerLeave,Ca(O=>{f();const h=o.content?.getBoundingClientRect();if(h){const q=o.content?.dataset.side,g=q==="right",W=g?-5:5,v=h[g?"left":"right"],y=h[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:O.clientX+W,y:O.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:q}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(O),O.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:B0(e.onKeyDown,O=>{const h=a.searchRef.current!=="";e.disabled||h&&O.key===" "||EY[n.dir].includes(O.key)&&(o.onOpenChange(!0),o.content?.focus(),O.preventDefault())})})})});ym.displayName=za;var wm="MenuSubContent",Lm=p.forwardRef((e,t)=>{const o=lm(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=as(Q2,e.__scopeMenu),l=Rm(wm,e.__scopeMenu),z=p.useRef(null),u=E1(t,z);return b.jsx(ka.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(ka.Slot,{scope:e.__scopeMenu,children:b.jsx(Qd,{id:l.contentId,"aria-labelledby":l.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&z.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B0(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:B0(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:B0(e.onKeyDown,f=>{const O=f.currentTarget.contains(f.target),h=BY[i.dir].includes(f.key);O&&h&&(a.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Lm.displayName=wm;function xm(e){return e?"open":"closed"}function Dp(e){return e==="indeterminate"}function Zd(e){return Dp(e)?"indeterminate":e?"checked":"unchecked"}function tJ(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function oJ(e,t){return e.map((o,n)=>e[(t+n)%e.length])}function nJ(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let i=oJ(e,Math.max(a,0));r.length===1&&(i=i.filter(u=>u!==o));const z=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return z!==o?z:void 0}function rJ(e,t){const{x:o,y:n}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],z=t[i],u=l.x,f=l.y,O=z.x,h=z.y;f>n!=h>n&&o<(O-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function cJ(e,t){if(!t)return!1;const o={x:e.clientX,y:e.clientY};return rJ(o,t)}function Ca(e){return t=>t.pointerType==="mouse"?e(t):void 0}var aJ=Mm,sJ=Hd,iJ=bm,pJ=zm,MJ=$d,lJ=um,bJ=K3,zJ=Om,uJ=Am,dJ=qm,OJ=gm,fJ=Wm,AJ=vm,hJ=ym,qJ=Lm,Y3="DropdownMenu",[mJ]=Y2(Y3,[im]),n2=im(),[gJ,km]=mJ(Y3),Cm=e=>{const{__scopeDropdownMenu:t,children:o,dir:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,z=n2(t),u=p.useRef(null),[f,O]=Qn({prop:r,defaultProp:a??!1,onChange:i,caller:Y3});return b.jsx(gJ,{scope:t,triggerId:ft(),triggerRef:u,contentId:ft(),open:f,onOpenChange:O,onOpenToggle:p.useCallback(()=>O(h=>!h),[O]),modal:l,children:b.jsx(aJ,{...z,open:f,onOpenChange:O,dir:n,modal:l,children:o})})};Cm.displayName=Y3;var Nm="DropdownMenuTrigger",_m=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,disabled:n=!1,...r}=e,a=km(Nm,o),i=n2(o);return b.jsx(sJ,{asChild:!0,...i,children:b.jsx(R1.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":n?"":void 0,disabled:n,...r,ref:Vn(t,a.triggerRef),onPointerDown:B0(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:B0(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});_m.displayName=Nm;var WJ="DropdownMenuPortal",Em=e=>{const{__scopeDropdownMenu:t,...o}=e,n=n2(t);return b.jsx(iJ,{...n,...o})};Em.displayName=WJ;var Bm="DropdownMenuContent",Sm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=km(Bm,o),a=n2(o),i=p.useRef(!1);return b.jsx(pJ,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...n,ref:t,onCloseAutoFocus:B0(e.onCloseAutoFocus,l=>{i.current||r.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:B0(e.onInteractOutside,l=>{const z=l.detail.originalEvent,u=z.button===0&&z.ctrlKey===!0,f=z.button===2||u;(!r.modal||f)&&(i.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)"}})});Sm.displayName=Bm;var vJ="DropdownMenuGroup",Tm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(MJ,{...r,...n,ref:t})});Tm.displayName=vJ;var RJ="DropdownMenuLabel",Pm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(lJ,{...r,...n,ref:t})});Pm.displayName=RJ;var yJ="DropdownMenuItem",jm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(bJ,{...r,...n,ref:t})});jm.displayName=yJ;var wJ="DropdownMenuCheckboxItem",Xm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(zJ,{...r,...n,ref:t})});Xm.displayName=wJ;var LJ="DropdownMenuRadioGroup",xJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(uJ,{...r,...n,ref:t})});xJ.displayName=LJ;var kJ="DropdownMenuRadioItem",Dm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(dJ,{...r,...n,ref:t})});Dm.displayName=kJ;var CJ="DropdownMenuItemIndicator",Im=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(OJ,{...r,...n,ref:t})});Im.displayName=CJ;var NJ="DropdownMenuSeparator",Fm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(fJ,{...r,...n,ref:t})});Fm.displayName=NJ;var _J="DropdownMenuArrow",EJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(AJ,{...r,...n,ref:t})});EJ.displayName=_J;var BJ="DropdownMenuSubTrigger",Hm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(hJ,{...r,...n,ref:t})});Hm.displayName=BJ;var SJ="DropdownMenuSubContent",Um=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(qJ,{...r,...n,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)"}})});Um.displayName=SJ;var TJ=Cm,PJ=_m,jJ=Em,Vm=Sm,XJ=Tm,Qm=Pm,$m=jm,Gm=Xm,Zm=Dm,Km=Im,Ym=Fm,Jm=Hm,eg=Um;const tg=TJ,og=PJ,jc0=XJ,DJ=p.forwardRef(({className:e,inset:t,children:o,...n},r)=>b.jsxs(Jm,{ref:r,className:R0("flex cursor-default gap-2 select-none hover:bg-accent items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[o,b.jsx(H3,{className:"ml-auto"})]}));DJ.displayName=Jm.displayName;const IJ=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{className:ho,children:b.jsx(eg,{ref:o,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));IJ.displayName=eg.displayName;const Kd=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(jJ,{children:b.jsx("div",{className:ho,children:b.jsx(Vm,{ref:n,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:t,...o})})}));Kd.displayName=Vm.displayName;const ng=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx($m,{ref:n,className:R0("relative flex cursor-default select-none cursor-pointer items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));ng.displayName=$m.displayName;const FJ=p.forwardRef(({className:e,children:t,checked:o,...n},r)=>b.jsxs(Gm,{ref:r,checked:o,className:R0("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx(Km,{children:b.jsx(j9,{className:"size-4"})})}),t]}));FJ.displayName=Gm.displayName;const HJ=p.forwardRef(({className:e,children:t,...o},n)=>b.jsxs(Zm,{ref:n,className:R0("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx(Km,{children:b.jsx(qZ,{className:"size-2 fill-current"})})}),t]}));HJ.displayName=Zm.displayName;const UJ=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx(Qm,{ref:n,className:R0("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));UJ.displayName=Qm.displayName;const Pn=p.forwardRef(({className:e,...t},o)=>b.jsx(Ym,{ref:o,className:R0("-mx-1 my-1 h-px bg-muted",e),...t}));Pn.displayName=Ym.displayName;const rg=p.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},r)=>b.jsx(Xh,{ref:r,className:R0("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),decorative:o,orientation:t,...n}));rg.displayName=Xh.displayName;const VJ=eI,QJ=tI,Tb=nI,cg=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx(oI,{children:b.jsx("div",{className:ho,children:b.jsx(gq,{ref:r,align:t,className:R0("z-50 rounded-md bg-white dark:bg-gray-950 p-5 text-popover-foreground shadow-md border outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",e),sideOffset:o,...n})})}));cg.displayName=gq.displayName;const $J=Ao("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-5 w-9",sm:"h-4 w-7"}},defaultVariants:{size:"default"}}),GJ=Ao("pointer-events-none block rounded-full bg-background ring-0 [filter:drop-shadow(0_1px_2px_rgba(0,0,0,0.07))] transition-transform data-[state=unchecked]:translate-x-0",{variants:{size:{default:"size-4 data-[state=checked]:translate-x-4",sm:"size-3 data-[state=checked]:translate-x-3"}},defaultVariants:{size:"default"}}),ag=p.forwardRef(({className:e,size:t,...o},n)=>b.jsx(g7,{className:R0($J({size:t,className:e})),...o,ref:n,children:b.jsx(Zj,{className:R0(GJ({size:t}))})}));ag.displayName=g7.displayName;const ZJ=BX,KJ=SX,YJ=TX,sg=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(PX,{children:b.jsx("div",{className:ho,children:b.jsx(U7,{ref:n,className:R0("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),sideOffset:t,...o})})}));sg.displayName=U7.displayName;var Pb,J3="HoverCard",[ig]=Y2(J3,[bn]),eM=bn(),[JJ,tM]=ig(J3),pg=e=>{const{__scopeHoverCard:t,children:o,open:n,defaultOpen:r,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,z=eM(t),u=p.useRef(0),f=p.useRef(0),O=p.useRef(!1),h=p.useRef(!1),[q,g]=Qn({prop:n,defaultProp:r??!1,onChange:a,caller:J3}),W=p.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=p.useCallback(()=>{clearTimeout(u.current),!O.current&&!h.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),y=p.useCallback(()=>g(!1),[g]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),b.jsx(JJ,{scope:t,open:q,onOpenChange:g,onOpen:W,onClose:v,onDismiss:y,hasSelectionRef:O,isPointerDownOnContentRef:h,children:b.jsx(z3,{...z,children:o})})};pg.displayName=J3;var Mg="HoverCardTrigger",lg=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=tM(Mg,o),a=eM(o);return b.jsx(Fa,{asChild:!0,...a,children:b.jsx(R1.a,{"data-state":r.open?"open":"closed",...n,ref:t,onPointerEnter:B0(e.onPointerEnter,Fp(r.onOpen)),onPointerLeave:B0(e.onPointerLeave,Fp(r.onClose)),onFocus:B0(e.onFocus,r.onOpen),onBlur:B0(e.onBlur,r.onClose),onTouchStart:B0(e.onTouchStart,i=>i.preventDefault())})})});lg.displayName=Mg;var Yd="HoverCardPortal",[e00,t00]=ig(Yd,{forceMount:void 0}),bg=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:r}=e,a=tM(Yd,t);return b.jsx(e00,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(rc,{asChild:!0,container:r,children:n})})})};bg.displayName=Yd;var Ip="HoverCardContent",zg=p.forwardRef((e,t)=>{const o=t00(Ip,e.__scopeHoverCard),{forceMount:n=o.forceMount,...r}=e,a=tM(Ip,e.__scopeHoverCard);return b.jsx(q2,{present:n||a.open,children:b.jsx(o00,{"data-state":a.open?"open":"closed",...r,onPointerEnter:B0(e.onPointerEnter,Fp(a.onOpen)),onPointerLeave:B0(e.onPointerLeave,Fp(a.onClose)),ref:t})})});zg.displayName=Ip;var o00=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,...l}=e,z=tM(Ip,o),u=eM(o),f=p.useRef(null),O=E1(t,f),[h,q]=p.useState(!1);return p.useEffect(()=>{if(h){const g=document.body;return Pb=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Pb,g.style.webkitUserSelect=Pb}}},[h]),p.useEffect(()=>{if(f.current){const g=()=>{q(!1),z.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(z.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!1}}},[z.isPointerDownOnContentRef,z.hasSelectionRef]),p.useEffect(()=>{f.current&&c00(f.current).forEach(W=>W.setAttribute("tabindex","-1"))}),b.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:B0(a,g=>{g.preventDefault()}),onDismiss:z.onDismiss,children:b.jsx(u3,{...u,...l,onPointerDown:B0(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&q(!0),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!0}),ref:O,style:{...l.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"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)"}})})}),n00="HoverCardArrow",r00=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=eM(o);return b.jsx(d3,{...r,...n,ref:t})});r00.displayName=n00;function Fp(e){return t=>t.pointerType==="touch"?void 0:e()}function c00(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)t.push(o.currentNode);return t}var a00=pg,s00=lg,i00=bg,ug=zg;const p00=a00,M00=s00,dg=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx(i00,{children:b.jsx("div",{className:ho,children:b.jsx(ug,{ref:r,align:t,className:R0("pointer-events-auto z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-hover-card-content-transform-origin)",e),sideOffset:o,...n})})}));dg.displayName=ug.displayName;const l00=Ao("rounded-full",{variants:{variant:{neutral:"bg-muted",info:"bg-blue-500",success:"bg-green-500",error:"bg-red-500",warning:"bg-yellow-500"},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-blue-500"},{variant:"success",state:"inactive",className:"border-green-500"},{variant:"error",state:"inactive",className:"border-red-500"},{variant:"warning",state:"inactive",className:"border-yellow-500"}],defaultVariants:{variant:"success",state:"idle",size:"sm"}});function Gf({className:e,variant:t,state:o,size:n,label:r,...a}){return b.jsxs("span",{className:"inline-flex items-center",...a,children:[b.jsx("span",{"aria-hidden":"true",className:R0(l00({variant:t,state:o,size:n}),e)}),r&&b.jsx("span",{className:"sr-only",children:r})]})}const oM=p.forwardRef(({className:e,type:t,...o},n)=>b.jsx("input",{ref:n,className:R0("flex h-9 w-full rounded-md border border-transparent bg-gray-150 dark:bg-gray-900 px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:bg-transparent focus-visible:border-green focus-visible:shadow-[0_0_0_2px_rgba(48,207,67,.25)] disabled:cursor-not-allowed disabled:opacity-50",e),type:t,...o}));oM.displayName="Input";function b00({className:e,...t}){return b.jsx("kbd",{className:R0("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-xs px-1 font-sans text-xs font-medium m-0 shadow-none border-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 j1({containerClassName:e,count:t=1,randomize:o=!1,minWidth:n=70,maxWidth:r=100,className:a,...i}){const{randomWidths:l,keys:z}=p.useMemo(()=>{const u=[],f=[];for(let O=0;O<t;O++){if(o){const h=Math.floor((r-n)/5),q=Math.floor(Math.random()*(h+1)),g=n+q*5;u.push(`${g}%`)}f.push(`skeleton-${O}`)}return{randomWidths:u,keys:f}},[t,o,n,r]);return b.jsx("span",{className:e,children:Array.from({length:t}).map((u,f)=>b.jsxs(M0.Fragment,{children:[b.jsx("span",{className:R0("inline-flex w-full leading-none animate-pulse rounded-[2px] bg-primary/10",a),style:o?{width:l[f]}:void 0,...i,children:""}),b.jsx("br",{})]},z[f]))})}const z00=M0.forwardRef(({className:e,lines:t=5,...o},n)=>t<1?b.jsx(b.Fragment,{}):b.jsx("div",{ref:n,className:R0("flex flex-col gap-2",e),...o,children:Array.from({length:t},(r,a)=>{let i="66%";switch(a%5){case 0:i="57%";break;case 1:i="33%";break;case 2:i="40%";break;case 3:i="48%";break;case 4:i="24%";break}return b.jsxs("div",{className:"flex justify-between gap-6",children:[b.jsx("div",{className:"grow",style:{maxWidth:i},children:b.jsx(j1,{})}),b.jsx(j1,{className:"w-[60px] self-end"})]},a)})}));z00.displayName="SkeletonTable";const Hp=({size:e="md",color:t="dark",className:o=""})=>{let n="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":n+=" h-[16px] w-[16px] border-2 before:mt-[10px] before:h-[3px] before:w-[3px]";break;case"md":n+=" h-[20px] w-[20px] border-2 before:mt-[13px] before:h-[3px] before:w-[3px]";break;case"lg":default:n+=" h-[50px] w-[50px] border before:mt-[7px] before:h-[7px] before:w-[7px]";break}switch(t){case"light":n+=" border-white/20 before:bg-white dark:border-black/10 dark:before:bg-black";break;case"dark":default:n+=" border-black/10 before:bg-black dark:border-white/20 dark:before:bg-white";break}return b.jsx("div",{className:`${n} ${o}`})},Xc0=()=>b.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:b.jsx("div",{className:"flex size-20 items-center justify-center rounded-full",children:b.jsxs("div",{className:"-mt-1.5 flex items-end gap-2",children:[b.jsx(j1,{className:"h-10 w-3"}),b.jsx(j1,{className:"h-14 w-3"}),b.jsx(j1,{className:"h-6 w-3"})]})})}),u00=({className:e="",children:t})=>b.jsx("div",{className:`my-10 flex flex-col items-center gap-1 text-sm text-grey-600 ${e}`,children:t}),d00=({className:e="",children:t})=>b.jsx("div",{className:`text-grey-500 [&>svg]:size-8 [&>svg]:stroke-[1px] ${e}`,children:t}),O00=dd,Dc0=Od,f00=fd,Og=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{className:R0("fixed inset-0 z-50 bg-black/10 data-[state=open]:animate-in duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Og.displayName=Ka.displayName;const A00=Ao("fixed z-50 gap-4 bg-background 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"}}),fg=p.forwardRef(({side:e="right",className:t,children:o,...n},r)=>b.jsx(f00,{children:b.jsxs("div",{className:ho,children:[b.jsx(Og,{}),b.jsxs(Ya,{ref:r,className:R0(A00({side:e}),t),...n,children:[b.jsxs(x3,{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:[b.jsx(Xd,{className:"size-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}),o]})]})}));fg.displayName=Ya.displayName;const h00=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-1 text-center sm:text-left",e),...t});h00.displayName="SheetHeader";const q00=p.forwardRef(({className:e,...t},o)=>b.jsx(Ja,{ref:o,className:R0("text-xl font-semibold text-foreground",e),...t}));q00.displayName=Ja.displayName;const m00=p.forwardRef(({className:e,...t},o)=>b.jsx(es,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));m00.displayName=es.displayName;const Ag=801;function jb(){return window.innerWidth<Ag}function g00(){const[e,t]=p.useState(jb());return p.useEffect(()=>{const o=window.matchMedia(`(max-width: ${Ag-1}px)`),n=()=>{t(jb())};return o.addEventListener("change",n),t(jb()),()=>o.removeEventListener("change",n)},[]),e}const W00="sidebar:state",v00=3600*24*7,R00="30rem",y00="28rem",w00="4rem",L00="b",nM="[34px]",hg=p.createContext(null);function Jn(){const e=p.useContext(hg);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const qg=p.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:o,className:n,style:r,children:a,...i},l)=>{const z=g00(),[u,f]=p.useState(!1),[O,h]=p.useState(e),q=t??O,g=p.useCallback(k=>{const C=typeof k=="function"?k(q):k;o?o(C):h(C),document.cookie=`${W00}=${C}; path=/; max-age=${v00}`},[o,q]),W=p.useCallback(()=>z?f(k=>!k):g(k=>!k),[z,g,f]);p.useEffect(()=>{const k=C=>{C.key===L00&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),W())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[W]);const v=q?"expanded":"collapsed",y=p.useMemo(()=>({state:v,open:q,setOpen:g,isMobile:z,openMobile:u,setOpenMobile:f,toggleSidebar:W}),[v,q,g,z,u,f,W]);return b.jsx(hg.Provider,{value:y,children:b.jsx(ZJ,{delayDuration:0,children:b.jsx("div",{ref:l,className:R0("group/sidebar-wrapper relative flex h-full w-full has-[[data-variant=inset]]:bg-sidebar",n),style:{"--sidebar-width":R00,"--sidebar-width-icon":w00,...r},...i,children:a})})})});qg.displayName="SidebarProvider";const mg=p.forwardRef(({side:e="left",variant:t="sidebar",collapsible:o="offcanvas",className:n,children:r,...a},i)=>{const{isMobile:l,state:z,openMobile:u,setOpenMobile:f}=Jn();return o==="none"?b.jsx("div",{ref:i,className:R0("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),role:"navigation",...a,children:r}):l?b.jsx(O00,{open:u,onOpenChange:f,...a,children:b.jsx(fg,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",role:"navigation",side:e,style:{"--sidebar-width":y00},children:b.jsx("div",{className:"flex size-full flex-col",children:r})})}):b.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":z==="collapsed"?o:"","data-side":e,"data-state":z,"data-variant":t,role:"navigation",children:[b.jsx("div",{className:R0("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)")}),b.jsx("div",{className:R0("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)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) border-sidebar-border group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children: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:r})})]})});mg.displayName="Sidebar";const gg=p.forwardRef(({children:e,className:t,onClick:o,...n},r)=>{const{toggleSidebar:a}=Jn();return b.jsx(i1,{ref:r,className:R0("h-7 w-7",t),"data-sidebar":"trigger",size:"icon",variant:"ghost",onClick:i=>{o?.(i),a()},...n,children:e||b.jsxs(b.Fragment,{children:[b.jsx(eK,{}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})})});gg.displayName="SidebarTrigger";const x00=p.forwardRef(({className:e,...t},o)=>{const{toggleSidebar:n}=Jn();return b.jsx("button",{ref:o,"aria-label":"Toggle Sidebar",className:R0("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 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:n,...t})});x00.displayName="SidebarRail";const Wg=p.forwardRef(({className:e,...t},o)=>b.jsx("main",{ref:o,className:R0("relative flex h-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Wg.displayName="SidebarInset";const k00=p.forwardRef(({className:e,...t},o)=>b.jsx(oM,{ref:o,className:R0("w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",`h-${nM}`,e),"data-sidebar":"input",...t}));k00.displayName="SidebarInput";const vg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"header",...t}));vg.displayName="SidebarHeader";const Rg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"footer",...t}));Rg.displayName="SidebarFooter";const C00=p.forwardRef(({className:e,...t},o)=>b.jsx(rg,{ref:o,className:R0("mx-2 w-auto bg-sidebar-border",e),"data-sidebar":"separator",...t}));C00.displayName="SidebarSeparator";const yg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex min-h-0 flex-1 flex-col gap-4 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-sidebar":"content",...t}));yg.displayName="SidebarContent";const lc=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("relative flex w-full min-w-0 flex-col p-2",e),"data-sidebar":"group",...t}));lc.displayName="SidebarGroup";const N00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?pc:"div";return b.jsx(r,{ref:n,className:R0("duration-200 flex shrink-0 items-center rounded-md px-3 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] 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-${nM}`,e),"data-sidebar":"group-label",...o})});N00.displayName="SidebarGroupLabel";const _00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?pc:"button";return b.jsx(r,{ref:n,className:R0("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring 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",...o})});_00.displayName="SidebarGroupAction";const ss=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("w-full text-sm",e),"data-sidebar":"group-content",...t}));ss.displayName="SidebarGroupContent";const bc=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("flex w-full min-w-0 flex-col gap-0.5",e),"data-sidebar":"menu",...t}));bc.displayName="SidebarMenu";const Jd=p.forwardRef(({className:e,...t},o)=>b.jsx("li",{ref:o,className:R0("group/menu-item relative",e),"data-sidebar":"menu-item",...t}));Jd.displayName="SidebarMenuItem";const E00=Ao("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md px-3 py-2 text-left text-md font-medium text-sidebar-foreground ring-sidebar-ring outline-hidden transition-[width,height,padding] 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 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-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:`h-${nM} text-md`,sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),rM=p.forwardRef(({asChild:e=!1,isActive:t=!1,variant:o="default",size:n="default",tooltip:r,className:a,...i},l)=>{const z=e?pc:"button",{isMobile:u,state:f}=Jn(),O=b.jsx(z,{ref:l,className:R0(E00({variant:o,size:n}),a),"data-active":t,"data-sidebar":"menu-button","data-size":n,...i});return r?(typeof r=="string"&&(r={children:r}),b.jsxs(KJ,{children:[b.jsx(YJ,{asChild:!0,children:O}),b.jsx(sg,{align:"center",hidden:f!=="collapsed"||u,side:"right",...r})]})):O});rM.displayName="SidebarMenuButton";const B00=p.forwardRef(({className:e,asChild:t=!1,showOnHover:o=!1,...n},r)=>{const a=t?pc:"button";return b.jsx(a,{ref:r,className:R0("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>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",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),"data-sidebar":"menu-action",...n})});B00.displayName="SidebarMenuAction";const e5=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("absolute right-2 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-gray-600 select-none pointer-events-none","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}));e5.displayName="SidebarMenuBadge";const S00=p.forwardRef(({className:e,showIcon:t=!1,...o},n)=>{const r=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b.jsxs("div",{ref:n,className:R0("rounded-md flex gap-2 px-3 items-center",`h-${nM}`,e),"data-sidebar":"menu-skeleton",...o,children:[t&&b.jsx(j1,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),b.jsx(j1,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});S00.displayName="SidebarMenuSkeleton";const T00=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("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}));T00.displayName="SidebarMenuSub";const P00=p.forwardRef(({...e},t)=>b.jsx("li",{ref:t,...e}));P00.displayName="SidebarMenuSubItem";const j00=p.forwardRef(({asChild:e=!1,size:t="md",isActive:o,className:n,...r},a)=>{const i=e?pc:"a";return b.jsx(i,{ref:a,className:R0("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-3 text-sidebar-foreground outline-hidden ring-sidebar-ring 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",n),"data-active":o,"data-sidebar":"menu-sub-button","data-size":t,...r})});j00.displayName="SidebarMenuSubButton";const Up=p.forwardRef(({className:e,onBackToDashboard:t,...o},n)=>b.jsx("div",{ref:n,className:R0("admin-x-container-error",e),...o,children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),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."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:t,children:"← Back to the dashboard"})]})}));Up.displayName="ErrorPage";const wg=p.forwardRef(({className:e,...t},o)=>b.jsx("h1",{ref:o,className:R0("scroll-m-20 text-3xl leading-[1.1em] tracking-tighter font-bold",e),...t}));wg.displayName="H1";const X00=p.forwardRef(({className:e,...t},o)=>b.jsx("h2",{ref:o,className:R0("scroll-m-20 text-2xl font-bold tracking-tighter first:mt-0",e),...t}));X00.displayName="H2";const Lg=p.forwardRef(({className:e,...t},o)=>b.jsx("h3",{ref:o,className:R0("scroll-m-20 text-xl font-semibold tracking-tight",e),...t}));Lg.displayName="H3";const V2=p.forwardRef(({className:e,...t},o)=>b.jsx("h4",{ref:o,className:R0("scroll-m-20 text-lg font-semibold tracking-tight",e),...t}));V2.displayName="H4";const D00=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("text-xs text-muted-foreground tracking-wide font-medium uppercase",e),...t}));D00.displayName="HTable";const $z=new Map;p.createContext({saveScrollPosition:()=>{},getScrollPosition:()=>{},resetScrollPosition:()=>{}});function I00(e){$z.delete(e)}function F00({containerRef:e}){const t=we(),o=p.useRef(null),n=p.useRef(null);return p.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const i=r.scrollTop;$z.set(t.pathname,i),n.current=i};return r.addEventListener("scroll",a),()=>r.removeEventListener("scroll",a)},[t.pathname,e]),p.useEffect(()=>{const r=e.current;if(!r)return;const a=$z.get(t.pathname);a!==void 0&&o.current!==t.pathname&&Math.abs(a-r.scrollTop)>5&&(r.scrollTop=a)},[t.pathname,e]),p.useEffect(()=>{o.current=t.pathname},[t.pathname]),null}function H00({routes:e,prefix:t,errorElement:o,children:n}){const r=p.useMemo(()=>{const a=`/${t?.replace(/\/+/g,"/").replace(/^\/|\/$/g,"")}`,i={element:b.jsx(FH,{children:n}),children:e.map(l=>({...l,errorElement:l.errorElement||o||b.jsx(Up,{})}))};return CH([i],{basename:a})},[e,t,o,n]);return b.jsx(nH,{router:r})}function xg(){const e=$a(),{externalNavigate:t}=Ta();return p.useCallback((o,n)=>{if(typeof o=="number"){e(o);return}if(n?.crossApp){t({route:o,isExternal:!0});return}e(o,n)},[e,t])}function U00(){const e=FF();return e&&Object.keys(e).length>0}function ro({to:e,replace:t,state:o,crossApp:n}){const{externalNavigate:r}=Ta();return n?(r({route:e,isExternal:!0}),null):b.jsx(aH,{replace:t,state:o,to:e})}function w1(e){return()=>e().then(({default:t})=>({Component:t}))}const V00="FeaturebaseTokenResponseType",Q00={staleTime:7200*60*1e3,refetchInterval:8640*60*1e3,refetchIntervalInBackground:!0},$00=Xt({dataType:V00,path:"/featurebase/token/"}),G00=(e={})=>$00({...Q00,...e}),kg=p.createContext(void 0);function Cg(){const e=p.useContext(kg);if(e===void 0)throw new Error("useEmberContext must be used within an EmberProvider");return e}const Zf=M0.memo(function(){const t=p.useRef(null),{isFallbackPresent:o}=Cg();return p.useLayoutEffect(()=>{if(t.current){const n=document.getElementById("ember-app");if(n)t.current.appendChild(n);else throw new Error("Ember app not found")}return()=>{const n=document.getElementById("ember-app");if(n)document.body.appendChild(n);else throw new Error("Ember app not found")}},[]),b.jsx("div",{ref:t,hidden:!o,className:"h-full w-full"})});function Z00({children:e}){const[t,o]=p.useState(0),n=p.useCallback(()=>{o(l=>l+1)},[]),r=p.useCallback(()=>{o(l=>Math.max(0,l-1))},[]),i={isFallbackPresent:t>0,registerFallback:n,unregisterFallback:r};return b.jsx(kg.Provider,{value:i,children:e})}function t5(){const{registerFallback:e,unregisterFallback:t}=Cg();return p.useEffect(()=>(e(),()=>{t()}),[e,t]),null}const Ng="ConfigResponseType",Ic0=Ng,is=Xt({dataType:Ng,path:"/config/"}),K00=e=>{var t,o;return!!((o=(t=e?.hostSettings)==null?void 0:t.managedEmail)!=null&&o.enabled)},Y00=e=>{var t,o;const n=(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain;return typeof n=="string"&&n.length>0},J00=e=>{var t,o;return(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain},e10={integration:"IntegrationsResponseType",invite:"InvitesResponseType",offer:"OffersResponseType",newsletter:"NewslettersResponseType",recommendation:"RecommendationResponseType",setting:"SettingsResponseType",theme:"ThemesResponseType",tier:"TiersResponseType",user:"UsersResponseType",post:"PostsResponseType",member:"MembersResponseType",tag:"TagsResponseType",label:"LabelsResponseType",webhook:"WebhooksResponseType"};function _g(e){if(typeof window>"u")return()=>{};if(window.EmberBridge?.state)return e(window.EmberBridge.state),()=>{};const t=setInterval(()=>{window.EmberBridge?.state&&(clearInterval(t),e(window.EmberBridge.state))},100);return()=>clearInterval(t)}function cM(e,t){let o=null,n=!0;const r=_g(a=>{n&&(a.on(e,t),o=()=>a.off(e,t))});return()=>{n=!1,r(),o?.()}}function t10(){const e=v1();p.useEffect(()=>cM("emberDataChange",o=>{const{modelName:n}=o,r=e10[n];r&&e.invalidateQueries({predicate:a=>a.queryKey[0]===r})}),[e])}function o10(){const e=v1();p.useEffect(()=>cM("emberAuthChange",o=>{o.isAuthenticated&&e.invalidateQueries()}),[e])}function Eg(){const[e,t]=p.useState(null);return p.useEffect(()=>cM("subscriptionChange",n=>{t(n)}),[]),e}function n10(e){return cM("sidebarVisibilityChange",e)}function Kf(){return window.EmberBridge?.state.sidebarVisible??!0}function o5(){return p.useSyncExternalStore(n10,Kf,Kf)}const r10={getRouteUrl:e=>e,isRouteActive:()=>!1};function Bg(){const[e,t]=p.useState(()=>window.EmberBridge?.state??null),[,o]=p.useState(0);return p.useEffect(()=>{if(!e)return _g(t);const n=()=>{o(r=>r+1)};return e.on("routeChange",n),()=>e.off("routeChange",n)},[e]),e?{getRouteUrl:e.getRouteUrl,isRouteActive:e.isRouteActive}:r10}function c10(){const{data:e}=is(),t=Eg();return!(!e?.config?.hostSettings?.forceUpgrade||t?.subscription?.status==="active")}function a10(){const e=c10(),o=pd().some(n=>n.handle?.allowInForceUpgrade===!0);return e&&!o?b.jsx(ro,{to:"/pro",replace:!0}):b.jsx(Bn,{})}const ps=vq,Fc0=wq({dataType:ps,path:"/users/",defaultSearchParams:{limit:"100",include:"roles"},defaultNextPageParams:(e,t)=>{var o;return{...t,page:(((o=e.meta)==null?void 0:o.pagination.next)||1).toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.users),n=t[t.length-1].meta;return{users:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}}),Hc0=WI({dataType:ps,path:e=>`/users/slug/${e}/`,defaultSearchParams:{include:"roles"}}),Sg=Ve({method:"PUT",path:e=>`/users/${e.id}/`,body:e=>({users:[e]}),searchParams:()=>({include:"roles"}),updateQueries:{dataType:ps,emberUpdateType:"createOrUpdate",update:Lq("users")}}),Uc0=Ve({method:"DELETE",path:e=>`/users/${e}/`,updateQueries:{dataType:ps,emberUpdateType:"delete",update:kI("users")}}),Vc0=Ve({method:"PUT",path:()=>"/users/password/",body:({newPassword:e,confirmNewPassword:t,userId:o,oldPassword:n})=>({password:[{user_id:o,oldPassword:n||"",newPassword:e,ne2Password:t}]})}),Qc0=Ve({method:"PUT",path:()=>"/users/owner/",body:e=>({owner:[{id:e}]}),updateQueries:{dataType:ps,emberUpdateType:"createOrUpdate",update:Lq("users")}});function Ms(e){return e.roles.some(t=>t.name==="Owner")}function aM(e){return e.roles.some(t=>t.name==="Administrator")}function Tg(e){return e.roles.some(o=>o.name==="Editor")||e.roles.some(o=>o.name==="Super Editor")}function s10(e){return e.roles.some(t=>t.name==="Super Editor")}function i10(e){return e.roles.some(t=>t.name==="Author")}function ls(e){return e.roles.some(t=>t.name==="Contributor")}function $c0(e){return i10(e)||ls(e)}function p10(e){return Ms(e)||aM(e)||Tg(e)}function M10(e){return Ms(e)||aM(e)||s10(e)}function l10(e){return Ms(e)||aM(e)||Tg(e)}function b10(e){return Ms(e)||aM(e)}const z10="SiteResponseType",sM=Xt({dataType:z10,path:"/site/"});function Gc0(e){const t=new URL(e.url),o=t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`;return`${t.origin}${o}`}function u10(e,t){if(K00(t)&&Y00(t))return J00(t)||"";const o=new URL(e.url).hostname||"";return o.startsWith("www.")?o.replace(/^(www)\.(?=[^/]*\..{2,5})/,""):o}function Zc0(e,t,o){const n=u10(t,o);return e==="noreply"?`noreply@${n}`:e}const Gz=navigator.userAgent.indexOf("Mac")!==-1?"command":"ctrl",d10=Gz==="command"?"⌘K":"Ctrl+K",O10=e=>{e.preventDefault();const t=new KeyboardEvent("keydown",{key:"k",keyCode:75,metaKey:Gz==="command",ctrlKey:Gz==="ctrl"});document.dispatchEvent(t)};function f10({...e}){const{data:t}=ye(),o=sM(),n=o.data?.site.title??"",r=o.data?.site.icon??"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",a=t&&!ls(t);return b.jsx(vg,{...e,children:b.jsxs("div",{className:"flex flex-col items-stretch gap-6",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[b.jsx("div",{className:"h-8 w-8 flex-shrink-0 rounded-md border-0 bg-transparent",children:b.jsx("img",{src:r,alt:"Site icon",className:"h-full w-full rounded-md object-cover"})}),b.jsx("div",{className:"flex-1 overflow-hidden text-[15px] font-semibold text-ellipsis whitespace-nowrap text-foreground",children:n})]})}),a&&b.jsxs(i1,{variant:"outline",className:"flex h-[38px] items-center justify-between pr-2 text-base text-muted-foreground shadow-xs hover:border-gray-200 hover:bg-background hover:text-gray-700 hover:shadow-sm dark:bg-gray-950 dark:hover:border-gray-800 [&_svg]:stroke-2",onClick:O10,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Td,{className:"text-muted-foreground"}),"Search site"]}),b.jsx(b00,{className:"bg-transparent text-gray-500 shadow-none dark:text-gray-800",style:{textShadow:"none"},children:d10})]})]})})}function a0(e,t,o){function n(l,z){var u;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(u=l._zod).traits??(u.traits=new Set),l._zod.traits.add(e),t(l,z);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=z}const r=o?.Parent??Object;class a extends r{}Object.defineProperty(a,"name",{value:e});function i(l){var z;const u=o?.Parent?new a:this;n(u,l),(z=u._zod).deferred??(z.deferred=[]);for(const f of u._zod.deferred)f();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>o?.Parent&&l instanceof o.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const jg={};function sn(e){return jg}function A10(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,r])=>t.indexOf(+n)===-1).map(([n,r])=>r)}function Zz(e,t){return typeof t=="bigint"?t.toString():t}function n5(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function r5(e){return e==null}function c5(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}const Yf=Symbol("evaluating");function k1(e,t,o){let n;Object.defineProperty(e,t,{get(){if(n!==Yf)return n===void 0&&(n=Yf,n=o()),n},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function er(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){const t={};for(const o of e){const n=Object.getOwnPropertyDescriptors(o);Object.assign(t,n)}return Object.defineProperties({},t)}function Jf(e){return JSON.stringify(e)}const Xg="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const h10=n5(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Kr(e){if(Vp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const o=t.prototype;return!(Vp(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Dg(e){return Kr(e)?{...e}:Array.isArray(e)?[...e]:e}const q10=new Set(["string","number","symbol"]);function Yr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dn(e,t,o){const n=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(n._zod.parent=e),n}function Q0(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function m10(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function g10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(r[a]=o.shape[a])}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function W10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete r[a]}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function v10(e,t){if(!Kr(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=tr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return er(this,"shape",a),a},checks:[]});return dn(e,r)}function R10(e,t){if(!Kr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return er(this,"shape",n),n},checks:e._zod.def.checks};return dn(e,o)}function y10(e,t){const o=tr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return er(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return dn(e,o)}function w10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)a[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return er(this,"shape",a),a},checks:[]});return dn(t,n)}function L10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)a[i]=new e({type:"nonoptional",innerType:r[i]});return er(this,"shape",a),a},checks:[]});return dn(t,n)}function _r(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Er(e,t){return t.map(o=>{var n;return(n=o).path??(n.path=[]),o.path.unshift(e),o})}function Pi(e){return typeof e=="string"?e:e?.message}function pn(e,t,o){const n={...e,path:e.path??[]};if(!e.message){const r=Pi(e.inst?._zod.def?.error?.(e))??Pi(t?.error?.(e))??Pi(o.customError?.(e))??Pi(o.localeError?.(e))??"Invalid input";n.message=r}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function a5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Na(...e){const[t,o,n]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:n}:{...t}}const Ig=(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,Zz,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fg=a0("$ZodError",Ig),iM=a0("$ZodError",Ig,{Parent:Error});function x10(e,t=o=>o.message){const o={},n=[];for(const r of e.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:o}}function k10(e,t=o=>o.message){const o={_errors:[]},n=r=>{for(const a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>n({issues:i}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)o._errors.push(t(a));else{let i=o,l=0;for(;l<a.path.length;){const z=a.path[l];l===a.path.length-1?(i[z]=i[z]||{_errors:[]},i[z]._errors.push(t(a))):i[z]=i[z]||{_errors:[]},i=i[z],l++}}};return n(e),o}const pM=e=>(t,o,n,r)=>{const a=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise)throw new Hr;if(i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Xg(l,r?.callee),l}return i.value},Kc0=pM(iM),MM=e=>async(t,o,n,r)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Xg(l,r?.callee),l}return i.value},Yc0=MM(iM),lM=e=>(t,o,n)=>{const r=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Hr;return a.issues.length?{success:!1,error:new(e??Fg)(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},C10=lM(iM),bM=e=>async(t,o,n)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:o,issues:[]},r);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},N10=bM(iM),_10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return pM(e)(t,o,r)},E10=e=>(t,o,n)=>pM(e)(t,o,n),B10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return MM(e)(t,o,r)},S10=e=>async(t,o,n)=>MM(e)(t,o,n),T10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return lM(e)(t,o,r)},P10=e=>(t,o,n)=>lM(e)(t,o,n),j10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bM(e)(t,o,r)},X10=e=>async(t,o,n)=>bM(e)(t,o,n),D10=/^[cC][^\s-]{8,}$/,I10=/^[0-9a-z]+$/,F10=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,H10=/^[0-9a-vA-V]{20}$/,U10=/^[A-Za-z0-9]{27}$/,V10=/^[a-zA-Z0-9_-]{21}$/,Q10=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$10=/^([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})$/,eA=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,G10=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z10="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function K10(){return new RegExp(Z10,"u")}const Y10=/^(?:(?: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])$/,J10=/^(([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}|:))$/,ee0=/^((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])$/,te0=/^(([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])$/,oe0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hg=/^[A-Za-z0-9_-]*$/,ne0=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,re0=/^\+(?:[0-9]){6,14}[0-9]$/,Ug="(?:(?:\\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])))",ce0=new RegExp(`^${Ug}$`);function Vg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ae0(e){return new RegExp(`^${Vg(e)}$`)}function se0(e){const t=Vg({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${o.join("|")})`;return new RegExp(`^${Ug}T(?:${n})$`)}const ie0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pe0=/^(?:true|false)$/i,Me0=/^[^A-Z]*$/,le0=/^[^a-z]*$/,ot=a0("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),Qg={number:"number",bigint:"bigint",object:"date"},be0=a0("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);const o=Qg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:o,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ze0=a0("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);const o=Qg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:o,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ue0=a0("$ZodCheckMaxLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!r5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const i=a5(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),de0=a0("$ZodCheckMinLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!r5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const i=a5(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Oe0=a0("$ZodCheckLengthEquals",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!r5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const i=a5(r),l=a>t.length;n.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),zM=a0("$ZodCheckStringFormat",(e,t)=>{var o,n;ot.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),fe0=a0("$ZodCheckRegex",(e,t)=>{zM.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ae0=a0("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Me0),zM.init(e,t)}),he0=a0("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=le0),zM.init(e,t)}),qe0=a0("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);const o=Yr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=n,e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),me0=a0("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`^${Yr(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),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})}}),ge0=a0("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`.*${Yr(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),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})}}),We0=a0("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class ve0{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
600
|
+
`),p.createElement("g",null,p.createElement("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}),p.createElement("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}),p.createElement("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}),p.createElement("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}),p.createElement("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}))),pY="data:image/svg+xml,%3csvg%20height='16'%20id='Skull-2--Streamline-Ultimate'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdesc%3e%20Skull%202%20Streamline%20Icon:%20https://streamlinehq.com%20%3c/desc%3e%3cg%3e%3cpath%20d='M12.333333333333332%207.333333333333333a4.333333333333333%204.333333333333333%200%201%200%20-7.333333333333333%203.126666666666667v1.88a1%201%200%200%200%202%200%201%201%200%200%200%202%200%201%201%200%201%200%202%200v-1.88a4.326666666666666%204.326666666666666%200%200%200%201.3333333333333333%20-3.126666666666667Zm-6.253333333333334%201a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Zm4%200a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m1.8666666666666665%203.28%201.22%201.22a0.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%200.09333333333333334%200.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%20-0.14666666666666667%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%20-0.9733333333333333%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%20-0.2333333333333333%200.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%20-0.24666666666666665L3.28%201.8666666666666665A1.1666666666666665%201.1666666666666665%200%200%200%201.8399999999999999%200.11333333333333334a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%200.48l-0.09999999999999999%200.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%200.26666666666666666l-0.52%200.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%20-0.48%200.3666666666666667A1.1666666666666665%201.1666666666666665%200%200%200%201.8666666666666665%203.28Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M12.4%204.446666666666666a0.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%200.14666666666666667%200.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%20-0.09333333333333334l1.22%20-1.22a1.1666666666666665%201.1666666666666665%200%200%200%201.7533333333333332%20-1.44%200.6666666666666666%200.6666666666666666%200%200%200%20-0.48%20-0.3666666666666667l-0.52%20-0.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%20-0.26666666666666666l-0.09999999999999999%20-0.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%20-0.48%201.1666666666666665%201.1666666666666665%200%200%200%20-1.44%201.7533333333333332l-1.1333333333333333%201.1266666666666665a0.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%200.24666666666666665%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%200.2333333333333333%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%200.9733333333333333Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M3.6%2011.559999999999999a0.33999999999999997%200.33999999999999997%200%200%200%20-0.26666666666666666%20-0.15333333333333332%200.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%200.09333333333333334l-1.2%201.22a1.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%201.44%200.6666666666666666%200.6666666666666666%200%200%200%200.48%200.3666666666666667l0.52%200.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%200.26%200.26666666666666666l0.09999999999999999%200.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%200.48%201.1666666666666665%201.1666666666666665%200%200%200%201.44%20-1.7533333333333332l1.1333333333333333%20-1.1266666666666665a0.36%200.36%200%200%200%200.09333333333333334%20-0.24%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%20-0.24%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%20-0.9666666666666666Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m14.133333333333333%2012.719999999999999%20-1.22%20-1.22a0.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%20-0.09333333333333334%200.33999999999999997%200.33999999999999997%200%200%200%20-0.24666666666666665%200.15333333333333332%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%200.9666666666666666%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%200.24%200.36%200.36%200%200%200%200.09333333333333334%200.24l1.1333333333333333%201.1266666666666665a1.1666666666666665%201.1666666666666665%200%200%200%201.44%201.7533333333333332%200.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%20-0.48l0.09999999999999999%20-0.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%200.26%20-0.26666666666666666l0.52%20-0.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%200.48%20-0.3666666666666667%201.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%20-1.44Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",MY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:iY,default:pY},Symbol.toStringTag,{value:"Module"})),lY=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Check-Circle-1--Streamline-Ultimate",...e},p.createElement("desc",null,"Check Circle 1 Streamline Icon: https://streamlinehq.com"),p.createElement("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})),bY="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Check-Circle-1--Streamline-Ultimate'%3e%3cdesc%3eCheck%20Circle%201%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='M12%200a12%2012%200%201%200%2012%2012A12%2012%200%200%200%2012%200Zm6.93%208.2%20-6.85%209.29a1%201%200%200%201%20-1.43%200.19l-4.89%20-3.91a1%201%200%200%201%20-0.15%20-1.41A1%201%200%200%201%207%2012.21l4.08%203.26L17.32%207a1%201%200%200%201%201.39%20-0.21%201%201%200%200%201%200.22%201.41Z'%20fill='currentcolor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",zY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:lY,default:bY},Symbol.toStringTag,{value:"Module"})),uY=e=>p.createElement("svg",{viewBox:"-0.75 -0.75 20 20",xmlns:"http://www.w3.org/2000/svg",height:24,width:24,...e},p.createElement("desc",null,"Typography"),p.createElement("path",{d:"m0.578125 9.827354166666668 8.09375 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"m12.140625 13.296104166666666 5.78125 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("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}),p.createElement("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})),dY="data:image/svg+xml,%3csvg%20viewBox='-0.75%20-0.75%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20width='24'%3e%3cdesc%3eTypography%3c/desc%3e%3cpath%20d='m0.578125%209.827354166666668%208.09375%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='m12.140625%2013.296104166666666%205.78125%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M12.140625%2016.764854166666666V10.40625a2.890625%202.890625%200%200%201%205.78125%200v6.359375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M0.578125%2016.764854166666666V5.78125a4.046875%204.046875%200%200%201%208.09375%200v10.984375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3c/svg%3e",OY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:uY,default:dY},Symbol.toStringTag,{value:"Module"})),fY=Ao("",{variants:{size:{sm:"size-3",md:"size-4",lg:"size-6",xl:"size-8"}},defaultVariants:{size:"md"}}),AY=Object.assign({"../../assets/icons/error-fill.svg":rY,"../../assets/icons/info-fill.svg":sY,"../../assets/icons/skull-and-bones.svg":MY,"../../assets/icons/success-fill.svg":zY,"../../assets/icons/typography.svg":OY}),pp=Object.entries(AY).reduce((e,[t,o])=>{var n;const r=((n=t.match(/[^/]+(?=\.svg$)/))==null?void 0:n[0])??"",a=SG(r),i=l=>{const{size:z,className:u,...f}=l,O=R0(fY({size:z,className:u}));return M0.createElement(o.ReactComponent,{...f,className:O})};return i.displayName=`Icon.${a}`,e[a]=i,e},{}),Tc0=pp,hY=p.createContext({isAnyTextFieldFocused:!1,setFocusState:()=>{},darkMode:!1}),qY=()=>{const[e,t]=p.useState(!1);return p.useEffect(()=>(t(!0),()=>t(!1)),[]),e?Sa.createPortal(b.jsx("div",{className:ho,style:{width:"unset",height:"unset"},children:b.jsx(JK,{icons:{error:b.jsx(pp.ErrorFill,{className:"text-red"}),success:b.jsx(pp.SuccessFill,{className:"text-green"}),info:b.jsx(pp.InfoFill,{className:"text-gray-500"})},position:"bottom-left",toastOptions:{classNames:{title:"mt-[-1px]! text-md! font-semibold! leading-tighter! tracking-[0.1px]!",description:"text-gray-900! dark:text-gray-300! text-sm! mt-px!",icon:"ml-0!"},style:{alignItems:"flex-start",maxWidth:"290px"}}})}),document.body):null},mY=({darkMode:e,children:t})=>{const[o,n]=p.useState(!1),r=a=>{n(a)};return b.jsx(hY.Provider,{value:{isAnyTextFieldFocused:o,setFocusState:r,darkMode:e},children:b.jsxs(tY,{children:[t,b.jsx(qY,{})]})})},ho="shade shade-admin shade-activitypub shade-stats shade-posts",gY=({darkMode:e,fetchKoenigLexical:t,className:o,children:n,...r})=>{const a=se("shade",o);return b.jsx("div",{className:a,...r,children:b.jsx(mY,{darkMode:e,children:n})})},WY=pU,vY=MU,RY=lU,Z9=p.forwardRef(({className:e,...t},o)=>b.jsx(E8,{className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t,ref:o}));Z9.displayName=E8.displayName;const K9=p.forwardRef(({className:e,...t},o)=>b.jsx(RY,{children:b.jsxs("div",{className:ho,children:[b.jsx(Z9,{onClick:n=>n.stopPropagation()}),b.jsx(B8,{ref:o,className:R0("fixed left-[50%] top-[20%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg",e),...t})]})}));K9.displayName=B8.displayName;const Y9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-2 text-center sm:text-left",e),...t});Y9.displayName="AlertDialogHeader";const J9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2 [&>button]:min-w-20",e),...t});J9.displayName="AlertDialogFooter";const em=p.forwardRef(({className:e,...t},o)=>b.jsx(P8,{ref:o,className:R0("text-xl font-semibold",e),...t}));em.displayName=P8.displayName;const tm=p.forwardRef(({className:e,...t},o)=>b.jsx(j8,{ref:o,className:R0("text-base",e),...t}));tm.displayName=j8.displayName;const om=p.forwardRef(({className:e,...t},o)=>b.jsx(S8,{ref:o,className:R0(U3(),e),...t}));om.displayName=S8.displayName;const nm=p.forwardRef(({className:e,...t},o)=>b.jsx(T8,{ref:o,className:R0(U3({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));nm.displayName=T8.displayName;const yY=p.lazy(()=>m1(()=>import("./index-BEEgMX-_.js"),[],import.meta.url)),Qf=e=>b.jsx(p.Suspense,{fallback:b.jsx("div",{}),children:b.jsx(yY,{...e})}),Dd=p.forwardRef(({className:e,...t},o)=>b.jsx(J7,{ref:o,className:R0("relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full",e),...t}));Dd.displayName=J7.displayName;const Id=p.forwardRef(({className:e,...t},o)=>b.jsx(eq,{ref:o,className:R0("aspect-square h-full w-full",e),...t}));Id.displayName=eq.displayName;const Fd=p.forwardRef(({className:e,...t},o)=>b.jsx(tq,{ref:o,className:R0("flex h-full w-full items-center justify-center rounded-full bg-muted [&_svg]:size-4",e),...t}));Fd.displayName=tq.displayName;const wY=Ao("inline-flex items-center rounded-xs border px-1.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-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",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function LY({className:e,variant:t,...o}){return b.jsx("div",{className:R0(wY({variant:t}),e),...o})}const xY=Ao("relative block rounded-lg transition-all duration-300",{variants:{variant:{default:"border border-border bg-background shadow-sm hover:shadow-md dark:border-gray-900 dark:bg-gray-925",gradient:["cursor-pointer border border-gray-100 bg-white dark:border-gray-950 dark:bg-black","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-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950/30",success:"border border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950/30",warning:"border border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950/30",destructive:"bg-white shadow-sm dark:bg-gray-950"},size:{sm:"p-2 text-sm",md:"p-3",lg:"p-4"}},defaultVariants:{variant:"default",size:"md"}}),V3=p.forwardRef((e,t)=>{const{variant:o,size:n,dismissible:r=!1,onDismiss:a,role:i="status",className:l,children:z,...u}=e,f=O=>{O.preventDefault(),O.stopPropagation(),r&&a&&a()};return b.jsxs("div",{ref:t,className:R0(xY({variant:o,size:n}),l),role:i,...u,children:[r&&b.jsx(i1,{"aria-label":"Dismiss notification",className:"absolute top-1 right-1 size-8 text-gray-600 dark:text-gray-500 dark:hover:text-gray-300",size:"icon",variant:"ghost",onClick:f,children:b.jsx(Xd,{className:"size-5"})}),z]})});V3.displayName="Banner";const rs=dd,rm=Od,kY=fd,CY=x3,cm=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{ref:o,className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t}));cm.displayName=Ka.displayName;const Mc=p.forwardRef(({className:e,children:t,...o},n)=>b.jsx(kY,{children:b.jsxs("div",{className:ho,children:[b.jsx(cm,{}),b.jsx(Ya,{ref:n,className:R0("fixed left-[50%] top-[8vmin] z-50 grid w-full max-w-lg translate-x-[-50%] gap-6 bg-background dark:bg-[#101114] p-6 shadow-lg duration-200 transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg outline-hidden",e),...o,children:t})]})}));Mc.displayName=Ya.displayName;const Q3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col gap-y-1.5 text-center sm:text-left",e),...t});Q3.displayName="DialogHeader";const $3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2 sm:items-end [&_button]:min-w-20",e),...t});$3.displayName="DialogFooter";const G3=p.forwardRef(({className:e,...t},o)=>b.jsx(Ja,{ref:o,className:R0("text-xl font-semibold leading-none tracking-tight",e),...t}));G3.displayName=Ja.displayName;const am=p.forwardRef(({className:e,...t},o)=>b.jsx(es,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));am.displayName=es.displayName;var Qz=["Enter"," "],NY=["ArrowDown","PageUp","Home"],sm=["ArrowUp","PageDown","End"],_Y=[...NY,...sm],EY={ltr:[...Qz,"ArrowRight"],rtl:[...Qz,"ArrowLeft"]},BY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cs="Menu",[ka,SY,TY]=p7(cs),[Kn,im]=Y2(cs,[TY,bn,b7]),Z3=bn(),pm=b7(),[PY,Yn]=Kn(cs),[jY,as]=Kn(cs),Mm=e=>{const{__scopeMenu:t,open:o=!1,children:n,dir:r,onOpenChange:a,modal:i=!0}=e,l=Z3(t),[z,u]=p.useState(null),f=p.useRef(!1),O=Tt(a),h=M7(r);return p.useEffect(()=>{const q=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",q,{capture:!0}),()=>{document.removeEventListener("keydown",q,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),b.jsx(z3,{...l,children:b.jsx(PY,{scope:t,open:o,onOpenChange:O,content:z,onContentChange:u,children:b.jsx(jY,{scope:t,onClose:p.useCallback(()=>O(!1),[O]),isUsingKeyboardRef:f,dir:h,modal:i,children:n})})})};Mm.displayName=cs;var XY="MenuAnchor",Hd=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=Z3(o);return b.jsx(Fa,{...r,...n,ref:t})});Hd.displayName=XY;var Ud="MenuPortal",[DY,lm]=Kn(Ud,{forceMount:void 0}),bm=e=>{const{__scopeMenu:t,forceMount:o,children:n,container:r}=e,a=Yn(Ud,t);return b.jsx(DY,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(rc,{asChild:!0,container:r,children:n})})})};bm.displayName=Ud;var Q2="MenuContent",[IY,Vd]=Kn(Q2),zm=p.forwardRef((e,t)=>{const o=lm(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=as(Q2,e.__scopeMenu);return b.jsx(ka.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(ka.Slot,{scope:e.__scopeMenu,children:i.modal?b.jsx(FY,{...r,ref:t}):b.jsx(HY,{...r,ref:t})})})})}),FY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu),n=p.useRef(null),r=E1(t,n);return p.useEffect(()=>{const a=n.current;if(a)return Ju(a)},[]),b.jsx(Qd,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:B0(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),HY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu);return b.jsx(Qd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),UY=Qr("MenuContent.ScrollLock"),Qd=p.forwardRef((e,t)=>{const{__scopeMenu:o,loop:n=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:z,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,disableOutsideScroll:g,...W}=e,v=Yn(Q2,o),y=as(Q2,o),k=Z3(o),C=pm(o),L=SY(o),[x,w]=p.useState(null),P=p.useRef(null),H=E1(t,P,v.onContentChange),o0=p.useRef(0),Y=p.useRef(""),Z=p.useRef(0),n0=p.useRef(null),J=p.useRef("right"),i0=p.useRef(0),L0=g?q3:p.Fragment,K=g?{as:UY,allowPinchZoom:!0}:void 0,m0=X=>{const G=Y.current+X,N=L().filter(u0=>!u0.disabled),I=document.activeElement,c0=N.find(u0=>u0.ref.current===I)?.textValue,h0=N.map(u0=>u0.textValue),d0=nJ(h0,G,c0),v0=N.find(u0=>u0.textValue===d0)?.ref.current;(function u0(e0){Y.current=e0,window.clearTimeout(o0.current),e0!==""&&(o0.current=window.setTimeout(()=>u0(""),1e3))})(G),v0&&setTimeout(()=>v0.focus())};p.useEffect(()=>()=>window.clearTimeout(o0.current),[]),Yu();const $=p.useCallback(X=>J.current===n0.current?.side&&cJ(X,n0.current?.area),[]);return b.jsx(IY,{scope:o,searchRef:Y,onItemEnter:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),onItemLeave:p.useCallback(X=>{$(X)||(P.current?.focus(),w(null))},[$]),onTriggerLeave:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:p.useCallback(X=>{n0.current=X},[]),children:b.jsx(L0,{...K,children:b.jsx(A3,{asChild:!0,trapped:r,onMountAutoFocus:B0(a,X=>{X.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:b.jsx(nc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,children:b.jsx(Hj,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:B0(z,X=>{y.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(u3,{role:"menu","aria-orientation":"vertical","data-state":xm(v.open),"data-radix-menu-content":"",dir:y.dir,...k,...W,ref:H,style:{outline:"none",...W.style},onKeyDown:B0(W.onKeyDown,X=>{const N=X.target.closest("[data-radix-menu-content]")===X.currentTarget,I=X.ctrlKey||X.altKey||X.metaKey,c0=X.key.length===1;N&&(X.key==="Tab"&&X.preventDefault(),!I&&c0&&m0(X.key));const h0=P.current;if(X.target!==h0||!_Y.includes(X.key))return;X.preventDefault();const v0=L().filter(u0=>!u0.disabled).map(u0=>u0.ref.current);sm.includes(X.key)&&v0.reverse(),tJ(v0)}),onBlur:B0(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(o0.current),Y.current="")}),onPointerMove:B0(e.onPointerMove,Ca(X=>{const G=X.target,N=i0.current!==X.clientX;if(X.currentTarget.contains(G)&&N){const I=X.clientX>i0.current?"right":"left";J.current=I,i0.current=X.clientX}}))})})})})})})});zm.displayName=Q2;var VY="MenuGroup",$d=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"group",...n,ref:t})});$d.displayName=VY;var QY="MenuLabel",um=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{...n,ref:t})});um.displayName=QY;var Xp="MenuItem",$f="menu.itemSelect",K3=p.forwardRef((e,t)=>{const{disabled:o=!1,onSelect:n,...r}=e,a=p.useRef(null),i=as(Xp,e.__scopeMenu),l=Vd(Xp,e.__scopeMenu),z=E1(t,a),u=p.useRef(!1),f=()=>{const O=a.current;if(!o&&O){const h=new CustomEvent($f,{bubbles:!0,cancelable:!0});O.addEventListener($f,q=>n?.(q),{once:!0}),Sh(O,h),h.defaultPrevented?u.current=!1:i.onClose()}};return b.jsx(dm,{...r,ref:z,disabled:o,onClick:B0(e.onClick,f),onPointerDown:O=>{e.onPointerDown?.(O),u.current=!0},onPointerUp:B0(e.onPointerUp,O=>{u.current||O.currentTarget?.click()}),onKeyDown:B0(e.onKeyDown,O=>{const h=l.searchRef.current!=="";o||h&&O.key===" "||Qz.includes(O.key)&&(O.currentTarget.click(),O.preventDefault())})})});K3.displayName=Xp;var dm=p.forwardRef((e,t)=>{const{__scopeMenu:o,disabled:n=!1,textValue:r,...a}=e,i=Vd(Xp,o),l=pm(o),z=p.useRef(null),u=E1(t,z),[f,O]=p.useState(!1),[h,q]=p.useState("");return p.useEffect(()=>{const g=z.current;g&&q((g.textContent??"").trim())},[a.children]),b.jsx(ka.ItemSlot,{scope:o,disabled:n,textValue:r??h,children:b.jsx(Uj,{asChild:!0,...l,focusable:!n,children:b.jsx(R1.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:B0(e.onPointerMove,Ca(g=>{n?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B0(e.onPointerLeave,Ca(g=>i.onItemLeave(g))),onFocus:B0(e.onFocus,()=>O(!0)),onBlur:B0(e.onBlur,()=>O(!1))})})})}),$Y="MenuCheckboxItem",Om=p.forwardRef((e,t)=>{const{checked:o=!1,onCheckedChange:n,...r}=e;return b.jsx(mm,{scope:e.__scopeMenu,checked:o,children:b.jsx(K3,{role:"menuitemcheckbox","aria-checked":Dp(o)?"mixed":o,...r,ref:t,"data-state":Zd(o),onSelect:B0(r.onSelect,()=>n?.(Dp(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Om.displayName=$Y;var fm="MenuRadioGroup",[GY,ZY]=Kn(fm,{value:void 0,onValueChange:()=>{}}),Am=p.forwardRef((e,t)=>{const{value:o,onValueChange:n,...r}=e,a=Tt(n);return b.jsx(GY,{scope:e.__scopeMenu,value:o,onValueChange:a,children:b.jsx($d,{...r,ref:t})})});Am.displayName=fm;var hm="MenuRadioItem",qm=p.forwardRef((e,t)=>{const{value:o,...n}=e,r=ZY(hm,e.__scopeMenu),a=o===r.value;return b.jsx(mm,{scope:e.__scopeMenu,checked:a,children:b.jsx(K3,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Zd(a),onSelect:B0(n.onSelect,()=>r.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});qm.displayName=hm;var Gd="MenuItemIndicator",[mm,KY]=Kn(Gd,{checked:!1}),gm=p.forwardRef((e,t)=>{const{__scopeMenu:o,forceMount:n,...r}=e,a=KY(Gd,o);return b.jsx(q2,{present:n||Dp(a.checked)||a.checked===!0,children:b.jsx(R1.span,{...r,ref:t,"data-state":Zd(a.checked)})})});gm.displayName=Gd;var YY="MenuSeparator",Wm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Wm.displayName=YY;var JY="MenuArrow",vm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=Z3(o);return b.jsx(d3,{...r,...n,ref:t})});vm.displayName=JY;var eJ="MenuSub",[Pc0,Rm]=Kn(eJ),za="MenuSubTrigger",ym=p.forwardRef((e,t)=>{const o=Yn(za,e.__scopeMenu),n=as(za,e.__scopeMenu),r=Rm(za,e.__scopeMenu),a=Vd(za,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:z}=a,u={__scopeMenu:e.__scopeMenu},f=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>f,[f]),p.useEffect(()=>{const O=l.current;return()=>{window.clearTimeout(O),z(null)}},[l,z]),b.jsx(Hd,{asChild:!0,...u,children:b.jsx(dm,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":r.contentId,"data-state":xm(o.open),...e,ref:Vn(t,r.onTriggerChange),onClick:O=>{e.onClick?.(O),!(e.disabled||O.defaultPrevented)&&(O.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:B0(e.onPointerMove,Ca(O=>{a.onItemEnter(O),!O.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100))})),onPointerLeave:B0(e.onPointerLeave,Ca(O=>{f();const h=o.content?.getBoundingClientRect();if(h){const q=o.content?.dataset.side,g=q==="right",W=g?-5:5,v=h[g?"left":"right"],y=h[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:O.clientX+W,y:O.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:q}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(O),O.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:B0(e.onKeyDown,O=>{const h=a.searchRef.current!=="";e.disabled||h&&O.key===" "||EY[n.dir].includes(O.key)&&(o.onOpenChange(!0),o.content?.focus(),O.preventDefault())})})})});ym.displayName=za;var wm="MenuSubContent",Lm=p.forwardRef((e,t)=>{const o=lm(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=as(Q2,e.__scopeMenu),l=Rm(wm,e.__scopeMenu),z=p.useRef(null),u=E1(t,z);return b.jsx(ka.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(ka.Slot,{scope:e.__scopeMenu,children:b.jsx(Qd,{id:l.contentId,"aria-labelledby":l.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&z.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B0(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:B0(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:B0(e.onKeyDown,f=>{const O=f.currentTarget.contains(f.target),h=BY[i.dir].includes(f.key);O&&h&&(a.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Lm.displayName=wm;function xm(e){return e?"open":"closed"}function Dp(e){return e==="indeterminate"}function Zd(e){return Dp(e)?"indeterminate":e?"checked":"unchecked"}function tJ(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function oJ(e,t){return e.map((o,n)=>e[(t+n)%e.length])}function nJ(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let i=oJ(e,Math.max(a,0));r.length===1&&(i=i.filter(u=>u!==o));const z=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return z!==o?z:void 0}function rJ(e,t){const{x:o,y:n}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],z=t[i],u=l.x,f=l.y,O=z.x,h=z.y;f>n!=h>n&&o<(O-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function cJ(e,t){if(!t)return!1;const o={x:e.clientX,y:e.clientY};return rJ(o,t)}function Ca(e){return t=>t.pointerType==="mouse"?e(t):void 0}var aJ=Mm,sJ=Hd,iJ=bm,pJ=zm,MJ=$d,lJ=um,bJ=K3,zJ=Om,uJ=Am,dJ=qm,OJ=gm,fJ=Wm,AJ=vm,hJ=ym,qJ=Lm,Y3="DropdownMenu",[mJ]=Y2(Y3,[im]),n2=im(),[gJ,km]=mJ(Y3),Cm=e=>{const{__scopeDropdownMenu:t,children:o,dir:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,z=n2(t),u=p.useRef(null),[f,O]=Qn({prop:r,defaultProp:a??!1,onChange:i,caller:Y3});return b.jsx(gJ,{scope:t,triggerId:ft(),triggerRef:u,contentId:ft(),open:f,onOpenChange:O,onOpenToggle:p.useCallback(()=>O(h=>!h),[O]),modal:l,children:b.jsx(aJ,{...z,open:f,onOpenChange:O,dir:n,modal:l,children:o})})};Cm.displayName=Y3;var Nm="DropdownMenuTrigger",_m=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,disabled:n=!1,...r}=e,a=km(Nm,o),i=n2(o);return b.jsx(sJ,{asChild:!0,...i,children:b.jsx(R1.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":n?"":void 0,disabled:n,...r,ref:Vn(t,a.triggerRef),onPointerDown:B0(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:B0(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});_m.displayName=Nm;var WJ="DropdownMenuPortal",Em=e=>{const{__scopeDropdownMenu:t,...o}=e,n=n2(t);return b.jsx(iJ,{...n,...o})};Em.displayName=WJ;var Bm="DropdownMenuContent",Sm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=km(Bm,o),a=n2(o),i=p.useRef(!1);return b.jsx(pJ,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...n,ref:t,onCloseAutoFocus:B0(e.onCloseAutoFocus,l=>{i.current||r.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:B0(e.onInteractOutside,l=>{const z=l.detail.originalEvent,u=z.button===0&&z.ctrlKey===!0,f=z.button===2||u;(!r.modal||f)&&(i.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)"}})});Sm.displayName=Bm;var vJ="DropdownMenuGroup",Tm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(MJ,{...r,...n,ref:t})});Tm.displayName=vJ;var RJ="DropdownMenuLabel",Pm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(lJ,{...r,...n,ref:t})});Pm.displayName=RJ;var yJ="DropdownMenuItem",jm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(bJ,{...r,...n,ref:t})});jm.displayName=yJ;var wJ="DropdownMenuCheckboxItem",Xm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(zJ,{...r,...n,ref:t})});Xm.displayName=wJ;var LJ="DropdownMenuRadioGroup",xJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(uJ,{...r,...n,ref:t})});xJ.displayName=LJ;var kJ="DropdownMenuRadioItem",Dm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(dJ,{...r,...n,ref:t})});Dm.displayName=kJ;var CJ="DropdownMenuItemIndicator",Im=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(OJ,{...r,...n,ref:t})});Im.displayName=CJ;var NJ="DropdownMenuSeparator",Fm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(fJ,{...r,...n,ref:t})});Fm.displayName=NJ;var _J="DropdownMenuArrow",EJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(AJ,{...r,...n,ref:t})});EJ.displayName=_J;var BJ="DropdownMenuSubTrigger",Hm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(hJ,{...r,...n,ref:t})});Hm.displayName=BJ;var SJ="DropdownMenuSubContent",Um=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(qJ,{...r,...n,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)"}})});Um.displayName=SJ;var TJ=Cm,PJ=_m,jJ=Em,Vm=Sm,XJ=Tm,Qm=Pm,$m=jm,Gm=Xm,Zm=Dm,Km=Im,Ym=Fm,Jm=Hm,eg=Um;const tg=TJ,og=PJ,jc0=XJ,DJ=p.forwardRef(({className:e,inset:t,children:o,...n},r)=>b.jsxs(Jm,{ref:r,className:R0("flex cursor-default gap-2 select-none hover:bg-accent items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[o,b.jsx(H3,{className:"ml-auto"})]}));DJ.displayName=Jm.displayName;const IJ=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{className:ho,children:b.jsx(eg,{ref:o,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));IJ.displayName=eg.displayName;const Kd=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(jJ,{children:b.jsx("div",{className:ho,children:b.jsx(Vm,{ref:n,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:t,...o})})}));Kd.displayName=Vm.displayName;const ng=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx($m,{ref:n,className:R0("relative flex cursor-default select-none cursor-pointer items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));ng.displayName=$m.displayName;const FJ=p.forwardRef(({className:e,children:t,checked:o,...n},r)=>b.jsxs(Gm,{ref:r,checked:o,className:R0("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx(Km,{children:b.jsx(j9,{className:"size-4"})})}),t]}));FJ.displayName=Gm.displayName;const HJ=p.forwardRef(({className:e,children:t,...o},n)=>b.jsxs(Zm,{ref:n,className:R0("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx(Km,{children:b.jsx(qZ,{className:"size-2 fill-current"})})}),t]}));HJ.displayName=Zm.displayName;const UJ=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx(Qm,{ref:n,className:R0("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));UJ.displayName=Qm.displayName;const Pn=p.forwardRef(({className:e,...t},o)=>b.jsx(Ym,{ref:o,className:R0("-mx-1 my-1 h-px bg-muted",e),...t}));Pn.displayName=Ym.displayName;const rg=p.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},r)=>b.jsx(Xh,{ref:r,className:R0("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),decorative:o,orientation:t,...n}));rg.displayName=Xh.displayName;const VJ=eI,QJ=tI,Tb=nI,cg=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx(oI,{children:b.jsx("div",{className:ho,children:b.jsx(gq,{ref:r,align:t,className:R0("z-50 rounded-md bg-white dark:bg-gray-950 p-5 text-popover-foreground shadow-md border outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",e),sideOffset:o,...n})})}));cg.displayName=gq.displayName;const $J=Ao("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-5 w-9",sm:"h-4 w-7"}},defaultVariants:{size:"default"}}),GJ=Ao("pointer-events-none block rounded-full bg-background ring-0 [filter:drop-shadow(0_1px_2px_rgba(0,0,0,0.07))] transition-transform data-[state=unchecked]:translate-x-0",{variants:{size:{default:"size-4 data-[state=checked]:translate-x-4",sm:"size-3 data-[state=checked]:translate-x-3"}},defaultVariants:{size:"default"}}),ag=p.forwardRef(({className:e,size:t,...o},n)=>b.jsx(g7,{className:R0($J({size:t,className:e})),...o,ref:n,children:b.jsx(Zj,{className:R0(GJ({size:t}))})}));ag.displayName=g7.displayName;const ZJ=BX,KJ=SX,YJ=TX,sg=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(PX,{children:b.jsx("div",{className:ho,children:b.jsx(U7,{ref:n,className:R0("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),sideOffset:t,...o})})}));sg.displayName=U7.displayName;var Pb,J3="HoverCard",[ig]=Y2(J3,[bn]),eM=bn(),[JJ,tM]=ig(J3),pg=e=>{const{__scopeHoverCard:t,children:o,open:n,defaultOpen:r,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,z=eM(t),u=p.useRef(0),f=p.useRef(0),O=p.useRef(!1),h=p.useRef(!1),[q,g]=Qn({prop:n,defaultProp:r??!1,onChange:a,caller:J3}),W=p.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=p.useCallback(()=>{clearTimeout(u.current),!O.current&&!h.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),y=p.useCallback(()=>g(!1),[g]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),b.jsx(JJ,{scope:t,open:q,onOpenChange:g,onOpen:W,onClose:v,onDismiss:y,hasSelectionRef:O,isPointerDownOnContentRef:h,children:b.jsx(z3,{...z,children:o})})};pg.displayName=J3;var Mg="HoverCardTrigger",lg=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=tM(Mg,o),a=eM(o);return b.jsx(Fa,{asChild:!0,...a,children:b.jsx(R1.a,{"data-state":r.open?"open":"closed",...n,ref:t,onPointerEnter:B0(e.onPointerEnter,Fp(r.onOpen)),onPointerLeave:B0(e.onPointerLeave,Fp(r.onClose)),onFocus:B0(e.onFocus,r.onOpen),onBlur:B0(e.onBlur,r.onClose),onTouchStart:B0(e.onTouchStart,i=>i.preventDefault())})})});lg.displayName=Mg;var Yd="HoverCardPortal",[e00,t00]=ig(Yd,{forceMount:void 0}),bg=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:r}=e,a=tM(Yd,t);return b.jsx(e00,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(rc,{asChild:!0,container:r,children:n})})})};bg.displayName=Yd;var Ip="HoverCardContent",zg=p.forwardRef((e,t)=>{const o=t00(Ip,e.__scopeHoverCard),{forceMount:n=o.forceMount,...r}=e,a=tM(Ip,e.__scopeHoverCard);return b.jsx(q2,{present:n||a.open,children:b.jsx(o00,{"data-state":a.open?"open":"closed",...r,onPointerEnter:B0(e.onPointerEnter,Fp(a.onOpen)),onPointerLeave:B0(e.onPointerLeave,Fp(a.onClose)),ref:t})})});zg.displayName=Ip;var o00=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,...l}=e,z=tM(Ip,o),u=eM(o),f=p.useRef(null),O=E1(t,f),[h,q]=p.useState(!1);return p.useEffect(()=>{if(h){const g=document.body;return Pb=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Pb,g.style.webkitUserSelect=Pb}}},[h]),p.useEffect(()=>{if(f.current){const g=()=>{q(!1),z.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(z.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!1}}},[z.isPointerDownOnContentRef,z.hasSelectionRef]),p.useEffect(()=>{f.current&&c00(f.current).forEach(W=>W.setAttribute("tabindex","-1"))}),b.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:B0(a,g=>{g.preventDefault()}),onDismiss:z.onDismiss,children:b.jsx(u3,{...u,...l,onPointerDown:B0(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&q(!0),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!0}),ref:O,style:{...l.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"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)"}})})}),n00="HoverCardArrow",r00=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=eM(o);return b.jsx(d3,{...r,...n,ref:t})});r00.displayName=n00;function Fp(e){return t=>t.pointerType==="touch"?void 0:e()}function c00(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)t.push(o.currentNode);return t}var a00=pg,s00=lg,i00=bg,ug=zg;const p00=a00,M00=s00,dg=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx(i00,{children:b.jsx("div",{className:ho,children:b.jsx(ug,{ref:r,align:t,className:R0("pointer-events-auto z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-hover-card-content-transform-origin)",e),sideOffset:o,...n})})}));dg.displayName=ug.displayName;const l00=Ao("rounded-full",{variants:{variant:{neutral:"bg-muted",info:"bg-blue-500",success:"bg-green-500",error:"bg-red-500",warning:"bg-yellow-500"},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-blue-500"},{variant:"success",state:"inactive",className:"border-green-500"},{variant:"error",state:"inactive",className:"border-red-500"},{variant:"warning",state:"inactive",className:"border-yellow-500"}],defaultVariants:{variant:"success",state:"idle",size:"sm"}});function Gf({className:e,variant:t,state:o,size:n,label:r,...a}){return b.jsxs("span",{className:"inline-flex items-center",...a,children:[b.jsx("span",{"aria-hidden":"true",className:R0(l00({variant:t,state:o,size:n}),e)}),r&&b.jsx("span",{className:"sr-only",children:r})]})}const oM=p.forwardRef(({className:e,type:t,...o},n)=>b.jsx("input",{ref:n,className:R0("flex h-9 w-full rounded-md border border-transparent bg-gray-150 dark:bg-gray-900 px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:bg-transparent focus-visible:border-green focus-visible:shadow-[0_0_0_2px_rgba(48,207,67,.25)] disabled:cursor-not-allowed disabled:opacity-50",e),type:t,...o}));oM.displayName="Input";function b00({className:e,...t}){return b.jsx("kbd",{className:R0("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-xs px-1 font-sans text-xs font-medium m-0 shadow-none border-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 j1({containerClassName:e,count:t=1,randomize:o=!1,minWidth:n=70,maxWidth:r=100,className:a,...i}){const{randomWidths:l,keys:z}=p.useMemo(()=>{const u=[],f=[];for(let O=0;O<t;O++){if(o){const h=Math.floor((r-n)/5),q=Math.floor(Math.random()*(h+1)),g=n+q*5;u.push(`${g}%`)}f.push(`skeleton-${O}`)}return{randomWidths:u,keys:f}},[t,o,n,r]);return b.jsx("span",{className:e,children:Array.from({length:t}).map((u,f)=>b.jsxs(M0.Fragment,{children:[b.jsx("span",{className:R0("inline-flex w-full leading-none animate-pulse rounded-[2px] bg-primary/10",a),style:o?{width:l[f]}:void 0,...i,children:""}),b.jsx("br",{})]},z[f]))})}const z00=M0.forwardRef(({className:e,lines:t=5,...o},n)=>t<1?b.jsx(b.Fragment,{}):b.jsx("div",{ref:n,className:R0("flex flex-col gap-2",e),...o,children:Array.from({length:t},(r,a)=>{let i="66%";switch(a%5){case 0:i="57%";break;case 1:i="33%";break;case 2:i="40%";break;case 3:i="48%";break;case 4:i="24%";break}return b.jsxs("div",{className:"flex justify-between gap-6",children:[b.jsx("div",{className:"grow",style:{maxWidth:i},children:b.jsx(j1,{})}),b.jsx(j1,{className:"w-[60px] self-end"})]},a)})}));z00.displayName="SkeletonTable";const Hp=({size:e="md",color:t="dark",className:o=""})=>{let n="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":n+=" h-[16px] w-[16px] border-2 before:mt-[10px] before:h-[3px] before:w-[3px]";break;case"md":n+=" h-[20px] w-[20px] border-2 before:mt-[13px] before:h-[3px] before:w-[3px]";break;case"lg":default:n+=" h-[50px] w-[50px] border before:mt-[7px] before:h-[7px] before:w-[7px]";break}switch(t){case"light":n+=" border-white/20 before:bg-white dark:border-black/10 dark:before:bg-black";break;case"dark":default:n+=" border-black/10 before:bg-black dark:border-white/20 dark:before:bg-white";break}return b.jsx("div",{className:`${n} ${o}`})},Xc0=()=>b.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:b.jsx("div",{className:"flex size-20 items-center justify-center rounded-full",children:b.jsxs("div",{className:"-mt-1.5 flex items-end gap-2",children:[b.jsx(j1,{className:"h-10 w-3"}),b.jsx(j1,{className:"h-14 w-3"}),b.jsx(j1,{className:"h-6 w-3"})]})})}),u00=({className:e="",children:t})=>b.jsx("div",{className:`my-10 flex flex-col items-center gap-1 text-sm text-grey-600 ${e}`,children:t}),d00=({className:e="",children:t})=>b.jsx("div",{className:`text-grey-500 [&>svg]:size-8 [&>svg]:stroke-[1px] ${e}`,children:t}),O00=dd,Dc0=Od,f00=fd,Og=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{className:R0("fixed inset-0 z-50 bg-black/10 data-[state=open]:animate-in duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Og.displayName=Ka.displayName;const A00=Ao("fixed z-50 gap-4 bg-background 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"}}),fg=p.forwardRef(({side:e="right",className:t,children:o,...n},r)=>b.jsx(f00,{children:b.jsxs("div",{className:ho,children:[b.jsx(Og,{}),b.jsxs(Ya,{ref:r,className:R0(A00({side:e}),t),...n,children:[b.jsxs(x3,{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:[b.jsx(Xd,{className:"size-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}),o]})]})}));fg.displayName=Ya.displayName;const h00=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-1 text-center sm:text-left",e),...t});h00.displayName="SheetHeader";const q00=p.forwardRef(({className:e,...t},o)=>b.jsx(Ja,{ref:o,className:R0("text-xl font-semibold text-foreground",e),...t}));q00.displayName=Ja.displayName;const m00=p.forwardRef(({className:e,...t},o)=>b.jsx(es,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));m00.displayName=es.displayName;const Ag=801;function jb(){return window.innerWidth<Ag}function g00(){const[e,t]=p.useState(jb());return p.useEffect(()=>{const o=window.matchMedia(`(max-width: ${Ag-1}px)`),n=()=>{t(jb())};return o.addEventListener("change",n),t(jb()),()=>o.removeEventListener("change",n)},[]),e}const W00="sidebar:state",v00=3600*24*7,R00="30rem",y00="28rem",w00="4rem",L00="b",nM="[34px]",hg=p.createContext(null);function Jn(){const e=p.useContext(hg);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const qg=p.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:o,className:n,style:r,children:a,...i},l)=>{const z=g00(),[u,f]=p.useState(!1),[O,h]=p.useState(e),q=t??O,g=p.useCallback(k=>{const C=typeof k=="function"?k(q):k;o?o(C):h(C),document.cookie=`${W00}=${C}; path=/; max-age=${v00}`},[o,q]),W=p.useCallback(()=>z?f(k=>!k):g(k=>!k),[z,g,f]);p.useEffect(()=>{const k=C=>{C.key===L00&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),W())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[W]);const v=q?"expanded":"collapsed",y=p.useMemo(()=>({state:v,open:q,setOpen:g,isMobile:z,openMobile:u,setOpenMobile:f,toggleSidebar:W}),[v,q,g,z,u,f,W]);return b.jsx(hg.Provider,{value:y,children:b.jsx(ZJ,{delayDuration:0,children:b.jsx("div",{ref:l,className:R0("group/sidebar-wrapper relative flex h-full w-full has-[[data-variant=inset]]:bg-sidebar",n),style:{"--sidebar-width":R00,"--sidebar-width-icon":w00,...r},...i,children:a})})})});qg.displayName="SidebarProvider";const mg=p.forwardRef(({side:e="left",variant:t="sidebar",collapsible:o="offcanvas",className:n,children:r,...a},i)=>{const{isMobile:l,state:z,openMobile:u,setOpenMobile:f}=Jn();return o==="none"?b.jsx("div",{ref:i,className:R0("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),role:"navigation",...a,children:r}):l?b.jsx(O00,{open:u,onOpenChange:f,...a,children:b.jsx(fg,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",role:"navigation",side:e,style:{"--sidebar-width":y00},children:b.jsx("div",{className:"flex size-full flex-col",children:r})})}):b.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":z==="collapsed"?o:"","data-side":e,"data-state":z,"data-variant":t,role:"navigation",children:[b.jsx("div",{className:R0("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)")}),b.jsx("div",{className:R0("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)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) border-sidebar-border group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children: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:r})})]})});mg.displayName="Sidebar";const gg=p.forwardRef(({children:e,className:t,onClick:o,...n},r)=>{const{toggleSidebar:a}=Jn();return b.jsx(i1,{ref:r,className:R0("h-7 w-7",t),"data-sidebar":"trigger",size:"icon",variant:"ghost",onClick:i=>{o?.(i),a()},...n,children:e||b.jsxs(b.Fragment,{children:[b.jsx(eK,{}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})})});gg.displayName="SidebarTrigger";const x00=p.forwardRef(({className:e,...t},o)=>{const{toggleSidebar:n}=Jn();return b.jsx("button",{ref:o,"aria-label":"Toggle Sidebar",className:R0("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 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:n,...t})});x00.displayName="SidebarRail";const Wg=p.forwardRef(({className:e,...t},o)=>b.jsx("main",{ref:o,className:R0("relative flex h-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Wg.displayName="SidebarInset";const k00=p.forwardRef(({className:e,...t},o)=>b.jsx(oM,{ref:o,className:R0("w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",`h-${nM}`,e),"data-sidebar":"input",...t}));k00.displayName="SidebarInput";const vg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"header",...t}));vg.displayName="SidebarHeader";const Rg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"footer",...t}));Rg.displayName="SidebarFooter";const C00=p.forwardRef(({className:e,...t},o)=>b.jsx(rg,{ref:o,className:R0("mx-2 w-auto bg-sidebar-border",e),"data-sidebar":"separator",...t}));C00.displayName="SidebarSeparator";const yg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex min-h-0 flex-1 flex-col gap-4 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-sidebar":"content",...t}));yg.displayName="SidebarContent";const lc=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("relative flex w-full min-w-0 flex-col p-2",e),"data-sidebar":"group",...t}));lc.displayName="SidebarGroup";const N00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?pc:"div";return b.jsx(r,{ref:n,className:R0("duration-200 flex shrink-0 items-center rounded-md px-3 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] 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-${nM}`,e),"data-sidebar":"group-label",...o})});N00.displayName="SidebarGroupLabel";const _00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?pc:"button";return b.jsx(r,{ref:n,className:R0("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring 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",...o})});_00.displayName="SidebarGroupAction";const ss=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("w-full text-sm",e),"data-sidebar":"group-content",...t}));ss.displayName="SidebarGroupContent";const bc=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("flex w-full min-w-0 flex-col gap-0.5",e),"data-sidebar":"menu",...t}));bc.displayName="SidebarMenu";const Jd=p.forwardRef(({className:e,...t},o)=>b.jsx("li",{ref:o,className:R0("group/menu-item relative",e),"data-sidebar":"menu-item",...t}));Jd.displayName="SidebarMenuItem";const E00=Ao("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md px-3 py-2 text-left text-md font-medium text-sidebar-foreground ring-sidebar-ring outline-hidden transition-[width,height,padding] 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 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-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:`h-${nM} text-md`,sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),rM=p.forwardRef(({asChild:e=!1,isActive:t=!1,variant:o="default",size:n="default",tooltip:r,className:a,...i},l)=>{const z=e?pc:"button",{isMobile:u,state:f}=Jn(),O=b.jsx(z,{ref:l,className:R0(E00({variant:o,size:n}),a),"data-active":t,"data-sidebar":"menu-button","data-size":n,...i});return r?(typeof r=="string"&&(r={children:r}),b.jsxs(KJ,{children:[b.jsx(YJ,{asChild:!0,children:O}),b.jsx(sg,{align:"center",hidden:f!=="collapsed"||u,side:"right",...r})]})):O});rM.displayName="SidebarMenuButton";const B00=p.forwardRef(({className:e,asChild:t=!1,showOnHover:o=!1,...n},r)=>{const a=t?pc:"button";return b.jsx(a,{ref:r,className:R0("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>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",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),"data-sidebar":"menu-action",...n})});B00.displayName="SidebarMenuAction";const e5=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("absolute right-2 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-gray-600 select-none pointer-events-none","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}));e5.displayName="SidebarMenuBadge";const S00=p.forwardRef(({className:e,showIcon:t=!1,...o},n)=>{const r=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b.jsxs("div",{ref:n,className:R0("rounded-md flex gap-2 px-3 items-center",`h-${nM}`,e),"data-sidebar":"menu-skeleton",...o,children:[t&&b.jsx(j1,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),b.jsx(j1,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});S00.displayName="SidebarMenuSkeleton";const T00=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("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}));T00.displayName="SidebarMenuSub";const P00=p.forwardRef(({...e},t)=>b.jsx("li",{ref:t,...e}));P00.displayName="SidebarMenuSubItem";const j00=p.forwardRef(({asChild:e=!1,size:t="md",isActive:o,className:n,...r},a)=>{const i=e?pc:"a";return b.jsx(i,{ref:a,className:R0("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-3 text-sidebar-foreground outline-hidden ring-sidebar-ring 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",n),"data-active":o,"data-sidebar":"menu-sub-button","data-size":t,...r})});j00.displayName="SidebarMenuSubButton";const Up=p.forwardRef(({className:e,onBackToDashboard:t,...o},n)=>b.jsx("div",{ref:n,className:R0("admin-x-container-error",e),...o,children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),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."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:t,children:"← Back to the dashboard"})]})}));Up.displayName="ErrorPage";const wg=p.forwardRef(({className:e,...t},o)=>b.jsx("h1",{ref:o,className:R0("scroll-m-20 text-3xl leading-[1.1em] tracking-tighter font-bold",e),...t}));wg.displayName="H1";const X00=p.forwardRef(({className:e,...t},o)=>b.jsx("h2",{ref:o,className:R0("scroll-m-20 text-2xl font-bold tracking-tighter first:mt-0",e),...t}));X00.displayName="H2";const Lg=p.forwardRef(({className:e,...t},o)=>b.jsx("h3",{ref:o,className:R0("scroll-m-20 text-xl font-semibold tracking-tight",e),...t}));Lg.displayName="H3";const V2=p.forwardRef(({className:e,...t},o)=>b.jsx("h4",{ref:o,className:R0("scroll-m-20 text-lg font-semibold tracking-tight",e),...t}));V2.displayName="H4";const D00=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("text-xs text-muted-foreground tracking-wide font-medium uppercase",e),...t}));D00.displayName="HTable";const $z=new Map;p.createContext({saveScrollPosition:()=>{},getScrollPosition:()=>{},resetScrollPosition:()=>{}});function I00(e){$z.delete(e)}function F00({containerRef:e}){const t=we(),o=p.useRef(null),n=p.useRef(null);return p.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const i=r.scrollTop;$z.set(t.pathname,i),n.current=i};return r.addEventListener("scroll",a),()=>r.removeEventListener("scroll",a)},[t.pathname,e]),p.useEffect(()=>{const r=e.current;if(!r)return;const a=$z.get(t.pathname);a!==void 0&&o.current!==t.pathname&&Math.abs(a-r.scrollTop)>5&&(r.scrollTop=a)},[t.pathname,e]),p.useEffect(()=>{o.current=t.pathname},[t.pathname]),null}function H00({routes:e,prefix:t,errorElement:o,children:n}){const r=p.useMemo(()=>{const a=`/${t?.replace(/\/+/g,"/").replace(/^\/|\/$/g,"")}`,i={element:b.jsx(FH,{children:n}),children:e.map(l=>({...l,errorElement:l.errorElement||o||b.jsx(Up,{})}))};return CH([i],{basename:a})},[e,t,o,n]);return b.jsx(nH,{router:r})}function xg(){const e=$a(),{externalNavigate:t}=Ta();return p.useCallback((o,n)=>{if(typeof o=="number"){e(o);return}if(n?.crossApp){t({route:o,isExternal:!0});return}e(o,n)},[e,t])}function U00(){const e=FF();return e&&Object.keys(e).length>0}function ro({to:e,replace:t,state:o,crossApp:n}){const{externalNavigate:r}=Ta();return n?(r({route:e,isExternal:!0}),null):b.jsx(aH,{replace:t,state:o,to:e})}function w1(e){return()=>e().then(({default:t})=>({Component:t}))}const V00="FeaturebaseTokenResponseType",Q00={staleTime:7200*60*1e3,refetchInterval:8640*60*1e3,refetchIntervalInBackground:!0},$00=Xt({dataType:V00,path:"/featurebase/token/"}),G00=(e={})=>$00({...Q00,...e}),kg=p.createContext(void 0);function Cg(){const e=p.useContext(kg);if(e===void 0)throw new Error("useEmberContext must be used within an EmberProvider");return e}const Zf=M0.memo(function(){const t=p.useRef(null),{isFallbackPresent:o}=Cg();return p.useLayoutEffect(()=>{if(t.current){const n=document.getElementById("ember-app");if(n)t.current.appendChild(n);else throw new Error("Ember app not found")}return()=>{const n=document.getElementById("ember-app");if(n)document.body.appendChild(n);else throw new Error("Ember app not found")}},[]),b.jsx("div",{ref:t,hidden:!o,className:"h-full w-full"})});function Z00({children:e}){const[t,o]=p.useState(0),n=p.useCallback(()=>{o(l=>l+1)},[]),r=p.useCallback(()=>{o(l=>Math.max(0,l-1))},[]),i={isFallbackPresent:t>0,registerFallback:n,unregisterFallback:r};return b.jsx(kg.Provider,{value:i,children:e})}function t5(){const{registerFallback:e,unregisterFallback:t}=Cg();return p.useEffect(()=>(e(),()=>{t()}),[e,t]),null}const Ng="ConfigResponseType",Ic0=Ng,is=Xt({dataType:Ng,path:"/config/"}),K00=e=>{var t,o;return!!((o=(t=e?.hostSettings)==null?void 0:t.managedEmail)!=null&&o.enabled)},Y00=e=>{var t,o;const n=(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain;return typeof n=="string"&&n.length>0},J00=e=>{var t,o;return(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain},e10={integration:"IntegrationsResponseType",invite:"InvitesResponseType",offer:"OffersResponseType",newsletter:"NewslettersResponseType",recommendation:"RecommendationResponseType",setting:"SettingsResponseType",theme:"ThemesResponseType",tier:"TiersResponseType",user:"UsersResponseType",post:"PostsResponseType",member:"MembersResponseType",tag:"TagsResponseType",label:"LabelsResponseType",webhook:"WebhooksResponseType"};function _g(e){if(typeof window>"u")return()=>{};if(window.EmberBridge?.state)return e(window.EmberBridge.state),()=>{};const t=setInterval(()=>{window.EmberBridge?.state&&(clearInterval(t),e(window.EmberBridge.state))},100);return()=>clearInterval(t)}function cM(e,t){let o=null,n=!0;const r=_g(a=>{n&&(a.on(e,t),o=()=>a.off(e,t))});return()=>{n=!1,r(),o?.()}}function t10(){const e=v1();p.useEffect(()=>cM("emberDataChange",o=>{const{modelName:n}=o,r=e10[n];r&&e.invalidateQueries({predicate:a=>a.queryKey[0]===r})}),[e])}function o10(){const e=v1();p.useEffect(()=>cM("emberAuthChange",o=>{o.isAuthenticated&&e.invalidateQueries()}),[e])}function Eg(){const[e,t]=p.useState(null);return p.useEffect(()=>cM("subscriptionChange",n=>{t(n)}),[]),e}function n10(e){return cM("sidebarVisibilityChange",e)}function Kf(){return window.EmberBridge?.state.sidebarVisible??!0}function o5(){return p.useSyncExternalStore(n10,Kf,Kf)}const r10={getRouteUrl:e=>e,isRouteActive:()=>!1};function Bg(){const[e,t]=p.useState(()=>window.EmberBridge?.state??null),[,o]=p.useState(0);return p.useEffect(()=>{if(!e)return _g(t);const n=()=>{o(r=>r+1)};return e.on("routeChange",n),()=>e.off("routeChange",n)},[e]),e?{getRouteUrl:e.getRouteUrl,isRouteActive:e.isRouteActive}:r10}function c10(){const{data:e}=is(),t=Eg();return!(!e?.config?.hostSettings?.forceUpgrade||t?.subscription?.status==="active")}function a10(){const e=c10(),o=pd().some(n=>n.handle?.allowInForceUpgrade===!0);return e&&!o?b.jsx(ro,{to:"/pro",replace:!0}):b.jsx(Bn,{})}const ps=vq,Fc0=wq({dataType:ps,path:"/users/",defaultSearchParams:{limit:"100",include:"roles"},defaultNextPageParams:(e,t)=>{var o;return{...t,page:(((o=e.meta)==null?void 0:o.pagination.next)||1).toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.users),n=t[t.length-1].meta;return{users:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}}),Hc0=WI({dataType:ps,path:e=>`/users/slug/${e}/`,defaultSearchParams:{include:"roles"}}),Sg=Ve({method:"PUT",path:e=>`/users/${e.id}/`,body:e=>({users:[e]}),searchParams:()=>({include:"roles"}),updateQueries:{dataType:ps,emberUpdateType:"createOrUpdate",update:Lq("users")}}),Uc0=Ve({method:"DELETE",path:e=>`/users/${e}/`,updateQueries:{dataType:ps,emberUpdateType:"delete",update:kI("users")}}),Vc0=Ve({method:"PUT",path:()=>"/users/password/",body:({newPassword:e,confirmNewPassword:t,userId:o,oldPassword:n})=>({password:[{user_id:o,oldPassword:n||"",newPassword:e,ne2Password:t}]})}),Qc0=Ve({method:"PUT",path:()=>"/users/owner/",body:e=>({owner:[{id:e}]}),updateQueries:{dataType:ps,emberUpdateType:"createOrUpdate",update:Lq("users")}});function Ms(e){return e.roles.some(t=>t.name==="Owner")}function aM(e){return e.roles.some(t=>t.name==="Administrator")}function Tg(e){return e.roles.some(o=>o.name==="Editor")||e.roles.some(o=>o.name==="Super Editor")}function s10(e){return e.roles.some(t=>t.name==="Super Editor")}function i10(e){return e.roles.some(t=>t.name==="Author")}function ls(e){return e.roles.some(t=>t.name==="Contributor")}function $c0(e){return i10(e)||ls(e)}function p10(e){return Ms(e)||aM(e)||Tg(e)}function M10(e){return Ms(e)||aM(e)||s10(e)}function l10(e){return Ms(e)||aM(e)||Tg(e)}function b10(e){return Ms(e)||aM(e)}const z10="SiteResponseType",sM=Xt({dataType:z10,path:"/site/"});function Gc0(e){const t=new URL(e.url),o=t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`;return`${t.origin}${o}`}function u10(e,t){if(K00(t)&&Y00(t))return J00(t)||"";const o=new URL(e.url).hostname||"";return o.startsWith("www.")?o.replace(/^(www)\.(?=[^/]*\..{2,5})/,""):o}function Zc0(e,t,o){const n=u10(t,o);return e==="noreply"?`noreply@${n}`:e}const Gz=navigator.userAgent.indexOf("Mac")!==-1?"command":"ctrl",d10=Gz==="command"?"⌘K":"Ctrl+K",O10=e=>{e.preventDefault();const t=new KeyboardEvent("keydown",{key:"k",keyCode:75,metaKey:Gz==="command",ctrlKey:Gz==="ctrl"});document.dispatchEvent(t)};function f10({...e}){const{data:t}=ye(),o=sM(),n=o.data?.site.title??"",r=o.data?.site.icon??"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",a=t&&!ls(t);return b.jsx(vg,{...e,children:b.jsxs("div",{className:"flex flex-col items-stretch gap-6",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[b.jsx("div",{className:"h-8 w-8 flex-shrink-0 rounded-md border-0 bg-transparent",children:b.jsx("img",{src:r,alt:"Site icon",className:"h-full w-full rounded-md object-cover"})}),b.jsx("div",{className:"flex-1 overflow-hidden text-[15px] font-semibold text-ellipsis whitespace-nowrap text-foreground",children:n})]})}),a&&b.jsxs(i1,{variant:"outline",className:"flex h-[38px] items-center justify-between pr-2 text-base text-muted-foreground shadow-xs hover:border-gray-200 hover:bg-background hover:text-gray-700 hover:shadow-sm dark:bg-gray-950 dark:hover:border-gray-800 [&_svg]:stroke-2",onClick:O10,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Td,{className:"text-muted-foreground"}),"Search site"]}),b.jsx(b00,{className:"bg-transparent text-gray-500 shadow-none dark:text-gray-800",style:{textShadow:"none"},children:d10})]})]})})}function a0(e,t,o){function n(l,z){var u;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(u=l._zod).traits??(u.traits=new Set),l._zod.traits.add(e),t(l,z);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=z}const r=o?.Parent??Object;class a extends r{}Object.defineProperty(a,"name",{value:e});function i(l){var z;const u=o?.Parent?new a:this;n(u,l),(z=u._zod).deferred??(z.deferred=[]);for(const f of u._zod.deferred)f();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>o?.Parent&&l instanceof o.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const jg={};function sn(e){return jg}function A10(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,r])=>t.indexOf(+n)===-1).map(([n,r])=>r)}function Zz(e,t){return typeof t=="bigint"?t.toString():t}function n5(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function r5(e){return e==null}function c5(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}const Yf=Symbol("evaluating");function k1(e,t,o){let n;Object.defineProperty(e,t,{get(){if(n!==Yf)return n===void 0&&(n=Yf,n=o()),n},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function er(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){const t={};for(const o of e){const n=Object.getOwnPropertyDescriptors(o);Object.assign(t,n)}return Object.defineProperties({},t)}function Jf(e){return JSON.stringify(e)}const Xg="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const h10=n5(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Kr(e){if(Vp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const o=t.prototype;return!(Vp(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Dg(e){return Kr(e)?{...e}:Array.isArray(e)?[...e]:e}const q10=new Set(["string","number","symbol"]);function Yr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dn(e,t,o){const n=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(n._zod.parent=e),n}function Q0(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function m10(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function g10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(r[a]=o.shape[a])}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function W10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete r[a]}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function v10(e,t){if(!Kr(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=tr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return er(this,"shape",a),a},checks:[]});return dn(e,r)}function R10(e,t){if(!Kr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return er(this,"shape",n),n},checks:e._zod.def.checks};return dn(e,o)}function y10(e,t){const o=tr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return er(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return dn(e,o)}function w10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)a[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return er(this,"shape",a),a},checks:[]});return dn(t,n)}function L10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)a[i]=new e({type:"nonoptional",innerType:r[i]});return er(this,"shape",a),a},checks:[]});return dn(t,n)}function _r(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Er(e,t){return t.map(o=>{var n;return(n=o).path??(n.path=[]),o.path.unshift(e),o})}function Pi(e){return typeof e=="string"?e:e?.message}function pn(e,t,o){const n={...e,path:e.path??[]};if(!e.message){const r=Pi(e.inst?._zod.def?.error?.(e))??Pi(t?.error?.(e))??Pi(o.customError?.(e))??Pi(o.localeError?.(e))??"Invalid input";n.message=r}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function a5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Na(...e){const[t,o,n]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:n}:{...t}}const Ig=(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,Zz,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fg=a0("$ZodError",Ig),iM=a0("$ZodError",Ig,{Parent:Error});function x10(e,t=o=>o.message){const o={},n=[];for(const r of e.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:o}}function k10(e,t=o=>o.message){const o={_errors:[]},n=r=>{for(const a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>n({issues:i}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)o._errors.push(t(a));else{let i=o,l=0;for(;l<a.path.length;){const z=a.path[l];l===a.path.length-1?(i[z]=i[z]||{_errors:[]},i[z]._errors.push(t(a))):i[z]=i[z]||{_errors:[]},i=i[z],l++}}};return n(e),o}const pM=e=>(t,o,n,r)=>{const a=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise)throw new Hr;if(i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Xg(l,r?.callee),l}return i.value},Kc0=pM(iM),MM=e=>async(t,o,n,r)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Xg(l,r?.callee),l}return i.value},Yc0=MM(iM),lM=e=>(t,o,n)=>{const r=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Hr;return a.issues.length?{success:!1,error:new(e??Fg)(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},C10=lM(iM),bM=e=>async(t,o,n)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:o,issues:[]},r);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},N10=bM(iM),_10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return pM(e)(t,o,r)},E10=e=>(t,o,n)=>pM(e)(t,o,n),B10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return MM(e)(t,o,r)},S10=e=>async(t,o,n)=>MM(e)(t,o,n),T10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return lM(e)(t,o,r)},P10=e=>(t,o,n)=>lM(e)(t,o,n),j10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bM(e)(t,o,r)},X10=e=>async(t,o,n)=>bM(e)(t,o,n),D10=/^[cC][^\s-]{8,}$/,I10=/^[0-9a-z]+$/,F10=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,H10=/^[0-9a-vA-V]{20}$/,U10=/^[A-Za-z0-9]{27}$/,V10=/^[a-zA-Z0-9_-]{21}$/,Q10=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$10=/^([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})$/,eA=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,G10=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z10="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function K10(){return new RegExp(Z10,"u")}const Y10=/^(?:(?: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])$/,J10=/^(([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}|:))$/,ee0=/^((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])$/,te0=/^(([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])$/,oe0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hg=/^[A-Za-z0-9_-]*$/,ne0=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,re0=/^\+(?:[0-9]){6,14}[0-9]$/,Ug="(?:(?:\\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])))",ce0=new RegExp(`^${Ug}$`);function Vg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ae0(e){return new RegExp(`^${Vg(e)}$`)}function se0(e){const t=Vg({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${o.join("|")})`;return new RegExp(`^${Ug}T(?:${n})$`)}const ie0=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pe0=/^(?:true|false)$/i,Me0=/^[^A-Z]*$/,le0=/^[^a-z]*$/,ot=a0("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),Qg={number:"number",bigint:"bigint",object:"date"},be0=a0("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);const o=Qg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:o,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ze0=a0("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);const o=Qg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:o,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ue0=a0("$ZodCheckMaxLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!r5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const i=a5(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),de0=a0("$ZodCheckMinLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!r5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const i=a5(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Oe0=a0("$ZodCheckLengthEquals",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!r5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const i=a5(r),l=a>t.length;n.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),zM=a0("$ZodCheckStringFormat",(e,t)=>{var o,n;ot.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),fe0=a0("$ZodCheckRegex",(e,t)=>{zM.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ae0=a0("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Me0),zM.init(e,t)}),he0=a0("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=le0),zM.init(e,t)}),qe0=a0("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);const o=Yr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=n,e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),me0=a0("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`^${Yr(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),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})}}),ge0=a0("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`.*${Yr(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),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})}}),We0=a0("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class ve0{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
601
601
|
`).filter(i=>i),r=Math.min(...n.map(i=>i.length-i.trimStart().length)),a=n.map(i=>i.slice(r)).map(i=>" ".repeat(this.indent*2)+i);for(const i of a)this.content.push(i)}compile(){const t=Function,o=this?.args,r=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...o,r.join(`
|
|
602
602
|
`))}}const Re0={major:4,minor:1,patch:12},ee=a0("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Re0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const r of n)for(const a of r._zod.onattach)a(e);if(n.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(i,l,z)=>{let u=_r(i),f;for(const O of l){if(O._zod.def.when){if(!O._zod.def.when(i))continue}else if(u)continue;const h=i.issues.length,q=O._zod.check(i);if(q instanceof Promise&&z?.async===!1)throw new Hr;if(f||q instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await q,i.issues.length!==h&&(u||(u=_r(i,h)))});else{if(i.issues.length===h)continue;u||(u=_r(i,h))}}return f?f.then(()=>i):i},a=(i,l,z)=>{if(_r(i))return i.aborted=!0,i;const u=r(l,n,z);if(u instanceof Promise){if(z.async===!1)throw new Hr;return u.then(f=>e._zod.parse(f,z))}return e._zod.parse(u,z)};e._zod.run=(i,l)=>{if(l.skipChecks)return e._zod.parse(i,l);if(l.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(f=>a(f,i,l)):a(u,i,l)}const z=e._zod.parse(i,l);if(z instanceof Promise){if(l.async===!1)throw new Hr;return z.then(u=>r(u,n,l))}return r(z,n,l)}}e["~standard"]={validate:r=>{try{const a=C10(e,r);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return N10(e,r).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),uM=a0("$ZodString",(e,t)=>{ee.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ie0(e._zod.bag),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),te=a0("$ZodStringFormat",(e,t)=>{zM.init(e,t),uM.init(e,t)}),ye0=a0("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=$10),te.init(e,t)}),we0=a0("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=eA(n))}else t.pattern??(t.pattern=eA());te.init(e,t)}),Le0=a0("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=G10),te.init(e,t)}),xe0=a0("$ZodURL",(e,t)=>{te.init(e,t),e._zod.check=o=>{try{const n=o.value.trim(),r=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ne0.source,input:o.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})),t.normalize?o.value=r.href:o.value=n;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),ke0=a0("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=K10()),te.init(e,t)}),Ce0=a0("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=V10),te.init(e,t)}),Ne0=a0("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=D10),te.init(e,t)}),_e0=a0("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=I10),te.init(e,t)}),Ee0=a0("$ZodULID",(e,t)=>{t.pattern??(t.pattern=F10),te.init(e,t)}),Be0=a0("$ZodXID",(e,t)=>{t.pattern??(t.pattern=H10),te.init(e,t)}),Se0=a0("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=U10),te.init(e,t)}),Te0=a0("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=se0(t)),te.init(e,t)}),Pe0=a0("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ce0),te.init(e,t)}),je0=a0("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ae0(t)),te.init(e,t)}),Xe0=a0("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Q10),te.init(e,t)}),De0=a0("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Y10),te.init(e,t),e._zod.onattach.push(o=>{const n=o._zod.bag;n.format="ipv4"})}),Ie0=a0("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=J10),te.init(e,t),e._zod.onattach.push(o=>{const n=o._zod.bag;n.format="ipv6"}),e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),Fe0=a0("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ee0),te.init(e,t)}),He0=a0("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=te0),te.init(e,t),e._zod.check=o=>{const n=o.value.split("/");try{if(n.length!==2)throw new Error;const[r,a]=n;if(!a)throw new Error;const i=Number(a);if(`${i}`!==a)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function $g(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ue0=a0("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=oe0),te.init(e,t),e._zod.onattach.push(o=>{o._zod.bag.contentEncoding="base64"}),e._zod.check=o=>{$g(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function Ve0(e){if(!Hg.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),o=t.padEnd(Math.ceil(t.length/4)*4,"=");return $g(o)}const Qe0=a0("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Hg),te.init(e,t),e._zod.onattach.push(o=>{o._zod.bag.contentEncoding="base64url"}),e._zod.check=o=>{Ve0(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),$e0=a0("$ZodE164",(e,t)=>{t.pattern??(t.pattern=re0),te.init(e,t)});function Ge0(e,t=null){try{const o=e.split(".");if(o.length!==3)return!1;const[n]=o;if(!n)return!1;const r=JSON.parse(atob(n));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}const Ze0=a0("$ZodJWT",(e,t)=>{te.init(e,t),e._zod.check=o=>{Ge0(o.value,t.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}}),Gg=a0("$ZodBoolean",(e,t)=>{ee.init(e,t),e._zod.pattern=pe0,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=!!o.value}catch{}const r=o.value;return typeof r=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),o}}),Ke0=a0("$ZodUnknown",(e,t)=>{ee.init(e,t),e._zod.parse=o=>o}),Ye0=a0("$ZodNever",(e,t)=>{ee.init(e,t),e._zod.parse=(o,n)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)}),Je0=a0("$ZodDate",(e,t)=>{ee.init(e,t),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=new Date(o.value)}catch{}const r=o.value,a=r instanceof Date;return a&&!Number.isNaN(r.getTime())||o.issues.push({expected:"date",code:"invalid_type",input:r,...a?{received:"Invalid Date"}:{},inst:e}),o}});function tA(e,t,o){e.issues.length&&t.issues.push(...Er(o,e.issues)),t.value[o]=e.value}const e20=a0("$ZodArray",(e,t)=>{ee.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!Array.isArray(r))return o.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),o;o.value=Array(r.length);const a=[];for(let i=0;i<r.length;i++){const l=r[i],z=t.element._zod.run({value:l,issues:[]},n);z instanceof Promise?a.push(z.then(u=>tA(u,o,i))):tA(z,o,i)}return a.length?Promise.all(a).then(()=>o):o}});function Qp(e,t,o,n){e.issues.length&&t.issues.push(...Er(o,e.issues)),e.value===void 0?o in n&&(t.value[o]=void 0):t.value[o]=e.value}function Zg(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const o=m10(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function Kg(e,t,o,n,r,a){const i=[],l=r.keySet,z=r.catchall._zod,u=z.def.type;for(const f of Object.keys(t)){if(l.has(f))continue;if(u==="never"){i.push(f);continue}const O=z.run({value:t[f],issues:[]},n);O instanceof Promise?e.push(O.then(h=>Qp(h,o,f,t))):Qp(O,o,f,t)}return i.length&&o.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a}),e.length?Promise.all(e).then(()=>o):o}const t20=a0("$ZodObject",(e,t)=>{if(ee.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const z={...l};return Object.defineProperty(t,"shape",{value:z}),z}})}const n=n5(()=>Zg(t));k1(e._zod,"propValues",()=>{const l=t.shape,z={};for(const u in l){const f=l[u]._zod;if(f.values){z[u]??(z[u]=new Set);for(const O of f.values)z[u].add(O)}}return z});const r=Vp,a=t.catchall;let i;e._zod.parse=(l,z)=>{i??(i=n.value);const u=l.value;if(!r(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const f=[],O=i.shape;for(const h of i.keys){const g=O[h]._zod.run({value:u[h],issues:[]},z);g instanceof Promise?f.push(g.then(W=>Qp(W,l,h,u))):Qp(g,l,h,u)}return a?Kg(f,u,l,z,n.value,e):f.length?Promise.all(f).then(()=>l):l}}),o20=a0("$ZodObjectJIT",(e,t)=>{t20.init(e,t);const o=e._zod.parse,n=n5(()=>Zg(t)),r=h=>{const q=new ve0(["shape","payload","ctx"]),g=n.value,W=C=>{const L=Jf(C);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};q.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const C of g.keys)v[C]=`key_${y++}`;q.write("const newResult = {};");for(const C of g.keys){const L=v[C],x=Jf(C);q.write(`const ${L} = ${W(C)};`),q.write(`
|
|
603
603
|
if (${L}.issues.length) {
|
|
@@ -617,4 +617,4 @@ _0.version="2.24.0";HU($1);_0.fn=g0;_0.min=CQ;_0.max=NQ;_0.now=_Q;_0.utc=Dt;_0.u
|
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
`)}q.write("payload.value = newResult;"),q.write("return payload;");const k=q.compile();return(C,L)=>k(h,C,L)};let a;const i=Vp,l=!jg.jitless,u=l&&h10.value,f=t.catchall;let O;e._zod.parse=(h,q)=>{O??(O=n.value);const g=h.value;return i(g)?l&&u&&q?.async===!1&&q.jitless!==!0?(a||(a=r(t.shape)),h=a(h,q),f?Kg([],g,h,q,O,e):h):o(h,q):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function oA(e,t,o,n){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const r=e.filter(a=>!_r(a));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(a=>a.issues.map(i=>pn(i,n,sn())))}),t)}const n20=a0("$ZodUnion",(e,t)=>{ee.init(e,t),k1(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),k1(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),k1(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),k1(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${r.map(a=>c5(a.source)).join("|")})$`)}});const o=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(r,a)=>{if(o)return n(r,a);let i=!1;const l=[];for(const z of t.options){const u=z._zod.run({value:r.value,issues:[]},a);if(u instanceof Promise)l.push(u),i=!0;else{if(u.issues.length===0)return u;l.push(u)}}return i?Promise.all(l).then(z=>oA(z,r,e,a)):oA(l,r,e,a)}}),r20=a0("$ZodIntersection",(e,t)=>{ee.init(e,t),e._zod.parse=(o,n)=>{const r=o.value,a=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([z,u])=>nA(o,z,u)):nA(o,a,i)}});function Kz(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Kr(e)&&Kr(t)){const o=Object.keys(t),n=Object.keys(e).filter(a=>o.indexOf(a)!==-1),r={...e,...t};for(const a of n){const i=Kz(e[a],t[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};r[a]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let n=0;n<e.length;n++){const r=e[n],a=t[n],i=Kz(r,a);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};o.push(i.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function nA(e,t,o){if(t.issues.length&&e.issues.push(...t.issues),o.issues.length&&e.issues.push(...o.issues),_r(e))return e;const n=Kz(t.value,o.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const c20=a0("$ZodRecord",(e,t)=>{ee.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!Kr(r))return o.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),o;const a=[];if(t.keyType._zod.values){const i=t.keyType._zod.values;o.value={};for(const z of i)if(typeof z=="string"||typeof z=="number"||typeof z=="symbol"){const u=t.valueType._zod.run({value:r[z],issues:[]},n);u instanceof Promise?a.push(u.then(f=>{f.issues.length&&o.issues.push(...Er(z,f.issues)),o.value[z]=f.value})):(u.issues.length&&o.issues.push(...Er(z,u.issues)),o.value[z]=u.value)}let l;for(const z in r)i.has(z)||(l=l??[],l.push(z));l&&l.length>0&&o.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{o.value={};for(const i of Reflect.ownKeys(r)){if(i==="__proto__")continue;const l=t.keyType._zod.run({value:i,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(u=>pn(u,n,sn())),input:i,path:[i],inst:e}),o.value[l.value]=l.value;continue}const z=t.valueType._zod.run({value:r[i],issues:[]},n);z instanceof Promise?a.push(z.then(u=>{u.issues.length&&o.issues.push(...Er(i,u.issues)),o.value[l.value]=u.value})):(z.issues.length&&o.issues.push(...Er(i,z.issues)),o.value[l.value]=z.value)}}return a.length?Promise.all(a).then(()=>o):o}}),a20=a0("$ZodEnum",(e,t)=>{ee.init(e,t);const o=A10(t.entries),n=new Set(o);e._zod.values=n,e._zod.pattern=new RegExp(`^(${o.filter(r=>q10.has(typeof r)).map(r=>typeof r=="string"?Yr(r):r.toString()).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:o,input:i,inst:e}),r}}),s20=a0("$ZodLiteral",(e,t)=>{if(ee.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Yr(o):o?Yr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{const r=o.value;return e._zod.values.has(r)||o.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),o}}),i20=a0("$ZodTransform",(e,t)=>{ee.init(e,t),e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new Pg(e.constructor.name);const r=t.transform(o.value,o);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(i=>(o.value=i,o));if(r instanceof Promise)throw new Hr;return o.value=r,o}});function rA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const p20=a0("$ZodOptional",(e,t)=>{ee.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k1(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k1(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${c5(o.source)})?$`):void 0}),e._zod.parse=(o,n)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>rA(a,o.value)):rA(r,o.value)}return o.value===void 0?o:t.innerType._zod.run(o,n)}}),M20=a0("$ZodNullable",(e,t)=>{ee.init(e,t),k1(e._zod,"optin",()=>t.innerType._zod.optin),k1(e._zod,"optout",()=>t.innerType._zod.optout),k1(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${c5(o.source)}|null)$`):void 0}),k1(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(o,n)=>o.value===null?o:t.innerType._zod.run(o,n)}),l20=a0("$ZodDefault",(e,t)=>{ee.init(e,t),e._zod.optin="optional",k1(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);if(o.value===void 0)return o.value=t.defaultValue,o;const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>cA(a,t)):cA(r,t)}});function cA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const b20=a0("$ZodPrefault",(e,t)=>{ee.init(e,t),e._zod.optin="optional",k1(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>(n.direction==="backward"||o.value===void 0&&(o.value=t.defaultValue),t.innerType._zod.run(o,n))}),z20=a0("$ZodNonOptional",(e,t)=>{ee.init(e,t),k1(e._zod,"values",()=>{const o=t.innerType._zod.values;return o?new Set([...o].filter(n=>n!==void 0)):void 0}),e._zod.parse=(o,n)=>{const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>aA(a,e)):aA(r,e)}});function aA(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const u20=a0("$ZodCatch",(e,t)=>{ee.init(e,t),k1(e._zod,"optin",()=>t.innerType._zod.optin),k1(e._zod,"optout",()=>t.innerType._zod.optout),k1(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>(o.value=a.value,a.issues.length&&(o.value=t.catchValue({...o,error:{issues:a.issues.map(i=>pn(i,n,sn()))},input:o.value}),o.issues=[]),o)):(o.value=r.value,r.issues.length&&(o.value=t.catchValue({...o,error:{issues:r.issues.map(a=>pn(a,n,sn()))},input:o.value}),o.issues=[]),o)}}),d20=a0("$ZodPipe",(e,t)=>{ee.init(e,t),k1(e._zod,"values",()=>t.in._zod.values),k1(e._zod,"optin",()=>t.in._zod.optin),k1(e._zod,"optout",()=>t.out._zod.optout),k1(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,n)=>{if(n.direction==="backward"){const a=t.out._zod.run(o,n);return a instanceof Promise?a.then(i=>ji(i,t.in,n)):ji(a,t.in,n)}const r=t.in._zod.run(o,n);return r instanceof Promise?r.then(a=>ji(a,t.out,n)):ji(r,t.out,n)}});function ji(e,t,o){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},o)}const Yg=a0("$ZodCodec",(e,t)=>{ee.init(e,t),k1(e._zod,"values",()=>t.in._zod.values),k1(e._zod,"optin",()=>t.in._zod.optin),k1(e._zod,"optout",()=>t.out._zod.optout),k1(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,n)=>{if((n.direction||"forward")==="forward"){const a=t.in._zod.run(o,n);return a instanceof Promise?a.then(i=>Xi(i,t,n)):Xi(a,t,n)}else{const a=t.out._zod.run(o,n);return a instanceof Promise?a.then(i=>Xi(i,t,n)):Xi(a,t,n)}}});function Xi(e,t,o){if(e.issues.length)return e.aborted=!0,e;if((o.direction||"forward")==="forward"){const r=t.transform(e.value,e);return r instanceof Promise?r.then(a=>Di(e,a,t.out,o)):Di(e,r,t.out,o)}else{const r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(a=>Di(e,a,t.in,o)):Di(e,r,t.in,o)}}function Di(e,t,o,n){return e.issues.length?(e.aborted=!0,e):o._zod.run({value:t,issues:e.issues},n)}const O20=a0("$ZodReadonly",(e,t)=>{ee.init(e,t),k1(e._zod,"propValues",()=>t.innerType._zod.propValues),k1(e._zod,"values",()=>t.innerType._zod.values),k1(e._zod,"optin",()=>t.innerType._zod.optin),k1(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(sA):sA(r)}});function sA(e){return e.value=Object.freeze(e.value),e}const f20=a0("$ZodCustom",(e,t)=>{ot.init(e,t),ee.init(e,t),e._zod.parse=(o,n)=>o,e._zod.check=o=>{const n=o.value,r=t.fn(n);if(r instanceof Promise)return r.then(a=>iA(a,o,n,e));iA(r,o,n,e)}});function iA(e,t,o,n){if(!e){const r={code:"custom",input:o,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(r.params=n._zod.def.params),t.issues.push(Na(r))}}class A20{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){const n=o[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const o=this._map.get(t);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(t),this}get(t){const o=t._zod.parent;if(o){const n={...this.get(o)??{}};delete n.id;const r={...n,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function h20(){return new A20}const Ii=h20();function q20(e,t){return new e({type:"string",...Q0(t)})}function m20(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Q0(t)})}function pA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Q0(t)})}function g20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Q0(t)})}function W20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Q0(t)})}function v20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Q0(t)})}function R20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Q0(t)})}function y20(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Q0(t)})}function w20(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Q0(t)})}function L20(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Q0(t)})}function x20(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Q0(t)})}function k20(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Q0(t)})}function C20(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Q0(t)})}function N20(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Q0(t)})}function _20(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Q0(t)})}function E20(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Q0(t)})}function B20(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Q0(t)})}function S20(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Q0(t)})}function T20(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Q0(t)})}function P20(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Q0(t)})}function j20(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Q0(t)})}function X20(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Q0(t)})}function D20(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Q0(t)})}function I20(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Q0(t)})}function F20(e,t){return new e({type:"string",format:"date",check:"string_format",...Q0(t)})}function H20(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Q0(t)})}function U20(e,t){return new e({type:"string",format:"duration",check:"string_format",...Q0(t)})}function V20(e,t){return new e({type:"boolean",...Q0(t)})}function Q20(e){return new e({type:"unknown"})}function $20(e,t){return new e({type:"never",...Q0(t)})}function G20(e,t){return new e({type:"date",...Q0(t)})}function Z20(e,t){return new be0({check:"less_than",...Q0(t),value:e,inclusive:!0})}function K20(e,t){return new ze0({check:"greater_than",...Q0(t),value:e,inclusive:!0})}function Jg(e,t){return new ue0({check:"max_length",...Q0(t),maximum:e})}function $p(e,t){return new de0({check:"min_length",...Q0(t),minimum:e})}function eW(e,t){return new Oe0({check:"length_equals",...Q0(t),length:e})}function Y20(e,t){return new fe0({check:"string_format",format:"regex",...Q0(t),pattern:e})}function J20(e){return new Ae0({check:"string_format",format:"lowercase",...Q0(e)})}function et0(e){return new he0({check:"string_format",format:"uppercase",...Q0(e)})}function tt0(e,t){return new qe0({check:"string_format",format:"includes",...Q0(t),includes:e})}function ot0(e,t){return new me0({check:"string_format",format:"starts_with",...Q0(t),prefix:e})}function nt0(e,t){return new ge0({check:"string_format",format:"ends_with",...Q0(t),suffix:e})}function bs(e){return new We0({check:"overwrite",tx:e})}function rt0(e){return bs(t=>t.normalize(e))}function ct0(){return bs(e=>e.trim())}function at0(){return bs(e=>e.toLowerCase())}function st0(){return bs(e=>e.toUpperCase())}function it0(e,t,o){return new e({type:"array",element:t,...Q0(o)})}function pt0(e,t,o){return new e({type:"custom",check:"custom",fn:t,...Q0(o)})}function Mt0(e){const t=lt0(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(Na(n,o.value,t._zod.def));else{const r=n;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=o.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),o.issues.push(Na(r))}},e(o.value,o)));return t}function lt0(e,t){const o=new ot({check:"custom",...Q0(t)});return o._zod.check=e,o}function bt0(e,t){const o=Q0(t);let n=o.truthy??["true","1","yes","on","y","enabled"],r=o.falsy??["false","0","no","off","n","disabled"];o.case!=="sensitive"&&(n=n.map(q=>typeof q=="string"?q.toLowerCase():q),r=r.map(q=>typeof q=="string"?q.toLowerCase():q));const a=new Set(n),i=new Set(r),l=e.Codec??Yg,z=e.Boolean??Gg,u=e.String??uM,f=new u({type:"string",error:o.error}),O=new z({type:"boolean",error:o.error}),h=new l({type:"pipe",in:f,out:O,transform:((q,g)=>{let W=q;return o.case!=="sensitive"&&(W=W.toLowerCase()),a.has(W)?!0:i.has(W)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...i],input:g.value,inst:h,continue:!1}),{})}),reverseTransform:((q,g)=>q===!0?n[0]||"true":r[0]||"false"),error:o.error});return h}const zt0=a0("ZodISODateTime",(e,t)=>{Te0.init(e,t),ce.init(e,t)});function tW(e){return I20(zt0,e)}const ut0=a0("ZodISODate",(e,t)=>{Pe0.init(e,t),ce.init(e,t)});function dt0(e){return F20(ut0,e)}const Ot0=a0("ZodISOTime",(e,t)=>{je0.init(e,t),ce.init(e,t)});function ft0(e){return H20(Ot0,e)}const At0=a0("ZodISODuration",(e,t)=>{Xe0.init(e,t),ce.init(e,t)});function ht0(e){return U20(At0,e)}const qt0=(e,t)=>{Fg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>k10(e,o)},flatten:{value:o=>x10(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,Zz,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,Zz,2)}},isEmpty:{get(){return e.issues.length===0}}})},nt=a0("ZodError",qt0,{Parent:Error}),mt0=pM(nt),gt0=MM(nt),Wt0=lM(nt),vt0=bM(nt),Rt0=_10(nt),yt0=E10(nt),wt0=B10(nt),Lt0=S10(nt),xt0=T10(nt),kt0=P10(nt),Ct0=j10(nt),Nt0=X10(nt),le=a0("ZodType",(e,t)=>(ee.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...o)=>e.clone(tr(t,{checks:[...t.checks??[],...o.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(o,n)=>dn(e,o,n),e.brand=()=>e,e.register=((o,n)=>(o.add(e,n),e)),e.parse=(o,n)=>mt0(e,o,n,{callee:e.parse}),e.safeParse=(o,n)=>Wt0(e,o,n),e.parseAsync=async(o,n)=>gt0(e,o,n,{callee:e.parseAsync}),e.safeParseAsync=async(o,n)=>vt0(e,o,n),e.spa=e.safeParseAsync,e.encode=(o,n)=>Rt0(e,o,n),e.decode=(o,n)=>yt0(e,o,n),e.encodeAsync=async(o,n)=>wt0(e,o,n),e.decodeAsync=async(o,n)=>Lt0(e,o,n),e.safeEncode=(o,n)=>xt0(e,o,n),e.safeDecode=(o,n)=>kt0(e,o,n),e.safeEncodeAsync=async(o,n)=>Ct0(e,o,n),e.safeDecodeAsync=async(o,n)=>Nt0(e,o,n),e.refine=(o,n)=>e.check(vo0(o,n)),e.superRefine=o=>e.check(Ro0(o)),e.overwrite=o=>e.check(bs(o)),e.optional=()=>lA(e),e.nullable=()=>bA(e),e.nullish=()=>lA(bA(e)),e.nonoptional=o=>fo0(e,o),e.array=()=>cW(e),e.or=o=>no0([e,o]),e.and=o=>co0(e,o),e.transform=o=>zA(e,lo0(o)),e.default=o=>uo0(e,o),e.prefault=o=>Oo0(e,o),e.catch=o=>ho0(e,o),e.pipe=o=>zA(e,o),e.readonly=()=>go0(e),e.describe=o=>{const n=e.clone();return Ii.add(n,{description:o}),n},Object.defineProperty(e,"description",{get(){return Ii.get(e)?.description},configurable:!0}),e.meta=(...o)=>{if(o.length===0)return Ii.get(e);const n=e.clone();return Ii.add(n,o[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),oW=a0("_ZodString",(e,t)=>{uM.init(e,t),le.init(e,t);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...n)=>e.check(Y20(...n)),e.includes=(...n)=>e.check(tt0(...n)),e.startsWith=(...n)=>e.check(ot0(...n)),e.endsWith=(...n)=>e.check(nt0(...n)),e.min=(...n)=>e.check($p(...n)),e.max=(...n)=>e.check(Jg(...n)),e.length=(...n)=>e.check(eW(...n)),e.nonempty=(...n)=>e.check($p(1,...n)),e.lowercase=n=>e.check(J20(n)),e.uppercase=n=>e.check(et0(n)),e.trim=()=>e.check(ct0()),e.normalize=(...n)=>e.check(rt0(...n)),e.toLowerCase=()=>e.check(at0()),e.toUpperCase=()=>e.check(st0())}),nW=a0("ZodString",(e,t)=>{uM.init(e,t),oW.init(e,t),e.email=o=>e.check(m20(_t0,o)),e.url=o=>e.check(y20(Et0,o)),e.jwt=o=>e.check(D20(Gt0,o)),e.emoji=o=>e.check(w20(Bt0,o)),e.guid=o=>e.check(pA(MA,o)),e.uuid=o=>e.check(g20(Fi,o)),e.uuidv4=o=>e.check(W20(Fi,o)),e.uuidv6=o=>e.check(v20(Fi,o)),e.uuidv7=o=>e.check(R20(Fi,o)),e.nanoid=o=>e.check(L20(St0,o)),e.guid=o=>e.check(pA(MA,o)),e.cuid=o=>e.check(x20(Tt0,o)),e.cuid2=o=>e.check(k20(Pt0,o)),e.ulid=o=>e.check(C20(jt0,o)),e.base64=o=>e.check(P20(Vt0,o)),e.base64url=o=>e.check(j20(Qt0,o)),e.xid=o=>e.check(N20(Xt0,o)),e.ksuid=o=>e.check(_20(Dt0,o)),e.ipv4=o=>e.check(E20(It0,o)),e.ipv6=o=>e.check(B20(Ft0,o)),e.cidrv4=o=>e.check(S20(Ht0,o)),e.cidrv6=o=>e.check(T20(Ut0,o)),e.e164=o=>e.check(X20($t0,o)),e.datetime=o=>e.check(tW(o)),e.date=o=>e.check(dt0(o)),e.time=o=>e.check(ft0(o)),e.duration=o=>e.check(ht0(o))});function L2(e){return q20(nW,e)}const ce=a0("ZodStringFormat",(e,t)=>{te.init(e,t),oW.init(e,t)}),_t0=a0("ZodEmail",(e,t)=>{Le0.init(e,t),ce.init(e,t)}),MA=a0("ZodGUID",(e,t)=>{ye0.init(e,t),ce.init(e,t)}),Fi=a0("ZodUUID",(e,t)=>{we0.init(e,t),ce.init(e,t)}),Et0=a0("ZodURL",(e,t)=>{xe0.init(e,t),ce.init(e,t)}),Bt0=a0("ZodEmoji",(e,t)=>{ke0.init(e,t),ce.init(e,t)}),St0=a0("ZodNanoID",(e,t)=>{Ce0.init(e,t),ce.init(e,t)}),Tt0=a0("ZodCUID",(e,t)=>{Ne0.init(e,t),ce.init(e,t)}),Pt0=a0("ZodCUID2",(e,t)=>{_e0.init(e,t),ce.init(e,t)}),jt0=a0("ZodULID",(e,t)=>{Ee0.init(e,t),ce.init(e,t)}),Xt0=a0("ZodXID",(e,t)=>{Be0.init(e,t),ce.init(e,t)}),Dt0=a0("ZodKSUID",(e,t)=>{Se0.init(e,t),ce.init(e,t)}),It0=a0("ZodIPv4",(e,t)=>{De0.init(e,t),ce.init(e,t)}),Ft0=a0("ZodIPv6",(e,t)=>{Ie0.init(e,t),ce.init(e,t)}),Ht0=a0("ZodCIDRv4",(e,t)=>{Fe0.init(e,t),ce.init(e,t)}),Ut0=a0("ZodCIDRv6",(e,t)=>{He0.init(e,t),ce.init(e,t)}),Vt0=a0("ZodBase64",(e,t)=>{Ue0.init(e,t),ce.init(e,t)}),Qt0=a0("ZodBase64URL",(e,t)=>{Qe0.init(e,t),ce.init(e,t)}),$t0=a0("ZodE164",(e,t)=>{$e0.init(e,t),ce.init(e,t)}),Gt0=a0("ZodJWT",(e,t)=>{Ze0.init(e,t),ce.init(e,t)}),rW=a0("ZodBoolean",(e,t)=>{Gg.init(e,t),le.init(e,t)});function Mp(e){return V20(rW,e)}const Zt0=a0("ZodUnknown",(e,t)=>{Ke0.init(e,t),le.init(e,t)});function Yz(){return Q20(Zt0)}const Kt0=a0("ZodNever",(e,t)=>{Ye0.init(e,t),le.init(e,t)});function Yt0(e){return $20(Kt0,e)}const Jt0=a0("ZodDate",(e,t)=>{Je0.init(e,t),le.init(e,t),e.min=(n,r)=>e.check(K20(n,r)),e.max=(n,r)=>e.check(Z20(n,r));const o=e._zod.bag;e.minDate=o.minimum?new Date(o.minimum):null,e.maxDate=o.maximum?new Date(o.maximum):null});function eo0(e){return G20(Jt0,e)}const to0=a0("ZodArray",(e,t)=>{e20.init(e,t),le.init(e,t),e.element=t.element,e.min=(o,n)=>e.check($p(o,n)),e.nonempty=o=>e.check($p(1,o)),e.max=(o,n)=>e.check(Jg(o,n)),e.length=(o,n)=>e.check(eW(o,n)),e.unwrap=()=>e.element});function cW(e,t){return it0(to0,e,t)}const aW=a0("ZodObject",(e,t)=>{o20.init(e,t),le.init(e,t),k1(e,"shape",()=>t.shape),e.keyof=()=>io0(Object.keys(e._zod.def.shape)),e.catchall=o=>e.clone({...e._zod.def,catchall:o}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yz()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yz()}),e.strict=()=>e.clone({...e._zod.def,catchall:Yt0()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=o=>v10(e,o),e.safeExtend=o=>R10(e,o),e.merge=o=>y10(e,o),e.pick=o=>g10(e,o),e.omit=o=>W10(e,o),e.partial=(...o)=>w10(sW,e,o[0]),e.required=(...o)=>L10(iW,e,o[0])});function Gp(e,t){const o={type:"object",shape:e??{},...Q0(t)};return new aW(o)}function dM(e,t){return new aW({type:"object",shape:e,catchall:Yz(),...Q0(t)})}const oo0=a0("ZodUnion",(e,t)=>{n20.init(e,t),le.init(e,t),e.options=t.options});function no0(e,t){return new oo0({type:"union",options:e,...Q0(t)})}const ro0=a0("ZodIntersection",(e,t)=>{r20.init(e,t),le.init(e,t)});function co0(e,t){return new ro0({type:"intersection",left:e,right:t})}const ao0=a0("ZodRecord",(e,t)=>{c20.init(e,t),le.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function so0(e,t,o){return new ao0({type:"record",keyType:e,valueType:t,...Q0(o)})}const Jz=a0("ZodEnum",(e,t)=>{a20.init(e,t),le.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const o=new Set(Object.keys(t.entries));e.extract=(n,r)=>{const a={};for(const i of n)if(o.has(i))a[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Jz({...t,checks:[],...Q0(r),entries:a})},e.exclude=(n,r)=>{const a={...t.entries};for(const i of n)if(o.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Jz({...t,checks:[],...Q0(r),entries:a})}});function io0(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Jz({type:"enum",entries:o,...Q0(t)})}const po0=a0("ZodLiteral",(e,t)=>{s20.init(e,t),le.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Jc0(e,t){return new po0({type:"literal",values:Array.isArray(e)?e:[e],...Q0(t)})}const Mo0=a0("ZodTransform",(e,t)=>{i20.init(e,t),le.init(e,t),e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new Pg(e.constructor.name);o.addIssue=a=>{if(typeof a=="string")o.issues.push(Na(a,o.value,t));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=e),o.issues.push(Na(i))}};const r=t.transform(o.value,o);return r instanceof Promise?r.then(a=>(o.value=a,o)):(o.value=r,o)}});function lo0(e){return new Mo0({type:"transform",transform:e})}const sW=a0("ZodOptional",(e,t)=>{p20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lA(e){return new sW({type:"optional",innerType:e})}const bo0=a0("ZodNullable",(e,t)=>{M20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bA(e){return new bo0({type:"nullable",innerType:e})}const zo0=a0("ZodDefault",(e,t)=>{l20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uo0(e,t){return new zo0({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Dg(t)}})}const do0=a0("ZodPrefault",(e,t)=>{b20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Oo0(e,t){return new do0({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Dg(t)}})}const iW=a0("ZodNonOptional",(e,t)=>{z20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType});function fo0(e,t){return new iW({type:"nonoptional",innerType:e,...Q0(t)})}const Ao0=a0("ZodCatch",(e,t)=>{u20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ho0(e,t){return new Ao0({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const pW=a0("ZodPipe",(e,t)=>{d20.init(e,t),le.init(e,t),e.in=t.in,e.out=t.out});function zA(e,t){return new pW({type:"pipe",in:e,out:t})}const MW=a0("ZodCodec",(e,t)=>{pW.init(e,t),Yg.init(e,t)});function qo0(e,t,o){return new MW({type:"pipe",in:e,out:t,transform:o.decode,reverseTransform:o.encode})}const mo0=a0("ZodReadonly",(e,t)=>{O20.init(e,t),le.init(e,t),e.unwrap=()=>e._zod.def.innerType});function go0(e){return new mo0({type:"readonly",innerType:e})}const Wo0=a0("ZodCustom",(e,t)=>{f20.init(e,t),le.init(e,t)});function vo0(e,t={}){return pt0(Wo0,e,t)}function Ro0(e){return Mt0(e)}const yo0=(...e)=>bt0({Codec:MW,Boolean:rW,String:nW},...e),lW=qo0(tW({offset:!0}),eo0(),{decode:e=>new Date(e),encode:e=>e.toISOString()}),wo0=dM({slug:L2(),title:L2(),custom_excerpt:L2(),url:L2().url(),published_at:lW,featured:yo0(),feature_image:L2().url().optional(),html:L2().optional()}).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})),Lo0=Gp({posts:cW(wo0).default([]),changelogUrl:L2().url().default("https://ghost.org/changelog")}).transform(e=>({entries:e.posts,changelogUrl:e.changelogUrl})),zs=()=>K2({queryKey:["changelog"],queryFn:async()=>{const e=await fetch("https://ghost.org/changelog.json");if(!e.ok)throw new Error(`Failed to fetch changelog: ${e.status}`);const t=await e.json();return Lo0.parse(t)},staleTime:1/0});function uA(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function bW(e,t){const o={...e};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n],a=e[n];r!==void 0&&(uA(r)&&uA(a)?o[n]=bW(a,r):o[n]=r)}return o}const xo0=dM({lastSeenDate:lW.optional().catch(void 0)}),eu={expanded:{posts:!0,members:!0},menu:{visible:!0}},ko0=dM({expanded:Gp({posts:Mp(),members:Mp().default(!0)}),menu:Gp({visible:Mp()})}),tu=dM({whatsNew:xo0.optional().catch(void 0),nightShift:Mp().optional(),navigation:ko0.default(eu).catch(eu)}),zW=e=>["userPreferences",e?.id,e?.accessibility];function OM(e){const{data:t}=ye();return K2({...e,queryKey:zW(t),queryFn:()=>{if(!t)throw new Error("User not loaded");const o=t.accessibility||"{}",n=JSON.parse(o);return tu.parse(n)},enabled:!!t,keepPreviousData:!0,staleTime:1/0,cacheTime:0})}const fM=()=>{const e=v1(),{data:t}=ye(),{mutateAsync:o}=Sg();return Me({mutationFn:async n=>{if(!t)throw new Error("User is not loaded");const r=e.getQueryData(zW(t))??tu.parse({}),a=bW(r,n),i=tu.encode(a);await o({...t,accessibility:JSON.stringify(i)})}})};function Co0(){return{lastSeenDate:new Date}}const No0=(e,t)=>["whatsNew",e?.whatsNew?.lastSeenDate?.toISOString(),t?.publishedAt.toISOString()],s5=()=>{const{data:e,isSuccess:t}=OM(),{data:o,isSuccess:n}=zs(),{mutateAsync:r}=fM(),a=!!e?.whatsNew?.lastSeenDate;p.useEffect(()=>{!a&&t&&r({whatsNew:Co0()})},[a,t,r]);const i=o?.entries[0];return K2({queryKey:No0(e,i),queryFn:()=>{if(!i)return{hasNew:!1};const l=e.whatsNew.lastSeenDate;return{hasNew:i.publishedAt>l}},enabled:n&&a,staleTime:1/0,cacheTime:0})},uW=()=>{const{data:e}=zs(),{mutateAsync:t}=fM();return Me({mutationFn:async()=>{const o=e?.entries[0];if(!o)return;const n={lastSeenDate:o.publishedAt};await t({whatsNew:n})}})};function _o0(e){return e.toLocaleDateString("en-GB",{day:"2-digit",month:"long",year:"numeric"})}function Eo0({entry:e}){return 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&&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}),b.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[b.jsx("h2",{className:"mt-1.5 text-[17px] font-semibold text-foreground","data-test-entry-title":!0,children:e.title}),b.jsx("p",{className:"line-clamp-2 text-sm leading-[1.45] text-gray-700","data-test-entry-excerpt":!0,children:e.customExcerpt}),b.jsx("span",{className:"text-sm text-gray-600","data-test-entry-date":!0,children:_o0(e.publishedAt)})]})]})}function Bo0({open:e,onOpenChange:t}){const{data:o}=zs(),{mutate:n}=uW();return p.useEffect(()=>{e&&n()},[e,n]),b.jsx(rs,{open:e,onOpenChange:t,children:b.jsxs(Mc,{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:[b.jsx(Q3,{children:b.jsx(G3,{id:"whats-new-modal-title","data-test-modal-title":!0,className:"text-2xl tracking-tighter",children:"What’s new?"})}),o?b.jsxs(b.Fragment,{children:[b.jsx("section",{className:"-mx-6 flex-1 space-y-2 overflow-y-auto px-6","data-test-entries":!0,children:o.entries.map(r=>b.jsx(Eo0,{entry:r},r.slug))}),b.jsxs($3,{className:"flex-row justify-between gap-3 sm:justify-between",children:[b.jsx(i1,{asChild:!0,variant:"outline",children:b.jsx("a",{href:`${o.changelogUrl}#/portal/signup`,rel:"noopener noreferrer",target:"_blank",children:"Turn on notifications"})}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:o.changelogUrl,rel:"noopener noreferrer",target:"_blank",children:"All updates →"})})]})]}):b.jsx("div",{className:"flex flex-1 items-center justify-center py-12",children:b.jsx(Hp,{size:"lg"})})]})})}function dW(){const e=Eg(),t=!!e?.subscription?.isActiveTrial,o=e?.subscription?.trial_end?Math.ceil((new Date(e.subscription.trial_end).getTime()-Date.now())/(1e3*60*60*24)):0;return{showUpgradeBanner:t,trialDaysRemaining:o}}function So0({children:e,...t}){return b.jsx("span",{className:"flex-1",...t,children:e})}const e2=({children:e,...t})=>b.jsx(ng,{className:"cursor-pointer text-base",asChild:!0,...t,children:e});e2.Label=So0;function Zp(e){const t=ye();return b.jsxs(Dd,{...e,children:[t.data?.profile_image&&b.jsx(Id,{src:t.data?.profile_image}),b.jsx(Fd,{className:"text-foreground-muted hover:text-foreground",children:b.jsx(jd,{})})]})}function OW({name:e,email:t,children:o}){return b.jsx("div",{className:"p-3",children:b.jsxs("div",{className:"flex items-center gap-3",children:[o,b.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[b.jsx("span",{className:"truncate text-base font-semibold text-foreground",children:e}),b.jsx("span",{className:"text-foreground-muted -mt-px truncate text-xs",children:t})]})]})})}function fW(){const e=ye();return b.jsx(e2,{children:b.jsxs(Za,{to:`/settings/staff/${e.data?.slug}`,children:[b.jsx(jd,{}),b.jsx(e2.Label,{children:"Your profile"})]})})}function AW(){const{data:e}=OM(),{mutateAsync:t,isLoading:o}=fM(),n=r=>{t({nightShift:r})};return b.jsxs(e2,{asChild:!1,onSelect:r=>{r.preventDefault(),n(!e?.nightShift)},children:[b.jsx(YZ,{}),b.jsx(e2.Label,{className:"flex-1",children:"Dark mode"}),b.jsx(ag,{size:"sm",checked:e?.nightShift??!1,disabled:o,onCheckedChange:n,onClick:r=>r.stopPropagation(),tabIndex:-1})]})}function hW(){const e=()=>{const{apiRoot:t,adminRoot:o}=g3();fetch(`${t}/session`,{method:"DELETE"}).then(()=>{window.location.href=o}).catch(n=>{console.error(n)})};return b.jsxs(e2,{asChild:!1,onSelect:e,children:[b.jsx(FZ,{}),b.jsx(e2.Label,{children:"Sign out"})]})}function To0(e){const t=ye(),{data:o}=s5(),{showUpgradeBanner:n}=dW();return b.jsxs(tg,{...e,children:[b.jsx(og,{asChild:!0,className:"focus-visible:ring-0",children:b.jsxs(rM,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground","aria-label":"User menu",children:[b.jsxs("div",{className:"relative",children:[b.jsx(Zp,{}),o?.hasNew&&b.jsx("span",{className:"absolute -top-0.5 -right-0.5",children:b.jsx(Gf,{variant:"success",size:"sm",label:"New updates available","data-test-whats-new-avatar-badge":!0})})]}),b.jsxs("div",{className:"grid flex-1 text-left text-base leading-tight",children:[b.jsx("span",{className:"truncate font-semibold",children:t.data?.name}),b.jsx("span",{className:"-mt-px truncate text-xs text-muted-foreground",children:t.data?.email})]}),b.jsx(OZ,{className:"ml-auto size-4 text-grey-700","data-test-nav":"arrow-down"})]})}),b.jsxs(Kd,{align:"start",sideOffset:10,className:`w-[var(--radix-dropdown-menu-trigger-width)] ${n?"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:[b.jsx(OW,{name:t.data?.name,email:t.data?.email,children:b.jsx(Zp,{})}),b.jsx(Pn,{}),b.jsxs(e2,{"data-test-nav":"whatsnew",asChild:!1,onSelect:()=>{e.onOpenWhatsNew?.()},children:[b.jsx(U9,{}),b.jsx(e2.Label,{children:"What’s new?"}),o?.hasNew&&b.jsx("div",{className:"flex flex-1 justify-end",children:b.jsx(Gf,{variant:"success",size:"sm",label:"New updates available","data-test-whats-new-menu-badge":!0})})]}),b.jsx(fW,{}),b.jsx(Pn,{}),b.jsx(e2,{children:b.jsxs("a",{href:"https://ghost.org/resources?utm_source=admin&utm_campaign=resources",target:"_blank",rel:"noopener noreferrer",children:[b.jsx(iZ,{}),b.jsx(e2.Label,{children:"Resources & guides"})]})}),b.jsx(AW,{}),b.jsx(Pn,{}),b.jsx(hW,{})]})]})}function Po0(){const e=ye(),o=sM().data?.site.url??"";return b.jsxs(tg,{children:[b.jsx(og,{asChild:!0,children: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:b.jsx(Zp,{className:"h-11 w-11"})})}),b.jsxs(Kd,{align:"start",side:"top",sideOffset:10,className:"mb-2 min-w-56",children:[b.jsx(OW,{name:e.data?.name,email:e.data?.email,children:b.jsx(Zp,{})}),b.jsx(Pn,{}),b.jsx(e2,{children:b.jsxs(Za,{to:"/posts",children:[b.jsx(kZ,{}),b.jsx(e2.Label,{children:"Posts"})]})}),b.jsx(e2,{children:b.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:[b.jsx(Bd,{}),b.jsx(e2.Label,{children:"View site"})]})}),b.jsx(Pn,{}),b.jsx(fW,{}),b.jsx(AW,{}),b.jsx(Pn,{}),b.jsx(hW,{})]})]})}const ea0=null,i5="CustomThemeSettingsResponseType",jo0=i5,ta0=Xt({dataType:i5,path:"/custom_theme_settings/"}),oa0=Ve({method:"PUT",path:()=>"/custom_theme_settings/",body:e=>({custom_theme_settings:e}),updateQueries:{emberUpdateType:"skip",dataType:i5,update:e=>e}}),zc="ThemesResponseType",na0=Xt({dataType:zc,path:"/themes/"}),Xo0=Xt({dataType:zc,path:"/themes/active/"}),ra0=Ve({method:"PUT",path:e=>`/themes/${e}/activate/`,updateQueries:{dataType:zc,emberUpdateType:"createOrUpdate",update:(e,t)=>({...t,themes:t.themes.map(o=>{const n=e.themes.find(({name:r})=>r===o.name);return n||{...o,active:!1}})})},invalidateQueries:{dataType:jo0}}),ca0=Ve({method:"DELETE",path:e=>`/themes/${e}/`,updateQueries:{dataType:zc,emberUpdateType:"delete",update:(e,t,o)=>({...t,themes:t.themes.filter(n=>n.name!==o)})}}),aa0=Ve({method:"POST",path:()=>"/themes/install/",searchParams:e=>({source:"github",ref:e}),updateQueries:{dataType:zc,emberUpdateType:"createOrUpdate",update:(e,t)=>t&&{...t,themes:[...t.themes,...e.themes]}}}),sa0=Ve({method:"POST",path:()=>"/themes/upload/",body:({file:e})=>{const t=new FormData;return t.append("file",e),t},updateQueries:{dataType:zc,emberUpdateType:"createOrUpdate",update:(e,t)=>t&&{...t,themes:[...t.themes,...e.themes]}}});function Do0(e){return e.active}function qW(e){return e.name.toLowerCase()==="source"}function mW(e){return e.name.toLowerCase()==="casper"}function ia0(e){return qW(e)||mW(e)}function pa0(e){return!qW(e)&&!mW(e)&&!Do0(e)}function Io0(e){return e.code==="GS110-NO-MISSING-PAGE-BUILDER-USAGE"&&!!e.failures?.[0]?.message?.includes("show_title_and_feature_image")}function gW(){const{data:e}=ye(),t=e&&ls(e),{data:o}=Xo0({enabled:!t}),n=o?.themes?.[0],r=n?.errors??[],a=n?.warnings??[],i=r.filter(z=>!Io0(z));return{hasErrors:i.length>0,errors:i,warnings:a}}function dA({error:e}){const[t,o]=p.useState(!1);return b.jsxs("li",{className:"border-b border-border last:border-0",children:[b.jsxs("button",{className:"flex w-full items-center gap-2 py-3 text-left text-sm font-medium",type:"button",onClick:()=>o(!t),children:[b.jsx(H3,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200 ${t?"rotate-90":""}`}),b.jsx("span",{children:e.rule})]}),t&&b.jsxs("div",{className:"pb-3 pl-6 text-sm text-muted-foreground",children:[b.jsx("p",{dangerouslySetInnerHTML:{__html:e.details}}),e.failures?.length>0&&b.jsxs("div",{className:"mt-2",children:[b.jsx("h6",{className:"text-xs font-semibold text-muted-foreground uppercase",children:"Affected files:"}),b.jsx("ul",{className:"mt-1 list-disc pl-4",children:e.failures.map((n,r)=>b.jsxs("li",{children:[b.jsx("code",{className:"text-xs",children:n.ref}),n.message&&b.jsxs(b.Fragment,{children:[": ",n.message]})]},r))})]})]})]})}function Fo0({open:e,onOpenChange:t,errors:o,warnings:n}){return b.jsx(rs,{open:e,onOpenChange:t,children:b.jsxs(Mc,{className:"flex max-h-[85vh] max-w-lg flex-col",children:[b.jsx(Q3,{children:b.jsx(G3,{className:"text-2xl tracking-tighter",children:"Theme errors"})}),b.jsxs("section",{className:"-mx-6 flex-1 overflow-y-auto px-6",children:[o.length>0&&b.jsxs("div",{children:[b.jsx("h2",{className:"mb-1 text-sm font-semibold",children:"Errors"}),b.jsx("p",{className:"mb-2 text-xs text-muted-foreground",children:"Highly recommended to fix, functionality could be restricted"}),b.jsx("ul",{className:"border-t border-border",children:o.map((r,a)=>b.jsx(dA,{error:r},a))})]}),n.length>0&&b.jsxs("div",{className:o.length>0?"mt-4":"",children:[b.jsx("h2",{className:"mb-1 text-sm font-semibold",children:"Warnings"}),b.jsx("ul",{className:"border-t border-border",children:n.map((r,a)=>b.jsx(dA,{error:r},a))})]})]}),b.jsx($3,{children:b.jsx(i1,{onClick:()=>t(!1),children:"OK"})})]})})}function Ho0(){const{hasErrors:e,errors:t,warnings:o}=gW(),[n,r]=p.useState(!1);return e?b.jsxs(b.Fragment,{children:[b.jsx(V3,{className:"mx-2 cursor-pointer",role:"status",size:"md",variant:"destructive",onClick:()=>r(!0),children:b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsx($9,{className:"mt-0.5 size-4 shrink-0 text-red"}),b.jsxs("div",{children:[b.jsx("div",{className:"font-semibold text-red",children:"Your theme has errors"}),b.jsx("div",{className:"text-sm text-foreground",children:"Some functionality on your site may be limited →"})]})]})}),b.jsx(Fo0,{errors:t,open:n,warnings:o,onOpenChange:r})]}):null}const Uo0=""+new URL("ghost-pro-logo-B1sXD_MX.png",import.meta.url).href,Vo0=""+new URL("ghost-pro-logo-dark-BeH8deo0.png",import.meta.url).href;function Qo0({trialDaysRemaining:e}){return b.jsxs(V3,{variant:"gradient",size:"lg",className:"mx-2 flex flex-col items-stretch",children:[b.jsxs("div",{children:[b.jsx("img",{src:Uo0,alt:"Ghost Pro",className:"max-h-[33px] dark:hidden"}),b.jsx("img",{src:Vo0,alt:"Ghost Pro",className:"hidden max-h-[33px] dark:block"})]}),b.jsx("div",{className:"mt-3 text-base font-semibold",children:"Unlock every feature"}),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 ",b.jsxs("span",{className:"font-semibold text-foreground",children:[e," days"]})," free trial remaining."]}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"#/pro/billing/plans",children:"Upgrade now"})})]})}function $o0(){const{data:e}=s5(),{data:t}=zs(),{mutate:o}=uW(),[n,r]=p.useState(!1);if(n||!e?.hasNew)return null;const a=t?.entries[0];if(!a)return null;const i=()=>{r(!0),o()},l=()=>{o()};return b.jsx(V3,{"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,children:b.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"block pr-8",onClick:l,"data-test-toast-link":!0,children:[b.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[b.jsx(U9,{className:"size-4 text-purple-600 dark:text-purple"}),b.jsx("span",{className:"text-xs font-semibold tracking-wide text-gray-700 uppercase dark:text-gray-400",children:"What’s new?"})]}),b.jsx("div",{className:"mb-1 text-base font-semibold text-gray-900 dark:text-foreground","data-test-toast-title":!0,children:a.title}),b.jsx("div",{className:"text-sm text-gray-700","data-test-toast-excerpt":!0,children:a.customExcerpt})]})})}function Go0(){const{data:e}=s5(),{data:t}=zs(),o=t?.entries[0];return{showWhatsNewBanner:!!e?.hasNew&&!!o}}function p5(){const{hasErrors:e}=gW(),{showUpgradeBanner:t,trialDaysRemaining:o}=dW(),{showWhatsNewBanner:n}=Go0();return o5()?e?{bannerType:"theme-errors",banner:b.jsx(Ho0,{}),hasBanner:!0}:t?{bannerType:"upgrade",banner:b.jsx(Qo0,{trialDaysRemaining:o}),hasBanner:!0}:n?{bannerType:"whats-new",banner:b.jsx($o0,{}),hasBanner:!0}:{bannerType:null,banner:null,hasBanner:!1}:{bannerType:null,banner:null,hasBanner:!1}}function Zo0({...e}){const[t,o]=p.useState(!1),{hasBanner:n}=p5();return b.jsxs(b.Fragment,{children:[b.jsx(Rg,{...e,children:b.jsx(lc,{className:n?"pt-3":"",children:b.jsx(bc,{children:b.jsx(Jd,{children:b.jsx(To0,{onOpenWhatsNew:()=>o(!0)})})})})}),b.jsx(Bo0,{open:t,onOpenChange:o})]})}function Ko0({banner:e}){const t=p5(),o=e??t.banner;return o?b.jsx("div",{className:"fixed bottom-[92px] left-3 z-50 max-w-[276px]",children:o}):null}const Kp="SettingsResponseType",AM=Xt({dataType:Kp,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"}}),Ma0=Ve({method:"PUT",path:()=>"/settings/",body:e=>({settings:e.map(({key:t,value:o})=>({key:t,value:o}))}),updateQueries:{dataType:Kp,emberUpdateType:"createOrUpdate",update:e=>({...e,settings:e.settings})},invalidateQueries:{filters:{predicate(e){return e.queryKey[0]!==Kp}}}}),la0=Ve({method:"DELETE",path:()=>"/settings/stripe/connect/",invalidateQueries:{dataType:Kp}}),ba0=Ve({method:"POST",path:()=>"/slack/test/"});function za0(e){const t=["API","CTA","RSS"];return e.replace(/^[a-z]/,o=>o.toUpperCase()).replace(/_/g," ").replace(new RegExp(`\\b(${t.join("|")})\\b`,"ig"),o=>o.toUpperCase())}function ua0(e,t){return t.map(o=>{var n;return(n=e?.find(r=>r.key===o))==null?void 0:n.value})}function oo(e,t){if(!e)return null;const o=e.find(n=>n.key===t);return o?.value||null}function da0(e,t){if(!e)return;const o=e.find(n=>n.key===t);return o?.is_read_only||!1}function Oa0(e,t){const o=a=>e.some(i=>i.key===a&&i.value),n=o("stripe_secret_key")&&o("stripe_publishable_key"),r=o("stripe_connect_secret_key")&&o("stripe_connect_publishable_key");return t.stripeDirect?n:r||n}const M5=[],WW=p.createContext(void 0),Yo0=({children:e})=>{const t=we(),[o,n]=p.useState(()=>{const i=localStorage.getItem("featureFlags");return i?JSON.parse(i):Jo0()});p.useEffect(()=>{const i=en0(t.search);Object.keys(i).length>0&&n(l=>{const z={...l,...i};return localStorage.setItem("featureFlags",JSON.stringify(z)),z})},[t.search]);const a={isEnabled:i=>o[i]??!1,flags:o,allFlags:M5};return b.jsx(WW.Provider,{value:a,children:e})},Jo0=()=>M5.reduce((e,t)=>({...e,[t]:!1}),{}),en0=e=>{const t=new URLSearchParams(e),o={};return M5.forEach(n=>{const r=t.get(n);r==="ON"?o[n]=!0:r==="OFF"&&(o[n]=!1)}),o},tn0=()=>{const e=p.useContext(WW);if(e===void 0)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return e};function hM(){const t=pd().find(o=>o.handle==="activitypub-basepath")?.pathname??"";return t.endsWith("/")?t.slice(0,-1):t}function qo(){const e=xg(),t=hM();return p.useCallback((o,n)=>{if(typeof o=="number"){e(o,n);return}o.startsWith("/")?e(`${t}${o}`,n):e(o,n)},[e,t])}const vW=({className:e,onClick:t})=>{const o=qo(),{previousPath:n}=w3();return b.jsx(i1,{className:R0("size-9 rounded-full bg-white/85 px-2 backdrop-blur-md dark:bg-black/85 dark:text-white [&_svg]:size-6 focus-visible:ring-0",e),variant:"ghost",onClick:()=>{if(t){t();return}o(n?-1:"/")},children:b.jsx(eZ,{size:24,strokeWidth:1.25})})},on0=()=>{const e=we(),t=no(XW,e.pathname);if(!t)return null;const o=t.map(n=>n.route).filter(n=>n.pageTitle);return o[o.length-1]||t[t.length-1].route};function RW(){const e=pd(),t=e.findIndex(z=>z.handle==="activitypub-basepath");if(t===-1)return"";const o=e[t+1];if(!o)return"";const r=e[t].pathname,a=o.pathname;let i=a.startsWith(r)?a.slice(r.length):a;return i=i.replace(/^\//,""),i.split("/")[0]}const nn0=({title:e,backIcon:t})=>t?b.jsx(vW,{className:"-ml-2"}):b.jsx(wg,{className:"max-md:text-[2.4rem]",children:e}),OA=({onToggleMobileSidebar:e})=>b.jsx(i1,{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:b.jsx(UZ,{className:"size-5!"})}),rn0=({onToggleMobileSidebar:e,showBorder:t=!0})=>{const{canGoBack:o}=w3(),n=RW(),r=U00(),a=on0();let i=!1;n==="profile"&&(i=!0),n==="notes"&&o&&(i=!0);const l=o&&r||a?.showBackButton===!0;return b.jsx(b.Fragment,{children:i?b.jsxs("div",{className:"sticky top-8 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:[b.jsx("div",{children:l&&b.jsx(vW,{className:"ml-6 max-md:ml-[10px]"})}),!l&&b.jsx(OA,{onToggleMobileSidebar:e})]}):b.jsx("div",{className:"sticky top-0 z-50 bg-white/85 backdrop-blur-md dark:bg-black",children:b.jsxs("div",{className:`relative flex h-[102px] items-center justify-between gap-5 px-[min(4vw,32px)] max-md:h-[68px] ${t?'before:absolute before:inset-x-[min(4vw,32px)] before:bottom-0 before:block before:border-b before:border-gray-200 before:content-[""] before:dark:border-gray-950':""}`,children:[b.jsx(nn0,{backIcon:l,title:a?.pageTitle||""}),b.jsx(OA,{onToggleMobileSidebar:e})]})})})};function Jo(e){if(!e.preferredUsername||!e.id)return"@unknown@unknown";try{return`@${e.preferredUsername}@${new URL(e.id).hostname.replace(/^www\./,"")}`}catch{return"@unknown@unknown"}}const fA={Article:1,Tombstone:2},cn0=e=>typeof e=="object"&&e!==null&&"statusCode"in e&&"message"in e&&typeof e.statusCode=="number"&&typeof e.message=="string";class an0{apiUrl;authApiUrl;handle;fetch;constructor(t,o,n,r=window.fetch.bind(window)){this.apiUrl=t,this.authApiUrl=o,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(t,o="GET",n){const r=await this.getToken(),a={method:o,headers:{Authorization:`Bearer ${r}`,Accept:"application/activity+json"}};n&&(a.body=JSON.stringify(n),a.headers["Content-Type"]="application/json");const i=await this.fetch(t,a);if(i.status===204||i.status===202)return null;if(!i.ok){const l={message:"Something went wrong, please try again.",statusCode:i.status};try{const z=await i.json(),u=z.message||z.error;u&&(l.message=u),z.code&&(l.code=z.code)}catch{}throw l}return await i.json()}async blockDomain(t){const o=new URL(`.ghost/activitypub/v1/actions/block/domain/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async unblockDomain(t){const o=new URL(`.ghost/activitypub/v1/actions/unblock/domain/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async block(t){const o=new URL(`.ghost/activitypub/v1/actions/block/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async unblock(t){const o=new URL(`.ghost/activitypub/v1/actions/unblock/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async follow(t){const o=new URL(`.ghost/activitypub/v1/actions/follow/${t}`,this.apiUrl);return await this.fetchJSON(o,"POST")}async unfollow(t){const o=new URL(`.ghost/activitypub/v1/actions/unfollow/${t}`,this.apiUrl);return await this.fetchJSON(o,"POST")}async like(t){const o=new URL(`.ghost/activitypub/v1/actions/like/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async unlike(t){const o=new URL(`.ghost/activitypub/v1/actions/unlike/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async repost(t){const o=new URL(`.ghost/activitypub/v1/actions/repost/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async derepost(t){const o=new URL(`.ghost/activitypub/v1/actions/derepost/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async reply(t,o,n){const r=new URL(`.ghost/activitypub/v1/actions/reply/${encodeURIComponent(t)}`,this.apiUrl),a={content:o};return n&&(a.image=n),await this.fetchJSON(r,"POST",a)}async note(t,o){const n=new URL(".ghost/activitypub/v1/actions/note",this.apiUrl),r={content:t};return o&&(r.image=o),(await this.fetchJSON(n,"POST",r)).post}async delete(t){const o=new URL(`.ghost/activitypub/v1/post/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"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(t){const o=this.searchApiUrl;o.searchParams.set("query",t);const n=await this.fetchJSON(o,"GET");return n&&"accounts"in n?n:{accounts:[]}}async getThread(t){const o=new URL(`.ghost/activitypub/v1/thread/${encodeURIComponent(t)}`,this.apiUrl);return await this.fetchJSON(o)}async getAccount(t){const o=new URL(`.ghost/activitypub/v1/account/${t}`,this.apiUrl);return await this.fetchJSON(o)}async getAccountFollows(t,o,n){const r=new URL(`.ghost/activitypub/v1/account/${t}/follows/${o}`,this.apiUrl);n&&r.searchParams.set("next",n);const a=await this.fetchJSON(r);if(a===null)return{accounts:[],next:null};if(!("accounts"in a))return{accounts:[],next:null};const i=Array.isArray(a.accounts)?a.accounts:[],l="next"in a&&typeof a.next=="string"?a.next:null;return{accounts:i,next:l}}async getFeed(t){return this.getPaginatedPosts(".ghost/activitypub/v1/feed/notes",t)}async getInbox(t){return this.getPaginatedPosts(".ghost/activitypub/v1/feed/reader",t)}async getDiscoveryFeed(t,o){const n=`.ghost/activitypub/v1/feed/discover/${t}`;return this.getPaginatedPosts(n,o)}async getExploreAccounts(t,o){const n=`.ghost/activitypub/v1/explore/${t}`;return this.getPaginatedExploreAccounts(n,o)}async getTopics(){const t=new URL(".ghost/activitypub/v1/topics",this.apiUrl),o=await this.fetchJSON(t);return{topics:o&&"topics"in o&&Array.isArray(o.topics)?o.topics:[]}}async getRecommendations(t){const o=new URL(".ghost/activitypub/v1/recommendations",this.apiUrl);t&&o.searchParams.set("limit",t.toString());const n=await this.fetchJSON(o);return{accounts:n&&"accounts"in n&&Array.isArray(n.accounts)?n.accounts:[]}}async getPostsByAccount(t,o){return this.getPaginatedPosts(`.ghost/activitypub/v1/posts/${t}`,o)}async getPostsLikedByAccount(t){return this.getPaginatedPosts(".ghost/activitypub/v1/posts/me/liked",t)}async getPaginatedPosts(t,o){const n=new URL(t,this.apiUrl);o&&n.searchParams.set("next",o);const r=await this.fetchJSON(n);if(r===null||!("posts"in r))return{posts:[],next:null};const a=Array.isArray(r.posts)?r.posts:[],i="next"in r&&typeof r.next=="string"?r.next:null;return{posts:a,next:i}}async getNotifications(t){const o=new URL(".ghost/activitypub/v1/notifications",this.apiUrl);t&&o.searchParams.set("next",t);const n=await this.fetchJSON(o);if(n===null)return{notifications:[],next:null};if(!("notifications"in n))return{notifications:[],next:null};const r=Array.isArray(n.notifications)?n.notifications:[],a="next"in n&&typeof n.next=="string"?n.next:null;return{notifications:r,next:a}}async getNotificationsCount(){const t=new URL(".ghost/activitypub/v1/notifications/unread/count",this.apiUrl),o=await this.fetchJSON(t);return o===null?{count:0}:{count:typeof o.count=="number"?o.count:0}}async resetNotificationsCount(){const t=new URL(".ghost/activitypub/v1/notifications/unread/reset",this.apiUrl);return await this.fetchJSON(t,"PUT"),!0}async getBlockedAccounts(t){const o=new URL(".ghost/activitypub/v1/blocks/accounts",this.apiUrl);t&&o.searchParams.set("next",t);const n=await this.fetchJSON(o);if(n===null)return{accounts:[],next:null};const r="blocked_accounts"in n&&Array.isArray(n.blocked_accounts)?n.blocked_accounts:[],a="next"in n&&typeof n.next=="string"?n.next:null;return{accounts:r,next:a}}async getBlockedDomains(t){const o=new URL(".ghost/activitypub/v1/blocks/domains",this.apiUrl);t&&o.searchParams.set("next",t);const n=await this.fetchJSON(o);if(n===null)return{domains:[],next:null};const r="blocked_domains"in n&&Array.isArray(n.blocked_domains)?n.blocked_domains:[],a="next"in n&&typeof n.next=="string"?n.next:null;return{domains:r,next:a}}async getPaginatedExploreAccounts(t,o){const n=new URL(t,this.apiUrl);o&&n.searchParams.set("next",o);const r=await this.fetchJSON(n);if(r===null||!("accounts"in r))return{accounts:[],next:null};const a=Array.isArray(r.accounts)?r.accounts:[],i="next"in r&&typeof r.next=="string"?r.next:null;return{accounts:a,next:i}}async getPost(t){const o=new URL(`.ghost/activitypub/v1/post/${encodeURIComponent(t)}`,this.apiUrl);return await this.fetchJSON(o)}async getReplies(t,o){const n=new URL(`.ghost/activitypub/v1/replies/${encodeURIComponent(t)}`,this.apiUrl);return o&&n.searchParams.set("next",o),await this.fetchJSON(n)}async updateAccount({name:t,username:o,bio:n,avatarUrl:r,bannerImageUrl:a}){const i=new URL(".ghost/activitypub/v1/account",this.apiUrl);await this.fetchJSON(i,"PUT",{name:t,username:o,bio:n,avatarUrl:r,bannerImageUrl:a})}async upload(t){const o=new URL(".ghost/activitypub/v1/upload/image",this.apiUrl),n=new FormData;n.append("file",t);const r=await this.getToken(),a=await this.fetch(o,{method:"POST",headers:{Authorization:`Bearer ${r}`},body:n});if(!a.ok)throw{message:"Upload failed",statusCode:a.status};return(await a.json()).fileUrl}async enableBluesky(){const t=new URL(".ghost/activitypub/v2/actions/bluesky/enable",this.apiUrl);await this.fetchJSON(t,"POST")}async disableBluesky(){const t=new URL(".ghost/activitypub/v2/actions/bluesky/disable",this.apiUrl);await this.fetchJSON(t,"POST")}async confirmBlueskyHandle(){const t=new URL(".ghost/activitypub/v2/actions/bluesky/confirm-handle",this.apiUrl),o=await this.fetchJSON(t,"POST");return o===null||!("handle"in o)||typeof o.handle!="string"?"":String(o.handle)}}const yW="pending-";function wW(){return`${yW}${crypto.randomUUID()}`}function fa0(e){return e.startsWith(yW)}function sn0(e,t,o,n){const r={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:r,object:{type:"Note",name:"",content:o,summary:null,url:"",attributedTo:r,image:n||"",published:new Date().toISOString(),attachment:[],preview:{type:"Note",content:o},id:t,replyCount:0,liked:!1,reposted:!1,repostCount:0,authored:!0,"@context":""},"@context":"",to:""}}function in0(e){return e.replace(/\n/g,"<br />")}function uc(e){let t="";e.repostedBy!==null?t="Announce":t="Create";const o={id:e.author.url,icon:{url:e.author.avatarUrl},name:e.author.name,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:""};let n=null;e.repostedBy!==null&&(n={id:e.repostedBy.url,icon:{url:e.repostedBy.avatarUrl},name:e.repostedBy.name,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 r="Note";e.type===fA.Article?r="Article":e.type===fA.Tombstone&&(r="Tombstone");const a={type:r,name:e.title,content:e.content,summary:e.summary,url:e.url,attributedTo:o,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:n!==null?n:o,object:a,"@context":"",to:""}}let Xb;async function l1(){return Xb||(Xb=(await(await fetch("/ghost/api/admin/site/")).json()).site.url),Xb}function b1(e,t){return new an0(new URL(t),new URL("/ghost/api/admin/identities/",window.location.origin),e)}function r2(e="Rate limit exceeded",t="You've made too many requests. Please try again later."){Te.error(e,{description:t})}function qM(e="Action failed",t="This user has restricted who can interact with their account."){Te.error(e,{description:t})}const b0={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],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 ou(e,t,o){const n=[b0.feed,b0.inbox,b0.discoveryFeed,b0.postsLikedByAccount,b0.profilePosts(null)];for(const r of n)e.setQueriesData(r,a=>a===void 0?a:{...a,pages:a.pages.map(i=>({...i,posts:i.posts.map(l=>l.object.id===t?{...l,object:{...l.object,liked:o,likeCount:Math.max(o?(l.object.likeCount||0)+1:(l.object.likeCount||0)-1,0)}}:l)}))}),r===b0.postsLikedByAccount&&(e.setQueriesData(r,a=>a&&{...a,pages:a.pages.map(i=>({...i,posts:o?i.posts:i.posts.filter(l=>l.object.id!==t)}))}),o&&e.invalidateQueries({queryKey:b0.postsLikedByAccount}))}function LW(e,t,o,n){const r=[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts("index")],a=o.split("@")[1];for(const l of r)e.setQueriesData(l,z=>z===void 0?z:{...z,pages:z.pages.map(u=>({...u,posts:u.posts.map(f=>f.type!=="Announce"&&f.actor?.preferredUsername===a?{...f,actor:{...f.actor,followedByMe:n}}:f.type==="Announce"&&typeof f.object.attributedTo=="object"&&f.object.attributedTo&&!Array.isArray(f.object.attributedTo)&&"preferredUsername"in f.object.attributedTo&&f.object.attributedTo.preferredUsername===a?{...f,object:{...f.object,attributedTo:{...f.object.attributedTo,followedByMe:n}}}:f)}))});const i=b0.replyChain(null);e.setQueriesData(i,l=>{if(!l)return l;const z=u=>u.author.handle===o?{...u,author:{...u.author,followedByMe:n}}:u;return{...l,post:z(l.post),ancestors:{...l.ancestors,chain:l.ancestors.chain.map(z)},children:l.children.map(u=>({...u,post:z(u.post),chain:u.chain.map(z)}))}})}function xW(e,t,o){e.getQueryCache().getAll().forEach(a=>{const i=a.queryKey;Array.isArray(i)&&i[0]==="account_follows"&&e.setQueryData(i,l=>l?.pages?{...l,pages:l.pages.map(z=>({...z,accounts:z.accounts.map(u=>u.handle===t?{...u,isFollowing:o}:u)}))}:l)})}function nu(e,t,o){const n=b0.replyChain(null);e.setQueriesData(n,r=>{if(!r)return r;const a=i=>i.id===t?{...i,likedByMe:o,likeCount:Math.max(o?(i.likeCount||0)+1:(i.likeCount||0)-1,0)}:i;return{...r,post:a(r.post),ancestors:{...r.ancestors,chain:r.ancestors.chain.map(a)},children:r.children.map(i=>({...i,post:a(i.post),chain:i.chain.map(a)}))}}),e.setQueryData(b0.account("index"),r=>r&&{...r,likedCount:Math.max(0,r.likedCount+(o?1:-1))})}function ru(e,t,o,n){const r=b0.notifications(t);e.setQueriesData({queryKey:r},a=>{if(!a||!a.pages)return a;try{return{...a,pages:a.pages.map(i=>!i||!i.notifications?i:{...i,notifications:i.notifications.map(l=>!l||!l.post?l:l.post.id===o?{...l,post:{...l.post,likedByMe:n,likeCount:Math.max(n?l.post.likeCount+1:l.post.likeCount-1,0)}}:l)})}}catch{return a}})}function cu(e,t,o,n){const r=b0.notifications(t);e.setQueriesData({queryKey:r},a=>{if(!a||!a.pages)return a;try{return{...a,pages:a.pages.map(i=>!i||!i.notifications?i:{...i,notifications:i.notifications.map(l=>!l||!l.post?l:l.post.id===o?{...l,post:{...l.post,repostedByMe:n,repostCount:Math.max(n?l.post.repostCount+1:l.post.repostCount-1,0)}}:l)})}}catch{return a}})}function au(e,t,o,n){const r=b0.notifications(t);e.setQueriesData({queryKey:r},a=>{if(!a||!a.pages)return a;try{return{...a,pages:a.pages.map(i=>!i||!i.notifications?i:{...i,notifications:i.notifications.map(l=>!l||!l.post?l:l.post.id===o?{...l,post:{...l.post,replyCount:Math.max((l.post.replyCount??0)+n,0)}}:l)})}}catch{return a}})}function AA(e,t,o){const n=[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts("index"),b0.postsLikedByAccount];for(const r of n)e.setQueriesData(r,a=>a&&{...a,pages:a.pages.map(i=>({...i,posts:i.posts.map(l=>l.object.id===t?{...l,object:{...l.object,replyCount:Math.max((l.object.replyCount??0)+o,0)}}:l)}))})}function hA(e,t,o){const n=b0.replyChain(null);e.setQueriesData({queryKey:n,exact:!1},r=>{if(!r)return r;const a=i=>i.id===t?{...i,replyCount:Math.max((i.replyCount||0)+o,0)}:i;return{...r,post:a(r.post),ancestors:{...r.ancestors,chain:r.ancestors.chain.map(a)},children:r.children.map(i=>({...i,post:a(i.post),chain:i.chain.map(a)}))}})}function Aa0(e){return mt({queryKey:b0.blockedAccounts(e),refetchOnMount:"always",async queryFn({pageParam:t}){const o=await l1();return b1(e,o).getBlockedAccounts(t)},getNextPageParam(t){return t.next}})}function ha0(e){return mt({queryKey:b0.blockedDomains(e),refetchOnMount:"always",async queryFn({pageParam:t}){const o=await l1();return b1(e,o).getBlockedDomains(t)},getNextPageParam(t){return t.next}})}function pn0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).like(o)},onMutate:o=>{ou(t,o,!0),nu(t,o,!0),ru(t,e,o,!0)},onError(o,n){ou(t,n,!1),nu(t,n,!1),ru(t,e,n,!1),o.statusCode===403&&qM(),o.statusCode===429&&r2()}})}function Mn0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).unlike(o)},onMutate:o=>{ou(t,o,!1),nu(t,o,!1),ru(t,e,o,!1)},onError(o){o.statusCode===429&&r2()}})}function qa0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).blockDomain(new URL(o.url))},onMutate:o=>{o.handle&&t.setQueryData(b0.account(o.handle),n=>n&&{...n,domainBlockedByMe:!0,followedByMe:!1,followsMe:!1})},onError(o){o.statusCode===429&&r2()}})}function ma0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).unblockDomain(new URL(o.url))},onMutate:o=>{o.handle&&t.setQueryData(b0.account(o.handle),n=>n&&{...n,domainBlockedByMe:!1})},onError(o){o.statusCode===429&&r2()}})}function ga0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).block(new URL(o.apId))},onMutate:o=>{t.setQueryData(b0.account(o.handle),n=>n&&{...n,blockedByMe:!0,followedByMe:!1,followsMe:!1}),t.invalidateQueries({queryKey:b0.feed}),t.invalidateQueries({queryKey:b0.inbox}),t.invalidateQueries({queryKey:b0.discoveryFeed})},onError(o){o.statusCode===429&&r2()}})}function Wa0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).unblock(new URL(o.apId))},onMutate:o=>{t.setQueryData(b0.account(o.handle),n=>n&&{...n,blockedByMe:!1})},onError(o){o.statusCode===429&&r2()}})}function su(e,t,o){const n=[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts(null)];for(const r of n)e.setQueriesData(r,a=>a===void 0?a:{...a,pages:a.pages.map(i=>({...i,posts:i.posts.map(l=>l.object.id===t?{...l,object:{...l.object,reposted:o,repostCount:Math.max(o?l.object.repostCount+1:l.object.repostCount-1,0)}}:l)}))})}function iu(e,t,o){const n=b0.replyChain(null);e.setQueriesData(n,r=>{if(!r)return r;const a=i=>i.id===t?{...i,repostedByMe:o,repostCount:Math.max(o?(i.repostCount||0)+1:(i.repostCount||0)-1,0)}:i;return{...r,post:a(r.post),ancestors:{...r.ancestors,chain:r.ancestors.chain.map(a)},children:r.children.map(i=>({...i,post:a(i.post),chain:i.chain.map(a)}))}})}function ln0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).repost(o)},onMutate:o=>{su(t,o,!0),iu(t,o,!0),cu(t,e,o,!0)},onError(o,n){su(t,n,!1),iu(t,n,!1),cu(t,e,n,!1),o.statusCode===403&&qM(),o.statusCode===429&&r2()}})}function bn0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).derepost(o)},onMutate:o=>{su(t,o,!1),iu(t,o,!1),cu(t,e,o,!1)},onError(o){o.statusCode===429&&r2()}})}function zn0(e){return K2({queryKey:b0.user(e),async queryFn(){const t=await l1();return b1(e,t).getUser()}})}function l5(e,t,o){const n=v1();return Me({async mutationFn(r){const a=await l1();return b1(e,a).unfollow(r)},onSuccess(r,a){const i=b0.account(a==="me"?"index":a);n.setQueryData(i,h=>h&&{...h,followedByMe:!1,followerCount:h.followerCount-1<0?0:h.followerCount-1});const l=b0.accountFollows(a,"followers");n.setQueryData(l,h=>{if(!h?.pages?.[0])return h;const q=n.getQueryData(b0.account("index"));return q?{...h,pages:h.pages.map(g=>({...g,accounts:g.accounts.filter(W=>W.name!==q.name)}))}:h});const z=b0.account("index");n.setQueryData(z,h=>h&&{...h,followingCount:h.followingCount-1});const f=b0.accountFollows("me","following");n.getQueryData(f)?n.setQueryData(f,h=>h?.pages?{...h,pages:h.pages.map(q=>({...q,accounts:q.accounts.filter(g=>g.handle!==a)}))}:h):n.invalidateQueries({queryKey:f}),xW(n,a,!1),n.setQueryData(b0.exploreProfiles(e),h=>{if(!h)return h;const q=h.pages.map(g=>{const W=Object.entries(g.results).reduce((v,[y,k])=>{const C=k.sites.map(L=>L.handle===a?{...L,followedByMe:!1,followerCount:Math.max(0,L.followerCount-1)}:L);return v[y]={...k,sites:C},v},{});return{...g,results:W}});return{...h,pages:q}}),n.setQueriesData({queryKey:["suggested_profiles"],exact:!1},h=>h&&h.map(q=>q.handle===a?{...q,followedByMe:!1,followerCount:Math.max(0,q.followerCount-1)}:q)),LW(n,e,a,!1),t()},onError:r=>{r.statusCode===429&&r2(),o()}})}function b5(e,t,o){const n=v1();return Me({async mutationFn(r){const a=await l1();return b1(e,a).follow(r)},onSuccess(r,a){const i=b0.account(a==="me"?"index":a);n.setQueryData(i,h=>h&&{...h,followedByMe:!0,followerCount:h.followerCount+1});const l=b0.account("index");n.setQueryData(l,h=>h&&{...h,followingCount:h.followingCount+1});const z=b0.accountFollows(a,"followers"),f=b0.accountFollows("me","following");n.getQueryData(f)?n.setQueryData(f,h=>{if(!h?.pages?.[0])return h;const q=n.getQueryData(b0.account(a==="me"?"index":a));if(!q)return h;const g={id:q.id,name:q.name,handle:q.handle,avatarUrl:q.avatarUrl,blockedByMe:q.blockedByMe,domainBlockedByMe:q.domainBlockedByMe,isFollowing:!0};return{...h,pages:[{...h.pages[0],accounts:[g,...h.pages[0].accounts]},...h.pages.slice(1)]}}):n.invalidateQueries({queryKey:f}),xW(n,a,!0),n.setQueryData(b0.exploreProfiles(e),h=>{if(!h)return h;const q=h.pages.map(g=>{const W=Object.entries(g.results).reduce((v,[y,k])=>{const C=k.sites.map(L=>L.handle===a?{...L,followedByMe:!0,followerCount:L.followerCount+1}:L);return v[y]={...k,sites:C},v},{});return{...g,results:W}});return{...h,pages:q}}),n.setQueriesData({queryKey:["suggested_profiles"],exact:!1},h=>h&&h.map(q=>q.handle===a?{...q,followedByMe:!0,followerCount:q.followerCount+1}:q)),n.setQueryData(z,h=>{if(!h?.pages?.[0])return h;const q=n.getQueryData(b0.account("index"));if(!q)return h;const g={id:q.url,type:"Person",preferredUsername:"index",name:q.name,url:q.url,handle:`index@${new URL(q.url).hostname}`,icon:{type:"Image",url:q.avatarUrl},isFollowing:!1};return{...h,pages:[{...h.pages[0],accounts:[g,...h.pages[0].accounts]},...h.pages.slice(1)]}}),LW(n,e,a,!0),t()},onError(r){o(),r.statusCode===429&&r2(),r.statusCode===403&&qM()}})}function un0(e,t){const o=v1(),n=b0.searchResults(t);return{searchQuery:K2({queryKey:n,enabled:t.length>0,refetchOnMount:"always",async queryFn(){const i=await l1();return b1(e,i).search(t)}}),updateAccountSearchResult:(i,l)=>{o.setQueryData(n,z=>z&&{...z,accounts:z.accounts.map(u=>u.id===i?{...u,...l}:u)})}}}function Db(e,t,o,n){e.setQueryData(t,r=>r&&{...r,pages:r.pages.map((a,i)=>i===0?{...a,[o]:[n,...a[o]]}:a)})}function tn(e,t,o,n,r){e.setQueryData(t,a=>a&&{...a,pages:a.pages.map(i=>({...i,[o]:i[o].map(l=>l.id===n?r(l):l)}))})}function Ib(e,t,o,n){e.setQueryData(t,r=>r&&{...r,pages:r.pages.map(a=>({...a,[o]:a[o].filter(i=>i.id!==n)}))})}function dn0(e,t){const o=v1();return Me({async mutationFn({inReplyTo:n,content:r,imageUrl:a,altText:i}){const l=await l1(),z=b1(e,l),u=a?{url:a,altText:i}:void 0;return z.reply(n,r,u)},onMutate:({inReplyTo:n})=>{if(!t)throw new Error("Cannot create reply without actor props");const r=wW();return AA(o,n,1),hA(o,n,1),au(o,e,n,1),{id:r}},onSuccess:(n,r)=>{if(n.id===void 0)throw new Error("Activity returned from API has no id");o.invalidateQueries({queryKey:b0.replyChain(r.inReplyTo)})},onError(n,r){console.error(n),AA(o,r.inReplyTo,-1),hA(o,r.inReplyTo,-1),au(o,e,r.inReplyTo,-1),n.statusCode===403&&qM(),n.statusCode===429&&r2(),Te.error("An error occurred while sending your reply.")}})}function On0(e,t){const o=v1(),n=b0.feed,r=b0.outbox(e),a=b0.profilePosts("index");return Me({async mutationFn({content:i,imageUrl:l,altText:z}){const u=await l1(),f=b1(e,u),O=l?{url:l,altText:z}:void 0;return f.note(i,O)},onMutate:({content:i,imageUrl:l})=>{if(!t)throw new Error("Cannot create note without actor props");const z=in0(i),u=wW(),f=sn0(t,u,z,l);return Db(o,n,"posts",f),Db(o,r,"data",f),Db(o,a,"posts",f),{id:u}},onSuccess:(i,l,z)=>{if(i.id===void 0)throw new Error("Post returned from API has no id");const u=uc(i);tn(o,n,"posts",z?.id??"",()=>u),tn(o,r,"data",z?.id??"",()=>u),tn(o,a,"posts",z?.id??"",()=>u)},onError(i,l,z){console.error(i),Ib(o,n,"posts",z?.id??""),Ib(o,r,"data",z?.id??""),Ib(o,a,"posts",z?.id??""),i.statusCode===429&&r2(),Te.error("An error occurred while posting your note.")}})}function z5(e,t,o){const n=o?.enabled!==!1;return K2({queryKey:b0.account(t==="me"?"index":t),enabled:n,async queryFn(){const r=await l1();return b1(e,r).getAccount(t)}})}function va0(e,t){const o=v1();return mt({queryKey:b0.accountFollows(e,t),async queryFn({pageParam:n}){const r=await l1(),i=await b1("index",r).getAccountFollows(e,t,n);return i.accounts&&i.accounts.forEach(l=>{o.setQueryData(b0.account(l.handle),l)}),i},getNextPageParam(n){return n.next}})}function Ra0(e){const t=b0.feed,o=v1();return{feedQuery:mt({queryKey:t,enabled:e.enabled,staleTime:60*1e3,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getFeed(a).then(z=>({posts:z.posts.map(uc),next:z.next}))},getNextPageParam(a){return a.next}}),updateFeedActivity:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function ya0(e){const t=b0.inbox,o=v1();return{inboxQuery:mt({queryKey:t,enabled:e.enabled,staleTime:20*1e3,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getInbox(a).then(z=>({posts:z.posts.map(uc),next:z.next}))},getNextPageParam(a){return a.next}}),updateInboxActivity:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function wa0(e){const t=[...b0.discoveryFeed,e.topic],o=v1();return{discoveryFeedQuery:mt({queryKey:t,enabled:e.enabled,staleTime:20*1e3,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getDiscoveryFeed(e.topic,a).then(z=>({posts:z.posts.map(uc),next:z.next}))},getNextPageParam(a){return a.next}}),updateDiscoveryFeedActivity:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function La0(e,t){const o=b0.profilePosts(e==="me"?"index":e),n=v1();return{postsByAccountQuery:mt({queryKey:o,enabled:t.enabled,async queryFn({pageParam:i}){const l=await l1();return b1("index",l).getPostsByAccount(e,i).then(u=>({posts:u.posts.map(uc),next:u.next})).catch(()=>({posts:[],next:null}))},getNextPageParam(i){return i.next}}),updatePostsByAccount:(i,l)=>{tn(n,o,"posts",i,z=>({...z,...l}))}}}function xa0(e){const t=b0.postsLikedByAccount,o=v1();return{postsLikedByAccountQuery:mt({queryKey:t,enabled:e.enabled,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getPostsLikedByAccount(a).then(z=>({posts:z.posts.map(uc),next:z.next}))},getNextPageParam(a){return a.next}}),updatePostsLikedByAccount:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function fn0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).delete(o.id)},onMutate:({id:o,parentId:n})=>{const r=t.getQueryData(b0.feed);t.setQueryData(b0.feed,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.id!==o).map(w=>w.object.id===n?{...w,object:{...w.object,replyCount:w.object.replyCount-1}}:w)}))});const a=t.getQueryData(b0.inbox);t.setQueryData(b0.inbox,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.id!==o).map(w=>w.object.id===n?{...w,object:{...w.object,replyCount:w.object.replyCount-1}}:w)}))}),n&&au(t,e,n,-1);const i=b0.outbox(e),l=t.getQueryData(i);t.setQueryData(i,L=>L&&{...L,pages:L.pages.map(x=>({...x,data:x.data.filter(w=>w.object.id!==o)}))});const z=b0.liked(e),u=t.getQueryData(z);let f=!1;t.setQueryData(z,L=>L&&{...L,pages:L.pages.map(x=>(f=x.data.some(w=>w.object.id===o),{...x,data:x.data.filter(w=>w.object.id!==o)}))}),[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts("index"),b0.postsLikedByAccount].some(L=>t.getQueryData(L)?.pages.some(w=>w.posts.some(P=>P.id===o&&P.object.liked)))&&t.setQueryData(b0.account(e),L=>L&&{...L,likedCount:Math.max(0,L.likedCount-1)});const h=b0.profilePosts(null),q=t.getQueriesData(h);t.setQueriesData(h,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.object.id!==o)}))});let g=[],W;f&&(g=b0.account(e),W=t.getQueryData(g),t.setQueryData(g,L=>L&&{...L,likedCount:L.likedCount-1<0?0:L.likedCount-1}));const v=b0.profilePosts("index"),y=t.getQueryData(v);t.setQueryData(v,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.object.id!==o)}))});const k=b0.postsLikedByAccount,C=t.getQueryData(k);return t.setQueryData(k,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.object.id!==o)}))}),n&&t.setQueriesData({queryKey:["reply_chain"],exact:!1},L=>{if(!L)return L;const x=L.children.filter(P=>P.post.id!==o).map(P=>({...P,chain:P.chain.filter(H=>H.id!==o)}));let w=L.post;return L.post.id===n&&(w={...L.post,replyCount:Math.max(0,(L.post.replyCount||0)-1)}),{...L,post:w,children:x}}),{previousFeed:{key:b0.feed,data:r},previousInbox:{key:b0.inbox,data:a},previousOutbox:{key:i,data:l},previousLiked:{key:z,data:u},previousProfilePosts:{key:h,data:q},previousAccount:f?{key:g,data:W}:null,previousPostsByAccount:{key:b0.profilePosts("index"),data:y},previousPostsLikedByAccount:{key:b0.postsLikedByAccount,data:C}}},onError:(o,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(b0.profilePosts("index"),r.previousPostsByAccount),r.previousPostsLikedByAccount&&t.setQueryData(b0.postsLikedByAccount,r.previousPostsLikedByAccount))},onSuccess:(o,{parentId:n})=>{t.invalidateQueries({queryKey:["reply_chain"]}),n&&(t.invalidateQueries({queryKey:b0.feed}),t.invalidateQueries({queryKey:b0.inbox}))}})}function ka0(e){return mt({queryKey:b0.notifications(e),async queryFn({pageParam:t}){const o=await l1();return b1(e,o).getNotifications(t)},getNextPageParam(t){return t.next}})}function Ca0(e,t){const o=K2({queryKey:b0.replyChain(t),enabled:!!t,async queryFn(){if(!t)throw new Error("Post ID is required");const f=await l1(),O=b1(e,f);try{return await O.getReplies(t)}catch(h){if(cn0(h)&&h.statusCode===404)return await O.getPost(t),await O.getReplies(t);throw h}}}),[n,r]=p.useState(null),[a,i]=p.useState(null);p.useEffect(()=>{o.data?r(o.data):o.error&&i(o.error)},[o.data,o.error]);const l=p.useCallback(async()=>{if(!(!n?.ancestors.hasMore||!n?.ancestors.chain[0]))try{const f=await l1(),h=await b1(e,f).getReplies(n.ancestors.chain[0].id);r(q=>q&&{...q,ancestors:{chain:[...h.ancestors.chain,...q.ancestors.chain],hasMore:h.ancestors.hasMore}})}catch(f){i(f instanceof Error?f:new Error("Failed to load more ancestors"))}},[e,n?.ancestors.hasMore,n?.ancestors.chain]),z=p.useCallback(async()=>{if(n?.next&&t)try{const f=await l1(),h=await b1(e,f).getReplies(t,n.next);r(q=>q&&{...q,children:[...q.children,...h.children],next:h.next})}catch(f){i(f instanceof Error?f:new Error("Failed to load more children"))}},[e,n?.next,t]),u=p.useCallback(async f=>{if(n?.children[f]?.hasMore)try{const O=await l1(),h=b1(e,O),q=n.children[f],g=q.chain.length>1?q.chain[q.chain.length-2]:q.post,W=await h.getReplies(g.id),v=W.children[0].chain;r(y=>{if(!y)return y;const k=[...y.children];return k[f]={...q,chain:[...q.chain,...v],hasMore:W.children[0].hasMore},{...y,children:k}})}catch(O){i(O instanceof Error?O:new Error("Failed to load more child replies"))}},[e,n]);return{data:n,isLoading:o.isLoading,error:a,loadMoreAncestors:l,loadMoreChildren:z,loadMoreChildReplies:u,hasMoreAncestors:!!n?.ancestors.hasMore,hasMoreChildren:!!n?.next,hasMoreChildReplies:f=>!!n?.children[f]?.hasMore}}function Na0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).updateAccount(o)},onSuccess(){t.invalidateQueries({queryKey:b0.account("index")})}})}async function An0(e){const t=await l1();return b1("index",t).upload(e)}function kW(e,t=!0){const o=p.useCallback(async()=>await l1(),[]),n=p.useCallback(async()=>{const r=await o();return b1(e,r)},[e,o]);return K2({queryKey:b0.notificationsCount(e),enabled:t,async queryFn(){return(await(await n()).getNotificationsCount()).count}})}function hn0(e){const t=v1(),o=p.useCallback(async()=>await l1(),[]),n=p.useCallback(async()=>{const r=await o();return b1(e,r)},[e,o]);return Me({async mutationFn(){return t.setQueryData(b0.notificationsCount(e),0),(await n()).resetNotificationsCount()}})}function _a0(e,t){const o=v1(),n=[...b0.exploreProfiles(e),t];return{exploreProfilesQuery:mt({queryKey:n,staleTime:3600*1e3,async queryFn({pageParam:i}){const l=await l1(),u=await b1(e,l).getExploreAccounts(t,i);return u.accounts.forEach(f=>{o.setQueryData(b0.account(f.handle),f)}),{accounts:u.accounts,next:u.next}},getNextPageParam(i){return i.next}}),updateExploreProfile:(i,l)=>{o.setQueryData(n,z=>{if(!z)return z;const u=z.pages.map(f=>{const O=f.accounts.map(h=>h.id===i?{...h,...l}:h);return{...f,accounts:O}});return{...z,pages:u}})}}}function u5(e,t=3){const o=v1(),n=b0.suggestedProfiles(e,t);return{suggestedProfilesQuery:K2({queryKey:n,async queryFn(){const i=await l1(),u=(await b1("index",i).getRecommendations(t)).accounts;return u.length>0&&u.forEach(f=>{o.setQueryData(b0.account(f.handle),f)}),u.length>0?u:null},retry:!1,staleTime:3600*1e3}),updateSuggestedProfile:(i,l)=>{o.setQueryData(n,z=>z&&z.map(u=>u.id===i?{...u,...l}:u))}}}function d5(){return{topicsQuery:K2({queryKey:b0.topics(),async queryFn(){const t=await l1();return b1("index",t).getTopics()},staleTime:864e5,retry:!1})}}function O5(e,t){const o=b0.account("index");e.setQueryData(o,n=>n&&{...n,...t})}function Ea0(e){const t=v1();return Me({async mutationFn(){const o=await l1();return b1(e,o).enableBluesky()},onSuccess(){O5(t,{blueskyEnabled:!0,blueskyHandleConfirmed:!1,blueskyHandle:null}),t.invalidateQueries({queryKey:b0.accountFollows("index","following")})},onError(o){o.statusCode===429&&r2()}})}function Ba0(e){const t=v1();return Me({async mutationFn(){const o=await l1();return b1(e,o).disableBluesky()},onSuccess(){O5(t,{blueskyEnabled:!1,blueskyHandleConfirmed:!1,blueskyHandle:null}),t.invalidateQueries({queryKey:b0.accountFollows("index","following")})},onError(o){o.statusCode===429&&r2()}})}function Sa0(e){const t=v1();return Me({async mutationFn(){const o=await l1();return b1(e,o).confirmBlueskyHandle()},onSuccess(o){o!==""&&O5(t,{blueskyEnabled:!0,blueskyHandleConfirmed:!0,blueskyHandle:o})},onError(o){o.statusCode===429&&r2()}})}let lp=null;const qA=({onFollow:e,onUnfollow:t,authorHandle:o,followedByMe:n})=>{const[,r]=M0.useReducer(z=>z+1,0),i=lp===o&&!n,l=z=>{i?(t(z),setTimeout(()=>{lp=null,r()},0)):(lp=o,r(),e(z))};return b.jsx(i1,{className:"absolute -right-1.5 bottom-px z-10 flex size-4 items-center justify-center rounded-full p-0 outline outline-2 outline-white transition-transform hover:scale-105 active:scale-100 dark:outline-black",title:i?"Unfollow":"Follow",onClick:l,children:i?b.jsx(j9,{className:"-mb-px size-3! stroke-[2.4]!"}):b.jsx(I9,{className:"size-[14px]! stroke-2!"})})},en=({author:e,size:t,isLoading:o=!1,disabled:n=!1,className:r="",showFollowButton:a=!1})=>{let i=20,l=`shrink-0 items-center justify-center rounded-full relative z-10 flex bg-black/5 dark:bg-gray-900 ${t==="lg"||n?"":"cursor-pointer"} ${r}`,z="z-10 object-cover rounded-full outline outline-[0.5px] outline-offset-[-0.5px] outline-black/10";const[u,f]=p.useState(e?.icon?.url),O=qo(),h=b5("index",()=>{Te.success(`Followed ${e?.name}`)},()=>{Te.error("Failed to follow")}),q=l5("index",()=>{Te.info(`Unfollowed ${e?.name}`)},()=>{Te.error("Failed to unfollow")});switch(p.useEffect(()=>{f(e?.icon?.url)},[e?.icon?.url]),t){case"2xs":i=10,l=se("size-4",l),z=se("size-4",z);break;case"xs":i=12,l=se("size-6",l),z=se("size-6",z);break;case"notification":i=16,l=se("size-9",l),z=se("size-9",z);break;case"sm":l=se("size-10",l),z=se("size-10",z);break;case"md":l=se("size-[60px]",l),z=se("size-[60px]",z);break;case"lg":i=32,l=se("size-22",l),z=se("size-22",z);break;default:l=se("size-10",l),z=se("size-10",z);break}if(!e||o)return b.jsx(j1,{className:z,containerClassName:l});const g=e?.handle||Jo(e),W=L=>{L.stopPropagation(),O(`/profile/${g}`)},v=L=>{L.stopPropagation(),h.mutate(g)},y=L=>{L.stopPropagation(),q.mutate(g)},C=a||lp===g;return u?b.jsxs("div",{className:l,onClick:t==="lg"||n?void 0:W,children:[b.jsx("img",{className:z,referrerPolicy:"no-referrer",src:u,onError:()=>f(void 0)}),C&&b.jsx(qA,{authorHandle:g,followedByMe:!1,onFollow:v,onUnfollow:y})]}):b.jsxs("div",{className:l,onClick:n?void 0:W,children:[b.jsx(Pd,{className:"text-gray-600",size:i,strokeWidth:1.5}),C&&b.jsx(qA,{authorHandle:g,followedByMe:!1,onFollow:v,onUnfollow:y})]})},Fb=({trigger:e,onCopyLink:t,onDelete:o,allowDelete:n=!1,disabled:r=!1,layout:a,followedByMe:i=!1,authoredByMe:l=!1,onFollow:z=()=>{},onUnfollow:u=()=>{}})=>{const f=q=>{q.stopPropagation(),t()},O=q=>{q.stopPropagation(),o()},h=q=>{q.stopPropagation(),i?u():z()};return b.jsxs(WY,{children:[b.jsxs(VJ,{children:[b.jsx(QJ,{disabled:r,asChild:!0,onClick:q=>q.stopPropagation(),children:e}),b.jsx(cg,{align:`${a==="modal"?"start":"end"}`,alignOffset:a==="modal"?-12:0,className:"p-2",children:b.jsxs("div",{className:"flex w-48 flex-col",children:[(!n||a==="inbox")&&b.jsx(Tb,{asChild:!0,children:b.jsxs(i1,{className:"justify-start",variant:"ghost",onClick:f,children:[b.jsx(DZ,{}),"Copy link"]})}),!l&&b.jsx(Tb,{asChild:!0,children:b.jsxs(i1,{className:"justify-start",variant:"ghost",onClick:h,children:[i?b.jsx(hK,{}):b.jsx(mK,{}),i?"Unfollow":"Follow"]})}),n&&b.jsx(vY,{asChild:!0,children:b.jsx(Tb,{asChild:!0,children:b.jsxs(i1,{className:"justify-start text-red hover:bg-red/5 hover:text-red",variant:"ghost",onClick:q=>q.stopPropagation(),children:[b.jsx(V9,{}),"Delete"]})})})]})})]}),b.jsxs(K9,{onClick:q=>q.stopPropagation(),children:[b.jsxs(Y9,{children:[b.jsx(em,{children:"Delete this post?"}),b.jsx(tm,{children:a==="inbox"?"This will remove the post from the Ghost social web, but it will remain on your website.":b.jsx(b.Fragment,{children:"If you delete this post, you won't be able to restore it."})})]}),b.jsxs(J9,{children:[b.jsx(nm,{onClick:q=>q.stopPropagation(),children:"Cancel"}),b.jsx(om,{className:U3({variant:"destructive"}),onClick:O,children:"Delete"})]})]})]})};function qn0(e){const[t,o]=p.useState({images:[],currentIndex:0,isOpen:!1}),n=l=>{const z=A5(l);if(!z)return[];if(Array.isArray(z))return z.map((u,f)=>({url:u.url,alt:u.name||`Image-${f}`}));if(z.mediaType?.startsWith("image/")||z.type==="Image")return[{url:z.url,alt:z.name||"Image"}];if(l.image){let u;if(typeof l.image=="string"?u=l.image:u=l.image?.url,u)return[{url:u,alt:"Image"}]}return[]};return{lightboxState:t,openLightbox:l=>{if(!e)return;const z=n(e),u=z.findIndex(f=>f.url===l);u!==-1&&o({images:z,currentIndex:u,isOpen:!0})},closeLightbox:()=>{o(l=>({...l,isOpen:!1}))},navigateToIndex:l=>{o(z=>({...z,currentIndex:l}))}}}const Hb=({images:e,currentIndex:t,isOpen:o,onClose:n,onNavigate:r})=>{const a=t===0,i=t===e.length-1,l=p.useCallback(()=>{if(e.length<=1||i)return;const u=(t+1)%e.length;r(u)},[e.length,i,t,r]),z=p.useCallback(()=>{if(e.length<=1||a)return;const u=(t-1+e.length)%e.length;r(u)},[e.length,a,t,r]);return p.useEffect(()=>{const u=f=>{o&&(f.key==="ArrowRight"&&!i?l():f.key==="ArrowLeft"&&!a&&z())};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[o,t,e.length,l,z,i,a]),!o||e.length===0?null:b.jsx(rs,{open:o,onOpenChange:u=>{u||n()},children:b.jsxs(Mc,{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:()=>n(),children:[b.jsx("img",{alt:e[t].alt,className:"mx-auto max-h-[90vh] max-w-[90vw] object-contain",src:e[t].url,onClick:u=>u.stopPropagation()}),e.length>1&&b.jsxs(b.Fragment,{children:[b.jsxs(i1,{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:u=>{u.stopPropagation(),z()},children:[b.jsx(zZ,{className:"size-6!"}),b.jsx("span",{className:"sr-only",children:"Previous image"})]}),b.jsxs(i1,{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:i,onClick:u=>{u.stopPropagation(),l()},children:[b.jsx(H3,{className:"size-6!"}),b.jsx("span",{className:"sr-only",children:"Next image"})]})]}),b.jsx(CY,{asChild:!0,children:b.jsxs(i1,{className:"absolute top-5 right-5 size-11 rounded-full bg-black/50 p-0 hover:bg-black/70",children:[b.jsx(Xd,{className:"size-5!"}),b.jsx("span",{className:"sr-only",children:"Close"})]})})]})})},mA=()=>{},f5=({className:e,following:t,handle:o,variant:n="default",onFollow:r=mA,onUnfollow:a=mA,"data-testid":i})=>{const[l,z]=p.useState(t),u=l5("index",()=>{},()=>{z(!0)}),f=b5("index",()=>{},()=>{z(!1)}),O=async()=>{l?(z(!1),a(),u.mutate(o)):(z(!0),r(),f.mutate(o))};p.useEffect(()=>{z(t)},[t]);const h=l?"Following":"Follow";return n==="link"?b.jsx(i1,{className:se("p-0 font-medium",l?"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":i,variant:"link",onClick:q=>{q?.preventDefault(),q?.stopPropagation(),O()},children:h}):b.jsx(i1,{className:se("min-w-[90px]",e),"data-testid":i,title:l?"Click to unfollow":"",variant:l?"outline":"default",onClick:q=>{q?.preventDefault(),q?.stopPropagation(),O()},children:h})};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:CW,setPrototypeOf:gA,isFrozen:mn0,getPrototypeOf:gn0,getOwnPropertyDescriptor:Wn0}=Object;let{freeze:t2,seal:Z2,create:pu}=Object,{apply:Mu,construct:lu}=typeof Reflect<"u"&&Reflect;t2||(t2=function(t){return t});Z2||(Z2=function(t){return t});Mu||(Mu=function(t,o){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return t.apply(o,r)});lu||(lu=function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return new t(...n)});const Hi=o2(Array.prototype.forEach),vn0=o2(Array.prototype.lastIndexOf),WA=o2(Array.prototype.pop),na=o2(Array.prototype.push),Rn0=o2(Array.prototype.splice),bp=o2(String.prototype.toLowerCase),Ub=o2(String.prototype.toString),Vb=o2(String.prototype.match),ra=o2(String.prototype.replace),yn0=o2(String.prototype.indexOf),wn0=o2(String.prototype.trim),bt=o2(Object.prototype.hasOwnProperty),Je=o2(RegExp.prototype.test),ca=Ln0(TypeError);function o2(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return Mu(e,t,n)}}function Ln0(e){return function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return lu(e,o)}}function u1(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bp;gA&&gA(e,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){const a=o(r);a!==r&&(mn0(t)||(t[n]=a),r=a)}e[r]=!0}return e}function xn0(e){for(let t=0;t<e.length;t++)bt(e,t)||(e[t]=null);return e}function kt(e){const t=pu(null);for(const[o,n]of CW(e))bt(e,o)&&(Array.isArray(n)?t[o]=xn0(n):n&&typeof n=="object"&&n.constructor===Object?t[o]=kt(n):t[o]=n);return t}function aa(e,t){for(;e!==null;){const n=Wn0(e,t);if(n){if(n.get)return o2(n.get);if(typeof n.value=="function")return o2(n.value)}e=gn0(e)}function o(){return null}return o}const vA=t2(["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"]),Qb=t2(["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"]),$b=t2(["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"]),kn0=t2(["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"]),Gb=t2(["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"]),Cn0=t2(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RA=t2(["#text"]),yA=t2(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),Zb=t2(["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"]),wA=t2(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),Ui=t2(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Nn0=Z2(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_n0=Z2(/<%[\w\W]*|[\w\W]*%>/gm),En0=Z2(/\$\{[\w\W]*/gm),Bn0=Z2(/^data-[\-\w.\u00B7-\uFFFF]+$/),Sn0=Z2(/^aria-[\-\w]+$/),NW=Z2(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tn0=Z2(/^(?:\w+script|data):/i),Pn0=Z2(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_W=Z2(/^html$/i),jn0=Z2(/^[a-z][.\w]*(-[.\w]+)+$/i);var LA=Object.freeze({__proto__:null,ARIA_ATTR:Sn0,ATTR_WHITESPACE:Pn0,CUSTOM_ELEMENT:jn0,DATA_ATTR:Bn0,DOCTYPE_NAME:_W,ERB_EXPR:_n0,IS_ALLOWED_URI:NW,IS_SCRIPT_OR_DATA:Tn0,MUSTACHE_EXPR:Nn0,TMPLIT_EXPR:En0});const sa={element:1,text:3,progressingInstruction:7,comment:8,document:9},Xn0=function(){return typeof window>"u"?null:window},Dn0=function(t,o){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";o&&o.hasAttribute(r)&&(n=o.getAttribute(r));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},xA=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function EW(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xn0();const t=W0=>EW(W0);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==sa.document||!e.Element)return t.isSupported=!1,t;let{document:o}=e;const n=o,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:i,Node:l,Element:z,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:O,DOMParser:h,trustedTypes:q}=e,g=z.prototype,W=aa(g,"cloneNode"),v=aa(g,"remove"),y=aa(g,"nextSibling"),k=aa(g,"childNodes"),C=aa(g,"parentNode");if(typeof i=="function"){const W0=o.createElement("template");W0.content&&W0.content.ownerDocument&&(o=W0.content.ownerDocument)}let L,x="";const{implementation:w,createNodeIterator:P,createDocumentFragment:H,getElementsByTagName:o0}=o,{importNode:Y}=n;let Z=xA();t.isSupported=typeof CW=="function"&&typeof C=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:n0,ERB_EXPR:J,TMPLIT_EXPR:i0,DATA_ATTR:L0,ARIA_ATTR:K,IS_SCRIPT_OR_DATA:m0,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:X}=LA;let{IS_ALLOWED_URI:G}=LA,N=null;const I=u1({},[...vA,...Qb,...$b,...Gb,...RA]);let c0=null;const h0=u1({},[...yA,...Zb,...wA,...Ui]);let d0=Object.seal(pu(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}})),v0=null,u0=null;const e0=Object.seal(pu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let S0=!0,T0=!0,$0=!1,h1=!0,B=!1,t0=!0,r0=!1,A0=!1,j0=!1,J0=!1,a1=!1,o1=!1,q1=!0,C1=!1;const Ce="user-content-";let rt=!0,c2=!1,K1={},X1=null;const a2=u1({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ct=null;const qe=u1({},["audio","video","img","source","image","track"]);let s2=null;const be=u1({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_2="http://www.w3.org/1998/Math/MathML",E2="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml";let Ge=Ne,B2=!1,je=null;const _e=u1({},[_2,E2,Ne],Ub);let i2=u1({},["mi","mo","mn","ms","mtext"]),Ze=u1({},["annotation-xml"]);const p2=u1({},["title","style","font","a","script"]);let m2=null;const Y0=["application/xhtml+xml","text/html"],B1="text/html";let n1=null,H1=null;const S2=o.createElement("form"),E=function(S){return S instanceof RegExp||S instanceof Function},D=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H1&&H1===S)){if((!S||typeof S!="object")&&(S={}),S=kt(S),m2=Y0.indexOf(S.PARSER_MEDIA_TYPE)===-1?B1:S.PARSER_MEDIA_TYPE,n1=m2==="application/xhtml+xml"?Ub:bp,N=bt(S,"ALLOWED_TAGS")?u1({},S.ALLOWED_TAGS,n1):I,c0=bt(S,"ALLOWED_ATTR")?u1({},S.ALLOWED_ATTR,n1):h0,je=bt(S,"ALLOWED_NAMESPACES")?u1({},S.ALLOWED_NAMESPACES,Ub):_e,s2=bt(S,"ADD_URI_SAFE_ATTR")?u1(kt(be),S.ADD_URI_SAFE_ATTR,n1):be,ct=bt(S,"ADD_DATA_URI_TAGS")?u1(kt(qe),S.ADD_DATA_URI_TAGS,n1):qe,X1=bt(S,"FORBID_CONTENTS")?u1({},S.FORBID_CONTENTS,n1):a2,v0=bt(S,"FORBID_TAGS")?u1({},S.FORBID_TAGS,n1):kt({}),u0=bt(S,"FORBID_ATTR")?u1({},S.FORBID_ATTR,n1):kt({}),K1=bt(S,"USE_PROFILES")?S.USE_PROFILES:!1,S0=S.ALLOW_ARIA_ATTR!==!1,T0=S.ALLOW_DATA_ATTR!==!1,$0=S.ALLOW_UNKNOWN_PROTOCOLS||!1,h1=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=S.SAFE_FOR_TEMPLATES||!1,t0=S.SAFE_FOR_XML!==!1,r0=S.WHOLE_DOCUMENT||!1,J0=S.RETURN_DOM||!1,a1=S.RETURN_DOM_FRAGMENT||!1,o1=S.RETURN_TRUSTED_TYPE||!1,j0=S.FORCE_BODY||!1,q1=S.SANITIZE_DOM!==!1,C1=S.SANITIZE_NAMED_PROPS||!1,rt=S.KEEP_CONTENT!==!1,c2=S.IN_PLACE||!1,G=S.ALLOWED_URI_REGEXP||NW,Ge=S.NAMESPACE||Ne,i2=S.MATHML_TEXT_INTEGRATION_POINTS||i2,Ze=S.HTML_INTEGRATION_POINTS||Ze,d0=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&E(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(d0.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&E(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(d0.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(d0.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),B&&(T0=!1),a1&&(J0=!0),K1&&(N=u1({},RA),c0=[],K1.html===!0&&(u1(N,vA),u1(c0,yA)),K1.svg===!0&&(u1(N,Qb),u1(c0,Zb),u1(c0,Ui)),K1.svgFilters===!0&&(u1(N,$b),u1(c0,Zb),u1(c0,Ui)),K1.mathMl===!0&&(u1(N,Gb),u1(c0,wA),u1(c0,Ui))),S.ADD_TAGS&&(typeof S.ADD_TAGS=="function"?e0.tagCheck=S.ADD_TAGS:(N===I&&(N=kt(N)),u1(N,S.ADD_TAGS,n1))),S.ADD_ATTR&&(typeof S.ADD_ATTR=="function"?e0.attributeCheck=S.ADD_ATTR:(c0===h0&&(c0=kt(c0)),u1(c0,S.ADD_ATTR,n1))),S.ADD_URI_SAFE_ATTR&&u1(s2,S.ADD_URI_SAFE_ATTR,n1),S.FORBID_CONTENTS&&(X1===a2&&(X1=kt(X1)),u1(X1,S.FORBID_CONTENTS,n1)),S.ADD_FORBID_CONTENTS&&(X1===a2&&(X1=kt(X1)),u1(X1,S.ADD_FORBID_CONTENTS,n1)),rt&&(N["#text"]=!0),r0&&u1(N,["html","head","body"]),N.table&&(u1(N,["tbody"]),delete v0.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw ca('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ca('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=S.TRUSTED_TYPES_POLICY,x=L.createHTML("")}else L===void 0&&(L=Dn0(q,r)),L!==null&&typeof x=="string"&&(x=L.createHTML(""));t2&&t2(S),H1=S}},V=u1({},[...Qb,...$b,...kn0]),s0=u1({},[...Gb,...Cn0]),f0=function(S){let z0=C(S);(!z0||!z0.tagName)&&(z0={namespaceURI:Ge,tagName:"template"});const x0=bp(S.tagName),O1=bp(z0.tagName);return je[S.namespaceURI]?S.namespaceURI===E2?z0.namespaceURI===Ne?x0==="svg":z0.namespaceURI===_2?x0==="svg"&&(O1==="annotation-xml"||i2[O1]):!!V[x0]:S.namespaceURI===_2?z0.namespaceURI===Ne?x0==="math":z0.namespaceURI===E2?x0==="math"&&Ze[O1]:!!s0[x0]:S.namespaceURI===Ne?z0.namespaceURI===E2&&!Ze[O1]||z0.namespaceURI===_2&&!i2[O1]?!1:!s0[x0]&&(p2[x0]||!V[x0]):!!(m2==="application/xhtml+xml"&&je[S.namespaceURI]):!1},y0=function(S){na(t.removed,{element:S});try{C(S).removeChild(S)}catch{v(S)}},w0=function(S,z0){try{na(t.removed,{attribute:z0.getAttributeNode(S),from:z0})}catch{na(t.removed,{attribute:null,from:z0})}if(z0.removeAttribute(S),S==="is")if(J0||a1)try{y0(z0)}catch{}else try{z0.setAttribute(S,"")}catch{}},C0=function(S){let z0=null,x0=null;if(j0)S="<remove></remove>"+S;else{const T1=Vb(S,/^[\r\n\t ]+/);x0=T1&&T1[0]}m2==="application/xhtml+xml"&&Ge===Ne&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const O1=L?L.createHTML(S):S;if(Ge===Ne)try{z0=new h().parseFromString(O1,m2)}catch{}if(!z0||!z0.documentElement){z0=w.createDocument(Ge,"template",null);try{z0.documentElement.innerHTML=B2?x:O1}catch{}}const c1=z0.body||z0.documentElement;return S&&x0&&c1.insertBefore(o.createTextNode(x0),c1.childNodes[0]||null),Ge===Ne?o0.call(z0,r0?"html":"body")[0]:r0?z0.documentElement:c1},D0=function(S){return P.call(S.ownerDocument||S,S,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},V0=function(S){return S instanceof O&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof f)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},I0=function(S){return typeof l=="function"&&S instanceof l};function N0(W0,S,z0){Hi(W0,x0=>{x0.call(t,S,z0,H1)})}const r1=function(S){let z0=null;if(N0(Z.beforeSanitizeElements,S,null),V0(S))return y0(S),!0;const x0=n1(S.nodeName);if(N0(Z.uponSanitizeElement,S,{tagName:x0,allowedTags:N}),t0&&S.hasChildNodes()&&!I0(S.firstElementChild)&&Je(/<[/\w!]/g,S.innerHTML)&&Je(/<[/\w!]/g,S.textContent)||S.nodeType===sa.progressingInstruction||t0&&S.nodeType===sa.comment&&Je(/<[/\w]/g,S.data))return y0(S),!0;if(!(e0.tagCheck instanceof Function&&e0.tagCheck(x0))&&(!N[x0]||v0[x0])){if(!v0[x0]&&Y1(x0)&&(d0.tagNameCheck instanceof RegExp&&Je(d0.tagNameCheck,x0)||d0.tagNameCheck instanceof Function&&d0.tagNameCheck(x0)))return!1;if(rt&&!X1[x0]){const O1=C(S)||S.parentNode,c1=k(S)||S.childNodes;if(c1&&O1){const T1=c1.length;for(let D1=T1-1;D1>=0;--D1){const Ee=W(c1[D1],!0);Ee.__removalCount=(S.__removalCount||0)+1,O1.insertBefore(Ee,y(S))}}}return y0(S),!0}return S instanceof z&&!f0(S)||(x0==="noscript"||x0==="noembed"||x0==="noframes")&&Je(/<\/no(script|embed|frames)/i,S.innerHTML)?(y0(S),!0):(B&&S.nodeType===sa.text&&(z0=S.textContent,Hi([n0,J,i0],O1=>{z0=ra(z0,O1," ")}),S.textContent!==z0&&(na(t.removed,{element:S.cloneNode()}),S.textContent=z0)),N0(Z.afterSanitizeElements,S,null),!1)},L1=function(S,z0,x0){if(q1&&(z0==="id"||z0==="name")&&(x0 in o||x0 in S2))return!1;if(!(T0&&!u0[z0]&&Je(L0,z0))){if(!(S0&&Je(K,z0))){if(!(e0.attributeCheck instanceof Function&&e0.attributeCheck(z0,S))){if(!c0[z0]||u0[z0]){if(!(Y1(S)&&(d0.tagNameCheck instanceof RegExp&&Je(d0.tagNameCheck,S)||d0.tagNameCheck instanceof Function&&d0.tagNameCheck(S))&&(d0.attributeNameCheck instanceof RegExp&&Je(d0.attributeNameCheck,z0)||d0.attributeNameCheck instanceof Function&&d0.attributeNameCheck(z0,S))||z0==="is"&&d0.allowCustomizedBuiltInElements&&(d0.tagNameCheck instanceof RegExp&&Je(d0.tagNameCheck,x0)||d0.tagNameCheck instanceof Function&&d0.tagNameCheck(x0))))return!1}else if(!s2[z0]){if(!Je(G,ra(x0,$,""))){if(!((z0==="src"||z0==="xlink:href"||z0==="href")&&S!=="script"&&yn0(x0,"data:")===0&&ct[S])){if(!($0&&!Je(m0,ra(x0,$,"")))){if(x0)return!1}}}}}}}return!0},Y1=function(S){return S!=="annotation-xml"&&Vb(S,X)},Ae=function(S){N0(Z.beforeSanitizeAttributes,S,null);const{attributes:z0}=S;if(!z0||V0(S))return;const x0={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:c0,forceKeepAttr:void 0};let O1=z0.length;for(;O1--;){const c1=z0[O1],{name:T1,namespaceURI:D1,value:Ee}=c1,Xe=n1(T1),p1=Ee;let f1=T1==="value"?p1:wn0(p1);if(x0.attrName=Xe,x0.attrValue=f1,x0.keepAttr=!0,x0.forceKeepAttr=void 0,N0(Z.uponSanitizeAttribute,S,x0),f1=x0.attrValue,C1&&(Xe==="id"||Xe==="name")&&(w0(T1,S),f1=Ce+f1),t0&&Je(/((--!?|])>)|<\/(style|title|textarea)/i,f1)){w0(T1,S);continue}if(Xe==="attributename"&&Vb(f1,"href")){w0(T1,S);continue}if(x0.forceKeepAttr)continue;if(!x0.keepAttr){w0(T1,S);continue}if(!h1&&Je(/\/>/i,f1)){w0(T1,S);continue}B&&Hi([n0,J,i0],ze=>{f1=ra(f1,ze," ")});const M2=n1(S.nodeName);if(!L1(M2,Xe,f1)){w0(T1,S);continue}if(L&&typeof q=="object"&&typeof q.getAttributeType=="function"&&!D1)switch(q.getAttributeType(M2,Xe)){case"TrustedHTML":{f1=L.createHTML(f1);break}case"TrustedScriptURL":{f1=L.createScriptURL(f1);break}}if(f1!==p1)try{D1?S.setAttributeNS(D1,T1,f1):S.setAttribute(T1,f1),V0(S)?y0(S):WA(t.removed)}catch{w0(T1,S)}}N0(Z.afterSanitizeAttributes,S,null)},S1=function W0(S){let z0=null;const x0=D0(S);for(N0(Z.beforeSanitizeShadowDOM,S,null);z0=x0.nextNode();)N0(Z.uponSanitizeShadowNode,z0,null),r1(z0),Ae(z0),z0.content instanceof a&&W0(z0.content);N0(Z.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(W0){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z0=null,x0=null,O1=null,c1=null;if(B2=!W0,B2&&(W0="<!-->"),typeof W0!="string"&&!I0(W0))if(typeof W0.toString=="function"){if(W0=W0.toString(),typeof W0!="string")throw ca("dirty is not a string, aborting")}else throw ca("toString is not a function");if(!t.isSupported)return W0;if(A0||D(S),t.removed=[],typeof W0=="string"&&(c2=!1),c2){if(W0.nodeName){const Ee=n1(W0.nodeName);if(!N[Ee]||v0[Ee])throw ca("root node is forbidden and cannot be sanitized in-place")}}else if(W0 instanceof l)z0=C0("<!---->"),x0=z0.ownerDocument.importNode(W0,!0),x0.nodeType===sa.element&&x0.nodeName==="BODY"||x0.nodeName==="HTML"?z0=x0:z0.appendChild(x0);else{if(!J0&&!B&&!r0&&W0.indexOf("<")===-1)return L&&o1?L.createHTML(W0):W0;if(z0=C0(W0),!z0)return J0?null:o1?x:""}z0&&j0&&y0(z0.firstChild);const T1=D0(c2?W0:z0);for(;O1=T1.nextNode();)r1(O1),Ae(O1),O1.content instanceof a&&S1(O1.content);if(c2)return W0;if(J0){if(a1)for(c1=H.call(z0.ownerDocument);z0.firstChild;)c1.appendChild(z0.firstChild);else c1=z0;return(c0.shadowroot||c0.shadowrootmode)&&(c1=Y.call(n,c1,!0)),c1}let D1=r0?z0.outerHTML:z0.innerHTML;return r0&&N["!doctype"]&&z0.ownerDocument&&z0.ownerDocument.doctype&&z0.ownerDocument.doctype.name&&Je(_W,z0.ownerDocument.doctype.name)&&(D1="<!DOCTYPE "+z0.ownerDocument.doctype.name+`>
|
|
620
|
-
`+D1),B&&Hi([n0,J,i0],Ee=>{D1=ra(D1,Ee," ")}),L&&o1?L.createHTML(D1):D1},t.setConfig=function(){let W0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};D(W0),A0=!0},t.clearConfig=function(){H1=null,A0=!1},t.isValidAttribute=function(W0,S,z0){H1||D({});const x0=n1(W0),O1=n1(S);return L1(x0,O1,z0)},t.addHook=function(W0,S){typeof S=="function"&&na(Z[W0],S)},t.removeHook=function(W0,S){if(S!==void 0){const z0=vn0(Z[W0],S);return z0===-1?void 0:Rn0(Z[W0],z0,1)[0]}return WA(Z[W0])},t.removeHooks=function(W0){Z[W0]=[]},t.removeAllHooks=function(){Z=xA()},t}var In0=EW();const Fn0=["http:","https:","mailto:"];function Ta0(e){try{const t=new URL(e);return Fn0.includes(t.protocol)}catch{return!1}}function Pa0(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Cr(e){return In0.sanitize(e)}function bu(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();const o=t.map(u=>u.toLowerCase()),n={};let r=0,i=e.replace(/<\/(h[1-6]|p|div|li|blockquote|pre)>/gi,"<br>");for(const u of o){const f=new RegExp(`<${u}[^>]*>.*?<\\/${u}>|<${u}[^>]*\\/?>`,"gis");i=i.replace(f,O=>{const h=`__EXCLUDED_TAG_${r+=1}__`;return n[h]=O,h})}let l=i;o.includes("br")||(l=i.replace(/<br\s*\/?>/gi," "));let z=l.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();for(const[u,f]of Object.entries(n))z=z.replace(u,f);return z}const zp=e=>{const t=document.createElement("div");t.innerHTML=e;const o=t.getElementsByTagName("a");for(let n=0;n<o.length;n++)(o[n].getAttribute("href")||"").match(/^\s*(javascript|data|vbscript):/i)&&o[n].removeAttribute("href"),o[n].setAttribute("target","_blank"),o[n].setAttribute("rel","noopener noreferrer");return t.innerHTML},kA=e=>"preferredUsername"in e,Zo=({actor:e,children:t,disabled:o=!1,side:n="bottom",align:r="start",isCurrentUser:a=!1})=>{const[i,l]=p.useState(!1),z=qo();let u=e?.handle;!u&&e&&kA(e)&&(u=Jo(e));const f=o||!u&&!e,O=z5("index",u||"",{enabled:i&&!!u}),h=O.isFetching||O.isLoading,q=O.error,g=O.data?typeof O.data.followerCount=="number"&&typeof O.data.followingCount=="number"&&O.data.bio!==void 0:!1;if(p.useEffect(()=>{!i||!u||!g&&!h&&!q&&O.refetch({cancelRefetch:!1})},[O,h,q,g,i,u]),f)return b.jsx(b.Fragment,{children:t});const v=O.data||e,y=v?.handle??u??"",k=v?.name??"",C=v?.avatarUrl??(e&&kA(e)?e.icon?.url:null)??null,L=!!v?.followsMe,x=typeof v?.followingCount=="number"?v.followingCount:Number(v?.followingCount)||0,w=typeof v?.followerCount=="number"?v.followerCount:Number(v?.followerCount)||0,P=v?.bio?zp(bu(v.bio,["a"])):void 0,H=()=>{y&&z(`/profile/${y}`)},o0=()=>{y&&z(`/profile/${y}/following`)},Y=()=>{y&&z(`/profile/${y}/followers`)};return b.jsxs(p00,{onOpenChange:l,children:[b.jsx(M00,{asChild:!0,children:t}),b.jsx(dg,{align:r,className:"w-[320px] cursor-default rounded-2xl border-0 p-5 text-left text-gray-900 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] outline-hidden dark:bg-[#101114] dark:shadow-none",side:n,sideOffset:12,onClick:Z=>Z.stopPropagation(),children:b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsxs(Dd,{className:"size-14 cursor-pointer",onClick:H,children:[C&&b.jsx(Id,{alt:k,className:"rounded-full outline outline-[0.5px] outline-offset-[-0.5px] outline-black/10",src:C,onError:Z=>{Z.target.src="",Z.target.style.display="none"}}),b.jsx(Fd,{className:"bg-gray-200 text-sm font-semibold text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:b.jsx(Pd,{className:"size-5 text-gray-500 dark:text-gray-400",strokeWidth:1.5})})]}),!a&&b.jsx(f5,{following:!!v?.followedByMe,handle:y,type:"primary"})]}),b.jsxs("div",{className:"flex cursor-pointer flex-col items-start",onClick:H,children:[b.jsx(Lg,{className:"w-full truncate",children:k}),b.jsxs("div",{className:"flex w-full gap-2",children:[b.jsx("span",{className:"truncate text-gray-700 dark:text-gray-600",children:y}),L&&!a&&b.jsx(LY,{className:"mt-px whitespace-nowrap",variant:"secondary",children:"Follows you"})]})]})]}),b.jsx("div",{className:"flex gap-3 dark:text-gray-300",children:h?b.jsx(j1,{className:"h-4 w-32"}):!q&&b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:o0,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Df(x)})," ","Following"]}),b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:Y,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Df(w)})," ","Followers"]})]})}),h?b.jsx(j1,{className:"h-4 w-48"}):!q&&P?b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(P)},className:"leading-tight dark:text-gray-300 [&_.invisible]:hidden [&_a]:text-[#00a4eb] [&_a:hover]:underline"}):null]})})]})},BW=(e={})=>{const[t,o]=p.useState(!1),n=we();return p.useEffect(()=>{const r=a=>{if(a.target instanceof HTMLInputElement||a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLElement&&a.target.isContentEditable||a.target instanceof HTMLSelectElement||a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;const i=document.querySelector('[role="dialog"][data-state="open"]');if(!(i&&!(e.componentRef?.current?.closest('[role="dialog"]')===i)))switch(a.key.toLowerCase()){case"n":i||(a.preventDefault(),e.onOpenNewNote?e.onOpenNewNote():o(!0));break;case"r":e.isReplyAvailable&&e.onOpenReply&&(n.pathname.includes("/notes/")||n.pathname.includes("/reader/"))&&(a.preventDefault(),e.onOpenReply());break}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,n.pathname]),{isNewNoteModalOpen:t,setIsNewNoteModalOpen:o}},Vi=({actor:e,object:t,likeCount:o,commentCount:n,repostCount:r,layout:a,disabled:i=!1,buttonClassName:l="",onLikeClick:z,onCommentClick:u,onReplyCountChange:f})=>{const[O,h]=p.useState(t.liked),[q,g]=p.useState(t.reposted),[W,v]=p.useState(!1),y=p.useRef(null);BW({isReplyAvailable:!u&&a!=="reply",onOpenReply:()=>v(!0),componentRef:y}),p.useEffect(()=>{h(t.liked),g(t.reposted)},[t.liked,t.reposted]),p.useEffect(()=>{P(r)},[r]);const k=pn0("index"),C=Mn0("index"),L=ln0("index"),x=bn0("index"),[w,P]=p.useState(r),H=async Z=>{Z.stopPropagation(),O?C.mutate(t.id):k.mutate(t.id,{onError(){h(!1)}}),h(!O),z()},o0=Z=>{Z.stopPropagation(),u?u():v(!0)},Y=`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:bg-black dark:hover:bg-gray-950 dark:text-gray-600 ${l}`;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{ref:y,className:`flex ${a!=="inbox"&&"gap-1"}`,children:[b.jsxs(i1,{className:`${Y} ${O&&"text-pink-500 hover:text-pink-500"}`,"data-testid":"like-button",disabled:i,id:"like",title:`${O?"Undo like":"Like"}`,variant:"ghost",onClick:Z=>{Z?.stopPropagation(),Z&&H(Z)},children:[b.jsx(BZ,{className:`${O&&"fill-pink-500 text-pink-500"}`}),a!=="inbox"&&b.jsx(Qf,{className:o===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:o})]}),b.jsxs(i1,{className:`${Y}`,"data-testid":"reply-button",disabled:i,id:"comment",title:"Reply",variant:"ghost",onClick:o0,children:[b.jsx(Sd,{className:"-mr-px"}),a!=="inbox"&&n>0&&F3(n)]}),b.jsxs(i1,{className:`${Y} ${q&&"text-green-500 hover:text-green-500"}`,"data-testid":"repost-button",disabled:i,id:"repost",title:`${q?"Undo repost":"Repost"}`,variant:"ghost",onClick:Z=>{Z?.stopPropagation(),q?(x.mutate(t.id),P(w-1)):(L.mutate(t.id,{onError(){g(!1),P(w-1)}}),P(w+1)),g(!q)},children:[b.jsx(F9,{className:`${q&&"text-green-500"}`}),a!=="inbox"&&b.jsx(Qf,{className:w===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:w})]})]}),W&&b.jsx(h5,{open:W,replyTo:{object:t,actor:e},onOpenChange:Z=>{v(Z)},onReply:()=>{f?.(1),v(!1)},onReplyError:()=>{f?.(-1)}})]})};function Hn0(e){const o=e.replace(/<[^>]*>/g,"").split(/\s+/).filter(r=>r.length>0).length;return`${Math.ceil(o/275)} min read`}const Fo=(e,t,o)=>{o?.stopPropagation(),t(typeof e=="string"?`/profile/${e}`:`/profile/${e.handle||Jo(e)}`)},Un0=e=>{const t=new Date,o=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()),n=o(t),r=o(new Date(t.getTime()-1440*60*1e3)),a=o(e);return a.getTime()===n.getTime()?Vn0(e):a.getTime()===r.getTime()?"Yesterday":Qn0(e)},Vn0=e=>{const o=Math.floor((new Date().getTime()-e.getTime())/1e3);if(o<1)return"Just now";if(o<60)return`${o}s`;const n=Math.floor(o/60);return n<60?`${n}m`:`${Math.floor(n/60)}h`},Qn0=e=>{const t=new Date,o=e.getDate(),n=e.toLocaleString("default",{month:"short"});return e.getFullYear()===t.getFullYear()?`${o} ${n}`:`${o} ${n} ${e.getFullYear()}`};function $n0(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 Qi(e,t=!0){const o=new Date(e?.published??e?.createdAt??new Date),n=$n0(o),r=Un0(o);return t&&!e.url?.includes("/.ghost/activitypub")?b.jsx("a",{className:"whitespace-nowrap text-gray-700 hover:underline",href:e.url,rel:"noreferrer",target:"_blank",title:n,onClick:a=>a.stopPropagation(),children:r}):b.jsx("span",{className:"whitespace-nowrap text-gray-700",children:r})}function A5(e){let t;if(e.image&&(t=e.image),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 ia(e,t,o,n){const r=A5(e);if(!r)return null;const a=z=>u=>{u.stopPropagation(),t&&t(z)},i=z=>{n&&n(z)},l=(z,u=!1)=>{const f=u?"min-h-[200px]":"";return b.jsx("div",{className:`${z} ${f} flex w-full items-center justify-center bg-gray-100 dark:bg-gray-925/30`,children:b.jsx(TZ,{className:"text-gray-400",size:24,strokeWidth:1.5})})};if(Array.isArray(r)){const z=r.length;let u="";return z===1?u="grid-cols-1":z>=2&&z<=4?u="grid-cols-2 auto-rows-[150px]":z>4&&(u="grid-cols-3 auto-rows-[150px]"),b.jsx("div",{className:`attachment-gallery mt-3 grid w-full ${u} gap-2`,children:r.map((f,O)=>{const h=`size-full rounded-md outline outline-1 -outline-offset-1 outline-black/10 ${z===3&&O===0?"row-span-2":""}`;return o&&o.has(f.url)?l(h,z===1):b.jsx("img",{alt:f.name||`Image-${O}`,className:`${h} cursor-pointer object-cover`,referrerPolicy:"no-referrer",src:f.url,onClick:t?a(f.url):void 0,onError:()=>i(f.url)},f.url)})})}switch(r.mediaType){case"image/jpeg":case"image/png":case"image/gif":case"image/webp":return o&&o.has(r.url)?l(`${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,!0):b.jsx("img",{alt:r.name||"Image",className:`cursor-pointer ${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,referrerPolicy:"no-referrer",src:r.url,onClick:t?a(r.url):void 0,onError:()=>i(r.url)});case"video/mp4":case"video/webm":return b.jsx("div",{className:"relative mt-3 mb-4",children:b.jsx("video",{className:"h-[300px] w-full rounded object-cover",src:r.url,controls:!0})});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"relative mt-2 mb-4 w-full",children:b.jsx("audio",{className:"w-full",src:r.url,controls:!0})});default:if(e.image||r.type==="Image"){const z=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 outline-1 -outline-offset-1 outline-black/10";let u;return e.image?typeof e.image=="string"?u=e.image:u=e.image?.url:u=r.url,o&&o.has(u)?l(z,!0):b.jsx("img",{alt:r.name||"Image",className:z,referrerPolicy:"no-referrer",src:u,onClick:t?a(u):void 0,onError:()=>i(u)})}return null}}function Gn0(e,t){const o=A5(e),n="ml-8 md:ml-9 shrink-0 rounded-md h-[91px] w-[121px] relative",r=se("object-cover outline outline-1 -outline-offset-1 outline-black/[0.05]",n);if(t)return b.jsx(j1,{className:`${r} outline-0`});if(!o)return null;if(Array.isArray(o))return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o[0].url});switch(o.mediaType){case"image/jpeg":case"image/png":case"image/gif":return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o.url});case"video/mp4":case"video/webm":return b.jsxs("div",{className:n,children:[b.jsx("video",{className:"h-[80px] w-full rounded object-cover",src:o.url}),b.jsx("div",{className:"absolute inset-0 rounded bg-gray-900 opacity-50"}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsx(nK,{color:"white",fill:"white",size:40})})]});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"ml-8 w-[120px]",children:b.jsx("div",{className:"relative mt-2 mb-4 w-full",children:b.jsx("audio",{className:"w-full",src:o.url,controls:!0})})});default:return e.image?b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:typeof e.image=="string"?e.image:e.image?.url}):null}}const CA=()=>{},NA=b.jsx(F9,{className:"shrink-0 text-gray-700 dark:text-gray-600",size:16,strokeWidth:1.5}),Zn0=({actor:e,allowDelete:t=!1,object:o,parentId:n=void 0,layout:r,type:a,commentCount:i=0,repostCount:l=0,likeCount:z=0,showHeader:u=!0,last:f,isLoading:O,isPending:h=!1,isCompact:q=!1,isChainContinuation:g=!1,isChainParent:W=!1,onClick:v=CA,onDelete:y=CA,showStats:k=!0})=>{const C=new Date(o?.published??new Date).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})+", "+new Date(o?.published??new Date).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit"}),[,L]=p.useState(!1),[x,w]=p.useState(new Set),P=p.useRef(null),[H,o0]=p.useState(!1),Y=fn0("index"),Z=qo(),n0=b5("index",()=>{Te.success(`Followed ${X?.name}`)},()=>{Te.error("Failed to follow")}),J=l5("index",()=>{Te.info(`Unfollowed ${X?.name}`)},()=>{Te.error("Failed to unfollow")});p.useEffect(()=>{const $0=P.current;$0&&o0($0.scrollHeight>$0.clientHeight)},[o?.content]),p.useEffect(()=>{const $0=P.current;if(!$0)return;const h1=B=>{const r0=B.target.closest("a[data-profile]");if(r0){const A0=r0.getAttribute("data-profile")?.trim();/^@([\w.-]+)@([\w-]+\.[\w.-]+[a-zA-Z])$/.test(A0||"")&&A0&&(B.preventDefault(),B.stopPropagation(),Fo(A0,Z))}};return $0.addEventListener("click",h1),()=>{$0.removeEventListener("click",h1)}},[Z,o?.content]);const i0=()=>{},L0=()=>{h||v()},K=()=>{Y.mutate({id:o.id,parentId:n}),y()},m0=async()=>{o?.url&&(await navigator.clipboard.writeText(o.url),L(!0),Te.success("Link copied"),setTimeout(()=>L(!1),2e3))},$=$0=>{w(h1=>new Set(h1).add($0))};let X=e;a==="Announce"&&(X=typeof o.attributedTo=="object"?o.attributedTo:e);const G=X?Jo(X):null,N=X?.followedByMe||!1,I=a==="Announce"?typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&"authored"in o.attributedTo?o.attributedTo.authored:typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&typeof e=="object"&&e&&o.attributedTo.id===e.id:o.authored,c0=a==="Announce"?o.reposted??!1:o.authored,h0=()=>{G&&n0.mutate(G)},d0=()=>{G&&J.mutate(G)},v0=b.jsx(i1,{className:`relative z-10 size-[34px] rounded-md ${r==="inbox"||r==="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:bg-black dark:hover:bg-gray-950 [&_svg]:size-5`,"data-testid":"menu-button",variant:"ghost",children:b.jsx(X9,{})}),{lightboxState:u0,openLightbox:e0,closeLightbox:S0,navigateToIndex:T0}=qn0(o);return r==="feed"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative -mx-4 ${h?"pointer-events-none":"cursor-pointer"} rounded-lg p-6 px-4 pb-[18px]`,"data-layout":"feed","data-object-id":o.id,onClick:L0,children:[a==="Announce"&&b.jsxs("div",{className:"z-10 mb-2 flex items-center gap-1.5 text-gray-700 dark:text-gray-600",children:[NA,b.jsxs("div",{className:"flex min-w-0 items-center gap-1 text-sm",children:[b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"break-anywhere truncate hover:underline",onClick:$0=>{Fo(e,Z,$0)},children:e.name})}),"reposted"]})]}),b.jsxs("div",{className:"flex flex-col gap-2.5","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:$0=>{h||Fo(X,Z,$0)},children:[b.jsx("span",{className:`break-anywhere min-w-0 truncate font-semibold ${q?"text-lg":"text-md"} ${h?"":"hover-underline"} dark:text-white`,"data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-24"}):X.name}),b.jsxs("div",{className:"flex w-full text-md text-gray-700 dark:text-gray-600",children:[b.jsx("span",{className:`truncate ${h?"":"hover-underline"}`,children:O?b.jsx(j1,{className:"w-56"}):Jo(X)}),b.jsx("div",{className:`ml-1 before:mr-1 ${!O&&'before:content-["·"]'}`,title:`${C}`,children:O?b.jsx(j1,{className:"w-4"}):Qi(o,h===!1&&!o.authored)})]})]})]})}),b.jsx(Fb,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"feed",trigger:v0,onCopyLink:m0,onDelete:K,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"",children:o.type==="Article"?b.jsxs("div",{className:"rounded-md border border-gray-150 transition-colors hover:bg-gray-75 dark:border-gray-950 dark:hover:bg-gray-950",children:[ia(o,L0,x,$),b.jsxs("div",{className:"p-5",children:[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:o.name}),b.jsx("div",{className:"break-anywhere line-clamp-3 leading-[1.4em]",children:o.preview?.content})]})]}):b.jsxs("div",{className:"relative",children:[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:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(zp(o.content||"")??"")},ref:P,onClick:$0=>{const h1=$0.target;(h1.tagName==="A"||h1.closest("a"))&&$0.stopPropagation()}})}),H&&b.jsx("button",{className:"mt-1 text-blue-600",type:"button",children:"Show more"}),ia(o,e0,x,$)]})}),b.jsx("div",{className:"space-between relative z-[30] mt-1 ml-[-8px] flex",children:O?b.jsx(j1,{className:"ml-2 w-18"}):k&&b.jsx(Vi,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]})]}),b.jsx(Hb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="modal"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{"data-object-id":o.id,children:[b.jsxs("div",{className:"group/article relative","data-layout":"modal",onClick:L0,children:[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:[u&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"relative z-10 pt-[3px]",children:b.jsx(en,{author:X,showFollowButton:!I&&!N})}),b.jsxs("div",{className:"relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]",onClick:$0=>{h||Fo(X,Z,$0)},children:[b.jsxs("div",{className:"flex w-full",children:[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:X.name}),b.jsx("div",{children:Qi(o,!o.authored)})]}),b.jsx("div",{className:"flex w-full",children:b.jsx("span",{className:"min-w-0 truncate text-gray-700 dark:text-gray-600",children:Jo(X)})})]})]}),b.jsx("div",{className:"relative z-10 col-start-1 col-end-3 w-full gap-4",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.name&&b.jsx(V2,{className:"break-anywhere mb-1 leading-tight","data-test-activity-heading":!0,children:o.name}),b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(zp(o.content||"")??"")},ref:P,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"}),ia(o,e0,x,$),b.jsx("div",{className:"space-between mt-3 ml-[-8px] flex",children:k&&b.jsx(Vi,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),b.jsx("div",{className:"absolute -inset-x-3 -inset-y-0 z-0 rounded transition-colors max-lg:hidden"})]}),b.jsx("div",{className:"mt-3 h-px bg-gray-200 dark:bg-gray-950"})]}),b.jsx(Hb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="reply"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative ${q?"pb-6":g?"pb-5":"py-5"} ${h?"pointer-events-none":"cursor-pointer"}`,"data-layout":"reply","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"flex flex-col gap-2.5 border-b-gray-200","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:$0=>{h||Fo(X,Z,$0)},children:[b.jsxs("div",{className:"flex",children:[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:X.name}),b.jsx("div",{children:Qi(o,h===!1&&!o.authored)})]}),b.jsx("div",{className:"flex",children:b.jsx("span",{className:"truncate text-gray-700",children:Jo(X)})})]})]})}),!q&&b.jsx(Fb,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"reply",trigger:v0,onCopyLink:m0,onDelete:K,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative z-10 col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.type==="Article"&&ia(o,L0,x,$),o.name&&b.jsx(V2,{className:"break-anywhere mt-2.5 leading-tight text-pretty","data-test-activity-heading":!0,children:o.name}),o.preview&&o.type==="Article"?b.jsx("div",{className:"mt-1 line-clamp-3 leading-tight",children:o.preview.content}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(zp(o.content||"")??"")},ref:P,className:"ap-note-content break-anywhere tracking-[-0.006em] text-pretty text-gray-900 dark:text-gray-300 [&_p+p]:mt-3"}),o.type==="Note"&&ia(o,e0,x,$),o.type==="Article"&&b.jsx(i1,{className:"mt-3 w-full",id:"read-more",variant:"secondary",children:"Read more"}),!q&&b.jsx("div",{className:"space-between mt-2 ml-[-8px] flex",children:k&&b.jsx(Vi,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),!f&&b.jsx("div",{className:`absolute left-[19px] ${q?"top-[51px] bottom-[8px]":g?"top-[51px] bottom-[5px]":W?"top-[71px] bottom-[5px]":"top-[71px] bottom-[-7px]"} z-0 w-[2px] rounded-sm bg-gray-200 dark:bg-gray-950`})]}),b.jsx(Hb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="inbox"?b.jsx(b.Fragment,{children:o&&b.jsxs("div",{className:"group/article 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-75 dark:hover:bg-gray-950/50","data-layout":"inbox","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"w-full min-w-0",children:[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:O?b.jsx(j1,{className:"w-24"}):b.jsxs(b.Fragment,{children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(en,{author:X,size:"2xs"}),b.jsx("span",{className:"break-anywhere min-w-0 font-semibold text-gray-900 hover:underline dark:text-gray-600","data-test-activity-heading":!0,onClick:$0=>{Fo(X,Z,$0)},children:X.name})]})}),a==="Announce"&&b.jsxs("span",{className:"z-10 flex items-center gap-1 text-gray-700 dark:text-gray-600",children:[NA,b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"line-clamp-1 hover:underline",onClick:$0=>{Fo(e,Z,$0)},children:e.name})})," reposted"]}),b.jsx("span",{className:'shrink-0 whitespace-nowrap text-gray-600 before:mr-1 before:content-["·"]',title:`${C}`,children:Qi(o,!o.authored)})]})}),b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex min-h-[73px] w-full min-w-0 flex-col items-start justify-start gap-1",children:[b.jsx(V2,{className:"break-anywhere line-clamp-2 w-full max-w-[600px] leading-tight text-pretty","data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-full max-w-96"}):o.name?o.name:b.jsx("span",{dangerouslySetInnerHTML:{__html:Cr(bu(o.content||""))}})}),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:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(bu(o.preview?.content??o.content??""))}})}),b.jsx("span",{className:"mt-1 shrink-0 text-sm leading-none whitespace-nowrap text-gray-600",children:O?b.jsx(j1,{className:"w-16"}):o.content&&`${Hn0(o.content)}`})]}),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:[k&&b.jsx(Vi,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0}),b.jsx(Fb,{allowDelete:t,authoredByMe:I,followedByMe:N,layout:"inbox",trigger:v0,onCopyLink:m0,onDelete:K,onFollow:h0,onUnfollow:d0})]})]})]}),Gn0(o,O)]})}):b.jsx(b.Fragment,{})},_A=5*1024*1024,EA="Image must be less than 5MB in size.",ja0=async e=>{try{const t=await fetch(e,{mode:"cors"});if(!t.ok)throw new Error(`Failed to fetch image: ${t.status}`);const o=await t.blob();return new Promise((n,r)=>{const a=new FileReader;a.onload=()=>n(a.result),a.onerror=r,a.readAsDataURL(o)})}catch{return e}},Xa0=e=>new Promise(t=>{const o=new Image;o.onload=()=>{URL.revokeObjectURL(o.src),t(o.width===o.height)},o.src=URL.createObjectURL(e)}),Da0="Image must be square.",h5=({children:e,replyTo:t,onReply:o,onReplyError:n,onOpenChange:r,...a})=>{const{data:i}=zn0("index"),l=On0("index",i),z=dn0("index",i),{data:u,isLoading:f}=z5("index","me"),[O,h]=p.useState(!1),q=p.useRef(null),g=p.useRef(null),[W,v]=p.useState(null),[y,k]=p.useState(!1),C=p.useRef(null),[L,x]=p.useState(""),[w,P]=p.useState(null),[H,o0]=p.useState(""),[Y,Z]=p.useState(!1),[n0,J]=p.useState(!1),[i0,L0]=p.useState(!1),K=qo(),m0=500;p.useEffect(()=>{a.open!==void 0&&h(a.open)},[a.open]),p.useEffect(()=>{if(a.open!==void 0?a.open:O){const S0=setTimeout(()=>{L0(!0)},300);return()=>clearTimeout(S0)}else L0(!1)},[O,a.open]);const $=!L.trim()||!i||n0||L.length>m0,X=p.useCallback(async()=>{const e0=L.trim();if(!(!e0||!i))try{J(!0),t?(await z.mutateAsync({inReplyTo:t.object.id,content:e0,imageUrl:w||void 0,altText:H||void 0}),o?.()):(await l.mutateAsync({content:e0,imageUrl:w||void 0,altText:H||void 0}),K("/notes")),h(!1),r&&r(!1),Te.success(t?"Reply posted":"Note posted")}catch{t&&n?.()}finally{J(!1)}},[L,i,t,z,l,w,H,o,n,h,K,r]),G=e0=>{x(e0.target.value)};p.useEffect(()=>{q.current&&(q.current.style.height="auto",q.current.style.height=`${q.current.scrollHeight}px`)},[L]),p.useEffect(()=>{if((a.open!==void 0?a.open:O)&&q.current){const S0=setTimeout(()=>{q.current?.focus()},100);return()=>clearTimeout(S0)}},[O,a.open]),p.useEffect(()=>{if(Y&&g.current){const e0=setTimeout(()=>{g.current?.focus()},100);return()=>clearTimeout(e0)}},[Y]),p.useEffect(()=>{const e0=T0=>{(T0.metaKey||T0.ctrlKey)&&T0.key==="Enter"&&(T0.preventDefault(),!$&&!y&&X())};if(a.open!==void 0?a.open:O)return document.addEventListener("keydown",e0),()=>document.removeEventListener("keydown",e0)},[O,a.open,$,y,X]);const N=p.useCallback(async e0=>{const S0=e0.clipboardData?.items;if(S0)for(let T0=0;T0<S0.length;T0++){const $0=S0[T0];if($0.type.indexOf("image")!==-1){e0.preventDefault();const h1=$0.getAsFile();if(h1){if(h1.size>_A){Te.error(EA);return}const B=URL.createObjectURL(h1);v(B),await I(h1)}break}}},[]);p.useEffect(()=>{if(a.open!==void 0?a.open:O)return document.addEventListener("paste",N),()=>document.removeEventListener("paste",N)},[O,a.open,N]);const I=async e0=>{try{k(!0);const S0=await An0(e0);P(S0)}catch(S0){v(null);let T0="Failed to upload image. Try again.";if(S0&&typeof S0=="object"&&"statusCode"in S0)switch(S0.statusCode){case 413:T0="Image size exceeds limit.";break;case 415:T0="The file type is not supported.";break}Te.error(T0)}finally{k(!1)}},c0=async e0=>{const S0=e0.target.files;if(S0&&S0.length>0){const T0=S0[0];if(T0.size>_A){Te.error(EA),e0.target.value="";return}const $0=URL.createObjectURL(T0);v($0),await I(T0)}},h0=e0=>{e0.stopPropagation(),v(null),P(null),o0(""),Z(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")},d0=e0=>{e0.stopPropagation(),Z(!Y)},v0=()=>{q.current?.focus()};p.useEffect(()=>()=>{W&&URL.revokeObjectURL(W)},[W]);let u0="What's new?";if(t){const e0=t.object.attributedTo||{};typeof e0=="object"&&"preferredUsername"in e0&&"id"in e0&&(u0=`Reply to ${Jo(e0)}...`)}return b.jsxs(rs,{open:a.open!==void 0?a.open:O,onOpenChange:e0=>{e0&&(x(""),v(null),P(null),o0(""),Z(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")),h(e0),r&&r(e0)},...a.open!==void 0?{}:a,children:[b.jsx(rm,{asChild:!0,children:e}),b.jsxs(Mc,{className:"max-h-[80vh] min-h-[240px] gap-0 overflow-y-auto pb-0","data-testid":"new-note-modal",onClick:e0=>e0.stopPropagation(),children:[b.jsxs(Q3,{className:"hidden",children:[b.jsx(G3,{children:t?"Reply":"New note"}),b.jsx(am,{children:"Post your thoughts to the Social web"})]}),t&&b.jsx(Zn0,{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:()=>{}}),b.jsxs("div",{className:`flex ${W?"":"min-h-36"} cursor-text items-start gap-3`,onClick:v0,children:[b.jsx("div",{className:"sticky top-0",children:b.jsx(en,{author:i})}),b.jsx(KP,{asChild:!0,children:b.jsxs("div",{className:"-mt-0.5 flex w-full flex-col gap-0.5",children:[f?b.jsx(j1,{className:"w-10"}):b.jsx("span",{className:"break-anywhere min-w-0 truncate font-semibold whitespace-nowrap text-black dark:text-white",children:u?.name}),b.jsx(j6,{name:"content",asChild:!0,children:b.jsx(X6,{asChild:!0,children:b.jsx("textarea",{ref:q,autoFocus:!0,className:"ap-textarea break-anywhere w-full resize-none bg-transparent text-[1.5rem]","data-testid":"note-textarea",placeholder:u0,rows:1,value:L,onChange:G,onPaste:N})})}),b.jsx(j6,{name:"image",asChild:!0,children:b.jsx(X6,{asChild:!0,children:b.jsx("input",{ref:C,accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",type:"file",onChange:c0})})})]})})]}),W&&b.jsxs("div",{className:"group relative mt-6 flex min-h-[200px] w-full items-center justify-center",children:[b.jsx("img",{alt:"Image attachment preview",className:`max-h-[320px] w-full rounded-sm object-cover outline outline-1 -outline-offset-1 outline-black/10 ${y&&"opacity-10"}`,src:W}),y&&b.jsx("div",{className:"absolute leading-[0]",children:b.jsx(Hp,{size:"md"})}),b.jsx(i1,{className:"absolute top-3 right-3 size-8 bg-black/60 text-white opacity-0 group-hover:opacity-100 hover:bg-black/80",onClick:h0,children:b.jsx(V9,{})}),!y&&b.jsx(i1,{className:`absolute bottom-3 left-3 h-6 px-2 py-0 text-white ${Y?"bg-green-500 hover:bg-green-500":"bg-black/60 hover:bg-black/80"}`,onClick:d0,children:"Alt"})]}),W&&!y&&Y&&b.jsx("div",{className:"mt-1",children:b.jsx(oM,{ref:g,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-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Type alt text for image (optional)",type:"text",value:H,onChange:e0=>o0(e0.target.value)})}),b.jsxs($3,{className:`${i0?"sticky":"static"} bottom-0 flex-row bg-background py-6 dark:bg-[#101114]`,children:[b.jsx(i1,{className:"mr-auto w-[34px] min-w-0!",variant:"outline",onClick:()=>C.current?.click(),children:b.jsx(jZ,{})}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs("div",{className:`text-sm ${L.length>=m0?"text-red-500":L.length>=m0*.9?"text-yellow-600":"text-gray-500"}`,children:[L.length,"/",m0]}),b.jsx(i1,{className:"min-w-16","data-testid":"post-button",disabled:$||y,onClick:X,children:n0?b.jsx(Hp,{color:"light",size:"sm"}):"Post"})]})]})]})]})};function zu(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}function Kn0(e,t){const o=zu(e);return JSON.stringify({...o,...t})}const SW=()=>{const{data:e}=ye(),{mutateAsync:t}=Sg(),o=M0.useMemo(()=>e?.accessibility?zu(e.accessibility).apOnboarding||{}:{},[e?.accessibility]),n=M0.useCallback(async r=>{if(!e)return;const a=zu(e.accessibility),i=Kn0(e.accessibility,{apOnboarding:{...a.apOnboarding,...r}});await t({...e,accessibility:i})},[e,t]);return{isOnboarded:!!o.welcomeStepsFinished,isExplainerClosed:!!o.exploreExplainerClosed,setOnboarded:r=>n({welcomeStepsFinished:r}),setExplainerClosed:r=>n({exploreExplainerClosed:r})}},TW=()=>b.jsx("div",{className:"h-full pt-14",children:b.jsx(Bn,{})}),Yn0=Object.freeze(Object.defineProperty({__proto__:null,default:TW,useOnboardingStatus:SW},Symbol.toStringTag,{value:"Module"})),Jn0=()=>{const e=qo();function t(){e(`/notes/${encodeURIComponent("https://activitypub.ghost.org/.ghost/activitypub/note/6d6d7f57-b656-4caa-ba9e-efa1d9a4b3fb")}`)}return b.jsxs("div",{className:"z-20 w-full bg-white dark:bg-black",children:[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-black",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx($Z,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Beta feedback"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Something not working? Let us know"}),b.jsx(i1,{className:"mt-2 dark:bg-gray-925/70 dark:hover:bg-gray-900",variant:"secondary",onClick:t,children:"Send feedback"})]}),b.jsxs("div",{className:"-mb-1 ml-3 flex items-center gap-1.5 pt-4 pb-2 text-xs text-gray-400",children:[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"}),"⋅",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"})]})]})},Yp=({children:e,url:t=null,onClick:o,"data-testid":n,isSelected:r=!1})=>{const a=M0.Children.toArray(e),i=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 ${r?"z-10 before:opacity-100":"before:opacity-0"}`,"data-testid":n,onClick:()=>{!t&&o&&o()},children: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?b.jsx("a",{href:t,rel:"noreferrer",target:"_blank",onClick:l=>{o&&(l.preventDefault(),o())},children:i}):i},er0=()=>{const e=qo(),{suggestedProfilesQuery:t}=u5("index",3),{data:o,isLoading:n}=t,r=n?Array(3).fill(null):o||[],{resetStack:a}=w3(),i="[@media(max-height:740px)]:hidden";return!n&&(!o||o.length===0)?null:b.jsxs("div",{className:`border-t border-gray-200 px-3 pt-6 dark:border-gray-950 ${i}`,children:[b.jsxs("div",{className:"mb-3 flex flex-col gap-0.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(jp,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Follow suggestions"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Accounts you might be interested in"})]}),b.jsx("ul",{className:"grow",children:r.map((l,z)=>{const u=l?.id||`loading-${z}`,f=l?.name||"",O=l?.handle||"",h=l?.avatarUrl||"";let q;switch(z){case 0:q="[@media(max-height:740px)]:hidden";break;case 1:q="[@media(max-height:800px)]:hidden";break;case 2:q="[@media(max-height:860px)]:hidden";break}return b.jsx(p.Fragment,{children:b.jsx("li",{className:q,children:b.jsx(Zo,{actor:l,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Yp,{onClick:()=>{!n&&l&&Fo(l,e)},children:[n?b.jsx(j1,{className:"z-10 size-10"}):b.jsx(en,{author:{icon:{url:h},name:f,handle:O},showFollowButton:!0}),b.jsxs("div",{className:"flex min-w-0 flex-col",children:[b.jsx("span",{className:"block max-w-[190px] truncate font-semibold text-black dark:text-white",children:n?b.jsx(j1,{className:"w-24"}):f}),b.jsx("span",{className:"block max-w-[190px] truncate text-sm text-gray-700 dark:text-gray-600",children:n?b.jsx(j1,{className:"w-40"}):O})]})]})})})},u)},u)})}),b.jsx(i1,{className:"p-0 font-medium text-purple hover:text-black dark:hover:text-white",variant:"link",onClick:()=>{a(),e("/explore")},children:"Find more →"})]})},tr0=({profile:e,update:t,isLoading:o,onOpenChange:n})=>{const r=()=>{t(e.id,{followedByMe:!0})},a=()=>{t(e.id,{followedByMe:!1})},i=qo();return b.jsx(Zo,{actor:e,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Yp,{onClick:()=>{n?.(!1),i(`/profile/${e.handle}`)},children:[b.jsx(en,{author:{icon:{url:e.avatarUrl},name:e.name,handle:e.handle},onClick:()=>n?.(!1)}),b.jsxs("div",{className:"break-anywhere flex grow flex-col",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:o?b.jsx(j1,{className:"w-full max-w-64"}):e.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:o?b.jsx(j1,{className:"w-24"}):e.handle})]}),o?b.jsx("div",{className:"inline-flex items-center",children:b.jsx(j1,{className:"w-12"})}):b.jsx(f5,{className:"ml-auto",following:e.followedByMe,handle:e.handle,type:"secondary",onFollow:r,onUnfollow:a})]},e.id)})})},or0=({onOpenChange:e})=>{const{suggestedProfilesQuery:t,updateSuggestedProfile:o}=u5("index",5),{data:n=[],isLoading:r}=t;return!r&&(!n||n.length===0)?null:b.jsx("div",{className:"mb-[-15px] flex flex-col gap-3 pt-2",children:b.jsx("div",{className:"flex flex-col",children:(r?Array(5).fill(null):n||[]).map((a,i)=>b.jsx(M0.Fragment,{children:b.jsx(tr0,{isLoading:r,profile:a||{id:"",name:"",handle:"",avatarUrl:"",bio:"",followerCount:0,followingCount:0,followedByMe:!1},update:o,onOpenChange:e})},a?.id||`loading-${i}`))})})};function nr0(e,t,o,n){var r=this,a=p.useRef(null),i=p.useRef(0),l=p.useRef(0),z=p.useRef(null),u=p.useRef([]),f=p.useRef(),O=p.useRef(),h=p.useRef(e),q=p.useRef(!0);h.current=e;var g=typeof window<"u",W=!t&&t!==0&&g;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(o=o||{}).leading,y=!("trailing"in o)||!!o.trailing,k="maxWait"in o,C="debounceOnServer"in o&&!!o.debounceOnServer,L=k?Math.max(+o.maxWait||0,t):null;p.useEffect(function(){return q.current=!0,function(){q.current=!1}},[]);var x=p.useMemo(function(){var w=function(J){var i0=u.current,L0=f.current;return u.current=f.current=null,i.current=J,l.current=l.current||J,O.current=h.current.apply(L0,i0)},P=function(J,i0){W&&cancelAnimationFrame(z.current),z.current=W?requestAnimationFrame(J):setTimeout(J,i0)},H=function(J){if(!q.current)return!1;var i0=J-a.current;return!a.current||i0>=t||i0<0||k&&J-i.current>=L},o0=function(J){return z.current=null,y&&u.current?w(J):(u.current=f.current=null,O.current)},Y=function J(){var i0=Date.now();if(v&&l.current===i.current&&Z(),H(i0))return o0(i0);if(q.current){var L0=t-(i0-a.current),K=k?Math.min(L0,L-(i0-i.current)):L0;P(J,K)}},Z=function(){n&&n({})},n0=function(){if(g||C){var J=Date.now(),i0=H(J);if(u.current=[].slice.call(arguments),f.current=r,a.current=J,i0){if(!z.current&&q.current)return i.current=a.current,P(Y,t),v?w(a.current):O.current;if(k)return P(Y,t),w(a.current)}return z.current||P(Y,t),O.current}};return n0.cancel=function(){var J=z.current;J&&(W?cancelAnimationFrame(z.current):clearTimeout(z.current)),i.current=0,u.current=a.current=f.current=z.current=null,J&&n&&n({})},n0.isPending=function(){return!!z.current},n0.flush=function(){return z.current?o0(Date.now()):O.current},n0},[v,k,t,L,y,W,g,C,n]);return x}function rr0(e,t){return e===t}function cr0(e,t,o){var n=rr0,r=p.useRef(e),a=p.useState({})[1],i=nr0(p.useCallback(function(z){r.current=z,a({})},[a]),t,o,a),l=p.useRef(e);return n(l.current,e)||(i(e),l.current=e),[r.current,i]}const $i=80,ar0=({onOpenChange:e,query:t,setQuery:o})=>{const n=p.useRef(null),r=p.useRef([]),a=p.useRef(0),i=qo(),[l]=cr0(t,300),z=t.length>=2,{searchQuery:u,updateAccountSearchResult:f}=un0("index",z?l:""),{data:O,isFetching:h,isFetched:q}=u,{suggestedProfilesQuery:g}=u5("index",5),{data:W,isLoading:v}=g,y=v||W&&W.length>0,{topicsQuery:k}=d5(),{data:C}=k,L=z5("index","me"),{data:x}=L,[w,P]=p.useState([]),[H,o0]=p.useState(null),[Y,Z]=p.useState(0),n0=p.useMemo(()=>{const X=C?.topics||[];if(!z||X.length===0)return[];const G=t.toLowerCase();return X.filter(N=>N.slug==="following"?!1:N.name.toLowerCase().startsWith(G)||N.slug.toLowerCase().startsWith(G))},[t,z,C?.topics]),J=p.useMemo(()=>[...n0.map(X=>({type:"topic",data:X})),...w.map(X=>({type:"account",data:X}))],[n0,w]);p.useEffect(()=>{if(!z){P([]),o0(null);return}q&&(O?.accounts&&O.accounts.length>0?(P(O.accounts),o0("results"),Z(0)):(P([]),o0("none"),Z(0)))},[O?.accounts,q,z]);const i0=h&&z,L0=t.length<2||!H&&z&&n0.length===0,K=!L0&&H==="none"&&n0.length===0,m0=!L0&&(w.length>0||n0.length>0);p.useEffect(()=>{n.current?.focus()},[]),p.useEffect(()=>{const X=r.current[Y];if(!X)return;const G=X.closest("[data-radix-scroll-area-viewport]")||X.closest(".overflow-y-auto");if(!G){X.scrollIntoView({block:"nearest"});return}const N=G.getBoundingClientRect(),I=X.getBoundingClientRect();I.top<N.top+$i?G.scrollTo({top:G.scrollTop-(N.top+$i-I.top),behavior:"smooth"}):I.bottom>N.bottom-$i&&G.scrollTo({top:G.scrollTop+(I.bottom-N.bottom+$i),behavior:"smooth"})},[Y]);const $=X=>{if(!(!m0||J.length===0)){if(X.key==="ArrowDown"||X.key==="ArrowUp"){X.preventDefault();const G=Date.now();if(G-a.current<50)return;a.current=G,X.key==="ArrowDown"?Z(N=>(N+1)%J.length):Z(N=>(N-1+J.length)%J.length)}else if(X.key==="Enter"){const G=J[Y];if(!G)return;X.preventDefault(),e?.(!1),G.type==="topic"?i(`/explore/${G.data.slug}`):i(`/profile/${G.data.handle}`)}}};return b.jsxs(b.Fragment,{children:[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-150 before:content-[""] dark:bg-[#101114] dark:before:border-b-gray-950',children:[b.jsx(Td,{className:"text-gray-600",size:18,strokeWidth:1.5}),b.jsx(oM,{ref:n,autoComplete:"off",className:"flex h-10 w-full items-center rounded-lg border-0 bg-transparent px-0 py-1.5 text-lg focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Search by name, handle, or URL...",title:"Search",type:"text",value:t,onChange:X=>o(X.target.value),onKeyDown:$}),i0&&b.jsx(Hp,{className:"absolute! right-0 mr-0.5 shrink-0",size:"sm"})]}),b.jsxs("div",{className:"h-full",children:[K&&b.jsx("div",{className:"flex h-full items-center justify-center pb-14",children:b.jsxs(u00,{children:[b.jsx(d00,{children:b.jsx(Pd,{})}),"No users matching this handle or account URL"]})}),m0&&b.jsx("div",{className:"mt-[-14px] pb-2",children:J.map((X,G)=>{const N=G===Y;if(X.type==="topic")return b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Yp,{isSelected:N,onClick:()=>{e?.(!1),i(`/explore/${X.data.slug}`)},children:[b.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-900",children:b.jsx(jp,{className:"text-gray-700 dark:text-gray-500",size:18,strokeWidth:1.5})}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{className:"font-semibold text-black dark:text-white",children:X.data.name}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Topic"})]})]})},X.data.slug);const I=X.data,c0=I.handle===x?.handle;return b.jsx(Zo,{actor:I,align:"center",isCurrentUser:c0,side:"left",children:b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Yp,{isSelected:N,onClick:()=>{e?.(!1),i(`/profile/${I.handle}`)},children:[b.jsx(en,{author:{icon:{url:I.avatarUrl},name:I.name,handle:I.handle}}),b.jsxs("div",{className:"break-anywhere flex flex-col",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:I.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:I.handle})]}),I.blockedByMe||I.domainBlockedByMe?b.jsx(i1,{className:"pointer-events-none ml-auto min-w-[90px]",variant:"destructive",children:"Blocked"}):c0?null:b.jsx(f5,{className:"ml-auto",following:I.followedByMe,handle:I.handle,type:"secondary",onFollow:()=>f(I.id,{followedByMe:!0}),onUnfollow:()=>f(I.id,{followedByMe:!1})})]})})},I.id)})}),L0&&y&&b.jsxs(b.Fragment,{children:[b.jsx(V2,{children:"More people to follow"}),b.jsx(or0,{onOpenChange:e})]})]})]})},sr0=()=>b.jsxs("div",{className:"inline-flex h-9 w-full items-center justify-start gap-2 rounded-full bg-gray-100 px-3 text-md font-normal text-gray-600 hover:bg-gray-200 hover:text-gray-600 dark:bg-gray-925/70 dark:text-gray-700 dark:hover:bg-gray-925 [&_svg]:size-[18px]",children:[b.jsx(Td,{size:18,strokeWidth:1.5})," Search the social web"]}),xn=p.forwardRef(({to:e,children:t,count:o,...n},r)=>{const a=we(),{resetStack:i}=w3(),l=hM(),z=e&&e.startsWith("/")?`${l}${e}`:e,u=z&&(a.pathname===z||a.pathname.startsWith(`${z}/`)),f=R0("justify-start text-md font-medium text-gray-800 dark:hover:bg-gray-925/70 dark:text-gray-500 h-9 [&_svg]:size-[18px]",u&&"bg-gray-100 dark:bg-gray-925/70 dark:text-white text-black font-semibold"),O=o&&o>0?b.jsx("span",{className:R0("ml-auto bg-purple-500 text-white text-xs font-semibold py-1 px-1.5 rounded-full min-w-[20px] h-5 flex items-center justify-center"),children:F3(o)}):null;return z?b.jsx(i1,{className:f,variant:"ghost",asChild:!0,children:b.jsxs(Za,{to:z,onClick:()=>{i(),I00(z)},children:[t,O]})}):b.jsxs(i1,{ref:r,className:f,variant:"ghost",onClick:n.onClick,...n,children:[t,O]})});xn.displayName="SidebarMenuLink";const PW=({isMobileSidebarOpen:e})=>{const{allFlags:t,flags:o}=tn0(),[n,r]=p.useState(!1),[a,i]=p.useState(""),{data:l}=ye(),z=we(),u=hM(),{data:f}=kW(l?.slug||""),O=hn0(l?.slug||""),{topicsQuery:h}=d5(),{data:q,isLoading:g}=h,W=!g&&q&&q.topics.length===0;p.useEffect(()=>{z.pathname===`${u}/notifications`&&f&&f>0&&O.mutate()},[z.pathname,u,f,O]);const v=p.useCallback(()=>{f&&f>0&&O.mutate()},[f,O]);return b.jsx("div",{className:`sticky top-0 flex min-h-screen w-[320px] flex-col border-l border-gray-200 pr-8 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:b.jsxs("div",{className:"flex grow flex-col justify-between",children:[b.jsxs("div",{className:"isolate flex w-full flex-col items-start gap-6 pt-6 pl-6",children:[b.jsx("div",{className:"flex h-[52px] w-full items-center",children:b.jsxs(rs,{open:n,onOpenChange:r,children:[b.jsx(rm,{className:"mt-0.5 w-full",children:b.jsx(sr0,{})}),b.jsx(Mc,{className:"flex h-full max-h-[452px] flex-col overflow-y-auto pb-0",children:b.jsx(ar0,{query:a,setQuery:i,onOpenChange:r})})]})}),b.jsxs("div",{className:"flex w-full flex-col gap-px",children:[b.jsxs(xn,{to:"/reader",children:[b.jsx(aZ,{size:18,strokeWidth:1.5}),"Reader"]}),b.jsxs(xn,{to:"/notes",children:[b.jsx(Sd,{size:18,strokeWidth:1.5}),"Notes"]}),b.jsxs(xn,{count:z.pathname!==`${u}/notifications`?f:void 0,to:"/notifications",onClick:v,children:[b.jsx(rZ,{size:18,strokeWidth:1.5}),"Notifications"]}),W?b.jsx(i1,{className:"inline-flex w-full items-center gap-2 rounded-sm px-3 py-2.5 text-left text-md font-medium text-gray-800 transition-colors hover:bg-gray-100 dark:text-gray-500 dark:hover:bg-gray-925/70",variant:"ghost",asChild:!0,children:b.jsxs("a",{href:"https://explore.ghost.org/social-web",rel:"noopener noreferrer",target:"_blank",children:[b.jsx(jp,{size:18,strokeWidth:1.5}),"Explore",b.jsx(Bd,{className:"ml-auto",size:14,strokeWidth:1.5})]})}):b.jsxs(xn,{to:"/explore",children:[b.jsx(jp,{size:18,strokeWidth:1.5}),"Explore"]}),b.jsxs(xn,{to:"/profile",children:[b.jsx(jd,{size:18,strokeWidth:1.5}),"Profile"]}),b.jsxs(xn,{to:"/preferences",children:[b.jsx(MK,{size:18,strokeWidth:1.5}),"Preferences"]})]}),b.jsx(h5,{children:b.jsxs(i1,{className:"h-9 rounded-full bg-purple-500 px-3 text-md text-white hover:bg-purple-600 dark:hover:bg-purple-600",children:[b.jsx(LZ,{}),"New note"]})}),b.jsx(er0,{}),t.map(y=>o[y]?b.jsxs("div",{className:"flex items-center justify-between gap-1 pl-3 opacity-50",children:[b.jsx("span",{className:"font-mono text-xs",children:y}),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"})]},y):b.jsx(b.Fragment,{}))]}),b.jsx("div",{className:"sticky bottom-0 flex items-center gap-2 bg-white pb-4 pl-4 dark:bg-black",children:b.jsx(Jn0,{})})]})})};PW.displayName="Sidebar";const ir0=({children:e,...t})=>{const{isOnboarded:o}=SW(),n=hM(),{data:r,isLoading:a}=ye(),i=p.useRef(null),[l,z]=p.useState(!1),u=RW(),{topicsQuery:f}=d5(),{data:O}=f,h=O&&O.topics.length>0,{isNewNoteModalOpen:q,setIsNewNoteModalOpen:g}=BW(),W=()=>{z(!l)},v=()=>{z(!1)};return a||!r?null:o?b.jsxs("div",{ref:i,className:`h-screen w-full ${o&&"overflow-y-auto"}`,"data-scrollable-container":!0,children:[b.jsx(F00,{containerRef:i}),b.jsx("div",{className:"relative mx-auto flex max-w-page flex-col",...t,children:o?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"block grid-cols-[auto_320px] items-start lg:grid",children:[b.jsxs("div",{className:"z-0 min-w-0",children:[b.jsx(rn0,{showBorder:!(u==="reader"&&h)&&u!=="explore",onToggleMobileSidebar:W}),b.jsx("div",{className:"px-[min(4vw,32px)]",children:e})]}),b.jsx(PW,{isMobileSidebarOpen:l,onCloseMobileSidebar:v})]}),l&&b.jsx("div",{className:"fixed inset-0 z-40 lg:hidden",onClick:v})]}):b.jsx(TW,{})}),b.jsx(h5,{open:q,onOpenChange:g})]}):b.jsx(ro,{to:`${n}/welcome`,replace:!0})},pa=({children:e})=>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-925/70 [&_svg]:size-8 [&_svg]:stroke-1",children:e}),Ma=({children:e,className:t})=>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}),jW=({statusCode:e,errorCode:t})=>{const o=Zq(),n=xg(),r=a=>{a.preventDefault(),n("/analytics/",{crossApp:!0})};return o?b.jsx(ir0,{children:b.jsxs(Ma,{children:[b.jsx(pa,{children:b.jsx(sK,{})}),b.jsx(V2,{className:"-mb-4",children:"Oops, page not found!"}),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?b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx($9,{})}),b.jsx(V2,{className:"-mb-4",children:"Rate limit exceeded"}),b.jsx("div",{children:"You've made too many requests. Please try again in a moment."}),b.jsx(i1,{asChild:!0,children: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"?b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx(H9,{})}),b.jsx(V2,{className:"-mb-4",children:"Site not configured correctly"}),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."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx(oZ,{})}),b.jsx(V2,{className:"-mb-4",children:"Account suspended"}),b.jsx("div",{children:"Your account has been suspended due to policy violations."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):e===410&&t==="INVALID_VERSION"?b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx(gZ,{})}),b.jsx(V2,{className:"-mb-4",children:"New version available"}),b.jsx("div",{children:"We've made some updates! Refresh your page to see what's new"}),b.jsx(i1,{asChild:!0,children:b.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Refresh your page"})})]}):b.jsx("div",{className:"admin-x-container-error",children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),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."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:r,children:"← Back to the homepage"})]})})},pr0=Object.freeze(Object.defineProperty({__proto__:null,default:jW},Symbol.toStringTag,{value:"Module"})),Mr0="activitypub",XW=[{path:Mr0,element:b.jsx(Bn,{}),errorElement:b.jsx(jW,{}),handle:"activitypub-basepath",children:[{index:!0,element:b.jsx(ro,{to:"reader"})},{path:"inbox",element:b.jsx(ro,{to:"../reader",replace:!0})},{path:"feed",element:b.jsx(ro,{to:"../notes",replace:!0})},{path:"reader",lazy:w1(()=>m1(()=>import("./index-4xuWCs9h.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"reader/:postId",lazy:w1(()=>m1(()=>import("./index-4xuWCs9h.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"notes",lazy:w1(()=>m1(()=>import("./feed-C5AauoXf.js"),__vite__mapDeps([7,8]),import.meta.url)),pageTitle:"Notes"},{path:"notes/:postId",lazy:w1(()=>m1(()=>import("./note-CiemurXq.js"),__vite__mapDeps([9,2,3,8]),import.meta.url)),pageTitle:"Note"},{path:"notifications",lazy:w1(()=>m1(()=>import("./index-B8XuCPIT.js"),__vite__mapDeps([10,11,12,13]),import.meta.url)),pageTitle:"Notifications"},{path:"explore",lazy:w1(()=>m1(()=>import("./index-N61Xkr32.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"explore/:topic",lazy:w1(()=>m1(()=>import("./index-N61Xkr32.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"profile",lazy:w1(()=>m1(()=>import("./index-DqlHFtZD.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/likes",lazy:w1(()=>m1(()=>import("./index-DqlHFtZD.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/following",lazy:w1(()=>m1(()=>import("./index-DqlHFtZD.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/followers",lazy:w1(()=>m1(()=>import("./index-DqlHFtZD.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/:handle/:tab?",lazy:w1(()=>m1(()=>import("./index-DqlHFtZD.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"preferences",lazy:w1(()=>m1(()=>import("./index-C8ssgmjI.js"),__vite__mapDeps([33,34,30,27,32,18,19,20,11]),import.meta.url)),pageTitle:"Preferences"},{path:"preferences/moderation",lazy:w1(()=>m1(()=>import("./moderation-CQMIGpv1.js"),__vite__mapDeps([35,21,22,23,24,25,11,26,27,28,8,6,29,1,17,30,12,31,13,15,3]),import.meta.url)),pageTitle:"Moderation",showBackButton:!0},{path:"preferences/bluesky-sharing",lazy:w1(()=>m1(()=>import("./bluesky-sharing-C1WkXrRJ.js"),__vite__mapDeps([36,18,19,20,11,27]),import.meta.url)),showBackButton:!0},{path:"welcome",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>Yn0),void 0,import.meta.url)),pageTitle:"Welcome",children:[{path:"",element:b.jsx(ro,{to:"1",replace:!0})},{path:"1",lazy:w1(()=>m1(()=>import("./step-1-y3anLU0g.js"),__vite__mapDeps([37,27]),import.meta.url))},{path:"2",lazy:w1(()=>m1(()=>import("./step-2-Dr1lGnHU.js"),__vite__mapDeps([38,39,13,31]),import.meta.url))},{path:"3",lazy:w1(()=>m1(()=>import("./step-3-C_d2hvMs.js"),__vite__mapDeps([40,39,13,31,23,6,8]),import.meta.url))},{path:"*",element:b.jsx(ro,{to:"1",replace:!0})}]},{path:"*",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>pr0),void 0,import.meta.url))}]}];function lr0(){return b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[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"}),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 Jp({path:e,activeOnSubpath:t=!1}){const o=t&&e?`${e}/*`:e;return jF(o||"")!==null}function H0({children:e,...t}){return b.jsx(Jd,{...t,children:e})}const DW=M0.createContext(null);function IW(){const e=M0.useContext(DW);if(!e)throw new Error("NavMenuItem.Collapsible components must be used within NavMenuItem.Collapsible");return e}function br0({children:e,expanded:t,id:o,onExpandedChange:n}){const r={expanded:t,id:o,onExpandedChange:n};return b.jsx(DW.Provider,{value:r,children:e})}function zr0({ariaLabel:e,children:t}){const{expanded:o,id:n,onExpandedChange:r}=IW();return b.jsxs(H0,{children:[b.jsx(i1,{"aria-controls":n,"aria-expanded":o,"aria-label":e,variant:"ghost",size:"icon",className:"hover:text-gray-black absolute top-0 left-3 h-[34px]! w-auto p-0 text-sidebar-accent-foreground transition-all group-hover/menu-item:opacity-100 hover:bg-transparent focus-visible:opacity-100 sidebar:opacity-0",onClick:()=>void r(!o),children:b.jsx(H3,{size:16,className:`transition-all ${o?"rotate-[90deg]":""}`})}),t]})}function ur0({children:e}){const{expanded:t,id:o}=IW();return b.jsx("div",{id:o,className:`grid transition-all duration-200 ease-out ${t?"mb-5 grid-rows-[1fr]":"mb-0 grid-rows-[0fr]"}`,children:b.jsx("div",{className:"overflow-hidden",children:t?e:null})})}function dr0({to:e,target:t,rel:o,activeOnSubpath:n=!1,isActive:r,children:a,...i}){const l=`#/${e?.replace(/^\/?#\//,"")}`,z=Jp({path:e,activeOnSubpath:n}),u=r!==void 0?r:z,{isMobile:f,setOpenMobile:O}=Jn(),h=()=>{f&&O(!1)};return b.jsx(rM,{asChild:!0,isActive:u,...i,children:b.jsx("a",{href:t==="_blank"?e:l,rel:t==="_blank"?o??"noopener noreferrer":o,target:t,"aria-current":u?"page":void 0,onClick:h,children:a})})}function Or0({children:e,...t}){return b.jsx("span",{...t,children:e})}function fr0({onClick:e,children:t,...o}){const{isMobile:n,setOpenMobile:r}=Jn(),a=()=>{n&&r(!1),e?.()};return b.jsx(rM,{onClick:a,...o,children:t})}H0.Link=dr0;H0.Label=Or0;H0.Button=fr0;H0.Collapsible=br0;H0.CollapsibleItem=zr0;H0.CollapsibleMenu=ur0;function Ar0({...e}){const{data:t}=ye(),{data:o}=AM(),n=oo(o?.settings,"social_web_enabled")??!1,a=sM().data?.site.url,{data:i=0}=kW(t?.slug||"",n),l=Jp({path:"network",activeOnSubpath:!0}),z=Jp({path:"activitypub",activeOnSubpath:!0}),u=i>0&&!l&&!z;return!t||!b10(t)?null:b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[b.jsx(H0,{children:b.jsxs(H0.Link,{to:"analytics",activeOnSubpath:!0,children:[b.jsx(Q9,{}),b.jsx(H0.Label,{children:"Analytics"})]})}),n&&b.jsxs(H0,{children:[b.jsxs(H0.Link,{to:"network",isActive:l||z,children:[b.jsx(lr0,{}),b.jsx(H0.Label,{children:"Network"})]}),u&&b.jsx(e5,{children:i})]}),b.jsxs(H0,{className:"group/viewsite relative",children:[b.jsxs(H0.Link,{to:"site",children:[b.jsx(YG,{}),b.jsx(H0.Label,{children:"View site"})]}),b.jsx("a",{href:a,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 transition-all group-hover/viewsite:opacity-100 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",children:b.jsx(Bd,{size:16})})]})]})})})}const mM="MembersResponseType",hr0=Xt({dataType:mM,path:"/members/"}),Ia0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:"CommentsResponseType"}}),Fa0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:"CommentsResponseType"}}),Ha0=wq({dataType:mM,path:"/members/",defaultSearchParams:{include:"labels,tiers",limit:"100",order:"created_at desc"},defaultNextPageParams:(e,t)=>{var o;if((o=e.meta)!=null&&o.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.members),n=t[t.length-1].meta;return{members:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}});function FW({filter:e,search:t,all:o}){if(!o&&!e&&!t)throw new Error("Bulk operation requires a filter, search, or all flag");const n={};return o&&(n.all="true"),e&&(n.filter=e),t&&(n.search=t),n}const Ua0=Ve({method:"PUT",path:()=>"/members/bulk/",body:({action:e})=>({bulk:{action:e.type,meta:e.meta||{},newsletter:e.newsletter}}),searchParams:FW,invalidateQueries:{dataType:mM}}),Va0=Ve({method:"DELETE",path:()=>"/members/",searchParams:FW,invalidateQueries:{dataType:mM}});function qr0(){const{data:e}=hr0({searchParams:{limit:"1"}});return e?.meta?.pagination.total}const mr0=()=>OM({select:e=>e.navigation}),gr0=()=>{const{mutateAsync:e}=fM();return Me({mutationFn:async t=>{await e({navigation:t})}})},BA=e=>{const{data:t}=mr0(),{mutateAsync:o}=gr0();return[t?.expanded[e]??!0,async a=>o({expanded:{...t?.expanded??eu.expanded,[e]:a}})]},Wr0=Gp({name:L2(),route:L2(),color:L2().optional(),icon:L2().optional(),filter:so0(L2(),L2().nullable())});function SA(e){return e.trim().toLowerCase()}function vr0(e,t){const o=Object.keys(e),n=Object.keys(t);return o.length!==n.length?!1:o.every(r=>e[r]===t[r])}function Rr0(e,t){return e.route===t.route&&vr0(e.filter,t.filter)}function Qa0(e,t){return e.flatMap((o,n)=>Rr0(o,t)?[n]:[])}function $a0(e,t,o){const n=SA(t.name);return e.some((r,a)=>a!==o&&r.route===t.route&&SA(r.name)===n)}function yr0(e){try{const t=JSON.parse(e);return Array.isArray(t)?{ok:!0,views:t.flatMap(n=>{const r=Wr0.safeParse(n);return r.success?[r.data]:[]})}:(console.error("Failed to parse shared_views setting:",new Error("shared_views is not an array")),{ok:!0,views:[]})}catch{return{ok:!1,error:new Error("shared_views JSON parse failed")}}}function wr0(e){return{midgrey:"#7C8B9A",blue:"#14b8ff",green:"#30cf43",red:"#f50b23",teal:"#4dcddc",purple:"#8e42ff",yellow:"#ffb41f",orange:"#fe8b05",pink:"#fb2d8d"}[e]||"#7C8B9A"}function HW(e){const{data:t}=AM();return p.useMemo(()=>{const o=oo(t?.settings,"shared_views")??"[]",n=yr0(o);return n.ok?e?n.views.filter(r=>r.route===e):n.views:(console.error("Failed to parse shared_views setting:",n.error),[])},[t,e])}function UW({views:e}){return e.length===0?null:b.jsx(b.Fragment,{children:e.map(t=>b.jsx(H0,{children:b.jsxs(H0.Link,{className:"pl-9",to:t.to,isActive:t.isActive,children:[b.jsx(H0.Label,{className:t.color?"grow":void 0,children:t.name}),t.color&&b.jsx("span",{className:"mx-0.5 size-2 shrink-0 rounded-full",style:{backgroundColor:wr0(t.color)},"data-color":t.color,"aria-hidden":"true"})]})},t.key))})}function VW(e="posts"){const t=Bg(),o=HW(e);return p.useMemo(()=>o.map(n=>{const 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,o])}function Lr0({route:e="posts"}){const t=VW(e);return b.jsx(UW,{views:t})}function xr0(e){return e.route==="members"&&typeof e.filter.filter=="string"&&e.filter.filter.length>0}function kr0(e){return`members-forward?${new URLSearchParams({filter:e}).toString()}`}function Cr0(e,t){return new URLSearchParams(e).get("filter")===t}function QW(){const e=we(),t=HW("members"),o=e.pathname==="/members-forward";return p.useMemo(()=>t.filter(xr0).map(n=>({key:`${n.name}:${n.filter.filter}`,name:n.name,to:kr0(n.filter.filter),isActive:o&&Cr0(e.search,n.filter.filter)})),[o,e.search,t])}function Nr0(){const e=QW();return b.jsx(UW,{views:e})}function _r0(){return["members-forward","members","member","member.new"]}function Er0({membersForwardEnabled:e,isOnMembersForward:t,hasActiveMemberView:o,isMembersExpanded:n,isLegacyMembersRouteActive:r}){return e&&t?o?!n:!0:r}const e3=e=>{const{data:t}=is();return t?.config.labs?.[e]??!1};function Br0({isActive:e,to:t}){return b.jsxs(b.Fragment,{children:[b.jsxs(H0.Link,{to:t,isActive:e,children:[b.jsx(D9,{className:"pointer-events-none opacity-0 transition-all sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0"}),b.jsx(H0.Label,{children:"Posts"})]}),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 transition-all hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",children:b.jsx(I9,{size:20,className:"mt-px stroke-[1.5px]!"})})]})}function TA({collapsible:e,count:t,isActive:o,to:n}){return b.jsxs(b.Fragment,{children:[b.jsxs(H0.Link,{to:n,isActive:o,children:[b.jsx(G9,{className:e?"pointer-events-none opacity-0 transition-all sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0":""}),b.jsx(H0.Label,{children:"Members"})]}),t!=null&&b.jsx(e5,{children:F3(t)})]})}function Sr0({...e}){const{data:t}=ye(),[o,n]=BA("posts"),[r,a]=BA("members"),i=VW("posts"),l=QW(),z=l.length>0,u=we(),f=qr0(),O=Bg(),h=e3("commentModeration"),q=e3("membersForward"),g=t&&l10(t),W=t&&M10(t),v=O.isRouteActive("posts",{type:"draft"}),y=O.isRouteActive("posts",{type:"scheduled"}),k=O.isRouteActive("posts",{type:"published"}),C=v||y||k||i.some(J=>J.isActive),L=o,x=u.pathname==="/members-forward",w=x&&l.some(J=>J.isActive),P=r,H=Er0({membersForwardEnabled:q,isOnMembersForward:x,hasActiveMemberView:w,isMembersExpanded:P,isLegacyMembersRouteActive:O.isRouteActive(_r0())}),o0=O.getRouteUrl("posts"),Z=O.isRouteActive("posts")||!L&&C,n0=q?"members-forward":O.getRouteUrl("members");return b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[b.jsxs(H0.Collapsible,{expanded:L,id:"posts-submenu",onExpandedChange:n,children:[b.jsx(H0.CollapsibleItem,{ariaLabel:"Toggle post views",children:b.jsx(Br0,{isActive:Z,to:o0})}),b.jsxs(H0.CollapsibleMenu,{children:[b.jsx(H0,{children:b.jsx(H0.Link,{className:"pl-9",to:"posts?type=draft",isActive:v,children:b.jsx(H0.Label,{children:"Drafts"})})}),b.jsx(H0,{children:b.jsx(H0.Link,{className:"pl-9",to:"posts?type=scheduled",isActive:y,children:b.jsx(H0.Label,{children:"Scheduled"})})}),b.jsx(H0,{children:b.jsx(H0.Link,{className:"pl-9",to:"posts?type=published",isActive:k,children:b.jsx(H0.Label,{children:"Published"})})}),b.jsx(Lr0,{})]})]}),b.jsx(H0,{children:b.jsxs(H0.Link,{to:O.getRouteUrl("pages"),isActive:O.isRouteActive("pages"),children:[b.jsx(NZ,{}),b.jsx(H0.Label,{children:"Pages"})]})}),g&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"tags",activeOnSubpath:!0,children:[b.jsx(uK,{}),b.jsx(H0.Label,{children:"Tags"})]})}),W&&b.jsx(b.Fragment,{children:q&&z?b.jsxs(H0.Collapsible,{expanded:P,id:"members-submenu",onExpandedChange:a,children:[b.jsx(H0.CollapsibleItem,{ariaLabel:"Toggle member views",children:b.jsx(TA,{collapsible:!0,count:f,isActive:H,to:n0})}),b.jsx(H0.CollapsibleMenu,{children:b.jsx(Nr0,{})})]}):b.jsx(H0,{children:b.jsx(TA,{collapsible:!1,count:f,isActive:H,to:n0})})}),W&&h&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"comments",activeOnSubpath:!0,children:[b.jsx(ZZ,{}),b.jsx(H0.Label,{children:"Comments"})]})})]})})})}const PA=function(){let t,o;return{promise:new Promise((r,a)=>{t=r,o=a}),resolve:t,reject:o}},Kb="https://do.featurebase.app/js/sdk.js";let ua=null;function Tr0(){return ua||(ua=new Promise((e,t)=>{if(document.querySelector(`script[src="${Kb}"]`)){e();return}const n=document.createElement("script");n.src=Kb,n.onload=()=>e(),n.onerror=r=>{n.remove(),ua=null;const a=new Error(`[Featurebase] Failed to load SDK from ${Kb}`,{cause:r});console.error(a),t(a)},document.head.appendChild(n)})),ua}function Pr0(){const{data:e}=is(),{data:t}=OM(),o=e3("featurebaseFeedback"),[n,r]=p.useState(!1),{organization:a,enabled:i}=e?.config.featurebase??{},l=!!(o&&i),z=t?.nightShift?"dark":"light",{data:u}=G00({enabled:l&&n}),f=u?.featurebase?.token;p.useEffect(()=>{n&&Tr0().catch(g=>{console.error("[Featurebase] Failed to load SDK:",g)})},[n]);const O=p.useRef(PA());p.useEffect(()=>{!n||!a||!f||ua?.then(()=>{window.Featurebase?.("initialize_feedback_widget",{organization:a,theme:z,featurebaseJwt:f},g=>{g?(console.error("[Featurebase] Failed to initialize widget:",g),O.current.reject(g),O.current=PA(),r(!1)):O.current.resolve()})})},[a,z,f,n]);const h=p.useCallback(()=>{l&&r(!0)},[l]);return{openFeedbackWidget:p.useCallback(g=>{l&&(r(!0),O.current.promise.then(()=>{window.postMessage({target:"FeaturebaseWidget",data:{action:"openFeedbackWidget",...g?.board&&{setBoard:g.board}}},"*")}))},[l]),preloadFeedbackWidget:h}}function jr0({...e}){const{data:t}=ye(),{data:o}=is(),n=e3("featurebaseFeedback"),{openFeedbackWidget:r,preloadFeedbackWidget:a}=Pr0();if(!t)return null;const l=o?.config.hostSettings?.billing?.enabled&&Ms(t),z=n&&!ls(t)&&o?.config.featurebase?.enabled;return!l&&!z?null:b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[l&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"pro",children:[b.jsx(vZ,{}),b.jsx(H0.Label,{children:"Ghost(Pro)"})]})}),z&&b.jsx(H0,{children:b.jsxs(H0.Button,{onClick:r,onMouseEnter:a,onFocus:a,children:[b.jsx(Sd,{}),b.jsx(H0.Label,{children:"Feedback"})]})})]})})})}function Xr0({...e}){const{data:t}=ye(),o=t&&p10(t);return b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[o&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"settings",children:[b.jsx(H9,{}),b.jsx(H0.Label,{children:"Settings"})]})}),b.jsx(H0,{children:b.jsxs(H0.Link,{to:"https://ghost.org/help?utm_source=admin&utm_campaign=help",target:"_blank",rel:"noopener noreferrer",children:[b.jsx(AZ,{}),b.jsx(H0.Label,{children:"Help"})]})})]})})})}function Dr0(){const{banner:e,bannerType:t}=p5();let o="";return t==="theme-errors"?o="pb-[110px]":t==="upgrade"?o="pb-[254px]":t==="whats-new"&&(o="pb-[180px]"),b.jsxs(yg,{className:"justify-between px-3 pt-4",children:[b.jsxs("div",{className:"flex flex-col gap-2 sidebar:gap-4",children:[b.jsx(Ar0,{}),b.jsx(Sr0,{}),b.jsx(jr0,{})]}),b.jsxs("div",{className:`flex flex-col gap-2 sidebar:gap-4 ${o}`,children:[b.jsx(Ko0,{banner:e}),b.jsx(Xr0,{className:"pb-0"})]})]})}function Ir0({...e}){return b.jsxs(mg,{...e,children:[b.jsx(f10,{className:"px-5 pt-6 pb-0"}),b.jsx(Dr0,{}),b.jsx(Zo0,{className:"gap-0 p-3"})]})}const Gi=1.5;function Yb({to:e,activeOnSubpath:t=!1,children:o,...n}){const r=Jp({path:e,activeOnSubpath:t});return b.jsx(i1,{asChild:!0,className:`w-full max-w-16 min-w-9 rounded-full hover:bg-gray-200 ${r?"bg-gray-200":"bg-transparent"}`,...n,variant:"ghost",size:"icon","data-active":r,children:b.jsx("a",{href:e,children:o})})}function Fr0(){const{isMobile:e}=Jn(),t=o5();return!e||!t?b.jsx(b.Fragment,{}):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: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:[b.jsxs(Yb,{activeOnSubpath:!0,to:"analytics",children:[b.jsx(Q9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Analytics"})]}),b.jsxs(Yb,{activeOnSubpath:!0,to:"posts",children:[b.jsx(D9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Posts"})]}),b.jsxs(Yb,{activeOnSubpath:!0,to:"members",children:[b.jsx(G9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Members"})]}),b.jsxs(gg,{className:"h-9 rounded-full px-8 hover:bg-transparent",children:[b.jsx(X9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})})}function Hr0({children:e}){const{data:t}=ye(),o=o5();return t&&ls(t)?b.jsxs("div",{className:"relative h-full bg-background",children:[b.jsx("main",{className:"flex h-full flex-col overflow-y-auto",children:b.jsx("div",{className:"flex-1",children:e})}),b.jsx("div",{className:"fixed bottom-3.5 left-3.5 z-20 lg:bottom-8 lg:left-8",children:b.jsx(Po0,{})})]}):b.jsxs(qg,{open:!!t&&o,children:[b.jsx(Ir0,{}),b.jsxs(Wg,{className:`overflow-y-auto bg-background sidebar:max-h-full ${o?"max-h-[calc(100%-var(--mobile-navbar-height))]":"max-h-full"}`,children:[b.jsx("main",{className:"flex-1",children:e}),b.jsx(Fr0,{})]})]})}function Ur0(){const{data:e}=ye();return o10(),t10(),b.jsx(Z00,{children:e?b.jsxs(Hr0,{children:[b.jsx(Bn,{}),b.jsx(Zf,{})]}):b.jsxs(b.Fragment,{children:[b.jsx(t5,{}),b.jsx(Zf,{})]})})}const $W=p.createContext(void 0),Ga0=()=>{const e=p.useContext($W);if(e===void 0)throw new Error("useAppContext must be used within an AppProvider");return e},Vr0=({children:e,value:t})=>{const o=p.useContext(Cu),n=t.externalNavigate??o?.externalNavigate;if(!n)throw new Error("External navigate function is required");const r={externalNavigate:n,fromAnalytics:!1,...o,...t};return b.jsx($W.Provider,{value:r,children:e})},Qr0=[{path:"",errorElement:b.jsx(Up,{onBackToDashboard:()=>{}}),children:[{path:"posts/analytics/:postId",lazy:async()=>{const[{default:e},{default:t}]=await Promise.all([m1(()=>import("./post-analytics-context-COgn3d86.js").then(o=>o.p),__vite__mapDeps([41,42]),import.meta.url),m1(()=>import("./post-analytics-CcRhLDKA.js"),__vite__mapDeps([43,44,45,42,41]),import.meta.url)]);return{element:b.jsx(e,{children:b.jsx(t,{})})}},children:[{path:"",lazy:w1(()=>m1(()=>import("./overview-9TwqfzGq.js"),__vite__mapDeps([46,47,5,24,48,29,49,50,51,52,53,45,41,42,54,55,3,15,56,57,58,59,60,61,62,63,64,22,23,25,11,26,27,28,8,6,1,17,30,12,31,13,65,21]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./web-CSXixG1S.js"),__vite__mapDeps([66,67,26,41,42,64,48,29,49,50,24,58,22,23,25,11,27,28,8,6,1,17,30,12,31,13,15,3,65,60,61,62,21,68,53,45,54,55,69,5]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./growth-DDyypj0q.js").then(e=>e.g),__vite__mapDeps([47,5,24,48,29,49,50,51,52,53,45,41,42,54,55,3,15,56,57]),import.meta.url))},{path:"newsletter",lazy:w1(()=>m1(()=>import("./newsletter-Dexg7vU8.js"),__vite__mapDeps([70,50,24,71,22,23,25,11,26,27,28,8,6,29,1,17,30,12,31,13,15,3,21,52,53,45,41,42,54,55,58,59,60,61,62,63,57]),import.meta.url))}]},{path:"tags",children:[{index:!0,lazy:w1(()=>m1(()=>import("./tags-D5g9tXZU.js"),__vite__mapDeps([72,34,73,44,51,17,5]),import.meta.url))},{path:":tagSlug",element:null}]},{path:"comments",lazy:w1(()=>m1(()=>import("./comments-gAnA10dK.js"),__vite__mapDeps([74,69,26,75,42,73,28,44,76,19,13,5]),import.meta.url))},{path:"members-forward",lazy:w1(()=>m1(()=>import("./members-CzztojNk.js"),__vite__mapDeps([77,69,26,17,75,42,73,78,62,25,67,51,79,29,54,80,44,5,81]),import.meta.url))},{path:"*",element:b.jsx(Up,{onBackToDashboard:()=>{}})}]}],$r0={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}},Gr0=Object.values($r0),Zr0=2,Za0={US:"United States",TWN:"Taiwan",TW:"Taiwan","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"},Ka0=["NULL","ᴺᵁᴸᴸ","","Others","Other"],Ya0="https://static.ghost.org/v5.0.0/images/globe-icon.svg",Ur={PUBLIC:1,FREE:2,PAID:4},Ja0=Ur.PUBLIC|Ur.FREE|Ur.PAID,es0=[{name:"Public visitors",value:"undefined",bit:Ur.PUBLIC},{name:"Free members",value:"free",bit:Ur.FREE},{name:"Paid members",value:"paid",bit:Ur.PAID}],GW=p.createContext(void 0),ts0=()=>{const e=p.useContext(GW);if(e===void 0)throw new Error("useGlobalData must be used within a GlobalDataProvider");return e},Kr0=({children:e})=>{const t=AM(),o=sM(),n=is(),r=n.data?.config,a=!!r?.stats,i=xI({enabled:a}),[l,z]=p.useState(Gr0[Zr0].value),[u,f]=p.useState(null),O=[n,t,o],h=O.map(C=>C.error).find(Boolean),q=a?i.error:null,g=h||q,W=O.some(C=>C.isLoading),v=a?i.isLoading:!1,y=W||v;if(g)throw g;const k={url:o.data?.site.url,icon:o.data?.site.icon,title:o.data?.site.title};return b.jsx(GW.Provider,{value:{data:r,site:k,statsConfig:r?.stats,tinybirdToken:i.token,isLoading:y,range:l,setRange:z,settings:t.data?.settings||[],selectedNewsletterId:u,setSelectedNewsletterId:f},children:e})},Yr0=[{path:"analytics",children:[{index:!0,lazy:w1(()=>m1(()=>import("./index-CVvW6Q-y.js"),__vite__mapDeps([82,83,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,5,45,55,84,65,60,61,62,85,57,56,42]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./index-A6WmqYr6.js"),__vite__mapDeps([86,83,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,68,58,5,71,87,49,69,84,57,21,65,60,61,62]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./index-BCvRITTU.js"),__vite__mapDeps([88,83,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,5,65,60,61,62,21,84,89,51,87,56,49,57,90,80,63,85]),import.meta.url))},{path:"newsletters",lazy:w1(()=>m1(()=>import("./index-CfpTfwls.js"),__vite__mapDeps([91,83,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,60,61,62,5,65,21,89,51,79,57]),import.meta.url))}]}],Jr0=()=>{const{data:e,isError:t,isLoading:o}=ye();return e?b.jsx(ro,{replace:!0,to:`/settings/staff/${e.slug}`}):t||!o?b.jsx(ro,{replace:!0,to:"/"}):null};function ec0(){return b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("h1",{className:"text-2xl font-bold",children:"404"}),b.jsx("span",{className:"text-grey-500","aria-hidden":"true",children:"|"}),b.jsx("h2",{className:"text-lg text-grey-700",children:"Page not found"})]})})}const tc0=["/","/dashboard","/site","/launch","/setup/*","/signin/*","/signout","/signup/*","/reset/*","/pro/*","/posts","/posts/analytics/:postId/mentions","/posts/analytics/:postId/debug","/restore","/pages","/editor/*","/tags/new","/explore/*","/migrate/*","/members/*","/members-activity","/designsandbox","/mentions"],ZW={allowInForceUpgrade:!0},oc0=tc0.map(e=>({path:e,Component:t5,handle:ZW})),nc0=[{element:b.jsx(a10,{}),children:[{path:"/tags/:tagSlug",Component:t5,handle:ZW},{element:b.jsx(Vr0,{value:{fromAnalytics:!0},children:b.jsx(Bn,{})}),children:Qr0[0].children.filter(e=>e.path!=="*")},{element:b.jsx(Kr0,{children:b.jsx(Bn,{})}),children:Yr0},{path:"network",loader:()=>rF("/activitypub")},{path:"my-profile",Component:Jr0,handle:{allowInForceUpgrade:!0}},{path:"",element:b.jsx(Yo0,{children:b.jsx(Bn,{})}),children:XW},{path:"settings/*",lazy:w1(()=>m1(()=>import("./settings-Ck1Hqs1x.js").then(e=>e.b8),__vite__mapDeps([92,21,22,23,24,25,11,26,27,28,8,6,29,1,17,30,12,31,13,15,3,79,42,78,62,80,90,67,34,20]),import.meta.url)),handle:{allowInForceUpgrade:!0}},...oc0,{path:"*",Component:ec0}]}],rc0=["http:","https:","mailto:","tel:"];function cc0(e){if(e.match(/^[a-z]+:/i))try{const t=new URL(e);return rc0.includes(t.protocol)?(window.location.href=e,!0):!1}catch{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}else{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}}function ac0({children:e}){const{data:t}=AM(),o=p.useMemo(()=>{if(!t?.settings)return;const n=t.settings;return{paidMembersEnabled:oo(n,"paid_members_enabled")??!1,newslettersEnabled:oo(n,"editor_default_email_recipients")!=="disabled",analytics:{emailTrackOpens:oo(n,"email_track_opens")??!1,emailTrackClicks:oo(n,"email_track_clicks")??!1,membersTrackSources:oo(n,"members_track_sources")??!1,outboundLinkTagging:oo(n,"outbound_link_tagging")??!1,webAnalytics:oo(n,"web_analytics_enabled")??!1}}},[t]);return b.jsx(dx,{appSettings:o,children:e})}const sc0={ghostVersion:"",externalNavigate:e=>{cc0(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)}};DR.createRoot(document.getElementById("root")).render(b.jsx(p.StrictMode,{children:b.jsx(ux,{...sc0,children:b.jsx(H00,{prefix:"/",routes:nc0,children:b.jsx(ac0,{children:b.jsx(gY,{className:"shade-admin",darkMode:!1,fetchKoenigLexical:null,children:b.jsx(Ur0,{})})})})})}));export{Lg as $,en as A,i1 as B,H3 as C,rs as D,Ma as E,Zn0 as F,Za as G,V2 as H,Aa0 as I,ha0 as J,ga0 as K,ir0 as L,Wa0 as M,qa0 as N,ma0 as O,Zo as P,X00 as Q,u00 as R,j1 as S,d00 as T,oZ as U,Yp as V,Te as W,Xd as X,Ea0 as Y,Ba0 as Z,Sa0 as _,w3 as a,td as a$,j9 as a0,WY as a1,K9 as a2,Y9 as a3,em as a4,tm as a5,J9 as a6,nm as a7,om as a8,U3 as a9,B0 as aA,gx as aB,_h as aC,se as aD,is as aE,sM as aF,AM as aG,xI as aH,eZ as aI,M7 as aJ,ft as aK,b7 as aL,Hj as aM,Uj as aN,Q9 as aO,og as aP,Fc0 as aQ,Bn as aR,xg as aS,Xc0 as aT,rg as aU,D00 as aV,jp as aW,Ga0 as aX,Cc0 as aY,_c0 as aZ,pc as a_,am as aa,$3 as ab,DZ as ac,Xt as ad,Ve as ae,WI as af,wq as ag,Lq as ah,Nc0 as ai,Wc0 as aj,_0 as ak,wc0 as al,F3 as am,mc0 as an,Ao as ao,K0 as ap,DR as aq,Sa as ar,m1 as as,_a as at,Mc0 as au,Y2 as av,q2 as aw,R1 as ax,Qn as ay,E1 as az,qo as b,Kc0 as b$,tg as b0,X9 as b1,Kd as b2,jc0 as b3,ng as b4,Pn as b5,wg as b6,Xf as b7,vc0 as b8,bn as b9,uc as bA,BZ as bB,ka0 as bC,rZ as bD,ia as bE,Vi as bF,Dd as bG,Id as bH,Fd as bI,O00 as bJ,Dc0 as bK,fg as bL,h00 as bM,q00 as bN,m00 as bO,z00 as bP,yc0 as bQ,gc0 as bR,jd as bS,Vn as bT,Ja0 as bU,es0 as bV,Ur as bW,ts0 as bX,lc0 as bY,kc0 as bZ,ro as b_,z3 as ba,p7 as bb,qt as bc,OX as bd,Fa as be,rc as bf,Tt as bg,Ju as bh,Yu as bi,q3 as bj,Qr as bk,A3 as bl,nc as bm,u3 as bn,d3 as bo,lZ as bp,ho as bq,h5 as br,u5 as bs,zZ as bt,LZ as bu,Ra0 as bv,zn0 as bw,cn0 as bx,jW as by,Ca0 as bz,pa as c,Ya0 as c$,Yc0 as c0,Fg as c1,Na0 as c2,V9 as c3,mK as c4,oM as c5,CY as c6,Gp as c7,_A as c8,EA as c9,Sc0 as cA,Rc0 as cB,kZ as cC,Lc0 as cD,$r0 as cE,jZ as cF,Df as cG,vZ as cH,Gr0 as cI,x2 as cJ,vY as cK,Tb as cL,LY as cM,La0 as cN,va0 as cO,xa0 as cP,cr0 as cQ,v1 as cR,bc0 as cS,zc0 as cT,Ox as cU,uc0 as cV,t3 as cW,Ka0 as cX,Za0 as cY,D9 as cZ,xc0 as c_,Xa0 as ca,Da0 as cb,L2 as cc,An0 as cd,uu as ce,ja0 as cf,ZJ as cg,KJ as ch,YJ as ci,sg as cj,Tc0 as ck,G9 as cl,uK as cm,we as cn,dd as co,fd as cp,Ka as cq,Ya as cr,Td as cs,VJ as ct,QJ as cu,I9 as cv,cg as cw,ag as cx,TG as cy,Bc0 as cz,Qi as d,Y00 as d$,Ec0 as d0,Ha0 as d1,qZ as d2,Ia0 as d3,Fa0 as d4,Sd as d5,$Z as d6,vW as d7,Hn0 as d8,Pa0 as d9,gq as dA,ua0 as dB,Wb as dC,fc0 as dD,Ac0 as dE,Wu as dF,Gc0 as dG,Xo0 as dH,qW as dI,mW as dJ,Do0 as dK,ra0 as dL,ca0 as dM,pa0 as dN,uI as dO,cc as dP,ia0 as dQ,na0 as dR,aa0 as dS,sa0 as dT,Ta as dU,ea0 as dV,za0 as dW,ta0 as dX,oa0 as dY,At as dZ,K00 as d_,Ta0 as da,ya0 as db,wa0 as dc,hr0 as dd,V3 as de,$9 as df,g3 as dg,Ua0 as dh,Va0 as di,qc0 as dj,yr0 as dk,Wr0 as dl,so0 as dm,Jc0 as dn,Qa0 as dp,$a0 as dq,oo as dr,Ma0 as ds,_R as dt,ic0 as du,gN as dv,T6 as dw,eI as dx,Oc0 as dy,tI as dz,Hp as e,sK as e$,J00 as e0,CP as e1,Zc0 as e2,u10 as e3,Oa0 as e4,ba0 as e5,la0 as e6,pe as e7,b10 as e8,Vc0 as e9,Vx as eA,W3 as eB,ga as eC,ye as eD,hc0 as eE,ow as eF,Ic0 as eG,kI as eH,da0 as eI,ls as eJ,vh as eK,Nh as eL,YG as eM,iZ as eN,aZ as eO,OZ as eP,AZ as eQ,gZ as eR,NZ as eS,TZ as eT,FZ as eU,UZ as eV,ZZ as eW,YZ as eX,eK as eY,nK as eZ,F9 as e_,Cz as ea,Ms as eb,Hc0 as ec,Sg as ed,Uc0 as ee,Qc0 as ef,p10 as eg,Tg as eh,$c0 as ei,aM as ej,Xh as ek,dc0 as el,KP as em,j6 as en,X6 as eo,vu as ep,Cj as eq,g7 as er,Zj as es,BX as et,SX as eu,TX as ev,U7 as ew,J7 as ex,eq as ey,tq as ez,SW as f,H9 as f0,MK as f1,U9 as f2,Pd as f3,hK as f4,ZG as f5,Jo as g,Fo as h,fa0 as i,b as j,_a0 as k,z5 as l,f5 as m,bu as n,zp as o,d5 as p,rm as q,p as r,Cr as s,M0 as t,FF as u,Mc as v,Q3 as w,G3 as x,Bd as y,R0 as z};
|
|
620
|
+
`+D1),B&&Hi([n0,J,i0],Ee=>{D1=ra(D1,Ee," ")}),L&&o1?L.createHTML(D1):D1},t.setConfig=function(){let W0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};D(W0),A0=!0},t.clearConfig=function(){H1=null,A0=!1},t.isValidAttribute=function(W0,S,z0){H1||D({});const x0=n1(W0),O1=n1(S);return L1(x0,O1,z0)},t.addHook=function(W0,S){typeof S=="function"&&na(Z[W0],S)},t.removeHook=function(W0,S){if(S!==void 0){const z0=vn0(Z[W0],S);return z0===-1?void 0:Rn0(Z[W0],z0,1)[0]}return WA(Z[W0])},t.removeHooks=function(W0){Z[W0]=[]},t.removeAllHooks=function(){Z=xA()},t}var In0=EW();const Fn0=["http:","https:","mailto:"];function Ta0(e){try{const t=new URL(e);return Fn0.includes(t.protocol)}catch{return!1}}function Pa0(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Cr(e){return In0.sanitize(e)}function bu(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();const o=t.map(u=>u.toLowerCase()),n={};let r=0,i=e.replace(/<\/(h[1-6]|p|div|li|blockquote|pre)>/gi,"<br>");for(const u of o){const f=new RegExp(`<${u}[^>]*>.*?<\\/${u}>|<${u}[^>]*\\/?>`,"gis");i=i.replace(f,O=>{const h=`__EXCLUDED_TAG_${r+=1}__`;return n[h]=O,h})}let l=i;o.includes("br")||(l=i.replace(/<br\s*\/?>/gi," "));let z=l.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();for(const[u,f]of Object.entries(n))z=z.replace(u,f);return z}const zp=e=>{const t=document.createElement("div");t.innerHTML=e;const o=t.getElementsByTagName("a");for(let n=0;n<o.length;n++)(o[n].getAttribute("href")||"").match(/^\s*(javascript|data|vbscript):/i)&&o[n].removeAttribute("href"),o[n].setAttribute("target","_blank"),o[n].setAttribute("rel","noopener noreferrer");return t.innerHTML},kA=e=>"preferredUsername"in e,Zo=({actor:e,children:t,disabled:o=!1,side:n="bottom",align:r="start",isCurrentUser:a=!1})=>{const[i,l]=p.useState(!1),z=qo();let u=e?.handle;!u&&e&&kA(e)&&(u=Jo(e));const f=o||!u&&!e,O=z5("index",u||"",{enabled:i&&!!u}),h=O.isFetching||O.isLoading,q=O.error,g=O.data?typeof O.data.followerCount=="number"&&typeof O.data.followingCount=="number"&&O.data.bio!==void 0:!1;if(p.useEffect(()=>{!i||!u||!g&&!h&&!q&&O.refetch({cancelRefetch:!1})},[O,h,q,g,i,u]),f)return b.jsx(b.Fragment,{children:t});const v=O.data||e,y=v?.handle??u??"",k=v?.name??"",C=v?.avatarUrl??(e&&kA(e)?e.icon?.url:null)??null,L=!!v?.followsMe,x=typeof v?.followingCount=="number"?v.followingCount:Number(v?.followingCount)||0,w=typeof v?.followerCount=="number"?v.followerCount:Number(v?.followerCount)||0,P=v?.bio?zp(bu(v.bio,["a"])):void 0,H=()=>{y&&z(`/profile/${y}`)},o0=()=>{y&&z(`/profile/${y}/following`)},Y=()=>{y&&z(`/profile/${y}/followers`)};return b.jsxs(p00,{onOpenChange:l,children:[b.jsx(M00,{asChild:!0,children:t}),b.jsx(dg,{align:r,className:"w-[320px] cursor-default rounded-2xl border-0 p-5 text-left text-gray-900 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] outline-hidden dark:bg-[#101114] dark:shadow-none",side:n,sideOffset:12,onClick:Z=>Z.stopPropagation(),children:b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsxs(Dd,{className:"size-14 cursor-pointer",onClick:H,children:[C&&b.jsx(Id,{alt:k,className:"rounded-full outline outline-[0.5px] outline-offset-[-0.5px] outline-black/10",src:C,onError:Z=>{Z.target.src="",Z.target.style.display="none"}}),b.jsx(Fd,{className:"bg-gray-200 text-sm font-semibold text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:b.jsx(Pd,{className:"size-5 text-gray-500 dark:text-gray-400",strokeWidth:1.5})})]}),!a&&b.jsx(f5,{following:!!v?.followedByMe,handle:y,type:"primary"})]}),b.jsxs("div",{className:"flex cursor-pointer flex-col items-start",onClick:H,children:[b.jsx(Lg,{className:"w-full truncate",children:k}),b.jsxs("div",{className:"flex w-full gap-2",children:[b.jsx("span",{className:"truncate text-gray-700 dark:text-gray-600",children:y}),L&&!a&&b.jsx(LY,{className:"mt-px whitespace-nowrap",variant:"secondary",children:"Follows you"})]})]})]}),b.jsx("div",{className:"flex gap-3 dark:text-gray-300",children:h?b.jsx(j1,{className:"h-4 w-32"}):!q&&b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:o0,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Df(x)})," ","Following"]}),b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:Y,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Df(w)})," ","Followers"]})]})}),h?b.jsx(j1,{className:"h-4 w-48"}):!q&&P?b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(P)},className:"leading-tight dark:text-gray-300 [&_.invisible]:hidden [&_a]:text-[#00a4eb] [&_a:hover]:underline"}):null]})})]})},BW=(e={})=>{const[t,o]=p.useState(!1),n=we();return p.useEffect(()=>{const r=a=>{if(a.target instanceof HTMLInputElement||a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLElement&&a.target.isContentEditable||a.target instanceof HTMLSelectElement||a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;const i=document.querySelector('[role="dialog"][data-state="open"]');if(!(i&&!(e.componentRef?.current?.closest('[role="dialog"]')===i)))switch(a.key.toLowerCase()){case"n":i||(a.preventDefault(),e.onOpenNewNote?e.onOpenNewNote():o(!0));break;case"r":e.isReplyAvailable&&e.onOpenReply&&(n.pathname.includes("/notes/")||n.pathname.includes("/reader/"))&&(a.preventDefault(),e.onOpenReply());break}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,n.pathname]),{isNewNoteModalOpen:t,setIsNewNoteModalOpen:o}},Vi=({actor:e,object:t,likeCount:o,commentCount:n,repostCount:r,layout:a,disabled:i=!1,buttonClassName:l="",onLikeClick:z,onCommentClick:u,onReplyCountChange:f})=>{const[O,h]=p.useState(t.liked),[q,g]=p.useState(t.reposted),[W,v]=p.useState(!1),y=p.useRef(null);BW({isReplyAvailable:!u&&a!=="reply",onOpenReply:()=>v(!0),componentRef:y}),p.useEffect(()=>{h(t.liked),g(t.reposted)},[t.liked,t.reposted]),p.useEffect(()=>{P(r)},[r]);const k=pn0("index"),C=Mn0("index"),L=ln0("index"),x=bn0("index"),[w,P]=p.useState(r),H=async Z=>{Z.stopPropagation(),O?C.mutate(t.id):k.mutate(t.id,{onError(){h(!1)}}),h(!O),z()},o0=Z=>{Z.stopPropagation(),u?u():v(!0)},Y=`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:bg-black dark:hover:bg-gray-950 dark:text-gray-600 ${l}`;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{ref:y,className:`flex ${a!=="inbox"&&"gap-1"}`,children:[b.jsxs(i1,{className:`${Y} ${O&&"text-pink-500 hover:text-pink-500"}`,"data-testid":"like-button",disabled:i,id:"like",title:`${O?"Undo like":"Like"}`,variant:"ghost",onClick:Z=>{Z?.stopPropagation(),Z&&H(Z)},children:[b.jsx(BZ,{className:`${O&&"fill-pink-500 text-pink-500"}`}),a!=="inbox"&&b.jsx(Qf,{className:o===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:o})]}),b.jsxs(i1,{className:`${Y}`,"data-testid":"reply-button",disabled:i,id:"comment",title:"Reply",variant:"ghost",onClick:o0,children:[b.jsx(Sd,{className:"-mr-px"}),a!=="inbox"&&n>0&&F3(n)]}),b.jsxs(i1,{className:`${Y} ${q&&"text-green-500 hover:text-green-500"}`,"data-testid":"repost-button",disabled:i,id:"repost",title:`${q?"Undo repost":"Repost"}`,variant:"ghost",onClick:Z=>{Z?.stopPropagation(),q?(x.mutate(t.id),P(w-1)):(L.mutate(t.id,{onError(){g(!1),P(w-1)}}),P(w+1)),g(!q)},children:[b.jsx(F9,{className:`${q&&"text-green-500"}`}),a!=="inbox"&&b.jsx(Qf,{className:w===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:w})]})]}),W&&b.jsx(h5,{open:W,replyTo:{object:t,actor:e},onOpenChange:Z=>{v(Z)},onReply:()=>{f?.(1),v(!1)},onReplyError:()=>{f?.(-1)}})]})};function Hn0(e){const o=e.replace(/<[^>]*>/g,"").split(/\s+/).filter(r=>r.length>0).length;return`${Math.ceil(o/275)} min read`}const Fo=(e,t,o)=>{o?.stopPropagation(),t(typeof e=="string"?`/profile/${e}`:`/profile/${e.handle||Jo(e)}`)},Un0=e=>{const t=new Date,o=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()),n=o(t),r=o(new Date(t.getTime()-1440*60*1e3)),a=o(e);return a.getTime()===n.getTime()?Vn0(e):a.getTime()===r.getTime()?"Yesterday":Qn0(e)},Vn0=e=>{const o=Math.floor((new Date().getTime()-e.getTime())/1e3);if(o<1)return"Just now";if(o<60)return`${o}s`;const n=Math.floor(o/60);return n<60?`${n}m`:`${Math.floor(n/60)}h`},Qn0=e=>{const t=new Date,o=e.getDate(),n=e.toLocaleString("default",{month:"short"});return e.getFullYear()===t.getFullYear()?`${o} ${n}`:`${o} ${n} ${e.getFullYear()}`};function $n0(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 Qi(e,t=!0){const o=new Date(e?.published??e?.createdAt??new Date),n=$n0(o),r=Un0(o);return t&&!e.url?.includes("/.ghost/activitypub")?b.jsx("a",{className:"whitespace-nowrap text-gray-700 hover:underline",href:e.url,rel:"noreferrer",target:"_blank",title:n,onClick:a=>a.stopPropagation(),children:r}):b.jsx("span",{className:"whitespace-nowrap text-gray-700",children:r})}function A5(e){let t;if(e.image&&(t=e.image),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 ia(e,t,o,n){const r=A5(e);if(!r)return null;const a=z=>u=>{u.stopPropagation(),t&&t(z)},i=z=>{n&&n(z)},l=(z,u=!1)=>{const f=u?"min-h-[200px]":"";return b.jsx("div",{className:`${z} ${f} flex w-full items-center justify-center bg-gray-100 dark:bg-gray-925/30`,children:b.jsx(TZ,{className:"text-gray-400",size:24,strokeWidth:1.5})})};if(Array.isArray(r)){const z=r.length;let u="";return z===1?u="grid-cols-1":z>=2&&z<=4?u="grid-cols-2 auto-rows-[150px]":z>4&&(u="grid-cols-3 auto-rows-[150px]"),b.jsx("div",{className:`attachment-gallery mt-3 grid w-full ${u} gap-2`,children:r.map((f,O)=>{const h=`size-full rounded-md outline outline-1 -outline-offset-1 outline-black/10 ${z===3&&O===0?"row-span-2":""}`;return o&&o.has(f.url)?l(h,z===1):b.jsx("img",{alt:f.name||`Image-${O}`,className:`${h} cursor-pointer object-cover`,referrerPolicy:"no-referrer",src:f.url,onClick:t?a(f.url):void 0,onError:()=>i(f.url)},f.url)})})}switch(r.mediaType){case"image/jpeg":case"image/png":case"image/gif":case"image/webp":return o&&o.has(r.url)?l(`${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,!0):b.jsx("img",{alt:r.name||"Image",className:`cursor-pointer ${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,referrerPolicy:"no-referrer",src:r.url,onClick:t?a(r.url):void 0,onError:()=>i(r.url)});case"video/mp4":case"video/webm":return b.jsx("div",{className:"relative mt-3 mb-4",children:b.jsx("video",{className:"h-[300px] w-full rounded object-cover",src:r.url,controls:!0})});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"relative mt-2 mb-4 w-full",children:b.jsx("audio",{className:"w-full",src:r.url,controls:!0})});default:if(e.image||r.type==="Image"){const z=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 outline-1 -outline-offset-1 outline-black/10";let u;return e.image?typeof e.image=="string"?u=e.image:u=e.image?.url:u=r.url,o&&o.has(u)?l(z,!0):b.jsx("img",{alt:r.name||"Image",className:z,referrerPolicy:"no-referrer",src:u,onClick:t?a(u):void 0,onError:()=>i(u)})}return null}}function Gn0(e,t){const o=A5(e),n="ml-8 md:ml-9 shrink-0 rounded-md h-[91px] w-[121px] relative",r=se("object-cover outline outline-1 -outline-offset-1 outline-black/[0.05]",n);if(t)return b.jsx(j1,{className:`${r} outline-0`});if(!o)return null;if(Array.isArray(o))return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o[0].url});switch(o.mediaType){case"image/jpeg":case"image/png":case"image/gif":return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o.url});case"video/mp4":case"video/webm":return b.jsxs("div",{className:n,children:[b.jsx("video",{className:"h-[80px] w-full rounded object-cover",src:o.url}),b.jsx("div",{className:"absolute inset-0 rounded bg-gray-900 opacity-50"}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsx(nK,{color:"white",fill:"white",size:40})})]});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"ml-8 w-[120px]",children:b.jsx("div",{className:"relative mt-2 mb-4 w-full",children:b.jsx("audio",{className:"w-full",src:o.url,controls:!0})})});default:return e.image?b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:typeof e.image=="string"?e.image:e.image?.url}):null}}const CA=()=>{},NA=b.jsx(F9,{className:"shrink-0 text-gray-700 dark:text-gray-600",size:16,strokeWidth:1.5}),Zn0=({actor:e,allowDelete:t=!1,object:o,parentId:n=void 0,layout:r,type:a,commentCount:i=0,repostCount:l=0,likeCount:z=0,showHeader:u=!0,last:f,isLoading:O,isPending:h=!1,isCompact:q=!1,isChainContinuation:g=!1,isChainParent:W=!1,onClick:v=CA,onDelete:y=CA,showStats:k=!0})=>{const C=new Date(o?.published??new Date).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})+", "+new Date(o?.published??new Date).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit"}),[,L]=p.useState(!1),[x,w]=p.useState(new Set),P=p.useRef(null),[H,o0]=p.useState(!1),Y=fn0("index"),Z=qo(),n0=b5("index",()=>{Te.success(`Followed ${X?.name}`)},()=>{Te.error("Failed to follow")}),J=l5("index",()=>{Te.info(`Unfollowed ${X?.name}`)},()=>{Te.error("Failed to unfollow")});p.useEffect(()=>{const $0=P.current;$0&&o0($0.scrollHeight>$0.clientHeight)},[o?.content]),p.useEffect(()=>{const $0=P.current;if(!$0)return;const h1=B=>{const r0=B.target.closest("a[data-profile]");if(r0){const A0=r0.getAttribute("data-profile")?.trim();/^@([\w.-]+)@([\w-]+\.[\w.-]+[a-zA-Z])$/.test(A0||"")&&A0&&(B.preventDefault(),B.stopPropagation(),Fo(A0,Z))}};return $0.addEventListener("click",h1),()=>{$0.removeEventListener("click",h1)}},[Z,o?.content]);const i0=()=>{},L0=()=>{h||v()},K=()=>{Y.mutate({id:o.id,parentId:n}),y()},m0=async()=>{o?.url&&(await navigator.clipboard.writeText(o.url),L(!0),Te.success("Link copied"),setTimeout(()=>L(!1),2e3))},$=$0=>{w(h1=>new Set(h1).add($0))};let X=e;a==="Announce"&&(X=typeof o.attributedTo=="object"?o.attributedTo:e);const G=X?Jo(X):null,N=X?.followedByMe||!1,I=a==="Announce"?typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&"authored"in o.attributedTo?o.attributedTo.authored:typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&typeof e=="object"&&e&&o.attributedTo.id===e.id:o.authored,c0=a==="Announce"?o.reposted??!1:o.authored,h0=()=>{G&&n0.mutate(G)},d0=()=>{G&&J.mutate(G)},v0=b.jsx(i1,{className:`relative z-10 size-[34px] rounded-md ${r==="inbox"||r==="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:bg-black dark:hover:bg-gray-950 [&_svg]:size-5`,"data-testid":"menu-button",variant:"ghost",children:b.jsx(X9,{})}),{lightboxState:u0,openLightbox:e0,closeLightbox:S0,navigateToIndex:T0}=qn0(o);return r==="feed"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative -mx-4 ${h?"pointer-events-none":"cursor-pointer"} rounded-lg p-6 px-4 pb-[18px]`,"data-layout":"feed","data-object-id":o.id,onClick:L0,children:[a==="Announce"&&b.jsxs("div",{className:"z-10 mb-2 flex items-center gap-1.5 text-gray-700 dark:text-gray-600",children:[NA,b.jsxs("div",{className:"flex min-w-0 items-center gap-1 text-sm",children:[b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"break-anywhere truncate hover:underline",onClick:$0=>{Fo(e,Z,$0)},children:e.name})}),"reposted"]})]}),b.jsxs("div",{className:"flex flex-col gap-2.5","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:$0=>{h||Fo(X,Z,$0)},children:[b.jsx("span",{className:`break-anywhere min-w-0 truncate font-semibold ${q?"text-lg":"text-md"} ${h?"":"hover-underline"} dark:text-white`,"data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-24"}):X.name}),b.jsxs("div",{className:"flex w-full text-md text-gray-700 dark:text-gray-600",children:[b.jsx("span",{className:`truncate ${h?"":"hover-underline"}`,children:O?b.jsx(j1,{className:"w-56"}):Jo(X)}),b.jsx("div",{className:`ml-1 before:mr-1 ${!O&&'before:content-["·"]'}`,title:`${C}`,children:O?b.jsx(j1,{className:"w-4"}):Qi(o,h===!1&&!o.authored)})]})]})]})}),b.jsx(Fb,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"feed",trigger:v0,onCopyLink:m0,onDelete:K,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"",children:o.type==="Article"?b.jsxs("div",{className:"rounded-md border border-gray-150 transition-colors hover:bg-gray-75 dark:border-gray-950 dark:hover:bg-gray-950",children:[ia(o,L0,x,$),b.jsxs("div",{className:"p-5",children:[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:o.name}),b.jsx("div",{className:"break-anywhere line-clamp-3 leading-[1.4em]",children:o.preview?.content})]})]}):b.jsxs("div",{className:"relative",children:[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:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(zp(o.content||"")??"")},ref:P,onClick:$0=>{const h1=$0.target;(h1.tagName==="A"||h1.closest("a"))&&$0.stopPropagation()}})}),H&&b.jsx("button",{className:"mt-1 text-blue-600",type:"button",children:"Show more"}),ia(o,e0,x,$)]})}),b.jsx("div",{className:"space-between relative z-[30] mt-1 ml-[-8px] flex",children:O?b.jsx(j1,{className:"ml-2 w-18"}):k&&b.jsx(Vi,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]})]}),b.jsx(Hb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="modal"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{"data-object-id":o.id,children:[b.jsxs("div",{className:"group/article relative","data-layout":"modal",onClick:L0,children:[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:[u&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"relative z-10 pt-[3px]",children:b.jsx(en,{author:X,showFollowButton:!I&&!N})}),b.jsxs("div",{className:"relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]",onClick:$0=>{h||Fo(X,Z,$0)},children:[b.jsxs("div",{className:"flex w-full",children:[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:X.name}),b.jsx("div",{children:Qi(o,!o.authored)})]}),b.jsx("div",{className:"flex w-full",children:b.jsx("span",{className:"min-w-0 truncate text-gray-700 dark:text-gray-600",children:Jo(X)})})]})]}),b.jsx("div",{className:"relative z-10 col-start-1 col-end-3 w-full gap-4",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.name&&b.jsx(V2,{className:"break-anywhere mb-1 leading-tight","data-test-activity-heading":!0,children:o.name}),b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(zp(o.content||"")??"")},ref:P,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"}),ia(o,e0,x,$),b.jsx("div",{className:"space-between mt-3 ml-[-8px] flex",children:k&&b.jsx(Vi,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),b.jsx("div",{className:"absolute -inset-x-3 -inset-y-0 z-0 rounded transition-colors max-lg:hidden"})]}),b.jsx("div",{className:"mt-3 h-px bg-gray-200 dark:bg-gray-950"})]}),b.jsx(Hb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="reply"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative ${q?"pb-6":g?"pb-5":"py-5"} ${h?"pointer-events-none":"cursor-pointer"}`,"data-layout":"reply","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"flex flex-col gap-2.5 border-b-gray-200","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:$0=>{h||Fo(X,Z,$0)},children:[b.jsxs("div",{className:"flex",children:[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:X.name}),b.jsx("div",{children:Qi(o,h===!1&&!o.authored)})]}),b.jsx("div",{className:"flex",children:b.jsx("span",{className:"truncate text-gray-700",children:Jo(X)})})]})]})}),!q&&b.jsx(Fb,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"reply",trigger:v0,onCopyLink:m0,onDelete:K,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative z-10 col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.type==="Article"&&ia(o,L0,x,$),o.name&&b.jsx(V2,{className:"break-anywhere mt-2.5 leading-tight text-pretty","data-test-activity-heading":!0,children:o.name}),o.preview&&o.type==="Article"?b.jsx("div",{className:"mt-1 line-clamp-3 leading-tight",children:o.preview.content}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(zp(o.content||"")??"")},ref:P,className:"ap-note-content break-anywhere tracking-[-0.006em] text-pretty text-gray-900 dark:text-gray-300 [&_p+p]:mt-3"}),o.type==="Note"&&ia(o,e0,x,$),o.type==="Article"&&b.jsx(i1,{className:"mt-3 w-full",id:"read-more",variant:"secondary",children:"Read more"}),!q&&b.jsx("div",{className:"space-between mt-2 ml-[-8px] flex",children:k&&b.jsx(Vi,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),!f&&b.jsx("div",{className:`absolute left-[19px] ${q?"top-[51px] bottom-[8px]":g?"top-[51px] bottom-[5px]":W?"top-[71px] bottom-[5px]":"top-[71px] bottom-[-7px]"} z-0 w-[2px] rounded-sm bg-gray-200 dark:bg-gray-950`})]}),b.jsx(Hb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="inbox"?b.jsx(b.Fragment,{children:o&&b.jsxs("div",{className:"group/article 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-75 dark:hover:bg-gray-950/50","data-layout":"inbox","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"w-full min-w-0",children:[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:O?b.jsx(j1,{className:"w-24"}):b.jsxs(b.Fragment,{children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(en,{author:X,size:"2xs"}),b.jsx("span",{className:"break-anywhere min-w-0 font-semibold text-gray-900 hover:underline dark:text-gray-600","data-test-activity-heading":!0,onClick:$0=>{Fo(X,Z,$0)},children:X.name})]})}),a==="Announce"&&b.jsxs("span",{className:"z-10 flex items-center gap-1 text-gray-700 dark:text-gray-600",children:[NA,b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"line-clamp-1 hover:underline",onClick:$0=>{Fo(e,Z,$0)},children:e.name})})," reposted"]}),b.jsx("span",{className:'shrink-0 whitespace-nowrap text-gray-600 before:mr-1 before:content-["·"]',title:`${C}`,children:Qi(o,!o.authored)})]})}),b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex min-h-[73px] w-full min-w-0 flex-col items-start justify-start gap-1",children:[b.jsx(V2,{className:"break-anywhere line-clamp-2 w-full max-w-[600px] leading-tight text-pretty","data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-full max-w-96"}):o.name?o.name:b.jsx("span",{dangerouslySetInnerHTML:{__html:Cr(bu(o.content||""))}})}),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:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(bu(o.preview?.content??o.content??""))}})}),b.jsx("span",{className:"mt-1 shrink-0 text-sm leading-none whitespace-nowrap text-gray-600",children:O?b.jsx(j1,{className:"w-16"}):o.content&&`${Hn0(o.content)}`})]}),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:[k&&b.jsx(Vi,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0}),b.jsx(Fb,{allowDelete:t,authoredByMe:I,followedByMe:N,layout:"inbox",trigger:v0,onCopyLink:m0,onDelete:K,onFollow:h0,onUnfollow:d0})]})]})]}),Gn0(o,O)]})}):b.jsx(b.Fragment,{})},_A=5*1024*1024,EA="Image must be less than 5MB in size.",ja0=async e=>{try{const t=await fetch(e,{mode:"cors"});if(!t.ok)throw new Error(`Failed to fetch image: ${t.status}`);const o=await t.blob();return new Promise((n,r)=>{const a=new FileReader;a.onload=()=>n(a.result),a.onerror=r,a.readAsDataURL(o)})}catch{return e}},Xa0=e=>new Promise(t=>{const o=new Image;o.onload=()=>{URL.revokeObjectURL(o.src),t(o.width===o.height)},o.src=URL.createObjectURL(e)}),Da0="Image must be square.",h5=({children:e,replyTo:t,onReply:o,onReplyError:n,onOpenChange:r,...a})=>{const{data:i}=zn0("index"),l=On0("index",i),z=dn0("index",i),{data:u,isLoading:f}=z5("index","me"),[O,h]=p.useState(!1),q=p.useRef(null),g=p.useRef(null),[W,v]=p.useState(null),[y,k]=p.useState(!1),C=p.useRef(null),[L,x]=p.useState(""),[w,P]=p.useState(null),[H,o0]=p.useState(""),[Y,Z]=p.useState(!1),[n0,J]=p.useState(!1),[i0,L0]=p.useState(!1),K=qo(),m0=500;p.useEffect(()=>{a.open!==void 0&&h(a.open)},[a.open]),p.useEffect(()=>{if(a.open!==void 0?a.open:O){const S0=setTimeout(()=>{L0(!0)},300);return()=>clearTimeout(S0)}else L0(!1)},[O,a.open]);const $=!L.trim()||!i||n0||L.length>m0,X=p.useCallback(async()=>{const e0=L.trim();if(!(!e0||!i))try{J(!0),t?(await z.mutateAsync({inReplyTo:t.object.id,content:e0,imageUrl:w||void 0,altText:H||void 0}),o?.()):(await l.mutateAsync({content:e0,imageUrl:w||void 0,altText:H||void 0}),K("/notes")),h(!1),r&&r(!1),Te.success(t?"Reply posted":"Note posted")}catch{t&&n?.()}finally{J(!1)}},[L,i,t,z,l,w,H,o,n,h,K,r]),G=e0=>{x(e0.target.value)};p.useEffect(()=>{q.current&&(q.current.style.height="auto",q.current.style.height=`${q.current.scrollHeight}px`)},[L]),p.useEffect(()=>{if((a.open!==void 0?a.open:O)&&q.current){const S0=setTimeout(()=>{q.current?.focus()},100);return()=>clearTimeout(S0)}},[O,a.open]),p.useEffect(()=>{if(Y&&g.current){const e0=setTimeout(()=>{g.current?.focus()},100);return()=>clearTimeout(e0)}},[Y]),p.useEffect(()=>{const e0=T0=>{(T0.metaKey||T0.ctrlKey)&&T0.key==="Enter"&&(T0.preventDefault(),!$&&!y&&X())};if(a.open!==void 0?a.open:O)return document.addEventListener("keydown",e0),()=>document.removeEventListener("keydown",e0)},[O,a.open,$,y,X]);const N=p.useCallback(async e0=>{const S0=e0.clipboardData?.items;if(S0)for(let T0=0;T0<S0.length;T0++){const $0=S0[T0];if($0.type.indexOf("image")!==-1){e0.preventDefault();const h1=$0.getAsFile();if(h1){if(h1.size>_A){Te.error(EA);return}const B=URL.createObjectURL(h1);v(B),await I(h1)}break}}},[]);p.useEffect(()=>{if(a.open!==void 0?a.open:O)return document.addEventListener("paste",N),()=>document.removeEventListener("paste",N)},[O,a.open,N]);const I=async e0=>{try{k(!0);const S0=await An0(e0);P(S0)}catch(S0){v(null);let T0="Failed to upload image. Try again.";if(S0&&typeof S0=="object"&&"statusCode"in S0)switch(S0.statusCode){case 413:T0="Image size exceeds limit.";break;case 415:T0="The file type is not supported.";break}Te.error(T0)}finally{k(!1)}},c0=async e0=>{const S0=e0.target.files;if(S0&&S0.length>0){const T0=S0[0];if(T0.size>_A){Te.error(EA),e0.target.value="";return}const $0=URL.createObjectURL(T0);v($0),await I(T0)}},h0=e0=>{e0.stopPropagation(),v(null),P(null),o0(""),Z(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")},d0=e0=>{e0.stopPropagation(),Z(!Y)},v0=()=>{q.current?.focus()};p.useEffect(()=>()=>{W&&URL.revokeObjectURL(W)},[W]);let u0="What's new?";if(t){const e0=t.object.attributedTo||{};typeof e0=="object"&&"preferredUsername"in e0&&"id"in e0&&(u0=`Reply to ${Jo(e0)}...`)}return b.jsxs(rs,{open:a.open!==void 0?a.open:O,onOpenChange:e0=>{e0&&(x(""),v(null),P(null),o0(""),Z(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")),h(e0),r&&r(e0)},...a.open!==void 0?{}:a,children:[b.jsx(rm,{asChild:!0,children:e}),b.jsxs(Mc,{className:"max-h-[80vh] min-h-[240px] gap-0 overflow-y-auto pb-0","data-testid":"new-note-modal",onClick:e0=>e0.stopPropagation(),children:[b.jsxs(Q3,{className:"hidden",children:[b.jsx(G3,{children:t?"Reply":"New note"}),b.jsx(am,{children:"Post your thoughts to the Social web"})]}),t&&b.jsx(Zn0,{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:()=>{}}),b.jsxs("div",{className:`flex ${W?"":"min-h-36"} cursor-text items-start gap-3`,onClick:v0,children:[b.jsx("div",{className:"sticky top-0",children:b.jsx(en,{author:i})}),b.jsx(KP,{asChild:!0,children:b.jsxs("div",{className:"-mt-0.5 flex w-full flex-col gap-0.5",children:[f?b.jsx(j1,{className:"w-10"}):b.jsx("span",{className:"break-anywhere min-w-0 truncate font-semibold whitespace-nowrap text-black dark:text-white",children:u?.name}),b.jsx(j6,{name:"content",asChild:!0,children:b.jsx(X6,{asChild:!0,children:b.jsx("textarea",{ref:q,autoFocus:!0,className:"ap-textarea break-anywhere w-full resize-none bg-transparent text-[1.5rem]","data-testid":"note-textarea",placeholder:u0,rows:1,value:L,onChange:G,onPaste:N})})}),b.jsx(j6,{name:"image",asChild:!0,children:b.jsx(X6,{asChild:!0,children:b.jsx("input",{ref:C,accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",type:"file",onChange:c0})})})]})})]}),W&&b.jsxs("div",{className:"group relative mt-6 flex min-h-[200px] w-full items-center justify-center",children:[b.jsx("img",{alt:"Image attachment preview",className:`max-h-[320px] w-full rounded-sm object-cover outline outline-1 -outline-offset-1 outline-black/10 ${y&&"opacity-10"}`,src:W}),y&&b.jsx("div",{className:"absolute leading-[0]",children:b.jsx(Hp,{size:"md"})}),b.jsx(i1,{className:"absolute top-3 right-3 size-8 bg-black/60 text-white opacity-0 group-hover:opacity-100 hover:bg-black/80",onClick:h0,children:b.jsx(V9,{})}),!y&&b.jsx(i1,{className:`absolute bottom-3 left-3 h-6 px-2 py-0 text-white ${Y?"bg-green-500 hover:bg-green-500":"bg-black/60 hover:bg-black/80"}`,onClick:d0,children:"Alt"})]}),W&&!y&&Y&&b.jsx("div",{className:"mt-1",children:b.jsx(oM,{ref:g,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-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Type alt text for image (optional)",type:"text",value:H,onChange:e0=>o0(e0.target.value)})}),b.jsxs($3,{className:`${i0?"sticky":"static"} bottom-0 flex-row bg-background py-6 dark:bg-[#101114]`,children:[b.jsx(i1,{className:"mr-auto w-[34px] min-w-0!",variant:"outline",onClick:()=>C.current?.click(),children:b.jsx(jZ,{})}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs("div",{className:`text-sm ${L.length>=m0?"text-red-500":L.length>=m0*.9?"text-yellow-600":"text-gray-500"}`,children:[L.length,"/",m0]}),b.jsx(i1,{className:"min-w-16","data-testid":"post-button",disabled:$||y,onClick:X,children:n0?b.jsx(Hp,{color:"light",size:"sm"}):"Post"})]})]})]})]})};function zu(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}function Kn0(e,t){const o=zu(e);return JSON.stringify({...o,...t})}const SW=()=>{const{data:e}=ye(),{mutateAsync:t}=Sg(),o=M0.useMemo(()=>e?.accessibility?zu(e.accessibility).apOnboarding||{}:{},[e?.accessibility]),n=M0.useCallback(async r=>{if(!e)return;const a=zu(e.accessibility),i=Kn0(e.accessibility,{apOnboarding:{...a.apOnboarding,...r}});await t({...e,accessibility:i})},[e,t]);return{isOnboarded:!!o.welcomeStepsFinished,isExplainerClosed:!!o.exploreExplainerClosed,setOnboarded:r=>n({welcomeStepsFinished:r}),setExplainerClosed:r=>n({exploreExplainerClosed:r})}},TW=()=>b.jsx("div",{className:"h-full pt-14",children:b.jsx(Bn,{})}),Yn0=Object.freeze(Object.defineProperty({__proto__:null,default:TW,useOnboardingStatus:SW},Symbol.toStringTag,{value:"Module"})),Jn0=()=>{const e=qo();function t(){e(`/notes/${encodeURIComponent("https://activitypub.ghost.org/.ghost/activitypub/note/6d6d7f57-b656-4caa-ba9e-efa1d9a4b3fb")}`)}return b.jsxs("div",{className:"z-20 w-full bg-white dark:bg-black",children:[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-black",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx($Z,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Beta feedback"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Something not working? Let us know"}),b.jsx(i1,{className:"mt-2 dark:bg-gray-925/70 dark:hover:bg-gray-900",variant:"secondary",onClick:t,children:"Send feedback"})]}),b.jsxs("div",{className:"-mb-1 ml-3 flex items-center gap-1.5 pt-4 pb-2 text-xs text-gray-400",children:[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"}),"⋅",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"})]})]})},Yp=({children:e,url:t=null,onClick:o,"data-testid":n,isSelected:r=!1})=>{const a=M0.Children.toArray(e),i=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 ${r?"z-10 before:opacity-100":"before:opacity-0"}`,"data-testid":n,onClick:()=>{!t&&o&&o()},children: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?b.jsx("a",{href:t,rel:"noreferrer",target:"_blank",onClick:l=>{o&&(l.preventDefault(),o())},children:i}):i},er0=()=>{const e=qo(),{suggestedProfilesQuery:t}=u5("index",3),{data:o,isLoading:n}=t,r=n?Array(3).fill(null):o||[],{resetStack:a}=w3(),i="[@media(max-height:740px)]:hidden";return!n&&(!o||o.length===0)?null:b.jsxs("div",{className:`border-t border-gray-200 px-3 pt-6 dark:border-gray-950 ${i}`,children:[b.jsxs("div",{className:"mb-3 flex flex-col gap-0.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(jp,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Follow suggestions"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Accounts you might be interested in"})]}),b.jsx("ul",{className:"grow",children:r.map((l,z)=>{const u=l?.id||`loading-${z}`,f=l?.name||"",O=l?.handle||"",h=l?.avatarUrl||"";let q;switch(z){case 0:q="[@media(max-height:740px)]:hidden";break;case 1:q="[@media(max-height:800px)]:hidden";break;case 2:q="[@media(max-height:860px)]:hidden";break}return b.jsx(p.Fragment,{children:b.jsx("li",{className:q,children:b.jsx(Zo,{actor:l,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Yp,{onClick:()=>{!n&&l&&Fo(l,e)},children:[n?b.jsx(j1,{className:"z-10 size-10"}):b.jsx(en,{author:{icon:{url:h},name:f,handle:O},showFollowButton:!0}),b.jsxs("div",{className:"flex min-w-0 flex-col",children:[b.jsx("span",{className:"block max-w-[190px] truncate font-semibold text-black dark:text-white",children:n?b.jsx(j1,{className:"w-24"}):f}),b.jsx("span",{className:"block max-w-[190px] truncate text-sm text-gray-700 dark:text-gray-600",children:n?b.jsx(j1,{className:"w-40"}):O})]})]})})})},u)},u)})}),b.jsx(i1,{className:"p-0 font-medium text-purple hover:text-black dark:hover:text-white",variant:"link",onClick:()=>{a(),e("/explore")},children:"Find more →"})]})},tr0=({profile:e,update:t,isLoading:o,onOpenChange:n})=>{const r=()=>{t(e.id,{followedByMe:!0})},a=()=>{t(e.id,{followedByMe:!1})},i=qo();return b.jsx(Zo,{actor:e,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Yp,{onClick:()=>{n?.(!1),i(`/profile/${e.handle}`)},children:[b.jsx(en,{author:{icon:{url:e.avatarUrl},name:e.name,handle:e.handle},onClick:()=>n?.(!1)}),b.jsxs("div",{className:"break-anywhere flex grow flex-col",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:o?b.jsx(j1,{className:"w-full max-w-64"}):e.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:o?b.jsx(j1,{className:"w-24"}):e.handle})]}),o?b.jsx("div",{className:"inline-flex items-center",children:b.jsx(j1,{className:"w-12"})}):b.jsx(f5,{className:"ml-auto",following:e.followedByMe,handle:e.handle,type:"secondary",onFollow:r,onUnfollow:a})]},e.id)})})},or0=({onOpenChange:e})=>{const{suggestedProfilesQuery:t,updateSuggestedProfile:o}=u5("index",5),{data:n=[],isLoading:r}=t;return!r&&(!n||n.length===0)?null:b.jsx("div",{className:"mb-[-15px] flex flex-col gap-3 pt-2",children:b.jsx("div",{className:"flex flex-col",children:(r?Array(5).fill(null):n||[]).map((a,i)=>b.jsx(M0.Fragment,{children:b.jsx(tr0,{isLoading:r,profile:a||{id:"",name:"",handle:"",avatarUrl:"",bio:"",followerCount:0,followingCount:0,followedByMe:!1},update:o,onOpenChange:e})},a?.id||`loading-${i}`))})})};function nr0(e,t,o,n){var r=this,a=p.useRef(null),i=p.useRef(0),l=p.useRef(0),z=p.useRef(null),u=p.useRef([]),f=p.useRef(),O=p.useRef(),h=p.useRef(e),q=p.useRef(!0);h.current=e;var g=typeof window<"u",W=!t&&t!==0&&g;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(o=o||{}).leading,y=!("trailing"in o)||!!o.trailing,k="maxWait"in o,C="debounceOnServer"in o&&!!o.debounceOnServer,L=k?Math.max(+o.maxWait||0,t):null;p.useEffect(function(){return q.current=!0,function(){q.current=!1}},[]);var x=p.useMemo(function(){var w=function(J){var i0=u.current,L0=f.current;return u.current=f.current=null,i.current=J,l.current=l.current||J,O.current=h.current.apply(L0,i0)},P=function(J,i0){W&&cancelAnimationFrame(z.current),z.current=W?requestAnimationFrame(J):setTimeout(J,i0)},H=function(J){if(!q.current)return!1;var i0=J-a.current;return!a.current||i0>=t||i0<0||k&&J-i.current>=L},o0=function(J){return z.current=null,y&&u.current?w(J):(u.current=f.current=null,O.current)},Y=function J(){var i0=Date.now();if(v&&l.current===i.current&&Z(),H(i0))return o0(i0);if(q.current){var L0=t-(i0-a.current),K=k?Math.min(L0,L-(i0-i.current)):L0;P(J,K)}},Z=function(){n&&n({})},n0=function(){if(g||C){var J=Date.now(),i0=H(J);if(u.current=[].slice.call(arguments),f.current=r,a.current=J,i0){if(!z.current&&q.current)return i.current=a.current,P(Y,t),v?w(a.current):O.current;if(k)return P(Y,t),w(a.current)}return z.current||P(Y,t),O.current}};return n0.cancel=function(){var J=z.current;J&&(W?cancelAnimationFrame(z.current):clearTimeout(z.current)),i.current=0,u.current=a.current=f.current=z.current=null,J&&n&&n({})},n0.isPending=function(){return!!z.current},n0.flush=function(){return z.current?o0(Date.now()):O.current},n0},[v,k,t,L,y,W,g,C,n]);return x}function rr0(e,t){return e===t}function cr0(e,t,o){var n=rr0,r=p.useRef(e),a=p.useState({})[1],i=nr0(p.useCallback(function(z){r.current=z,a({})},[a]),t,o,a),l=p.useRef(e);return n(l.current,e)||(i(e),l.current=e),[r.current,i]}const $i=80,ar0=({onOpenChange:e,query:t,setQuery:o})=>{const n=p.useRef(null),r=p.useRef([]),a=p.useRef(0),i=qo(),[l]=cr0(t,300),z=t.length>=2,{searchQuery:u,updateAccountSearchResult:f}=un0("index",z?l:""),{data:O,isFetching:h,isFetched:q}=u,{suggestedProfilesQuery:g}=u5("index",5),{data:W,isLoading:v}=g,y=v||W&&W.length>0,{topicsQuery:k}=d5(),{data:C}=k,L=z5("index","me"),{data:x}=L,[w,P]=p.useState([]),[H,o0]=p.useState(null),[Y,Z]=p.useState(0),n0=p.useMemo(()=>{const X=C?.topics||[];if(!z||X.length===0)return[];const G=t.toLowerCase();return X.filter(N=>N.slug==="following"?!1:N.name.toLowerCase().startsWith(G)||N.slug.toLowerCase().startsWith(G))},[t,z,C?.topics]),J=p.useMemo(()=>[...n0.map(X=>({type:"topic",data:X})),...w.map(X=>({type:"account",data:X}))],[n0,w]);p.useEffect(()=>{if(!z){P([]),o0(null);return}q&&(O?.accounts&&O.accounts.length>0?(P(O.accounts),o0("results"),Z(0)):(P([]),o0("none"),Z(0)))},[O?.accounts,q,z]);const i0=h&&z,L0=t.length<2||!H&&z&&n0.length===0,K=!L0&&H==="none"&&n0.length===0,m0=!L0&&(w.length>0||n0.length>0);p.useEffect(()=>{n.current?.focus()},[]),p.useEffect(()=>{const X=r.current[Y];if(!X)return;const G=X.closest("[data-radix-scroll-area-viewport]")||X.closest(".overflow-y-auto");if(!G){X.scrollIntoView({block:"nearest"});return}const N=G.getBoundingClientRect(),I=X.getBoundingClientRect();I.top<N.top+$i?G.scrollTo({top:G.scrollTop-(N.top+$i-I.top),behavior:"smooth"}):I.bottom>N.bottom-$i&&G.scrollTo({top:G.scrollTop+(I.bottom-N.bottom+$i),behavior:"smooth"})},[Y]);const $=X=>{if(!(!m0||J.length===0)){if(X.key==="ArrowDown"||X.key==="ArrowUp"){X.preventDefault();const G=Date.now();if(G-a.current<50)return;a.current=G,X.key==="ArrowDown"?Z(N=>(N+1)%J.length):Z(N=>(N-1+J.length)%J.length)}else if(X.key==="Enter"){const G=J[Y];if(!G)return;X.preventDefault(),e?.(!1),G.type==="topic"?i(`/explore/${G.data.slug}`):i(`/profile/${G.data.handle}`)}}};return b.jsxs(b.Fragment,{children:[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-150 before:content-[""] dark:bg-[#101114] dark:before:border-b-gray-950',children:[b.jsx(Td,{className:"text-gray-600",size:18,strokeWidth:1.5}),b.jsx(oM,{ref:n,autoComplete:"off",className:"flex h-10 w-full items-center rounded-lg border-0 bg-transparent px-0 py-1.5 text-lg focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Search by name, handle, or URL...",title:"Search",type:"text",value:t,onChange:X=>o(X.target.value),onKeyDown:$}),i0&&b.jsx(Hp,{className:"absolute! right-0 mr-0.5 shrink-0",size:"sm"})]}),b.jsxs("div",{className:"h-full",children:[K&&b.jsx("div",{className:"flex h-full items-center justify-center pb-14",children:b.jsxs(u00,{children:[b.jsx(d00,{children:b.jsx(Pd,{})}),"No users matching this handle or account URL"]})}),m0&&b.jsx("div",{className:"mt-[-14px] pb-2",children:J.map((X,G)=>{const N=G===Y;if(X.type==="topic")return b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Yp,{isSelected:N,onClick:()=>{e?.(!1),i(`/explore/${X.data.slug}`)},children:[b.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-900",children:b.jsx(jp,{className:"text-gray-700 dark:text-gray-500",size:18,strokeWidth:1.5})}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{className:"font-semibold text-black dark:text-white",children:X.data.name}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Topic"})]})]})},X.data.slug);const I=X.data,c0=I.handle===x?.handle;return b.jsx(Zo,{actor:I,align:"center",isCurrentUser:c0,side:"left",children:b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Yp,{isSelected:N,onClick:()=>{e?.(!1),i(`/profile/${I.handle}`)},children:[b.jsx(en,{author:{icon:{url:I.avatarUrl},name:I.name,handle:I.handle}}),b.jsxs("div",{className:"break-anywhere flex flex-col",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:I.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:I.handle})]}),I.blockedByMe||I.domainBlockedByMe?b.jsx(i1,{className:"pointer-events-none ml-auto min-w-[90px]",variant:"destructive",children:"Blocked"}):c0?null:b.jsx(f5,{className:"ml-auto",following:I.followedByMe,handle:I.handle,type:"secondary",onFollow:()=>f(I.id,{followedByMe:!0}),onUnfollow:()=>f(I.id,{followedByMe:!1})})]})})},I.id)})}),L0&&y&&b.jsxs(b.Fragment,{children:[b.jsx(V2,{children:"More people to follow"}),b.jsx(or0,{onOpenChange:e})]})]})]})},sr0=()=>b.jsxs("div",{className:"inline-flex h-9 w-full items-center justify-start gap-2 rounded-full bg-gray-100 px-3 text-md font-normal text-gray-600 hover:bg-gray-200 hover:text-gray-600 dark:bg-gray-925/70 dark:text-gray-700 dark:hover:bg-gray-925 [&_svg]:size-[18px]",children:[b.jsx(Td,{size:18,strokeWidth:1.5})," Search the social web"]}),xn=p.forwardRef(({to:e,children:t,count:o,...n},r)=>{const a=we(),{resetStack:i}=w3(),l=hM(),z=e&&e.startsWith("/")?`${l}${e}`:e,u=z&&(a.pathname===z||a.pathname.startsWith(`${z}/`)),f=R0("justify-start text-md font-medium text-gray-800 dark:hover:bg-gray-925/70 dark:text-gray-500 h-9 [&_svg]:size-[18px]",u&&"bg-gray-100 dark:bg-gray-925/70 dark:text-white text-black font-semibold"),O=o&&o>0?b.jsx("span",{className:R0("ml-auto bg-purple-500 text-white text-xs font-semibold py-1 px-1.5 rounded-full min-w-[20px] h-5 flex items-center justify-center"),children:F3(o)}):null;return z?b.jsx(i1,{className:f,variant:"ghost",asChild:!0,children:b.jsxs(Za,{to:z,onClick:()=>{i(),I00(z)},children:[t,O]})}):b.jsxs(i1,{ref:r,className:f,variant:"ghost",onClick:n.onClick,...n,children:[t,O]})});xn.displayName="SidebarMenuLink";const PW=({isMobileSidebarOpen:e})=>{const{allFlags:t,flags:o}=tn0(),[n,r]=p.useState(!1),[a,i]=p.useState(""),{data:l}=ye(),z=we(),u=hM(),{data:f}=kW(l?.slug||""),O=hn0(l?.slug||""),{topicsQuery:h}=d5(),{data:q,isLoading:g}=h,W=!g&&q&&q.topics.length===0;p.useEffect(()=>{z.pathname===`${u}/notifications`&&f&&f>0&&O.mutate()},[z.pathname,u,f,O]);const v=p.useCallback(()=>{f&&f>0&&O.mutate()},[f,O]);return b.jsx("div",{className:`sticky top-0 flex min-h-screen w-[320px] flex-col border-l border-gray-200 pr-8 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:b.jsxs("div",{className:"flex grow flex-col justify-between",children:[b.jsxs("div",{className:"isolate flex w-full flex-col items-start gap-6 pt-6 pl-6",children:[b.jsx("div",{className:"flex h-[52px] w-full items-center",children:b.jsxs(rs,{open:n,onOpenChange:r,children:[b.jsx(rm,{className:"mt-0.5 w-full",children:b.jsx(sr0,{})}),b.jsx(Mc,{className:"flex h-full max-h-[452px] flex-col overflow-y-auto pb-0",children:b.jsx(ar0,{query:a,setQuery:i,onOpenChange:r})})]})}),b.jsxs("div",{className:"flex w-full flex-col gap-px",children:[b.jsxs(xn,{to:"/reader",children:[b.jsx(aZ,{size:18,strokeWidth:1.5}),"Reader"]}),b.jsxs(xn,{to:"/notes",children:[b.jsx(Sd,{size:18,strokeWidth:1.5}),"Notes"]}),b.jsxs(xn,{count:z.pathname!==`${u}/notifications`?f:void 0,to:"/notifications",onClick:v,children:[b.jsx(rZ,{size:18,strokeWidth:1.5}),"Notifications"]}),W?b.jsx(i1,{className:"inline-flex w-full items-center gap-2 rounded-sm px-3 py-2.5 text-left text-md font-medium text-gray-800 transition-colors hover:bg-gray-100 dark:text-gray-500 dark:hover:bg-gray-925/70",variant:"ghost",asChild:!0,children:b.jsxs("a",{href:"https://explore.ghost.org/social-web",rel:"noopener noreferrer",target:"_blank",children:[b.jsx(jp,{size:18,strokeWidth:1.5}),"Explore",b.jsx(Bd,{className:"ml-auto",size:14,strokeWidth:1.5})]})}):b.jsxs(xn,{to:"/explore",children:[b.jsx(jp,{size:18,strokeWidth:1.5}),"Explore"]}),b.jsxs(xn,{to:"/profile",children:[b.jsx(jd,{size:18,strokeWidth:1.5}),"Profile"]}),b.jsxs(xn,{to:"/preferences",children:[b.jsx(MK,{size:18,strokeWidth:1.5}),"Preferences"]})]}),b.jsx(h5,{children:b.jsxs(i1,{className:"h-9 rounded-full bg-purple-500 px-3 text-md text-white hover:bg-purple-600 dark:hover:bg-purple-600",children:[b.jsx(LZ,{}),"New note"]})}),b.jsx(er0,{}),t.map(y=>o[y]?b.jsxs("div",{className:"flex items-center justify-between gap-1 pl-3 opacity-50",children:[b.jsx("span",{className:"font-mono text-xs",children:y}),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"})]},y):b.jsx(b.Fragment,{}))]}),b.jsx("div",{className:"sticky bottom-0 flex items-center gap-2 bg-white pb-4 pl-4 dark:bg-black",children:b.jsx(Jn0,{})})]})})};PW.displayName="Sidebar";const ir0=({children:e,...t})=>{const{isOnboarded:o}=SW(),n=hM(),{data:r,isLoading:a}=ye(),i=p.useRef(null),[l,z]=p.useState(!1),u=RW(),{topicsQuery:f}=d5(),{data:O}=f,h=O&&O.topics.length>0,{isNewNoteModalOpen:q,setIsNewNoteModalOpen:g}=BW(),W=()=>{z(!l)},v=()=>{z(!1)};return a||!r?null:o?b.jsxs("div",{ref:i,className:`h-screen w-full ${o&&"overflow-y-auto"}`,"data-scrollable-container":!0,children:[b.jsx(F00,{containerRef:i}),b.jsx("div",{className:"relative mx-auto flex max-w-page flex-col",...t,children:o?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"block grid-cols-[auto_320px] items-start lg:grid",children:[b.jsxs("div",{className:"z-0 min-w-0",children:[b.jsx(rn0,{showBorder:!(u==="reader"&&h)&&u!=="explore",onToggleMobileSidebar:W}),b.jsx("div",{className:"px-[min(4vw,32px)]",children:e})]}),b.jsx(PW,{isMobileSidebarOpen:l,onCloseMobileSidebar:v})]}),l&&b.jsx("div",{className:"fixed inset-0 z-40 lg:hidden",onClick:v})]}):b.jsx(TW,{})}),b.jsx(h5,{open:q,onOpenChange:g})]}):b.jsx(ro,{to:`${n}/welcome`,replace:!0})},pa=({children:e})=>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-925/70 [&_svg]:size-8 [&_svg]:stroke-1",children:e}),Ma=({children:e,className:t})=>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}),jW=({statusCode:e,errorCode:t})=>{const o=Zq(),n=xg(),r=a=>{a.preventDefault(),n("/analytics/",{crossApp:!0})};return o?b.jsx(ir0,{children:b.jsxs(Ma,{children:[b.jsx(pa,{children:b.jsx(sK,{})}),b.jsx(V2,{className:"-mb-4",children:"Oops, page not found!"}),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?b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx($9,{})}),b.jsx(V2,{className:"-mb-4",children:"Rate limit exceeded"}),b.jsx("div",{children:"You've made too many requests. Please try again in a moment."}),b.jsx(i1,{asChild:!0,children: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"?b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx(H9,{})}),b.jsx(V2,{className:"-mb-4",children:"Site not configured correctly"}),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."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx(oZ,{})}),b.jsx(V2,{className:"-mb-4",children:"Account suspended"}),b.jsx("div",{children:"Your account has been suspended due to policy violations."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):e===410&&t==="INVALID_VERSION"?b.jsxs(Ma,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(pa,{children:b.jsx(gZ,{})}),b.jsx(V2,{className:"-mb-4",children:"New version available"}),b.jsx("div",{children:"We've made some updates! Refresh your page to see what's new"}),b.jsx(i1,{asChild:!0,children:b.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Refresh your page"})})]}):b.jsx("div",{className:"admin-x-container-error",children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),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."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:r,children:"← Back to the homepage"})]})})},pr0=Object.freeze(Object.defineProperty({__proto__:null,default:jW},Symbol.toStringTag,{value:"Module"})),Mr0="activitypub",XW=[{path:Mr0,element:b.jsx(Bn,{}),errorElement:b.jsx(jW,{}),handle:"activitypub-basepath",children:[{index:!0,element:b.jsx(ro,{to:"reader"})},{path:"inbox",element:b.jsx(ro,{to:"../reader",replace:!0})},{path:"feed",element:b.jsx(ro,{to:"../notes",replace:!0})},{path:"reader",lazy:w1(()=>m1(()=>import("./index-CCF2RKxR.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"reader/:postId",lazy:w1(()=>m1(()=>import("./index-CCF2RKxR.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"notes",lazy:w1(()=>m1(()=>import("./feed-T3kW9UJA.js"),__vite__mapDeps([7,8]),import.meta.url)),pageTitle:"Notes"},{path:"notes/:postId",lazy:w1(()=>m1(()=>import("./note-996Zos9G.js"),__vite__mapDeps([9,2,3,8]),import.meta.url)),pageTitle:"Note"},{path:"notifications",lazy:w1(()=>m1(()=>import("./index-mqQc8MVd.js"),__vite__mapDeps([10,11,12,13]),import.meta.url)),pageTitle:"Notifications"},{path:"explore",lazy:w1(()=>m1(()=>import("./index-CcFVbffG.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"explore/:topic",lazy:w1(()=>m1(()=>import("./index-CcFVbffG.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"profile",lazy:w1(()=>m1(()=>import("./index-qQZsxgFE.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/likes",lazy:w1(()=>m1(()=>import("./index-qQZsxgFE.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/following",lazy:w1(()=>m1(()=>import("./index-qQZsxgFE.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/followers",lazy:w1(()=>m1(()=>import("./index-qQZsxgFE.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"profile/:handle/:tab?",lazy:w1(()=>m1(()=>import("./index-qQZsxgFE.js"),__vite__mapDeps([16,17,18,19,20,11,21,22,23,24,25,26,27,28,8,6,29,1,30,12,31,13,15,3,32]),import.meta.url)),pageTitle:"Profile"},{path:"preferences",lazy:w1(()=>m1(()=>import("./index-DJa3pLmx.js"),__vite__mapDeps([33,34,30,27,32,18,19,20,11]),import.meta.url)),pageTitle:"Preferences"},{path:"preferences/moderation",lazy:w1(()=>m1(()=>import("./moderation-DwKm9LO-.js"),__vite__mapDeps([35,21,22,23,24,25,11,26,27,28,8,6,29,1,17,30,12,31,13,15,3]),import.meta.url)),pageTitle:"Moderation",showBackButton:!0},{path:"preferences/bluesky-sharing",lazy:w1(()=>m1(()=>import("./bluesky-sharing-CkI1QuAm.js"),__vite__mapDeps([36,18,19,20,11,27]),import.meta.url)),showBackButton:!0},{path:"welcome",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>Yn0),void 0,import.meta.url)),pageTitle:"Welcome",children:[{path:"",element:b.jsx(ro,{to:"1",replace:!0})},{path:"1",lazy:w1(()=>m1(()=>import("./step-1-BUvsuCs0.js"),__vite__mapDeps([37,27]),import.meta.url))},{path:"2",lazy:w1(()=>m1(()=>import("./step-2-DI9ekXls.js"),__vite__mapDeps([38,39,13,31]),import.meta.url))},{path:"3",lazy:w1(()=>m1(()=>import("./step-3-DzT_XhaS.js"),__vite__mapDeps([40,39,13,31,23,6,8]),import.meta.url))},{path:"*",element:b.jsx(ro,{to:"1",replace:!0})}]},{path:"*",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>pr0),void 0,import.meta.url))}]}];function lr0(){return b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[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"}),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 Jp({path:e,activeOnSubpath:t=!1}){const o=t&&e?`${e}/*`:e;return jF(o||"")!==null}function H0({children:e,...t}){return b.jsx(Jd,{...t,children:e})}const DW=M0.createContext(null);function IW(){const e=M0.useContext(DW);if(!e)throw new Error("NavMenuItem.Collapsible components must be used within NavMenuItem.Collapsible");return e}function br0({children:e,expanded:t,id:o,onExpandedChange:n}){const r={expanded:t,id:o,onExpandedChange:n};return b.jsx(DW.Provider,{value:r,children:e})}function zr0({ariaLabel:e,children:t}){const{expanded:o,id:n,onExpandedChange:r}=IW();return b.jsxs(H0,{children:[b.jsx(i1,{"aria-controls":n,"aria-expanded":o,"aria-label":e,variant:"ghost",size:"icon",className:"hover:text-gray-black absolute top-0 left-3 h-[34px]! w-auto p-0 text-sidebar-accent-foreground transition-all group-hover/menu-item:opacity-100 hover:bg-transparent focus-visible:opacity-100 sidebar:opacity-0",onClick:()=>void r(!o),children:b.jsx(H3,{size:16,className:`transition-all ${o?"rotate-[90deg]":""}`})}),t]})}function ur0({children:e}){const{expanded:t,id:o}=IW();return b.jsx("div",{id:o,className:`grid transition-all duration-200 ease-out ${t?"mb-5 grid-rows-[1fr]":"mb-0 grid-rows-[0fr]"}`,children:b.jsx("div",{className:"overflow-hidden",children:t?e:null})})}function dr0({to:e,target:t,rel:o,activeOnSubpath:n=!1,isActive:r,children:a,...i}){const l=`#/${e?.replace(/^\/?#\//,"")}`,z=Jp({path:e,activeOnSubpath:n}),u=r!==void 0?r:z,{isMobile:f,setOpenMobile:O}=Jn(),h=()=>{f&&O(!1)};return b.jsx(rM,{asChild:!0,isActive:u,...i,children:b.jsx("a",{href:t==="_blank"?e:l,rel:t==="_blank"?o??"noopener noreferrer":o,target:t,"aria-current":u?"page":void 0,onClick:h,children:a})})}function Or0({children:e,...t}){return b.jsx("span",{...t,children:e})}function fr0({onClick:e,children:t,...o}){const{isMobile:n,setOpenMobile:r}=Jn(),a=()=>{n&&r(!1),e?.()};return b.jsx(rM,{onClick:a,...o,children:t})}H0.Link=dr0;H0.Label=Or0;H0.Button=fr0;H0.Collapsible=br0;H0.CollapsibleItem=zr0;H0.CollapsibleMenu=ur0;function Ar0({...e}){const{data:t}=ye(),{data:o}=AM(),n=oo(o?.settings,"social_web_enabled")??!1,a=sM().data?.site.url,{data:i=0}=kW(t?.slug||"",n),l=Jp({path:"network",activeOnSubpath:!0}),z=Jp({path:"activitypub",activeOnSubpath:!0}),u=i>0&&!l&&!z;return!t||!b10(t)?null:b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[b.jsx(H0,{children:b.jsxs(H0.Link,{to:"analytics",activeOnSubpath:!0,children:[b.jsx(Q9,{}),b.jsx(H0.Label,{children:"Analytics"})]})}),n&&b.jsxs(H0,{children:[b.jsxs(H0.Link,{to:"network",isActive:l||z,children:[b.jsx(lr0,{}),b.jsx(H0.Label,{children:"Network"})]}),u&&b.jsx(e5,{children:i})]}),b.jsxs(H0,{className:"group/viewsite relative",children:[b.jsxs(H0.Link,{to:"site",children:[b.jsx(YG,{}),b.jsx(H0.Label,{children:"View site"})]}),b.jsx("a",{href:a,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 transition-all group-hover/viewsite:opacity-100 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",children:b.jsx(Bd,{size:16})})]})]})})})}const mM="MembersResponseType",hr0=Xt({dataType:mM,path:"/members/"}),Ia0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:"CommentsResponseType"}}),Fa0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:"CommentsResponseType"}}),Ha0=wq({dataType:mM,path:"/members/",defaultSearchParams:{include:"labels,tiers",limit:"100",order:"created_at desc"},defaultNextPageParams:(e,t)=>{var o;if((o=e.meta)!=null&&o.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.members),n=t[t.length-1].meta;return{members:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}});function FW({filter:e,search:t,all:o}){if(!o&&!e&&!t)throw new Error("Bulk operation requires a filter, search, or all flag");const n={};return o&&(n.all="true"),e&&(n.filter=e),t&&(n.search=t),n}const Ua0=Ve({method:"PUT",path:()=>"/members/bulk/",body:({action:e})=>({bulk:{action:e.type,meta:e.meta||{},newsletter:e.newsletter}}),searchParams:FW,invalidateQueries:{dataType:mM}}),Va0=Ve({method:"DELETE",path:()=>"/members/",searchParams:FW,invalidateQueries:{dataType:mM}});function qr0(){const{data:e}=hr0({searchParams:{limit:"1"}});return e?.meta?.pagination.total}const mr0=()=>OM({select:e=>e.navigation}),gr0=()=>{const{mutateAsync:e}=fM();return Me({mutationFn:async t=>{await e({navigation:t})}})},BA=e=>{const{data:t}=mr0(),{mutateAsync:o}=gr0();return[t?.expanded[e]??!0,async a=>o({expanded:{...t?.expanded??eu.expanded,[e]:a}})]},Wr0=Gp({name:L2(),route:L2(),color:L2().optional(),icon:L2().optional(),filter:so0(L2(),L2().nullable())});function SA(e){return e.trim().toLowerCase()}function vr0(e,t){const o=Object.keys(e),n=Object.keys(t);return o.length!==n.length?!1:o.every(r=>e[r]===t[r])}function Rr0(e,t){return e.route===t.route&&vr0(e.filter,t.filter)}function Qa0(e,t){return e.flatMap((o,n)=>Rr0(o,t)?[n]:[])}function $a0(e,t,o){const n=SA(t.name);return e.some((r,a)=>a!==o&&r.route===t.route&&SA(r.name)===n)}function yr0(e){try{const t=JSON.parse(e);return Array.isArray(t)?{ok:!0,views:t.flatMap(n=>{const r=Wr0.safeParse(n);return r.success?[r.data]:[]})}:(console.error("Failed to parse shared_views setting:",new Error("shared_views is not an array")),{ok:!0,views:[]})}catch{return{ok:!1,error:new Error("shared_views JSON parse failed")}}}function wr0(e){return{midgrey:"#7C8B9A",blue:"#14b8ff",green:"#30cf43",red:"#f50b23",teal:"#4dcddc",purple:"#8e42ff",yellow:"#ffb41f",orange:"#fe8b05",pink:"#fb2d8d"}[e]||"#7C8B9A"}function HW(e){const{data:t}=AM();return p.useMemo(()=>{const o=oo(t?.settings,"shared_views")??"[]",n=yr0(o);return n.ok?e?n.views.filter(r=>r.route===e):n.views:(console.error("Failed to parse shared_views setting:",n.error),[])},[t,e])}function UW({views:e}){return e.length===0?null:b.jsx(b.Fragment,{children:e.map(t=>b.jsx(H0,{children:b.jsxs(H0.Link,{className:"pl-9",to:t.to,isActive:t.isActive,children:[b.jsx(H0.Label,{className:t.color?"grow":void 0,children:t.name}),t.color&&b.jsx("span",{className:"mx-0.5 size-2 shrink-0 rounded-full",style:{backgroundColor:wr0(t.color)},"data-color":t.color,"aria-hidden":"true"})]})},t.key))})}function VW(e="posts"){const t=Bg(),o=HW(e);return p.useMemo(()=>o.map(n=>{const 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,o])}function Lr0({route:e="posts"}){const t=VW(e);return b.jsx(UW,{views:t})}function xr0(e){return e.route==="members"&&typeof e.filter.filter=="string"&&e.filter.filter.length>0}function kr0(e){return`members-forward?${new URLSearchParams({filter:e}).toString()}`}function Cr0(e,t){return new URLSearchParams(e).get("filter")===t}function QW(){const e=we(),t=HW("members"),o=e.pathname==="/members-forward";return p.useMemo(()=>t.filter(xr0).map(n=>({key:`${n.name}:${n.filter.filter}`,name:n.name,to:kr0(n.filter.filter),isActive:o&&Cr0(e.search,n.filter.filter)})),[o,e.search,t])}function Nr0(){const e=QW();return b.jsx(UW,{views:e})}function _r0(){return["members-forward","members","member","member.new"]}function Er0({membersForwardEnabled:e,isOnMembersForward:t,hasActiveMemberView:o,isMembersExpanded:n,isLegacyMembersRouteActive:r}){return e&&t?o?!n:!0:r}const e3=e=>{const{data:t}=is();return t?.config.labs?.[e]??!1};function Br0({isActive:e,to:t}){return b.jsxs(b.Fragment,{children:[b.jsxs(H0.Link,{to:t,isActive:e,children:[b.jsx(D9,{className:"pointer-events-none opacity-0 transition-all sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0"}),b.jsx(H0.Label,{children:"Posts"})]}),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 transition-all hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",children:b.jsx(I9,{size:20,className:"mt-px stroke-[1.5px]!"})})]})}function TA({collapsible:e,count:t,isActive:o,to:n}){return b.jsxs(b.Fragment,{children:[b.jsxs(H0.Link,{to:n,isActive:o,children:[b.jsx(G9,{className:e?"pointer-events-none opacity-0 transition-all sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0":""}),b.jsx(H0.Label,{children:"Members"})]}),t!=null&&b.jsx(e5,{children:F3(t)})]})}function Sr0({...e}){const{data:t}=ye(),[o,n]=BA("posts"),[r,a]=BA("members"),i=VW("posts"),l=QW(),z=l.length>0,u=we(),f=qr0(),O=Bg(),h=e3("commentModeration"),q=e3("membersForward"),g=t&&l10(t),W=t&&M10(t),v=O.isRouteActive("posts",{type:"draft"}),y=O.isRouteActive("posts",{type:"scheduled"}),k=O.isRouteActive("posts",{type:"published"}),C=v||y||k||i.some(J=>J.isActive),L=o,x=u.pathname==="/members-forward",w=x&&l.some(J=>J.isActive),P=r,H=Er0({membersForwardEnabled:q,isOnMembersForward:x,hasActiveMemberView:w,isMembersExpanded:P,isLegacyMembersRouteActive:O.isRouteActive(_r0())}),o0=O.getRouteUrl("posts"),Z=O.isRouteActive("posts")||!L&&C,n0=q?"members-forward":O.getRouteUrl("members");return b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[b.jsxs(H0.Collapsible,{expanded:L,id:"posts-submenu",onExpandedChange:n,children:[b.jsx(H0.CollapsibleItem,{ariaLabel:"Toggle post views",children:b.jsx(Br0,{isActive:Z,to:o0})}),b.jsxs(H0.CollapsibleMenu,{children:[b.jsx(H0,{children:b.jsx(H0.Link,{className:"pl-9",to:"posts?type=draft",isActive:v,children:b.jsx(H0.Label,{children:"Drafts"})})}),b.jsx(H0,{children:b.jsx(H0.Link,{className:"pl-9",to:"posts?type=scheduled",isActive:y,children:b.jsx(H0.Label,{children:"Scheduled"})})}),b.jsx(H0,{children:b.jsx(H0.Link,{className:"pl-9",to:"posts?type=published",isActive:k,children:b.jsx(H0.Label,{children:"Published"})})}),b.jsx(Lr0,{})]})]}),b.jsx(H0,{children:b.jsxs(H0.Link,{to:O.getRouteUrl("pages"),isActive:O.isRouteActive("pages"),children:[b.jsx(NZ,{}),b.jsx(H0.Label,{children:"Pages"})]})}),g&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"tags",activeOnSubpath:!0,children:[b.jsx(uK,{}),b.jsx(H0.Label,{children:"Tags"})]})}),W&&b.jsx(b.Fragment,{children:q&&z?b.jsxs(H0.Collapsible,{expanded:P,id:"members-submenu",onExpandedChange:a,children:[b.jsx(H0.CollapsibleItem,{ariaLabel:"Toggle member views",children:b.jsx(TA,{collapsible:!0,count:f,isActive:H,to:n0})}),b.jsx(H0.CollapsibleMenu,{children:b.jsx(Nr0,{})})]}):b.jsx(H0,{children:b.jsx(TA,{collapsible:!1,count:f,isActive:H,to:n0})})}),W&&h&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"comments",activeOnSubpath:!0,children:[b.jsx(ZZ,{}),b.jsx(H0.Label,{children:"Comments"})]})})]})})})}const PA=function(){let t,o;return{promise:new Promise((r,a)=>{t=r,o=a}),resolve:t,reject:o}},Kb="https://do.featurebase.app/js/sdk.js";let ua=null;function Tr0(){return ua||(ua=new Promise((e,t)=>{if(document.querySelector(`script[src="${Kb}"]`)){e();return}const n=document.createElement("script");n.src=Kb,n.onload=()=>e(),n.onerror=r=>{n.remove(),ua=null;const a=new Error(`[Featurebase] Failed to load SDK from ${Kb}`,{cause:r});console.error(a),t(a)},document.head.appendChild(n)})),ua}function Pr0(){const{data:e}=is(),{data:t}=OM(),o=e3("featurebaseFeedback"),[n,r]=p.useState(!1),{organization:a,enabled:i}=e?.config.featurebase??{},l=!!(o&&i),z=t?.nightShift?"dark":"light",{data:u}=G00({enabled:l&&n}),f=u?.featurebase?.token;p.useEffect(()=>{n&&Tr0().catch(g=>{console.error("[Featurebase] Failed to load SDK:",g)})},[n]);const O=p.useRef(PA());p.useEffect(()=>{!n||!a||!f||ua?.then(()=>{window.Featurebase?.("initialize_feedback_widget",{organization:a,theme:z,featurebaseJwt:f},g=>{g?(console.error("[Featurebase] Failed to initialize widget:",g),O.current.reject(g),O.current=PA(),r(!1)):O.current.resolve()})})},[a,z,f,n]);const h=p.useCallback(()=>{l&&r(!0)},[l]);return{openFeedbackWidget:p.useCallback(g=>{l&&(r(!0),O.current.promise.then(()=>{window.postMessage({target:"FeaturebaseWidget",data:{action:"openFeedbackWidget",...g?.board&&{setBoard:g.board}}},"*")}))},[l]),preloadFeedbackWidget:h}}function jr0({...e}){const{data:t}=ye(),{data:o}=is(),n=e3("featurebaseFeedback"),{openFeedbackWidget:r,preloadFeedbackWidget:a}=Pr0();if(!t)return null;const l=o?.config.hostSettings?.billing?.enabled&&Ms(t),z=n&&!ls(t)&&o?.config.featurebase?.enabled;return!l&&!z?null:b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[l&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"pro",children:[b.jsx(vZ,{}),b.jsx(H0.Label,{children:"Ghost(Pro)"})]})}),z&&b.jsx(H0,{children:b.jsxs(H0.Button,{onClick:r,onMouseEnter:a,onFocus:a,children:[b.jsx(Sd,{}),b.jsx(H0.Label,{children:"Feedback"})]})})]})})})}function Xr0({...e}){const{data:t}=ye(),o=t&&p10(t);return b.jsx(lc,{...e,children:b.jsx(ss,{children:b.jsxs(bc,{children:[o&&b.jsx(H0,{children:b.jsxs(H0.Link,{to:"settings",children:[b.jsx(H9,{}),b.jsx(H0.Label,{children:"Settings"})]})}),b.jsx(H0,{children:b.jsxs(H0.Link,{to:"https://ghost.org/help?utm_source=admin&utm_campaign=help",target:"_blank",rel:"noopener noreferrer",children:[b.jsx(AZ,{}),b.jsx(H0.Label,{children:"Help"})]})})]})})})}function Dr0(){const{banner:e,bannerType:t}=p5();let o="";return t==="theme-errors"?o="pb-[110px]":t==="upgrade"?o="pb-[254px]":t==="whats-new"&&(o="pb-[180px]"),b.jsxs(yg,{className:"justify-between px-3 pt-4",children:[b.jsxs("div",{className:"flex flex-col gap-2 sidebar:gap-4",children:[b.jsx(Ar0,{}),b.jsx(Sr0,{}),b.jsx(jr0,{})]}),b.jsxs("div",{className:`flex flex-col gap-2 sidebar:gap-4 ${o}`,children:[b.jsx(Ko0,{banner:e}),b.jsx(Xr0,{className:"pb-0"})]})]})}function Ir0({...e}){return b.jsxs(mg,{...e,children:[b.jsx(f10,{className:"px-5 pt-6 pb-0"}),b.jsx(Dr0,{}),b.jsx(Zo0,{className:"gap-0 p-3"})]})}const Gi=1.5;function Yb({to:e,activeOnSubpath:t=!1,children:o,...n}){const r=Jp({path:e,activeOnSubpath:t});return b.jsx(i1,{asChild:!0,className:`w-full max-w-16 min-w-9 rounded-full hover:bg-gray-200 ${r?"bg-gray-200":"bg-transparent"}`,...n,variant:"ghost",size:"icon","data-active":r,children:b.jsx("a",{href:e,children:o})})}function Fr0(){const{isMobile:e}=Jn(),t=o5();return!e||!t?b.jsx(b.Fragment,{}):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: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:[b.jsxs(Yb,{activeOnSubpath:!0,to:"analytics",children:[b.jsx(Q9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Analytics"})]}),b.jsxs(Yb,{activeOnSubpath:!0,to:"posts",children:[b.jsx(D9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Posts"})]}),b.jsxs(Yb,{activeOnSubpath:!0,to:"members",children:[b.jsx(G9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Members"})]}),b.jsxs(gg,{className:"h-9 rounded-full px-8 hover:bg-transparent",children:[b.jsx(X9,{strokeWidth:Gi}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})})}function Hr0({children:e}){const{data:t}=ye(),o=o5();return t&&ls(t)?b.jsxs("div",{className:"relative h-full bg-background",children:[b.jsx("main",{className:"flex h-full flex-col overflow-y-auto",children:b.jsx("div",{className:"flex-1",children:e})}),b.jsx("div",{className:"fixed bottom-3.5 left-3.5 z-20 lg:bottom-8 lg:left-8",children:b.jsx(Po0,{})})]}):b.jsxs(qg,{open:!!t&&o,children:[b.jsx(Ir0,{}),b.jsxs(Wg,{className:`overflow-y-auto bg-background sidebar:max-h-full ${o?"max-h-[calc(100%-var(--mobile-navbar-height))]":"max-h-full"}`,children:[b.jsx("main",{className:"flex-1",children:e}),b.jsx(Fr0,{})]})]})}function Ur0(){const{data:e}=ye();return o10(),t10(),b.jsx(Z00,{children:e?b.jsxs(Hr0,{children:[b.jsx(Bn,{}),b.jsx(Zf,{})]}):b.jsxs(b.Fragment,{children:[b.jsx(t5,{}),b.jsx(Zf,{})]})})}const $W=p.createContext(void 0),Ga0=()=>{const e=p.useContext($W);if(e===void 0)throw new Error("useAppContext must be used within an AppProvider");return e},Vr0=({children:e,value:t})=>{const o=p.useContext(Cu),n=t.externalNavigate??o?.externalNavigate;if(!n)throw new Error("External navigate function is required");const r={externalNavigate:n,fromAnalytics:!1,...o,...t};return b.jsx($W.Provider,{value:r,children:e})},Qr0=[{path:"",errorElement:b.jsx(Up,{onBackToDashboard:()=>{}}),children:[{path:"posts/analytics/:postId",lazy:async()=>{const[{default:e},{default:t}]=await Promise.all([m1(()=>import("./post-analytics-context-GFe0lMc-.js").then(o=>o.p),__vite__mapDeps([41,42]),import.meta.url),m1(()=>import("./post-analytics-AwufPVFE.js"),__vite__mapDeps([43,44,45,42,41]),import.meta.url)]);return{element:b.jsx(e,{children:b.jsx(t,{})})}},children:[{path:"",lazy:w1(()=>m1(()=>import("./overview-r17hlWAB.js"),__vite__mapDeps([46,47,5,24,48,29,49,50,51,52,53,45,41,42,54,55,3,15,56,57,58,59,60,61,62,63,64,22,23,25,11,26,27,28,8,6,1,17,30,12,31,13,65,21]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./web-BPwTFKrc.js"),__vite__mapDeps([66,67,26,41,42,64,48,29,49,50,24,58,22,23,25,11,27,28,8,6,1,17,30,12,31,13,15,3,65,60,61,62,21,68,53,45,54,55,69,5]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./growth-D9sCnmon.js").then(e=>e.g),__vite__mapDeps([47,5,24,48,29,49,50,51,52,53,45,41,42,54,55,3,15,56,57]),import.meta.url))},{path:"newsletter",lazy:w1(()=>m1(()=>import("./newsletter-C0rydPGS.js"),__vite__mapDeps([70,50,24,71,22,23,25,11,26,27,28,8,6,29,1,17,30,12,31,13,15,3,21,52,53,45,41,42,54,55,58,59,60,61,62,63,57]),import.meta.url))}]},{path:"tags",children:[{index:!0,lazy:w1(()=>m1(()=>import("./tags-BHm-dlBs.js"),__vite__mapDeps([72,34,73,44,74,51,17,5]),import.meta.url))},{path:":tagSlug",element:null}]},{path:"comments",lazy:w1(()=>m1(()=>import("./comments-BeoA0nfK.js"),__vite__mapDeps([75,69,26,76,42,74,28,73,44,77,19,13,5]),import.meta.url))},{path:"members-forward",lazy:w1(()=>m1(()=>import("./members-DRLgwCgJ.js"),__vite__mapDeps([78,69,26,17,76,42,74,79,62,25,67,51,80,29,54,81,44,5,82]),import.meta.url))},{path:"*",element:b.jsx(Up,{onBackToDashboard:()=>{}})}]}],$r0={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}},Gr0=Object.values($r0),Zr0=2,Za0={US:"United States",TWN:"Taiwan",TW:"Taiwan","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"},Ka0=["NULL","ᴺᵁᴸᴸ","","Others","Other"],Ya0="https://static.ghost.org/v5.0.0/images/globe-icon.svg",Ur={PUBLIC:1,FREE:2,PAID:4},Ja0=Ur.PUBLIC|Ur.FREE|Ur.PAID,es0=[{name:"Public visitors",value:"undefined",bit:Ur.PUBLIC},{name:"Free members",value:"free",bit:Ur.FREE},{name:"Paid members",value:"paid",bit:Ur.PAID}],GW=p.createContext(void 0),ts0=()=>{const e=p.useContext(GW);if(e===void 0)throw new Error("useGlobalData must be used within a GlobalDataProvider");return e},Kr0=({children:e})=>{const t=AM(),o=sM(),n=is(),r=n.data?.config,a=!!r?.stats,i=xI({enabled:a}),[l,z]=p.useState(Gr0[Zr0].value),[u,f]=p.useState(null),O=[n,t,o],h=O.map(C=>C.error).find(Boolean),q=a?i.error:null,g=h||q,W=O.some(C=>C.isLoading),v=a?i.isLoading:!1,y=W||v;if(g)throw g;const k={url:o.data?.site.url,icon:o.data?.site.icon,title:o.data?.site.title};return b.jsx(GW.Provider,{value:{data:r,site:k,statsConfig:r?.stats,tinybirdToken:i.token,isLoading:y,range:l,setRange:z,settings:t.data?.settings||[],selectedNewsletterId:u,setSelectedNewsletterId:f},children:e})},Yr0=[{path:"analytics",children:[{index:!0,lazy:w1(()=>m1(()=>import("./index-DcFgRUSN.js"),__vite__mapDeps([83,84,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,5,45,55,85,65,60,61,62,86,57,56,42]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./index-8CZdLQzu.js"),__vite__mapDeps([87,84,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,68,58,5,71,88,49,69,85,57,21,65,60,61,62]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./index-DW5aEj6O.js"),__vite__mapDeps([89,84,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,5,65,60,61,62,21,85,90,51,88,56,49,57,91,81,63,86]),import.meta.url))},{path:"newsletters",lazy:w1(()=>m1(()=>import("./index-C-Cpbee5.js"),__vite__mapDeps([92,84,67,26,50,24,29,15,22,23,25,11,27,28,8,6,1,17,30,12,31,13,3,60,61,62,5,65,21,90,51,80,57]),import.meta.url))}]}],Jr0=()=>{const{data:e,isError:t,isLoading:o}=ye();return e?b.jsx(ro,{replace:!0,to:`/settings/staff/${e.slug}`}):t||!o?b.jsx(ro,{replace:!0,to:"/"}):null};function ec0(){return b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("h1",{className:"text-2xl font-bold",children:"404"}),b.jsx("span",{className:"text-grey-500","aria-hidden":"true",children:"|"}),b.jsx("h2",{className:"text-lg text-grey-700",children:"Page not found"})]})})}const tc0=["/","/dashboard","/site","/launch","/setup/*","/signin/*","/signout","/signup/*","/reset/*","/pro/*","/posts","/posts/analytics/:postId/mentions","/posts/analytics/:postId/debug","/restore","/pages","/editor/*","/tags/new","/explore/*","/migrate/*","/members/*","/members-activity","/designsandbox","/mentions"],ZW={allowInForceUpgrade:!0},oc0=tc0.map(e=>({path:e,Component:t5,handle:ZW})),nc0=[{element:b.jsx(a10,{}),children:[{path:"/tags/:tagSlug",Component:t5,handle:ZW},{element:b.jsx(Vr0,{value:{fromAnalytics:!0},children:b.jsx(Bn,{})}),children:Qr0[0].children.filter(e=>e.path!=="*")},{element:b.jsx(Kr0,{children:b.jsx(Bn,{})}),children:Yr0},{path:"network",loader:()=>rF("/activitypub")},{path:"my-profile",Component:Jr0,handle:{allowInForceUpgrade:!0}},{path:"",element:b.jsx(Yo0,{children:b.jsx(Bn,{})}),children:XW},{path:"settings/*",lazy:w1(()=>m1(()=>import("./settings-BTd0Adha.js").then(e=>e.b8),__vite__mapDeps([93,21,22,23,24,25,11,26,27,28,8,6,29,1,17,30,12,31,13,15,3,80,42,79,62,81,91,67,34,20]),import.meta.url)),handle:{allowInForceUpgrade:!0}},...oc0,{path:"*",Component:ec0}]}],rc0=["http:","https:","mailto:","tel:"];function cc0(e){if(e.match(/^[a-z]+:/i))try{const t=new URL(e);return rc0.includes(t.protocol)?(window.location.href=e,!0):!1}catch{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}else{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}}function ac0({children:e}){const{data:t}=AM(),o=p.useMemo(()=>{if(!t?.settings)return;const n=t.settings;return{paidMembersEnabled:oo(n,"paid_members_enabled")??!1,newslettersEnabled:oo(n,"editor_default_email_recipients")!=="disabled",analytics:{emailTrackOpens:oo(n,"email_track_opens")??!1,emailTrackClicks:oo(n,"email_track_clicks")??!1,membersTrackSources:oo(n,"members_track_sources")??!1,outboundLinkTagging:oo(n,"outbound_link_tagging")??!1,webAnalytics:oo(n,"web_analytics_enabled")??!1}}},[t]);return b.jsx(dx,{appSettings:o,children:e})}const sc0={ghostVersion:"",externalNavigate:e=>{cc0(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)}};DR.createRoot(document.getElementById("root")).render(b.jsx(p.StrictMode,{children:b.jsx(ux,{...sc0,children:b.jsx(H00,{prefix:"/",routes:nc0,children:b.jsx(ac0,{children:b.jsx(gY,{className:"shade-admin",darkMode:!1,fetchKoenigLexical:null,children:b.jsx(Ur0,{})})})})})}));export{Lg as $,en as A,i1 as B,H3 as C,rs as D,Ma as E,Zn0 as F,Za as G,V2 as H,Aa0 as I,ha0 as J,ga0 as K,ir0 as L,Wa0 as M,qa0 as N,ma0 as O,Zo as P,X00 as Q,u00 as R,j1 as S,d00 as T,oZ as U,Yp as V,Te as W,Xd as X,Ea0 as Y,Ba0 as Z,Sa0 as _,w3 as a,pc as a$,j9 as a0,WY as a1,K9 as a2,Y9 as a3,em as a4,tm as a5,J9 as a6,nm as a7,om as a8,U3 as a9,E1 as aA,B0 as aB,gx as aC,_h as aD,se as aE,is as aF,sM as aG,AM as aH,xI as aI,eZ as aJ,M7 as aK,ft as aL,b7 as aM,Hj as aN,Uj as aO,Q9 as aP,og as aQ,Fc0 as aR,Bn as aS,xg as aT,Xc0 as aU,rg as aV,D00 as aW,jp as aX,Ga0 as aY,Cc0 as aZ,_c0 as a_,Ao as aa,wg as ab,am as ac,$3 as ad,DZ as ae,Xt as af,Ve as ag,WI as ah,wq as ai,Lq as aj,Nc0 as ak,Wc0 as al,_0 as am,wc0 as an,F3 as ao,mc0 as ap,K0 as aq,DR as ar,Sa as as,m1 as at,_a as au,Mc0 as av,Y2 as aw,q2 as ax,R1 as ay,Qn as az,qo as b,Kc0 as b$,td as b0,tg as b1,X9 as b2,Kd as b3,jc0 as b4,ng as b5,Pn as b6,Xf as b7,vc0 as b8,bn as b9,uc as bA,BZ as bB,ka0 as bC,rZ as bD,ia as bE,Vi as bF,Dd as bG,Id as bH,Fd as bI,O00 as bJ,Dc0 as bK,fg as bL,h00 as bM,q00 as bN,m00 as bO,z00 as bP,yc0 as bQ,gc0 as bR,jd as bS,Vn as bT,Ja0 as bU,es0 as bV,Ur as bW,ts0 as bX,lc0 as bY,kc0 as bZ,ro as b_,z3 as ba,p7 as bb,qt as bc,OX as bd,Fa as be,rc as bf,Tt as bg,Ju as bh,Yu as bi,q3 as bj,Qr as bk,A3 as bl,nc as bm,u3 as bn,d3 as bo,lZ as bp,ho as bq,h5 as br,u5 as bs,zZ as bt,LZ as bu,Ra0 as bv,zn0 as bw,cn0 as bx,jW as by,Ca0 as bz,pa as c,Ya0 as c$,Yc0 as c0,Fg as c1,Na0 as c2,V9 as c3,mK as c4,oM as c5,CY as c6,Gp as c7,_A as c8,EA as c9,Sc0 as cA,Rc0 as cB,kZ as cC,Lc0 as cD,$r0 as cE,jZ as cF,Df as cG,vZ as cH,Gr0 as cI,x2 as cJ,vY as cK,Tb as cL,LY as cM,La0 as cN,va0 as cO,xa0 as cP,cr0 as cQ,v1 as cR,bc0 as cS,zc0 as cT,Ox as cU,uc0 as cV,t3 as cW,Ka0 as cX,Za0 as cY,D9 as cZ,xc0 as c_,Xa0 as ca,Da0 as cb,L2 as cc,An0 as cd,uu as ce,ja0 as cf,ZJ as cg,KJ as ch,YJ as ci,sg as cj,Tc0 as ck,G9 as cl,uK as cm,we as cn,dd as co,fd as cp,Ka as cq,Ya as cr,Td as cs,VJ as ct,QJ as cu,I9 as cv,cg as cw,ag as cx,TG as cy,Bc0 as cz,Qi as d,Y00 as d$,Ec0 as d0,Ha0 as d1,qZ as d2,Ia0 as d3,Fa0 as d4,Sd as d5,$Z as d6,vW as d7,Hn0 as d8,Pa0 as d9,gq as dA,ua0 as dB,Wb as dC,fc0 as dD,Ac0 as dE,Wu as dF,Gc0 as dG,Xo0 as dH,qW as dI,mW as dJ,Do0 as dK,ra0 as dL,ca0 as dM,pa0 as dN,uI as dO,cc as dP,ia0 as dQ,na0 as dR,aa0 as dS,sa0 as dT,Ta as dU,ea0 as dV,za0 as dW,ta0 as dX,oa0 as dY,At as dZ,K00 as d_,Ta0 as da,ya0 as db,wa0 as dc,hr0 as dd,V3 as de,$9 as df,g3 as dg,Ua0 as dh,Va0 as di,qc0 as dj,yr0 as dk,Wr0 as dl,so0 as dm,Jc0 as dn,Qa0 as dp,$a0 as dq,oo as dr,Ma0 as ds,_R as dt,ic0 as du,gN as dv,T6 as dw,eI as dx,Oc0 as dy,tI as dz,Hp as e,sK as e$,J00 as e0,CP as e1,Zc0 as e2,u10 as e3,Oa0 as e4,ba0 as e5,la0 as e6,pe as e7,b10 as e8,Vc0 as e9,Vx as eA,W3 as eB,ga as eC,ye as eD,hc0 as eE,ow as eF,Ic0 as eG,kI as eH,da0 as eI,ls as eJ,vh as eK,Nh as eL,YG as eM,iZ as eN,aZ as eO,OZ as eP,AZ as eQ,gZ as eR,NZ as eS,TZ as eT,FZ as eU,UZ as eV,ZZ as eW,YZ as eX,eK as eY,nK as eZ,F9 as e_,Cz as ea,Ms as eb,Hc0 as ec,Sg as ed,Uc0 as ee,Qc0 as ef,p10 as eg,Tg as eh,$c0 as ei,aM as ej,Xh as ek,dc0 as el,KP as em,j6 as en,X6 as eo,vu as ep,Cj as eq,g7 as er,Zj as es,BX as et,SX as eu,TX as ev,U7 as ew,J7 as ex,eq as ey,tq as ez,SW as f,H9 as f0,MK as f1,U9 as f2,Pd as f3,hK as f4,ZG as f5,Jo as g,Fo as h,fa0 as i,b as j,_a0 as k,z5 as l,f5 as m,bu as n,zp as o,d5 as p,rm as q,p as r,Cr as s,M0 as t,FF as u,Mc as v,Q3 as w,G3 as x,Bd as y,R0 as z};
|