@antseed/gateway-console 0.1.9 → 0.1.10
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/Activity-jZYZ0SDm.js +1 -0
- package/dist/assets/{Audit-tBcMBtG2.js → Audit-C-dFTX_u.js} +1 -1
- package/dist/assets/{ChainGate-bxLjo_3b.js → ChainGate-In51TI2h.js} +1 -1
- package/dist/assets/{ChannelClose-C0Y19KzJ.js → ChannelClose-D8CcISX0.js} +1 -1
- package/dist/assets/{Charts-CHTi7z3n.js → Charts-doK0mDVf.js} +1 -1
- package/dist/assets/{Chat-C1AfYZwW.js → Chat-CaImcsH1.js} +34 -34
- package/dist/assets/{ConnectWallet-fHEv854J.js → ConnectWallet-DQ0PC6SO.js} +1 -1
- package/dist/assets/{DataTable-CCEZoIzX.js → DataTable-BTwj5g1m.js} +1 -1
- package/dist/assets/{KeyHolder-DSLJe1Wc.js → KeyHolder-D90Uu-Jv.js} +1 -1
- package/dist/assets/Keys-B5LppZtn.js +1 -0
- package/dist/assets/Logs-Dw4sZ9lo.js +1 -0
- package/dist/assets/Members-CnaHKFut.js +1 -0
- package/dist/assets/{Migrate-TGloMMad.js → Migrate-BQYY5ty3.js} +1 -1
- package/dist/assets/Models-zIuHewdV.js +1 -0
- package/dist/assets/{OperatorActions-DPQvd1zg.js → OperatorActions-DrRpfDBV.js} +1 -1
- package/dist/assets/{OperatorGateAlert-CEK2vyQ9.js → OperatorGateAlert-D92zhyXC.js} +1 -1
- package/dist/assets/{Overview-CPoqW_Mi.js → Overview-CJmp6b7M.js} +1 -1
- package/dist/assets/{PeerPicker-w_ZaksUm.js → PeerPicker-BJfjL7Dy.js} +1 -1
- package/dist/assets/PolicyEditor-BpoV34ra.js +1 -0
- package/dist/assets/{PolicyField-BbDSVgcK.js → PolicyField-CfRYcr_J.js} +1 -1
- package/dist/assets/Presets-c1J4UwX0.js +4 -0
- package/dist/assets/Providers-B0LuYcAw.js +1 -0
- package/dist/assets/RequestLog-D2YGgG1C.js +1 -0
- package/dist/assets/{Rewards-D9omoUfP.js → Rewards-DNNxx3NO.js} +2 -2
- package/dist/assets/{RewardsClaim-CWJBaJEv.js → RewardsClaim-nstcyJvi.js} +1 -1
- package/dist/assets/Routing-B79eDIZL.js +1 -0
- package/dist/assets/{Segmented-D_Yun-tG.js → Segmented-BelxPFkk.js} +1 -1
- package/dist/assets/{SelectField-D3qPiNQz.js → SelectField-BWyF8Ku8.js} +1 -1
- package/dist/assets/{Settings-Bo654hg3.js → Settings-Cws5Z--R.js} +2 -2
- package/dist/assets/{Staking-HKOLSr5r.js → Staking-DHwoflHG.js} +1 -1
- package/dist/assets/{StakingDashboard-BHU6EJ_h.js → StakingDashboard-DtOKTmys.js} +1 -1
- package/dist/assets/Switch-BwBYBnSS.js +1 -0
- package/dist/assets/{Tabs-DmkE9BPd.js → Tabs-yVL4Cd6z.js} +1 -1
- package/dist/assets/{TextAreaField-RZPCzhKZ.js → TextAreaField-B6jcl4RR.js} +1 -1
- package/dist/assets/{UsageByModel-nhGKdBi8.js → UsageByModel-DhTF-c1H.js} +1 -1
- package/dist/assets/{Wallet-jy4q5mLQ.js → Wallet-QXhhg_E-.js} +3 -3
- package/dist/assets/{WalletConfirm-dV_LWLAS.js → WalletConfirm-CgWBuaMN.js} +1 -1
- package/dist/assets/{WalletFunding-B3t7wm--.js → WalletFunding-Ydd9gD2t.js} +1 -1
- package/dist/assets/{WalletSignIn-BTt56Pbi.js → WalletSignIn-DvVSFW4u.js} +1 -1
- package/dist/assets/Workspaces-DuxGwCQ2.js +1 -0
- package/dist/assets/{add-BWOpvuwn.js → add-ChFb9YAz.js} +1 -1
- package/dist/assets/{all-wallets-Dzo5pBZj.js → all-wallets-rdNweGUd.js} +1 -1
- package/dist/assets/{app-store-D7NT8p3m.js → app-store-s294A1qn.js} +1 -1
- package/dist/assets/{apple-DZKBu-O0.js → apple-Cs8Kx1eO.js} +1 -1
- package/dist/assets/{arrow-bottom-CL8pk1cz.js → arrow-bottom-BMmCEQIa.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-CfYYPCEB.js → arrow-bottom-circle-CThmnDp3.js} +1 -1
- package/dist/assets/{arrow-left-DVKw3BfQ.js → arrow-left-BJxgCTi0.js} +1 -1
- package/dist/assets/{arrow-right-LIBetaMw.js → arrow-right-CnLYkBsH.js} +1 -1
- package/dist/assets/{arrow-top-Bdq-JU1Z.js → arrow-top-Dc0DLP-U.js} +1 -1
- package/dist/assets/{bank-BYRxGjPq.js → bank-CSWOYeMW.js} +1 -1
- package/dist/assets/{basic-CZ6XfWue.js → basic-BHdv4O5I.js} +1 -1
- package/dist/assets/{browser-4mXAG82s.js → browser-mp33aPgo.js} +1 -1
- package/dist/assets/{bundle-full-BIYMHvS6.js → bundle-full-CDQ5iC5h.js} +1 -1
- package/dist/assets/{card-CHQPd736.js → card-BcVuRQiM.js} +1 -1
- package/dist/assets/{ccip-CDMxOoDo.js → ccip-O1XLvWon.js} +1 -1
- package/dist/assets/{checkmark-8o_U76Ey.js → checkmark-CQVJIWW1.js} +1 -1
- package/dist/assets/{checkmark-bold-DLi4Gcn_.js → checkmark-bold-DDU5XQfq.js} +1 -1
- package/dist/assets/{chevron-bottom-DmX6fEDV.js → chevron-bottom-Bqi9FW2q.js} +1 -1
- package/dist/assets/{chevron-left-AyKJMTQa.js → chevron-left-Vd5st0yB.js} +1 -1
- package/dist/assets/{chevron-right-DQ8e2bPT.js → chevron-right-BVwFrlss.js} +1 -1
- package/dist/assets/{chevron-top-B5o-6za5.js → chevron-top-D5dQ2xFn.js} +1 -1
- package/dist/assets/{chrome-store-BSncx9O2.js → chrome-store-C9C4k8IO.js} +1 -1
- package/dist/assets/{clock-DBlIwqMs.js → clock-Cuvc7bNo.js} +1 -1
- package/dist/assets/{close-CGfPRgam.js → close-fW1pJ13b.js} +1 -1
- package/dist/assets/{code-block-B9znTLtr.js → code-block-Djv3iQ0G.js} +2 -2
- package/dist/assets/{coinPlaceholder-BUSXHM7f.js → coinPlaceholder-CKymvNA8.js} +1 -1
- package/dist/assets/{compass-WMx9aHQn.js → compass-D3h_6fr8.js} +1 -1
- package/dist/assets/{copy-4QWyzVbB.js → copy-CNGN_cOz.js} +1 -1
- package/dist/assets/{core-4C0uPyns.js → core-LDeQm5nv.js} +3 -3
- package/dist/assets/cursor-CTNYpsWo.js +3 -0
- package/dist/assets/{cursor-transparent-BaithBa8.js → cursor-transparent-BblOfv3t.js} +1 -1
- package/dist/assets/{desktop-pj3LdQx_.js → desktop-gpVOlZ1-.js} +1 -1
- package/dist/assets/{disconnect-cmEUajMk.js → disconnect-C_phPN0_.js} +1 -1
- package/dist/assets/{discord-BYVJX-t1.js → discord-Dk_2Plhc.js} +1 -1
- package/dist/assets/{en_US-Y4ZOVFV4-BZ-715IV.js → en_US-Y4ZOVFV4-CmhP8GU2.js} +4 -4
- package/dist/assets/{etherscan-BdQaeBLV.js → etherscan-Cyrh-2Lr.js} +1 -1
- package/dist/assets/{exclamation-triangle-B5R8OH8o.js → exclamation-triangle-SeeDwZ6A.js} +1 -1
- package/dist/assets/{extension-DrkCTDz1.js → extension-e_11O0GI.js} +1 -1
- package/dist/assets/{external-link-CZIsXhQB.js → external-link-Dl0AqCn3.js} +1 -1
- package/dist/assets/{facebook-B8mGiKom.js → facebook-Cp_-Axbh.js} +1 -1
- package/dist/assets/{farcaster-BlEPprye.js → farcaster-Zwu26KYL.js} +1 -1
- package/dist/assets/{filters-QpslZY8t.js → filters-CdkpWvgi.js} +1 -1
- package/dist/assets/{github-3U8av1u0.js → github-DuPUePDJ.js} +1 -1
- package/dist/assets/{google-DuIQFQyG.js → google-DlKW7Gx7.js} +1 -1
- package/dist/assets/{help-circle-BKX8azWY.js → help-circle-19xLhjPt.js} +1 -1
- package/dist/assets/highlighted-body-KQOG7T2V-D7DB9nBd.js +1 -0
- package/dist/assets/{id-DoN-p9_h.js → id-B4PjxpL6.js} +1 -1
- package/dist/assets/{image-DnOVeCbR.js → image-CHz8w95r.js} +1 -1
- package/dist/assets/{index-A9482YJO.js → index-BYZ6CM-r.js} +1 -1
- package/dist/assets/{index-BPmBiG1M.js → index-CAflmCbT.js} +3 -3
- package/dist/assets/{index-DeVTk1EB.js → index-CZbdRW9K.js} +1 -1
- package/dist/assets/index-CfhMI0GY.css +1 -0
- package/dist/assets/{index-B25V3jQV.js → index-CgyFWy7G.js} +1 -1
- package/dist/assets/index-DIcymBxc.js +91 -0
- package/dist/assets/{index.es-C1jtws71.js → index.es-0kjt2ETS.js} +3 -3
- package/dist/assets/{info-CdmGz8ET.js → info-CFnwPck_.js} +1 -1
- package/dist/assets/{info-circle-C6CmWEn4.js → info-circle-DNYjRzmq.js} +1 -1
- package/dist/assets/{lightbulb-BAyNXoa1.js → lightbulb-DPrYcwVp.js} +1 -1
- package/dist/assets/{limits-DjiKmaDB.js → limits-D8_oE0N-.js} +1 -1
- package/dist/assets/{mail-CiF1vNhi.js → mail-Do_T12XQ.js} +1 -1
- package/dist/assets/{mermaid-MCJ5UELQ-nKICVXNz.js → mermaid-MCJ5UELQ-Cr83KTfF.js} +3 -3
- package/dist/assets/{metamask-sdk-DkF2jP-o.js → metamask-sdk-CHSvqgLD.js} +1 -1
- package/dist/assets/{mobile-C1sek6EE.js → mobile-2wdwD-gm.js} +1 -1
- package/dist/assets/models-CLos5_p0.js +1 -0
- package/dist/assets/{more-Dg3gTue9.js → more-CugjlKbm.js} +1 -1
- package/dist/assets/{network-placeholder-DjgO487Z.js → network-placeholder-D0CvRN9Z.js} +1 -1
- package/dist/assets/{nftPlaceholder-CJQkl27U.js → nftPlaceholder-CjCtJ3VF.js} +1 -1
- package/dist/assets/{off-CH17X0ZN.js → off-CjwzxGqC.js} +1 -1
- package/dist/assets/{play-store-CQuK3mcO.js → play-store-ts_mM-L7.js} +1 -1
- package/dist/assets/{plus-pEvbyOXN.js → plus-CayVcA5r.js} +1 -1
- package/dist/assets/{qr-code-Cl8u00kF.js → qr-code-BJFXX7Ga.js} +1 -1
- package/dist/assets/{recycle-horizontal-C2j4VihN.js → recycle-horizontal-Dxd_xbuW.js} +1 -1
- package/dist/assets/{refresh-DiGzIXYL.js → refresh-2tSMiCzO.js} +1 -1
- package/dist/assets/{reown-logo-lnPAI4aT.js → reown-logo-C3tg9yiK.js} +1 -1
- package/dist/assets/{search-yadtJ599.js → search-By38_AjN.js} +1 -1
- package/dist/assets/{send-C3NLDzpo.js → send-DhLEHc2T.js} +1 -1
- package/dist/assets/{sendTransaction-qrdT91Tm.js → sendTransaction-CqpP3CZj.js} +1 -1
- package/dist/assets/stored-CFfx95Ep.js +1 -0
- package/dist/assets/{swapHorizontal-C3NCkGQo.js → swapHorizontal-BSy_Qzqy.js} +1 -1
- package/dist/assets/{swapHorizontalBold-BZwhavke.js → swapHorizontalBold-B4pOkOa-.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-Cmnd2nih.js → swapHorizontalMedium-BbDDLHs6.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-gSkn4e0W.js → swapHorizontalRoundedBold-MzTdSarg.js} +1 -1
- package/dist/assets/{swapVertical-B3cp9dIz.js → swapVertical-D0uKM7wm.js} +1 -1
- package/dist/assets/{telegram-CCcfHXb2.js → telegram-Q_WwsPzx.js} +1 -1
- package/dist/assets/{three-dots-Dn7VO-lq.js → three-dots-Cpl_X23E.js} +1 -1
- package/dist/assets/{twitch-C46oL1KF.js → twitch-B7x-eAo9.js} +1 -1
- package/dist/assets/{twitterIcon-CAkiEmDS.js → twitterIcon-BRMMjDzW.js} +1 -1
- package/dist/assets/usage-DktoZRc8.js +1 -0
- package/dist/assets/{useInfiniteQuery-Dwl-oWNd.js → useInfiniteQuery-NenQ5Num.js} +1 -1
- package/dist/assets/{useTx-CT2tKEAI.js → useTx-WkiDSW_A.js} +1 -1
- package/dist/assets/{verify-jbEYtj7t.js → verify-BxTMhyZY.js} +1 -1
- package/dist/assets/{verify-filled-CtFkkLAN.js → verify-filled-CaKhO-hp.js} +1 -1
- package/dist/assets/{w3m-modal-Drzo9R1s.js → w3m-modal-DZ2_0Ukm.js} +1 -1
- package/dist/assets/{waitForCallsStatus-CU9lZ8Vj.js → waitForCallsStatus-CtriTPoz.js} +1 -1
- package/dist/assets/{wallet-B11Hl0Lf.js → wallet-BeZF3I-Z.js} +1 -1
- package/dist/assets/{wallet-placeholder-DwLspbFR.js → wallet-placeholder-BDvuTJ6r.js} +1 -1
- package/dist/assets/{walletconnect-3aC0SnNJ.js → walletconnect-U8tnyg6m.js} +1 -1
- package/dist/assets/{warning-circle-DuqXAhpW.js → warning-circle-Dg69jmuZ.js} +1 -1
- package/dist/assets/{writeContract-m5SoBxcM.js → writeContract-DrAWt0yz.js} +1 -1
- package/dist/assets/{x-DTeu3B0J.js → x-CJ-uWPue.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/Activity-DrhhsiYE.js +0 -1
- package/dist/assets/Disclosure-BitAjv2r.js +0 -1
- package/dist/assets/Keys-C22oAYzQ.js +0 -1
- package/dist/assets/Logs-DHuR0CKc.js +0 -1
- package/dist/assets/Members-ZyqdMsMd.js +0 -1
- package/dist/assets/Models-CM4ay6RE.js +0 -1
- package/dist/assets/PolicyEditor-BOjadRE8.js +0 -1
- package/dist/assets/Presets-9x2m9R-f.js +0 -4
- package/dist/assets/Providers-CqYXx8xK.js +0 -1
- package/dist/assets/RequestLog-39L0RtJc.js +0 -1
- package/dist/assets/Routing-4gxa6VdE.js +0 -1
- package/dist/assets/Switch-BmFsXcr8.js +0 -1
- package/dist/assets/Workspaces-mfw5erSQ.js +0 -1
- package/dist/assets/cursor-C_vrGLpb.js +0 -3
- package/dist/assets/highlighted-body-KQOG7T2V-9-ocLujg.js +0 -1
- package/dist/assets/index-BpFwvYMF.js +0 -91
- package/dist/assets/index-C9evdHF9.css +0 -1
- package/dist/assets/models-CJU4tPJk.js +0 -1
- package/dist/assets/usage-yuqGLybi.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n,B as i}from"./index-
|
|
1
|
+
import{j as n,B as i}from"./index-DIcymBxc.js";import{C as c}from"./en_US-Y4ZOVFV4-CmhP8GU2.js";function u({label:e="Connect wallet",fullWidth:s=!0,size:r,variant:t}){return n.jsx(c.Custom,{children:({openConnectModal:a,mounted:l})=>n.jsx(i,{fullWidth:s,size:r,variant:t,disabled:!l,onClick:a,children:e})})}function h(){return n.jsx(c.Custom,{children:({account:e,chain:s,mounted:r,openAccountModal:t,openChainModal:a})=>!r||!e||!s?null:n.jsxs("div",{className:"gc-connected",children:[n.jsx("span",{className:"gc-connected__dot","aria-hidden":"true"}),n.jsxs("span",{children:["Connected ",n.jsx("code",{className:"gc-mono",children:e.displayName})]}),s.unsupported&&n.jsxs(n.Fragment,{children:[n.jsx("span",{"aria-hidden":"true",children:"·"}),n.jsx("span",{className:"gc-warn",children:"Wrong network"}),n.jsx(i,{variant:"link",size:"sm",onClick:a,children:"Switch network"})]}),n.jsx("span",{"aria-hidden":"true",children:"·"}),n.jsx(i,{variant:"link",size:"sm",onClick:t,children:"Change"})]})})}export{u as C,h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,j as t,aB as m,B as b}from"./index-
|
|
1
|
+
import{r as j,j as t,aB as m,B as b}from"./index-DIcymBxc.js";function _(e){return[e.align==="right"?"as-num":null,e.secondary?"as-secondary":null,e.optional?"as-optional":null].filter(Boolean).join(" ")||void 0}function A(e,s){if((e==null?void 0:e.key)===s)return e.direction==="asc"?"ascending":"descending"}function B(e,s){return(e==null?void 0:e.key)!==s?"":e.direction==="asc"?"↑":"↓"}function C({rows:e,columns:s,rowKey:p,onRowClick:r,rowLabel:l,actions:d,empty:u,label:y,initialSort:k,selectedKey:g}){const[n,v]=j.useState(k??null),N=j.useMemo(()=>{if(!n)return e;const a=s.find(h=>h.key===n.key);if(!(a!=null&&a.sortValue))return e;const c=a.sortValue,x=n.direction==="asc"?1:-1;return[...e].sort((h,i)=>{const f=c(h),o=c(i);return f===o?0:f===null?1:o===null?-1:(f<o?-1:1)*x})},[e,s,n]);return e.length===0&&u?t.jsx(t.Fragment,{children:u}):t.jsx("div",{className:"as-table-wrap",children:t.jsxs("table",{className:"as-table","aria-label":y,children:[t.jsx("thead",{children:t.jsxs("tr",{children:[s.map(a=>{const c=(n==null?void 0:n.key)===a.key;return t.jsx("th",{className:_(a),style:a.width?{width:a.width}:void 0,"aria-sort":A(n,a.key),children:a.sortValue?t.jsxs("button",{type:"button",className:"as-table__sort",onClick:()=>v({key:a.key,direction:c&&n.direction==="desc"?"asc":"desc"}),children:[a.header,t.jsx("span",{"aria-hidden":"true",className:"as-table__arrow",children:B(n,a.key)})]}):a.header},a.key)}),d&&t.jsx("th",{className:"as-table__actions",children:t.jsx("span",{className:"as-sr",children:"Actions"})})]})}),t.jsx("tbody",{children:N.map(a=>{const c=p(a),x=g!=null&&c===g,h=[r?"as-table__row--click":null,x?"as-table__row--selected":null].filter(Boolean).join(" ");return t.jsxs("tr",{className:h||void 0,"aria-current":x?"true":void 0,onClick:r?()=>r(a):void 0,children:[s.map((i,f)=>t.jsx("td",{className:_(i),children:(()=>{const o=f===0&&r?t.jsx("button",{type:"button",className:"as-table__open","aria-label":l?`Open ${l(a)}`:void 0,onClick:P=>{P.stopPropagation(),r(a)},children:i.render(a)}):i.render(a);return i.after?t.jsxs("div",{className:"as-table__lead",children:[o,i.after(a)]}):o})()},i.key)),d&&t.jsx("td",{className:"as-table__actions",onClick:i=>i.stopPropagation(),children:t.jsx(m,{label:l?`Actions for ${l(a)}`:"Actions",items:d(a)})})]},c)})})]})})}function S(e,s,p=""){const[r,l]=j.useState(0);j.useEffect(()=>{l(0)},[p]);const d=Math.max(1,Math.ceil(e.length/s)),u=Math.min(r,d-1);return{items:e.slice(u*s,(u+1)*s),page:u,pages:d,total:e.length,setPage:l}}function E({pager:e,noun:s}){return e.pages<=1?null:t.jsxs("nav",{className:"as-pager","aria-label":`${s} pages`,children:[t.jsxs("span",{className:"as-pager__status",children:["Page ",e.page+1," of ",e.pages," · ",e.total," ",s]}),t.jsxs("div",{className:"as-pager__buttons",children:[t.jsx(b,{variant:"outline",size:"sm",disabled:e.page===0,onClick:()=>e.setPage(e.page-1),children:"Previous"}),t.jsx(b,{variant:"outline",size:"sm",disabled:e.page>=e.pages-1,onClick:()=>e.setPage(e.page+1),children:"Next"})]})]})}export{C as D,E as P,S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{am as b,an as N,e as g,q,j as e,ao as k,ap as x,aq as w,B as R,I as S,P as B,v as y,ar as E,S as P,as as _,g as n,l as d,Q as A,X as I,h as D,at as K,au as L,A as O,m as c,f as j,av as T}from"./index-
|
|
1
|
+
import{am as b,an as N,e as g,q,j as e,ao as k,ap as x,aq as w,B as R,I as S,P as B,v as y,ar as E,S as P,as as _,g as n,l as d,Q as A,X as I,h as D,at as K,au as L,A as O,m as c,f as j,av as T}from"./index-DIcymBxc.js";import{R as F}from"./RequestLog-D2YGgG1C.js";import{r as M,e as Q}from"./usage-DktoZRc8.js";import{B as $}from"./Charts-doK0mDVf.js";import"./useInfiniteQuery-NenQ5Num.js";import"./PeerPicker-BJfjL7Dy.js";import"./DataTable-BTwj5g1m.js";function J(){var m;const h=b(),u=N(),s=((m=u.data)==null?void 0:m.kind)==="key"?u.data.me.key:null,l=Date.now(),o=M("30d",l),f=g({queryKey:q.usage({key:s==null?void 0:s.id,from:o,groupBy:"day"}),queryFn:()=>j.usage.report({key:s.id,from:o,to:l,groupBy:"day"}),enabled:!!s}),v=g({queryKey:["key-periods",s==null?void 0:s.id],enabled:!!s,queryFn:async()=>{const a=await Promise.all(["daily","weekly","monthly"].map(async i=>{const t=await j.usage.report({key:s.id,from:T(i,l)});return[i,c(t.totals.spent)]}));return Object.fromEntries([...a,["total",c(s.usage.spent)]])}});return e.jsxs("div",{className:"gc-keyholder",children:[e.jsxs("header",{className:"gc-topbar",children:[e.jsxs("div",{className:"gc-topbar__inner",children:[e.jsx(k,{to:null,tagged:!0}),e.jsx("div",{className:"gc-topbar__spacer"}),e.jsx(x,{className:"gc-endpoint--inline"}),e.jsx(w,{}),e.jsx(R,{variant:"outline",size:"sm",leadingIcon:e.jsx(S.logout,{size:14}),onClick:()=>void h(),children:"Sign out"})]}),e.jsx("div",{className:"gc-topbar__strip",children:e.jsx(x,{})})]}),e.jsx("main",{className:"gc-main",id:"gc-main",children:s&&e.jsxs("div",{className:"gc-page",children:[e.jsx(B,{title:s.label,description:e.jsxs(e.Fragment,{children:["Key ",e.jsx("code",{children:s.hint})," · ",s.status==="active"?e.jsx(y,{tone:"success",children:"Active"}):e.jsx(y,{tone:"danger",children:"Revoked"})]})}),e.jsx("div",{className:"gc-grid gc-grid--4",children:E.map(a=>{var p;const i=s.limits[a],t=((p=v.data)==null?void 0:p[a])??null,r=i===null?null:c(i);return e.jsx(P,{label:`${_[a]} spend`,value:t===null?"…":n(t),sub:r===null?"No limit":`${n(Math.max(r-(t??0),0))} left of ${n(r)}`,meter:r&&t!==null?t/r:null},a)})}),e.jsx(d,{title:"Spend, last 30 days",children:e.jsx(A,{query:f,rows:1,children:a=>e.jsx($,{format:n,label:"Daily spend",points:Q(a,o,l)})})}),e.jsx(d,{title:"Key details",children:e.jsx(I,{items:[["Requests",D(s.usage.requests)],["Spent in total",n(s.usage.spent)],["Last used",K(s.lastUsedAt)],["Expires",s.expiresAt?L(s.expiresAt):"Never"],["Top-ups",s.topupEnabled?"Allowed":"Off"],["Routing",O(s.routingPolicy)]]})}),e.jsx(d,{flush:!0,title:"Requests",children:e.jsx(F,{filter:{key:s.id},showKey:!1})})]})})]})}export{J as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aC as ke,r as m,b0 as je,b1 as fe,j as s,C as ne,b2 as ve,Y as Se,B as S,u as le,a as Ce,i as ce,d as de,c as Pe,t as ie,P as Le,I as K,T as U,l as Ne,Q as Ae,b3 as Ee,z as ue,b4 as X,A as me,g as ye,m as Te,at as Re,E as Z,b5 as pe,D as De,q as F,f as C,v,au as J,e as Ie,b6 as Me,b7 as Ke,b8 as Ue,b9 as ee,o as Fe,X as _e}from"./index-DIcymBxc.js";import{u as se,a as Oe,P as Ye}from"./PolicyField-CfRYcr_J.js";import{T as Be}from"./Tabs-yVL4Cd6z.js";import{l as te,d as ae,L as qe}from"./limits-D8_oE0N-.js";import{t as ze}from"./dates-Pi3-Ywng.js";import{r as We,e as $e}from"./usage-DktoZRc8.js";import{S as he}from"./Switch-BwBYBnSS.js";import{D as Ve,u as He,P as Qe}from"./DataTable-BTwj5g1m.js";import{b as Ge}from"./Charts-doK0mDVf.js";import{S as Xe}from"./SelectField-BWyF8Ku8.js";import"./PolicyEditor-BpoV34ra.js";import"./PeerPicker-BJfjL7Dy.js";import"./Segmented-BelxPFkk.js";import"./roving-DkptacxO.js";function Ze({result:e,onClose:l}){var r;const o=ke(),[c,y]=m.useState("curl"),d=je((r=o.data)==null?void 0:r.publicUrl,window.location.origin),i=e?fe(d,e.secret):[],a=i.find(h=>h.id===c);return s.jsx(ne,{isOpen:e!==null,onClose:l,size:"lg",eyebrow:"API key",title:e?`${e.key.label} is ready`:"",children:e&&s.jsxs("div",{className:"gc-stack",children:[s.jsx(ve,{secret:e.secret}),s.jsxs("div",{children:[s.jsx("div",{className:"as-field__label",children:"Use it"}),s.jsxs("p",{className:"gc-muted",children:["Base URL ",s.jsxs("code",{children:[d,"/v1"]}),". Replace ",s.jsx("code",{children:"<model>"})," with a model from the Models page."]})]}),s.jsx(Be,{value:c,onChange:y,tabs:i.map(h=>({id:h.id,label:h.label}))}),a&&s.jsx(Se,{code:a.code}),s.jsx("div",{className:"gc-actions",children:s.jsx(S,{onClick:l,children:"Done"})})]})})}const Je="30d";function es({keyId:e}){const[l]=m.useState(()=>Date.now()),o=We(Je,l),c=Ie({queryKey:F.usage({key:e,from:o,groupBy:"day",spark:!0}),queryFn:()=>C.usage.report({key:e,from:o,to:l,groupBy:"day"}),staleTime:6e4});return c.data?s.jsx(Ge,{label:"Daily spend, last 30 days",format:ye,per:"a day",emptyText:"no spend",values:$e(c.data,o,l).map(y=>y.value)}):s.jsx("span",{className:"as-spark as-spark--empty","aria-hidden":"true"})}function ss(e){return e.status==="revoked"?s.jsx(v,{tone:"danger",children:"Revoked"}):e.expiresAt&&e.expiresAt<Date.now()?s.jsx(v,{tone:"warning",children:"Expired"}):e.expiresAt?s.jsxs(v,{tone:"neutral",title:`Expires ${J(e.expiresAt)}`,children:["Until ",J(e.expiresAt)]}):s.jsx(v,{tone:"success",children:"Active"})}function re({title:e,note:l,limits:o,policy:c}){return s.jsxs("div",{className:"gc-layer gc-layer--readonly",children:[s.jsxs("div",{className:"gc-inline gc-inline--between",children:[s.jsx("div",{className:"as-field__label",children:e}),s.jsx(v,{children:"Read only"})]}),s.jsx(_e,{items:[["Spend limits",ue(o??null)],["Routing",me(c??null)]]}),s.jsx("p",{className:"gc-fineprint",children:l})]})}function oe({title:e,idPrefix:l,limits:o,onLimitsChange:c,limitsNote:y,policy:d}){return s.jsxs("div",{className:"gc-layer",children:[e&&s.jsx("div",{className:"as-field__label",children:e}),s.jsxs("div",{children:[s.jsx("div",{className:"as-field__label gc-label-row",children:"Spend limits (USD)"}),s.jsx(qe,{idPrefix:l,value:o,onChange:c}),s.jsx("p",{className:"gc-fineprint",children:y})]}),s.jsx(Ye,{draft:d.draft,setDraft:d.setDraft})]})}function ts({initial:e,layeredHint:l,onSaved:o,onCancel:c}){var W;const{workspace:y,viewer:d,me:i}=le(),a=ce(d),r=pe(e)?e:null,[h,k]=m.useState((e==null?void 0:e.label)??""),[x,P]=m.useState(te(e==null?void 0:e.limits)),[L,N]=m.useState(te(r?r.ownerLimits:e==null?void 0:e.limits)),[j,A]=m.useState(ze((e==null?void 0:e.expiresAt)??null)),[g,E]=m.useState((e==null?void 0:e.topupEnabled)??!1),[n,b]=m.useState((e==null?void 0:e.ownerMemberId)??i.member.id),w=se(e==null?void 0:e.routingPolicy),t=se(r?r.ownerRoutingPolicy:e==null?void 0:e.routingPolicy),p=Me(e,{memberId:i.member.id,workspaceAdmin:a},l),be=Ke(y.id,a),_=((e==null?void 0:e.buyerIdentity)??((W=be.data)==null?void 0:W.buyerIdentity))==="default",O=de(y.id,a&&!e),R=Oe(),[Y,B]=m.useState(null),D=p.admin,q=e?p.owner&&(p.layered||!p.admin):!p.admin,T=e!==null&&p.layered;let z=null;T&&(z=p.admin?"Your restrictions as the key owner":"Your restrictions");const ge=e?"Save":"Create key",xe=p.layered||!e?"UTC periods; weeks start Monday. Workspace, member and admin limits apply too.":"You can only tighten your key: a higher or cleared limit is ignored.",I=ie({mutationFn:async()=>{const u=j?Date.parse(`${j}T23:59:59Z`):null,$=D?w.build():null,V=q?t.build():null,H=ae(x),Q=ae(L);if(e){const f=Ue(p,e,{label:h.trim(),expiresAt:u,topupEnabled:g,adminLimits:H,adminPolicy:$,ownerLimits:Q,ownerPolicy:V}),G=await R.save([f.routingPolicy,f.ownerRoutingPolicy],we=>C.keys.update(e.id,f,we));return G===ee?ee:{key:G}}const M={label:h.trim(),workspaceId:y.id,limits:p.admin?H:Q,routingPolicy:p.admin?$:V,topupEnabled:p.admin?g:!1,expiresAt:u};return p.admin&&(M.ownerMemberId=n||null),R.save([M.routingPolicy],f=>C.keys.create(M,f))},onSuccess:o,invalidate:[F.group("keys")],toast:u=>u.secret?null:"Key saved",onError:B});return s.jsxs("form",{className:"gc-stack",onSubmit:u=>{u.preventDefault(),B(null),I.mutate()},children:[s.jsx(U,{label:"Name",required:!0,placeholder:"e.g. Production backend",value:h,onChange:u=>k(u.target.value)}),!e&&a&&O.data&&s.jsx(Xe,{label:"Owner",value:n,onChange:b,options:O.data.map(({member:u})=>({value:u.id,label:u.id===i.member.id?`${u.label} (you)`:u.label}))}),D&&s.jsx(oe,{title:T?"Workspace admin restrictions":null,idPrefix:"key-limit",limits:x,onLimitsChange:P,limitsNote:"UTC periods; weeks start Monday. The workspace and member budgets apply too.",policy:w}),!D&&T&&s.jsx(re,{title:"Set by workspace admins",limits:e.limits,policy:e.routingPolicy,note:"These always apply to this key. Your own restrictions below can only add to them."}),q&&s.jsx(oe,{title:z,idPrefix:"key-owner-limit",limits:L,onLimitsChange:N,limitsNote:xe,policy:t}),T&&!p.owner&&s.jsx(re,{title:"Set by the key owner",limits:r==null?void 0:r.ownerLimits,policy:r==null?void 0:r.ownerRoutingPolicy,note:"Only the key's owner changes these. They apply on top of yours."}),s.jsx(U,{label:"Expires",type:"date",value:j,onChange:u=>A(u.target.value),hint:a?"Leave blank for no expiry.":"You can set or bring forward an expiry; only an admin can extend or remove it."}),a&&s.jsx(he,{checked:g,onChange:E,disabled:_&&!g,label:"Allow top-ups",description:_?"Keys paid from the default wallet cannot be topped up.":"Let the key holder add funds to this key with USDC (x402)."}),Y?s.jsx(Fe,{error:Y,title:"Could not save the key"}):null,s.jsxs("div",{className:"gc-actions",children:[s.jsx(S,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(S,{type:"submit",disabled:I.isPending||!h.trim(),children:I.isPending?"Saving…":ge})]}),R.dialog]})}const as=25;function rs({list:e,search:l,showRevoked:o,ownerLabel:c,render:y}){const d=l.trim().toLowerCase(),i=m.useMemo(()=>e.filter(r=>(o||r.status==="active")&&(!d||r.label.toLowerCase().includes(d)||r.hint.toLowerCase().includes(d)||c(r).toLowerCase().includes(d))),[e,o,d,c]),a=He(i,as,`${d}|${o}`);return s.jsxs(s.Fragment,{children:[y(a.items,i.length===0&&e.length>0),s.jsx(Qe,{pager:a,noun:"keys"})]})}function os(e){return(e==null?void 0:e.kind)==="rotate"?{title:"Rotate this key?",confirmLabel:"Rotate key",tone:"primary",body:s.jsxs(s.Fragment,{children:["The current secret for ",s.jsx("strong",{children:e.key.label})," stops working now. You get a new secret to replace it."]})}:{title:"Revoke this key?",confirmLabel:"Revoke key",tone:"danger",body:s.jsxs(s.Fragment,{children:["Requests with ",s.jsx("strong",{children:e==null?void 0:e.key.label})," fail from now on. This cannot be undone."]})}}function ks(){const{workspace:e,me:l,viewer:o}=le(),c=Ce(),y=ce(o),d=de(e.id,y),[i,a]=m.useState(()=>new URLSearchParams(window.location.search).get("new")==="1"?"new":null),[r,h]=m.useState(null),[k,x]=m.useState(null),[P,L]=m.useState(!1),[N,j]=m.useState(""),A=Pe(c),g=ie({mutationFn:async({kind:n,key:b})=>{n==="rotate"?h(await C.keys.rotate(b.id)):await C.keys.revoke(b.id)},onSuccess:()=>x(null),invalidate:[F.group("keys")],toast:(n,{kind:b})=>b==="revoke"?"Key revoked":null}),E=n=>{var b,w;return n.ownerMemberId?n.ownerMemberId===l.member.id?"You":((w=(b=d.data)==null?void 0:b.find(({member:t})=>t.id===n.ownerMemberId))==null?void 0:w.member.label)??"Another member":"—"};return s.jsxs("div",{className:"gc-page",children:[s.jsx(Le,{title:"API keys",description:`Keys for the ${e.name} workspace. Each key spends from this workspace's wallet.`,actions:s.jsx(S,{variant:"brand",leadingIcon:s.jsx(K.plus,{size:14}),onClick:()=>a("new"),children:"Create key"})}),s.jsxs("div",{className:"gc-toolbar",children:[s.jsx(U,{size:"sm",type:"search","aria-label":"Search keys",placeholder:"Search name, hint or owner",value:N,onChange:n=>j(n.target.value)}),s.jsx(he,{checked:P,onChange:L,label:"Show revoked"})]}),s.jsx(Ne,{flush:!0,children:s.jsx(Ae,{query:A,children:n=>s.jsx(rs,{list:n,search:N,showRevoked:P,ownerLabel:E,render:(b,w)=>s.jsx(Ve,{label:"API keys",rows:b,rowKey:t=>t.id,rowLabel:t=>t.label,onRowClick:t=>t.status==="active"&&a(t),actions:t=>t.status==="active"?[{label:"Edit",onSelect:()=>a(t)},{label:"Rotate secret",onSelect:()=>x({kind:"rotate",key:t})},{label:"Revoke",tone:"danger",onSelect:()=>x({kind:"revoke",key:t})}]:[],empty:w?s.jsx(Z,{icon:s.jsx(K.keys,{size:18}),title:"No keys match",body:"Try another search, or show revoked keys."}):s.jsx(Z,{icon:s.jsx(K.keys,{size:18}),title:"No keys yet",body:"Create a key to call models through this gateway.",action:s.jsx(S,{onClick:()=>a("new"),children:"Create key"})}),columns:[{key:"label",header:"Name",sortValue:t=>t.label,render:t=>s.jsx(Ee,{name:t.label,hint:t.hint})},{key:"owner",header:"Owner",secondary:!0,render:E},{key:"limits",header:"Limits",secondary:!0,optional:!0,render:t=>s.jsx("span",{className:"gc-muted",children:ue(X(t).limits)})},{key:"policy",header:"Routing",secondary:!0,optional:!0,render:t=>s.jsx("span",{className:"gc-muted",children:me(X(t).policy)})},...y?[{key:"trend",header:"30 days",secondary:!0,render:t=>s.jsx(es,{keyId:t.id})}]:[],{key:"month",header:"This month",align:"right",sortValue:t=>Te(t.usage.spentThisMonth),render:t=>ye(t.usage.spentThisMonth)},{key:"used",header:"Last used",secondary:!0,optional:!0,sortValue:t=>t.lastUsedAt,render:t=>Re(t.lastUsedAt)},{key:"status",header:"Status",secondary:!0,render:ss}]})})})}),s.jsx(ne,{isOpen:i!==null,onClose:()=>a(null),size:"lg",title:i==="new"?"Create API key":"Edit API key",children:i!==null&&s.jsx(ts,{initial:i==="new"?null:i,layeredHint:(A.data??[]).some(pe),onCancel:()=>a(null),onSaved:n=>{a(null),n.secret&&h({key:n.key,secret:n.secret})}})}),s.jsx(Ze,{result:r,onClose:()=>h(null)}),s.jsx(De,{isOpen:k!==null,busy:g.isPending,error:g.error,onClose:()=>{x(null),g.reset()},onConfirm:()=>k&&g.mutate(k),...os(k)})]})}export{ks as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,a as q,c as M,a$ as N,b as P,j as e,P as A,B as z,I as B,f as L,T as v,l as K}from"./index-DIcymBxc.js";import{R as _}from"./RequestLog-D2YGgG1C.js";import{f as k}from"./dates-Pi3-Ywng.js";import{p as H}from"./PeerPicker-BJfjL7Dy.js";import{S as h}from"./SelectField-BWyF8Ku8.js";import"./useInfiniteQuery-NenQ5Num.js";import"./usage-DktoZRc8.js";import"./DataTable-BTwj5g1m.js";function w(a,o=300){const[i,r]=s.useState(a);return s.useEffect(()=>{const n=window.setTimeout(()=>r(a),o);return()=>window.clearTimeout(n)},[a,o]),i}function Y(){const a=q(),[o,i]=s.useState(""),[r,n]=s.useState(""),[l,g]=s.useState(""),[u,x]=s.useState(""),[b,f]=s.useState(""),[c,y]=s.useState(""),[d,S]=s.useState(""),D=M(a),E=N(a),U=P(),j=w(r.trim()),C=w(b.trim()),m=k(c,"start"),p=k(d,"end"),I=m!==void 0&&p!==void 0&&m>p,F=s.useMemo(()=>({...a,key:o||void 0,model:j||void 0,router:l||void 0,status:u||void 0,q:C||void 0,from:m,to:p}),[a.workspace,a.member,o,j,l,u,C,m,p]),R=!!(o||r||l||u||b||c||d),T=E.data??[];return e.jsxs("div",{className:"gc-page",children:[e.jsx(A,{title:"Logs",description:"Every request through this workspace's keys.",actions:e.jsx(z,{variant:"outline",size:"sm",href:L.usage.exportUrl(F),download:!0,leadingIcon:e.jsx(B.download,{size:14}),children:"Export CSV"})}),e.jsxs("div",{className:"gc-toolbar",children:[e.jsx(v,{size:"sm",type:"search","aria-label":"Search requests",placeholder:"Search model, key, end user or error",value:b,onChange:t=>f(t.target.value),className:"gc-toolbar__grow"}),e.jsx(h,{size:"sm","aria-label":"Filter by key",value:o,onChange:i,options:[{value:"",label:"All keys"},...(D.data??[]).map(t=>({value:t.id,label:t.label}))]}),e.jsx(v,{size:"sm","aria-label":"Filter by model",placeholder:"Model",value:r,onChange:t=>n(t.target.value)}),(T.length>0||l)&&e.jsx(h,{size:"sm","aria-label":"Filter by router",value:l,onChange:g,options:[{value:"",label:"Any router"},...T.map(t=>({value:t,label:H(U.data,t)}))]}),e.jsx(h,{size:"sm","aria-label":"Filter by status",value:u,onChange:x,options:[{value:"",label:"Any status"},{value:"success",label:"Succeeded"},{value:"error",label:"Failed"}]}),e.jsx(v,{size:"sm",type:"date","aria-label":"From date (UTC)",title:"From (UTC)",value:c,max:d||void 0,onChange:t=>y(t.target.value)}),e.jsx(v,{size:"sm",type:"date","aria-label":"To date (UTC)",title:"To (UTC)",value:d,min:c||void 0,onChange:t=>S(t.target.value),error:I?"Ends before it starts":void 0}),R&&e.jsx(z,{variant:"ghost",size:"sm",onClick:()=>{i(""),n(""),g(""),x(""),f(""),y(""),S("")},children:"Clear filters"})]}),e.jsx(K,{flush:!0,children:e.jsx(_,{filter:F})})]})}export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as W,n as V,r as d,d as ce,U as G,t as N,j as e,P as de,B as f,I as q,l as H,Q,ba as _,z as me,A as ue,E as ae,C as B,D as T,f as w,G as ge,q as P,aF as be,v as D,au as se,bb as ne,bc as he,at as J,T as I,ah as X,o as ie,b2 as pe,aN as ve}from"./index-DIcymBxc.js";import{u as xe,a as je,P as ye}from"./PolicyField-CfRYcr_J.js";import{l as ke,d as fe,L as we}from"./limits-D8_oE0N-.js";import{D as Y}from"./DataTable-BTwj5g1m.js";import{S as M}from"./SelectField-BWyF8Ku8.js";import"./PolicyEditor-BpoV34ra.js";import"./PeerPicker-BJfjL7Dy.js";import"./Segmented-BelxPFkk.js";import"./roving-DkptacxO.js";import"./Switch-BwBYBnSS.js";const z=(s,t)=>!!s&&!!t&&s.trim().toLowerCase()===t.trim().toLowerCase();function Ce(s,t,o){const n=[],m=Date.now();for(const i of t)z(i.email,s.email)?n.push(`${i.label} already uses ${i.email}.`):z(i.label,s.label)&&n.push(`A member named ${i.label} already exists${i.status==="invited"?" (invited, not joined yet)":""}.`);for(const i of o)i.expiresAt<m||(z(i.email,s.email)?n.push(`A pending invite already goes to ${i.email}.`):z(i.label,s.label)&&n.push(`A pending invite for ${i.label} already exists.`));return[...new Set(n)]}const F=[P.group("members"),P.group("workspaces"),P.group("keys")],K=[...F,P.group("invites")],te=[{value:"member",label:"Member"},{value:"admin",label:"Admin"}];function U(s){return s.status==="disabled"?e.jsx(D,{tone:"danger",children:"Disabled"}):s.status==="invited"?e.jsx(D,{tone:"warning",children:"Invited"}):e.jsx(D,{tone:"success",children:"Active"})}function le(s,t){return s==="owner"?["member","admin","owner"]:t?["member","admin"]:["member"]}function re(s){return s.map(t=>({value:t,label:_[t]}))}function Se({onCreated:s,onCancel:t}){const{me:o,viewer:n,workspace:m}=W(),i=V(n),C=o.workspaces.filter(a=>i||a.role==="admin").map(a=>a.workspace),[c,u]=d.useState(""),[g,p]=d.useState(""),[v,R]=d.useState("member"),[j,E]=d.useState("72"),[y,b]=d.useState({[m.id]:"member"}),S=G(i),L=ne(),x=Ce({label:c,email:g},S.data??[],L.data??[]),h=N({mutationFn:()=>{const a={label:c.trim(),email:g.trim()||null,orgRole:v,workspaces:Object.entries(y).filter(([,k])=>k).map(([k,O])=>({workspaceId:k,role:O})),expiresInHours:Number(j)||72};return w.invites.create(a)},onSuccess:s,invalidate:K}),l=x.length?"Create anyway":"Create invite link";return e.jsxs("form",{className:"gc-stack",onSubmit:a=>{a.preventDefault(),h.mutate()},children:[e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(I,{label:"Name",required:!0,value:c,onChange:a=>u(a.target.value)}),e.jsx(I,{label:"Email (optional)",type:"email",value:g,onChange:a=>p(a.target.value),hint:"Required when they will sign in with your identity provider."})]}),e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(M,{label:"Organization role",value:v,onChange:a=>R(a),options:re(le(o.member.orgRole,i)),hint:v==="member"?"Sees only the workspaces below.":"Can manage every workspace."}),e.jsx(M,{label:"Link expires after",value:j,onChange:E,options:[{value:"24",label:"1 day"},{value:"72",label:"3 days"},{value:"168",label:"7 days"}]})]}),e.jsxs("fieldset",{className:"gc-checks",children:[e.jsx("legend",{className:"as-field__label",children:"Workspaces"}),C.map(a=>e.jsxs("div",{className:"gc-inline gc-inline--between",children:[e.jsx("span",{children:a.name}),e.jsx(M,{"aria-label":`Role in ${a.name}`,value:y[a.id]??"",onChange:k=>b({...y,[a.id]:k}),options:[{value:"",label:"No access"},...te]})]},a.id))]}),x.length>0&&e.jsx(X,{tone:"warning",title:"Possible duplicate",children:e.jsx("ul",{className:"gc-list",children:x.map(a=>e.jsx("li",{children:a},a))})}),h.error?e.jsx(ie,{error:h.error,title:"Could not create the invite"}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(f,{variant:"ghost",onClick:t,children:"Cancel"}),e.jsx(f,{type:"submit",disabled:h.isPending||!c.trim(),children:h.isPending?"Creating…":l})]})]})}function Ne({member:s,onDone:t}){const{me:o,viewer:n}=W(),m=V(n),[i,C]=d.useState(s.label),[c,u]=d.useState(s.email??""),[g,p]=d.useState(s.orgRole),[v,R]=d.useState(ke(s.limits)),[j,E]=d.useState(s.maxKeys===null?"":String(s.maxKeys)),y=xe(s.routingPolicy),[b,S]=d.useState(null),[L,x]=d.useState(!1),h=je(),l=N({mutationFn:async()=>{const r=j.trim()===""?null:Number(j);if(r!==null&&(!Number.isInteger(r)||r<0))throw new Error("Key limit must be a whole number.");const ee={label:i.trim(),email:c.trim()||null,limits:fe(v),maxKeys:r,routingPolicy:y.build(),...m?{orgRole:g}:{}};return h.save([ee.routingPolicy],oe=>w.members.update(s.id,ee,oe))},onSuccess:t,invalidate:F,toast:"Member saved"}),a=N({mutationFn:()=>s.status==="disabled"?w.members.enable(s.id):w.members.disable(s.id),onSuccess:()=>{x(!1),t()},invalidate:F}),k=N({mutationFn:r=>w.members.removeCredential(s.id,r),onSuccess:()=>{S(null),t()},invalidate:F}),O=s.id===o.member.id,A=s.status==="disabled",$=m&&(s.orgRole!=="owner"||o.member.orgRole==="owner"),Z=O&&s.credentials.length<=1;return e.jsxs("form",{className:"gc-stack",onSubmit:r=>{r.preventDefault(),l.mutate()},children:[e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(I,{label:"Name",value:i,onChange:r=>C(r.target.value)}),e.jsx(I,{label:"Email",type:"email",value:c,onChange:r=>u(r.target.value)})]}),e.jsxs("div",{className:"gc-grid gc-grid--2",children:[m&&e.jsx(M,{label:"Organization role",value:g,disabled:O||s.orgRole==="owner"&&o.member.orgRole!=="owner",onChange:r=>p(r),options:re(le(o.member.orgRole,!0))}),e.jsx(I,{label:"Keys they may create",inputMode:"numeric",placeholder:"No limit",value:j,onChange:r=>E(r.target.value)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"as-field__label gc-label-row",children:"Spend limits across their keys (USD)"}),e.jsx(we,{idPrefix:"member-limit",value:v,onChange:R})]}),e.jsx(ye,{draft:y.draft,setDraft:y.setDraft}),e.jsxs("div",{children:[e.jsx("div",{className:"as-field__label gc-label-row",children:"Sign-in methods"}),s.credentials.length===0?e.jsx("p",{className:"gc-muted",children:"None yet."}):e.jsx("ul",{className:"gc-list",children:s.credentials.map(r=>e.jsxs("li",{className:"gc-inline gc-inline--between",children:[e.jsxs("span",{children:[e.jsx(D,{children:r.kind})," ",r.label," ",e.jsxs("span",{className:"gc-muted",children:["· last used ",J(r.lastUsedAt)]})]}),$&&e.jsx(f,{variant:"ghost",size:"sm",disabled:Z,title:Z?"Add another sign-in method first":void 0,onClick:()=>S(r),children:"Remove"})]},r.id))})]}),!$&&e.jsx(X,{tone:"info",children:"Only an owner can change an owner's profile, status or sign-in methods."}),l.error?e.jsx(ie,{error:l.error,title:"Could not save"}):null,e.jsxs("div",{className:"gc-actions gc-actions--split",children:[$&&!O?e.jsx(f,{variant:A?"outline":"danger",size:"sm",onClick:()=>x(!0),children:A?"Enable member":"Disable member"}):e.jsx("span",{}),e.jsxs("div",{className:"gc-actions",children:[e.jsx(f,{variant:"ghost",onClick:t,children:"Cancel"}),$&&e.jsx(f,{type:"submit",disabled:l.isPending,children:l.isPending?"Saving…":"Save"})]})]}),e.jsx(T,{isOpen:L,busy:a.isPending,error:a.error,onClose:()=>x(!1),onConfirm:()=>a.mutate(),title:A?"Enable this member?":"Disable this member?",tone:A?"primary":"danger",confirmLabel:A?"Enable":"Disable",body:A?`${s.label} can sign in again. Their revoked keys stay revoked.`:`${s.label} is signed out and all of their keys are revoked.`}),e.jsx(T,{isOpen:b!==null,busy:k.isPending,error:k.error,onClose:()=>S(null),onConfirm:()=>b&&k.mutate(b.id),title:"Remove this sign-in method?",confirmLabel:"Remove",body:`${(b==null?void 0:b.label)??""} can no longer be used to sign in as ${s.label}.`}),h.dialog]})}function Re({member:s,role:t}){const{workspace:o,me:n}=W(),m=ge(),i=N({mutationFn:c=>w.workspaces.setMember(o.id,s.id,c),invalidate:s.id===n.member.id?[P.workspaceMembers(o.id),P.me]:[P.workspaceMembers(o.id)],toast:(c,u)=>`${s.label} is now a workspace ${u}`,onError:c=>m(`Could not change ${s.label}'s role: ${be(c)}`,"danger")}),C=s.orgRole!=="member";return e.jsx("div",{onClick:c=>c.stopPropagation(),children:e.jsx(M,{size:"sm","aria-label":`Workspace role for ${s.label}`,value:t,disabled:i.isPending||C,title:C?"Organization admins administer every workspace":void 0,onChange:c=>i.mutate(c),options:te})})}function Pe({onEdit:s}){const t=G();return e.jsx(H,{flush:!0,title:"Everyone in the organization",children:e.jsx(Q,{query:t,children:o=>e.jsx(Y,{label:"All members",rows:o,rowKey:n=>n.id,onRowClick:s,rowLabel:n=>n.label,actions:n=>[{label:"Edit member",onSelect:()=>s(n)}],columns:[{key:"name",header:"Name",sortValue:n=>n.label,render:n=>e.jsxs("span",{className:"gc-strong",children:[n.label,n.status!=="active"&&e.jsxs("span",{className:"gc-narrow-only",children:[" ",U(n)]})]})},{key:"email",header:"Email",secondary:!0,render:n=>n.email??"—"},{key:"role",header:"Role",render:n=>_[n.orgRole]},{key:"keys",header:"Key limit",secondary:!0,optional:!0,render:n=>n.maxKeys??"No limit"},{key:"since",header:"Joined",secondary:!0,sortValue:n=>n.createdAt,render:n=>n.status==="invited"?e.jsxs("span",{className:"gc-muted",children:["Invited ",se(n.createdAt)]}):se(n.createdAt)},{key:"status",header:"Status",secondary:!0,render:U}]})})})}function Ee(){const s=ne(),[t,o]=d.useState(null),n=N({mutationFn:m=>w.invites.revoke(m.id),onSuccess:()=>o(null),invalidate:K});return e.jsxs(H,{flush:!0,title:"Pending invites",children:[e.jsx(Q,{query:s,children:m=>e.jsx(Y,{label:"Pending invites",rows:m,rowKey:i=>i.id,rowLabel:i=>`invite for ${i.label}`,empty:e.jsx(ae,{icon:e.jsx(q.members,{size:18}),title:"No pending invites"}),actions:i=>[{label:"Revoke invite",tone:"danger",onSelect:()=>o(i)}],columns:[{key:"name",header:"Name",render:i=>e.jsx("span",{className:"gc-strong",children:i.label})},{key:"email",header:"Email",secondary:!0,render:i=>i.email??"—"},{key:"role",header:"Role",render:i=>_[i.orgRole]},{key:"expires",header:"Expires",secondary:!0,render:i=>e.jsx(he,{at:i.expiresAt,format:J})}]})}),e.jsx(T,{isOpen:t!==null,busy:n.isPending,error:n.error,onClose:()=>o(null),onConfirm:()=>t&&n.mutate(t),title:"Revoke this invite?",confirmLabel:"Revoke",body:"The link stops working."})]})}function Ae({invite:s,onClose:t}){return e.jsx(B,{isOpen:s!==null,onClose:t,title:"Invite link",size:"lg",children:s&&e.jsxs("div",{className:"gc-stack",children:[s.url?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Send this link to ",e.jsx("strong",{children:s.label}),". It works once and expires ",J(s.expiresAt),"."]}),e.jsx(pe,{secret:s.url,note:"This link is shown only once. Anyone with it can join as this member."})]}):e.jsx(X,{tone:"warning",children:"The gateway did not return a link for this invite."}),e.jsxs("div",{className:"gc-actions",children:[s.url&&e.jsx(ve,{value:s.url,label:"Copy link",size:"md"}),e.jsx(f,{onClick:t,children:"Done"})]})]})})}function We(){var h;const{viewer:s,workspace:t,me:o}=W(),n=V(s),[m,i]=d.useState(!1),[C,c]=d.useState(null),[u,g]=d.useState(null),[p,v]=d.useState(null),[R,j]=d.useState(""),E=ce(t.id),y=G(n),b=N({mutationFn:l=>w.workspaces.removeMember(t.id,l.id),onSuccess:()=>v(null),invalidate:K,toast:"Removed from workspace"}),S=N({mutationFn:l=>w.workspaces.setMember(t.id,l,"member"),onSuccess:()=>j(""),invalidate:K,toast:"Added to workspace"}),L=new Set((h=E.data)==null?void 0:h.map(({member:l})=>l.id)),x=(y.data??[]).filter(l=>!L.has(l.id)&&l.status==="active");return e.jsxs("div",{className:"gc-page",children:[e.jsx(de,{title:"Members",description:"Who can use this gateway, their budgets and routing.",actions:e.jsx(f,{variant:"brand",leadingIcon:e.jsx(q.plus,{size:14}),onClick:()=>i(!0),children:"Invite member"})}),e.jsx(H,{flush:!0,title:`${t.name} workspace`,actions:n&&x.length>0?e.jsxs("div",{className:"gc-inline",children:[e.jsx(M,{size:"sm","aria-label":"Add an existing member",value:R,onChange:j,options:[{value:"",label:"Add existing member…"},...x.map(l=>({value:l.id,label:l.label}))]}),e.jsx(f,{size:"sm",variant:"outline",disabled:!R||S.isPending,onClick:()=>S.mutate(R),children:"Add"})]}):void 0,children:e.jsx(Q,{query:E,children:l=>e.jsx(Y,{label:"Workspace members",rows:l,rowKey:a=>a.member.id,onRowClick:n?a=>g(a.member):void 0,rowLabel:a=>a.member.label,actions:a=>[n&&{label:"Edit member",onSelect:()=>g(a.member)},a.member.id!==o.member.id&&{label:"Remove from workspace",tone:"danger",onSelect:()=>v(a.member)}],empty:e.jsx(ae,{icon:e.jsx(q.members,{size:18}),title:"No members in this workspace"}),columns:[{key:"name",header:"Name",sortValue:a=>a.member.label,render:a=>e.jsxs("div",{children:[e.jsx("div",{className:"gc-strong",children:a.member.label}),e.jsx("div",{className:"gc-muted",children:a.member.email??_[a.member.orgRole]})]})},{key:"role",header:"Workspace role",render:a=>e.jsx(Re,{member:a.member,role:a.role})},{key:"limits",header:"Limits",secondary:!0,optional:!0,render:a=>e.jsx("span",{className:"gc-muted",children:me(a.member.limits)})},{key:"policy",header:"Routing",secondary:!0,optional:!0,render:a=>e.jsx("span",{className:"gc-muted",children:ue(a.member.routingPolicy)})},{key:"status",header:"Status",secondary:!0,render:a=>U(a.member)}]})})}),n&&e.jsx(Pe,{onEdit:g}),e.jsx(Ee,{}),e.jsx(B,{isOpen:m,onClose:()=>i(!1),size:"lg",title:"Invite a member",children:m&&e.jsx(Se,{onCancel:()=>i(!1),onCreated:l=>{i(!1),c(l)}})}),e.jsx(Ae,{invite:C,onClose:()=>c(null)}),e.jsx(B,{isOpen:u!==null,onClose:()=>g(null),size:"lg",title:(u==null?void 0:u.label)??"",eyebrow:"Member",children:u&&e.jsx(Ne,{member:u,onDone:()=>g(null)},u.id)}),e.jsx(T,{isOpen:p!==null,busy:b.isPending,error:b.error,onClose:()=>v(null),onConfirm:()=>p&&b.mutate(p),title:"Remove from workspace?",confirmLabel:"Remove",body:`${(p==null?void 0:p.label)??""} loses access to ${t.name}. Their keys in this workspace stop working.`})]})}export{We as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as v,aC as _,r as g,aD as f,aE as N,n as k,j as e,ah as p,P as S,I as l,l as x,T as j,Y as r,v as y}from"./index-
|
|
1
|
+
import{u as v,aC as _,r as g,aD as f,aE as N,n as k,j as e,ah as p,P as S,I as l,l as x,T as j,Y as r,v as y}from"./index-DIcymBxc.js";const C="https://antseed.com/docs/gateway/migrate",T="https://antseed.com/docs/tunnels",P={local:"This computer only",lan:"Your network only",public:"Public"};function o({n:s,title:a,children:t}){return e.jsxs("li",{className:"gc-migrate__step",children:[e.jsx("span",{className:"gc-migrate__num","aria-hidden":"true",children:s}),e.jsxs("div",{className:"gc-migrate__body",children:[e.jsx("h3",{className:"gc-migrate__title",children:a}),t]})]})}function d({icon:s,title:a,children:t}){return e.jsxs("div",{className:"gc-migrate__why",children:[e.jsx("span",{className:"gc-migrate__why-icon","aria-hidden":"true",children:s}),e.jsxs("div",{children:[e.jsx("div",{className:"gc-migrate__why-title",children:a}),e.jsx("p",{className:"gc-migrate__why-text",children:t})]})]})}function I({exposure:s}){return e.jsxs("div",{className:"gc-migrate__now",children:[e.jsxs("div",{className:"gc-migrate__now-head",children:[e.jsx("span",{className:"gc-muted",children:"Right now"}),e.jsx(y,{tone:s.mode==="public"?"neutral":"warning",children:P[s.mode]}),s.listenHost&&e.jsx("code",{className:"gc-migrate__addr",children:s.listenHost})]}),s.reasons.length>0&&e.jsx("ul",{className:"gc-migrate__reasons",children:s.reasons.map(a=>e.jsx("li",{children:a},a))})]})}function A(){var u;const{viewer:s}=v(),a=_(),[t,w]=g.useState(""),[h,b]=g.useState(""),m=f(t),n=N({domain:m,server:h}),i=(u=a.data)==null?void 0:u.exposure;return k(s)?e.jsxs("div",{className:"gc-page gc-migrate",children:[e.jsx(S,{title:"Move this gateway to a server",description:"Keep every key, member, workspace, wallet and its usage history. Your apps only need the new base URL."}),i&&e.jsx(I,{exposure:i}),(i==null?void 0:i.mode)==="public"&&e.jsxs(p,{tone:"info",title:"Already public",children:["This gateway has a public address (",i.publicUrl,"). You can still move it to another machine with the same steps."]}),e.jsxs("div",{className:"gc-migrate__whys",children:[e.jsx(d,{icon:e.jsx(l.activity,{size:16}),title:"Always on",children:"Keys keep working when your laptop sleeps, travels or restarts."}),e.jsx(d,{icon:e.jsx(l.shield,{size:16}),title:"HTTPS on your domain",children:"Automatic TLS at an address like https://llm.example.com, with passkeys and single sign-on."}),e.jsx(d,{icon:e.jsx(l.members,{size:16}),title:"Team access",children:"Teammates, CI and hosted tools reach it from anywhere, each with their own key and budget."})]}),e.jsxs(x,{title:e.jsxs("span",{className:"gc-inline",children:["Recommended: a small Linux server ",e.jsx(y,{tone:"neutral",children:"About 10 minutes"})]}),description:"Any VPS with a public IP works (1 vCPU, 1 GB RAM). Point a DNS name at it and open ports 80 and 443.",children:[e.jsxs("div",{className:"gc-migrate__inputs",children:[e.jsx(j,{label:"Domain for the gateway",placeholder:"llm.example.com",value:t,onChange:c=>w(c.target.value),error:t.trim()&&!m?"Enter a host name such as llm.example.com":void 0,spellCheck:!1,autoCapitalize:"off"}),e.jsx(j,{label:"Server SSH login",placeholder:"user@your-server",value:h,onChange:c=>b(c.target.value),spellCheck:!1,autoCapitalize:"off",mono:!0})]}),e.jsxs("ol",{className:"gc-migrate__steps",children:[e.jsxs(o,{n:1,title:"Export it on this computer",children:[e.jsx("p",{children:"Writes a password-protected bundle readable only by you. It holds the wallet keys, so keep the password apart from the file."}),e.jsx(r,{code:n.exportBundle,label:"This computer"})]}),e.jsx(o,{n:2,title:"Copy the bundle to the server",children:e.jsx(r,{code:n.copy,label:"This computer"})}),e.jsxs(o,{n:3,title:"Install the gateway on the server and import the bundle",children:[e.jsx("p",{children:"Installs the CLI, restores the bundle as the service user, starts the buyer and gateway with automatic HTTPS. It asks for the bundle password."}),e.jsx(r,{code:n.install,label:"Server"})]}),e.jsxs(o,{n:4,title:"Point your apps at the new address",children:[e.jsx("p",{children:"API keys stay the same. Only the base URL changes:"}),e.jsx(r,{code:n.baseUrl,label:"New base URL"})]}),e.jsxs(o,{n:5,title:"Stop the gateway on this computer",children:[e.jsxs("p",{children:["Press Ctrl+C where ",e.jsx("code",{children:"antseed gateway start"})," runs, which also stops the buyer it started (stop a buyer you run yourself too, or quit the desktop app's gateway), then delete the bundle on both machines. Never run both gateways: two buyers paying from the same wallet conflict."]}),e.jsx(r,{code:n.stop,label:"Both machines"})]})]}),e.jsxs("div",{className:"gc-migrate__note",children:[e.jsx("strong",{children:"Signing in afterwards."})," Everyone signs in again on the new address. Wallet and single sign-on keep working; passkeys are tied to the domain they were made on, so add a new one with a one-time link from the server:",e.jsx(r,{code:n.recover,label:"Server"})]}),e.jsxs("p",{className:"gc-fineprint",children:[e.jsx(l.shield,{size:12})," Wallet keys never pass through this browser: the console only shows commands. ",e.jsx("a",{className:"gc-link",href:C,target:"_blank",rel:"noreferrer",children:"Full guide"})]})]}),e.jsx(x,{title:"Alternative: keep it here behind a Cloudflare tunnel",description:"Gives this computer a public HTTPS address without moving anything.",children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(r,{code:n.tunnel,label:"This computer, instead of gateway start"}),e.jsxs("ul",{className:"gc-migrate__caveats",children:[e.jsx("li",{children:"Keys still stop working whenever this computer sleeps, loses its connection or restarts."}),e.jsxs("li",{children:["Needs a Cloudflare account and a named tunnel whose public hostname points at ",e.jsx("code",{children:"http://localhost:8379"}),"."]}),e.jsx("li",{children:"Traffic and model responses run through your home or office connection."})]}),e.jsxs("a",{className:"gc-link",href:T,target:"_blank",rel:"noreferrer",children:["Tunnel guide ",e.jsx(l.external,{size:12})]})]})})]}):e.jsx(p,{tone:"warning",title:"Not available",children:"Only organization owners and admins can move the gateway."})}export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,bW as k1,r as f,c0 as b1,Y as l1,bY as L1,O as V,aB as y1,I as v,R as I1,bZ as B1,c1 as S1,c2 as E1,c3 as N1,c4 as P1,bg as T1,L as D1,E as _,l as $,Q as z1,B as G,P as G1,T as O1,y as e1,b_ as R1,M as p,h as W1,g as r1,bx as B,b$ as Q,w as E,aN as O,v as m,X as R,bU as s1,c5 as Y1,aw as H1,ax as F1,az as V1,k as Q1}from"./index-DIcymBxc.js";import{T as Z1,a as U1}from"./Tabs-yVL4Cd6z.js";import{M as W,f as K1,S as J1,V as c1,P as b,T as Y,C as q1,a as X1,p as _1}from"./models-CLos5_p0.js";import{s as $1,l as e2}from"./stored-CFfx95Ep.js";import{D as s2}from"./DataTable-BTwj5g1m.js";import{S as t2}from"./SelectField-BWyF8Ku8.js";import"./roving-DkptacxO.js";function i2({size:e}){return s.jsx("svg",{width:e,height:e,viewBox:"0 0 508 508",fill:"currentColor","aria-hidden":"true",children:s.jsx("path",{d:"M321.997 150.712C321.401 150.568 320.844 150.299 320.363 149.925C319.883 149.551 319.491 149.08 319.215 148.544C318.938 148.008 318.783 147.42 318.76 146.821C318.738 146.22 318.848 145.624 319.084 145.07C327.226 125.716 330.819 110.23 325.021 103.747C309.666 86.5471 248.085 120.749 228.451 132.333C227.925 132.642 227.337 132.837 226.728 132.903C226.118 132.969 225.501 132.906 224.918 132.719C224.336 132.531 223.801 132.223 223.351 131.815C222.902 131.407 222.548 130.909 222.313 130.356C214.06 111.043 205.384 97.6094 196.589 97.0268C173.279 95.4688 154.491 162.187 148.991 183.932C148.844 184.515 148.57 185.06 148.188 185.528C147.805 185.998 147.323 186.381 146.775 186.651C146.227 186.921 145.626 187.072 145.012 187.094C144.399 187.116 143.788 187.009 143.221 186.778C123.406 178.825 107.545 175.316 100.914 180.98C83.305 195.978 118.315 256.126 130.175 275.304C130.492 275.816 130.692 276.391 130.76 276.987C130.829 277.582 130.765 278.186 130.573 278.755C130.381 279.325 130.065 279.847 129.647 280.286C129.228 280.725 128.718 281.07 128.15 281.298C108.384 289.359 94.6306 297.834 94.0272 306.424C92.439 329.192 160.74 347.544 183.01 352.916C183.605 353.061 184.16 353.33 184.64 353.704C185.118 354.077 185.509 354.548 185.785 355.083C186.061 355.618 186.215 356.205 186.237 356.803C186.26 357.402 186.151 357.998 185.916 358.551C177.773 377.905 174.181 393.398 179.979 399.874C195.334 417.074 256.921 382.877 276.556 371.293C277.081 370.984 277.67 370.789 278.28 370.722C278.889 370.655 279.507 370.717 280.09 370.905C280.673 371.093 281.207 371.402 281.657 371.81C282.106 372.219 282.46 372.717 282.694 373.271C290.947 392.578 299.616 406.012 308.417 406.601C331.728 408.153 350.516 341.44 356.009 319.688C356.157 319.106 356.432 318.562 356.816 318.094C357.2 317.625 357.682 317.243 358.231 316.974C358.779 316.705 359.381 316.554 359.995 316.533C360.608 316.511 361.219 316.619 361.786 316.85C381.601 324.803 397.455 328.304 404.093 322.648C421.702 307.65 386.684 247.495 374.825 228.317C374.51 227.804 374.312 227.229 374.245 226.634C374.177 226.039 374.242 225.436 374.434 224.868C374.626 224.299 374.941 223.777 375.358 223.338C375.775 222.899 376.284 222.552 376.85 222.323C396.623 214.261 410.376 205.786 410.973 197.196C412.568 174.428 344.26 156.078 321.997 150.712ZM295.254 128.885C299.734 136.73 276.646 189 259.474 225.561C259.186 226.172 258.715 226.682 258.121 227.024C257.528 227.365 256.842 227.521 256.155 227.47C255.468 227.419 254.814 227.164 254.28 226.739C253.746 226.314 253.358 225.739 253.169 225.093C246.234 201.322 238.306 173.392 229.824 149.683C229.491 148.752 229.508 147.736 229.871 146.817C230.235 145.897 230.921 145.133 231.808 144.662C252.989 133.363 289.234 118.358 295.254 128.885ZM193.746 135.355C202.589 137.807 224.103 190.714 238.424 228.426C238.664 229.056 238.699 229.742 238.527 230.393C238.354 231.044 237.983 231.627 237.461 232.065C236.939 232.503 236.292 232.775 235.608 232.844C234.923 232.913 234.234 232.775 233.632 232.45C211.501 220.453 185.694 206.159 162.529 195.253C161.622 194.823 160.901 194.093 160.493 193.192C160.085 192.292 160.018 191.279 160.303 190.335C167.12 167.736 181.865 132.069 193.746 135.355ZM126.652 210.04C134.676 205.664 188.197 228.216 225.621 244.989C226.248 245.269 226.771 245.73 227.12 246.31C227.47 246.889 227.629 247.56 227.577 248.23C227.524 248.901 227.264 249.54 226.828 250.062C226.393 250.582 225.805 250.962 225.143 251.147C200.813 257.921 172.211 265.664 147.937 273.949C146.985 274.272 145.946 274.255 145.007 273.9C144.067 273.545 143.286 272.876 142.805 272.011C131.257 251.322 115.867 215.92 126.652 210.04ZM133.275 309.188C135.779 300.551 189.952 279.537 228.562 265.548C229.207 265.315 229.91 265.28 230.576 265.448C231.243 265.617 231.84 265.98 232.288 266.49C232.736 266.999 233.015 267.631 233.085 268.299C233.155 268.968 233.015 269.641 232.682 270.23C220.392 291.846 205.758 317.053 194.592 339.672C194.156 340.561 193.409 341.269 192.486 341.668C191.563 342.068 190.525 342.134 189.557 341.853C166.42 335.235 129.905 320.792 133.275 309.188ZM209.739 374.722C205.252 366.884 228.347 314.608 245.519 278.054C245.806 277.442 246.279 276.931 246.872 276.59C247.465 276.249 248.151 276.093 248.838 276.144C249.525 276.194 250.179 276.45 250.713 276.875C251.247 277.3 251.634 277.874 251.824 278.521C258.759 302.285 266.686 330.222 275.169 353.932C275.499 354.862 275.481 355.877 275.117 356.795C274.752 357.713 274.064 358.475 273.178 358.945C252.004 370.223 215.752 385.256 209.76 374.722H209.739ZM311.247 368.252C302.397 365.807 280.883 312.894 266.562 275.182C266.322 274.55 266.285 273.862 266.458 273.21C266.63 272.559 267.003 271.974 267.526 271.536C268.049 271.097 268.697 270.826 269.382 270.758C270.068 270.69 270.759 270.83 271.361 271.157C293.485 283.154 319.299 297.455 342.457 308.362C343.366 308.789 344.089 309.519 344.497 310.42C344.905 311.321 344.971 312.335 344.683 313.28C337.872 335.912 323.128 371.544 311.247 368.252ZM378.341 293.566C370.31 297.949 316.795 275.391 279.365 258.618C278.738 258.338 278.215 257.877 277.866 257.297C277.516 256.718 277.357 256.047 277.409 255.377C277.461 254.706 277.722 254.067 278.158 253.546C278.593 253.025 279.181 252.646 279.843 252.461C304.18 245.687 332.775 237.943 357.049 229.658C358.003 229.335 359.043 229.353 359.984 229.709C360.925 230.065 361.706 230.737 362.188 231.603C373.729 252.285 389.119 287.693 378.341 293.566ZM371.718 194.419C369.207 203.063 315.041 224.077 276.431 238.066C275.784 238.3 275.08 238.335 274.413 238.167C273.746 237.999 273.148 237.635 272.698 237.124C272.249 236.613 271.972 235.98 271.903 235.31C271.833 234.641 271.975 233.966 272.311 233.377C284.594 211.768 299.228 186.554 310.394 163.935C310.833 163.048 311.58 162.343 312.502 161.945C313.425 161.546 314.462 161.481 315.429 161.76C338.566 168.413 375.081 182.815 371.718 194.419Z"})})}function n2({size:e}){return s.jsxs("svg",{width:e,height:e,viewBox:"0 0 200 200",fill:"currentColor","aria-hidden":"true",children:[s.jsx("path",{d:"M49.483 106.958c1.059-.325 2.375.167 3.109 1.192.233.317.3.767.383 1.167.025.116-.167.275-.333.416-1.034-.816-2-1.616-2.95-2.425-.092-.083-.134-.225-.209-.35m20.484-28.525c1.625-.266 3.25-.5 4.9-.416a4.5 4.5 0 0 1 1.233.216c1.683.592 3.35 1.225 5.008 1.867.234.083.417.3.625.458l-.108.225a66 66 0 0 1-2.167-.741c-.958-.317-1.775-.642-2.625-.817-2.083-.417-2.083-.383-2.433-.117l4.783 1.2c2.292 1.159 4.584 2.3 6.859 3.475.35.184.75.475.891.817.217.5.525.633.975.6.55-.05 1.1-.142 1.775-.225l-.333.717c.425.666 1.183.166 1.8.533-.617 1.083-2.058.75-2.783 1.658l.508.617-1 .725c0 .883-.317 1.4-2.55 2.025l.217.708-1.634.35.584 1.034h-2.084l-.058 1.141c-.675-.083-1.342-.15-2.033-.225l-.442 1.025c-.225-.066-.433-.091-.608-.191-.559-.317-1.067-.467-1.625.05-.159.141-.525.116-.775.066-.217-.05-.417-.241-.584-.35-.916.792-.916.792-1.733.025-.475.384-1 .617-1.55.092-.525.225-1.025-.167-1.483-.117-.584.059-.809-.291-1.109-.583l-1.083.275c-.108-1.967-1.617-1.583-2.833-1.692.041-.6.416-.766.791-.783.45-.017.9.05 1.325.183 1.367.417 2.667 1 4.134 1.15 1.691.175 3.375.242 5.008-.125 2.208-.491 4.333-1.241 5.892-3.041.408-.467.691-1.059.975-1.625.158-.317.166-.7-.167-.967a11.7 11.7 0 0 0-3.183-1.808c.2 1-.259 1.516-.959 1.841 0 .117-.033.209 0 .25.667.959.7 1.334-.058 2.225-.542.65-1.15 1.242-1.817 1.759-1.608 1.258-3.941 1.075-5.341-.417-.4-.392-.767-.817-1.109-1.267-.65-.891-.633-.9-.275-1.966-1.375-.667-1.066-1.884-.866-3.034.066-.416.233-.8.408-1.358-.333.117-.558.142-.725.267a7.44 7.44 0 0 0-2.633 2.975c-.059.133-.084.283-.167.391-.1.125-.283.317-.375.292-.167-.05-.308-.225-.417-.375-.066-.1-.058-.267-.1-.475h-1.05l.442-1.433c-.108-.134-.217-.275-.325-.409l.917-2.366c-.5.216-.759.366-1.034.425-.25.058-.533 0-.791 0 0-.259-.084-.584.033-.767 1.242-1.833 2.542-3.567 4.942-3.967"}),s.jsx("path",{d:"M67.167 89.9c-.025-.317-.034-.625.308-.517.133.05.283.4.233.559-.083.333-.316.266-.533-.042z"}),s.jsx("path",{d:"M99.842.075c1.883-.1 3.775-.092 5.658 0 2.058.083 4.125.2 6.167.517a79 79 0 0 1 9.916 2.275c3.859 1.15 7.667 2.491 11.3 4.258a60.93 60.93 0 0 1 24.567 22.017c2.433 3.908 4.467 8.025 6.158 12.325 1.825 4.633 3.717 9.25 5.192 14.025 1.7 5.45 2.742 11.05 3.817 16.641.808 4.2 1.516 8.417 2.416 12.592 1.3 6.017 2.742 12 4.117 18 1.55 6.767 3.333 13.458 5.25 20.125.85 2.958 1.608 5.942 2.35 8.933.917 3.634 1.683 7.3 2.117 11.025.258 2.317.55 4.642.608 6.975.092 2.442.05 4.892-.142 7.334-.308 3.441-.833 6.816-1.883 10.1a41.9 41.9 0 0 1-7.625 13.741l-1.083 1.3.15.192c.358-.192.733-.342 1.058-.567 1.667-1.15 3.108-2.558 4.425-4.083 3.333-3.833 6.008-8.108 8.125-12.742 2.075-4.483 3-9.408 2.708-14.333-.2-3.533-.808-6.95-2.5-10.108-.108-.225-.125-.5-.25-1.009.417.292.684.4.842.6.892 1.084 1.833 2.15 2.625 3.317 2.75 4.117 3.833 8.767 4.05 13.667a31.3 31.3 0 0 1-3.917 16.416c-3 5.459-7.391 9.5-12.716 12.55-1.609.925-3.284 1.75-4.959 2.567-1.308.65-2.066 1.758-2.65 3.042a4.35 4.35 0 0 0-.275 3.383c.109.375.15.767.109 1.158-.042.642-.642 1.292-1.167 1.35-.45.05-1.042-.358-1.25-.966a9.8 9.8 0 0 1-.5-1.942c-.333-2.617-1.292-5-2.567-7.25a32.4 32.4 0 0 0-6.083-7.583 17.7 17.7 0 0 0-7.475-4.367 34.7 34.7 0 0 0-5.767-1.092c-.625-.066-1.25-.333-1.833.084 1.5.5 3.025.916 4.483 1.5 3.617 1.441 6.834 3.583 9.834 6.066 2.566 2.125 4.833 4.525 6.616 7.367.817 1.292 1.55 2.625 1.892 4.133.225 1.025.35 2.084.558 3.125.109.517-.016.909-.441 1.2-.392.275-1.017.284-1.359-.083a3.8 3.8 0 0 1-.666-1.167c-.25-.608-.317-1.325-.65-1.875a60.9 60.9 0 0 0-11.859-13.866c-1.333-1.142-2.741-2.167-4.475-2.692-3.133-.95-6.275-1.692-9.583-1.283-1.775.208-3.558.266-5.333.441a13.36 13.36 0 0 0-6.134 2.317 42.6 42.6 0 0 0-6.95 6c-2.741 2.85-5.35 5.825-7.958 8.792-1.133 1.291-2.2 2.658-2.617 4.425l-.1.425a.8.8 0 0 1-.75.633h-2.583c-.383 0-.683-.4-.6-.783.192-.9.375-1.8.583-2.7.625-2.709 1.584-5.292 3.067-7.642.2-.325.333-.733.867-.667l.083.409.225.641c2.333-3.625 4.758-6.95 8.3-9.458 2.358-1.7 4.867-3.15 7.417-4.583a1.6 1.6 0 0 0-.817-.017c-1.35.358-2.708.7-4.042 1.117-3.35 1.033-6.366 2.75-9.25 4.716-1.225.834-2.483 1.609-3.45 2.775a60.9 60.9 0 0 0-8.916 14.725c-.134.325-.25.659-.334 1a.62.62 0 0 1-.6.467h-4.116c-.334 0-.517-.425-.3-.683 1.025-1.167 2.05-2.35 3.141-3.459 2.292-2.341 4.834-4.433 6.475-7.366.225-.4.525-.75.792-1.125 1.983-2.775 4.5-5.059 6.817-7.517.683-.717 1.458-1.333 2.166-2 .242-.225.442-.475.659-.708l-.15-.209-1.125.342c-.284.142-.584.258-.85.417-2.067 1.2-4.117 2.433-6.192 3.608-3.4 1.917-6.875 3.658-10.075 5.925-2.342 1.667-4.925 2.983-7.408 4.442-.167.1-.367.125-.667.233-.125-1.125 1.192-1.675.9-2.8-.275.117-.533.167-.708.317-.925.8-1.892 1.583-2.734 2.466-1.233 1.309-2.366 2.709-3.541 4.067-1.042 1.192-2.084 2.383-3.109 3.592-.233.283-.575.45-.941.458h-9.4c.05-.117.1-.233.133-.35.233-.75.708-1.433.692-2.333-.759-.15-1.35.008-1.767.641a36 36 0 0 0-1.133 1.792c-.084.133-.2.25-.35.25h-.775c-.159 0-.242-.183-.142-.308.592-.734 1.167-1.484 1.742-2.234.008-.016-.05-.1-.1-.2-.117.034-.25.05-.375.109-1.467.75-2.934 1.508-4.392 2.283a3 3 0 0 1-1.4.35h-21.8c-.217 0-.325-.3-.158-.442 1.75-1.483 3.35-3.116 4.65-5.041 2.791-4.134 4.483-8.725 5.558-13.575.033-.167-.025-.359-.05-.759-.308.4-.492.6-.633.834a16.2 16.2 0 0 1-2.784 3.458c-2.333 2.15-4.916 3.733-8.191 3.867-2.475.1-4.9 0-7.209-1.059-3.833-1.75-6.016-4.75-6.616-8.933-.209-1.417-.142-1.425-1.517-1.825-3.608-.967-7-2.617-9.983-4.858a19.1 19.1 0 0 1-6.734-9.417 29.8 29.8 0 0 1-1.333-10.375c.017-.283.133-.558.2-.833.267.191.383.358.417.55.275 1.275.491 2.566.8 3.833.716 2.958 2.141 5.533 4.3 7.667 2.15 2.133 4.758 3.491 7.583 4.433 2.983.983 5.975 1.15 8.917-.133a15.7 15.7 0 0 0 5.175-3.767c2.733-2.9 4.441-6.333 5.4-10.192.075-.283.041-.591.058-.916-.125.05-.217.05-.25.091-.258.417-.533.834-.775 1.267-2.367 4.183-5.658 7.392-9.967 9.458-2.925 1.417-5.983 2.125-9.25 1.325a13.4 13.4 0 0 1-8.091-5.333 16.7 16.7 0 0 1-3.067-7.7 24.1 24.1 0 0 1 .167-7.383c.416-3.659 3.883-9.75 6.183-10.592-.167.525-.292.933-.442 1.333-.358.967-.808 1.892-1.083 2.875a15.9 15.9 0 0 0-.417 6.834c.275 1.766.75 3.466 1.7 5 1.225 1.966 2.884 3.391 5.167 3.875.917.191 1.875.116 2.817.15a4.8 4.8 0 0 0 3.216-1.092c1.367-1.067 2.35-2.433 3.05-4.008 1.4-3.125 2-6.475 2.575-9.825.417-2.467.775-4.95 1.109-7.442.325-2.342.591-4.692.866-7.042.217-1.933.4-3.866.617-5.8.2-1.9.433-3.791.633-5.691.2-1.892.392-3.792.575-5.692.109-1.167.184-2.333.284-3.5l.308-3.475c.183-2.083.342-4.167.542-6.233.066-.684-.167-1.1-.75-1.475a20.5 20.5 0 0 1-4.1-3.484c-.834-.908-1.567-1.9-2.35-2.85-.292-.35-.467-.808-.967-.983.5 1.767 1.267 3.45 2.292 4.975.5.767 1.091 1.467 1.633 2.208.525.717 1.517.959 1.95 1.884-.233.025-.383.083-.5.05-.617-.142-1.225-.3-1.833-.475a22.54 22.54 0 0 1-10.725-6.825c-3.625-4.059-5.467-8.967-5.917-14.359-.258-2.941-.225-5.9.117-8.833.6-5.017 1.833-9.883 3.75-14.542 1.291-3.133 2.816-6.175 4.383-9.183 1.708-3.275 3.883-6.25 6.375-8.967 4.267-4.658 9.2-8.533 14.383-12.066 5.975-4.084 12.317-7.484 18.975-10.275 4.317-1.817 8.675-3.45 13.2-4.6C83.042 2.733 88.5 1.367 94.1.658c1.908-.25 3.817-.483 5.733-.583zM84.45 190.242c-.583.5-1.225.925-1.725 1.5-1.983 2.25-3.867 4.575-5.567 7.241l-.366.9c.3-.075.575-.241.775-.475 1.45-1.583 2.925-3.15 4.325-4.783.866-1.017 1.625-2.125 2.4-3.217.2-.283.25-.666.383-1zM98.2 159.45a45.7 45.7 0 0 0-5.442 4.942l-3.083 3.216a8 8 0 0 1-3.142 2.084 11.5 11.5 0 0 1-3.891.75c-.367 0-.725.05-1.259.1.234.483.359.808.534 1.091 1.25 2.017 2.508 4.017 3.75 6.034 1.133 1.833 2.3 3.65 3.325 5.55.566 1.041.875 2.225 1.3 3.366.641.225 1.166-.15 1.683-.4 2.417-1.125 4.825-2.283 7.225-3.433 1.775-.842 3.642-1.55 5.3-2.583 2.892-1.792 5.667-3.792 8.483-5.709.125-.083.217-.233.35-.383-.191-.158-.316-.308-.466-.367-2.392-.925-4.392-2.5-6.417-4.016a45 45 0 0 1-4.217-3.5 14.8 14.8 0 0 1-3.416-5.442c-.159-.408-.375-.792-.625-1.3zm-48.725 2.2c-.5.8-.808 1.617-1.1 2.442a28.2 28.2 0 0 1-4.625 8.416c-1.667 2.084-3.792 3.434-6.35 4.109-1.917.5-3.867.633-5.833.583-.4-.017-.809.017-1.317.042.133.333.175.55.292.708.833 1.208 1.916 2.05 3.333 2.458 1.308.384 2.633.284 4.15.192a9 9 0 0 0 4.042-1.95c1.983-1.658 3.35-3.783 4.466-6.1 1.459-3.025 2.2-6.258 2.85-9.533.084-.442.067-.917.092-1.367m124.542-38.217c.066.242.133.475.225.892.2 1.292.425 2.583.6 3.867.25 1.825.558 3.641.65 5.475.141 2.866.225 5.741-.117 8.608-.308 2.625-.525 5.275-.967 7.883a51.2 51.2 0 0 1-3.833 12.65c-.067.15-.083.325-.167.684.392-.25.642-.35.817-.534.708-.691 1.417-1.391 2.067-2.125 2.258-2.541 3.816-5.5 4.966-8.691 1.5-4.15 1.9-8.425 1.209-12.759-.859-5.416-2.75-10.525-4.975-15.675-.067-.15-.134-.308-.2-.458zM48.308 69.083c-.083.434-.025.875.15 1.275a366 366 0 0 0 3.159 6.25c.208.409.55.75.25 1.359-2.367.5-4.817.991-7.334 2.125.492.316.809.5 1.1.725.35.266.934.483.75 1-.083.275-.625.4-.975.6.142.083.359.175.559.3 1.383.85 2.75 1.725 3.725 3.066 1.15 1.6 1.908 3.367 1.566 5.367-.658 3.908-2.55 7.083-5.75 9.433-.45.334-.883.692-1.341 1.017-.667.45-1 1.25-.859 2.042.084.558.234 1.108.459 1.625.691 1.633 1.833 2.916 3.125 4.1a12.3 12.3 0 0 1 1.85 2.141c.641.925.716 2.134.208 3.142-.192.417-.417.825-.633 1.233-.25.5-.234.925.183 1.35.342.35.667.742.933 1.15.317.484.65.659 1.225.417a4.07 4.07 0 0 1 2.775-.05c1.334.383 2.517 1.05 3.7 1.75 1.084.642 2.2 1.242 3.334 1.825.558.292 1.166.417 1.825.217.591-.184 1.033.083 1.208.633.167.533-.025.9-.617 1.158-.583.25-1.141.525-1.741.734-.834.291-1.675.608-2.617.641-.108-.891.917-.733 1.058-1.325-1.716-1.05-5.358-1.208-6.675-.283.525.933.292 1.75-.8 2.608-1.083-.833-.208-1.683.017-2.5a1.7 1.7 0 0 0-.358-.033c-.85 0-1.575.617-1.717 1.45-.125.842.558 1.8 1.483 1.867.9.058 1.817-.042 2.717-.1.5-.042 1-.225 1.658 0-.858 1.025-2.066 1.058-2.975 1.583.017.417.584.717.159 1.092-.442.4-.792-.009-1.1-.25-.667-.525-1.334-1.05-1.925-1.642a3.95 3.95 0 0 1-1.309-2.592 4.3 4.3 0 0 0-.358-1.433c-.267-.617-.267-1.142.275-1.583-.15-.25-.233-.442-.375-.6a10.3 10.3 0 0 1-1.633-3.075c-.442-1.142-.384-2.2.4-3.175.2-.25.416-.5.533-.792a5.5 5.5 0 0 0 .392-1.4c.141-1.375-.534-2.392-1.517-3.225-1.55-1.3-3-2.683-3.833-4.592-.042-.091-.2-.141-.309-.216-.091.141-.2.225-.208.316-.158 1.542-.375 3.084-.433 4.642-.117 3.142.483 6.192 1.35 9.2.983 3.417 2.408 6.65 4.066 9.775a904 904 0 0 0 6.767 12.5c.458.817 1.083 1.575 1.733 2.25 1.65 1.683 3.767 2.267 6.034 2.275 1.683 0 3.366-.05 5.041-.217 2.459-.25 4.917-.608 7.367-.941 1.525-.209 3.042-.475 4.567-.667 1.75-.217 3.166.608 4.35 1.75 1.333 1.3 2.541 2.725 3.725 4.167 1.833 2.208 3.308 4.666 4.616 7.225.417.816.584.833 1.225.25 1.084-1.009 2.167-2.017 3.284-3 .558-.492.733-1 .558-1.775a29.6 29.6 0 0 1-.708-6.634c.016-1.308.05-2.616.15-3.925.125-1.866.25-3.75.5-5.6.883-6.4 1.883-12.783 3.016-19.15.725-4.108 1.517-8.2 2.234-12.308.5-2.892.983-5.783 1.35-8.692.283-2.275.458-4.583.525-6.875.091-2.766.025-5.541.016-8.316 0-.642.034-1.292-.083-1.917-.233-1.183-.083-1.292-1.35-1.583a49 49 0 0 0-5.058-.892c-1.217-.15-1.725-.442-1.842-1.583-.05-.409-.208-.817-.342-1.217-.075-.208-.2-.4-.383-.75l-.208 2.2c-.075.8-.242.967-1.059.958-.458 0-.916-.066-1.366-.066-3.967 0-7.934-.067-11.884.266-.791.067-1.441-.125-1.883-.858-.333-.55-.733-1.05-1.117-1.55-.525-.7-.716-.775-1.516-.5-1.625.567-3.234 1.15-4.85 1.75a22.7 22.7 0 0 0-5.625 3.283 8.1 8.1 0 0 1-2.692 1.4c-.275.084-.583.067-1.058.109.166-.55.2-.95.391-1.25.534-.875 1.125-1.709 1.709-2.55.191-.275.408-.525.608-.792l-.125-.192-1.675.309c-1.217.333-2.467.583-3.642 1.016-1.233.442-2.216.192-3.216-.6a30.2 30.2 0 0 1-6.109-6.55zm71.6 74.692-1.225.75c-1.833 1.117-3.666 2.217-5.491 3.35-.775.483-1.534 1-2.25 1.567-.709.583-1.034 1.341-.6 2.266.391.834.775 1.667 1.225 2.45.391.667 1.033 1.15 1.775 1.225.916.084 1.9.1 2.8-.1 1.808-.416 3.1-1.708 4.4-2.975a2.42 2.42 0 0 0 .725-2.566c-.384-1.5-.659-3.042-.984-4.559-.091-.433-.225-.858-.375-1.408m-2.141-20.075c-1 2.425-1.709 4.975-2.709 7.583a342 342 0 0 0-3.625 11.025c.3-.083.45-.083.559-.15 2.175-1.333 4.35-2.7 6.541-4.033.45-.275.592-.65.542-1.15-.1-1.083-.2-2.183-.283-3.275l-.567-7.383c-.067-.859-.167-1.717-.242-2.584-.075 0-.141-.016-.216-.033m25.675-67.75.825 2.375a291 291 0 0 1 2 5.95l4.833 16.267c1.558 5.25 3.1 10.516 4.65 15.775.95 3.183 1.958 6.35 2.858 9.55.6 2.141 1.05 4.325 1.55 6.658.367 1.717.725 3.442 1.059 5.333.283.884.191 1.884.641 2.709l.209-.05-.567-3.017c-.317-1.717-.642-3.433-.942-5.317-.125-.583-.241-1.175-.383-1.758-.792-3.3-1.475-6.633-2.417-9.892-1.633-5.708-3.441-11.366-5.15-17.05-1.375-4.575-2.683-9.166-4.066-13.733-.575-1.892-1.25-3.75-1.884-5.792l-.975-2.8c-.308-.891-.625-1.8-.958-2.683s-.7-1.75-1.058-2.617c-.075.025-.15.059-.225.084zM51.875 119.2c-.525-.008-.958.117-1.117.692a2.92 2.92 0 0 0 3.417.1 37 37 0 0 0-2.3-.792m-8.292-19.367c-.216-.225-.475-.4-.625.017-.1.267-.058.583-.083.942.683-.309.683-.309.708-.959m.517-9.908c-.3.05-.558.217-.733.467-.159.275-.234.6-.209.916.042 1.267.084 2.55.217 3.809.092.633.275 1.241.55 1.816.508 1.134 1.308 1.392 2.4.842.458-.225.5-.45.208-.917a38 38 0 0 1-1.075-1.758c-.125-.567-.55-1.092-.275-1.725.334-.75-.633-.967-.616-1.583v-1.175c-.025-.317-.05-.725-.467-.692m-.142-8.067a7.2 7.2 0 0 0-3.891 1.059c-.634.375-.7.583-.417 1.316.283.725.583 1.442.958 2.117.534.975.75 1.042 1.75.642a5.47 5.47 0 0 1 2.8-.442c1.684.183 2.975 1.133 4.2 2.2l.767.642c.058-.05.117-.109.183-.15-.158-.875-.291-1.884-1.241-2.2-1.309-.442-2.7-.625-4.234-.975l-2-.042c2-1.408 3.767-.367 5.725.075-.525-.958-1.275-1.225-1.916-1.608-.684-.417-1.417-.767-2.084-1.2-.5-.309-1-.667-.6-1.434m85.275 2.709c-1.916-.084-3.558.666-5.066 1.758-.284.217-.5.542-.875.975.725.217 1.25.383 1.933.542.367-.125.733-.25 1.083-.384 2.55-.95 5.084-.958 7.534.259 1.05.525 1.975.333 3.05-.042-.167-.258-.25-.45-.375-.592a8.2 8.2 0 0 0-3.734-2.275c-1.166-.366-2.366-.2-3.55-.25zm-62.65-30.542c-.075.367-.066.742.017 1.108.667 2.675 1.3 5.359 2.017 8.017.866 3.225 2.25 6.25 3.8 9.192.166.308.508.666.816.725a3.38 3.38 0 0 0 2.109-.425l-3.934-7c-1.916-3.734-3.375-7.667-4.825-11.617M86.642 4.142a26.7 26.7 0 0 0-5.025.283 47 47 0 0 0-5.834 1.267c-2.391.666-4.741 1.5-7.1 2.275-.333.108-.616.316-.916.483.233.117.416.15.583.117 2.392-.567 4.833-.709 7.275-.75 1.117-.017 2.242.075 3.35.208 1.583.2 3.183.4 4.75.75 3.8.867 7.283 2.5 10.542 4.633 3.866 2.55 7.4 5.5 10.475 8.984 1.708 1.933 3.291 3.958 4.666 6.158 1.417 2.283 2.625 4.675 3.742 7.133 2.275 5.009 3.8 10.267 5 15.634.333 1.441.583 2.9.833 4.366.142.867.542 1.392 1.417 1.584 1.017.233 1.667.875 1.833 2.091-.025.85-.5 1.45-1.075 2a8.8 8.8 0 0 0-2.233 2.984c.258-.042.5-.15.692-.325.666-.717 1.35-1.434 1.958-2.209a4.66 4.66 0 0 0 1.083-2.775c.075-.416.184-.833.2-1.25.059-1.033-.141-1.25-1.191-1.4-.209-.033-.409-.116-.609-.125-.683-.058-1.041-.525-1.141-1.091-.275-1.65-.034-2.959 2.058-3.4.717-.15 1.45-.25 2.167-.35 1.316-.192 2.625-.442 3.941-.559 1.167-.1 1.584.275 1.884 1.392.066.242.15.475.175.725.158 1.492-.067 1.875-1.175 2.4-.225.108-.459.2-.65.35a1.23 1.23 0 0 0-.425.558c-.325 1.2.608 3.184 1.716 3.709l5.609 2.666c.191.092.416.125.625.192l.15-.217c-.125-.066-.267-.108-.367-.2a19.2 19.2 0 0 0-4.533-2.666 44 44 0 0 0-1.442-.625 1.71 1.71 0 0 1-1.05-1.592c-.025-.708.375-1.283 1.067-1.558l.491-.209c.825-.366.984-.633.934-1.558a4 4 0 0 0-.067-.525c-.558-2.45-1.025-4.917-1.708-7.333a79 79 0 0 0-6.884-16.967 62.2 62.2 0 0 0-11.583-15.042 37.8 37.8 0 0 0-9.808-6.866 30.6 30.6 0 0 0-8.467-2.734 52 52 0 0 0-5.933-.616m55.991 49.625c.084.116.15.233.317.283l-.183-.367zM34.192 32.642a.47.47 0 0 1-.25.1 4 4 0 0 1-.334.325 4 4 0 0 1-.375.333l-3.025 2.95c-.733.708-1.416 1.483-2.216 2.108-2.367 1.834-3.542 4.417-4.534 7.125a1.1 1.1 0 0 0-.058.592c.108.458.275.9.433 1.4l.617.217c-.142.466-.25.875-.392 1.266-.483 1.367-.983 2.725-1.458 4.092-.042.125.067.3.158.642.667-1.459 1.317-2.75 1.875-4.075 1.9-4.534 4.034-8.95 6.825-13.009a85 85 0 0 1 2.359-3.341c.033-.05.058-.109.183-.25.008-.134.025-.267.125-.334zm108.133 20.066c.05.042.075.1.075.159-.017.025-.033.058-.05.083.017.058.033.108.058.167l.15.183c.017-.058.059-.133.042-.175-.025-.083-.1-.15-.167-.317-.033-.033-.075-.066-.108-.1M34.992 37.333c-.025.034-.067.067-.225.117-.042.108-.092.208-.259.392-.325.483-.666.941-1.033 1.391-.4.584-.967.459-1.508.342-1.117-.233-1.9.133-2.392 1.192-.742 1.558-1.558 3.083-2.275 4.666-.408.9-.917 1.8-.983 3 .675.025 1.283.059 1.9.067h1.9c-.184.742-.4 1.475-.659 2.2-.083.433-.183.858-.275 1.292l.167.033c.15-.383.308-.767.558-1.275.55-1.183 1.084-2.375 1.667-3.55.167-.333.283-.833.967-.767 0 .359.033.7 0 1.034-.042.375-.142.75-.234 1.191 1.175.359.717 1.45.959 2.242.85-.183.866-1.625 2.066-1.2v1.708l.142.017 3.658-8.825c-1.083 0-2.05-.167-2.983.275-.2.092-.483-.008-.9-.033.625-1.25 1.158-2.317 1.758-3.475.05-.109.125-.217.209-.3 0-.125-.009-.25.066-.317l.05-.167c-.041.05-.083.092-.233.142-.033.1-.075.2-.217.375a.7.7 0 0 1-.266.275c-1.025 1.308-.75 1.367-2.15.883-.659-.225-.65-.233-.392-1.2.233-.383.467-.775.817-1.25 0-.133-.009-.266.058-.35l.05-.125zm17.275-5.583c-.025.05-.059.092-.225.133-.784 1.042-1.617 2.05-2.334 3.142-1.291 1.983-2.508 4.008-3.758 6.025-1.167 1.867-2.875 3.067-4.792 4.008-.141.067-.333.05-.658.092.1-.492.133-.908.275-1.275a51 51 0 0 1 1.908-4.317l-.058-.166a1 1 0 0 1-.292.208c-.233.417-.458.833-.775 1.367-2.166 3.533-3.691 6.808-3.683 7.916.2.034.4.092.608.109 1.475.108 1.567.058 2.167-1.375.25-.584.642-1 1.225-1.25l1.458-.584c.367-.15.709-.475 1.217-.266.025.416-.083.916.117 1.208.35.517.366 1.042.391 1.608.017.409.142.817.217 1.225.242-.283.325-.541.417-.808C46.875 45.5 48 42.233 49.258 39c.834-2.133 1.834-4.2 2.75-6.3.109-.25.109-.558.25-.767v-.183zm33.225-2.833c0 .375.083.7.175 1.025.35 1.333.783 2.65 1.033 4 .2 1.108.192 2.25.233 3.383 0 .275-.158.558-.266.917-.784-.484-.392-1.317-.884-1.792h-1.041c-.125.6-.084 1.267-.384 1.667-.55.708-1.291 1.283-1.966 1.891-.359.317-.65.15-.859-.208l-.383-.725c-.542.292-.975.575-1.433.775-.967.425-1.959.792-2.917 1.225-.708.317-.75.442-.583 1.225.116.625.283 1.233.391 1.858.109.6.417.909 1.025 1.034 1.942.416 3.85.958 5.475 2.208.484-.85.484-.85 1.4-1.258.25-.117.5-.25.767-.35.667-.25.958-.142 1.25.5.192.4.342.816.55 1.316.5-1.166-.35-2.225.142-3.466 1.308 1.5 2 3.25 3.125 4.725a2 2 0 0 0 .183-.817c.017-1.033 0-2.058.017-3.092 0-.283.108-.558.166-.833l.267-.025c.917 1.292 1.083 2.95 1.883 4.333a25 25 0 0 0-.083-3.266c-.033-.375 0-.617.417-.734.666.3.966 1.167 1.791 1.317-.25-2.292-3.525-9.475-6.65-13.625-.95-1.058-1.666-2.333-2.833-3.217zm-22.225 5.8c-.159.283-.25.416-.309.558-.508 1.542-1.041 3.083-1.5 4.633-.258.875-.725 1.409-1.625 1.584-.75.158-1.483.433-2.233.608-.317.075-.742.125-.983-.025-.2-.133-.209-.575-.3-.883-.534.633-.684.725-1.417.391-1.108-.516-2.183-1.125-3.275-1.675-.4-.208-.775-.525-1.417-.25-.358 1-.758 2.084-1.141 3.184-.825 2.333-.725 2.016.791 3.775.384.4.85.25 1.284.191.45-.075.883-.25 1.333-.3 1.083-.108 2.167-.666 3.058-.125 1.7-.533 3.225-1.016 4.759-1.483.416-.125.741.042.95.45.183.35.283.775.683 1.008.317-.466-.108-1.066.525-1.483l1.167 2.008zm2.316 2.983c-.8-.083-.891.083-.916.9-.017.317-.025.65.016.958.25 1.667.825 3.217 1.45 4.75.017.05.1.084.184.125l.65-.416c.433.3.675.733 1.275.733 1.708-.017 3.416.117 5.133.1.825-.008 1.317.35 1.708 1 .15.25.2.642.734.55l-.667-3.283c-.417-1.625-.708-3.292-1.433-4.909-.475.475-.95.567-1.5.384a5.7 5.7 0 0 0-1.125-.234c-1.834-.233-3.667-.491-5.5-.666zm85.45-14.392c.742 1.359 1.292 2.634 1.159 4.092-.134 1.4.216 2.85-.367 4.3-.392-.275-.733-.683-.933-.625-.975.292-1.367-.475-1.892-.958a41 41 0 0 1-2.383-2.417l-.867-.942c-.067.05-.125.109-.192.159.292.383.584.775.917 1.3.333.533.7 1.058 1.017 1.608.283.483.541.983.258 1.708-.683-.083-1.367-.158-2.05-.266-.5-.084-.842 0-1.033.583-.259.817-.309.8-1.25.75.166.35.3.667.475.967.341.616.25 1.15-.25 1.633-.5.5-.984 1.017-1.484 1.508a1.46 1.46 0 0 1-1.541.384c-1.85-.509-3.725-.942-5.584-1.45-.266-.075-.525-.334-.716-.567-.25-.333-.434-.725-.667-1.083-.367-.584-.75-1.15-1.133-1.725a1.5 1.5 0 0 0-.117.875c.1 1.058.25 2.108.292 3.166.041.834-.2 1-1.009.867-.866-.142-1.716-.333-2.583-.483-.533-.1-1.092-.234-1.683.25l.675 1.733c.75 0 1.383-.083 1.975.017 1.466.258 2.808 1 3.816 2.091.65.692 1.284 1.4 2.009 2.167l.15-.042c-.034-.05-.067-.108-.084-.333.117-.467-.516-.983.15-1.483.259.25.534.475.734.75.483.65.925 1.325 1.408 2.141l.742 1.175.2-.108c-1.184-2.592-2.375-5.192-3.559-7.783.459.058.692.058.9.133 1.609.583 3.209 1.183 4.809 1.8.616.233 1.225.5 1.825.783.516.234.933.15 1.308-.275.417-.466.85-.933 1.283-1.391.417-.425.792-.384 1.1.116.134.209.217.442.334.667.591 1.15 1.191 2.308 1.808 3.608l1.325 2.567.208-.092c-.366-.883-.583-1.816-1.15-2.783-.475-1.517-1.4-2.883-1.716-4.542 1.133.284 3.016 2.717 4.725 6.1l.475.617.15-.092c-.159-.35-.309-.7-.434-1.058-.383-1.208-.808-2.417-1.133-3.633-.183-.692-.3-1.442.183-2.167l.909.483-.217-1.725.225-.133c.183.167.417.3.542.5.608.9 1.191 1.833 1.791 2.75.084.133.242.242.359.358-.3-1.808-1.667-3.166-1.909-5.216l1.292.933c.117-1.383.1-2.658.35-3.875.267-1.317-.192-2.475-.525-3.708.2.033.3.05.458.208.767 1.033 1.525 2.075 2.309 3.092.166.225.416.391.575.725l.333.525.158-.125a2.5 2.5 0 0 1-.441-.684 234 234 0 0 1-2.767-4.083c-1.842-2.592-3.025-3.892-4.042-4.342m-54.75 2.725c-.025 1.342.767 2.292.575 3.459l-3.066.725c.75 1.158.266 1.975-.434 2.758-.416.475-.766 1.017-1.191 1.483-.309.334-.384.65-.15 1.05L93.35 37.8c.242.4.6.55 1.067.533.633-.025 1.266 0 1.9-.008.966-.025 1.8.183 2.291 1.142.05.116.167.2.367.433.033-.492-.025-.817.083-1.083.134-.334.334-.825.6-.9.7-.192 1.442-.2 2.167-.25.108-.009.225.15.333.241l.592.542c.158-.917-.683-1.65-.2-2.583l1.05.333c-.217-1.025-.583-2.042-.592-3.05 0-1.025.425-2.025.959-3 .891.517 1.333 1.3 1.95 2.108 1.525 2.209 3 4.442 4.116 6.95 1.375-.65 2.25.567 3.392.734-.025-.884-1.108-3.675-1.642-4.1a1.2 1.2 0 0 0-.85-.234c-.5.092-.991.325-1.591.525-.209-.325-.467-.65-.642-1.016a33 33 0 0 0-3.942-6.525c-.633-.784-1.333-1.517-1.9-2.167L99.6 28.8c-.408.292-.783.25-1.1-.142l-1.408-1.725c-.209-.25-.442-.491-.809-.9"})]})}const a2="#D97757",l2="#FF60B8",r2="#084CCF",c2="#4D6BFE",o2="#3859FF",d2="#4285F4",h2="#FA500F",u2="#0668E1",g2="#26A5E4",C2=new URL("data:image/svg+xml,%3csvg%20fill='%23F38020'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCloudflare%3c/title%3e%3cpath%20d='M16.5088%2016.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559%200%200%201-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489%202.1601-.8868%202.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039%200-4.6284%201.6177-5.3876%203.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665%201.083-2.2861%202.2856-.0283.31-.0069.6128.0635.894C1.5683%2013.171%200%2014.7754%200%2016.752c0%20.1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909%200%20.1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771%200-.1611%200-.2383.0112-.0566%200-.1054.0415-.127.0976l-.3378%201.1744c-.1475.5068-.0918.9707.1543%201.3164.2256.3164.6055.498%201.0625.5195l1.8437.1133c.0557%200%20.1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527%201.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771%200%20.1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803%200-2.6025-2.125-4.727-4.7344-4.727'/%3e%3c/svg%3e",import.meta.url).href,m2=new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20256%20256'%20role='img'%3e%3ctitle%3engrok%3c/title%3e%3cpath%20fill='%231F1E37'%20d='M210.695%2058.494c-3.381-4.044-7.198-7.535-11.288-10.637-3.654-2.715-7.525-5.098-11.724-7.037-2.018-.942-4.144-1.717-6.38-2.438-3.217-1.052-6.707-1.773-10.306-2.382h-45.369L95.636%2070.739V36.72H32V220h63.637V96.336H155.4l4.963-.11v123.719H224V105.312q0-14.627-2.781-26.096c-1.854-7.59-5.344-14.46-10.524-20.722'/%3e%3c/svg%3e",import.meta.url).href,A2="data:image/png;base64,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",x2="data:image/png;base64,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",p2={anthropic:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsxs("g",{stroke:a2,strokeWidth:2,strokeLinecap:"round",children:[s.jsx("path",{d:"M12 3v18"}),s.jsx("path",{d:"M3 12h18"}),s.jsx("path",{d:"M5.6 5.6l12.8 12.8"}),s.jsx("path",{d:"M18.4 5.6L5.6 18.4"})]})}),openai:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M12.9851 6.93777C13.1163 6.54364 13.1618 6.12607 13.1186 5.71295C13.0754 5.29983 12.9444 4.90072 12.7344 4.54231C12.4232 4.00021 11.9478 3.57101 11.3768 3.31664C10.8058 3.06227 10.1687 2.99589 9.55751 3.12706C9.28184 2.81639 8.943 2.56818 8.56362 2.39905C8.18425 2.22993 7.77314 2.14379 7.3578 2.1464C6.73292 2.1449 6.1237 2.34187 5.61797 2.70892C5.11225 3.07598 4.73616 3.59415 4.54391 4.18873C4.13684 4.27206 3.75225 4.44139 3.41591 4.68539C3.07957 4.92938 2.79924 5.24241 2.59368 5.60352C2.27994 6.14413 2.14602 6.77039 2.21123 7.39205C2.27644 8.01367 2.5374 8.59851 2.95649 9.06224C2.82527 9.45637 2.77975 9.87394 2.82297 10.2871C2.8662 10.7002 2.99718 11.0993 3.20713 11.4577C3.51841 11.9998 3.99385 12.4289 4.56484 12.6833C5.13584 12.9377 5.77289 13.0041 6.38407 12.8729C6.65975 13.1836 6.99862 13.4318 7.37796 13.601C7.75734 13.7701 8.16844 13.8562 8.58379 13.8536C9.20899 13.8552 9.81853 13.6582 10.3244 13.2909C10.8304 12.9236 11.2065 12.4051 11.3986 11.8101C11.8057 11.7268 12.1903 11.5575 12.5266 11.3135C12.8629 11.0695 13.1433 10.7564 13.3488 10.3953C13.6622 9.85477 13.7958 9.22866 13.7304 8.60726C13.6651 7.98587 13.4041 7.40129 12.9851 6.93777ZM8.58472 13.0883C8.0715 13.089 7.57441 12.9093 7.18031 12.5805C7.19808 12.5708 7.22925 12.5537 7.24956 12.5413L9.58061 11.1948C9.63911 11.1615 9.6877 11.1133 9.72136 11.055C9.75505 10.9967 9.77258 10.9305 9.77217 10.8632V7.57684L10.7575 8.14576C10.7626 8.14834 10.7671 8.15214 10.7704 8.15685C10.7738 8.16157 10.7759 8.16704 10.7766 8.17275V10.8943C10.7759 11.4756 10.5448 12.0329 10.1339 12.4441C9.72308 12.8554 9.16599 13.087 8.58472 13.0883ZM3.87091 11.075C3.61385 10.6309 3.5212 10.1105 3.60918 9.60485C3.62649 9.61524 3.65673 9.6337 3.67842 9.64617L6.00947 10.9926C6.06756 11.0266 6.13365 11.0445 6.20094 11.0445C6.2682 11.0445 6.33428 11.0266 6.39238 10.9926L9.23834 9.34936V10.4872C9.23867 10.493 9.23755 10.4988 9.23509 10.5041C9.23264 10.5094 9.22892 10.5139 9.22427 10.5174L6.86782 11.878C6.36379 12.1683 5.76516 12.2467 5.20333 12.0962C4.64148 11.9457 4.1623 11.5784 3.87091 11.075ZM3.25768 5.98617C3.51363 5.54141 3.91789 5.2009 4.39966 5.02421C4.39966 5.04429 4.39851 5.07985 4.39851 5.10452V7.79747C4.3981 7.86473 4.41561 7.93087 4.44924 7.98915C4.48287 8.04739 4.5314 8.09563 4.58984 8.1289L7.4358 9.77197L6.45054 10.3409C6.44568 10.3441 6.44009 10.346 6.43429 10.3465C6.4285 10.3471 6.42265 10.3462 6.41729 10.3439L4.06062 8.98216C3.55747 8.69077 3.19039 8.21176 3.03987 7.65013C2.88935 7.08853 2.96768 6.49014 3.25768 5.98617ZM11.3527 7.86994L8.50669 6.22667L9.49198 5.65799C9.49684 5.6548 9.50243 5.65283 9.50823 5.65231C9.51402 5.65178 9.51985 5.65272 9.5252 5.655L11.8819 7.01554C12.2429 7.2241 12.5371 7.53119 12.7299 7.90087C12.9228 8.27056 13.0063 8.68752 12.9707 9.10295C12.9351 9.51839 12.7819 9.91509 12.5291 10.2466C12.2762 10.5781 11.9341 10.8307 11.5428 10.9749C11.5428 10.9546 11.5428 10.919 11.5428 10.8943V8.20137C11.5434 8.13423 11.5261 8.06814 11.4926 8.0099C11.4592 7.95165 11.4109 7.90336 11.3527 7.86994ZM12.3333 6.394C12.316 6.38337 12.2858 6.36514 12.2641 6.3527L9.93303 5.00621C9.87493 4.97232 9.80887 4.95444 9.74158 4.95444C9.67432 4.95444 9.60824 4.97232 9.55014 5.00621L6.70418 6.64951V5.51167C6.70386 5.50585 6.70497 5.50005 6.70743 5.49479C6.70988 5.48952 6.7136 5.48492 6.71826 5.48144L9.0747 4.12203C9.4357 3.91387 9.84853 3.81281 10.2649 3.83068C10.6812 3.84856 11.0838 3.98462 11.4257 4.22296C11.7675 4.46129 12.0344 4.79204 12.1951 5.17652C12.3559 5.56099 12.4038 5.98327 12.3333 6.394ZM6.16851 8.42203L5.18299 7.85311C5.17784 7.85053 5.17336 7.84673 5.17002 7.84202C5.16668 7.8373 5.16455 7.83183 5.16385 7.82609V5.10452C5.16411 4.6877 5.28311 4.27956 5.5069 3.9279C5.73071 3.57623 6.05006 3.29559 6.42756 3.11883C6.80507 2.94206 7.22509 2.87649 7.63851 2.92977C8.05195 2.98306 8.44163 3.153 8.76197 3.41971C8.74421 3.42941 8.71327 3.44649 8.69272 3.45895L6.36168 4.80542C6.30317 4.83867 6.25462 4.8869 6.22093 4.94516C6.18727 5.0034 6.16974 5.06958 6.17012 5.13683L6.16851 8.42203ZM6.70371 7.26803L7.97126 6.53595L9.23878 7.26757V8.73127L7.97126 9.46292L6.70371 8.73127V7.26803Z",fill:"currentColor"})}),codex:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4.5",stroke:"currentColor",strokeWidth:1.7}),s.jsxs("g",{stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M7.2 9.2l3.2 2.8-3.2 2.8"}),s.jsx("path",{d:"M12.8 15.2h4"})]})]}),opencode:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"3.5",stroke:"currentColor",strokeWidth:1.8}),s.jsx("rect",{x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.5",fill:"currentColor"})]}),t3code:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 64 64","aria-hidden":"true",children:s.jsx("image",{width:"64",height:"64",href:A2})}),pi:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M6 4.5h10.5v10.5h-5.25V19.5H6V4.5zm3.5 3.5v3.5H13V8H9.5z",fill:"currentColor",fillRule:"evenodd"})}),crush:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M12 20.2S4 15.2 4 9.6C4 6.9 6 5 8.4 5c1.5 0 2.8.7 3.6 1.9C12.8 5.7 14.1 5 15.6 5 18 5 20 6.9 20 9.6c0 5.6-8 10.6-8 10.6z",fill:l2})}),goose:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M15.2 3.5c1.5 0 2.6 1.1 2.6 2.5 0 .4-.1.8-.3 1.2l2.5 1-2.3 1c-.1 2.6-1.2 4-2.7 5.2-1.1.9-1.8 1.6-2 2.9h3.3v2.2H6.2c-1.9 0-3.2-1.3-3.2-3 0-1.8 1.4-3 3.3-3h2.9c.9 0 1.6-.4 2.2-1 .9-.9 1.5-1.9 1.6-3.4-.9-.4-1.5-1.3-1.5-2.4 0-1.8 1.5-3.2 3.7-3.2z",fill:"currentColor"})}),zed:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"2.5",y:"2.5",width:"19",height:"19",rx:"5",fill:r2}),s.jsx("path",{d:"M7.5 7.5H16.5L7.5 16.5H16.5",stroke:"#fff",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]}),deepseek:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("path",{d:"M3 13.5c3.2 0 4.6-1.6 6.2-3.4 1.5-1.7 3-3.4 6.3-3.4 2 0 3.4.7 4.5 1.7-.6 2.1-1.7 3.3-3.2 4-1.9.9-3 .3-4.6 1.2C15.8 15 13.9 17.5 10 17.5c-4 0-7-2-7-4z",fill:c2}),s.jsx("circle",{cx:"16.3",cy:"9.4",r:"0.9",fill:"#fff"})]}),qwen:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M12 2.5l3.4 6h-6.8L12 2.5zM4.2 8.2h6.8l-3.4 6-3.4-6zM13 8.2h6.8l-3.4 6-3.4-6zM8.6 15.5h6.8L12 21.5l-3.4-6z",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round"})}),kimi:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"2.5",y:"2.5",width:"19",height:"19",rx:"5.5",fill:"#141416"}),s.jsx("rect",{x:"2.5",y:"2.5",width:"19",height:"19",rx:"5.5",stroke:"currentColor",strokeOpacity:.25,strokeWidth:.75}),s.jsxs("g",{stroke:"#fff",strokeWidth:2.1,strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M8.2 6.8v10.4"}),s.jsx("path",{d:"M8.2 13.4l7-6.6"}),s.jsx("path",{d:"M10.6 11.4l5 5.8"})]})]}),glm:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"2.5",y:"2.5",width:"19",height:"19",rx:"6",fill:o2}),s.jsx("path",{d:"M8.5 8.2h7l-7 7.6h7",stroke:"#fff",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]}),gemini:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M12 2.5c.6 5.3 4.2 8.9 9.5 9.5-5.3.6-8.9 4.2-9.5 9.5-.6-5.3-4.2-8.9-9.5-9.5 5.3-.6 8.9-4.2 9.5-9.5z",fill:d2})}),grok:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:[s.jsx("path",{d:"M5 5l14 14"}),s.jsx("path",{d:"M19 5l-5.6 5.6"})]})}),mistral:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M4 19V5h3l5 6 5-6h3v14h-3v-8.6l-5 6-5-6V19H4z",fill:h2})}),minimax:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 32 32","aria-hidden":"true",children:s.jsx("image",{width:"32",height:"32",href:x2})}),llama:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M7 8.5c-4.5 0-4.5 7 0 7 4.5 0 5.5-7 10-7 4.5 0 4.5 7 0 7-4.5 0-5.5-7-10-7z",stroke:u2,strokeWidth:1.8})}),telegram:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",fill:g2})}),hermes:n2,droid:i2,cursor:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:s.jsx("path",{fill:"currentColor",d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})}),cloudflare:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:s.jsx("image",{width:"24",height:"24",href:C2})}),ngrok:({size:e})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:s.jsx("image",{width:"24",height:"24",href:m2})}),generic:({size:e})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4",stroke:"currentColor",strokeWidth:1.7}),s.jsx("circle",{cx:"12",cy:"12",r:"2.4",fill:"currentColor"})]})},j2=[["cloudflare",/cloudflare/i],["ngrok",/ngrok/i],["kimi",/(kimi|moonshot)/i],["glm",/(glm|zhipu)/i],["deepseek",/deep-?seek/i],["qwen",/(qwen|tongyi)/i],["gemini",/(gemini|gemma|google)/i],["grok",/(grok|(^|[^a-z0-9])x-?ai([^a-z0-9]|$))/i],["mistral",/(mistral|mixtral|magistral|devstral|codestral)/i],["minimax",/mini[-\s]?max/i],["llama",/llama/i],["telegram",/telegram/i],["hermes",/^(?:hermes(?:-agent)?)(?: hermes(?: agent)?)?$/i],["droid",/(^|[^a-z0-9])(droid|factory)([^a-z0-9]|$)/i],["cursor",/(^|[^a-z0-9])cursor([^a-z0-9]|$)/i],["anthropic",/(anthropic|claude)/i],["codex",/codex/i],["openai",/(openai|chatgpt|gpt|gpt-)/i],["opencode",/(opencode|open-code)/i],["t3code",/(^|[^a-z0-9])t3[ -]?code([^a-z0-9]|$)/i],["crush",/crush/i],["goose",/goose/i],["zed",/(^|[^a-z0-9])zed([^a-z0-9]|$)/i],["pi",/(gooey-?pi|(^|[^a-z0-9])pi([^a-z0-9]|$))/i]],f2=4096,L=new Map;function o1(...e){const t=e.filter(Boolean).join(" ");if(!t)return"generic";const n=L.get(t);if(n)return n;let c="generic";for(const[d,l]of j2)if(l.test(t)){c=d;break}return L.size>=f2&&L.clear(),L.set(t,c),c}function d1({name:e,hints:t,brand:n,size:c=20,className:d,style:l}){const o=n??o1(e,...t??[]),i=p2[o];return s.jsx("span",{className:d,style:{display:"inline-flex",...l},"aria-hidden":"true",children:s.jsx(i,{size:c})})}const v2={anthropic:"Anthropic",openai:"OpenAI",codex:"OpenAI",gemini:"Google",kimi:"Moonshot",glm:"Z.ai",deepseek:"DeepSeek",qwen:"Qwen",grok:"xAI",mistral:"Mistral",minimax:"MiniMax",llama:"Meta"};function t1(e){return v2[o1(e.provider,e.label)]??null}function h1({model:e,format:t,id:n="gc-api-call",unsupported:c}){const d=k1(),[l,o]=f.useState("curl");if(!t)return s.jsx("p",{className:"gc-fineprint",children:c??"The gateway does not serve this model through its API."});const i=b1(d,e,t),h=i.find(g=>g.id===l)??i[0];return s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsx(Z1,{id:n,label:"Request examples",value:h.id,onChange:o,className:"gc-connect-tabs",tabs:i.map(g=>({id:g.id,label:g.label}))}),s.jsx(U1,{tabsId:n,tab:h.id,children:s.jsx(l1,{code:h.code,label:h.label})}),s.jsxs("p",{className:"gc-fineprint",children:["Set ",s.jsx("code",{children:L1})," to one of your API keys first. ",s.jsx(V,{to:"keys",children:"API keys"})]})]})}function i1({label:e,values:t,options:n,onChange:c,width:d=240}){const l=new Set(t),o=i=>c(l.has(i)?t.filter(h=>h!==i):[...t,i]);return s.jsx(y1,{label:`Filter by ${e.toLowerCase()}`,multiple:!0,align:"start",width:d,triggerStyle:"plain",className:"as-button as-button--outline as-button--sm gc-filter-menu",trigger:s.jsxs(s.Fragment,{children:[s.jsx("span",{children:e}),t.length>0&&s.jsx("span",{className:"gc-filter-menu__count",children:t.length}),s.jsx(v.down,{size:14})]}),items:[...n.map(i=>({label:i.label,checked:l.has(i.value),...i.icon?{icon:i.icon}:{},...i.section?{section:i.section}:{},onSelect:()=>o(i.value)})),t.length>0&&{label:"Clear",section:" ",onSelect:()=>c([])}]})}const H={search:"",types:[],tags:[],families:[],free:!1,tee:!1},F={...W,router:"Router"},w2=["text","image","video","decision","router"];function M2(e,t){return[...e.map(n=>({kind:"model",key:n.id,model:n})),...t.map(n=>({kind:"router",key:n.id,router:n}))]}function S(e){return e.kind==="router"?"router":e.model.type}function y(e){return e.kind==="router"?e.router.name:e.model.name}function u1(e){return e.kind==="router"?[]:e.model.tags}function k2(e){return e.kind==="router"?e.router.free:e.model.free}function b2(e){return e.kind==="model"&&e.model.teeSellers>0}function Z(e){var t;return e.kind==="router"?null:{provider:((t=e.model.offers[0])==null?void 0:t.provider)??"",label:`${e.model.name} ${e.model.id}`}}function L2(e){if(e.kind==="router"){const{router:n}=e;return[n.name,n.id,n.serviceId,n.provider,n.sellerName??"",n.protocol,"router routing"].join(" ").toLowerCase()}const{model:t}=e;return[t.id,t.name,...t.aliases,...t.tags,...t.offers.map(n=>n.provider),F[t.type]].join(" ").toLowerCase()}function y2(e,t){const n=new Set(e.map(S)),c=new Set(e.flatMap(u1)),d=new Set(e.flatMap(l=>{const o=Z(l),i=o?t(o):null;return i?[i]:[]}));return{types:w2.filter(l=>n.has(l)),tags:[...c].sort((l,o)=>l.localeCompare(o)),families:[...d].sort((l,o)=>l.localeCompare(o))}}function I2(e,t,n){const c=t.search.trim().toLowerCase(),d=new Set(t.types),l=new Set(t.families);return e.filter(o=>{if(d.size>0&&!d.has(S(o))||t.free&&!k2(o)||t.tee&&!b2(o))return!1;if(t.tags.length>0){const i=new Set(u1(o));if(!t.tags.every(h=>i.has(h)))return!1}if(l.size>0){const i=Z(o),h=i?n(i):null;if(!h||!l.has(h))return!1}return!c||L2(o).includes(c)})}function B2(e){return!!(e.search.trim()||e.types.length||e.tags.length||e.families.length||e.free||e.tee)}function S2(e,t){return t.flatMap(n=>{const c=n.toLowerCase(),d=e.find(l=>l.key.toLowerCase()===c)??e.find(l=>l.kind==="model"&&l.model.aliases.some(o=>o.toLowerCase()===c));return d?[d]:[]})}function n1(e){return e.kind==="router"?1:e.model.sellers}function E2(e){var t;return e.kind==="router"?e.router.priceUsdPerRequest:((t=e.model.inputUsdPerMillion)==null?void 0:t.min)??null}const g1="antseed-console-models:filter",z="Favorites";function C1(e){return e===null?"—":String(Math.round(e))}function m1(e){return e===null?"—":Q1(e)}function A1(e){return e.fullTeeSellers>0?"end-to-end":e.offers.some(t=>t.teeScope==="seller-node")?"seller-node":null}function I(e){return e.displayName??E(e.peerId,8,4)}function x1(e){return e.sellerName??E(e.peerId,8,4)}function N2(e){return e.priceUsdPerRequest===null?"No price advertised":e.free?"Free":`${r1(e.priceUsdPerRequest)} per ranking`}function P2(){const e=e2(g1,{});return{...H,...e,search:""}}function T2({entry:e}){const t=Z(e);return s.jsx("span",{className:"gc-model-name__mark","aria-hidden":"true",children:t?s.jsx(d1,{name:t.provider,hints:[t.label],size:18}):s.jsx(v.routing,{size:16})})}function D2({entry:e}){if(e.kind==="router")return s.jsxs("div",{className:"gc-badges",children:[s.jsx(m,{children:"Router"}),e.router.free&&s.jsx(m,{tone:"success",children:"Free"})]});const{model:t}=e;return s.jsxs("div",{className:"gc-badges",children:[t.free&&s.jsx(m,{tone:"success",children:"Free"}),s.jsx(Y,{tee:t.teeSellers>0,scope:A1(t)}),t.tags.slice(0,3).map(n=>s.jsx(m,{children:n},n))]})}function a1({id:e,name:t,starred:n,onToggle:c}){return s.jsx(V1,{size:"sm",className:"gc-star",label:n?`Unstar ${t}`:`Star ${t}`,"aria-pressed":n,onClick:d=>{d.stopPropagation(),c(e,!n)},children:n?s.jsx(v.starFilled,{size:15}):s.jsx(v.star,{size:15})})}function Z2(){const e=I1(),t=B1(e.rest),n=S1(),c=E1(),d=N1(),l=P1(),[o,i]=f.useState(P2),h=T1();f.useEffect(()=>{$1(g1,{...o,search:""})},[o]);const g=(r,j)=>i(A=>({...A,[r]:j})),x=f.useMemo(()=>M2(n.data??[],c.data??[]),[n.data,c.data]),N=f.useMemo(()=>y2(x,t1),[x]),U=f.useMemo(()=>new Set((d.data??[]).map(r=>r.toLowerCase())),[d.data]),P=r=>U.has(r.key.toLowerCase()),T=(r,j)=>l.mutate({id:r,favorite:j}),u=t?(c.data??[]).find(r=>r.id.toLowerCase()===t.toLowerCase())??null:null,C=t&&!u?K1(n.data,t):null,w=(u==null?void 0:u.id)??(C==null?void 0:C.id)??null,p1=t===null?null:{eyebrow:u?"Router":"Model",title:(u==null?void 0:u.name)??(C==null?void 0:C.name)??t,actions:w?s.jsx(a1,{id:w,name:(u==null?void 0:u.name)??(C==null?void 0:C.name)??w,starred:U.has(w.toLowerCase()),onToggle:T}):void 0,body:n.isLoading||c.isLoading?s.jsx(D1,{rows:6}):u?s.jsx(O2,{router:u},u.id):C?s.jsx(z2,{model:C},C.id):s.jsx(_,{icon:s.jsx(v.models,{size:18}),title:"Model not found",body:`No provider on the network offers ${t} right now.`})},D=B2(o),K=I2(x,o,t1),M=D?[]:S2(x,d.data??[]),j1=M.length?K.filter(r=>!M.includes(r)):K,f1=[...N.types.map(r=>({value:`type:${r}`,label:F[r],section:"Type"})),{value:"free",label:"Free",section:"Price and privacy"},{value:"tee",label:"TEE",section:"Price and privacy"},...N.tags.map(r=>({value:`tag:${r}`,label:r,section:"Tags"}))],v1=[...o.types.map(r=>`type:${r}`),...o.free?["free"]:[],...o.tee?["tee"]:[],...o.tags.map(r=>`tag:${r}`)],w1=r=>i(j=>({...j,types:r.filter(A=>A.startsWith("type:")).map(A=>A.slice(5)),tags:r.filter(A=>A.startsWith("tag:")).map(A=>A.slice(4)),free:r.includes("free"),tee:r.includes("tee")})),J=N.families.map(r=>({value:r,label:r,icon:s.jsx(d1,{name:r,hints:[r],size:16})})),q=(r,j,A)=>s.jsx(s2,{label:r,rows:j,rowKey:a=>a.key,selectedKey:w,onRowClick:a=>e1(Q("models",a.key)),rowLabel:y,actions:a=>[{label:a.kind==="router"?"Copy router model id":"Copy model id",onSelect:()=>void h(a.key)},{label:P(a)?"Unstar":"Star",onSelect:()=>T(a.key,!P(a))}],initialSort:r===z?void 0:{key:"sellers",direction:"desc"},empty:A,columns:[{key:"model",header:"Model",sortValue:a=>y(a).toLowerCase(),render:a=>s.jsxs("div",{className:"gc-model-name",children:[s.jsx(T2,{entry:a}),s.jsxs("div",{className:"gc-cell-lines",children:[s.jsx("div",{className:"gc-strong gc-ellipsis",title:a.key,children:y(a)}),a.kind==="router"?s.jsxs("div",{className:"gc-muted gc-ellipsis",children:["by ",x1(a.router)," · ",s.jsx(p,{children:a.router.serviceId})]}):a.model.name!==a.model.id&&s.jsx("div",{className:"gc-muted gc-ellipsis",children:s.jsx(p,{children:a.model.id})}),s.jsx(D2,{entry:a})]})]}),after:a=>s.jsxs(s.Fragment,{children:[s.jsx(a1,{id:a.key,name:y(a),starred:P(a),onToggle:T}),s.jsx(R1,{value:a.key,label:`Copy model id ${a.key}`})]})},{key:"type",header:"Type",secondary:!0,sortValue:S,render:a=>s.jsx("span",{className:"gc-muted",children:F[S(a)]})},{key:"sellers",header:"Providers",align:"right",sortValue:n1,render:a=>W1(n1(a))},{key:"input",header:"Input $/M",align:"right",sortValue:E2,render:a=>a.kind==="router"?s.jsx("span",{className:"gc-muted",children:a.router.free?"Free":a.router.priceUsdPerRequest===null?"—":`${r1(a.router.priceUsdPerRequest)}/ranking`}):B(a.model.inputUsdPerMillion)},{key:"output",header:"Output $/M",align:"right",secondary:!0,sortValue:a=>{var X;return a.kind==="model"?((X=a.model.outputUsdPerMillion)==null?void 0:X.min)??null:null},render:a=>a.kind==="model"?B(a.model.outputUsdPerMillion):"—"},{key:"context",header:"Context",align:"right",secondary:!0,optional:!0,sortValue:a=>a.kind==="model"?a.model.contextLength:null,render:a=>a.kind==="model"?m1(a.model.contextLength):"—"}]}),M1=s.jsxs("div",{className:"gc-stack",children:[M.length>0&&s.jsx($,{flush:!0,title:z,children:q(z,M,null)}),s.jsx($,{flush:!0,title:M.length>0?"All models":void 0,children:s.jsx(z1,{query:n,rows:8,children:()=>q("Models",j1,s.jsx(_,{icon:s.jsx(v.models,{size:18}),title:x.length?"No models match these filters":"No models found yet",body:x.length?void 0:"The buyer is still discovering the network. Check back in a minute.",action:D?s.jsx(G,{variant:"outline",size:"sm",onClick:()=>i(H),children:"Clear filters"}):void 0}))})})]});return s.jsxs("div",{className:"gc-page",children:[s.jsx(G1,{title:"Models",description:"Every model and router on the network. Star the ones you use; open one to see its providers, copy its id and get a ready-to-run API call."}),s.jsxs("div",{className:"gc-toolbar",children:[s.jsx(O1,{size:"sm",type:"search","aria-label":"Search models or routers",placeholder:"Search models or routers",value:o.search,onChange:r=>g("search",r.target.value)}),s.jsx(i1,{label:"Type",values:v1,options:f1,onChange:w1}),J.length>0&&s.jsx(i1,{label:"Family",values:o.families,options:J,onChange:r=>g("families",r)}),D&&s.jsx(G,{variant:"ghost",size:"sm",onClick:()=>i(H),children:"Clear filters"})]}),s.jsx(J1,{list:M1,panel:p1,onClose:()=>e1("models"),closeLabel:"Close model"})]})}function k(e){return`${e.peerId}:${e.serviceId}`}function z2({model:e}){const[t,n]=f.useState(""),c=e.offers.find(i=>k(i)===t)??null,d=c?s1(c.peerId,c.serviceId):e.id,l=Y1(e.type,c),o=e.offers.some(i=>i.usdPerImage!==null);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("span",{className:"gc-seller__meta",children:[s.jsxs("span",{className:"gc-peer-id",children:[s.jsx(p,{title:e.id,children:e.id}),s.jsx(O,{iconOnly:!0,value:e.id,label:"Copy model id"})]}),s.jsx(m,{children:W[e.type]}),e.free&&s.jsx(m,{tone:"success",children:"Free"}),s.jsx(Y,{tee:e.teeSellers>0,scope:A1(e)})]}),s.jsx(R,{items:[["Context",m1(e.contextLength)],["Capabilities",e.capabilities.length?s.jsx("span",{className:"gc-badges",children:e.capabilities.map(i=>s.jsx(m,{children:q1[i]},i))}):"—"],["Tags",e.tags.length?s.jsx("span",{className:"gc-badges",children:e.tags.map(i=>s.jsx(m,{children:i},i))}):"—"],["Aliases",e.aliases.length?s.jsx(p,{children:e.aliases.join(", ")}):"—"],...o?[]:[["Input $/M",B(e.inputUsdPerMillion)],["Output $/M",B(e.outputUsdPerMillion)]]]})]}),s.jsx(b,{title:`Providers (${e.offers.length})`,children:e.offers.length===0?s.jsx("p",{className:"gc-fineprint",children:"No provider offers this model right now."}):s.jsx("ul",{className:"gc-panel-rows","aria-label":"Providers offering this model",children:e.offers.map(i=>{var x;const h=s1(i.peerId,i.serviceId),g=t===k(i);return s.jsx(X1,{selected:g,title:s.jsx(V,{to:Q("providers",i.peerId),children:I(i)}),meta:s.jsxs(s.Fragment,{children:[s.jsx("span",{children:_1(i)}),s.jsxs("span",{children:["Trust ",C1(i.trustScore)]}),i.firstTokenMsP50!==null&&s.jsxs("span",{children:[H1(i.firstTokenMsP50)," first token"]}),i.tokensPerSecondP50!==null&&s.jsx("span",{children:F1(i.tokensPerSecondP50)}),i.serviceId!==e.id&&s.jsx(p,{children:i.serviceId})]}),badges:(((x=i.verificationLinks)==null?void 0:x.length)||i.tee||i.free)&&s.jsxs("div",{className:"gc-badges",children:[s.jsx(c1,{links:i.verificationLinks}),s.jsx(Y,{tee:i.tee,scope:i.teeScope}),i.free&&s.jsx(m,{tone:"success",children:"Free"})]}),actions:s.jsxs(s.Fragment,{children:[s.jsx(O,{iconOnly:!0,value:h,label:`Copy ${I(i)}'s model id (peer@model)`}),s.jsx(G,{size:"sm",variant:g?"outline":"ghost","aria-pressed":g,title:"Use this provider in the API call below",onClick:()=>n(g?"":k(i)),children:g?"Pinned":"Pin"})]})},k(i))})})}),s.jsxs(b,{title:"API call",actions:e.offers.length>0&&s.jsx(t2,{size:"sm","aria-label":"Route the call",value:t,onChange:n,options:[{value:"",label:"Best provider (automatic)"},...e.offers.map(i=>({value:k(i),label:I(i)}))]}),children:[s.jsx("p",{className:"gc-fineprint",children:c?s.jsxs(s.Fragment,{children:["Pinned to ",I(c)," with ",s.jsx("code",{children:E(d,10,12)}),"."]}):s.jsxs(s.Fragment,{children:["The gateway picks the best provider for ",s.jsx("code",{children:e.id})," under your routing policy."]})}),s.jsx(h1,{id:"gc-model-call",model:d,format:l,unsupported:`${W[e.type]} models are not served through the gateway's /v1 API.`})]})]})}function G2(e){return e.default===void 0?"—":String(e.default)}function O2({router:e}){var d;const t=((d=e.models)==null?void 0:d.includes("*"))??!1,n=(e.models??[]).filter(l=>l!=="*"),c=e.options.some(l=>l.key==="cost_quality_tradeoff")?JSON.stringify({model:e.id,routing:{cost_quality_tradeoff:3},messages:[{role:"user",content:"Hello"}]},null,2):null;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("span",{className:"gc-seller__meta",children:[s.jsxs("span",{className:"gc-peer-id",children:[s.jsx(p,{title:e.id,children:E(e.id,10,16)}),s.jsx(O,{iconOnly:!0,value:e.id,label:"Copy router model id"})]}),s.jsx(m,{children:"Router"}),e.free&&s.jsx(m,{tone:"success",children:"Free"})]}),s.jsxs("p",{className:"gc-fineprint",children:["Send ",s.jsx("code",{children:e.id})," as the model: the router ranks the models your key's routing policy allows and the gateway sends the request to its pick, falling back to the next one if a seller refuses. Logs show the router and the model it picked."]}),s.jsx(R,{items:[["Offered by",s.jsx(V,{to:Q("providers",e.peerId),children:x1(e)},"s")],["Service",s.jsx(p,{children:e.serviceId},"v")],["Protocol",s.jsx(p,{children:e.protocol||"—"},"p")],["Price",N2(e)],["Trust",C1(e.trustScore)],...e.verificationLinks.length?[["Verified",s.jsx(c1,{links:e.verificationLinks},"l")]]:[]]})]}),e.options.length>0&&s.jsxs(b,{title:"Settings",children:[s.jsx(R,{items:e.options.map(l=>[l.label,s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("span",{children:[s.jsx(p,{children:l.key})," · default ",G2(l),"minimum"in l&&l.minimum!==void 0&&"maximum"in l&&l.maximum!==void 0?` · ${l.minimum}–${l.maximum}`:""]}),l.description&&s.jsx("span",{className:"gc-muted",children:l.description})]},l.key)])}),c&&s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"gc-fineprint",children:["Set them per request in a ",s.jsx("code",{children:"routing"})," object; they never reach the seller."]}),s.jsx(l1,{code:c,label:"Request body"})]})]}),s.jsx(b,{title:"Models it ranks",children:e.models===null?s.jsx("p",{className:"gc-fineprint",children:"This router did not list its models."}):t?s.jsx("p",{className:"gc-fineprint",children:"Any model: it ranks every model your key allows."}):n.length===0?s.jsx("p",{className:"gc-fineprint",children:"None listed."}):s.jsx("span",{className:"gc-badges",children:n.map(l=>s.jsx(m,{children:l},l))})}),s.jsx(b,{title:"API call",children:s.jsx(h1,{id:"gc-router-call",model:e.id,format:"openai-chat-completions"})})]})}export{Z2 as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,u as te,F as ae,r as k,aI as q,ah as I,aQ as ne,aR as re,w,Z as se,aS as p,B as N,aT as ie,aU as y,T as oe,D as le,aO as M,aV as ce,aG as de,aW as he,q as ue,aX as we,aY as fe,aF as Y,aZ as Q,a_ as R,$ as P}from"./index-
|
|
1
|
+
import{j as e,u as te,F as ae,r as k,aI as q,ah as I,aQ as ne,aR as re,w,Z as se,aS as p,B as N,aT as ie,aU as y,T as oe,D as le,aO as M,aV as ce,aG as de,aW as he,q as ue,aX as we,aY as fe,aF as Y,aZ as Q,a_ as R,$ as P}from"./index-DIcymBxc.js";import{u as H,a as V,T as G,D as C,s as K}from"./useTx-WkiDSW_A.js";import{a as ge,C as U}from"./ConnectWallet-DQ0PC6SO.js";import{W as me,u as X,c as F,b as pe,r as Z}from"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./writeContract-DrAWt0yz.js";import"./sendTransaction-CqpP3CZj.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";async function J(s,i,a){let c=await R.sync(s,i);for(let d=0;d<3&&!p(c.operator??y,a??y);d+=1)await new Promise(n=>setTimeout(n,3500)),c=await R.sync(s,i);return c}function ee(s){const i=F(),a=q(s,"deposits");return async c=>{if(!a)throw new M("The gateway did not report the deposits contract address.",!1);const[d,n]=await Promise.all([Z(i,{address:a,abi:C,functionName:"getOperator",args:[c],chainId:s.chainId}),Z(i,{address:a,abi:C,functionName:"getOperatorNonce",args:[c],chainId:s.chainId})]);return{operator:p(d,y)?null:d,nonce:n}}}function ye({workspaceId:s,state:i,chain:a,onChanged:c,onStale:d}){const{address:n}=X(),W=F(),o=H(a.chainId),{writeContractAsync:B}=V(),{signMessageAsync:_}=pe(),{me:z}=te(),E=ae(),v=ee(a),[x,h]=k.useState(!1),[f,b]=k.useState(!1),[g,u]=k.useState(null),m=q(a,"deposits");if(!m)return e.jsx(I,{tone:"warning",children:"The gateway did not report the deposits contract address."});if(!n)return e.jsx(U,{label:"Connect the wallet to authorize"});const j=ne(i,n);async function A(r){try{const t=await R.authorize(s,r);return h(!1),t}catch(t){return P(t,"reauth_required")?(h("any"),o.setError(null),null):P(t,"reauth_other_credential")?(h("other"),o.setError(null),null):(P(t,"operator_already_set")&&d(),o.setError(Y(t)),null)}}async function S(r){u(r);let t=await A(r);if(!t)return;const O={depositsContract:m,chainId:a.chainId,operator:r},L=await o.run([{label:"Authorize wallet",check:async()=>{try{Q(t,await v(t.buyer),O)}catch($){if(!($ instanceof M)||!$.retryAuth)throw $;o.setStatus("The operator nonce changed; getting a fresh authorization…");const D=await R.authorize(s,r);Q(D,await v(D.buyer),O),t=D}await K(W,{account:n,address:m,abi:C,functionName:"setOperator",args:[t.buyer,r,BigInt(t.nonce),t.signature],chainId:a.chainId})},send:()=>B({address:m,abi:C,functionName:"setOperator",args:[t.buyer,r,BigInt(t.nonce),t.signature],chainId:a.chainId})}],{onStale:d});L&&c(await J(s,L,r))}async function l(r){b(!0),o.setError(null);try{const t=r==="passkey"?await ce():await de(n,O=>_({message:O}));if(he(t,z.member.id),E.setQueryData(ue.me,t),h(!1),g&&n&&!p(g,n)){o.setError(`Confirmed. Switch back to ${w(g)}, then authorize it.`);return}await S(g??n)}catch(t){o.setError(fe(t)?we:Y(t))}finally{b(!1)}}const T=re(i);return e.jsxs("div",{className:"gc-stack",children:[e.jsxs("p",{children:["Authorize ",e.jsx("code",{children:w(n)})," to withdraw this workspace's funds and claim its ANTS rewards. It will be the only wallet able to transfer or remove the role later."]}),T.length>0&&e.jsx("ul",{className:"gc-fineprint",children:T.map(r=>e.jsxs("li",{children:[e.jsx("code",{children:w(r.address)})," ",r.ready?"can be authorized":`can be authorized from ${se(r.eligibleAt)}`,p(r.address,n)?" (connected)":""]},r.address))}),j&&e.jsx(I,{tone:"warning",children:j}),x&&e.jsx(I,{tone:"info",title:"Confirm it is you",children:e.jsxs("div",{className:"gc-stack gc-stack--tight",children:[e.jsx("span",{children:x==="other"?`Confirm with a different sign-in method than ${w(g??n)}, the wallet you are authorizing: a passkey, or another of your wallets (connect it, confirm, then switch back).`:"Authorizing a withdrawal wallet needs a fresh sign-in."}),e.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[e.jsx(N,{size:"sm",disabled:f,onClick:()=>void l("passkey"),children:"Confirm with a passkey"}),e.jsx(N,{size:"sm",variant:"outline",disabled:f,onClick:()=>void l("wallet"),children:f?"Check your wallet…":`Confirm with ${w(n)}`})]})]})}),e.jsx(G,{chain:a,runner:o,done:"Wallet authorized."}),e.jsx(N,{fullWidth:!0,disabled:o.running||f||!!j,onClick:()=>void S(n),children:o.running?"Working…":"Authorize this wallet"}),e.jsxs("p",{className:"gc-fineprint",children:["You will sign in again, then confirm one transaction from this wallet (it pays the network fee in ETH on ",a.name,")."]})]})}function xe({workspaceId:s,state:i,chain:a,onChanged:c,onStale:d}){const{address:n}=X(),W=F(),o=H(a.chainId),{writeContractAsync:B}=V(),_=ee(a),[z,E]=k.useState(""),[v,x]=k.useState(!1),[h,f]=k.useState(null),b=q(a,"deposits"),g=ie(i,n);if(!b)return e.jsx(I,{tone:"warning",children:"The gateway did not report the deposits contract address."});if(!n)return e.jsx(U,{label:`Connect ${w(i.operator)} to manage it`});if(!g.canManage)return e.jsx(I,{tone:"warning",children:g.manageHint??"Only the authorized wallet can transfer or remove the role."});const u=z.trim(),m=/^0x[0-9a-fA-F]{40}$/.test(u)&&!p(u,y),j=i.eligibleWallets.some(l=>p(l.address,u)),A=p(u,i.buyer);async function S(l){f(null);const T=await o.run([{label:l===y?"Remove authorized wallet":"Transfer authorization",check:async()=>{const r=await _(i.buyer);if(!p(r.operator,n))throw new M(`The authorized wallet is now ${r.operator?w(r.operator):"not set"}, not the connected wallet. The panel now shows it.`,!0);await K(W,{account:n,address:b,abi:C,functionName:"transferOperator",args:[i.buyer,l],chainId:a.chainId})},send:()=>B({address:b,abi:C,functionName:"transferOperator",args:[i.buyer,l],chainId:a.chainId})}],{onStale:d});T&&(E(""),x(!1),c(await J(s,T,l===y?null:l)))}return e.jsxs("div",{className:"gc-stack",children:[e.jsx("p",{children:"The connected wallet is the authorized wallet. You can hand the role to another wallet or remove it. Both are immediate and only the new wallet (or, after removal, the organization owner through the gateway) can change it again."}),e.jsx(oe,{label:"New authorized wallet",placeholder:"0x…",value:z,onChange:l=>{E(l.target.value),x(!1)},error:z&&!m?"Enter a 0x wallet address.":A?"That is the workspace wallet itself; the gateway CLI handles that case.":void 0}),m&&!A&&!j&&e.jsxs("label",{className:"gc-inline",children:[e.jsx("input",{type:"checkbox",checked:v,onChange:l=>x(l.target.checked)}),e.jsxs("span",{children:[w(u)," is not one of your sign-in wallets. I control it, or trust whoever does with this workspace's withdrawals and rewards."]})]}),e.jsx(G,{chain:a,runner:o,done:"Authorized wallet updated."}),e.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[e.jsx(N,{disabled:o.running||!m||A||!j&&!v,onClick:()=>f("transfer"),children:"Transfer authorization"}),e.jsx(N,{variant:"outline",disabled:o.running,onClick:()=>f("clear"),children:"Remove authorized wallet"})]}),e.jsx(le,{isOpen:h!==null,onClose:()=>f(null),tone:"danger",title:h==="clear"?"Remove the authorized wallet?":`Transfer to ${w(u)}?`,confirmLabel:h==="clear"?"Remove":"Transfer",body:h==="clear"?"Nobody will be able to withdraw or claim rewards until the organization owner authorizes a wallet again through the gateway. Requests keep working.":`${w(u)} will receive all future withdrawals and ANTS rewards, and only it can change this again. Your connected wallet loses the role.`,onConfirm:()=>void S(h==="clear"?y:u)})]})}function Ie(s){return e.jsx(me,{chain:s.chain,children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(ge,{}),s.mode==="authorize"?e.jsx(ye,{...s}):e.jsx(xe,{...s})]})})}export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,ah as l,w as n,B as i,y as s}from"./index-
|
|
1
|
+
import{j as o,ah as l,w as n,B as i,y as s}from"./index-DIcymBxc.js";import{C as c}from"./ConnectWallet-DQ0PC6SO.js";function p({gate:r,state:t,connected:e,onAuthorize:a}){return o.jsxs("div",{className:"gc-stack",children:[o.jsx(l,{tone:r.operator?"warning":"info",title:r.operator?"Use the authorized wallet":"No authorized wallet",children:r.reason}),r.operator&&!e&&o.jsx(c,{label:`Connect ${n(r.operator)}`}),!r.operator&&(t==null?void 0:t.canAuthorize)&&o.jsx(i,{fullWidth:!0,onClick:a??(()=>s("wallet")),children:"Authorize a wallet"})]})}export{p as O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var fe=s=>{throw TypeError(s)};var ee=(s,t,r)=>t.has(s)||fe("Cannot "+r);var l=(s,t,r)=>(ee(s,t,"read from private field"),r?r.call(s):t.get(s)),v=(s,t,r)=>t.has(s)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,r),y=(s,t,r,a)=>(ee(s,t,"write to private field"),a?a.call(s,r):t.set(s,r),r),k=(s,t,r)=>(ee(s,t,"access private method"),r);import{bH as $e,bI as oe,bJ as Me,bK as Qe,by as Oe,F as Te,bL as Le,bM as _e,r as E,bN as Pe,bO as Fe,bP as Ie,bQ as ze,bR as we,bS as He,bT as We,as as Ke,m as $,u as Ee,a7 as ve,j as e,B as se,y as te,I as P,n as Ue,a8 as xe,a9 as je,a as De,i as Ge,b6 as Ve,bU as Je,aC as Xe,av as re,f as X,q as Y,e as ae,bV as Ye,c as Ze,P as ke,ah as Z,g as b,O as F,S as qe,h as z,l as I,L as pe,o as ye,bW as A,E as es,v as Re,bX as ss}from"./index-BpFwvYMF.js";import{U as ts,M as rs,c as as}from"./UsageByModel-nhGKdBi8.js";import{g as is}from"./usage-yuqGLybi.js";import{S as ns}from"./Segmented-D_Yun-tG.js";import{c as os}from"./Charts-CHTi7z3n.js";import"./roving-DkptacxO.js";function Ne(s,t){const r=new Set(t);return s.filter(a=>!r.has(a))}function ls(s,t,r){const a=s.slice(0);return a[t]=r,a}var Q,m,T,L,x,q,H,W,K,U,p,le,ce,ue,de,he,Se,cs=(Se=class extends $e{constructor(t,r,a){super();v(this,p);v(this,Q);v(this,m);v(this,T);v(this,L);v(this,x);v(this,q);v(this,H);v(this,W);v(this,K);v(this,U,[]);y(this,Q,t),y(this,L,a),y(this,T,[]),y(this,x,[]),y(this,m,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&l(this,x).forEach(t=>{t.subscribe(r=>{k(this,p,de).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,l(this,x).forEach(t=>{t.destroy()})}setQueries(t,r){y(this,T,t),y(this,L,r),oe.batch(()=>{const a=l(this,x),o=k(this,p,ue).call(this,l(this,T));o.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=o.map(d=>d.observer),n=i.map(d=>d.getCurrentResult()),c=a.length!==i.length,R=i.some((d,S)=>d!==a[S]),N=c||R,_=N?!0:n.some((d,S)=>{const C=l(this,m)[S];return!C||!Me(d,C)});!N&&!_||(N&&(y(this,U,o),y(this,x,i)),y(this,m,n),this.hasListeners()&&(N&&(Ne(a,i).forEach(d=>{d.destroy()}),Ne(i,a).forEach(d=>{d.subscribe(S=>{k(this,p,de).call(this,d,S)})})),k(this,p,he).call(this)))})}getCurrentResult(){return l(this,m)}getQueries(){return l(this,x).map(t=>t.getCurrentQuery())}getObservers(){return l(this,x)}getOptimisticResult(t,r){const a=k(this,p,ue).call(this,t),o=a.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=a.map(n=>n.defaultedQueryOptions.queryHash);return[o,n=>k(this,p,ce).call(this,n??o,r,i),()=>k(this,p,le).call(this,o,a)]}},Q=new WeakMap,m=new WeakMap,T=new WeakMap,L=new WeakMap,x=new WeakMap,q=new WeakMap,H=new WeakMap,W=new WeakMap,K=new WeakMap,U=new WeakMap,p=new WeakSet,le=function(t,r){return r.map((a,o)=>{const i=t[o];return a.defaultedQueryOptions.notifyOnChangeProps?i:a.observer.trackResult(i,n=>{r.forEach(c=>{c.observer.trackProp(n)})})})},ce=function(t,r,a){if(r){const o=l(this,K),i=a!==void 0&&o!==void 0&&(o.length!==a.length||a.some((n,c)=>n!==o[c]));return(!l(this,q)||l(this,m)!==l(this,W)||i||r!==l(this,H))&&(y(this,H,r),y(this,W,l(this,m)),a!==void 0&&y(this,K,a),y(this,q,Qe(l(this,q),r(t)))),l(this,q)}return t},ue=function(t){const r=new Map;l(this,x).forEach(o=>{const i=o.options.queryHash;if(!i)return;const n=r.get(i);n?n.push(o):r.set(i,[o])});const a=[];return t.forEach(o=>{var R;const i=l(this,Q).defaultQueryOptions(o),c=((R=r.get(i.queryHash))==null?void 0:R.shift())??new Oe(l(this,Q),i);a.push({defaultedQueryOptions:i,observer:c})}),a},de=function(t,r){const a=l(this,x).indexOf(t);a!==-1&&(y(this,m,ls(l(this,m),a,r)),k(this,p,he).call(this))},he=function(){var t;if(this.hasListeners()){const r=l(this,q),a=k(this,p,le).call(this,l(this,m),l(this,U)),o=k(this,p,ce).call(this,a,(t=l(this,L))==null?void 0:t.combine);r!==o&&oe.batch(()=>{this.listeners.forEach(i=>{i(l(this,m))})})}},Se);function us({queries:s,...t},r){const a=Te(),o=Le(),i=_e(),n=E.useMemo(()=>s.map(h=>{const g=a.defaultQueryOptions(h);return g._optimisticResults=o?"isRestoring":"optimistic",g}),[s,a,o]);n.forEach(h=>{Pe(h);const g=a.getQueryCache().get(h.queryHash);Fe(h,i,g)}),Ie(i);const[c]=E.useState(()=>new cs(a,n,t)),[R,N,_]=c.getOptimisticResult(n,t.combine),d=!o&&t.subscribed!==!1;E.useSyncExternalStore(E.useCallback(h=>d?c.subscribe(oe.batchCalls(h)):ze,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),E.useEffect(()=>{c.setQueries(n,t)},[n,t,c]);const C=R.some((h,g)=>we(n[g],h))?R.flatMap((h,g)=>{const f=n[g];if(f&&we(f,h)){const D=new Oe(a,f);return He(f,D,i)}return[]}):[];if(C.length>0)throw Promise.all(C);const O=R.find((h,g)=>{const f=n[g];return f&&We({result:h,errorResetBoundary:i,throwOnError:f.throwOnError,query:a.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(O!=null&&O.error)throw O.error;return N(_())}const ds=.8;function hs(s,t){if(!s)return[];const r=[];for(const[a,o]of t){const i=s[a];if(i===null||o===null)continue;const n=$(i),c=n===0?1:o/n;c>=ds&&r.push({period:a,label:Ke[a],spent:o,limit:n,fraction:c,reached:c>=1})}return r}function ps(s,t,r){const a=t/r,o=a>0?s/a:null,i=o===null?s<1:o<7;return{available:s,dailySpend:a,days:o,low:i}}function ie({title:s,body:t,action:r}){return e.jsxs("div",{className:"gc-setup",children:[e.jsxs("div",{className:"gc-setup__text",children:[e.jsx("div",{className:"gc-setup__title",children:s}),e.jsx("div",{className:"gc-setup__body",children:t})]}),r]})}const ys=e.jsxs("svg",{width:"28",height:"24",viewBox:"0 0 28 24","aria-hidden":"true",className:"gc-empty-tile__bars",children:[e.jsx("rect",{x:"2",y:"12",width:"6",height:"12",rx:"1.5"}),e.jsx("rect",{x:"11",y:"6",width:"6",height:"18",rx:"1.5"}),e.jsx("rect",{x:"20",y:"0",width:"6",height:"24",rx:"1.5"})]}),gs=[{id:"keys",title:"API keys",body:"Create keys for apps and people, with budgets and their own routing."},{id:"chat",title:"Chat",body:"Try any model on the network and see which seller answers."},{id:"wallet",title:"Wallet & Funding",body:"Fund the workspace wallet and authorize who can withdraw."},{id:"routing",title:"Routing",body:"Choose which sellers may serve, price caps, TEE only, fallbacks."},{id:"providers",title:"Providers",body:"Every provider this gateway sees, with prices, trust and latency."},{id:"models",title:"Models",body:"Every model on the network, its providers and a ready-to-run API call."},{id:"presets",title:"Presets",body:"Save a model, system prompt and parameters as @preset/<name>."},{id:"members",title:"Members",body:"Invite people and choose what each of them may do."},{id:"activity",title:"Activity",body:"Spend, requests and tokens by model, key and member."},{id:"settings",title:"Settings",body:"Buyer settings every policy starts from, observability and sign-in."}];function ms({hasKeys:s,fundsKnown:t,funded:r}){const{workspace:a,viewer:o}=Ee(),i=gs.filter(n=>ve(n.id,o));return e.jsxs(e.Fragment,{children:[!s&&e.jsx(ie,{title:"No API keys yet",body:"Create your first API key to start using this workspace from your apps.",action:e.jsx(se,{variant:"brand",leadingIcon:e.jsx(P.plus,{size:14}),onClick:()=>te("keys?new=1"),children:"Create API key"})}),t&&!r&&ve("wallet",o)&&e.jsx(ie,{title:"No funds yet",body:e.jsxs(e.Fragment,{children:["Requests to paid sellers are paid in USDC from the ",a.name," wallet. Free sellers work without funds."]}),action:e.jsx(se,{variant:"outline",onClick:()=>te("wallet?fund=1"),children:"Add funds"})}),Ue(o)&&e.jsx(ie,{title:"Review buyer settings",body:"Price caps, minimum trust (60 by default) and verification apply to every key.",action:e.jsx(se,{variant:"ghost",onClick:()=>te("settings"),children:"Open settings"})}),e.jsxs("div",{className:"gc-section-head",children:[e.jsx("h2",{children:"This week's usage"}),e.jsxs("a",{className:"gc-link",href:je("activity"),onClick:xe("activity"),children:["View activity ",e.jsx(P.right,{size:13})]})]}),e.jsx("div",{className:"gc-grid gc-grid--3",children:["No spend this week","No requests this week","No tokens this week"].map(n=>e.jsxs("div",{className:"gc-empty-tile",children:[ys,e.jsx("span",{children:n})]},n))}),e.jsx("div",{className:"gc-grid gc-grid--3",children:i.map(n=>{const c=P[n.id]??P.overview;return e.jsxs("a",{className:"gc-section-card",href:je(n.id),onClick:xe(n.id),children:[e.jsx("span",{className:"gc-section-card__icon",children:e.jsx(c,{size:16})}),e.jsxs("span",{className:"gc-section-card__text",children:[e.jsx("span",{className:"gc-section-card__title",children:n.title}),e.jsx("span",{className:"gc-section-card__body",children:n.body})]}),e.jsx(P.right,{size:14,className:"gc-section-card__chevron"})]},n.id)})})]})}const ne=[{period:"daily",label:"Today"},{period:"weekly",label:"This week"},{period:"monthly",label:"This month"}];function bs(s,t){return t&&s!==null?s/t:t===0?1:null}function fs({label:s,spent:t,limit:r}){const a=r===null?null:$(r);return e.jsx(qe,{label:`Spend ${s.toLowerCase()}`,value:t===null?"…":b(t),sub:a===null?"No budget":`of ${b(a)} budget`,meter:bs(t,a)})}function ws(s){return s?s.days===null?"No recent spend":Ae(s.days):"…"}function vs({wallet:s,funds:t}){return s.isLoading?e.jsx(pe,{rows:1,height:48}):s.error?e.jsx(ye,{error:s.error,onRetry:()=>void s.refetch()}):s.data?e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(A,{label:"Available",value:b(s.data.available),strong:!0}),e.jsx(A,{label:"Reserved in channels",value:b(s.data.reserved)}),e.jsx(A,{label:"In wallet, not deposited",value:b(s.data.walletUsdc)}),e.jsx(A,{label:"Runway",value:ws(t)})]}):null}function xs({status:s}){if(s.isLoading)return e.jsx(pe,{rows:1,height:40});if(s.error)return e.jsx(ye,{error:s.error});if(!s.data)return null;const{buyer:t}=s.data;return e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(A,{label:"Buyer",value:t.reachable?e.jsx(Re,{tone:"success",children:"Connected"}):e.jsx(Re,{tone:"danger",children:"Unreachable"})}),e.jsx(A,{label:"Sellers seen",value:z(t.peers)}),e.jsx(A,{label:"DHT nodes",value:z(t.dhtNodes)}),e.jsx(A,{label:"Buyer uptime",value:t.uptimeMs===null?"—":ss(t.uptimeMs)})]})}function qs(){var me,be;const{workspace:s,viewer:t}=Ee(),r=De(),a=Ge(t),o=Ve(s.id),i=Je(s.id,a),n=Xe(),c=Date.now(),[R]=E.useState(c),[N,_]=E.useState("spend"),d=E.useMemo(()=>({...r}),[r.workspace,r.member]),S=us({queries:ne.map(({period:u})=>{const w=re(u,c);return{queryKey:Y.usage({...r,from:w,groupBy:"day"}),queryFn:()=>X.usage.report({...r,from:w,groupBy:"day"})}})}),C=re("monthly",c),O=ae({queryKey:Y.usage({...r,from:C,groupBy:"key"}),queryFn:()=>X.usage.report({...r,from:C,groupBy:"key"})}),h=ae({queryKey:Y.usage({...r,from:C,groupBy:"model"}),queryFn:()=>X.usage.report({...r,from:C,groupBy:"model"})}),g=re("daily",c),f=g-7*864e5,D=ae({queryKey:Y.usage({workspace:s.id,from:f,to:g,groupBy:"day"}),queryFn:()=>X.usage.report({workspace:s.id,from:f,to:g-1,groupBy:"day"}),enabled:a}),B=Ye(),G=Ze({workspace:s.id}),V=((me=o.data)==null?void 0:me.limits)??null,M=(be=S[2])==null?void 0:be.data,ge=u=>{var J;const w=(J=S[u])==null?void 0:J.data;return w?$(w.totals.spent):null},Be=hs(V,ne.map(({period:u},w)=>[u,ge(w)])),j=i.data&&D.data?ps($(i.data.available),$(D.data.totals.spent),7):null;if(M!==void 0&&M.totals.requests===0&&G.data!==void 0&&G.data.every(u=>u.usage.requests===0)){const u=(G.data??[]).some(w=>w.status==="active"&&!w.label.startsWith("Web chat"));return e.jsxs("div",{className:"gc-page",children:[e.jsx(ke,{title:s.name,description:"Nothing has run through this workspace yet. Here is where to start."}),e.jsx(ms,{hasKeys:G.isLoading||u,fundsKnown:a&&i.data!==void 0,funded:i.data?$(i.data.available)>0:!0})]})}return e.jsxs("div",{className:"gc-page",children:[e.jsx(ke,{title:"Overview",description:`${s.name} workspace${r.member?" · your usage":""}`}),(j==null?void 0:j.low)&&e.jsx(Z,{tone:j.days!==null&&j.days<1?"danger":"warning",title:"Balance is running low",action:e.jsx(F,{to:"wallet",children:"Add funds"}),children:j.days===null?`Only ${b(j.available)} is available.`:`${b(j.available)} available lasts about ${Ae(j.days)} at last week's pace (${b(j.dailySpend)} a day).`}),B.currentMissingOperator&&e.jsx(Z,{tone:"warning",title:"No authorized wallet",action:e.jsx(F,{to:"wallet",children:B.canAuthorize?"Authorize a wallet":"View wallet"}),children:B.canAuthorize?`Nobody can withdraw ${s.name}'s funds or claim its ANTS rewards until you authorize one of your wallets. Requests keep working.`:`Nobody can withdraw ${s.name}'s funds or claim its ANTS rewards until the organization owner authorizes a wallet. Requests keep working.`}),B.withdrawable.count>0&&e.jsxs(Z,{tone:"warning",title:`${B.withdrawable.count} channel${B.withdrawable.count===1?"":"s"} ready to withdraw`,action:e.jsx(F,{to:"wallet",children:"Withdraw"}),children:["About ",b(B.withdrawable.amount)," of unused reserve can return to the balance."]}),Be.map(u=>e.jsx(Z,{tone:u.reached?"danger":"warning",title:u.reached?`${u.label} budget reached`:`${u.label} budget almost used`,children:u.reached?`${s.name} has spent ${b(u.spent)} of its ${b(u.limit)} ${u.label.toLowerCase()} budget. New requests are refused until the period resets.`:`${Math.round(u.fraction*100)}% of the ${b(u.limit)} ${u.label.toLowerCase()} budget is used.`},u.period)),e.jsxs("div",{className:"gc-grid gc-grid--4",children:[ne.map(({period:u,label:w},J)=>e.jsx(fs,{label:w,spent:ge(J),limit:(V==null?void 0:V[u])??null},u)),e.jsx(qe,{label:"Requests this month",value:M?z(M.totals.requests):"…",sub:M?`${z(M.totals.failedRequests)} failed`:void 0})]}),e.jsx(I,{title:"Last 7 days",description:as(N,"7d"),actions:e.jsxs(e.Fragment,{children:[e.jsx(ns,{label:"Chart metric",value:N,onChange:_,options:rs}),e.jsx(F,{to:"activity",children:"All activity"})]}),children:e.jsx(ts,{filter:d,range:"7d",now:R,metric:N,height:200})}),a&&e.jsx(I,{title:"Balance",actions:e.jsx(F,{to:"wallet",children:"Add funds"}),children:e.jsx(vs,{wallet:i,funds:j})}),e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(I,{title:"Top keys this month",children:e.jsx(Ce,{report:O.data,loading:O.isLoading,error:O.error,empty:"No spend this month."})}),e.jsx(I,{title:"Top models this month",children:e.jsx(Ce,{report:h.data,loading:h.isLoading,error:h.error,empty:"No spend this month."})})]}),e.jsx(I,{title:"Gateway",children:e.jsx(xs,{status:n})})]})}function Ae(s){return s<1?"under a day":s<60?`${Math.floor(s)} day${Math.floor(s)===1?"":"s"}`:`${Math.floor(s/30)} months`}function Ce({report:s,loading:t,error:r,empty:a}){if(t)return e.jsx(pe,{rows:4,height:22});if(r)return e.jsx(ye,{error:r});const o=((s==null?void 0:s.groups)??[]).map(i=>({label:is(i),value:$(i.spent),sub:`${z(i.requests)} requests`})).filter(i=>i.value>0).sort((i,n)=>n.value-i.value).slice(0,5);return o.length===0?e.jsx(es,{title:a}):e.jsx(os,{items:o,format:b})}export{qs as default};
|
|
1
|
+
var fe=s=>{throw TypeError(s)};var ee=(s,t,r)=>t.has(s)||fe("Cannot "+r);var l=(s,t,r)=>(ee(s,t,"read from private field"),r?r.call(s):t.get(s)),v=(s,t,r)=>t.has(s)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,r),y=(s,t,r,a)=>(ee(s,t,"write to private field"),a?a.call(s,r):t.set(s,r),r),k=(s,t,r)=>(ee(s,t,"access private method"),r);import{bz as $e,bA as oe,bB as Me,bC as Le,bp as Se,F as Qe,bD as Te,bE as _e,r as E,bF as Fe,bG as Pe,bH as Ie,bI as ze,bJ as we,bK as He,bL as De,as as Ke,m as $,u as Ee,a7 as ve,j as e,B as se,y as te,I as F,n as We,a8 as xe,a9 as je,a as Ue,i as Ge,b7 as Ve,bM as Je,aC as Xe,av as re,f as X,q as Y,e as ae,bN as Ye,c as Ze,P as ke,ah as Z,g as b,O as P,S as qe,h as z,l as I,L as pe,o as ye,bO as A,E as es,v as Ne,bP as ss}from"./index-DIcymBxc.js";import{U as ts,M as rs,c as as}from"./UsageByModel-DhTF-c1H.js";import{g as is}from"./usage-DktoZRc8.js";import{S as ns}from"./Segmented-BelxPFkk.js";import{c as os}from"./Charts-doK0mDVf.js";import"./roving-DkptacxO.js";function Re(s,t){const r=new Set(t);return s.filter(a=>!r.has(a))}function ls(s,t,r){const a=s.slice(0);return a[t]=r,a}var L,m,Q,T,x,q,H,D,K,W,p,le,ce,ue,de,he,Oe,cs=(Oe=class extends $e{constructor(t,r,a){super();v(this,p);v(this,L);v(this,m);v(this,Q);v(this,T);v(this,x);v(this,q);v(this,H);v(this,D);v(this,K);v(this,W,[]);y(this,L,t),y(this,T,a),y(this,Q,[]),y(this,x,[]),y(this,m,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&l(this,x).forEach(t=>{t.subscribe(r=>{k(this,p,de).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,l(this,x).forEach(t=>{t.destroy()})}setQueries(t,r){y(this,Q,t),y(this,T,r),oe.batch(()=>{const a=l(this,x),o=k(this,p,ue).call(this,l(this,Q));o.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=o.map(d=>d.observer),n=i.map(d=>d.getCurrentResult()),c=a.length!==i.length,N=i.some((d,O)=>d!==a[O]),R=c||N,_=R?!0:n.some((d,O)=>{const C=l(this,m)[O];return!C||!Me(d,C)});!R&&!_||(R&&(y(this,W,o),y(this,x,i)),y(this,m,n),this.hasListeners()&&(R&&(Re(a,i).forEach(d=>{d.destroy()}),Re(i,a).forEach(d=>{d.subscribe(O=>{k(this,p,de).call(this,d,O)})})),k(this,p,he).call(this)))})}getCurrentResult(){return l(this,m)}getQueries(){return l(this,x).map(t=>t.getCurrentQuery())}getObservers(){return l(this,x)}getOptimisticResult(t,r){const a=k(this,p,ue).call(this,t),o=a.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=a.map(n=>n.defaultedQueryOptions.queryHash);return[o,n=>k(this,p,ce).call(this,n??o,r,i),()=>k(this,p,le).call(this,o,a)]}},L=new WeakMap,m=new WeakMap,Q=new WeakMap,T=new WeakMap,x=new WeakMap,q=new WeakMap,H=new WeakMap,D=new WeakMap,K=new WeakMap,W=new WeakMap,p=new WeakSet,le=function(t,r){return r.map((a,o)=>{const i=t[o];return a.defaultedQueryOptions.notifyOnChangeProps?i:a.observer.trackResult(i,n=>{r.forEach(c=>{c.observer.trackProp(n)})})})},ce=function(t,r,a){if(r){const o=l(this,K),i=a!==void 0&&o!==void 0&&(o.length!==a.length||a.some((n,c)=>n!==o[c]));return(!l(this,q)||l(this,m)!==l(this,D)||i||r!==l(this,H))&&(y(this,H,r),y(this,D,l(this,m)),a!==void 0&&y(this,K,a),y(this,q,Le(l(this,q),r(t)))),l(this,q)}return t},ue=function(t){const r=new Map;l(this,x).forEach(o=>{const i=o.options.queryHash;if(!i)return;const n=r.get(i);n?n.push(o):r.set(i,[o])});const a=[];return t.forEach(o=>{var N;const i=l(this,L).defaultQueryOptions(o),c=((N=r.get(i.queryHash))==null?void 0:N.shift())??new Se(l(this,L),i);a.push({defaultedQueryOptions:i,observer:c})}),a},de=function(t,r){const a=l(this,x).indexOf(t);a!==-1&&(y(this,m,ls(l(this,m),a,r)),k(this,p,he).call(this))},he=function(){var t;if(this.hasListeners()){const r=l(this,q),a=k(this,p,le).call(this,l(this,m),l(this,W)),o=k(this,p,ce).call(this,a,(t=l(this,T))==null?void 0:t.combine);r!==o&&oe.batch(()=>{this.listeners.forEach(i=>{i(l(this,m))})})}},Oe);function us({queries:s,...t},r){const a=Qe(),o=Te(),i=_e(),n=E.useMemo(()=>s.map(h=>{const g=a.defaultQueryOptions(h);return g._optimisticResults=o?"isRestoring":"optimistic",g}),[s,a,o]);n.forEach(h=>{Fe(h);const g=a.getQueryCache().get(h.queryHash);Pe(h,i,g)}),Ie(i);const[c]=E.useState(()=>new cs(a,n,t)),[N,R,_]=c.getOptimisticResult(n,t.combine),d=!o&&t.subscribed!==!1;E.useSyncExternalStore(E.useCallback(h=>d?c.subscribe(oe.batchCalls(h)):ze,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),E.useEffect(()=>{c.setQueries(n,t)},[n,t,c]);const C=N.some((h,g)=>we(n[g],h))?N.flatMap((h,g)=>{const f=n[g];if(f&&we(f,h)){const U=new Se(a,f);return He(f,U,i)}return[]}):[];if(C.length>0)throw Promise.all(C);const S=N.find((h,g)=>{const f=n[g];return f&&De({result:h,errorResetBoundary:i,throwOnError:f.throwOnError,query:a.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(S!=null&&S.error)throw S.error;return R(_())}const ds=.8;function hs(s,t){if(!s)return[];const r=[];for(const[a,o]of t){const i=s[a];if(i===null||o===null)continue;const n=$(i),c=n===0?1:o/n;c>=ds&&r.push({period:a,label:Ke[a],spent:o,limit:n,fraction:c,reached:c>=1})}return r}function ps(s,t,r){const a=t/r,o=a>0?s/a:null,i=o===null?s<1:o<7;return{available:s,dailySpend:a,days:o,low:i}}function ie({title:s,body:t,action:r}){return e.jsxs("div",{className:"gc-setup",children:[e.jsxs("div",{className:"gc-setup__text",children:[e.jsx("div",{className:"gc-setup__title",children:s}),e.jsx("div",{className:"gc-setup__body",children:t})]}),r]})}const ys=e.jsxs("svg",{width:"28",height:"24",viewBox:"0 0 28 24","aria-hidden":"true",className:"gc-empty-tile__bars",children:[e.jsx("rect",{x:"2",y:"12",width:"6",height:"12",rx:"1.5"}),e.jsx("rect",{x:"11",y:"6",width:"6",height:"18",rx:"1.5"}),e.jsx("rect",{x:"20",y:"0",width:"6",height:"24",rx:"1.5"})]}),gs=[{id:"keys",title:"API keys",body:"Create keys for apps and people, with budgets and their own routing."},{id:"chat",title:"Chat",body:"Try any model on the network and see which seller answers."},{id:"wallet",title:"Wallet & Funding",body:"Fund the workspace wallet and authorize who can withdraw."},{id:"routing",title:"Routing",body:"Choose which sellers may serve, price caps, TEE only, fallbacks."},{id:"providers",title:"Providers",body:"Every provider this gateway sees, with prices, trust and latency."},{id:"models",title:"Models",body:"Every model on the network, its providers and a ready-to-run API call."},{id:"presets",title:"Presets",body:"Save a model, system prompt and parameters as @preset/<name>."},{id:"members",title:"Members",body:"Invite people and choose what each of them may do."},{id:"activity",title:"Activity",body:"Spend, requests and tokens by model, key and member."},{id:"settings",title:"Settings",body:"Buyer settings every policy starts from, observability and sign-in."}];function ms({hasKeys:s,fundsKnown:t,funded:r}){const{workspace:a,viewer:o}=Ee(),i=gs.filter(n=>ve(n.id,o));return e.jsxs(e.Fragment,{children:[!s&&e.jsx(ie,{title:"No API keys yet",body:"Create your first API key to start using this workspace from your apps.",action:e.jsx(se,{variant:"brand",leadingIcon:e.jsx(F.plus,{size:14}),onClick:()=>te("keys?new=1"),children:"Create API key"})}),t&&!r&&ve("wallet",o)&&e.jsx(ie,{title:"No funds yet",body:e.jsxs(e.Fragment,{children:["Requests to paid sellers are paid in USDC from the ",a.name," wallet. Free sellers work without funds."]}),action:e.jsx(se,{variant:"outline",onClick:()=>te("wallet?fund=1"),children:"Add funds"})}),We(o)&&e.jsx(ie,{title:"Review buyer settings",body:"Price caps, minimum trust (60 by default) and verification apply to every key.",action:e.jsx(se,{variant:"ghost",onClick:()=>te("settings"),children:"Open settings"})}),e.jsxs("div",{className:"gc-section-head",children:[e.jsx("h2",{children:"This week's usage"}),e.jsxs("a",{className:"gc-link",href:je("activity"),onClick:xe("activity"),children:["View activity ",e.jsx(F.right,{size:13})]})]}),e.jsx("div",{className:"gc-grid gc-grid--3",children:["No spend this week","No requests this week","No tokens this week"].map(n=>e.jsxs("div",{className:"gc-empty-tile",children:[ys,e.jsx("span",{children:n})]},n))}),e.jsx("div",{className:"gc-grid gc-grid--3",children:i.map(n=>{const c=F[n.id]??F.overview;return e.jsxs("a",{className:"gc-section-card",href:je(n.id),onClick:xe(n.id),children:[e.jsx("span",{className:"gc-section-card__icon",children:e.jsx(c,{size:16})}),e.jsxs("span",{className:"gc-section-card__text",children:[e.jsx("span",{className:"gc-section-card__title",children:n.title}),e.jsx("span",{className:"gc-section-card__body",children:n.body})]}),e.jsx(F.right,{size:14,className:"gc-section-card__chevron"})]},n.id)})})]})}const ne=[{period:"daily",label:"Today"},{period:"weekly",label:"This week"},{period:"monthly",label:"This month"}];function bs(s,t){return t&&s!==null?s/t:t===0?1:null}function fs({label:s,spent:t,limit:r}){const a=r===null?null:$(r);return e.jsx(qe,{label:`Spend ${s.toLowerCase()}`,value:t===null?"…":b(t),sub:a===null?"No budget":`of ${b(a)} budget`,meter:bs(t,a)})}function ws(s){return s?s.days===null?"No recent spend":Ae(s.days):"…"}function vs({wallet:s,funds:t}){return s.isLoading?e.jsx(pe,{rows:1,height:48}):s.error?e.jsx(ye,{error:s.error,onRetry:()=>void s.refetch()}):s.data?e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(A,{label:"Available",value:b(s.data.available),strong:!0}),e.jsx(A,{label:"Reserved in channels",value:b(s.data.reserved)}),e.jsx(A,{label:"In wallet, not deposited",value:b(s.data.walletUsdc)}),e.jsx(A,{label:"Runway",value:ws(t)})]}):null}function xs({status:s}){if(s.isLoading)return e.jsx(pe,{rows:1,height:40});if(s.error)return e.jsx(ye,{error:s.error});if(!s.data)return null;const{buyer:t}=s.data;return e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(A,{label:"Buyer",value:t.reachable?e.jsx(Ne,{tone:"success",children:"Connected"}):e.jsx(Ne,{tone:"danger",children:"Unreachable"})}),e.jsx(A,{label:"Sellers seen",value:z(t.peers)}),e.jsx(A,{label:"DHT nodes",value:z(t.dhtNodes)}),e.jsx(A,{label:"Buyer uptime",value:t.uptimeMs===null?"—":ss(t.uptimeMs)})]})}function qs(){var me,be;const{workspace:s,viewer:t}=Ee(),r=Ue(),a=Ge(t),o=Ve(s.id),i=Je(s.id,a),n=Xe(),c=Date.now(),[N]=E.useState(c),[R,_]=E.useState("spend"),d=E.useMemo(()=>({...r}),[r.workspace,r.member]),O=us({queries:ne.map(({period:u})=>{const w=re(u,c);return{queryKey:Y.usage({...r,from:w,groupBy:"day"}),queryFn:()=>X.usage.report({...r,from:w,groupBy:"day"})}})}),C=re("monthly",c),S=ae({queryKey:Y.usage({...r,from:C,groupBy:"key"}),queryFn:()=>X.usage.report({...r,from:C,groupBy:"key"})}),h=ae({queryKey:Y.usage({...r,from:C,groupBy:"model"}),queryFn:()=>X.usage.report({...r,from:C,groupBy:"model"})}),g=re("daily",c),f=g-7*864e5,U=ae({queryKey:Y.usage({workspace:s.id,from:f,to:g,groupBy:"day"}),queryFn:()=>X.usage.report({workspace:s.id,from:f,to:g-1,groupBy:"day"}),enabled:a}),B=Ye(),G=Ze({workspace:s.id}),V=((me=o.data)==null?void 0:me.limits)??null,M=(be=O[2])==null?void 0:be.data,ge=u=>{var J;const w=(J=O[u])==null?void 0:J.data;return w?$(w.totals.spent):null},Be=hs(V,ne.map(({period:u},w)=>[u,ge(w)])),j=i.data&&U.data?ps($(i.data.available),$(U.data.totals.spent),7):null;if(M!==void 0&&M.totals.requests===0&&G.data!==void 0&&G.data.every(u=>u.usage.requests===0)){const u=(G.data??[]).some(w=>w.status==="active"&&!w.label.startsWith("Web chat"));return e.jsxs("div",{className:"gc-page",children:[e.jsx(ke,{title:s.name,description:"Nothing has run through this workspace yet. Here is where to start."}),e.jsx(ms,{hasKeys:G.isLoading||u,fundsKnown:a&&i.data!==void 0,funded:i.data?$(i.data.available)>0:!0})]})}return e.jsxs("div",{className:"gc-page",children:[e.jsx(ke,{title:"Overview",description:`${s.name} workspace${r.member?" · your usage":""}`}),(j==null?void 0:j.low)&&e.jsx(Z,{tone:j.days!==null&&j.days<1?"danger":"warning",title:"Balance is running low",action:e.jsx(P,{to:"wallet",children:"Add funds"}),children:j.days===null?`Only ${b(j.available)} is available.`:`${b(j.available)} available lasts about ${Ae(j.days)} at last week's pace (${b(j.dailySpend)} a day).`}),B.currentMissingOperator&&e.jsx(Z,{tone:"warning",title:"No authorized wallet",action:e.jsx(P,{to:"wallet",children:B.canAuthorize?"Authorize a wallet":"View wallet"}),children:B.canAuthorize?`Nobody can withdraw ${s.name}'s funds or claim its ANTS rewards until you authorize one of your wallets. Requests keep working.`:`Nobody can withdraw ${s.name}'s funds or claim its ANTS rewards until the organization owner authorizes a wallet. Requests keep working.`}),B.withdrawable.count>0&&e.jsxs(Z,{tone:"warning",title:`${B.withdrawable.count} channel${B.withdrawable.count===1?"":"s"} ready to withdraw`,action:e.jsx(P,{to:"wallet",children:"Withdraw"}),children:["About ",b(B.withdrawable.amount)," of unused reserve can return to the balance."]}),Be.map(u=>e.jsx(Z,{tone:u.reached?"danger":"warning",title:u.reached?`${u.label} budget reached`:`${u.label} budget almost used`,children:u.reached?`${s.name} has spent ${b(u.spent)} of its ${b(u.limit)} ${u.label.toLowerCase()} budget. New requests are refused until the period resets.`:`${Math.round(u.fraction*100)}% of the ${b(u.limit)} ${u.label.toLowerCase()} budget is used.`},u.period)),e.jsxs("div",{className:"gc-grid gc-grid--4",children:[ne.map(({period:u,label:w},J)=>e.jsx(fs,{label:w,spent:ge(J),limit:(V==null?void 0:V[u])??null},u)),e.jsx(qe,{label:"Requests this month",value:M?z(M.totals.requests):"…",sub:M?`${z(M.totals.failedRequests)} failed`:void 0})]}),e.jsx(I,{title:"Last 7 days",description:as(R,"7d"),actions:e.jsxs(e.Fragment,{children:[e.jsx(ns,{label:"Chart metric",value:R,onChange:_,options:rs}),e.jsx(P,{to:"activity",children:"All activity"})]}),children:e.jsx(ts,{filter:d,range:"7d",now:N,metric:R,height:200})}),a&&e.jsx(I,{title:"Balance",actions:e.jsx(P,{to:"wallet",children:"Add funds"}),children:e.jsx(vs,{wallet:i,funds:j})}),e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(I,{title:"Top keys this month",children:e.jsx(Ce,{report:S.data,loading:S.isLoading,error:S.error,empty:"No spend this month."})}),e.jsx(I,{title:"Top models this month",children:e.jsx(Ce,{report:h.data,loading:h.isLoading,error:h.error,empty:"No spend this month."})})]}),e.jsx(I,{title:"Gateway",children:e.jsx(xs,{status:n})})]})}function Ae(s){return s<1?"under a day":s<60?`${Math.floor(s)} day${Math.floor(s)===1?"":"s"}`:`${Math.floor(s/30)} months`}function Ce({report:s,loading:t,error:r,empty:a}){if(t)return e.jsx(pe,{rows:4,height:22});if(r)return e.jsx(ye,{error:r});const o=((s==null?void 0:s.groups)??[]).map(i=>({label:is(i),value:$(i.spent),sub:`${z(i.requests)} requests`})).filter(i=>i.value>0).sort((i,n)=>n.value-i.value).slice(0,5);return o.length===0?e.jsx(es,{title:a}):e.jsx(os,{items:o,format:b})}export{qs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ay as C,w as k,r as o,j as s,az as N,I as _,aA as b,B as w}from"./index-
|
|
1
|
+
import{ay as C,w as k,r as o,j as s,az as N,I as _,aA as b,B as w}from"./index-DIcymBxc.js";function f(l,e){const c=l==null?void 0:l.find(n=>C(n.peerId,e));return(c==null?void 0:c.displayName)??k(e,8,4)}function z({value:l,onChange:e,peers:c,label:n,ordered:r,placeholder:m="Search sellers or paste a peer id"}){const[d,h]=o.useState(""),x=o.useId(),j=o.useId();function a(){const i=d.trim();if(!i)return;const t=c==null?void 0:c.find(p=>{var I;return((I=p.displayName)==null?void 0:I.toLowerCase())===i.toLowerCase()||p.peerId.toLowerCase()===i.toLowerCase()}),u=(t==null?void 0:t.peerId)??i;l.some(p=>p.toLowerCase()===u.toLowerCase())||e([...l,u]),h("")}return s.jsxs("div",{className:"gc-picker",children:[s.jsx("label",{className:"as-field__label",htmlFor:j,children:n}),l.length>0&&s.jsx("ol",{className:r?"gc-chips gc-chips--ordered":"gc-chips",children:l.map((i,t)=>s.jsxs("li",{className:"gc-chip",children:[r&&s.jsx("span",{className:"gc-chip__index",children:t+1}),s.jsx("span",{className:"gc-chip__label",title:i,children:f(c,i)}),r&&s.jsxs(s.Fragment,{children:[s.jsx(N,{label:`Move ${f(c,i)} up`,size:"sm",disabled:t===0,onClick:()=>e(b(l,t,-1)),children:s.jsx(_.up,{size:12})}),s.jsx(N,{label:`Move ${f(c,i)} down`,size:"sm",disabled:t===l.length-1,onClick:()=>e(b(l,t,1)),children:s.jsx(_.down,{size:12})})]}),s.jsx(N,{label:`Remove ${f(c,i)}`,size:"sm",onClick:()=>e(l.filter(u=>u!==i)),children:s.jsx(_.x,{size:12})})]},i))}),s.jsxs("div",{className:"gc-inline",children:[s.jsx("input",{id:j,className:"as-field__input gc-picker__input",list:x,value:d,placeholder:m,onChange:i=>h(i.target.value),onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),a())}}),s.jsx("datalist",{id:x,children:c==null?void 0:c.map(i=>s.jsx("option",{value:i.peerId,children:i.displayName??k(i.peerId)},i.peerId))}),s.jsx(w,{variant:"outline",size:"sm",onClick:a,disabled:!d.trim(),children:"Add"})]})]})}function y({value:l,onChange:e,label:c,suggestions:n,placeholder:r}){const[m,d]=o.useState(""),h=o.useId(),x=o.useId();function j(){const a=m.trim();a&&!l.includes(a)&&e([...l,a]),d("")}return s.jsxs("div",{className:"gc-picker",children:[s.jsx("label",{className:"as-field__label",htmlFor:x,children:c}),l.length>0&&s.jsx("ul",{className:"gc-chips",children:l.map(a=>s.jsxs("li",{className:"gc-chip",children:[s.jsx("span",{className:"gc-chip__label",children:a}),s.jsx(N,{label:`Remove ${a}`,size:"sm",onClick:()=>e(l.filter(i=>i!==a)),children:s.jsx(_.x,{size:12})})]},a))}),s.jsxs("div",{className:"gc-inline",children:[s.jsx("input",{id:x,className:"as-field__input gc-picker__input",list:h,value:m,placeholder:r,onChange:a=>d(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),j())}}),s.jsx("datalist",{id:h,children:n==null?void 0:n.map(a=>s.jsx("option",{value:a},a))}),s.jsx(w,{variant:"outline",size:"sm",onClick:j,disabled:!m.trim(),children:"Add"})]})]})}export{y as C,z as P,f as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as y,a3 as G,a4 as J,a5 as K,a6 as B,u as X,a7 as Z,j as e,a8 as ee,a9 as se,aa as le,ab as A,B as j,ac as ie,ad as F,T as z,D as ne,ae as E,I as ae,af as te,ag as re,ah as ce,ai as oe,aj as de,ak as me,al as he}from"./index-DIcymBxc.js";import{P as k,C as ue}from"./PeerPicker-BJfjL7Dy.js";import{S}from"./SelectField-BWyF8Ku8.js";import{S as v}from"./Segmented-BelxPFkk.js";import{S as T,D as R}from"./Switch-BwBYBnSS.js";function pe({draft:l,parent:d,above:t,peers:c,lists:m}){const n=y.useMemo(()=>{if(!c||c.length===0)return null;let h;try{h=te(l,m)}catch{return null}return{matched:re(B(d,h),c,m).length,total:c.length}},[l,d,c,m]);return n?n.matched===0?e.jsxs(ce,{tone:"warning",title:"No seller matches this policy",children:["With ",t?`${t} and `:"","these settings, none of the ",n.total," sellers this gateway sees can serve a request. Requests will fail until you loosen it."]}):e.jsxs("p",{className:"gc-muted","aria-live":"polite",children:["Matches ",n.matched," of ",n.total," sellers",t?` after ${t}`:"","."]}):null}function be({value:l,onChange:d,peers:t,lists:c,showTemplates:m=!0,parent:n,disabled:h}){const[x,b]=y.useState(""),[o,p]=y.useState(null),a=(s,r)=>d({...l,[s]:r}),N=G(t),I=c.map(s=>({value:s.id,label:`${s.name} (${s.peerIds.length})`})),g=J(K().data),i=y.useMemo(()=>g||n?B(g,n):null,[g,n]),D=g&&n?"the buyer config and the levels above":g?"the buyer config":n?"the levels above":"",w=s=>(g==null?void 0:g[s])!==void 0&&g[s]===(i==null?void 0:i[s])?"The buyer config":"The levels above",{viewer:W}=X(),Y=Z("settings",W)?e.jsx("a",{className:"gc-link",href:se("settings?tab=buyer"),onClick:ee("settings?tab=buyer"),children:"Change"}):null,O=s=>w(s)==="The buyer config"?Y:null,H=le(t)||l.minReputation!==""||(i==null?void 0:i.minReputation)!==void 0;function q(s){var $;let r;if(s==="own"){const C=c.find(Q=>Q.id===x);if(!C)return;r={allowMode:"only",allowedPeerIds:[],allowedListIds:[C.id]}}else r=oe(de(s));const u=me(l,r),f=(($=A.find(C=>C.id===s))==null?void 0:$.label)??s;u.length>0?p({label:f,template:r,conflicts:u}):d(E(l,r))}function P(s,r){a("routes",l.routes.map((u,f)=>f===s?r:u))}const M=[l.maxInputUsdPerMillion,l.maxOutputUsdPerMillion,l.maxCachedInputUsdPerMillion,l.maxImageUsdPerImage].filter(s=>s.trim()!=="").length,_=(s,r)=>e.jsx(z,{size:"sm",className:"gc-num",label:r,inputMode:"decimal",value:l[s],placeholder:(i==null?void 0:i[s])!==void 0?`≤ ${he(i[s])} above`:"No cap",onChange:u=>a(s,u.target.value)}),L=e.jsxs(e.Fragment,{children:[e.jsx(pe,{draft:l,parent:i,above:D,peers:t,lists:c}),m&&!h&&e.jsxs("div",{className:"gc-policy__templates",children:[e.jsx("span",{className:"gc-muted",children:"Start from"}),A.filter(s=>s.id!=="own").map(s=>e.jsx(j,{size:"sm",variant:"outline",title:s.description,onClick:()=>q(s.id),children:s.label},s.id)),c.length>0&&e.jsxs("span",{className:"gc-inline",children:[e.jsx(S,{size:"sm","aria-label":"Peer list for Own peers only",value:x,onChange:b,options:[{value:"",label:"Own peer list…"},...I]}),e.jsx(j,{size:"sm",variant:"outline",disabled:!x,onClick:()=>q("own"),children:"Use"})]}),e.jsx(j,{size:"sm",variant:"link",className:"gc-policy__clear",onClick:()=>d(ie()),children:"Clear policy"})]}),e.jsxs("div",{className:"gc-policy__cols",children:[e.jsxs("section",{className:"gc-policy__section",children:[e.jsx("h3",{children:"Sellers"}),e.jsx(v,{label:"Which sellers may serve",value:l.allowMode,onChange:s=>a("allowMode",s),options:[{value:"any",label:"Any seller"},{value:"only",label:"Only these"}]}),l.allowMode==="only"&&e.jsxs(e.Fragment,{children:[e.jsx(k,{label:"Allowed sellers",value:l.allowedPeerIds,onChange:s=>a("allowedPeerIds",s),peers:t}),e.jsx(V,{label:"Allowed peer lists",lists:c,value:l.allowedListIds,onChange:s=>a("allowedListIds",s)}),l.allowedPeerIds.length===0&&l.allowedListIds.length===0&&e.jsx("p",{className:"gc-warn",children:"An empty allow list means no seller can serve."})]}),e.jsx(k,{label:"Blocked sellers",value:l.blockedPeerIds,onChange:s=>a("blockedPeerIds",s),peers:t}),e.jsx(V,{label:"Blocked peer lists",lists:c,value:l.blockedListIds,onChange:s=>a("blockedListIds",s)})]}),e.jsxs("section",{className:"gc-policy__section",children:[e.jsx("h3",{children:"Quality and ranking"}),e.jsx(U,{label:"Minimum trust score",value:l.minTrustScore,onChange:s=>a("minTrustScore",s),floor:i==null?void 0:i.minTrustScore,floorSource:w("minTrustScore"),floorAction:O("minTrustScore")}),e.jsxs("div",{className:"gc-policy__switches",children:[e.jsx(T,{checked:l.requireTee||!!(i!=null&&i.requireTee),disabled:!!(i!=null&&i.requireTee),onChange:s=>a("requireTee",s),label:"TEE sellers only"}),e.jsx(T,{checked:l.requireVerified||!!(i!=null&&i.requireVerified),disabled:!!(i!=null&&i.requireVerified),onChange:s=>a("requireVerified",s),label:"Verified sellers only"})]}),((i==null?void 0:i.requireTee)||(i==null?void 0:i.requireVerified))&&e.jsxs("span",{className:"as-field__hint",children:[i.requireTee&&i.requireVerified?"TEE and verified sellers are":i.requireTee?"TEE sellers are":"Verified sellers are"," already required above."]}),e.jsxs("div",{className:"gc-policy__pair",children:[e.jsx(S,{size:"sm",label:"Sort by",value:l.sort,onChange:s=>a("sort",s),options:[{value:"",label:"Inherit"},...Object.keys(F).map(s=>({value:s,label:F[s]}))]}),e.jsx(S,{size:"sm",label:"Free sellers first",value:l.preferFreePeers,onChange:s=>a("preferFreePeers",s),options:[{value:"inherit",label:"Inherit"},{value:"yes",label:"Yes"},{value:"no",label:"No"}]})]}),e.jsx(v,{label:"Which models may be used",value:l.modelsMode,onChange:s=>a("modelsMode",s),options:[{value:"any",label:"Any model"},{value:"only",label:"Only these models"}]}),l.modelsMode==="only"&&e.jsx(ue,{label:"Allowed models",value:l.allowedModels,onChange:s=>a("allowedModels",s),suggestions:N,placeholder:"Model id"})]})]}),e.jsxs("div",{className:"gc-policy__advanced",children:[e.jsx(R,{title:"Price caps",summary:M?`${M} set`:"None",defaultOpen:h&&M>0,children:e.jsxs("div",{className:"gc-policy__caps",children:[_("maxInputUsdPerMillion","Input $/M"),_("maxOutputUsdPerMillion","Output $/M"),_("maxCachedInputUsdPerMillion","Cached input $/M"),_("maxImageUsdPerImage","$ per image")]})}),e.jsxs(R,{title:"Fallback chains",summary:l.routes.length?`${l.routes.length} chain${l.routes.length===1?"":"s"}`:"None",defaultOpen:h&&l.routes.length>0,children:[e.jsx("p",{className:"gc-fineprint",children:"Sellers to try first for a model, in order. After the chain, normal ranking continues unless the chain is strict."}),l.routes.map((s,r)=>e.jsxs("div",{className:"gc-route",children:[e.jsxs("div",{className:"gc-inline",children:[e.jsx(z,{size:"sm",label:"Model",list:"gc-policy-models",value:s.model,placeholder:"Model id",onChange:u=>P(r,{...s,model:u.target.value})}),e.jsx(T,{checked:s.strict,onChange:u=>P(r,{...s,strict:u}),label:"Strict"}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>a("routes",l.routes.filter((u,f)=>f!==r)),children:"Remove"})]}),e.jsx(k,{label:"Sellers, in order",ordered:!0,value:s.peerIds,onChange:u=>P(r,{...s,peerIds:u}),peers:t})]},r)),e.jsx("datalist",{id:"gc-policy-models",children:N.map(s=>e.jsx("option",{value:s},s))}),e.jsx("div",{children:e.jsx(j,{variant:"outline",size:"sm",onClick:()=>a("routes",[...l.routes,{model:"",peerIds:[],strict:!1}]),children:"Add fallback chain"})})]}),H&&e.jsx(R,{title:"Reputation",summary:l.minReputation!==""?`≥ ${l.minReputation}`:(i==null?void 0:i.minReputation)!==void 0?`Inherit (≥ ${i.minReputation})`:"Inherit",defaultOpen:h&&l.minReputation!=="",children:e.jsx(U,{label:"Minimum reputation",value:l.minReputation,onChange:s=>a("minReputation",s),floor:i==null?void 0:i.minReputation,floorSource:w("minReputation"),floorAction:O("minReputation")})})]}),e.jsx(ne,{isOpen:o!==null,tone:"primary",title:`Apply “${(o==null?void 0:o.label)??""}”?`,confirmLabel:"Replace and apply",body:e.jsxs(e.Fragment,{children:["This template changes settings you already set: ",e.jsx("strong",{children:o==null?void 0:o.conflicts.join(", ")}),". Your other settings stay."]}),onClose:()=>p(null),onConfirm:()=>{o&&d(E(l,o.template)),p(null)}})]});return h?e.jsx("fieldset",{className:"gc-policy gc-policy--readonly",disabled:!0,children:L}):e.jsx("div",{className:"gc-policy",children:L})}function U({label:l,value:d,onChange:t,clearable:c=!0,hint:m,floor:n,floorSource:h="The levels above",floorAction:x}){const b=y.useId(),o=d!=="",p=n!==void 0&&n>0,a=p&&o&&Number(d)<=n,N=a?String(n):o?d:p?`${n} inherited`:"Inherit";return e.jsxs("div",{className:"gc-slider",children:[e.jsxs("div",{className:"gc-slider__head",children:[e.jsx("span",{className:"as-field__label",id:b,children:l}),e.jsx("span",{className:o?"gc-slider__value":"gc-slider__value gc-slider__value--inherit",children:N})]}),e.jsxs("div",{className:"gc-inline",children:[e.jsx("input",{type:"range",min:0,max:100,step:5,value:o?Math.max(Number(d),p?n:0):p?n:0,"aria-labelledby":b,onChange:I=>t(String(Math.max(Number(I.target.value),p?n:0)))}),c&&o&&e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>t(""),children:"Clear"})]}),p&&(o&&!a?e.jsxs("span",{className:"as-field__hint",children:[h," requires ≥ ",n,". Only a higher value narrows it."]}):e.jsxs("span",{className:"as-field__hint gc-override",children:[e.jsx(ae.lock,{size:12})," Locked at ",n," by ",h.replace(/^The /,"the "),".",x?e.jsxs(e.Fragment,{children:[" ",x]}):null]})),m&&e.jsx("span",{className:"as-field__hint",children:m})]})}function V({label:l,lists:d,value:t,onChange:c}){return d.length===0?null:e.jsxs("fieldset",{className:"gc-checks",children:[e.jsx("legend",{className:"as-field__label",children:l}),d.map(m=>e.jsxs("label",{className:"gc-check",children:[e.jsx("input",{type:"checkbox",checked:t.includes(m.id),onChange:n=>c(n.target.checked?[...t,m.id]:t.filter(h=>h!==m.id))}),m.name," ",e.jsxs("span",{className:"gc-muted",children:["(",m.peerIds.length,")"]})]},m.id))]})}export{be as P,U as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bj as m,r as d,j as e,D as p,bu as x,bv as v,bw as b,v as j,bn as f,bm as w,af as y,b as C,B as h,C as k}from"./index-DIcymBxc.js";import{P}from"./PolicyEditor-BpoV34ra.js";function B(){const l=m(),[s,n]=d.useState(null),a=d.useRef(null),r=t=>new Promise(u=>{a.current=u,n(t)}),o=t=>{var u;n(null),(u=a.current)==null||u.call(a,t),a.current=null},i=(t,u)=>x(t.some(g=>v(g,l.data??null)),u,r),c=(s==null?void 0:s.kind)==="narrowed"?e.jsx(p,{isOpen:!0,tone:"primary",title:"The levels above allow less",confirmLabel:"Save anyway",cancelLabel:"Go back",onClose:()=>o(!1),onConfirm:()=>o(!0),body:e.jsxs("div",{className:"gc-stack gc-stack--tight",children:[e.jsx("span",{children:"Part of this change has no effect, because a workspace, member or admin restriction above it is tighter. Saving stores it as you entered it; only what the levels above allow applies."}),s.lines.length>0&&e.jsx("ul",{className:"gc-list",children:s.lines.map(t=>e.jsx("li",{children:t},t))})]})}):e.jsx(p,{isOpen:(s==null?void 0:s.kind)==="empty",tone:"danger",title:"Save an empty allow list?",confirmLabel:"Save anyway",cancelLabel:"Go back",onClose:()=>o(!1),onConfirm:()=>o(!0),body:e.jsxs(e.Fragment,{children:["With this allow list ",e.jsx("strong",{children:"no seller can serve"})," requests here (it names no seller, or none the levels above allow), so they fail until you change it. To let any seller serve, choose “Any seller” instead."]})});return{save:i,dialog:c}}function S({policy:l,invalid:s,empty:n="Inherits everything"}){if(s)return e.jsx("span",{className:"gc-warn",children:"Has an invalid setting; open it to fix."});const a=b(l);return a.length===0?e.jsx("span",{className:"gc-muted",children:n}):e.jsx("span",{className:"gc-chiprow",children:a.map(r=>e.jsx(j,{children:r},r))})}function D(l){const[s,n]=d.useState(()=>f(l)),a=m();return{draft:s,setDraft:n,reset:r=>n(f(r)),build:()=>w(y(s,a.data??null))}}function N(l,s){try{return{policy:y(l,s),error:null}}catch(n){return{policy:null,error:n instanceof Error?n.message:String(n)}}}function O({draft:l,setDraft:s,title:n="Routing policy"}){const a=C(),r=m(),[o,i]=d.useState(null),c=N(l,r.data??null),t=()=>{o&&s(o),i(null)};return e.jsxs("div",{className:"gc-policy-row",children:[e.jsxs("div",{className:"gc-policy-row__text",children:[e.jsx("span",{className:"as-field__label",children:n}),e.jsx(S,{policy:c.policy,invalid:c.error!==null})]}),e.jsx(h,{size:"sm",variant:"outline",onClick:()=>i(l),children:"Edit"}),e.jsx(k,{isOpen:o!==null,onClose:()=>i(null),size:"xl",title:n,subtitle:"Blank settings inherit from the level above, which this can only narrow. Saved with the form.",footer:e.jsxs(e.Fragment,{children:[c.error&&e.jsx("span",{className:"gc-warn gc-footer-note",children:c.error}),e.jsx(h,{variant:"ghost",onClick:t,children:"Cancel"}),e.jsx(h,{onClick:()=>i(null),children:"Done"})]}),children:e.jsx(P,{value:l,onChange:s,peers:a.data,lists:r.data??[]})})]})}export{O as P,B as a,S as b,N as d,D as u};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{u as A,i as J,bf as B,r as n,t as E,j as e,P as $,B as y,I as k,l as L,Q as R,M as Q,aN as U,v as C,A as V,E as W,n as F,C as G,D as H,b as K,T as j,a3 as _,o as X,q as O,f as v}from"./index-DIcymBxc.js";import{u as Y,a as Z,P as ee}from"./PolicyField-CfRYcr_J.js";import{D as se}from"./DataTable-BTwj5g1m.js";import{S as re}from"./SelectField-BWyF8Ku8.js";import{T as N}from"./TextAreaField-B6jcl4RR.js";import"./PolicyEditor-BpoV34ra.js";import"./PeerPicker-BJfjL7Dy.js";import"./Segmented-BelxPFkk.js";import"./roving-DkptacxO.js";import"./Switch-BwBYBnSS.js";function D(s){return s.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)}function te(s){return/^[a-z0-9][a-z0-9-]{0,47}$/.test(s)}function ae(s){if(!s.trim())return{};let a;try{a=JSON.parse(s)}catch{throw new Error("Parameters must be valid JSON.")}if(!a||typeof a!="object"||Array.isArray(a))throw new Error('Parameters must be a JSON object, like {"temperature": 0.2}.');return a}function oe({initial:s,prefill:a,onDone:m}){const{workspace:p,viewer:c}=A(),u=K(),[o,g]=n.useState((s==null?void 0:s.name)??(a==null?void 0:a.name)??""),[l,d]=n.useState((s==null?void 0:s.slug)??(a?D(a.name):"")),[t,q]=n.useState(!!s),[h,I]=n.useState((s==null?void 0:s.model)??(a==null?void 0:a.model)??""),[b,M]=n.useState(s?s.workspaceId??"":p.id),[S,T]=n.useState((s==null?void 0:s.systemPrompt)??""),[w,z]=n.useState(s&&Object.keys(s.params).length?JSON.stringify(s.params,null,2):""),x=Y(s==null?void 0:s.routingPolicy),P=Z(),i=E({mutationFn:()=>{if(!te(l))throw new Error("Slug must be lowercase letters, numbers and dashes.");const r={name:o.trim(),slug:l,model:h.trim(),workspaceId:b||null,systemPrompt:S.trim()||null,params:ae(w),routingPolicy:x.build()};return P.save([r.routingPolicy],f=>s?v.presets.update(s.id,r,f):v.presets.create(r,f))},onSuccess:r=>m(r),invalidate:[O.group("presets")],toast:"Preset saved"});return e.jsxs("form",{className:"gc-stack",onSubmit:r=>{r.preventDefault(),i.mutate()},children:[e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(j,{label:"Name",required:!0,value:o,onChange:r=>{g(r.target.value),t||d(D(r.target.value))}}),e.jsx(j,{label:"Slug",required:!0,value:l,onChange:r=>{q(!0),d(r.target.value)},hint:e.jsxs(e.Fragment,{children:["Called as ",e.jsxs("code",{children:["@preset/",l||"slug"]})]})})]}),e.jsxs("div",{className:"gc-grid gc-grid--2",children:[e.jsx(j,{label:"Model",required:!0,list:"gc-preset-models",value:h,onChange:r=>I(r.target.value)}),e.jsx("datalist",{id:"gc-preset-models",children:_(u.data).map(r=>e.jsx("option",{value:r},r))}),e.jsx(re,{label:"Available in",value:b,onChange:M,options:[{value:p.id,label:`${p.name} workspace`},...F(c)?[{value:"",label:"All workspaces"}]:[]]})]}),e.jsx(N,{label:"System prompt",rows:4,value:S,onChange:r=>T(r.target.value),hint:"Added before the client's messages."}),e.jsx(N,{label:"Parameters (JSON)",rows:4,mono:!0,value:w,placeholder:`{
|
|
2
|
+
"temperature": 0.2,
|
|
3
|
+
"max_tokens": 2048
|
|
4
|
+
}`,onChange:r=>z(r.target.value),hint:"Defaults merged under the client's own parameters."}),e.jsx(ee,{draft:x.draft,setDraft:x.setDraft}),i.error?e.jsx(X,{error:i.error,title:"Could not save the preset"}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(y,{variant:"ghost",onClick:()=>m(),children:"Cancel"}),e.jsx(y,{type:"submit",disabled:i.isPending||!o.trim()||!h.trim(),children:i.isPending?"Saving…":"Save preset"})]}),P.dialog]})}function xe(){const{workspace:s,viewer:a}=A(),m=J(a),p=B(s.id),[c,u]=n.useState(null),[o,g]=n.useState(null),l=E({mutationFn:d=>v.presets.remove(d.id),onSuccess:()=>g(null),invalidate:[O.group("presets")]});return e.jsxs("div",{className:"gc-page",children:[e.jsx($,{title:"Presets",description:e.jsxs(e.Fragment,{children:["A saved model, prompt, parameters and routing. Use one by sending ",e.jsx("code",{children:'"model": "@preset/<slug>"'}),"."]}),actions:m&&e.jsx(y,{variant:"brand",leadingIcon:e.jsx(k.plus,{size:14}),onClick:()=>u("new"),children:"New preset"})}),e.jsx(L,{flush:!0,children:e.jsx(R,{query:p,children:d=>e.jsx(se,{label:"Presets",rows:d,rowKey:t=>t.id,rowLabel:t=>t.name,actions:t=>m&&(t.workspaceId||F(a))?[{label:"Edit",onSelect:()=>u(t)},{label:"Delete",tone:"danger",onSelect:()=>g(t)}]:[],empty:e.jsx(W,{icon:e.jsx(k.presets,{size:18}),title:"No presets yet",body:"Presets let every client share one tuned setup without changing code."}),columns:[{key:"name",header:"Name",render:t=>e.jsx("span",{className:"gc-strong",children:t.name})},{key:"usage",header:"Use as model",render:t=>e.jsxs("span",{className:"gc-inline gc-inline--wrap",children:[e.jsxs(Q,{children:["@preset/",t.slug]}),e.jsx(U,{value:`@preset/${t.slug}`})]})},{key:"model",header:"Model",secondary:!0,render:t=>t.model},{key:"scope",header:"Scope",secondary:!0,render:t=>t.workspaceId?e.jsx(C,{children:"Workspace"}):e.jsx(C,{tone:"info",children:"All workspaces"})},{key:"policy",header:"Routing",secondary:!0,optional:!0,render:t=>e.jsx("span",{className:"gc-muted",children:V(t.routingPolicy)})}]})})}),e.jsx(G,{isOpen:c!==null,onClose:()=>u(null),size:"lg",title:c==="new"?"New preset":"Edit preset",children:c!==null&&e.jsx(oe,{initial:c==="new"?null:c,onDone:()=>u(null)})}),e.jsx(H,{isOpen:o!==null,busy:l.isPending,error:l.error,onClose:()=>g(null),onConfirm:()=>o&&l.mutate(o),title:"Delete this preset?",confirmLabel:"Delete preset",body:e.jsxs(e.Fragment,{children:["Requests that use ",e.jsxs("code",{children:["@preset/",o==null?void 0:o.slug]})," will fail."]})})]})}export{oe as PresetForm,xe as default};
|