@dcl/shop 0.1.0-28705608077.commit-ef6e952 → 0.1.0-28705659740.commit-2cebfbe

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 (154) hide show
  1. package/assets/{Assets-BrB_JPW7.js → Assets-DM3NHvTG.js} +1 -1
  2. package/assets/{Cart-CfAaaM9Q.js → Cart-qsgyFN2N.js} +1 -1
  3. package/assets/{Collection-DPAYp7aw.js → Collection-0Q-OVkt1.js} +1 -1
  4. package/assets/{Creator-CQQr9sr9.js → Creator-Cg1iIZhw.js} +1 -1
  5. package/assets/{ExchangeController-D_HF_73o.js → ExchangeController-BhumqtlQ.js} +1 -1
  6. package/assets/{GetCredits-Cv1JIgRT.js → GetCredits-DWLoB4FX.js} +2 -2
  7. package/assets/{HelpersUtil-PpqjTrEW.js → HelpersUtil-DAPWXPm-.js} +1 -1
  8. package/assets/{ImportListings-CEsNh6T1.js → ImportListings-Bwxc8Mmb.js} +1 -1
  9. package/assets/ItemDetail-D2CedZlX.js +1 -0
  10. package/assets/{Market-vn4mV_Yb.js → Market-CEnnPAj2.js} +1 -1
  11. package/assets/{MyAssets-BCwflKyn.js → MyAssets-ZivUnVkG.js} +1 -1
  12. package/assets/{MyFavorites-BV44VtJf.js → MyFavorites-BFzQNbxY.js} +1 -1
  13. package/assets/{MyPurchases-g5MrMpiQ.js → MyPurchases-8Oel-AwP.js} +1 -1
  14. package/assets/{RealCheckout-jPtl2Hgc.js → RealCheckout-DqzchDLG.js} +1 -1
  15. package/assets/{Success-DSQgC7Vk.js → Success-D3OOlQnv.js} +1 -1
  16. package/assets/{SwapController-4V7Up8W4.js → SwapController-CHZGHDp-.js} +1 -1
  17. package/assets/{TradeService-BppPbwso.js → TradeService-DmUewLSI.js} +1 -1
  18. package/assets/{W3MFrameProviderSingleton-IE3ttpk4.js → W3MFrameProviderSingleton-8nOQYUFl.js} +3 -3
  19. package/assets/{WebCryptoP256-DsxkK8O7.js → WebCryptoP256-C7eow4Df.js} +1 -1
  20. package/assets/{basic-Dv-Vy43A.js → basic-CelCYHMb.js} +1 -1
  21. package/assets/{biconomy-CsMkxCXL.js → biconomy-BqVW-rsA.js} +1 -1
  22. package/assets/{buy-gN_dQ63l.js → buy-C15POIFV.js} +1 -1
  23. package/assets/{buy-gasless-BYIsTqE3.js → buy-gasless-Box0kob9.js} +1 -1
  24. package/assets/{ccip-DmFKxJMN.js → ccip-CLcImasK.js} +1 -1
  25. package/assets/{ccip-CotVklEV.js → ccip-DL59QCK1.js} +1 -1
  26. package/assets/{controller-pAT0J4tR.js → controller-CfjWMbVE.js} +2 -2
  27. package/assets/{core-CeU_ejv-.js → core-BDXYKhgA.js} +4 -4
  28. package/assets/{custom-D2GKcjuL.js → custom-CDDSYhU8.js} +1 -1
  29. package/assets/{data-capture-5FeruMKc.js → data-capture-Bkp-UhN7.js} +1 -1
  30. package/assets/{decimals-C1olXU12.js → decimals-CtEbpsEJ.js} +1 -1
  31. package/assets/decimals-CuBSJMXb.js +1 -0
  32. package/assets/{detectExtension-Uk-_peko.js → detectExtension-BIiGvA9o.js} +1 -1
  33. package/assets/{email-DjT_p4Op.js → email-aXh1ma2P.js} +1 -1
  34. package/assets/{embedded-wallet-Bj1HbSEw.js → embedded-wallet-DHtx2k0n.js} +1 -1
  35. package/assets/{engine-qJft_gdx.js → engine-DTNrERz7.js} +1 -1
  36. package/assets/{estimate-l1-fee-DTFOxJ5l.js → estimate-l1-fee-BGkkMBUf.js} +1 -1
  37. package/assets/{eth_estimateGas-B9u7ttU4.js → eth_estimateGas-Btb3MP3p.js} +1 -1
  38. package/assets/{eth_getStorageAt-DUCeSfJf.js → eth_getStorageAt-CpNlcQTF.js} +1 -1
  39. package/assets/{eth_getTransactionCount-6n2IR_Sq.js → eth_getTransactionCount-CRegXjS3.js} +1 -1
  40. package/assets/{extractIPFS-C7HpwEtu.js → extractIPFS-CxHSpUep.js} +1 -1
  41. package/assets/{features-TzQhgqwq.js → features-Dxfjhzpg.js} +1 -1
  42. package/assets/{fetchTokenMetadata-D8_gB--r.js → fetchTokenMetadata-DAoAv0LE.js} +2 -2
  43. package/assets/{get-ecosystem-wallet-info-BVwAZzyt.js → get-ecosystem-wallet-info-d2DzMnWL.js} +1 -1
  44. package/assets/{getBalance-BLCAcJLO.js → getBalance-BSheXeeM.js} +1 -1
  45. package/assets/{getInstalledModules-CK0KKFrl.js → getInstalledModules-DeN6a3ZH.js} +1 -1
  46. package/assets/{getNFT-f2-xhDr3.js → getNFT-BI25yrzD.js} +1 -1
  47. package/assets/{getNFT-CP1XfXMj.js → getNFT-D1S-LFvC.js} +2 -2
  48. package/assets/{hashTypedData-hsJu4-yQ.js → hashTypedData-CYuFZOJY.js} +1 -1
  49. package/assets/{hashTypedData-D8Hzcg2_.js → hashTypedData-DcFID7ts.js} +1 -1
  50. package/assets/{import-dQrEjaIt.js → import-Du99DOn3.js} +1 -1
  51. package/assets/{in-app-wallet-calls-CT5bDGsD.js → in-app-wallet-calls-NtKERckH.js} +1 -1
  52. package/assets/{index-FKOvcovU.js → index-7-ZZ9_Gr.js} +1 -1
  53. package/assets/{index-BPks9tyO.js → index-9N6Vz9JJ.js} +1 -1
  54. package/assets/{index-FihobJLG.js → index-B4ee4O3I.js} +1 -1
  55. package/assets/{index-n1GCW9g8.js → index-B6wMbha0.js} +1 -1
  56. package/assets/{index-D0Cdtb7t.js → index-B9TLT9cn.js} +2 -2
  57. package/assets/{index-JOJg0uwC.js → index-BAI1_GfY.js} +1 -1
  58. package/assets/{index-B8MBrX9i.js → index-BMyAB8ba.js} +1 -1
  59. package/assets/{index-DWowOp-_.js → index-BX9VHotQ.js} +1 -1
  60. package/assets/{index-BgQjovnw.js → index-BayKSaLv.js} +1 -1
  61. package/assets/{index-BBN5wT_v.js → index-BbqyUr8v.js} +1 -1
  62. package/assets/{index-BYez_Zlc.js → index-Bj8T-xg9.js} +1 -1
  63. package/assets/{index-ruNca7KW.js → index-BwxkgPV1.js} +1 -1
  64. package/assets/{index-BzEzUKoA.js → index-BzDco18P.js} +1 -1
  65. package/assets/{index-CbQ7roQZ.js → index-C-zCPWSP.js} +1 -1
  66. package/assets/{index-DmHJisKx.js → index-C1CCV2uB.js} +1 -1
  67. package/assets/{index-B5MmF9By.js → index-C9SgubrF.js} +1 -1
  68. package/assets/{index-7Ilob_oO.js → index-CCzuxvSh.js} +1 -1
  69. package/assets/{index-BBEJsmUK.js → index-CF5_zKOn.js} +1 -1
  70. package/assets/{index-IYjr57Gm.js → index-CGlNYcKT.js} +3 -3
  71. package/assets/{index-dATrKf2p.js → index-CPffpuyV.js} +1 -1
  72. package/assets/{index-CxYLwCGf.js → index-CXlRV1MY.js} +1 -1
  73. package/assets/{index-BMDBTR2c.js → index-CgMttnOM.js} +1 -1
  74. package/assets/{index-BkvtUMxV.js → index-CnmPuGxO.js} +1 -1
  75. package/assets/{index-DbS8zjb8.js → index-Cu4WAmtc.js} +1 -1
  76. package/assets/{index-Dfsw0wyG.js → index-CwH_CbRI.js} +1 -1
  77. package/assets/{index-Don-0MIT.js → index-CwVhVFpE.js} +1 -1
  78. package/assets/{index-CzGkBeLa.js → index-CzEqvsaZ.js} +1 -1
  79. package/assets/{index-D8ATZmwY.js → index-D5VEppxJ.js} +1 -1
  80. package/assets/{index-DSXe0d2S.js → index-D8VICbUE.js} +1 -1
  81. package/assets/{index-DMvGrm22.js → index-DRvvHEZB.js} +1 -1
  82. package/assets/{index-6IaYoWdV.js → index-DT6RahHj.js} +1 -1
  83. package/assets/{index-DtoO1T74.js → index-DYsleGM1.js} +1 -1
  84. package/assets/{index-BhsrgAah.js → index-DeUxKJX9.js} +2 -2
  85. package/assets/{index-q0CPpiDs.js → index-Df9Gh_0A.js} +1 -1
  86. package/assets/{index-KzQsPtYI.js → index-DiaV7Xnj.js} +1 -1
  87. package/assets/{index-DL_SFw8V.js → index-DjRaneFj.js} +1 -1
  88. package/assets/{index-BFjppxfH.js → index-DovlEefs.js} +1 -1
  89. package/assets/{index-YCQZy-od.js → index-DqX4doZc.js} +1 -1
  90. package/assets/{index-BBzCMZhs.js → index-Dqraov_6.js} +3 -3
  91. package/assets/{index-DrCs3EU5.js → index-Dvt1PbKM.js} +1 -1
  92. package/assets/{index-CvkAB3cx.js → index-EW5aTHZL.js} +1 -1
  93. package/assets/{index-h2d-LrfA.js → index-G_KYX4HF.js} +1 -1
  94. package/assets/index-WviPcgqv.js +2 -0
  95. package/assets/{index-DSPDLgPF.js → index-bOxT2TLM.js} +1 -1
  96. package/assets/{index-C4gUf5hB.js → index-fwX9_hYz.js} +14 -14
  97. package/assets/{index-DptMOTzD.js → index-jfsclK1c.js} +1 -1
  98. package/assets/{index-D7UmhFbh.js → index-lfVdBzEM.js} +1 -1
  99. package/assets/{index-BkmdibsO.js → index-nSj5oXfE.js} +1 -1
  100. package/assets/{index-FlDuW3Af.js → index-pyiHqEdT.js} +1 -1
  101. package/assets/{index-DBVpSKX5.js → index-qEoMlTEM.js} +1 -1
  102. package/assets/{index-K_N5Pp8I.js → index-vShxy5Ak.js} +1 -1
  103. package/assets/{index.es-DoSVMhnq.js → index.es-0svf3soC.js} +4 -4
  104. package/assets/{index.es-BmGgI9PE.js → index.es-CTNruN_b.js} +1 -1
  105. package/assets/{index.es-Demw3yyg.js → index.es-iPKbpugX.js} +1 -1
  106. package/assets/{localBatchGatewayRequest-DgvdQbHL.js → localBatchGatewayRequest-CTO_i3Dr.js} +1 -1
  107. package/assets/{mana-rate-B5MhGgI8.js → mana-rate-BbMVb7F-.js} +1 -1
  108. package/assets/network-6KrvOfIJ.js +1 -0
  109. package/assets/{networks-Co9USlgm.js → networks-DnGttac2.js} +1 -1
  110. package/assets/{onramp-52bN5Byd.js → onramp-THdAL_Er.js} +1 -1
  111. package/assets/{openzeppelin-CLtJleyR.js → openzeppelin-Fq6_rWoH.js} +1 -1
  112. package/assets/{ownerOf-C_ppAWti.js → ownerOf-Z20onMkc.js} +1 -1
  113. package/assets/{parseNft-DokM8OJG.js → parseNft-gP4B6iOB.js} +2 -2
  114. package/assets/{parseSignature-aZF6oVh-.js → parseSignature-BdtqsPta.js} +1 -1
  115. package/assets/{parseSignature-gmjW2LCL.js → parseSignature-DGDthF4Q.js} +3 -3
  116. package/assets/{pay-with-exchange-D4S9Wmf5.js → pay-with-exchange-CHsxAsOQ.js} +1 -1
  117. package/assets/{qr-overlay-DUhflwps.js → qr-overlay-D72wyOOO.js} +1 -1
  118. package/assets/{receive-DoMkPm86.js → receive-CfEyIRNT.js} +1 -1
  119. package/assets/{resolveImplementation-BigJnLLS.js → resolveImplementation-ByZ6aAsR.js} +1 -1
  120. package/assets/{rpc-CrqKmXAd.js → rpc-Ba9vojp-.js} +1 -1
  121. package/assets/{secp256k1-CRwM7nmK.js → secp256k1-BOgggVbv.js} +1 -1
  122. package/assets/{secp256k1-xtgJrVQ1.js → secp256k1-CTrgIgRO.js} +1 -1
  123. package/assets/{secp256k1-D3mwO0A_.js → secp256k1-Dv2AcO6I.js} +1 -1
  124. package/assets/{send--3g_Xld9.js → send-Dvf7cim2.js} +1 -1
  125. package/assets/{send-batch-transaction-Bp5WDq9j.js → send-batch-transaction-Du7dMQIj.js} +1 -1
  126. package/assets/{send-eip712-transaction-Rq51yM2D.js → send-eip712-transaction-COsgKdIg.js} +2 -2
  127. package/assets/{send-gasless-transaction-17CqVL4r.js → send-gasless-transaction-OrBMq_IW.js} +2 -2
  128. package/assets/{sendRawTransaction-Bq4wwLvo.js → sendRawTransaction-BFwhC1CW.js} +3 -3
  129. package/assets/{serializeTransaction-0_6cdils.js → serializeTransaction-BYG_Sf_9.js} +1 -1
  130. package/assets/{session-proposal-Dcjbs-Sk.js → session-proposal-B4vPzIrJ.js} +1 -1
  131. package/assets/{session-request-DJqVx1Vf.js → session-request-q9sdhHDe.js} +2 -2
  132. package/assets/{sha256-BOiGkQ-k.js → sha256-DXORZCoT.js} +1 -1
  133. package/assets/{signing-ViEkal5y.js → signing-DUKQER6N.js} +4 -4
  134. package/assets/{socials-omHiKtr3.js → socials-Bx7HctQO.js} +1 -1
  135. package/assets/{swaps-BEUP5uE6.js → swaps-CI-42_Yf.js} +1 -1
  136. package/assets/{thirdweb-CFLXE91Z.js → thirdweb-h1G-rly1.js} +3 -3
  137. package/assets/{totalSupply-Bk0d_rAO.js → totalSupply-BbOO_R3o.js} +1 -1
  138. package/assets/{transactionReceipt-BZCOl44B.js → transactionReceipt-CpVXwo1b.js} +1 -1
  139. package/assets/{transactions-BkCFX1zV.js → transactions-CKq6M4QY.js} +1 -1
  140. package/assets/{verifyHash-m7iC7_JY.js → verifyHash-Bt7GZqI2.js} +1 -1
  141. package/assets/{w3m-modal-DNEwvOPw.js → w3m-modal-CIN8ZRvw.js} +1 -1
  142. package/assets/{w3m-modal-BxgY4Tpa.js → w3m-modal-CifFtb0O.js} +1 -1
  143. package/assets/{wait-for-tx-receipt-BauhQAMN.js → wait-for-tx-receipt-CmkqIogk.js} +1 -1
  144. package/assets/{wallet-kind-gfXMYxyJ.js → wallet-kind-D3L7EkWx.js} +1 -1
  145. package/assets/{wallets-7TfWPN5l.js → wallets-Opxx6sfN.js} +6 -6
  146. package/assets/{web-connector-UbJn8_LJ.js → web-connector-6Zhvgl2A.js} +3 -3
  147. package/assets/{writeContract-BvcBH3tC.js → writeContract-BV7sfUmk.js} +1 -1
  148. package/assets/{zoraTestnet--lDrug2s.js → zoraTestnet-BiS-YFuH.js} +1 -1
  149. package/index.html +8 -8
  150. package/package.json +2 -2
  151. package/assets/ItemDetail-5faC-uF8.js +0 -1
  152. package/assets/decimals-Dup9E_dE.js +0 -1
  153. package/assets/index-4aprBRKs.js +0 -2
  154. package/assets/network-Dy8k_D5M.js +0 -1
@@ -1 +1 @@
1
- import{aD as z,aV as G,a3 as E,aE as Q,a4 as H,aF as Y,b9 as T,a8 as J,bT as W,q as X,bh as Z,bU as K,az as tt,aq as et,bi as nt}from"./sendRawTransaction-Bq4wwLvo.js";import{af as q,am as C,a7 as at,ax as rt,B as st,ad as M}from"./NetworkUtil-DRBYr7tG.js";import{P as S,w as A,Q as ot,c as ct}from"./W3MFrameProviderSingleton-IE3ttpk4.js";const v=new Map,D=new Map;let it=0;function _(t,n,a){const e=++it,r=()=>v.get(t)||[],s=()=>{const l=r().filter(o=>o.id!==e);if(l.length===0){v.delete(t),D.delete(t);return}v.set(t,l)},f=()=>{const p=r();if(!p.some(o=>o.id===e))return;const l=D.get(t);if(p.length===1&&l){const o=l();o instanceof Promise&&o.catch(()=>{})}s()},b=r();if(v.set(t,[...b,{id:e,fns:n}]),b&&b.length>0)return f;const i={};for(const p in n)i[p]=((...l)=>{var c,u;const o=r();if(o.length!==0)for(const d of o)(u=(c=d.fns)[p])==null||u.call(c,...l)});const g=a(i);return typeof g=="function"&&D.set(t,g),f}function U(t,{emitOnBegin:n,initialWaitTime:a,interval:e}){let r=!0;const s=()=>r=!1;return(async()=>{let b;n&&(b=await t({unpoll:s}));const i=await(a==null?void 0:a(b))??e;await S(i);const g=async()=>{r&&(await t({unpoll:s}),await S(e),g())};g()})(),s}function ut(t,{method:n}){var e,r;const a={};return t.transport.type==="fallback"&&((r=(e=t.transport).onResponse)==null||r.call(e,({method:s,response:f,status:b,transport:i})=>{b==="success"&&n===s&&(a[f]=i.request)})),(s=>a[s]||t.request)}const lt=new Map,ft=new Map;function pt(t){const n=(r,s)=>({clear:()=>s.delete(r),get:()=>s.get(r),set:f=>s.set(r,f)}),a=n(t,lt),e=n(t,ft);return{clear:()=>{a.clear(),e.clear()},promise:a,response:e}}async function dt(t,{cacheKey:n,cacheTime:a=Number.POSITIVE_INFINITY}){const e=pt(n),r=e.response.get();if(r&&a>0&&Date.now()-r.created.getTime()<a)return r.data;let s=e.promise.get();s||(s=t(),e.promise.set(s));try{const f=await s;return e.response.set({created:new Date,data:f}),f}finally{e.promise.clear()}}const bt=t=>`blockNumber.${t}`;async function gt(t,{cacheTime:n=t.cacheTime}={}){const a=await dt(()=>t.request({method:"eth_blockNumber"}),{cacheKey:bt(t.uid),cacheTime:n});return BigInt(a)}async function mt(t,{filter:n}){const a="strict"in n&&n.strict,e=await n.request({method:"eth_getFilterChanges",params:[n.id]});if(typeof e[0]=="string")return e;const r=e.map(s=>z(s));return!("abi"in n)||!n.abi?r:G({abi:n.abi,logs:r,strict:a})}async function ht(t,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}async function yt(t,{blockHash:n,blockNumber:a,blockTag:e,hash:r,index:s,sender:f,nonce:b}){var o,c,u;const i=e||"latest",g=a!==void 0?q(a):void 0;let p=null;if(r?p=await t.request({method:"eth_getTransactionByHash",params:[r]},{dedupe:!0}):n?p=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[n,q(s)]},{dedupe:!0}):typeof s=="number"?p=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[g||i,q(s)]},{dedupe:!!g}):f&&typeof b=="number"&&(p=await t.request({method:"eth_getTransactionBySenderAndNonce",params:[f,q(b)]},{dedupe:!0})),!p)throw new E({blockHash:n,blockNumber:a,blockTag:i,hash:r,index:s});return(((u=(c=(o=t.chain)==null?void 0:o.formatters)==null?void 0:c.transaction)==null?void 0:u.format)||Q)(p,"getTransaction")}async function O(t,{hash:n}){var r,s,f;const a=await t.request({method:"eth_getTransactionReceipt",params:[n]},{dedupe:!0});if(!a)throw new H({hash:n});return(((f=(s=(r=t.chain)==null?void 0:r.formatters)==null?void 0:s.transactionReceipt)==null?void 0:f.format)||Y)(a,"getTransactionReceipt")}function wt(t,{emitOnBegin:n=!1,emitMissed:a=!1,onBlockNumber:e,onError:r,poll:s,pollingInterval:f=t.pollingInterval}){const b=typeof s<"u"?s:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].config.type==="webSocket"||t.transport.transports[0].config.type==="ipc"));let i;return b?(()=>{const l=C(["watchBlockNumber",t.uid,n,a,f]);return _(l,{onBlockNumber:e,onError:r},o=>U(async()=>{var c;try{const u=await T(t,gt,"getBlockNumber")({cacheTime:0});if(i!==void 0){if(u===i)return;if(u-i>1&&a)for(let d=i+1n;d<u;d++)o.onBlockNumber(d,i),i=d}(i===void 0||u>i)&&(o.onBlockNumber(u,i),i=u)}catch(u){(c=o.onError)==null||c.call(o,u)}},{emitOnBegin:n,interval:f}))})():(()=>{const l=C(["watchBlockNumber",t.uid,n,a]);return _(l,{onBlockNumber:e,onError:r},o=>{let c=!0,u=()=>c=!1;return(async()=>{try{const d=(()=>{if(t.transport.type==="fallback"){const N=t.transport.transports.find(h=>h.config.type==="webSocket"||h.config.type==="ipc");return N?N.value:t.transport}return t.transport})(),{unsubscribe:w}=await d.subscribe({params:["newHeads"],onData(N){var I;if(!c)return;const h=at((I=N.result)==null?void 0:I.number);o.onBlockNumber(h,i),i=h},onError(N){var h;(h=o.onError)==null||h.call(o,N)}});u=w,c||u()}catch(d){r==null||r(d)}})(),()=>u()})})()}async function Rt(t,n){const{checkReplacement:a=!0,confirmations:e=1,hash:r,onReplaced:s,retryCount:f=6,retryDelay:b=({count:m})=>~~(1<<m)*200,timeout:i=18e4}=n,g=C(["waitForTransactionReceipt",t.uid,r]),p=(()=>{var m;return n.pollingInterval?n.pollingInterval:(m=t.chain)!=null&&m.experimental_preconfirmationTime?t.chain.experimental_preconfirmationTime:t.pollingInterval})();let l,o,c,u=!1,d,w;const{promise:N,resolve:h,reject:I}=rt(),F=i?setTimeout(()=>{w==null||w(),d==null||d(),I(new J({hash:r}))},i):void 0;return d=_(g,{onReplaced:s,resolve:h,reject:I},async m=>{if(c=await T(t,O,"getTransactionReceipt")({hash:r}).catch(()=>{}),c&&e<=1){clearTimeout(F),m.resolve(c),d==null||d();return}w=T(t,wt,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber($){const B=k=>{clearTimeout(F),w==null||w(),k(),d==null||d()};let R=$;if(!u)try{if(c){if(e>1&&(!c.blockNumber||R-c.blockNumber+1n<e))return;B(()=>m.resolve(c));return}if(a&&!l&&(u=!0,await A(async()=>{l=await T(t,yt,"getTransaction")({hash:r}),l.blockNumber&&(R=l.blockNumber)},{delay:b,retryCount:f}),u=!1),c=await T(t,O,"getTransactionReceipt")({hash:r}),e>1&&(!c.blockNumber||R-c.blockNumber+1n<e))return;B(()=>m.resolve(c))}catch(k){if(k instanceof E||k instanceof H){if(!l){u=!1;return}try{o=l,u=!0;const P=await A(()=>T(t,W,"getBlock")({blockNumber:R,includeTransactions:!0}),{delay:b,retryCount:f,shouldRetry:({error:x})=>x instanceof X});u=!1;const y=P.transactions.find(({from:x,nonce:V})=>x===o.from&&V===o.nonce);if(!y||(c=await T(t,O,"getTransactionReceipt")({hash:y.hash}),e>1&&(!c.blockNumber||R-c.blockNumber+1n<e)))return;let j="replaced";y.to===o.to&&y.value===o.value&&y.input===o.input?j="repriced":y.from===y.to&&y.value===0n&&(j="cancelled"),B(()=>{var x;(x=m.onReplaced)==null||x.call(m,{reason:j,replacedTransaction:o,transaction:y,transactionReceipt:c}),m.resolve(c)})}catch(P){B(()=>m.reject(P))}}else B(()=>m.reject(k))}}})}),N}class kt extends st{constructor({value:n}){super(`Number \`${n}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Pt(t,n){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new kt({value:t});let[a,e="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),e=e.replace(/(0+)$/,""),n===0)Math.round(+`.${e}`)===1&&(a=`${BigInt(a)+1n}`),e="";else if(e.length>n){const[s,f,b]=[e.slice(0,n-1),e.slice(n-1,n),e.slice(n)],i=Math.round(+`${f}.${b}`);i>9?e=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):e=`${s}${i}`,e.length>n&&(e=e.slice(1),a=`${BigInt(a)+1n}`),e=e.slice(0,n)}else e=e.padEnd(n,"0");return BigInt(`${r?"-":""}${a}${e}`)}function xt(t){const{batch:n,chain:a,ccipRead:e,dataSuffix:r,key:s="base",name:f="Base Client",tokens:b,type:i="base"}=t,g=t.experimental_blockTag??(typeof(a==null?void 0:a.experimental_preconfirmationTime)=="number"?"pending":void 0),p=(a==null?void 0:a.blockTime)??12e3,l=Math.min(Math.max(Math.floor(p/2),500),4e3),o=t.pollingInterval??l,c=t.cacheTime??o,u=t.account?Z(t.account):void 0,{config:d,request:w,value:N}=t.transport({account:u,chain:a,pollingInterval:o}),h={...d,...N},I={account:u,batch:n,cacheTime:c,ccipRead:e,chain:a,dataSuffix:r,key:s,name:f,pollingInterval:o,request:w,tokens:b,transport:h,type:i,uid:ot(),...g?{experimental_blockTag:g}:{}};function F(m){return $=>{const B=$(m);for(const k in I)delete B[k];const R={...m,...B};for(const k in B){const P=m[k],y=B[k];L(P)&&L(y)&&(R[k]={...P,...y})}return Object.assign(R,{extend:F(R)})}}return Object.assign(I,{extend:F(I)})}function L(t){if(typeof t!="object"||t===null)return!1;const n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}function Ft(t,n){const a=(e={})=>n(t,e);for(const e of["call","calls","callWithPeriod","estimateGas","simulate"])if(Object.hasOwn(n,e)){const r=n[e];a[e]=(s={})=>r.length>=2?r(t,s):r.length===0?r():r(s)}for(const e of["extractEvent","extractEvents"])Object.hasOwn(n,e)&&(a[e]=n[e]);return a}async function Tt(t){const n=ut(t,{method:"eth_newPendingTransactionFilter"}),a=await t.request({method:"eth_newPendingTransactionFilter"});return{id:a,request:n(a),type:"transaction"}}async function qt(t,{address:n,blockHash:a,blockNumber:e,blockTag:r=t.experimental_blockTag??"latest",requireCanonical:s}){var i,g,p;const f=K({blockHash:a,blockNumber:e,blockTag:r,requireCanonical:s});if((i=t.batch)!=null&&i.multicall&&((p=(g=t.chain)==null?void 0:g.contracts)!=null&&p.multicall3)){const l=t.chain.contracts.multicall3.address,o=tt({abi:M,functionName:"getEthBalance",args:[n]}),{data:c}=await T(t,nt,"call")({to:l,data:o,blockHash:a,blockNumber:e,blockTag:r,requireCanonical:s});return et({abi:M,functionName:"getEthBalance",args:[n],data:c||"0x"})}const b=await t.request({method:"eth_getBalance",params:[n,f]});return BigInt(b)}function vt(t,{batch:n=!0,onError:a,onTransactions:e,poll:r,pollingInterval:s=t.pollingInterval}){return(typeof r<"u"?r:t.transport.type!=="webSocket"&&t.transport.type!=="ipc")?(()=>{const g=C(["watchPendingTransactions",t.uid,n,s]);return _(g,{onTransactions:e,onError:a},p=>{let l;const o=U(async()=>{var c;try{if(!l)try{l=await T(t,Tt,"createPendingTransactionFilter")({});return}catch(d){throw o(),d}const u=await T(t,mt,"getFilterChanges")({filter:l});if(u.length===0)return;if(n)p.onTransactions(u);else for(const d of u)p.onTransactions([d])}catch(u){(c=p.onError)==null||c.call(p,u)}},{emitOnBegin:!0,interval:s});return async()=>{l&&await T(t,ht,"uninstallFilter")({filter:l}),o()}})})():(()=>{let g=!0,p=()=>g=!1;return(async()=>{try{const{unsubscribe:l}=await t.transport.subscribe({params:["newPendingTransactions"],onData(o){if(!g)return;const c=o.result;e([c])},onError(o){a==null||a(o)}});p=l,g||p()}catch(l){a==null||a(l)}})(),()=>p()})()}function Ct(t,n={}){const{key:a="custom",methods:e,name:r="Custom Provider",retryDelay:s}=n;return({retryCount:f})=>ct({key:a,methods:e,name:r,request:t.request.bind(t),retryCount:n.retryCount??f,retryDelay:s,type:"custom"})}export{kt as I,Ct as a,Rt as b,xt as c,yt as d,vt as e,U as f,qt as g,ut as h,mt as i,gt as j,wt as k,O as l,Tt as m,Ft as n,_ as o,Pt as p,ht as u,dt as w};
1
+ import{aD as z,aV as G,a3 as E,aE as Q,a4 as H,aF as Y,b9 as T,a8 as J,bT as W,q as X,bh as Z,bU as K,az as tt,aq as et,bi as nt}from"./sendRawTransaction-BFwhC1CW.js";import{af as q,am as C,a7 as at,ax as rt,B as st,ad as M}from"./NetworkUtil-DRBYr7tG.js";import{P as S,w as A,Q as ot,c as ct}from"./W3MFrameProviderSingleton-8nOQYUFl.js";const v=new Map,D=new Map;let it=0;function _(t,n,a){const e=++it,r=()=>v.get(t)||[],s=()=>{const l=r().filter(o=>o.id!==e);if(l.length===0){v.delete(t),D.delete(t);return}v.set(t,l)},f=()=>{const p=r();if(!p.some(o=>o.id===e))return;const l=D.get(t);if(p.length===1&&l){const o=l();o instanceof Promise&&o.catch(()=>{})}s()},b=r();if(v.set(t,[...b,{id:e,fns:n}]),b&&b.length>0)return f;const i={};for(const p in n)i[p]=((...l)=>{var c,u;const o=r();if(o.length!==0)for(const d of o)(u=(c=d.fns)[p])==null||u.call(c,...l)});const g=a(i);return typeof g=="function"&&D.set(t,g),f}function U(t,{emitOnBegin:n,initialWaitTime:a,interval:e}){let r=!0;const s=()=>r=!1;return(async()=>{let b;n&&(b=await t({unpoll:s}));const i=await(a==null?void 0:a(b))??e;await S(i);const g=async()=>{r&&(await t({unpoll:s}),await S(e),g())};g()})(),s}function ut(t,{method:n}){var e,r;const a={};return t.transport.type==="fallback"&&((r=(e=t.transport).onResponse)==null||r.call(e,({method:s,response:f,status:b,transport:i})=>{b==="success"&&n===s&&(a[f]=i.request)})),(s=>a[s]||t.request)}const lt=new Map,ft=new Map;function pt(t){const n=(r,s)=>({clear:()=>s.delete(r),get:()=>s.get(r),set:f=>s.set(r,f)}),a=n(t,lt),e=n(t,ft);return{clear:()=>{a.clear(),e.clear()},promise:a,response:e}}async function dt(t,{cacheKey:n,cacheTime:a=Number.POSITIVE_INFINITY}){const e=pt(n),r=e.response.get();if(r&&a>0&&Date.now()-r.created.getTime()<a)return r.data;let s=e.promise.get();s||(s=t(),e.promise.set(s));try{const f=await s;return e.response.set({created:new Date,data:f}),f}finally{e.promise.clear()}}const bt=t=>`blockNumber.${t}`;async function gt(t,{cacheTime:n=t.cacheTime}={}){const a=await dt(()=>t.request({method:"eth_blockNumber"}),{cacheKey:bt(t.uid),cacheTime:n});return BigInt(a)}async function mt(t,{filter:n}){const a="strict"in n&&n.strict,e=await n.request({method:"eth_getFilterChanges",params:[n.id]});if(typeof e[0]=="string")return e;const r=e.map(s=>z(s));return!("abi"in n)||!n.abi?r:G({abi:n.abi,logs:r,strict:a})}async function ht(t,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}async function yt(t,{blockHash:n,blockNumber:a,blockTag:e,hash:r,index:s,sender:f,nonce:b}){var o,c,u;const i=e||"latest",g=a!==void 0?q(a):void 0;let p=null;if(r?p=await t.request({method:"eth_getTransactionByHash",params:[r]},{dedupe:!0}):n?p=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[n,q(s)]},{dedupe:!0}):typeof s=="number"?p=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[g||i,q(s)]},{dedupe:!!g}):f&&typeof b=="number"&&(p=await t.request({method:"eth_getTransactionBySenderAndNonce",params:[f,q(b)]},{dedupe:!0})),!p)throw new E({blockHash:n,blockNumber:a,blockTag:i,hash:r,index:s});return(((u=(c=(o=t.chain)==null?void 0:o.formatters)==null?void 0:c.transaction)==null?void 0:u.format)||Q)(p,"getTransaction")}async function O(t,{hash:n}){var r,s,f;const a=await t.request({method:"eth_getTransactionReceipt",params:[n]},{dedupe:!0});if(!a)throw new H({hash:n});return(((f=(s=(r=t.chain)==null?void 0:r.formatters)==null?void 0:s.transactionReceipt)==null?void 0:f.format)||Y)(a,"getTransactionReceipt")}function wt(t,{emitOnBegin:n=!1,emitMissed:a=!1,onBlockNumber:e,onError:r,poll:s,pollingInterval:f=t.pollingInterval}){const b=typeof s<"u"?s:!(t.transport.type==="webSocket"||t.transport.type==="ipc"||t.transport.type==="fallback"&&(t.transport.transports[0].config.type==="webSocket"||t.transport.transports[0].config.type==="ipc"));let i;return b?(()=>{const l=C(["watchBlockNumber",t.uid,n,a,f]);return _(l,{onBlockNumber:e,onError:r},o=>U(async()=>{var c;try{const u=await T(t,gt,"getBlockNumber")({cacheTime:0});if(i!==void 0){if(u===i)return;if(u-i>1&&a)for(let d=i+1n;d<u;d++)o.onBlockNumber(d,i),i=d}(i===void 0||u>i)&&(o.onBlockNumber(u,i),i=u)}catch(u){(c=o.onError)==null||c.call(o,u)}},{emitOnBegin:n,interval:f}))})():(()=>{const l=C(["watchBlockNumber",t.uid,n,a]);return _(l,{onBlockNumber:e,onError:r},o=>{let c=!0,u=()=>c=!1;return(async()=>{try{const d=(()=>{if(t.transport.type==="fallback"){const N=t.transport.transports.find(h=>h.config.type==="webSocket"||h.config.type==="ipc");return N?N.value:t.transport}return t.transport})(),{unsubscribe:w}=await d.subscribe({params:["newHeads"],onData(N){var I;if(!c)return;const h=at((I=N.result)==null?void 0:I.number);o.onBlockNumber(h,i),i=h},onError(N){var h;(h=o.onError)==null||h.call(o,N)}});u=w,c||u()}catch(d){r==null||r(d)}})(),()=>u()})})()}async function Rt(t,n){const{checkReplacement:a=!0,confirmations:e=1,hash:r,onReplaced:s,retryCount:f=6,retryDelay:b=({count:m})=>~~(1<<m)*200,timeout:i=18e4}=n,g=C(["waitForTransactionReceipt",t.uid,r]),p=(()=>{var m;return n.pollingInterval?n.pollingInterval:(m=t.chain)!=null&&m.experimental_preconfirmationTime?t.chain.experimental_preconfirmationTime:t.pollingInterval})();let l,o,c,u=!1,d,w;const{promise:N,resolve:h,reject:I}=rt(),F=i?setTimeout(()=>{w==null||w(),d==null||d(),I(new J({hash:r}))},i):void 0;return d=_(g,{onReplaced:s,resolve:h,reject:I},async m=>{if(c=await T(t,O,"getTransactionReceipt")({hash:r}).catch(()=>{}),c&&e<=1){clearTimeout(F),m.resolve(c),d==null||d();return}w=T(t,wt,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber($){const B=k=>{clearTimeout(F),w==null||w(),k(),d==null||d()};let R=$;if(!u)try{if(c){if(e>1&&(!c.blockNumber||R-c.blockNumber+1n<e))return;B(()=>m.resolve(c));return}if(a&&!l&&(u=!0,await A(async()=>{l=await T(t,yt,"getTransaction")({hash:r}),l.blockNumber&&(R=l.blockNumber)},{delay:b,retryCount:f}),u=!1),c=await T(t,O,"getTransactionReceipt")({hash:r}),e>1&&(!c.blockNumber||R-c.blockNumber+1n<e))return;B(()=>m.resolve(c))}catch(k){if(k instanceof E||k instanceof H){if(!l){u=!1;return}try{o=l,u=!0;const P=await A(()=>T(t,W,"getBlock")({blockNumber:R,includeTransactions:!0}),{delay:b,retryCount:f,shouldRetry:({error:x})=>x instanceof X});u=!1;const y=P.transactions.find(({from:x,nonce:V})=>x===o.from&&V===o.nonce);if(!y||(c=await T(t,O,"getTransactionReceipt")({hash:y.hash}),e>1&&(!c.blockNumber||R-c.blockNumber+1n<e)))return;let j="replaced";y.to===o.to&&y.value===o.value&&y.input===o.input?j="repriced":y.from===y.to&&y.value===0n&&(j="cancelled"),B(()=>{var x;(x=m.onReplaced)==null||x.call(m,{reason:j,replacedTransaction:o,transaction:y,transactionReceipt:c}),m.resolve(c)})}catch(P){B(()=>m.reject(P))}}else B(()=>m.reject(k))}}})}),N}class kt extends st{constructor({value:n}){super(`Number \`${n}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Pt(t,n){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new kt({value:t});let[a,e="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),e=e.replace(/(0+)$/,""),n===0)Math.round(+`.${e}`)===1&&(a=`${BigInt(a)+1n}`),e="";else if(e.length>n){const[s,f,b]=[e.slice(0,n-1),e.slice(n-1,n),e.slice(n)],i=Math.round(+`${f}.${b}`);i>9?e=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):e=`${s}${i}`,e.length>n&&(e=e.slice(1),a=`${BigInt(a)+1n}`),e=e.slice(0,n)}else e=e.padEnd(n,"0");return BigInt(`${r?"-":""}${a}${e}`)}function xt(t){const{batch:n,chain:a,ccipRead:e,dataSuffix:r,key:s="base",name:f="Base Client",tokens:b,type:i="base"}=t,g=t.experimental_blockTag??(typeof(a==null?void 0:a.experimental_preconfirmationTime)=="number"?"pending":void 0),p=(a==null?void 0:a.blockTime)??12e3,l=Math.min(Math.max(Math.floor(p/2),500),4e3),o=t.pollingInterval??l,c=t.cacheTime??o,u=t.account?Z(t.account):void 0,{config:d,request:w,value:N}=t.transport({account:u,chain:a,pollingInterval:o}),h={...d,...N},I={account:u,batch:n,cacheTime:c,ccipRead:e,chain:a,dataSuffix:r,key:s,name:f,pollingInterval:o,request:w,tokens:b,transport:h,type:i,uid:ot(),...g?{experimental_blockTag:g}:{}};function F(m){return $=>{const B=$(m);for(const k in I)delete B[k];const R={...m,...B};for(const k in B){const P=m[k],y=B[k];L(P)&&L(y)&&(R[k]={...P,...y})}return Object.assign(R,{extend:F(R)})}}return Object.assign(I,{extend:F(I)})}function L(t){if(typeof t!="object"||t===null)return!1;const n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}function Ft(t,n){const a=(e={})=>n(t,e);for(const e of["call","calls","callWithPeriod","estimateGas","simulate"])if(Object.hasOwn(n,e)){const r=n[e];a[e]=(s={})=>r.length>=2?r(t,s):r.length===0?r():r(s)}for(const e of["extractEvent","extractEvents"])Object.hasOwn(n,e)&&(a[e]=n[e]);return a}async function Tt(t){const n=ut(t,{method:"eth_newPendingTransactionFilter"}),a=await t.request({method:"eth_newPendingTransactionFilter"});return{id:a,request:n(a),type:"transaction"}}async function qt(t,{address:n,blockHash:a,blockNumber:e,blockTag:r=t.experimental_blockTag??"latest",requireCanonical:s}){var i,g,p;const f=K({blockHash:a,blockNumber:e,blockTag:r,requireCanonical:s});if((i=t.batch)!=null&&i.multicall&&((p=(g=t.chain)==null?void 0:g.contracts)!=null&&p.multicall3)){const l=t.chain.contracts.multicall3.address,o=tt({abi:M,functionName:"getEthBalance",args:[n]}),{data:c}=await T(t,nt,"call")({to:l,data:o,blockHash:a,blockNumber:e,blockTag:r,requireCanonical:s});return et({abi:M,functionName:"getEthBalance",args:[n],data:c||"0x"})}const b=await t.request({method:"eth_getBalance",params:[n,f]});return BigInt(b)}function vt(t,{batch:n=!0,onError:a,onTransactions:e,poll:r,pollingInterval:s=t.pollingInterval}){return(typeof r<"u"?r:t.transport.type!=="webSocket"&&t.transport.type!=="ipc")?(()=>{const g=C(["watchPendingTransactions",t.uid,n,s]);return _(g,{onTransactions:e,onError:a},p=>{let l;const o=U(async()=>{var c;try{if(!l)try{l=await T(t,Tt,"createPendingTransactionFilter")({});return}catch(d){throw o(),d}const u=await T(t,mt,"getFilterChanges")({filter:l});if(u.length===0)return;if(n)p.onTransactions(u);else for(const d of u)p.onTransactions([d])}catch(u){(c=p.onError)==null||c.call(p,u)}},{emitOnBegin:!0,interval:s});return async()=>{l&&await T(t,ht,"uninstallFilter")({filter:l}),o()}})})():(()=>{let g=!0,p=()=>g=!1;return(async()=>{try{const{unsubscribe:l}=await t.transport.subscribe({params:["newPendingTransactions"],onData(o){if(!g)return;const c=o.result;e([c])},onError(o){a==null||a(o)}});p=l,g||p()}catch(l){a==null||a(l)}})(),()=>p()})()}function Ct(t,n={}){const{key:a="custom",methods:e,name:r="Custom Provider",retryDelay:s}=n;return({retryCount:f})=>ct({key:a,methods:e,name:r,request:t.request.bind(t),retryCount:n.retryCount??f,retryDelay:s,type:"custom"})}export{kt as I,Ct as a,Rt as b,xt as c,yt as d,vt as e,U as f,qt as g,ut as h,mt as i,gt as j,wt as k,O as l,Tt as m,Ft as n,_ as o,Pt as p,ht as u,dt as w};
@@ -1,4 +1,4 @@
1
- import{a as y,i as $,b as l}from"./lit-element-B3y9oplH.js";import{n as S,r as u}from"./class-map-CxwNmq0D.js";import"./index-IYjr57Gm.js";import{c as x,U as _}from"./index-DrCs3EU5.js";import{W as E}from"./index-ruNca7KW.js";import{O as m,R as p,C as f,S as h,v as C,x as R}from"./W3MFrameProviderSingleton-IE3ttpk4.js";import{ReownAuthentication as v}from"./features-TzQhgqwq.js";import"./index-C4gUf5hB.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-4aprBRKs.js";import"./index-BYez_Zlc.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-BBN5wT_v.js";import"./index.es-Demw3yyg.js";import"./browser-ponyfill-DgNUJw98.js";import"./NetworkUtil-DRBYr7tG.js";import"./index-DtoO1T74.js";import"./index-BzEzUKoA.js";const D=y`
1
+ import{a as y,i as $,b as l}from"./lit-element-B3y9oplH.js";import{n as S,r as u}from"./class-map-CxwNmq0D.js";import"./index-CGlNYcKT.js";import{c as x,U as _}from"./index-Dvt1PbKM.js";import{W as E}from"./index-BwxkgPV1.js";import{O as m,R as p,C as f,S as h,v as C,x as R}from"./W3MFrameProviderSingleton-8nOQYUFl.js";import{ReownAuthentication as v}from"./features-Dxfjhzpg.js";import"./index-fwX9_hYz.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-WviPcgqv.js";import"./index-Bj8T-xg9.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-BbqyUr8v.js";import"./index.es-iPKbpugX.js";import"./browser-ponyfill-DgNUJw98.js";import"./NetworkUtil-DRBYr7tG.js";import"./index-DYsleGM1.js";import"./index-BzDco18P.js";const D=y`
2
2
  .email-sufixes {
3
3
  display: flex;
4
4
  flex-direction: row;
@@ -1 +1 @@
1
- import{r as c}from"./signing-ViEkal5y.js";const n="0x313ce567",o=[],r=[{type:"uint8"}];async function s(t){return c({contract:t.contract,method:[n,o,r],params:[]})}export{s as d};
1
+ import{r as c}from"./signing-DUKQER6N.js";const n="0x313ce567",o=[],r=[{type:"uint8"}];async function s(t){return c({contract:t.contract,method:[n,o,r],params:[]})}export{s as d};
@@ -0,0 +1 @@
1
+ import{w as r}from"./utils-CtSpY5KY.js";import{d as a}from"./decimals-CtEbpsEJ.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./signing-DUKQER6N.js";import"./index-fwX9_hYz.js";async function s(c){return r(()=>a(c),{cacheKey:`${c.contract.chain.id}:${c.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}export{s as decimals};
@@ -1 +1 @@
1
- import{f as r}from"./signing-ViEkal5y.js";function o(e){const t=Array.isArray(e.method)?e.method[0]:r(e.method);return e.availableSelectors.includes(t)}export{o as d};
1
+ import{f as r}from"./signing-DUKQER6N.js";function o(e){const t=Array.isArray(e.method)?e.method[0]:r(e.method);return e.availableSelectors.includes(t)}export{o as d};
@@ -1,4 +1,4 @@
1
- import{d as S}from"./index-IYjr57Gm.js";import{c as d}from"./index-DrCs3EU5.js";import{W as C}from"./index-ruNca7KW.js";import{C as D,k as g,O as h,E as c,M as _,R as s,S as f,b,o as m,y as $}from"./W3MFrameProviderSingleton-IE3ttpk4.js";import{i as y,b as u,a as W}from"./lit-element-B3y9oplH.js";import{r as E}from"./class-map-CxwNmq0D.js";import"./index-D7UmhFbh.js";import"./index-DtoO1T74.js";import{e as P,n as N}from"./ref-BsAZ42-h.js";import"./index-BPks9tyO.js";import"./index-DMvGrm22.js";import{au as T}from"./NetworkUtil-DRBYr7tG.js";import"./index-C4gUf5hB.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-4aprBRKs.js";import"./index-BYez_Zlc.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-BBN5wT_v.js";import"./index.es-Demw3yyg.js";import"./browser-ponyfill-DgNUJw98.js";import"./index-BzEzUKoA.js";import"./async-directive-BRxn_Py3.js";import"./index-DSPDLgPF.js";var F=function(o,e,t,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,r);else for(var l=o.length-1;l>=0;l--)(a=o[l])&&(i=(n<3?a(i):n>3?a(e,t,i):a(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i};let I=class extends C{constructor(){super(...arguments),this.onOtpSubmit=async e=>{var t,r;try{if(this.authConnector){const n=D.state.activeChain,i=g.getConnections(n),a=(t=h.state.remoteFeatures)==null?void 0:t.multiWallet,l=i.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),n)await g.connectExternal(this.authConnector,n);else throw new Error("Active chain is not set on ChainController");if((r=h.state.remoteFeatures)!=null&&r.emailCapture)return;if(h.state.siwx){_.close();return}if(l&&a){s.replace("ProfileWallets"),f.showSuccess("New Wallet Added");return}_.close()}}catch(n){throw c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:b.parseError(n)}}),n}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};I=F([d("w3m-email-verify-otp-view")],I);const U=S`
1
+ import{d as S}from"./index-CGlNYcKT.js";import{c as d}from"./index-Dvt1PbKM.js";import{W as C}from"./index-BwxkgPV1.js";import{C as D,k as g,O as h,E as c,M as _,R as s,S as f,b,o as m,y as $}from"./W3MFrameProviderSingleton-8nOQYUFl.js";import{i as y,b as u,a as W}from"./lit-element-B3y9oplH.js";import{r as E}from"./class-map-CxwNmq0D.js";import"./index-lfVdBzEM.js";import"./index-DYsleGM1.js";import{e as P,n as N}from"./ref-BsAZ42-h.js";import"./index-9N6Vz9JJ.js";import"./index-DRvvHEZB.js";import{au as T}from"./NetworkUtil-DRBYr7tG.js";import"./index-fwX9_hYz.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-WviPcgqv.js";import"./index-Bj8T-xg9.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-BbqyUr8v.js";import"./index.es-iPKbpugX.js";import"./browser-ponyfill-DgNUJw98.js";import"./index-BzDco18P.js";import"./async-directive-BRxn_Py3.js";import"./index-bOxT2TLM.js";var F=function(o,e,t,r){var n=arguments.length,i=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,e,t,r);else for(var l=o.length-1;l>=0;l--)(a=o[l])&&(i=(n<3?a(i):n>3?a(e,t,i):a(e,t))||i);return n>3&&i&&Object.defineProperty(e,t,i),i};let I=class extends C{constructor(){super(...arguments),this.onOtpSubmit=async e=>{var t,r;try{if(this.authConnector){const n=D.state.activeChain,i=g.getConnections(n),a=(t=h.state.remoteFeatures)==null?void 0:t.multiWallet,l=i.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),n)await g.connectExternal(this.authConnector,n);else throw new Error("Active chain is not set on ChainController");if((r=h.state.remoteFeatures)!=null&&r.emailCapture)return;if(h.state.siwx){_.close();return}if(l&&a){s.replace("ProfileWallets"),f.showSuccess("New Wallet Added");return}_.close()}}catch(n){throw c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:b.parseError(n)}}),n}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),c.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};I=F([d("w3m-email-verify-otp-view")],I);const U=S`
2
2
  wui-icon-box {
3
3
  height: ${({spacing:o})=>o[16]};
4
4
  width: ${({spacing:o})=>o[16]};
@@ -1,4 +1,4 @@
1
- import{a as Y,i as g,b as c}from"./lit-element-B3y9oplH.js";import{r as d,n as l,o as K}from"./class-map-CxwNmq0D.js";import{d as E,r as z,e as B}from"./index-IYjr57Gm.js";import{c as w}from"./index-DrCs3EU5.js";import{M as W,O as G,o as _,T as j,H as L,d as N,C as m,I as V,l as C,W as h,k as q,J as X,K as v,b as k,E as O,S as J,R as Q}from"./W3MFrameProviderSingleton-IE3ttpk4.js";import"./index-B8MBrX9i.js";import{au as D}from"./NetworkUtil-DRBYr7tG.js";import{e as Z,n as ee}from"./ref-BsAZ42-h.js";import"./index-BzEzUKoA.js";import{H as I}from"./HelpersUtil-PpqjTrEW.js";import"./index-DSPDLgPF.js";import"./index-6IaYoWdV.js";import"./index-BPks9tyO.js";import"./index-D7UmhFbh.js";import"./index-DtoO1T74.js";import{N as te}from"./NavigationUtil-DmfK5sOV.js";import"./index-C4gUf5hB.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-4aprBRKs.js";import"./index-BYez_Zlc.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-BBN5wT_v.js";import"./index.es-Demw3yyg.js";import"./browser-ponyfill-DgNUJw98.js";import"./async-directive-BRxn_Py3.js";import"./ConstantsUtil-CkFCQ14z.js";const ie=Y`
1
+ import{a as Y,i as g,b as c}from"./lit-element-B3y9oplH.js";import{r as d,n as l,o as K}from"./class-map-CxwNmq0D.js";import{d as E,r as z,e as B}from"./index-CGlNYcKT.js";import{c as w}from"./index-Dvt1PbKM.js";import{M as W,O as G,o as _,T as j,H as L,d as N,C as m,I as V,l as C,W as h,k as q,J as X,K as v,b as k,E as O,S as J,R as Q}from"./W3MFrameProviderSingleton-8nOQYUFl.js";import"./index-BMyAB8ba.js";import{au as D}from"./NetworkUtil-DRBYr7tG.js";import{e as Z,n as ee}from"./ref-BsAZ42-h.js";import"./index-BzDco18P.js";import{H as I}from"./HelpersUtil-DAPWXPm-.js";import"./index-bOxT2TLM.js";import"./index-DT6RahHj.js";import"./index-9N6Vz9JJ.js";import"./index-lfVdBzEM.js";import"./index-DYsleGM1.js";import{N as te}from"./NavigationUtil-DmfK5sOV.js";import"./index-fwX9_hYz.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-WviPcgqv.js";import"./index-Bj8T-xg9.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-BbqyUr8v.js";import"./index.es-iPKbpugX.js";import"./browser-ponyfill-DgNUJw98.js";import"./async-directive-BRxn_Py3.js";import"./ConstantsUtil-CkFCQ14z.js";const ie=Y`
2
2
  div {
3
3
  width: 100%;
4
4
  }
@@ -1 +1 @@
1
- import{j as w,b as p,r as y}from"./signing-ViEkal5y.js";import{w as h}from"./wait-for-tx-receipt-BauhQAMN.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";import"./transactionReceipt-BZCOl44B.js";import"./sleep-mAKpSMLY.js";async function f({account:t,serializableTransaction:e,transaction:r,gasless:n}){const a=p({address:n.relayerForwarderAddress,chain:r.chain,client:r.client}),s=await y({contract:a,method:"function getNonce(address) view returns (uint256)",params:[t.address]}),[o,i]=await(async()=>{if(!e.to)throw new Error("engine transactions must have a 'to' address");if(!e.gas)throw new Error("engine transactions must have a 'gas' value");if(!e.data)throw new Error("engine transactions must have a 'data' value");if(n.experimentalChainlessSupport){const d={chainid:BigInt(r.chain.id),data:e.data,from:t.address,gas:e.gas,nonce:s,to:e.to,value:0n};return[await t.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:a.address,version:"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:l}}),d]}const c={data:e.data,from:t.address,gas:e.gas,nonce:s,to:e.to,value:0n};return[await t.signTypedData({domain:{chainId:r.chain.id,name:n.domainName??"GSNv2 Forwarder",verifyingContract:a.address,version:n.domainVersion??"0.0.1"},message:c,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),c]})();return{message:i,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],l=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function I(t){const{message:e,messageType:r,signature:n}=await f(t),a=await fetch(t.gasless.relayerUrl,{body:w({forwarderAddress:t.gasless.relayerForwarderAddress,request:e,signature:n,type:r}),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw new Error(`Failed to send transaction: ${await a.text()}`);const s=await a.json();if(!s.result)throw new Error(`Relay transaction failed: ${s.message}`);const o=s.result.queueId,i=6e4,m=1e3,c=Date.now()+i;for(;Date.now()<c;){const d=await v({options:t,queueId:o});if(d)return{chain:t.transaction.chain,client:t.transaction.client,transactionHash:d.transactionHash};await new Promise(u=>setTimeout(u,m))}throw new Error(`Failed to find relayed transaction after ${i}ms`)}async function v(t){const{options:e,queueId:r}=t,n=e.gasless.relayerUrl.split("/relayer/")[0],a=await fetch(`${n}/transaction/status/${r}`,{method:"GET"}),s=await a.json();if(!a.ok)return null;const o=s.result;if(!o)return null;switch(o.status){case"errored":throw new Error(`Transaction errored with reason: ${o.errorMessage}`);case"cancelled":throw new Error("Transaction execution cancelled.");case"mined":return await h({chain:e.transaction.chain,client:e.transaction.client,transactionHash:o.transactionHash});default:return null}}export{f as prepareEngineTransaction,I as relayEngineTransaction};
1
+ import{j as w,b as p,r as y}from"./signing-DUKQER6N.js";import{w as h}from"./wait-for-tx-receipt-CmkqIogk.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";import"./transactionReceipt-CpVXwo1b.js";import"./sleep-mAKpSMLY.js";async function f({account:t,serializableTransaction:e,transaction:r,gasless:n}){const a=p({address:n.relayerForwarderAddress,chain:r.chain,client:r.client}),s=await y({contract:a,method:"function getNonce(address) view returns (uint256)",params:[t.address]}),[o,i]=await(async()=>{if(!e.to)throw new Error("engine transactions must have a 'to' address");if(!e.gas)throw new Error("engine transactions must have a 'gas' value");if(!e.data)throw new Error("engine transactions must have a 'data' value");if(n.experimentalChainlessSupport){const d={chainid:BigInt(r.chain.id),data:e.data,from:t.address,gas:e.gas,nonce:s,to:e.to,value:0n};return[await t.signTypedData({domain:{name:"GSNv2 Forwarder",verifyingContract:a.address,version:"0.0.1"},message:d,primaryType:"ForwardRequest",types:{ForwardRequest:l}}),d]}const c={data:e.data,from:t.address,gas:e.gas,nonce:s,to:e.to,value:0n};return[await t.signTypedData({domain:{chainId:r.chain.id,name:n.domainName??"GSNv2 Forwarder",verifyingContract:a.address,version:n.domainVersion??"0.0.1"},message:c,primaryType:"ForwardRequest",types:{ForwardRequest:g}}),c]})();return{message:i,messageType:"forward",signature:o}}const g=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"}],l=[{name:"from",type:"address"},{name:"to",type:"address"},{name:"value",type:"uint256"},{name:"gas",type:"uint256"},{name:"nonce",type:"uint256"},{name:"data",type:"bytes"},{name:"chainid",type:"uint256"}];async function I(t){const{message:e,messageType:r,signature:n}=await f(t),a=await fetch(t.gasless.relayerUrl,{body:w({forwarderAddress:t.gasless.relayerForwarderAddress,request:e,signature:n,type:r}),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw new Error(`Failed to send transaction: ${await a.text()}`);const s=await a.json();if(!s.result)throw new Error(`Relay transaction failed: ${s.message}`);const o=s.result.queueId,i=6e4,m=1e3,c=Date.now()+i;for(;Date.now()<c;){const d=await v({options:t,queueId:o});if(d)return{chain:t.transaction.chain,client:t.transaction.client,transactionHash:d.transactionHash};await new Promise(u=>setTimeout(u,m))}throw new Error(`Failed to find relayed transaction after ${i}ms`)}async function v(t){const{options:e,queueId:r}=t,n=e.gasless.relayerUrl.split("/relayer/")[0],a=await fetch(`${n}/transaction/status/${r}`,{method:"GET"}),s=await a.json();if(!a.ok)return null;const o=s.result;if(!o)return null;switch(o.status){case"errored":throw new Error(`Transaction errored with reason: ${o.errorMessage}`);case"cancelled":throw new Error("Transaction execution cancelled.");case"mined":return await h({chain:e.transaction.chain,client:e.transaction.client,transactionHash:o.transactionHash});default:return null}}export{f as prepareEngineTransaction,I as relayEngineTransaction};
@@ -1 +1 @@
1
- import{b as n,t as c,s as o,r as l}from"./signing-ViEkal5y.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";const m="0x420000000000000000000000000000000000000F";async function P(a){const{transaction:t,gasPriceOracleAddress:r}=a,e=n({address:r||m,chain:t.chain,client:t.client}),{gasPrice:d,...s}=await c({transaction:t}),i=o({transaction:s});return l({contract:e,method:"function getL1Fee(bytes memory _data) view returns (uint256)",params:[i]})}export{P as estimateL1Fee};
1
+ import{b as n,t as c,s as o,r as l}from"./signing-DUKQER6N.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";const m="0x420000000000000000000000000000000000000F";async function P(a){const{transaction:t,gasPriceOracleAddress:r}=a,e=n({address:r||m,chain:t.chain,client:t.client}),{gasPrice:d,...s}=await c({transaction:t}),i=o({transaction:s});return l({contract:e,method:"function getL1Fee(bytes memory _data) view returns (uint256)",params:[i]})}export{P as estimateL1Fee};
@@ -1 +1 @@
1
- import{h as i}from"./signing-ViEkal5y.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
1
+ import{h as i}from"./signing-DUKQER6N.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
@@ -1 +1 @@
1
- import{g as o}from"./signing-ViEkal5y.js";async function r(e,t){return await e({method:"eth_getStorageAt",params:[o(t.address),t.position,t.blockTag??"latest"]})}export{r as e};
1
+ import{g as o}from"./signing-DUKQER6N.js";async function r(e,t){return await e({method:"eth_getStorageAt",params:[o(t.address),t.position,t.blockTag??"latest"]})}export{r as e};
@@ -1 +1 @@
1
- import{n as e,a as r}from"./signing-ViEkal5y.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";async function b(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{b as eth_getTransactionCount};
1
+ import{n as e,a as r}from"./signing-DUKQER6N.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";async function b(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{b as eth_getTransactionCount};
@@ -1 +1 @@
1
- import{o as _,S as L}from"./signing-ViEkal5y.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";const V="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",U=V.length,M=V.charAt(0),z=Math.log(256)/Math.log(U);function F(t){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return"";let e=0,i=0,n=0;const s=t.length;for(;n!==s&&t[n]===0;)n++,e++;const c=(s-n)*z+1>>>0,a=new Uint8Array(c);for(;n!==s;){let d=t[n]||0,w=0;for(let h=c-1;(d!==0||w<i)&&h!==-1;h--,w++)d+=256*(a[h]||0)>>>0,a[h]=d%U>>>0,d=d/U>>>0;if(d!==0)throw new Error("Non-zero carry");i=w,n++}let l=c-i;for(;l!==c&&a[l]===0;)l++;let u=M.repeat(e);for(;l<c;++l)u+=V.charAt(a[l]||0);return u}let o,E,r=0,j={},b,N;const D=0;let C=0,S,R,I;const $={mapsAsObjects:!0,useRecords:!1};function v(t){let e;if(t<16&&(e=T(t)))return e;if(t>64&&decoder)return decoder.decode(o.subarray(r,r+=t));const i=r+t,n=[];for(e="";r<i;){const s=o[r++];if((s&128)===0)n.push(s);else if((s&224)===192){const c=o[r++]&63;n.push((s&31)<<6|c)}else if((s&240)===224){const c=o[r++]&63,a=o[r++]&63;n.push((s&31)<<12|c<<6|a)}else if((s&248)===240){const c=o[r++]&63,a=o[r++]&63,l=o[r++]&63;let u=(s&7)<<18|c<<12|a<<6|l;u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u)}else n.push(s);n.length>=4096&&(e+=x.apply(String,n),n.length=0)}return n.length>0&&(e+=x.apply(String,n)),e}class O{constructor(){Object.assign(this,$)}decodeKey(e){return e}decode(e,i=-1){E=i>-1?i:e.length,r=0,C=0,N=null,S=null,o=e;try{I=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){throw o=null,e instanceof Uint8Array?n:new Error(`Source must be a Uint8Array or Buffer but was a ${e&&typeof e=="object"?e.constructor.name:typeof e}`)}return this instanceof O?(j=this,this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),(!b||b.length>0)&&(b=[])):(j=$,(!b||b.length>0)&&(b=[])),H()}}function H(){try{const t=g();if(S){if(r>=S.postBundlePosition){const e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}r=S.postBundlePosition,S=null}if(r===E)b=null,o=null,R&&(R=null);else if(r>E){const e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}else throw new Error("Data read, but end of buffer not reached");return t}catch(t){throw q(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer"))&&(t.incomplete=!0),t}}function g(){let t=o[r++];const e=t>>5;if(t=t&31,t>23)switch(t){case 24:t=o[r++];break;default:throw new Error(`Unknown token ${t}`)}switch(e){case 0:return t;case 1:return~t;case 2:return W(t);case 3:if(C>=r)return N.slice(r-D,(r+=t)-D);if(C===0&&E<140&&t<32){const i=t<16?T(t):K(t);if(i!==null)return i}return v(t);case 4:{const i=new Array(t);for(let n=0;n<t;n++)i[n]=g();return i}case 5:{const i={};for(let n=0;n<t;n++)i[J(g())]=g();return i}default:if(Number.isNaN(t)){const i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error(`Unknown CBOR token ${t}`)}}function J(t){if(typeof t=="string")return t==="__proto__"?"__proto_":t;if(typeof t!="object")return t.toString();throw new Error(`Invalid property name type ${typeof t}`)}const x=String.fromCharCode;function K(t){const e=r,i=new Array(t);for(let n=0;n<t;n++){const s=o[r++];if((s&128)>0){r=e;return}i[n]=s}return x.apply(String,i)}function T(t){if(t<4){if(t<2){if(t===0)return"";const k=o[r++];if((k&128)>1){r-=1;return}return x(k)}const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=2;return}if(t<3)return x(f,p);const y=o[r++];if((y&128)>0){r-=3;return}return x(f,p,y)}const e=o[r++],i=o[r++],n=o[r++],s=o[r++];if((e&128)>0||(i&128)>0||(n&128)>0||(s&128)>0){r-=4;return}if(t<6){if(t===4)return x(e,i,n,s);const f=o[r++];if((f&128)>0){r-=5;return}return x(e,i,n,s,f)}if(t<8){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=6;return}if(t<7)return x(e,i,n,s,f,p);const y=o[r++];if((y&128)>0){r-=7;return}return x(e,i,n,s,f,p,y)}const c=o[r++],a=o[r++],l=o[r++],u=o[r++];if((c&128)>0||(a&128)>0||(l&128)>0||(u&128)>0){r-=8;return}if(t<10){if(t===8)return x(e,i,n,s,c,a,l,u);const f=o[r++];if((f&128)>0){r-=9;return}return x(e,i,n,s,c,a,l,u,f)}if(t<12){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=10;return}if(t<11)return x(e,i,n,s,c,a,l,u,f,p);const y=o[r++];if((y&128)>0){r-=11;return}return x(e,i,n,s,c,a,l,u,f,p,y)}const d=o[r++],w=o[r++],h=o[r++],m=o[r++];if((d&128)>0||(w&128)>0||(h&128)>0||(m&128)>0){r-=12;return}if(t<14){if(t===12)return x(e,i,n,s,c,a,l,u,d,w,h,m);const f=o[r++];if((f&128)>0){r-=13;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,f)}const A=o[r++],B=o[r++];if((A&128)>0||(B&128)>0){r-=14;return}if(t<15)return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B);const P=o[r++];if((P&128)>0){r-=15;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B,P)}function W(t){return j.copyBuffers?Uint8Array.prototype.slice.call(o,r,r+=t):o.subarray(r,r+=t)}function q(){o=null,R=null,b=null}const G=new Array(147);for(let t=0;t<256;t++)G[t]=+`1e${Math.floor(45.15-t*.30103)}`;const Q=new O,X=Q.decode;function Y(t){return _(t,{strict:!1})?t:`0x${t}`}function ot(t){const e=L(Y(t)),i=e[e.length-2]*256+e[e.length-1],n=e.length-2-i;if(n<0||n>e.length)return;const s=e.slice(n,-2),c=X(s);if("ipfs"in c)return`ipfs://${F(c.ipfs)}`}export{ot as extractIPFSUri};
1
+ import{o as _,S as L}from"./signing-DUKQER6N.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";const V="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",U=V.length,M=V.charAt(0),z=Math.log(256)/Math.log(U);function F(t){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return"";let e=0,i=0,n=0;const s=t.length;for(;n!==s&&t[n]===0;)n++,e++;const c=(s-n)*z+1>>>0,a=new Uint8Array(c);for(;n!==s;){let d=t[n]||0,w=0;for(let h=c-1;(d!==0||w<i)&&h!==-1;h--,w++)d+=256*(a[h]||0)>>>0,a[h]=d%U>>>0,d=d/U>>>0;if(d!==0)throw new Error("Non-zero carry");i=w,n++}let l=c-i;for(;l!==c&&a[l]===0;)l++;let u=M.repeat(e);for(;l<c;++l)u+=V.charAt(a[l]||0);return u}let o,E,r=0,j={},b,N;const D=0;let C=0,S,R,I;const $={mapsAsObjects:!0,useRecords:!1};function v(t){let e;if(t<16&&(e=T(t)))return e;if(t>64&&decoder)return decoder.decode(o.subarray(r,r+=t));const i=r+t,n=[];for(e="";r<i;){const s=o[r++];if((s&128)===0)n.push(s);else if((s&224)===192){const c=o[r++]&63;n.push((s&31)<<6|c)}else if((s&240)===224){const c=o[r++]&63,a=o[r++]&63;n.push((s&31)<<12|c<<6|a)}else if((s&248)===240){const c=o[r++]&63,a=o[r++]&63,l=o[r++]&63;let u=(s&7)<<18|c<<12|a<<6|l;u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u)}else n.push(s);n.length>=4096&&(e+=x.apply(String,n),n.length=0)}return n.length>0&&(e+=x.apply(String,n)),e}class O{constructor(){Object.assign(this,$)}decodeKey(e){return e}decode(e,i=-1){E=i>-1?i:e.length,r=0,C=0,N=null,S=null,o=e;try{I=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){throw o=null,e instanceof Uint8Array?n:new Error(`Source must be a Uint8Array or Buffer but was a ${e&&typeof e=="object"?e.constructor.name:typeof e}`)}return this instanceof O?(j=this,this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),(!b||b.length>0)&&(b=[])):(j=$,(!b||b.length>0)&&(b=[])),H()}}function H(){try{const t=g();if(S){if(r>=S.postBundlePosition){const e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}r=S.postBundlePosition,S=null}if(r===E)b=null,o=null,R&&(R=null);else if(r>E){const e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}else throw new Error("Data read, but end of buffer not reached");return t}catch(t){throw q(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer"))&&(t.incomplete=!0),t}}function g(){let t=o[r++];const e=t>>5;if(t=t&31,t>23)switch(t){case 24:t=o[r++];break;default:throw new Error(`Unknown token ${t}`)}switch(e){case 0:return t;case 1:return~t;case 2:return W(t);case 3:if(C>=r)return N.slice(r-D,(r+=t)-D);if(C===0&&E<140&&t<32){const i=t<16?T(t):K(t);if(i!==null)return i}return v(t);case 4:{const i=new Array(t);for(let n=0;n<t;n++)i[n]=g();return i}case 5:{const i={};for(let n=0;n<t;n++)i[J(g())]=g();return i}default:if(Number.isNaN(t)){const i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error(`Unknown CBOR token ${t}`)}}function J(t){if(typeof t=="string")return t==="__proto__"?"__proto_":t;if(typeof t!="object")return t.toString();throw new Error(`Invalid property name type ${typeof t}`)}const x=String.fromCharCode;function K(t){const e=r,i=new Array(t);for(let n=0;n<t;n++){const s=o[r++];if((s&128)>0){r=e;return}i[n]=s}return x.apply(String,i)}function T(t){if(t<4){if(t<2){if(t===0)return"";const k=o[r++];if((k&128)>1){r-=1;return}return x(k)}const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=2;return}if(t<3)return x(f,p);const y=o[r++];if((y&128)>0){r-=3;return}return x(f,p,y)}const e=o[r++],i=o[r++],n=o[r++],s=o[r++];if((e&128)>0||(i&128)>0||(n&128)>0||(s&128)>0){r-=4;return}if(t<6){if(t===4)return x(e,i,n,s);const f=o[r++];if((f&128)>0){r-=5;return}return x(e,i,n,s,f)}if(t<8){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=6;return}if(t<7)return x(e,i,n,s,f,p);const y=o[r++];if((y&128)>0){r-=7;return}return x(e,i,n,s,f,p,y)}const c=o[r++],a=o[r++],l=o[r++],u=o[r++];if((c&128)>0||(a&128)>0||(l&128)>0||(u&128)>0){r-=8;return}if(t<10){if(t===8)return x(e,i,n,s,c,a,l,u);const f=o[r++];if((f&128)>0){r-=9;return}return x(e,i,n,s,c,a,l,u,f)}if(t<12){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=10;return}if(t<11)return x(e,i,n,s,c,a,l,u,f,p);const y=o[r++];if((y&128)>0){r-=11;return}return x(e,i,n,s,c,a,l,u,f,p,y)}const d=o[r++],w=o[r++],h=o[r++],m=o[r++];if((d&128)>0||(w&128)>0||(h&128)>0||(m&128)>0){r-=12;return}if(t<14){if(t===12)return x(e,i,n,s,c,a,l,u,d,w,h,m);const f=o[r++];if((f&128)>0){r-=13;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,f)}const A=o[r++],B=o[r++];if((A&128)>0||(B&128)>0){r-=14;return}if(t<15)return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B);const P=o[r++];if((P&128)>0){r-=15;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B,P)}function W(t){return j.copyBuffers?Uint8Array.prototype.slice.call(o,r,r+=t):o.subarray(r,r+=t)}function q(){o=null,R=null,b=null}const G=new Array(147);for(let t=0;t<256;t++)G[t]=+`1e${Math.floor(45.15-t*.30103)}`;const Q=new O,X=Q.decode;function Y(t){return _(t,{strict:!1})?t:`0x${t}`}function ot(t){const e=L(Y(t)),i=e[e.length-2]*256+e[e.length-1],n=e.length-2-i;if(n<0||n>e.length)return;const s=e.slice(n,-2),c=X(s);if("ipfs"in c)return`ipfs://${F(c.ipfs)}`}export{ot as extractIPFSUri};
@@ -1,4 +1,4 @@
1
- import{C as g,x as y,a6 as m,v as u,B as w,z as p}from"./W3MFrameProviderSingleton-IE3ttpk4.js";import{az as A,au as k}from"./NetworkUtil-DRBYr7tG.js";import"./index-C4gUf5hB.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-BwWuCRvy.js";import"./index-4aprBRKs.js";import"./browser-ponyfill-DgNUJw98.js";class N{constructor(e){this.getNonce=e.getNonce}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:typeof document>"u"?"Unknown Domain":document.location.host,uri:typeof document>"u"?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){var n;const t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?`
1
+ import{C as g,x as y,a6 as m,v as u,B as w,z as p}from"./W3MFrameProviderSingleton-8nOQYUFl.js";import{az as A,au as k}from"./NetworkUtil-DRBYr7tG.js";import"./index-fwX9_hYz.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./index-BwWuCRvy.js";import"./index-WviPcgqv.js";import"./browser-ponyfill-DgNUJw98.js";class N{constructor(e){this.getNonce=e.getNonce}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:typeof document>"u"?"Unknown Domain":document.location.host,uri:typeof document>"u"?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){var n;const t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?`
2
2
  ${e.statement}
3
3
  `:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${e.chainId}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,((n=e.resources)==null?void 0:n.length)&&e.resources.reduce((s,o)=>`${s}
4
4
  - ${o}`,"Resources:")].filter(s=>typeof s=="string").join(`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/signing-ViEkal5y.js","assets/utils-CtSpY5KY.js","assets/ethers-BxoDGoYp.js","assets/react-E8ng6RF2.js","assets/index-C4gUf5hB.js","assets/index-C--hbOLp.css"])))=>i.map(i=>d[i]);
2
- import{_ as c}from"./index-C4gUf5hB.js";import{b as s}from"./uint8-array-CjVHUazS.js";import{n as d}from"./signing-ViEkal5y.js";const f="data:application/json;base64";function u(r){return!!r.toLowerCase().startsWith(f)}function l(r){const n=r.indexOf(","),o=r.slice(n+1);return s(o)}const h="data:application/json;utf-8";function w(r){return!!r.toLowerCase().startsWith(h)}function m(r){const n=r.indexOf(","),o=r.slice(n+1);try{return decodeURIComponent(o)}catch{return o}}async function y(r){const{client:n,tokenId:o,tokenUri:e}=r;if(u(e))try{return JSON.parse(l(e))}catch(t){throw console.error("Failed to fetch base64 encoded NFT",{tokenId:o,tokenUri:e},t),t}if(w(e))try{return JSON.parse(m(e))}catch(t){throw console.error("Failed to fetch utf8 encoded NFT",{tokenId:o,tokenUri:e},t),t}const{download:a}=await c(async()=>{const{download:t}=await import("./signing-ViEkal5y.js").then(i=>i.cW);return{download:t}},__vite__mapDeps([0,1,2,3,4,5]));try{if(!e.includes("{id}"))return await(await a({client:n,uri:e})).json()}catch(t){throw console.error("Failed to fetch non-dynamic NFT",{tokenId:o,tokenUri:e},t),t}try{try{return await(await a({client:n,uri:e.replace("{id}",d(o,{size:32}).slice(2))})).json()}catch{return await(await a({client:n,uri:e.replace("{id}",o.toString())})).json()}}catch(t){throw console.error("Failed to fetch dynamic NFT",{tokenId:o,tokenUri:e},t),t}}export{y as f};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/signing-DUKQER6N.js","assets/utils-CtSpY5KY.js","assets/ethers-BxoDGoYp.js","assets/react-E8ng6RF2.js","assets/index-fwX9_hYz.js","assets/index-C--hbOLp.css"])))=>i.map(i=>d[i]);
2
+ import{_ as c}from"./index-fwX9_hYz.js";import{b as s}from"./uint8-array-CjVHUazS.js";import{n as d}from"./signing-DUKQER6N.js";const f="data:application/json;base64";function u(r){return!!r.toLowerCase().startsWith(f)}function l(r){const n=r.indexOf(","),o=r.slice(n+1);return s(o)}const h="data:application/json;utf-8";function w(r){return!!r.toLowerCase().startsWith(h)}function m(r){const n=r.indexOf(","),o=r.slice(n+1);try{return decodeURIComponent(o)}catch{return o}}async function y(r){const{client:n,tokenId:o,tokenUri:e}=r;if(u(e))try{return JSON.parse(l(e))}catch(t){throw console.error("Failed to fetch base64 encoded NFT",{tokenId:o,tokenUri:e},t),t}if(w(e))try{return JSON.parse(m(e))}catch(t){throw console.error("Failed to fetch utf8 encoded NFT",{tokenId:o,tokenUri:e},t),t}const{download:a}=await c(async()=>{const{download:t}=await import("./signing-DUKQER6N.js").then(i=>i.cW);return{download:t}},__vite__mapDeps([0,1,2,3,4,5]));try{if(!e.includes("{id}"))return await(await a({client:n,uri:e})).json()}catch(t){throw console.error("Failed to fetch non-dynamic NFT",{tokenId:o,tokenUri:e},t),t}try{try{return await(await a({client:n,uri:e.replace("{id}",d(o,{size:32}).slice(2))})).json()}catch{return await(await a({client:n,uri:e.replace("{id}",o.toString())})).json()}}catch(t){throw console.error("Failed to fetch dynamic NFT",{tokenId:o,tokenUri:e},t),t}}export{y as f};
@@ -1 +1 @@
1
- import{g as n}from"./wallets-7TfWPN5l.js";import"./signing-ViEkal5y.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";import"./store-CraP4F4Y.js";import"./hashTypedData-hsJu4-yQ.js";import"./index-4aprBRKs.js";import"./index-BYez_Zlc.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-BBN5wT_v.js";import"./ethereum-DymVJL-H.js";async function w(o){const l=await n(o);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:o,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{w as getEcosystemWalletInfo};
1
+ import{g as n}from"./wallets-Opxx6sfN.js";import"./signing-DUKQER6N.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";import"./store-CraP4F4Y.js";import"./hashTypedData-CYuFZOJY.js";import"./index-WviPcgqv.js";import"./index-Bj8T-xg9.js";import"./index-BwWuCRvy.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-BbqyUr8v.js";import"./ethereum-DymVJL-H.js";async function w(o){const l=await n(o);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:o,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{w as getEcosystemWalletInfo};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/utils-CtSpY5KY.js","assets/ethers-BxoDGoYp.js","assets/react-E8ng6RF2.js"])))=>i.map(i=>d[i]);
2
- import{r as X,a9 as we,aa as Ce}from"./signing-ViEkal5y.js";import{_ as Te}from"./index-C4gUf5hB.js";import{w as ge}from"./utils-CtSpY5KY.js";import{d as Ne}from"./decimals-C1olXU12.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";const Oe="0x70a08231",Se=[{name:"_address",type:"address"}],Ae=[{type:"uint256"}];async function Ze(r){return X({contract:r.contract,method:[Oe,Se,Ae],params:[r.address]})}var g;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},r.getValidEnumValues=a=>{const n=r.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return r.objectValues(i)},r.objectValues=a=>r.objectKeys(a).map(function(n){return a[n]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},r.find=(a,n)=>{for(const i of a)if(n(i))return i},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}r.joinValues=s,r.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(g||(g={}));var ee;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),T=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class C extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},s={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let d=s,h=0;for(;h<i.path.length;){const f=i.path[h];h===i.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(t(i))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),s}static assert(e){if(!(e instanceof C))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=r=>new C(r);const Y=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Re=Y;function Ie(){return Re}const Ee=r=>{const{data:e,path:t,errorMaps:s,issueData:a}=r,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=s.filter(f=>!!f).slice().reverse();for(const f of h)d=f(i,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function o(r,e){const t=Ie(),s=Ee({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Y?void 0:Y].filter(a=>!!a)});r.common.issues.push(s)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const n=await a.key,i=await a.value;s.push({key:n,value:i})}return k.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(s[n.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),M=r=>({status:"dirty",value:r}),b=r=>({status:"valid",value:r}),te=r=>r.status==="aborted",re=r=>r.status==="dirty",I=r=>r.status==="valid",D=r=>typeof Promise<"u"&&r instanceof Promise;var l;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class S{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const se=(r,e)=>{if(I(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(r.common.issues);return this._error=t,this._error}}};function _(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,d)=>{const{message:h}=r;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??d.defaultError}:i.code!=="invalid_type"?{message:d.defaultError}:{message:h??t??d.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return T(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(D(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parseSync({data:e,path:s.path,parent:s});return se(s,a)}"~validate"(e){var s,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return I(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(s=n==null?void 0:n.message)==null?void 0:s.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>I(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parse({data:e,path:s.path,parent:s}),n=await(D(a)?a:Promise.resolve(a));return se(s,n)}refine(e,t){const s=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),d=()=>n.addIssue({code:c.custom,...s(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(d(),!1)):i?!0:(d(),!1)})}refinement(e,t){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,a):t),!1))}_refinement(e){return new $({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return W.create(this,this._def)}or(e){return F.create([this,e],this._def)}and(e){return B.create(this,e,this._def)}transform(e){return new $({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new J({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new rt({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new G({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return K.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const je=/^c[^\s-]{8,}$/i,$e=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Me=/^[a-z0-9_-]{21}$/i,Le=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ze=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,De=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Fe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Be=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,We=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,qe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ye=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,He=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ve="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Je=new RegExp(`^${ve}$`);function xe(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Ge(r){return new RegExp(`^${xe(r)}$`)}function Qe(r){let e=`${ve}T${xe(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Xe(r,e){return!!((e==="v4"||!e)&&Fe.test(r)||(e==="v6"||!e)&&We.test(r))}function Ke(r,e){if(!Le.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function et(r,e){return!!((e==="v4"||!e)&&Be.test(r)||(e==="v6"||!e)&&qe.test(r))}class N extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),m}const s=new k;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,d=e.data.length<n.value;(i||d)&&(a=this._getOrReturnCtx(e,a),i?o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),s.dirty())}else if(n.kind==="email")De.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"email",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Ue,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"emoji",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="uuid")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"uuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="nanoid")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid")je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid2")$e.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="ulid")Ve.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ulid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),o(a,{validation:"url",code:c.invalid_string,message:n.message}),s.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"regex",code:c.invalid_string,message:n.message}),s.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),s.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),s.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),s.dirty()):n.kind==="datetime"?Qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"datetime",message:n.message}),s.dirty()):n.kind==="date"?Je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"date",message:n.message}),s.dirty()):n.kind==="time"?Ge(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"time",message:n.message}),s.dirty()):n.kind==="duration"?ze.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"duration",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="ip"?Xe(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ip",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="jwt"?Ke(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"jwt",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="cidr"?et(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cidr",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64"?Ye.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64url"?He.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64url",code:c.invalid_string,message:n.message}),s.dirty()):g.assertNever(n);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:c.invalid_string,...l.errToObj(s)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=r=>new N({checks:[],typeName:p.ZodString,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});function tt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,n=Number.parseInt(r.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class E extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),m}let s;const a=new k;for(const n of this._def.checks)n.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?tt(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_finite,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,s,a){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:l.toString(a)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}E.create=r=>new E({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class L extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let s;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return o(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,s,a){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:l.toString(a)}]})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}L.create=r=>new L({checks:[],typeName:p.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});class ae extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return b(e.data)}}ae.create=r=>new ae({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class U extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_date}),m}const s=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),s.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):g.assertNever(n);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}U.create=r=>new U({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,..._(r)});class ne extends y{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return b(e.data)}}ne.create=r=>new ne({typeName:p.ZodSymbol,..._(r)});class ie extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return b(e.data)}}ie.create=r=>new ie({typeName:p.ZodUndefined,..._(r)});class de extends y{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return b(e.data)}}de.create=r=>new de({typeName:p.ZodNull,..._(r)});class ce extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=r=>new ce({typeName:p.ZodAny,..._(r)});class oe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}oe.create=r=>new oe({typeName:p.ZodUnknown,..._(r)});class A extends y{_parse(e){const t=this._getOrReturnCtx(e);return o(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}A.create=r=>new A({typeName:p.ZodNever,..._(r)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return b(e.data)}}ue.create=r=>new ue({typeName:p.ZodVoid,..._(r)});class w extends y{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return o(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(i||d)&&(o(t,{code:i?c.too_big:c.too_small,minimum:d?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(o(t,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(o(t,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,d)=>a.type._parseAsync(new S(t,i,t.path,d)))).then(i=>k.mergeArray(s,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new S(t,i,t.path,d)));return k.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(r,e)=>new w({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function R(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=O.create(R(s))}return new x({...r._def,shape:()=>e})}else return r instanceof w?new w({...r._def,type:R(r.element)}):r instanceof O?O.create(R(r.unwrap())):r instanceof V?V.create(R(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>R(e))):r}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return o(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:s,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),d=[];if(!(this._def.catchall instanceof A&&this._def.unknownKeys==="strip"))for(const f in a.data)i.includes(f)||d.push(f);const h=[];for(const f of i){const v=n[f],P=a.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new S(a,P,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof A){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of d)h.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(f==="strict")d.length>0&&(o(a,{code:c.unrecognized_keys,keys:d}),s.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of d){const P=a.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new S(a,P,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const P=await v.key,be=await v.value;f.push({key:P,value:be,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(s,f)):k.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const s of g.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const s of g.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}deepPartial(){return R(this)}partial(e){const t={};for(const s of g.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const s of g.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof O;)n=n._def.innerType;t[s]=n}return new x({...this._def,shape:()=>t})}keyof(){return ke(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});class F extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const i=n.map(d=>new C(d.ctx.common.issues));return o(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const h of s){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!n&&(n={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=i.map(h=>new C(h));return o(t,{code:c.invalid_union,unionErrors:d}),m}}get options(){return this._def.options}}F.create=(r,e)=>new F({options:r,typeName:p.ZodUnion,..._(e)});function H(r,e){const t=T(r),s=T(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const a=g.objectKeys(e),n=g.objectKeys(r).filter(d=>a.indexOf(d)!==-1),i={...r,...e};for(const d of n){const h=H(r[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<r.length;n++){const i=r[n],d=e[n],h=H(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class B extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(n,i)=>{if(te(n)||te(i))return m;const d=H(n.value,i.value);return d.valid?((re(n)||re(i))&&t.dirty(),{status:t.value,value:d.data}):(o(s,{code:c.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}B.create=(r,e,t)=>new B({left:r,right:e,typeName:p.ZodIntersection,..._(t)});class Z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return o(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return o(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(o(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new S(s,i,s.path,d)):null}).filter(i=>!!i);return s.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:r,typeName:p.ZodTuple,rest:null,..._(e)})};class le extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return o(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...s.data.entries()].map(([d,h],f)=>({key:a._parse(new S(s,d,s.path,[f,"key"])),value:n._parse(new S(s,h,s.path,[f,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}}}}le.create=(r,e,t)=>new le({valueType:e,keyType:r,typeName:p.ZodMap,..._(t)});class z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return o(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(o(s,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(o(s,{code:c.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const d=[...s.data.values()].map((h,f)=>n._parse(new S(s,h,s.path,f)));return s.common.async?Promise.all(d).then(h=>i(h)):i(d)}min(e,t){return new z({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new z({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}z.create=(r,e)=>new z({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class he extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}he.create=(r,e)=>new he({getter:r,typeName:p.ZodLazy,..._(e)});class fe extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return o(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(r,e)=>new fe({value:r,typeName:p.ZodLiteral,..._(e)});function ke(r,e){return new j({values:r,typeName:p.ZodEnum,..._(e)})}class j extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{received:t.data,code:c.invalid_enum_value,options:s}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return j.create(e,{...this._def,...t})}exclude(e,t=this._def){return j.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}j.create=ke;class me extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const a=g.objectValues(t);return o(s,{expected:g.joinValues(a),received:s.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=g.objectValues(t);return o(s,{received:s.data,code:c.invalid_enum_value,options:a}),m}return b(e.data)}get enum(){return this._def.values}}me.create=(r,e)=>new me({values:r,typeName:p.ZodNativeEnum,..._(e)});class W extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return o(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}W.create=(r,e)=>new W({type:r,typeName:p.ZodPromise,..._(e)});class $ extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{o(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(s.data,n);if(s.common.async)return Promise.resolve(i).then(async d=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?M(h.value):h});{if(t.value==="aborted")return m;const d=this._def.schema._parseSync({data:i,path:s.path,parent:s});return d.status==="aborted"?m:d.status==="dirty"||t.value==="dirty"?M(d.value):d}}if(a.type==="refinement"){const i=d=>{const h=a.refinement(d,n);if(s.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!I(i))return m;const d=a.transform(i.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):m);g.assertNever(a)}}$.create=(r,e,t)=>new $({schema:r,typeName:p.ZodEffects,effect:e,..._(t)});$.createWithPreprocess=(r,e,t)=>new $({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(r,e)=>new O({innerType:r,typeName:p.ZodOptional,..._(e)});class V extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(r,e)=>new V({innerType:r,typeName:p.ZodNullable,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}J.create=(r,e)=>new J({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class G extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return D(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}G.create=(r,e)=>new G({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class pe extends y{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}pe.create=r=>new pe({typeName:p.ZodNaN,..._(r)});class rt extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class K extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new K({in:e,out:t,typeName:p.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),s=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return D(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}Q.create=(r,e)=>new Q({innerType:r,typeName:p.ZodReadonly,..._(e)});var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const _e=N.create,st=E.create;A.create;w.create;const at=x.create;F.create;B.create;Z.create;j.create;W.create;O.create;V.create;const nt="0x06fdde03",it=[],dt=[{type:"string"}];async function ct(r){return X({contract:r.contract,method:[nt,it,dt],params:[]})}async function ot(r){return ge(()=>ct(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:name`,cacheTime:Number.POSITIVE_INFINITY})}const ut="0x95d89b41",lt=[],ht=[{type:"string"}];async function ft(r){return X({contract:r.contract,method:[ut,lt,ht],params:[]})}async function mt(r){return ge(()=>ft(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:symbol`,cacheTime:Number.POSITIVE_INFINITY})}const ye=at({name:_e().default("Ether"),symbol:_e().default("ETH"),decimals:st().default(18)}).default({name:"Ether",symbol:"ETH",decimals:18});async function pt(r){if(we(r.contract.address)){if(!r.contract.chain.nativeCurrency||!r.contract.chain.nativeCurrency.name||!r.contract.chain.nativeCurrency.symbol||!r.contract.chain.nativeCurrency.decimals)try{const{getChainMetadata:e}=await Te(async()=>{const{getChainMetadata:s}=await import("./utils-CtSpY5KY.js").then(a=>a.u);return{getChainMetadata:s}},__vite__mapDeps([0,1,2])),t=await e(r.contract.chain);return ye.parse({...t.nativeCurrency,...r.contract.chain.nativeCurrency})}catch{}return ye.parse(r.contract.chain.nativeCurrency)}try{const[e,t,s]=await Promise.all([ot(r).catch(()=>""),mt(r),Ne(r)]);return{decimals:s,name:e,symbol:t}}catch(e){throw new Error(`Invalid currency token: ${e}`)}}async function bt(r){const[e,t]=await Promise.all([Ze(r),pt(r)]);return{...t,chainId:r.contract.chain.id,displayValue:Ce(e,t.decimals),tokenAddress:r.contract.address,value:e}}export{bt as getBalance};
2
+ import{r as X,a9 as we,aa as Ce}from"./signing-DUKQER6N.js";import{_ as Te}from"./index-fwX9_hYz.js";import{w as ge}from"./utils-CtSpY5KY.js";import{d as Ne}from"./decimals-CtEbpsEJ.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";const Oe="0x70a08231",Se=[{name:"_address",type:"address"}],Ae=[{type:"uint256"}];async function Ze(r){return X({contract:r.contract,method:[Oe,Se,Ae],params:[r.address]})}var g;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},r.getValidEnumValues=a=>{const n=r.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return r.objectValues(i)},r.objectValues=a=>r.objectKeys(a).map(function(n){return a[n]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},r.find=(a,n)=>{for(const i of a)if(n(i))return i},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}r.joinValues=s,r.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(g||(g={}));var ee;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),T=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class C extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},s={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let d=s,h=0;for(;h<i.path.length;){const f=i.path[h];h===i.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(t(i))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),s}static assert(e){if(!(e instanceof C))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=r=>new C(r);const Y=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Re=Y;function Ie(){return Re}const Ee=r=>{const{data:e,path:t,errorMaps:s,issueData:a}=r,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=s.filter(f=>!!f).slice().reverse();for(const f of h)d=f(i,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function o(r,e){const t=Ie(),s=Ee({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Y?void 0:Y].filter(a=>!!a)});r.common.issues.push(s)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const n=await a.key,i=await a.value;s.push({key:n,value:i})}return k.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(s[n.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),M=r=>({status:"dirty",value:r}),b=r=>({status:"valid",value:r}),te=r=>r.status==="aborted",re=r=>r.status==="dirty",I=r=>r.status==="valid",D=r=>typeof Promise<"u"&&r instanceof Promise;var l;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class S{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const se=(r,e)=>{if(I(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(r.common.issues);return this._error=t,this._error}}};function _(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,d)=>{const{message:h}=r;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??d.defaultError}:i.code!=="invalid_type"?{message:d.defaultError}:{message:h??t??d.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return T(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(D(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parseSync({data:e,path:s.path,parent:s});return se(s,a)}"~validate"(e){var s,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return I(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(s=n==null?void 0:n.message)==null?void 0:s.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>I(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parse({data:e,path:s.path,parent:s}),n=await(D(a)?a:Promise.resolve(a));return se(s,n)}refine(e,t){const s=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),d=()=>n.addIssue({code:c.custom,...s(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(d(),!1)):i?!0:(d(),!1)})}refinement(e,t){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,a):t),!1))}_refinement(e){return new $({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return W.create(this,this._def)}or(e){return F.create([this,e],this._def)}and(e){return B.create(this,e,this._def)}transform(e){return new $({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new J({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new rt({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new G({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return K.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const je=/^c[^\s-]{8,}$/i,$e=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Me=/^[a-z0-9_-]{21}$/i,Le=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ze=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,De=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Fe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Be=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,We=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,qe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ye=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,He=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ve="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Je=new RegExp(`^${ve}$`);function xe(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Ge(r){return new RegExp(`^${xe(r)}$`)}function Qe(r){let e=`${ve}T${xe(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Xe(r,e){return!!((e==="v4"||!e)&&Fe.test(r)||(e==="v6"||!e)&&We.test(r))}function Ke(r,e){if(!Le.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function et(r,e){return!!((e==="v4"||!e)&&Be.test(r)||(e==="v6"||!e)&&qe.test(r))}class N extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),m}const s=new k;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,d=e.data.length<n.value;(i||d)&&(a=this._getOrReturnCtx(e,a),i?o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),s.dirty())}else if(n.kind==="email")De.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"email",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Ue,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"emoji",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="uuid")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"uuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="nanoid")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid")je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid2")$e.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="ulid")Ve.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ulid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),o(a,{validation:"url",code:c.invalid_string,message:n.message}),s.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"regex",code:c.invalid_string,message:n.message}),s.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),s.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),s.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),s.dirty()):n.kind==="datetime"?Qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"datetime",message:n.message}),s.dirty()):n.kind==="date"?Je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"date",message:n.message}),s.dirty()):n.kind==="time"?Ge(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"time",message:n.message}),s.dirty()):n.kind==="duration"?ze.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"duration",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="ip"?Xe(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ip",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="jwt"?Ke(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"jwt",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="cidr"?et(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cidr",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64"?Ye.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64url"?He.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64url",code:c.invalid_string,message:n.message}),s.dirty()):g.assertNever(n);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:c.invalid_string,...l.errToObj(s)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=r=>new N({checks:[],typeName:p.ZodString,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});function tt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,n=Number.parseInt(r.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class E extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),m}let s;const a=new k;for(const n of this._def.checks)n.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?tt(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_finite,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,s,a){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:l.toString(a)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}E.create=r=>new E({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class L extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let s;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return o(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,s,a){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:l.toString(a)}]})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}L.create=r=>new L({checks:[],typeName:p.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});class ae extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return b(e.data)}}ae.create=r=>new ae({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class U extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_date}),m}const s=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),s.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):g.assertNever(n);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}U.create=r=>new U({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,..._(r)});class ne extends y{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return b(e.data)}}ne.create=r=>new ne({typeName:p.ZodSymbol,..._(r)});class ie extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return b(e.data)}}ie.create=r=>new ie({typeName:p.ZodUndefined,..._(r)});class de extends y{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return b(e.data)}}de.create=r=>new de({typeName:p.ZodNull,..._(r)});class ce extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=r=>new ce({typeName:p.ZodAny,..._(r)});class oe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}oe.create=r=>new oe({typeName:p.ZodUnknown,..._(r)});class A extends y{_parse(e){const t=this._getOrReturnCtx(e);return o(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}A.create=r=>new A({typeName:p.ZodNever,..._(r)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return b(e.data)}}ue.create=r=>new ue({typeName:p.ZodVoid,..._(r)});class w extends y{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return o(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(i||d)&&(o(t,{code:i?c.too_big:c.too_small,minimum:d?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(o(t,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(o(t,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,d)=>a.type._parseAsync(new S(t,i,t.path,d)))).then(i=>k.mergeArray(s,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new S(t,i,t.path,d)));return k.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(r,e)=>new w({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function R(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=O.create(R(s))}return new x({...r._def,shape:()=>e})}else return r instanceof w?new w({...r._def,type:R(r.element)}):r instanceof O?O.create(R(r.unwrap())):r instanceof V?V.create(R(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>R(e))):r}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return o(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:s,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),d=[];if(!(this._def.catchall instanceof A&&this._def.unknownKeys==="strip"))for(const f in a.data)i.includes(f)||d.push(f);const h=[];for(const f of i){const v=n[f],P=a.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new S(a,P,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof A){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of d)h.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(f==="strict")d.length>0&&(o(a,{code:c.unrecognized_keys,keys:d}),s.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of d){const P=a.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new S(a,P,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const P=await v.key,be=await v.value;f.push({key:P,value:be,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(s,f)):k.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const s of g.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const s of g.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}deepPartial(){return R(this)}partial(e){const t={};for(const s of g.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const s of g.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof O;)n=n._def.innerType;t[s]=n}return new x({...this._def,shape:()=>t})}keyof(){return ke(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});class F extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const i=n.map(d=>new C(d.ctx.common.issues));return o(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const h of s){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!n&&(n={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=i.map(h=>new C(h));return o(t,{code:c.invalid_union,unionErrors:d}),m}}get options(){return this._def.options}}F.create=(r,e)=>new F({options:r,typeName:p.ZodUnion,..._(e)});function H(r,e){const t=T(r),s=T(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const a=g.objectKeys(e),n=g.objectKeys(r).filter(d=>a.indexOf(d)!==-1),i={...r,...e};for(const d of n){const h=H(r[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<r.length;n++){const i=r[n],d=e[n],h=H(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class B extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(n,i)=>{if(te(n)||te(i))return m;const d=H(n.value,i.value);return d.valid?((re(n)||re(i))&&t.dirty(),{status:t.value,value:d.data}):(o(s,{code:c.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}B.create=(r,e,t)=>new B({left:r,right:e,typeName:p.ZodIntersection,..._(t)});class Z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return o(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return o(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(o(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new S(s,i,s.path,d)):null}).filter(i=>!!i);return s.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:r,typeName:p.ZodTuple,rest:null,..._(e)})};class le extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return o(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...s.data.entries()].map(([d,h],f)=>({key:a._parse(new S(s,d,s.path,[f,"key"])),value:n._parse(new S(s,h,s.path,[f,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}}}}le.create=(r,e,t)=>new le({valueType:e,keyType:r,typeName:p.ZodMap,..._(t)});class z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return o(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(o(s,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(o(s,{code:c.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const d=[...s.data.values()].map((h,f)=>n._parse(new S(s,h,s.path,f)));return s.common.async?Promise.all(d).then(h=>i(h)):i(d)}min(e,t){return new z({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new z({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}z.create=(r,e)=>new z({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class he extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}he.create=(r,e)=>new he({getter:r,typeName:p.ZodLazy,..._(e)});class fe extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return o(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(r,e)=>new fe({value:r,typeName:p.ZodLiteral,..._(e)});function ke(r,e){return new j({values:r,typeName:p.ZodEnum,..._(e)})}class j extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{received:t.data,code:c.invalid_enum_value,options:s}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return j.create(e,{...this._def,...t})}exclude(e,t=this._def){return j.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}j.create=ke;class me extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const a=g.objectValues(t);return o(s,{expected:g.joinValues(a),received:s.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=g.objectValues(t);return o(s,{received:s.data,code:c.invalid_enum_value,options:a}),m}return b(e.data)}get enum(){return this._def.values}}me.create=(r,e)=>new me({values:r,typeName:p.ZodNativeEnum,..._(e)});class W extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return o(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}W.create=(r,e)=>new W({type:r,typeName:p.ZodPromise,..._(e)});class $ extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{o(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(s.data,n);if(s.common.async)return Promise.resolve(i).then(async d=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?M(h.value):h});{if(t.value==="aborted")return m;const d=this._def.schema._parseSync({data:i,path:s.path,parent:s});return d.status==="aborted"?m:d.status==="dirty"||t.value==="dirty"?M(d.value):d}}if(a.type==="refinement"){const i=d=>{const h=a.refinement(d,n);if(s.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!I(i))return m;const d=a.transform(i.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):m);g.assertNever(a)}}$.create=(r,e,t)=>new $({schema:r,typeName:p.ZodEffects,effect:e,..._(t)});$.createWithPreprocess=(r,e,t)=>new $({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(r,e)=>new O({innerType:r,typeName:p.ZodOptional,..._(e)});class V extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(r,e)=>new V({innerType:r,typeName:p.ZodNullable,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}J.create=(r,e)=>new J({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class G extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return D(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}G.create=(r,e)=>new G({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class pe extends y{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}pe.create=r=>new pe({typeName:p.ZodNaN,..._(r)});class rt extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class K extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new K({in:e,out:t,typeName:p.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),s=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return D(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}Q.create=(r,e)=>new Q({innerType:r,typeName:p.ZodReadonly,..._(e)});var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const _e=N.create,st=E.create;A.create;w.create;const at=x.create;F.create;B.create;Z.create;j.create;W.create;O.create;V.create;const nt="0x06fdde03",it=[],dt=[{type:"string"}];async function ct(r){return X({contract:r.contract,method:[nt,it,dt],params:[]})}async function ot(r){return ge(()=>ct(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:name`,cacheTime:Number.POSITIVE_INFINITY})}const ut="0x95d89b41",lt=[],ht=[{type:"string"}];async function ft(r){return X({contract:r.contract,method:[ut,lt,ht],params:[]})}async function mt(r){return ge(()=>ft(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:symbol`,cacheTime:Number.POSITIVE_INFINITY})}const ye=at({name:_e().default("Ether"),symbol:_e().default("ETH"),decimals:st().default(18)}).default({name:"Ether",symbol:"ETH",decimals:18});async function pt(r){if(we(r.contract.address)){if(!r.contract.chain.nativeCurrency||!r.contract.chain.nativeCurrency.name||!r.contract.chain.nativeCurrency.symbol||!r.contract.chain.nativeCurrency.decimals)try{const{getChainMetadata:e}=await Te(async()=>{const{getChainMetadata:s}=await import("./utils-CtSpY5KY.js").then(a=>a.u);return{getChainMetadata:s}},__vite__mapDeps([0,1,2])),t=await e(r.contract.chain);return ye.parse({...t.nativeCurrency,...r.contract.chain.nativeCurrency})}catch{}return ye.parse(r.contract.chain.nativeCurrency)}try{const[e,t,s]=await Promise.all([ot(r).catch(()=>""),mt(r),Ne(r)]);return{decimals:s,name:e,symbol:t}}catch(e){throw new Error(`Invalid currency token: ${e}`)}}async function bt(r){const[e,t]=await Promise.all([Ze(r),pt(r)]);return{...t,chainId:r.contract.chain.id,displayValue:Ce(e,t.decimals),tokenAddress:r.contract.address,value:e}}export{bt as getBalance};
@@ -1 +1 @@
1
- import{d as s,r as a}from"./signing-ViEkal5y.js";import{d as r}from"./detectExtension-Uk-_peko.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";const n="0x3e429396",o=[],t=[{components:[{name:"implementation",type:"address"},{components:[{name:"registerInstallationCallback",type:"bool"},{name:"requiredInterfaces",type:"bytes4[]"},{name:"supportedInterfaces",type:"bytes4[]"},{components:[{name:"selector",type:"bytes4"}],name:"callbackFunctions",type:"tuple[]"},{components:[{name:"selector",type:"bytes4"},{name:"permissionBits",type:"uint256"}],name:"fallbackFunctions",type:"tuple[]"}],name:"config",type:"tuple"}],type:"tuple[]"}];function u(e){return r({availableSelectors:e,method:[n,o,t]})}function y(e){return s(t,e)[0]}async function b(e){return a({contract:e.contract,method:[n,o,t],params:[]})}export{n as FN_SELECTOR,y as decodeGetInstalledModulesResult,b as getInstalledModules,u as isGetInstalledModulesSupported};
1
+ import{d as s,r as a}from"./signing-DUKQER6N.js";import{d as r}from"./detectExtension-BIiGvA9o.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";const n="0x3e429396",o=[],t=[{components:[{name:"implementation",type:"address"},{components:[{name:"registerInstallationCallback",type:"bool"},{name:"requiredInterfaces",type:"bytes4[]"},{name:"supportedInterfaces",type:"bytes4[]"},{components:[{name:"selector",type:"bytes4"}],name:"callbackFunctions",type:"tuple[]"},{components:[{name:"selector",type:"bytes4"},{name:"permissionBits",type:"uint256"}],name:"fallbackFunctions",type:"tuple[]"}],name:"config",type:"tuple"}],type:"tuple[]"}];function u(e){return r({availableSelectors:e,method:[n,o,t]})}function y(e){return s(t,e)[0]}async function b(e){return a({contract:e.contract,method:[n,o,t],params:[]})}export{n as FN_SELECTOR,y as decodeGetInstalledModulesResult,b as getInstalledModules,u as isGetInstalledModulesSupported};
@@ -1 +1 @@
1
- import{g as a}from"./thirdweb-CFLXE91Z.js";import{f as o}from"./fetchTokenMetadata-D8_gB--r.js";import{parseNFT as i}from"./parseNft-DokM8OJG.js";import{totalSupply as m}from"./totalSupply-Bk0d_rAO.js";import{r as d}from"./signing-ViEkal5y.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-C4gUf5hB.js";import"./wait-for-tx-receipt-BauhQAMN.js";import"./transactionReceipt-BZCOl44B.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-B9u7ttU4.js";import"./eth_getStorageAt-DUCeSfJf.js";import"./eth_getTransactionCount-6n2IR_Sq.js";import"./decimals-Dup9E_dE.js";import"./decimals-C1olXU12.js";import"./zora-sepolia-9dBUmZVP.js";import"./send-batch-transaction-Bp5WDq9j.js";import"./uint8-array-CjVHUazS.js";import"./detectExtension-Uk-_peko.js";const u="0x0e89341c",I=[{name:"tokenId",type:"uint256"}],k=[{type:"string"}];async function f(t){return d({contract:t.contract,method:[u,I,k],params:[t.tokenId]})}async function $(t){const{useIndexer:r=!0}=t;if(r)try{return await p(t)}catch{return await c(t)}return await c(t)}async function p(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||c(t)}async function c(t){const[r,e]=await Promise.all([f({contract:t.contract,tokenId:t.tokenId}),m({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return i(await o({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(n=>n||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:e,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{$ as getNFT};
1
+ import{g as a}from"./thirdweb-h1G-rly1.js";import{f as o}from"./fetchTokenMetadata-DAoAv0LE.js";import{parseNFT as i}from"./parseNft-gP4B6iOB.js";import{totalSupply as m}from"./totalSupply-BbOO_R3o.js";import{r as d}from"./signing-DUKQER6N.js";import"./utils-CtSpY5KY.js";import"./ethers-BxoDGoYp.js";import"./react-E8ng6RF2.js";import"./index-fwX9_hYz.js";import"./wait-for-tx-receipt-CmkqIogk.js";import"./transactionReceipt-CpVXwo1b.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-Btb3MP3p.js";import"./eth_getStorageAt-CpNlcQTF.js";import"./eth_getTransactionCount-CRegXjS3.js";import"./decimals-CuBSJMXb.js";import"./decimals-CtEbpsEJ.js";import"./zora-sepolia-9dBUmZVP.js";import"./send-batch-transaction-Du7dMQIj.js";import"./uint8-array-CjVHUazS.js";import"./detectExtension-BIiGvA9o.js";const u="0x0e89341c",I=[{name:"tokenId",type:"uint256"}],k=[{type:"string"}];async function f(t){return d({contract:t.contract,method:[u,I,k],params:[t.tokenId]})}async function $(t){const{useIndexer:r=!0}=t;if(r)try{return await p(t)}catch{return await c(t)}return await c(t)}async function p(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||c(t)}async function c(t){const[r,e]=await Promise.all([f({contract:t.contract,tokenId:t.tokenId}),m({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return i(await o({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(n=>n||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:e,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{$ as getNFT};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ownerOf-C_ppAWti.js","assets/signing-ViEkal5y.js","assets/utils-CtSpY5KY.js","assets/ethers-BxoDGoYp.js","assets/react-E8ng6RF2.js","assets/index-C4gUf5hB.js","assets/index-C--hbOLp.css","assets/detectExtension-Uk-_peko.js"])))=>i.map(i=>d[i]);
2
- import{_ as d}from"./index-C4gUf5hB.js";import{f as m}from"./fetchTokenMetadata-D8_gB--r.js";import{parseNFT as i}from"./parseNft-DokM8OJG.js";import{r as o}from"./signing-ViEkal5y.js";import{g as u}from"./thirdweb-CFLXE91Z.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./uint8-array-CjVHUazS.js";import"./utils-CtSpY5KY.js";import"./wait-for-tx-receipt-BauhQAMN.js";import"./transactionReceipt-BZCOl44B.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-B9u7ttU4.js";import"./eth_getStorageAt-DUCeSfJf.js";import"./eth_getTransactionCount-6n2IR_Sq.js";import"./decimals-Dup9E_dE.js";import"./decimals-C1olXU12.js";import"./zora-sepolia-9dBUmZVP.js";import"./send-batch-transaction-Bp5WDq9j.js";const f="0xc87b56dd",y=[{name:"_tokenId",type:"uint256"}],I=[{type:"string"}];async function h(t){return o({contract:t.contract,method:[f,y,I],params:[t.tokenId]})}const k="0x4f6ccce7",l=[{name:"_index",type:"uint256"}],s=[{type:"uint256"}];async function _(t){return o({contract:t.contract,method:[k,l,s],params:[t.index]})}async function D(t){const{useIndexer:r=!0}=t;if(r)try{return await T(t)}catch{return await e(t)}return await e(t)}async function T(t){const r=await u({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,includeOwners:t.includeOwner,tokenId:t.tokenId});return r||e(t)}async function e(t){let r=t.tokenId;if(t.tokenByIndex)try{r=await _({contract:t.contract,index:t.tokenId})}catch{}const[n,a]=await Promise.all([h({contract:t.contract,tokenId:r}).catch(()=>null),t.includeOwner?d(()=>import("./ownerOf-C_ppAWti.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(c=>c.ownerOf({contract:t.contract,tokenId:r})).catch(()=>null):null]);return n!=null&&n.trim()?i(await m({client:t.contract.client,tokenId:r,tokenUri:n}).then(c=>c||{id:r,type:"ERC721",uri:n}).catch(()=>({id:r,type:"ERC721",uri:n})),{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:n,type:"ERC721"}):i({id:r,type:"ERC721",uri:""},{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:"",type:"ERC721"})}export{D as getNFT};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ownerOf-Z20onMkc.js","assets/signing-DUKQER6N.js","assets/utils-CtSpY5KY.js","assets/ethers-BxoDGoYp.js","assets/react-E8ng6RF2.js","assets/index-fwX9_hYz.js","assets/index-C--hbOLp.css","assets/detectExtension-BIiGvA9o.js"])))=>i.map(i=>d[i]);
2
+ import{_ as d}from"./index-fwX9_hYz.js";import{f as m}from"./fetchTokenMetadata-DAoAv0LE.js";import{parseNFT as i}from"./parseNft-gP4B6iOB.js";import{r as o}from"./signing-DUKQER6N.js";import{g as u}from"./thirdweb-h1G-rly1.js";import"./react-E8ng6RF2.js";import"./ethers-BxoDGoYp.js";import"./uint8-array-CjVHUazS.js";import"./utils-CtSpY5KY.js";import"./wait-for-tx-receipt-CmkqIogk.js";import"./transactionReceipt-CpVXwo1b.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-Btb3MP3p.js";import"./eth_getStorageAt-CpNlcQTF.js";import"./eth_getTransactionCount-CRegXjS3.js";import"./decimals-CuBSJMXb.js";import"./decimals-CtEbpsEJ.js";import"./zora-sepolia-9dBUmZVP.js";import"./send-batch-transaction-Du7dMQIj.js";const f="0xc87b56dd",y=[{name:"_tokenId",type:"uint256"}],I=[{type:"string"}];async function h(t){return o({contract:t.contract,method:[f,y,I],params:[t.tokenId]})}const k="0x4f6ccce7",l=[{name:"_index",type:"uint256"}],s=[{type:"uint256"}];async function _(t){return o({contract:t.contract,method:[k,l,s],params:[t.index]})}async function D(t){const{useIndexer:r=!0}=t;if(r)try{return await T(t)}catch{return await e(t)}return await e(t)}async function T(t){const r=await u({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,includeOwners:t.includeOwner,tokenId:t.tokenId});return r||e(t)}async function e(t){let r=t.tokenId;if(t.tokenByIndex)try{r=await _({contract:t.contract,index:t.tokenId})}catch{}const[n,a]=await Promise.all([h({contract:t.contract,tokenId:r}).catch(()=>null),t.includeOwner?d(()=>import("./ownerOf-Z20onMkc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(c=>c.ownerOf({contract:t.contract,tokenId:r})).catch(()=>null):null]);return n!=null&&n.trim()?i(await m({client:t.contract.client,tokenId:r,tokenUri:n}).then(c=>c||{id:r,type:"ERC721",uri:n}).catch(()=>({id:r,type:"ERC721",uri:n})),{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:n,type:"ERC721"}):i({id:r,type:"ERC721",uri:""},{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:"",type:"ERC721"})}export{D as getNFT};