decocms 2.283.1 → 2.283.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-B6lKc5r3.js → AlertCircle-e0Bk25xB.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DKpjDF0O.js → ArrowNarrowLeft-Vpu_QPjf.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cu9gxMoh.js → CheckCircle-AL6QamjV.js} +1 -1
- package/dist/client/assets/{ChevronDown-CGYRNnVK.js → ChevronDown-C3z87Bv3.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cs_mq2Gb.js → ChevronRight-xhxG23cR.js} +1 -1
- package/dist/client/assets/{ChevronUp-CNHg8Tvy.js → ChevronUp-DoY1Z-Lb.js} +1 -1
- package/dist/client/assets/{Container-CTt4BzRP.js → Container-Cn3sXYuI.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B8RP9b4T.js → LinkExternal01-DD77-4YD.js} +1 -1
- package/dist/client/assets/{Lock01-DGN1sRwj.js → Lock01-cgwLiQmV.js} +1 -1
- package/dist/client/assets/{Palette-BLl9a_yE.js → Palette-JLCl7IRa.js} +1 -1
- package/dist/client/assets/{Play-YaIPTi2N.js → Play-DAIUDhkH.js} +1 -1
- package/dist/client/assets/{Plus-CI2hG7eT.js → Plus-CKKWVUUx.js} +1 -1
- package/dist/client/assets/{SearchMd-CJUx5L0X.js → SearchMd-nF5GFZRa.js} +1 -1
- package/dist/client/assets/{Settings02-CzftfR-P.js → Settings02-CPSLXEwZ.js} +1 -1
- package/dist/client/assets/{Star01-CvBfAtRc.js → Star01-BeY2Ng0L.js} +1 -1
- package/dist/client/assets/{Sun-DDl1TbCr.js → Sun-DiHb_uYp.js} +1 -1
- package/dist/client/assets/{Tool01-C4G0_dmI.js → Tool01-C9b4AUFd.js} +1 -1
- package/dist/client/assets/{Trash01-DoGU3WEE.js → Trash01-CoyWql0L.js} +1 -1
- package/dist/client/assets/{User01-Cs--OmtK.js → User01-CTlp_eiF.js} +1 -1
- package/dist/client/assets/{Users03-CEDkUueK.js → Users03-DxA-7JG9.js} +1 -1
- package/dist/client/assets/{X-DU4RFoiA.js → X-ClCV9Dsd.js} +1 -1
- package/dist/client/assets/{XCircle-DIbQNdIy.js → XCircle-BJvE2wPd.js} +1 -1
- package/dist/client/assets/{Zap-D6T_WrPQ.js → Zap-T4-Ky8b7.js} +1 -1
- package/dist/client/assets/{ZapSquare-Btv7LDve.js → ZapSquare-BUTu5PL2.js} +1 -1
- package/dist/client/assets/{accordion-BSHhIZXM.js → accordion-DntQH-5m.js} +1 -1
- package/dist/client/assets/{agent-icon-Dmd713yi.js → agent-icon-zBilAupC.js} +1 -1
- package/dist/client/assets/{agents-list-CJAIn9Nw.js → agents-list-D3oU52M8.js} +1 -1
- package/dist/client/assets/ai-providers-CWHsA8pA.js +1 -0
- package/dist/client/assets/{alert-dialog-BHsh1K_4.js → alert-dialog-CuCOBQNh.js} +1 -1
- package/dist/client/assets/{auth-catchall-BrZqr7p6.js → auth-catchall-Zk4cxhKw.js} +1 -1
- package/dist/client/assets/{automation-list-row-BYsd5_5F.js → automation-list-row-dLMCo99J.js} +1 -1
- package/dist/client/assets/{automations-CwTGObR_.js → automations-C7kafNdu.js} +1 -1
- package/dist/client/assets/{avatar-CiIOC0jm.js → avatar-pskVUcgF.js} +1 -1
- package/dist/client/assets/{badge-4dptbCEq.js → badge-CJ5oUUct.js} +1 -1
- package/dist/client/assets/{brand-context-CDJdQAKY.js → brand-context-DrfN3Sjl.js} +1 -1
- package/dist/client/assets/{card-EK1eVPf2.js → card-CX10qD3B.js} +1 -1
- package/dist/client/assets/{chat-context-BNH6TZ71.js → chat-context-OsgWNZKk.js} +1 -1
- package/dist/client/assets/{checkbox-CnUU9-I8.js → checkbox-D6JbuT--.js} +1 -1
- package/dist/client/assets/{collection-detail-OPcrdjzj.js → collection-detail-BP_lrUBM.js} +1 -1
- package/dist/client/assets/{collection-display-button-CVMEpIRp.js → collection-display-button-CtUqwp7q.js} +1 -1
- package/dist/client/assets/{collection-search-DzQxK0TT.js → collection-search-7HQoERMh.js} +1 -1
- package/dist/client/assets/{collection-search-CAiOUXIV.js → collection-search-CrJAlbRF.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bod3BRUJ.js → collection-table-wrapper-B0HOBkZS.js} +1 -1
- package/dist/client/assets/{collection-tabs-zQGRYBUF.js → collection-tabs-CGegWiIq.js} +1 -1
- package/dist/client/assets/{collections-58NR9gW4.js → collections-BZ9KSM1a.js} +1 -1
- package/dist/client/assets/{command-Cogobv1L.js → command-n35vdDt2.js} +1 -1
- package/dist/client/assets/{connection-card-DUG1h-_6.js → connection-card-i6SOdcNm.js} +1 -1
- package/dist/client/assets/{connection-detail-COc1z0eq.js → connection-detail-g7VBk5Ri.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C3tUUR3v.js → connection-form-helpers-CqBned5r.js} +1 -1
- package/dist/client/assets/{connections-BInA1c12.js → connections-BJun06uv.js} +1 -1
- package/dist/client/assets/{constants-BRrjE7JA.js → constants-DDhnNFtU.js} +1 -1
- package/dist/client/assets/{constants-B9qhU0c2.js → constants-DSi4Q8Ls.js} +1 -1
- package/dist/client/assets/{dialog-DTc6xcOj.js → dialog-B68m35Ko.js} +1 -1
- package/dist/client/assets/{drawer-D7fRUj36.js → drawer-Dtlg5GWG.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DjMLFgss.js → dropdown-menu-DGLoo5dq.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-D5Vx8IAg.js → dynamic-plugin-layout-okut06G4.js} +1 -1
- package/dist/client/assets/{empty-state-CyDjcoCn.js → empty-state-0c3GVBj-.js} +1 -1
- package/dist/client/assets/{empty-state-6q5IDcBd.js → empty-state-D_P5AMA6.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BkBgr0-3.js → extract-connection-data-D0LL8rbt.js} +1 -1
- package/dist/client/assets/{features-BvFC5Pr0.js → features-Cuq7a_9m.js} +1 -1
- package/dist/client/assets/{form-KFRk7eRQ.js → form-Bp4g5y49.js} +1 -1
- package/dist/client/assets/{general-BjGaj1GT.js → general-Dqj1nDvO.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BSkFdyNg.js → github-repo-picker-U-wqCDDT.js} +1 -1
- package/dist/client/assets/{index-D_cV0HX5.js → index-3eJ_fByu.js} +2 -2
- package/dist/client/assets/{index-Baef8J5R.js → index-BLNoCDkN.js} +1 -1
- package/dist/client/assets/{index-BdDTS4hF.js → index-Bj5OpByA.js} +1 -1
- package/dist/client/assets/{index-3FTFAFVn.js → index-BkcXr7Re.js} +1 -1
- package/dist/client/assets/{index-C4DjgJGL.js → index-C4a-NnI4.js} +1 -1
- package/dist/client/assets/{index-CqJy3Jvl.js → index-COr82G6K.js} +1 -1
- package/dist/client/assets/{index-C08HiGeB.js → index-CZ7eo_cz.js} +1 -1
- package/dist/client/assets/{index-4MgAykWa.js → index-CcgMpyLh.js} +4 -4
- package/dist/client/assets/{index-CAASFRGs.js → index-RLRTQOI9.js} +1 -1
- package/dist/client/assets/{index-FOE7YpHv.js → index-TmZvFTN7.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-IJcComZ8.js → infiniteQueryObserver-DquPoAN8.js} +1 -1
- package/dist/client/assets/{input-Cv-Gy5WN.js → input-DYzJ9XQo.js} +1 -1
- package/dist/client/assets/{integration-icon-3xGkh2yb.js → integration-icon-B-89bYAr.js} +1 -1
- package/dist/client/assets/{label-CNlIda5F.js → label-eO1MBaqu.js} +1 -1
- package/dist/client/assets/{layout-DIXmeN4N.js → layout-BHYqEKGE.js} +1 -1
- package/dist/client/assets/{login-BS3FoMPH.js → login-C4Zfdq3e.js} +1 -1
- package/dist/client/assets/{members-CKfYtWTZ.js → members-C0QC-4n1.js} +1 -1
- package/dist/client/assets/{monaco-editor-AFl_PrCF.js → monaco-editor-DdnFl3MX.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D_JrgB_o.js → monitoring-stats-row-eUzqPbqJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-BVoerf7r.js → oauth-callback-DFuYRCL4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CwTSAG2N.js → oauth-callback-ai-provider-arLCd3ZD.js} +1 -1
- package/dist/client/assets/{onboarding-LSX1P2kl.js → onboarding-DWPZnoWO.js} +1 -1
- package/dist/client/assets/{org-layout-LjdMsRi5.js → org-layout-0e4Dw0lu.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BjYMF2Hw.js → org-plugin-layout-fRqJ1wx9.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CNV6Fdky.js → plugin-empty-state-B-ux7Gia.js} +1 -1
- package/dist/client/assets/{plugin-header-Qlrhguve.js → plugin-header-BdzI5qgw.js} +1 -1
- package/dist/client/assets/{plugin-layout-UrD7dGGv.js → plugin-layout-Bp6mgD3f.js} +1 -1
- package/dist/client/assets/{popover-BYKaDh8r.js → popover-BjMbP-rE.js} +1 -1
- package/dist/client/assets/{profile-BfMcwqnt.js → profile-C1dEc6tN.js} +1 -1
- package/dist/client/assets/{project-app-view-CFEp8V0n.js → project-app-view-DZ-VoNGn.js} +1 -1
- package/dist/client/assets/registry-BzzKY_Fo.js +2 -0
- package/dist/client/assets/{registry-layout-C8vYG8EY.js → registry-layout-DqNFKEHB.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D8VR7Qn-.js → required-auth-layout-BPUQrhKu.js} +1 -1
- package/dist/client/assets/{reset-password-_PZQBRj3.js → reset-password-t6V3OFSr.js} +1 -1
- package/dist/client/assets/{scroll-area-BR90DEv6.js → scroll-area-DTmCA_Nn.js} +1 -1
- package/dist/client/assets/{search-input-C1FJdqjU.js → search-input-B000rFqQ.js} +1 -1
- package/dist/client/assets/{select-_midNVXe.js → select-St50_NZJ.js} +1 -1
- package/dist/client/assets/{select-model-GoqBCq85.js → select-model-D_v_U57U.js} +1 -1
- package/dist/client/assets/{settings-layout-BCmCJj0X.js → settings-layout-BuoeX6p_.js} +1 -1
- package/dist/client/assets/{shell-layout-FgHTT5It.js → shell-layout-BQ30KzMJ.js} +1 -1
- package/dist/client/assets/{skeleton-Chpxgw5z.js → skeleton-C54kUHMT.js} +1 -1
- package/dist/client/assets/{sso-CDhG5sm9.js → sso-Dg6hDrWM.js} +1 -1
- package/dist/client/assets/{store-B5BBgWDK.js → store-4mYUEJRd.js} +1 -1
- package/dist/client/assets/store-registry-cnzZ8QNN.js +2 -0
- package/dist/client/assets/{switch-Bb611OnM.js → switch-BkONTD_h.js} +1 -1
- package/dist/client/assets/{table-DZCl3DV_.js → table-qzyyzSVP.js} +1 -1
- package/dist/client/assets/{tabs-CPuI5WWZ.js → tabs-Bt7PknpV.js} +1 -1
- package/dist/client/assets/{task-status-DaR1MpWK.js → task-status-mT8xDIRg.js} +1 -1
- package/dist/client/assets/{textarea-GNMR8OqL.js → textarea-BxEUvI4Y.js} +1 -1
- package/dist/client/assets/{toggle-group-BR1IpJFy.js → toggle-group-Di3ShAJr.js} +1 -1
- package/dist/client/assets/{tools-list-C2ObxyAj.js → tools-list-CYYpP7cq.js} +1 -1
- package/dist/client/assets/{types-DTGLm43F.js → types-GM5qmZ0X.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DZ6DqAM3.js → use-ai-providers-4afhQE8h.js} +1 -1
- package/dist/client/assets/{use-collections-VlX8lbt0.js → use-collections-CUfCY9kw.js} +1 -1
- package/dist/client/assets/{use-connection-DnhQK4fq.js → use-connection-BMRXzgrq.js} +1 -1
- package/dist/client/assets/{use-copy-Dwf-_7tD.js → use-copy-Bom0xOim.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Q8Pi_HJm.js → use-create-virtual-mcp-iwfCwqFc.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CvkLosTt.js → use-decopilot-events-P5nsmqcb.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DnO01-yU.js → use-delete-connection-DY_L-Wdd.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BbJ5h1l2.js → use-infinite-scroll-D_5lwaLu.js} +1 -1
- package/dist/client/assets/{use-list-state-RSIRKfu-.js → use-list-state-h5U3r6Hz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-dsvqyXUs.js → use-mcp-tools-CYeL56pw.js} +1 -1
- package/dist/client/assets/{use-members-yA1tHxKc.js → use-members-Bdc0PU-O.js} +1 -1
- package/dist/client/assets/{use-mobile-BukhR5xc.js → use-mobile-TpLA3bJu.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-cye4_ovr.js → use-navigate-to-agent-FZAZYQZP.js} +1 -1
- package/dist/client/assets/{use-org-sso-BX-CgWuz.js → use-org-sso-BDOwD-ja.js} +1 -1
- package/dist/client/assets/{use-organization-settings-AIx1cKKY.js → use-organization-settings-DJG6W7_I.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Ck-c3bU5.js → use-registry-connections-DUB-YIZm.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DXJvfF2c.js → use-status-sounds-COAZTgOh.js} +1 -1
- package/dist/client/assets/{use-tasks-B9RSBuk3.js → use-tasks-Cz3y9Qka.js} +1 -1
- package/dist/client/assets/{use-view-mode-0huvW_sB.js → use-view-mode-EvCkIMwX.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CCFi2lST.js → use-virtual-mcp-Yf3Hlsyo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D9wKxri3.js +1 -0
- package/dist/client/assets/{user-R3PETSQv.js → user-CMTKW_Tb.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-T-xER1ZI.js → view-mode-toggle-BHwKMCFg.js} +1 -1
- package/dist/client/assets/{workflow-BblBxdPP.js → workflow-DrXxXB7y.js} +1 -1
- package/dist/client/assets/workflow-detail-DX-ENjhH.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +367 -367
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/{ansi-styles → mimic-fn}/license +1 -1
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/{xtend/LICENSE → postgres-array/license} +2 -1
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/server.js +306 -306
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-D9dwDsov.js +0 -1
- package/dist/client/assets/registry-CDKXBXcC.js +0 -2
- package/dist/client/assets/store-registry-CbUNnR6f.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Bs0N88A0.js +0 -1
- package/dist/client/assets/workflow-detail-CzVmb0o7.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/package.json +0 -54
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bV as b,e as f,j as c,aB as C,r as d,c as p,aY as j,bW as v,bX as h}from"./index-
|
|
1
|
+
import{bV as b,e as f,j as c,aB as C,r as d,c as p,aY as j,bW as v,bX as h}from"./index-3eJ_fByu.js";import{L as N}from"./label-eO1MBaqu.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,M as a,w as b,L as c,P as d,R as e,y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as G,r as J,z as T,j as s,B as M,f as pe,s as ce,o as de,x as je,w as be,a as W,t as q,K as Z,b as me,v as ve,y as se,n as Ne,c as ye,aD as Se}from"./index-D_cV0HX5.js";import{P as Q}from"./index-CAASFRGs.js";import{C as Y,b as X,c as ee,a as te,d as ue,e as _e}from"./card-EK1eVPf2.js";import{I as oe}from"./input-Cv-Gy5WN.js";import{L as B}from"./label-CNlIda5F.js";import{c as Ce}from"./XCircle-DIbQNdIy.js";import{i as fe}from"./X-DU4RFoiA.js";import{u as V}from"./unwrap-tool-result-BYXdCQMg.js";import{S as we,u as ze,W as ie,i as De}from"./constants-B9qhU0c2.js";import{S as Ae}from"./switch-Bb611OnM.js";import{u as Ee,a as le,D as Ie,c as Pe,S as ke,v as Oe,K as Te,P as Fe,d as Re,C as Le,s as Me,b as $e,e as qe}from"./collection-search-CAiOUXIV.js";import{u as ge}from"./use-virtual-mcp-CCFi2lST.js";import{b as Ge,P as Ke,a as Ue}from"./popover-BYKaDh8r.js";import{S as He}from"./skeleton-Chpxgw5z.js";import{T as Be}from"./agent-icon-Dmd713yi.js";import{s as Je}from"./Plus-CI2hG7eT.js";import{a as xe}from"./Users03-CEDkUueK.js";import{I as ae}from"./integration-icon-3xGkh2yb.js";import{u as Qe,c as Ve}from"./use-organization-settings-AIx1cKKY.js";import"./use-mobile-BukhR5xc.js";import"./SearchMd-CJUx5L0X.js";import"./use-collections-VlX8lbt0.js";import"./AlertCircle-B6lKc5r3.js";import"./Tool01-C4G0_dmI.js";import"./ArrowNarrowLeft-DKpjDF0O.js";import"./ZapSquare-Btv7LDve.js";import"./CheckCircle-Cu9gxMoh.js";import"./ChevronDown-CGYRNnVK.js";import"./ChevronRight-Cs_mq2Gb.js";import"./ChevronUp-CNHg8Tvy.js";import"./Container-CTt4BzRP.js";import"./Star01-CvBfAtRc.js";import"./Palette-BLl9a_yE.js";import"./LinkExternal01-B8RP9b4T.js";import"./Lock01-DGN1sRwj.js";import"./Sun-DDl1TbCr.js";import"./Play-YaIPTi2N.js";import"./Settings02-CzftfR-P.js";import"./Trash01-DoGU3WEE.js";import"./User01-Cs--OmtK.js";import"./Zap-D6T_WrPQ.js";function We(t){const e=G.c(28),{value:i,onChange:o,name:p,disabled:a}=t,n=J.useRef(null);let C;e[0]!==o?(C=b=>{const w=b.target.files?.[0];if(w){if(w.size>2097152){T.error("Image must be smaller than 2MB");return}const m=new FileReader;m.onerror=()=>{const S=m.error;console.error("FileReader error:",S),T.error(S?.message||"Failed to read image file. Please try again."),n.current&&(n.current.value="")},m.onloadend=()=>{m.readyState===FileReader.DONE&&m.result&&o(m.result),n.current&&(n.current.value="")},m.readAsDataURL(w)}},e[0]=o,e[1]=C):C=e[1];const E=C;let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{n.current?.click()},e[2]=N):N=e[2];const r=N;let f;e[3]!==o?(f=b=>{b.stopPropagation(),o("")},e[3]=o,e[4]=f):f=e[4];const g=f;let d;e[5]!==a||e[6]!==E?(d=s.jsx("input",{type:"file",ref:n,className:"hidden",accept:"image/*",onChange:E,disabled:a}),e[5]=a,e[6]=E,e[7]=d):d=e[7];let c;e[8]!==a||e[9]!==g||e[10]!==p||e[11]!==i?(c=i?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:i,alt:p||"Logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:g,disabled:a,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(fe,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:r,disabled:a,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[s.jsx(Ce,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=a,e[9]=g,e[10]=p,e[11]=i,e[12]=c):c=e[12];const z=i?"Change Logo":"Upload Logo";let D;e[13]!==a||e[14]!==z?(D=s.jsx(M,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:a,className:"mb-2",children:z}),e[13]=a,e[14]=z,e[15]=D):D=e[15];let x;e[16]!==a||e[17]!==g||e[18]!==i?(x=i&&s.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:g,disabled:a,className:"ml-2",children:"Remove"}),e[16]=a,e[17]=g,e[18]=i,e[19]=x):x=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=j):j=e[20];let h;e[21]!==D||e[22]!==x?(h=s.jsxs("div",{className:"flex-1",children:[D,x,j]}),e[21]=D,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==d||e[26]!==c?(y=s.jsxs("div",{className:"flex items-start gap-4",children:[d,c,h]}),e[24]=h,e[25]=d,e[26]=c,e[27]=y):y=e[27],y}const Ze=ve({name:se().min(1,"Name is required").max(255,"Name is too long"),slug:se().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:se().optional()});function Ye(){const t=pe(),{org:e}=ce(),i=de(),[o,p]=J.useState(!1),a=je({resolver:be(Ze),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),n=W({mutationFn:async r=>{const f={name:r.name,slug:r.slug};r.logo&&(f.logo=r.logo);const g=await me.organization.update({organizationId:e.id,data:f});if(g?.error)throw new Error(g.error.message||"Failed to update organization");return g},onSuccess:r=>{q("organization_settings_updated",{organization_id:e.id,fields:Object.keys(a.formState.dirtyFields)}),i.invalidateQueries({queryKey:Z.organizations()}),i.invalidateQueries({queryKey:Z.activeOrganization(e.slug)}),T.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:r.data.slug}})},onError:r=>{q("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(a.formState.dirtyFields),error:r instanceof Error?r.message:String(r)}),T.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{p(!1)}}),C=r=>{p(!0),n.mutate(r)},E=a.formState.isDirty,N=a.formState.errors;return s.jsx("form",{onSubmit:a.handleSubmit(C),className:"flex flex-col gap-6",children:s.jsxs(Y,{className:"p-6",children:[s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Overview"})}),s.jsxs(te,{className:"flex flex-col gap-6 p-0",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Logo"}),s.jsx(We,{value:a.watch("logo"),onChange:r=>a.setValue("logo",r??"",{shouldDirty:!0}),name:a.watch("name"),disabled:o}),N.logo&&s.jsx("p",{className:"text-xs text-destructive",children:N.logo.message})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-name",className:"text-xs text-muted-foreground",children:"Organization name"}),s.jsx(oe,{id:"org-name",...a.register("name"),placeholder:"Organization name",disabled:o}),N.name&&s.jsx("p",{className:"text-xs text-destructive",children:N.name.message})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-slug",className:"text-xs text-muted-foreground",children:"Slug"}),s.jsx(oe,{id:"org-slug",...a.register("slug"),placeholder:"my-organization",disabled:o,onChange:r=>{const f=r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Only lowercase letters, numbers, and hyphens."}),N.slug&&s.jsx("p",{className:"text-xs text-destructive",children:N.slug.message})]})]})]}),E&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"submit",disabled:o,children:o?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>a.reset(),disabled:o,children:"Cancel"})]})]})})}function Xe(){const t=G.c(62),{org:e}=ce(),{data:i}=me.useSession(),o=de();let p;t[0]!==e.id?(p={connectionId:we,orgId:e.id},t[0]=e.id,t[1]=p):p=t[1];const a=ze(p);let n;t[2]!==e.id?(n=Z.organizationDomain(e.id),t[2]=e.id,t[3]=n):n=t[3];let C;t[4]!==a?(C=async()=>{const l=await a.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return V(l)},t[4]=a,t[5]=C):C=t[5];let E;t[6]!==n||t[7]!==C?(E={queryKey:n,queryFn:C},t[6]=n,t[7]=C,t[8]=E):E=t[8];const{data:N,isPending:r}=Ne(E),f=i?.user?.email??"";let g;t[9]!==f?(g=f.split("@")[1]?.toLowerCase()??"",t[9]=f,t[10]=g):g=t[10];const d=g,c=N?.domain??null,z=N?.autoJoinEnabled??!1,D=d&&d!==c;let x;t[11]!==e.id||t[12]!==o?(x=()=>o.invalidateQueries({queryKey:Z.organizationDomain(e.id)}),t[11]=e.id,t[12]=o,t[13]=x):x=t[13];const j=x;let h;t[14]!==a||t[15]!==d?(h=async()=>{const l=await a.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:d,autoJoinEnabled:!1}});return V(l)},t[14]=a,t[15]=d,t[16]=h):h=t[16];let y;t[17]!==j||t[18]!==e.id||t[19]!==d?(y=()=>{q("organization_domain_claimed",{organization_id:e.id,email_domain:d}),j(),T.success("Domain claimed")},t[17]=j,t[18]=e.id,t[19]=d,t[20]=y):y=t[20];let b;t[21]!==e.id||t[22]!==d?(b=l=>{q("organization_domain_claim_failed",{organization_id:e.id,email_domain:d,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to claim domain")},t[21]=e.id,t[22]=d,t[23]=b):b=t[23];let w;t[24]!==h||t[25]!==y||t[26]!==b?(w={mutationFn:h,onSuccess:y,onError:b},t[24]=h,t[25]=y,t[26]=b,t[27]=w):w=t[27];const m=W(w);let S;t[28]!==a?(S=async()=>{const l=await a.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return V(l)},t[28]=a,t[29]=S):S=t[29];let v;t[30]!==c||t[31]!==j||t[32]!==e.id?(v=()=>{q("organization_domain_cleared",{organization_id:e.id,email_domain:c}),j(),T.success("Domain removed")},t[30]=c,t[31]=j,t[32]=e.id,t[33]=v):v=t[33];let _;t[34]!==c||t[35]!==e.id?(_=l=>{q("organization_domain_clear_failed",{organization_id:e.id,email_domain:c,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to remove domain")},t[34]=c,t[35]=e.id,t[36]=_):_=t[36];let k;t[37]!==S||t[38]!==v||t[39]!==_?(k={mutationFn:S,onSuccess:v,onError:_},t[37]=S,t[38]=v,t[39]=_,t[40]=k):k=t[40];const P=W(k);let A;t[41]!==a||t[42]!==c||t[43]!==e.id?(A=async l=>{if(!c)return;q("organization_auto_join_toggled",{organization_id:e.id,enabled:l});const L=await a.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:l}});return V(L)},t[41]=a,t[42]=c,t[43]=e.id,t[44]=A):A=t[44];let I;t[45]!==j?(I=()=>{j(),T.success("Auto-join setting updated")},t[45]=j,t[46]=I):I=t[46];let O;t[47]!==e.id?(O=l=>{q("organization_auto_join_toggle_failed",{organization_id:e.id,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to update auto-join")},t[47]=e.id,t[48]=O):O=t[48];let u;t[49]!==A||t[50]!==I||t[51]!==O?(u={mutationFn:A,onSuccess:I,onError:O},t[49]=A,t[50]=I,t[51]=O,t[52]=u):u=t[52];const F=W(u);if(r)return null;let R;t[53]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(X,{className:"p-0",children:[s.jsx(ee,{className:"text-sm",children:"Email Domain"}),s.jsx(_e,{className:"text-xs",children:"Claim your company's email domain so new users with matching emails can automatically join this organization."})]}),t[53]=R):R=t[53];let $;return t[54]!==z||t[55]!==D||t[56]!==P||t[57]!==c||t[58]!==m||t[59]!==F||t[60]!==d?($=s.jsxs(Y,{className:"p-6",children:[R,s.jsx(te,{className:"flex flex-col gap-4 p-0 pt-4",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Claimed domain"}),s.jsx("p",{className:"text-sm font-medium",children:c})]}),s.jsx(M,{variant:"outline",size:"sm",onClick:()=>P.mutate(),disabled:P.isPending,children:"Remove"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(B,{className:"text-xs",children:"Auto-join"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Users with @",c," emails will automatically join this organization on signup."]})]}),s.jsx(Ae,{checked:z,onCheckedChange:l=>F.mutate(l),disabled:F.isPending})]})]}):D?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Your domain"}),s.jsx("p",{className:"text-sm font-medium",children:d})]}),s.jsx(M,{size:"sm",onClick:()=>m.mutate(),disabled:m.isPending,children:m.isPending?"Claiming...":"Claim Domain"})]}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"No corporate email domain detected."})})]}),t[54]=z,t[55]=D,t[56]=P,t[57]=c,t[58]=m,t[59]=F,t[60]=d,t[61]=$):$=t[61],$}const re=["site-editor","site-diagnostics","ai-image","ai-research"],ne=8;function et(t,e,i){const o=e.find(a=>a.id===t);if(o)return{id:o.id,title:o.title,icon:o.icon,kind:"template"};const p=i.find(a=>a.id===t);return p?{id:t,title:p.title,icon:p.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function tt(t){const e=G.c(39),{agent:i,onRemove:o}=t;let p;e[0]!==i.id?(p={id:i.id},e[0]=i.id,e[1]=p):p=e[1];const{attributes:a,listeners:n,setNodeRef:C,transform:E,transition:N,isDragging:r}=Re(p);let f;e[2]!==E?(f=Le.Transform.toString(E),e[2]=E,e[3]=f):f=e[3];const g=r?.5:void 0,d=r?100:void 0;let c;e[4]!==f||e[5]!==g||e[6]!==d||e[7]!==N?(c={transform:f,transition:N,opacity:g,zIndex:d},e[4]=f,e[5]=g,e[6]=d,e[7]=N,e[8]=c):c=e[8];const z=c,D=r&&"shadow-lg";let x;e[9]!==D?(x=ye("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",D),e[9]=D,e[10]=x):x=e[10];const j=`Drag to reorder ${i.title}`;let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Be,{size:14}),e[11]=h):h=e[11];let y;e[12]!==a||e[13]!==n||e[14]!==j?(y=s.jsx("button",{type:"button",...a,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":j,children:h}),e[12]=a,e[13]=n,e[14]=j,e[15]=y):y=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[16]=b):b=e[16];let w;e[17]!==i.icon||e[18]!==i.title?(w=s.jsx(ae,{icon:i.icon,name:i.title,size:"xs",fallbackIcon:b}),e[17]=i.icon,e[18]=i.title,e[19]=w):w=e[19];let m;e[20]!==i.title?(m=s.jsx("span",{className:"text-sm text-foreground truncate",children:i.title}),e[20]=i.title,e[21]=m):m=e[21];const S=i.kind==="template"?"Template":i.kind==="custom"?"Custom agent":"Unavailable";let v;e[22]!==S?(v=s.jsx("span",{className:"text-xs text-muted-foreground",children:S}),e[22]=S,e[23]=v):v=e[23];let _;e[24]!==m||e[25]!==v?(_=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[m,v]}),e[24]=m,e[25]=v,e[26]=_):_=e[26];const k=`Remove ${i.title}`;let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(fe,{size:14}),e[27]=P):P=e[27];let A;e[28]!==o||e[29]!==k?(A=s.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":k,children:P}),e[28]=o,e[29]=k,e[30]=A):A=e[30];let I;return e[31]!==C||e[32]!==z||e[33]!==y||e[34]!==w||e[35]!==_||e[36]!==A||e[37]!==x?(I=s.jsxs("div",{ref:C,style:z,className:x,children:[y,w,_,A]}),e[31]=C,e[32]=z,e[33]=y,e[34]=w,e[35]=_,e[36]=A,e[37]=x,e[38]=I):I=e[38],I}function st(t){const e=G.c(48),{selectedIds:i,onAdd:o}=t,[p,a]=J.useState(!1),[n,C]=J.useState(""),E=ge();let N;e[0]!==i?(N=new Set(i),e[0]=i,e[1]=N):N=e[1];const r=N;let f,g,d,c,z,D,x,j,h,y,b,w,m;if(e[2]!==E||e[3]!==o||e[4]!==p||e[5]!==n||e[6]!==r){const P=n.toLowerCase();c=ie.filter(u=>!r.has(u.id)&&(!n||u.title.toLowerCase().includes(P)));let A;e[20]!==r?(A=u=>u.id!==null&&!De(u.id)&&!r.has(u.id),e[20]=r,e[21]=A):A=e[21],d=E.filter(A).filter(u=>!n||u.title.toLowerCase().includes(P));let I;e[22]!==o?(I=u=>{o(u),a(!1),C("")},e[22]=o,e[23]=I):I=e[23];const O=I;g=Ge,w=p,m=a,e[24]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ke,{asChild:!0,children:s.jsxs(M,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Je,{size:14}),"Add agent"]})}),e[24]=z):z=e[24],f=Ue,h="w-[320px] p-0 overflow-hidden",y="start",e[25]!==n?(b=s.jsx(qe,{value:n,onChange:C,placeholder:"Search agents..."}),e[25]=n,e[26]=b):b=e[26],D="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=c.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),c.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ae,{icon:u.icon,name:u.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),j=d.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),d.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ae,{icon:u.icon,name:u.title,size:"xs",fallbackIcon:s.jsx(xe,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),e[2]=E,e[3]=o,e[4]=p,e[5]=n,e[6]=r,e[7]=f,e[8]=g,e[9]=d,e[10]=c,e[11]=z,e[12]=D,e[13]=x,e[14]=j,e[15]=h,e[16]=y,e[17]=b,e[18]=w,e[19]=m}else f=e[7],g=e[8],d=e[9],c=e[10],z=e[11],D=e[12],x=e[13],j=e[14],h=e[15],y=e[16],b=e[17],w=e[18],m=e[19];let S;e[27]!==d||e[28]!==c.length||e[29]!==n?(S=c.length===0&&d.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=d,e[28]=c.length,e[29]=n,e[30]=S):S=e[30];let v;e[31]!==S||e[32]!==D||e[33]!==x||e[34]!==j?(v=s.jsxs("div",{className:D,children:[x,j,S]}),e[31]=S,e[32]=D,e[33]=x,e[34]=j,e[35]=v):v=e[35];let _;e[36]!==f||e[37]!==v||e[38]!==h||e[39]!==y||e[40]!==b?(_=s.jsxs(f,{className:h,align:y,children:[b,v]}),e[36]=f,e[37]=v,e[38]=h,e[39]=y,e[40]=b,e[41]=_):_=e[41];let k;return e[42]!==g||e[43]!==z||e[44]!==_||e[45]!==w||e[46]!==m?(k=s.jsxs(g,{open:w,onOpenChange:m,children:[z,_]}),e[42]=g,e[43]=z,e[44]=_,e[45]=w,e[46]=m,e[47]=k):k=e[47],k}function nt(){const t=G.c(60),e=Qe(),i=ge(),o=Ve();let p;t[0]!==e?.ids?(p=e?.ids??[...re],t[0]=e?.ids,t[1]=p):p=t[1];const a=p,[n,C]=J.useState(a);let E;t[2]!==n||t[3]!==a?(E=n.length!==a.length||n.some((l,L)=>l!==a[L]),t[2]=n,t[3]=a,t[4]=E):E=t[4];const N=E;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f={coordinateGetter:Me},t[6]=f):f=t[6];const g=Ee(le(Fe,r),le(Te,f));let d;t[7]!==n?(d=l=>{const{active:L,over:K}=l;if(!K||L.id===K.id)return;const H=n.indexOf(L.id),U=n.indexOf(K.id);H===-1||U===-1||C($e([...n],H,U))},t[7]=n,t[8]=d):d=t[8];const c=d;let z;t[9]!==n?(z=l=>{n.includes(l)||C([...n,l])},t[9]=n,t[10]=z):z=t[10];const D=z;let x;t[11]!==n?(x=l=>{C(n.filter(L=>L!==l))},t[11]=n,t[12]=x):x=t[12];const j=x;let h;t[13]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{C([...re])},t[13]=h):h=t[13];const y=h;let b;t[14]!==n||t[15]!==o?(b=()=>{o.mutate({ids:n},{onSuccess:()=>{q("default_home_agents_updated",{count:n.length,template_count:n.filter(it).length}),T.success("Default home agents updated")},onError:at})},t[14]=n,t[15]=o,t[16]=b):b=t[16];const w=b;let m,S,v,_,k,P,A;if(t[17]!==i||t[18]!==n||t[19]!==c||t[20]!==j||t[21]!==g||t[22]!==o.isPending){let l;t[30]!==i?(l=U=>et(U,ie,i),t[30]=i,t[31]=l):l=t[31];const L=n.map(l);v=Math.max(0,n.length-ne),S=Y,k="p-6";let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(ee,{className:"text-sm",children:"Default home agents"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Choose which agents appear on the home view for everyone in this organization. Drag to reorder. Up to ",ne," tiles render on the home view."]})]}),t[32]=K):K=t[32];let H;t[33]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Se,{size:14}),t[33]=H):H=t[33],t[34]!==o.isPending?(P=s.jsxs(X,{className:"p-0 flex flex-row items-start justify-between gap-3",children:[K,s.jsxs(M,{type:"button",variant:"ghost",size:"sm",onClick:y,disabled:o.isPending,children:[H,"Reset defaults"]})]}),t[34]=o.isPending,t[35]=P):P=t[35],m=te,A="p-0 flex flex-col gap-3",_=L.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ie,{sensors:g,collisionDetection:Pe,onDragEnd:c,children:s.jsx(ke,{items:n,strategy:Oe,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:L.map((U,he)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[he===ne&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(tt,{agent:U,onRemove:()=>j(U.id)})]},U.id))})})}),t[17]=i,t[18]=n,t[19]=c,t[20]=j,t[21]=g,t[22]=o.isPending,t[23]=m,t[24]=S,t[25]=v,t[26]=_,t[27]=k,t[28]=P,t[29]=A}else m=t[23],S=t[24],v=t[25],_=t[26],k=t[27],P=t[28],A=t[29];let I;t[36]!==n||t[37]!==D?(I=s.jsx(st,{selectedIds:n,onAdd:D}),t[36]=n,t[37]=D,t[38]=I):I=t[38];let O;t[39]!==v?(O=v>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v," agent",v===1?"":"s"," won't fit on the home view"]}),t[39]=v,t[40]=O):O=t[40];let u;t[41]!==I||t[42]!==O?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[I,O]}),t[41]=I,t[42]=O,t[43]=u):u=t[43];let F;t[44]!==m||t[45]!==_||t[46]!==u||t[47]!==A?(F=s.jsxs(m,{className:A,children:[_,u]}),t[44]=m,t[45]=_,t[46]=u,t[47]=A,t[48]=F):F=t[48];let R;t[49]!==w||t[50]!==a||t[51]!==N||t[52]!==o.isPending?(R=N&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"button",onClick:w,disabled:o.isPending,children:o.isPending?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>C(a),disabled:o.isPending,children:"Cancel"})]}),t[49]=w,t[50]=a,t[51]=N,t[52]=o.isPending,t[53]=R):R=t[53];let $;return t[54]!==S||t[55]!==k||t[56]!==P||t[57]!==F||t[58]!==R?($=s.jsxs(S,{className:k,children:[P,F,R]}),t[54]=S,t[55]=k,t[56]=P,t[57]=F,t[58]=R,t[59]=$):$=t[59],$}function at(t){T.error(t instanceof Error?t.message:"Failed to update default home agents")}function it(t){return ie.some(e=>e.id===t)}function ot(){const t=G.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Default home agents"})}),t[0]=e):e=t[0];let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(Y,{className:"p-6",children:[e,s.jsx(te,{className:"p-0 flex flex-col gap-2",children:Array.from({length:4}).map(lt)})]}),t[1]=i):i=t[1],i}function lt(t,e){return s.jsx(He,{className:"h-12 w-full rounded-lg"},e)}function rt(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(J.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(nt,{})}),t[0]=e):e=t[0],e}function ct(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Q,{children:s.jsx(Q.Content,{children:s.jsx(Q.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(Q.Title,{children:"Organization"}),s.jsx(Ye,{}),s.jsx(Xe,{}),s.jsx(rt,{})]})})})}),t[0]=e):e=t[0],e}function Zt(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ct,{}),t[0]=e):e=t[0],e}export{Zt as default};
|
|
1
|
+
import{e as G,r as J,z as T,j as s,B as M,f as pe,s as ce,o as de,x as je,w as be,a as W,t as q,K as Z,b as me,v as ve,y as se,n as Ne,c as ye,aD as Se}from"./index-3eJ_fByu.js";import{P as Q}from"./index-RLRTQOI9.js";import{C as Y,b as X,c as ee,a as te,d as ue,e as _e}from"./card-CX10qD3B.js";import{I as oe}from"./input-DYzJ9XQo.js";import{L as B}from"./label-eO1MBaqu.js";import{c as Ce}from"./XCircle-BJvE2wPd.js";import{i as fe}from"./X-ClCV9Dsd.js";import{u as V}from"./unwrap-tool-result-BYXdCQMg.js";import{S as we,u as ze,W as ie,i as De}from"./constants-DSi4Q8Ls.js";import{S as Ae}from"./switch-BkONTD_h.js";import{u as Ee,a as le,D as Ie,c as Pe,S as ke,v as Oe,K as Te,P as Fe,d as Re,C as Le,s as Me,b as $e,e as qe}from"./collection-search-CrJAlbRF.js";import{u as ge}from"./use-virtual-mcp-Yf3Hlsyo.js";import{b as Ge,P as Ke,a as Ue}from"./popover-BjMbP-rE.js";import{S as He}from"./skeleton-C54kUHMT.js";import{T as Be}from"./agent-icon-zBilAupC.js";import{s as Je}from"./Plus-CKKWVUUx.js";import{a as xe}from"./Users03-DxA-7JG9.js";import{I as ae}from"./integration-icon-B-89bYAr.js";import{u as Qe,c as Ve}from"./use-organization-settings-DJG6W7_I.js";import"./use-mobile-TpLA3bJu.js";import"./SearchMd-nF5GFZRa.js";import"./use-collections-CUfCY9kw.js";import"./AlertCircle-e0Bk25xB.js";import"./Tool01-C9b4AUFd.js";import"./ArrowNarrowLeft-Vpu_QPjf.js";import"./ZapSquare-BUTu5PL2.js";import"./CheckCircle-AL6QamjV.js";import"./ChevronDown-C3z87Bv3.js";import"./ChevronRight-xhxG23cR.js";import"./ChevronUp-DoY1Z-Lb.js";import"./Container-Cn3sXYuI.js";import"./Star01-BeY2Ng0L.js";import"./Palette-JLCl7IRa.js";import"./LinkExternal01-DD77-4YD.js";import"./Lock01-cgwLiQmV.js";import"./Sun-DiHb_uYp.js";import"./Play-DAIUDhkH.js";import"./Settings02-CPSLXEwZ.js";import"./Trash01-CoyWql0L.js";import"./User01-CTlp_eiF.js";import"./Zap-T4-Ky8b7.js";function We(t){const e=G.c(28),{value:i,onChange:o,name:p,disabled:a}=t,n=J.useRef(null);let C;e[0]!==o?(C=b=>{const w=b.target.files?.[0];if(w){if(w.size>2097152){T.error("Image must be smaller than 2MB");return}const m=new FileReader;m.onerror=()=>{const S=m.error;console.error("FileReader error:",S),T.error(S?.message||"Failed to read image file. Please try again."),n.current&&(n.current.value="")},m.onloadend=()=>{m.readyState===FileReader.DONE&&m.result&&o(m.result),n.current&&(n.current.value="")},m.readAsDataURL(w)}},e[0]=o,e[1]=C):C=e[1];const E=C;let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{n.current?.click()},e[2]=N):N=e[2];const r=N;let f;e[3]!==o?(f=b=>{b.stopPropagation(),o("")},e[3]=o,e[4]=f):f=e[4];const g=f;let d;e[5]!==a||e[6]!==E?(d=s.jsx("input",{type:"file",ref:n,className:"hidden",accept:"image/*",onChange:E,disabled:a}),e[5]=a,e[6]=E,e[7]=d):d=e[7];let c;e[8]!==a||e[9]!==g||e[10]!==p||e[11]!==i?(c=i?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:i,alt:p||"Logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:g,disabled:a,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(fe,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:r,disabled:a,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[s.jsx(Ce,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=a,e[9]=g,e[10]=p,e[11]=i,e[12]=c):c=e[12];const z=i?"Change Logo":"Upload Logo";let D;e[13]!==a||e[14]!==z?(D=s.jsx(M,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:a,className:"mb-2",children:z}),e[13]=a,e[14]=z,e[15]=D):D=e[15];let x;e[16]!==a||e[17]!==g||e[18]!==i?(x=i&&s.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:g,disabled:a,className:"ml-2",children:"Remove"}),e[16]=a,e[17]=g,e[18]=i,e[19]=x):x=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=j):j=e[20];let h;e[21]!==D||e[22]!==x?(h=s.jsxs("div",{className:"flex-1",children:[D,x,j]}),e[21]=D,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==d||e[26]!==c?(y=s.jsxs("div",{className:"flex items-start gap-4",children:[d,c,h]}),e[24]=h,e[25]=d,e[26]=c,e[27]=y):y=e[27],y}const Ze=ve({name:se().min(1,"Name is required").max(255,"Name is too long"),slug:se().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:se().optional()});function Ye(){const t=pe(),{org:e}=ce(),i=de(),[o,p]=J.useState(!1),a=je({resolver:be(Ze),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),n=W({mutationFn:async r=>{const f={name:r.name,slug:r.slug};r.logo&&(f.logo=r.logo);const g=await me.organization.update({organizationId:e.id,data:f});if(g?.error)throw new Error(g.error.message||"Failed to update organization");return g},onSuccess:r=>{q("organization_settings_updated",{organization_id:e.id,fields:Object.keys(a.formState.dirtyFields)}),i.invalidateQueries({queryKey:Z.organizations()}),i.invalidateQueries({queryKey:Z.activeOrganization(e.slug)}),T.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:r.data.slug}})},onError:r=>{q("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(a.formState.dirtyFields),error:r instanceof Error?r.message:String(r)}),T.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{p(!1)}}),C=r=>{p(!0),n.mutate(r)},E=a.formState.isDirty,N=a.formState.errors;return s.jsx("form",{onSubmit:a.handleSubmit(C),className:"flex flex-col gap-6",children:s.jsxs(Y,{className:"p-6",children:[s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Overview"})}),s.jsxs(te,{className:"flex flex-col gap-6 p-0",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Logo"}),s.jsx(We,{value:a.watch("logo"),onChange:r=>a.setValue("logo",r??"",{shouldDirty:!0}),name:a.watch("name"),disabled:o}),N.logo&&s.jsx("p",{className:"text-xs text-destructive",children:N.logo.message})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-name",className:"text-xs text-muted-foreground",children:"Organization name"}),s.jsx(oe,{id:"org-name",...a.register("name"),placeholder:"Organization name",disabled:o}),N.name&&s.jsx("p",{className:"text-xs text-destructive",children:N.name.message})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-slug",className:"text-xs text-muted-foreground",children:"Slug"}),s.jsx(oe,{id:"org-slug",...a.register("slug"),placeholder:"my-organization",disabled:o,onChange:r=>{const f=r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Only lowercase letters, numbers, and hyphens."}),N.slug&&s.jsx("p",{className:"text-xs text-destructive",children:N.slug.message})]})]})]}),E&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"submit",disabled:o,children:o?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>a.reset(),disabled:o,children:"Cancel"})]})]})})}function Xe(){const t=G.c(62),{org:e}=ce(),{data:i}=me.useSession(),o=de();let p;t[0]!==e.id?(p={connectionId:we,orgId:e.id},t[0]=e.id,t[1]=p):p=t[1];const a=ze(p);let n;t[2]!==e.id?(n=Z.organizationDomain(e.id),t[2]=e.id,t[3]=n):n=t[3];let C;t[4]!==a?(C=async()=>{const l=await a.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return V(l)},t[4]=a,t[5]=C):C=t[5];let E;t[6]!==n||t[7]!==C?(E={queryKey:n,queryFn:C},t[6]=n,t[7]=C,t[8]=E):E=t[8];const{data:N,isPending:r}=Ne(E),f=i?.user?.email??"";let g;t[9]!==f?(g=f.split("@")[1]?.toLowerCase()??"",t[9]=f,t[10]=g):g=t[10];const d=g,c=N?.domain??null,z=N?.autoJoinEnabled??!1,D=d&&d!==c;let x;t[11]!==e.id||t[12]!==o?(x=()=>o.invalidateQueries({queryKey:Z.organizationDomain(e.id)}),t[11]=e.id,t[12]=o,t[13]=x):x=t[13];const j=x;let h;t[14]!==a||t[15]!==d?(h=async()=>{const l=await a.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:d,autoJoinEnabled:!1}});return V(l)},t[14]=a,t[15]=d,t[16]=h):h=t[16];let y;t[17]!==j||t[18]!==e.id||t[19]!==d?(y=()=>{q("organization_domain_claimed",{organization_id:e.id,email_domain:d}),j(),T.success("Domain claimed")},t[17]=j,t[18]=e.id,t[19]=d,t[20]=y):y=t[20];let b;t[21]!==e.id||t[22]!==d?(b=l=>{q("organization_domain_claim_failed",{organization_id:e.id,email_domain:d,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to claim domain")},t[21]=e.id,t[22]=d,t[23]=b):b=t[23];let w;t[24]!==h||t[25]!==y||t[26]!==b?(w={mutationFn:h,onSuccess:y,onError:b},t[24]=h,t[25]=y,t[26]=b,t[27]=w):w=t[27];const m=W(w);let S;t[28]!==a?(S=async()=>{const l=await a.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return V(l)},t[28]=a,t[29]=S):S=t[29];let v;t[30]!==c||t[31]!==j||t[32]!==e.id?(v=()=>{q("organization_domain_cleared",{organization_id:e.id,email_domain:c}),j(),T.success("Domain removed")},t[30]=c,t[31]=j,t[32]=e.id,t[33]=v):v=t[33];let _;t[34]!==c||t[35]!==e.id?(_=l=>{q("organization_domain_clear_failed",{organization_id:e.id,email_domain:c,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to remove domain")},t[34]=c,t[35]=e.id,t[36]=_):_=t[36];let k;t[37]!==S||t[38]!==v||t[39]!==_?(k={mutationFn:S,onSuccess:v,onError:_},t[37]=S,t[38]=v,t[39]=_,t[40]=k):k=t[40];const P=W(k);let A;t[41]!==a||t[42]!==c||t[43]!==e.id?(A=async l=>{if(!c)return;q("organization_auto_join_toggled",{organization_id:e.id,enabled:l});const L=await a.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:l}});return V(L)},t[41]=a,t[42]=c,t[43]=e.id,t[44]=A):A=t[44];let I;t[45]!==j?(I=()=>{j(),T.success("Auto-join setting updated")},t[45]=j,t[46]=I):I=t[46];let O;t[47]!==e.id?(O=l=>{q("organization_auto_join_toggle_failed",{organization_id:e.id,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to update auto-join")},t[47]=e.id,t[48]=O):O=t[48];let u;t[49]!==A||t[50]!==I||t[51]!==O?(u={mutationFn:A,onSuccess:I,onError:O},t[49]=A,t[50]=I,t[51]=O,t[52]=u):u=t[52];const F=W(u);if(r)return null;let R;t[53]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(X,{className:"p-0",children:[s.jsx(ee,{className:"text-sm",children:"Email Domain"}),s.jsx(_e,{className:"text-xs",children:"Claim your company's email domain so new users with matching emails can automatically join this organization."})]}),t[53]=R):R=t[53];let $;return t[54]!==z||t[55]!==D||t[56]!==P||t[57]!==c||t[58]!==m||t[59]!==F||t[60]!==d?($=s.jsxs(Y,{className:"p-6",children:[R,s.jsx(te,{className:"flex flex-col gap-4 p-0 pt-4",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Claimed domain"}),s.jsx("p",{className:"text-sm font-medium",children:c})]}),s.jsx(M,{variant:"outline",size:"sm",onClick:()=>P.mutate(),disabled:P.isPending,children:"Remove"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(B,{className:"text-xs",children:"Auto-join"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Users with @",c," emails will automatically join this organization on signup."]})]}),s.jsx(Ae,{checked:z,onCheckedChange:l=>F.mutate(l),disabled:F.isPending})]})]}):D?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Your domain"}),s.jsx("p",{className:"text-sm font-medium",children:d})]}),s.jsx(M,{size:"sm",onClick:()=>m.mutate(),disabled:m.isPending,children:m.isPending?"Claiming...":"Claim Domain"})]}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"No corporate email domain detected."})})]}),t[54]=z,t[55]=D,t[56]=P,t[57]=c,t[58]=m,t[59]=F,t[60]=d,t[61]=$):$=t[61],$}const re=["site-editor","site-diagnostics","ai-image","ai-research"],ne=8;function et(t,e,i){const o=e.find(a=>a.id===t);if(o)return{id:o.id,title:o.title,icon:o.icon,kind:"template"};const p=i.find(a=>a.id===t);return p?{id:t,title:p.title,icon:p.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function tt(t){const e=G.c(39),{agent:i,onRemove:o}=t;let p;e[0]!==i.id?(p={id:i.id},e[0]=i.id,e[1]=p):p=e[1];const{attributes:a,listeners:n,setNodeRef:C,transform:E,transition:N,isDragging:r}=Re(p);let f;e[2]!==E?(f=Le.Transform.toString(E),e[2]=E,e[3]=f):f=e[3];const g=r?.5:void 0,d=r?100:void 0;let c;e[4]!==f||e[5]!==g||e[6]!==d||e[7]!==N?(c={transform:f,transition:N,opacity:g,zIndex:d},e[4]=f,e[5]=g,e[6]=d,e[7]=N,e[8]=c):c=e[8];const z=c,D=r&&"shadow-lg";let x;e[9]!==D?(x=ye("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",D),e[9]=D,e[10]=x):x=e[10];const j=`Drag to reorder ${i.title}`;let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Be,{size:14}),e[11]=h):h=e[11];let y;e[12]!==a||e[13]!==n||e[14]!==j?(y=s.jsx("button",{type:"button",...a,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":j,children:h}),e[12]=a,e[13]=n,e[14]=j,e[15]=y):y=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[16]=b):b=e[16];let w;e[17]!==i.icon||e[18]!==i.title?(w=s.jsx(ae,{icon:i.icon,name:i.title,size:"xs",fallbackIcon:b}),e[17]=i.icon,e[18]=i.title,e[19]=w):w=e[19];let m;e[20]!==i.title?(m=s.jsx("span",{className:"text-sm text-foreground truncate",children:i.title}),e[20]=i.title,e[21]=m):m=e[21];const S=i.kind==="template"?"Template":i.kind==="custom"?"Custom agent":"Unavailable";let v;e[22]!==S?(v=s.jsx("span",{className:"text-xs text-muted-foreground",children:S}),e[22]=S,e[23]=v):v=e[23];let _;e[24]!==m||e[25]!==v?(_=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[m,v]}),e[24]=m,e[25]=v,e[26]=_):_=e[26];const k=`Remove ${i.title}`;let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(fe,{size:14}),e[27]=P):P=e[27];let A;e[28]!==o||e[29]!==k?(A=s.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":k,children:P}),e[28]=o,e[29]=k,e[30]=A):A=e[30];let I;return e[31]!==C||e[32]!==z||e[33]!==y||e[34]!==w||e[35]!==_||e[36]!==A||e[37]!==x?(I=s.jsxs("div",{ref:C,style:z,className:x,children:[y,w,_,A]}),e[31]=C,e[32]=z,e[33]=y,e[34]=w,e[35]=_,e[36]=A,e[37]=x,e[38]=I):I=e[38],I}function st(t){const e=G.c(48),{selectedIds:i,onAdd:o}=t,[p,a]=J.useState(!1),[n,C]=J.useState(""),E=ge();let N;e[0]!==i?(N=new Set(i),e[0]=i,e[1]=N):N=e[1];const r=N;let f,g,d,c,z,D,x,j,h,y,b,w,m;if(e[2]!==E||e[3]!==o||e[4]!==p||e[5]!==n||e[6]!==r){const P=n.toLowerCase();c=ie.filter(u=>!r.has(u.id)&&(!n||u.title.toLowerCase().includes(P)));let A;e[20]!==r?(A=u=>u.id!==null&&!De(u.id)&&!r.has(u.id),e[20]=r,e[21]=A):A=e[21],d=E.filter(A).filter(u=>!n||u.title.toLowerCase().includes(P));let I;e[22]!==o?(I=u=>{o(u),a(!1),C("")},e[22]=o,e[23]=I):I=e[23];const O=I;g=Ge,w=p,m=a,e[24]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ke,{asChild:!0,children:s.jsxs(M,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Je,{size:14}),"Add agent"]})}),e[24]=z):z=e[24],f=Ue,h="w-[320px] p-0 overflow-hidden",y="start",e[25]!==n?(b=s.jsx(qe,{value:n,onChange:C,placeholder:"Search agents..."}),e[25]=n,e[26]=b):b=e[26],D="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=c.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),c.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ae,{icon:u.icon,name:u.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),j=d.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),d.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ae,{icon:u.icon,name:u.title,size:"xs",fallbackIcon:s.jsx(xe,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),e[2]=E,e[3]=o,e[4]=p,e[5]=n,e[6]=r,e[7]=f,e[8]=g,e[9]=d,e[10]=c,e[11]=z,e[12]=D,e[13]=x,e[14]=j,e[15]=h,e[16]=y,e[17]=b,e[18]=w,e[19]=m}else f=e[7],g=e[8],d=e[9],c=e[10],z=e[11],D=e[12],x=e[13],j=e[14],h=e[15],y=e[16],b=e[17],w=e[18],m=e[19];let S;e[27]!==d||e[28]!==c.length||e[29]!==n?(S=c.length===0&&d.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=d,e[28]=c.length,e[29]=n,e[30]=S):S=e[30];let v;e[31]!==S||e[32]!==D||e[33]!==x||e[34]!==j?(v=s.jsxs("div",{className:D,children:[x,j,S]}),e[31]=S,e[32]=D,e[33]=x,e[34]=j,e[35]=v):v=e[35];let _;e[36]!==f||e[37]!==v||e[38]!==h||e[39]!==y||e[40]!==b?(_=s.jsxs(f,{className:h,align:y,children:[b,v]}),e[36]=f,e[37]=v,e[38]=h,e[39]=y,e[40]=b,e[41]=_):_=e[41];let k;return e[42]!==g||e[43]!==z||e[44]!==_||e[45]!==w||e[46]!==m?(k=s.jsxs(g,{open:w,onOpenChange:m,children:[z,_]}),e[42]=g,e[43]=z,e[44]=_,e[45]=w,e[46]=m,e[47]=k):k=e[47],k}function nt(){const t=G.c(60),e=Qe(),i=ge(),o=Ve();let p;t[0]!==e?.ids?(p=e?.ids??[...re],t[0]=e?.ids,t[1]=p):p=t[1];const a=p,[n,C]=J.useState(a);let E;t[2]!==n||t[3]!==a?(E=n.length!==a.length||n.some((l,L)=>l!==a[L]),t[2]=n,t[3]=a,t[4]=E):E=t[4];const N=E;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f={coordinateGetter:Me},t[6]=f):f=t[6];const g=Ee(le(Fe,r),le(Te,f));let d;t[7]!==n?(d=l=>{const{active:L,over:K}=l;if(!K||L.id===K.id)return;const H=n.indexOf(L.id),U=n.indexOf(K.id);H===-1||U===-1||C($e([...n],H,U))},t[7]=n,t[8]=d):d=t[8];const c=d;let z;t[9]!==n?(z=l=>{n.includes(l)||C([...n,l])},t[9]=n,t[10]=z):z=t[10];const D=z;let x;t[11]!==n?(x=l=>{C(n.filter(L=>L!==l))},t[11]=n,t[12]=x):x=t[12];const j=x;let h;t[13]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{C([...re])},t[13]=h):h=t[13];const y=h;let b;t[14]!==n||t[15]!==o?(b=()=>{o.mutate({ids:n},{onSuccess:()=>{q("default_home_agents_updated",{count:n.length,template_count:n.filter(it).length}),T.success("Default home agents updated")},onError:at})},t[14]=n,t[15]=o,t[16]=b):b=t[16];const w=b;let m,S,v,_,k,P,A;if(t[17]!==i||t[18]!==n||t[19]!==c||t[20]!==j||t[21]!==g||t[22]!==o.isPending){let l;t[30]!==i?(l=U=>et(U,ie,i),t[30]=i,t[31]=l):l=t[31];const L=n.map(l);v=Math.max(0,n.length-ne),S=Y,k="p-6";let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(ee,{className:"text-sm",children:"Default home agents"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Choose which agents appear on the home view for everyone in this organization. Drag to reorder. Up to ",ne," tiles render on the home view."]})]}),t[32]=K):K=t[32];let H;t[33]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Se,{size:14}),t[33]=H):H=t[33],t[34]!==o.isPending?(P=s.jsxs(X,{className:"p-0 flex flex-row items-start justify-between gap-3",children:[K,s.jsxs(M,{type:"button",variant:"ghost",size:"sm",onClick:y,disabled:o.isPending,children:[H,"Reset defaults"]})]}),t[34]=o.isPending,t[35]=P):P=t[35],m=te,A="p-0 flex flex-col gap-3",_=L.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ie,{sensors:g,collisionDetection:Pe,onDragEnd:c,children:s.jsx(ke,{items:n,strategy:Oe,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:L.map((U,he)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[he===ne&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(tt,{agent:U,onRemove:()=>j(U.id)})]},U.id))})})}),t[17]=i,t[18]=n,t[19]=c,t[20]=j,t[21]=g,t[22]=o.isPending,t[23]=m,t[24]=S,t[25]=v,t[26]=_,t[27]=k,t[28]=P,t[29]=A}else m=t[23],S=t[24],v=t[25],_=t[26],k=t[27],P=t[28],A=t[29];let I;t[36]!==n||t[37]!==D?(I=s.jsx(st,{selectedIds:n,onAdd:D}),t[36]=n,t[37]=D,t[38]=I):I=t[38];let O;t[39]!==v?(O=v>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v," agent",v===1?"":"s"," won't fit on the home view"]}),t[39]=v,t[40]=O):O=t[40];let u;t[41]!==I||t[42]!==O?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[I,O]}),t[41]=I,t[42]=O,t[43]=u):u=t[43];let F;t[44]!==m||t[45]!==_||t[46]!==u||t[47]!==A?(F=s.jsxs(m,{className:A,children:[_,u]}),t[44]=m,t[45]=_,t[46]=u,t[47]=A,t[48]=F):F=t[48];let R;t[49]!==w||t[50]!==a||t[51]!==N||t[52]!==o.isPending?(R=N&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"button",onClick:w,disabled:o.isPending,children:o.isPending?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>C(a),disabled:o.isPending,children:"Cancel"})]}),t[49]=w,t[50]=a,t[51]=N,t[52]=o.isPending,t[53]=R):R=t[53];let $;return t[54]!==S||t[55]!==k||t[56]!==P||t[57]!==F||t[58]!==R?($=s.jsxs(S,{className:k,children:[P,F,R]}),t[54]=S,t[55]=k,t[56]=P,t[57]=F,t[58]=R,t[59]=$):$=t[59],$}function at(t){T.error(t instanceof Error?t.message:"Failed to update default home agents")}function it(t){return ie.some(e=>e.id===t)}function ot(){const t=G.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Default home agents"})}),t[0]=e):e=t[0];let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(Y,{className:"p-6",children:[e,s.jsx(te,{className:"p-0 flex flex-col gap-2",children:Array.from({length:4}).map(lt)})]}),t[1]=i):i=t[1],i}function lt(t,e){return s.jsx(He,{className:"h-12 w-full rounded-lg"},e)}function rt(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(J.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(nt,{})}),t[0]=e):e=t[0],e}function ct(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Q,{children:s.jsx(Q.Content,{children:s.jsx(Q.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(Q.Title,{children:"Organization"}),s.jsx(Ye,{}),s.jsx(Xe,{}),s.jsx(rt,{})]})})})}),t[0]=e):e=t[0],e}function Zt(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ct,{}),t[0]=e):e=t[0],e}export{Zt as default};
|
package/dist/client/assets/{github-repo-picker-BSkFdyNg.js → github-repo-picker-U-wqCDDT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as M,s as z,o as ve,b as ze,r as O,K as ne,n as He,a as Fe,j as t,c as he,B as oe,t as V,z as ie,f as We,a0 as Je,a1 as Xe,az as je,C as Ze,l as xe,V as et}from"./index-D_cV0HX5.js";import{S as re,u as $,d as we,W as Be,j as ye}from"./constants-B9qhU0c2.js";import{u as Ne}from"./use-navigate-to-agent-cye4_ovr.js";import{c as ce,d as le,a as de,D as ue,b as tt}from"./dialog-DTc6xcOj.js";import{i as Ae}from"./SearchMd-CJUx5L0X.js";import{C as qe}from"./collection-search-DzQxK0TT.js";import{c as Ee,b as Se,D as Oe,a as Le}from"./drawer-D7fRUj36.js";import{u as Re}from"./use-mobile-BukhR5xc.js";import{I as Me}from"./integration-icon-3xGkh2yb.js";import{a as ke,u as nt}from"./use-connection-DnhQK4fq.js";import{u as st,d as Qe}from"./use-mcp-tools-dsvqyXUs.js";import{b as Ue,u as it}from"./use-virtual-mcp-CCFi2lST.js";import{C as ot}from"./checkbox-CnUU9-I8.js";import{i as at}from"./Lock01-DGN1sRwj.js";import{I as rt}from"./agent-icon-Dmd713yi.js";import{e as ct}from"./extract-connection-data-BkBgr0-3.js";function lt(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function dt(){const i=await fetch("/api/deco-sites");if(!i.ok){const e=await i.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${i.status})`)}return i.json()}function Kt(i){const e=M.c(65),{open:n,onOpenChange:a,onBack:c}=i,{org:s}=z(),l=Ne(),m=ve(),{data:f}=ze.useSession(),[x,h]=O.useState(null),[T,d]=O.useState("");let u;e[0]!==s.id?(u={connectionId:re,orgId:s.id},e[0]=s.id,e[1]=u):u=e[1];const p=$(u);let r;e[2]!==f?.user?.email?(r=ne.decoSites(f?.user?.email),e[2]=f?.user?.email,e[3]=r):r=e[3];const g=n&&!!f?.user?.email;let C;e[4]!==r||e[5]!==g?(C={queryKey:r,queryFn:dt,enabled:g,staleTime:6e4,retry:!1},e[4]=r,e[5]=g,e[6]=C):C=e[6];const{data:_,isLoading:N,error:b}=He(C),I=_?.sites??[];let o;e[7]!==a?(o=w=>{w||(h(null),d("")),a(w)},e[7]=a,e[8]=o):o=e[8];const y=o;let A;e[9]!==T?(A=w=>w.name.toLowerCase().includes(T.toLowerCase())||w.domains?.[0]?.domain.toLowerCase().includes(T.toLowerCase()),e[9]=T,e[10]=A):A=e[10];const v=I.filter(A),E=!x||v.some(w=>w.name===x);let j;e[11]!==p||e[12]!==s.id?(j=async w=>{V("deco_site_import_started",{site_name:w});const G=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:w,orgId:s.id})}),D=await G.json().catch(ft);if(!G.ok)throw new Error(D.error??`Failed to create connection (${G.status})`);const L=D.connId;if(!L)throw new Error("Server did not return a connection ID");const ge=D.icon??null,te=lt(w),Pe=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:w,description:"Imported from deco.cx",pinned:!0,icon:ge??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ge,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:L,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:L,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:L,toolName:"file_explorer"}}}},connections:[{connection_id:L}]}}}),Ge=Pe.structuredContent??Pe;return{slug:te,virtualMcpId:Ge.item.id,connId:L,item:Ge.item}},e[11]=p,e[12]=s.id,e[13]=j):j=e[13];let S;e[14]!==p||e[15]!==y||e[16]!==l||e[17]!==s.id||e[18]!==m?(S=w=>{const{slug:G,virtualMcpId:D,item:L}=w;V("deco_site_import_succeeded",{site_name:L.title,virtual_mcp_id:D,slug:G}),m.setQueryData(ne.collectionItem(p,s.id,"","VIRTUAL_MCP",D),{item:L}),m.invalidateQueries({predicate:ge=>{const te=ge.queryKey;return te[1]===s.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),m.invalidateQueries({queryKey:ne.projects(s.id)}),ie.success(`Imported ${G} from deco.cx`),y(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(D)},e[14]=p,e[15]=y,e[16]=l,e[17]=s.id,e[18]=m,e[19]=S):S=e[19];let k;e[20]!==j||e[21]!==S?(k={mutationFn:j,onSuccess:S,onError:mt},e[20]=j,e[21]=S,e[22]=k):k=e[22];const U=Fe(k),H=le,se=ce,R="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(de,{className:"sr-only",children:t.jsx(ue,{children:"Import from deco.cx"})}),e[23]=P):P=e[23];let F;e[24]!==c?(F=c&&t.jsx("button",{type:"button",onClick:c,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ae,{size:18})}),e[24]=c,e[25]=F):F=e[25];let me;e[26]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=me):me=e[26];let B;e[27]!==F?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[F,me]}),e[27]=F,e[28]=B):B=e[28];let fe;e[29]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w.key==="Escape"&&d("")},e[29]=fe):fe=e[29];let q;e[30]!==T?(q=t.jsx("div",{children:t.jsx(qe,{value:T,onChange:d,placeholder:"Search sites...",onKeyDown:fe})}),e[30]=T,e[31]=q):q=e[31];const Ke="pb-0 min-h-[300px]";let Q;e[32]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=N,e[33]=Q):Q=e[33];const _e=!N&&!b&&I.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Ce=!N&&I.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[v.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",T,"”"]}),v.map(w=>{const G=w.domains?.find(ut)?.domain??w.domains?.[0]?.domain,D=x===w.name;return t.jsxs("button",{type:"button",onClick:()=>h(w.name),className:he("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",D?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:w.thumb_url?t.jsx("img",{src:w.thumb_url,alt:w.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:w.name}),G&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:G})]})]},w.name)})]});let Y;e[34]!==Q||e[35]!==_e||e[36]!==Ce?(Y=t.jsxs("div",{className:Ke,children:[Q,_e,Ce]}),e[34]=Q,e[35]=_e,e[36]=Ce,e[37]=Y):Y=e[37];let K;e[38]!==y?(K=()=>y(!1),e[38]=y,e[39]=K):K=e[39];let W;e[40]!==U.isPending||e[41]!==K?(W=t.jsx(oe,{variant:"outline",onClick:K,disabled:U.isPending,children:"Cancel"}),e[40]=U.isPending,e[41]=K,e[42]=W):W=e[42];const Ie=!x||!E||U.isPending||N;let J;e[43]!==U||e[44]!==x?(J=()=>x&&U.mutate(x),e[43]=U,e[44]=x,e[45]=J):J=e[45];const Te=U.isPending?"Importing...":"Import";let X;e[46]!==Ie||e[47]!==J||e[48]!==Te?(X=t.jsx(oe,{disabled:Ie,onClick:J,children:Te}),e[46]=Ie,e[47]=J,e[48]=Te,e[49]=X):X=e[49];let Z;e[50]!==W||e[51]!==X?(Z=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[50]=W,e[51]=X,e[52]=Z):Z=e[52];let ee;e[53]!==se||e[54]!==P||e[55]!==B||e[56]!==q||e[57]!==Y||e[58]!==Z?(ee=t.jsxs(se,{className:R,children:[P,B,q,Y,Z]}),e[53]=se,e[54]=P,e[55]=B,e[56]=q,e[57]=Y,e[58]=Z,e[59]=ee):ee=e[59];let pe;return e[60]!==H||e[61]!==y||e[62]!==n||e[63]!==ee?(pe=t.jsx(H,{open:n,onOpenChange:y,children:ee}),e[60]=H,e[61]=y,e[62]=n,e[63]=ee,e[64]=pe):pe=e[64],pe}function ut(i){return i.production}function mt(i){V("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),ie.error("Import failed: "+(i instanceof Error?i.message:"Unknown error"))}function ft(){return{}}function Ye(i,e){const n=M.c(11),{org:a}=z();let c;n[0]!==a.id?(c=we.REGISTRY(a.id),n[0]=a.id,n[1]=c):c=n[1];const s=c;let l;n[2]!==a.id||n[3]!==s?(l={connectionId:s,orgId:a.id},n[2]=a.id,n[3]=s,n[4]=l):l=n[4];const m=$(l);let f;n[5]!==i?(f={name:i},n[5]=i,n[6]=f):f=n[6];const x=e?.enabled??!0;let h;return n[7]!==m||n[8]!==f||n[9]!==x?(h={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:f,enabled:x,staleTime:3e5,select:pt},n[7]=m,n[8]=f,n[9]=x,n[10]=h):h=n[10],st(h)}function pt(i){return i.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function De(i){const e=M.c(7),{onRecruit:n,isRecruiting:a,isLoading:c}=i;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=l):l=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx("ul",{className:"space-y-1.5",children:gt.map(ht)})]}),e[2]=m):m=e[2];const f=a||c,x=a?"Setting up...":"Add Site Diagnostics";let h;return e[3]!==n||e[4]!==f||e[5]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,m,t.jsx(oe,{onClick:n,disabled:f,className:"w-full cursor-pointer",children:x})]}),e[3]=n,e[4]=f,e[5]=x,e[6]=h):h=e[6],h}function ht(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Wt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(I=>I.id==="site-diagnostics"),{data:u,isLoading:p}=Ye(d.appId,{enabled:i}),r=u?.title||u?.server?.title||u?.server?.name||d.title,g=u?.server?.icons?.[0]?.src??d.icon,C=u?.server?.description??null,_=t.jsx(Me,{icon:g,name:r,size:"sm"}),N=async()=>{if(u){if(n){e(!1),s(n.id);return}T(!0);try{const I=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:d.appId},limit:1,offset:0}});let o;const A=I?.structuredContent?.items?.find(E=>E.app_id===d.appId);if(A)o=A.id;else{const E=u.server?.remotes?.[0]?.url;if(!E)throw new Error("Registry item is missing a remote URL for site-diagnostics");o=(await l.create.mutateAsync({title:r,description:C,icon:u.server?.icons?.[0]?.src??d.icon,connection_type:"HTTP",connection_url:E,app_name:u.server?.name??"site-diagnostics",app_id:d.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:d.appId,verified:!0}})).id}const v=await m.create.mutateAsync({title:r,description:C,icon:g,status:"active",connections:[{connection_id:o,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:o,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:o,toolName:"diagnose"}}}}});V("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:v.id}),e(!1),s(v.id)}catch(I){V("agent_recruit_failed",{template_id:"site-diagnostics",error:I instanceof Error?I.message:String(I)}),console.error("Failed to create Site Diagnostics agent:",I)}finally{T(!1)}}},b=`Add ${r}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Le,{className:"text-xl font-semibold",children:b})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ue,{className:"text-xl font-semibold",children:b})]})}),t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})]})})}const xt="https://sites-lean-canva.decocache.com/api/mcp",Nt=["Build and update Lean Canvas business models visually","Interactive grid UI with all 9 canvas sections","Iterative updates — add information as you discover it","Covers: Problem, Solution, Key Metrics, Unique Value Proposition","Covers: Channels, Customer Segments, Cost Structure, Revenue Streams","Unfair Advantage analysis"];function Ve(i){const e=M.c(7),{onRecruit:n,isRecruiting:a}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a Lean Canvas agent that helps you build and iterate on your business model. Describe your idea and it produces a visual, structured canvas."}),e[0]=c):c=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"space-y-2",children:[s,t.jsx("ul",{className:"space-y-1.5",children:Nt.map(_t)})]}),e[2]=l):l=e[2];const m=a?"Setting up...":"Add Lean Canvas";let f;return e[3]!==a||e[4]!==n||e[5]!==m?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[c,l,t.jsx(oe,{onClick:n,disabled:a,className:"w-full cursor-pointer",children:m})]}),e[3]=a,e[4]=n,e[5]=m,e[6]=f):f=e[6],f}function _t(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Jt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(g=>g.id==="lean-canvas"),u=t.jsx(Me,{icon:d.icon,name:d.title,size:"sm"}),p=async()=>{if(n){e(!1),s(n.id);return}T(!0);try{const g=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:"lean-canvas"},limit:1,offset:0}});let C;const N=g?.structuredContent?.items?.find(o=>o.app_id==="lean-canvas"),b=we.SELF(c.id);N?C=N.id:C=(await l.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,connection_type:"HTTP",connection_url:xt,app_name:"lean-canvas",app_id:"lean-canvas",configuration_state:{OBJECT_STORAGE:{__type:"@deco/object-storage",value:b}},metadata:{type:"lean-canvas",source:"store",verified:!0}})).id;const I=await m.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,status:"active",connections:[{connection_id:C,selected_tools:null,selected_resources:null,selected_prompts:null},{connection_id:b,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"lean-canvas",instructions:null,ui:{pinnedViews:[{connectionId:C,toolName:"lean_canvas",label:"lean_canvas",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:C,toolName:"lean_canvas"}}}}});V("agent_recruit_confirmed",{template_id:"lean-canvas",agent_id:I.id}),e(!1),s(I.id)}catch(g){V("agent_recruit_failed",{template_id:"lean-canvas",error:g instanceof Error?g.message:String(g)}),console.error("Failed to create Lean Canvas agent:",g)}finally{T(!1)}},r=`Add ${d.title}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(Le,{className:"text-xl font-semibold",children:r})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:p,isRecruiting:h})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(ue,{className:"text-xl font-semibold",children:r})]})}),t.jsx(Ve,{onRecruit:p,isRecruiting:h})]})})}const Ct=`<role>
|
|
1
|
+
import{e as M,s as z,o as ve,b as ze,r as O,K as ne,n as He,a as Fe,j as t,c as he,B as oe,t as V,z as ie,f as We,a0 as Je,a1 as Xe,az as je,C as Ze,l as xe,V as et}from"./index-3eJ_fByu.js";import{S as re,u as $,d as we,W as Be,j as ye}from"./constants-DSi4Q8Ls.js";import{u as Ne}from"./use-navigate-to-agent-FZAZYQZP.js";import{c as ce,d as le,a as de,D as ue,b as tt}from"./dialog-B68m35Ko.js";import{i as Ae}from"./SearchMd-nF5GFZRa.js";import{C as qe}from"./collection-search-7HQoERMh.js";import{c as Ee,b as Se,D as Oe,a as Le}from"./drawer-Dtlg5GWG.js";import{u as Re}from"./use-mobile-TpLA3bJu.js";import{I as Me}from"./integration-icon-B-89bYAr.js";import{a as ke,u as nt}from"./use-connection-BMRXzgrq.js";import{u as st,d as Qe}from"./use-mcp-tools-CYeL56pw.js";import{b as Ue,u as it}from"./use-virtual-mcp-Yf3Hlsyo.js";import{C as ot}from"./checkbox-D6JbuT--.js";import{i as at}from"./Lock01-cgwLiQmV.js";import{I as rt}from"./agent-icon-zBilAupC.js";import{e as ct}from"./extract-connection-data-D0LL8rbt.js";function lt(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function dt(){const i=await fetch("/api/deco-sites");if(!i.ok){const e=await i.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${i.status})`)}return i.json()}function Kt(i){const e=M.c(65),{open:n,onOpenChange:a,onBack:c}=i,{org:s}=z(),l=Ne(),m=ve(),{data:f}=ze.useSession(),[x,h]=O.useState(null),[T,d]=O.useState("");let u;e[0]!==s.id?(u={connectionId:re,orgId:s.id},e[0]=s.id,e[1]=u):u=e[1];const p=$(u);let r;e[2]!==f?.user?.email?(r=ne.decoSites(f?.user?.email),e[2]=f?.user?.email,e[3]=r):r=e[3];const g=n&&!!f?.user?.email;let C;e[4]!==r||e[5]!==g?(C={queryKey:r,queryFn:dt,enabled:g,staleTime:6e4,retry:!1},e[4]=r,e[5]=g,e[6]=C):C=e[6];const{data:_,isLoading:N,error:b}=He(C),I=_?.sites??[];let o;e[7]!==a?(o=w=>{w||(h(null),d("")),a(w)},e[7]=a,e[8]=o):o=e[8];const y=o;let A;e[9]!==T?(A=w=>w.name.toLowerCase().includes(T.toLowerCase())||w.domains?.[0]?.domain.toLowerCase().includes(T.toLowerCase()),e[9]=T,e[10]=A):A=e[10];const v=I.filter(A),E=!x||v.some(w=>w.name===x);let j;e[11]!==p||e[12]!==s.id?(j=async w=>{V("deco_site_import_started",{site_name:w});const G=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:w,orgId:s.id})}),D=await G.json().catch(ft);if(!G.ok)throw new Error(D.error??`Failed to create connection (${G.status})`);const L=D.connId;if(!L)throw new Error("Server did not return a connection ID");const ge=D.icon??null,te=lt(w),Pe=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:w,description:"Imported from deco.cx",pinned:!0,icon:ge??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ge,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:L,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:L,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:L,toolName:"file_explorer"}}}},connections:[{connection_id:L}]}}}),Ge=Pe.structuredContent??Pe;return{slug:te,virtualMcpId:Ge.item.id,connId:L,item:Ge.item}},e[11]=p,e[12]=s.id,e[13]=j):j=e[13];let S;e[14]!==p||e[15]!==y||e[16]!==l||e[17]!==s.id||e[18]!==m?(S=w=>{const{slug:G,virtualMcpId:D,item:L}=w;V("deco_site_import_succeeded",{site_name:L.title,virtual_mcp_id:D,slug:G}),m.setQueryData(ne.collectionItem(p,s.id,"","VIRTUAL_MCP",D),{item:L}),m.invalidateQueries({predicate:ge=>{const te=ge.queryKey;return te[1]===s.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),m.invalidateQueries({queryKey:ne.projects(s.id)}),ie.success(`Imported ${G} from deco.cx`),y(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(D)},e[14]=p,e[15]=y,e[16]=l,e[17]=s.id,e[18]=m,e[19]=S):S=e[19];let k;e[20]!==j||e[21]!==S?(k={mutationFn:j,onSuccess:S,onError:mt},e[20]=j,e[21]=S,e[22]=k):k=e[22];const U=Fe(k),H=le,se=ce,R="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(de,{className:"sr-only",children:t.jsx(ue,{children:"Import from deco.cx"})}),e[23]=P):P=e[23];let F;e[24]!==c?(F=c&&t.jsx("button",{type:"button",onClick:c,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ae,{size:18})}),e[24]=c,e[25]=F):F=e[25];let me;e[26]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=me):me=e[26];let B;e[27]!==F?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[F,me]}),e[27]=F,e[28]=B):B=e[28];let fe;e[29]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w.key==="Escape"&&d("")},e[29]=fe):fe=e[29];let q;e[30]!==T?(q=t.jsx("div",{children:t.jsx(qe,{value:T,onChange:d,placeholder:"Search sites...",onKeyDown:fe})}),e[30]=T,e[31]=q):q=e[31];const Ke="pb-0 min-h-[300px]";let Q;e[32]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=N,e[33]=Q):Q=e[33];const _e=!N&&!b&&I.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Ce=!N&&I.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[v.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",T,"”"]}),v.map(w=>{const G=w.domains?.find(ut)?.domain??w.domains?.[0]?.domain,D=x===w.name;return t.jsxs("button",{type:"button",onClick:()=>h(w.name),className:he("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",D?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:w.thumb_url?t.jsx("img",{src:w.thumb_url,alt:w.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:w.name}),G&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:G})]})]},w.name)})]});let Y;e[34]!==Q||e[35]!==_e||e[36]!==Ce?(Y=t.jsxs("div",{className:Ke,children:[Q,_e,Ce]}),e[34]=Q,e[35]=_e,e[36]=Ce,e[37]=Y):Y=e[37];let K;e[38]!==y?(K=()=>y(!1),e[38]=y,e[39]=K):K=e[39];let W;e[40]!==U.isPending||e[41]!==K?(W=t.jsx(oe,{variant:"outline",onClick:K,disabled:U.isPending,children:"Cancel"}),e[40]=U.isPending,e[41]=K,e[42]=W):W=e[42];const Ie=!x||!E||U.isPending||N;let J;e[43]!==U||e[44]!==x?(J=()=>x&&U.mutate(x),e[43]=U,e[44]=x,e[45]=J):J=e[45];const Te=U.isPending?"Importing...":"Import";let X;e[46]!==Ie||e[47]!==J||e[48]!==Te?(X=t.jsx(oe,{disabled:Ie,onClick:J,children:Te}),e[46]=Ie,e[47]=J,e[48]=Te,e[49]=X):X=e[49];let Z;e[50]!==W||e[51]!==X?(Z=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[50]=W,e[51]=X,e[52]=Z):Z=e[52];let ee;e[53]!==se||e[54]!==P||e[55]!==B||e[56]!==q||e[57]!==Y||e[58]!==Z?(ee=t.jsxs(se,{className:R,children:[P,B,q,Y,Z]}),e[53]=se,e[54]=P,e[55]=B,e[56]=q,e[57]=Y,e[58]=Z,e[59]=ee):ee=e[59];let pe;return e[60]!==H||e[61]!==y||e[62]!==n||e[63]!==ee?(pe=t.jsx(H,{open:n,onOpenChange:y,children:ee}),e[60]=H,e[61]=y,e[62]=n,e[63]=ee,e[64]=pe):pe=e[64],pe}function ut(i){return i.production}function mt(i){V("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),ie.error("Import failed: "+(i instanceof Error?i.message:"Unknown error"))}function ft(){return{}}function Ye(i,e){const n=M.c(11),{org:a}=z();let c;n[0]!==a.id?(c=we.REGISTRY(a.id),n[0]=a.id,n[1]=c):c=n[1];const s=c;let l;n[2]!==a.id||n[3]!==s?(l={connectionId:s,orgId:a.id},n[2]=a.id,n[3]=s,n[4]=l):l=n[4];const m=$(l);let f;n[5]!==i?(f={name:i},n[5]=i,n[6]=f):f=n[6];const x=e?.enabled??!0;let h;return n[7]!==m||n[8]!==f||n[9]!==x?(h={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:f,enabled:x,staleTime:3e5,select:pt},n[7]=m,n[8]=f,n[9]=x,n[10]=h):h=n[10],st(h)}function pt(i){return i.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function De(i){const e=M.c(7),{onRecruit:n,isRecruiting:a,isLoading:c}=i;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=l):l=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx("ul",{className:"space-y-1.5",children:gt.map(ht)})]}),e[2]=m):m=e[2];const f=a||c,x=a?"Setting up...":"Add Site Diagnostics";let h;return e[3]!==n||e[4]!==f||e[5]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,m,t.jsx(oe,{onClick:n,disabled:f,className:"w-full cursor-pointer",children:x})]}),e[3]=n,e[4]=f,e[5]=x,e[6]=h):h=e[6],h}function ht(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Wt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(I=>I.id==="site-diagnostics"),{data:u,isLoading:p}=Ye(d.appId,{enabled:i}),r=u?.title||u?.server?.title||u?.server?.name||d.title,g=u?.server?.icons?.[0]?.src??d.icon,C=u?.server?.description??null,_=t.jsx(Me,{icon:g,name:r,size:"sm"}),N=async()=>{if(u){if(n){e(!1),s(n.id);return}T(!0);try{const I=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:d.appId},limit:1,offset:0}});let o;const A=I?.structuredContent?.items?.find(E=>E.app_id===d.appId);if(A)o=A.id;else{const E=u.server?.remotes?.[0]?.url;if(!E)throw new Error("Registry item is missing a remote URL for site-diagnostics");o=(await l.create.mutateAsync({title:r,description:C,icon:u.server?.icons?.[0]?.src??d.icon,connection_type:"HTTP",connection_url:E,app_name:u.server?.name??"site-diagnostics",app_id:d.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:d.appId,verified:!0}})).id}const v=await m.create.mutateAsync({title:r,description:C,icon:g,status:"active",connections:[{connection_id:o,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:o,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:o,toolName:"diagnose"}}}}});V("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:v.id}),e(!1),s(v.id)}catch(I){V("agent_recruit_failed",{template_id:"site-diagnostics",error:I instanceof Error?I.message:String(I)}),console.error("Failed to create Site Diagnostics agent:",I)}finally{T(!1)}}},b=`Add ${r}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Le,{className:"text-xl font-semibold",children:b})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ue,{className:"text-xl font-semibold",children:b})]})}),t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})]})})}const xt="https://sites-lean-canva.decocache.com/api/mcp",Nt=["Build and update Lean Canvas business models visually","Interactive grid UI with all 9 canvas sections","Iterative updates — add information as you discover it","Covers: Problem, Solution, Key Metrics, Unique Value Proposition","Covers: Channels, Customer Segments, Cost Structure, Revenue Streams","Unfair Advantage analysis"];function Ve(i){const e=M.c(7),{onRecruit:n,isRecruiting:a}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a Lean Canvas agent that helps you build and iterate on your business model. Describe your idea and it produces a visual, structured canvas."}),e[0]=c):c=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"space-y-2",children:[s,t.jsx("ul",{className:"space-y-1.5",children:Nt.map(_t)})]}),e[2]=l):l=e[2];const m=a?"Setting up...":"Add Lean Canvas";let f;return e[3]!==a||e[4]!==n||e[5]!==m?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[c,l,t.jsx(oe,{onClick:n,disabled:a,className:"w-full cursor-pointer",children:m})]}),e[3]=a,e[4]=n,e[5]=m,e[6]=f):f=e[6],f}function _t(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Jt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(g=>g.id==="lean-canvas"),u=t.jsx(Me,{icon:d.icon,name:d.title,size:"sm"}),p=async()=>{if(n){e(!1),s(n.id);return}T(!0);try{const g=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:"lean-canvas"},limit:1,offset:0}});let C;const N=g?.structuredContent?.items?.find(o=>o.app_id==="lean-canvas"),b=we.SELF(c.id);N?C=N.id:C=(await l.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,connection_type:"HTTP",connection_url:xt,app_name:"lean-canvas",app_id:"lean-canvas",configuration_state:{OBJECT_STORAGE:{__type:"@deco/object-storage",value:b}},metadata:{type:"lean-canvas",source:"store",verified:!0}})).id;const I=await m.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,status:"active",connections:[{connection_id:C,selected_tools:null,selected_resources:null,selected_prompts:null},{connection_id:b,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"lean-canvas",instructions:null,ui:{pinnedViews:[{connectionId:C,toolName:"lean_canvas",label:"lean_canvas",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:C,toolName:"lean_canvas"}}}}});V("agent_recruit_confirmed",{template_id:"lean-canvas",agent_id:I.id}),e(!1),s(I.id)}catch(g){V("agent_recruit_failed",{template_id:"lean-canvas",error:g instanceof Error?g.message:String(g)}),console.error("Failed to create Lean Canvas agent:",g)}finally{T(!1)}},r=`Add ${d.title}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(Le,{className:"text-xl font-semibold",children:r})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:p,isRecruiting:h})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(ue,{className:"text-xl font-semibold",children:r})]})}),t.jsx(Ve,{onRecruit:p,isRecruiting:h})]})})}const Ct=`<role>
|
|
2
2
|
You are the Agent Manager. You create, configure, and maintain agents (Virtual MCPs) in this workspace.
|
|
3
3
|
</role>
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-BdzI5qgw.js","assets/ChevronDown-C3z87Bv3.js","assets/login-C4Zfdq3e.js","assets/input-DYzJ9XQo.js","assets/reset-password-t6V3OFSr.js","assets/shell-layout-BQ30KzMJ.js","assets/dialog-B68m35Ko.js","assets/X-ClCV9Dsd.js","assets/required-auth-layout-BPUQrhKu.js","assets/use-tasks-Cz3y9Qka.js","assets/use-collections-CUfCY9kw.js","assets/constants-DSi4Q8Ls.js","assets/use-organization-settings-DJG6W7_I.js","assets/use-org-sso-BDOwD-ja.js","assets/Lock01-cgwLiQmV.js","assets/onboarding-DWPZnoWO.js","assets/label-eO1MBaqu.js","assets/Users03-DxA-7JG9.js","assets/CheckCircle-AL6QamjV.js","assets/Palette-JLCl7IRa.js","assets/index-CcgMpyLh.js","assets/chat-context-OsgWNZKk.js","assets/use-virtual-mcp-Yf3Hlsyo.js","assets/use-ai-providers-4afhQE8h.js","assets/use-decopilot-events-P5nsmqcb.js","assets/create-sse-subscription-CxkOgzKf.js","assets/task-status-mT8xDIRg.js","assets/agent-icon-zBilAupC.js","assets/AlertCircle-e0Bk25xB.js","assets/Tool01-C9b4AUFd.js","assets/SearchMd-nF5GFZRa.js","assets/ArrowNarrowLeft-Vpu_QPjf.js","assets/XCircle-BJvE2wPd.js","assets/ZapSquare-BUTu5PL2.js","assets/ChevronRight-xhxG23cR.js","assets/ChevronUp-DoY1Z-Lb.js","assets/Container-Cn3sXYuI.js","assets/Star01-BeY2Ng0L.js","assets/index-RLRTQOI9.js","assets/use-mobile-TpLA3bJu.js","assets/LinkExternal01-DD77-4YD.js","assets/Sun-DiHb_uYp.js","assets/Play-DAIUDhkH.js","assets/Plus-CKKWVUUx.js","assets/Settings02-CPSLXEwZ.js","assets/Trash01-CoyWql0L.js","assets/User01-CTlp_eiF.js","assets/Zap-T4-Ky8b7.js","assets/scroll-area-DTmCA_Nn.js","assets/select-St50_NZJ.js","assets/use-copy-Bom0xOim.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-GM5qmZ0X.js","assets/integration-icon-B-89bYAr.js","assets/drawer-Dtlg5GWG.js","assets/collection-search-7HQoERMh.js","assets/tabs-Bt7PknpV.js","assets/form-Bp4g5y49.js","assets/dropdown-menu-DGLoo5dq.js","assets/toggle-group-Di3ShAJr.js","assets/select-model-D_v_U57U.js","assets/checkbox-D6JbuT--.js","assets/skeleton-C54kUHMT.js","assets/ai-providers-logos-CS4PCiqI.js","assets/card-CX10qD3B.js","assets/switch-BkONTD_h.js","assets/avatar-pskVUcgF.js","assets/alert-dialog-CuCOBQNh.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/accordion-DntQH-5m.js","assets/use-connection-BMRXzgrq.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-i6SOdcNm.js","assets/use-registry-connections-DUB-YIZm.js","assets/useInfiniteQuery-D9wKxri3.js","assets/infiniteQueryObserver-DquPoAN8.js","assets/extract-connection-data-D0LL8rbt.js","assets/constants-DDhnNFtU.js","assets/collections-BZ9KSM1a.js","assets/collection-tabs-CGegWiIq.js","assets/badge-CJ5oUUct.js","assets/textarea-BxEUvI4Y.js","assets/connection-form-helpers-CqBned5r.js","assets/use-infinite-scroll-D_5lwaLu.js","assets/command-n35vdDt2.js","assets/index-BkcXr7Re.js","assets/github-repo-picker-U-wqCDDT.js","assets/use-navigate-to-agent-FZAZYQZP.js","assets/use-mcp-tools-CYeL56pw.js","assets/use-create-virtual-mcp-iwfCwqFc.js","assets/popover-BjMbP-rE.js","assets/empty-state-0c3GVBj-.js","assets/index-BLNoCDkN.js","assets/collection-search-CrJAlbRF.js","assets/use-status-sounds-COAZTgOh.js","assets/tools-list-CYYpP7cq.js","assets/view-mode-toggle-BHwKMCFg.js","assets/user-CMTKW_Tb.js","assets/automation-list-row-dLMCo99J.js","assets/search-input-B000rFqQ.js","assets/index-DDGTF8rc.css","assets/settings-layout-BuoeX6p_.js","assets/connections-BJun06uv.js","assets/collection-display-button-CtUqwp7q.js","assets/use-delete-connection-DY_L-Wdd.js","assets/use-list-state-h5U3r6Hz.js","assets/use-view-mode-EvCkIMwX.js","assets/connection-detail-g7VBk5Ri.js","assets/index-COr82G6K.js","assets/index-C4a-NnI4.js","assets/index-Bj5OpByA.js","assets/use-members-Bdc0PU-O.js","assets/layout-BHYqEKGE.js","assets/monitoring-stats-row-eUzqPbqJ.js","assets/collection-detail-BP_lrUBM.js","assets/index-CZ7eo_cz.js","assets/monaco-editor-DdnFl3MX.js","assets/empty-state-D_P5AMA6.js","assets/index-TmZvFTN7.js","assets/table-qzyyzSVP.js","assets/general-Dqj1nDvO.js","assets/features-Cuq7a_9m.js","assets/brand-context-DrfN3Sjl.js","assets/ai-providers-CWHsA8pA.js","assets/members-C0QC-4n1.js","assets/collection-table-wrapper-B0HOBkZS.js","assets/sso-Dg6hDrWM.js","assets/profile-C1dEc6tN.js","assets/store-4mYUEJRd.js","assets/workflow-DrXxXB7y.js","assets/workflow-detail-DX-ENjhH.js","assets/org-plugin-layout-fRqJ1wx9.js","assets/plugin-layout-Bp6mgD3f.js","assets/agents-list-D3oU52M8.js","assets/automations-C7kafNdu.js","assets/dynamic-plugin-layout-okut06G4.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function j$(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const U$="modulepreload",z$=function(e){return"/"+e},W2={},Lt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=l(n.map(f=>{if(f=z$(f),f in W2)return;W2[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":U$,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var Yae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var __={exports:{}},Fu={};var Q2;function F$(){if(Q2)return Fu;Q2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Fu.Fragment=t,Fu.jsx=n,Fu.jsxs=n,Fu}var X2;function V$(){return X2||(X2=1,__.exports=F$()),__.exports}var T=V$(),y_={exports:{}},Vu={},b_={exports:{}},w_={};var J2;function B$(){return J2||(J2=1,(function(e){function t(q,W){var ee=q.length;q.push(W);e:for(;0<ee;){var ae=ee-1>>>1,Q=q[ae];if(0<i(Q,W))q[ae]=W,q[ee]=Q,ee=ae;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],ee=q.pop();if(ee!==W){q[0]=ee;e:for(var ae=0,Q=q.length,k=Q>>>1;ae<k;){var K=2*(ae+1)-1,B=q[K],D=K+1,z=q[D];if(0>i(B,ee))D<Q&&0>i(z,B)?(q[ae]=z,q[D]=ee,ae=D):(q[ae]=B,q[K]=ee,ae=K);else if(D<Q&&0>i(z,ee))q[ae]=z,q[D]=ee,ae=D;else break e}}return W}function i(q,W){var ee=q.sortIndex-W.sortIndex;return ee!==0?ee:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],m=1,p=null,g=3,v=!1,y=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,C(q),!y)if(n(d)!==null)y=!0,A||(A=!0,V());else{var W=n(f);W!==null&&re(O,W.startTime-q)}}var A=!1,M=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(M),M=-1),v=!0;var ee=g;try{t:{for(C(q),p=n(d);p!==null&&!(p.expirationTime>q&&H());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var Q=ae(p.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){p.callback=Q,C(q),W=!0;break t}p===n(d)&&r(d),C(q)}else r(d);p=n(d)}if(p!==null)W=!0;else{var k=n(f);k!==null&&re(O,k.startTime-q),W=!1}}break e}finally{p=null,g=ee,v=!1}W=void 0}}finally{W?V():A=!1}}}var V;if(typeof R=="function")V=function(){R(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=j,V=function(){Z.postMessage(null)}}else V=function(){S(j,0)};function re(q,W){M=S(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var ee=g;g=W;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return W()}finally{g=ee}},e.unstable_scheduleCallback=function(q,W,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,q={id:m++,callback:W,priorityLevel:q,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ae?(q.sortIndex=ee,t(f,q),n(d)===null&&q===n(f)&&(b?(E(M),M=-1):b=!0,re(O,ee-ae))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,V()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var ee=g;g=W;try{return q.apply(this,arguments)}finally{g=ee}}}})(w_)),w_}var eO;function q$(){return eO||(eO=1,b_.exports=B$()),b_.exports}var S_={exports:{}},rt={};var tO;function H$(){if(tO)return rt;tO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,K,B){this.props=k,this.context=K,this.refs=x,this.updater=B||y}S.prototype.isReactComponent={},S.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,K,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function R(k,K,B){this.props=k,this.context=K,this.refs=x,this.updater=B||y}var C=R.prototype=new E;C.constructor=R,b(C,S.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,K,B){var D=B.ref;return{$$typeof:e,type:k,key:K,ref:D!==void 0?D:null,props:B}}function H(k,K){return L(k.type,K,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function V(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(B){return K[B]})}var U=/\/+/g;function Z(k,K){return typeof k=="object"&&k!==null&&k.key!=null?V(""+k.key):K.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,K,B,D,z){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case m:return fe=k._init,q(fe(k._payload),K,B,D,z)}}if(fe)return z=z(k),fe=D===""?"."+Z(k,0):D,O(z)?(B="",fe!=null&&(B=fe.replace(U,"$&/")+"/"),q(z,K,B,"",function(Ue){return Ue})):z!=null&&(j(z)&&(z=H(z,B+(z.key==null||k&&k.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+fe)),K.push(z)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,K,B,X,z);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,K,B,X,z);else if(X==="object"){if(typeof k.then=="function")return q(re(k),K,B,D,z);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,K,B){if(k==null)return k;var D=[],z=0;return q(k,D,"","",function(X){return K.call(B,X,z++)}),D}function ee(k){if(k._status===-1){var K=k._result;K=K(),K.then(function(B){(k._status===0||k._status===-1)&&(k._status=1,k._result=B)},function(B){(k._status===0||k._status===-1)&&(k._status=2,k._result=B)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,K,B){W(k,function(){K.apply(this,arguments)},B)},count:function(k){var K=0;return W(k,function(){K++}),K},toArray:function(k){return W(k,function(K){return K})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return rt.Activity=p,rt.Children=Q,rt.Component=S,rt.Fragment=n,rt.Profiler=i,rt.PureComponent=R,rt.StrictMode=r,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,rt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},rt.cache=function(k){return function(){return k.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(k,K,B){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),z=k.key;if(K!=null)for(X in K.key!==void 0&&(z=""+K.key),K)!P.call(K,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&K.ref===void 0||(D[X]=K[X]);var X=arguments.length-2;if(X===1)D.children=B;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,z,D)},rt.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},rt.createElement=function(k,K,B){var D,z={},X=null;if(K!=null)for(D in K.key!==void 0&&(X=""+K.key),K)P.call(K,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(z[D]=K[D]);var fe=arguments.length-2;if(fe===1)z.children=B;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];z.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)z[D]===void 0&&(z[D]=fe[D]);return L(k,X,z)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(k){return{$$typeof:c,render:k}},rt.isValidElement=j,rt.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:ee}},rt.memo=function(k,K){return{$$typeof:f,type:k,compare:K===void 0?null:K}},rt.startTransition=function(k){var K=M.T,B={};M.T=B;try{var D=k(),z=M.S;z!==null&&z(B,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,ae)}catch(X){ae(X)}finally{K!==null&&B.types!==null&&(K.types=B.types),M.T=K}},rt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},rt.use=function(k){return M.H.use(k)},rt.useActionState=function(k,K,B){return M.H.useActionState(k,K,B)},rt.useCallback=function(k,K){return M.H.useCallback(k,K)},rt.useContext=function(k){return M.H.useContext(k)},rt.useDebugValue=function(){},rt.useDeferredValue=function(k,K){return M.H.useDeferredValue(k,K)},rt.useEffect=function(k,K){return M.H.useEffect(k,K)},rt.useEffectEvent=function(k){return M.H.useEffectEvent(k)},rt.useId=function(){return M.H.useId()},rt.useImperativeHandle=function(k,K,B){return M.H.useImperativeHandle(k,K,B)},rt.useInsertionEffect=function(k,K){return M.H.useInsertionEffect(k,K)},rt.useLayoutEffect=function(k,K){return M.H.useLayoutEffect(k,K)},rt.useMemo=function(k,K){return M.H.useMemo(k,K)},rt.useOptimistic=function(k,K){return M.H.useOptimistic(k,K)},rt.useReducer=function(k,K,B){return M.H.useReducer(k,K,B)},rt.useRef=function(k){return M.H.useRef(k)},rt.useState=function(k){return M.H.useState(k)},rt.useSyncExternalStore=function(k,K,B){return M.H.useSyncExternalStore(k,K,B)},rt.useTransition=function(){return M.H.useTransition()},rt.version="19.2.5",rt}var nO;function ca(){return nO||(nO=1,S_.exports=H$()),S_.exports}var E_={exports:{}},yr={};var rO;function G$(){if(rO)return yr;rO=1;var e=ca();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},yr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},yr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},yr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},yr.requestFormReset=function(d){r.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},yr.useFormStatus=function(){return l.H.useHostTransitionStatus()},yr.version="19.2.5",yr}var iO;function CM(){if(iO)return E_.exports;iO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),E_.exports=G$(),E_.exports}var oO;function K$(){if(oO)return Vu;oO=1;var e=q$(),t=ca(),n=CM();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,u=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(u=a.return),o=a.return;while(o)}return a.tag===3?u:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function d(o){if(s(o)!==o)throw Error(r(188))}function f(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var u=o,h=a;;){var _=u.return;if(_===null)break;var w=_.alternate;if(w===null){if(h=_.return,h!==null){u=h;continue}break}if(_.child===w.child){for(w=_.child;w;){if(w===u)return d(_),o;if(w===h)return d(_),a;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=_,h=w;else{for(var N=!1,$=_.child;$;){if($===u){N=!0,u=_,h=w;break}if($===h){N=!0,h=_,u=w;break}$=$.sibling}if(!N){for($=w.child;$;){if($===u){N=!0,u=w,h=_;break}if($===h){N=!0,h=w,u=_;break}$=$.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:a}function m(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=m(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function V(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function Z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case R:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return a=o.displayName||null,a!==null?a:Z(o.type)||"Memo";case P:a=o._payload,o=o._init;try{return Z(o(a))}catch{}}return null}var re=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],Q=-1;function k(o){return{current:o}}function K(o){0>Q||(o.current=ae[Q],ae[Q]=null,Q--)}function B(o,a){Q++,ae[Q]=o.current,o.current=a}var D=k(null),z=k(null),X=k(null),fe=k(null);function pe(o,a){switch(B(X,a),B(z,o),B(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?y2(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=y2(a),o=b2(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(D),B(D,o)}function xe(){K(D),K(z),K(X)}function Ue(o){o.memoizedState!==null&&B(fe,o);var a=D.current,u=b2(a,o.type);a!==u&&(B(z,o),B(D,u))}function Y(o){z.current===o&&(K(D),K(z)),fe.current===o&&(K(fe),$u._currentValue=ee)}var te,ve;function se(o){if(te===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",ve=-1<u.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+te+o+ve}var we=!1;function Oe(o,a){if(!o||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var he=ge}Reflect.construct(o,[],Se)}else{try{Se.call()}catch(ge){he=ge}o.call(Se.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Se=o())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),N=w[0],$=w[1];if(N&&$){var J=N.split(`
|
|
@@ -168,4 +168,4 @@ ${r}
|
|
|
168
168
|
${r}
|
|
169
169
|
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
170
170
|
|
|
171
|
-
`),document.head.appendChild(r)}}function Wse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:qM.publicConfig(),queryFn:Zse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=BM(r),[s]=Gse();i.internalUrl&&$se(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Yse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Qse=new _8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Xse(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(dH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(LD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(y8,{client:Qse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Wse,{children:T.jsx(k8,{children:T.jsx(Uee,{children:T.jsx(Zne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Jse(...e){return zP(hw(e))}const eae=v4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=Jse(eae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const OM="__mesh_chunk_reload_ts";function TM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xle extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),PD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class tae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=TM(t);if(PD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(OM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(OM,String(s)),window.location.reload())}render(){return this.state.hasError&&TM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(DD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const nae="MCP Workflows",rae="Create workflows using your MCP tools",iae=I.lazy(()=>Lt(()=>import("./plugin-header-Qlrhguve.js"),__vite__mapDeps([0,1]))),oae=I.lazy(()=>Lt(()=>import("./plugin-empty-state-CNV6Fdky.js"),[])),sae={id:nae,description:rae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(iae,{...e}),renderEmptyState:()=>T.jsx(oae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(ND,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},aae=[sae],ma=Jj({component:()=>T.jsx(tae,{children:T.jsx(Xse,{children:T.jsx(I.Suspense,{fallback:T.jsx(LD,{}),children:T.jsx(hP,{})})})})}),lae=xt({getParentRoute:()=>ma,path:"/login",component:Ut(()=>Lt(()=>import("./login-BS3FoMPH.js"),__vite__mapDeps([2,3]))),validateSearch:Zc(()=>Ee({next:F().optional(),client_id:F().optional(),redirect_uri:F().optional(),response_type:F().optional(),state:F().optional(),scope:F().optional(),code_challenge:F().optional(),code_challenge_method:F().optional()}))}),cae=xt({getParentRoute:()=>ma,path:"/reset-password",component:Ut(()=>Lt(()=>import("./reset-password-_PZQBRj3.js"),__vite__mapDeps([4,3]))),validateSearch:Zc(()=>Ee({token:F().optional(),error:F().optional()}))}),uae=xt({getParentRoute:()=>ma,path:"/auth/$pathname",component:Ut(()=>Lt(()=>import("./auth-catchall-BrZqr7p6.js"),[]))}),dae=xt({getParentRoute:()=>ma,path:"/oauth/callback",component:Ut(()=>Lt(()=>import("./oauth-callback-BVoerf7r.js"),[]))}),fae=xt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:Ut(()=>Lt(()=>import("./oauth-callback-ai-provider-CwTSAG2N.js"),[]))}),rE=xt({getParentRoute:()=>ma,id:"shell",component:Ut(()=>Lt(()=>import("./shell-layout-FgHTT5It.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),hae=xt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Xa({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Xa(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),pae=xt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Xa({to:"/"})},component:Ut(()=>Lt(()=>import("./onboarding-LSX1P2kl.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=xt({getParentRoute:()=>rE,path:"/$org",component:Ut(()=>Lt(()=>import("./org-layout-LjdMsRi5.js"),[]))}),av=xt({getParentRoute:()=>iE,id:"agent-shell",component:Ut(()=>Lt(()=>import("./index-4MgAykWa.js"),__vite__mapDeps([20,21,11,22,10,23,24,25,9,12,26,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,49,50,51,6,52,53,5,8,13,54,55,56,57,58,16,3,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103])))}),mae=Ee({virtualmcpid:F().optional(),tab:F().optional(),main:F().optional(),id:F().optional(),toolName:F().optional(),tasks:wt().optional(),mainOpen:wt().optional(),chat:wt().optional()}),xL=xt({getParentRoute:()=>av,path:"/$taskId",validateSearch:mae,component:()=>null}),gae=xt({getParentRoute:()=>av,path:"/",beforeLoad:({params:e})=>{const t=crypto.randomUUID();throw Xa({to:"/$org/$taskId",params:{org:e.org,taskId:t}})},component:()=>null}),Bn=xt({getParentRoute:()=>iE,path:"/settings",component:Ut(()=>Lt(()=>import("./settings-layout-BCmCJj0X.js"),__vite__mapDeps([104,38,39,7,31,33,17,34,14,46,47,97,73,24,25])))}),vae=xt({getParentRoute:()=>Bn,path:"/",beforeLoad:({params:e})=>{throw Xa({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),_ae=xt({getParentRoute:()=>Bn,path:"/connections",component:Ut(()=>Lt(()=>import("./connections-BInA1c12.js"),__vite__mapDeps([105,80,81,106,59,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,99,83,102,82,75,74,76,72,10,11,12,77,78,79,65,54,94,107,68,86,108,109,62,6,55,58,16,3,49,84,22,85]))),validateSearch:Zc(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),yae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug",component:Ut(()=>Lt(()=>import("./connection-detail-COc1z0eq.js"),__vite__mapDeps([110,80,81,94,85,3,43,45,111,11,91,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,44,46,47,72,10,112,113,79,76,12,49,88,93,22,92,90,98,83,53,114,67,57,54,58,16,107,68,115,116,74,56,65,59]))),validateSearch:Zc(()=>Ee({tab:F().optional()}))}),bae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug/$collectionName/$itemId",component:Ut(()=>Lt(()=>import("./collection-detail-OPcrdjzj.js"),__vite__mapDeps([117,94,10,11,58,16,3,84,115,38,39,7,118,112,81,113,22,119,48,49,1,35,71,27,28,29,30,31,32,33,17,18,34,36,37,19,40,14,41,42,43,44,45,46,47,83,99,72,91,6,59,54,95,120,25,53,111,79,80,76,12,88,93,92,90,74,98,52,21,23,24,9,5,8,13]))),validateSearch:Zc(()=>Ee({replayId:F().optional()}))}),wae=xt({getParentRoute:()=>Bn,path:"/monitor",component:Ut(()=>Lt(()=>import("./index-FOE7YpHv.js"),__vite__mapDeps([121,102,30,38,39,7,94,83,93,1,32,42,27,28,29,31,33,17,18,34,35,36,37,19,40,14,41,43,44,45,46,47,119,48,49,114,72,10,11,22,3,62,87,78,88,84,82,66,16,54,67,65,116,113,91,74,122,86,77,26,50,51,6,52,53,21,23,24,25,9,12,5,8,13]))),validateSearch:Zc(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:F().default("now-30m"),to:F().default("now"),connectionId:Ie(F()).optional().default([]),virtualMcpId:Ie(F()).optional().default([]),tool:F().default(""),status:dn(["all","success","errors"]).default("all"),search:F().default(""),page:wt().optional(),streaming:It().default(!0),propertyFilters:F().default(""),hideSystem:It().default(!1)}))}),Sae=xt({getParentRoute:()=>Bn,path:"/general",component:Ut(()=>Lt(()=>import("./general-BjGaj1GT.js"),__vite__mapDeps([123,38,39,7,65,3,16,32,70,11,66,96,30,22,10,93,63,27,28,29,31,33,17,18,1,34,35,36,37,19,40,14,41,42,43,44,45,46,47,54,12])))}),Eae=xt({getParentRoute:()=>Bn,path:"/features",component:Ut(()=>Lt(()=>import("./features-BvFC5Pr0.js"),__vite__mapDeps([124,38,39,7,12,11,66,36])))}),xae=xt({getParentRoute:()=>Bn,path:"/brand-context",component:Ut(()=>Lt(()=>import("./brand-context-CDJdQAKY.js"),__vite__mapDeps([125,11,1,34,37,40,43,45,7,47,3,84,38,39,70])))}),Rae=xt({getParentRoute:()=>Bn,path:"/ai-providers",component:Ut(()=>Lt(()=>import("./ai-providers-D9dwDsov.js"),__vite__mapDeps([126,61,62,1,3,6,7,55,39,49,35,63,29,30,44,23,11,21,22,10,24,25,9,12,64,47,28,18,45,38,65,66,60,67,46,68,69,51,70])))}),Oae=xt({getParentRoute:()=>Bn,path:"/members",component:Ut(()=>Lt(()=>import("./members-CKfYtWTZ.js"),__vite__mapDeps([127,106,59,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,99,83,102,128,122,64,54,86,62,87,78,88,11,56,114,72,10,23,67,68,6,3,66,94,58,16,49,84,65,93])))}),Tae=xt({getParentRoute:()=>Bn,path:"/sso",component:Ut(()=>Lt(()=>import("./sso-CDhG5sm9.js"),__vite__mapDeps([129,38,39,7,3,16,66,13,28,18,45])))}),Cae=xt({getParentRoute:()=>Bn,path:"/profile",component:Ut(()=>Lt(()=>import("./profile-BfMcwqnt.js"),__vite__mapDeps([130,38,39,7,67,46,65,66,49,1,35,60,3,16,41,42,73,95])))}),Aae=xt({getParentRoute:()=>Bn,path:"/store",component:Ut(()=>Lt(()=>import("./store-B5BBgWDK.js"),__vite__mapDeps([131,28,34,43,45,65,3,66,63,67,46,93,72,10,11,38,39,7,76,12])))}),Iae=xt({getParentRoute:()=>Bn,path:"/registry",component:Ut(()=>Lt(()=>import("./registry-CDKXBXcC.js"),[]))}),Mae=xt({getParentRoute:()=>Bn,path:"/store/registry",component:Ut(()=>Lt(()=>import("./store-registry-CbUNnR6f.js"),[]))}),Pae=xt({getParentRoute:()=>Bn,path:"/workflows",component:Ut(()=>Lt(()=>import("./workflow-BblBxdPP.js"),__vite__mapDeps([132,11,80,81,106,59,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,99,83,56,65,54,128,122,120,100,67,94,108,109,74,68,10,72,115])))}),Nae=xt({getParentRoute:()=>Bn,path:"/workflows/$itemId",component:Ut(()=>Lt(()=>import("./workflow-detail-CzVmb0o7.js"),__vite__mapDeps([133,118,112,11,81,113,22,10,119,48,49,39,1,35,71,27,28,29,30,31,32,33,17,18,34,36,37,19,38,7,40,14,41,42,43,44,45,46,47,83,99,115,72,91,6,59,54,95,120,25,3])))}),kae=xt({getParentRoute:()=>av,path:"/plugins/$pluginId",component:Ut(()=>Lt(()=>import("./org-plugin-layout-BjYMF2Hw.js"),__vite__mapDeps([134,135,72,10,11,44,38,39,7])))}),Dae=xt({getParentRoute:()=>Bn,path:"/agents",component:Ut(()=>Lt(()=>import("./agents-list-CJAIn9Nw.js"),__vite__mapDeps([136,59,1,34,32,17,89,11,90,22,10,6,7,30,56,55,39,54,36,27,28,29,31,33,18,35,37,19,38,40,14,41,42,43,44,45,46,47,72,91,62,79,80,81,65,69,51,94,92,68,102])))}),Lae=xt({getParentRoute:()=>Bn,path:"/automations",component:Ut(()=>Lt(()=>import("./automations-CwTGObR_.js"),__vite__mapDeps([137,43,47,102,30,38,39,7,94,101,68,59,1,34,32,27,28,29,31,33,17,18,35,36,37,19,40,14,41,42,44,45,46,22,10,11,90])))}),RL=xt({getParentRoute:()=>xL,path:"/$pluginId",component:Ut(()=>Lt(()=>import("./dynamic-plugin-layout-D5Vx8IAg.js"),__vite__mapDeps([138,135,72,10,11,44,38,39,7])))}),$ae=[],jae=[],Uae=[],OL=[];aae.forEach(e=>{if(!e.setup)return;const t={parentRoute:RL,routing:{createRoute:xt,lazyRouteComponent:Ut},registerRootSidebarItem:n=>$ae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>jae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Uae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{OL.push(...n)}};e.setup(t)});const zae=RL.addChildren(OL),Fae=Bn.addChildren([vae,_ae,yae,bae,Dae,Lae,wae,Sae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Mae,Iae,Pae,Nae]),Vae=xL.addChildren([zae]),Bae=av.addChildren([gae,Vae,kae]),qae=iE.addChildren([Bae,Fae]),Hae=rE.addChildren([hae,qae]),Gae=ma.addChildren([Hae,pae,lae,cae,uae,dae,fae]),Kae=l7({routeTree:Gae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Zae=document.getElementById("root");Y$.createRoot(Zae).render(T.jsx(I.StrictMode,{children:T.jsx(d7,{router:Kae})}));export{wle as $,Ole as A,Y1 as B,Gse as C,PS as D,Xle as E,uC as F,nY as G,ro as H,Gd as I,Ig as J,qM as K,Yw as L,Lc as M,ile as N,hP as O,aa as P,fs as Q,W1 as R,LD as S,io as T,J4 as U,BM as V,iY as W,aY as X,oY as Y,GZ as Z,dn as _,P8 as a,Ye as a$,Wle as a0,Zle as a1,Bse as a2,Rg as a3,Yr as a4,$ae as a5,jae as a6,nae as a7,ND as a8,HM as a9,Kle as aA,JH as aB,wt as aC,DD as aD,Lt as aE,kJ as aF,Uae as aG,Wae as aH,jt as aI,Xt as aJ,Ie as aK,QH as aL,Gle as aM,Hle as aN,qS as aO,vg as aP,NY as aQ,S3 as aR,W4 as aS,af as aT,ta as aU,PY as aV,ds as aW,v4 as aX,$w as aY,Wr as aZ,It as a_,tle as aa,xo as ab,XJ as ac,ht as ad,no as ae,aW as af,lW as ag,yn as ah,lt as ai,cW as aj,uW as ak,hW as al,_W as am,C3 as an,dl as ao,dW as ap,fW as aq,pW as ar,mW as as,gW as at,vW as au,yW as av,wW as aw,SW as ax,dw as ay,ele as az,Mg as b,XK as b$,EB as b0,zP as b1,hw as b2,Ek as b3,Rk as b4,KW as b5,Wn as b6,yQ as b7,c3 as b8,Y4 as b9,Sre as bA,Nre as bB,Gre as bC,Yre as bD,_re as bE,bre as bF,Ere as bG,xre as bH,kre as bI,Vre as bJ,jle as bK,aae as bL,fB as bM,ole as bN,ule as bO,pq as bP,Zc as bQ,FN as bR,qN as bS,ale as bT,Qle as bU,tG as bV,eG as bW,l4 as bX,VM as bY,T8 as bZ,hf as b_,eae as ba,la as bb,ne as bc,Yae as bd,nZ as be,Ile as bf,lP as bg,ca as bh,as as bi,Mle as bj,rn as bk,sle as bl,VN as bm,jre as bn,Ure as bo,VS as bp,sL as bq,BS as br,nv as bs,qD as bt,Jre as bu,GD as bv,Zre as bw,aie as bx,vre as by,yre as bz,Jse as c,zle as c$,eZ as c0,tZ as c1,sf as c2,b3 as c3,yY as c4,zw as c5,d3 as c6,P4 as c7,Fw as c8,Hd as c9,Xie as cA,pt as cB,Boe as cC,WW as cD,uP as cE,to as cF,xle as cG,rZ as cH,iZ as cI,oZ as cJ,JK as cK,zz as cL,BD as cM,KD as cN,WD as cO,XD as cP,JD as cQ,tL as cR,Lle as cS,$le as cT,kle as cU,Dle as cV,Qne as cW,Nle as cX,ZD as cY,QD as cZ,eL as c_,E4 as ca,Uw as cb,jw as cc,bY as cd,wY as ce,rQ as cf,iQ as cg,nQ as ch,Or as ci,rle as cj,YH as ck,KH as cl,BH as cm,e4 as cn,BB as co,ww as cp,wB as cq,lle as cr,GB as cs,Ew as ct,Sw as cu,WB as cv,cle as cw,Ble as cx,gse as cy,qle as cz,uw as d,YD as d0,Vle as d1,NS as d2,ure as d3,Ple as d4,VD as d5,Nie as d6,Fre as d7,Fle as d8,Rie as d9,Cie as da,cie as db,lie as dc,Ule as dd,dle as de,zW as df,FW as dg,qW as dh,VW as di,BW as dj,ple as dk,mle as dl,yle as dm,ble as dn,Sle as dp,_le as dq,vle as dr,gle as ds,hle as dt,fle as du,$M as dv,vO as dw,Xae as dx,Qae as dy,Ro as e,nf as f,cw as g,Tle as h,Rle as i,T as j,Cle as k,kD as l,Yle as m,M8 as n,tw as o,IM as p,Zn as q,I as r,Wne as s,Ale as t,nle as u,Ee as v,To as w,Oo as x,F as y,ET as z};
|
|
171
|
+
`),document.head.appendChild(r)}}function Wse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:qM.publicConfig(),queryFn:Zse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=BM(r),[s]=Gse();i.internalUrl&&$se(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Yse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const Qse=new _8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Xse(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(dH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(LD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(y8,{client:Qse,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Wse,{children:T.jsx(k8,{children:T.jsx(Uee,{children:T.jsx(Zne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Jse(...e){return zP(hw(e))}const eae=v4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function Y1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?$w:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=Jse(eae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const OM="__mesh_chunk_reload_ts";function TM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xle extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),PD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class tae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=TM(t);if(PD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(OM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(OM,String(s)),window.location.reload())}render(){return this.state.hasError&&TM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(DD,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(Y1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(PS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(Y1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const nae="MCP Workflows",rae="Create workflows using your MCP tools",iae=I.lazy(()=>Lt(()=>import("./plugin-header-BdzI5qgw.js"),__vite__mapDeps([0,1]))),oae=I.lazy(()=>Lt(()=>import("./plugin-empty-state-B-ux7Gia.js"),[])),sae={id:nae,description:rae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(iae,{...e}),renderEmptyState:()=>T.jsx(oae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(ND,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},aae=[sae],ma=Jj({component:()=>T.jsx(tae,{children:T.jsx(Xse,{children:T.jsx(I.Suspense,{fallback:T.jsx(LD,{}),children:T.jsx(hP,{})})})})}),lae=xt({getParentRoute:()=>ma,path:"/login",component:Ut(()=>Lt(()=>import("./login-C4Zfdq3e.js"),__vite__mapDeps([2,3]))),validateSearch:Zc(()=>Ee({next:F().optional(),client_id:F().optional(),redirect_uri:F().optional(),response_type:F().optional(),state:F().optional(),scope:F().optional(),code_challenge:F().optional(),code_challenge_method:F().optional()}))}),cae=xt({getParentRoute:()=>ma,path:"/reset-password",component:Ut(()=>Lt(()=>import("./reset-password-t6V3OFSr.js"),__vite__mapDeps([4,3]))),validateSearch:Zc(()=>Ee({token:F().optional(),error:F().optional()}))}),uae=xt({getParentRoute:()=>ma,path:"/auth/$pathname",component:Ut(()=>Lt(()=>import("./auth-catchall-Zk4cxhKw.js"),[]))}),dae=xt({getParentRoute:()=>ma,path:"/oauth/callback",component:Ut(()=>Lt(()=>import("./oauth-callback-DFuYRCL4.js"),[]))}),fae=xt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:Ut(()=>Lt(()=>import("./oauth-callback-ai-provider-arLCd3ZD.js"),[]))}),rE=xt({getParentRoute:()=>ma,id:"shell",component:Ut(()=>Lt(()=>import("./shell-layout-BQ30KzMJ.js").then(e=>e.s),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14])))}),hae=xt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Xa({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Xa(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),pae=xt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Xa({to:"/"})},component:Ut(()=>Lt(()=>import("./onboarding-DWPZnoWO.js"),__vite__mapDeps([15,8,3,16,17,18,19])))}),iE=xt({getParentRoute:()=>rE,path:"/$org",component:Ut(()=>Lt(()=>import("./org-layout-0e4Dw0lu.js"),[]))}),av=xt({getParentRoute:()=>iE,id:"agent-shell",component:Ut(()=>Lt(()=>import("./index-CcgMpyLh.js"),__vite__mapDeps([20,21,11,22,10,23,24,25,9,12,26,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,48,49,50,51,6,52,53,5,8,13,54,55,56,57,58,16,3,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103])))}),mae=Ee({virtualmcpid:F().optional(),tab:F().optional(),main:F().optional(),id:F().optional(),toolName:F().optional(),tasks:wt().optional(),mainOpen:wt().optional(),chat:wt().optional()}),xL=xt({getParentRoute:()=>av,path:"/$taskId",validateSearch:mae,component:()=>null}),gae=xt({getParentRoute:()=>av,path:"/",beforeLoad:({params:e})=>{const t=crypto.randomUUID();throw Xa({to:"/$org/$taskId",params:{org:e.org,taskId:t}})},component:()=>null}),Bn=xt({getParentRoute:()=>iE,path:"/settings",component:Ut(()=>Lt(()=>import("./settings-layout-BuoeX6p_.js"),__vite__mapDeps([104,38,39,7,31,33,17,34,14,46,47,97,73,24,25])))}),vae=xt({getParentRoute:()=>Bn,path:"/",beforeLoad:({params:e})=>{throw Xa({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),_ae=xt({getParentRoute:()=>Bn,path:"/connections",component:Ut(()=>Lt(()=>import("./connections-BJun06uv.js"),__vite__mapDeps([105,80,81,106,59,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,99,83,102,82,75,74,76,72,10,11,12,77,78,79,65,54,94,107,68,86,108,109,62,6,55,58,16,3,49,84,22,85]))),validateSearch:Zc(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),yae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug",component:Ut(()=>Lt(()=>import("./connection-detail-g7VBk5Ri.js"),__vite__mapDeps([110,80,81,94,85,3,43,45,111,11,91,27,28,29,30,31,32,33,17,18,1,34,35,36,37,19,38,39,7,40,14,41,42,44,46,47,72,10,112,113,79,76,12,49,88,93,22,92,90,98,83,53,114,67,57,54,58,16,107,68,115,116,74,56,65,59]))),validateSearch:Zc(()=>Ee({tab:F().optional()}))}),bae=xt({getParentRoute:()=>Bn,path:"/connections/$appSlug/$collectionName/$itemId",component:Ut(()=>Lt(()=>import("./collection-detail-BP_lrUBM.js"),__vite__mapDeps([117,94,10,11,58,16,3,84,115,38,39,7,118,112,81,113,22,119,48,49,1,35,71,27,28,29,30,31,32,33,17,18,34,36,37,19,40,14,41,42,43,44,45,46,47,83,99,72,91,6,59,54,95,120,25,53,111,79,80,76,12,88,93,92,90,74,98,52,21,23,24,9,5,8,13]))),validateSearch:Zc(()=>Ee({replayId:F().optional()}))}),wae=xt({getParentRoute:()=>Bn,path:"/monitor",component:Ut(()=>Lt(()=>import("./index-TmZvFTN7.js"),__vite__mapDeps([121,102,30,38,39,7,94,83,93,1,32,42,27,28,29,31,33,17,18,34,35,36,37,19,40,14,41,43,44,45,46,47,119,48,49,114,72,10,11,22,3,62,87,78,88,84,82,66,16,54,67,65,116,113,91,74,122,86,77,26,50,51,6,52,53,21,23,24,25,9,12,5,8,13]))),validateSearch:Zc(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:F().default("now-30m"),to:F().default("now"),connectionId:Ie(F()).optional().default([]),virtualMcpId:Ie(F()).optional().default([]),tool:F().default(""),status:dn(["all","success","errors"]).default("all"),search:F().default(""),page:wt().optional(),streaming:It().default(!0),propertyFilters:F().default(""),hideSystem:It().default(!1)}))}),Sae=xt({getParentRoute:()=>Bn,path:"/general",component:Ut(()=>Lt(()=>import("./general-Dqj1nDvO.js"),__vite__mapDeps([123,38,39,7,65,3,16,32,70,11,66,96,30,22,10,93,63,27,28,29,31,33,17,18,1,34,35,36,37,19,40,14,41,42,43,44,45,46,47,54,12])))}),Eae=xt({getParentRoute:()=>Bn,path:"/features",component:Ut(()=>Lt(()=>import("./features-Cuq7a_9m.js"),__vite__mapDeps([124,38,39,7,12,11,66,36])))}),xae=xt({getParentRoute:()=>Bn,path:"/brand-context",component:Ut(()=>Lt(()=>import("./brand-context-DrfN3Sjl.js"),__vite__mapDeps([125,11,1,34,37,40,43,45,7,47,3,84,38,39,70])))}),Rae=xt({getParentRoute:()=>Bn,path:"/ai-providers",component:Ut(()=>Lt(()=>import("./ai-providers-CWHsA8pA.js"),__vite__mapDeps([126,61,62,1,3,6,7,55,39,49,35,63,29,30,44,23,11,21,22,10,24,25,9,12,64,47,28,18,45,38,65,66,60,67,46,68,69,51,70])))}),Oae=xt({getParentRoute:()=>Bn,path:"/members",component:Ut(()=>Lt(()=>import("./members-C0QC-4n1.js"),__vite__mapDeps([127,106,59,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,99,83,102,128,122,64,54,86,62,87,78,88,11,56,114,72,10,23,67,68,6,3,66,94,58,16,49,84,65,93])))}),Tae=xt({getParentRoute:()=>Bn,path:"/sso",component:Ut(()=>Lt(()=>import("./sso-Dg6hDrWM.js"),__vite__mapDeps([129,38,39,7,3,16,66,13,28,18,45])))}),Cae=xt({getParentRoute:()=>Bn,path:"/profile",component:Ut(()=>Lt(()=>import("./profile-C1dEc6tN.js"),__vite__mapDeps([130,38,39,7,67,46,65,66,49,1,35,60,3,16,41,42,73,95])))}),Aae=xt({getParentRoute:()=>Bn,path:"/store",component:Ut(()=>Lt(()=>import("./store-4mYUEJRd.js"),__vite__mapDeps([131,28,34,43,45,65,3,66,63,67,46,93,72,10,11,38,39,7,76,12])))}),Iae=xt({getParentRoute:()=>Bn,path:"/registry",component:Ut(()=>Lt(()=>import("./registry-BzzKY_Fo.js"),[]))}),Mae=xt({getParentRoute:()=>Bn,path:"/store/registry",component:Ut(()=>Lt(()=>import("./store-registry-cnzZ8QNN.js"),[]))}),Pae=xt({getParentRoute:()=>Bn,path:"/workflows",component:Ut(()=>Lt(()=>import("./workflow-DrXxXB7y.js"),__vite__mapDeps([132,11,80,81,106,59,1,34,32,27,28,29,30,31,33,17,18,35,36,37,19,38,39,7,40,14,41,42,43,44,45,46,47,99,83,56,65,54,128,122,120,100,67,94,108,109,74,68,10,72,115])))}),Nae=xt({getParentRoute:()=>Bn,path:"/workflows/$itemId",component:Ut(()=>Lt(()=>import("./workflow-detail-DX-ENjhH.js"),__vite__mapDeps([133,118,112,11,81,113,22,10,119,48,49,39,1,35,71,27,28,29,30,31,32,33,17,18,34,36,37,19,38,7,40,14,41,42,43,44,45,46,47,83,99,115,72,91,6,59,54,95,120,25,3])))}),kae=xt({getParentRoute:()=>av,path:"/plugins/$pluginId",component:Ut(()=>Lt(()=>import("./org-plugin-layout-fRqJ1wx9.js"),__vite__mapDeps([134,135,72,10,11,44,38,39,7])))}),Dae=xt({getParentRoute:()=>Bn,path:"/agents",component:Ut(()=>Lt(()=>import("./agents-list-D3oU52M8.js"),__vite__mapDeps([136,59,1,34,32,17,89,11,90,22,10,6,7,30,56,55,39,54,36,27,28,29,31,33,18,35,37,19,38,40,14,41,42,43,44,45,46,47,72,91,62,79,80,81,65,69,51,94,92,68,102])))}),Lae=xt({getParentRoute:()=>Bn,path:"/automations",component:Ut(()=>Lt(()=>import("./automations-C7kafNdu.js"),__vite__mapDeps([137,43,47,102,30,38,39,7,94,101,68,59,1,34,32,27,28,29,31,33,17,18,35,36,37,19,40,14,41,42,44,45,46,22,10,11,90])))}),RL=xt({getParentRoute:()=>xL,path:"/$pluginId",component:Ut(()=>Lt(()=>import("./dynamic-plugin-layout-okut06G4.js"),__vite__mapDeps([138,135,72,10,11,44,38,39,7])))}),$ae=[],jae=[],Uae=[],OL=[];aae.forEach(e=>{if(!e.setup)return;const t={parentRoute:RL,routing:{createRoute:xt,lazyRouteComponent:Ut},registerRootSidebarItem:n=>$ae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>jae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Uae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{OL.push(...n)}};e.setup(t)});const zae=RL.addChildren(OL),Fae=Bn.addChildren([vae,_ae,yae,bae,Dae,Lae,wae,Sae,Eae,xae,Rae,Oae,Tae,Cae,Aae,Mae,Iae,Pae,Nae]),Vae=xL.addChildren([zae]),Bae=av.addChildren([gae,Vae,kae]),qae=iE.addChildren([Bae,Fae]),Hae=rE.addChildren([hae,qae]),Gae=ma.addChildren([Hae,pae,lae,cae,uae,dae,fae]),Kae=l7({routeTree:Gae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Zae=document.getElementById("root");Y$.createRoot(Zae).render(T.jsx(I.StrictMode,{children:T.jsx(d7,{router:Kae})}));export{wle as $,Ole as A,Y1 as B,Gse as C,PS as D,Xle as E,uC as F,nY as G,ro as H,Gd as I,Ig as J,qM as K,Yw as L,Lc as M,ile as N,hP as O,aa as P,fs as Q,W1 as R,LD as S,io as T,J4 as U,BM as V,iY as W,aY as X,oY as Y,GZ as Z,dn as _,P8 as a,Ye as a$,Wle as a0,Zle as a1,Bse as a2,Rg as a3,Yr as a4,$ae as a5,jae as a6,nae as a7,ND as a8,HM as a9,Kle as aA,JH as aB,wt as aC,DD as aD,Lt as aE,kJ as aF,Uae as aG,Wae as aH,jt as aI,Xt as aJ,Ie as aK,QH as aL,Gle as aM,Hle as aN,qS as aO,vg as aP,NY as aQ,S3 as aR,W4 as aS,af as aT,ta as aU,PY as aV,ds as aW,v4 as aX,$w as aY,Wr as aZ,It as a_,tle as aa,xo as ab,XJ as ac,ht as ad,no as ae,aW as af,lW as ag,yn as ah,lt as ai,cW as aj,uW as ak,hW as al,_W as am,C3 as an,dl as ao,dW as ap,fW as aq,pW as ar,mW as as,gW as at,vW as au,yW as av,wW as aw,SW as ax,dw as ay,ele as az,Mg as b,XK as b$,EB as b0,zP as b1,hw as b2,Ek as b3,Rk as b4,KW as b5,Wn as b6,yQ as b7,c3 as b8,Y4 as b9,Sre as bA,Nre as bB,Gre as bC,Yre as bD,_re as bE,bre as bF,Ere as bG,xre as bH,kre as bI,Vre as bJ,jle as bK,aae as bL,fB as bM,ole as bN,ule as bO,pq as bP,Zc as bQ,FN as bR,qN as bS,ale as bT,Qle as bU,tG as bV,eG as bW,l4 as bX,VM as bY,T8 as bZ,hf as b_,eae as ba,la as bb,ne as bc,Yae as bd,nZ as be,Ile as bf,lP as bg,ca as bh,as as bi,Mle as bj,rn as bk,sle as bl,VN as bm,jre as bn,Ure as bo,VS as bp,sL as bq,BS as br,nv as bs,qD as bt,Jre as bu,GD as bv,Zre as bw,aie as bx,vre as by,yre as bz,Jse as c,zle as c$,eZ as c0,tZ as c1,sf as c2,b3 as c3,yY as c4,zw as c5,d3 as c6,P4 as c7,Fw as c8,Hd as c9,Xie as cA,pt as cB,Boe as cC,WW as cD,uP as cE,to as cF,xle as cG,rZ as cH,iZ as cI,oZ as cJ,JK as cK,zz as cL,BD as cM,KD as cN,WD as cO,XD as cP,JD as cQ,tL as cR,Lle as cS,$le as cT,kle as cU,Dle as cV,Qne as cW,Nle as cX,ZD as cY,QD as cZ,eL as c_,E4 as ca,Uw as cb,jw as cc,bY as cd,wY as ce,rQ as cf,iQ as cg,nQ as ch,Or as ci,rle as cj,YH as ck,KH as cl,BH as cm,e4 as cn,BB as co,ww as cp,wB as cq,lle as cr,GB as cs,Ew as ct,Sw as cu,WB as cv,cle as cw,Ble as cx,gse as cy,qle as cz,uw as d,YD as d0,Vle as d1,NS as d2,ure as d3,Ple as d4,VD as d5,Nie as d6,Fre as d7,Fle as d8,Rie as d9,Cie as da,cie as db,lie as dc,Ule as dd,dle as de,zW as df,FW as dg,qW as dh,VW as di,BW as dj,ple as dk,mle as dl,yle as dm,ble as dn,Sle as dp,_le as dq,vle as dr,gle as ds,hle as dt,fle as du,$M as dv,vO as dw,Xae as dx,Qae as dy,Ro as e,nf as f,cw as g,Tle as h,Rle as i,T as j,Cle as k,kD as l,Yle as m,M8 as n,tw as o,IM as p,Zn as q,I as r,Wne as s,Ale as t,nle as u,Ee as v,To as w,Oo as x,F as y,ET as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-3eJ_fByu.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bb as _}from"./index-
|
|
1
|
+
import{bb as _}from"./index-3eJ_fByu.js";var b={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===S||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,b.exports=I()),b.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,aU as q,b_ as R,b$ as Ee,c0 as ke,c1 as Se,be as xe,c2 as j}from"./index-D_cV0HX5.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|
|
1
|
+
import{r as n,aU as q,b_ as R,b$ as Ee,c0 as ke,c1 as Se,be as xe,c2 as j}from"./index-3eJ_fByu.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Be,Item:Ve,Input:Oe,Group:je,Separator:Le,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|