limixbot 0.2.13 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActivityPanel-Crvi6UFN.js → ActivityPanel-O6Su2c-u.js} +1 -1
- package/dist/assets/{App-DBQxC6tF.js → App-Bcey1qup.js} +108 -108
- package/dist/assets/{AppEventEditor-BKkrL3lm.js → AppEventEditor-BlJGPJ3Z.js} +1 -1
- package/dist/assets/{BotSettingsDialog-BVTAiGvS.js → BotSettingsDialog-PiCk9us7.js} +4 -4
- package/dist/assets/{BrowserPanel-CXiPysF8.js → BrowserPanel-BWcb5CXi.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-B5ZQeFJ9.js → BrowserProfilesManager-dKHyQotG.js} +1 -1
- package/dist/assets/{CloudAddDialog-CjSOW3Ui.js → CloudAddDialog-D1ZSbkxV.js} +1 -1
- package/dist/assets/{ComputerFilesPane-VwEQWopG.js → ComputerFilesPane-wgtikCgi.js} +1 -1
- package/dist/assets/{ComputerPanel-C4y6Mvwd.js → ComputerPanel-Cyj53a7W.js} +2 -2
- package/dist/assets/{DataPanel-CeaLVEeb.js → DataPanel-BlBidswi.js} +1 -1
- package/dist/assets/{DesktopViewer-CfxFVwdn.js → DesktopViewer-D7JeLJbi.js} +1 -1
- package/dist/assets/{FilesView-B9X_qlkn.js → FilesView-CNkEKeZB.js} +1 -1
- package/dist/assets/{GrokMoveDialog-CuC9v4Fd.js → GrokMoveDialog-fyBulzXL.js} +2 -2
- package/dist/assets/{InspectorPanel-B6ZAVTyD.js → InspectorPanel-Cut2OqiB.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-DkoOxF2t.js → KeyboardShortcutsModal-DnxUB4cd.js} +1 -1
- package/dist/assets/{LiveDesktop-BsPQ6sGB.js → LiveDesktop-CnbyXW61.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-U6rVY7_g.js → LocalVmWorkspace-D9xFPGF0.js} +1 -1
- package/dist/assets/{MacLocalControl-CC-lKazM.js → MacLocalControl-CpswtfCI.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-D0maDIQ1.js → MarkdownFilePreview-V-y-0ksi.js} +1 -1
- package/dist/assets/{MenuMotion-CLF0GByT.js → MenuMotion-VeZ_fZ8M.js} +1 -1
- package/dist/assets/NewBotDialog-rBjsSV0e.js +1 -0
- package/dist/assets/{PhoneAppDialog-CTPZwJnL.js → PhoneAppDialog-DAW1N-hM.js} +1 -1
- package/dist/assets/{PlacesRail-D510vk5R.js → PlacesRail-C_3Mh4C8.js} +1 -1
- package/dist/assets/{PluginsPanel-BC0YDZ8h.js → PluginsPanel-CMsgWSNg.js} +1 -1
- package/dist/assets/{ProIntroduction-BIiaveWm.js → ProIntroduction-6ByF2_US.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-OVWheJHu.js → RemoteAgentSettingsPanel-D4X4rHMQ.js} +1 -1
- package/dist/assets/{RoomPanel-mDRTZ2vs.js → RoomPanel-mg6M04wy.js} +1 -1
- package/dist/assets/{RoutinesPage-9VDuovqw.js → RoutinesPage-DomuZMUT.js} +2 -2
- package/dist/assets/{SettingsModal-BHJvNrwz.js → SettingsModal-Dd9l0b2C.js} +1 -1
- package/dist/assets/{ShareTeamDialog-C4go2USY.js → ShareTeamDialog-B_0Gr8Mq.js} +1 -1
- package/dist/assets/{SignedInSites-Cm_X_p_X.js → SignedInSites-C-eqeBxT.js} +1 -1
- package/dist/assets/TeamLibraryPanel-DpXOFOQr.js +1 -0
- package/dist/assets/{TeamMapPage-CkYOrZ7X.js → TeamMapPage-CIQPYaxL.js} +1 -1
- package/dist/assets/{TriggersPage-_qYPJ97Z.js → TriggersPage-D7RDjrjV.js} +1 -1
- package/dist/assets/{VisibilitySection-CpwyInUL.js → VisibilitySection-Bimhk6c5.js} +1 -1
- package/dist/assets/{WebhookTrigger-CfspvK5m.js → WebhookTrigger-D5c2bPJu.js} +1 -1
- package/dist/assets/{WorksOnGrid-BtfeNPO2.js → WorksOnGrid-PZ-caKHg.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-qTIn3JJ1.js → abnfDiagram-YUKMZFIV-D7az-C1J.js} +1 -1
- package/dist/assets/{activity-CEhxqMcq.js → activity-W_ia4q-Y.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-BQls0L4i.js → architectureDiagram-47P4ROYG-B2IC9169.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-DMD6noIL.js → blockDiagram-E7TT5TSB-FnweBzU4.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-CIp2zuwT.js → c4Diagram-CRA5TL53-rxgwSaAP.js} +1 -1
- package/dist/assets/{calendar-days-Di_J-dvc.js → calendar-days-wM1DS-Cu.js} +1 -1
- package/dist/assets/channel-BQyC_QMX.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-BBkqbpZ4.js → chunk-2Q5K7J3B-B7yhqEe8.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-JdwNE0CO.js → chunk-5VM5RSS4-Sw6phnaf.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-D_Zh7_1M.js → chunk-7TKQ45FW-CheglUSd.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-BvSbOQeA.js → chunk-AW2ZBBNX-CswkqPkf.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-CXYsdaIb.js → chunk-FVRAUYC3-DeN53o4S.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-CO93FKYG.js → chunk-HTAEGDNF-CCZ_Udf0.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-Ko0D98Sv.js → chunk-JWPE2WC7-nG1rfC9P.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-DBGMbUnJ.js → chunk-KQW6MTUR-Bh_TxL0e.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-PVMPph1f.js → chunk-XXDRQBXY-CLIJBS-V.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-Z-SRrzrQ.js → classDiagram-v2-K4WV4PDN-B04FntQx.js} +1 -1
- package/dist/assets/{coins-QIRjm19F.js → coins-81htcDNx.js} +1 -1
- package/dist/assets/{core-Cb-3LQeb.js → core-BLAzrox0.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-DcOhjasx.js → cose-bilkent-JH36ORCC-D9PAieWF.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-D9Pv76Si.js → cynefin-EF2NZ3EQ-BAC2DRg5.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-1Nlm6fT4.js → cynefinDiagram-3GCD6N5R-Cc3k_C-5.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-CW-TdWBz.js → dagre-W4DXFKR2-CpbzxBGo.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-DJYwBSWN.js → diagram-2UJZ2QOL-d22NGVzG.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-ZajDgMU2.js → diagram-OVF4WLC6-BFTJTNpN.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-D03UoQDq.js → diagram-PFPMY2P6-CA_YgAo3.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-B9gI6La0.js → diagram-UMYRVEAY-CCsuWndY.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-Dxzg_fDQ.js → diagram-YEKJPTXX-Bcwhmpgl.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-Cv6eTFZE.js → diagram-ZIFT7M5P-Bs1iIjhq.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-BCUklW6x.js → ebnfDiagram-VR2GEFS7-CFr96fLM.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-VcZs96wT.js → elk-IJKZMXRS-DSdTG_hW.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-CJ61fO-Z.js → erDiagram-O2IAPWRE-BGdMdwi1.js} +1 -1
- package/dist/assets/{file-up-BObBqrEg.js → file-up-DvGMRF5I.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-CQMoLXxB.js → flowDiagram-OXPTDLAJ-DL25A20O.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-ev5i74AH.js → ganttDiagram-R7TSEDQI-DQaNIRGv.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-B8MGdCiz.js → gitGraphDiagram-XJZIOB7I-B6ypA1ZF.js} +1 -1
- package/dist/assets/{import-name-6aD0J6QH.js → import-name-Cdh9ZlkK.js} +1 -1
- package/dist/assets/{index-Dpov1WyC.js → index-BaW02tJl.js} +1 -1
- package/dist/assets/{index-CRF26t5P.js → index-CxcnLo81.js} +1 -1
- package/dist/assets/{index-DgGTgaCO.js → index-oVds-_Vz.js} +2 -2
- package/dist/assets/{infoDiagram-5W2HQ5XZ-CoqaIohe.js → infoDiagram-5W2HQ5XZ-8YbtI4S4.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-BMzA3Pkb.js → ishikawaDiagram-K3B6WC7H-DYpDWk2K.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-DLNIN037.js → journeyDiagram-COXZFDF6-BUd8Vnbq.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-savLUzO8.js → kanban-definition-P3RFRI5V-AywqsEBB.js} +1 -1
- package/dist/assets/{mcp-servers-D2hHUxUp.js → mcp-servers-Bu5RuYBT.js} +1 -1
- package/dist/assets/{mermaid.core-1h5EGl1v.js → mermaid.core-B5yiNmEY.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-hMbAYcVv.js → mindmap-definition-LZFPQGKD-DRALSCg6.js} +1 -1
- package/dist/assets/{minimize-63hYzV5y.js → minimize-CWsi9mRL.js} +1 -1
- package/dist/assets/{monitor-DOeLdhQc.js → monitor-c1mf38zt.js} +1 -1
- package/dist/assets/{new-bot-DkcWCdL_.js → new-bot-mp2gi3ed.js} +1 -1
- package/dist/assets/{org-library-C-rnQ1YG.js → org-library-Bi3EieNo.js} +1 -1
- package/dist/assets/{package-format-CMpBgycc.js → package-format-CaPiTXn3.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-BIY55aib.js → pegDiagram-BGZESJAR-Drj_UJz5.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-DR8o8piD.js → pieDiagram-CAPJLFHJ-CL7MryRt.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-Dqb1703W.js → quadrantDiagram-GDMTTRAM-BvWxqPJn.js} +1 -1
- package/dist/assets/{rail-Ok1gt1lN.js → rail-DApFzTxo.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-ZWJ9xWQY.js → railroadDiagram-SM67HX2B-CGfR0UsO.js} +1 -1
- package/dist/assets/{remote-desktop-panel-ganxVzJo.js → remote-desktop-panel-B4uIIoh3.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-Cjv_VLZj.js → requirementDiagram-X7JNWC4A-CJq96anP.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-ChHoiXzB.js → sankeyDiagram-UM26HJRW-BdZSA65i.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-B67gwOH0.js → sequenceDiagram-ZO4K6R2Y-B5W6udgn.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-DOr4ZALb.js → sizeCapture-INFHLROL-CuKCNVLn.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-DnoBtm-E.js → stateDiagram-v2-TBUQTH76-C7mAgpvB.js} +1 -1
- package/dist/assets/{styles-BcVNrxGE.js → styles-C_rlkDrt.js} +2 -2
- package/dist/assets/styles-bUbK33f1.css +1 -0
- package/dist/assets/{swimlanes-N4OXWK64-2TFXb7MH.js → swimlanes-N4OXWK64-D-mimAU7.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Dn31PG7h.js +8 -0
- package/dist/assets/{team-share-C9qIusMs.js → team-share-wuAG66b7.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-4zjxAMyG.js → timeline-definition-YOQAKGHF-C5prnOXi.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-CCfZ1eoO.js → usecaseDiagram-VIAY4XPW-BC-9KKSF.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-h7rTFRTN.js → vennDiagram-BLWOH2XV-LCNTQN9e.js} +1 -1
- package/dist/assets/{vi-KgT8L8Qj.js → vi-NX09tr5q.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-CXwA22zv.js → wardleyDiagram-YMQ3BMBF-CtWGEzVU.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-d4qol5BJ.js → xychartDiagram-TAQBALBS-DadPRdBp.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/rail.html +5 -5
- package/dist-server/container-mcp.js +22 -21
- package/dist-server/index.js +106 -105
- package/dist-server/openmausbot.js +24 -24
- package/dist-server/package.json +1 -1
- package/dist-server/pair-cli.js +24 -24
- package/dist-server/server/config.js +6 -1
- package/dist-server/server/container-computer.js +4 -4
- package/dist-server/server/host/team-connections-host.js +2 -2
- package/dist-server/server/index.js +20 -3
- package/dist-server/server/mcp-registry.js +2 -2
- package/dist-server/server/service-unit.js +1 -1
- package/dist-server/server/skill-library.js +1 -1
- package/dist-server/server/team-library.js +2 -2
- package/dist-server/shared/grok-import.js +1 -1
- package/dist-server/shared/package-format.js +3 -3
- package/dist-server/vps-container-mcp.js +22 -21
- package/dist-server/workspace-backup.worker.js +20 -20
- package/package.json +1 -1
- package/dist/assets/NewBotDialog-D9e-ED-j.js +0 -1
- package/dist/assets/TeamLibraryPanel-B-R6YFK-.js +0 -1
- package/dist/assets/channel-DRGNbeY-.js +0 -1
- package/dist/assets/styles-D-yh7Z23.css +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-C_836Lnu.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as t,t as n,I as c,A as x,o as p}from"./styles-
|
|
1
|
+
import{r as d,j as t,t as n,I as c,A as x,o as p}from"./styles-C_rlkDrt.js";import{r as m}from"./PlacesRail-C_3Mh4C8.js";import{Q as u}from"./index-BaW02tJl.js";import"./monitor-c1mf38zt.js";const f=[{id:"ios",nameKey:"phoneApp.ios",actionKey:"phoneApp.iosAction",url:c},{id:"android",nameKey:"phoneApp.android",actionKey:"phoneApp.androidAction",url:x}];function j({open:r,onClose:l,connect:i=[]}){const a=d.useRef(null);if(d.useEffect(()=>{if(!r)return;a.current?.focus();const e=o=>{o.key==="Escape"&&(o.preventDefault(),l())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r,l]),!r)return null;const s=t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6",onMouseDown:e=>e.target===e.currentTarget&&l(),children:t.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"phone-app-dialog-title",className:"max-h-full w-full max-w-[460px] overflow-y-auto rounded-2xl border border-hairline/50 bg-panel p-6 shadow-2xl",children:[t.jsx("h2",{id:"phone-app-dialog-title",className:"text-[17px] font-semibold text-ink",children:n("phoneApp.title")}),t.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-ink-secondary",children:n("phoneApp.subtitle")}),t.jsx("ul",{className:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-2",children:f.map(e=>t.jsxs("li",{"data-phone-app":e.id,className:"flex flex-col items-center gap-3 rounded-xl bg-card p-4 text-center",children:[t.jsx("div",{className:"text-[14px] font-medium text-ink",children:n(e.nameKey)}),t.jsx("div",{className:"rounded-md bg-white p-2",children:t.jsx(u,{value:e.url,size:132,level:"M",bgColor:"#ffffff",fgColor:"#111111",title:n(e.actionKey)})}),t.jsx("button",{type:"button",onClick:()=>{p(e.url)},className:"text-[13px] text-accent hover:underline",children:n(e.actionKey)})]},e.id))}),i.length?t.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[t.jsx("p",{className:"text-[13px] leading-relaxed text-ink-secondary",children:n("phoneApp.next")}),i.map((e,o)=>t.jsxs("button",{type:"button","data-phone-app-connect":e.key,onClick:()=>{l(),e.onSelect()},className:o===0?"flex w-full flex-col items-center rounded-xl bg-accent px-4 py-2 text-[13px] font-medium text-accent-ink hover:opacity-90":"flex w-full flex-col items-center rounded-xl border border-hairline/50 px-4 py-2 text-[13px] font-medium text-ink hover:bg-raised",children:[t.jsx("span",{children:n("sidebar.menu.connectPhone")}),t.jsx("span",{className:"text-[12px] font-normal opacity-80",children:e.subtitle})]},e.key))]}):null,t.jsx("button",{ref:a,type:"button",onClick:l,className:"mt-3 w-full rounded-xl bg-raised px-4 py-2 text-[13px] font-medium text-ink hover:brightness-110",children:n("common.close")})]})});return typeof document>"u"?s:m.createPortal(s,document.body)}export{f as PHONE_APPS,j as PhoneAppDialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r1,t as f,j as a,E as Ne,aB as se,H as s1,Y as ke,aC as ae,U as Ke,a as L,f as F2,J as qt,Q as Yt,G as Ko,aD as Ho,ag as Vo,r as m,X as B2,a7 as Go,a9 as Jo,ar as U2,a0 as W2,aE as qo,e as Yo,R as $n,aF as Xo,aG as Qo,aH as e5,aI as t5,aJ as n5,ae as r5,aK as o5,aL as i5,D as I1,V as s5,T as a5,aM as ot,O as An,K as c5,aN as l5,L as it,g as K2,aO as u5,aP as wt,aQ as H2,aR as h1,aS as d5,ah as f5,S as p5,a5 as h5,aT as V2,aU as C5,b as m5,aV as g5,aW as b5,aX as y5}from"./styles-BcVNrxGE.js";import{M as x5}from"./monitor-DOeLdhQc.js";const v5=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],k5=r1("audio-lines",v5);const w5=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],_5=r1("building-2",w5);const S5=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],j5=r1("cloud-upload",S5);const M5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],N5=r1("copy",M5);const E5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],$5=r1("ellipsis",E5);const A5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Xt=r1("external-link",A5);const Z5=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],O5=r1("hard-drive",Z5);const z5=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],I5=r1("house",z5);const T5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],x1=r1("loader-circle",T5);const P5=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],G2=r1("lock",P5);const R5=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],L5=r1("log-out",R5);const D5=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],F5=r1("moon",D5);const B5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],J2=r1("plus",B5);const U5=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],W5=r1("power",U5);const K5=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],q2=r1("server",K5);const H5=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],V5=r1("smartphone",H5);const G5=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],J5=r1("timer",G5);const q5=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Qt=r1("user-round",q5),A1=8,Y5=new Set(["sso","two-factor","browser"]);function X5(e,t){switch(e){case"invalid-email":return f("cloudBuy.signIn.invalidEmail");case"rate-limited":return f("cloudBuy.signIn.rateLimited");case"wrong-code":return t===1?f("cloudBuy.signIn.wrongCodeOne"):f("cloudBuy.signIn.wrongCode",{count:t??0});case"expired":return f("cloudBuy.signIn.expired");case"signup-closed":return f("cloudBuy.signIn.signupClosed");case"device-limit":return f("cloudBuy.signIn.deviceLimit");case"sso":return f("cloudBuy.signIn.sso");case"two-factor":return f("cloudBuy.signIn.twoFactor");case"browser":return f("cloudBuy.signIn.browser");case"failed":return f("cloudBuy.signIn.failed")}}function fe(e){return e.replace(/\D/g,"").slice(0,A1)}const Q5=e=>{const t=Math.max(0,Math.ceil(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function ei({phase:e,email:t,code:n,profileEmail:r,busy:o,now:i,onBack:s,onEmail:c,onSend:l,onChangeEmail:u,onCode:d,onResend:p,onBrowser:h}){const C=e.step==="done"?null:e.problem,g=C!==null&&Y5.has(C),y=e.intent?f("cloudBuy.signIn.title"):f("cloudBuy.signIn.titlePlain"),x=(w,v)=>w.parentElement?.querySelectorAll("input")[v]?.focus(),k=(w,v,A)=>{const O=fe(v);if(O.length>1){d(fe(n.slice(0,w)+O)),x(A,Math.min(A1-1,w+O.length));return}const Z=(n.slice(0,w)+O+n.slice(w+1)).slice(0,A1);d(fe(Z)),O&&w<A1-1&&x(A,w+1)},_=w=>v=>{v.key==="Backspace"&&!n[w]&&w>0?(v.preventDefault(),d(n.slice(0,w-1)),x(v.currentTarget,w-1)):v.key==="ArrowLeft"&&w>0?(v.preventDefault(),x(v.currentTarget,w-1)):v.key==="ArrowRight"&&w<A1-1&&(v.preventDefault(),x(v.currentTarget,w+1))},M=w=>{const v=fe(w.clipboardData.getData("text"));v&&(w.preventDefault(),d(v),x(w.currentTarget,Math.min(A1-1,v.length)))},N=w=>{w.preventDefault(),o||l()};return a.jsxs("div",{"data-cloud-add":`sign-in-${e.step}`,className:Ne,children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(se,{label:f("cloudBuy.back"),onClick:s}),a.jsx(s1,{title:y,sub:f("cloudBuy.signIn.sub")})]}),e.step==="email"&&a.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:N,noValidate:!0,children:[a.jsx("label",{htmlFor:"cloud-add-email",className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.email")}),a.jsx("input",{id:"cloud-add-email","data-autofocus":!0,type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:t,disabled:o,"aria-invalid":C==="invalid-email"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:w=>c(w.target.value),className:ke}),a.jsxs("button",{type:"submit",className:`${ae} mt-2`,disabled:o||!t.trim(),children:[o&&a.jsx(x1,{size:16,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.send")]}),r&&t.trim().toLowerCase()===r.trim().toLowerCase()&&a.jsx("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:f("cloudBuy.signIn.fromProfile")})]}),e.step==="code"&&a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsxs("p",{id:"cloud-add-code-label",className:"text-[13px] leading-[18px] text-ink-secondary",children:[f("cloudBuy.signIn.codeLabel",{email:e.email})," · ",a.jsx("button",{type:"button",className:Ke,disabled:o,onClick:u,children:f("cloudBuy.signIn.change")})]}),a.jsx("div",{role:"group","aria-labelledby":"cloud-add-code-label",className:"grid grid-cols-8 gap-1.5",dir:"ltr",children:Array.from({length:A1},(w,v)=>a.jsx("input",{"data-autofocus":v===Math.min(n.length,A1-1)||void 0,value:n[v]??"",inputMode:"numeric",pattern:"[0-9]*",maxLength:A1,autoComplete:v===0?"one-time-code":"off","aria-label":f("cloudBuy.signIn.digit",{n:v+1}),disabled:o,"aria-invalid":C==="wrong-code"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:A=>k(v,A.target.value,A.currentTarget),onKeyDown:_(v),onPaste:M,onFocus:A=>A.currentTarget.select(),className:L(ke,"h-11 min-w-0 px-0 text-center text-[20px] font-medium tabular-nums")},v))}),e.signupOpen===!1&&a.jsx("p",{"data-cloud-signup-closed":!0,className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.signupClosedNote")}),a.jsx("div",{className:"flex min-h-6 items-center justify-between gap-3 text-[13px] text-ink-tertiary",children:o?a.jsxs("span",{role:"status",className:"inline-flex items-center gap-1.5",children:[a.jsx(x1,{size:13,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.checking")]}):e.resendAt>i?a.jsx("span",{children:f("cloudBuy.signIn.resendIn",{time:Q5(e.resendAt-i)})}):a.jsx("button",{type:"button",className:Ke,onClick:p,children:f("cloudBuy.signIn.resend")})})]}),e.step==="done"&&a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[14px] leading-5 text-ink",children:[a.jsx("span",{"aria-hidden":"true",className:"grid size-5 shrink-0 place-items-center rounded-full bg-ink text-app",children:a.jsx(F2,{size:12,strokeWidth:2.4})}),e.intent?f("cloudBuy.signIn.done"):f("cloudBuy.signIn.donePlain")]}),C&&a.jsxs("div",{id:"cloud-add-problem",role:"alert",className:"flex flex-col items-start gap-3 rounded-[12px] bg-ink/[0.04] px-4 py-3 text-[13px] leading-[18px] text-ink",children:[a.jsx("p",{children:X5(C,e.step==="code"?e.triesLeft:null)}),g&&a.jsxs("button",{type:"button",className:qt,onClick:h,children:[f("cloudBuy.signIn.continueBrowser"),a.jsx(Xt,{size:14,"aria-hidden":"true"})]}),C==="expired"&&e.step==="code"&&a.jsx("button",{type:"button",className:Yt,disabled:o,onClick:p,children:f("cloudBuy.signIn.newCode")})]}),e.step!=="done"&&!g&&a.jsxs("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:[f("cloudBuy.signIn.ssoHint")," ",a.jsx("button",{type:"button",className:Ke,onClick:h,children:f("cloudBuy.signIn.continueBrowser")})]})]})}function Xc({code:e,checkout:t,trial:n,busy:r,onReopen:o,onCancel:i}){return a.jsxs("div",{"data-cloud-add":"signing-in",className:Ne,children:[a.jsx(s1,{title:f("cloudAdd.browserTitle")}),e?a.jsxs("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-[14px] leading-5 text-ink marker:text-ink-tertiary",children:[a.jsx("li",{children:f("cloudAdd.signInStep1")}),a.jsxs("li",{children:[f("cloudAccount.codeCheck"),a.jsx("code",{dir:"ltr",className:"mt-1.5 block w-fit select-all rounded-[8px] bg-ink/[0.05] px-3 py-1.5 font-mono text-[17px] font-medium tracking-[0.12em]",children:e})]}),a.jsx("li",{children:f(t?n?"cloudAdd.signInStep3Trial":"cloudAdd.signInStep3":"cloudAdd.signInStep3Connect")})]}):a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[13px] text-ink-secondary",children:[a.jsx(x1,{size:14,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudAdd.opening")]}),a.jsxs("div",{className:Ko,children:[a.jsx("button",{type:"button",className:Yt,disabled:r,onClick:i,children:f("cloudAdd.cancel")}),a.jsxs("button",{type:"button",className:qt,disabled:r||!e,onClick:o,children:[f("cloudAdd.reopenBrowser"),a.jsx(Xt,{size:14,"aria-hidden":"true"})]})]})]})}var Y2=Ho();const Qc=Vo(Y2);let ti=0;const pe=[],_t=m.createContext(null),ni=()=>()=>{};function X2({modal:e=!1,children:t}){const[n]=m.useState(()=>++ti);m.useLayoutEffect(()=>{if(e)return pe.push(n),pe.sort((s,c)=>s-c),()=>{pe.splice(pe.indexOf(n),1)}},[e,n]);const r=m.useContext(_t),o=m.useSyncExternalStore(ni,()=>!1,()=>!0),i=a.jsx(_t.Provider,{value:e?n:r,children:t});return o?i:Y2.createPortal(i,document.body)}function ri(){const e=m.useContext(_t);return m.useCallback(()=>e===null||pe.at(-1)===e,[e])}const oi="a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]";function ii(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{const r=e.current;if(!r)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null;r.contains(document.activeElement)||r.focus();const i=()=>Array.from(r.querySelectorAll(oi)).filter(c=>c.getAttribute("tabindex")!=="-1"&&!c.closest("[hidden], [inert]")),s=c=>{if(c.defaultPrevented)return;if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const l=i();if(!l.length)return c.preventDefault();const u=l[0],d=l[l.length-1];c.shiftKey&&(document.activeElement===u||!r.contains(document.activeElement)||document.activeElement===r)?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())};return r.addEventListener("keydown",s),()=>{r.removeEventListener("keydown",s),o?.focus()}},[e])}function en(e){switch(e.outcome){case"moving":return f("accounts.moving");case"gone":return f("accounts.gone");case"failed":return f("accounts.failed");default:return null}}function e6(){const e=window.ogb?.remoteClient?.active?void 0:window.ogb?.accounts,t=window.ogb?.accountSheet,n=window.ogb?.app?.ownPage===!0&&!!e,r=U2(),[o,i]=m.useState(null),[s,c]=m.useState(!1),[l,u]=m.useState(null);return m.useEffect(()=>{if(!n)return;const d=()=>{e.list().then(i).catch(()=>{})};return d(),e.onChanged(d)},[n,e]),m.useEffect(()=>{if(n||!t)return;let d=!0;return t.offered().then(p=>{d&&c(p===!0)}).catch(()=>{}),()=>{d=!1}},[n,t]),{view:n?o:null,openSheet:!n&&s&&t?()=>{t.open().catch(()=>{})}:null,noRail:!r.beside&&!r.places.length,signOut:d=>{e?.signOut(d).then(p=>{i(p.view);const h=en(p);h&&u({email:null,note:h})}).catch(()=>u({email:null,note:f("accounts.failed")}))},add:d=>u({email:d??"",note:null}),sheet:l,closeSheet:()=>u(null)}}function t6(e){return f(e&&!e.active?"accounts.signIn":"settings.section.cloudAccount")}function n6({view:e,openSheet:t,noRail:n,signOut:r,add:o}){if(t)return[{key:"accounts-sheet",label:f("accounts.manage"),icon:a.jsx(Qt,{size:18}),onSelect:t}];const i=e?.active;return i?[{key:"accounts-active",heading:f("accounts.heading"),label:i.email,title:i.email,checked:!0,icon:a.jsx(F2,{size:18}),disabled:!i.signIn,...i.signIn?{subtitle:f("accounts.needsSignIn")}:{},onSelect:()=>{i.signIn&&o(i.email)}},...n?[{key:"accounts-add",label:f("accounts.add"),icon:a.jsx(J2,{size:18}),onSelect:()=>o()}]:[],{key:"accounts-sign-out",label:f("accounts.signOut"),icon:a.jsx(L5,{size:18}),onSelect:()=>r(i.id)}]:[]}const Zn={step:"email",intent:!1,problem:null};function si({start:e,onDone:t,onBack:n}){const r=window.ogb?.accounts,[o,i]=m.useState(Zn),[s,c]=m.useState(e),[l,u]=m.useState(""),[d,p]=m.useState(!1),[h,C]=m.useState(!1),[g,y]=m.useState(Date.now());m.useEffect(()=>{const _=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(_)},[]),m.useEffect(()=>()=>{r?.addCancel().catch(()=>{})},[r]);const x=()=>{d||!r||(p(!0),r.addStart(s).then(_=>{_.outcome==="sent"?(i({step:"code",intent:!1,email:_.email,resendAt:_.resendAt,problem:null,triesLeft:null,..._.signupOpen===!1?{signupOpen:!1}:{}}),u("")):i({step:"email",intent:!1,problem:_.outcome})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1)))},k=_=>{if(!r||o.step!=="code")return;const M=o;p(!0),r.addVerify(_).then(N=>{N.outcome==="switched"?t(null):N.outcome==="added"?t(f("accounts.added",{email:N.email??s})):N.outcome==="already"?t(f("accounts.already",{email:N.email??s})):(u(""),i({...M,problem:N.outcome,triesLeft:N.outcome==="wrong-code"?N.triesLeft:null}))},()=>i({...M,problem:"failed",triesLeft:null})).finally(()=>p(!1))};return m.useEffect(()=>{if(!h||!r)return;const _=()=>{r.addResult().then(M=>{M&&(M.outcome==="switched"?t(null):M.outcome==="added"?t(f("accounts.added",{email:M.email??s})):M.outcome==="already"?t(f("accounts.already",{email:M.email??s})):(C(!1),i({step:"email",intent:!1,problem:"failed"})))}).catch(()=>{})};return _(),r.onChanged(_)},[h,r,t,s]),h?a.jsxs("div",{"data-accounts-browser":!0,className:Ne,children:[a.jsx(s1,{title:f("accounts.browserTitle"),sub:f("accounts.browserBody")}),a.jsx("button",{type:"button",className:Yt,onClick:()=>{r?.addReopen().catch(()=>{})},children:f("accounts.browserOpen")})]}):a.jsx(ei,{phase:o,email:s,code:l,profileEmail:null,busy:d,now:g,onBack:n,onEmail:c,onSend:x,onChangeEmail:()=>{i(Zn),r?.addCancel().catch(()=>{})},onCode:_=>{const M=fe(_);u(M),M.length===8&&!d&&k(M)},onResend:x,onBrowser:()=>{p(!0),r?.addBrowser().then(_=>{_.outcome==="browser"?C(!0):i({step:"email",intent:!1,problem:"failed"})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1))}})}function ai({onClose:e,adding:t=null,note:n=null}){const r=window.ogb?.accounts,[o,i]=m.useState(null),[s,c]=m.useState(n),[l,u]=m.useState(t);m.useEffect(()=>{if(!r)return;const C=()=>{r.list().then(i).catch(()=>c(f("accounts.failed")))};return C(),r.onChanged(C)},[r]);const d=C=>{c(null),r?.signOut(C).then(g=>{i(g.view);const y=en(g);y?c(y):e()},()=>c(f("accounts.failed")))},p=o?.active??null,h=m.useRef(null);return ii(h,e),a.jsx(X2,{modal:!0,children:a.jsx("div",{className:"ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4",onMouseDown:C=>C.target===C.currentTarget&&e(),children:a.jsxs("div",{ref:h,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"cloud-add-title","data-accounts-sheet":!0,className:L(Jo,"relative w-full max-w-[420px] outline-none"),children:[a.jsx("button",{type:"button",onClick:e,"aria-label":f("accounts.close"),className:L(Go,"absolute end-4 top-4 z-10"),children:a.jsx(B2,{size:16})}),l!==null?a.jsx(si,{start:l,onBack:()=>t!==null?e():u(null),onDone:C=>{u(null),C?c(C):e()}}):a.jsxs("div",{className:Ne,children:[a.jsx(s1,{title:f("accounts.title")}),p&&!n&&a.jsxs("p",{"data-accounts-active":!0,className:"truncate text-[14px] text-ink",title:p.email,children:[f("accounts.heading")," ",p.email]}),s&&a.jsx("p",{role:"status","data-accounts-note":!0,className:"text-[13px] leading-5 text-ink-secondary",children:s}),p&&!n&&a.jsx("button",{type:"button","data-accounts-sign-out":!0,className:qt,onClick:()=>d(p.id),children:f("accounts.signOut")})]})]})})})}function r6(){const e=window.ogb?.accounts,[t,n]=m.useState(!1);return m.useEffect(()=>{if(e)return e.sheetPending().then(r=>{r&&n(!0)}).catch(()=>{}),e.onOpenSheet(()=>n(!0))},[e]),m.useEffect(()=>{t&&window.ogb?.rail?.expand?.(!0)?.catch(()=>{})},[t]),{open:t,close:()=>{n(!1),window.ogb?.rail?.expand?.(!1)?.catch(()=>{}),e?.sheetClosed().catch(()=>{})}}}const ge={host:{platform:"other",label:"Browser",session:"unknown",packaged:!1},windowChrome:"native",screenPreview:{available:!1,interaction:"none",reasonCode:"desktop-app-required"},dictation:{available:!1,engine:"none",onDevice:!1,reasonCode:"desktop-app-required"},localComputer:{available:!1,support:"unsupported",enabled:!1,status:"unavailable",reasonCode:"desktop-app-required"}};let F1=null,St=0;function tn(){const e=typeof window>"u"?void 0:window.ogb?.platform;if(!e)return ge;const t=e==="darwin",n=e==="win32"||e==="linux",r={available:t||n,engine:t?"apple-speech":n?"fish-audio":"none",onDevice:t};return r.available||(r.reasonCode="unsupported-platform"),{...ge,host:{...ge.host,platform:e==="darwin"||e==="linux"||e==="win32"?e:"other",label:e==="darwin"?"macOS":e==="linux"?"Linux":e==="win32"?"Windows":"Desktop"},windowChrome:t?"mac-inset":e==="win32"?"win-caption":"native",dictation:r}}async function ci(){if(F1)return F1;if(!window.ogb?.getCapabilities)return ge;const e=St;let t;try{t=await window.ogb.getCapabilities()}catch{t=ge}return St!==e&&F1||(F1=t),F1}function o6(){return F1??tn()}function li(e){return St+=1,F1=e,e}function i6(){return typeof window>"u"||window.ogb?.remoteClient?.active?void 0:window.ogb?.approvals}const Q2=m.createContext({capabilities:tn(),ready:typeof window>"u"||!window.ogb});function s6({children:e}){const[t,n]=m.useState(()=>({capabilities:tn(),ready:typeof window>"u"||!window.ogb}));return m.useEffect(()=>{let r=!0,o=0;const i=window.ogb?.onCapabilitiesChanged?.(c=>{o+=1,r&&n({capabilities:li(c),ready:!0})}),s=o;return ci().then(c=>{r&&o===s&&n({capabilities:c,ready:!0})}),()=>{r=!1,i?.()}},[]),a.jsx(Q2.Provider,{value:t,children:e})}function er(){return m.useContext(Q2)}function ui(){const{capabilities:e}=er();return hi(e.windowChrome)}const On={WebkitAppRegion:"drag"},di={WebkitAppRegion:"no-drag"};function fi(e){return e?.windowChrome==="mac-inset"||e?.windowChrome==="win-caption"}function pi(e){return fi(e)&&e?.windowFrame!==!1}function hi(e){const t=e==="win-caption",n=t||e==="mac-inset";return{windowsCaption:t,draggable:n,dragProps:n?{"data-window-drag":"",style:On}:{},dragStyle:n?On:void 0,noDragStyle:n?di:void 0}}function a6(){const{dragProps:e}=ui();return e.style?a.jsx("div",{"aria-hidden":!0,"data-window-drag-strip":!0,...e,className:"pointer-events-none absolute inset-x-0 top-0 h-[52px]"}):null}function Ci(e,t,n=Date.now()){const r=Math.max(0,Math.round((n-e)/1e3)),o=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(r<45)return o.format(0,"second");const i=Math.round(r/60);if(i<60)return o.format(-i,"minute");const s=Math.round(i/60);if(s<24)return o.format(-s,"hour");const c=Math.round(s/24);return c<7?o.format(-c,"day"):new Date(e).toLocaleDateString(t,{month:"short",day:"numeric"})}let we=null,zn=!1;const jt=new Set,st=()=>typeof window>"u"?void 0:window.ogb?.rail;function te(e){we=e;for(const t of jt)t(we)}function mi(){const e=st();zn||!e?.state||(zn=!0,e.onState?.(te),e.state().then(te,()=>te(null)))}function c6(){const[e,t]=m.useState(we);return m.useEffect(()=>(jt.add(t),mi(),t(we),()=>{jt.delete(t)}),[]),e}function gi(){const[e,t]=m.useState(!0);return m.useEffect(()=>st()?.onFramed?.(t),[]),e}function l6(e=!0){st()?.drawsFrame?.(e)?.catch(()=>{})}function u6(e){const t=st(),n=we;!t?.setHidden||!n||(te({...n,hidden:e}),t.setHidden(e).then(te,()=>te(n)))}const nn="popover-surface flex flex-col gap-1 rounded-[var(--radius-menu)] border border-hairline/50 bg-menu p-1.5 shadow-lg [&_svg.lucide]:stroke-[1.5]",d6="flex min-h-[30px] w-full shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-2 py-1.5 text-left text-[14px] leading-[18px] focus-visible:bg-menu-hover",f6="mx-1.5 h-px shrink-0 bg-hairline/50",p6="px-2 pb-1 pt-2 text-[12px] font-medium leading-4 text-ink-secondary",Ee="group flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:h-10",h6="group flex min-h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 py-1 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:min-h-10",C6="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary",m6="flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 px-2 text-[13px] leading-[18px] touch:h-10",g6="flex size-4 shrink-0 items-center justify-center",b6="min-w-0 max-w-[45%] shrink truncate text-[12px] leading-4 text-ink-tertiary",y6="flex h-6 shrink-0 items-end gap-2 px-2 pb-0.5 text-[12px] font-medium leading-4 text-ink-tertiary",x6="mx-2 my-[5px] h-[0.5px] shrink-0 bg-ink/10",v6="px-2 py-1 text-[12px] leading-4 text-ink-tertiary",k6="shrink-0 text-ink-secondary",w6="shrink-0 text-ink-tertiary rtl:-scale-x-100",_6=1.75,bi=Object.freeze({empty:"native.connect.empty",codeOnly:"native.connect.codeOnly",emailCode:"native.connect.emailCode",oldCode:"native.connect.oldCode",scriptKey:"native.connect.scriptKey",notACode:"native.connect.notACode",publicHttp:"native.connect.publicHttp",phoneLink:"native.connect.phoneLink",notAnAddress:"native.connect.notAnAddress",unreachable:"native.connect.unreachable",dns:"native.connect.dns",certificate:"native.connect.certificate",notMausBot:"native.connect.notMausBot",desktopApp:"native.connect.desktopApp",desktopAppTailnet:"native.connect.desktopAppTailnet",loopback:"native.connect.loopback",localNetwork:"native.connect.localNetwork",tailscaleOff:"native.connect.tailscaleOff",otherTailnet:"native.connect.otherTailnet",tailnetBlocked:"native.connect.tailnetBlocked",tailnetSilent:"native.connect.tailnetSilent"}),rn=40,tr={blue:"blue",green:"teal",amber:"yellow",rose:"red",violet:"purple",slate:null};function at(e){const t=tr[e];return t?W2(t):"var(--color-raised)"}const Mt={blue:"cloudBuy.color.blue",green:"cloudBuy.color.teal",amber:"cloudBuy.color.yellow",rose:"cloudBuy.color.red",violet:"cloudBuy.color.purple",slate:"cloudBuy.color.slate"},B1=Object.keys(Mt),nr="blue";function yi(e,{now:t,tier:n=null,failed:r=!1,stop:o=null}){if(e===void 0)return{kind:"checking"};if(e===null)return{kind:"unreachable"};if(!e.signedIn||!e.hasCloud)return{kind:"first"};const i=e.adding&&!e.adding.done?e.adding:null;if(i)return i.status==="ready"?{kind:"ready",adding:i}:i.status==="setting_up"?{kind:"starting",adding:i}:i.status==="problem"?{kind:"problem",adding:i}:{kind:"waiting",adding:i,late:t-i.startedAt>=qo};const s=e.home?.name??null;if(!e.supported)return{kind:"stop",reason:"one",home:s};const c=o??(e.canAdd?null:e.blocked==="cap"||!e.blocked?"one":e.blocked);if(c)return{kind:"stop",reason:c,home:s};if(r)return{kind:"error"};if(!e.offer?.plans.length)return{kind:"unreachable"};const l=n?e.offer.plans.find(u=>u.tier===n):void 0;return l?{kind:"name",plan:l}:{kind:"choose",offer:e.offer}}function xi(e){return e==="signups_closed"||e==="checkout_open"||e==="rate"?e:"one"}const vi=1200,ki=3e3;function wi(e){return new Promise(t=>{let n=!1;const r=i=>{n||(n=!0,clearTimeout(o),t(i))},o=setTimeout(()=>r(!1),ki);try{if(!navigator.clipboard?.writeText)return r(!1);Promise.resolve(navigator.clipboard.writeText(e)).then(()=>r(!0),()=>r(!1))}catch{r(!1)}})}function _i(e){if(typeof document>"u"||!document.body||typeof document.execCommand!="function")return!1;const t=document.activeElement,n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px";try{return document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length),document.execCommand("copy")}catch{return!1}finally{n.remove(),t?.focus?.({preventScroll:!0})}}async function Si(e){if(!e.trim())return"empty";if(await wi(e))return"copied";try{if(typeof window<"u"&&await window.ogb?.copyText?.(e)===!0)return"copied"}catch{}return _i(e)?"copied":"failed"}function ji({copy:e,onChange:t,resetMs:n=vi,setTimer:r=(i,s)=>setTimeout(i,s),clearTimer:o=i=>clearTimeout(i)}){let i=!1,s=!1,c;const l=()=>{c!==void 0&&o(c),c=void 0};return{async click(u){if(i)return"busy";i=!0;let d;try{d=await e(u)}catch{d="failed"}finally{i=!1}return s||d==="empty"||(l(),t(d==="copied"?"copied":"failed"),c=r(()=>{c=void 0,t("idle")},n)),d},dispose(){s=!0,l()}}}function Mi(e){const[t,n]=m.useState("idle"),r=m.useRef(null);m.useEffect(()=>{const i=ji({copy:Si,onChange:n});return r.current=i,()=>{i.dispose(),r.current=null}},[]);const o=m.useCallback(()=>{r.current?.click(e)},[e]);return{state:t,copy:o}}const Ni={panel:"ring-offset-panel",card:"ring-offset-card",menu:"ring-offset-menu"};function $e({value:e,onChange:t,label:n,disabled:r=!1,offset:o="panel",none:i=!1}){const s=e??B1[0],c=l=>i&&l==="slate";return a.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":r||void 0,className:"flex flex-wrap gap-2.5",children:B1.map(l=>a.jsx("button",{type:"button",role:"radio","aria-checked":l===e,"aria-label":f(c(l)?"placeLook.none":Mt[l]),title:f(c(l)?"placeLook.none":Mt[l]),"data-swatch":l,disabled:r,onClick:()=>t(l),onKeyDown:u=>{const d=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(!d)return;u.preventDefault();const p=B1[(B1.indexOf(l)+d+B1.length)%B1.length];t(p),u.currentTarget.parentElement?.querySelector(`[data-swatch="${p}"]`)?.focus()},tabIndex:l===s?0:-1,className:L("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",c(l)?"border-ink/55 text-ink/55":"border-ink/10",l===e&&L("ring-2 ring-ink/70 ring-offset-2",Ni[o]),r&&l!==e&&"opacity-50"),style:c(l)?void 0:{background:at(l)},children:c(l)&&a.jsx("span",{"aria-hidden":"true",className:"h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current"})},l))})}function Nt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function In(e,t="|"){return e.map(n=>ar(n)).join(t)}function Et(e,t){return typeof t=="bigint"?t.toString():t}class Ei{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function ct(e){return new Ei(e)}function $i(e){return e==null}function on(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ai(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function R1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sn(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function T1(e){return sn(e._zod.def)??e._zod.def.shape}function rr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return R1(this,t,r),r},enumerable:!0,configurable:!0})}function or(e,t,n){t in e?R1(e,t,n):e[t]=n}function q1(e,t,n,r){const o=T1(t);for(const i of n){const s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?rr(e,i,()=>{const c=t._zod.def.shape[i];return r?r(c,i):c}):or(e,i,r?r(s.value,i):s.value))}}function Zi(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?rr(e,n,()=>t[n]):or(e,n,r.value))}}function p1(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Oi(e){return JSON.stringify(e)}function zi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ii=ct(()=>{if(v1.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ne(e){if(_e(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(_e(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sr(e){return ne(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ti=new Set(["string","number","symbol"]);function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K1(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ar(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Pi(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const cr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ri={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Li(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return q1(i,e,lt(e,t)),K1(e,p1(n,{shape:i,checks:[]}))}function lt(e,t){const n=T1(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function Di(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(lt(e,t)),s={};return q1(s,e,Reflect.ownKeys(T1(e)).filter(c=>!i.has(c))),K1(e,p1(n,{shape:s,checks:[]}))}function Fi(e,t){if(!ne(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=T1(e);for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return K1(e,p1(e._zod.def,{shape:lr(e,t)}))}function lr(e,t){const n={};return q1(n,e,Reflect.ownKeys(T1(e))),Zi(n,t),n}function Bi(e,t){if(!ne(t))throw new Error("Invalid input to safeExtend: expected a plain object");return K1(e,p1(e._zod.def,{shape:lr(e,t)}))}function Ui(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};q1(n,e,Reflect.ownKeys(T1(e))),q1(n,t,Reflect.ownKeys(T1(t)));const r=p1(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return K1(e,r)}function Tn(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(lt(t,n)):void 0,l={};return q1(l,t,Reflect.ownKeys(T1(t)),e&&((u,d)=>c&&!c.has(d)?u:new e({type:"optional",innerType:u}))),K1(t,p1(t._zod.def,{shape:l,checks:[]}))}function Wi(e,t,n){const r=n?new Set(lt(t,n)):void 0,o={};return q1(o,t,Reflect.ownKeys(T1(t)),(i,s)=>r&&!r.has(s)?i:new e({type:"nonoptional",innerType:i})),K1(t,p1(t._zod.def,{shape:o}))}function O1(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ki(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ee(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ue(e){return typeof e=="string"?e:e?.message}function Pn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function $t(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function U1(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:ue(e.inst?._zod.def?.error?.(e))??ue(i?.(e))??ue(t?.error?.(e))??ue(n.customError?.(e))??ue(n.localeError?.(e))??"Invalid input",c={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(c[l]=e[l]);return c.path??(c.path=[]),c.message=s,t?.reportInput&&(c.input=e.input),c}const Hi=/[\uD800-\uDBFF]/;function an(e){const t=e.length;if(!Hi.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function cn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Vi(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Se(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Gi(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ji(e,n,r.value)}}function W1(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ur(e,t,n){return W1(e,t,n,!1)}function dr(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return W1(this,n,r(this))},set(o){W1(this,n,o)}})}return t}function Ji(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:W1(this,t,n.bind(this))},set(r){W1(this,t,r)}})}function qi(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let ht,D1=!1;const Yi={configurable:!0,get(){D1=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&ht!==e._zod){ht=void 0;return}ht=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Yi);const o=D1;D1=!1;try{const i=n(this);return D1?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),D1=D1||o,i}catch(i){throw delete this[t],D1=D1||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Xi(e,t,n,r){const o=qi(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const Qi="~constantCatch";function es(e){const t=()=>e;return t[Qi]=!0,t}var Rn;const Ct={value:void 0,enumerable:!1};let Ln="captureStackTrace"in Error?Error:null;function ts(e){const t=Ln;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Ln=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){const o={};function i(h){this.def=h,this.constr=p,this.traits=new Set}i.prototype=o;const s=n,c=s&&new WeakSet;function l(h,C){if(h._zod){if(h._zod.traits.has(e))return}else{Ct.value=new i(C);try{Object.defineProperty(h,"_zod",Ct)}finally{Ct.value=void 0}}if(h._zod.traits.add(e),t(h,C),c){const y=Object.getPrototypeOf(h),x=h._zod.constr.prototype;let k=y;for(;k&&k!==x;)k=Object.getPrototypeOf(k);const _=k??y;c.has(_)||(c.add(_),Gi(_,s))}const g=p.prototype;for(const y in g)Object.prototype.hasOwnProperty.call(g,y)&&(y in h||(h[y]=g[y].bind(h)))}const u=r?.Parent??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function p(h){const C=r?.Parent?ts(d):this;l(C,h);const g=C._zod.deferred;if(g){for(const x of g)x();C._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(C),C}return Object.defineProperty(p,"init",{value:l}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class J1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class fr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Rn=globalThis).__zod_globalConfig??(Rn.__zod_globalConfig={});const v1=globalThis.__zod_globalConfig;function S1(e){return e&&Object.assign(v1,e),v1}function ns(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Et,2)),e.message}function rs(e){this._zod.message=e}const os={get:ns,set:rs,enumerable:!0,configurable:!0},mt={value:void 0,enumerable:!1},Dn=new WeakSet([Object.prototype,Error.prototype]),is=(e,t)=>{e.name="$ZodError",mt.value=t,Object.defineProperty(e,"issues",mt),mt.value=void 0,Object.defineProperty(e,"message",os);const n=Object.getPrototypeOf(e);Dn.has(n)||(Dn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},ss=b("$ZodError",is);function as(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function cs(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?as(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function ls(e,t=n=>n.message){const n={_errors:[]},r=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>r({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{const c=[...i,...s.path];if(c.length===0)n._errors.push(t(s));else{let l=n,u=0;for(;u<c.length;){const d=c[u],p=u===c.length-1;if(d==="_errors"){p&&l._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=l[d];p&&h._errors.push(t(s)),l=h,u++}}}};return r(e),n}function ut(e,t){return{callee:t?.callee??e,Err:t?.Err}}const ln=e=>{const t=(n,r,o,i)=>{const s=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new J1;if(c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>U1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},un=e=>{const t=async(n,r,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>U1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},dn=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new J1;return i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}};function pr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>U1(o,n,S1()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const fn=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}},us=Symbol.for("zod.compile.invalid"),ds=Symbol.for("zod.compile.fallback"),fs=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==us)return!0;if(r.definite===!0&&n===void 0)return!1}return ps(e,t,n)});function ps(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(r[ds]=!0,i=o({value:t,issues:[]},r)):i=e._zod.run({value:t,issues:[]},r),i instanceof Promise)throw new J1;return i.issues.length===0}const hs=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},Cs=e=>{const t=ln(e),n=(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,o,c,ut(n,s))};return n},ms=e=>{const t=ln(e),n=(r,o,i,s)=>t(r,o,i,ut(n,s));return n},gs=e=>{const t=un(e),n=async(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,o,c,ut(n,s))};return n},bs=e=>{const t=un(e),n=async(r,o,i,s)=>await t(r,o,i,ut(n,s));return n},ys=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return dn(e)(t,n,o)},xs=e=>(t,n,r)=>dn(e)(t,n,r),vs=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return fn(e)(t,n,o)},ks=e=>async(t,n,r)=>fn(e)(t,n,r),ws=/^[cC][0-9a-z]{6,}$/,_s=/^[0-9a-z]+$/,Ss=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,js=/^[0-9a-vA-V]{20}$/,Ms=/^[A-Za-z0-9]{27}$/,Ns=/^[a-zA-Z0-9_-]{21}$/;function Es(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const $s=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,As=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Zs=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Os="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function zs(){return new RegExp(Os,"u")}const Is=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ts=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ps=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Rs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ls=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ds=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Fs=/^https?$/,Bs=/^\+[1-9]\d{6,14}$/,hr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Us(e){return new RegExp(`^${e}$`)}const Ws=Us(hr);function At(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ks(e){return new RegExp(`^${At(e)}$`)}function Hs(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${At({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${At({precision:e.precision})}`:n;return new RegExp(`^${hr}T(?:${r})$`)}const Vs=/^[\s\S]{0,}$/,Gs=/^-?\d+$/,pn=/^-?\d+(?:\.\d+)?$/,Js=/^(?:true|false)$/i,qs=/^null$/i,Ys=/^undefined$/i,Xs=/^[^A-Z]*$/,Qs=/^[^a-z]*$/,d1=b("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),hn=e=>{const t=e.value;return!$i(t)&&t.length!==void 0},Je={number:"number",bigint:"bigint",object:"date"},Cr=b("$ZodCheckLessThan",(e,t)=>{d1.init(e,t);const n=Je[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Je[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mr=b("$ZodCheckGreaterThan",(e,t)=>{d1.init(e,t);const n=Je[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Je[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ea=b("$ZodCheckMultipleOf",(e,t)=>{d1.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ai(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ta=b("$ZodCheckNumberFormat",(e,t)=>{d1.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=cr[t.format];e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),na=b("$ZodCheckMaxLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>t.maximum?an(o):i)<=t.maximum)return;const c=cn(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ra=b("$ZodCheckMinLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?an(o):i)>=t.minimum)return;const c=cn(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oa=b("$ZodCheckLengthEquals",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=r=>{const o=r.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?an(o):i;if(s===t.length)return;const c=cn(o),l=s>t.length;r.issues.push({origin:c,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dt=b("$ZodCheckStringFormat",(e,t)=>{var n,r;d1.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ia=b("$ZodCheckRegex",(e,t)=>{dt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sa=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Xs),dt.init(e,t)}),aa=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qs),dt.init(e,t)}),ca=b("$ZodCheckIncludes",(e,t)=>{d1.init(e,t);const n=re(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),la=b("$ZodCheckStartsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`^${re(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),ua=b("$ZodCheckEndsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`.*${re(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),da=b("$ZodCheckOverwrite",(e,t)=>{d1.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class fa{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
1
|
+
import{c as r1,t as f,j as a,E as Ne,aB as se,H as s1,Y as ke,aC as ae,U as Ke,a as L,f as F2,J as qt,Q as Yt,G as Ko,aD as Ho,ag as Vo,r as m,X as B2,a7 as Go,a9 as Jo,ar as U2,a0 as W2,aE as qo,e as Yo,R as $n,aF as Xo,aG as Qo,aH as e5,aI as t5,aJ as n5,ae as r5,aK as o5,aL as i5,D as I1,V as s5,T as a5,aM as ot,O as An,K as c5,aN as l5,L as it,g as K2,aO as u5,aP as wt,aQ as H2,aR as h1,aS as d5,ah as f5,S as p5,a5 as h5,aT as V2,aU as C5,b as m5,aV as g5,aW as b5,aX as y5}from"./styles-C_rlkDrt.js";import{M as x5}from"./monitor-c1mf38zt.js";const v5=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],k5=r1("audio-lines",v5);const w5=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],_5=r1("building-2",w5);const S5=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],j5=r1("cloud-upload",S5);const M5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],N5=r1("copy",M5);const E5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],$5=r1("ellipsis",E5);const A5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Xt=r1("external-link",A5);const Z5=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],O5=r1("hard-drive",Z5);const z5=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],I5=r1("house",z5);const T5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],x1=r1("loader-circle",T5);const P5=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],G2=r1("lock",P5);const R5=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],L5=r1("log-out",R5);const D5=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],F5=r1("moon",D5);const B5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],J2=r1("plus",B5);const U5=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],W5=r1("power",U5);const K5=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],q2=r1("server",K5);const H5=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],V5=r1("smartphone",H5);const G5=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],J5=r1("timer",G5);const q5=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Qt=r1("user-round",q5),A1=8,Y5=new Set(["sso","two-factor","browser"]);function X5(e,t){switch(e){case"invalid-email":return f("cloudBuy.signIn.invalidEmail");case"rate-limited":return f("cloudBuy.signIn.rateLimited");case"wrong-code":return t===1?f("cloudBuy.signIn.wrongCodeOne"):f("cloudBuy.signIn.wrongCode",{count:t??0});case"expired":return f("cloudBuy.signIn.expired");case"signup-closed":return f("cloudBuy.signIn.signupClosed");case"device-limit":return f("cloudBuy.signIn.deviceLimit");case"sso":return f("cloudBuy.signIn.sso");case"two-factor":return f("cloudBuy.signIn.twoFactor");case"browser":return f("cloudBuy.signIn.browser");case"failed":return f("cloudBuy.signIn.failed")}}function fe(e){return e.replace(/\D/g,"").slice(0,A1)}const Q5=e=>{const t=Math.max(0,Math.ceil(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function ei({phase:e,email:t,code:n,profileEmail:r,busy:o,now:i,onBack:s,onEmail:c,onSend:l,onChangeEmail:u,onCode:d,onResend:p,onBrowser:h}){const C=e.step==="done"?null:e.problem,g=C!==null&&Y5.has(C),y=e.intent?f("cloudBuy.signIn.title"):f("cloudBuy.signIn.titlePlain"),x=(w,v)=>w.parentElement?.querySelectorAll("input")[v]?.focus(),k=(w,v,A)=>{const O=fe(v);if(O.length>1){d(fe(n.slice(0,w)+O)),x(A,Math.min(A1-1,w+O.length));return}const Z=(n.slice(0,w)+O+n.slice(w+1)).slice(0,A1);d(fe(Z)),O&&w<A1-1&&x(A,w+1)},_=w=>v=>{v.key==="Backspace"&&!n[w]&&w>0?(v.preventDefault(),d(n.slice(0,w-1)),x(v.currentTarget,w-1)):v.key==="ArrowLeft"&&w>0?(v.preventDefault(),x(v.currentTarget,w-1)):v.key==="ArrowRight"&&w<A1-1&&(v.preventDefault(),x(v.currentTarget,w+1))},M=w=>{const v=fe(w.clipboardData.getData("text"));v&&(w.preventDefault(),d(v),x(w.currentTarget,Math.min(A1-1,v.length)))},N=w=>{w.preventDefault(),o||l()};return a.jsxs("div",{"data-cloud-add":`sign-in-${e.step}`,className:Ne,children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(se,{label:f("cloudBuy.back"),onClick:s}),a.jsx(s1,{title:y,sub:f("cloudBuy.signIn.sub")})]}),e.step==="email"&&a.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:N,noValidate:!0,children:[a.jsx("label",{htmlFor:"cloud-add-email",className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.email")}),a.jsx("input",{id:"cloud-add-email","data-autofocus":!0,type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:t,disabled:o,"aria-invalid":C==="invalid-email"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:w=>c(w.target.value),className:ke}),a.jsxs("button",{type:"submit",className:`${ae} mt-2`,disabled:o||!t.trim(),children:[o&&a.jsx(x1,{size:16,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.send")]}),r&&t.trim().toLowerCase()===r.trim().toLowerCase()&&a.jsx("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:f("cloudBuy.signIn.fromProfile")})]}),e.step==="code"&&a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsxs("p",{id:"cloud-add-code-label",className:"text-[13px] leading-[18px] text-ink-secondary",children:[f("cloudBuy.signIn.codeLabel",{email:e.email})," · ",a.jsx("button",{type:"button",className:Ke,disabled:o,onClick:u,children:f("cloudBuy.signIn.change")})]}),a.jsx("div",{role:"group","aria-labelledby":"cloud-add-code-label",className:"grid grid-cols-8 gap-1.5",dir:"ltr",children:Array.from({length:A1},(w,v)=>a.jsx("input",{"data-autofocus":v===Math.min(n.length,A1-1)||void 0,value:n[v]??"",inputMode:"numeric",pattern:"[0-9]*",maxLength:A1,autoComplete:v===0?"one-time-code":"off","aria-label":f("cloudBuy.signIn.digit",{n:v+1}),disabled:o,"aria-invalid":C==="wrong-code"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:A=>k(v,A.target.value,A.currentTarget),onKeyDown:_(v),onPaste:M,onFocus:A=>A.currentTarget.select(),className:L(ke,"h-11 min-w-0 px-0 text-center text-[20px] font-medium tabular-nums")},v))}),e.signupOpen===!1&&a.jsx("p",{"data-cloud-signup-closed":!0,className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.signupClosedNote")}),a.jsx("div",{className:"flex min-h-6 items-center justify-between gap-3 text-[13px] text-ink-tertiary",children:o?a.jsxs("span",{role:"status",className:"inline-flex items-center gap-1.5",children:[a.jsx(x1,{size:13,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.checking")]}):e.resendAt>i?a.jsx("span",{children:f("cloudBuy.signIn.resendIn",{time:Q5(e.resendAt-i)})}):a.jsx("button",{type:"button",className:Ke,onClick:p,children:f("cloudBuy.signIn.resend")})})]}),e.step==="done"&&a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[14px] leading-5 text-ink",children:[a.jsx("span",{"aria-hidden":"true",className:"grid size-5 shrink-0 place-items-center rounded-full bg-ink text-app",children:a.jsx(F2,{size:12,strokeWidth:2.4})}),e.intent?f("cloudBuy.signIn.done"):f("cloudBuy.signIn.donePlain")]}),C&&a.jsxs("div",{id:"cloud-add-problem",role:"alert",className:"flex flex-col items-start gap-3 rounded-[12px] bg-ink/[0.04] px-4 py-3 text-[13px] leading-[18px] text-ink",children:[a.jsx("p",{children:X5(C,e.step==="code"?e.triesLeft:null)}),g&&a.jsxs("button",{type:"button",className:qt,onClick:h,children:[f("cloudBuy.signIn.continueBrowser"),a.jsx(Xt,{size:14,"aria-hidden":"true"})]}),C==="expired"&&e.step==="code"&&a.jsx("button",{type:"button",className:Yt,disabled:o,onClick:p,children:f("cloudBuy.signIn.newCode")})]}),e.step!=="done"&&!g&&a.jsxs("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:[f("cloudBuy.signIn.ssoHint")," ",a.jsx("button",{type:"button",className:Ke,onClick:h,children:f("cloudBuy.signIn.continueBrowser")})]})]})}function Xc({code:e,checkout:t,trial:n,busy:r,onReopen:o,onCancel:i}){return a.jsxs("div",{"data-cloud-add":"signing-in",className:Ne,children:[a.jsx(s1,{title:f("cloudAdd.browserTitle")}),e?a.jsxs("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-[14px] leading-5 text-ink marker:text-ink-tertiary",children:[a.jsx("li",{children:f("cloudAdd.signInStep1")}),a.jsxs("li",{children:[f("cloudAccount.codeCheck"),a.jsx("code",{dir:"ltr",className:"mt-1.5 block w-fit select-all rounded-[8px] bg-ink/[0.05] px-3 py-1.5 font-mono text-[17px] font-medium tracking-[0.12em]",children:e})]}),a.jsx("li",{children:f(t?n?"cloudAdd.signInStep3Trial":"cloudAdd.signInStep3":"cloudAdd.signInStep3Connect")})]}):a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[13px] text-ink-secondary",children:[a.jsx(x1,{size:14,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudAdd.opening")]}),a.jsxs("div",{className:Ko,children:[a.jsx("button",{type:"button",className:Yt,disabled:r,onClick:i,children:f("cloudAdd.cancel")}),a.jsxs("button",{type:"button",className:qt,disabled:r||!e,onClick:o,children:[f("cloudAdd.reopenBrowser"),a.jsx(Xt,{size:14,"aria-hidden":"true"})]})]})]})}var Y2=Ho();const Qc=Vo(Y2);let ti=0;const pe=[],_t=m.createContext(null),ni=()=>()=>{};function X2({modal:e=!1,children:t}){const[n]=m.useState(()=>++ti);m.useLayoutEffect(()=>{if(e)return pe.push(n),pe.sort((s,c)=>s-c),()=>{pe.splice(pe.indexOf(n),1)}},[e,n]);const r=m.useContext(_t),o=m.useSyncExternalStore(ni,()=>!1,()=>!0),i=a.jsx(_t.Provider,{value:e?n:r,children:t});return o?i:Y2.createPortal(i,document.body)}function ri(){const e=m.useContext(_t);return m.useCallback(()=>e===null||pe.at(-1)===e,[e])}const oi="a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]";function ii(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{const r=e.current;if(!r)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null;r.contains(document.activeElement)||r.focus();const i=()=>Array.from(r.querySelectorAll(oi)).filter(c=>c.getAttribute("tabindex")!=="-1"&&!c.closest("[hidden], [inert]")),s=c=>{if(c.defaultPrevented)return;if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const l=i();if(!l.length)return c.preventDefault();const u=l[0],d=l[l.length-1];c.shiftKey&&(document.activeElement===u||!r.contains(document.activeElement)||document.activeElement===r)?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())};return r.addEventListener("keydown",s),()=>{r.removeEventListener("keydown",s),o?.focus()}},[e])}function en(e){switch(e.outcome){case"moving":return f("accounts.moving");case"gone":return f("accounts.gone");case"failed":return f("accounts.failed");default:return null}}function e6(){const e=window.ogb?.remoteClient?.active?void 0:window.ogb?.accounts,t=window.ogb?.accountSheet,n=window.ogb?.app?.ownPage===!0&&!!e,r=U2(),[o,i]=m.useState(null),[s,c]=m.useState(!1),[l,u]=m.useState(null);return m.useEffect(()=>{if(!n)return;const d=()=>{e.list().then(i).catch(()=>{})};return d(),e.onChanged(d)},[n,e]),m.useEffect(()=>{if(n||!t)return;let d=!0;return t.offered().then(p=>{d&&c(p===!0)}).catch(()=>{}),()=>{d=!1}},[n,t]),{view:n?o:null,openSheet:!n&&s&&t?()=>{t.open().catch(()=>{})}:null,noRail:!r.beside&&!r.places.length,signOut:d=>{e?.signOut(d).then(p=>{i(p.view);const h=en(p);h&&u({email:null,note:h})}).catch(()=>u({email:null,note:f("accounts.failed")}))},add:d=>u({email:d??"",note:null}),sheet:l,closeSheet:()=>u(null)}}function t6(e){return f(e&&!e.active?"accounts.signIn":"settings.section.cloudAccount")}function n6({view:e,openSheet:t,noRail:n,signOut:r,add:o}){if(t)return[{key:"accounts-sheet",label:f("accounts.manage"),icon:a.jsx(Qt,{size:18}),onSelect:t}];const i=e?.active;return i?[{key:"accounts-active",heading:f("accounts.heading"),label:i.email,title:i.email,checked:!0,icon:a.jsx(F2,{size:18}),disabled:!i.signIn,...i.signIn?{subtitle:f("accounts.needsSignIn")}:{},onSelect:()=>{i.signIn&&o(i.email)}},...n?[{key:"accounts-add",label:f("accounts.add"),icon:a.jsx(J2,{size:18}),onSelect:()=>o()}]:[],{key:"accounts-sign-out",label:f("accounts.signOut"),icon:a.jsx(L5,{size:18}),onSelect:()=>r(i.id)}]:[]}const Zn={step:"email",intent:!1,problem:null};function si({start:e,onDone:t,onBack:n}){const r=window.ogb?.accounts,[o,i]=m.useState(Zn),[s,c]=m.useState(e),[l,u]=m.useState(""),[d,p]=m.useState(!1),[h,C]=m.useState(!1),[g,y]=m.useState(Date.now());m.useEffect(()=>{const _=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(_)},[]),m.useEffect(()=>()=>{r?.addCancel().catch(()=>{})},[r]);const x=()=>{d||!r||(p(!0),r.addStart(s).then(_=>{_.outcome==="sent"?(i({step:"code",intent:!1,email:_.email,resendAt:_.resendAt,problem:null,triesLeft:null,..._.signupOpen===!1?{signupOpen:!1}:{}}),u("")):i({step:"email",intent:!1,problem:_.outcome})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1)))},k=_=>{if(!r||o.step!=="code")return;const M=o;p(!0),r.addVerify(_).then(N=>{N.outcome==="switched"?t(null):N.outcome==="added"?t(f("accounts.added",{email:N.email??s})):N.outcome==="already"?t(f("accounts.already",{email:N.email??s})):(u(""),i({...M,problem:N.outcome,triesLeft:N.outcome==="wrong-code"?N.triesLeft:null}))},()=>i({...M,problem:"failed",triesLeft:null})).finally(()=>p(!1))};return m.useEffect(()=>{if(!h||!r)return;const _=()=>{r.addResult().then(M=>{M&&(M.outcome==="switched"?t(null):M.outcome==="added"?t(f("accounts.added",{email:M.email??s})):M.outcome==="already"?t(f("accounts.already",{email:M.email??s})):(C(!1),i({step:"email",intent:!1,problem:"failed"})))}).catch(()=>{})};return _(),r.onChanged(_)},[h,r,t,s]),h?a.jsxs("div",{"data-accounts-browser":!0,className:Ne,children:[a.jsx(s1,{title:f("accounts.browserTitle"),sub:f("accounts.browserBody")}),a.jsx("button",{type:"button",className:Yt,onClick:()=>{r?.addReopen().catch(()=>{})},children:f("accounts.browserOpen")})]}):a.jsx(ei,{phase:o,email:s,code:l,profileEmail:null,busy:d,now:g,onBack:n,onEmail:c,onSend:x,onChangeEmail:()=>{i(Zn),r?.addCancel().catch(()=>{})},onCode:_=>{const M=fe(_);u(M),M.length===8&&!d&&k(M)},onResend:x,onBrowser:()=>{p(!0),r?.addBrowser().then(_=>{_.outcome==="browser"?C(!0):i({step:"email",intent:!1,problem:"failed"})},()=>i({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1))}})}function ai({onClose:e,adding:t=null,note:n=null}){const r=window.ogb?.accounts,[o,i]=m.useState(null),[s,c]=m.useState(n),[l,u]=m.useState(t);m.useEffect(()=>{if(!r)return;const C=()=>{r.list().then(i).catch(()=>c(f("accounts.failed")))};return C(),r.onChanged(C)},[r]);const d=C=>{c(null),r?.signOut(C).then(g=>{i(g.view);const y=en(g);y?c(y):e()},()=>c(f("accounts.failed")))},p=o?.active??null,h=m.useRef(null);return ii(h,e),a.jsx(X2,{modal:!0,children:a.jsx("div",{className:"ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4",onMouseDown:C=>C.target===C.currentTarget&&e(),children:a.jsxs("div",{ref:h,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"cloud-add-title","data-accounts-sheet":!0,className:L(Jo,"relative w-full max-w-[420px] outline-none"),children:[a.jsx("button",{type:"button",onClick:e,"aria-label":f("accounts.close"),className:L(Go,"absolute end-4 top-4 z-10"),children:a.jsx(B2,{size:16})}),l!==null?a.jsx(si,{start:l,onBack:()=>t!==null?e():u(null),onDone:C=>{u(null),C?c(C):e()}}):a.jsxs("div",{className:Ne,children:[a.jsx(s1,{title:f("accounts.title")}),p&&!n&&a.jsxs("p",{"data-accounts-active":!0,className:"truncate text-[14px] text-ink",title:p.email,children:[f("accounts.heading")," ",p.email]}),s&&a.jsx("p",{role:"status","data-accounts-note":!0,className:"text-[13px] leading-5 text-ink-secondary",children:s}),p&&!n&&a.jsx("button",{type:"button","data-accounts-sign-out":!0,className:qt,onClick:()=>d(p.id),children:f("accounts.signOut")})]})]})})})}function r6(){const e=window.ogb?.accounts,[t,n]=m.useState(!1);return m.useEffect(()=>{if(e)return e.sheetPending().then(r=>{r&&n(!0)}).catch(()=>{}),e.onOpenSheet(()=>n(!0))},[e]),m.useEffect(()=>{t&&window.ogb?.rail?.expand?.(!0)?.catch(()=>{})},[t]),{open:t,close:()=>{n(!1),window.ogb?.rail?.expand?.(!1)?.catch(()=>{}),e?.sheetClosed().catch(()=>{})}}}const ge={host:{platform:"other",label:"Browser",session:"unknown",packaged:!1},windowChrome:"native",screenPreview:{available:!1,interaction:"none",reasonCode:"desktop-app-required"},dictation:{available:!1,engine:"none",onDevice:!1,reasonCode:"desktop-app-required"},localComputer:{available:!1,support:"unsupported",enabled:!1,status:"unavailable",reasonCode:"desktop-app-required"}};let F1=null,St=0;function tn(){const e=typeof window>"u"?void 0:window.ogb?.platform;if(!e)return ge;const t=e==="darwin",n=e==="win32"||e==="linux",r={available:t||n,engine:t?"apple-speech":n?"fish-audio":"none",onDevice:t};return r.available||(r.reasonCode="unsupported-platform"),{...ge,host:{...ge.host,platform:e==="darwin"||e==="linux"||e==="win32"?e:"other",label:e==="darwin"?"macOS":e==="linux"?"Linux":e==="win32"?"Windows":"Desktop"},windowChrome:t?"mac-inset":e==="win32"?"win-caption":"native",dictation:r}}async function ci(){if(F1)return F1;if(!window.ogb?.getCapabilities)return ge;const e=St;let t;try{t=await window.ogb.getCapabilities()}catch{t=ge}return St!==e&&F1||(F1=t),F1}function o6(){return F1??tn()}function li(e){return St+=1,F1=e,e}function i6(){return typeof window>"u"||window.ogb?.remoteClient?.active?void 0:window.ogb?.approvals}const Q2=m.createContext({capabilities:tn(),ready:typeof window>"u"||!window.ogb});function s6({children:e}){const[t,n]=m.useState(()=>({capabilities:tn(),ready:typeof window>"u"||!window.ogb}));return m.useEffect(()=>{let r=!0,o=0;const i=window.ogb?.onCapabilitiesChanged?.(c=>{o+=1,r&&n({capabilities:li(c),ready:!0})}),s=o;return ci().then(c=>{r&&o===s&&n({capabilities:c,ready:!0})}),()=>{r=!1,i?.()}},[]),a.jsx(Q2.Provider,{value:t,children:e})}function er(){return m.useContext(Q2)}function ui(){const{capabilities:e}=er();return hi(e.windowChrome)}const On={WebkitAppRegion:"drag"},di={WebkitAppRegion:"no-drag"};function fi(e){return e?.windowChrome==="mac-inset"||e?.windowChrome==="win-caption"}function pi(e){return fi(e)&&e?.windowFrame!==!1}function hi(e){const t=e==="win-caption",n=t||e==="mac-inset";return{windowsCaption:t,draggable:n,dragProps:n?{"data-window-drag":"",style:On}:{},dragStyle:n?On:void 0,noDragStyle:n?di:void 0}}function a6(){const{dragProps:e}=ui();return e.style?a.jsx("div",{"aria-hidden":!0,"data-window-drag-strip":!0,...e,className:"pointer-events-none absolute inset-x-0 top-0 h-[52px]"}):null}function Ci(e,t,n=Date.now()){const r=Math.max(0,Math.round((n-e)/1e3)),o=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(r<45)return o.format(0,"second");const i=Math.round(r/60);if(i<60)return o.format(-i,"minute");const s=Math.round(i/60);if(s<24)return o.format(-s,"hour");const c=Math.round(s/24);return c<7?o.format(-c,"day"):new Date(e).toLocaleDateString(t,{month:"short",day:"numeric"})}let we=null,zn=!1;const jt=new Set,st=()=>typeof window>"u"?void 0:window.ogb?.rail;function te(e){we=e;for(const t of jt)t(we)}function mi(){const e=st();zn||!e?.state||(zn=!0,e.onState?.(te),e.state().then(te,()=>te(null)))}function c6(){const[e,t]=m.useState(we);return m.useEffect(()=>(jt.add(t),mi(),t(we),()=>{jt.delete(t)}),[]),e}function gi(){const[e,t]=m.useState(!0);return m.useEffect(()=>st()?.onFramed?.(t),[]),e}function l6(e=!0){st()?.drawsFrame?.(e)?.catch(()=>{})}function u6(e){const t=st(),n=we;!t?.setHidden||!n||(te({...n,hidden:e}),t.setHidden(e).then(te,()=>te(n)))}const nn="popover-surface flex flex-col gap-1 rounded-[var(--radius-menu)] border border-hairline/50 bg-menu p-1.5 shadow-lg [&_svg.lucide]:stroke-[1.5]",d6="flex min-h-[30px] w-full shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-2 py-1.5 text-left text-[14px] leading-[18px] focus-visible:bg-menu-hover",f6="mx-1.5 h-px shrink-0 bg-hairline/50",p6="px-2 pb-1 pt-2 text-[12px] font-medium leading-4 text-ink-secondary",Ee="group flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:h-10",h6="group flex min-h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 py-1 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:min-h-10",C6="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary",m6="flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 px-2 text-[13px] leading-[18px] touch:h-10",g6="flex size-4 shrink-0 items-center justify-center",b6="min-w-0 max-w-[45%] shrink truncate text-[12px] leading-4 text-ink-tertiary",y6="flex h-6 shrink-0 items-end gap-2 px-2 pb-0.5 text-[12px] font-medium leading-4 text-ink-tertiary",x6="mx-2 my-[5px] h-[0.5px] shrink-0 bg-ink/10",v6="px-2 py-1 text-[12px] leading-4 text-ink-tertiary",k6="shrink-0 text-ink-secondary",w6="shrink-0 text-ink-tertiary rtl:-scale-x-100",_6=1.75,bi=Object.freeze({empty:"native.connect.empty",codeOnly:"native.connect.codeOnly",emailCode:"native.connect.emailCode",oldCode:"native.connect.oldCode",scriptKey:"native.connect.scriptKey",notACode:"native.connect.notACode",publicHttp:"native.connect.publicHttp",phoneLink:"native.connect.phoneLink",notAnAddress:"native.connect.notAnAddress",unreachable:"native.connect.unreachable",dns:"native.connect.dns",certificate:"native.connect.certificate",notMausBot:"native.connect.notMausBot",desktopApp:"native.connect.desktopApp",desktopAppTailnet:"native.connect.desktopAppTailnet",loopback:"native.connect.loopback",localNetwork:"native.connect.localNetwork",tailscaleOff:"native.connect.tailscaleOff",otherTailnet:"native.connect.otherTailnet",tailnetBlocked:"native.connect.tailnetBlocked",tailnetSilent:"native.connect.tailnetSilent"}),rn=40,tr={blue:"blue",green:"teal",amber:"yellow",rose:"red",violet:"purple",slate:null};function at(e){const t=tr[e];return t?W2(t):"var(--color-raised)"}const Mt={blue:"cloudBuy.color.blue",green:"cloudBuy.color.teal",amber:"cloudBuy.color.yellow",rose:"cloudBuy.color.red",violet:"cloudBuy.color.purple",slate:"cloudBuy.color.slate"},B1=Object.keys(Mt),nr="blue";function yi(e,{now:t,tier:n=null,failed:r=!1,stop:o=null}){if(e===void 0)return{kind:"checking"};if(e===null)return{kind:"unreachable"};if(!e.signedIn||!e.hasCloud)return{kind:"first"};const i=e.adding&&!e.adding.done?e.adding:null;if(i)return i.status==="ready"?{kind:"ready",adding:i}:i.status==="setting_up"?{kind:"starting",adding:i}:i.status==="problem"?{kind:"problem",adding:i}:{kind:"waiting",adding:i,late:t-i.startedAt>=qo};const s=e.home?.name??null;if(!e.supported)return{kind:"stop",reason:"one",home:s};const c=o??(e.canAdd?null:e.blocked==="cap"||!e.blocked?"one":e.blocked);if(c)return{kind:"stop",reason:c,home:s};if(r)return{kind:"error"};if(!e.offer?.plans.length)return{kind:"unreachable"};const l=n?e.offer.plans.find(u=>u.tier===n):void 0;return l?{kind:"name",plan:l}:{kind:"choose",offer:e.offer}}function xi(e){return e==="signups_closed"||e==="checkout_open"||e==="rate"?e:"one"}const vi=1200,ki=3e3;function wi(e){return new Promise(t=>{let n=!1;const r=i=>{n||(n=!0,clearTimeout(o),t(i))},o=setTimeout(()=>r(!1),ki);try{if(!navigator.clipboard?.writeText)return r(!1);Promise.resolve(navigator.clipboard.writeText(e)).then(()=>r(!0),()=>r(!1))}catch{r(!1)}})}function _i(e){if(typeof document>"u"||!document.body||typeof document.execCommand!="function")return!1;const t=document.activeElement,n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px";try{return document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length),document.execCommand("copy")}catch{return!1}finally{n.remove(),t?.focus?.({preventScroll:!0})}}async function Si(e){if(!e.trim())return"empty";if(await wi(e))return"copied";try{if(typeof window<"u"&&await window.ogb?.copyText?.(e)===!0)return"copied"}catch{}return _i(e)?"copied":"failed"}function ji({copy:e,onChange:t,resetMs:n=vi,setTimer:r=(i,s)=>setTimeout(i,s),clearTimer:o=i=>clearTimeout(i)}){let i=!1,s=!1,c;const l=()=>{c!==void 0&&o(c),c=void 0};return{async click(u){if(i)return"busy";i=!0;let d;try{d=await e(u)}catch{d="failed"}finally{i=!1}return s||d==="empty"||(l(),t(d==="copied"?"copied":"failed"),c=r(()=>{c=void 0,t("idle")},n)),d},dispose(){s=!0,l()}}}function Mi(e){const[t,n]=m.useState("idle"),r=m.useRef(null);m.useEffect(()=>{const i=ji({copy:Si,onChange:n});return r.current=i,()=>{i.dispose(),r.current=null}},[]);const o=m.useCallback(()=>{r.current?.click(e)},[e]);return{state:t,copy:o}}const Ni={panel:"ring-offset-panel",card:"ring-offset-card",menu:"ring-offset-menu"};function $e({value:e,onChange:t,label:n,disabled:r=!1,offset:o="panel",none:i=!1}){const s=e??B1[0],c=l=>i&&l==="slate";return a.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":r||void 0,className:"flex flex-wrap gap-2.5",children:B1.map(l=>a.jsx("button",{type:"button",role:"radio","aria-checked":l===e,"aria-label":f(c(l)?"placeLook.none":Mt[l]),title:f(c(l)?"placeLook.none":Mt[l]),"data-swatch":l,disabled:r,onClick:()=>t(l),onKeyDown:u=>{const d=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(!d)return;u.preventDefault();const p=B1[(B1.indexOf(l)+d+B1.length)%B1.length];t(p),u.currentTarget.parentElement?.querySelector(`[data-swatch="${p}"]`)?.focus()},tabIndex:l===s?0:-1,className:L("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",c(l)?"border-ink/55 text-ink/55":"border-ink/10",l===e&&L("ring-2 ring-ink/70 ring-offset-2",Ni[o]),r&&l!==e&&"opacity-50"),style:c(l)?void 0:{background:at(l)},children:c(l)&&a.jsx("span",{"aria-hidden":"true",className:"h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current"})},l))})}function Nt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function In(e,t="|"){return e.map(n=>ar(n)).join(t)}function Et(e,t){return typeof t=="bigint"?t.toString():t}class Ei{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function ct(e){return new Ei(e)}function $i(e){return e==null}function on(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ai(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function R1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sn(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function T1(e){return sn(e._zod.def)??e._zod.def.shape}function rr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return R1(this,t,r),r},enumerable:!0,configurable:!0})}function or(e,t,n){t in e?R1(e,t,n):e[t]=n}function q1(e,t,n,r){const o=T1(t);for(const i of n){const s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?rr(e,i,()=>{const c=t._zod.def.shape[i];return r?r(c,i):c}):or(e,i,r?r(s.value,i):s.value))}}function Zi(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?rr(e,n,()=>t[n]):or(e,n,r.value))}}function p1(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Oi(e){return JSON.stringify(e)}function zi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ir="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ii=ct(()=>{if(v1.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ne(e){if(_e(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(_e(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sr(e){return ne(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ti=new Set(["string","number","symbol"]);function re(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K1(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ar(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Pi(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const cr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ri={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Li(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i={};return q1(i,e,lt(e,t)),K1(e,p1(n,{shape:i,checks:[]}))}function lt(e,t){const n=T1(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function Di(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=new Set(lt(e,t)),s={};return q1(s,e,Reflect.ownKeys(T1(e)).filter(c=>!i.has(c))),K1(e,p1(n,{shape:s,checks:[]}))}function Fi(e,t){if(!ne(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=T1(e);for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return K1(e,p1(e._zod.def,{shape:lr(e,t)}))}function lr(e,t){const n={};return q1(n,e,Reflect.ownKeys(T1(e))),Zi(n,t),n}function Bi(e,t){if(!ne(t))throw new Error("Invalid input to safeExtend: expected a plain object");return K1(e,p1(e._zod.def,{shape:lr(e,t)}))}function Ui(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};q1(n,e,Reflect.ownKeys(T1(e))),q1(n,t,Reflect.ownKeys(T1(t)));const r=p1(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return K1(e,r)}function Tn(e,t,n,r="partial"){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(lt(t,n)):void 0,l={};return q1(l,t,Reflect.ownKeys(T1(t)),e&&((u,d)=>c&&!c.has(d)?u:new e({type:"optional",innerType:u}))),K1(t,p1(t._zod.def,{shape:l,checks:[]}))}function Wi(e,t,n){const r=n?new Set(lt(t,n)):void 0,o={};return q1(o,t,Reflect.ownKeys(T1(t)),(i,s)=>r&&!r.has(s)?i:new e({type:"nonoptional",innerType:i})),K1(t,p1(t._zod.def,{shape:o}))}function O1(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ki(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ee(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ue(e){return typeof e=="string"?e:e?.message}function Pn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function $t(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function U1(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:ue(e.inst?._zod.def?.error?.(e))??ue(i?.(e))??ue(t?.error?.(e))??ue(n.customError?.(e))??ue(n.localeError?.(e))??"Invalid input",c={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(c[l]=e[l]);return c.path??(c.path=[]),c.message=s,t?.reportInput&&(c.input=e.input),c}const Hi=/[\uD800-\uDBFF]/;function an(e){const t=e.length;if(!Hi.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function cn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Vi(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Se(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Gi(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ji(e,n,r.value)}}function W1(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ur(e,t,n){return W1(e,t,n,!1)}function dr(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return W1(this,n,r(this))},set(o){W1(this,n,o)}})}return t}function Ji(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:W1(this,t,n.bind(this))},set(r){W1(this,t,r)}})}function qi(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let ht,D1=!1;const Yi={configurable:!0,get(){D1=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&ht!==e._zod){ht=void 0;return}ht=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Yi);const o=D1;D1=!1;try{const i=n(this);return D1?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),D1=D1||o,i}catch(i){throw delete this[t],D1=D1||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Xi(e,t,n,r){const o=qi(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}const Qi="~constantCatch";function es(e){const t=()=>e;return t[Qi]=!0,t}var Rn;const Ct={value:void 0,enumerable:!1};let Ln="captureStackTrace"in Error?Error:null;function ts(e){const t=Ln;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Ln=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){const o={};function i(h){this.def=h,this.constr=p,this.traits=new Set}i.prototype=o;const s=n,c=s&&new WeakSet;function l(h,C){if(h._zod){if(h._zod.traits.has(e))return}else{Ct.value=new i(C);try{Object.defineProperty(h,"_zod",Ct)}finally{Ct.value=void 0}}if(h._zod.traits.add(e),t(h,C),c){const y=Object.getPrototypeOf(h),x=h._zod.constr.prototype;let k=y;for(;k&&k!==x;)k=Object.getPrototypeOf(k);const _=k??y;c.has(_)||(c.add(_),Gi(_,s))}const g=p.prototype;for(const y in g)Object.prototype.hasOwnProperty.call(g,y)&&(y in h||(h[y]=g[y].bind(h)))}const u=r?.Parent??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function p(h){const C=r?.Parent?ts(d):this;l(C,h);const g=C._zod.deferred;if(g){for(const x of g)x();C._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(C),C}return Object.defineProperty(p,"init",{value:l}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class J1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class fr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Rn=globalThis).__zod_globalConfig??(Rn.__zod_globalConfig={});const v1=globalThis.__zod_globalConfig;function S1(e){return e&&Object.assign(v1,e),v1}function ns(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Et,2)),e.message}function rs(e){this._zod.message=e}const os={get:ns,set:rs,enumerable:!0,configurable:!0},mt={value:void 0,enumerable:!1},Dn=new WeakSet([Object.prototype,Error.prototype]),is=(e,t)=>{e.name="$ZodError",mt.value=t,Object.defineProperty(e,"issues",mt),mt.value=void 0,Object.defineProperty(e,"message",os);const n=Object.getPrototypeOf(e);Dn.has(n)||(Dn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},ss=b("$ZodError",is);function as(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function cs(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?as(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function ls(e,t=n=>n.message){const n={_errors:[]},r=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>r({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{const c=[...i,...s.path];if(c.length===0)n._errors.push(t(s));else{let l=n,u=0;for(;u<c.length;){const d=c[u],p=u===c.length-1;if(d==="_errors"){p&&l._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=l[d];p&&h._errors.push(t(s)),l=h,u++}}}};return r(e),n}function ut(e,t){return{callee:t?.callee??e,Err:t?.Err}}const ln=e=>{const t=(n,r,o,i)=>{const s=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise)throw new J1;if(c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>U1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},un=e=>{const t=async(n,r,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){const l=new(i?.Err??e)(c.issues.map(u=>U1(u,s,S1())));throw ir(l,i?.callee??t),l}return c.value};return t},dn=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new J1;return i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}};function pr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>U1(o,n,S1()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const fn=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?pr(e,i.issues,o):{success:!0,data:i.value}},us=Symbol.for("zod.compile.invalid"),ds=Symbol.for("zod.compile.fallback"),fs=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==us)return!0;if(r.definite===!0&&n===void 0)return!1}return ps(e,t,n)});function ps(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let i;if(o?(r[ds]=!0,i=o({value:t,issues:[]},r)):i=e._zod.run({value:t,issues:[]},r),i instanceof Promise)throw new J1;return i.issues.length===0}const hs=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},Cs=e=>{const t=ln(e),n=(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return t(r,o,c,ut(n,s))};return n},ms=e=>{const t=ln(e),n=(r,o,i,s)=>t(r,o,i,ut(n,s));return n},gs=e=>{const t=un(e),n=async(r,o,i,s)=>{const c=i?{...i,direction:"backward"}:{direction:"backward"};return await t(r,o,c,ut(n,s))};return n},bs=e=>{const t=un(e),n=async(r,o,i,s)=>await t(r,o,i,ut(n,s));return n},ys=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return dn(e)(t,n,o)},xs=e=>(t,n,r)=>dn(e)(t,n,r),vs=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return fn(e)(t,n,o)},ks=e=>async(t,n,r)=>fn(e)(t,n,r),ws=/^[cC][0-9a-z]{6,}$/,_s=/^[0-9a-z]+$/,Ss=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,js=/^[0-9a-vA-V]{20}$/,Ms=/^[A-Za-z0-9]{27}$/,Ns=/^[a-zA-Z0-9_-]{21}$/;function Es(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const $s=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,As=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Zs=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Os="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function zs(){return new RegExp(Os,"u")}const Is=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ts=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ps=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Rs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ls=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ds=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Fs=/^https?$/,Bs=/^\+[1-9]\d{6,14}$/,hr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Us(e){return new RegExp(`^${e}$`)}const Ws=Us(hr);function At(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ks(e){return new RegExp(`^${At(e)}$`)}function Hs(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${At({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${At({precision:e.precision})}`:n;return new RegExp(`^${hr}T(?:${r})$`)}const Vs=/^[\s\S]{0,}$/,Gs=/^-?\d+$/,pn=/^-?\d+(?:\.\d+)?$/,Js=/^(?:true|false)$/i,qs=/^null$/i,Ys=/^undefined$/i,Xs=/^[^A-Z]*$/,Qs=/^[^a-z]*$/,d1=b("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),hn=e=>{const t=e.value;return!$i(t)&&t.length!==void 0},Je={number:"number",bigint:"bigint",object:"date"},Cr=b("$ZodCheckLessThan",(e,t)=>{d1.init(e,t);const n=Je[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Je[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mr=b("$ZodCheckGreaterThan",(e,t)=>{d1.init(e,t);const n=Je[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Je[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ea=b("$ZodCheckMultipleOf",(e,t)=>{d1.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ai(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ta=b("$ZodCheckNumberFormat",(e,t)=>{d1.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=cr[t.format];e._zod.check=s=>{const c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),na=b("$ZodCheckMaxLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>t.maximum?an(o):i)<=t.maximum)return;const c=cn(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ra=b("$ZodCheckMinLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=r=>{const o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?an(o):i)>=t.minimum)return;const c=cn(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oa=b("$ZodCheckLengthEquals",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=r=>{const o=r.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?an(o):i;if(s===t.length)return;const c=cn(o),l=s>t.length;r.issues.push({origin:c,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dt=b("$ZodCheckStringFormat",(e,t)=>{var n,r;d1.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ia=b("$ZodCheckRegex",(e,t)=>{dt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sa=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Xs),dt.init(e,t)}),aa=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Qs),dt.init(e,t)}),ca=b("$ZodCheckIncludes",(e,t)=>{d1.init(e,t);const n=re(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),la=b("$ZodCheckStartsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`^${re(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),ua=b("$ZodCheckEndsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`.*${re(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),da=b("$ZodCheckOverwrite",(e,t)=>{d1.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class fa{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
2
2
|
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
3
3
|
${n.join(`
|
|
4
4
|
`)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as dn,t as n,r as d,j as e,X as es,ae as ts,a as G,f as Ye,o as Xt,b as Bt,az as ws,S as Ns,i as _t}from"./styles-
|
|
1
|
+
import{c as dn,t as n,r as d,j as e,X as es,ae as ts,a as G,f as Ye,o as Xt,b as Bt,az as ws,S as Ns,i as _t}from"./styles-C_rlkDrt.js";import{S as un,n as w,u as et,eq as As,er as Cs,es as Ss,et as ht,D as Rs,eu as Es,ev as zs,l as Is,G as Sn,ew as Ts,ex as Os,cI as Bs,T as Ps,ae as en,bo as Ms,ey as Rt,ez as ns,eA as Et,eB as ss,ak as as,eC as zt,eD as Ls,eE as is,eF as It,eG as os,eH as Us,eI as Rn,eJ as $s,Y as cs,eK as Nt,eL as Fs,eM as Ks,eN as Ds,eO as Qs,eP as Hs,eQ as ct,eR as En,eS as Js,eT as zn,e4 as In,eU as _s,eV as Vs,eW as Gs,eX as Vt,eY as qs,eZ as Zs,e_ as Ws,e$ as Ys,f0 as Xs,f1 as ea,f2 as ta,f3 as na,f4 as sa,f5 as aa,f6 as ia}from"./App-Bcey1qup.js";import{L as ae,P as rs,X as oa,a as ca,y as pn,E as ra,$ as la,B as da}from"./PlacesRail-C_3Mh4C8.js";import{u as Gt}from"./mcp-servers-Bu5RuYBT.js";import{C as ls,R as tn}from"./MenuMotion-VeZ_fZ8M.js";import{u as ua}from"./ProIntroduction-6ByF2_US.js";import"./index-oVds-_Vz.js";import"./monitor-c1mf38zt.js";const pa=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ma=dn("phone-call",pa);const ha=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],xa=dn("radio-tower",ha);const fa=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],qt=dn("server-cog",fa),ga=new Set(["twitter","x"]);function Tn(t,s){return t!=="managed"||!ga.has(s.trim().toLowerCase())?null:"Twitter/X needs your own X Developer app and Composio auth config. Use self-hosted connected apps for now."}const ba=5,ya=3,Tt=4;function ka(t,s=ba,c=[]){const o=new Map;for(const g of t)for(const k of new Set(g.categories??[]))o.set(k,(o.get(k)??0)+1);const r=[...o].sort((g,k)=>k[1]-g[1]||g[0].localeCompare(k[0])).map(([g])=>g),l=c.filter(g=>r.indexOf(g)>=s),y=[...r.slice(0,Math.max(0,s-l.length)),...l];return{inline:y,more:r.filter(g=>!y.includes(g))}}function nn(t,s){return s===null||(t.categories??[]).includes(s)}function ja(t,s,c){const o=[],r=t.filter(l=>s(l.slug));r.length&&o.push({kind:"connected",cards:r});for(const l of c.slice(0,ya)){const y=t.filter(g=>!s(g.slug)&&nn(g,l));y.length&&o.push({kind:"category",category:l,cards:y.slice(0,Tt),more:y.length>Tt})}return o.push({kind:"all",cards:t.filter(l=>!s(l.slug))}),o}const va={productivity:"productivity","developer tools":"developerTools",communication:"communication",files:"files","sales and crm":"salesCrm",design:"design",marketing:"marketing",analytics:"analytics",social:"social"},wa={"google calendar":"googleCalendar","google sheets":"googleSheets","google docs":"googleDocs",notion:"notion",github:"github",linear:"linear",sentry:"sentry",jira:"jira",slack:"slack",gmail:"gmail",discord:"discord","google drive":"googleDrive",posthog:"posthog","x (twitter)":"xTwitter",reddit:"reddit",zapier:"zapier",hubspot:"hubspot",salesforce:"salesforce",asana:"asana",trello:"trello",dropbox:"dropbox",airtable:"airtable",figma:"figma",stripe:"stripe"};function rt(t){const s=va[t.trim().toLowerCase()];return s?n(`apps.category.${s}`):t}function On(t){const s=wa[t.label.trim().toLowerCase()];return s?n(`apps.catalog.${s}.blurb`):t.blurb}function Na({server:t,disabled:s,onSaved:c}){const[o,r]=d.useState(!1),[l,y]=d.useState(null);if(typeof t.apps!="boolean"||t.apps&&t.hasApps!==!0)return null;const g=t.apps,k=async()=>{r(!0),y(null);try{const p=await w(`/api/mcp/servers/${encodeURIComponent(t.name)}`,{method:"PATCH",body:JSON.stringify({apps:!g})});c(p.servers??[])}catch(p){y(p instanceof Error?p.message:String(p))}finally{r(!1)}};return e.jsxs("div",{"data-mcp-apps":t.name,className:"mt-3 flex items-center gap-3 border-t border-hairline/40 pt-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[13px] font-medium text-ink",children:n("mcp.apps.title")}),e.jsx("div",{role:l?"alert":void 0,className:l?"mt-0.5 text-[12px] text-danger":"mt-0.5 text-[12px] text-ink-secondary",children:l??n("mcp.apps.desc")})]}),o&&e.jsx(ae,{"aria-hidden":"true",size:13,className:"animate-spin text-ink-secondary"}),e.jsx(un,{checked:g,disabled:s||o,onClick:()=>{k()},"aria-label":n("mcp.apps.toggleAria",{name:t.name}),className:"disabled:opacity-40"})]})}function Bn({feature:t,enabled:s,prefix:c}){const{dispatch:o}=et(),[r,l]=d.useState(!1),[y,g]=d.useState(!1),k=async()=>{if(!r){l(!0),g(!1);try{const p=await w("/api/config",{method:"PATCH",body:JSON.stringify({features:{[t]:!s}})});o({type:"configStatus",config:p})}catch{g(!0)}finally{l(!1)}}};return e.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 rounded-2xl border border-hairline/50 bg-card px-4 py-4 sm:px-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-medium text-ink",children:n(`${c}.title`)}),e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-ink-secondary",children:n(`${c}.desc`)}),y&&e.jsx("p",{role:"alert",className:"mt-1 text-[12px] text-danger",children:n("mcp.claude.error")})]}),e.jsx(un,{checked:s,"aria-label":n(`${c}.aria`),disabled:r,onClick:()=>{k()},className:"mt-0.5 shrink-0 disabled:cursor-wait disabled:opacity-50"})]})}function Aa(){const{state:t}=et();return e.jsxs(e.Fragment,{children:[e.jsx(Bn,{feature:"claudeUserMcp",enabled:As(t.config),prefix:"mcp.claude"}),e.jsx(Bn,{feature:"claudeUserSkills",enabled:Cs(t.config),prefix:"mcp.claudeSkills"})]})}function Pn({app:t}){if("image"in t.icon)return e.jsx("img",{src:t.icon.image,alt:"",className:"size-10 shrink-0 rounded-xl object-contain"});const s=t.icon.glyph;return e.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-raised text-ink-secondary",children:e.jsx(s,{size:19,"aria-hidden":"true"})})}class me extends Error{key;constructor(s){super(s),this.key=s}}const sn=/^https?:\/\//i,ds=/^[A-Za-z_][A-Za-z0-9_]*=/,Ca=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+:/,Sa=new Set(["npx","uvx","bunx"]),Ra=new Set(["pnpm","yarn"]);function Ea(t,s=[]){const c=za(t).trim();if(!c)return null;try{const o=/^[{[]/.test(c)?La(c):sn.test(c)&&!/\s/.test(c)?[mn(void 0,c,void 0,[])]:Ia(c);return{ok:!0,servers:Da(o,s)}}catch(o){if(o instanceof me)return{ok:!1,error:o.key};throw o}}function za(t){return t.replace(/[“”„]/g,'"').replace(/[‘’]/g,"'").replace(/(^|\s)[–—](?=[a-z])/g,"$1--")}function us(t){const s=[];let c=[],o="",r=!1;const l=()=>{r&&c.push(o),o="",r=!1},y=()=>{l(),c.length&&s.push(c),c=[]},g=k=>t[k]===`
|
|
2
2
|
`?1:t[k]==="\r"&&t[k+1]===`
|
|
3
3
|
`?2:0;for(let k=0;k<t.length;k+=1){const p=t[k];if(p==="\\"||(p==="`"||p==="^")&&g(k+1)){const h=g(k+1);if(h){k+=h;continue}k+1<t.length&&(o+=t[k+1],r=!0,k+=1);continue}if(p==="'"){const h=t.indexOf("'",k+1);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k+1,h),r=!0,k=h;continue}if(p==='"'){let h=k+1;for(;h<t.length&&t[h]!=='"';h+=1){if(t[h]==="\\"&&h+1<t.length){const A=g(h+1);if(A){h+=A;continue}if('"\\$`'.includes(t[h+1])){o+=t[h+1],h+=1;continue}}o+=t[h]}if(h>=t.length)throw new me("mcp.paste.notRecognized");r=!0,k=h;continue}if(p==="$"&&t[k+1]==="("){const h=t.indexOf(")",k+2);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k,h+1),r=!0,k=h;continue}if(p==="#"&&!r){for(;k+1<t.length&&t[k+1]!==`
|
|
4
4
|
`;)k+=1;continue}if(p===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c}from"./styles-
|
|
1
|
+
import{r as c}from"./styles-C_rlkDrt.js";import{u as i}from"./App-Bcey1qup.js";import"./PlacesRail-C_3Mh4C8.js";function l(n,o){const t=n&&!window.ogb?.remoteClient?.active?window.ogb?.cloudAccount:void 0,[u,e]=c.useState(null),f=t?.offer?JSON.stringify(o??null):null;return c.useEffect(()=>{if(f===null||!t?.offer)return;let r=!0;return t.offer().then(a=>{r&&e(a)},()=>{}),()=>{r=!1}},[t,f]),t?.offer?u:null}function s(){const n=window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[o,t]=c.useState(null);return c.useEffect(()=>{if(!n)return;let u=!0,e=!1;const f=n.onState(r=>{e=!0,u&&t(r)});return n.state().then(r=>{u&&!e&&t(r)}).catch(()=>{}),()=>{u=!1,f()}},[n]),null}function b(){const{dispatch:n}=i(),o=s();return l(o!==null,o?.account?.offer),null}function w({place:n,usage:o=null,upgrade:t}){const{dispatch:u}=i(),e=s();return l(e!==null,e?.account?.offer),null}function v(){const n=s();return l(n!==null,n?.account?.offer),null}export{w as C,b as P,l as a,v as b,s as u};
|
package/dist/assets/{RemoteAgentSettingsPanel-OVWheJHu.js → RemoteAgentSettingsPanel-D4X4rHMQ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-
|
|
1
|
+
import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-C_rlkDrt.js";import{u as A,I as z,T,B as p,V as L,k as P,S as B,m as E,n as I}from"./App-Bcey1qup.js";import{u as R,B as F,L as U,b as V}from"./PlacesRail-C_3Mh4C8.js";import"./index-oVds-_Vz.js";import"./monitor-c1mf38zt.js";import"./MenuMotion-VeZ_fZ8M.js";function M({bot:t,overlay:b=!1}){const{dispatch:f}=A(),{dragProps:k}=R(),[x,g]=r.useState(!1),[h,l]=r.useState(""),[v,j]=r.useState(!1),d=r.useRef(null),o=r.useRef(null),c=r.useRef(null),y=()=>f({type:"toggleSettings",open:!1}),i=a=>{if(o.current={...o.current,...a},c.current)return c.current;g(!0),l("");const s=async()=>{for(;o.current;){const u=o.current;o.current=null,l("");try{const m=await I(`/api/bots/${t.id}/profile`,{method:"PATCH",body:JSON.stringify(u)});f({type:"botPatched",bot:m.bot})}catch(m){l(m instanceof Error?m.message:n("remoteAgent.updateFailed"))}}};return c.current=s().finally(()=>{c.current=null,g(!1)}),c.current},N=async a=>{if(a){j(!0),l("");try{const s=await E(a),u=s?V(s.path):null;if(!u)throw new Error(n("settings.profile.avatar.invalidType"));await i({avatarUrl:u,avatarCrop:t.avatarCrop==="square"?"square":"circle"})}catch(s){l(s instanceof Error?s.message:String(s))}finally{j(!1),d.current&&(d.current.value="")}}};return e.jsxs("aside",{className:S("animate-panel-in absolute inset-0 z-40 flex h-full min-w-0 flex-col border-l border-hairline/40 bg-panel",b?"md:left-auto md:w-[400px] md:shadow-2xl":"md:relative md:z-20 md:w-[400px] md:shrink-0"),children:[e.jsxs("div",{...k,className:"flex items-center justify-between px-4 py-3",children:[e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.collapse"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(w,{size:18})}),e.jsx("span",{className:"text-[15px] font-semibold text-ink",children:n("remoteAgent.title")}),e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.close"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(C,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 pb-5",children:e.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[e.jsxs("div",{className:"rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx(F,{bot:t,state:"idle",size:64,motion:"none",motionKey:0,animated:!1}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",className:"sr-only",onChange:a=>{N(a.target.files?.[0])}}),e.jsxs("button",{type:"button",disabled:v||x,onClick:()=>d.current?.click(),className:"flex items-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50",children:[v?e.jsx(U,{size:14,className:"animate-spin"}):e.jsx(z,{size:14})," ",n("botIdentity.avatar")]}),t.avatarUrl&&e.jsx("button",{type:"button",disabled:x,onClick:()=>{i({avatarUrl:null,avatarCrop:"mascot"})},"aria-label":n("remoteAgent.removeAvatar"),className:"flex size-9 items-center justify-center rounded-lg text-ink-secondary hover:bg-control hover:text-danger",children:e.jsx(T,{size:14})})]})]}),e.jsxs("label",{className:"block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.name"),e.jsx("input",{defaultValue:t.name,maxLength:p.name,onBlur:a=>{const s=a.currentTarget.value.trim();s&&s!==t.name&&i({name:s})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.title"),e.jsx("input",{defaultValue:t.title??"",maxLength:p.title,onBlur:a=>{a.currentTarget.value!==(t.title??"")&&i({title:a.currentTarget.value})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("remoteAgent.description"),e.jsx("textarea",{defaultValue:t.description??"",maxLength:p.description,rows:4,onBlur:a=>{a.currentTarget.value!==(t.description??"")&&i({description:a.currentTarget.value})},className:"mt-1 w-full resize-y rounded-lg bg-inset px-3 py-2 text-[13px] leading-relaxed text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]})]}),e.jsx(L,{bot:t,workspaceConfigurationLocked:!0,onPatch:a=>{i(a)}}),e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx(P,{size:16,className:"mt-0.5 shrink-0 text-ink-secondary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-medium text-ink",children:n("notifications.title")}),e.jsx("div",{className:"mt-0.5 text-[12px] leading-relaxed text-ink-secondary",children:n("remoteAgent.notificationsHint")})]})]}),e.jsx(B,{checked:t.notifications,disabled:x,"aria-label":n("remoteAgent.notifications"),onClick:()=>{i({notifications:!t.notifications})}})]}),h?e.jsx("div",{role:"alert",className:"text-[12px] text-danger",children:h}):null]})})]})}export{M as RemoteAgentSettingsPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,a as z,t,B as F,r as d,S as L,X as B}from"./styles-
|
|
1
|
+
import{j as e,a as z,t,B as F,r as d,S as L,X as B}from"./styles-C_rlkDrt.js";import{E as O,C as $,T as G,B as E,j as K,u as q,r as H}from"./PlacesRail-C_3Mh4C8.js";import{ak as U,u as g,al as A,am as W,an as _,ao as J,ap as Q,aq as V,ar as X,as as Y,at as M,au as Z,av as ee,aw as ae,M as te,ax as se,ay as ne,az as oe,aA as re,aB as le,aC as ie,aD as ce,aE as P,aF as R,aG as de,aH as ue,aI as pe,aJ as S,aK as k,aL as me,d as fe,aM as xe,aN as he,aO as be,aP as je,aQ as ye,aR as ke,aS as ge,aT as C,aU as we,a9 as ve,aV as Re}from"./App-Bcey1qup.js";import{C as Se}from"./MenuMotion-VeZ_fZ8M.js";import"./monitor-c1mf38zt.js";import"./index-oVds-_Vz.js";function N(a){return a===60?t("room.panel.hour"):a%60===0?t("room.panel.hours",{hours:a/60}):t("room.panel.minutes",{minutes:a})}function Ce(a){const{dispatch:n}=g(),l=F(),u=A(a.threadId),o=W(a),[p,r]=d.useState(null),f=a.messages,h=f.length>0,s=()=>oe({title:a.name,messages:f,isGroup:!0}),x=l?[]:_(a.tasks??[]),m=J(a.usage);return{items:[{key:"find",label:t("chat.find"),icon:e.jsx(L,{size:16}),active:u,trailing:e.jsx(V,{id:"find-conversation"}),onSelect:()=>Q(a.threadId)},...l?[]:[{key:"new-thread",heading:t("task.list"),separatorBefore:!0,label:t("task.newShort"),icon:e.jsx(X,{size:16}),onSelect:()=>n({type:"newGroupTask",groupId:a.id})}],...x.length<2?[]:[{key:"threads",label:t("task.switch"),icon:e.jsx(M,{size:16}),value:String(x.length),submenu:x.map(i=>({key:`thread:${i.threadId}`,label:Y(i.title||t("task.newShort")),active:i.threadId===a.threadId,onSelect:()=>n({type:"switchGroupTask",groupId:a.id,threadId:i.threadId})})),onSelect:()=>{}}],{key:"copy",heading:t("chat.export.heading"),separatorBefore:!0,label:t("chat.export.copy"),icon:e.jsx($,{size:16}),disabled:!h,keepOpen:!0,trailing:p&&e.jsx("span",{role:"status",className:"text-[11px] text-ink-secondary",children:t(p==="copied"?"chat.export.copied":"chat.export.copyFailed")}),onSelect:()=>{Z(s()).then(i=>r(i?"copied":"failed"))}},{key:"download",label:t("chat.export.download"),icon:e.jsx(te,{size:16}),disabled:!h,onSelect:()=>ee(ae(a.name),s())},{key:"turn-limit",label:t("room.panel.turnLimit"),icon:e.jsx(G,{size:16}),separatorBefore:!0,value:N(o.saved??o.globalMinutes),submenu:[{key:"turn-limit:default",label:t("room.turnLimit.default",{minutes:o.globalMinutes}),active:o.saved===null,onSelect:()=>o.save(null)},...se.map(i=>({key:`turn-limit:${i}`,label:N(i),active:o.saved===i,onSelect:()=>o.save(i)}))],onSelect:()=>{}},...m?[{key:"usage",label:t("chat.usage.menu"),icon:e.jsx(ne,{size:16}),keepOpen:!0,trailing:e.jsx("span",{title:m.title,"data-testid":"group-usage-chip",className:"tabular-nums text-[12px] text-ink-secondary",children:m.short}),onSelect:()=>{}}]:[]],on:u}}function Ne({group:a}){const{items:n,on:l}=Ce(a);return e.jsx(U,{items:n,ariaLabel:t("chat.more"),triggerClassName:"rounded-full",triggerTitle:t("chat.more"),renderTrigger:({open:u})=>e.jsx("span",{"data-testid":"room-more",className:z("flex size-8 items-center justify-center rounded-full bg-raised/50 transition-colors hover:bg-raised","max-md:size-9 max-md:border max-md:border-hairline max-md:bg-card",u||l?"text-accent":"text-ink"),children:e.jsx(O,{size:16})})})}function Te({group:a}){return e.jsx(Ne,{group:a},a.threadId)}function ze({group:a,members:n}){const{state:l,dispatch:u}=g(),o=re(l.config),p=le(a,n),r=ie(p),f=s=>{s!==r&&u({type:"patchGroup",groupId:a.id,patch:{defaultResponder:de(s,p)}})},h=[{choice:"auto",title:t("room.panel.responder.autoOption"),hint:o?void 0:t("room.responder.autoOff",{name:ce(a,n)??t("room.responder.leadFallback")})},{choice:"everyone",title:t("room.panel.responder.everyone")},{choice:"mentions",title:t("room.panel.responder.mentions")}];return e.jsx("div",{role:"radiogroup","aria-label":t("room.panel.whoResponds"),children:e.jsxs(P,{children:[n.map(s=>e.jsx(R,{"data-panel-choice":`member:${s.id}`,title:e.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(E,{bot:s,state:K(s.mascotExpression)??"happy",size:22,animated:!1}),e.jsx("span",{className:"truncate",children:s.name})]}),checked:r===`member:${s.id}`,onClick:()=>f(`member:${s.id}`)},s.id)),h.map(({choice:s,title:x,hint:m})=>e.jsx(R,{"data-panel-choice":s,title:x,hint:m,checked:r===s,onClick:()=>f(s)},s))]})})}const T={responder:{title:"room.panel.whoResponds",intro:"room.panel.responder.intro"},folder:{title:"room.folder.title",intro:"room.folder.detail"}};function Ee({group:a,members:n}){return e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{"data-room-panel-faces":!0,className:"mt-0.5 flex -space-x-3",children:n.slice(0,3).map(l=>e.jsx(E,{bot:l,state:"happy",size:52,animated:!1},l.id))}),e.jsx("h2",{id:"room-panel-title",className:"mt-2.5 max-w-full truncate px-1.5 text-[18px] font-semibold text-ink",children:a.name}),a.description&&e.jsx("p",{className:"mt-px line-clamp-2 max-w-full text-[13px] text-ink-secondary",children:a.description})]})}function Me({group:a}){const n=ke(a),l=d.useRef(null),u=d.useRef(!1);d.useEffect(()=>{n.open||!u.current||(u.current=!1,l.current?.focus())},[n.open]);const o=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation()),(r.key==="Escape"||r.key==="Enter"&&(r.metaKey||r.ctrlKey))&&(u.current=!0),n.onKeyDown(r)};if(n.open)return e.jsxs(ge,{"data-panel-row":"instructions",children:[e.jsx(C,{title:t("room.panel.instructions")}),e.jsx("textarea",{autoFocus:!0,dir:"auto","aria-label":t("room.panel.instructions"),value:n.draft,onChange:r=>n.setDraft(r.target.value),onBlur:n.save,onKeyDown:o,placeholder:t("room.bulletin.placeholder"),rows:6,className:"w-full resize-y rounded-lg border border-hairline bg-inset px-2.5 py-2 text-[13px] leading-relaxed text-ink outline-none placeholder:text-ink-tertiary focus:border-accent-border"}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button","data-panel-done":"instructions",onMouseDown:r=>r.preventDefault(),onClick:()=>{u.current=!0,n.save()},className:we,children:t("botSettings.simple.done")})})]});const p=a.bulletin.split(`
|
|
2
2
|
`)[0]?.trim();return e.jsxs("button",{ref:l,type:"button","data-panel-edit":"instructions","aria-label":`${t("botSettings.simple.edit")}: ${t("room.panel.instructions")}`,onClick:n.start,className:z(Re,"w-full text-left hover:bg-ink/[0.03]"),children:[e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-ink/[0.05] text-ink-secondary max-md:size-8 max-md:rounded-full","aria-hidden":"true",children:e.jsx(ve,{size:15})}),e.jsx(C,{title:t("room.panel.instructions"),hint:e.jsx("span",{dir:"auto",className:"line-clamp-1",children:p||t("room.panel.instructionsHint")})}),e.jsx(Se,{size:15,className:"shrink-0 text-ink-tertiary","aria-hidden":"true"})]})}function Oe({group:a,overlay:n=!1}){const{state:l}=g(),{dragProps:u}=q(),[o,p]=d.useState(null),[r,f]=d.useState(!1),h=d.useRef(null),s=d.useRef(null),x=d.useRef(null),m=d.useRef(null),b=d.useMemo(()=>a.memberIds.map(c=>l.bots.find(y=>y.id===c)).filter(c=>!!c),[a.memberIds,l.bots]),i=ue(a),I=d.useCallback(()=>f(!1),[]),w=c=>{p(c),s.current?.scrollTo({top:0})},v=()=>{m.current=o,p(null)};d.useEffect(()=>{o!==null?s.current?.querySelector("[data-panel-back]")?.focus():m.current&&(s.current?.querySelector(`[data-panel-page="${m.current}"]`)?.focus(),m.current=null)},[o]),d.useEffect(()=>{const c=h.current;c?.focus();const y=j=>{j.key!=="Escape"||j.defaultPrevented||c&&j.target instanceof Node&&!c.contains(j.target)||(j.preventDefault(),S({refocus:!0}))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const D=c=>{c.key!=="Escape"||c.defaultPrevented||o===null||(c.preventDefault(),c.stopPropagation(),v())};return e.jsxs(e.Fragment,{children:[e.jsxs("aside",{ref:h,role:"dialog","aria-labelledby":"room-panel-title",tabIndex:-1,"data-room-panel":!0,onKeyDown:D,className:je(n,!0),children:[e.jsxs("div",{...u,className:"flex h-[52px] shrink-0 items-center justify-end gap-2 px-3.5",children:[e.jsx(Te,{group:a}),e.jsx("button",{type:"button",onClick:()=>S({refocus:!0}),"aria-label":t("botSettings.simple.close"),className:pe,children:e.jsx(B,{size:16,className:"pointer-events-none"})})]}),e.jsx("div",{ref:s,className:"@container relative min-h-0 flex-1 overflow-y-auto px-5 pb-7",children:o===null?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{group:a,members:b}),e.jsxs(P,{children:[e.jsx(k,{"data-panel-page":"responder",icon:M,title:t("room.panel.whoResponds"),value:me(a,b),onClick:()=>w("responder")}),e.jsx(k,{"data-panel-page":"folder",icon:fe,title:t("room.folder.title"),value:i?.name??t("room.panel.folder.own"),tooltip:i?.path,onClick:()=>w("folder")}),e.jsx(Me,{group:a}),e.jsx(k,{ref:x,"data-panel-row":"members",icon:xe,title:t("room.panel.members"),value:String(b.length),onClick:()=>f(!0)})]})]}):e.jsxs("div",{"data-panel-page-view":o,children:[e.jsx("span",{id:"room-panel-title",className:"sr-only",children:a.name}),e.jsx(he,{back:a.name,title:t(T[o].title),intro:t(T[o].intro),onBack:v}),e.jsx("div",{className:"mt-4 flex flex-col gap-3",children:o==="responder"?e.jsx(ze,{group:a,members:b}):e.jsx(be,{group:a,heading:!1})})]})})]}),r&&H.createPortal(e.jsx(ye,{group:a,onClose:I,triggerRef:x}),document.body)]})}export{Oe as RoomPanel};
|