@antseed/gateway-console 0.1.10 → 0.1.11

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.
Files changed (165) hide show
  1. package/dist/assets/{Activity-jZYZ0SDm.js → Activity-UaQeZdKk.js} +1 -1
  2. package/dist/assets/{Audit-C-dFTX_u.js → Audit-Cd26xOlL.js} +1 -1
  3. package/dist/assets/BrandIcon-dTKznfCA.js +1 -0
  4. package/dist/assets/{ChainGate-In51TI2h.js → ChainGate-DpChfDOP.js} +1 -1
  5. package/dist/assets/{ChannelClose-D8CcISX0.js → ChannelClose-DpNV5MqB.js} +1 -1
  6. package/dist/assets/{Charts-doK0mDVf.js → Charts-C65ZE2xP.js} +1 -1
  7. package/dist/assets/Chat-BbM_y6mh.js +225 -0
  8. package/dist/assets/{ConnectWallet-DQ0PC6SO.js → ConnectWallet-CLv0c-JB.js} +1 -1
  9. package/dist/assets/{DataTable-BTwj5g1m.js → DataTable-BkJdorEh.js} +1 -1
  10. package/dist/assets/Disclosure-DMLE7rCw.js +1 -0
  11. package/dist/assets/KeyHolder-Cjko0nrs.js +1 -0
  12. package/dist/assets/Keys-DLKN6Sna.js +1 -0
  13. package/dist/assets/Logs-DIPNoSb8.js +1 -0
  14. package/dist/assets/Members-CgP9OTz9.js +1 -0
  15. package/dist/assets/{Migrate-BQYY5ty3.js → Migrate-DDHZ-rux.js} +1 -1
  16. package/dist/assets/ModelDetails-CkDNU2Px.js +1 -0
  17. package/dist/assets/Models-DXbiNymT.js +1 -0
  18. package/dist/assets/{OperatorActions-DrRpfDBV.js → OperatorActions-BuEpaCiH.js} +1 -1
  19. package/dist/assets/{OperatorGateAlert-D92zhyXC.js → OperatorGateAlert-grMRoFdV.js} +1 -1
  20. package/dist/assets/{Overview-CJmp6b7M.js → Overview-BU9HCltc.js} +1 -1
  21. package/dist/assets/{PeerPicker-BJfjL7Dy.js → PeerPicker-CfsXTUyK.js} +1 -1
  22. package/dist/assets/PolicyEditor-ptFDJhFh.js +1 -0
  23. package/dist/assets/{PolicyField-CfRYcr_J.js → PolicyField-CHhm50jF.js} +1 -1
  24. package/dist/assets/Presets-szQETQLM.js +4 -0
  25. package/dist/assets/Providers-B6xbFeNU.js +1 -0
  26. package/dist/assets/RequestLog-DJl6FJhq.js +1 -0
  27. package/dist/assets/{Rewards-DNNxx3NO.js → Rewards-BOfJumNk.js} +2 -2
  28. package/dist/assets/{RewardsClaim-nstcyJvi.js → RewardsClaim-DHvgMfZ4.js} +1 -1
  29. package/dist/assets/Routing-DFuhPfzU.js +1 -0
  30. package/dist/assets/{Segmented-BelxPFkk.js → Segmented-D3e0aBDU.js} +1 -1
  31. package/dist/assets/{SelectField-BWyF8Ku8.js → SelectField-Cl4acfcI.js} +1 -1
  32. package/dist/assets/{Settings-Cws5Z--R.js → Settings--0bbw1dn.js} +2 -2
  33. package/dist/assets/SidePanel-D0rNElh3.js +1 -0
  34. package/dist/assets/{Staking-DHwoflHG.js → Staking-1D2HNu5P.js} +1 -1
  35. package/dist/assets/{StakingDashboard-DtOKTmys.js → StakingDashboard-C5Ib_AUs.js} +1 -1
  36. package/dist/assets/Switch-B2AEvyu7.js +1 -0
  37. package/dist/assets/{Tabs-yVL4Cd6z.js → Tabs-Cv10NtDy.js} +1 -1
  38. package/dist/assets/{TextAreaField-B6jcl4RR.js → TextAreaField-Dbr655cs.js} +1 -1
  39. package/dist/assets/{UsageByModel-DhTF-c1H.js → UsageByModel-BfvCLwo9.js} +1 -1
  40. package/dist/assets/VerificationLinks-CERoRvCR.js +1 -0
  41. package/dist/assets/{Wallet-QXhhg_E-.js → Wallet-CVS_hzu0.js} +3 -3
  42. package/dist/assets/{WalletConfirm-CgWBuaMN.js → WalletConfirm-C8Kazsh7.js} +1 -1
  43. package/dist/assets/{WalletFunding-Ydd9gD2t.js → WalletFunding-BbhXB813.js} +1 -1
  44. package/dist/assets/{WalletSignIn-DvVSFW4u.js → WalletSignIn-Tzs38aME.js} +1 -1
  45. package/dist/assets/Workspaces-DGgrOEZk.js +1 -0
  46. package/dist/assets/{add-ChFb9YAz.js → add-CdcnAnIQ.js} +1 -1
  47. package/dist/assets/{all-wallets-rdNweGUd.js → all-wallets-CaMIS0WH.js} +1 -1
  48. package/dist/assets/{app-store-s294A1qn.js → app-store-BJlWsf36.js} +1 -1
  49. package/dist/assets/{apple-Cs8Kx1eO.js → apple-sOU-w3fg.js} +1 -1
  50. package/dist/assets/{arrow-bottom-BMmCEQIa.js → arrow-bottom-CTOfZJ7E.js} +1 -1
  51. package/dist/assets/{arrow-bottom-circle-CThmnDp3.js → arrow-bottom-circle-B6IrOSiK.js} +1 -1
  52. package/dist/assets/{arrow-left-BJxgCTi0.js → arrow-left-D0Qm9EWX.js} +1 -1
  53. package/dist/assets/{arrow-right-CnLYkBsH.js → arrow-right-XMSWQLiv.js} +1 -1
  54. package/dist/assets/{arrow-top-Dc0DLP-U.js → arrow-top-Bym-ayRK.js} +1 -1
  55. package/dist/assets/{bank-CSWOYeMW.js → bank-NJF8WYDR.js} +1 -1
  56. package/dist/assets/{basic-BHdv4O5I.js → basic-bO70Xvle.js} +1 -1
  57. package/dist/assets/{browser-mp33aPgo.js → browser-ucjw1tpv.js} +1 -1
  58. package/dist/assets/{bundle-full-CDQ5iC5h.js → bundle-full-idGWmtvy.js} +1 -1
  59. package/dist/assets/{card-BcVuRQiM.js → card-DcpyI2qX.js} +1 -1
  60. package/dist/assets/{ccip-O1XLvWon.js → ccip-DBXxv0FH.js} +1 -1
  61. package/dist/assets/{checkmark-CQVJIWW1.js → checkmark-RFLSeCgj.js} +1 -1
  62. package/dist/assets/{checkmark-bold-DDU5XQfq.js → checkmark-bold-Dl1q9Kby.js} +1 -1
  63. package/dist/assets/{chevron-bottom-Bqi9FW2q.js → chevron-bottom-ilycsYd4.js} +1 -1
  64. package/dist/assets/{chevron-left-Vd5st0yB.js → chevron-left-DFK2Xbq1.js} +1 -1
  65. package/dist/assets/{chevron-right-BVwFrlss.js → chevron-right-Ew8XV9m9.js} +1 -1
  66. package/dist/assets/{chevron-top-D5dQ2xFn.js → chevron-top-CxoXH2-q.js} +1 -1
  67. package/dist/assets/{chrome-store-C9C4k8IO.js → chrome-store-ClmhY3B0.js} +1 -1
  68. package/dist/assets/{clock-Cuvc7bNo.js → clock-CCiukNBf.js} +1 -1
  69. package/dist/assets/{close-fW1pJ13b.js → close-B0KBYbXe.js} +1 -1
  70. package/dist/assets/code-block-DxUcjw4S.js +3 -0
  71. package/dist/assets/{coinPlaceholder-CKymvNA8.js → coinPlaceholder-D2ugxr3r.js} +1 -1
  72. package/dist/assets/{compass-D3h_6fr8.js → compass-CutyEYmW.js} +1 -1
  73. package/dist/assets/{copy-CNGN_cOz.js → copy-CJ0RBt1e.js} +1 -1
  74. package/dist/assets/{core-LDeQm5nv.js → core-BCJdIbrO.js} +3 -3
  75. package/dist/assets/cursor-Bg_hT9DN.js +3 -0
  76. package/dist/assets/{cursor-transparent-BblOfv3t.js → cursor-transparent-BQ_jwSfb.js} +1 -1
  77. package/dist/assets/{desktop-gpVOlZ1-.js → desktop-CsfFLaEs.js} +1 -1
  78. package/dist/assets/{disconnect-C_phPN0_.js → disconnect-B62slDXp.js} +1 -1
  79. package/dist/assets/{discord-Dk_2Plhc.js → discord-B8GwtWtL.js} +1 -1
  80. package/dist/assets/{en_US-Y4ZOVFV4-CmhP8GU2.js → en_US-Y4ZOVFV4-sKQksBWU.js} +4 -4
  81. package/dist/assets/{etherscan-Cyrh-2Lr.js → etherscan-BT9zhNhd.js} +1 -1
  82. package/dist/assets/{exclamation-triangle-SeeDwZ6A.js → exclamation-triangle-BSoPK6uq.js} +1 -1
  83. package/dist/assets/{extension-e_11O0GI.js → extension-CQxJq6bp.js} +1 -1
  84. package/dist/assets/{external-link-Dl0AqCn3.js → external-link-BnfAKGN2.js} +1 -1
  85. package/dist/assets/{facebook-Cp_-Axbh.js → facebook-DiAqdu4i.js} +1 -1
  86. package/dist/assets/{farcaster-Zwu26KYL.js → farcaster-B1y2in5M.js} +1 -1
  87. package/dist/assets/{filters-CdkpWvgi.js → filters-BkVUp9NW.js} +1 -1
  88. package/dist/assets/{github-DuPUePDJ.js → github-IRwi-GM-.js} +1 -1
  89. package/dist/assets/{google-DlKW7Gx7.js → google-k2ysL2bi.js} +1 -1
  90. package/dist/assets/{help-circle-19xLhjPt.js → help-circle-DLj9trmu.js} +1 -1
  91. package/dist/assets/highlighted-body-KQOG7T2V-CJM-VU3I.js +1 -0
  92. package/dist/assets/{id-B4PjxpL6.js → id-BY4HWjv7.js} +1 -1
  93. package/dist/assets/{image-CHz8w95r.js → image-BtUeZe1t.js} +1 -1
  94. package/dist/assets/{index-CZbdRW9K.js → index-BXwAwVaO.js} +1 -1
  95. package/dist/assets/{index-CgyFWy7G.js → index-Cmb-H95F.js} +1 -1
  96. package/dist/assets/{index-CfhMI0GY.css → index-DYK1gWhP.css} +1 -1
  97. package/dist/assets/{index-CAflmCbT.js → index-DiB9Y59V.js} +3 -3
  98. package/dist/assets/{index-BYZ6CM-r.js → index-DsRX2D_O.js} +1 -1
  99. package/dist/assets/{index-DIcymBxc.js → index-cESr4Zze.js} +24 -24
  100. package/dist/assets/{index.es-0kjt2ETS.js → index.es-DP9EmOYi.js} +3 -3
  101. package/dist/assets/{info-CFnwPck_.js → info-BaKj81_D.js} +1 -1
  102. package/dist/assets/{info-circle-DNYjRzmq.js → info-circle-ecoA_B_t.js} +1 -1
  103. package/dist/assets/{lightbulb-DPrYcwVp.js → lightbulb-DGQG-WWk.js} +1 -1
  104. package/dist/assets/{limits-D8_oE0N-.js → limits-D2JvFgaN.js} +1 -1
  105. package/dist/assets/{mail-Do_T12XQ.js → mail-BvEbsX3q.js} +1 -1
  106. package/dist/assets/{mermaid-MCJ5UELQ-Cr83KTfF.js → mermaid-MCJ5UELQ-B8uOykea.js} +3 -3
  107. package/dist/assets/{metamask-sdk-CHSvqgLD.js → metamask-sdk-BYmYI1f3.js} +1 -1
  108. package/dist/assets/{mobile-2wdwD-gm.js → mobile-CwlM4JMX.js} +1 -1
  109. package/dist/assets/{more-CugjlKbm.js → more-CT36TpLm.js} +1 -1
  110. package/dist/assets/{network-placeholder-D0CvRN9Z.js → network-placeholder-DG1Vvm-U.js} +1 -1
  111. package/dist/assets/{nftPlaceholder-CjCtJ3VF.js → nftPlaceholder-D6USOn7p.js} +1 -1
  112. package/dist/assets/{off-CjwzxGqC.js → off-BNSO7pY1.js} +1 -1
  113. package/dist/assets/{play-store-ts_mM-L7.js → play-store-PUfM0qU0.js} +1 -1
  114. package/dist/assets/{plus-CayVcA5r.js → plus-C8fnGfp3.js} +1 -1
  115. package/dist/assets/{qr-code-BJFXX7Ga.js → qr-code-CjdrQ0pR.js} +1 -1
  116. package/dist/assets/{recycle-horizontal-Dxd_xbuW.js → recycle-horizontal-BMxBgeB4.js} +1 -1
  117. package/dist/assets/{refresh-2tSMiCzO.js → refresh-C2D196Fq.js} +1 -1
  118. package/dist/assets/{reown-logo-C3tg9yiK.js → reown-logo-CLN2ORKJ.js} +1 -1
  119. package/dist/assets/{search-By38_AjN.js → search-C9voC8dq.js} +1 -1
  120. package/dist/assets/selection-HN8SZ52c.js +1 -0
  121. package/dist/assets/{send-DhLEHc2T.js → send-BAxcrGbA.js} +1 -1
  122. package/dist/assets/{sendTransaction-CqpP3CZj.js → sendTransaction-Cmz5eiPq.js} +1 -1
  123. package/dist/assets/stored-CETnaQtE.js +1 -0
  124. package/dist/assets/{swapHorizontal-BSy_Qzqy.js → swapHorizontal-CHCTyoP7.js} +1 -1
  125. package/dist/assets/{swapHorizontalBold-B4pOkOa-.js → swapHorizontalBold-LQsONWBk.js} +1 -1
  126. package/dist/assets/{swapHorizontalMedium-BbDDLHs6.js → swapHorizontalMedium-BxrBEjrx.js} +1 -1
  127. package/dist/assets/{swapHorizontalRoundedBold-MzTdSarg.js → swapHorizontalRoundedBold-CEHDoSv1.js} +1 -1
  128. package/dist/assets/{swapVertical-D0uKM7wm.js → swapVertical-DMylrYB1.js} +1 -1
  129. package/dist/assets/{telegram-Q_WwsPzx.js → telegram-BhVfpln1.js} +1 -1
  130. package/dist/assets/{three-dots-Cpl_X23E.js → three-dots-nkXRRS-E.js} +1 -1
  131. package/dist/assets/{twitch-B7x-eAo9.js → twitch-CYroZH_7.js} +1 -1
  132. package/dist/assets/{twitterIcon-BRMMjDzW.js → twitterIcon-DpHUqlyA.js} +1 -1
  133. package/dist/assets/{usage-DktoZRc8.js → usage-8BBeTlF-.js} +1 -1
  134. package/dist/assets/{useInfiniteQuery-NenQ5Num.js → useInfiniteQuery-zD1WIYBy.js} +1 -1
  135. package/dist/assets/{useTx-WkiDSW_A.js → useTx-DsLsc5bB.js} +1 -1
  136. package/dist/assets/{verify-BxTMhyZY.js → verify-DARDbLiQ.js} +1 -1
  137. package/dist/assets/{verify-filled-CaKhO-hp.js → verify-filled-EsNi41IB.js} +1 -1
  138. package/dist/assets/{w3m-modal-DZ2_0Ukm.js → w3m-modal-CIUN4uxE.js} +1 -1
  139. package/dist/assets/{waitForCallsStatus-CtriTPoz.js → waitForCallsStatus-DlpsNYx1.js} +1 -1
  140. package/dist/assets/{wallet-BeZF3I-Z.js → wallet-B2vgeP1E.js} +1 -1
  141. package/dist/assets/{wallet-placeholder-BDvuTJ6r.js → wallet-placeholder-DQsissb3.js} +1 -1
  142. package/dist/assets/{walletconnect-U8tnyg6m.js → walletconnect-DylNgC0Z.js} +1 -1
  143. package/dist/assets/{warning-circle-Dg69jmuZ.js → warning-circle-CVEgsVb4.js} +1 -1
  144. package/dist/assets/{writeContract-DrAWt0yz.js → writeContract-Cqg_OlRQ.js} +1 -1
  145. package/dist/assets/{x-CJ-uWPue.js → x-DSURRh6S.js} +1 -1
  146. package/dist/index.html +2 -2
  147. package/package.json +1 -1
  148. package/dist/assets/Chat-CaImcsH1.js +0 -220
  149. package/dist/assets/KeyHolder-D90Uu-Jv.js +0 -1
  150. package/dist/assets/Keys-B5LppZtn.js +0 -1
  151. package/dist/assets/Logs-Dw4sZ9lo.js +0 -1
  152. package/dist/assets/Members-CnaHKFut.js +0 -1
  153. package/dist/assets/Models-zIuHewdV.js +0 -1
  154. package/dist/assets/PolicyEditor-BpoV34ra.js +0 -1
  155. package/dist/assets/Presets-c1J4UwX0.js +0 -4
  156. package/dist/assets/Providers-B0LuYcAw.js +0 -1
  157. package/dist/assets/RequestLog-D2YGgG1C.js +0 -1
  158. package/dist/assets/Routing-B79eDIZL.js +0 -1
  159. package/dist/assets/Switch-BwBYBnSS.js +0 -1
  160. package/dist/assets/Workspaces-DuxGwCQ2.js +0 -1
  161. package/dist/assets/code-block-Djv3iQ0G.js +0 -3
  162. package/dist/assets/cursor-CTNYpsWo.js +0 -3
  163. package/dist/assets/highlighted-body-KQOG7T2V-D7DB9nBd.js +0 -1
  164. package/dist/assets/models-CLos5_p0.js +0 -1
  165. package/dist/assets/stored-CFfx95Ep.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e,j as s}from"./index-cESr4Zze.js";function _({checked:a,onChange:r,label:l,description:t,disabled:n,className:o}){const c=e.useId(),i=e.useId();return s.jsxs("div",{className:["as-switch",o].filter(Boolean).join(" "),children:[s.jsx("button",{id:c,type:"button",role:"switch","aria-checked":a,"aria-describedby":t?i:void 0,disabled:n,className:a?"as-switch__track as-switch__track--on":"as-switch__track",onClick:()=>r(!a),children:s.jsx("span",{className:"as-switch__thumb"})}),s.jsxs("label",{htmlFor:c,className:"as-switch__text",children:[s.jsx("span",{className:"as-switch__label",children:l}),t&&s.jsx("span",{id:i,className:"as-switch__desc",children:t})]})]})}export{_ as S};
@@ -1 +1 @@
1
- import{r as _,j as l}from"./index-DIcymBxc.js";import{r as j,f as I}from"./roving-DkptacxO.js";function u(a,n){return`${a}-tab-${n}`}function f(a,n){return`${a}-panel-${n}`}function y({value:a,onChange:n,tabs:e,id:s,label:o,className:x}){const p=_.useId(),d=s??p,m=Math.max(0,e.findIndex(t=>t.id===a));return l.jsx("div",{className:["as-tabs",x].filter(Boolean).join(" "),role:"tablist","aria-label":o,children:e.map((t,c)=>{const b=t.id===a;return l.jsx("button",{id:u(d,t.id),type:"button",role:"tab","aria-selected":b,"aria-controls":f(d,t.id),tabIndex:c===m?0:-1,className:b?"as-tabs__tab as-tabs__tab--on":"as-tabs__tab",onClick:()=>n(t.id),onKeyDown:r=>{const i=j(r,c,e.length);i!==null&&(r.preventDefault(),n(e[i].id),I(r,i,".as-tabs__tab"))},children:t.label},t.id)})})}function N({tabsId:a,tab:n,children:e,className:s,...o}){return l.jsx("div",{id:f(a,n),role:"tabpanel","aria-labelledby":u(a,n),tabIndex:0,className:["as-tabpanel",s].filter(Boolean).join(" "),...o,children:e})}export{y as T,N as a};
1
+ import{r as _,j as l}from"./index-cESr4Zze.js";import{r as j,f as I}from"./roving-DkptacxO.js";function u(a,n){return`${a}-tab-${n}`}function f(a,n){return`${a}-panel-${n}`}function y({value:a,onChange:n,tabs:e,id:s,label:o,className:x}){const p=_.useId(),d=s??p,m=Math.max(0,e.findIndex(t=>t.id===a));return l.jsx("div",{className:["as-tabs",x].filter(Boolean).join(" "),role:"tablist","aria-label":o,children:e.map((t,c)=>{const b=t.id===a;return l.jsx("button",{id:u(d,t.id),type:"button",role:"tab","aria-selected":b,"aria-controls":f(d,t.id),tabIndex:c===m?0:-1,className:b?"as-tabs__tab as-tabs__tab--on":"as-tabs__tab",onClick:()=>n(t.id),onKeyDown:r=>{const i=j(r,c,e.length);i!==null&&(r.preventDefault(),n(e[i].id),I(r,i,".as-tabs__tab"))},children:t.label},t.id)})})}function N({tabsId:a,tab:n,children:e,className:s,...o}){return l.jsx("div",{id:f(a,n),role:"tabpanel","aria-labelledby":u(a,n),tabIndex:0,className:["as-tabpanel",s].filter(Boolean).join(" "),...o,children:e})}export{y as T,N as a};
@@ -1 +1 @@
1
- import{r as o,j as s,a0 as c,a1 as m,a2 as u}from"./index-DIcymBxc.js";function j({label:a,hint:i,error:e,className:l,id:d,mono:r,...n}){const x=o.useId(),t=d??x;return s.jsxs("label",{className:u(l),htmlFor:t,children:[a&&s.jsx("span",{className:"as-field__label",children:a}),s.jsx("textarea",{id:t,className:c("as-field__textarea",r),"aria-invalid":e?!0:void 0,...n}),s.jsx(m,{error:e,hint:i})]})}export{j as T};
1
+ import{r as o,j as s,a0 as c,a1 as m,a2 as u}from"./index-cESr4Zze.js";function j({label:a,hint:i,error:e,className:l,id:d,mono:r,...n}){const x=o.useId(),t=d??x;return s.jsxs("label",{className:u(l),htmlFor:t,children:[a&&s.jsx("span",{className:"as-field__label",children:a}),s.jsx("textarea",{id:t,className:c("as-field__textarea",r),"aria-invalid":e?!0:void 0,...n}),s.jsx(m,{error:e,hint:i})]})}export{j as T};
@@ -1 +1 @@
1
- import{r as y,e as q,j as t,L as O,o as x,E as j,I as C,m as M,h as b,g as R,k as v,f as w,q as I}from"./index-DIcymBxc.js";import{a as L,b as U,c as B,t as N,s as _,O as F,d as $}from"./usage-DktoZRc8.js";import{S as c,O as A,a as H}from"./Charts-doK0mDVf.js";const K=[{value:"spend",label:"Spend"},{value:"requests",label:"Requests"},{value:"tokens",label:"Tokens"}],z={spend:e=>R(e),requests:e=>b(e,{compact:!0}),tokens:e=>v(e)};function h(e){return e==="24h"?"hour":e==="90d"?"week":"day"}const D={input:c[0],cached:c[5],output:c[2]};function P(e,r){return e==="tokens"?`Tokens per ${h(r)} by type (input, cached input, output), UTC.`:`${K.find(l=>l.value===e).label} per ${h(r)} by model, UTC. The largest models get their own colour.`}function V({filter:e,range:r,now:l,metric:o,height:d}){const n=y.useMemo(()=>L(r,l),[r,l]),k={...e,from:n[0].from,to:n.at(-1).to-1,groupBy:$(r),splitBy:"model"},a=q({queryKey:I.usage(k),queryFn:()=>w.usage.report(k)}),i=y.useMemo(()=>U(a.data,n),[a.data,n]);if(a.isLoading)return t.jsx(O,{rows:1,height:d??240});if(a.error)return t.jsx(x,{error:a.error,onRetry:()=>void a.refetch()});const p=B(i);if(p===0)return t.jsx(j,{icon:t.jsx(C.activity,{size:18}),title:"No usage in this range",body:"Requests made with this workspace's keys show up here."});const m=o==="tokens"?N(i):_(i,o),f=m.series.map((s,u)=>({...s,color:o==="tokens"?D[s.key]:s.key===F?A:c[u%c.length]})),E=f.reduce((s,u)=>s+u.total,0),g=i.reduce((s,u)=>s+u.groups.reduce((S,T)=>S+M(T.spent),0),0);return t.jsxs(t.Fragment,{children:[t.jsx(H,{label:o==="tokens"?"tokens by type":`${o} by model`,labels:n.map(s=>s.label),columns:m.columns,series:f,format:z[o],height:d}),E===0&&t.jsxs("p",{className:"gc-fineprint",children:[b(p)," ",p===1?"request":"requests",", ",R(g)," recorded so far",o==="tokens"?" (no token counts reported yet)":"","."]})]})}export{K as M,V as U,P as c};
1
+ import{r as y,e as q,j as t,L as O,o as x,E as j,I as C,m as M,h as b,g as R,k as v,f as w,q as I}from"./index-cESr4Zze.js";import{a as L,b as U,c as B,t as N,s as _,O as F,d as $}from"./usage-8BBeTlF-.js";import{S as c,O as A,a as H}from"./Charts-C65ZE2xP.js";const K=[{value:"spend",label:"Spend"},{value:"requests",label:"Requests"},{value:"tokens",label:"Tokens"}],z={spend:e=>R(e),requests:e=>b(e,{compact:!0}),tokens:e=>v(e)};function h(e){return e==="24h"?"hour":e==="90d"?"week":"day"}const D={input:c[0],cached:c[5],output:c[2]};function P(e,r){return e==="tokens"?`Tokens per ${h(r)} by type (input, cached input, output), UTC.`:`${K.find(l=>l.value===e).label} per ${h(r)} by model, UTC. The largest models get their own colour.`}function V({filter:e,range:r,now:l,metric:o,height:d}){const n=y.useMemo(()=>L(r,l),[r,l]),k={...e,from:n[0].from,to:n.at(-1).to-1,groupBy:$(r),splitBy:"model"},a=q({queryKey:I.usage(k),queryFn:()=>w.usage.report(k)}),i=y.useMemo(()=>U(a.data,n),[a.data,n]);if(a.isLoading)return t.jsx(O,{rows:1,height:d??240});if(a.error)return t.jsx(x,{error:a.error,onRetry:()=>void a.refetch()});const p=B(i);if(p===0)return t.jsx(j,{icon:t.jsx(C.activity,{size:18}),title:"No usage in this range",body:"Requests made with this workspace's keys show up here."});const m=o==="tokens"?N(i):_(i,o),f=m.series.map((s,u)=>({...s,color:o==="tokens"?D[s.key]:s.key===F?A:c[u%c.length]})),E=f.reduce((s,u)=>s+u.total,0),g=i.reduce((s,u)=>s+u.groups.reduce((S,T)=>S+M(T.spent),0),0);return t.jsxs(t.Fragment,{children:[t.jsx(H,{label:o==="tokens"?"tokens by type":`${o} by model`,labels:n.map(s=>s.label),columns:m.columns,series:f,format:z[o],height:d}),E===0&&t.jsxs("p",{className:"gc-fineprint",children:[b(p)," ",p===1?"request":"requests",", ",R(g)," recorded so far",o==="tokens"?" (no token counts reported yet)":"","."]})]})}export{K as M,V as U,P as c};
@@ -0,0 +1 @@
1
+ import{j as r,v as i,I as a}from"./index-cESr4Zze.js";const n="Full TEE: the seller node and its model provider both run in verified TEEs.",l="Partial TEE: only the seller node runs in a verified TEE. Its model provider is not TEE-attested and may see requests.",s="Advertises TEE attestation; the buyer has not verified it yet.";function E({tee:t,scope:e}){return e==="end-to-end"?r.jsxs(i,{tone:"info",title:n,"aria-label":n,children:[r.jsx(a.teeFull,{size:12}),"Full TEE"]}):e==="seller-node"?r.jsxs(i,{title:l,"aria-label":l,children:[r.jsx(a.teePartial,{size:12}),"Partial TEE"]}):t?r.jsx(i,{title:s,"aria-label":s,children:"TEE"}):null}function f({links:t}){return t!=null&&t.length?r.jsx("span",{className:"gc-verified-links",children:t.map(e=>r.jsx("a",{className:"gc-verified-link",href:e.href,target:"_blank",rel:"noopener noreferrer",title:e.kind==="domain"?`Verified domain: ${e.label}`:`Verified GitHub: ${e.label}`,onClick:o=>o.stopPropagation(),children:e.label},`${e.kind}:${e.href}`))}):null}export{E as T,f as V};
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WalletFunding-Ydd9gD2t.js","assets/index-DIcymBxc.js","assets/index-CfhMI0GY.css","assets/en_US-Y4ZOVFV4-CmhP8GU2.js","assets/clsx-B-dksMZM.js","assets/index-BhwNCc8y.js","assets/en_US-Y4ZOVFV4-CcVPgXVa.css","assets/useTx-WkiDSW_A.js","assets/writeContract-DrAWt0yz.js","assets/sendTransaction-CqpP3CZj.js","assets/ConnectWallet-DQ0PC6SO.js","assets/OperatorGateAlert-D92zhyXC.js","assets/OperatorActions-DrRpfDBV.js","assets/ChannelClose-D8CcISX0.js"])))=>i.map(i=>d[i]);
2
- import{j as e,r as L,$ as $t,f as K,F as ge,c9 as Zt,G as ie,ca as _t,g as P,m as Y,cb as It,aI as Xt,c6 as en,B as T,I as D,q as F,L as me,w as O,aN as Ge,C as Q,ah as se,_ as pe,aF as oe,u as zt,H as ae,aC as tn,y as Ft,Q as le,E as Ye,cc as nn,M as te,e as Ut,t as we,T as qt,Z as he,l as xe,a8 as rn,a9 as sn,v as $e,J as Ot,aH as on,N as Ze,cd as an,aT as ln,at as cn,R as dn,bM as un,P as hn,K as fn,i as gn,n as mn,ce as pn,cf as wn,bO as ce,cg as xn,aK as yn,ch as vn,ci as jn,cj as Cn,ck as bn,aL as nt,cl as rt,cm as Nn}from"./index-DIcymBxc.js";import{C as ye}from"./ChainGate-In51TI2h.js";import{b as An}from"./index-BhwNCc8y.js";import{r as En}from"./dijkstra-COg3n3zL.js";import{D as Vt}from"./DataTable-BTwj5g1m.js";import{D as Sn,S as Bn}from"./Switch-BwBYBnSS.js";const Mn="#2775CA";function kn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:Mn}),e.jsx("text",{x:"12",y:"16.6",textAnchor:"middle",fontSize:"13.5",fontWeight:"700",fill:"#fff",children:"$"})]})}function Ln({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#0052FF"}),e.jsx("rect",{x:"1",y:"10.95",width:"15.85",height:"2.1",fill:"#fff"})]})}const Rn="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z";function Tn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsx("path",{d:Rn,fill:"#000",transform:"translate(7.3 6.4) scale(0.0115)"})]})}function st({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsx("circle",{cx:"9.4",cy:"12",r:"4.6",fill:"#EB001B"}),e.jsx("circle",{cx:"14.6",cy:"12",r:"4.6",fill:"#F79E1B",fillOpacity:"0.9"})]})}function Pn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsxs("g",{transform:"translate(6 6) scale(0.5)",children:[e.jsx("path",{fill:"#4285F4",d:"M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"}),e.jsx("path",{fill:"#34A853",d:"M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09C3.26 21.31 7.31 24 12 24z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.27 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62H1.29C.47 8.24 0 10.06 0 12s.47 3.76 1.29 5.38l3.98-3.09z"}),e.jsx("path",{fill:"#EA4335",d:"M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"})]})]})}function it({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#1434CB"}),e.jsx("text",{x:"12",y:"14.6",textAnchor:"middle",fontSize:"7",fontWeight:"800",fontStyle:"italic",fill:"#fff",children:"VISA"})]})}function Dn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#016FD0"}),e.jsx("text",{x:"12",y:"14.6",textAnchor:"middle",fontSize:"6",fontWeight:"800",fill:"#fff",children:"AMEX"})]})}function _n({size:t=22}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 512 512","aria-hidden":"true",children:[e.jsx("rect",{width:"512",height:"512",rx:"64",fill:"#533AFD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M120 392L392 334.317V120L120 178.357V392Z",fill:"#fff"})]})}function In({size:t=20}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 542.25 542.25",fill:"#34D399","aria-hidden":"true",children:[e.jsx("path",{d:"M493.18,424.48l-106.09,106.09c-7.48,7.48-17.63,11.69-28.21,11.69h-192.03l250.27-250.27,76.06,76.06c15.58,15.58,15.58,40.85,0,56.43Z"}),e.jsx("path",{d:"M375.41,0L125.14,250.27l-76.06-76.06c-15.58-15.58-15.58-40.85,0-56.43L155.16,11.69c7.48-7.48,17.63-11.69,28.21-11.69h192.03Z"}),e.jsx("path",{d:"M542.25,375.41l-250.27-250.27,76.06-76.06c15.58-15.58,40.85-15.58,56.43,0l106.09,106.09c7.48,7.48,11.69,17.63,11.69,28.21v192.03Z"}),e.jsx("path",{d:"M250.27,417.12l-76.06,76.06c-15.58,15.58-40.85,15.58-56.43,0L11.69,387.09c-7.48-7.48-11.69-17.63-11.69-28.21v-192.03l250.27,250.27Z"})]})}function zn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 2500 2500","aria-hidden":"true",children:[e.jsx("path",{fill:"#213147",d:"M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z"}),e.jsx("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"}),e.jsx("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"}),e.jsx("path",{fill:"#9DCCED",d:"M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z"}),e.jsx("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234"}),e.jsx("path",{fill:"#fff",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),e.jsx("path",{fill:"#fff",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})}function Fn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 2496 2496","aria-hidden":"true",children:[e.jsx("path",{fill:"#F0B90B",fillRule:"evenodd",clipRule:"evenodd",d:"M1248,0c689.3,0,1248,558.7,1248,1248s-558.7,1248-1248,1248S0,1937.3,0,1248S558.7,0,1248,0L1248,0z"}),e.jsxs("g",{fill:"#fff",children:[e.jsx("path",{d:"M685.9,1248l0.9,330l280.4,165v193.2l-444.5-260.7v-524L685.9,1248L685.9,1248z M685.9,918v192.3l-163.3-96.6V821.4l163.3-96.6l164.1,96.6L685.9,918L685.9,918z M1084.3,821.4l163.3-96.6l164.1,96.6L1247.6,918L1084.3,821.4L1084.3,821.4z"}),e.jsx("path",{d:"M803.9,1509.6v-193.2l163.3,96.6v192.3L803.9,1509.6L803.9,1509.6z M1084.3,1812.2l163.3,96.6l164.1-96.6v192.3l-164.1,96.6l-163.3-96.6V1812.2L1084.3,1812.2z M1645.9,821.4l163.3-96.6l164.1,96.6v192.3l-164.1,96.6V918L1645.9,821.4L1645.9,821.4L1645.9,821.4z M1809.2,1578l0.9-330l163.3-96.6v524l-444.5,260.7v-193.2L1809.2,1578L1809.2,1578L1809.2,1578z"}),e.jsx("polygon",{points:"1692.1,1509.6 1528.8,1605.3 1528.8,1413 1692.1,1316.4 1692.1,1509.6"}),e.jsx("path",{d:"M1692.1,986.4l0.9,193.2l-281.2,165v330.8l-163.3,95.7l-163.3-95.7v-330.8l-281.2-165V986.4L968,889.8l279.5,165.8l281.2-165.8l164.1,96.6H1692.1L1692.1,986.4z M803.9,656.5l443.7-261.6l444.5,261.6l-163.3,96.6l-281.2-165.8L967.2,753.1L803.9,656.5L803.9,656.5z"})]})]})}function Un({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#6C00F6"}),e.jsx("path",{fill:"#fff",transform:"translate(5.5 6.15) scale(0.0731)",d:"M66.8,54.7l-16.7-9.7L0,74.1v58l50.1,29l50.1-29V41.9L128,25.8l27.8,16.1v32.2L128,90.2l-16.7-9.7v25.8l16.7,9.7l50.1-29V29L128,0L77.9,29v90.2l-27.8,16.1l-27.8-16.1V86.9l27.8-16.1l16.7,9.7V54.7z"})]})}function qn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 32 32","aria-hidden":"true",children:[e.jsx("circle",{cx:"16",cy:"16",r:"16",fill:"#627EEA"}),e.jsxs("g",{fill:"#fff",fillRule:"nonzero",children:[e.jsx("path",{fillOpacity:"0.602",d:"M16.498 4v8.87l7.497 3.35z"}),e.jsx("path",{d:"M16.498 4L9 16.22l7.498-3.35z"}),e.jsx("path",{fillOpacity:"0.602",d:"M16.498 21.968v6.027L24 17.616z"}),e.jsx("path",{d:"M16.498 27.995v-6.028L9 17.616z"}),e.jsx("path",{fillOpacity:"0.2",d:"M16.498 20.573l7.497-4.353-7.497-3.348z"}),e.jsx("path",{fillOpacity:"0.602",d:"M9 16.22l7.498 4.353v-7.701z"})]})]})}const On=6e4;function Vn(t,i,o=document){let n,r=!1,s=!1;const a=m=>{r||(s=m==="active",i.wallet.watch(t,m).catch(p=>{$t(p)&&p.status===409&&(r=!0)}))},c=()=>{clearInterval(n),a("active"),n=setInterval(()=>a("active"),On)},l=()=>{clearInterval(n),s&&a("background")},f=()=>o.visibilityState==="hidden"?l():c();return o.visibilityState!=="hidden"&&c(),o.addEventListener("visibilitychange",f),()=>{o.removeEventListener("visibilitychange",f),l(),r=!0}}function Hn(t){L.useEffect(()=>Vn(t,K),[t])}const fe=3e4;function Wn(t,i=fe,{minIntervalMs:o=fe,doc:n=document}={}){const r=Math.max(i,o);let s;const a=()=>{clearInterval(s),s=setInterval(t,r)},c=()=>{n.visibilityState==="hidden"?(clearInterval(s),s=void 0):(t(),a())};return n.visibilityState!=="hidden"&&a(),n.addEventListener("visibilitychange",c),()=>{clearInterval(s),n.removeEventListener("visibilitychange",c)}}function Kn(t,i=fe,o=fe){const n=ge(),r=JSON.stringify(t);L.useEffect(()=>Wn(()=>void n.invalidateQueries({queryKey:JSON.parse(r)}),i,{minIntervalMs:o}),[r,i,o,n])}var ee={},Ne,ot;function Jn(){return ot||(ot=1,Ne=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Ne}var Ae={},J={},at;function $(){if(at)return J;at=1;let t;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return J.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},J.getSymbolTotalCodewords=function(n){return i[n]},J.getBCHDigit=function(o){let n=0;for(;o!==0;)n++,o>>>=1;return n},J.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');t=n},J.isKanjiModeEnabled=function(){return typeof t<"u"},J.toSJIS=function(n){return t(n)},J}var Ee={},lt;function Xe(){return lt||(lt=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+o)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return i(n)}catch{return r}}})(Ee)),Ee}var Se,ct;function Qn(){if(ct)return Se;ct=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(i){const o=Math.floor(i/8);return(this.buffer[o]>>>7-i%8&1)===1},put:function(i,o){for(let n=0;n<o;n++)this.putBit((i>>>o-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(i){const o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),i&&(this.buffer[o]|=128>>>this.length%8),this.length++}},Se=t,Se}var Be,dt;function Gn(){if(dt)return Be;dt=1;function t(i){if(!i||i<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=i,this.data=new Uint8Array(i*i),this.reservedBit=new Uint8Array(i*i)}return t.prototype.set=function(i,o,n,r){const s=i*this.size+o;this.data[s]=n,r&&(this.reservedBit[s]=!0)},t.prototype.get=function(i,o){return this.data[i*this.size+o]},t.prototype.xor=function(i,o,n){this.data[i*this.size+o]^=n},t.prototype.isReserved=function(i,o){return this.reservedBit[i*this.size+o]},Be=t,Be}var Me={},ut;function Yn(){return ut||(ut=1,(function(t){const i=$().getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,s=i(n),a=s===145?26:Math.ceil((s-13)/(2*r-2))*2,c=[s-7];for(let l=1;l<r-1;l++)c[l]=c[l-1]-a;return c.push(6),c.reverse()},t.getPositions=function(n){const r=[],s=t.getRowColCoords(n),a=s.length;for(let c=0;c<a;c++)for(let l=0;l<a;l++)c===0&&l===0||c===0&&l===a-1||c===a-1&&l===0||r.push([s[c],s[l]]);return r}})(Me)),Me}var ke={},ht;function $n(){if(ht)return ke;ht=1;const t=$().getSymbolSize,i=7;return ke.getPositions=function(n){const r=t(n);return[[0,0],[r-i,0],[0,r-i]]},ke}var Le={},ft;function Zn(){return ft||(ft=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const i={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const s=r.size;let a=0,c=0,l=0,f=null,m=null;for(let p=0;p<s;p++){c=l=0,f=m=null;for(let g=0;g<s;g++){let d=r.get(p,g);d===f?c++:(c>=5&&(a+=i.N1+(c-5)),f=d,c=1),d=r.get(g,p),d===m?l++:(l>=5&&(a+=i.N1+(l-5)),m=d,l=1)}c>=5&&(a+=i.N1+(c-5)),l>=5&&(a+=i.N1+(l-5))}return a},t.getPenaltyN2=function(r){const s=r.size;let a=0;for(let c=0;c<s-1;c++)for(let l=0;l<s-1;l++){const f=r.get(c,l)+r.get(c,l+1)+r.get(c+1,l)+r.get(c+1,l+1);(f===4||f===0)&&a++}return a*i.N2},t.getPenaltyN3=function(r){const s=r.size;let a=0,c=0,l=0;for(let f=0;f<s;f++){c=l=0;for(let m=0;m<s;m++)c=c<<1&2047|r.get(f,m),m>=10&&(c===1488||c===93)&&a++,l=l<<1&2047|r.get(m,f),m>=10&&(l===1488||l===93)&&a++}return a*i.N3},t.getPenaltyN4=function(r){let s=0;const a=r.data.length;for(let l=0;l<a;l++)s+=r.data[l];return Math.abs(Math.ceil(s*100/a/5)-10)*i.N4};function o(n,r,s){switch(n){case t.Patterns.PATTERN000:return(r+s)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(r+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return r*s%2+r*s%3===0;case t.Patterns.PATTERN110:return(r*s%2+r*s%3)%2===0;case t.Patterns.PATTERN111:return(r*s%3+(r+s)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(r,s){const a=s.size;for(let c=0;c<a;c++)for(let l=0;l<a;l++)s.isReserved(l,c)||s.xor(l,c,o(r,l,c))},t.getBestMask=function(r,s){const a=Object.keys(t.Patterns).length;let c=0,l=1/0;for(let f=0;f<a;f++){s(f),t.applyMask(f,r);const m=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(f,r),m<l&&(l=m,c=f)}return c}})(Le)),Le}var de={},gt;function Ht(){if(gt)return de;gt=1;const t=Xe(),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return de.getBlocksCount=function(r,s){switch(s){case t.L:return i[(r-1)*4+0];case t.M:return i[(r-1)*4+1];case t.Q:return i[(r-1)*4+2];case t.H:return i[(r-1)*4+3];default:return}},de.getTotalCodewordsCount=function(r,s){switch(s){case t.L:return o[(r-1)*4+0];case t.M:return o[(r-1)*4+1];case t.Q:return o[(r-1)*4+2];case t.H:return o[(r-1)*4+3];default:return}},de}var Re={},re={},mt;function Xn(){if(mt)return re;mt=1;const t=new Uint8Array(512),i=new Uint8Array(256);return(function(){let n=1;for(let r=0;r<255;r++)t[r]=n,i[n]=r,n<<=1,n&256&&(n^=285);for(let r=255;r<512;r++)t[r]=t[r-255]})(),re.log=function(n){if(n<1)throw new Error("log("+n+")");return i[n]},re.exp=function(n){return t[n]},re.mul=function(n,r){return n===0||r===0?0:t[i[n]+i[r]]},re}var pt;function er(){return pt||(pt=1,(function(t){const i=Xn();t.mul=function(n,r){const s=new Uint8Array(n.length+r.length-1);for(let a=0;a<n.length;a++)for(let c=0;c<r.length;c++)s[a+c]^=i.mul(n[a],r[c]);return s},t.mod=function(n,r){let s=new Uint8Array(n);for(;s.length-r.length>=0;){const a=s[0];for(let l=0;l<r.length;l++)s[l]^=i.mul(r[l],a);let c=0;for(;c<s.length&&s[c]===0;)c++;s=s.slice(c)}return s},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let s=0;s<n;s++)r=t.mul(r,new Uint8Array([1,i.exp(s)]));return r}})(Re)),Re}var Te,wt;function tr(){if(wt)return Te;wt=1;const t=er();function i(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}return i.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},i.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const s=t.mod(r,this.genPoly),a=this.degree-s.length;if(a>0){const c=new Uint8Array(this.degree);return c.set(s,a),c}return s},Te=i,Te}var Pe={},De={},_e={},xt;function Wt(){return xt||(xt=1,_e.isValid=function(i){return!isNaN(i)&&i>=1&&i<=40}),_e}var q={},yt;function Kt(){if(yt)return q;yt=1;const t="[0-9]+",i="[A-Z $%*+\\-./:]+";let o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";o=o.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+o+`)(?:.|[\r
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WalletFunding-BbhXB813.js","assets/index-cESr4Zze.js","assets/index-DYK1gWhP.css","assets/en_US-Y4ZOVFV4-sKQksBWU.js","assets/clsx-B-dksMZM.js","assets/index-BhwNCc8y.js","assets/en_US-Y4ZOVFV4-CcVPgXVa.css","assets/useTx-DsLsc5bB.js","assets/writeContract-Cqg_OlRQ.js","assets/sendTransaction-Cmz5eiPq.js","assets/ConnectWallet-CLv0c-JB.js","assets/OperatorGateAlert-grMRoFdV.js","assets/OperatorActions-BuEpaCiH.js","assets/ChannelClose-DpNV5MqB.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as L,$ as $t,f as K,F as ge,c9 as Zt,G as ie,ca as _t,g as P,m as Y,cb as It,aI as Xt,c6 as en,B as T,I as D,q as F,L as me,w as O,aN as Ge,C as Q,ah as se,_ as pe,aF as oe,u as zt,H as ae,aC as tn,y as Ft,Q as le,E as Ye,cc as nn,M as te,e as Ut,t as we,T as qt,Z as he,l as xe,a8 as rn,a9 as sn,v as $e,J as Ot,aH as on,N as Ze,cd as an,aT as ln,at as cn,R as dn,bX as un,P as hn,K as fn,i as gn,n as mn,ce as pn,cf as wn,bZ as ce,cg as xn,aK as yn,ch as vn,ci as jn,cj as Cn,ck as bn,aL as nt,cl as rt,cm as Nn}from"./index-cESr4Zze.js";import{C as ye}from"./ChainGate-DpChfDOP.js";import{b as An}from"./index-BhwNCc8y.js";import{r as En}from"./dijkstra-COg3n3zL.js";import{D as Vt}from"./DataTable-BkJdorEh.js";import{D as Sn}from"./Disclosure-DMLE7rCw.js";import{S as Bn}from"./Switch-B2AEvyu7.js";const Mn="#2775CA";function kn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:Mn}),e.jsx("text",{x:"12",y:"16.6",textAnchor:"middle",fontSize:"13.5",fontWeight:"700",fill:"#fff",children:"$"})]})}function Ln({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#0052FF"}),e.jsx("rect",{x:"1",y:"10.95",width:"15.85",height:"2.1",fill:"#fff"})]})}const Rn="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z";function Tn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsx("path",{d:Rn,fill:"#000",transform:"translate(7.3 6.4) scale(0.0115)"})]})}function st({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsx("circle",{cx:"9.4",cy:"12",r:"4.6",fill:"#EB001B"}),e.jsx("circle",{cx:"14.6",cy:"12",r:"4.6",fill:"#F79E1B",fillOpacity:"0.9"})]})}function Pn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsxs("g",{transform:"translate(6 6) scale(0.5)",children:[e.jsx("path",{fill:"#4285F4",d:"M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"}),e.jsx("path",{fill:"#34A853",d:"M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09C3.26 21.31 7.31 24 12 24z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.27 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62H1.29C.47 8.24 0 10.06 0 12s.47 3.76 1.29 5.38l3.98-3.09z"}),e.jsx("path",{fill:"#EA4335",d:"M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"})]})]})}function it({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#1434CB"}),e.jsx("text",{x:"12",y:"14.6",textAnchor:"middle",fontSize:"7",fontWeight:"800",fontStyle:"italic",fill:"#fff",children:"VISA"})]})}function Dn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#016FD0"}),e.jsx("text",{x:"12",y:"14.6",textAnchor:"middle",fontSize:"6",fontWeight:"800",fill:"#fff",children:"AMEX"})]})}function _n({size:t=22}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 512 512","aria-hidden":"true",children:[e.jsx("rect",{width:"512",height:"512",rx:"64",fill:"#533AFD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M120 392L392 334.317V120L120 178.357V392Z",fill:"#fff"})]})}function In({size:t=20}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 542.25 542.25",fill:"#34D399","aria-hidden":"true",children:[e.jsx("path",{d:"M493.18,424.48l-106.09,106.09c-7.48,7.48-17.63,11.69-28.21,11.69h-192.03l250.27-250.27,76.06,76.06c15.58,15.58,15.58,40.85,0,56.43Z"}),e.jsx("path",{d:"M375.41,0L125.14,250.27l-76.06-76.06c-15.58-15.58-15.58-40.85,0-56.43L155.16,11.69c7.48-7.48,17.63-11.69,28.21-11.69h192.03Z"}),e.jsx("path",{d:"M542.25,375.41l-250.27-250.27,76.06-76.06c15.58-15.58,40.85-15.58,56.43,0l106.09,106.09c7.48,7.48,11.69,17.63,11.69,28.21v192.03Z"}),e.jsx("path",{d:"M250.27,417.12l-76.06,76.06c-15.58,15.58-40.85,15.58-56.43,0L11.69,387.09c-7.48-7.48-11.69-17.63-11.69-28.21v-192.03l250.27,250.27Z"})]})}function zn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 2500 2500","aria-hidden":"true",children:[e.jsx("path",{fill:"#213147",d:"M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z"}),e.jsx("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"}),e.jsx("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"}),e.jsx("path",{fill:"#9DCCED",d:"M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z"}),e.jsx("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234"}),e.jsx("path",{fill:"#fff",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),e.jsx("path",{fill:"#fff",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})}function Fn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 2496 2496","aria-hidden":"true",children:[e.jsx("path",{fill:"#F0B90B",fillRule:"evenodd",clipRule:"evenodd",d:"M1248,0c689.3,0,1248,558.7,1248,1248s-558.7,1248-1248,1248S0,1937.3,0,1248S558.7,0,1248,0L1248,0z"}),e.jsxs("g",{fill:"#fff",children:[e.jsx("path",{d:"M685.9,1248l0.9,330l280.4,165v193.2l-444.5-260.7v-524L685.9,1248L685.9,1248z M685.9,918v192.3l-163.3-96.6V821.4l163.3-96.6l164.1,96.6L685.9,918L685.9,918z M1084.3,821.4l163.3-96.6l164.1,96.6L1247.6,918L1084.3,821.4L1084.3,821.4z"}),e.jsx("path",{d:"M803.9,1509.6v-193.2l163.3,96.6v192.3L803.9,1509.6L803.9,1509.6z M1084.3,1812.2l163.3,96.6l164.1-96.6v192.3l-164.1,96.6l-163.3-96.6V1812.2L1084.3,1812.2z M1645.9,821.4l163.3-96.6l164.1,96.6v192.3l-164.1,96.6V918L1645.9,821.4L1645.9,821.4L1645.9,821.4z M1809.2,1578l0.9-330l163.3-96.6v524l-444.5,260.7v-193.2L1809.2,1578L1809.2,1578L1809.2,1578z"}),e.jsx("polygon",{points:"1692.1,1509.6 1528.8,1605.3 1528.8,1413 1692.1,1316.4 1692.1,1509.6"}),e.jsx("path",{d:"M1692.1,986.4l0.9,193.2l-281.2,165v330.8l-163.3,95.7l-163.3-95.7v-330.8l-281.2-165V986.4L968,889.8l279.5,165.8l281.2-165.8l164.1,96.6H1692.1L1692.1,986.4z M803.9,656.5l443.7-261.6l444.5,261.6l-163.3,96.6l-281.2-165.8L967.2,753.1L803.9,656.5L803.9,656.5z"})]})]})}function Un({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#6C00F6"}),e.jsx("path",{fill:"#fff",transform:"translate(5.5 6.15) scale(0.0731)",d:"M66.8,54.7l-16.7-9.7L0,74.1v58l50.1,29l50.1-29V41.9L128,25.8l27.8,16.1v32.2L128,90.2l-16.7-9.7v25.8l16.7,9.7l50.1-29V29L128,0L77.9,29v90.2l-27.8,16.1l-27.8-16.1V86.9l27.8-16.1l16.7,9.7V54.7z"})]})}function qn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 32 32","aria-hidden":"true",children:[e.jsx("circle",{cx:"16",cy:"16",r:"16",fill:"#627EEA"}),e.jsxs("g",{fill:"#fff",fillRule:"nonzero",children:[e.jsx("path",{fillOpacity:"0.602",d:"M16.498 4v8.87l7.497 3.35z"}),e.jsx("path",{d:"M16.498 4L9 16.22l7.498-3.35z"}),e.jsx("path",{fillOpacity:"0.602",d:"M16.498 21.968v6.027L24 17.616z"}),e.jsx("path",{d:"M16.498 27.995v-6.028L9 17.616z"}),e.jsx("path",{fillOpacity:"0.2",d:"M16.498 20.573l7.497-4.353-7.497-3.348z"}),e.jsx("path",{fillOpacity:"0.602",d:"M9 16.22l7.498 4.353v-7.701z"})]})]})}const On=6e4;function Vn(t,i,o=document){let n,r=!1,s=!1;const a=m=>{r||(s=m==="active",i.wallet.watch(t,m).catch(p=>{$t(p)&&p.status===409&&(r=!0)}))},c=()=>{clearInterval(n),a("active"),n=setInterval(()=>a("active"),On)},l=()=>{clearInterval(n),s&&a("background")},f=()=>o.visibilityState==="hidden"?l():c();return o.visibilityState!=="hidden"&&c(),o.addEventListener("visibilitychange",f),()=>{o.removeEventListener("visibilitychange",f),l(),r=!0}}function Hn(t){L.useEffect(()=>Vn(t,K),[t])}const fe=3e4;function Wn(t,i=fe,{minIntervalMs:o=fe,doc:n=document}={}){const r=Math.max(i,o);let s;const a=()=>{clearInterval(s),s=setInterval(t,r)},c=()=>{n.visibilityState==="hidden"?(clearInterval(s),s=void 0):(t(),a())};return n.visibilityState!=="hidden"&&a(),n.addEventListener("visibilitychange",c),()=>{clearInterval(s),n.removeEventListener("visibilitychange",c)}}function Kn(t,i=fe,o=fe){const n=ge(),r=JSON.stringify(t);L.useEffect(()=>Wn(()=>void n.invalidateQueries({queryKey:JSON.parse(r)}),i,{minIntervalMs:o}),[r,i,o,n])}var ee={},Ne,ot;function Jn(){return ot||(ot=1,Ne=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Ne}var Ae={},J={},at;function $(){if(at)return J;at=1;let t;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return J.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},J.getSymbolTotalCodewords=function(n){return i[n]},J.getBCHDigit=function(o){let n=0;for(;o!==0;)n++,o>>>=1;return n},J.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');t=n},J.isKanjiModeEnabled=function(){return typeof t<"u"},J.toSJIS=function(n){return t(n)},J}var Ee={},lt;function Xe(){return lt||(lt=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+o)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return i(n)}catch{return r}}})(Ee)),Ee}var Se,ct;function Qn(){if(ct)return Se;ct=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(i){const o=Math.floor(i/8);return(this.buffer[o]>>>7-i%8&1)===1},put:function(i,o){for(let n=0;n<o;n++)this.putBit((i>>>o-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(i){const o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),i&&(this.buffer[o]|=128>>>this.length%8),this.length++}},Se=t,Se}var Be,dt;function Gn(){if(dt)return Be;dt=1;function t(i){if(!i||i<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=i,this.data=new Uint8Array(i*i),this.reservedBit=new Uint8Array(i*i)}return t.prototype.set=function(i,o,n,r){const s=i*this.size+o;this.data[s]=n,r&&(this.reservedBit[s]=!0)},t.prototype.get=function(i,o){return this.data[i*this.size+o]},t.prototype.xor=function(i,o,n){this.data[i*this.size+o]^=n},t.prototype.isReserved=function(i,o){return this.reservedBit[i*this.size+o]},Be=t,Be}var Me={},ut;function Yn(){return ut||(ut=1,(function(t){const i=$().getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,s=i(n),a=s===145?26:Math.ceil((s-13)/(2*r-2))*2,c=[s-7];for(let l=1;l<r-1;l++)c[l]=c[l-1]-a;return c.push(6),c.reverse()},t.getPositions=function(n){const r=[],s=t.getRowColCoords(n),a=s.length;for(let c=0;c<a;c++)for(let l=0;l<a;l++)c===0&&l===0||c===0&&l===a-1||c===a-1&&l===0||r.push([s[c],s[l]]);return r}})(Me)),Me}var ke={},ht;function $n(){if(ht)return ke;ht=1;const t=$().getSymbolSize,i=7;return ke.getPositions=function(n){const r=t(n);return[[0,0],[r-i,0],[0,r-i]]},ke}var Le={},ft;function Zn(){return ft||(ft=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const i={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const s=r.size;let a=0,c=0,l=0,f=null,m=null;for(let p=0;p<s;p++){c=l=0,f=m=null;for(let g=0;g<s;g++){let d=r.get(p,g);d===f?c++:(c>=5&&(a+=i.N1+(c-5)),f=d,c=1),d=r.get(g,p),d===m?l++:(l>=5&&(a+=i.N1+(l-5)),m=d,l=1)}c>=5&&(a+=i.N1+(c-5)),l>=5&&(a+=i.N1+(l-5))}return a},t.getPenaltyN2=function(r){const s=r.size;let a=0;for(let c=0;c<s-1;c++)for(let l=0;l<s-1;l++){const f=r.get(c,l)+r.get(c,l+1)+r.get(c+1,l)+r.get(c+1,l+1);(f===4||f===0)&&a++}return a*i.N2},t.getPenaltyN3=function(r){const s=r.size;let a=0,c=0,l=0;for(let f=0;f<s;f++){c=l=0;for(let m=0;m<s;m++)c=c<<1&2047|r.get(f,m),m>=10&&(c===1488||c===93)&&a++,l=l<<1&2047|r.get(m,f),m>=10&&(l===1488||l===93)&&a++}return a*i.N3},t.getPenaltyN4=function(r){let s=0;const a=r.data.length;for(let l=0;l<a;l++)s+=r.data[l];return Math.abs(Math.ceil(s*100/a/5)-10)*i.N4};function o(n,r,s){switch(n){case t.Patterns.PATTERN000:return(r+s)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(r+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return r*s%2+r*s%3===0;case t.Patterns.PATTERN110:return(r*s%2+r*s%3)%2===0;case t.Patterns.PATTERN111:return(r*s%3+(r+s)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(r,s){const a=s.size;for(let c=0;c<a;c++)for(let l=0;l<a;l++)s.isReserved(l,c)||s.xor(l,c,o(r,l,c))},t.getBestMask=function(r,s){const a=Object.keys(t.Patterns).length;let c=0,l=1/0;for(let f=0;f<a;f++){s(f),t.applyMask(f,r);const m=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(f,r),m<l&&(l=m,c=f)}return c}})(Le)),Le}var de={},gt;function Ht(){if(gt)return de;gt=1;const t=Xe(),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return de.getBlocksCount=function(r,s){switch(s){case t.L:return i[(r-1)*4+0];case t.M:return i[(r-1)*4+1];case t.Q:return i[(r-1)*4+2];case t.H:return i[(r-1)*4+3];default:return}},de.getTotalCodewordsCount=function(r,s){switch(s){case t.L:return o[(r-1)*4+0];case t.M:return o[(r-1)*4+1];case t.Q:return o[(r-1)*4+2];case t.H:return o[(r-1)*4+3];default:return}},de}var Re={},re={},mt;function Xn(){if(mt)return re;mt=1;const t=new Uint8Array(512),i=new Uint8Array(256);return(function(){let n=1;for(let r=0;r<255;r++)t[r]=n,i[n]=r,n<<=1,n&256&&(n^=285);for(let r=255;r<512;r++)t[r]=t[r-255]})(),re.log=function(n){if(n<1)throw new Error("log("+n+")");return i[n]},re.exp=function(n){return t[n]},re.mul=function(n,r){return n===0||r===0?0:t[i[n]+i[r]]},re}var pt;function er(){return pt||(pt=1,(function(t){const i=Xn();t.mul=function(n,r){const s=new Uint8Array(n.length+r.length-1);for(let a=0;a<n.length;a++)for(let c=0;c<r.length;c++)s[a+c]^=i.mul(n[a],r[c]);return s},t.mod=function(n,r){let s=new Uint8Array(n);for(;s.length-r.length>=0;){const a=s[0];for(let l=0;l<r.length;l++)s[l]^=i.mul(r[l],a);let c=0;for(;c<s.length&&s[c]===0;)c++;s=s.slice(c)}return s},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let s=0;s<n;s++)r=t.mul(r,new Uint8Array([1,i.exp(s)]));return r}})(Re)),Re}var Te,wt;function tr(){if(wt)return Te;wt=1;const t=er();function i(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}return i.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},i.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const s=t.mod(r,this.genPoly),a=this.degree-s.length;if(a>0){const c=new Uint8Array(this.degree);return c.set(s,a),c}return s},Te=i,Te}var Pe={},De={},_e={},xt;function Wt(){return xt||(xt=1,_e.isValid=function(i){return!isNaN(i)&&i>=1&&i<=40}),_e}var q={},yt;function Kt(){if(yt)return q;yt=1;const t="[0-9]+",i="[A-Z $%*+\\-./:]+";let o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";o=o.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+o+`)(?:.|[\r
3
3
  ]))+`;q.KANJI=new RegExp(o,"g"),q.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),q.BYTE=new RegExp(n,"g"),q.NUMERIC=new RegExp(t,"g"),q.ALPHANUMERIC=new RegExp(i,"g");const r=new RegExp("^"+o+"$"),s=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return q.testKanji=function(l){return r.test(l)},q.testNumeric=function(l){return s.test(l)},q.testAlphanumeric=function(l){return a.test(l)},q}var vt;function Z(){return vt||(vt=1,(function(t){const i=Wt(),o=Kt();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!i.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return o.testNumeric(s)?t.NUMERIC:o.testAlphanumeric(s)?t.ALPHANUMERIC:o.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(s,a){if(t.isValid(s))return s;try{return n(s)}catch{return a}}})(De)),De}var jt;function nr(){return jt||(jt=1,(function(t){const i=$(),o=Ht(),n=Xe(),r=Z(),s=Wt(),a=7973,c=i.getBCHDigit(a);function l(g,d,B){for(let E=1;E<=40;E++)if(d<=t.getCapacity(E,B,g))return E}function f(g,d){return r.getCharCountIndicator(g,d)+4}function m(g,d){let B=0;return g.forEach(function(E){const R=f(E.mode,d);B+=R+E.getBitsLength()}),B}function p(g,d){for(let B=1;B<=40;B++)if(m(g,B)<=t.getCapacity(B,d,r.MIXED))return B}t.from=function(d,B){return s.isValid(d)?parseInt(d,10):B},t.getCapacity=function(d,B,E){if(!s.isValid(d))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=r.BYTE);const R=i.getSymbolTotalCodewords(d),A=o.getTotalCodewordsCount(d,B),y=(R-A)*8;if(E===r.MIXED)return y;const j=y-f(E,d);switch(E){case r.NUMERIC:return Math.floor(j/10*3);case r.ALPHANUMERIC:return Math.floor(j/11*2);case r.KANJI:return Math.floor(j/13);case r.BYTE:default:return Math.floor(j/8)}},t.getBestVersionForData=function(d,B){let E;const R=n.from(B,n.M);if(Array.isArray(d)){if(d.length>1)return p(d,R);if(d.length===0)return 1;E=d[0]}else E=d;return l(E.mode,E.getLength(),R)},t.getEncodedBits=function(d){if(!s.isValid(d)||d<7)throw new Error("Invalid QR Code version");let B=d<<12;for(;i.getBCHDigit(B)-c>=0;)B^=a<<i.getBCHDigit(B)-c;return d<<12|B}})(Pe)),Pe}var Ie={},Ct;function rr(){if(Ct)return Ie;Ct=1;const t=$(),i=1335,o=21522,n=t.getBCHDigit(i);return Ie.getEncodedBits=function(s,a){const c=s.bit<<3|a;let l=c<<10;for(;t.getBCHDigit(l)-n>=0;)l^=i<<t.getBCHDigit(l)-n;return(c<<10|l)^o},Ie}var ze={},Fe,bt;function sr(){if(bt)return Fe;bt=1;const t=Z();function i(o){this.mode=t.NUMERIC,this.data=o.toString()}return i.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(n){let r,s,a;for(r=0;r+3<=this.data.length;r+=3)s=this.data.substr(r,3),a=parseInt(s,10),n.put(a,10);const c=this.data.length-r;c>0&&(s=this.data.substr(r),a=parseInt(s,10),n.put(a,c*3+1))},Fe=i,Fe}var Ue,Nt;function ir(){if(Nt)return Ue;Nt=1;const t=Z(),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(n){this.mode=t.ALPHANUMERIC,this.data=n}return o.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(r){let s;for(s=0;s+2<=this.data.length;s+=2){let a=i.indexOf(this.data[s])*45;a+=i.indexOf(this.data[s+1]),r.put(a,11)}this.data.length%2&&r.put(i.indexOf(this.data[s]),6)},Ue=o,Ue}var qe,At;function or(){if(At)return qe;At=1;const t=Z();function i(o){this.mode=t.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}return i.getBitsLength=function(n){return n*8},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(o){for(let n=0,r=this.data.length;n<r;n++)o.put(this.data[n],8)},qe=i,qe}var Oe,Et;function ar(){if(Et)return Oe;Et=1;const t=Z(),i=$();function o(n){this.mode=t.KANJI,this.data=n}return o.getBitsLength=function(r){return r*13},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(n){let r;for(r=0;r<this.data.length;r++){let s=i.toSJIS(this.data[r]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
4
4
  Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),n.put(s,13)}},Oe=o,Oe}var St;function lr(){return St||(St=1,(function(t){const i=Z(),o=sr(),n=ir(),r=or(),s=ar(),a=Kt(),c=$(),l=En();function f(A){return unescape(encodeURIComponent(A)).length}function m(A,y,j){const w=[];let k;for(;(k=A.exec(j))!==null;)w.push({data:k[0],index:k.index,mode:y,length:k[0].length});return w}function p(A){const y=m(a.NUMERIC,i.NUMERIC,A),j=m(a.ALPHANUMERIC,i.ALPHANUMERIC,A);let w,k;return c.isKanjiModeEnabled()?(w=m(a.BYTE,i.BYTE,A),k=m(a.KANJI,i.KANJI,A)):(w=m(a.BYTE_KANJI,i.BYTE,A),k=[]),y.concat(j,w,k).sort(function(h,x){return h.index-x.index}).map(function(h){return{data:h.data,mode:h.mode,length:h.length}})}function g(A,y){switch(y){case i.NUMERIC:return o.getBitsLength(A);case i.ALPHANUMERIC:return n.getBitsLength(A);case i.KANJI:return s.getBitsLength(A);case i.BYTE:return r.getBitsLength(A)}}function d(A){return A.reduce(function(y,j){const w=y.length-1>=0?y[y.length-1]:null;return w&&w.mode===j.mode?(y[y.length-1].data+=j.data,y):(y.push(j),y)},[])}function B(A){const y=[];for(let j=0;j<A.length;j++){const w=A[j];switch(w.mode){case i.NUMERIC:y.push([w,{data:w.data,mode:i.ALPHANUMERIC,length:w.length},{data:w.data,mode:i.BYTE,length:w.length}]);break;case i.ALPHANUMERIC:y.push([w,{data:w.data,mode:i.BYTE,length:w.length}]);break;case i.KANJI:y.push([w,{data:w.data,mode:i.BYTE,length:f(w.data)}]);break;case i.BYTE:y.push([{data:w.data,mode:i.BYTE,length:f(w.data)}])}}return y}function E(A,y){const j={},w={start:{}};let k=["start"];for(let u=0;u<A.length;u++){const h=A[u],x=[];for(let v=0;v<h.length;v++){const S=h[v],C=""+u+v;x.push(C),j[C]={node:S,lastCount:0},w[C]={};for(let N=0;N<k.length;N++){const b=k[N];j[b]&&j[b].node.mode===S.mode?(w[b][C]=g(j[b].lastCount+S.length,S.mode)-g(j[b].lastCount,S.mode),j[b].lastCount+=S.length):(j[b]&&(j[b].lastCount=S.length),w[b][C]=g(S.length,S.mode)+4+i.getCharCountIndicator(S.mode,y))}}k=x}for(let u=0;u<k.length;u++)w[k[u]].end=0;return{map:w,table:j}}function R(A,y){let j;const w=i.getBestModeForData(A);if(j=i.from(y,w),j!==i.BYTE&&j.bit<w.bit)throw new Error('"'+A+'" cannot be encoded with mode '+i.toString(j)+`.
5
5
  Suggested mode is: `+i.toString(w));switch(j===i.KANJI&&!c.isKanjiModeEnabled()&&(j=i.BYTE),j){case i.NUMERIC:return new o(A);case i.ALPHANUMERIC:return new n(A);case i.KANJI:return new s(A);case i.BYTE:return new r(A)}}t.fromArray=function(y){return y.reduce(function(j,w){return typeof w=="string"?j.push(R(w,null)):w.data&&j.push(R(w.data,w.mode)),j},[])},t.fromString=function(y,j){const w=p(y,c.isKanjiModeEnabled()),k=B(w),u=E(k,j),h=l.find_path(u.map,"start","end"),x=[];for(let v=1;v<h.length-1;v++)x.push(u.table[h[v]].node);return t.fromArray(d(x))},t.rawSplit=function(y){return t.fromArray(p(y,c.isKanjiModeEnabled()))}})(ze)),ze}var Bt;function cr(){if(Bt)return Ae;Bt=1;const t=$(),i=Xe(),o=Qn(),n=Gn(),r=Yn(),s=$n(),a=Zn(),c=Ht(),l=tr(),f=nr(),m=rr(),p=Z(),g=lr();function d(u,h){const x=u.size,v=s.getPositions(h);for(let S=0;S<v.length;S++){const C=v[S][0],N=v[S][1];for(let b=-1;b<=7;b++)if(!(C+b<=-1||x<=C+b))for(let M=-1;M<=7;M++)N+M<=-1||x<=N+M||(b>=0&&b<=6&&(M===0||M===6)||M>=0&&M<=6&&(b===0||b===6)||b>=2&&b<=4&&M>=2&&M<=4?u.set(C+b,N+M,!0,!0):u.set(C+b,N+M,!1,!0))}}function B(u){const h=u.size;for(let x=8;x<h-8;x++){const v=x%2===0;u.set(x,6,v,!0),u.set(6,x,v,!0)}}function E(u,h){const x=r.getPositions(h);for(let v=0;v<x.length;v++){const S=x[v][0],C=x[v][1];for(let N=-2;N<=2;N++)for(let b=-2;b<=2;b++)N===-2||N===2||b===-2||b===2||N===0&&b===0?u.set(S+N,C+b,!0,!0):u.set(S+N,C+b,!1,!0)}}function R(u,h){const x=u.size,v=f.getEncodedBits(h);let S,C,N;for(let b=0;b<18;b++)S=Math.floor(b/3),C=b%3+x-8-3,N=(v>>b&1)===1,u.set(S,C,N,!0),u.set(C,S,N,!0)}function A(u,h,x){const v=u.size,S=m.getEncodedBits(h,x);let C,N;for(C=0;C<15;C++)N=(S>>C&1)===1,C<6?u.set(C,8,N,!0):C<8?u.set(C+1,8,N,!0):u.set(v-15+C,8,N,!0),C<8?u.set(8,v-C-1,N,!0):C<9?u.set(8,15-C-1+1,N,!0):u.set(8,15-C-1,N,!0);u.set(v-8,8,1,!0)}function y(u,h){const x=u.size;let v=-1,S=x-1,C=7,N=0;for(let b=x-1;b>0;b-=2)for(b===6&&b--;;){for(let M=0;M<2;M++)if(!u.isReserved(S,b-M)){let U=!1;N<h.length&&(U=(h[N]>>>C&1)===1),u.set(S,b-M,U),C--,C===-1&&(N++,C=7)}if(S+=v,S<0||x<=S){S-=v,v=-v;break}}}function j(u,h,x){const v=new o;x.forEach(function(M){v.put(M.mode.bit,4),v.put(M.getLength(),p.getCharCountIndicator(M.mode,u)),M.write(v)});const S=t.getSymbolTotalCodewords(u),C=c.getTotalCodewordsCount(u,h),N=(S-C)*8;for(v.getLengthInBits()+4<=N&&v.put(0,4);v.getLengthInBits()%8!==0;)v.putBit(0);const b=(N-v.getLengthInBits())/8;for(let M=0;M<b;M++)v.put(M%2?17:236,8);return w(v,u,h)}function w(u,h,x){const v=t.getSymbolTotalCodewords(h),S=c.getTotalCodewordsCount(h,x),C=v-S,N=c.getBlocksCount(h,x),b=v%N,M=N-b,U=Math.floor(v/N),G=Math.floor(C/N),ve=G+1,ne=U-G,_=new l(ne);let I=0;const V=new Array(N),et=new Array(N);let je=0;const Yt=new Uint8Array(u.buffer);for(let X=0;X<N;X++){const be=X<M?G:ve;V[X]=Yt.slice(I,I+be),et[X]=_.encode(V[X]),I+=be,je=Math.max(je,be)}const Ce=new Uint8Array(v);let tt=0,H,W;for(H=0;H<je;H++)for(W=0;W<N;W++)H<V[W].length&&(Ce[tt++]=V[W][H]);for(H=0;H<ne;H++)for(W=0;W<N;W++)Ce[tt++]=et[W][H];return Ce}function k(u,h,x,v){let S;if(Array.isArray(u))S=g.fromArray(u);else if(typeof u=="string"){let U=h;if(!U){const G=g.rawSplit(u);U=f.getBestVersionForData(G,x)}S=g.fromString(u,U||40)}else throw new Error("Invalid data");const C=f.getBestVersionForData(S,x);if(!C)throw new Error("The amount of data is too big to be stored in a QR Code");if(!h)h=C;else if(h<C)throw new Error(`
6
6
  The chosen QR Code version cannot contain this amount of data.
7
7
  Minimum version required to store current data is: `+C+`.
8
8
  `);const N=j(h,x,S),b=t.getSymbolSize(h),M=new n(b);return d(M,h),B(M),E(M,h),A(M,x,0),h>=7&&R(M,h),y(M,N),isNaN(v)&&(v=a.getBestMask(M,A.bind(null,M,x))),a.applyMask(v,M),A(M,x,v),{modules:M,version:h,errorCorrectionLevel:x,maskPattern:v,segments:S}}return Ae.create=function(h,x){if(typeof h>"u"||h==="")throw new Error("No input text");let v=i.M,S,C;return typeof x<"u"&&(v=i.from(x.errorCorrectionLevel,i.M),S=f.from(x.version),C=a.from(x.maskPattern),x.toSJISFunc&&t.setToSJISFunction(x.toSJISFunc)),k(h,S,v,C)},Ae}var Ve={},He={},Mt;function Jt(){return Mt||(Mt=1,(function(t){function i(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let n=o.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+o);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(n){n||(n={}),n.color||(n.color={});const r=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:s,scale:s?4:a,margin:r,color:{dark:i(n.color.dark||"#000000ff"),light:i(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},t.getScale=function(n,r){return r.width&&r.width>=n+r.margin*2?r.width/(n+r.margin*2):r.scale},t.getImageWidth=function(n,r){const s=t.getScale(n,r);return Math.floor((n+r.margin*2)*s)},t.qrToImageData=function(n,r,s){const a=r.modules.size,c=r.modules.data,l=t.getScale(a,s),f=Math.floor((a+s.margin*2)*l),m=s.margin*l,p=[s.color.light,s.color.dark];for(let g=0;g<f;g++)for(let d=0;d<f;d++){let B=(g*f+d)*4,E=s.color.light;if(g>=m&&d>=m&&g<f-m&&d<f-m){const R=Math.floor((g-m)/l),A=Math.floor((d-m)/l);E=p[c[R*a+A]?1:0]}n[B++]=E.r,n[B++]=E.g,n[B++]=E.b,n[B]=E.a}}})(He)),He}var kt;function dr(){return kt||(kt=1,(function(t){const i=Jt();function o(r,s,a){r.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=a,s.width=a,s.style.height=a+"px",s.style.width=a+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(s,a,c){let l=c,f=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(f=n()),l=i.getOptions(l);const m=i.getImageWidth(s.modules.size,l),p=f.getContext("2d"),g=p.createImageData(m,m);return i.qrToImageData(g.data,s,l),o(p,f,m),p.putImageData(g,0,0),f},t.renderToDataURL=function(s,a,c){let l=c;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const f=t.render(s,a,l),m=l.type||"image/png",p=l.rendererOpts||{};return f.toDataURL(m,p.quality)}})(Ve)),Ve}var We={},Lt;function ur(){if(Lt)return We;Lt=1;const t=Jt();function i(r,s){const a=r.a/255,c=s+'="'+r.hex+'"';return a<1?c+" "+s+'-opacity="'+a.toFixed(2).slice(1)+'"':c}function o(r,s,a){let c=r+s;return typeof a<"u"&&(c+=" "+a),c}function n(r,s,a){let c="",l=0,f=!1,m=0;for(let p=0;p<r.length;p++){const g=Math.floor(p%s),d=Math.floor(p/s);!g&&!f&&(f=!0),r[p]?(m++,p>0&&g>0&&r[p-1]||(c+=f?o("M",g+a,.5+d+a):o("m",l,0),l=0,f=!1),g+1<s&&r[p+1]||(c+=o("h",m),m=0)):l++}return c}return We.render=function(s,a,c){const l=t.getOptions(a),f=s.modules.size,m=s.modules.data,p=f+l.margin*2,g=l.color.light.a?"<path "+i(l.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",d="<path "+i(l.color.dark,"stroke")+' d="'+n(m,f,l.margin)+'"/>',B='viewBox="0 0 '+p+" "+p+'"',R='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+B+' shape-rendering="crispEdges">'+g+d+`</svg>
9
- `;return typeof c=="function"&&c(null,R),R},We}var Rt;function hr(){if(Rt)return ee;Rt=1;const t=Jn(),i=cr(),o=dr(),n=ur();function r(s,a,c,l,f){const m=[].slice.call(arguments,1),p=m.length,g=typeof m[p-1]=="function";if(!g&&!t())throw new Error("Callback required as last argument");if(g){if(p<2)throw new Error("Too few arguments provided");p===2?(f=c,c=a,a=l=void 0):p===3&&(a.getContext&&typeof f>"u"?(f=l,l=void 0):(f=l,l=c,c=a,a=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(c=a,a=l=void 0):p===2&&!a.getContext&&(l=c,c=a,a=void 0),new Promise(function(d,B){try{const E=i.create(c,l);d(s(E,a,l))}catch(E){B(E)}})}try{const d=i.create(c,l);f(null,s(d,a,l))}catch(d){f(d)}}return ee.create=i.create,ee.toCanvas=r.bind(null,o.render),ee.toDataURL=r.bind(null,o.renderToDataURL),ee.toString=r.bind(null,function(s,a,c){return n.render(s,c)}),ee}var fr=hr();const gr=Zt(fr),mr="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.72532 0 0.578514 4.81465 0.0491943 10.9512H15.8916V13.0488H0.0491943C0.578514 19.1853 5.72532 24 12 24Z";function Ke(t,i,o,n,r){return`M${t+r},${i} h${o-2*r} a${r},${r} 0 0 1 ${r},${r} v${n-2*r} a${r},${r} 0 0 1 ${-r},${r} h${-(o-2*r)} a${r},${r} 0 0 1 ${-r},${-r} v${-(n-2*r)} a${r},${r} 0 0 1 ${r},${-r} z`}function pr(t,i){return[Ke(t,i,7,7,2.2)+" "+Ke(t+1,i+1,5,5,1.6),Ke(t+2,i+2,3,3,1.05)]}function wr({text:t,label:i}){const o=L.useMemo(()=>{try{const g=gr.create(t,{errorCorrectionLevel:"Q"});return{size:g.modules.size,data:g.modules.data}}catch{return null}},[t]);if(!o)return e.jsx("div",{className:"gc-qr gc-qr--placeholder","aria-hidden":"true"});const{size:n,data:r}=o,s=n/2,a=n*.11,c=a+.6,l=a*.82,f=(g,d)=>g<7&&d<7||g<7&&d>=n-7||g>=n-7&&d<7,m=(g,d)=>Math.hypot(g+.5-s,d+.5-s)<c,p=[];for(let g=0;g<n;g++)for(let d=0;d<n;d++)r[g*n+d]&&(f(g,d)||m(g,d)||p.push(e.jsx("circle",{cx:d+.5,cy:g+.5,r:.34},`${g}-${d}`)));return e.jsxs("svg",{className:"gc-qr",viewBox:`0 0 ${n} ${n}`,role:"img","aria-label":i,children:[e.jsxs("g",{fill:"currentColor",children:[p,[[0,0],[n-7,0],[0,n-7]].map(([g,d])=>{const[B,E]=pr(g,d);return e.jsxs("g",{children:[e.jsx("path",{d:B,fillRule:"evenodd"}),e.jsx("path",{d:E})]},`${g}-${d}`)})]}),e.jsx("circle",{cx:s,cy:s,r:a,className:"gc-qr__badge"}),e.jsx("circle",{cx:s,cy:s,r:l,fill:"#fff"}),e.jsx("path",{d:mr,fill:"#0052FF",transform:`translate(${s-l}, ${s-l}) scale(${l*2/24})`})]})}const xr=L.lazy(()=>pe(()=>import("./WalletFunding-Ydd9gD2t.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),yr=["5","10","25"],Tt=200,vr="https://antseed.mrdn.finance/";function jr(){const t=window.open("about:blank","_blank");return t&&(t.opener=null),t}function Cr(t,i){if(t.mode==="off")return{tone:"error",text:t.status==="buyer-unreachable"?"The buyer is not reachable, so deposits are not watched right now.":"This wallet is not watched for deposits right now; USDC sent to it is credited once the buyer watches it again."};const o=t.event&&t.event.seq>i?t.event:null;if(!o||o.phase==="deferred")return{tone:"idle",text:"Waiting for USDC on Base…"};const n=o.amount?P(o.amount):"USDC";return o.phase==="received"?{tone:"busy",text:`Received ${n}, preparing the deposit…`}:o.phase==="sweeping"?{tone:"busy",text:`Depositing ${n} to the credits…`}:o.phase==="credited"?{tone:"done",text:`${n} added to the balance`}:{tone:"error",text:o.error??"The deposit failed. USDC stays in the workspace wallet and is retried."}}function Pt({line:t}){return e.jsxs("div",{className:`gc-depwatch gc-depwatch--${t.tone}`,role:"status",children:[t.tone==="done"?e.jsx(D.check,{size:15}):e.jsx("span",{className:"gc-depwatch__dot","aria-hidden":"true"}),t.text]})}function Dt({amount:t,setAmount:i,firstDeposit:o}){return e.jsxs("div",{className:"gc-fund-amount",children:[e.jsx("span",{className:"gc-fund-amount__label",children:"Amount to add"}),e.jsxs("div",{className:"gc-fund-amount__row",children:[yr.map(n=>e.jsxs("button",{type:"button",className:t===n?"gc-preset gc-preset--on":"gc-preset","aria-pressed":t===n,onClick:()=>i(n),children:["$",n]},n)),e.jsxs("label",{className:"gc-fund-amount__input",children:[e.jsx("span",{"aria-hidden":"true",children:"$"}),e.jsx("input",{type:"text",inputMode:"decimal",value:t,"aria-label":"Amount in USD",onChange:n=>i(n.target.value.replace(/[^0-9.]/g,""))})]})]}),e.jsxs("span",{className:"gc-fineprint",children:["1 credit = 1 USDC",o?" · The first deposit must be at least $1":""]})]})}function Je({icon:t,title:i,caption:o,badges:n,onClick:r,arrow:s}){return e.jsxs("button",{type:"button",className:"gc-method",onClick:r,children:[e.jsx("span",{className:"gc-method__icon",children:t}),e.jsxs("span",{className:"gc-method__text",children:[e.jsx("span",{className:"gc-method__title",children:i}),e.jsx("span",{className:"gc-method__caption",children:o})]}),e.jsx("span",{className:"gc-method__badges","aria-hidden":"true",children:n}),s?e.jsx(D.right,{size:16,className:"gc-method__arrow"}):e.jsx(D.external,{size:14,className:"gc-method__arrow"})]})}function br({wallet:t,chain:i,workspaceId:o}){var ne;const[n,r]=L.useState("choose"),[s,a]=L.useState("10"),[c,l]=L.useState(!1),[f,m]=L.useState(null),[p,g]=L.useState(null),d=ge(),B=ie(),E=_t(o);Hn(o);const R=L.useRef(((ne=t.deposit.event)==null?void 0:ne.seq)??0),A=t.deposit.event!==null&&t.deposit.event.seq>R.current&&(t.deposit.event.phase==="received"||t.deposit.event.phase==="sweeping");Kn(F.wallet(o),A?4e3:8e3,4e3);const[y,j]=L.useState(null),w=t.deposit.event,k=w&&w.seq>R.current&&w.phase==="credited"?w:null;L.useEffect(()=>{k&&(B(`${k.amount?P(k.amount):"Your deposit"} added to the balance`),j(null),d.invalidateQueries({queryKey:["channels",o]}))},[k==null?void 0:k.seq]);const u=Number(s),h=Number.isFinite(u)&&u>=1,x=Y(t.available)+Y(t.reserved),v=Math.max(0,x-(E.data?It(E.data):0))+Y(t.walletUsdc),S=x===0,C=Xt(i,"usdc"),N=Cr(t.deposit,R.current),b=k!=null&&k.txHash?en(i,k.txHash):null;async function M(_){if(!h){m("Enter an amount of at least $1.");return}if(u>Tt){m(`Card deposits are limited to $${Tt}. Send more as USDC instead.`);return}g(_),m(null);try{const{url:I}=await K.wallet.cardLink(o,u,_),V=URL.canParse(I)?new URL(I).origin:null;if(!(V!=null&&V.startsWith("https://")))throw new Error("The gateway returned an invalid checkout link.");j({url:I,origin:V,provider:_})}catch(I){m(oe(I))}finally{g(null)}}function U(){const _=jr(),I=`${vr}?buyer=${encodeURIComponent(t.address)}`;_?_.location.replace(I):window.location.href=I}const G=e.jsxs("div",{className:"gc-fund-balance",children:[e.jsx("span",{className:"gc-fund-balance__label",children:"Workspace balance"}),e.jsx("span",{className:"gc-fund-balance__value",children:P(v)}),e.jsxs("span",{className:"gc-fineprint",children:[P(t.available)," available · ",P(t.reserved)," reserved",Y(t.walletUsdc)>0?` · ${P(t.walletUsdc)} in the wallet`:""]})]});if(n==="wallet")return e.jsxs("div",{className:"gc-fund",children:[e.jsx(T,{variant:"link",size:"sm",leadingIcon:e.jsx(D.left,{size:14}),onClick:()=>r("crypto"),children:"Back"}),e.jsx(ye,{chain:i,children:_=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(xr,{action:"deposit",workspaceId:o,wallet:t,chain:_,onDone:()=>{B("Deposit confirmed"),d.invalidateQueries({queryKey:F.wallet(o)})}})})})]});if(n==="crypto")return e.jsxs("div",{className:"gc-fund",children:[e.jsx(T,{variant:"link",size:"sm",leadingIcon:e.jsx(D.left,{size:14}),onClick:()=>r("choose"),children:"All options"}),e.jsx(Dt,{amount:s,setAmount:a,firstDeposit:S}),e.jsxs("div",{className:"gc-fund-pay",children:[C&&i?e.jsx(wr,{text:An({usdcAddress:C,chainId:i.chainId,address:t.address},h?s:""),label:`Scan to send USDC on ${i.name} to this workspace's wallet`}):e.jsx("div",{className:"gc-qr gc-qr--placeholder","aria-hidden":"true"}),e.jsxs("div",{className:"gc-fund-pay__address",children:[e.jsx("code",{className:"gc-mono",title:t.address,children:O(t.address)}),e.jsx(Ge,{iconOnly:!0,value:t.address,label:"Copy address"})]}),e.jsx(Pt,{line:N}),e.jsx("span",{className:"gc-fineprint",children:"Credits update automatically · a small fixed relay fee is deducted"}),b&&e.jsx("a",{className:"gc-link gc-fineprint",href:b,target:"_blank",rel:"noopener noreferrer",children:"View transaction"}),e.jsxs("div",{className:"gc-fund-pay__warn",children:["Only send USDC on ",e.jsx("strong",{children:(i==null?void 0:i.name)??"Base"}),". Other tokens or networks are not deposited."]})]}),e.jsx(T,{variant:"link",size:"sm",trailingIcon:e.jsx(D.right,{size:14}),onClick:()=>r("wallet"),children:"No wallet on your phone? Pay from a connected wallet instead"})]});const ve=e.jsx(Q,{isOpen:y!==null,onClose:()=>j(null),size:"md",title:"Secure checkout",bodyClassName:"gc-checkout",subtitle:y&&e.jsxs(e.Fragment,{children:[y.provider==="stripe"?"Card checkout by Outerfound, powered by Stripe (US only).":"Card checkout by Crossmint."," Closes by itself once the funds arrive."," ",e.jsx("a",{className:"gc-link",href:y.url,target:"_blank",rel:"noopener noreferrer",onClick:()=>j(null),children:"Open in a new tab"})]}),children:y&&e.jsx("iframe",{className:"gc-checkout__frame",src:y.url,title:"Antseed Pay checkout",allow:`payment ${y.origin}; clipboard-write`})});return e.jsxs("div",{className:"gc-fund",children:[ve,G,e.jsx(Dt,{amount:s,setAmount:a,firstDeposit:S}),e.jsxs("button",{type:"button",className:"gc-method gc-method--primary",disabled:p!==null,onClick:()=>void M("crossmint"),children:[e.jsxs("span",{className:"gc-method__text",children:[e.jsx("span",{className:"gc-method__title",children:p==="crossmint"?"Opening checkout…":`Deposit${h?` ${P(u)}`:""} by card`}),e.jsx("span",{className:"gc-method__caption",children:"Powered by Crossmint"})]}),e.jsxs("span",{className:"gc-method__badges","aria-hidden":"true",children:[e.jsx(st,{}),e.jsx(Tn,{}),e.jsx(Pn,{}),e.jsx(it,{})]})]}),e.jsxs("div",{className:"gc-fund-group",children:[e.jsx(Je,{icon:e.jsx(Ln,{size:22}),title:"Quick deposit",caption:`USDC on ${(i==null?void 0:i.name)??"Base"}`,arrow:!0,onClick:()=>r("crypto"),badges:e.jsxs(e.Fragment,{children:[e.jsx(kn,{}),e.jsx("span",{className:"gc-fund-chip",children:e.jsx(D.qr,{size:12})})]})}),e.jsx("span",{className:"gc-fineprint",children:"* Deposited to the credits by the Antseed relayer network"})]}),f&&e.jsx(se,{tone:"danger",children:f}),e.jsxs("button",{type:"button",className:"gc-fund-more","aria-expanded":c,onClick:()=>l(_=>!_),children:["More options ",e.jsx(D.down,{size:16,className:c?"gc-fund-more__chevron gc-fund-more__chevron--open":"gc-fund-more__chevron"})]}),c&&e.jsxs("div",{className:"gc-fund-options",children:[e.jsx(Je,{icon:e.jsx(In,{}),title:"Deposit using Meridian",caption:"USDC from any chain",onClick:U,badges:e.jsxs(e.Fragment,{children:[e.jsx(qn,{}),e.jsx(zn,{}),e.jsx(Fn,{}),e.jsx(Un,{})]})}),e.jsx(Je,{icon:e.jsx(_n,{size:20}),title:p==="stripe"?"Opening checkout…":"Deposit using Outerfound",caption:"Card · US only",onClick:()=>void M("stripe"),badges:e.jsxs(e.Fragment,{children:[e.jsx(it,{}),e.jsx(st,{}),e.jsx(Dn,{})]})})]}),e.jsx(Pt,{line:N}),e.jsxs("div",{className:"gc-fund-trust",children:[e.jsxs("span",{children:[e.jsx(D.lock,{size:12})," Encrypted & secure · Non-custodial escrow on ",(i==null?void 0:i.name)??"Base"]}),e.jsxs("span",{children:[e.jsx(D.check,{size:12})," Pay per request · No subscriptions, no lock-in"]})]}),e.jsx("p",{className:"gc-fineprint gc-fund-fine",children:"Card checkout opens here and closes itself once the funds arrive. It is not available in every region."})]})}const Qe=t=>`wallet/deposits/${t}`;function ue(t){const i=Number(t);return`${i!==0&&Math.abs(i)<.01?i.toFixed(6).replace(/0+$/,""):i.toFixed(2)} USDC`}function Nr(t){if(t.kind==="direct")return t.sources[0]?`Wallet ${O(t.sources[0].from)}`:"Connected wallet";if(t.sources.length===0)return"Sent to the workspace wallet";if(t.sources.every(o=>o.minted))return"Card purchase";const i=[...new Set(t.sources.filter(o=>!o.minted).map(o=>O(o.from)))];return i.length===1?`Wallet ${i[0]}`:`${i.length} transfers`}function Qt(t){return Ut({queryKey:F.deposits(t),queryFn:()=>K.wallet.deposits(t)})}function Gt({deposit:t,workspaceId:i,onClose:o}){const[n,r]=L.useState(""),s=we({mutationFn:()=>K.wallet.approveDeposit(i,t.txHash,n.trim()||null),invalidate:[F.deposits(i)],toast:"Deposit approved",onSuccess:()=>{r(""),o()}});return e.jsx(Q,{isOpen:t!==null,onClose:o,size:"sm",title:"Approve this deposit",subtitle:t?`${P(t.sent)} on ${he(t.time)}. Your name and the time are recorded on its confirmation.`:void 0,children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(qt,{label:"Note (optional)",placeholder:"e.g. PO 1042, October AI budget",value:n,onChange:a=>r(a.target.value),maxLength:500}),s.error?e.jsx("p",{className:"gc-warn",children:oe(s.error)}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:o,children:"Cancel"}),e.jsx(T,{onClick:()=>s.mutate(),disabled:s.isPending,children:"Approve"})]})]})})}function Ar({isOpen:t,workspaceId:i,onClose:o}){const[n,r]=L.useState(""),s=we({mutationFn:()=>K.wallet.addDeposit(i,n.trim()),invalidate:[F.deposits(i)],toast:"Deposit added",onSuccess:()=>{r(""),o()}});return e.jsx(Q,{isOpen:t,onClose:o,size:"sm",title:"Add a past deposit",subtitle:"Deposits are listed as they arrive. For one made before this list existed, paste the transaction that credited it: the sweep, or your deposit from a connected wallet.",children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(qt,{label:"Transaction hash",placeholder:"0x…",value:n,onChange:a=>r(a.target.value),spellCheck:!1}),s.error?e.jsx("p",{className:"gc-warn",children:oe(s.error)}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:o,children:"Cancel"}),e.jsx(T,{onClick:()=>s.mutate(),disabled:s.isPending||!n.trim(),children:s.isPending?"Checking the chain…":"Add deposit"})]})]})})}function Er({workspaceId:t}){const i=Qt(t),[o,n]=L.useState(null),[r,s]=L.useState(!1),a=we({mutationFn:c=>K.wallet.unapproveDeposit(t,c.txHash),invalidate:[F.deposits(t)],toast:"Approval removed"});return e.jsxs("section",{id:"gc-deposits",className:"gc-anchor",children:[e.jsx(xe,{flush:!0,title:"Deposits",description:"USDC credited to this workspace. Approve a deposit to record it as an expense, and keep its confirmation for your books.",actions:e.jsx(T,{size:"sm",variant:"outline",onClick:()=>s(!0),children:"Add a past deposit"}),children:e.jsx(le,{query:i,children:c=>e.jsx(Vt,{label:"Deposits",rows:c,rowKey:l=>l.txHash,rowLabel:l=>`deposit of ${P(l.sent)} on ${he(l.time)}`,actions:l=>[{label:"View confirmation",onSelect:()=>Ft(Qe(l.txHash))},!l.approval&&{label:"Approve…",onSelect:()=>n(l)},l.approval&&{label:"Remove approval",onSelect:()=>a.mutate(l)}],empty:e.jsx(Ye,{icon:e.jsx(D.wallet,{size:18}),title:"No deposits yet",body:"Deposits show up here once they are credited. Add an earlier one by its transaction."}),columns:[{key:"date",header:"Date",render:l=>he(l.time)},{key:"amount",header:"Amount",align:"right",render:l=>e.jsx("a",{className:"gc-link",href:sn(Qe(l.txHash)),onClick:rn(Qe(l.txHash)),children:P(l.sent)})},{key:"from",header:"From",secondary:!0,render:l=>Nr(l)},{key:"approval",header:"Approval",render:l=>l.approval?e.jsxs("span",{title:l.approval.note??void 0,children:[e.jsx($e,{tone:"success",children:"Approved"})," ",e.jsxs("span",{className:"gc-muted",children:["by ",l.approval.by.replace(/ \(.*\)$/,"")]})]}):e.jsx(T,{size:"sm",variant:"outline",onClick:()=>n(l),children:"Approve"})}]})})}),e.jsx(Gt,{deposit:o,workspaceId:t,onClose:()=>n(null)}),e.jsx(Ar,{isOpen:r,workspaceId:t,onClose:()=>s(!1)})]})}function z({label:t,children:i}){return e.jsxs("div",{className:"gc-doc__row",children:[e.jsx("dt",{children:t}),e.jsx("dd",{children:i})]})}function Sr({txHash:t}){var m,p;const{workspace:i}=zt(),o=Qt(i.id),n=ae(),r=tn(),[s,a]=L.useState(null),c=((m=n.data)==null?void 0:m.explorerUrl)??null,l=g=>c?e.jsx("a",{className:"gc-link",href:`${c.replace(/\/$/,"")}/tx/${g}`,target:"_blank",rel:"noreferrer",children:e.jsx(te,{children:g})}):e.jsx(te,{children:g}),f=((p=r.data)==null?void 0:p.publicUrl)??window.location.origin;return e.jsxs("div",{className:"gc-page",children:[e.jsx("div",{className:"gc-inline gc-no-print",children:e.jsx(T,{variant:"ghost",size:"sm",leadingIcon:e.jsx(D.left,{size:14}),onClick:()=>Ft("wallet"),children:"Wallet & Funding"})}),e.jsx(le,{query:o,children:g=>{var B,E;const d=g.find(R=>R.txHash===t.toLowerCase());return d?e.jsxs(e.Fragment,{children:[e.jsxs("article",{className:"gc-doc","aria-label":"Deposit confirmation",children:[e.jsxs("header",{className:"gc-doc__head",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"gc-doc__title",children:"Deposit confirmation"}),e.jsx("p",{className:"gc-doc__ref",children:d.reference})]}),e.jsx(nn,{})]}),e.jsxs("dl",{className:"gc-doc__rows",children:[e.jsx(z,{label:"Workspace",children:d.workspaceName}),e.jsx(z,{label:"Gateway",children:f.replace(/^https?:\/\//,"")}),e.jsx(z,{label:"Date",children:new Date(d.time).toUTCString().replace("GMT","UTC")}),e.jsx(z,{label:"Amount sent",children:ue(d.sent)}),d.kind==="relay"&&e.jsx(z,{label:"Relay fee",children:ue(d.fee)}),e.jsx(z,{label:"Credited to the balance",children:ue(d.credited)}),e.jsxs(z,{label:"Network",children:[((B=n.data)==null?void 0:B.name)??"Base"," · USDC"]}),e.jsx(z,{label:"Workspace wallet",children:e.jsx(te,{children:d.wallet})}),e.jsx(z,{label:"Deposit transaction",children:l(d.txHash)}),e.jsx(z,{label:"Funded from",children:d.sources.length===0?e.jsx("span",{className:"gc-muted",children:"Not found on-chain within the half hour before the deposit."}):e.jsx("ul",{className:"gc-doc__sources",children:d.sources.map(R=>e.jsxs("li",{children:[ue(R.amount)," ",R.minted?"minted into the wallet by the USDC issuer (a card purchase)":e.jsxs(e.Fragment,{children:["from ",e.jsx(te,{children:R.from})]}),e.jsx("br",{}),l(R.txHash)]},R.txHash))})}),e.jsx(z,{label:"Approval",children:d.approval?e.jsxs(e.Fragment,{children:["Approved by ",d.approval.by," on ",new Date(d.approval.at).toUTCString().replace("GMT","UTC"),d.approval.note?e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"Note: ",d.approval.note]}):null]}):e.jsx("span",{className:"gc-muted",children:"Not approved yet"})})]}),e.jsxs("footer",{className:"gc-doc__foot",children:["Issued by this Antseed gateway from the transaction records on ",((E=n.data)==null?void 0:E.name)??"Base",", which anyone can check with the links above. The amount moved into the workspace's prepaid credits, which pay AI providers per request. This is a confirmation of the deposit, not an invoice."]})]}),e.jsxs("div",{className:"gc-inline gc-no-print",children:[e.jsx(T,{leadingIcon:e.jsx(D.download,{size:14}),onClick:()=>window.print(),children:"Print or save as PDF"}),!d.approval&&e.jsx(T,{variant:"outline",onClick:()=>a(d),children:"Approve…"})]}),e.jsx(Gt,{deposit:s,workspaceId:i.id,onClose:()=>a(null)})]}):e.jsx(Ye,{icon:e.jsx(D.wallet,{size:18}),title:"Deposit not found",body:"It is not a deposit of this workspace. Add it by its transaction on Wallet & Funding."})}})]})}const Br=L.lazy(()=>pe(()=>import("./OperatorActions-DrRpfDBV.js"),__vite__mapDeps([12,1,2,7,3,4,5,6,8,9,10]))),Mr={info:"neutral",success:"success",warning:"warning",danger:"danger"},kr={authorize:"Authorize a wallet",manage:"Transfer or remove the authorized wallet"};function Lr({workspaceId:t,action:i,onActionChange:o}){const n=Ot(t),r=ae(),s=ie(),{apply:a,refresh:c}=on(t),[l,f]=L.useState(null),m=i!==void 0?i:l,p=w=>o?o(w):f(w),[g,d]=L.useState(!1),[B,E]=L.useState(!1),[R,A]=L.useState(null);async function y(){E(!0),A(null);try{await c()}catch(w){A(w)}finally{E(!1)}}return e.jsxs(xe,{title:"Authorized wallet",description:"Receives this workspace's withdrawals and ANTS rewards, and is the only wallet that can sign them.",children:[e.jsx(le,{query:n,rows:2,children:w=>{var k;return e.jsx(Rr,{state:w,explorerUrl:((k=r.data)==null?void 0:k.explorerUrl)??null,refreshing:B,onReload:()=>void y(),onAction:p,onLink:()=>d(!0)})}}),R?e.jsx(se,{tone:"danger",children:oe(R)}):null,e.jsx(Q,{isOpen:m!==null&&n.data!==void 0,onClose:()=>p(null),size:"md",title:m?kr[m]:"",subtitle:m==="manage"&&n.data?`Signed by ${O(n.data.operator)} itself; the gateway cannot do it.`:"Withdrawals and ANTS rewards will go to the wallet you authorize, and only it can hand the role on.",children:m&&n.data&&e.jsx(ye,{chain:r.data,error:r.error,children:w=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Br,{mode:m,workspaceId:t,state:n.data,chain:w,onStale:()=>void y(),onChanged:k=>{a(k),p(null),s(Ze(k.operator)?`Authorized wallet is now ${O(k.operator)}`:"Authorized wallet removed")}})})})}),g&&n.data&&e.jsx(an,{isOpen:!0,startWith:"wallet",onClose:()=>d(!1),intro:e.jsxs("p",{className:"gc-muted",children:["Connect ",e.jsx("code",{className:"gc-mono",children:O(n.data.operator)})," and sign the message to add it as one of your sign-in methods. It then shows here as your wallet, and you can manage it."]}),onCredentialAdded:()=>{y(),s("Wallet linked to your account")}})]})}function Rr({state:t,explorerUrl:i,refreshing:o,onReload:n,onAction:r,onLink:s}){const a=ln(t,null),c=Ze(t.operator),l=i&&c?`${i.replace(/\/+$/,"")}/address/${t.operator}`:null,f=c&&t.relation!=="self";return e.jsxs("div",{className:"gc-operator",children:[e.jsxs("div",{className:"gc-operator__main",children:[e.jsxs("div",{className:"gc-operator__title",children:[e.jsx("span",{className:"gc-strong",children:a.title}),c&&e.jsx(Ge,{iconOnly:!0,value:t.operator,label:"Copy address"}),e.jsx($e,{tone:Mr[a.tone],children:a.badge})]}),e.jsx("p",{className:"gc-operator__summary",children:a.summary}),e.jsxs("p",{className:"gc-fineprint gc-operator__meta",children:[l&&e.jsxs(e.Fragment,{children:[e.jsx("a",{className:"gc-link",href:l,target:"_blank",rel:"noopener noreferrer",children:"explorer"})," · "]}),"Checked ",cn(t.checkedAt)," ·"," ",e.jsx(T,{variant:"link",size:"sm",disabled:o,onClick:n,children:o?"checking…":"check again"})]})]}),e.jsxs("div",{className:"gc-operator__actions",children:[a.canAuthorize&&e.jsx(T,{size:"sm",onClick:()=>r("authorize"),children:"Authorize a wallet"}),a.canLink&&e.jsx(T,{size:"sm",onClick:s,children:"Link to my account"}),f&&e.jsx(T,{size:"sm",variant:"outline",onClick:()=>r("manage"),children:"Transfer or remove"})]}),(a.body!==a.summary||t.relation==="none"&&!t.canAuthorize)&&e.jsxs(Sn,{className:"gc-operator__details",title:"What does this mean?",children:[e.jsx("p",{className:"gc-muted",children:a.body}),t.relation==="none"&&!t.canAuthorize&&e.jsx("p",{className:"gc-fineprint",children:"Only the organization owner can authorize a wallet, with one of their own sign-in wallets added at least 24 hours ago."})]})]})}const Tr=L.lazy(()=>pe(()=>import("./WalletFunding-Ydd9gD2t.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),Pr=L.lazy(()=>pe(()=>import("./ChannelClose-D8CcISX0.js"),__vite__mapDeps([13,1,2,7,3,4,5,6,8,9,10,11])));function Dr(t,i=15e3){const[o,n]=L.useState(()=>Date.now());return L.useEffect(()=>{if(!t)return;n(Date.now());const r=setInterval(()=>n(Date.now()),i);return()=>clearInterval(r)},[t,i]),o}function _r({workspaceId:t,canCooperate:i,onAuthorize:o}){const[n,r]=L.useState(!1),[s,a]=L.useState(null),[c,l]=L.useState(()=>new Set),f=ge(),m=ie(),p=ae(),g=Ut({queryKey:F.channels(t,n),queryFn:()=>K.wallet.channels(t,n)}),d=g.data??[],B=d.some(u=>u.status==="closing"),E=Dr(B),R=async()=>{const u=await K.wallet.channels(t,n,!0);f.setQueryData(F.channels(t,n),u),f.invalidateQueries({queryKey:["channels",t]}),f.invalidateQueries({queryKey:F.wallet(t)})},A=d.map(yn).filter(u=>u!==null&&u>E).sort((u,h)=>u-h)[0];L.useEffect(()=>{if(A===void 0)return;const u=setTimeout(()=>void R().catch(()=>{}),Math.max(1e3,A-Date.now()+5e3));return()=>clearTimeout(u)},[A]);const y=we({mutationFn:u=>K.wallet.closeChannel(t,u.peerId),onSuccess:()=>{a(null),m("Channel closed by the seller")},onError:(u,h)=>l(x=>new Set(x).add(h.channelId)),invalidate:[["channels",t],F.wallet(t)]}),j=(u,h=c.has(u.channelId))=>{y.reset();const x=rt(u,h||!i);x==="cooperative"?a({channel:u,mode:"cooperative"}):x==="on-chain"?a({channel:u,mode:"request"}):x==="withdraw"&&a({channel:u,mode:"withdraw"})},w=vn(d),k=u=>u.sellerName??O(u.peerId);return e.jsx("section",{id:"gc-channels",className:"gc-anchor",children:e.jsxs(xe,{flush:!0,title:"Payment channels",description:"Funds reserved with sellers. Closing a channel returns what was not spent.",actions:e.jsx(Bn,{checked:n,onChange:r,label:"Include closed"}),children:[w.count>0&&e.jsxs(se,{tone:"warning",title:`${w.count} channel${w.count===1?"":"s"} ready to withdraw`,action:e.jsx(T,{size:"sm",onClick:()=>j(d.find(u=>u.status==="withdrawable")),children:"Withdraw"}),children:["About ",P(w.amount)," of unused reserve can return to the balance. The authorized wallet signs the withdrawal."]}),e.jsx(le,{query:g,children:u=>e.jsx(Vt,{label:"Payment channels",rows:u,rowKey:h=>h.channelId,rowLabel:h=>`channel with ${k(h)}`,actions:h=>{const x=rt(h,c.has(h.channelId)||!i);return[x==="cooperative"&&{label:"Close channel",onSelect:()=>j(h)},(x==="cooperative"||x==="on-chain")&&{label:"Close on chain",onSelect:()=>j(h,!0)},x==="withdraw"&&{label:"Withdraw reserve",onSelect:()=>j(h)}]},empty:e.jsx(Ye,{icon:e.jsx(D.wallet,{size:18}),title:n?"No channels yet":"No open channels",body:"A channel opens the first time a seller serves this workspace."}),columns:[{key:"seller",header:"Seller",render:h=>h.sellerName??e.jsx(te,{title:h.peerId,children:O(h.peerId)})},{key:"status",header:"Status",render:h=>e.jsx($e,{tone:Cn(h),children:jn(h,E)})},{key:"reserved",header:"Reserved",align:"right",render:h=>P(h.reserved)},{key:"spent",header:"Spent",align:"right",render:h=>P(h.spent)},{key:"returns",header:"Returns on close",align:"right",secondary:!0,optional:!0,render:h=>bn(h)?P(nt(h)):"—"},{key:"opened",header:"Opened",secondary:!0,render:h=>he(h.openedAt)}]})}),!i&&d.some(u=>u.canCooperativeClose)&&e.jsx("p",{className:"gc-fineprint gc-panel-note",children:"Asking a seller to close needs an organization admin; you can still close on chain with the authorized wallet."}),e.jsx(Q,{isOpen:(s==null?void 0:s.mode)==="cooperative",onClose:()=>{a(null),y.reset()},size:"md",title:"Close this channel?",subtitle:s?`With ${k(s.channel)}. About ${P(nt(s.channel))} returns to the balance.`:void 0,footer:s&&e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:()=>{a(null),y.reset()},children:"Cancel"}),y.error?e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",disabled:y.isPending,onClick:()=>y.mutate(s.channel),children:"Try again"}),e.jsx(T,{onClick:()=>{y.reset(),a({channel:s.channel,mode:"request"})},children:"Close on chain instead"})]}):e.jsx(T,{disabled:y.isPending,onClick:()=>y.mutate(s.channel),children:y.isPending?"Asking the seller…":"Close channel"})]}),children:e.jsxs("div",{className:"gc-stack",children:[e.jsx("p",{className:"gc-muted",children:"The seller settles what was spent and the rest returns to your available balance at once. A new channel opens if this seller is used again."}),y.isPending&&e.jsx("p",{className:"gc-fineprint",children:"Waiting for the seller (up to a minute)…"}),y.error?e.jsx(se,{tone:"danger",title:"The seller did not close it",children:Nn(oe(y.error))}):null]})}),e.jsx(Q,{isOpen:(s==null?void 0:s.mode)==="request"||(s==null?void 0:s.mode)==="withdraw",onClose:()=>a(null),size:"md",title:(s==null?void 0:s.mode)==="withdraw"?"Withdraw the unused reserve":"Close on chain",subtitle:s?`Channel with ${k(s.channel)}. Does not need the seller.`:void 0,children:s&&s.mode!=="cooperative"&&e.jsx(ye,{chain:p.data,error:p.error,children:u=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Pr,{workspaceId:t,channel:s.channel,chain:u,step:s.mode,onAuthorize:()=>{a(null),o()},onDone:h=>{R().catch(()=>{}),h==="request"?m("Close requested. Withdraw in 15 minutes."):(m("Reserve returned to the balance"),a(null))}})})})})]})})}function Ir({wallet:t,workspaceId:i,onWithdraw:o}){const n=_t(i),r=n.data?It(n.data):null,s=()=>{const c=document.getElementById("gc-channels");if(!c)return;c.scrollIntoView({behavior:"smooth",block:"start"}),c.classList.remove("gc-flash"),c.offsetWidth,c.classList.add("gc-flash");let l=!1;const f=()=>{var p;if(l)return;l=!0;const m=c.querySelectorAll('[aria-haspopup="menu"]');m.length===1?m[0].click():(p=m[0])==null||p.focus({preventScroll:!0})};window.addEventListener("scrollend",f,{once:!0}),window.setTimeout(f,700)},a=pn(t);return zr(t,a),e.jsxs(xe,{title:"Balance",actions:e.jsx(T,{size:"sm",variant:"outline",onClick:o,children:"Withdraw"}),children:[wn(t)&&e.jsx("div",{className:"gc-panel-alert",children:e.jsx(se,{tone:"warning",title:"The whole balance is reserved in channels",action:e.jsx(T,{size:"sm",variant:"outline",onClick:s,children:"Manage channels"}),children:"Nothing is available for new sellers or withdrawals. Close channels you no longer use to return their unused reserve, or add funds."})}),e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(ce,{label:"Available",value:P(t.available),strong:!0}),e.jsx(ce,{label:"Reserved in channels",value:P(t.reserved)}),e.jsx(ce,{label:"Authorized, not yet charged",value:r===null?"…":P(r)}),e.jsx(ce,{label:"Credit limit",value:t.creditLimit===null?"None":P(t.creditLimit)})]}),a?e.jsxs("p",{className:"gc-wallet-meta gc-pending",role:"status",children:[e.jsx("span",{className:"gc-attention","aria-hidden":"true"}),e.jsxs("span",{children:[e.jsxs("strong",{children:["Pending: ",P(t.walletUsdc)]})," arrived in the workspace wallet and is moving into the available balance. This page updates by itself."]})]}):Y(t.walletUsdc)>0&&e.jsxs("p",{className:"gc-fineprint gc-wallet-meta",children:[P(t.walletUsdc)," in the wallet, not deposited yet. ",xn(t)]}),e.jsxs("p",{className:"gc-fineprint gc-wallet-meta",children:["Workspace wallet ",e.jsx(te,{title:t.address,children:O(t.address)})," ",e.jsx(Ge,{iconOnly:!0,value:t.address,label:"Copy address"}),e.jsx("span",{"aria-hidden":"true",children:"·"})," Authorized spend is charged from channel reserves when sellers settle. Withdrawals go to the authorized wallet below."]})]})}function zr(t,i){const o=ie(),n=L.useRef(null);L.useEffect(()=>{if(i){n.current??(n.current=Y(t.available));return}if(n.current===null)return;const r=Y(t.available)-n.current;n.current=null,r>0&&o(`Payment received: ${P(String(r))} added to the available balance`)},[i,t.available,o])}function Fr({wallet:t,workspaceId:i,isOpen:o,onClose:n,onAuthorize:r}){const s=ge(),a=ie(),c=ae(),l=Ot(i),f=l.data&&Ze(l.data.operator)?l.data.operator:null;return e.jsx(Q,{isOpen:o,onClose:n,title:"Withdraw",subtitle:`${P(t.available)} available. ${f?`Sent to the authorized wallet ${O(f)}, which must sign it.`:"Withdrawals go to the authorized wallet, which must sign them."}`,children:e.jsx(ye,{chain:c.data,error:c.error,children:m=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Tr,{action:"withdraw",workspaceId:i,wallet:t,chain:m,onAuthorize:()=>{n(),r()},onDone:()=>{a("Withdrawal confirmed"),s.invalidateQueries({queryKey:F.wallet(i)})}})})})})}function Jr(){const t=dn();return t.rest[0]==="deposits"&&t.rest[1]?e.jsx(Sr,{txHash:t.rest[1]}):e.jsx(Ur,{})}function Ur(){const{workspace:t,viewer:i}=zt(),o=un(t.id),n=ae(),[r,s]=L.useState(()=>new URLSearchParams(window.location.search).get("fund")==="1"?"fund":null),[a,c]=L.useState(null);return e.jsxs("div",{className:"gc-page",children:[e.jsx(hn,{title:"Wallet & Funding",description:`Credits that pay for ${t.name}'s requests.`,actions:e.jsx(T,{variant:"brand",leadingIcon:e.jsx(D.plus,{size:14}),onClick:()=>s("fund"),children:"Add funds"})}),e.jsx(le,{query:o,rows:2,children:l=>e.jsxs(e.Fragment,{children:[e.jsx(fn,{stale:l.stale}),e.jsx(Ir,{wallet:l,workspaceId:t.id,onWithdraw:()=>s("withdraw")}),e.jsx(Lr,{workspaceId:t.id,action:a,onActionChange:c}),gn(i)&&e.jsx(Er,{workspaceId:t.id}),e.jsx(Q,{isOpen:r==="fund",onClose:()=>s(null),size:"md",title:"Add funds",subtitle:`Credits that pay for ${t.name}'s requests.`,children:e.jsx(br,{wallet:l,chain:n.data,workspaceId:t.id})}),e.jsx(Fr,{wallet:l,workspaceId:t.id,isOpen:r==="withdraw",onClose:()=>s(null),onAuthorize:()=>c("authorize")})]})}),e.jsx(_r,{workspaceId:t.id,canCooperate:mn(i),onAuthorize:()=>c("authorize")})]})}export{Jr as default};
9
+ `;return typeof c=="function"&&c(null,R),R},We}var Rt;function hr(){if(Rt)return ee;Rt=1;const t=Jn(),i=cr(),o=dr(),n=ur();function r(s,a,c,l,f){const m=[].slice.call(arguments,1),p=m.length,g=typeof m[p-1]=="function";if(!g&&!t())throw new Error("Callback required as last argument");if(g){if(p<2)throw new Error("Too few arguments provided");p===2?(f=c,c=a,a=l=void 0):p===3&&(a.getContext&&typeof f>"u"?(f=l,l=void 0):(f=l,l=c,c=a,a=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(c=a,a=l=void 0):p===2&&!a.getContext&&(l=c,c=a,a=void 0),new Promise(function(d,B){try{const E=i.create(c,l);d(s(E,a,l))}catch(E){B(E)}})}try{const d=i.create(c,l);f(null,s(d,a,l))}catch(d){f(d)}}return ee.create=i.create,ee.toCanvas=r.bind(null,o.render),ee.toDataURL=r.bind(null,o.renderToDataURL),ee.toString=r.bind(null,function(s,a,c){return n.render(s,c)}),ee}var fr=hr();const gr=Zt(fr),mr="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.72532 0 0.578514 4.81465 0.0491943 10.9512H15.8916V13.0488H0.0491943C0.578514 19.1853 5.72532 24 12 24Z";function Ke(t,i,o,n,r){return`M${t+r},${i} h${o-2*r} a${r},${r} 0 0 1 ${r},${r} v${n-2*r} a${r},${r} 0 0 1 ${-r},${r} h${-(o-2*r)} a${r},${r} 0 0 1 ${-r},${-r} v${-(n-2*r)} a${r},${r} 0 0 1 ${r},${-r} z`}function pr(t,i){return[Ke(t,i,7,7,2.2)+" "+Ke(t+1,i+1,5,5,1.6),Ke(t+2,i+2,3,3,1.05)]}function wr({text:t,label:i}){const o=L.useMemo(()=>{try{const g=gr.create(t,{errorCorrectionLevel:"Q"});return{size:g.modules.size,data:g.modules.data}}catch{return null}},[t]);if(!o)return e.jsx("div",{className:"gc-qr gc-qr--placeholder","aria-hidden":"true"});const{size:n,data:r}=o,s=n/2,a=n*.11,c=a+.6,l=a*.82,f=(g,d)=>g<7&&d<7||g<7&&d>=n-7||g>=n-7&&d<7,m=(g,d)=>Math.hypot(g+.5-s,d+.5-s)<c,p=[];for(let g=0;g<n;g++)for(let d=0;d<n;d++)r[g*n+d]&&(f(g,d)||m(g,d)||p.push(e.jsx("circle",{cx:d+.5,cy:g+.5,r:.34},`${g}-${d}`)));return e.jsxs("svg",{className:"gc-qr",viewBox:`0 0 ${n} ${n}`,role:"img","aria-label":i,children:[e.jsxs("g",{fill:"currentColor",children:[p,[[0,0],[n-7,0],[0,n-7]].map(([g,d])=>{const[B,E]=pr(g,d);return e.jsxs("g",{children:[e.jsx("path",{d:B,fillRule:"evenodd"}),e.jsx("path",{d:E})]},`${g}-${d}`)})]}),e.jsx("circle",{cx:s,cy:s,r:a,className:"gc-qr__badge"}),e.jsx("circle",{cx:s,cy:s,r:l,fill:"#fff"}),e.jsx("path",{d:mr,fill:"#0052FF",transform:`translate(${s-l}, ${s-l}) scale(${l*2/24})`})]})}const xr=L.lazy(()=>pe(()=>import("./WalletFunding-BbhXB813.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),yr=["5","10","25"],Tt=200,vr="https://antseed.mrdn.finance/";function jr(){const t=window.open("about:blank","_blank");return t&&(t.opener=null),t}function Cr(t,i){if(t.mode==="off")return{tone:"error",text:t.status==="buyer-unreachable"?"The buyer is not reachable, so deposits are not watched right now.":"This wallet is not watched for deposits right now; USDC sent to it is credited once the buyer watches it again."};const o=t.event&&t.event.seq>i?t.event:null;if(!o||o.phase==="deferred")return{tone:"idle",text:"Waiting for USDC on Base…"};const n=o.amount?P(o.amount):"USDC";return o.phase==="received"?{tone:"busy",text:`Received ${n}, preparing the deposit…`}:o.phase==="sweeping"?{tone:"busy",text:`Depositing ${n} to the credits…`}:o.phase==="credited"?{tone:"done",text:`${n} added to the balance`}:{tone:"error",text:o.error??"The deposit failed. USDC stays in the workspace wallet and is retried."}}function Pt({line:t}){return e.jsxs("div",{className:`gc-depwatch gc-depwatch--${t.tone}`,role:"status",children:[t.tone==="done"?e.jsx(D.check,{size:15}):e.jsx("span",{className:"gc-depwatch__dot","aria-hidden":"true"}),t.text]})}function Dt({amount:t,setAmount:i,firstDeposit:o}){return e.jsxs("div",{className:"gc-fund-amount",children:[e.jsx("span",{className:"gc-fund-amount__label",children:"Amount to add"}),e.jsxs("div",{className:"gc-fund-amount__row",children:[yr.map(n=>e.jsxs("button",{type:"button",className:t===n?"gc-preset gc-preset--on":"gc-preset","aria-pressed":t===n,onClick:()=>i(n),children:["$",n]},n)),e.jsxs("label",{className:"gc-fund-amount__input",children:[e.jsx("span",{"aria-hidden":"true",children:"$"}),e.jsx("input",{type:"text",inputMode:"decimal",value:t,"aria-label":"Amount in USD",onChange:n=>i(n.target.value.replace(/[^0-9.]/g,""))})]})]}),e.jsxs("span",{className:"gc-fineprint",children:["1 credit = 1 USDC",o?" · The first deposit must be at least $1":""]})]})}function Je({icon:t,title:i,caption:o,badges:n,onClick:r,arrow:s}){return e.jsxs("button",{type:"button",className:"gc-method",onClick:r,children:[e.jsx("span",{className:"gc-method__icon",children:t}),e.jsxs("span",{className:"gc-method__text",children:[e.jsx("span",{className:"gc-method__title",children:i}),e.jsx("span",{className:"gc-method__caption",children:o})]}),e.jsx("span",{className:"gc-method__badges","aria-hidden":"true",children:n}),s?e.jsx(D.right,{size:16,className:"gc-method__arrow"}):e.jsx(D.external,{size:14,className:"gc-method__arrow"})]})}function br({wallet:t,chain:i,workspaceId:o}){var ne;const[n,r]=L.useState("choose"),[s,a]=L.useState("10"),[c,l]=L.useState(!1),[f,m]=L.useState(null),[p,g]=L.useState(null),d=ge(),B=ie(),E=_t(o);Hn(o);const R=L.useRef(((ne=t.deposit.event)==null?void 0:ne.seq)??0),A=t.deposit.event!==null&&t.deposit.event.seq>R.current&&(t.deposit.event.phase==="received"||t.deposit.event.phase==="sweeping");Kn(F.wallet(o),A?4e3:8e3,4e3);const[y,j]=L.useState(null),w=t.deposit.event,k=w&&w.seq>R.current&&w.phase==="credited"?w:null;L.useEffect(()=>{k&&(B(`${k.amount?P(k.amount):"Your deposit"} added to the balance`),j(null),d.invalidateQueries({queryKey:["channels",o]}))},[k==null?void 0:k.seq]);const u=Number(s),h=Number.isFinite(u)&&u>=1,x=Y(t.available)+Y(t.reserved),v=Math.max(0,x-(E.data?It(E.data):0))+Y(t.walletUsdc),S=x===0,C=Xt(i,"usdc"),N=Cr(t.deposit,R.current),b=k!=null&&k.txHash?en(i,k.txHash):null;async function M(_){if(!h){m("Enter an amount of at least $1.");return}if(u>Tt){m(`Card deposits are limited to $${Tt}. Send more as USDC instead.`);return}g(_),m(null);try{const{url:I}=await K.wallet.cardLink(o,u,_),V=URL.canParse(I)?new URL(I).origin:null;if(!(V!=null&&V.startsWith("https://")))throw new Error("The gateway returned an invalid checkout link.");j({url:I,origin:V,provider:_})}catch(I){m(oe(I))}finally{g(null)}}function U(){const _=jr(),I=`${vr}?buyer=${encodeURIComponent(t.address)}`;_?_.location.replace(I):window.location.href=I}const G=e.jsxs("div",{className:"gc-fund-balance",children:[e.jsx("span",{className:"gc-fund-balance__label",children:"Workspace balance"}),e.jsx("span",{className:"gc-fund-balance__value",children:P(v)}),e.jsxs("span",{className:"gc-fineprint",children:[P(t.available)," available · ",P(t.reserved)," reserved",Y(t.walletUsdc)>0?` · ${P(t.walletUsdc)} in the wallet`:""]})]});if(n==="wallet")return e.jsxs("div",{className:"gc-fund",children:[e.jsx(T,{variant:"link",size:"sm",leadingIcon:e.jsx(D.left,{size:14}),onClick:()=>r("crypto"),children:"Back"}),e.jsx(ye,{chain:i,children:_=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(xr,{action:"deposit",workspaceId:o,wallet:t,chain:_,onDone:()=>{B("Deposit confirmed"),d.invalidateQueries({queryKey:F.wallet(o)})}})})})]});if(n==="crypto")return e.jsxs("div",{className:"gc-fund",children:[e.jsx(T,{variant:"link",size:"sm",leadingIcon:e.jsx(D.left,{size:14}),onClick:()=>r("choose"),children:"All options"}),e.jsx(Dt,{amount:s,setAmount:a,firstDeposit:S}),e.jsxs("div",{className:"gc-fund-pay",children:[C&&i?e.jsx(wr,{text:An({usdcAddress:C,chainId:i.chainId,address:t.address},h?s:""),label:`Scan to send USDC on ${i.name} to this workspace's wallet`}):e.jsx("div",{className:"gc-qr gc-qr--placeholder","aria-hidden":"true"}),e.jsxs("div",{className:"gc-fund-pay__address",children:[e.jsx("code",{className:"gc-mono",title:t.address,children:O(t.address)}),e.jsx(Ge,{iconOnly:!0,value:t.address,label:"Copy address"})]}),e.jsx(Pt,{line:N}),e.jsx("span",{className:"gc-fineprint",children:"Credits update automatically · a small fixed relay fee is deducted"}),b&&e.jsx("a",{className:"gc-link gc-fineprint",href:b,target:"_blank",rel:"noopener noreferrer",children:"View transaction"}),e.jsxs("div",{className:"gc-fund-pay__warn",children:["Only send USDC on ",e.jsx("strong",{children:(i==null?void 0:i.name)??"Base"}),". Other tokens or networks are not deposited."]})]}),e.jsx(T,{variant:"link",size:"sm",trailingIcon:e.jsx(D.right,{size:14}),onClick:()=>r("wallet"),children:"No wallet on your phone? Pay from a connected wallet instead"})]});const ve=e.jsx(Q,{isOpen:y!==null,onClose:()=>j(null),size:"md",title:"Secure checkout",bodyClassName:"gc-checkout",subtitle:y&&e.jsxs(e.Fragment,{children:[y.provider==="stripe"?"Card checkout by Outerfound, powered by Stripe (US only).":"Card checkout by Crossmint."," Closes by itself once the funds arrive."," ",e.jsx("a",{className:"gc-link",href:y.url,target:"_blank",rel:"noopener noreferrer",onClick:()=>j(null),children:"Open in a new tab"})]}),children:y&&e.jsx("iframe",{className:"gc-checkout__frame",src:y.url,title:"Antseed Pay checkout",allow:`payment ${y.origin}; clipboard-write`})});return e.jsxs("div",{className:"gc-fund",children:[ve,G,e.jsx(Dt,{amount:s,setAmount:a,firstDeposit:S}),e.jsxs("button",{type:"button",className:"gc-method gc-method--primary",disabled:p!==null,onClick:()=>void M("crossmint"),children:[e.jsxs("span",{className:"gc-method__text",children:[e.jsx("span",{className:"gc-method__title",children:p==="crossmint"?"Opening checkout…":`Deposit${h?` ${P(u)}`:""} by card`}),e.jsx("span",{className:"gc-method__caption",children:"Powered by Crossmint"})]}),e.jsxs("span",{className:"gc-method__badges","aria-hidden":"true",children:[e.jsx(st,{}),e.jsx(Tn,{}),e.jsx(Pn,{}),e.jsx(it,{})]})]}),e.jsxs("div",{className:"gc-fund-group",children:[e.jsx(Je,{icon:e.jsx(Ln,{size:22}),title:"Quick deposit",caption:`USDC on ${(i==null?void 0:i.name)??"Base"}`,arrow:!0,onClick:()=>r("crypto"),badges:e.jsxs(e.Fragment,{children:[e.jsx(kn,{}),e.jsx("span",{className:"gc-fund-chip",children:e.jsx(D.qr,{size:12})})]})}),e.jsx("span",{className:"gc-fineprint",children:"* Deposited to the credits by the Antseed relayer network"})]}),f&&e.jsx(se,{tone:"danger",children:f}),e.jsxs("button",{type:"button",className:"gc-fund-more","aria-expanded":c,onClick:()=>l(_=>!_),children:["More options ",e.jsx(D.down,{size:16,className:c?"gc-fund-more__chevron gc-fund-more__chevron--open":"gc-fund-more__chevron"})]}),c&&e.jsxs("div",{className:"gc-fund-options",children:[e.jsx(Je,{icon:e.jsx(In,{}),title:"Deposit using Meridian",caption:"USDC from any chain",onClick:U,badges:e.jsxs(e.Fragment,{children:[e.jsx(qn,{}),e.jsx(zn,{}),e.jsx(Fn,{}),e.jsx(Un,{})]})}),e.jsx(Je,{icon:e.jsx(_n,{size:20}),title:p==="stripe"?"Opening checkout…":"Deposit using Outerfound",caption:"Card · US only",onClick:()=>void M("stripe"),badges:e.jsxs(e.Fragment,{children:[e.jsx(it,{}),e.jsx(st,{}),e.jsx(Dn,{})]})})]}),e.jsx(Pt,{line:N}),e.jsxs("div",{className:"gc-fund-trust",children:[e.jsxs("span",{children:[e.jsx(D.lock,{size:12})," Encrypted & secure · Non-custodial escrow on ",(i==null?void 0:i.name)??"Base"]}),e.jsxs("span",{children:[e.jsx(D.check,{size:12})," Pay per request · No subscriptions, no lock-in"]})]}),e.jsx("p",{className:"gc-fineprint gc-fund-fine",children:"Card checkout opens here and closes itself once the funds arrive. It is not available in every region."})]})}const Qe=t=>`wallet/deposits/${t}`;function ue(t){const i=Number(t);return`${i!==0&&Math.abs(i)<.01?i.toFixed(6).replace(/0+$/,""):i.toFixed(2)} USDC`}function Nr(t){if(t.kind==="direct")return t.sources[0]?`Wallet ${O(t.sources[0].from)}`:"Connected wallet";if(t.sources.length===0)return"Sent to the workspace wallet";if(t.sources.every(o=>o.minted))return"Card purchase";const i=[...new Set(t.sources.filter(o=>!o.minted).map(o=>O(o.from)))];return i.length===1?`Wallet ${i[0]}`:`${i.length} transfers`}function Qt(t){return Ut({queryKey:F.deposits(t),queryFn:()=>K.wallet.deposits(t)})}function Gt({deposit:t,workspaceId:i,onClose:o}){const[n,r]=L.useState(""),s=we({mutationFn:()=>K.wallet.approveDeposit(i,t.txHash,n.trim()||null),invalidate:[F.deposits(i)],toast:"Deposit approved",onSuccess:()=>{r(""),o()}});return e.jsx(Q,{isOpen:t!==null,onClose:o,size:"sm",title:"Approve this deposit",subtitle:t?`${P(t.sent)} on ${he(t.time)}. Your name and the time are recorded on its confirmation.`:void 0,children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(qt,{label:"Note (optional)",placeholder:"e.g. PO 1042, October AI budget",value:n,onChange:a=>r(a.target.value),maxLength:500}),s.error?e.jsx("p",{className:"gc-warn",children:oe(s.error)}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:o,children:"Cancel"}),e.jsx(T,{onClick:()=>s.mutate(),disabled:s.isPending,children:"Approve"})]})]})})}function Ar({isOpen:t,workspaceId:i,onClose:o}){const[n,r]=L.useState(""),s=we({mutationFn:()=>K.wallet.addDeposit(i,n.trim()),invalidate:[F.deposits(i)],toast:"Deposit added",onSuccess:()=>{r(""),o()}});return e.jsx(Q,{isOpen:t,onClose:o,size:"sm",title:"Add a past deposit",subtitle:"Deposits are listed as they arrive. For one made before this list existed, paste the transaction that credited it: the sweep, or your deposit from a connected wallet.",children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(qt,{label:"Transaction hash",placeholder:"0x…",value:n,onChange:a=>r(a.target.value),spellCheck:!1}),s.error?e.jsx("p",{className:"gc-warn",children:oe(s.error)}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:o,children:"Cancel"}),e.jsx(T,{onClick:()=>s.mutate(),disabled:s.isPending||!n.trim(),children:s.isPending?"Checking the chain…":"Add deposit"})]})]})})}function Er({workspaceId:t}){const i=Qt(t),[o,n]=L.useState(null),[r,s]=L.useState(!1),a=we({mutationFn:c=>K.wallet.unapproveDeposit(t,c.txHash),invalidate:[F.deposits(t)],toast:"Approval removed"});return e.jsxs("section",{id:"gc-deposits",className:"gc-anchor",children:[e.jsx(xe,{flush:!0,title:"Deposits",description:"USDC credited to this workspace. Approve a deposit to record it as an expense, and keep its confirmation for your books.",actions:e.jsx(T,{size:"sm",variant:"outline",onClick:()=>s(!0),children:"Add a past deposit"}),children:e.jsx(le,{query:i,children:c=>e.jsx(Vt,{label:"Deposits",rows:c,rowKey:l=>l.txHash,rowLabel:l=>`deposit of ${P(l.sent)} on ${he(l.time)}`,actions:l=>[{label:"View confirmation",onSelect:()=>Ft(Qe(l.txHash))},!l.approval&&{label:"Approve…",onSelect:()=>n(l)},l.approval&&{label:"Remove approval",onSelect:()=>a.mutate(l)}],empty:e.jsx(Ye,{icon:e.jsx(D.wallet,{size:18}),title:"No deposits yet",body:"Deposits show up here once they are credited. Add an earlier one by its transaction."}),columns:[{key:"date",header:"Date",render:l=>he(l.time)},{key:"amount",header:"Amount",align:"right",render:l=>e.jsx("a",{className:"gc-link",href:sn(Qe(l.txHash)),onClick:rn(Qe(l.txHash)),children:P(l.sent)})},{key:"from",header:"From",secondary:!0,render:l=>Nr(l)},{key:"approval",header:"Approval",render:l=>l.approval?e.jsxs("span",{title:l.approval.note??void 0,children:[e.jsx($e,{tone:"success",children:"Approved"})," ",e.jsxs("span",{className:"gc-muted",children:["by ",l.approval.by.replace(/ \(.*\)$/,"")]})]}):e.jsx(T,{size:"sm",variant:"outline",onClick:()=>n(l),children:"Approve"})}]})})}),e.jsx(Gt,{deposit:o,workspaceId:t,onClose:()=>n(null)}),e.jsx(Ar,{isOpen:r,workspaceId:t,onClose:()=>s(!1)})]})}function z({label:t,children:i}){return e.jsxs("div",{className:"gc-doc__row",children:[e.jsx("dt",{children:t}),e.jsx("dd",{children:i})]})}function Sr({txHash:t}){var m,p;const{workspace:i}=zt(),o=Qt(i.id),n=ae(),r=tn(),[s,a]=L.useState(null),c=((m=n.data)==null?void 0:m.explorerUrl)??null,l=g=>c?e.jsx("a",{className:"gc-link",href:`${c.replace(/\/$/,"")}/tx/${g}`,target:"_blank",rel:"noreferrer",children:e.jsx(te,{children:g})}):e.jsx(te,{children:g}),f=((p=r.data)==null?void 0:p.publicUrl)??window.location.origin;return e.jsxs("div",{className:"gc-page",children:[e.jsx("div",{className:"gc-inline gc-no-print",children:e.jsx(T,{variant:"ghost",size:"sm",leadingIcon:e.jsx(D.left,{size:14}),onClick:()=>Ft("wallet"),children:"Wallet & Funding"})}),e.jsx(le,{query:o,children:g=>{var B,E;const d=g.find(R=>R.txHash===t.toLowerCase());return d?e.jsxs(e.Fragment,{children:[e.jsxs("article",{className:"gc-doc","aria-label":"Deposit confirmation",children:[e.jsxs("header",{className:"gc-doc__head",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"gc-doc__title",children:"Deposit confirmation"}),e.jsx("p",{className:"gc-doc__ref",children:d.reference})]}),e.jsx(nn,{})]}),e.jsxs("dl",{className:"gc-doc__rows",children:[e.jsx(z,{label:"Workspace",children:d.workspaceName}),e.jsx(z,{label:"Gateway",children:f.replace(/^https?:\/\//,"")}),e.jsx(z,{label:"Date",children:new Date(d.time).toUTCString().replace("GMT","UTC")}),e.jsx(z,{label:"Amount sent",children:ue(d.sent)}),d.kind==="relay"&&e.jsx(z,{label:"Relay fee",children:ue(d.fee)}),e.jsx(z,{label:"Credited to the balance",children:ue(d.credited)}),e.jsxs(z,{label:"Network",children:[((B=n.data)==null?void 0:B.name)??"Base"," · USDC"]}),e.jsx(z,{label:"Workspace wallet",children:e.jsx(te,{children:d.wallet})}),e.jsx(z,{label:"Deposit transaction",children:l(d.txHash)}),e.jsx(z,{label:"Funded from",children:d.sources.length===0?e.jsx("span",{className:"gc-muted",children:"Not found on-chain within the half hour before the deposit."}):e.jsx("ul",{className:"gc-doc__sources",children:d.sources.map(R=>e.jsxs("li",{children:[ue(R.amount)," ",R.minted?"minted into the wallet by the USDC issuer (a card purchase)":e.jsxs(e.Fragment,{children:["from ",e.jsx(te,{children:R.from})]}),e.jsx("br",{}),l(R.txHash)]},R.txHash))})}),e.jsx(z,{label:"Approval",children:d.approval?e.jsxs(e.Fragment,{children:["Approved by ",d.approval.by," on ",new Date(d.approval.at).toUTCString().replace("GMT","UTC"),d.approval.note?e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"Note: ",d.approval.note]}):null]}):e.jsx("span",{className:"gc-muted",children:"Not approved yet"})})]}),e.jsxs("footer",{className:"gc-doc__foot",children:["Issued by this Antseed gateway from the transaction records on ",((E=n.data)==null?void 0:E.name)??"Base",", which anyone can check with the links above. The amount moved into the workspace's prepaid credits, which pay AI providers per request. This is a confirmation of the deposit, not an invoice."]})]}),e.jsxs("div",{className:"gc-inline gc-no-print",children:[e.jsx(T,{leadingIcon:e.jsx(D.download,{size:14}),onClick:()=>window.print(),children:"Print or save as PDF"}),!d.approval&&e.jsx(T,{variant:"outline",onClick:()=>a(d),children:"Approve…"})]}),e.jsx(Gt,{deposit:s,workspaceId:i.id,onClose:()=>a(null)})]}):e.jsx(Ye,{icon:e.jsx(D.wallet,{size:18}),title:"Deposit not found",body:"It is not a deposit of this workspace. Add it by its transaction on Wallet & Funding."})}})]})}const Br=L.lazy(()=>pe(()=>import("./OperatorActions-BuEpaCiH.js"),__vite__mapDeps([12,1,2,7,3,4,5,6,8,9,10]))),Mr={info:"neutral",success:"success",warning:"warning",danger:"danger"},kr={authorize:"Authorize a wallet",manage:"Transfer or remove the authorized wallet"};function Lr({workspaceId:t,action:i,onActionChange:o}){const n=Ot(t),r=ae(),s=ie(),{apply:a,refresh:c}=on(t),[l,f]=L.useState(null),m=i!==void 0?i:l,p=w=>o?o(w):f(w),[g,d]=L.useState(!1),[B,E]=L.useState(!1),[R,A]=L.useState(null);async function y(){E(!0),A(null);try{await c()}catch(w){A(w)}finally{E(!1)}}return e.jsxs(xe,{title:"Authorized wallet",description:"Receives this workspace's withdrawals and ANTS rewards, and is the only wallet that can sign them.",children:[e.jsx(le,{query:n,rows:2,children:w=>{var k;return e.jsx(Rr,{state:w,explorerUrl:((k=r.data)==null?void 0:k.explorerUrl)??null,refreshing:B,onReload:()=>void y(),onAction:p,onLink:()=>d(!0)})}}),R?e.jsx(se,{tone:"danger",children:oe(R)}):null,e.jsx(Q,{isOpen:m!==null&&n.data!==void 0,onClose:()=>p(null),size:"md",title:m?kr[m]:"",subtitle:m==="manage"&&n.data?`Signed by ${O(n.data.operator)} itself; the gateway cannot do it.`:"Withdrawals and ANTS rewards will go to the wallet you authorize, and only it can hand the role on.",children:m&&n.data&&e.jsx(ye,{chain:r.data,error:r.error,children:w=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Br,{mode:m,workspaceId:t,state:n.data,chain:w,onStale:()=>void y(),onChanged:k=>{a(k),p(null),s(Ze(k.operator)?`Authorized wallet is now ${O(k.operator)}`:"Authorized wallet removed")}})})})}),g&&n.data&&e.jsx(an,{isOpen:!0,startWith:"wallet",onClose:()=>d(!1),intro:e.jsxs("p",{className:"gc-muted",children:["Connect ",e.jsx("code",{className:"gc-mono",children:O(n.data.operator)})," and sign the message to add it as one of your sign-in methods. It then shows here as your wallet, and you can manage it."]}),onCredentialAdded:()=>{y(),s("Wallet linked to your account")}})]})}function Rr({state:t,explorerUrl:i,refreshing:o,onReload:n,onAction:r,onLink:s}){const a=ln(t,null),c=Ze(t.operator),l=i&&c?`${i.replace(/\/+$/,"")}/address/${t.operator}`:null,f=c&&t.relation!=="self";return e.jsxs("div",{className:"gc-operator",children:[e.jsxs("div",{className:"gc-operator__main",children:[e.jsxs("div",{className:"gc-operator__title",children:[e.jsx("span",{className:"gc-strong",children:a.title}),c&&e.jsx(Ge,{iconOnly:!0,value:t.operator,label:"Copy address"}),e.jsx($e,{tone:Mr[a.tone],children:a.badge})]}),e.jsx("p",{className:"gc-operator__summary",children:a.summary}),e.jsxs("p",{className:"gc-fineprint gc-operator__meta",children:[l&&e.jsxs(e.Fragment,{children:[e.jsx("a",{className:"gc-link",href:l,target:"_blank",rel:"noopener noreferrer",children:"explorer"})," · "]}),"Checked ",cn(t.checkedAt)," ·"," ",e.jsx(T,{variant:"link",size:"sm",disabled:o,onClick:n,children:o?"checking…":"check again"})]})]}),e.jsxs("div",{className:"gc-operator__actions",children:[a.canAuthorize&&e.jsx(T,{size:"sm",onClick:()=>r("authorize"),children:"Authorize a wallet"}),a.canLink&&e.jsx(T,{size:"sm",onClick:s,children:"Link to my account"}),f&&e.jsx(T,{size:"sm",variant:"outline",onClick:()=>r("manage"),children:"Transfer or remove"})]}),(a.body!==a.summary||t.relation==="none"&&!t.canAuthorize)&&e.jsxs(Sn,{className:"gc-operator__details",title:"What does this mean?",children:[e.jsx("p",{className:"gc-muted",children:a.body}),t.relation==="none"&&!t.canAuthorize&&e.jsx("p",{className:"gc-fineprint",children:"Only the organization owner can authorize a wallet, with one of their own sign-in wallets added at least 24 hours ago."})]})]})}const Tr=L.lazy(()=>pe(()=>import("./WalletFunding-BbhXB813.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),Pr=L.lazy(()=>pe(()=>import("./ChannelClose-DpNV5MqB.js"),__vite__mapDeps([13,1,2,7,3,4,5,6,8,9,10,11])));function Dr(t,i=15e3){const[o,n]=L.useState(()=>Date.now());return L.useEffect(()=>{if(!t)return;n(Date.now());const r=setInterval(()=>n(Date.now()),i);return()=>clearInterval(r)},[t,i]),o}function _r({workspaceId:t,canCooperate:i,onAuthorize:o}){const[n,r]=L.useState(!1),[s,a]=L.useState(null),[c,l]=L.useState(()=>new Set),f=ge(),m=ie(),p=ae(),g=Ut({queryKey:F.channels(t,n),queryFn:()=>K.wallet.channels(t,n)}),d=g.data??[],B=d.some(u=>u.status==="closing"),E=Dr(B),R=async()=>{const u=await K.wallet.channels(t,n,!0);f.setQueryData(F.channels(t,n),u),f.invalidateQueries({queryKey:["channels",t]}),f.invalidateQueries({queryKey:F.wallet(t)})},A=d.map(yn).filter(u=>u!==null&&u>E).sort((u,h)=>u-h)[0];L.useEffect(()=>{if(A===void 0)return;const u=setTimeout(()=>void R().catch(()=>{}),Math.max(1e3,A-Date.now()+5e3));return()=>clearTimeout(u)},[A]);const y=we({mutationFn:u=>K.wallet.closeChannel(t,u.peerId),onSuccess:()=>{a(null),m("Channel closed by the seller")},onError:(u,h)=>l(x=>new Set(x).add(h.channelId)),invalidate:[["channels",t],F.wallet(t)]}),j=(u,h=c.has(u.channelId))=>{y.reset();const x=rt(u,h||!i);x==="cooperative"?a({channel:u,mode:"cooperative"}):x==="on-chain"?a({channel:u,mode:"request"}):x==="withdraw"&&a({channel:u,mode:"withdraw"})},w=vn(d),k=u=>u.sellerName??O(u.peerId);return e.jsx("section",{id:"gc-channels",className:"gc-anchor",children:e.jsxs(xe,{flush:!0,title:"Payment channels",description:"Funds reserved with sellers. Closing a channel returns what was not spent.",actions:e.jsx(Bn,{checked:n,onChange:r,label:"Include closed"}),children:[w.count>0&&e.jsxs(se,{tone:"warning",title:`${w.count} channel${w.count===1?"":"s"} ready to withdraw`,action:e.jsx(T,{size:"sm",onClick:()=>j(d.find(u=>u.status==="withdrawable")),children:"Withdraw"}),children:["About ",P(w.amount)," of unused reserve can return to the balance. The authorized wallet signs the withdrawal."]}),e.jsx(le,{query:g,children:u=>e.jsx(Vt,{label:"Payment channels",rows:u,rowKey:h=>h.channelId,rowLabel:h=>`channel with ${k(h)}`,actions:h=>{const x=rt(h,c.has(h.channelId)||!i);return[x==="cooperative"&&{label:"Close channel",onSelect:()=>j(h)},(x==="cooperative"||x==="on-chain")&&{label:"Close on chain",onSelect:()=>j(h,!0)},x==="withdraw"&&{label:"Withdraw reserve",onSelect:()=>j(h)}]},empty:e.jsx(Ye,{icon:e.jsx(D.wallet,{size:18}),title:n?"No channels yet":"No open channels",body:"A channel opens the first time a seller serves this workspace."}),columns:[{key:"seller",header:"Seller",render:h=>h.sellerName??e.jsx(te,{title:h.peerId,children:O(h.peerId)})},{key:"status",header:"Status",render:h=>e.jsx($e,{tone:Cn(h),children:jn(h,E)})},{key:"reserved",header:"Reserved",align:"right",render:h=>P(h.reserved)},{key:"spent",header:"Spent",align:"right",render:h=>P(h.spent)},{key:"returns",header:"Returns on close",align:"right",secondary:!0,optional:!0,render:h=>bn(h)?P(nt(h)):"—"},{key:"opened",header:"Opened",secondary:!0,render:h=>he(h.openedAt)}]})}),!i&&d.some(u=>u.canCooperativeClose)&&e.jsx("p",{className:"gc-fineprint gc-panel-note",children:"Asking a seller to close needs an organization admin; you can still close on chain with the authorized wallet."}),e.jsx(Q,{isOpen:(s==null?void 0:s.mode)==="cooperative",onClose:()=>{a(null),y.reset()},size:"md",title:"Close this channel?",subtitle:s?`With ${k(s.channel)}. About ${P(nt(s.channel))} returns to the balance.`:void 0,footer:s&&e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:()=>{a(null),y.reset()},children:"Cancel"}),y.error?e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",disabled:y.isPending,onClick:()=>y.mutate(s.channel),children:"Try again"}),e.jsx(T,{onClick:()=>{y.reset(),a({channel:s.channel,mode:"request"})},children:"Close on chain instead"})]}):e.jsx(T,{disabled:y.isPending,onClick:()=>y.mutate(s.channel),children:y.isPending?"Asking the seller…":"Close channel"})]}),children:e.jsxs("div",{className:"gc-stack",children:[e.jsx("p",{className:"gc-muted",children:"The seller settles what was spent and the rest returns to your available balance at once. A new channel opens if this seller is used again."}),y.isPending&&e.jsx("p",{className:"gc-fineprint",children:"Waiting for the seller (up to a minute)…"}),y.error?e.jsx(se,{tone:"danger",title:"The seller did not close it",children:Nn(oe(y.error))}):null]})}),e.jsx(Q,{isOpen:(s==null?void 0:s.mode)==="request"||(s==null?void 0:s.mode)==="withdraw",onClose:()=>a(null),size:"md",title:(s==null?void 0:s.mode)==="withdraw"?"Withdraw the unused reserve":"Close on chain",subtitle:s?`Channel with ${k(s.channel)}. Does not need the seller.`:void 0,children:s&&s.mode!=="cooperative"&&e.jsx(ye,{chain:p.data,error:p.error,children:u=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Pr,{workspaceId:t,channel:s.channel,chain:u,step:s.mode,onAuthorize:()=>{a(null),o()},onDone:h=>{R().catch(()=>{}),h==="request"?m("Close requested. Withdraw in 15 minutes."):(m("Reserve returned to the balance"),a(null))}})})})})]})})}function Ir({wallet:t,workspaceId:i,onWithdraw:o}){const n=_t(i),r=n.data?It(n.data):null,s=()=>{const c=document.getElementById("gc-channels");if(!c)return;c.scrollIntoView({behavior:"smooth",block:"start"}),c.classList.remove("gc-flash"),c.offsetWidth,c.classList.add("gc-flash");let l=!1;const f=()=>{var p;if(l)return;l=!0;const m=c.querySelectorAll('[aria-haspopup="menu"]');m.length===1?m[0].click():(p=m[0])==null||p.focus({preventScroll:!0})};window.addEventListener("scrollend",f,{once:!0}),window.setTimeout(f,700)},a=pn(t);return zr(t,a),e.jsxs(xe,{title:"Balance",actions:e.jsx(T,{size:"sm",variant:"outline",onClick:o,children:"Withdraw"}),children:[wn(t)&&e.jsx("div",{className:"gc-panel-alert",children:e.jsx(se,{tone:"warning",title:"The whole balance is reserved in channels",action:e.jsx(T,{size:"sm",variant:"outline",onClick:s,children:"Manage channels"}),children:"Nothing is available for new sellers or withdrawals. Close channels you no longer use to return their unused reserve, or add funds."})}),e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(ce,{label:"Available",value:P(t.available),strong:!0}),e.jsx(ce,{label:"Reserved in channels",value:P(t.reserved)}),e.jsx(ce,{label:"Authorized, not yet charged",value:r===null?"…":P(r)}),e.jsx(ce,{label:"Credit limit",value:t.creditLimit===null?"None":P(t.creditLimit)})]}),a?e.jsxs("p",{className:"gc-wallet-meta gc-pending",role:"status",children:[e.jsx("span",{className:"gc-attention","aria-hidden":"true"}),e.jsxs("span",{children:[e.jsxs("strong",{children:["Pending: ",P(t.walletUsdc)]})," arrived in the workspace wallet and is moving into the available balance. This page updates by itself."]})]}):Y(t.walletUsdc)>0&&e.jsxs("p",{className:"gc-fineprint gc-wallet-meta",children:[P(t.walletUsdc)," in the wallet, not deposited yet. ",xn(t)]}),e.jsxs("p",{className:"gc-fineprint gc-wallet-meta",children:["Workspace wallet ",e.jsx(te,{title:t.address,children:O(t.address)})," ",e.jsx(Ge,{iconOnly:!0,value:t.address,label:"Copy address"}),e.jsx("span",{"aria-hidden":"true",children:"·"})," Authorized spend is charged from channel reserves when sellers settle. Withdrawals go to the authorized wallet below."]})]})}function zr(t,i){const o=ie(),n=L.useRef(null);L.useEffect(()=>{if(i){n.current??(n.current=Y(t.available));return}if(n.current===null)return;const r=Y(t.available)-n.current;n.current=null,r>0&&o(`Payment received: ${P(String(r))} added to the available balance`)},[i,t.available,o])}function Fr({wallet:t,workspaceId:i,isOpen:o,onClose:n,onAuthorize:r}){const s=ge(),a=ie(),c=ae(),l=Ot(i),f=l.data&&Ze(l.data.operator)?l.data.operator:null;return e.jsx(Q,{isOpen:o,onClose:n,title:"Withdraw",subtitle:`${P(t.available)} available. ${f?`Sent to the authorized wallet ${O(f)}, which must sign it.`:"Withdrawals go to the authorized wallet, which must sign them."}`,children:e.jsx(ye,{chain:c.data,error:c.error,children:m=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Tr,{action:"withdraw",workspaceId:i,wallet:t,chain:m,onAuthorize:()=>{n(),r()},onDone:()=>{a("Withdrawal confirmed"),s.invalidateQueries({queryKey:F.wallet(i)})}})})})})}function Qr(){const t=dn();return t.rest[0]==="deposits"&&t.rest[1]?e.jsx(Sr,{txHash:t.rest[1]}):e.jsx(Ur,{})}function Ur(){const{workspace:t,viewer:i}=zt(),o=un(t.id),n=ae(),[r,s]=L.useState(()=>new URLSearchParams(window.location.search).get("fund")==="1"?"fund":null),[a,c]=L.useState(null);return e.jsxs("div",{className:"gc-page",children:[e.jsx(hn,{title:"Wallet & Funding",description:`Credits that pay for ${t.name}'s requests.`,actions:e.jsx(T,{variant:"brand",leadingIcon:e.jsx(D.plus,{size:14}),onClick:()=>s("fund"),children:"Add funds"})}),e.jsx(le,{query:o,rows:2,children:l=>e.jsxs(e.Fragment,{children:[e.jsx(fn,{stale:l.stale}),e.jsx(Ir,{wallet:l,workspaceId:t.id,onWithdraw:()=>s("withdraw")}),e.jsx(Lr,{workspaceId:t.id,action:a,onActionChange:c}),gn(i)&&e.jsx(Er,{workspaceId:t.id}),e.jsx(Q,{isOpen:r==="fund",onClose:()=>s(null),size:"md",title:"Add funds",subtitle:`Credits that pay for ${t.name}'s requests.`,children:e.jsx(br,{wallet:l,chain:n.data,workspaceId:t.id})}),e.jsx(Fr,{wallet:l,workspaceId:t.id,isOpen:r==="withdraw",onClose:()=>s(null),onAuthorize:()=>c("authorize")})]})}),e.jsx(_r,{workspaceId:t.id,canCooperate:mn(i),onAuthorize:()=>c("authorize")})]})}export{Qr as default};
@@ -1 +1 @@
1
- import{j as s,r as c,B as o,w as m,aG as g,aF as w,ah as x}from"./index-DIcymBxc.js";import{C as j}from"./ConnectWallet-DQ0PC6SO.js";import{W as y,u as C,a as p,b as W,w as k}from"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";function v({onConfirmed:e}){const{address:t,isConnected:u}=C(),{disconnect:d}=p(),{signMessageAsync:h}=W(),[n,r]=c.useState(!1),[i,l]=c.useState(null);return!u||!t?s.jsx(j,{label:"Connect your wallet",size:"sm",variant:"outline",fullWidth:!1}):s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[s.jsx(o,{size:"sm",disabled:n,onClick:async()=>{r(!0),l(null);try{e(await g(t,async a=>{try{return await h({message:a})}catch(f){throw new Error(k(f,"Signing was cancelled."))}}))}catch(a){l(w(a))}finally{r(!1)}},children:n?"Check your wallet…":`Confirm with ${m(t)}`}),s.jsx(o,{size:"sm",variant:"ghost",onClick:()=>d(),children:"Use a different wallet"})]}),i&&s.jsx(x,{tone:"danger",children:i})]})}function A(e){return s.jsx(y,{chain:null,children:s.jsx(v,{...e})})}export{A as default};
1
+ import{j as s,r as c,B as o,w as m,aG as g,aF as w,ah as x}from"./index-cESr4Zze.js";import{C as j}from"./ConnectWallet-CLv0c-JB.js";import{W as y,u as C,a as p,b as W,w as k}from"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";function v({onConfirmed:e}){const{address:t,isConnected:u}=C(),{disconnect:d}=p(),{signMessageAsync:h}=W(),[n,r]=c.useState(!1),[i,l]=c.useState(null);return!u||!t?s.jsx(j,{label:"Connect your wallet",size:"sm",variant:"outline",fullWidth:!1}):s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[s.jsx(o,{size:"sm",disabled:n,onClick:async()=>{r(!0),l(null);try{e(await g(t,async a=>{try{return await h({message:a})}catch(f){throw new Error(k(f,"Signing was cancelled."))}}))}catch(a){l(w(a))}finally{r(!1)}},children:n?"Check your wallet…":`Confirm with ${m(t)}`}),s.jsx(o,{size:"sm",variant:"ghost",onClick:()=>d(),children:"Use a different wallet"})]}),i&&s.jsx(x,{tone:"danger",children:i})]})}function A(e){return s.jsx(y,{chain:null,children:s.jsx(v,{...e})})}export{A as default};
@@ -1 +1 @@
1
- import{j as s,ah as N,J as M,aH as Q,r as E,aI as C,aJ as Y,m as j,g as b,w as T,T as k,B as W}from"./index-DIcymBxc.js";import{B as G,r as H,Z as J,c as B,_ as K,$ as Z,a0 as z,a1 as U,a2 as L,W as V,u as R,a3 as O}from"./en_US-Y4ZOVFV4-CmhP8GU2.js";import{u as _,a as P,T as q,D as $,s as X}from"./useTx-WkiDSW_A.js";import{a as ee,C as te}from"./ConnectWallet-DQ0PC6SO.js";import{O as ne}from"./OperatorGateAlert-D92zhyXC.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";import"./writeContract-DrAWt0yz.js";import"./sendTransaction-CqpP3CZj.js";class se extends G{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function ae(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new se({value:n});let[a,e="0"]=n.split(".");const i=a.startsWith("-");if(i&&(a=a.slice(1)),e=e.replace(/(0+)$/,""),e.length>t){const[d,r,c]=[e.slice(0,t-1),e.slice(t-1,t),e.slice(t)],o=Math.round(+`${r}.${c}`);o>9?e=`${BigInt(d)+BigInt(1)}0`.padStart(d.length+1,"0"):e=`${d}${o}`,e.length>t&&(e=e.slice(1),a=`${BigInt(a)+1n}`),e=e.slice(0,t)}else e=e.padEnd(t,"0");return BigInt(`${i?"-":""}${a}${e}`)}function re(n,t={}){return{async queryFn({queryKey:a}){const e=t.abi;if(!e)throw new Error("abi is required");const{functionName:i,scopeKey:d,...r}=a[1],c=(()=>{const o=a[1];if(o.address)return{address:o.address};if(o.code)return{code:o.code};throw new Error("address or code is required")})();if(!i)throw new Error("functionName is required");return H(n,{abi:e,functionName:i,args:r.args,...c,...r})},queryKey:oe(t)}}function oe(n={}){const{abi:t,...a}=n;return["readContract",J(a)]}function A(n={}){const{abi:t,address:a,functionName:e,query:i={}}=n,d=n.code,r=B(n),c=K({config:r}),o=re(r,{...n,chainId:n.chainId??c}),u=!!((a||d)&&t&&e&&(i.enabled??!0));return Z({...i,...o,enabled:u,structuralSharing:i.structuralSharing??z})}const y=U(["function balanceOf(address account) view returns (uint256)","function allowance(address owner, address spender) view returns (uint256)","function approve(address spender, uint256 amount) returns (bool)"]),ie=U(["function deposit(address buyer, uint256 amount) external","function withdraw(address buyer, uint256 amount) external","function setOperator(address buyer, address operator, uint256 nonce, bytes buyerSig) external","function transferOperator(address buyer, address newOperator) external"]),D=1;function F(n){try{return ae(n.trim()||"0",6)}catch{return 0n}}function de({wallet:n,chain:t,onDone:a}){const{address:e}=R(),i=_(t.chainId),{writeContractAsync:d}=P(),[r,c]=E.useState(""),o=C(t,"usdc"),u=C(t,"deposits"),v=A({address:o??void 0,abi:y,functionName:"balanceOf",args:e?[e]:void 0,chainId:t.chainId,query:{enabled:!!o&&!!e,staleTime:6e4,refetchOnWindowFocus:!1}}),l=A({address:o??void 0,abi:y,functionName:"allowance",args:e&&u?[e,u]:void 0,chainId:t.chainId,query:{enabled:!!o&&!!e&&!!u,staleTime:6e4,refetchOnWindowFocus:!1}});if(!o||!u)return s.jsx(N,{tone:"warning",children:"The gateway did not report the USDC and deposits contract addresses."});if(!e)return s.jsx(te,{label:"Connect wallet to pay"});const f=F(r),p=v.data,x=j(n.available)+j(n.reserved)===0;let m=null;r!==""&&(f<=0n||!/^\d+(\.\d{0,6})?$/.test(r.trim())?m="Enter an amount like 20 or 12.50.":x&&Number(r)<D?m=`The first deposit is at least ${D} USDC.`:p!==void 0&&f>p&&(m=`Your wallet holds ${b(Number(O(p,6)))} USDC.`));const g=l.data!==void 0&&l.data<f;async function w(){const h=[];((await l.refetch()).data??0n)<f&&h.push({label:"Approve USDC",send:()=>d({address:o,abi:y,functionName:"approve",args:[u,f],chainId:t.chainId})}),h.push({label:"Deposit",send:()=>d({address:u,abi:ie,functionName:"deposit",args:[n.address,f],chainId:t.chainId})});const S=await i.run(h);S&&(c(""),v.refetch(),a(S))}return s.jsxs("div",{className:"gc-stack",children:[s.jsxs("div",{className:"gc-kv",children:[s.jsx("span",{children:"Paying from"}),s.jsx("code",{children:T(e)}),s.jsx("span",{children:p!==void 0?`${b(Number(O(p,6)))} USDC`:"…"})]}),s.jsx(k,{label:"Amount (USDC)",inputMode:"decimal",placeholder:"20",value:r,error:m,onChange:h=>c(h.target.value)}),s.jsx(q,{chain:t,runner:i}),s.jsx(W,{fullWidth:!0,disabled:i.running||!r||!!m,onClick:()=>void w(),children:i.running?"Working…":`Pay ${r?b(Number(r)):""} USDC`}),s.jsxs("p",{className:"gc-fineprint",children:[g?"You will confirm two transactions: a one-time USDC approval, then the deposit.":"You will confirm one transaction."," Network fees are paid in ETH on ",t.name,"."]})]})}function ce({workspaceId:n,wallet:t,chain:a,onDone:e,onAuthorize:i}){const{address:d}=R(),r=B(),c=_(a.chainId),{writeContractAsync:o}=P(),u=M(n),{refresh:v}=Q(n),[l,f]=E.useState(""),p=C(a,"deposits");if(!p)return s.jsx(N,{tone:"warning",children:"The gateway did not report the deposits contract address."});const x=Y(u.data,d,"withdraw");if(!x.ok)return s.jsx(ne,{gate:x,state:u.data,connected:d,onAuthorize:i});const m=F(l),g=j(t.available);let w=null;return l!==""&&(m<=0n||!/^\d+(\.\d{0,6})?$/.test(l.trim())?w="Enter an amount like 20 or 12.50.":Number(l)>g&&(w=`Only ${b(g)} is available.`)),s.jsxs("div",{className:"gc-stack",children:[s.jsxs("div",{className:"gc-kv",children:[s.jsx("span",{children:"Sending to"}),s.jsx("code",{children:T(d)}),s.jsxs("span",{children:[b(g)," available"]})]}),s.jsx(k,{label:"Amount (USDC)",inputMode:"decimal",value:l,error:w,onChange:h=>f(h.target.value)}),s.jsx(q,{chain:a,runner:c,done:"Withdrawal confirmed."}),s.jsx(W,{fullWidth:!0,disabled:c.running||!l||!!w,onClick:async()=>{const h=[t.address,m],I=await c.run([{label:"Withdraw",check:()=>X(r,{account:d,address:p,abi:$,functionName:"withdraw",args:h,chainId:a.chainId}),send:()=>o({address:p,abi:$,functionName:"withdraw",args:h,chainId:a.chainId})}],{onStale:()=>void v().catch(()=>{})});I&&(f(""),e(I))},children:c.running?"Working…":"Withdraw"}),s.jsx("p",{className:"gc-fineprint",children:"Reserved funds in open channels stay locked until the channels close."})]})}const ue={deposit:de,withdraw:ce};function xe(n){if(!L(n.wallet.address))return s.jsxs(N,{tone:"warning",children:["This workspace has no wallet address yet, so it cannot ",n.action==="deposit"?"receive deposits":"withdraw",". Reload once the gateway has set up the workspace wallet."]});const t=ue[n.action];return s.jsx(V,{chain:n.chain,children:s.jsxs("div",{className:"gc-stack",children:[s.jsx(ee,{}),s.jsx(t,{...n})]})})}export{xe as default};
1
+ import{j as s,ah as N,J as M,aH as Q,r as E,aI as C,aJ as Y,m as j,g as b,w as T,T as k,B as W}from"./index-cESr4Zze.js";import{B as G,r as H,Z as J,c as B,_ as K,$ as Z,a0 as z,a1 as U,a2 as L,W as V,u as R,a3 as O}from"./en_US-Y4ZOVFV4-sKQksBWU.js";import{u as _,a as P,T as q,D as $,s as X}from"./useTx-DsLsc5bB.js";import{a as ee,C as te}from"./ConnectWallet-CLv0c-JB.js";import{O as ne}from"./OperatorGateAlert-grMRoFdV.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";import"./writeContract-Cqg_OlRQ.js";import"./sendTransaction-Cmz5eiPq.js";class se extends G{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function ae(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new se({value:n});let[a,e="0"]=n.split(".");const i=a.startsWith("-");if(i&&(a=a.slice(1)),e=e.replace(/(0+)$/,""),e.length>t){const[d,r,c]=[e.slice(0,t-1),e.slice(t-1,t),e.slice(t)],o=Math.round(+`${r}.${c}`);o>9?e=`${BigInt(d)+BigInt(1)}0`.padStart(d.length+1,"0"):e=`${d}${o}`,e.length>t&&(e=e.slice(1),a=`${BigInt(a)+1n}`),e=e.slice(0,t)}else e=e.padEnd(t,"0");return BigInt(`${i?"-":""}${a}${e}`)}function re(n,t={}){return{async queryFn({queryKey:a}){const e=t.abi;if(!e)throw new Error("abi is required");const{functionName:i,scopeKey:d,...r}=a[1],c=(()=>{const o=a[1];if(o.address)return{address:o.address};if(o.code)return{code:o.code};throw new Error("address or code is required")})();if(!i)throw new Error("functionName is required");return H(n,{abi:e,functionName:i,args:r.args,...c,...r})},queryKey:oe(t)}}function oe(n={}){const{abi:t,...a}=n;return["readContract",J(a)]}function A(n={}){const{abi:t,address:a,functionName:e,query:i={}}=n,d=n.code,r=B(n),c=K({config:r}),o=re(r,{...n,chainId:n.chainId??c}),u=!!((a||d)&&t&&e&&(i.enabled??!0));return Z({...i,...o,enabled:u,structuralSharing:i.structuralSharing??z})}const y=U(["function balanceOf(address account) view returns (uint256)","function allowance(address owner, address spender) view returns (uint256)","function approve(address spender, uint256 amount) returns (bool)"]),ie=U(["function deposit(address buyer, uint256 amount) external","function withdraw(address buyer, uint256 amount) external","function setOperator(address buyer, address operator, uint256 nonce, bytes buyerSig) external","function transferOperator(address buyer, address newOperator) external"]),D=1;function F(n){try{return ae(n.trim()||"0",6)}catch{return 0n}}function de({wallet:n,chain:t,onDone:a}){const{address:e}=R(),i=_(t.chainId),{writeContractAsync:d}=P(),[r,c]=E.useState(""),o=C(t,"usdc"),u=C(t,"deposits"),v=A({address:o??void 0,abi:y,functionName:"balanceOf",args:e?[e]:void 0,chainId:t.chainId,query:{enabled:!!o&&!!e,staleTime:6e4,refetchOnWindowFocus:!1}}),l=A({address:o??void 0,abi:y,functionName:"allowance",args:e&&u?[e,u]:void 0,chainId:t.chainId,query:{enabled:!!o&&!!e&&!!u,staleTime:6e4,refetchOnWindowFocus:!1}});if(!o||!u)return s.jsx(N,{tone:"warning",children:"The gateway did not report the USDC and deposits contract addresses."});if(!e)return s.jsx(te,{label:"Connect wallet to pay"});const f=F(r),p=v.data,x=j(n.available)+j(n.reserved)===0;let m=null;r!==""&&(f<=0n||!/^\d+(\.\d{0,6})?$/.test(r.trim())?m="Enter an amount like 20 or 12.50.":x&&Number(r)<D?m=`The first deposit is at least ${D} USDC.`:p!==void 0&&f>p&&(m=`Your wallet holds ${b(Number(O(p,6)))} USDC.`));const g=l.data!==void 0&&l.data<f;async function w(){const h=[];((await l.refetch()).data??0n)<f&&h.push({label:"Approve USDC",send:()=>d({address:o,abi:y,functionName:"approve",args:[u,f],chainId:t.chainId})}),h.push({label:"Deposit",send:()=>d({address:u,abi:ie,functionName:"deposit",args:[n.address,f],chainId:t.chainId})});const S=await i.run(h);S&&(c(""),v.refetch(),a(S))}return s.jsxs("div",{className:"gc-stack",children:[s.jsxs("div",{className:"gc-kv",children:[s.jsx("span",{children:"Paying from"}),s.jsx("code",{children:T(e)}),s.jsx("span",{children:p!==void 0?`${b(Number(O(p,6)))} USDC`:"…"})]}),s.jsx(k,{label:"Amount (USDC)",inputMode:"decimal",placeholder:"20",value:r,error:m,onChange:h=>c(h.target.value)}),s.jsx(q,{chain:t,runner:i}),s.jsx(W,{fullWidth:!0,disabled:i.running||!r||!!m,onClick:()=>void w(),children:i.running?"Working…":`Pay ${r?b(Number(r)):""} USDC`}),s.jsxs("p",{className:"gc-fineprint",children:[g?"You will confirm two transactions: a one-time USDC approval, then the deposit.":"You will confirm one transaction."," Network fees are paid in ETH on ",t.name,"."]})]})}function ce({workspaceId:n,wallet:t,chain:a,onDone:e,onAuthorize:i}){const{address:d}=R(),r=B(),c=_(a.chainId),{writeContractAsync:o}=P(),u=M(n),{refresh:v}=Q(n),[l,f]=E.useState(""),p=C(a,"deposits");if(!p)return s.jsx(N,{tone:"warning",children:"The gateway did not report the deposits contract address."});const x=Y(u.data,d,"withdraw");if(!x.ok)return s.jsx(ne,{gate:x,state:u.data,connected:d,onAuthorize:i});const m=F(l),g=j(t.available);let w=null;return l!==""&&(m<=0n||!/^\d+(\.\d{0,6})?$/.test(l.trim())?w="Enter an amount like 20 or 12.50.":Number(l)>g&&(w=`Only ${b(g)} is available.`)),s.jsxs("div",{className:"gc-stack",children:[s.jsxs("div",{className:"gc-kv",children:[s.jsx("span",{children:"Sending to"}),s.jsx("code",{children:T(d)}),s.jsxs("span",{children:[b(g)," available"]})]}),s.jsx(k,{label:"Amount (USDC)",inputMode:"decimal",value:l,error:w,onChange:h=>f(h.target.value)}),s.jsx(q,{chain:a,runner:c,done:"Withdrawal confirmed."}),s.jsx(W,{fullWidth:!0,disabled:c.running||!l||!!w,onClick:async()=>{const h=[t.address,m],I=await c.run([{label:"Withdraw",check:()=>X(r,{account:d,address:p,abi:$,functionName:"withdraw",args:h,chainId:a.chainId}),send:()=>o({address:p,abi:$,functionName:"withdraw",args:h,chainId:a.chainId})}],{onStale:()=>void v().catch(()=>{})});I&&(f(""),e(I))},children:c.running?"Working…":"Withdraw"}),s.jsx("p",{className:"gc-fineprint",children:"Reserved funds in open channels stay locked until the channels close."})]})}const ue={deposit:de,withdraw:ce};function xe(n){if(!L(n.wallet.address))return s.jsxs(N,{tone:"warning",children:["This workspace has no wallet address yet, so it cannot ",n.action==="deposit"?"receive deposits":"withdraw",". Reload once the gateway has set up the workspace wallet."]});const t=ue[n.action];return s.jsx(V,{chain:n.chain,children:s.jsxs("div",{className:"gc-stack",children:[s.jsx(ee,{}),s.jsx(t,{...n})]})})}export{xe as default};
@@ -1 +1 @@
1
- import{j as e,r as l,w as x,B as u,ah as v,f as w,aF as k}from"./index-DIcymBxc.js";import{W,u as b,a as A,b as B,C as F,w as I}from"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";function E({ready:t,open:i}){const r=l.useRef(!1);return l.useEffect(()=>{t&&!r.current&&(r.current=!0,i())},[t,i]),null}function M({enrollment:t,onSignedIn:i,autoConnect:r,actionLabel:o,onError:c}){const{address:n,isConnected:j}=b(),{disconnect:m}=A(),{signMessageAsync:y}=B(),[d,f]=l.useState(!1),[h,g]=l.useState(null),p=o?o(x(n)):`Sign in as ${x(n)}`;async function C(){if(n){f(!0),g(null);try{const{message:s}=await w.auth.walletNonce(n);let a;try{a=await y({message:s})}catch(S){throw new Error(I(S,"Signing was cancelled."))}i(await w.auth.walletVerify(s,a,t))}catch(s){c!=null&&c(s)||g(k(s))}finally{f(!1)}}}return e.jsxs("div",{className:"gc-stack",children:[!j||!n?e.jsx(F.Custom,{children:({openConnectModal:s,mounted:a})=>e.jsxs(e.Fragment,{children:[r&&e.jsx(E,{ready:a,open:s}),e.jsx(u,{variant:"outline",fullWidth:!0,disabled:!a,onClick:s,children:"Connect a wallet"})]})}):e.jsxs(e.Fragment,{children:[e.jsx(u,{variant:"outline",fullWidth:!0,disabled:d,onClick:()=>void C(),children:d?"Check your wallet…":p}),e.jsx(u,{variant:"ghost",size:"sm",onClick:()=>m(),children:"Use a different wallet"})]}),h&&e.jsx(v,{tone:"danger",children:h})]})}function O(t){return e.jsx(W,{chain:null,children:e.jsx(M,{...t})})}export{O as default};
1
+ import{j as e,r as l,w as x,B as u,ah as v,f as w,aF as k}from"./index-cESr4Zze.js";import{W,u as b,a as A,b as B,C as F,w as I}from"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";function E({ready:t,open:i}){const r=l.useRef(!1);return l.useEffect(()=>{t&&!r.current&&(r.current=!0,i())},[t,i]),null}function M({enrollment:t,onSignedIn:i,autoConnect:r,actionLabel:o,onError:c}){const{address:n,isConnected:j}=b(),{disconnect:m}=A(),{signMessageAsync:y}=B(),[d,f]=l.useState(!1),[h,g]=l.useState(null),p=o?o(x(n)):`Sign in as ${x(n)}`;async function C(){if(n){f(!0),g(null);try{const{message:s}=await w.auth.walletNonce(n);let a;try{a=await y({message:s})}catch(S){throw new Error(I(S,"Signing was cancelled."))}i(await w.auth.walletVerify(s,a,t))}catch(s){c!=null&&c(s)||g(k(s))}finally{f(!1)}}}return e.jsxs("div",{className:"gc-stack",children:[!j||!n?e.jsx(F.Custom,{children:({openConnectModal:s,mounted:a})=>e.jsxs(e.Fragment,{children:[r&&e.jsx(E,{ready:a,open:s}),e.jsx(u,{variant:"outline",fullWidth:!0,disabled:!a,onClick:s,children:"Connect a wallet"})]})}):e.jsxs(e.Fragment,{children:[e.jsx(u,{variant:"outline",fullWidth:!0,disabled:d,onClick:()=>void C(),children:d?"Check your wallet…":p}),e.jsx(u,{variant:"ghost",size:"sm",onClick:()=>m(),children:"Use a different wallet"})]}),h&&e.jsx(v,{tone:"danger",children:h})]})}function O(t){return e.jsx(W,{chain:null,children:e.jsx(M,{...t})})}export{O as default};
@@ -0,0 +1 @@
1
+ import{u as S,n as W,p as L,s as I,r as p,t as A,j as s,P as O,B as b,I as z,l as B,Q as F,v as w,M as C,w as N,x as M,y as D,z as E,A as T,C as q,D as V,q as f,f as v,T as P,o as R}from"./index-cESr4Zze.js";import{u as K,a as Q,P as _}from"./PolicyField-CHhm50jF.js";import{l as G,d as H,L as U}from"./limits-D2JvFgaN.js";import{D as J}from"./DataTable-BkJdorEh.js";import"./PolicyEditor-ptFDJhFh.js";import"./PeerPicker-CfsXTUyK.js";import"./SelectField-Cl4acfcI.js";import"./Segmented-D3e0aBDU.js";import"./roving-DkptacxO.js";import"./Switch-B2AEvyu7.js";import"./Disclosure-DMLE7rCw.js";function X({initial:r,onDone:d}){const{viewer:g}=S(),h=W(g),[i,k]=p.useState((r==null?void 0:r.name)??""),[y,x]=p.useState(G(r==null?void 0:r.limits)),[m,c]=p.useState(""),n=K(r==null?void 0:r.routingPolicy),o=Q(),l=A({mutationFn:()=>{const t={name:i.trim(),limits:H(y),routingPolicy:n.build()};return o.save([t.routingPolicy],e=>{if(r){const{limits:a,...j}=t;return v.workspaces.update(r.id,h?{...j,limits:a}:j,e)}return v.workspaces.create(m.trim()?{...t,buyerIdentity:m.trim()}:t,e)})},onSuccess:d,invalidate:[f.group("workspaces"),f.me],toast:r?"Workspace saved":"Workspace created"}),u=r?"Save":"Create workspace";return s.jsxs("form",{className:"gc-stack",onSubmit:t=>{t.preventDefault(),l.mutate()},children:[s.jsx(P,{label:"Name",required:!0,value:i,onChange:t=>k(t.target.value)}),!r&&s.jsx(P,{label:"Buyer identity (optional)",value:m,onChange:t=>c(t.target.value),hint:"Leave blank to create a new wallet for this workspace. Enter an existing identity name to reuse its wallet."}),h?s.jsxs("div",{children:[s.jsx("div",{className:"as-field__label gc-label-row",children:"Workspace budgets (USD)"}),s.jsx(U,{idPrefix:"ws-limit",value:y,onChange:x})]}):s.jsxs("p",{className:"gc-muted",children:["Budgets: ",E(r==null?void 0:r.limits),". Organization admins set them."]}),s.jsx(_,{draft:n.draft,setDraft:n.setDraft}),l.error?s.jsx(R,{error:l.error,title:"Could not save"}):null,s.jsxs("div",{className:"gc-actions",children:[s.jsx(b,{variant:"ghost",onClick:d,children:"Cancel"}),s.jsx(b,{type:"submit",disabled:l.isPending||!i.trim(),children:l.isPending?"Saving…":u})]}),o.dialog]})}function ie(){const{viewer:r,setWorkspaceId:d,workspace:g,me:h}=S(),i=W(r),k=t=>i||h.workspaces.some(e=>e.workspace.id===t.id&&e.role==="admin"),y=L(),x=I(),m=t=>{var e;return(e=x.data)==null?void 0:e.find(a=>a.workspaceId===t.id)},[c,n]=p.useState(null),[o,l]=p.useState(null),u=A({mutationFn:t=>v.workspaces.remove(t.id),onSuccess:()=>l(null),invalidate:[f.group("workspaces"),f.me]});return s.jsxs("div",{className:"gc-page",children:[s.jsx(O,{title:"Workspaces",description:"Each workspace has its own wallet, budgets, routing policy, members and keys.",actions:i&&s.jsx(b,{variant:"brand",leadingIcon:s.jsx(z.plus,{size:14}),onClick:()=>n("new"),children:"New workspace"})}),s.jsx(B,{flush:!0,children:s.jsx(F,{query:y,children:t=>s.jsx(J,{label:"Workspaces",rows:t,rowKey:e=>e.id,rowLabel:e=>e.name,onRowClick:e=>k(e)&&n(e),actions:e=>[e.id!==g.id&&{label:"Open",onSelect:()=>d(e.id)},{label:"Members",onSelect:()=>{d(e.id),D("members")}},k(e)&&{label:"Edit",onSelect:()=>n(e)},i&&!e.isDefault&&{label:"Delete",tone:"danger",onSelect:()=>l(e)}],columns:[{key:"name",header:"Name",sortValue:e=>e.name,render:e=>s.jsxs("span",{className:"gc-strong",children:[e.name," ",e.isDefault&&s.jsx(w,{children:"Default"})," ",e.id===g.id&&s.jsx(w,{tone:"info",children:"Open"})]})},{key:"wallet",header:"Wallet",secondary:!0,render:e=>e.walletAddress?s.jsx(C,{title:e.walletAddress,children:N(e.walletAddress)}):s.jsx("span",{className:"gc-muted",children:e.buyerIdentity})},{key:"operator",header:"Authorized wallet",secondary:!0,render:e=>{const a=m(e);return a?a.relation===null?s.jsx("span",{className:"gc-muted",title:"The wallet or the chain could not be read",children:"unknown"}):M(a)?s.jsxs("span",{className:"gc-inline",children:[s.jsx(w,{tone:"warning",children:"Not set"}),a.canAuthorize&&s.jsx(b,{variant:"link",size:"sm",onClick:j=>{j.stopPropagation(),d(e.id),D("wallet")},children:"Authorize"})]}):a.relation==="self"?s.jsx("span",{className:"gc-muted",children:"Workspace wallet"}):s.jsx(C,{title:a.operator??void 0,children:N(a.operator)}):s.jsx("span",{className:"gc-muted",children:x.isLoading?"…":"—"})}},{key:"members",header:"Members",align:"right",secondary:!0,sortValue:e=>e.memberCount,render:e=>e.memberCount},{key:"keys",header:"Keys",align:"right",sortValue:e=>e.keyCount,render:e=>e.keyCount},{key:"limits",header:"Budgets",secondary:!0,optional:!0,render:e=>s.jsx("span",{className:"gc-muted",children:E(e.limits)})},{key:"policy",header:"Routing",secondary:!0,optional:!0,render:e=>s.jsx("span",{className:"gc-muted",children:T(e.routingPolicy)})}]})})}),s.jsx(q,{isOpen:c!==null,onClose:()=>n(null),size:"lg",title:c==="new"?"New workspace":"Edit workspace",children:c!==null&&s.jsx(X,{initial:c==="new"?null:c,onDone:()=>n(null)})}),s.jsx(V,{isOpen:o!==null,busy:u.isPending,error:u.error,onClose:()=>{l(null),u.reset()},onConfirm:()=>o&&u.mutate(o),title:"Delete this workspace?",confirmLabel:"Delete workspace",body:s.jsxs(s.Fragment,{children:["Deleting ",s.jsx("strong",{children:o==null?void 0:o.name})," is only possible once it has no active keys and no balance. Withdraw funds and revoke keys first."]})})]})}export{ie as default};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=o`<svg
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=o`<svg
2
2
  width="14"
3
3
  height="14"
4
4
  viewBox="0 0 14 14"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const e=o`<svg fill="none" viewBox="0 0 24 24">
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const e=o`<svg fill="none" viewBox="0 0 24 24">
2
2
  <path
3
3
  style="fill: var(--wui-color-accent-100);"
4
4
  d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
@@ -1,4 +1,4 @@
1
- import{w as t}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const s=t`
1
+ import{w as t}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const s=t`
2
2
  <svg width="36" height="36">
3
3
  <path
4
4
  d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
@@ -1,4 +1,4 @@
1
- import{w as i}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=i`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as i}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=i`<svg fill="none" viewBox="0 0 40 40">
2
2
  <g clip-path="url(#a)">
3
3
  <g clip-path="url(#b)">
4
4
  <circle cx="20" cy="19.89" r="20" fill="#000" />
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const v=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const v=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=o`<svg
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=o`<svg
2
2
  fill="none"
3
3
  viewBox="0 0 21 20"
4
4
  >
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=o`<svg
1
+ import{w as o}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=o`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="12"
4
4
  height="13"
@@ -1,4 +1,4 @@
1
- import{i as N,e as G,r as q,c as O,d as c,k as M,n as z,O as ee,q as k,E as te,R as U,z as Me,g as K,B as j,D as ft,t as yn,W as pt,C as Xt,h as mi,T as Zt,m as Xe,M as tn,F as nn,w as Ne,x as vi,f as xn}from"./core-LDeQm5nv.js";import{n as u,c as T,o as W,r as I,U as he,e as Cn,f as Rn,a as $n}from"./index-CAflmCbT.js";import{c9 as In}from"./index-DIcymBxc.js";import{r as En}from"./dijkstra-COg3n3zL.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const Wn=N`
1
+ import{i as N,e as G,r as q,c as O,d as c,k as M,n as z,O as ee,q as k,E as te,R as U,z as Me,g as K,B as j,D as ft,t as yn,W as pt,C as Xt,h as mi,T as Zt,m as Xe,M as tn,F as nn,w as Ne,x as vi,f as xn}from"./core-BCJdIbrO.js";import{n as u,c as T,o as W,r as I,U as he,e as Cn,f as Rn,a as $n}from"./index-DiB9Y59V.js";import{c9 as In}from"./index-cESr4Zze.js";import{r as En}from"./dijkstra-COg3n3zL.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const Wn=N`
2
2
  :host {
3
3
  position: relative;
4
4
  background-color: var(--wui-color-gray-glass-002);
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-LDeQm5nv.js";import"./index-DIcymBxc.js";import"./index.es-0kjt2ETS.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CmhP8GU2.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=l`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as l}from"./core-BCJdIbrO.js";import"./index-cESr4Zze.js";import"./index.es-DP9EmOYi.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-sKQksBWU.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const m=l`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"