@formo/analytics 1.26.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/cjs/src/FormoAnalytics.d.ts +71 -12
- package/dist/cjs/src/FormoAnalytics.js +274 -147
- package/dist/cjs/src/event/EventFactory.d.ts +10 -2
- package/dist/cjs/src/event/EventFactory.js +32 -21
- package/dist/cjs/src/fetch/index.d.ts +10 -2
- package/dist/cjs/src/fetch/index.js +122 -4
- package/dist/cjs/src/index.d.ts +4 -0
- package/dist/cjs/src/index.js +6 -0
- package/dist/cjs/src/privy/index.d.ts +9 -0
- package/dist/cjs/src/privy/index.js +12 -0
- package/dist/cjs/src/privy/types.d.ts +175 -0
- package/dist/cjs/src/privy/types.js +12 -0
- package/dist/cjs/src/privy/utils.d.ts +32 -0
- package/dist/cjs/src/privy/utils.js +188 -0
- package/dist/cjs/src/queue/EventQueue.d.ts +24 -2
- package/dist/cjs/src/queue/EventQueue.js +158 -49
- package/dist/cjs/src/session/index.js +2 -1
- package/dist/cjs/src/solana/SolanaAdapter.d.ts +211 -0
- package/dist/cjs/src/solana/SolanaAdapter.js +975 -0
- package/dist/cjs/src/solana/SolanaManager.d.ts +24 -0
- package/dist/cjs/src/solana/SolanaManager.js +80 -0
- package/dist/cjs/src/solana/address.d.ts +72 -0
- package/dist/cjs/src/solana/address.js +176 -0
- package/dist/cjs/src/solana/index.d.ts +13 -0
- package/dist/cjs/src/solana/index.js +32 -0
- package/dist/cjs/src/solana/types.d.ts +206 -0
- package/dist/cjs/src/solana/types.js +80 -0
- package/dist/cjs/src/types/base.d.ts +25 -0
- package/dist/cjs/src/types/events.d.ts +9 -6
- package/dist/cjs/src/utils/address.d.ts +21 -0
- package/dist/cjs/src/utils/address.js +48 -1
- package/dist/cjs/src/utils/builderCode.d.ts +30 -0
- package/dist/cjs/src/utils/builderCode.js +143 -0
- package/dist/cjs/src/utils/index.d.ts +1 -0
- package/dist/cjs/src/utils/index.js +1 -0
- package/dist/cjs/src/version.d.ts +1 -1
- package/dist/cjs/src/version.js +1 -1
- package/dist/cjs/src/wagmi/WagmiEventHandler.d.ts +24 -0
- package/dist/cjs/src/wagmi/WagmiEventHandler.js +242 -24
- package/dist/cjs/src/wagmi/types.d.ts +31 -0
- package/dist/cjs/src/wagmi/utils.d.ts +79 -0
- package/dist/cjs/src/wagmi/utils.js +218 -0
- package/dist/esm/src/FormoAnalytics.d.ts +71 -12
- package/dist/esm/src/FormoAnalytics.js +275 -148
- package/dist/esm/src/event/EventFactory.d.ts +10 -2
- package/dist/esm/src/event/EventFactory.js +34 -23
- package/dist/esm/src/fetch/index.d.ts +10 -2
- package/dist/esm/src/fetch/index.js +123 -2
- package/dist/esm/src/index.d.ts +4 -0
- package/dist/esm/src/index.js +3 -0
- package/dist/esm/src/privy/index.d.ts +9 -0
- package/dist/esm/src/privy/index.js +8 -0
- package/dist/esm/src/privy/types.d.ts +175 -0
- package/dist/esm/src/privy/types.js +11 -0
- package/dist/esm/src/privy/utils.d.ts +32 -0
- package/dist/esm/src/privy/utils.js +185 -0
- package/dist/esm/src/queue/EventQueue.d.ts +24 -2
- package/dist/esm/src/queue/EventQueue.js +158 -49
- package/dist/esm/src/session/index.js +2 -1
- package/dist/esm/src/solana/SolanaAdapter.d.ts +211 -0
- package/dist/esm/src/solana/SolanaAdapter.js +972 -0
- package/dist/esm/src/solana/SolanaManager.d.ts +24 -0
- package/dist/esm/src/solana/SolanaManager.js +77 -0
- package/dist/esm/src/solana/address.d.ts +72 -0
- package/dist/esm/src/solana/address.js +167 -0
- package/dist/esm/src/solana/index.d.ts +13 -0
- package/dist/esm/src/solana/index.js +13 -0
- package/dist/esm/src/solana/types.d.ts +206 -0
- package/dist/esm/src/solana/types.js +74 -0
- package/dist/esm/src/types/base.d.ts +25 -0
- package/dist/esm/src/types/events.d.ts +9 -6
- package/dist/esm/src/utils/address.d.ts +21 -0
- package/dist/esm/src/utils/address.js +45 -0
- package/dist/esm/src/utils/builderCode.d.ts +30 -0
- package/dist/esm/src/utils/builderCode.js +140 -0
- package/dist/esm/src/utils/index.d.ts +1 -0
- package/dist/esm/src/utils/index.js +1 -0
- package/dist/esm/src/version.d.ts +1 -1
- package/dist/esm/src/version.js +1 -1
- package/dist/esm/src/wagmi/WagmiEventHandler.d.ts +24 -0
- package/dist/esm/src/wagmi/WagmiEventHandler.js +242 -24
- package/dist/esm/src/wagmi/types.d.ts +31 -0
- package/dist/esm/src/wagmi/utils.d.ts +79 -0
- package/dist/esm/src/wagmi/utils.js +211 -0
- package/dist/index.umd.min.js +1 -1
- package/package.json +20 -4
package/dist/index.umd.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.umd.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("FormoAnalytics",[],t):"object"==typeof exports?exports.FormoAnalytics=t():e.FormoAnalytics=t()}(self,()=>(()=>{var e={11:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=o,t.abytes=a,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");o(e.outputLen),o(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){a(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=s,t.byteSwap32=c,t.bytesToHex=function(e){if(a(e),u)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=d[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(u)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=h,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=p,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=h(e)),a(e),e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];a(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=g,t.createOptHasher=v,t.createXOFer=y,t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const n=r(9517);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function a(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=s(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>s(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;const u=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),d=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=l._0&&e<=l._9?e-l._0:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function h(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function p(e){return"string"==typeof e&&(e=h(e)),a(e),e}function g(e){const t=t=>e().update(p(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function v(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function y(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=g,t.wrapConstructorWithOpts=v,t.wrapXOFConstructorWithOpts=y},283:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCKED_ADDRESSES=t.DEAD_ADDRESS=t.ZERO_ADDRESS=t.DEFAULT_PROVIDER_ICON=t.CONSENT_OPT_OUT_KEY=t.LOCAL_ANONYMOUS_ID_KEY=t.SESSION_USER_ID_KEY=t.SESSION_CURRENT_URL_KEY=t.SESSION_TRAFFIC_SOURCE_KEY=void 0,t.SESSION_TRAFFIC_SOURCE_KEY="traffic-source",t.SESSION_CURRENT_URL_KEY="analytics-current-url",t.SESSION_USER_ID_KEY="user-id",t.LOCAL_ANONYMOUS_ID_KEY="anonymous-id",t.CONSENT_OPT_OUT_KEY="opt-out-tracking",t.DEFAULT_PROVIDER_ICON="data:image/svg+xml;base64,",t.ZERO_ADDRESS="0x0000000000000000000000000000000000000000",t.DEAD_ADDRESS="0x000000000000000000000000000000000000dEaD",t.BLOCKED_ADDRESSES=[t.ZERO_ADDRESS,t.DEAD_ADDRESS]},324:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_PROPERTIES_EXCLUDED_FIELDS=t.VERSION=t.CHANNEL=void 0,t.CHANNEL="web",t.VERSION="0";var r=new Set(["utm_source","utm_medium","utm_campaign","utm_term","utm_content","ref","referral","refcode","referrer","category","name","url","path","hash","query"]);t.PAGE_PROPERTIES_EXCLUDED_FIELDS=r},384:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectBrowser=function(){var e=this;return o?Promise.resolve(o):i||(i=r(e,void 0,void 0,function(){var e,t;return n(this,function(r){switch(r.label){case 0:return e=function(){try{return void 0!==globalThis.navigator?globalThis.navigator.userAgent:""}catch(e){return""}}(),[4,a().catch(function(){return!1})];case 1:return t=r.sent(),o=t?"brave":function(e){return/Firefox\/\d+/i.test(e)?"firefox":/Edg\/\d+/i.test(e)?"edge":/OPR\/\d+/i.test(e)?"opera":/Safari\/\d+/i.test(e)&&!/Chrome\/\d+/i.test(e)?"safari":/Chrome\/\d+/i.test(e)?"chrome":"unknown"}(e),[2,o]}})}).finally(function(){i=null}))};var i=null,o=null;function a(){return r(this,void 0,void 0,function(){var e,t,r,i;return n(this,function(n){switch(n.label){case 0:if(!(e=void 0!==globalThis.navigator?globalThis.navigator:void 0))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(r=e.brave)||void 0===r?void 0:r.isBrave)?[4,e.brave.isBrave().catch(function(){return!1})]:[3,3];case 2:if(n.sent())return[2,!0];n.label=3;case 3:return[3,5];case 4:return n.sent(),[3,5];case 5:try{if(null==(t=null===(i=e.userAgentData)||void 0===i?void 0:i.brands)?void 0:t.some(function(e){return/Brave/i.test(e.brand)}))return[2,!0]}catch(e){}try{if(/Brave/i.test(e.userAgent))return[2,!0]}catch(e){}return[2,!1]}})})}},508:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(283),t),i(r(9956),t),i(r(1331),t)},645:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.WagmiEventHandler=void 0;var a=r(5307),s=r(3171),c=function(){function e(e,t,r){this.unsubscribers=[],this.trackingState={isProcessing:!1},this.processedMutations=new Set,this.formo=e,this.wagmiConfig=t,this.queryClient=r,s.logger.info("WagmiEventHandler: Initializing Wagmi integration"),this.setupConnectionListeners(),this.queryClient?this.setupMutationTracking():s.logger.warn("WagmiEventHandler: QueryClient not provided, signature and transaction events will not be tracked")}return e.prototype.setupConnectionListeners=function(){var e=this;s.logger.info("WagmiEventHandler: Setting up connection listeners");var t=this.wagmiConfig.subscribe(function(e){return e.status},function(t,r){e.handleStatusChange(t,r)});this.unsubscribers.push(t);var r=this.wagmiConfig.subscribe(function(e){return e.chainId},function(t,r){e.handleChainChange(t,r)});this.unsubscribers.push(r),s.logger.info("WagmiEventHandler: Connection listeners set up successfully")},e.prototype.handleStatusChange=function(e,t){return i(this,void 0,void 0,function(){var r,i,a,c,u;return o(this,function(o){switch(o.label){case 0:if(this.trackingState.isProcessing)return s.logger.debug("WagmiEventHandler: Already processing status change, skipping"),[2];this.trackingState.isProcessing=!0,o.label=1;case 1:return o.trys.push([1,7,8,9]),r=this.getState(),i=this.getConnectedAddress(r),a=r.chainId,s.logger.info("WagmiEventHandler: Status changed",{status:e,prevStatus:t,address:i,chainId:a}),"disconnected"!==e||"connected"!==t?[3,4]:this.formo.isAutocaptureEnabled("disconnect")?[4,this.formo.disconnect({chainId:this.trackingState.lastChainId,address:this.trackingState.lastAddress})]:[3,3];case 2:o.sent(),o.label=3;case 3:this.trackingState.lastAddress=void 0,this.trackingState.lastChainId=void 0,o.label=4;case 4:return"connected"!==e||"connected"===t?[3,6]:i&&void 0!==a?(this.trackingState.lastAddress=i,this.trackingState.lastChainId=a,this.formo.isAutocaptureEnabled("connect")?(c=this.getConnectorName(r),[4,this.formo.connect({chainId:a,address:i},n({},c&&{providerName:c}))]):[3,6]):[3,6];case 5:o.sent(),o.label=6;case 6:return this.trackingState.lastStatus=e,[3,9];case 7:return u=o.sent(),s.logger.error("WagmiEventHandler: Error handling status change:",u),[3,9];case 8:return this.trackingState.isProcessing=!1,[7];case 9:return[2]}})})},e.prototype.handleChainChange=function(e,t){return i(this,void 0,void 0,function(){var r,n,i;return o(this,function(o){switch(o.label){case 0:if(e===t||void 0===e)return[2];if("connected"!==(r=this.getState()).status)return[2];if(!(n=this.getConnectedAddress(r)))return s.logger.warn("WagmiEventHandler: Chain changed but no address found"),[2];if(s.logger.info("WagmiEventHandler: Chain changed",{chainId:e,prevChainId:t,address:n}),this.trackingState.lastChainId=e,!this.formo.isAutocaptureEnabled("chain"))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.formo.chain({chainId:e,address:n})];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),s.logger.error("WagmiEventHandler: Error tracking chain change:",i),[3,4];case 4:return[2]}})})},e.prototype.setupMutationTracking=function(){var e=this;if(this.queryClient){s.logger.info("WagmiEventHandler: Setting up mutation tracking");var t=this.queryClient.getMutationCache().subscribe(function(t){e.handleMutationEvent(t)});this.unsubscribers.push(t),s.logger.info("WagmiEventHandler: Mutation tracking set up successfully")}},e.prototype.handleMutationEvent=function(e){if("updated"===e.type){var t=e.mutation,r=t.options.mutationKey;if(r&&0!==r.length){var n=r[0],i=t.state,o="".concat(t.mutationId,":").concat(i.status);if(this.processedMutations.has(o))s.logger.debug("WagmiEventHandler: Skipping duplicate mutation event",{mutationType:n,mutationId:t.mutationId,status:i.status});else if(this.processedMutations.add(o),s.logger.debug("WagmiEventHandler: Mutation event",{mutationType:n,mutationId:t.mutationId,status:i.status}),"signMessage"!==n&&"signTypedData"!==n||this.handleSignatureMutation(n,t),"sendTransaction"!==n&&"writeContract"!==n||this.handleTransactionMutation(n,t),this.processedMutations.size>1e3)for(var a=Array.from(this.processedMutations),c=0;c<500;c++)this.processedMutations.delete(a[c])}}},e.prototype.handleSignatureMutation=function(e,t){if(this.formo.isAutocaptureEnabled("signature")){var r=t.state,i=r.variables||{},o=this.trackingState.lastChainId,c=this.trackingState.lastAddress;if(c)try{var u,d=void 0;if("pending"===r.status)u=a.SignatureStatus.REQUESTED;else if("success"===r.status)u=a.SignatureStatus.CONFIRMED,d=r.data;else{if("error"!==r.status)return;u=a.SignatureStatus.REJECTED}var l;l="signMessage"===e?i.message||"":JSON.stringify(i.message||i.types||{}),s.logger.info("WagmiEventHandler: Tracking signature event",{status:u,mutationType:e,address:c,chainId:o}),this.formo.signature(n({status:u,chainId:o,address:c,message:l},d&&{signatureHash:d}))}catch(e){s.logger.error("WagmiEventHandler: Error handling signature mutation:",e)}else s.logger.warn("WagmiEventHandler: Signature event but no address available")}},e.prototype.handleTransactionMutation=function(e,t){var r;if(this.formo.isAutocaptureEnabled("transaction")){var i=t.state,o=i.variables||{},c=this.trackingState.lastChainId||o.chainId,u=this.trackingState.lastAddress||o.account||o.address;if(u)try{var d,l=void 0;if("pending"===i.status)d=a.TransactionStatus.STARTED;else if("success"===i.status)d=a.TransactionStatus.BROADCASTED,l=i.data;else{if("error"!==i.status)return;d=a.TransactionStatus.REJECTED}var f=o.data,h=o.to||o.address,p=null===(r=o.value)||void 0===r?void 0:r.toString();s.logger.info("WagmiEventHandler: Tracking transaction event",{status:d,mutationType:e,address:u,chainId:c,transactionHash:l}),this.formo.transaction(n(n(n(n({status:d,chainId:c||0,address:u},f&&{data:f}),h&&{to:h}),p&&{value:p}),l&&{transactionHash:l}))}catch(e){s.logger.error("WagmiEventHandler: Error handling transaction mutation:",e)}else s.logger.warn("WagmiEventHandler: Transaction event but no address available")}},e.prototype.getState=function(){return"function"==typeof this.wagmiConfig.getState?this.wagmiConfig.getState():this.wagmiConfig.state?this.wagmiConfig.state:(s.logger.warn("WagmiEventHandler: Unable to get state from config, returning default state"),{status:"disconnected",connections:new Map,current:void 0,chainId:void 0})},e.prototype.getConnectedAddress=function(e){if(e.current){var t=e.connections.get(e.current);if(t&&0!==t.accounts.length)return t.accounts[0]}},e.prototype.getConnectorName=function(e){if(e.current){var t=e.connections.get(e.current);return null==t?void 0:t.connector.name}},e.prototype.cleanup=function(){s.logger.info("WagmiEventHandler: Cleaning up subscriptions");for(var e=0,t=this.unsubscribers;e<t.length;e++){var r=t[e];try{r()}catch(e){s.logger.error("WagmiEventHandler: Error during cleanup:",e)}}this.unsubscribers=[],this.processedMutations.clear(),s.logger.info("WagmiEventHandler: Cleanup complete")},e}();t.WagmiEventHandler=c},648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formofy=function(e,t){e&&"undefined"!=typeof window?n.FormoAnalytics.init(e,t).then(function(e){if(window.formo=e,null==t?void 0:t.ready)try{t.ready(e)}catch(e){console.error("Error in FormoAnalytics ready callback:",e)}}).catch(function(e){return console.error("Error initializing FormoAnalytics:",e)}):console.warn("FormoAnalytics not found")};var n=r(9001)},681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aoutput=t.anumber=t.aexists=t.abytes=void 0;const n=r(11);t.abytes=n.abytes,t.aexists=n.aexists,t.anumber=n.anumber,t.aoutput=n.aoutput},758:(e,t,r)=>{"use strict";e.exports=r(2713)},845:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function t(r){return 0===arguments.length||(0,i.default)(r)?t:e.apply(this,arguments)}};var i=n(r(8962))},971:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return(0,a.default)(r)?t:(0,o.default)(function(t,n){return e(r,t,n)});case 2:return(0,a.default)(r)&&(0,a.default)(n)?t:(0,a.default)(r)?(0,o.default)(function(t,r){return e(t,n,r)}):(0,a.default)(n)?(0,o.default)(function(t,n){return e(r,t,n)}):(0,i.default)(function(t){return e(r,n,t)});default:return(0,a.default)(r)&&(0,a.default)(n)&&(0,a.default)(s)?t:(0,a.default)(r)&&(0,a.default)(n)?(0,o.default)(function(t,r){return e(t,r,s)}):(0,a.default)(r)&&(0,a.default)(s)?(0,o.default)(function(t,r){return e(t,n,r)}):(0,a.default)(n)&&(0,a.default)(s)?(0,o.default)(function(t,n){return e(r,t,n)}):(0,a.default)(r)?(0,i.default)(function(t){return e(t,n,s)}):(0,a.default)(n)?(0,i.default)(function(t){return e(r,t,s)}):(0,a.default)(s)?(0,i.default)(function(t){return e(r,n,t)}):e(r,n,s)}}};var i=n(r(845)),o=n(r(1500)),a=n(r(8962))},1290:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5063),t),i(r(5980),t)},1331:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventChannel=t.EventType=void 0,function(e){e.PAGE="page",e.IDENTIFY="identify",e.DETECT="detect",e.CONNECT="connect",e.DISCONNECT="disconnect",e.CHAIN="chain",e.SIGNATURE="signature",e.TRANSACTION="transaction",e.TRACK="track"}(r||(t.EventType=r={})),function(e){e.WEB="web",e.MOBILE="mobile",e.SERVER="server",e.SOURCE="source"}(n||(t.EventChannel=n={}))},1500:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return(0,o.default)(r)?t:(0,i.default)(function(t){return e(r,t)});default:return(0,o.default)(r)&&(0,o.default)(n)?t:(0,o.default)(r)?(0,i.default)(function(t){return e(t,n)}):(0,o.default)(n)?(0,i.default)(function(t){return e(r,t)}):e(r,n)}}};var i=n(r(845)),o=n(r(8962))},1550:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_PREFIX=t.JSON_PREFIX=void 0,t.JSON_PREFIX="__json=",t.KEY_PREFIX="formo"},1586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secureHash=function(e){var t=(0,i.utf8ToBytes)(e),r=(0,n.sha256)(t);return(0,i.bytesToHex)(r).slice(0,8)};var n=r(6997),i=r(7393)},1922:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1955:function(e,t){"use strict";var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.Logger=void 0;var n=function(){function e(e,t){void 0===e&&(e=!1),void 0===t&&(t=[]),this.enabled=e,this.enabledLevels=new Set(t)}return e.init=function(t){var r=e.getInstance();void 0!==t.enabled&&r.setEnabled(t.enabled),void 0!==t.enabledLevels&&r.setEnabledLevels(t.enabledLevels)},e.getInstance=function(t){var r,n;return e.instance||(e.instance=new e(null!==(r=null==t?void 0:t.enabled)&&void 0!==r&&r,null!==(n=null==t?void 0:t.enabledLevels)&&void 0!==n?n:[])),e.instance},e.prototype.setEnabled=function(e){this.enabled=e},e.prototype.isLoggingEnabled=function(){return this.enabled},e.prototype.setEnabledLevels=function(e){this.enabledLevels=new Set(e)},e.prototype.getEnabledLevels=function(){return Array.from(this.enabledLevels)},e.prototype.shouldLog=function(e){return!!this.enabled&&this.enabledLevels.has(e)},e.prototype.formatMessage=function(e){var t=(new Date).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return"[Formo SDK][".concat(t,"] ").concat(e)},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("debug")&&console.debug.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("info")&&console.info.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("warn")&&console.warn.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("error")&&console.error.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("trace")&&console.trace.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.log=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.info.apply(this,r([e],t,!1))},e}();t.Logger=n,t.logger=n.getInstance()},2246:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.26.0"},2632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkAddressChecksum=t.isAddress=void 0,t.ensureIfUint8Array=s;var n=r(6731),i=r(5628),o=r(7393),a=r(5983);function s(e){var t;return e instanceof Uint8Array||"Uint8Array"!==(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)?e:Uint8Array.from(e)}t.isAddress=function(e,r){return void 0===r&&(r=!0),!("string"!=typeof e&&!(0,n.isUint8Array)(e))&&(i=(0,n.isUint8Array)(e)?(0,n.uint8ArrayToHexString)(e):"string"!=typeof e||(0,a.isHexStrict)(e)||e.toLowerCase().startsWith("0x")?e:"0x".concat(e),!!/^(0x)?[0-9a-f]{40}$/i.test(i)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(i)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(i))||!r||(0,t.checkAddressChecksum)(i)));var i},t.checkAddressChecksum=function(e){if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;for(var t=e.slice(2),r=(0,o.utf8ToBytes)(t.toLowerCase()),a=(0,n.uint8ArrayToHexString)((0,i.keccak256)(s(r))).slice(2),c=0;c<40;c+=1)if(parseInt(a[c],16)>7&&t[c].toUpperCase()!==t[c]||parseInt(a[c],16)<=7&&t[c].toLowerCase()!==t[c])return!1;return!0}},2713:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||p}function A(){}function m(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},A.prototype=y.prototype;var b=m.prototype=new A;b.constructor=m,g(b,y.prototype),b.isPureReactComponent=!0;var _=Array.isArray,E=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,i)&&!w.hasOwnProperty(i)&&(o[i]=t[i]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),d=0;d<c;d++)u[d]=arguments[d+2];o.children=u}if(e&&e.defaultProps)for(i in c=e.defaultProps)void 0===o[i]&&(o[i]=c[i]);return{$$typeof:r,type:e,key:a,ref:s,props:o,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var P=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function O(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return a=a(c=e),e=""===o?"."+T(c,0):o,_(a)?(i="",null!=e&&(i=e.replace(P,"$&/")+"/"),O(a,t,i,"",function(e){return e})):null!=a&&(C(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),t.push(a)),1;if(c=0,o=""===o?".":o+":",_(e))for(var u=0;u<e.length;u++){var d=o+T(s=e[u],u);c+=O(s,t,i,d,a)}else if(d=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof d)for(e=d.call(e),u=0;!(s=e.next()).done;)c+=O(s=s.value,t,i,d=o+T(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function k(e,t,r){if(null==e)return e;var n=[],i=0;return O(e,n,"","",function(e){return t.call(r,e,i++)}),n}function M(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var x={current:null},D={transition:null},U={ReactCurrentDispatcher:x,ReactCurrentBatchConfig:D,ReactCurrentOwner:S};function R(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=a,t.PureComponent=m,t.StrictMode=o,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.act=R,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=S.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)E.call(t,u)&&!w.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:r,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:M}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=R,t.useCallback=function(e,t){return x.current.useCallback(e,t)},t.useContext=function(e){return x.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return x.current.useDeferredValue(e)},t.useEffect=function(e,t){return x.current.useEffect(e,t)},t.useId=function(){return x.current.useId()},t.useImperativeHandle=function(e,t,r){return x.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return x.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return x.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return x.current.useMemo(e,t)},t.useReducer=function(e,t,r){return x.current.useReducer(e,t,r)},t.useRef=function(e){return x.current.useRef(e)},t.useState=function(e){return x.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return x.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return x.current.useTransition()},t.version="18.3.1"},2817:function(e){e.exports=function(){"use strict";function e(e){return Number.isInteger(e)&&e>=0}function t(e){this.name="ArgumentError",this.message=e}return function(r,n){if(n=n||{},"function"!=typeof r)throw new t("fetch must be a function");if("object"!=typeof n)throw new t("defaults must be an object");if(void 0!==n.retries&&!e(n.retries))throw new t("retries must be a positive integer");if(void 0!==n.retryDelay&&!e(n.retryDelay)&&"function"!=typeof n.retryDelay)throw new t("retryDelay must be a positive integer or a function returning a positive integer");if(void 0!==n.retryOn&&!Array.isArray(n.retryOn)&&"function"!=typeof n.retryOn)throw new t("retryOn property expects an array or function");return n=Object.assign({retries:3,retryDelay:1e3,retryOn:[]},n),function(i,o){var a=n.retries,s=n.retryDelay,c=n.retryOn;if(o&&void 0!==o.retries){if(!e(o.retries))throw new t("retries must be a positive integer");a=o.retries}if(o&&void 0!==o.retryDelay){if(!e(o.retryDelay)&&"function"!=typeof o.retryDelay)throw new t("retryDelay must be a positive integer or a function returning a positive integer");s=o.retryDelay}if(o&&o.retryOn){if(!Array.isArray(o.retryOn)&&"function"!=typeof o.retryOn)throw new t("retryOn property expects an array or function");c=o.retryOn}return new Promise(function(e,t){var n=function(n){var s="undefined"!=typeof Request&&i instanceof Request?i.clone():i;r(s,o).then(function(r){if(Array.isArray(c)&&-1===c.indexOf(r.status))e(r);else if("function"==typeof c)try{return Promise.resolve(c(n,null,r)).then(function(t){t?u(n,null,r):e(r)}).catch(t)}catch(e){t(e)}else n<a?u(n,null,r):e(r)}).catch(function(e){if("function"==typeof c)try{Promise.resolve(c(n,e,null)).then(function(r){r?u(n,e,null):t(e)}).catch(function(e){t(e)})}catch(e){t(e)}else n<a?u(n,e,null):t(e)})};function u(e,t,r){var i="function"==typeof s?s(e,t,r):s;setTimeout(function(){n(++e)},i)}n(0)})}}}()},2856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clampNumber=t.toDateHourMinute=t.millisecondsToSecond=void 0,t.toSnakeCase=function(e,t){void 0===t&&(t=[]);var n=function(e){return Array.isArray(e)?e.map(n):null!==e&&"object"==typeof e?Object.keys(e).reduce(function(i,o){return i[t.includes(o)?o:r(o)]=t.includes(o)?e[o]:n(e[o]),i},{}):e};return n(e)};var r=function(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()};t.millisecondsToSecond=function(e){return Math.ceil(e/1e3)},t.toDateHourMinute=function(e){return e.getUTCFullYear()+"-"+("0"+(e.getUTCMonth()+1)).slice(-2)+"-"+("0"+e.getUTCDate()).slice(-2)+" "+("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)},t.clampNumber=function(e,t,r){return Math.min(Math.max(e,r),t)}},3171:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(1955),t),i(r(3791),t)},3281:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLocalhost=void 0,t.isLocalhost=function(){return/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*:)*?:?0*1$/.test(window.location.hostname)||"file:"===window.location.protocol}},3542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1550),i=r(1586),o=function(){function e(e){this.writeKey=e}return e.prototype.getKey=function(e){return"".concat(n.KEY_PREFIX,"_").concat((0,i.secureHash)(this.writeKey),"_").concat(e)},e}();t.default=o},3696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toChecksumAddress=t.isBlockedAddress=t.getValidAddress=t.isValidAddress=void 0;var n=r(5628),i=r(7393),o=r(8768),a=r(4473),s=r(508),c=function(e){return"string"==typeof e&&""!==e.trim()&&(0,o.isAddress)(e.trim())?e.trim():null};t.isValidAddress=function(e){return null!==c(e)},t.getValidAddress=function(e){return c(e)},t.isBlockedAddress=function(e){if(!e)return!1;var r=(0,t.getValidAddress)(e);if(!r)return!1;var n=(0,t.toChecksumAddress)(r);return s.BLOCKED_ADDRESSES.some(function(e){return(0,t.toChecksumAddress)(e)===n})},t.toChecksumAddress=function(e){if(!(0,o.isAddress)(e,!1))throw new Error("Invalid address "+e);var t=e.toLowerCase().replace(/^0x/i,""),r=(0,o.uint8ArrayToHexString)((0,n.keccak256)((0,o.ensureIfUint8Array)((0,i.utf8ToBytes)(t))));if((0,a.isNullish)(r)||"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===r)return"";for(var s="0x",c=r.replace(/^0x/i,""),u=0;u<t.length;u+=1)parseInt(c[u],16)>7?s+=t[u].toUpperCase():s+=t[u];return s}},3791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3842:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=m,t.fromBig=i,t.split=o;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){const r=e.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let a=0;a<r;a++){const{h:r,l:s}=i(e[a],t);[n[a],o[a]]=[r,s]}return[n,o]}const a=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=a;const s=(e,t,r)=>e>>>r;t.shrSH=s;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const d=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=d;const l=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=l;const f=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=f;const h=(e,t)=>t;t.rotr32H=h;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const v=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=v;const y=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=y;const A=(e,t,r)=>e<<r-32|t>>>64-r;function m(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=A;const b=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=b;const _=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=_;const E=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=E;const S=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=S;const w=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=w;const I=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=I;const C={fromBig:i,split:o,toBig:a,shrSH:s,shrSL:c,rotrSH:u,rotrSL:d,rotrBH:l,rotrBL:f,rotr32H:h,rotr32L:p,rotlSH:g,rotlSL:v,rotlBH:y,rotlBL:A,add:m,add3L:b,add3H:_,add4L:E,add4H:S,add5H:I,add5L:w};t.default=C},3931:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectToString=t.isPrimitive=t.isError=t.isDate=t.isRegExp=t.isObjectAndNotNull=t.isObject=t.isNumber=t.isBoolean=t.isArray=t.isBigInt=t.isDefinedNotNullAndNotEmptyString=t.isDefinedAndNotNull=t.isDefined=t.isTypeOfError=t.isNullOrUndefined=t.isUndefined=t.isNull=t.isString=t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e&&Boolean(e.constructor&&e.call&&e.apply)},t.isString=function(e){return"string"==typeof e};var r=function(e){return null===e};t.isNull=r;var n=function(e){return void 0===e};t.isUndefined=n;var i=function(e){return r(e)||n(e)};t.isNullOrUndefined=i,t.isBigInt=function(e){return"bigint"==typeof e},t.isDefined=function(e){return!n(e)};var o=function(e){return!i(e)};t.isDefinedAndNotNull=o,t.isDefinedNotNullAndNotEmptyString=function(e){return o(e)&&""!==e},t.isTypeOfError=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}};var a=function(e){return Array.isArray(e)};t.isArray=a,t.isBoolean=function(e){return"boolean"==typeof e},t.isNumber=function(e){return"number"==typeof e};var s=function(e){return"object"==typeof e};t.isObject=s,t.isObjectAndNotNull=function(e){return!r(e)&&s(e)&&!a(e)},t.isRegExp=function(e){return s(e)&&"[object RegExp]"===c(e)},t.isDate=function(e){return s(e)&&"[object Date]"===c(e)},t.isError=function(e){return s(e)&&("[object Error]"===c(e)||e instanceof Error)},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e};var c=function(e){return Object.prototype.toString.call(e)};t.objectToString=c},4072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const n=r(7734),i=r(3842),o=r(11),a=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array(64);class c extends n.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=s[e-15],r=s[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;s[e]=i+s[e-7]+n+s[e-16]|0}let{A:r,B:i,C:c,D:u,E:d,F:l,G:f,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,o.rotr)(d,6)^(0,o.rotr)(d,11)^(0,o.rotr)(d,25))+(0,n.Chi)(d,l,f)+a[e]+s[e]|0,p=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+(0,n.Maj)(r,i,c)|0;h=f,f=l,l=d,d=u+t|0,u=c,c=i,i=r,r=t+p|0}r=r+this.A|0,i=i+this.B|0,c=c+this.C|0,u=u+this.D|0,d=d+this.E|0,l=l+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(r,i,c,u,d,l,f,h)}roundClean(){(0,o.clean)(s)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA256=c;class u extends c{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}t.SHA224=u;const d=(()=>i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),l=(()=>d[0])(),f=(()=>d[1])(),h=new Uint32Array(80),p=new Uint32Array(80);class g extends n.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:c,El:u,Fh:d,Fl:l,Gh:f,Gl:h,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,a,s,c,u,d,l,f,h,p,g]}set(e,t,r,n,i,o,a,s,c,u,d,l,f,h,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|h,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)h[r]=e.getUint32(t),p[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|h[e-15],r=0|p[e-15],n=i.rotrSH(t,r,1)^i.rotrSH(t,r,8)^i.shrSH(t,r,7),o=i.rotrSL(t,r,1)^i.rotrSL(t,r,8)^i.shrSL(t,r,7),a=0|h[e-2],s=0|p[e-2],c=i.rotrSH(a,s,19)^i.rotrBH(a,s,61)^i.shrSH(a,s,6),u=i.rotrSL(a,s,19)^i.rotrBL(a,s,61)^i.shrSL(a,s,6),d=i.add4L(o,u,p[e-7],p[e-16]),l=i.add4H(d,n,c,h[e-7],h[e-16]);h[e]=0|l,p[e]=0|d}let{Ah:r,Al:n,Bh:o,Bl:a,Ch:s,Cl:c,Dh:u,Dl:d,Eh:g,El:v,Fh:y,Fl:A,Gh:m,Gl:b,Hh:_,Hl:E}=this;for(let e=0;e<80;e++){const t=i.rotrSH(g,v,14)^i.rotrSH(g,v,18)^i.rotrBH(g,v,41),S=i.rotrSL(g,v,14)^i.rotrSL(g,v,18)^i.rotrBL(g,v,41),w=g&y^~g&m,I=v&A^~v&b,C=i.add5L(E,S,I,f[e],p[e]),P=i.add5H(C,_,t,w,l[e],h[e]),T=0|C,O=i.rotrSH(r,n,28)^i.rotrBH(r,n,34)^i.rotrBH(r,n,39),k=i.rotrSL(r,n,28)^i.rotrBL(r,n,34)^i.rotrBL(r,n,39),M=r&o^r&s^o&s,x=n&a^n&c^a&c;_=0|m,E=0|b,m=0|y,b=0|A,y=0|g,A=0|v,({h:g,l:v}=i.add(0|u,0|d,0|P,0|T)),u=0|s,d=0|c,s=0|o,c=0|a,o=0|r,a=0|n;const D=i.add3L(T,k,x);r=i.add3H(D,P,O,M),n=0|D}({h:r,l:n}=i.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:a}=i.add(0|this.Bh,0|this.Bl,0|o,0|a)),({h:s,l:c}=i.add(0|this.Ch,0|this.Cl,0|s,0|c)),({h:u,l:d}=i.add(0|this.Dh,0|this.Dl,0|u,0|d)),({h:g,l:v}=i.add(0|this.Eh,0|this.El,0|g,0|v)),({h:y,l:A}=i.add(0|this.Fh,0|this.Fl,0|y,0|A)),({h:m,l:b}=i.add(0|this.Gh,0|this.Gl,0|m,0|b)),({h:_,l:E}=i.add(0|this.Hh,0|this.Hl,0|_,0|E)),this.set(r,n,o,a,s,c,u,d,g,v,y,A,m,b,_,E)}roundClean(){(0,o.clean)(h,p)}destroy(){(0,o.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=g;class v extends g{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}t.SHA384=v;const y=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),A=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class m extends g{constructor(){super(28),this.Ah=0|y[0],this.Al=0|y[1],this.Bh=0|y[2],this.Bl=0|y[3],this.Ch=0|y[4],this.Cl=0|y[5],this.Dh=0|y[6],this.Dl=0|y[7],this.Eh=0|y[8],this.El=0|y[9],this.Fh=0|y[10],this.Fl=0|y[11],this.Gh=0|y[12],this.Gl=0|y[13],this.Hh=0|y[14],this.Hl=0|y[15]}}t.SHA512_224=m;class b extends g{constructor(){super(32),this.Ah=0|A[0],this.Al=0|A[1],this.Bh=0|A[2],this.Bl=0|A[3],this.Ch=0|A[4],this.Cl=0|A[5],this.Dh=0|A[6],this.Dl=0|A[7],this.Eh=0|A[8],this.El=0|A[9],this.Fh=0|A[10],this.Fl=0|A[11],this.Gh=0|A[12],this.Gl=0|A[13],this.Hh=0|A[14],this.Hl=0|A[15]}}t.SHA512_256=b,t.sha256=(0,o.createHasher)(()=>new c),t.sha224=(0,o.createHasher)(()=>new u),t.sha512=(0,o.createHasher)(()=>new g),t.sha384=(0,o.createHasher)(()=>new v),t.sha512_256=(0,o.createHasher)(()=>new b),t.sha512_224=(0,o.createHasher)(()=>new m)},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WagmiEventHandler=void 0;var n=r(645);Object.defineProperty(t,"WagmiEventHandler",{enumerable:!0,get:function(){return n.WagmiEventHandler}})},4141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormoAnalyticsSession=t.SESSION_WALLET_IDENTIFIED_KEY=t.SESSION_WALLET_DETECTED_KEY=void 0;var n=r(4416),i=r(3171);t.SESSION_WALLET_DETECTED_KEY="wallet-detected",t.SESSION_WALLET_IDENTIFIED_KEY="wallet-identified";var o=function(){function e(){}return e.prototype.generateIdentificationKey=function(e,t){return t?"".concat(e,":").concat(t):e},e.prototype.isWalletDetected=function(e){var r;return((null===(r=(0,n.cookie)().get(t.SESSION_WALLET_DETECTED_KEY))||void 0===r?void 0:r.split(","))||[]).includes(e)},e.prototype.markWalletDetected=function(e){var r,i=(null===(r=(0,n.cookie)().get(t.SESSION_WALLET_DETECTED_KEY))||void 0===r?void 0:r.split(","))||[];i.includes(e)||(i.push(e),(0,n.cookie)().set(t.SESSION_WALLET_DETECTED_KEY,i.join(","),{expires:new Date(Date.now()+864e5).toUTCString(),path:"/"}))},e.prototype.isWalletIdentified=function(e,r){var o=this.generateIdentificationKey(e,r),a=(0,n.cookie)().get(t.SESSION_WALLET_IDENTIFIED_KEY),s=((null==a?void 0:a.split(","))||[]).includes(o);return i.logger.debug("Session: Checking wallet identification",{identifiedKey:o,isIdentified:s,hasRdns:!!r}),s},e.prototype.markWalletIdentified=function(e,r){var o,a=this.generateIdentificationKey(e,r),s=(null===(o=(0,n.cookie)().get(t.SESSION_WALLET_IDENTIFIED_KEY))||void 0===o?void 0:o.split(","))||[];if(s.includes(a))i.logger.info("Session: Wallet already marked as identified",{identifiedKey:a,existingWallets:s,hasRdns:!!r});else{s.push(a);var c=s.join(",");(0,n.cookie)().set(t.SESSION_WALLET_IDENTIFIED_KEY,c,{expires:new Date(Date.now()+864e5).toUTCString(),path:"/"}),i.logger.debug("Session: Marked wallet as identified",{identifiedKey:a,hasRdns:!!r})}},e}();t.FormoAnalyticsSession=o},4267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},4299:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(3171),s=r(1550),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.backend=r,n}return i(t,e),t.prototype.isAvailable=function(){try{var e="__storage_test__";return this.backend.setItem(e,"1"),this.backend.removeItem(e),!0}catch(e){return!1}},t.prototype.set=function(e,t){"boolean"==typeof t&&(t=!0===t?"true":"false"),"object"==typeof t&&(t=s.JSON_PREFIX+JSON.stringify(t)),this.backend.setItem(this.getKey(e),t)},t.prototype.get=function(e){var t=this.backend.getItem(this.getKey(e));if(!t||"string"!=typeof t)return null;if(["null","undefined"].some(function(e){return e==t}))return null;if(t.startsWith(s.JSON_PREFIX))try{return JSON.parse(t.slice(s.JSON_PREFIX.length))}catch(e){return a.logger.error("[FORMO_ERROR] ".concat(this.backend.constructor.name," failed to parse JSON"),e),null}return["true","false"].some(function(e){return e==t})?JSON.parse(t):t},t.prototype.remove=function(e){this.backend.removeItem(this.getKey(e))},t}(o(r(3542)).default);t.default=c},4327:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventFactory=void 0;var s=r(508),c=r(9160),u=r(3696),d=r(5536),l=r(8768),f=r(3171),h=a(r(6284)),p=r(4416),g=r(2246),v=r(324),y=r(5820),A=r(384),m=function(){function e(e){var t,r=this;if(this.extractUTMParameters=function(e){var t={utm_campaign:"",utm_content:"",utm_medium:"",utm_source:"",utm_term:""};try{new URL(e).searchParams.forEach(function(e,r){r.startsWith("utm_")&&(t[r]=e.trim())})}catch(e){}return t},this.extractReferralParameter=function(e){for(var t,n,i,o=0,a=(null===(t=r.options)||void 0===t?void 0:t.referral)&&null!==(n=r.options.referral.queryParams)&&void 0!==n?n:["ref","referral","refcode"];o<a.length;o++){var s=a[o],c=null===(i=e.searchParams.get(s))||void 0===i?void 0:i.trim();if(c)return c}if(r.compiledPathPattern){var u=e.pathname.match(r.compiledPathPattern);if(u&&u[1]){var d=u[1].trim();if(d)return d}}return""},this.getTrafficSources=function(e){var t=new URL(e),i=n(n({},r.extractUTMParameters(e)),{ref:r.extractReferralParameter(t),referrer:document.referrer}),o=(0,p.session)().get(s.SESSION_TRAFFIC_SOURCE_KEY)||{},a={ref:i.ref||(null==o?void 0:o.ref)||"",referrer:i.referrer||(null==o?void 0:o.referrer)||"",utm_campaign:i.utm_campaign||(null==o?void 0:o.utm_campaign)||"",utm_content:i.utm_content||(null==o?void 0:o.utm_content)||"",utm_medium:i.utm_medium||(null==o?void 0:o.utm_medium)||"",utm_source:i.utm_source||(null==o?void 0:o.utm_source)||"",utm_term:i.utm_term||(null==o?void 0:o.utm_term)||""},c=Object.keys(a).reduce(function(e,t){var r=a[t];return(0,l.isUndefined)(r)||""===r||(e[t]=r),e},{});return Object.keys(c).length&&(0,p.session)().set(s.SESSION_TRAFFIC_SOURCE_KEY,c),a},this.getPageProperties=function(e){var t=n({},e);(0,l.isUndefined)(t.url)&&(t.url=new URL(globalThis.location.href).href),(0,l.isUndefined)(t.path)&&(t.path=globalThis.location.pathname),(0,l.isUndefined)(t.hash)&&(t.hash=globalThis.location.hash),(0,l.isUndefined)(t.query)&&(t.query=globalThis.location.search.slice(1));try{new URL(globalThis.location.href).searchParams.forEach(function(e,r){(0,l.isUndefined)(t[r])&&!v.PAGE_PROPERTIES_EXCLUDED_FIELDS.has(r)&&(t[r]=e)})}catch(e){f.logger.error("Error parsing query parameters for page properties:",e)}return t},this.options=e,null===(t=null==e?void 0:e.referral)||void 0===t?void 0:t.pathPattern)try{this.compiledPathPattern=new RegExp(e.referral.pathPattern)}catch(t){f.logger.warn("Invalid referral path pattern: ".concat(e.referral.pathPattern,". Error: ").concat(t))}}return e.prototype.getTimezone=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return f.logger.error("Error resolving timezone:",e),""}},e.prototype.getLocation=function(){try{var e=this.getTimezone();return e in s.COUNTRY_LIST?s.COUNTRY_LIST[e]:e}catch(e){return f.logger.error("Error resolving location:",e),""}},e.prototype.getLanguage=function(){try{return(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language)||"en"}catch(e){return f.logger.error("Error resolving language:",e),"en"}},e.prototype.getLibraryVersion=function(){return g.version},e.prototype.getScreen=function(){var e,t;try{return{screen_width:(null===(e=globalThis.screen)||void 0===e?void 0:e.width)||0,screen_height:(null===(t=globalThis.screen)||void 0===t?void 0:t.height)||0,screen_density:globalThis.devicePixelRatio||1,viewport_width:globalThis.innerWidth||0,viewport_height:globalThis.innerHeight||0}}catch(e){return f.logger.error("Error resolving screen properties:",e),{screen_width:0,screen_height:0,screen_density:1,viewport_width:0,viewport_height:0}}},e.prototype.generateContext=function(e){return i(this,void 0,void 0,function(){var t,r,i,a,s,c;return o(this,function(o){switch(o.label){case 0:return[4,(0,A.detectBrowser)()];case 1:return t=o.sent(),r=this.getLanguage(),i=this.getTimezone(),a=this.getLocation(),s=this.getLibraryVersion(),c=n(n(n({user_agent:globalThis.navigator.userAgent,locale:r,timezone:i,location:a},this.getTrafficSources(globalThis.location.href)),{page_title:document.title,page_url:globalThis.location.href,library_name:"Formo Web SDK",library_version:s,browser:t}),this.getScreen()),[2,(0,h.default)(c,e||{})]}})})},e.prototype.getEnrichedEvent=function(e,t){return i(this,void 0,void 0,function(){var r,n,i,a;return o(this,function(o){switch(o.label){case 0:return a={},[4,this.generateContext(t)];case 1:return a.context=o.sent(),a.original_timestamp=(0,d.getCurrentTimeFormatted)(),a.user_id=e.user_id,a.type=e.type,a.channel=v.CHANNEL,a.version=v.VERSION,(r=a).anonymous_id=(0,y.generateAnonymousId)(s.LOCAL_ANONYMOUS_ID_KEY),n=(0,u.getValidAddress)(e.address),r.address=n?(0,c.toChecksumAddress)(n):null,void 0===(i=(0,h.default)(e,r)).event&&(i.event=null),void 0===i.properties&&(i.properties=null),[2,(0,c.toSnakeCase)(i)]}})})},e.prototype.generatePageEvent=function(e,t,r,a){return i(this,void 0,void 0,function(){var i,s;return o(this,function(o){return(i=n({},null!=r?r:{})).category=e,i.name=t,i=this.getPageProperties(i),s={properties:i,type:"page"},[2,this.getEnrichedEvent(s,a)]})})},e.prototype.generateDetectWalletEvent=function(e,t,r,a){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n({providerName:e,rdns:t},r),type:"detect"},[2,this.getEnrichedEvent(i,a)]})})},e.prototype.generateIdentifyEvent=function(e,t,r,a,s,c){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n({providerName:e,rdns:t},s),user_id:a,address:r,type:"identify"},[2,this.getEnrichedEvent(i,c)]})})},e.prototype.generateConnectEvent=function(e,t,r,a){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n({chainId:e},r),address:t,type:"connect"},[2,this.getEnrichedEvent(i,a)]})})},e.prototype.generateDisconnectEvent=function(e,t,r,a){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n({chainId:e},r),address:t,type:"disconnect"},[2,this.getEnrichedEvent(i,a)]})})},e.prototype.generateChainChangedEvent=function(e,t,r,a){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n({chainId:e},r),address:t,type:"chain"},[2,this.getEnrichedEvent(i,a)]})})},e.prototype.generateSignatureEvent=function(e,t,r,a,s,c,u){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n(n({status:e,chainId:t,message:a},s&&{signatureHash:s}),c),address:r,type:"signature"},[2,this.getEnrichedEvent(i,u)]})})},e.prototype.generateTransactionEvent=function(e,t,r,a,s,c,u,d,l){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n(n({status:e,chainId:t,data:a,to:s,value:c},u&&{transactionHash:u}),d),address:r,type:"transaction"},[2,this.getEnrichedEvent(i,l)]})})},e.prototype.generateTrackEvent=function(e,t,r){return i(this,void 0,void 0,function(){var i;return o(this,function(o){return i={properties:n(n(n(n({},t),void 0!==(null==t?void 0:t.revenue)&&{revenue:Number(t.revenue),currency:("string"==typeof(null==t?void 0:t.currency)?t.currency:"USD").toLowerCase()}),void 0!==(null==t?void 0:t.points)&&{points:Number(t.points)}),void 0!==(null==t?void 0:t.volume)&&{volume:Number(t.volume)}),event:e,type:"track"},[2,this.getEnrichedEvent(i,r)]})})},e.prototype.create=function(e,t,r){return i(this,void 0,void 0,function(){var n,i;return o(this,function(o){switch(o.label){case 0:switch(n={},e.type){case"page":return[3,1];case"detect":return[3,3];case"identify":return[3,5];case"chain":return[3,7];case"connect":return[3,9];case"disconnect":return[3,11];case"signature":return[3,13];case"transaction":return[3,15];case"track":return[3,17]}return[3,17];case 1:return[4,this.generatePageEvent(e.category,e.name,e.properties,e.context)];case 2:case 4:case 6:case 8:case 10:case 12:case 14:case 16:case 18:return n=o.sent(),[3,19];case 3:return[4,this.generateDetectWalletEvent(e.providerName,e.rdns,e.properties,e.context)];case 5:return[4,this.generateIdentifyEvent(e.providerName,e.rdns,e.address,e.userId,e.properties,e.context)];case 7:return[4,this.generateChainChangedEvent(e.chainId,e.address,e.properties,e.context)];case 9:return[4,this.generateConnectEvent(e.chainId,e.address,e.properties,e.context)];case 11:return[4,this.generateDisconnectEvent(e.chainId,e.address,e.properties,e.context)];case 13:return[4,this.generateSignatureEvent(e.status,e.chainId,e.address,e.message,e.signatureHash,e.properties,e.context)];case 15:return[4,this.generateTransactionEvent(e.status,e.chainId,e.address,e.data,e.to,e.value,e.transactionHash,e.properties,e.context)];case 17:return[4,this.generateTrackEvent(e.event,e.properties,e.context)];case 19:return void 0!==n.address&&null!==n.address||(i=(0,u.getValidAddress)(t),n.address=i?(0,c.toChecksumAddress)(i):null),n.user_id=r||null,[2,n]}})})},e}();t.EventFactory=m},4416:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.memory=t.session=t.local=t.cookie=void 0,t.initStorageManager=function(e){a||(a=new o.StorageManager(e))};var o=r(4646);i(r(1922),t);var a=null;function s(e){if(!a)throw new Error("StorageManager not initialized. Call initStorageManager(writeKey) first.");return a.getStorage(e)}t.cookie=function(){return s("cookieStorage")},t.local=function(){return s("localStorage")},t.session=function(){return s("sessionStorage")},t.memory=function(){return s("memoryStorage")}},4425:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(2817));t.default=(0,i.default)(r.g.fetch)},4473:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNullish=void 0,t.isNullish=function(e){return null==e}},4618:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(648);i(r(7996),t),i(r(9001),t),i(r(7716),t),"undefined"!=typeof window&&(window.formofy=o.formofy)},4623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActionDescriptor=void 0,t.getActionDescriptor=function(e,t){var r=e;return(null==t?void 0:t.status)&&(r+=" ".concat(t.status)),"connect"!==e&&"disconnect"!==e||!(null==t?void 0:t.rdns)||(r+=" (".concat(t.rdns,")")),r}},4646:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageManager=void 0;var i=r(3171),o=n(r(7995)),a=n(r(8510)),s=n(r(4299)),c=["cookieStorage","localStorage","sessionStorage","memoryStorage"],u=function(){function e(e){this.writeKey=e,this.storages=new Map}return e.prototype.getStorage=function(e){if(!this.storages.has(e)){for(var t=this.createStorage(e);!t.isAvailable();){var r=c.indexOf(e);i.logger.warn("Storage ".concat(e," is not available, trying ").concat(c[r+1])),t=this.createStorage(c[r+1])}this.storages.set(e,t)}return this.storages.get(e)},e.prototype.createStorage=function(e){switch(e){case"cookieStorage":return new o.default(this.writeKey);case"localStorage":return new s.default(this.writeKey,localStorage);case"sessionStorage":return new s.default(this.writeKey,sessionStorage);default:return new a.default(this.writeKey)}},e}();t.StorageManager=u},4742:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.EventManager=void 0;var a=r(3171),s=r(4327),c=r(3696),u=function(){function e(e,t){this.eventQueue=e,this.eventFactory=new s.EventFactory(t)}return e.prototype.addEvent=function(e,t,r){return n(this,void 0,void 0,function(){var n,s,u;return i(this,function(i){switch(i.label){case 0:return n=e.callback,s=o(e,["callback"]),[4,this.eventFactory.create(s,t,r)];case 1:return(u=i.sent()).address&&(0,c.isBlockedAddress)(u.address)?(a.logger.warn("Event blocked: Address ".concat(u.address," is in the blocked list and cannot emit events")),[2]):(this.eventQueue.enqueue(u,function(e,t,r){e?a.logger.error("Error sending events:",e):a.logger.info("Events sent successfully: ".concat(r.length," events")),null==n||n(e,t,r)}),[2])}})})},e}();t.EventManager=u},4878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PROVIDER_ICON=t.isValidProvider=t.detectInjectedProviderInfo=void 0;var n=r(5977);Object.defineProperty(t,"detectInjectedProviderInfo",{enumerable:!0,get:function(){return n.detectInjectedProviderInfo}}),Object.defineProperty(t,"isValidProvider",{enumerable:!0,get:function(){return n.isValidProvider}}),Object.defineProperty(t,"DEFAULT_PROVIDER_ICON",{enumerable:!0,get:function(){return n.DEFAULT_PROVIDER_ICON}})},4887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;const n=r(8919);t.createStore=function(){const e=new Set;let t=[];const r=()=>(0,n.requestProviders)(r=>{t.some(({info:e})=>e.uuid===r.info.uuid)||(t=[...t,r],e.forEach(e=>e(t,{added:[r]})))});let i=r();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),i?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),i?.(),i=r()},subscribe:(r,{emitImmediately:n}={})=>(e.add(r),n&&r(t,{added:t}),()=>e.delete(r))}}},4961:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(971)),o=n(r(5588)),a=n(r(9763)),s=(0,i.default)(function e(t,r,n){return(0,a.default)(function(r,n,i){return(0,o.default)(n)&&(0,o.default)(i)?e(t,n,i):t(r,n,i)},r,n)});t.default=s},5063:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventQueue=void 0;var s=r(8768),c=r(9160),u=r(3171),d=r(508),l=a(r(4425)),f=function(){},h=function(){function e(e,t){var r=this;this.queue=[],this.payloadHashes=new Set,this.onPageLeave=function(e){var t=!1,r=!1;function n(){t||(t=!0,e(r),setTimeout(function(){t=!1},0))}globalThis.addEventListener("beforeunload",function(){r=!1,n()}),globalThis.addEventListener("blur",function(){r=!0,n()}),globalThis.addEventListener("focus",function(){t=!1}),document.addEventListener("pagehide",function(){r="hidden"===document.visibilityState,n()}),document.addEventListener("visibilitychange",function(){r=!0,"hidden"===document.visibilityState?n():t=!1})},t=t||{},this.queue=[],this.writeKey=e,this.apiHost=t.apiHost,this.retryCount=(0,c.clampNumber)(t.retryCount||3,5,1),this.flushAt=(0,c.clampNumber)(t.flushAt||20,20,1),this.maxQueueSize=(0,c.clampNumber)(t.maxQueueSize||512e3,512e3,200),this.flushIntervalMs=(0,c.clampNumber)(t.flushInterval||3e4,3e5,1e4),this.flushed=!0,this.errorHandler=t.errorHandler,this.pendingFlush=null,this.timer=null,this.onPageLeave(function(e){return i(r,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return!1!==e?[3,2]:[4,this.flush()];case 1:t.sent(),t.label=2;case 2:return[2]}})})})}return e.prototype.generateMessageId=function(e){return i(this,void 0,void 0,function(){var t,r,i;return o(this,function(o){return t=(0,c.toDateHourMinute)(new Date(e.original_timestamp)),r=n(n({},e),{original_timestamp:t}),i=JSON.stringify(r),[2,(0,c.hash)(i)]})})},e.prototype.enqueue=function(e,t){return i(this,void 0,void 0,function(){var r,i,a;return o(this,function(o){switch(o.label){case 0:return t=t||f,[4,this.generateMessageId(e)];case 1:return r=o.sent(),[4,this.isDuplicate(r)];case 2:return o.sent()?(u.logger.warn("Event already enqueued, try again after ".concat((0,c.millisecondsToSecond)(this.flushIntervalMs)," seconds.")),[2]):(this.queue.push({message:n(n({},e),{message_id:r}),callback:t}),u.logger.log("Event enqueued: ".concat((0,c.getActionDescriptor)(e.type,e.properties))),this.flushed?(i=this.queue.length>=this.flushAt,a=this.queue.reduce(function(e,t){return e+JSON.stringify(t).length},0)>=this.maxQueueSize,i||a?(this.flush(),[2]):(this.flushIntervalMs&&!this.timer&&(this.timer=setTimeout(this.flush.bind(this),this.flushIntervalMs)),[2])):(this.flushed=!0,this.flush(),[2]))}})})},e.prototype.flush=function(e){return i(this,void 0,void 0,function(){var t,r,i,a,s,c=this;return o(this,function(o){switch(o.label){case 0:if(e=e||f,this.timer&&(clearTimeout(this.timer),this.timer=null),!this.queue.length)return e(),[2,Promise.resolve()];o.label=1;case 1:return o.trys.push([1,4,,5]),this.pendingFlush?[4,this.pendingFlush]:[3,3];case 2:o.sent(),o.label=3;case 3:return[3,5];case 4:throw t=o.sent(),this.pendingFlush=null,t;case 5:return r=this.queue.splice(0,this.flushAt),this.payloadHashes.clear(),i=(new Date).toISOString(),a=r.map(function(e){return n(n({},e.message),{sent_at:i})}),s=function(t){r.forEach(function(e){var r=e.message;return(0,e.callback)(t,r,a)}),e(t,a)},[2,this.pendingFlush=(0,l.default)("".concat(this.apiHost),{headers:(0,d.EVENTS_API_REQUEST_HEADER)(this.writeKey),method:"POST",body:JSON.stringify(a),keepalive:!0,retries:this.retryCount,retryDelay:function(e){return 1e3*Math.pow(2,e)},retryOn:function(e,t){return c.isErrorRetryable(t)}}).then(function(){return s(),Promise.resolve(a)}).catch(function(e){if("function"==typeof c.errorHandler)return s(e),c.errorHandler(e);if(e.response){var t=new Error(e.response.statusText);throw s(t),t}throw s(e),e})]}})})},e.prototype.isErrorRetryable=function(e){var t,r,n;return!!(0,s.isNetworkError)(e)||!!(null==e?void 0:e.response)&&((null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)>=500&&(null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.status)<=599||429===(null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status))},e.prototype.isDuplicate=function(e){return i(this,void 0,void 0,function(){return o(this,function(t){return this.payloadHashes.has(e)?[2,!0]:(this.payloadHashes.add(e),[2,!1])})})},e}();t.EventQueue=h},5307:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionStatus=t.SignatureStatus=void 0,function(e){e.REQUESTED="requested",e.REJECTED="rejected",e.CONFIRMED="confirmed"}(r||(t.SignatureStatus=r={})),function(e){e.STARTED="started",e.REJECTED="rejected",e.BROADCASTED="broadcasted",e.CONFIRMED="confirmed",e.REVERTED="reverted"}(n||(t.TransactionStatus=n={}))},5391:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=m;const n=r(3842),i=r(11),o=BigInt(0),a=BigInt(1),s=BigInt(2),c=BigInt(7),u=BigInt(256),d=BigInt(113),l=[],f=[],h=[];for(let e=0,t=a,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],l.push(2*(5*n+r)),f.push((e+1)*(e+2)/2%64);let i=o;for(let e=0;e<7;e++)t=(t<<a^(t>>c)*d)%u,t&s&&(i^=a<<(a<<BigInt(e))-a);h.push(i)}const p=(0,n.split)(h,!0),g=p[0],v=p[1],y=(e,t,r)=>r>32?(0,n.rotlBH)(e,t,r):(0,n.rotlSH)(e,t,r),A=(e,t,r)=>r>32?(0,n.rotlBL)(e,t,r):(0,n.rotlSL)(e,t,r);function m(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=y(o,a,1)^r[n],c=A(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=f[r],o=y(t,i,n),a=A(t,i,n),s=l[r];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=v[n]}(0,i.clean)(r)}class b extends i.Hash{constructor(e,t,r,n=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,(0,i.anumber)(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,i.swap32IfBE)(this.state32),m(this.state32,this.rounds),(0,i.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.aexists)(this),e=(0,i.toBytes)(e),(0,i.abytes)(e);const{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){const o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,i.aexists)(this,!1),(0,i.abytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.aoutput)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.clean)(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new b(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=b;const _=(e,t,r)=>(0,i.createHasher)(()=>new b(t,e,r));t.sha3_224=_(6,144,28),t.sha3_256=_(6,136,32),t.sha3_384=_(6,104,48),t.sha3_512=_(6,72,64),t.keccak_224=_(1,144,28),t.keccak_256=_(1,136,32),t.keccak_384=_(1,104,48),t.keccak_512=_(1,72,64);const E=(e,t,r)=>(0,i.createXOFer)((n={})=>new b(t,e,void 0===n.dkLen?r:n.dkLen,!0));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},5536:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFormattedTimestamp=t.getCurrentTimeFormatted=void 0;var r=function(e){return e.toISOString()};t.getFormattedTimestamp=r,t.getCurrentTimeFormatted=function(){return r(new Date)}},5588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},5628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(5391),i=r(7393);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},5797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(4327),t),i(r(4742),t),i(r(8705),t)},5820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateAnonymousId=void 0,t.getCookieDomain=o;var n=r(9160),i=r(4416);function o(e){if(void 0===e&&(e=window.location.hostname),e.includes("localhost")||/^\d{1,3}(\.\d{1,3}){3}$/.test(e))return"";var t=e.split(".");return t.includes("www")&&t.splice(t.indexOf("www"),1),".".concat(t.join("."))}t.generateAnonymousId=function(e){var t=(0,i.cookie)().get(e);if(t&&"string"==typeof t)return t;var r=(0,n.generateNativeUUID)();return(0,i.cookie)().set(e,r,{maxAge:Date.now()+31536e6,domain:o(),path:"/"}),r}},5977:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PROVIDER_ICON=void 0,t.detectInjectedProviderInfo=function(e){for(var n="Injected Provider",i="io.injected.provider",o=e,a=0,s=r;a<s.length;a++){var c=s[a];if(o[c.flag]){n=c.name,i=c.rdns;break}}return{name:n,rdns:i,uuid:"injected-".concat(i.replace(/[^a-zA-Z0-9]/g,"-")),icon:t.DEFAULT_PROVIDER_ICON}},t.isValidProvider=function(e){return!!e&&"function"==typeof e.request&&"function"==typeof e.on&&"function"==typeof e.removeListener},t.DEFAULT_PROVIDER_ICON="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSIjRkZGIi8+CjxwYXRoIGQ9Ik0xNiA4TDggMjRoMTZMMTYgOHoiIGZpbGw9IiMzMzMiLz4KPC9zdmc+Cg==";var r=[{flag:"isMetaMask",name:"MetaMask",rdns:"io.metamask"},{flag:"isCoinbaseWallet",name:"Coinbase Wallet",rdns:"com.coinbase.wallet"},{flag:"isWalletConnect",name:"WalletConnect",rdns:"com.walletconnect"},{flag:"isTrust",name:"Trust Wallet",rdns:"com.trustwallet"},{flag:"isBraveWallet",name:"Brave Wallet",rdns:"com.brave.wallet"},{flag:"isPhantom",name:"Phantom",rdns:"app.phantom"}]},5980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHexStrict=void 0,t.isHexStrict=function(e){return"string"==typeof e&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e)}},6070:(e,t,r)=>{"use strict";e.exports=r(7462)},6284:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(1500)),o=n(r(4961)),a=(0,i.default)(function(e,t){return(0,o.default)(function(e,t,r){return r},e,t)});t.default=a},6731:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=function(e){var t,r;return e instanceof Uint8Array||"Uint8Array"===(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)||"Buffer"===(null===(r=null==e?void 0:e.constructor)||void 0===r?void 0:r.name)},t.uint8ArrayToHexString=function(e){for(var t="0x",r=0,n=e;r<n.length;r++){var i=n[r].toString(16);t+=1===i.length?"0".concat(i):i}return t}},6839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=i,t.abytes=o,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t.numberToHexUnpadded=a,t.hexToNumber=s,t.bytesToHex=d,t.hexToBytes=h,t.bytesToNumberBE=function(e){return s(d(e))},t.bytesToNumberLE=function(e){return o(e),s(d(Uint8Array.from(e).reverse()))},t.numberToBytesBE=p,t.numberToBytesLE=function(e,t){return p(e,t).reverse()},t.numberToVarBytesBE=function(e){return h(a(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=h(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!i(t))throw new Error(e+" must be hex string or Uint8Array");n=Uint8Array.from(t)}const o=n.length;if("number"==typeof r&&o!==r)throw new Error(e+" of length "+r+" expected, got "+o);return n},t.concatBytes=g,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))},t.inRange=y,t.aInRange=function(e,t,r,n){if(!y(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,i){return e|(i?n:r)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=A(e),i=A(e),o=0;const a=()=>{n.fill(1),i.fill(0),o=0},s=(...e)=>r(i,n,...e),c=(e=A(0))=>{i=s(m([0]),e),n=s(),0!==e.length&&(i=s(m([1]),e),n=s())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=s();const t=n.slice();r.push(t),e+=n.length}return g(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}},t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=b[r];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+r+", got "+o)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e},t.memoized=function(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(void 0!==i)return i;const o=e(r,...n);return t.set(r,o),o}};const r=BigInt(0),n=BigInt(1);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!i(e))throw new Error("Uint8Array expected")}function a(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function s(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?r:BigInt("0x"+e)}const c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(o(e),c)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t}const l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=l._0&&e<=l._9?e-l._0:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function h(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(c)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=f(e.charCodeAt(i)),o=f(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n}function p(e,t){return h(e.toString(16).padStart(2*t,"0"))}function g(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];o(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}const v=e=>"bigint"==typeof e&&r<=e;function y(e,t,r){return v(e)&&v(t)&&v(r)&&t<=e&&e<r}t.bitMask=e=>(n<<BigInt(e))-n;const A=e=>new Uint8Array(e),m=e=>Uint8Array.from(e),b={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||i(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},6997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const n=r(4072),i=r(7393);t.sha256=(0,i.wrapHash)(n.sha256)},7007:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WRAPPED_REQUEST_REF_SYMBOL=t.WRAPPED_REQUEST_SYMBOL=void 0,t.WRAPPED_REQUEST_SYMBOL=Symbol("formoWrappedRequest"),t.WRAPPED_REQUEST_REF_SYMBOL=Symbol("formoWrappedRequestRef")},7138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNetworkError=function(e){return!(!e||!n(e)||"TypeError"!==e.name||"string"!=typeof e.message)&&("Load failed"===e.message?void 0===e.stack:i.has(e.message))};var r=Object.prototype.toString,n=function(e){return"[object Error]"===r.call(e)},i=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"])},7313:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseChainId=function(e){return"string"!=typeof e?0:e.startsWith("0x")||e.startsWith("0X")?parseInt(e,16):parseInt(e,10)}},7393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertBytes=t.assertBool=t.utf8ToBytes=t.toHex=t.createView=t.concatBytes=t.bytesToHex=void 0,t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>((0,i.abytes)(t),e(t))};const n=r(6839);Object.defineProperty(t,"assertBool",{enumerable:!0,get:function(){return n.abool}});const i=r(681);Object.defineProperty(t,"assertBytes",{enumerable:!0,get:function(){return i.abytes}});const o=r(11);var a=r(11);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return a.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return a.createView}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return a.utf8ToBytes}})},7462:(e,t,r)=>{"use strict";var n=r(758),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,o={},u=null,d=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:u,ref:d,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},7716:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(9011),t),i(r(5307),t),i(r(7007),t)},7734:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=i,t.Chi=function(e,t,r){return e&t^~e&r},t.Maj=function(e,t,r){return e&t^e&r^t&r};const n=r(11);function i(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(r>>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}class o extends n.Hash{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);const{view:t,buffer:r,blockLen:i}=this,o=e.length;for(let a=0;a<o;){const s=Math.min(i-this.pos,o-a);if(s===i){const t=(0,n.createView)(e);for(;i<=o-a;a+=i)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.aexists)(this),(0,n.aoutput)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:a}=this;let{pos:s}=this;t[s++]=128,(0,n.clean)(this.buffer.subarray(s)),this.padOffset>o-s&&(this.process(r,0),s=0);for(let e=s;e<o;e++)t[e]=0;i(r,o-8,BigInt(8*this.length),a),this.process(r,0);const c=(0,n.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=u/4,l=this.get();if(d>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)c.setUint32(4*e,l[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}t.HashMD=o,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},7995:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.isAvailable=function(){return"undefined"!=typeof document&&"string"==typeof document.cookie},t.prototype.set=function(e,t,r){var n=null==r?void 0:r.expires,i=null==r?void 0:r.maxAge,o=(null==r?void 0:r.path)||"/",a=null==r?void 0:r.domain,s=null==r?void 0:r.sameSite,c=(null==r?void 0:r.secure)||!1,u="".concat(encodeURIComponent(this.getKey(e)),"=").concat(encodeURIComponent(t));i?u+="; max-age="+i:n&&(u+="; expires="+n),o&&(u+="; path="+o),a&&(u+="; domain="+a),s&&(u+="; samesite="+s),c&&(u+="; secure"),document.cookie=u},t.prototype.get=function(e){var t=document.cookie.match(new RegExp("(?:^|; )".concat(encodeURIComponent(this.getKey(e)),"=([^;]*)")));return t?decodeURIComponent(t[1]):null},t.prototype.remove=function(e){document.cookie="".concat(encodeURIComponent(this.getKey(e)),"=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT")},t}(o(r(3542)).default);t.default=a},7996:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.useFormo=t.FormoAnalyticsProvider=t.FormoAnalyticsContext=void 0;var a=r(6070),s=r(758),c=r(9001),u=r(4416),d=r(3171),l={chain:function(){return Promise.resolve()},page:function(){return Promise.resolve()},reset:function(){},cleanup:function(){},detect:function(){return Promise.resolve()},connect:function(){return Promise.resolve()},disconnect:function(){return Promise.resolve()},signature:function(){return Promise.resolve()},transaction:function(){return Promise.resolve()},identify:function(){return Promise.resolve()},track:function(){return Promise.resolve()},optOutTracking:function(){},optInTracking:function(){},hasOptedOutTracking:function(){return!1}};t.FormoAnalyticsContext=(0,s.createContext)(l),t.FormoAnalyticsProvider=function(e){var t=e.writeKey,r=e.disabled,i=void 0!==r&&r,o=e.children;return t?i?(d.logger.warn("FormoAnalytics is disabled"),(0,a.jsx)(a.Fragment,{children:o})):(0,a.jsx)(f,n({},e)):(d.logger.error("FormoAnalyticsProvider: No Write Key provided"),(0,a.jsx)(a.Fragment,{children:o}))};var f=function(e){var r=e.writeKey,n=e.options,f=e.children,h=(0,s.useState)(l),p=h[0],g=h[1],v=(0,s.useRef)(l);(0,u.initStorageManager)(r);var y=(0,s.useMemo)(function(){if(!n)return"undefined";var e={tracking:n.tracking,autocapture:n.autocapture,apiHost:n.apiHost,flushAt:n.flushAt,flushInterval:n.flushInterval,retryCount:n.retryCount,maxQueueSize:n.maxQueueSize,logger:n.logger,referral:n.referral,hasProvider:!!n.provider,hasWagmi:!!n.wagmi,hasReady:!!n.ready};try{return JSON.stringify(e)}catch(e){return d.logger.warn("Failed to serialize options, using timestamp",e),Date.now().toString()}},[n]);return(0,s.useEffect)(function(){var e=!1;return i(void 0,void 0,void 0,function(){var t,i;return o(this,function(o){switch(o.label){case 0:v.current&&v.current!==l&&(d.logger.log("Cleaning up existing FormoAnalytics SDK instance before re-initialization"),v.current.cleanup(),v.current=l,g(l)),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,c.FormoAnalytics.init(r,n)];case 2:return t=o.sent(),e?(d.logger.log("Component unmounted during initialization, cleaning up SDK"),t.cleanup()):(g(t),v.current=t,d.logger.log("Successfully initialized FormoAnalytics SDK")),[3,4];case 3:return i=o.sent(),e||d.logger.error("Failed to initialize FormoAnalytics SDK",i),[3,4];case 4:return[2]}})}),function(){e=!0,v.current&&v.current!==l&&(d.logger.log("Cleaning up FormoAnalytics SDK instance"),v.current.cleanup(),v.current=l)}},[r,y]),(0,a.jsx)(t.FormoAnalyticsContext.Provider,{value:p,children:f})};t.useFormo=function(){var e=(0,s.useContext)(t.FormoAnalyticsContext);return e||d.logger.warn("useFormo called without a valid context"),e}},8510:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.memoryStorage={},t}return i(t,e),t.prototype.isAvailable=function(){return!0},t.prototype.set=function(e,t){this.memoryStorage[this.getKey(e)]=t},t.prototype.get=function(e){return this.memoryStorage[this.getKey(e)]||null},t.prototype.remove=function(e){delete this.memoryStorage[this.getKey(e)]},t}(o(r(3542)).default);t.default=a},8705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8768:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(2632),t),i(r(3281),t),i(r(3931),t),i(r(7138),t),i(r(4473),t),i(r(5983),t),i(r(6731),t)},8885:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.hash=function(e){return r(this,void 0,void 0,function(){var t,r;return n(this,function(n){switch(n.label){case 0:return[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e))];case 1:return t=n.sent(),r=new Uint8Array(t),[2,Array.from(r).map(function(e){return e.toString(16).padStart(2,"0")}).join("")]}})})},t.generateNativeUUID=function(){return crypto.randomUUID()}},8891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setConsentFlag=function(e,t,r){var n;if("undefined"!=typeof document){var o=i(e,t),a=new Date(Date.now()+31536e6).toUTCString(),s="https:"===(null===(n=null===window||void 0===window?void 0:window.location)||void 0===n?void 0:n.protocol);document.cookie="".concat(o,"=").concat(encodeURIComponent(r),"; expires=").concat(a,"; path=/; SameSite=Strict").concat(s?"; Secure":"")}},t.getConsentFlag=function(e,t){if("undefined"==typeof document)return null;for(var r=i(e,t),n=0,o=document.cookie.split(";");n<o.length;n++){var a=o[n].trim(),s=a.indexOf("=");if(-1!==s){var c=a.substring(0,s),u=a.substring(s+1);if(c===r)return decodeURIComponent(u||"")}}return null},t.removeConsentFlag=function(e,t){!function(e){if("undefined"!=typeof document&&(document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"),"undefined"!=typeof window)){var t=window.location.hostname,r=t.split(".");if(r.length>=2&&"localhost"!==t){var n=r.slice(-2).join(".");document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.").concat(n,";")}}}(i(e,t))};var n=r(1586);function i(e,t){return"formo_".concat((0,n.secureHash)(e),"_").concat(t)}},8919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestProviders=t.announceProvider=void 0,t.announceProvider=function(e){const t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);const r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)},t.requestProviders=function(e){if("undefined"==typeof window)return;const t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}},8962:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},9001:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.FormoAnalytics=void 0;var s=r(9478),c=r(508),u=r(4416),d=r(5797),l=r(1290),f=r(3171),h=r(8891),p=r(4878),g=r(4141),v=r(7716),y=r(9160),A=r(3696),m=r(8768),b=r(7313),_=r(4106),E=function(){function e(e,t){var r,n;if(void 0===t&&(t={}),this.writeKey=e,this.options=t,this._providerListenersMap=new Map,this._providers=[],this._trackedProviders=new Set,this._processingAccountsChanged=!1,this._seenProviders=new Set,this.isWagmiMode=!1,this.currentUserId="",this.config={writeKey:e},this.options=t,this.isWagmiMode=!!t.wagmi,this.session=new g.FormoAnalyticsSession,this.currentUserId=(0,u.cookie)().get(c.SESSION_USER_ID_KEY)||void 0,this.identify=this.identify.bind(this),this.connect=this.connect.bind(this),this.disconnect=this.disconnect.bind(this),this.chain=this.chain.bind(this),this.signature=this.signature.bind(this),this.transaction=this.transaction.bind(this),this.detect=this.detect.bind(this),this.track=this.track.bind(this),this.isAutocaptureEnabled=this.isAutocaptureEnabled.bind(this),f.Logger.init({enabled:(null===(r=t.logger)||void 0===r?void 0:r.enabled)||!1,enabledLevels:(null===(n=t.logger)||void 0===n?void 0:n.levels)||[]}),this.eventManager=new d.EventManager(new l.EventQueue(this.config.writeKey,{apiHost:t.apiHost||c.EVENTS_API_HOST,flushAt:t.flushAt,retryCount:t.retryCount,maxQueueSize:t.maxQueueSize,flushInterval:t.flushInterval}),t),this.hasOptedOutTracking()&&f.logger.info("User has previously opted out of tracking"),this.isWagmiMode&&t.wagmi)f.logger.info("FormoAnalytics: Initializing in Wagmi mode"),this.wagmiHandler=new _.WagmiEventHandler(this,t.wagmi.config,t.wagmi.queryClient);else{var i=void 0,o=t.provider;o?i=o:"undefined"!=typeof window&&window.ethereum&&(i=window.ethereum),i&&this.trackEIP1193Provider(i)}this.trackPageHit(),this.trackPageHits()}return e.prototype.isProviderMismatch=function(e){return null!=this._provider&&this._provider!==e},e.init=function(t,r){return i(this,void 0,void 0,function(){var n,i;return o(this,function(o){switch(o.label){case 0:return(0,u.initStorageManager)(t),(n=new e(t,r)).isWagmiMode?[3,3]:(i=n,[4,n.getProviders()]);case 1:return i._providers=o.sent(),[4,n.detectWallets(n._providers)];case 2:return o.sent(),n.trackProviders(n._providers),[3,4];case 3:f.logger.info("FormoAnalytics: Skipping provider detection (Wagmi mode)"),o.label=4;case 4:return[2,n]}})})},e.prototype.page=function(e,t,r,n,a){return i(this,void 0,void 0,function(){return o(this,function(i){switch(i.label){case 0:return[4,this.trackPageHit(e,t,r,n,a)];case 1:return i.sent(),[2]}})})},e.prototype.reset=function(){this.currentUserId=void 0,(0,u.cookie)().remove(c.LOCAL_ANONYMOUS_ID_KEY),(0,u.cookie)().remove(c.SESSION_USER_ID_KEY),(0,u.cookie)().remove(g.SESSION_WALLET_DETECTED_KEY),(0,u.cookie)().remove(g.SESSION_WALLET_IDENTIFIED_KEY)},e.prototype.cleanup=function(){if(f.logger.info("FormoAnalytics: Cleaning up resources"),this.wagmiHandler&&(this.wagmiHandler.cleanup(),this.wagmiHandler=void 0),!this.isWagmiMode)for(var e=0,t=Array.from(this._trackedProviders);e<t.length;e++){var r=t[e];this.untrackProvider(r)}f.logger.info("FormoAnalytics: Cleanup complete")},e.prototype.connect=function(e,t,r,n){return i(this,arguments,void 0,function(e,t,r,n){var i,a=e.chainId,s=e.address;return o(this,function(e){switch(e.label){case 0:return null==a?(f.logger.warn("Connect: Chain ID cannot be null or undefined"),[2]):s?(this.currentChainId=a,(i=this.validateAndChecksumAddress(s))?(this.currentAddress=i,[4,this.trackEvent(c.EventType.CONNECT,{chainId:a,address:this.currentAddress},t,r,n)]):(f.logger.warn('Connect: Invalid address provided ("'.concat(s,'"). Please provide a valid Ethereum address in checksum format.')),[2])):(f.logger.warn("Connect: Address cannot be empty"),[2]);case 1:return e.sent(),[2]}})})},e.prototype.disconnect=function(e,t,r,a){return i(this,void 0,void 0,function(){var i,s,u,d;return o(this,function(o){switch(o.label){case 0:return i=(null==e?void 0:e.chainId)||this.currentChainId,s=(null==e?void 0:e.address)||this.currentAddress,u=this._provider?this.getProviderInfo(this._provider):null,f.logger.info("Disconnect: Emitting disconnect event with:",{chainId:i,address:s,providerName:null==u?void 0:u.name,rdns:null==u?void 0:u.rdns}),d=n(n({},u&&{providerName:u.name,rdns:u.rdns}),t),[4,this.trackEvent(c.EventType.DISCONNECT,n(n({},i&&{chainId:i}),s&&{address:s}),d,r,a)];case 1:return o.sent(),this.currentAddress=void 0,this.currentChainId=void 0,this.clearActiveProvider(),f.logger.info("Wallet disconnected: Cleared currentAddress, currentChainId, and provider"),[2]}})})},e.prototype.chain=function(e,t,r,n){return i(this,arguments,void 0,function(e,t,r,n){var i=e.chainId,a=e.address;return o(this,function(e){switch(e.label){case 0:return i&&0!==Number(i)?isNaN(Number(i))?(f.logger.warn("FormoAnalytics::chain: chainId must be a valid decimal number"),[2]):a||this.currentAddress?(this.currentChainId=i,[4,this.trackEvent(c.EventType.CHAIN,{chainId:i,address:a||this.currentAddress},t,r,n)]):(f.logger.warn("FormoAnalytics::chain: address was empty and no previous address has been recorded"),[2]):(f.logger.warn("FormoAnalytics::chain: chainId cannot be empty or 0"),[2]);case 1:return e.sent(),[2]}})})},e.prototype.signature=function(e,t,r,a){return i(this,arguments,void 0,function(e,t,r,i){var a=e.status,s=e.chainId,u=e.address,d=e.message,l=e.signatureHash;return o(this,function(e){switch(e.label){case 0:return[4,this.trackEvent(c.EventType.SIGNATURE,n({status:a,chainId:s,address:u,message:d},l&&{signatureHash:l}),t,r,i)];case 1:return e.sent(),[2]}})})},e.prototype.transaction=function(e,t,r,a){return i(this,arguments,void 0,function(e,t,r,i){var a=e.status,s=e.chainId,u=e.address,d=e.data,l=e.to,f=e.value,h=e.transactionHash;return o(this,function(e){switch(e.label){case 0:return[4,this.trackEvent(c.EventType.TRANSACTION,n({status:a,chainId:s,address:u,data:d,to:l,value:f},h&&{transactionHash:h}),t,r,i)];case 1:return e.sent(),[2]}})})},e.prototype.identify=function(e,t,r,n){return i(this,void 0,void 0,function(){var i,a,s,d,l,h,p,g,v,y,A,m,b,_,E;return o(this,function(o){switch(o.label){case 0:if(o.trys.push([0,12,,13]),e)return[3,10];f.logger.info("Auto-identifying with providers:",this._providers.map(function(e){return e.info.name})),i=0,a=this._providers,o.label=1;case 1:if(!(i<a.length))return[3,9];if(s=a[i],!(d=s.provider))return[3,8];o.label=2;case 2:return o.trys.push([2,7,,8]),[4,this.getAddress(d)];case 3:return(l=o.sent())?(h=this.validateAndChecksumAddress(l),f.logger.info("Auto-identify: Checking deduplication",{validAddress:h,rdns:s.info.rdns,providerName:s.info.name,isAlreadyIdentified:!!h&&this.session.isWalletIdentified(h,s.info.rdns)}),!h||this.session.isWalletIdentified(h,s.info.rdns)?[3,5]:(f.logger.info("Auto-identifying",h,s.info.name,s.info.rdns),[4,this.identify({address:h,providerName:s.info.name,rdns:s.info.rdns},t,r,n)])):[3,6];case 4:return o.sent(),[3,6];case 5:h&&f.logger.info("Auto-identify: Skipping already identified wallet",h,s.info.name,s.info.rdns),o.label=6;case 6:return[3,8];case 7:return p=o.sent(),f.logger.error("Failed to identify provider ".concat(s.info.name,":"),p),[3,8];case 8:return i++,[3,1];case 9:return[2];case 10:return g=e.userId,v=e.address,y=e.providerName,A=e.rdns,f.logger.info("Identify",v,g,y,A),m=void 0,v?(m=this.validateAndChecksumAddress(v),this.currentAddress=m||void 0,m||null===(E=f.logger.warn)||void 0===E||E.call(f.logger,"Invalid address provided to identify:",v)):this.currentAddress=void 0,g&&(this.currentUserId=g,(0,u.cookie)().set(c.SESSION_USER_ID_KEY,g)),b=!!m&&this.session.isWalletIdentified(m,A||""),f.logger.debug("Identify: Checking deduplication",{validAddress:m,rdns:A,providerName:y,hasValidAddress:!!m,hasRdns:!!A,isAlreadyIdentified:b}),b?(f.logger.info("Identify: Wallet ".concat(y||"Unknown"," with address ").concat(m," already identified in this session (rdns: ").concat(A||"empty",")")),[2]):(m&&this.session.markWalletIdentified(m,A||""),[4,this.trackEvent(c.EventType.IDENTIFY,{address:m,providerName:y,userId:g,rdns:A},t,r,n)]);case 11:return o.sent(),[3,13];case 12:return _=o.sent(),f.logger.log("identify error",_),[3,13];case 13:return[2]}})})},e.prototype.detect=function(e,t,r,n){return i(this,arguments,void 0,function(e,t,r,n){var i=e.providerName,a=e.rdns;return o(this,function(e){switch(e.label){case 0:return this.session.isWalletDetected(a)?[2,f.logger.warn("Detect: Wallet ".concat(i," already detected in this session"))]:(this.session.markWalletDetected(a),[4,this.trackEvent(c.EventType.DETECT,{providerName:i,rdns:a},t,r,n)]);case 1:return e.sent(),[2]}})})},e.prototype.track=function(e,t,r,n){return i(this,void 0,void 0,function(){return o(this,function(i){switch(i.label){case 0:return[4,this.trackEvent(c.EventType.TRACK,{event:e},t,r,n)];case 1:return i.sent(),[2]}})})},e.prototype.optOutTracking=function(){f.logger.info("Opting out of tracking"),(0,h.setConsentFlag)(this.writeKey,c.CONSENT_OPT_OUT_KEY,"true"),this.reset(),f.logger.info("Successfully opted out of tracking")},e.prototype.optInTracking=function(){f.logger.info("Opting back into tracking"),(0,h.removeConsentFlag)(this.writeKey,c.CONSENT_OPT_OUT_KEY),f.logger.info("Successfully opted back into tracking")},e.prototype.hasOptedOutTracking=function(){return"true"===(0,h.getConsentFlag)(this.writeKey,c.CONSENT_OPT_OUT_KEY)},e.prototype.trackEIP1193Provider=function(e){if(f.logger.info("trackEIP1193Provider",e),this.isWagmiMode)f.logger.debug("trackEIP1193Provider: Skipping EIP-1193 provider tracking (Wagmi mode - using connector system instead)");else try{if(!(0,p.isValidProvider)(e))return void f.logger.warn("trackEIP1193Provider: Invalid provider - missing required methods");if(this._trackedProviders.has(e))return void f.logger.warn("trackEIP1193Provider: Provider already tracked");this.registerAccountsChangedListener(e),this.isAutocaptureEnabled("chain")&&this.registerChainChangedListener(e),this.isAutocaptureEnabled("connect")&&this.registerConnectListener(e),this.isAutocaptureEnabled("signature")||this.isAutocaptureEnabled("transaction")?this.registerRequestListeners(e):f.logger.debug("TrackProvider: Skipping request wrapping (both signature and transaction autocapture disabled)"),this.isAutocaptureEnabled("disconnect")&&this.registerDisconnectListener(e),this._trackedProviders.add(e)}catch(e){f.logger.error("Error tracking provider:",e)}},e.prototype.trackProviders=function(e){try{for(var t=0,r=e;t<r.length;t++){var n=r[t],i=null==n?void 0:n.provider;i&&!this._trackedProviders.has(i)&&this.trackEIP1193Provider(i)}}catch(e){f.logger.error("Failed to track EIP-6963 providers during initialization:",e)}},e.prototype.addProviderListener=function(e,t,r){var n=this._providerListenersMap.get(e)||{};n[t]=r,this._providerListenersMap.set(e,n)},e.prototype.registerAccountsChangedListener=function(e){var t=this;f.logger.info("registerAccountsChangedListener");var r=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.onAccountsChanged(e,r[0])};e.on("accountsChanged",r),this.addProviderListener(e,"accountsChanged",r)},e.prototype.onAccountsChanged=function(e,t){return i(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:if(f.logger.info("onAccountsChanged",t),this._processingAccountsChanged)return f.logger.debug("OnAccountsChanged: Already processing accountsChanged, skipping",{provider:this.getProviderInfo(e).name}),[2];this._processingAccountsChanged=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this._handleAccountsChanged(e,t)];case 2:return r.sent(),[3,4];case 3:return this._processingAccountsChanged=!1,[7];case 4:return[2]}})})},e.prototype._handleAccountsChanged=function(e,t){return i(this,void 0,void 0,function(){var r,n,i,a,s,c,u,d,l,h;return o(this,function(o){switch(o.label){case 0:if(0!==t.length)return[3,9];if(this._provider!==e)return[3,7];if(f.logger.info("OnAccountsChanged: Detecting disconnect, current state:",{currentAddress:this.currentAddress,currentChainId:this.currentChainId,providerMatch:this._provider===e}),!this.isAutocaptureEnabled("disconnect"))return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.disconnect({chainId:this.currentChainId,address:this.currentAddress})];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),f.logger.error("Failed to disconnect provider on accountsChanged",r),[3,4];case 4:return[3,6];case 5:f.logger.debug("OnAccountsChanged: Disconnect event skipped (autocapture.disconnect: false)"),this.currentAddress=void 0,this.currentChainId=void 0,this.clearActiveProvider(),o.label=6;case 6:return[3,8];case 7:f.logger.info("OnAccountsChanged: Ignoring disconnect for non-active provider"),o.label=8;case 8:return[2];case 9:if(!(n=this.validateAndChecksumAddress(t[0])))return f.logger.warn("onAccountsChanged: Invalid address received",t[0]),[2];if(!this._provider||this._provider===e)return[3,26];i=this.currentAddress,a=this.validateAndChecksumAddress(n),f.logger.info("OnAccountsChanged: Different provider attempting to connect",{activeProvider:this.getProviderInfo(this._provider).name,eventProvider:this.getProviderInfo(e).name,currentStoredAddress:i,newProviderAddress:a}),o.label=10;case 10:return o.trys.push([10,22,,26]),[4,this.getAccounts(this._provider)];case 11:return s=o.sent(),f.logger.info("OnAccountsChanged: Checking current provider accounts",{activeProvider:this.getProviderInfo(this._provider).name,accountsLength:s?s.length:0,accounts:s}),s&&s.length>0?a&&i&&a!==i?(f.logger.info("OnAccountsChanged: Different address detected, switching providers despite current provider having accounts",{activeProvider:this.getProviderInfo(this._provider).name,eventProvider:this.getProviderInfo(e).name,currentAddress:i,newAddress:a,reason:"Address mismatch indicates wallet switch"}),this.isAutocaptureEnabled("disconnect")?[4,this.disconnect({chainId:this.currentChainId,address:this.currentAddress})]:[3,13]):[3,15]:[3,17];case 12:return o.sent(),[3,14];case 13:f.logger.debug("OnAccountsChanged: Disconnect event skipped during provider switch (autocapture.disconnect: false)"),this.currentAddress=void 0,this.currentChainId=void 0,o.label=14;case 14:return this.clearActiveProvider(),[3,16];case 15:return f.logger.info("OnAccountsChanged: Current provider still has accounts and same address, ignoring new provider",{activeProvider:this.getProviderInfo(this._provider).name,eventProvider:this.getProviderInfo(e).name,activeProviderAccountsCount:s.length,currentAddress:i,newAddress:a}),[2];case 16:return[3,21];case 17:return f.logger.info("OnAccountsChanged: Current provider has no accounts, switching to new provider",{oldProvider:this.getProviderInfo(this._provider).name,newProvider:this.getProviderInfo(e).name,reason:"Current provider has no accounts"}),this.isAutocaptureEnabled("disconnect")?[4,this.disconnect({chainId:this.currentChainId,address:this.currentAddress})]:[3,19];case 18:return o.sent(),[3,20];case 19:f.logger.debug("OnAccountsChanged: Disconnect event skipped for old provider (autocapture.disconnect: false)"),this.currentAddress=void 0,this.currentChainId=void 0,o.label=20;case 20:this.clearActiveProvider(),o.label=21;case 21:return[3,26];case 22:return c=o.sent(),f.logger.warn("OnAccountsChanged: Could not check current provider accounts, switching to new provider",{error:c instanceof Error?c.message:String(c),errorType:c instanceof Error?c.constructor.name:typeof c,oldProvider:this._provider?this.getProviderInfo(this._provider).name:"unknown",newProvider:this.getProviderInfo(e).name,reason:"Could not check current provider accounts"}),this.isAutocaptureEnabled("disconnect")?[4,this.disconnect({chainId:this.currentChainId,address:this.currentAddress})]:[3,24];case 23:return o.sent(),[3,25];case 24:f.logger.debug("OnAccountsChanged: Disconnect event skipped for failed provider check (autocapture.disconnect: false)"),this.currentAddress=void 0,this.currentChainId=void 0,o.label=25;case 25:return this.clearActiveProvider(),[3,26];case 26:return this._provider||(this._provider=e),this._provider===e&&n===this.currentAddress?[2]:[4,this.getCurrentChainId(e)];case 27:return u=o.sent(),d=!this.currentAddress,this.currentAddress=n,this.currentChainId=u,l=this.getProviderInfo(e),h=u||0,this.isAutocaptureEnabled("connect")?(f.logger.info("OnAccountsChanged: Detected wallet connection, emitting connect event",{chainId:u,address:n,wasDisconnected:d,providerName:l.name,rdns:l.rdns,hasChainId:!!u}),0===h&&f.logger.info("OnAccountsChanged: Using fallback chainId 0 for connect event"),this.connect({chainId:h,address:n},{providerName:l.name,rdns:l.rdns}).catch(function(e){f.logger.error("Failed to track connect event during account change:",e)})):f.logger.debug("OnAccountsChanged: Connect event skipped (autocapture.connect: false)",{chainId:u,address:n,providerName:l.name}),[2]}})})},e.prototype.registerChainChangedListener=function(e){var t=this;f.logger.info("registerChainChangedListener");var r=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.onChainChanged(e,r[0])};e.on("chainChanged",r),this.addProviderListener(e,"chainChanged",r)},e.prototype.onChainChanged=function(e,t){return i(this,void 0,void 0,function(){var r;return o(this,function(n){if(f.logger.info("onChainChanged",t),r=(0,b.parseChainId)(t),this.isProviderMismatch(e)&&this.handleProviderMismatch(e),!this.currentAddress)return f.logger.info("OnChainChanged: No current address, user appears disconnected"),[2,Promise.resolve()];this._provider||(this._provider=e),this.currentChainId=r;try{if(this.isAutocaptureEnabled("chain"))return[2,this.chain({chainId:this.currentChainId,address:this.currentAddress})];f.logger.debug("OnChainChanged: Chain event skipped (autocapture.chain: false)",{chainId:this.currentChainId,address:this.currentAddress})}catch(e){f.logger.error("OnChainChanged: Failed to emit chain event:",e)}return[2]})})},e.prototype.registerConnectListener=function(e){var t=this;f.logger.info("registerConnectListener");var r=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r[0];t.onConnected(e,i)};e.on("connect",r),this.addProviderListener(e,"connect",r)},e.prototype.registerDisconnectListener=function(e){var t=this;f.logger.info("registerDisconnectListener");var r=function(r){return i(t,void 0,void 0,function(){var t;return o(this,function(r){switch(r.label){case 0:if(this._provider!==e)return[2];if(f.logger.info("OnDisconnect: Wallet disconnect event received, current state:",{currentAddress:this.currentAddress,currentChainId:this.currentChainId}),!this.isAutocaptureEnabled("disconnect"))return[3,5];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.disconnect({chainId:this.currentChainId,address:this.currentAddress})];case 2:return r.sent(),[3,4];case 3:return t=r.sent(),f.logger.error("Error during disconnect in disconnect listener",t),[3,4];case 4:return[3,6];case 5:f.logger.debug("OnDisconnect: Disconnect event skipped (autocapture.disconnect: false)"),this.currentAddress=void 0,this.currentChainId=void 0,this.clearActiveProvider(),r.label=6;case 6:return[2]}})})};e.on("disconnect",r),this.addProviderListener(e,"disconnect",r)},e.prototype.onConnected=function(e,t){return i(this,void 0,void 0,function(){var r,n,i,a,s,c,u;return o(this,function(o){switch(o.label){case 0:f.logger.info("onConnected",t),o.label=1;case 1:return o.trys.push([1,3,,4]),(null==t?void 0:t.chainId)&&"string"==typeof t.chainId?(r=(0,b.parseChainId)(t.chainId),[4,this.getAddress(e)]):[2];case 2:return n=o.sent(),r&&n&&(i=!this.currentAddress,this._provider||(this._provider=e),(a=this._provider===e)&&(this.currentChainId=r,this.currentAddress=this.validateAndChecksumAddress(n)||void 0),a&&this.currentAddress?(c=this.getProviderInfo(e),s=r||0,this.isAutocaptureEnabled("connect")?(f.logger.info("OnConnected: Detected wallet connection, emitting connect event",{chainId:r,wasDisconnected:i,providerName:c.name,rdns:c.rdns,hasChainId:!!r,isActiveProvider:a}),0===s&&f.logger.info("OnConnected: Using fallback chainId 0 for connect event"),this.connect({chainId:s,address:n},{providerName:c.name,rdns:c.rdns}).catch(function(e){f.logger.error("Failed to track connect event during provider connection:",e)})):f.logger.debug("OnConnected: Connect event skipped (autocapture.connect: false)",{chainId:r,address:n,providerName:c.name})):n&&!a&&(c=this.getProviderInfo(e),f.logger.debug("OnConnected: Skipping connect event for non-active provider",{chainId:r,providerName:c.name,rdns:c.rdns,isActiveProvider:a,activeProviderInfo:this._provider?this.getProviderInfo(this._provider):null}))),[3,4];case 3:return u=o.sent(),f.logger.error("Error handling connect event",u),[3,4];case 4:return[2]}})})},e.prototype.registerRequestListeners=function(e){var t=this;if(f.logger.info("registerRequestListeners"),e){var r=e.request;if(this.isProviderAlreadyWrapped(e,r))f.logger.info("Provider already wrapped with our SDK; skipping request wrapping.");else{var a=e.request.bind(e),s=function(r){return i(t,[r],void 0,function(t){var r,s,c,u,d,l,h,p=this,g=t.method,y=t.params;return o(this,function(t){switch(t.label){case 0:return Array.isArray(y)&&["eth_signTypedData_v4","personal_sign"].includes(g)?this.isAutocaptureEnabled("signature")?(s=this.currentChainId)?[3,2]:[4,this.getCurrentChainId(e)]:(f.logger.debug("Signature event skipped (autocapture.signature: false)",{method:g}),[2,a({method:g,params:y})]):[3,6];case 1:s=t.sent(),t.label=2;case 2:r=s,i(p,void 0,void 0,function(){return o(this,function(e){try{this.signature(n({status:v.SignatureStatus.REQUESTED},this.buildSignatureEventPayload(g,y,void 0,r)))}catch(e){f.logger.error("Formo: Failed to track signature request",e)}return[2]})}),t.label=3;case 3:return t.trys.push([3,5,,6]),[4,a({method:g,params:y})];case 4:return(c=t.sent())&&i(p,void 0,void 0,function(){return o(this,function(e){try{this.signature(n({status:v.SignatureStatus.CONFIRMED},this.buildSignatureEventPayload(g,y,c,r)))}catch(e){f.logger.error("Formo: Failed to track signature confirmation",e)}return[2]})}),[2,c];case 5:throw u=t.sent(),4001===(null==(h=u)?void 0:h.code)&&i(p,void 0,void 0,function(){return o(this,function(e){try{this.signature(n({status:v.SignatureStatus.REJECTED},this.buildSignatureEventPayload(g,y,void 0,r)))}catch(e){f.logger.error("Formo: Failed to track signature rejection",e)}return[2]})}),u;case 6:if(!Array.isArray(y)||"eth_sendTransaction"!==g||!y[0])return[3,10];if(!this.isAutocaptureEnabled("transaction"))return f.logger.debug("Transaction event skipped (autocapture.transaction: false)",{method:g}),[2,a({method:g,params:y})];i(p,void 0,void 0,function(){var t,r;return o(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.buildTransactionEventPayload(y,e)];case 1:return t=i.sent(),this.transaction(n({status:v.TransactionStatus.STARTED},t)),[3,3];case 2:return r=i.sent(),f.logger.error("Formo: Failed to track transaction start",r),[3,3];case 3:return[2]}})}),t.label=7;case 7:return t.trys.push([7,9,,10]),[4,a({method:g,params:y})];case 8:return d=t.sent(),i(p,void 0,void 0,function(){var t,r;return o(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.buildTransactionEventPayload(y,e)];case 1:return t=i.sent(),this.transaction(n(n({status:v.TransactionStatus.BROADCASTED},t),{transactionHash:d})),this.pollTransactionReceipt(e,d,t),[3,3];case 2:return r=i.sent(),f.logger.error("Formo: Failed to track transaction broadcast",r),[3,3];case 3:return[2]}})}),[2,d];case 9:throw l=t.sent(),4001===(null==(h=l)?void 0:h.code)&&i(p,void 0,void 0,function(){var t,r;return o(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.buildTransactionEventPayload(y,e)];case 1:return t=i.sent(),this.transaction(n({status:v.TransactionStatus.REJECTED},t)),[3,3];case 2:return r=i.sent(),f.logger.error("Formo: Failed to track transaction rejection",r),[3,3];case 3:return[2]}})}),l;case 10:return[2,a({method:g,params:y})]}})})};s[v.WRAPPED_REQUEST_SYMBOL]=!0,e[v.WRAPPED_REQUEST_REF_SYMBOL]=s;try{e.request=s}catch(e){f.logger.warn("Failed to wrap provider.request; skipping",e)}}}else f.logger.error("Provider not found for request (signature, transaction) tracking")},e.prototype.onLocationChange=function(){return i(this,void 0,void 0,function(){return o(this,function(e){return(0,u.cookie)().get(c.SESSION_CURRENT_URL_KEY)!==window.location.href&&((0,u.cookie)().set(c.SESSION_CURRENT_URL_KEY,window.location.href),this.trackPageHit()),[2]})})},e.prototype.trackPageHits=function(){return i(this,void 0,void 0,function(){var e,t,r=this;return o(this,function(n){return e=history.pushState,history.pushState=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t);return window.dispatchEvent(new window.Event("locationchange")),n},t=history.replaceState,history.replaceState=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e);return window.dispatchEvent(new window.Event("locationchange")),n},window.addEventListener("popstate",function(){return r.onLocationChange()}),window.addEventListener("locationchange",function(){return r.onLocationChange()}),[2]})})},e.prototype.trackPageHit=function(e,t,r,n,a){return i(this,void 0,void 0,function(){var s=this;return o(this,function(u){return this.shouldTrack()?(setTimeout(function(){i(s,void 0,void 0,function(){var i;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.trackEvent(c.EventType.PAGE,{category:e,name:t},r,n,a)];case 1:return o.sent(),[3,3];case 2:return i=o.sent(),f.logger.error("Formo: Failed to track page hit",i),[3,3];case 3:return[2]}})})},300),[2]):(f.logger.info("Track page hit: Skipping event due to tracking configuration"),[2])})})},e.prototype.trackEvent=function(e,t,r,a,s){return i(this,void 0,void 0,function(){var i;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.shouldTrack()?[4,this.eventManager.addEvent(n(n({type:e},t),{properties:r,context:a,callback:s}),this.currentAddress,this.currentUserId)]:(f.logger.info("Skipping ".concat(e," event due to tracking configuration")),[2]);case 1:return o.sent(),[3,3];case 2:return i=o.sent(),f.logger.error("Error tracking event:",i),[3,3];case 3:return[2]}})})},e.prototype.shouldTrack=function(){if(this.hasOptedOutTracking())return!1;if("boolean"==typeof this.options.tracking)return this.options.tracking;if(null!==this.options.tracking&&"object"==typeof this.options.tracking&&!Array.isArray(this.options.tracking)){var e=this.options.tracking,t=e.excludeHosts,r=void 0===t?[]:t,n=e.excludePaths,i=void 0===n?[]:n,o=e.excludeChains,a=void 0===o?[]:o;if(r.length>0&&"undefined"!=typeof window){var s=window.location.hostname;if(r.includes(s))return!1}if(i.length>0&&"undefined"!=typeof window){var c=window.location.pathname;if(i.includes(c))return!1}return!(a.length>0&&this.currentChainId&&a.includes(this.currentChainId))}return!(0,m.isLocalhost)()},e.prototype.isAutocaptureEnabled=function(e){return void 0===this.options.autocapture||("boolean"==typeof this.options.autocapture?this.options.autocapture:null===this.options.autocapture||"object"!=typeof this.options.autocapture||!1!==this.options.autocapture[e])},e.prototype.getProviderInfo=function(e){var t=this._providers.find(function(t){return t.provider===e});if(t)return{name:t.info.name,rdns:t.info.rdns};var r=(0,p.detectInjectedProviderInfo)(e);return{name:r.name,rdns:r.rdns}},e.prototype.getProviders=function(){return i(this,void 0,void 0,function(){var e,t,r,n,c,u,d,l,h,g=this;return o(this,function(v){if(e=(0,s.createStore)(),t=e.getProviders(),e.subscribe(function(e){t=e;for(var r=e.filter(function(e){var t=null==e?void 0:e.provider;return t&&!g._seenProviders.has(t)}),n=0,a=r;n<a.length;n++){var s=a[n];g.safeAddProviderDetail(s)}var c=e.filter(function(e){var t=null==e?void 0:e.provider;return!!t&&!g._trackedProviders.has(t)});c.length>0&&(g.trackProviders(c),i(g,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.detectWallets(c)];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),f.logger.error("Formo: Failed to detect wallets",e),[3,3];case 3:return[2]}})})),g.cleanupUnavailableProviders()}),0===t.length){if(r="undefined"!=typeof window?window.ethereum:void 0){if(this._injectedProviderDetail&&this._injectedProviderDetail.provider===r)return this._trackedProviders.has(r)||this.trackEIP1193Provider(r),this._providers.some(function(e){return e.provider===r})||(this._providers=a(a([],this._providers,!0),[this._injectedProviderDetail],!1)),[2,this._providers];this._trackedProviders.has(r)||this.trackEIP1193Provider(r),n=(0,p.detectInjectedProviderInfo)(r),c={provider:r,info:n},this._injectedProviderDetail=c,this.safeAddProviderDetail(c)}return[2,this._providers]}for(u=t.filter(function(e){var t=null==e?void 0:e.provider;return t&&!g._seenProviders.has(t)}),d=0,l=u;d<l.length;d++)h=l[d],this.safeAddProviderDetail(h);return[2,this._providers]})})},Object.defineProperty(e.prototype,"providers",{get:function(){return this._providers},enumerable:!1,configurable:!0}),e.prototype.detectWallets=function(e){return i(this,void 0,void 0,function(){var t,r,n,i;return o(this,function(o){switch(o.label){case 0:o.trys.push([0,5,,6]),t=0,r=e,o.label=1;case 1:return t<r.length?(n=r[t],[4,this.detect({providerName:null==n?void 0:n.info.name,rdns:null==n?void 0:n.info.rdns})]):[3,4];case 2:o.sent(),o.label=3;case 3:return t++,[3,1];case 4:return[3,6];case 5:return i=o.sent(),f.logger.error("Error detect all wallets:",i),[3,6];case 6:return[2]}})})},Object.defineProperty(e.prototype,"provider",{get:function(){return this._provider},enumerable:!1,configurable:!0}),e.prototype.getAddress=function(e){return i(this,void 0,void 0,function(){var t,r,n;return o(this,function(i){switch(i.label){case 0:if(this.currentAddress)return[2,this.currentAddress];if(!(t=e||this.provider))return f.logger.info("The provider is not set"),[2,null];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.getAccounts(t)];case 2:return(r=i.sent())&&r.length>0?[2,this.validateAndChecksumAddress(r[0])||null]:[3,4];case 3:return 4001!==(null==(n=i.sent())?void 0:n.code)&&f.logger.error("FormoAnalytics::getAccounts: eth_accounts threw an error",n),[2,null];case 4:return[2,null]}})})},e.prototype.getAccounts=function(e){return i(this,void 0,void 0,function(){var t,r,n,i=this;return o(this,function(o){switch(o.label){case 0:t=e||this.provider,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,null==t?void 0:t.request({method:"eth_accounts"})];case 2:return(r=o.sent())&&0!==r.length?[2,r.map(function(e){return i.validateAndChecksumAddress(e)}).filter(function(e){return void 0!==e})]:[2,null];case 3:return 4001!==(null==(n=o.sent())?void 0:n.code)&&f.logger.error("FormoAnalytics::getAccounts: eth_accounts threw an error",n),[2,null];case 4:return[2]}})})},e.prototype.getCurrentChainId=function(e){return i(this,void 0,void 0,function(){var t,r,n;return o(this,function(i){switch(i.label){case 0:if(!(t=e||this.provider))return f.logger.error("Provider not set for chain ID"),[2,0];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,t.request({method:"eth_chainId"})];case 2:return(r=i.sent())?[2,(0,b.parseChainId)(r)]:(f.logger.info("Chain id not found"),[2,0]);case 3:return n=i.sent(),f.logger.error("eth_chainId threw an error:",n),[2,0];case 4:return[2]}})})},e.prototype.buildSignatureEventPayload=function(e,t,r,i){var o,a="personal_sign"===e?t[1]:t[0],s=this.validateAndChecksumAddress(a);if(!s)throw new Error("Invalid address in signature payload: ".concat(a));var c={chainId:null!==(o=null!=i?i:this.currentChainId)&&void 0!==o?o:void 0,address:s};if("personal_sign"===e){var u=Buffer.from(t[0].slice(2),"hex").toString("utf8");return n(n(n({},c),{message:u}),r?{signatureHash:r}:{})}return n(n(n({},c),{message:t[1]}),r?{signatureHash:r}:{})},e.prototype.buildTransactionEventPayload=function(e,t){return i(this,void 0,void 0,function(){var r,n,i,a,s,c,u,d;return o(this,function(o){switch(o.label){case 0:if(r=e[0],n=r.data,i=r.from,a=r.to,s=r.value,!(c=this.validateAndChecksumAddress(i)))throw new Error("Invalid address in transaction payload: ".concat(i));return d={},(u=this.currentChainId)?[3,2]:[4,this.getCurrentChainId(t)];case 1:u=o.sent(),o.label=2;case 2:return[2,(d.chainId=u,d.data=n,d.address=c,d.to=a,d.value=s,d)]}})})},e.prototype.pollTransactionReceipt=function(e,t,r){return i(this,arguments,void 0,function(e,t,r,a,s){var c,u,d=this;return void 0===a&&(a=10),void 0===s&&(s=3e3),o(this,function(l){return c=0,e?(u=function(){return i(d,void 0,void 0,function(){var i,d;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e.request({method:"eth_getTransactionReceipt",params:[t]})];case 1:if(i=o.sent()){if("0x1"===i.status||1===i.status)return this.transaction(n(n({status:v.TransactionStatus.CONFIRMED},r),{transactionHash:t})),[2];if("0x0"===i.status||0===i.status)return this.transaction(n(n({status:v.TransactionStatus.REVERTED},r),{transactionHash:t})),[2]}return[3,3];case 2:return d=o.sent(),f.logger.error("Error polling transaction receipt",d),[3,3];case 3:return++c<a&&setTimeout(u,s),[2]}})})},u(),[2]):[2]})})},e.prototype.removeProviderListeners=function(e){var t=this._providerListenersMap.get(e);if(t){for(var r=0,n=Object.entries(t);r<n.length;r++){var i=n[r],o=i[0],a=i[1];try{e.removeListener(o,a)}catch(e){f.logger.warn("Failed to remove listener for ".concat(String(o)),e)}}this._providerListenersMap.delete(e)}},e.prototype.untrackProvider=function(e){try{this.removeProviderListeners(e),this._trackedProviders.delete(e),this._provider===e&&this.clearActiveProvider()}catch(e){f.logger.warn("Failed to untrack provider",e)}},e.prototype.getTrackedProvidersCount=function(){return this._trackedProviders.size},e.prototype.getProviderState=function(){return{totalProviders:this._providers.length,trackedProviders:this._trackedProviders.size,seenProviders:this._seenProviders.size,activeProvider:!!this._provider}},e.prototype.cleanupUnavailableProviders=function(){for(var e=new Set(this._providers.map(function(e){return e.provider})),t=0,r=Array.from(this._trackedProviders);t<r.length;t++){var n=r[t];e.has(n)||(f.logger.info("Cleaning up unavailable provider: ".concat(n.constructor.name)),this.untrackProvider(n))}},e.prototype.isProviderAlreadyWrapped=function(e,t){return!(!t||"function"!=typeof t||!t[v.WRAPPED_REQUEST_SYMBOL]||e[v.WRAPPED_REQUEST_REF_SYMBOL]!==t)},e.prototype.handleProviderMismatch=function(e){this._provider&&(this.currentChainId=void 0,this.currentAddress=void 0),this._provider=e},e.prototype.validateAndChecksumAddress=function(e){var t=(0,A.getValidAddress)(e);return t?(0,y.toChecksumAddress)(t):void 0},e.prototype.clearActiveProvider=function(){this._provider=void 0},e.prototype.safeAddProviderDetail=function(e){var t=null==e?void 0:e.provider;return!!t&&(this._providers.some(function(e){return e.provider===t})?(this._seenProviders.add(t),!1):(this._providers=a(a([],this._providers,!0),[e],!1),this._seenProviders.add(t),!0))},e}();t.FormoAnalytics=E},9011:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9160:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(3696),t),i(r(4623),t),i(r(2856),t),i(r(8885),t),i(r(1586),t)},9478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestProviders=t.announceProvider=t.createStore=void 0;var n=r(4887);Object.defineProperty(t,"createStore",{enumerable:!0,get:function(){return n.createStore}});var i=r(8919);Object.defineProperty(t,"announceProvider",{enumerable:!0,get:function(){return i.announceProvider}}),Object.defineProperty(t,"requestProviders",{enumerable:!0,get:function(){return i.requestProviders}})},9517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},9763:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(971)),o=n(r(4267)),a=(0,i.default)(function(e,t,r){var n,i={};for(n in r=r||{},t=t||{})(0,o.default)(n,t)&&(i[n]=(0,o.default)(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)(0,o.default)(n,r)&&!(0,o.default)(n,i)&&(i[n]=r[n]);return i});t.default=a},9956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COUNTRY_LIST=t.EVENTS_API_REQUEST_HEADER=t.EVENTS_API_HOST=t.EVENTS_API_ORIGIN=void 0,t.EVENTS_API_ORIGIN="https://events.formo.so",t.EVENTS_API_HOST="".concat(t.EVENTS_API_ORIGIN,"/v0/raw_events"),t.EVENTS_API_REQUEST_HEADER=function(e){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}},t.COUNTRY_LIST={"Africa/Abidjan":"CI","Africa/Accra":"GH","Africa/Addis_Ababa":"ET","Africa/Algiers":"DZ","Africa/Asmara":"ER","Africa/Asmera":"ER","Africa/Bamako":"ML","Africa/Bangui":"CF","Africa/Banjul":"GM","Africa/Bissau":"GW","Africa/Blantyre":"MW","Africa/Brazzaville":"CG","Africa/Bujumbura":"BI","Africa/Cairo":"EG","Africa/Casablanca":"MA","Africa/Ceuta":"ES","Africa/Conakry":"GN","Africa/Dakar":"SN","Africa/Dar_es_Salaam":"TZ","Africa/Djibouti":"DJ","Africa/Douala":"CM","Africa/El_Aaiun":"EH","Africa/Freetown":"SL","Africa/Gaborone":"BW","Africa/Harare":"ZW","Africa/Johannesburg":"ZA","Africa/Juba":"SS","Africa/Kampala":"UG","Africa/Khartoum":"SD","Africa/Kigali":"RW","Africa/Kinshasa":"CD","Africa/Lagos":"NG","Africa/Libreville":"GA","Africa/Lome":"TG","Africa/Luanda":"AO","Africa/Lubumbashi":"CD","Africa/Lusaka":"ZM","Africa/Malabo":"GQ","Africa/Maputo":"MZ","Africa/Maseru":"LS","Africa/Mbabane":"SZ","Africa/Mogadishu":"SO","Africa/Monrovia":"LR","Africa/Nairobi":"KE","Africa/Ndjamena":"TD","Africa/Niamey":"NE","Africa/Nouakchott":"MR","Africa/Ouagadougou":"BF","Africa/Porto-Novo":"BJ","Africa/Sao_Tome":"ST","Africa/Timbuktu":"ML","Africa/Tripoli":"LY","Africa/Tunis":"TN","Africa/Windhoek":"NA","America/Adak":"US","America/Anchorage":"US","America/Anguilla":"AI","America/Antigua":"AG","America/Araguaina":"BR","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/ComodRivadavia":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","America/Aruba":"AW","America/Asuncion":"PY","America/Atikokan":"CA","America/Atka":"US","America/Bahia":"BR","America/Bahia_Banderas":"MX","America/Barbados":"BB","America/Belem":"BR","America/Belize":"BZ","America/Blanc-Sablon":"CA","America/Boa_Vista":"BR","America/Bogota":"CO","America/Boise":"US","America/Buenos_Aires":"AR","America/Cambridge_Bay":"CA","America/Campo_Grande":"BR","America/Cancun":"MX","America/Caracas":"VE","America/Catamarca":"AR","America/Cayenne":"GF","America/Cayman":"KY","America/Chicago":"US","America/Chihuahua":"MX","America/Ciudad_Juarez":"MX","America/Coral_Harbour":"CA","America/Cordoba":"AR","America/Costa_Rica":"CR","America/Creston":"CA","America/Cuiaba":"BR","America/Curacao":"CW","America/Danmarkshavn":"GL","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Denver":"US","America/Detroit":"US","America/Dominica":"DM","America/Edmonton":"CA","America/Eirunepe":"BR","America/El_Salvador":"SV","America/Ensenada":"MX","America/Fort_Nelson":"CA","America/Fort_Wayne":"US","America/Fortaleza":"BR","America/Glace_Bay":"CA","America/Godthab":"GL","America/Goose_Bay":"CA","America/Grand_Turk":"TC","America/Grenada":"GD","America/Guadeloupe":"GP","America/Guatemala":"GT","America/Guayaquil":"EC","America/Guyana":"GY","America/Halifax":"CA","America/Havana":"CU","America/Hermosillo":"MX","America/Indiana/Indianapoli":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Indianapoli":"US","America/Inuvik":"CA","America/Iqaluit":"CA","America/Jamaica":"JM","America/Jujuy":"AR","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Knox_IN":"US","America/Kralendijk":"BQ","America/La_Paz":"BO","America/Lima":"PE","America/Los_Angeles":"US","America/Louisville":"US","America/Lower_Princes":"SX","America/Maceio":"BR","America/Managua":"NI","America/Manaus":"BR","America/Marigot":"MF","America/Martinique":"MQ","America/Matamoros":"MX","America/Mazatlan":"MX","America/Mendoza":"AR","America/Menominee":"US","America/Merida":"MX","America/Metlakatla":"US","America/Mexico_City":"MX","America/Miquelon":"PM","America/Moncton":"CA","America/Monterrey":"MX","America/Montevideo":"UY","America/Montreal":"CA","America/Montserrat":"MS","America/Nassau":"BS","America/New_York":"US","America/Nipigon":"CA","America/Nome":"US","America/Noronha":"BR","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Nuuk":"GL","America/Ojinaga":"MX","America/Panama":"PA","America/Pangnirtung":"CA","America/Paramaribo":"SR","America/Phoenix":"US,CA","America/Port-au-Prince":"HT","America/Port_of_Spain":"TT","America/Porto_Acre":"BR","America/Porto_Velho":"BR","America/Puerto_Rico":"PR","America/Punta_Arenas":"CL","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Recife":"BR","America/Regina":"CA","America/Resolute":"CA","America/Rio_Branco":"BR","America/Rosario":"AR","America/Santa_Isabel":"MX","America/Santarem":"BR","America/Santiago":"CL","America/Santo_Domingo":"DO","America/Sao_Paulo":"BR","America/Scoresbysund":"GL","America/Shiprock":"US","America/Sitka":"US","America/St_Barthelemy":"BL","America/St_Johns":"CA","America/St_Kitts":"KN","America/St_Lucia":"LC","America/St_Thomas":"VI","America/St_Vincent":"VC","America/Swift_Current":"CA","America/Tegucigalpa":"HN","America/Thule":"GL","America/Thunder_Bay":"CA","America/Tijuana":"MX","America/Toronto":"CA","America/Tortola":"VG","America/Vancouver":"CA","America/Virgin":"VI","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yakutat":"US","America/Yellowknife":"CA","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Macquarie":"AU","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/South_Pole":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","Arctic/Longyearbyen":"SJ","Asia/Aden":"YE","Asia/Almaty":"KZ","Asia/Amman":"JO","Asia/Anadyr":"RU","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Ashgabat":"TM","Asia/Ashkhabad":"TM","Asia/Atyrau":"KZ","Asia/Baghdad":"IQ","Asia/Bahrain":"BH","Asia/Baku":"AZ","Asia/Bangkok":"TH","Asia/Barnaul":"RU","Asia/Beirut":"LB","Asia/Bishkek":"KG","Asia/Brunei":"BN","Asia/Calcutta":"IN","Asia/Chita":"RU","Asia/Choibalsan":"MN","Asia/Chongqing":"CN","Asia/Chungking":"CN","Asia/Colombo":"LK","Asia/Dacca":"BD","Asia/Damascus":"SY","Asia/Dhaka":"BD","Asia/Dili":"TL","Asia/Dubai":"AE","Asia/Dushanbe":"TJ","Asia/Famagusta":"CY","Asia/Gaza":"PS","Asia/Harbin":"CN","Asia/Hebron":"PS","Asia/Ho_Chi_Minh":"VN","Asia/Hong_Kong":"HK","Asia/Hovd":"MN","Asia/Irkutsk":"RU","Asia/Istanbul":"TR","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Jerusalem":"IL","Asia/Kabul":"AF","Asia/Kamchatka":"RU","Asia/Karachi":"PK","Asia/Kashgar":"CN","Asia/Kathmandu":"NP","Asia/Katmandu":"NP","Asia/Khandyga":"RU","Asia/Kolkata":"IN","Asia/Krasnoyarsk":"RU","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Asia/Kuwait":"KW","Asia/Macao":"MO","Asia/Macau":"MO","Asia/Magadan":"RU","Asia/Makassar":"ID","Asia/Manila":"PH","Asia/Muscat":"OM","Asia/Nicosia":"CY","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Oral":"KZ","Asia/Phnom_Penh":"KH","Asia/Pontianak":"ID","Asia/Pyongyang":"KP","Asia/Qatar":"QA","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Rangoon":"MM","Asia/Riyadh":"SA","Asia/Saigon":"VN","Asia/Sakhalin":"RU","Asia/Samarkand":"UZ","Asia/Seoul":"KR","Asia/Shanghai":"CN","Asia/Singapore":"SG","Asia/Srednekolymsk":"RU","Asia/Taipei":"TW","Asia/Tashkent":"UZ","Asia/Tbilisi":"GE","Asia/Tehran":"IR","Asia/Tel_Aviv":"IL","Asia/Thimbu":"BT","Asia/Thimphu":"BT","Asia/Tokyo":"JP","Asia/Tomsk":"RU","Asia/Ujung_Pandang":"ID","Asia/Ulaanbaatar":"MN","Asia/Ulan_Bator":"MN","Asia/Urumqi":"CN","Asia/Ust-Nera":"RU","Asia/Vientiane":"LA","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yangon":"MM","Asia/Yekaterinburg":"RU","Asia/Yerevan":"AM","Atlantic/Azores":"PT","Atlantic/Bermuda":"BM","Atlantic/Canary":"ES","Atlantic/Cape_Verde":"CV","Atlantic/Faeroe":"FO","Atlantic/Faroe":"FO","Atlantic/Jan_Mayen":"SJ","Atlantic/Madeira":"PT","Atlantic/Reykjavik":"IS","Atlantic/South_Georgia":"GS","Atlantic/St_Helena":"SH","Atlantic/Stanley":"FK","Australia/ACT":"AU","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Canberra":"AU","Australia/Currie":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/LHI":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/North":"AU","Australia/NSW":"AU","Australia/Perth":"AU","Australia/Queensland":"AU","Australia/South":"AU","Australia/Sydney":"AU","Australia/Tasmania":"AU","Australia/Victoria":"AU","Australia/West":"AU","Australia/Yancowinna":"AU","Brazil/Acre":"BR","Brazil/DeNoronha":"BR","Brazil/East":"BR","Brazil/West":"BR","Canada/Atlantic":"CA","Canada/Central":"CA","Canada/Eastern":"CA","Canada/Mountain":"CA","Canada/Newfoundland":"CA","Canada/Pacific":"CA","Canada/Saskatchewan":"CA","Canada/Yukon":"CA",CET:"CET","Chile/Continental":"CL","Chile/EasterIsland":"CL",CST6CDT:"CST6CDT",Cuba:"CU",EET:"EET",Egypt:"EG",Eire:"IE",EST:"EST",EST5EDT:"EST5EDT","Etc/GMT":"Etc/GMT","Etc/GMT+0":"Etc/GMT+0","Etc/GMT+1":"Etc/GMT+1","Etc/GMT+10":"Etc/GMT+10","Etc/GMT+11":"Etc/GMT+11","Etc/GMT+12":"Etc/GMT+12","Etc/GMT+2":"Etc/GMT+2","Etc/GMT+3":"Etc/GMT+3","Etc/GMT+4":"Etc/GMT+4","Etc/GMT+5":"Etc/GMT+5","Etc/GMT+6":"Etc/GMT+6","Etc/GMT+7":"Etc/GMT+7","Etc/GMT+8":"Etc/GMT+8","Etc/GMT+9":"Etc/GMT+9","Etc/GMT-0":"Etc/GMT-0","Etc/GMT-1":"Etc/GMT-1","Etc/GMT-10":"Etc/GMT-10","Etc/GMT-11":"Etc/GMT-11","Etc/GMT-12":"Etc/GMT-12","Etc/GMT-13":"Etc/GMT-13","Etc/GMT-14":"Etc/GMT-14","Etc/GMT-2":"Etc/GMT-2","Etc/GMT-3":"Etc/GMT-3","Etc/GMT-4":"Etc/GMT-4","Etc/GMT-5":"Etc/GMT-5","Etc/GMT-6":"Etc/GMT-6","Etc/GMT-7":"Etc/GMT-7","Etc/GMT-8":"Etc/GMT-8","Etc/GMT-9":"Etc/GMT-9","Etc/GMT0":"Etc/GMT0","Etc/Greenwich":"Etc/Greenwich","Etc/UCT":"Etc/UCT","Etc/UTC":"Etc/UTC","Etc/Universal":"Etc/Universal","Etc/Zulu":"Etc/Zulu","Europe/Amsterdam":"NL","Europe/Andorra":"AD","Europe/Astrakhan":"RU","Europe/Athens":"GR","Europe/Belfast":"GB","Europe/Belgrade":"RS","Europe/Berlin":"DE","Europe/Bratislava":"SK","Europe/Brussels":"BE","Europe/Bucharest":"RO","Europe/Budapest":"HU","Europe/Busingen":"DE","Europe/Chisinau":"MD","Europe/Copenhagen":"DK","Europe/Dublin":"IE","Europe/Gibraltar":"GI","Europe/Guernsey":"GG","Europe/Helsinki":"FI","Europe/Isle_of_Man":"IM","Europe/Istanbul":"TR","Europe/Jersey":"JE","Europe/Kaliningrad":"RU","Europe/Kiev":"UA","Europe/Kirov":"RU","Europe/Kyiv":"UA","Europe/Lisbon":"PT","Europe/Ljubljana":"SI","Europe/London":"GB","Europe/Luxembourg":"LU","Europe/Madrid":"ES","Europe/Malta":"MT","Europe/Mariehamn":"AX","Europe/Minsk":"BY","Europe/Monaco":"MC","Europe/Moscow":"RU","Europe/Nicosia":"CY","Europe/Oslo":"NO","Europe/Paris":"FR","Europe/Podgorica":"ME","Europe/Prague":"CZ","Europe/Riga":"LV","Europe/Rome":"IT","Europe/Samara":"RU","Europe/San_Marino":"SM","Europe/Sarajevo":"BA","Europe/Saratov":"RU","Europe/Simferopol":"RU","Europe/Skopje":"MK","Europe/Sofia":"BG","Europe/Stockholm":"SE","Europe/Tallinn":"EE","Europe/Tirane":"AL","Europe/Tiraspol":"MD","Europe/Ulyanovsk":"RU","Europe/Uzhgorod":"UA","Europe/Vaduz":"LI","Europe/Vatican":"VA","Europe/Vienna":"AT","Europe/Vilnius":"LT","Europe/Volgograd":"RU","Europe/Warsaw":"PL","Europe/Zagreb":"HR","Europe/Zaporozhye":"UA","Europe/Zurich":"CH",Factory:"Factory",GB:"GB","GB-Eire":"GB",GMT:"GMT","GMT+0":"GMT+0","GMT-0":"GMT-0",GMT0:"GMT0",Greenwich:"Greenwich",Hongkong:"HK",HST:"HST",Iceland:"IS","Indian/Antananarivo":"MG","Indian/Chagos":"IO","Indian/Christmas":"CX","Indian/Cocos":"CC","Indian/Comoro":"KM","Indian/Kerguelen":"TF","Indian/Mahe":"SC","Indian/Maldives":"MV","Indian/Mauritius":"MU","Indian/Mayotte":"YT","Indian/Reunion":"RE",Iran:"IR",Israel:"IL",Jamaica:"JM",Japan:"JP",Kwajalein:"MH",Libya:"LY",MET:"MET","Mexico/BajaNorte":"MX","Mexico/BajaSur":"MX","Mexico/General":"MX",MST:"MST",MST7MDT:"MST7MDT",Navajo:"US",NZ:"NZ","NZ-CHAT":"NZ","Pacific/Apia":"WS","Pacific/Auckland":"NZ","Pacific/Bougainville":"PG","Pacific/Chatham":"NZ","Pacific/Chuuk":"FM","Pacific/Easter":"CL","Pacific/Efate":"VU","Pacific/Enderbury":"KI","Pacific/Fakaofo":"TK","Pacific/Fiji":"FJ","Pacific/Funafuti":"TV","Pacific/Galapagos":"EC","Pacific/Gambier":"PF","Pacific/Guadalcanal":"SB","Pacific/Guam":"GU,MP","Pacific/Honolulu":"US","Pacific/Johnston":"UM","Pacific/Kanton":"KI","Pacific/Kiritimati":"KI","Pacific/Kosrae":"FM","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Pacific/Marquesas":"PF","Pacific/Midway":"UM","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Norfolk":"NF","Pacific/Noumea":"NC","Pacific/Pago_Pago":"AS","Pacific/Palau":"PW","Pacific/Pitcairn":"PN","Pacific/Pohnpei":"FM","Pacific/Ponape":"FM","Pacific/Port_Moresby":"PG","Pacific/Rarotonga":"CK","Pacific/Saipan":"MP","Pacific/Samoa":"AS","Pacific/Tahiti":"PF","Pacific/Tarawa":"KI","Pacific/Tongatapu":"TO","Pacific/Truk":"FM","Pacific/Wake":"UM","Pacific/Wallis":"WF","Pacific/Yap":"FM",Poland:"PL",Portugal:"PT",PRC:"CN",PST8PDT:"PST8PDT",ROC:"TW",ROK:"KR",Singapore:"SG",Turkey:"TR",UCT:"UCT",Universal:"Universal","US/Alaska":"US","US/Aleutian":"US","US/Arizona":"US","US/Central":"US","US/East-Indiana":"US","US/Eastern":"US","US/Hawaii":"US","US/Indiana-Starke":"US","US/Michigan":"US","US/Mountain":"US","US/Pacific":"US","US/Samoa":"AS",UTC:"UTC","W-SU":"RU",WET:"WET",Zulu:"Zulu"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var n=r(4618);return n.FormoAnalytics})());
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("FormoAnalytics",[],t):"object"==typeof exports?exports.FormoAnalytics=t():e.FormoAnalytics=t()}(self,()=>(()=>{"use strict";var e={11(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=o,t.anumber=a,t.abytes=i,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");a(e.outputLen),a(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=s,t.byteSwap32=c,t.bytesToHex=function(e){if(i(e),u)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=d[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(u)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=l(e.charCodeAt(o)),a=l(e.charCodeAt(o+1));if(void 0===r||void 0===a){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}n[t]=16*r+a}return n},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let a=0;a<e;a++){n(a);const e=Date.now()-o;e>=0&&e<r||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=f,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=p,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=f(e)),i(e),e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];i(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=m,t.createOptHasher=b,t.createXOFer=h,t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const n=r(9517);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function i(e,...t){if(!o(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=s(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>s(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;const u=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),d=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function l(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function f(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function p(e){return"string"==typeof e&&(e=f(e)),i(e),e}function m(e){const t=t=>e().update(p(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function b(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function h(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=m,t.wrapConstructorWithOpts=b,t.wrapXOFConstructorWithOpts=h},21(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.from=s,t.fromRpc=c,t.fromRpcList=function(e){return e.map(c)},t.fromTuple=u,t.fromTupleList=function(e){const t=[];for(const r of e)t.push(u(r));return t},t.getSignPayload=function(e){return d(e,{presign:!0})},t.hash=d,t.toRpc=l,t.toRpcList=function(e){return e.map(l)},t.toTuple=f,t.toTupleList=function(e){if(!e||0===e.length)return[];const t=[];for(const r of e)t.push(f(r));return t};const n=r(1398),o=r(1465),a=r(5126),i=r(2061);function s(e,t={}){return"string"==typeof e.chainId?c(e):{...e,...t.signature}}function c(e){const{address:t,chainId:r,nonce:n}=e,o=i.extract(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...o}}function u(e){const[t,r,n,o,a,c]=e;let u={address:r,chainId:"0x"===t?0:Number(t),nonce:"0x"===n?0n:BigInt(n)};return o&&a&&c&&(u={...u,...i.fromTuple([o,a,c])}),s(u)}function d(e,t={}){const{presign:r}=t;return n.keccak256(o.concat("0x05",a.fromHex(f(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function l(e){const{address:t,chainId:r,nonce:n,...a}=e;return{address:t,chainId:o.fromNumber(r),nonce:o.fromNumber(n),...i.toRpc(a)}}function f(e){const{address:t,chainId:r,nonce:n}=e,a=i.extract(e);return[r?o.fromNumber(r):"0x",t,n?o.fromNumber(n):"0x",...a?i.toTuple(a):[]]}},27(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=function(e,t){const r=t||"hex",s=(0,n.sha256)((0,o.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===r?s:(0,i.toHex)(s)};const n=r(1011),o=r(6611),a=r(1699),i=r(6669)},34(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCallsStatus=async function(e,t){const{atomic:r=!1,chainId:c,receipts:u,version:d="2.0.0",...l}=await async function(t){if(t.endsWith(s.fallbackMagicIdentifier.slice(2))){const r=(0,o.trim)((0,n.sliceHex)(t,-64,-32)),i=(0,n.sliceHex)(t,0,-64).slice(2).match(/.{1,64}/g),c=await Promise.all(i.map(t=>s.fallbackTransactionErrorMagicIdentifier.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:[`0x${t}`]},{dedupe:!0}):void 0)),u=c.some(e=>null===e)?100:c.every(e=>"0x1"===e?.status)?200:c.every(e=>"0x0"===e?.status)?500:600;return{atomic:!1,chainId:(0,a.hexToNumber)(r),receipts:c.filter(Boolean),status:u,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[t]})}(t.id),[f,p]=(()=>{const e=l.status;return e>=100&&e<200?["pending",e]:e>=200&&e<300?["success",e]:e>=300&&e<700?["failure",e]:"CONFIRMED"===e?["success",200]:"PENDING"===e?["pending",100]:[void 0,e]})();return{...l,atomic:r,chainId:c?(0,a.hexToNumber)(c):void 0,receipts:u?.map(e=>({...e,blockNumber:(0,a.hexToBigInt)(e.blockNumber),gasUsed:(0,a.hexToBigInt)(e.gasUsed),status:i.receiptStatuses[e.status]}))??[],statusCode:p,status:f,version:d}};const n=r(1972),o=r(7716),a=r(4130),i=r(3501),s=r(5790)},89(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpc=function(e){return{...e,amount:BigInt(e.amount),index:Number(e.index),validatorIndex:Number(e.validatorIndex)}},t.toRpc=function(e){return{address:e.address,amount:n.fromNumber(e.amount),index:n.fromNumber(e.index),validatorIndex:n.fromNumber(e.validatorIndex)}};const n=r(1465)},138(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.erc4626Abi=t.erc721Abi=t.erc1155Abi=t.erc20Abi_bytes32=t.erc20Abi=t.erc6492SignatureValidatorAbi=t.erc1271Abi=t.addressResolverAbi=t.textResolverAbi=t.universalResolverReverseAbi=t.universalResolverResolveAbi=t.batchGatewayAbi=t.multicall3Abi=void 0,t.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],t.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];const r=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];t.universalResolverResolveAbi=[...r,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],t.universalResolverReverseAbi=[...r,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],t.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],t.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],t.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],t.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],t.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],t.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],t.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],t.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]},140(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.custom=function(e,t={}){const{key:r="custom",methods:o,name:a="Custom Provider",retryDelay:i}=t;return({retryCount:s})=>(0,n.createTransport)({key:r,methods:o,name:a,request:e.request.bind(e),retryCount:t.retryCount??s,retryDelay:i,type:"custom"})};const n=r(2102)},165(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=u,t.expand_message_xof=d,t.hash_to_field=l,t.isogenyMap=function(e,t){const r=t.map(e=>Array.from(e).reverse());return(t,o)=>{const[a,i,s,c]=r.map(r=>r.reduce((r,n)=>e.add(e.mul(r,t),n))),[u,d]=(0,n.FpInvertBatch)(e,[i,c],!0);return t=e.mul(a,u),o=e.mul(o,e.mul(s,d)),{x:t,y:o}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");function n(r){return e.fromAffine(t(r))}function o(t){const r=t.clearCofactor();return r.equals(e.ZERO)?e.ZERO:(r.assertValidity(),r)}return{defaults:r,hashToCurve(e,t){const a=l(e,2,{...r,DST:r.DST,...t}),i=n(a[0]),s=n(a[1]);return o(i.add(s))},encodeToCurve:(e,t)=>o(n(l(e,1,{...r,DST:r.encodeDST,...t})[0])),mapToCurve(e){if(!Array.isArray(e))throw new Error("expected array of bigints");for(const t of e)if("bigint"!=typeof t)throw new Error("expected array of bigints");return o(n(e))}}};const n=r(2107),o=r(9056),a=o.bytesToNumberBE;function i(e,t){if(c(e),c(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function s(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e,t,r,n){(0,o.abytes)(e),(0,o.abytes)(t),c(r),t.length>255&&(t=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:a,blockLen:u}=n,d=Math.ceil(r/a);if(r>65535||d>255)throw new Error("expand_message_xmd: invalid lenInBytes");const l=(0,o.concatBytes)(t,i(t.length,1)),f=i(0,u),p=i(r,2),m=new Array(d),b=n((0,o.concatBytes)(f,e,p,i(0,1),l));m[0]=n((0,o.concatBytes)(b,i(1,1),l));for(let e=1;e<=d;e++){const t=[s(b,m[e-1]),i(e+1,1),l];m[e]=n((0,o.concatBytes)(...t))}return(0,o.concatBytes)(...m).slice(0,r)}function d(e,t,r,n,a){if((0,o.abytes)(e),(0,o.abytes)(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=a.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:r}).update(e).update(i(r,2)).update(t).update(i(t.length,1)).digest()}function l(e,t,r){(0,o.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:i,k:s,m:l,hash:f,expand:p,DST:m}=r;(0,o.abytes)(e),c(t);const b="string"==typeof m?(0,o.utf8ToBytes)(m):m,h=i.toString(2).length,y=Math.ceil((h+s)/8),g=t*l*y;let v;if("xmd"===p)v=u(e,b,g,f);else if("xof"===p)v=d(e,b,g,s,f);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');v=e}const E=new Array(t);for(let e=0;e<t;e++){const t=new Array(l);for(let r=0;r<l;r++){const o=y*(r+e*l),s=v.subarray(o,o+y);t[r]=(0,n.mod)(a(s),i)}E[e]=t}return E}},211(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.eip1559NetworkCache=t.defaultParameters=void 0,t.prepareTransactionRequest=async function(e,r){const{account:y=e.account,blobs:g,chain:v,gas:E,kzg:w,nonce:P,nonceManager:A,parameters:x=t.defaultParameters,type:I}=r,S=y?(0,n.parseAccount)(y):y,T={...r,...S?{from:S?.address}:{}};let O,_;async function j(){return O||(O=await(0,p.getAction)(e,i.getBlock,"getBlock")({blockTag:"latest"}),O)}async function C(){if(_)return _;if(v)return v.id;if(void 0!==r.chainId)return r.chainId;const t=await(0,p.getAction)(e,h.getChainId,"getChainId")({});return _=t,_}if(x.includes("nonce")&&void 0===P&&S)if(A){const t=await C();T.nonce=await A.consume({address:S.address,chainId:t,client:e})}else T.nonce=await(0,p.getAction)(e,s.getTransactionCount,"getTransactionCount")({address:S.address,blockTag:"pending"});if((x.includes("blobVersionedHashes")||x.includes("sidecars"))&&g&&w){const e=(0,u.blobsToCommitments)({blobs:g,kzg:w});if(x.includes("blobVersionedHashes")){const t=(0,l.commitmentsToVersionedHashes)({commitments:e,to:"hex"});T.blobVersionedHashes=t}if(x.includes("sidecars")){const t=(0,d.blobsToProofs)({blobs:g,commitments:e,kzg:w}),r=(0,f.toBlobSidecars)({blobs:g,commitments:e,proofs:t,to:"hex"});T.sidecars=r}}if(x.includes("chainId")&&(T.chainId=await C()),(x.includes("fees")||x.includes("type"))&&void 0===I)try{T.type=(0,b.getTransactionType)(T)}catch{let r=t.eip1559NetworkCache.get(e.uid);if(void 0===r){const n=await j();r="bigint"==typeof n?.baseFeePerGas,t.eip1559NetworkCache.set(e.uid,r)}T.type=r?"eip1559":"legacy"}if(x.includes("fees"))if("legacy"!==T.type&&"eip2930"!==T.type){if(void 0===T.maxFeePerGas||void 0===T.maxPriorityFeePerGas){const t=await j(),{maxFeePerGas:n,maxPriorityFeePerGas:a}=await(0,o.internal_estimateFeesPerGas)(e,{block:t,chain:v,request:T});if(void 0===r.maxPriorityFeePerGas&&r.maxFeePerGas&&r.maxFeePerGas<a)throw new c.MaxFeePerGasTooLowError({maxPriorityFeePerGas:a});T.maxPriorityFeePerGas=a,T.maxFeePerGas=n}}else{if(void 0!==r.maxFeePerGas||void 0!==r.maxPriorityFeePerGas)throw new c.Eip1559FeesNotSupportedError;if(void 0===r.gasPrice){const t=await j(),{gasPrice:r}=await(0,o.internal_estimateFeesPerGas)(e,{block:t,chain:v,request:T,type:"legacy"});T.gasPrice=r}}return x.includes("gas")&&void 0===E&&(T.gas=await(0,p.getAction)(e,a.estimateGas,"estimateGas")({...T,account:S,prepare:"local"===S?.type?[]:["blobVersionedHashes"]})),(0,m.assertRequest)(T),delete T.parameters,T};const n=r(9546),o=r(3434),a=r(2034),i=r(3248),s=r(9226),c=r(5035),u=r(4264),d=r(5295),l=r(3785),f=r(5231),p=r(3115),m=r(8901),b=r(4720),h=r(401);t.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],t.eip1559NetworkCache=new Map},219(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockTransactionCount=async function(e,{blockHash:t,blockNumber:r,blockTag:a="latest"}={}){const i=void 0!==r?(0,o.numberToHex)(r):void 0;let s;return s=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||a]},{dedupe:Boolean(i)}),(0,n.hexToNumber)(s)};const n=r(4130),o=r(6669)},233(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionResult=function(e){const{abi:t,args:r,functionName:s,data:c}=e;let u=t[0];if(s){const e=(0,a.getAbiItem)({abi:t,args:r,name:s});if(!e)throw new n.AbiFunctionNotFoundError(s,{docsPath:i});u=e}if("function"!==u.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:i});if(!u.outputs)throw new n.AbiFunctionOutputsNotFoundError(u.name,{docsPath:i});const d=(0,o.decodeAbiParameters)(u.outputs,c);return d&&d.length>1?d:d&&1===d.length?d[0]:void 0};const n=r(9797),o=r(8448),a=r(3123),i="/docs/contract/decodeFunctionResult"},243(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;const n=r(8064);class o extends n.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=o;class a extends n.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}t.UnknownTypeError=a;class i extends n.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}t.UnknownSolidityTypeError=i},259(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;const n=r(9061);class o extends n.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=o;class a extends n.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=a;class i extends n.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}t.InvalidStructSignatureError=i},309(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signMessage=async function(e,{account:t=e.account,message:r}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const i=(0,n.parseAccount)(t);if(i.signMessage)return i.signMessage({message:r});const s="string"==typeof r?(0,a.stringToHex)(r):r.raw instanceof Uint8Array?(0,a.toHex)(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,i.address]},{retryCount:0})};const n=r(9546),o=r(8328),a=r(6669)},312(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WagmiEventHandler=void 0;var n=r(2279);Object.defineProperty(t,"WagmiEventHandler",{enumerable:!0,get:function(){return n.WagmiEventHandler}})},317(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=function(e,t={}){const{key:r="fallback",name:n="Fallback",rank:o=!1,shouldThrow:a=s,retryCount:u,retryDelay:d}=t;return({chain:t,pollingInterval:s=4e3,timeout:l,...f})=>{let p=e,m=()=>{};const b=(0,i.createTransport)({key:r,name:n,async request({method:e,params:r}){let n;const o=async(i=0)=>{const s=p[i]({...f,chain:t,retryCount:0,timeout:l});try{const t=await s.request({method:e,params:r});return m({method:e,params:r,response:t,transport:s,status:"success"}),t}catch(c){if(m({error:c,method:e,params:r,transport:s,status:"error"}),a(c))throw c;if(i===p.length-1)throw c;if(n??=p.slice(i+1).some(r=>{const{include:n,exclude:o}=r({chain:t}).config.methods||{};return n?n.includes(e):!o||!o.includes(e)}),!n)throw c;return o(i+1)}};return o()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:e=>m=e,transports:p.map(e=>e({chain:t,retryCount:0}))});if(o){const e="object"==typeof o?o:{};c({chain:t,interval:e.interval??s,onTransports:e=>p=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:p,weights:e.weights})}return b}},t.shouldThrow=s,t.rankTransports=c;const n=r(6687),o=r(2564),a=r(4396),i=r(2102);function s(e){return!(!("code"in e)||"number"!=typeof e.code||e.code!==o.TransactionRejectedRpcError.code&&e.code!==o.UserRejectedRequestError.code&&!n.ExecutionRevertedError.nodeMessage.test(e.message)&&5e3!==e.code)}function c({chain:e,interval:t=4e3,onTransports:r,ping:n,sampleCount:o=10,timeout:i=1e3,transports:s,weights:c={}}){const{stability:u=.7,latency:d=.3}=c,l=[],f=async()=>{const c=await Promise.all(s.map(async t=>{const r=t({chain:e,retryCount:0,timeout:i}),o=Date.now();let a,s;try{await(n?n({transport:r}):r.request({method:"net_listening"})),s=1}catch{s=0}finally{a=Date.now()}return{latency:a-o,success:s}}));l.push(c),l.length>o&&l.shift();const p=Math.max(...l.map(e=>Math.max(...e.map(({latency:e})=>e)))),m=s.map((e,t)=>{const r=l.map(e=>e[t].latency),n=1-r.reduce((e,t)=>e+t,0)/r.length/p,o=l.map(e=>e[t].success),a=o.reduce((e,t)=>e+t,0)/o.length;return 0===a?[0,t]:[d*n+u*a,t]}).sort((e,t)=>t[0]-e[0]);r(m.map(([,e])=>s[e])),await(0,a.wait)(t),f()};f()}},364(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionSelector=void 0;const n=r(1972),o=r(6091);t.toFunctionSelector=e=>(0,n.slice)((0,o.toSignatureHash)(e),0,4)},375(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertCurrentChain=function({chain:e,currentChainId:t}){if(!e)throw new n.ChainNotFoundError;if(t!==e.id)throw new n.ChainMismatchError({chain:e,currentChainId:t})};const n=r(2078)},401(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=async function(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.hexToNumber)(t)};const n=r(4130)},446(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.COUNTRY_LIST=t.EVENTS_API_REQUEST_HEADER=t.EVENTS_API_HOST=t.EVENTS_API_ORIGIN=void 0,t.EVENTS_API_ORIGIN="https://events.formo.so",t.EVENTS_API_HOST="".concat(t.EVENTS_API_ORIGIN,"/v0/raw_events"),t.EVENTS_API_REQUEST_HEADER=function(e){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}},t.COUNTRY_LIST={"Africa/Abidjan":"CI","Africa/Accra":"GH","Africa/Addis_Ababa":"ET","Africa/Algiers":"DZ","Africa/Asmara":"ER","Africa/Asmera":"ER","Africa/Bamako":"ML","Africa/Bangui":"CF","Africa/Banjul":"GM","Africa/Bissau":"GW","Africa/Blantyre":"MW","Africa/Brazzaville":"CG","Africa/Bujumbura":"BI","Africa/Cairo":"EG","Africa/Casablanca":"MA","Africa/Ceuta":"ES","Africa/Conakry":"GN","Africa/Dakar":"SN","Africa/Dar_es_Salaam":"TZ","Africa/Djibouti":"DJ","Africa/Douala":"CM","Africa/El_Aaiun":"EH","Africa/Freetown":"SL","Africa/Gaborone":"BW","Africa/Harare":"ZW","Africa/Johannesburg":"ZA","Africa/Juba":"SS","Africa/Kampala":"UG","Africa/Khartoum":"SD","Africa/Kigali":"RW","Africa/Kinshasa":"CD","Africa/Lagos":"NG","Africa/Libreville":"GA","Africa/Lome":"TG","Africa/Luanda":"AO","Africa/Lubumbashi":"CD","Africa/Lusaka":"ZM","Africa/Malabo":"GQ","Africa/Maputo":"MZ","Africa/Maseru":"LS","Africa/Mbabane":"SZ","Africa/Mogadishu":"SO","Africa/Monrovia":"LR","Africa/Nairobi":"KE","Africa/Ndjamena":"TD","Africa/Niamey":"NE","Africa/Nouakchott":"MR","Africa/Ouagadougou":"BF","Africa/Porto-Novo":"BJ","Africa/Sao_Tome":"ST","Africa/Timbuktu":"ML","Africa/Tripoli":"LY","Africa/Tunis":"TN","Africa/Windhoek":"NA","America/Adak":"US","America/Anchorage":"US","America/Anguilla":"AI","America/Antigua":"AG","America/Araguaina":"BR","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/ComodRivadavia":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","America/Aruba":"AW","America/Asuncion":"PY","America/Atikokan":"CA","America/Atka":"US","America/Bahia":"BR","America/Bahia_Banderas":"MX","America/Barbados":"BB","America/Belem":"BR","America/Belize":"BZ","America/Blanc-Sablon":"CA","America/Boa_Vista":"BR","America/Bogota":"CO","America/Boise":"US","America/Buenos_Aires":"AR","America/Cambridge_Bay":"CA","America/Campo_Grande":"BR","America/Cancun":"MX","America/Caracas":"VE","America/Catamarca":"AR","America/Cayenne":"GF","America/Cayman":"KY","America/Chicago":"US","America/Chihuahua":"MX","America/Ciudad_Juarez":"MX","America/Coral_Harbour":"CA","America/Cordoba":"AR","America/Costa_Rica":"CR","America/Creston":"CA","America/Cuiaba":"BR","America/Curacao":"CW","America/Danmarkshavn":"GL","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Denver":"US","America/Detroit":"US","America/Dominica":"DM","America/Edmonton":"CA","America/Eirunepe":"BR","America/El_Salvador":"SV","America/Ensenada":"MX","America/Fort_Nelson":"CA","America/Fort_Wayne":"US","America/Fortaleza":"BR","America/Glace_Bay":"CA","America/Godthab":"GL","America/Goose_Bay":"CA","America/Grand_Turk":"TC","America/Grenada":"GD","America/Guadeloupe":"GP","America/Guatemala":"GT","America/Guayaquil":"EC","America/Guyana":"GY","America/Halifax":"CA","America/Havana":"CU","America/Hermosillo":"MX","America/Indiana/Indianapoli":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Indianapoli":"US","America/Inuvik":"CA","America/Iqaluit":"CA","America/Jamaica":"JM","America/Jujuy":"AR","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Knox_IN":"US","America/Kralendijk":"BQ","America/La_Paz":"BO","America/Lima":"PE","America/Los_Angeles":"US","America/Louisville":"US","America/Lower_Princes":"SX","America/Maceio":"BR","America/Managua":"NI","America/Manaus":"BR","America/Marigot":"MF","America/Martinique":"MQ","America/Matamoros":"MX","America/Mazatlan":"MX","America/Mendoza":"AR","America/Menominee":"US","America/Merida":"MX","America/Metlakatla":"US","America/Mexico_City":"MX","America/Miquelon":"PM","America/Moncton":"CA","America/Monterrey":"MX","America/Montevideo":"UY","America/Montreal":"CA","America/Montserrat":"MS","America/Nassau":"BS","America/New_York":"US","America/Nipigon":"CA","America/Nome":"US","America/Noronha":"BR","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Nuuk":"GL","America/Ojinaga":"MX","America/Panama":"PA","America/Pangnirtung":"CA","America/Paramaribo":"SR","America/Phoenix":"US,CA","America/Port-au-Prince":"HT","America/Port_of_Spain":"TT","America/Porto_Acre":"BR","America/Porto_Velho":"BR","America/Puerto_Rico":"PR","America/Punta_Arenas":"CL","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Recife":"BR","America/Regina":"CA","America/Resolute":"CA","America/Rio_Branco":"BR","America/Rosario":"AR","America/Santa_Isabel":"MX","America/Santarem":"BR","America/Santiago":"CL","America/Santo_Domingo":"DO","America/Sao_Paulo":"BR","America/Scoresbysund":"GL","America/Shiprock":"US","America/Sitka":"US","America/St_Barthelemy":"BL","America/St_Johns":"CA","America/St_Kitts":"KN","America/St_Lucia":"LC","America/St_Thomas":"VI","America/St_Vincent":"VC","America/Swift_Current":"CA","America/Tegucigalpa":"HN","America/Thule":"GL","America/Thunder_Bay":"CA","America/Tijuana":"MX","America/Toronto":"CA","America/Tortola":"VG","America/Vancouver":"CA","America/Virgin":"VI","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yakutat":"US","America/Yellowknife":"CA","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Macquarie":"AU","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/South_Pole":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","Arctic/Longyearbyen":"SJ","Asia/Aden":"YE","Asia/Almaty":"KZ","Asia/Amman":"JO","Asia/Anadyr":"RU","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Ashgabat":"TM","Asia/Ashkhabad":"TM","Asia/Atyrau":"KZ","Asia/Baghdad":"IQ","Asia/Bahrain":"BH","Asia/Baku":"AZ","Asia/Bangkok":"TH","Asia/Barnaul":"RU","Asia/Beirut":"LB","Asia/Bishkek":"KG","Asia/Brunei":"BN","Asia/Calcutta":"IN","Asia/Chita":"RU","Asia/Choibalsan":"MN","Asia/Chongqing":"CN","Asia/Chungking":"CN","Asia/Colombo":"LK","Asia/Dacca":"BD","Asia/Damascus":"SY","Asia/Dhaka":"BD","Asia/Dili":"TL","Asia/Dubai":"AE","Asia/Dushanbe":"TJ","Asia/Famagusta":"CY","Asia/Gaza":"PS","Asia/Harbin":"CN","Asia/Hebron":"PS","Asia/Ho_Chi_Minh":"VN","Asia/Hong_Kong":"HK","Asia/Hovd":"MN","Asia/Irkutsk":"RU","Asia/Istanbul":"TR","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Jerusalem":"IL","Asia/Kabul":"AF","Asia/Kamchatka":"RU","Asia/Karachi":"PK","Asia/Kashgar":"CN","Asia/Kathmandu":"NP","Asia/Katmandu":"NP","Asia/Khandyga":"RU","Asia/Kolkata":"IN","Asia/Krasnoyarsk":"RU","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Asia/Kuwait":"KW","Asia/Macao":"MO","Asia/Macau":"MO","Asia/Magadan":"RU","Asia/Makassar":"ID","Asia/Manila":"PH","Asia/Muscat":"OM","Asia/Nicosia":"CY","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Oral":"KZ","Asia/Phnom_Penh":"KH","Asia/Pontianak":"ID","Asia/Pyongyang":"KP","Asia/Qatar":"QA","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Rangoon":"MM","Asia/Riyadh":"SA","Asia/Saigon":"VN","Asia/Sakhalin":"RU","Asia/Samarkand":"UZ","Asia/Seoul":"KR","Asia/Shanghai":"CN","Asia/Singapore":"SG","Asia/Srednekolymsk":"RU","Asia/Taipei":"TW","Asia/Tashkent":"UZ","Asia/Tbilisi":"GE","Asia/Tehran":"IR","Asia/Tel_Aviv":"IL","Asia/Thimbu":"BT","Asia/Thimphu":"BT","Asia/Tokyo":"JP","Asia/Tomsk":"RU","Asia/Ujung_Pandang":"ID","Asia/Ulaanbaatar":"MN","Asia/Ulan_Bator":"MN","Asia/Urumqi":"CN","Asia/Ust-Nera":"RU","Asia/Vientiane":"LA","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yangon":"MM","Asia/Yekaterinburg":"RU","Asia/Yerevan":"AM","Atlantic/Azores":"PT","Atlantic/Bermuda":"BM","Atlantic/Canary":"ES","Atlantic/Cape_Verde":"CV","Atlantic/Faeroe":"FO","Atlantic/Faroe":"FO","Atlantic/Jan_Mayen":"SJ","Atlantic/Madeira":"PT","Atlantic/Reykjavik":"IS","Atlantic/South_Georgia":"GS","Atlantic/St_Helena":"SH","Atlantic/Stanley":"FK","Australia/ACT":"AU","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Canberra":"AU","Australia/Currie":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/LHI":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/North":"AU","Australia/NSW":"AU","Australia/Perth":"AU","Australia/Queensland":"AU","Australia/South":"AU","Australia/Sydney":"AU","Australia/Tasmania":"AU","Australia/Victoria":"AU","Australia/West":"AU","Australia/Yancowinna":"AU","Brazil/Acre":"BR","Brazil/DeNoronha":"BR","Brazil/East":"BR","Brazil/West":"BR","Canada/Atlantic":"CA","Canada/Central":"CA","Canada/Eastern":"CA","Canada/Mountain":"CA","Canada/Newfoundland":"CA","Canada/Pacific":"CA","Canada/Saskatchewan":"CA","Canada/Yukon":"CA",CET:"CET","Chile/Continental":"CL","Chile/EasterIsland":"CL",CST6CDT:"CST6CDT",Cuba:"CU",EET:"EET",Egypt:"EG",Eire:"IE",EST:"EST",EST5EDT:"EST5EDT","Etc/GMT":"Etc/GMT","Etc/GMT+0":"Etc/GMT+0","Etc/GMT+1":"Etc/GMT+1","Etc/GMT+10":"Etc/GMT+10","Etc/GMT+11":"Etc/GMT+11","Etc/GMT+12":"Etc/GMT+12","Etc/GMT+2":"Etc/GMT+2","Etc/GMT+3":"Etc/GMT+3","Etc/GMT+4":"Etc/GMT+4","Etc/GMT+5":"Etc/GMT+5","Etc/GMT+6":"Etc/GMT+6","Etc/GMT+7":"Etc/GMT+7","Etc/GMT+8":"Etc/GMT+8","Etc/GMT+9":"Etc/GMT+9","Etc/GMT-0":"Etc/GMT-0","Etc/GMT-1":"Etc/GMT-1","Etc/GMT-10":"Etc/GMT-10","Etc/GMT-11":"Etc/GMT-11","Etc/GMT-12":"Etc/GMT-12","Etc/GMT-13":"Etc/GMT-13","Etc/GMT-14":"Etc/GMT-14","Etc/GMT-2":"Etc/GMT-2","Etc/GMT-3":"Etc/GMT-3","Etc/GMT-4":"Etc/GMT-4","Etc/GMT-5":"Etc/GMT-5","Etc/GMT-6":"Etc/GMT-6","Etc/GMT-7":"Etc/GMT-7","Etc/GMT-8":"Etc/GMT-8","Etc/GMT-9":"Etc/GMT-9","Etc/GMT0":"Etc/GMT0","Etc/Greenwich":"Etc/Greenwich","Etc/UCT":"Etc/UCT","Etc/UTC":"Etc/UTC","Etc/Universal":"Etc/Universal","Etc/Zulu":"Etc/Zulu","Europe/Amsterdam":"NL","Europe/Andorra":"AD","Europe/Astrakhan":"RU","Europe/Athens":"GR","Europe/Belfast":"GB","Europe/Belgrade":"RS","Europe/Berlin":"DE","Europe/Bratislava":"SK","Europe/Brussels":"BE","Europe/Bucharest":"RO","Europe/Budapest":"HU","Europe/Busingen":"DE","Europe/Chisinau":"MD","Europe/Copenhagen":"DK","Europe/Dublin":"IE","Europe/Gibraltar":"GI","Europe/Guernsey":"GG","Europe/Helsinki":"FI","Europe/Isle_of_Man":"IM","Europe/Istanbul":"TR","Europe/Jersey":"JE","Europe/Kaliningrad":"RU","Europe/Kiev":"UA","Europe/Kirov":"RU","Europe/Kyiv":"UA","Europe/Lisbon":"PT","Europe/Ljubljana":"SI","Europe/London":"GB","Europe/Luxembourg":"LU","Europe/Madrid":"ES","Europe/Malta":"MT","Europe/Mariehamn":"AX","Europe/Minsk":"BY","Europe/Monaco":"MC","Europe/Moscow":"RU","Europe/Nicosia":"CY","Europe/Oslo":"NO","Europe/Paris":"FR","Europe/Podgorica":"ME","Europe/Prague":"CZ","Europe/Riga":"LV","Europe/Rome":"IT","Europe/Samara":"RU","Europe/San_Marino":"SM","Europe/Sarajevo":"BA","Europe/Saratov":"RU","Europe/Simferopol":"RU","Europe/Skopje":"MK","Europe/Sofia":"BG","Europe/Stockholm":"SE","Europe/Tallinn":"EE","Europe/Tirane":"AL","Europe/Tiraspol":"MD","Europe/Ulyanovsk":"RU","Europe/Uzhgorod":"UA","Europe/Vaduz":"LI","Europe/Vatican":"VA","Europe/Vienna":"AT","Europe/Vilnius":"LT","Europe/Volgograd":"RU","Europe/Warsaw":"PL","Europe/Zagreb":"HR","Europe/Zaporozhye":"UA","Europe/Zurich":"CH",Factory:"Factory",GB:"GB","GB-Eire":"GB",GMT:"GMT","GMT+0":"GMT+0","GMT-0":"GMT-0",GMT0:"GMT0",Greenwich:"Greenwich",Hongkong:"HK",HST:"HST",Iceland:"IS","Indian/Antananarivo":"MG","Indian/Chagos":"IO","Indian/Christmas":"CX","Indian/Cocos":"CC","Indian/Comoro":"KM","Indian/Kerguelen":"TF","Indian/Mahe":"SC","Indian/Maldives":"MV","Indian/Mauritius":"MU","Indian/Mayotte":"YT","Indian/Reunion":"RE",Iran:"IR",Israel:"IL",Jamaica:"JM",Japan:"JP",Kwajalein:"MH",Libya:"LY",MET:"MET","Mexico/BajaNorte":"MX","Mexico/BajaSur":"MX","Mexico/General":"MX",MST:"MST",MST7MDT:"MST7MDT",Navajo:"US",NZ:"NZ","NZ-CHAT":"NZ","Pacific/Apia":"WS","Pacific/Auckland":"NZ","Pacific/Bougainville":"PG","Pacific/Chatham":"NZ","Pacific/Chuuk":"FM","Pacific/Easter":"CL","Pacific/Efate":"VU","Pacific/Enderbury":"KI","Pacific/Fakaofo":"TK","Pacific/Fiji":"FJ","Pacific/Funafuti":"TV","Pacific/Galapagos":"EC","Pacific/Gambier":"PF","Pacific/Guadalcanal":"SB","Pacific/Guam":"GU,MP","Pacific/Honolulu":"US","Pacific/Johnston":"UM","Pacific/Kanton":"KI","Pacific/Kiritimati":"KI","Pacific/Kosrae":"FM","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Pacific/Marquesas":"PF","Pacific/Midway":"UM","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Norfolk":"NF","Pacific/Noumea":"NC","Pacific/Pago_Pago":"AS","Pacific/Palau":"PW","Pacific/Pitcairn":"PN","Pacific/Pohnpei":"FM","Pacific/Ponape":"FM","Pacific/Port_Moresby":"PG","Pacific/Rarotonga":"CK","Pacific/Saipan":"MP","Pacific/Samoa":"AS","Pacific/Tahiti":"PF","Pacific/Tarawa":"KI","Pacific/Tongatapu":"TO","Pacific/Truk":"FM","Pacific/Wake":"UM","Pacific/Wallis":"WF","Pacific/Yap":"FM",Poland:"PL",Portugal:"PT",PRC:"CN",PST8PDT:"PST8PDT",ROC:"TW",ROK:"KR",Singapore:"SG",Turkey:"TR",UCT:"UCT",Universal:"Universal","US/Alaska":"US","US/Aleutian":"US","US/Arizona":"US","US/Central":"US","US/East-Indiana":"US","US/Eastern":"US","US/Hawaii":"US","US/Indiana-Starke":"US","US/Michigan":"US","US/Mountain":"US","US/Pacific":"US","US/Samoa":"AS",UTC:"UTC","W-SU":"RU",WET:"WET",Zulu:"Zulu"}},490(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockTimestamp=async function(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,n.numberToHex)(t)]})};const n=r(6669)},501(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransaction=async function(e,{blockHash:t,blockNumber:r,blockTag:i,hash:s,index:c,sender:u,nonce:d}){const l=i||"latest",f=void 0!==r?(0,o.numberToHex)(r):void 0;let p=null;if(s?p=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?p=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,o.numberToHex)(c)]},{dedupe:!0}):(f||l)&&"number"==typeof c?p=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||l,(0,o.numberToHex)(c)]},{dedupe:Boolean(f)}):u&&"number"==typeof d&&(p=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[u,(0,o.numberToHex)(d)]},{dedupe:!0})),!p)throw new n.TransactionNotFoundError({blockHash:t,blockNumber:r,blockTag:l,hash:s,index:c});return(e.chain?.formatters?.transaction?.format||a.formatTransaction)(p,"getTransaction")};const n=r(979),o=r(6669),a=r(7477)},503(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isLocalhost=void 0,t.isLocalhost=function(){return/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*:)*?:?0*1$/.test(window.location.hostname)||"file:"===window.location.protocol}},546(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.localBatchGatewayUrl=void 0,t.localBatchGatewayRequest=async function e(r){const{data:c,ccipRequest:u}=r,{args:[d]}=(0,a.decodeFunctionData)({abi:n.batchGatewayAbi,data:c}),l=[],f=[];return await Promise.all(d.map(async(r,a)=>{try{f[a]=r.urls.includes(t.localBatchGatewayUrl)?await e({data:r.data,ccipRequest:u}):await u(r),l[a]=!1}catch(e){l[a]=!0,f[a]="HttpRequestError"===(s=e).name&&s.status?(0,i.encodeErrorResult)({abi:n.batchGatewayAbi,errorName:"HttpError",args:[s.status,s.shortMessage]}):(0,i.encodeErrorResult)({abi:[o.solidityError],errorName:"Error",args:["shortMessage"in s?s.shortMessage:s.message]})}var s})),(0,s.encodeFunctionResult)({abi:n.batchGatewayAbi,functionName:"query",result:[l,f]})};const n=r(138),o=r(3792),a=r(1756),i=r(6406),s=r(6801);t.localBatchGatewayUrl="x-batch-gateway:true"},550(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.inspectTxpool=async function(e){return await e.request({method:"txpool_inspect"})}},572(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createPublicClient=function(e){const{key:t="public",name:r="Public Client"}=e;return(0,n.createClient)({...e,key:t,name:r,type:"publicClient"}).extend(o.publicActions)};const n=r(4745),o=r(6845)},574(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeEventTopics=function(e){const{abi:t,eventName:r,args:o}=e;let a=t[0];if(r){const e=(0,d.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiEventNotFoundError(r,{docsPath:l});a=e}if("event"!==a.type)throw new n.AbiEventNotFoundError(void 0,{docsPath:l});const i=(0,u.formatAbiItem)(a),c=(0,s.toEventSelector)(i);let p=[];if(o&&"inputs"in a){const e=a.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(o)?o:Object.values(o).length>0?e?.map(e=>o[e.name])??[]:[];t.length>0&&(p=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,o)=>f({param:e,value:t[r][o]})):void 0!==t[r]&&null!==t[r]?f({param:e,value:t[r]}):null)??[])}return[c,...p]};const n=r(9797),o=r(7505),a=r(1699),i=r(1725),s=r(2644),c=r(3224),u=r(1508),d=r(3123),l="/docs/contract/encodeEventTopics";function f({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,i.keccak256)((0,a.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(e.type);return(0,c.encodeAbiParameters)([e],[t])}},681(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.aoutput=t.anumber=t.aexists=t.abytes=void 0;const n=r(11);t.abytes=n.abytes,t.aexists=n.aexists,t.anumber=n.anumber,t.aoutput=n.aoutput},719(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.maxInt8=t.universalSignatureValidatorByteCode=t.erc6492SignatureValidatorByteCode=t.deploylessCallViaFactoryBytecode=t.deploylessCallViaBytecodeBytecode=t.zeroHash=t.zeroAddress=t.ethAddress=t.multicall3Abi=t.universalSignatureValidatorAbi=t.erc6492SignatureValidatorAbi=t.erc4626Abi=t.erc1155Abi=t.erc721Abi=t.erc20Abi_bytes32=t.erc20Abi=t.webSocket=t.http=t.shouldThrow=t.fallback=t.custom=t.createTransport=t.walletActions=t.testActions=t.publicActions=t.createWalletClient=t.createTestClient=t.createPublicClient=t.rpcSchema=t.createClient=t.WaitForCallsStatusTimeoutError=t.getContract=t.UnknownTypeError=t.UnknownSignatureError=t.SolidityProtectedKeywordError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.InvalidStructSignatureError=t.InvalidSignatureError=t.InvalidParenthesisError=t.InvalidParameterError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=t.InvalidAbiItemError=t.CircularReferenceError=void 0,t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=void 0,t.AbiConstructorNotFoundError=t.weiUnits=t.gweiUnits=t.etherUnits=t.presignMessagePrefix=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=void 0,t.EnsAvatarUriResolutionError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarInvalidNftUriError=t.SizeOverflowError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=t.SliceOffsetOutOfBoundsError=t.SizeExceedsPaddingSizeError=t.RawContractError=t.CounterfactualDeploymentFailedError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=t.BundleFailedError=t.BlockNotFoundError=t.setErrorConfig=t.BaseError=t.InvalidAddressError=t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiEncodingTypeError=t.InvalidAbiDecodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiEventNotFoundError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=void 0,t.UnsupportedProviderMethodError=t.UnsupportedNonOptionalCapabilityError=t.UnsupportedChainIdError=t.UnknownRpcError=t.UnknownBundleIdError=t.UnauthorizedProviderError=t.TransactionRejectedRpcError=t.SwitchChainError=t.RpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.ProviderRpcError=t.ProviderDisconnectedError=t.ParseRpcError=t.MethodNotSupportedRpcError=t.MethodNotFoundRpcError=t.LimitExceededRpcError=t.JsonRpcVersionUnsupportedError=t.InvalidRequestRpcError=t.InvalidParamsRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.DuplicateIdError=t.ChainDisconnectedError=t.BundleTooLargeError=t.AtomicReadyWalletRejectedUpgradeError=t.AtomicityNotSupportedError=t.WebSocketRequestError=t.TimeoutError=t.SocketClosedError=t.RpcRequestError=t.HttpRequestError=t.UnknownNodeError=t.TransactionTypeNotSupportedError=t.TipAboveFeeCapError=t.NonceTooLowError=t.NonceTooHighError=t.NonceMaxValueError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=t.FilterTypeNotSupportedError=t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=t.EstimateGasExecutionError=t.EnsInvalidChainIdError=void 0,t.toBlobs=t.toBlobSidecars=t.sidecarsToVersionedHashes=t.fromBlobs=t.commitmentToVersionedHash=t.commitmentsToVersionedHashes=t.blobsToProofs=t.blobsToCommitments=t.isAddressEqual=t.isAddress=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAddress=t.checksumAddress=t.prepareEncodeFunctionData=t.parseEventLogs=t.getAbiItem=t.encodePacked=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeDeployData=t.decodeAbiParameters=t.EIP1193ProviderRpcError=t.InvalidDecimalNumberError=t.InvalidStructTypeError=t.InvalidPrimaryTypeError=t.InvalidDomainError=t.UrlRequiredError=t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializedTransactionError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.StateAssignmentConflictError=t.AccountStateConflictError=t.UserRejectedRequestError=void 0,t.getContractError=t.toCoinType=t.namehash=t.labelhash=t.toRlp=t.hexToRlp=t.bytesToRlp=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigInt=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=t.isHex=t.isBytes=t.concatHex=t.concatBytes=t.concat=t.getChainContractAddress=t.extractChain=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.ccipRequest=void 0,t.recoverTypedDataAddress=t.recoverTransactionAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.parseSignature=t.hexToSignature=t.parseErc8010Signature=t.parseErc6492Signature=t.parseCompactSignature=t.hexToCompactSignature=t.isErc8010Signature=t.isErc6492Signature=t.hashTypedData=t.hashStruct=t.hashDomain=t.hashMessage=t.compactSignatureToSignature=t.withTimeout=t.withRetry=t.withCache=t.nonceManager=t.createNonceManager=t.setupKzg=t.defineKzg=t.getFunctionSignature=t.toFunctionSignature=t.getFunctionSelector=t.toFunctionSelector=t.toFunctionHash=t.getEventSignature=t.toEventSignature=t.getEventSelector=t.toEventSelector=t.toEventHash=t.sha256=t.ripemd160=t.keccak256=t.isHash=t.rpcTransactionType=t.formatTransactionRequest=t.defineTransactionRequest=t.formatTransactionReceipt=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatLog=t.formatBlock=t.defineBlock=void 0,t.parseUnits=t.parseGwei=t.parseEther=t.formatUnits=t.formatGwei=t.formatEther=t.validateTypedData=t.serializeTypedData=t.getTypesForEIP712Domain=t.domainSeparator=t.serializeTransaction=t.serializeAccessList=t.parseTransaction=t.getTransactionType=t.getSerializedTransactionType=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.stringify=t.verifyTypedData=t.verifyMessage=t.verifyHash=t.toPrefixedMessage=t.signatureToCompactSignature=t.serializeSignature=t.signatureToHex=t.serializeErc8010Signature=t.serializeErc6492Signature=t.serializeCompactSignature=t.compactSignatureToHex=void 0;var n=r(3863);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return n.CircularReferenceError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return n.InvalidAbiItemError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return n.InvalidAbiParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return n.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return n.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return n.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return n.InvalidModifierError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return n.InvalidParameterError}}),Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return n.InvalidParenthesisError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return n.InvalidSignatureError}}),Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return n.InvalidStructSignatureError}}),Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return n.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return n.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return n.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return n.parseAbiParameters}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return n.SolidityProtectedKeywordError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return n.UnknownSignatureError}}),Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return n.UnknownTypeError}});var o=r(6185);Object.defineProperty(t,"getContract",{enumerable:!0,get:function(){return o.getContract}});var a=r(1374);Object.defineProperty(t,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return a.WaitForCallsStatusTimeoutError}});var i=r(4745);Object.defineProperty(t,"createClient",{enumerable:!0,get:function(){return i.createClient}}),Object.defineProperty(t,"rpcSchema",{enumerable:!0,get:function(){return i.rpcSchema}});var s=r(572);Object.defineProperty(t,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var c=r(7905);Object.defineProperty(t,"createTestClient",{enumerable:!0,get:function(){return c.createTestClient}});var u=r(7416);Object.defineProperty(t,"createWalletClient",{enumerable:!0,get:function(){return u.createWalletClient}});var d=r(6845);Object.defineProperty(t,"publicActions",{enumerable:!0,get:function(){return d.publicActions}});var l=r(5091);Object.defineProperty(t,"testActions",{enumerable:!0,get:function(){return l.testActions}});var f=r(4366);Object.defineProperty(t,"walletActions",{enumerable:!0,get:function(){return f.walletActions}});var p=r(2102);Object.defineProperty(t,"createTransport",{enumerable:!0,get:function(){return p.createTransport}});var m=r(140);Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return m.custom}});var b=r(317);Object.defineProperty(t,"fallback",{enumerable:!0,get:function(){return b.fallback}}),Object.defineProperty(t,"shouldThrow",{enumerable:!0,get:function(){return b.shouldThrow}});var h=r(9867);Object.defineProperty(t,"http",{enumerable:!0,get:function(){return h.http}});var y=r(7472);Object.defineProperty(t,"webSocket",{enumerable:!0,get:function(){return y.webSocket}});var g=r(138);Object.defineProperty(t,"erc20Abi",{enumerable:!0,get:function(){return g.erc20Abi}}),Object.defineProperty(t,"erc20Abi_bytes32",{enumerable:!0,get:function(){return g.erc20Abi_bytes32}}),Object.defineProperty(t,"erc721Abi",{enumerable:!0,get:function(){return g.erc721Abi}}),Object.defineProperty(t,"erc1155Abi",{enumerable:!0,get:function(){return g.erc1155Abi}}),Object.defineProperty(t,"erc4626Abi",{enumerable:!0,get:function(){return g.erc4626Abi}}),Object.defineProperty(t,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return g.erc6492SignatureValidatorAbi}}),Object.defineProperty(t,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return g.erc6492SignatureValidatorAbi}}),Object.defineProperty(t,"multicall3Abi",{enumerable:!0,get:function(){return g.multicall3Abi}});var v=r(5165);Object.defineProperty(t,"ethAddress",{enumerable:!0,get:function(){return v.ethAddress}}),Object.defineProperty(t,"zeroAddress",{enumerable:!0,get:function(){return v.zeroAddress}});var E=r(8165);Object.defineProperty(t,"zeroHash",{enumerable:!0,get:function(){return E.zeroHash}});var w=r(4442);Object.defineProperty(t,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return w.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(t,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return w.deploylessCallViaFactoryBytecode}}),Object.defineProperty(t,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return w.erc6492SignatureValidatorByteCode}}),Object.defineProperty(t,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return w.erc6492SignatureValidatorByteCode}});var P=r(8492);Object.defineProperty(t,"maxInt8",{enumerable:!0,get:function(){return P.maxInt8}}),Object.defineProperty(t,"maxInt16",{enumerable:!0,get:function(){return P.maxInt16}}),Object.defineProperty(t,"maxInt24",{enumerable:!0,get:function(){return P.maxInt24}}),Object.defineProperty(t,"maxInt32",{enumerable:!0,get:function(){return P.maxInt32}}),Object.defineProperty(t,"maxInt40",{enumerable:!0,get:function(){return P.maxInt40}}),Object.defineProperty(t,"maxInt48",{enumerable:!0,get:function(){return P.maxInt48}}),Object.defineProperty(t,"maxInt56",{enumerable:!0,get:function(){return P.maxInt56}}),Object.defineProperty(t,"maxInt64",{enumerable:!0,get:function(){return P.maxInt64}}),Object.defineProperty(t,"maxInt72",{enumerable:!0,get:function(){return P.maxInt72}}),Object.defineProperty(t,"maxInt80",{enumerable:!0,get:function(){return P.maxInt80}}),Object.defineProperty(t,"maxInt88",{enumerable:!0,get:function(){return P.maxInt88}}),Object.defineProperty(t,"maxInt96",{enumerable:!0,get:function(){return P.maxInt96}}),Object.defineProperty(t,"maxInt104",{enumerable:!0,get:function(){return P.maxInt104}}),Object.defineProperty(t,"maxInt112",{enumerable:!0,get:function(){return P.maxInt112}}),Object.defineProperty(t,"maxInt120",{enumerable:!0,get:function(){return P.maxInt120}}),Object.defineProperty(t,"maxInt128",{enumerable:!0,get:function(){return P.maxInt128}}),Object.defineProperty(t,"maxInt136",{enumerable:!0,get:function(){return P.maxInt136}}),Object.defineProperty(t,"maxInt144",{enumerable:!0,get:function(){return P.maxInt144}}),Object.defineProperty(t,"maxInt152",{enumerable:!0,get:function(){return P.maxInt152}}),Object.defineProperty(t,"maxInt160",{enumerable:!0,get:function(){return P.maxInt160}}),Object.defineProperty(t,"maxInt168",{enumerable:!0,get:function(){return P.maxInt168}}),Object.defineProperty(t,"maxInt176",{enumerable:!0,get:function(){return P.maxInt176}}),Object.defineProperty(t,"maxInt184",{enumerable:!0,get:function(){return P.maxInt184}}),Object.defineProperty(t,"maxInt192",{enumerable:!0,get:function(){return P.maxInt192}}),Object.defineProperty(t,"maxInt200",{enumerable:!0,get:function(){return P.maxInt200}}),Object.defineProperty(t,"maxInt208",{enumerable:!0,get:function(){return P.maxInt208}}),Object.defineProperty(t,"maxInt216",{enumerable:!0,get:function(){return P.maxInt216}}),Object.defineProperty(t,"maxInt224",{enumerable:!0,get:function(){return P.maxInt224}}),Object.defineProperty(t,"maxInt232",{enumerable:!0,get:function(){return P.maxInt232}}),Object.defineProperty(t,"maxInt240",{enumerable:!0,get:function(){return P.maxInt240}}),Object.defineProperty(t,"maxInt248",{enumerable:!0,get:function(){return P.maxInt248}}),Object.defineProperty(t,"maxInt256",{enumerable:!0,get:function(){return P.maxInt256}}),Object.defineProperty(t,"maxUint8",{enumerable:!0,get:function(){return P.maxUint8}}),Object.defineProperty(t,"maxUint16",{enumerable:!0,get:function(){return P.maxUint16}}),Object.defineProperty(t,"maxUint24",{enumerable:!0,get:function(){return P.maxUint24}}),Object.defineProperty(t,"maxUint32",{enumerable:!0,get:function(){return P.maxUint32}}),Object.defineProperty(t,"maxUint40",{enumerable:!0,get:function(){return P.maxUint40}}),Object.defineProperty(t,"maxUint48",{enumerable:!0,get:function(){return P.maxUint48}}),Object.defineProperty(t,"maxUint56",{enumerable:!0,get:function(){return P.maxUint56}}),Object.defineProperty(t,"maxUint64",{enumerable:!0,get:function(){return P.maxUint64}}),Object.defineProperty(t,"maxUint72",{enumerable:!0,get:function(){return P.maxUint72}}),Object.defineProperty(t,"maxUint80",{enumerable:!0,get:function(){return P.maxUint80}}),Object.defineProperty(t,"maxUint88",{enumerable:!0,get:function(){return P.maxUint88}}),Object.defineProperty(t,"maxUint96",{enumerable:!0,get:function(){return P.maxUint96}}),Object.defineProperty(t,"maxUint104",{enumerable:!0,get:function(){return P.maxUint104}}),Object.defineProperty(t,"maxUint112",{enumerable:!0,get:function(){return P.maxUint112}}),Object.defineProperty(t,"maxUint120",{enumerable:!0,get:function(){return P.maxUint120}}),Object.defineProperty(t,"maxUint128",{enumerable:!0,get:function(){return P.maxUint128}}),Object.defineProperty(t,"maxUint136",{enumerable:!0,get:function(){return P.maxUint136}}),Object.defineProperty(t,"maxUint144",{enumerable:!0,get:function(){return P.maxUint144}}),Object.defineProperty(t,"maxUint152",{enumerable:!0,get:function(){return P.maxUint152}}),Object.defineProperty(t,"maxUint160",{enumerable:!0,get:function(){return P.maxUint160}}),Object.defineProperty(t,"maxUint168",{enumerable:!0,get:function(){return P.maxUint168}}),Object.defineProperty(t,"maxUint176",{enumerable:!0,get:function(){return P.maxUint176}}),Object.defineProperty(t,"maxUint184",{enumerable:!0,get:function(){return P.maxUint184}}),Object.defineProperty(t,"maxUint192",{enumerable:!0,get:function(){return P.maxUint192}}),Object.defineProperty(t,"maxUint200",{enumerable:!0,get:function(){return P.maxUint200}}),Object.defineProperty(t,"maxUint208",{enumerable:!0,get:function(){return P.maxUint208}}),Object.defineProperty(t,"maxUint216",{enumerable:!0,get:function(){return P.maxUint216}}),Object.defineProperty(t,"maxUint224",{enumerable:!0,get:function(){return P.maxUint224}}),Object.defineProperty(t,"maxUint232",{enumerable:!0,get:function(){return P.maxUint232}}),Object.defineProperty(t,"maxUint240",{enumerable:!0,get:function(){return P.maxUint240}}),Object.defineProperty(t,"maxUint248",{enumerable:!0,get:function(){return P.maxUint248}}),Object.defineProperty(t,"maxUint256",{enumerable:!0,get:function(){return P.maxUint256}}),Object.defineProperty(t,"minInt8",{enumerable:!0,get:function(){return P.minInt8}}),Object.defineProperty(t,"minInt16",{enumerable:!0,get:function(){return P.minInt16}}),Object.defineProperty(t,"minInt24",{enumerable:!0,get:function(){return P.minInt24}}),Object.defineProperty(t,"minInt32",{enumerable:!0,get:function(){return P.minInt32}}),Object.defineProperty(t,"minInt40",{enumerable:!0,get:function(){return P.minInt40}}),Object.defineProperty(t,"minInt48",{enumerable:!0,get:function(){return P.minInt48}}),Object.defineProperty(t,"minInt56",{enumerable:!0,get:function(){return P.minInt56}}),Object.defineProperty(t,"minInt64",{enumerable:!0,get:function(){return P.minInt64}}),Object.defineProperty(t,"minInt72",{enumerable:!0,get:function(){return P.minInt72}}),Object.defineProperty(t,"minInt80",{enumerable:!0,get:function(){return P.minInt80}}),Object.defineProperty(t,"minInt88",{enumerable:!0,get:function(){return P.minInt88}}),Object.defineProperty(t,"minInt96",{enumerable:!0,get:function(){return P.minInt96}}),Object.defineProperty(t,"minInt104",{enumerable:!0,get:function(){return P.minInt104}}),Object.defineProperty(t,"minInt112",{enumerable:!0,get:function(){return P.minInt112}}),Object.defineProperty(t,"minInt120",{enumerable:!0,get:function(){return P.minInt120}}),Object.defineProperty(t,"minInt128",{enumerable:!0,get:function(){return P.minInt128}}),Object.defineProperty(t,"minInt136",{enumerable:!0,get:function(){return P.minInt136}}),Object.defineProperty(t,"minInt144",{enumerable:!0,get:function(){return P.minInt144}}),Object.defineProperty(t,"minInt152",{enumerable:!0,get:function(){return P.minInt152}}),Object.defineProperty(t,"minInt160",{enumerable:!0,get:function(){return P.minInt160}}),Object.defineProperty(t,"minInt168",{enumerable:!0,get:function(){return P.minInt168}}),Object.defineProperty(t,"minInt176",{enumerable:!0,get:function(){return P.minInt176}}),Object.defineProperty(t,"minInt184",{enumerable:!0,get:function(){return P.minInt184}}),Object.defineProperty(t,"minInt192",{enumerable:!0,get:function(){return P.minInt192}}),Object.defineProperty(t,"minInt200",{enumerable:!0,get:function(){return P.minInt200}}),Object.defineProperty(t,"minInt208",{enumerable:!0,get:function(){return P.minInt208}}),Object.defineProperty(t,"minInt216",{enumerable:!0,get:function(){return P.minInt216}}),Object.defineProperty(t,"minInt224",{enumerable:!0,get:function(){return P.minInt224}}),Object.defineProperty(t,"minInt232",{enumerable:!0,get:function(){return P.minInt232}}),Object.defineProperty(t,"minInt240",{enumerable:!0,get:function(){return P.minInt240}}),Object.defineProperty(t,"minInt248",{enumerable:!0,get:function(){return P.minInt248}}),Object.defineProperty(t,"minInt256",{enumerable:!0,get:function(){return P.minInt256}});var A=r(2884);Object.defineProperty(t,"presignMessagePrefix",{enumerable:!0,get:function(){return A.presignMessagePrefix}});var x=r(9427);Object.defineProperty(t,"etherUnits",{enumerable:!0,get:function(){return x.etherUnits}}),Object.defineProperty(t,"gweiUnits",{enumerable:!0,get:function(){return x.gweiUnits}}),Object.defineProperty(t,"weiUnits",{enumerable:!0,get:function(){return x.weiUnits}});var I=r(9797);Object.defineProperty(t,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return I.AbiConstructorNotFoundError}}),Object.defineProperty(t,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return I.AbiConstructorParamsNotFoundError}}),Object.defineProperty(t,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return I.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(t,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return I.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(t,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return I.AbiDecodingZeroDataError}}),Object.defineProperty(t,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return I.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return I.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(t,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return I.AbiEncodingLengthMismatchError}}),Object.defineProperty(t,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return I.AbiErrorInputsNotFoundError}}),Object.defineProperty(t,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return I.AbiErrorNotFoundError}}),Object.defineProperty(t,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return I.AbiErrorSignatureNotFoundError}}),Object.defineProperty(t,"AbiEventNotFoundError",{enumerable:!0,get:function(){return I.AbiEventNotFoundError}}),Object.defineProperty(t,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return I.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(t,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return I.AbiEventSignatureNotFoundError}}),Object.defineProperty(t,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return I.AbiFunctionNotFoundError}}),Object.defineProperty(t,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return I.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(t,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return I.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(t,"BytesSizeMismatchError",{enumerable:!0,get:function(){return I.BytesSizeMismatchError}}),Object.defineProperty(t,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return I.DecodeLogDataMismatch}}),Object.defineProperty(t,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return I.DecodeLogTopicsMismatch}}),Object.defineProperty(t,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return I.InvalidAbiDecodingTypeError}}),Object.defineProperty(t,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return I.InvalidAbiEncodingTypeError}}),Object.defineProperty(t,"InvalidArrayError",{enumerable:!0,get:function(){return I.InvalidArrayError}}),Object.defineProperty(t,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return I.InvalidDefinitionTypeError}}),Object.defineProperty(t,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return I.UnsupportedPackedAbiType}});var S=r(1611);Object.defineProperty(t,"InvalidAddressError",{enumerable:!0,get:function(){return S.InvalidAddressError}});var T=r(1682);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return T.BaseError}}),Object.defineProperty(t,"setErrorConfig",{enumerable:!0,get:function(){return T.setErrorConfig}});var O=r(4342);Object.defineProperty(t,"BlockNotFoundError",{enumerable:!0,get:function(){return O.BlockNotFoundError}});var _=r(8030);Object.defineProperty(t,"BundleFailedError",{enumerable:!0,get:function(){return _.BundleFailedError}});var j=r(2078);Object.defineProperty(t,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return j.ChainDoesNotSupportContract}}),Object.defineProperty(t,"ChainMismatchError",{enumerable:!0,get:function(){return j.ChainMismatchError}}),Object.defineProperty(t,"ChainNotFoundError",{enumerable:!0,get:function(){return j.ChainNotFoundError}}),Object.defineProperty(t,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return j.ClientChainNotConfiguredError}}),Object.defineProperty(t,"InvalidChainIdError",{enumerable:!0,get:function(){return j.InvalidChainIdError}});var C=r(3585);Object.defineProperty(t,"CallExecutionError",{enumerable:!0,get:function(){return C.CallExecutionError}}),Object.defineProperty(t,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return C.ContractFunctionExecutionError}}),Object.defineProperty(t,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return C.ContractFunctionRevertedError}}),Object.defineProperty(t,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return C.ContractFunctionZeroDataError}}),Object.defineProperty(t,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return C.CounterfactualDeploymentFailedError}}),Object.defineProperty(t,"RawContractError",{enumerable:!0,get:function(){return C.RawContractError}});var B=r(1459);Object.defineProperty(t,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return B.SizeExceedsPaddingSizeError}}),Object.defineProperty(t,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return B.SliceOffsetOutOfBoundsError}});var M=r(9130);Object.defineProperty(t,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return M.IntegerOutOfRangeError}}),Object.defineProperty(t,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return M.InvalidBytesBooleanError}}),Object.defineProperty(t,"InvalidHexBooleanError",{enumerable:!0,get:function(){return M.InvalidHexBooleanError}}),Object.defineProperty(t,"InvalidHexValueError",{enumerable:!0,get:function(){return M.InvalidHexValueError}}),Object.defineProperty(t,"SizeOverflowError",{enumerable:!0,get:function(){return M.SizeOverflowError}});var k=r(4219);Object.defineProperty(t,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return k.EnsAvatarInvalidNftUriError}}),Object.defineProperty(t,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return k.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(t,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return k.EnsAvatarUriResolutionError}}),Object.defineProperty(t,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return k.EnsInvalidChainIdError}});var R=r(7816);Object.defineProperty(t,"EstimateGasExecutionError",{enumerable:!0,get:function(){return R.EstimateGasExecutionError}});var N=r(5035);Object.defineProperty(t,"BaseFeeScalarError",{enumerable:!0,get:function(){return N.BaseFeeScalarError}}),Object.defineProperty(t,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return N.Eip1559FeesNotSupportedError}}),Object.defineProperty(t,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return N.MaxFeePerGasTooLowError}});var F=r(7505);Object.defineProperty(t,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return F.FilterTypeNotSupportedError}});var U=r(6687);Object.defineProperty(t,"ExecutionRevertedError",{enumerable:!0,get:function(){return U.ExecutionRevertedError}}),Object.defineProperty(t,"FeeCapTooHighError",{enumerable:!0,get:function(){return U.FeeCapTooHighError}}),Object.defineProperty(t,"FeeCapTooLowError",{enumerable:!0,get:function(){return U.FeeCapTooLowError}}),Object.defineProperty(t,"InsufficientFundsError",{enumerable:!0,get:function(){return U.InsufficientFundsError}}),Object.defineProperty(t,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return U.IntrinsicGasTooHighError}}),Object.defineProperty(t,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return U.IntrinsicGasTooLowError}}),Object.defineProperty(t,"NonceMaxValueError",{enumerable:!0,get:function(){return U.NonceMaxValueError}}),Object.defineProperty(t,"NonceTooHighError",{enumerable:!0,get:function(){return U.NonceTooHighError}}),Object.defineProperty(t,"NonceTooLowError",{enumerable:!0,get:function(){return U.NonceTooLowError}}),Object.defineProperty(t,"TipAboveFeeCapError",{enumerable:!0,get:function(){return U.TipAboveFeeCapError}}),Object.defineProperty(t,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return U.TransactionTypeNotSupportedError}}),Object.defineProperty(t,"UnknownNodeError",{enumerable:!0,get:function(){return U.UnknownNodeError}});var H=r(3318);Object.defineProperty(t,"HttpRequestError",{enumerable:!0,get:function(){return H.HttpRequestError}}),Object.defineProperty(t,"RpcRequestError",{enumerable:!0,get:function(){return H.RpcRequestError}}),Object.defineProperty(t,"SocketClosedError",{enumerable:!0,get:function(){return H.SocketClosedError}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return H.TimeoutError}}),Object.defineProperty(t,"WebSocketRequestError",{enumerable:!0,get:function(){return H.WebSocketRequestError}});var D=r(2564);Object.defineProperty(t,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return D.AtomicityNotSupportedError}}),Object.defineProperty(t,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return D.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(t,"BundleTooLargeError",{enumerable:!0,get:function(){return D.BundleTooLargeError}}),Object.defineProperty(t,"ChainDisconnectedError",{enumerable:!0,get:function(){return D.ChainDisconnectedError}}),Object.defineProperty(t,"DuplicateIdError",{enumerable:!0,get:function(){return D.DuplicateIdError}}),Object.defineProperty(t,"InternalRpcError",{enumerable:!0,get:function(){return D.InternalRpcError}}),Object.defineProperty(t,"InvalidInputRpcError",{enumerable:!0,get:function(){return D.InvalidInputRpcError}}),Object.defineProperty(t,"InvalidParamsRpcError",{enumerable:!0,get:function(){return D.InvalidParamsRpcError}}),Object.defineProperty(t,"InvalidRequestRpcError",{enumerable:!0,get:function(){return D.InvalidRequestRpcError}}),Object.defineProperty(t,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return D.JsonRpcVersionUnsupportedError}}),Object.defineProperty(t,"LimitExceededRpcError",{enumerable:!0,get:function(){return D.LimitExceededRpcError}}),Object.defineProperty(t,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return D.MethodNotFoundRpcError}}),Object.defineProperty(t,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return D.MethodNotSupportedRpcError}}),Object.defineProperty(t,"ParseRpcError",{enumerable:!0,get:function(){return D.ParseRpcError}}),Object.defineProperty(t,"ProviderDisconnectedError",{enumerable:!0,get:function(){return D.ProviderDisconnectedError}}),Object.defineProperty(t,"ProviderRpcError",{enumerable:!0,get:function(){return D.ProviderRpcError}}),Object.defineProperty(t,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return D.ResourceNotFoundRpcError}}),Object.defineProperty(t,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return D.ResourceUnavailableRpcError}}),Object.defineProperty(t,"RpcError",{enumerable:!0,get:function(){return D.RpcError}}),Object.defineProperty(t,"SwitchChainError",{enumerable:!0,get:function(){return D.SwitchChainError}}),Object.defineProperty(t,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return D.TransactionRejectedRpcError}}),Object.defineProperty(t,"UnauthorizedProviderError",{enumerable:!0,get:function(){return D.UnauthorizedProviderError}}),Object.defineProperty(t,"UnknownBundleIdError",{enumerable:!0,get:function(){return D.UnknownBundleIdError}}),Object.defineProperty(t,"UnknownRpcError",{enumerable:!0,get:function(){return D.UnknownRpcError}}),Object.defineProperty(t,"UnsupportedChainIdError",{enumerable:!0,get:function(){return D.UnsupportedChainIdError}}),Object.defineProperty(t,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return D.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(t,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return D.UnsupportedProviderMethodError}}),Object.defineProperty(t,"UserRejectedRequestError",{enumerable:!0,get:function(){return D.UserRejectedRequestError}});var L=r(9098);Object.defineProperty(t,"AccountStateConflictError",{enumerable:!0,get:function(){return L.AccountStateConflictError}}),Object.defineProperty(t,"StateAssignmentConflictError",{enumerable:!0,get:function(){return L.StateAssignmentConflictError}});var z=r(979);Object.defineProperty(t,"FeeConflictError",{enumerable:!0,get:function(){return z.FeeConflictError}}),Object.defineProperty(t,"InvalidLegacyVError",{enumerable:!0,get:function(){return z.InvalidLegacyVError}}),Object.defineProperty(t,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializableTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionTypeError}}),Object.defineProperty(t,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return z.InvalidStorageKeySizeError}}),Object.defineProperty(t,"TransactionExecutionError",{enumerable:!0,get:function(){return z.TransactionExecutionError}}),Object.defineProperty(t,"TransactionNotFoundError",{enumerable:!0,get:function(){return z.TransactionNotFoundError}}),Object.defineProperty(t,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return z.TransactionReceiptNotFoundError}}),Object.defineProperty(t,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return z.WaitForTransactionReceiptTimeoutError}});var $=r(7266);Object.defineProperty(t,"UrlRequiredError",{enumerable:!0,get:function(){return $.UrlRequiredError}});var G=r(1695);Object.defineProperty(t,"InvalidDomainError",{enumerable:!0,get:function(){return G.InvalidDomainError}}),Object.defineProperty(t,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return G.InvalidPrimaryTypeError}}),Object.defineProperty(t,"InvalidStructTypeError",{enumerable:!0,get:function(){return G.InvalidStructTypeError}});var q=r(8197);Object.defineProperty(t,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return q.InvalidDecimalNumberError}});var V=r(1461);Object.defineProperty(t,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return V.ProviderRpcError}});var W=r(8448);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return W.decodeAbiParameters}});var K=r(2747);Object.defineProperty(t,"decodeDeployData",{enumerable:!0,get:function(){return K.decodeDeployData}});var Z=r(6129);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return Z.decodeErrorResult}});var Y=r(6218);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return Y.decodeEventLog}});var J=r(1756);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return J.decodeFunctionData}});var Q=r(233);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return Q.decodeFunctionResult}});var X=r(3224);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return X.encodeAbiParameters}});var ee=r(8851);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return ee.encodeDeployData}});var te=r(6406);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return te.encodeErrorResult}});var re=r(574);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return re.encodeEventTopics}});var ne=r(5108);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return ne.encodeFunctionData}});var oe=r(6801);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return oe.encodeFunctionResult}});var ae=r(8528);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return ae.encodePacked}});var ie=r(3123);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return ie.getAbiItem}});var se=r(9028);Object.defineProperty(t,"parseEventLogs",{enumerable:!0,get:function(){return se.parseEventLogs}});var ce=r(9765);Object.defineProperty(t,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return ce.prepareEncodeFunctionData}});var ue=r(9868);Object.defineProperty(t,"checksumAddress",{enumerable:!0,get:function(){return ue.checksumAddress}}),Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return ue.getAddress}});var de=r(7102);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return de.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return de.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return de.getCreateAddress}});var le=r(2018);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return le.isAddress}});var fe=r(7624);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return fe.isAddressEqual}});var pe=r(4264);Object.defineProperty(t,"blobsToCommitments",{enumerable:!0,get:function(){return pe.blobsToCommitments}});var me=r(5295);Object.defineProperty(t,"blobsToProofs",{enumerable:!0,get:function(){return me.blobsToProofs}});var be=r(3785);Object.defineProperty(t,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return be.commitmentsToVersionedHashes}});var he=r(7752);Object.defineProperty(t,"commitmentToVersionedHash",{enumerable:!0,get:function(){return he.commitmentToVersionedHash}});var ye=r(4421);Object.defineProperty(t,"fromBlobs",{enumerable:!0,get:function(){return ye.fromBlobs}});var ge=r(2803);Object.defineProperty(t,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return ge.sidecarsToVersionedHashes}});var ve=r(5231);Object.defineProperty(t,"toBlobSidecars",{enumerable:!0,get:function(){return ve.toBlobSidecars}});var Ee=r(7330);Object.defineProperty(t,"toBlobs",{enumerable:!0,get:function(){return Ee.toBlobs}});var we=r(2722);Object.defineProperty(t,"ccipRequest",{enumerable:!0,get:function(){return we.ccipRequest}}),Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return we.ccipRequest}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return we.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return we.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return we.offchainLookupSignature}});var Pe=r(375);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return Pe.assertCurrentChain}});var Ae=r(2351);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return Ae.defineChain}});var xe=r(9021);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return xe.extractChain}});var Ie=r(9858);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return Ie.getChainContractAddress}});var Se=r(1028);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return Se.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return Se.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return Se.concatHex}});var Te=r(5561);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return Te.isBytes}});var Oe=r(6611);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return Oe.isHex}});var _e=r(5599);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return _e.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return _e.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return _e.padHex}});var je=r(4025);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return je.size}});var Ce=r(1972);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return Ce.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return Ce.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return Ce.sliceHex}});var Be=r(7716);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return Be.trim}});var Me=r(4436);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return Me.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return Me.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return Me.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return Me.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return Me.fromBytes}});var ke=r(4130);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return ke.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return ke.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return ke.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return ke.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return ke.hexToString}});var Re=r(9521);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return Re.fromRlp}});var Ne=r(1699);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return Ne.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return Ne.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return Ne.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return Ne.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return Ne.toBytes}});var Fe=r(6669);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return Fe.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return Fe.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return Fe.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return Fe.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return Fe.toHex}});var Ue=r(4314);Object.defineProperty(t,"bytesToRlp",{enumerable:!0,get:function(){return Ue.bytesToRlp}}),Object.defineProperty(t,"hexToRlp",{enumerable:!0,get:function(){return Ue.hexToRlp}}),Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return Ue.toRlp}});var He=r(6472);Object.defineProperty(t,"labelhash",{enumerable:!0,get:function(){return He.labelhash}});var De=r(5047);Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return De.namehash}});var Le=r(3028);Object.defineProperty(t,"toCoinType",{enumerable:!0,get:function(){return Le.toCoinType}});var ze=r(2505);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return ze.getContractError}});var $e=r(3776);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return $e.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return $e.formatBlock}});var Ge=r(9475);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return Ge.formatLog}});var qe=r(7477);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return qe.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return qe.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return qe.transactionType}});var Ve=r(3501);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return Ve.defineTransactionReceipt}}),Object.defineProperty(t,"formatTransactionReceipt",{enumerable:!0,get:function(){return Ve.formatTransactionReceipt}});var We=r(2996);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return We.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return We.formatTransactionRequest}}),Object.defineProperty(t,"rpcTransactionType",{enumerable:!0,get:function(){return We.rpcTransactionType}});var Ke=r(5140);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return Ke.isHash}});var Ze=r(1725);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return Ze.keccak256}});var Ye=r(4522);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return Ye.ripemd160}});var Je=r(27);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return Je.sha256}});var Qe=r(905);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return Qe.toEventHash}});var Xe=r(2644);Object.defineProperty(t,"toEventSelector",{enumerable:!0,get:function(){return Xe.toEventSelector}}),Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return Xe.toEventSelector}});var et=r(6447);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return et.toEventSignature}}),Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return et.toEventSignature}});var tt=r(2129);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return tt.toFunctionHash}});var rt=r(364);Object.defineProperty(t,"toFunctionSelector",{enumerable:!0,get:function(){return rt.toFunctionSelector}}),Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return rt.toFunctionSelector}});var nt=r(4055);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return nt.toFunctionSignature}}),Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return nt.toFunctionSignature}});var ot=r(2135);Object.defineProperty(t,"defineKzg",{enumerable:!0,get:function(){return ot.defineKzg}});var at=r(2163);Object.defineProperty(t,"setupKzg",{enumerable:!0,get:function(){return at.setupKzg}});var it=r(6387);Object.defineProperty(t,"createNonceManager",{enumerable:!0,get:function(){return it.createNonceManager}}),Object.defineProperty(t,"nonceManager",{enumerable:!0,get:function(){return it.nonceManager}});var st=r(1609);Object.defineProperty(t,"withCache",{enumerable:!0,get:function(){return st.withCache}});var ct=r(2801);Object.defineProperty(t,"withRetry",{enumerable:!0,get:function(){return ct.withRetry}});var ut=r(3636);Object.defineProperty(t,"withTimeout",{enumerable:!0,get:function(){return ut.withTimeout}});var dt=r(9030);Object.defineProperty(t,"compactSignatureToSignature",{enumerable:!0,get:function(){return dt.compactSignatureToSignature}});var lt=r(7399);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return lt.hashMessage}});var ft=r(1556);Object.defineProperty(t,"hashDomain",{enumerable:!0,get:function(){return ft.hashDomain}}),Object.defineProperty(t,"hashStruct",{enumerable:!0,get:function(){return ft.hashStruct}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return ft.hashTypedData}});var pt=r(2439);Object.defineProperty(t,"isErc6492Signature",{enumerable:!0,get:function(){return pt.isErc6492Signature}});var mt=r(4195);Object.defineProperty(t,"isErc8010Signature",{enumerable:!0,get:function(){return mt.isErc8010Signature}});var bt=r(4074);Object.defineProperty(t,"hexToCompactSignature",{enumerable:!0,get:function(){return bt.parseCompactSignature}}),Object.defineProperty(t,"parseCompactSignature",{enumerable:!0,get:function(){return bt.parseCompactSignature}});var ht=r(7690);Object.defineProperty(t,"parseErc6492Signature",{enumerable:!0,get:function(){return ht.parseErc6492Signature}});var yt=r(4258);Object.defineProperty(t,"parseErc8010Signature",{enumerable:!0,get:function(){return yt.parseErc8010Signature}});var gt=r(2601);Object.defineProperty(t,"hexToSignature",{enumerable:!0,get:function(){return gt.parseSignature}}),Object.defineProperty(t,"parseSignature",{enumerable:!0,get:function(){return gt.parseSignature}});var vt=r(1154);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return vt.recoverAddress}});var Et=r(2517);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return Et.recoverMessageAddress}});var wt=r(7246);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return wt.recoverPublicKey}});var Pt=r(9952);Object.defineProperty(t,"recoverTransactionAddress",{enumerable:!0,get:function(){return Pt.recoverTransactionAddress}});var At=r(3288);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return At.recoverTypedDataAddress}});var xt=r(6607);Object.defineProperty(t,"compactSignatureToHex",{enumerable:!0,get:function(){return xt.serializeCompactSignature}}),Object.defineProperty(t,"serializeCompactSignature",{enumerable:!0,get:function(){return xt.serializeCompactSignature}});var It=r(6187);Object.defineProperty(t,"serializeErc6492Signature",{enumerable:!0,get:function(){return It.serializeErc6492Signature}});var St=r(3847);Object.defineProperty(t,"serializeErc8010Signature",{enumerable:!0,get:function(){return St.serializeErc8010Signature}});var Tt=r(4458);Object.defineProperty(t,"signatureToHex",{enumerable:!0,get:function(){return Tt.serializeSignature}}),Object.defineProperty(t,"serializeSignature",{enumerable:!0,get:function(){return Tt.serializeSignature}});var Ot=r(9594);Object.defineProperty(t,"signatureToCompactSignature",{enumerable:!0,get:function(){return Ot.signatureToCompactSignature}});var _t=r(6823);Object.defineProperty(t,"toPrefixedMessage",{enumerable:!0,get:function(){return _t.toPrefixedMessage}});var jt=r(6875);Object.defineProperty(t,"verifyHash",{enumerable:!0,get:function(){return jt.verifyHash}});var Ct=r(7824);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return Ct.verifyMessage}});var Bt=r(4847);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return Bt.verifyTypedData}});var Mt=r(8352);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return Mt.stringify}});var kt=r(8901);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return kt.assertRequest}});var Rt=r(8688);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Rt.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Rt.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return Rt.assertTransactionLegacy}});var Nt=r(6405);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return Nt.getSerializedTransactionType}});var Ft=r(4720);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return Ft.getTransactionType}});var Ut=r(925);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return Ut.parseTransaction}});var Ht=r(5490);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return Ht.serializeAccessList}});var Dt=r(8786);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Dt.serializeTransaction}});var Lt=r(4413);Object.defineProperty(t,"domainSeparator",{enumerable:!0,get:function(){return Lt.domainSeparator}}),Object.defineProperty(t,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return Lt.getTypesForEIP712Domain}}),Object.defineProperty(t,"serializeTypedData",{enumerable:!0,get:function(){return Lt.serializeTypedData}}),Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return Lt.validateTypedData}});var zt=r(2945);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return zt.formatEther}});var $t=r(1825);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return $t.formatGwei}});var Gt=r(7290);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Gt.formatUnits}});var qt=r(6063);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return qt.parseEther}});var Vt=r(1007);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return Vt.parseGwei}});var Wt=r(7916);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Wt.parseUnits}})},758(e,t,r){e.exports=r(2713)},790(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e,t={}){if((0,u.isFunctionSignature)(e))return d(e,t);if((0,u.isEventSignature)(e))return l(e,t);if((0,u.isErrorSignature)(e))return f(e,t);if((0,u.isConstructorSignature)(e))return p(e,t);if((0,u.isFallbackSignature)(e))return m(e);if((0,u.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new i.UnknownSignatureError({signature:e})},t.parseFunctionSignature=d,t.parseEventSignature=l,t.parseErrorSignature=f,t.parseConstructorSignature=p,t.parseFallbackSignature=m,t.parseAbiParameter=g,t.splitParameters=v,t.isSolidityType=E,t.isSolidityKeyword=P,t.isValidDataLocation=A;const n=r(7424),o=r(243),a=r(5653),i=r(2544),s=r(3674),c=r(7013),u=r(4512);function d(e,t={}){const r=(0,u.execFunctionSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"function"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{modifiers:u.functionModifiers,structs:t,type:"function"}));const s=[];if(r.returns){const e=v(r.returns),n=e.length;for(let r=0;r<n;r++)s.push(g(e[r],{modifiers:u.functionModifiers,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:o,outputs:s}}function l(e,t={}){const r=(0,u.execEventSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"event"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{modifiers:u.eventModifiers,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:o}}function f(e,t={}){const r=(0,u.execErrorSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"error"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:o}}function p(e,t={}){const r=(0,u.execConstructorSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"constructor"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:o}}function m(e){const t=(0,u.execFallbackSignature)(e);if(!t)throw new i.InvalidSignatureError({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const b=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,y=/^u?int$/;function g(e,t){const r=(0,c.getParameterCacheKey)(e,t?.type,t?.structs);if(c.parameterCache.has(r))return c.parameterCache.get(r);const i=n.isTupleRegex.test(e),s=(0,n.execTyped)(i?h:b,e);if(!s)throw new a.InvalidParameterError({param:e});if(s.name&&P(s.name))throw new a.SolidityProtectedKeywordError({param:e,name:s.name});const d=s.name?{name:s.name}:{},l="indexed"===s.modifier?{indexed:!0}:{},f=t?.structs??{};let p,m={};if(i){p="tuple";const e=v(s.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(g(e[n],{structs:f}));m={components:t}}else if(s.type in f)p="tuple",m={components:f[s.type]};else if(y.test(s.type))p=`${s.type}256`;else if("address payable"===s.type)p="address";else if(p=s.type,"struct"!==t?.type&&!E(p))throw new o.UnknownSolidityTypeError({type:p});if(s.modifier){if(!t?.modifiers?.has?.(s.modifier))throw new a.InvalidModifierError({param:e,type:t?.type,modifier:s.modifier});if(u.functionModifiers.has(s.modifier)&&!A(p,!!s.array))throw new a.InvalidFunctionModifierError({param:e,type:t?.type,modifier:s.modifier})}const w={type:`${p}${s.array??""}`,...d,...l,...m};return c.parameterCache.set(r,w),w}function v(e,t=[],r="",n=0){const o=e.trim().length;for(let a=0;a<o;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return 0===n?v(i,[...t,r.trim()]):v(i,t,`${r}${o}`,n);case"(":return v(i,t,`${r}${o}`,n+1);case")":return v(i,t,`${r}${o}`,n-1);default:return v(i,t,`${r}${o}`,n)}}if(""===r)return t;if(0!==n)throw new s.InvalidParenthesisError({current:r,depth:n});return t.push(r.trim()),t}function E(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.bytesRegex.test(e)||n.integerRegex.test(e)}const w=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function P(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||n.bytesRegex.test(e)||n.integerRegex.test(e)||w.test(e)}function A(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}},844(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=t.InvalidParenthesisError=t.UnknownSignatureError=t.InvalidSignatureError=t.InvalidStructSignatureError=t.InvalidAbiParameterError=t.InvalidAbiParametersError=t.InvalidParameterError=t.SolidityProtectedKeywordError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.UnknownSolidityTypeError=t.InvalidAbiItemError=t.UnknownTypeError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.formatAbiParameters=t.formatAbiParameter=t.formatAbiItem=t.formatAbi=t.narrow=t.BaseError=void 0;var n=r(9061);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return n.BaseError}});var o=r(5777);Object.defineProperty(t,"narrow",{enumerable:!0,get:function(){return o.narrow}});var a=r(8558);Object.defineProperty(t,"formatAbi",{enumerable:!0,get:function(){return a.formatAbi}});var i=r(945);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return i.formatAbiItem}});var s=r(3263);Object.defineProperty(t,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var c=r(6746);Object.defineProperty(t,"formatAbiParameters",{enumerable:!0,get:function(){return c.formatAbiParameters}});var u=r(6706);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return u.parseAbi}});var d=r(5277);Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return d.parseAbiItem}});var l=r(9131);Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return l.parseAbiParameter}});var f=r(2942);Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return f.parseAbiParameters}});var p=r(8768);Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return p.UnknownTypeError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return p.InvalidAbiItemError}}),Object.defineProperty(t,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return p.UnknownSolidityTypeError}});var m=r(8144);Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var b=r(259);Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return b.InvalidStructSignatureError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return b.InvalidSignatureError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return b.UnknownSignatureError}});var h=r(1985);Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var y=r(848);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return y.CircularReferenceError}})},848(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;const n=r(9061);class o extends n.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}t.CircularReferenceError=o},858(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.impersonateAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}},875(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.hash=function(e){return r(this,void 0,void 0,function(){var t,r;return n(this,function(n){switch(n.label){case 0:return[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e))];case 1:return t=n.sent(),r=new Uint8Array(t),[2,Array.from(r).map(function(e){return e.toString(16).padStart(2,"0")}).join("")]}})})},t.generateNativeUUID=function(){return crypto.randomUUID()}},888(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureErc6492=void 0,t.SignatureErc6492=r(1421)},896(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RecursiveReadLimitExceededError=t.PositionOutOfBoundsError=t.NegativeOffsetError=void 0,t.create=function(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(o);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r};const n=r(6573),o={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new i({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new a({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new a({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};class a extends n.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}t.NegativeOffsetError=a;class i extends n.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=i;class s extends n.BaseError{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}t.RecursiveReadLimitExceededError=s},905(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toEventHash=void 0;var n=r(6091);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return n.toSignatureHash}})},925(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransaction=function(e){const t=(0,m.getSerializedTransactionType)(e);return"eip1559"===t?function(e){const t=b(e),[r,n,a,i,c,u,l,f,m,g,v,E]=t;if(9!==t.length&&12!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:a,maxFeePerGas:i,gas:c,to:u,value:l,data:f,accessList:m,...t.length>9?{v:g,r:v,s:E}:{}},serializedTransaction:e,type:"eip1559"});const w={chainId:(0,d.hexToNumber)(r),type:"eip1559"};return(0,s.isHex)(u)&&"0x"!==u&&(w.to=u),(0,s.isHex)(c)&&"0x"!==c&&(w.gas=(0,d.hexToBigInt)(c)),(0,s.isHex)(f)&&"0x"!==f&&(w.data=f),(0,s.isHex)(n)&&(w.nonce="0x"===n?0:(0,d.hexToNumber)(n)),(0,s.isHex)(l)&&"0x"!==l&&(w.value=(0,d.hexToBigInt)(l)),(0,s.isHex)(i)&&"0x"!==i&&(w.maxFeePerGas=(0,d.hexToBigInt)(i)),(0,s.isHex)(a)&&"0x"!==a&&(w.maxPriorityFeePerGas=(0,d.hexToBigInt)(a)),0!==m.length&&"0x"!==m&&(w.accessList=h(m)),(0,p.assertTransactionEIP1559)(w),{...12===t.length?y(t):void 0,...w}}(e):"eip2930"===t?function(e){const t=b(e),[r,n,a,i,c,u,l,f,m,g,v]=t;if(8!==t.length&&11!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,gasPrice:a,gas:i,to:c,value:u,data:l,accessList:f,...t.length>8?{v:m,r:g,s:v}:{}},serializedTransaction:e,type:"eip2930"});const E={chainId:(0,d.hexToNumber)(r),type:"eip2930"};return(0,s.isHex)(c)&&"0x"!==c&&(E.to=c),(0,s.isHex)(i)&&"0x"!==i&&(E.gas=(0,d.hexToBigInt)(i)),(0,s.isHex)(l)&&"0x"!==l&&(E.data=l),(0,s.isHex)(n)&&(E.nonce="0x"===n?0:(0,d.hexToNumber)(n)),(0,s.isHex)(u)&&"0x"!==u&&(E.value=(0,d.hexToBigInt)(u)),(0,s.isHex)(a)&&"0x"!==a&&(E.gasPrice=(0,d.hexToBigInt)(a)),0!==f.length&&"0x"!==f&&(E.accessList=h(f)),(0,p.assertTransactionEIP2930)(E),{...11===t.length?y(t):void 0,...E}}(e):"eip4844"===t?function(e){const t=b(e),r=4===t.length,n=r?t[0]:t,a=r?t.slice(1):[],[c,u,l,f,m,g,v,E,w,P,A,x,I,S]=n,[T,O,_]=a;if(11!==n.length&&14!==n.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:c,nonce:u,maxPriorityFeePerGas:l,maxFeePerGas:f,gas:m,to:g,value:v,data:E,accessList:w,...n.length>9?{v:x,r:I,s:S}:{}},serializedTransaction:e,type:"eip4844"});const j={blobVersionedHashes:A,chainId:(0,d.hexToNumber)(c),to:g,type:"eip4844"};return(0,s.isHex)(m)&&"0x"!==m&&(j.gas=(0,d.hexToBigInt)(m)),(0,s.isHex)(E)&&"0x"!==E&&(j.data=E),(0,s.isHex)(u)&&(j.nonce="0x"===u?0:(0,d.hexToNumber)(u)),(0,s.isHex)(v)&&"0x"!==v&&(j.value=(0,d.hexToBigInt)(v)),(0,s.isHex)(P)&&"0x"!==P&&(j.maxFeePerBlobGas=(0,d.hexToBigInt)(P)),(0,s.isHex)(f)&&"0x"!==f&&(j.maxFeePerGas=(0,d.hexToBigInt)(f)),(0,s.isHex)(l)&&"0x"!==l&&(j.maxPriorityFeePerGas=(0,d.hexToBigInt)(l)),0!==w.length&&"0x"!==w&&(j.accessList=h(w)),T&&O&&_&&(j.sidecars=(0,i.toBlobSidecars)({blobs:T,commitments:O,proofs:_})),(0,p.assertTransactionEIP4844)(j),{...14===n.length?y(n):void 0,...j}}(e):"eip7702"===t?function(e){const t=b(e),[r,n,a,i,c,u,l,f,m,g,v,E,w]=t;if(10!==t.length&&13!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:a,maxFeePerGas:i,gas:c,to:u,value:l,data:f,accessList:m,authorizationList:g,...t.length>9?{v,r:E,s:w}:{}},serializedTransaction:e,type:"eip7702"});const P={chainId:(0,d.hexToNumber)(r),type:"eip7702"};return(0,s.isHex)(u)&&"0x"!==u&&(P.to=u),(0,s.isHex)(c)&&"0x"!==c&&(P.gas=(0,d.hexToBigInt)(c)),(0,s.isHex)(f)&&"0x"!==f&&(P.data=f),(0,s.isHex)(n)&&(P.nonce="0x"===n?0:(0,d.hexToNumber)(n)),(0,s.isHex)(l)&&"0x"!==l&&(P.value=(0,d.hexToBigInt)(l)),(0,s.isHex)(i)&&"0x"!==i&&(P.maxFeePerGas=(0,d.hexToBigInt)(i)),(0,s.isHex)(a)&&"0x"!==a&&(P.maxPriorityFeePerGas=(0,d.hexToBigInt)(a)),0!==m.length&&"0x"!==m&&(P.accessList=h(m)),0!==g.length&&"0x"!==g&&(P.authorizationList=function(e){const t=[];for(let r=0;r<e.length;r++){const[n,o,a,i,s,c]=e[r];t.push({address:o,chainId:"0x"===n?0:(0,d.hexToNumber)(n),nonce:"0x"===a?0:(0,d.hexToNumber)(a),...y([i,s,c])})}return t}(g)),(0,p.assertTransactionEIP7702)(P),{...13===t.length?y(t):void 0,...P}}(e):function(e){const t=(0,l.fromRlp)(e,"hex"),[r,n,a,i,c,u,f,m,b]=t;if(6!==t.length&&9!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{nonce:r,gasPrice:n,gas:a,to:i,value:c,data:u,...t.length>6?{v:f,r:m,s:b}:{}},serializedTransaction:e,type:"legacy"});const h={type:"legacy"};if((0,s.isHex)(i)&&"0x"!==i&&(h.to=i),(0,s.isHex)(a)&&"0x"!==a&&(h.gas=(0,d.hexToBigInt)(a)),(0,s.isHex)(u)&&"0x"!==u&&(h.data=u),(0,s.isHex)(r)&&(h.nonce="0x"===r?0:(0,d.hexToNumber)(r)),(0,s.isHex)(c)&&"0x"!==c&&(h.value=(0,d.hexToBigInt)(c)),(0,s.isHex)(n)&&"0x"!==n&&(h.gasPrice=(0,d.hexToBigInt)(n)),(0,p.assertTransactionLegacy)(h),6===t.length)return h;const y=(0,s.isHex)(f)&&"0x"!==f?(0,d.hexToBigInt)(f):0n;if("0x"===b&&"0x"===m)return y>0&&(h.chainId=Number(y)),h;const g=y,v=Number((g-35n)/2n);if(v>0)h.chainId=v;else if(27n!==g&&28n!==g)throw new o.InvalidLegacyVError({v:g});return h.v=g,h.s=b,h.r=m,h.yParity=g%2n==0n?1:0,h}(e)},t.toTransactionArray=b,t.parseAccessList=h;const n=r(1611),o=r(979),a=r(2018),i=r(5231),s=r(6611),c=r(5599),u=r(7716),d=r(4130),l=r(9521),f=r(5140),p=r(8688),m=r(6405);function b(e){return(0,l.fromRlp)(`0x${e.slice(4)}`,"hex")}function h(e){const t=[];for(let r=0;r<e.length;r++){const[o,i]=e[r];if(!(0,a.isAddress)(o,{strict:!1}))throw new n.InvalidAddressError({address:o});t.push({address:o,storageKeys:i.map(e=>(0,f.isHash)(e)?e:(0,u.trim)(e))})}return t}function y(e){const t=e.slice(-3),r="0x"===t[0]||0n===(0,d.hexToBigInt)(t[0])?27n:28n;return{r:(0,c.padHex)(t[1],{size:32}),s:(0,c.padHex)(t[2],{size:32}),v:r,yParity:27n===r?0:1}}},933(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t.weierstrassPoints=m,t.weierstrass=function(e){const r=function(e){const t=(0,n.validateBasic)(e);return(0,a.validateObject)(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:l,nByteLength:f,nBitLength:p}=r,b=s.BYTES+1,h=2*s.BYTES+1;function y(e){return(0,o.mod)(e,l)}function g(e){return(0,o.invert)(e,l)}const{ProjectivePoint:v,normPrivateKeyToScalar:E,weierstrassEquation:w,isWithinCurveOrder:P}=m({...r,toBytes(e,t,r){const n=t.toAffine(),o=s.toBytes(n.x),i=a.concatBytes;return(0,a.abool)("isCompressed",r),r?i(Uint8Array.from([t.hasEvenY()?2:3]),o):i(Uint8Array.from([4]),o,s.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==b||2!==r&&3!==r){if(t===h&&4===r)return{x:s.fromBytes(n.subarray(0,s.BYTES)),y:s.fromBytes(n.subarray(s.BYTES,2*s.BYTES))};throw new Error("invalid Point, expected length of "+b+", or uncompressed "+h+", got "+t)}{const e=(0,a.bytesToNumberBE)(n);if(!(0,a.inRange)(e,d,s.ORDER))throw new Error("Point is not on curve");const t=w(e);let o;try{o=s.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~r)!=((o&d)===d)&&(o=s.neg(o)),{x:e,y:o}}}});function A(e){return e>l>>d}const x=(e,t,r)=>(0,a.bytesToNumberBE)(e.slice(t,r));class I{constructor(e,t,r){(0,a.aInRange)("r",e,d,l),(0,a.aInRange)("s",t,d,l),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){const t=f;return e=(0,a.ensureBytes)("compactSignature",e,2*t),new I(x(e,0,t),x(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,a.ensureBytes)("DER",e));return new I(r,n)}assertValidity(){}addRecoveryBit(e){return new I(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:o}=this,i=_((0,a.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const u=2===o||3===o?t+r.n:t;if(u>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&o?"03":"02",l=v.fromHex(d+c(u,s.BYTES)),f=g(u),p=y(-i*f),m=y(n*f),b=v.BASE.multiplyAndAddUnsafe(l,p,m);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new I(this.r,y(-this.s),this.recovery):this}toDERRawBytes(){return(0,a.hexToBytes)(this.toDERHex())}toDERHex(){return t.DER.hexFromSig(this)}toCompactRawBytes(){return(0,a.hexToBytes)(this.toCompactHex())}toCompactHex(){const e=f;return c(this.r,e)+c(this.s,e)}}const S={isValidPrivateKey(e){try{return E(e),!0}catch(e){return!1}},normPrivateKeyToScalar:E,randomPrivateKey:()=>{const e=(0,o.getMinHashLength)(r.n);return(0,o.mapHashToField)(r.randomBytes(e),r.n)},precompute:(e=8,t=v.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function T(e){if("bigint"==typeof e)return!1;if(e instanceof v)return!0;const t=(0,a.ensureBytes)("key",e).length,n=s.BYTES,o=n+1,i=2*n+1;return r.allowedPrivateKeyLengths||f===o?void 0:t===o||t===i}const O=r.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,a.bytesToNumberBE)(e),r=8*e.length-p;return r>0?t>>BigInt(r):t},_=r.bits2int_modN||function(e){return y(O(e))},j=(0,a.bitMask)(p);function C(e){return(0,a.aInRange)("num < 2^"+p,e,u,j),(0,a.numberToBytesBE)(e,f)}const B={lowS:r.lowS,prehash:!1},M={lowS:r.lowS,prehash:!1};return v.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return v.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(!0===T(e))throw new Error("first arg must be private key");if(!1===T(t))throw new Error("second arg must be public key");return v.fromHex(t).multiply(E(e)).toRawBytes(r)},sign:function(e,t,n=B){const{seed:o,k2sig:c}=function(e,t,n=B){if(["recovered","canonical"].some(e=>e in n))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:c}=r;let{lowS:l,prehash:f,extraEntropy:p}=n;null==l&&(l=!0),e=(0,a.ensureBytes)("msgHash",e),i(n),f&&(e=(0,a.ensureBytes)("prehashed msgHash",o(e)));const m=_(e),b=E(t),h=[C(b),C(m)];if(null!=p&&!1!==p){const e=!0===p?c(s.BYTES):p;h.push((0,a.ensureBytes)("extraEntropy",e))}const w=(0,a.concatBytes)(...h),x=m;return{seed:w,k2sig:function(e){const t=O(e);if(!P(t))return;const r=g(t),n=v.BASE.multiply(t).toAffine(),o=y(n.x);if(o===u)return;const a=y(r*y(x+o*b));if(a===u)return;let i=(n.x===o?0:2)|Number(n.y&d),s=a;return l&&A(a)&&(s=function(e){return A(e)?y(-e):e}(a),i^=1),new I(o,s,i)}}}(e,t,n),l=r;return(0,a.createHmacDrbg)(l.hash.outputLen,l.nByteLength,l.hmac)(o,c)},verify:function(e,n,o,s=M){const c=e;n=(0,a.ensureBytes)("msgHash",n),o=(0,a.ensureBytes)("publicKey",o);const{lowS:u,prehash:d,format:l}=s;if(i(s),"strict"in s)throw new Error("options.strict was renamed to lowS");if(void 0!==l&&"compact"!==l&&"der"!==l)throw new Error("format must be compact or der");const f="string"==typeof c||(0,a.isBytes)(c),p=!f&&!l&&"object"==typeof c&&null!==c&&"bigint"==typeof c.r&&"bigint"==typeof c.s;if(!f&&!p)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let m,b;try{if(p&&(m=new I(c.r,c.s)),f){try{"compact"!==l&&(m=I.fromDER(c))}catch(e){if(!(e instanceof t.DER.Err))throw e}m||"der"===l||(m=I.fromCompact(c))}b=v.fromHex(o)}catch(e){return!1}if(!m)return!1;if(u&&m.hasHighS())return!1;d&&(n=r.hash(n));const{r:h,s:E}=m,w=_(n),P=g(E),A=y(w*P),x=y(h*P),S=v.BASE.multiplyAndAddUnsafe(b,A,x)?.toAffine();return!!S&&y(S.x)===h},ProjectivePoint:v,Signature:I,utils:S}},t.SWUFpSqrtRatio=b,t.mapToCurveSimpleSWU=function(e,t){if((0,o.validateField)(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=b(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let a,i,s,c,u,d,l,f;a=e.sqr(n),a=e.mul(a,t.Z),i=e.sqr(a),i=e.add(i,a),s=e.add(i,e.ONE),s=e.mul(s,t.B),c=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),c=e.mul(c,t.A),i=e.sqr(s),d=e.sqr(c),u=e.mul(d,t.A),i=e.add(i,u),i=e.mul(i,s),d=e.mul(d,c),u=e.mul(d,t.B),i=e.add(i,u),l=e.mul(a,s);const{isValid:p,value:m}=r(i,d);f=e.mul(a,n),f=e.mul(f,m),l=e.cmov(l,s,p),f=e.cmov(f,m,p);const b=e.isOdd(n)===e.isOdd(f);f=e.cmov(e.neg(f),f,b);const h=(0,o.FpInvertBatch)(e,[c],!0)[0];return l=e.mul(l,h),{x:l,y:f}}};const n=r(8970),o=r(2107),a=r(9056);function i(e){void 0!==e.lowS&&(0,a.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,a.abool)("prehash",e.prehash)}class s extends Error{constructor(e=""){super(e)}}function c(e,t){return(0,a.bytesToHex)((0,a.numberToBytesBE)(e,t))}t.DERErr=s,t.DER={Err:s,_tlv:{encode:(e,r)=>{const{Err:n}=t.DER;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&r.length)throw new n("tlv.encode: unpadded data");const o=r.length/2,i=(0,a.numberToHexUnpadded)(o);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const s=o>127?(0,a.numberToHexUnpadded)(i.length/2|128):"";return(0,a.numberToHexUnpadded)(e)+s+i+r},decode(e,r){const{Err:n}=t.DER;let o=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(r.length<2||r[o++]!==e)throw new n("tlv.decode: wrong tlv");const a=r[o++];let i=0;if(128&a){const e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const t=r.subarray(o,o+e);if(t.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===t[0])throw new n("tlv.decode(long): zero leftmost byte");for(const e of t)i=i<<8|e;if(o+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=a;const s=r.subarray(o,o+i);if(s.length!==i)throw new n("tlv.decode: wrong value length");return{v:s,l:r.subarray(o+i)}}},_int:{encode(e){const{Err:r}=t.DER;if(e<u)throw new r("integer: negative integers are not allowed");let n=(0,a.numberToHexUnpadded)(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new r("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:r}=t.DER;if(128&e[0])throw new r("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new r("invalid signature integer: unnecessary leading zero");return(0,a.bytesToNumberBE)(e)}},toSig(e){const{Err:r,_int:n,_tlv:o}=t.DER,i=(0,a.ensureBytes)("signature",e),{v:s,l:c}=o.decode(48,i);if(c.length)throw new r("invalid signature: left bytes after parsing");const{v:u,l:d}=o.decode(2,s),{v:l,l:f}=o.decode(2,d);if(f.length)throw new r("invalid signature: left bytes after parsing");return{r:n.decode(u),s:n.decode(l)}},hexFromSig(e){const{_tlv:r,_int:n}=t.DER,o=r.encode(2,n.encode(e.r))+r.encode(2,n.encode(e.s));return r.encode(48,o)}};const u=BigInt(0),d=BigInt(1),l=BigInt(2),f=BigInt(3),p=BigInt(4);function m(e){const t=function(e){const t=(0,n.validateBasic)(e);(0,a.validateObject)(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:r,Fp:o,a:i}=t;if(r){if(!o.eql(i,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:r}=t,i=(0,o.Field)(t.n,t.nBitLength),s=t.toBytes||((e,t,n)=>{const o=t.toAffine();return(0,a.concatBytes)(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function l(e){const{a:n,b:o}=t,a=r.sqr(e),i=r.mul(a,e);return r.add(r.add(i,r.mul(e,n)),o)}function m(e,t){const n=r.sqr(t),o=l(e);return r.eql(n,o)}if(!m(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const b=r.mul(r.pow(t.a,f),p),h=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(b,h)))throw new Error("bad curve params: a or b");function y(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:i,n:s}=t;if(r&&"bigint"!=typeof e){if((0,a.isBytes)(e)&&(e=(0,a.bytesToHex)(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*n,"0")}let c;try{c="bigint"==typeof e?e:(0,a.bytesToNumberBE)((0,a.ensureBytes)("private key",e,n))}catch(t){throw new Error("invalid private key, expected hex or "+n+" bytes, got "+typeof e)}return i&&(c=(0,o.mod)(c,s)),(0,a.aInRange)("private key",c,d,s),c}function g(e){if(!(e instanceof w))throw new Error("ProjectivePoint expected")}const v=(0,a.memoized)((e,t)=>{const{px:n,py:o,pz:a}=e;if(r.eql(a,r.ONE))return{x:n,y:o};const i=e.is0();null==t&&(t=i?r.ONE:r.inv(a));const s=r.mul(n,t),c=r.mul(o,t),u=r.mul(a,t);if(i)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:c}}),E=(0,a.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:n,y:o}=e.toAffine();if(!r.isValid(n)||!r.isValid(o))throw new Error("bad point: x or y not FE");if(!m(n,o))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class w{constructor(e,t,n){if(null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t)||r.is0(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required");this.px=e,this.py=t,this.pz=n,Object.freeze(this)}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof w)throw new Error("projective point not allowed");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?w.ZERO:new w(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=(0,o.FpInvertBatch)(r,e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(w.fromAffine)}static fromHex(e){const t=w.fromAffine(c((0,a.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return w.BASE.multiply(y(e))}static msm(e,t){return(0,n.pippenger)(w,i,e,t)}_setWindowSize(e){x.setWindowSize(this,e)}assertValidity(){E(this)}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){g(e);const{px:t,py:n,pz:o}=this,{px:a,py:i,pz:s}=e,c=r.eql(r.mul(t,s),r.mul(a,o)),u=r.eql(r.mul(n,s),r.mul(i,o));return c&&u}negate(){return new w(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,f),{px:a,py:i,pz:s}=this;let c=r.ZERO,u=r.ZERO,d=r.ZERO,l=r.mul(a,a),p=r.mul(i,i),m=r.mul(s,s),b=r.mul(a,i);return b=r.add(b,b),d=r.mul(a,s),d=r.add(d,d),c=r.mul(e,d),u=r.mul(o,m),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(b,c),d=r.mul(o,d),m=r.mul(e,m),b=r.sub(l,m),b=r.mul(e,b),b=r.add(b,d),d=r.add(l,l),l=r.add(d,l),l=r.add(l,m),l=r.mul(l,b),u=r.add(u,l),m=r.mul(i,s),m=r.add(m,m),l=r.mul(m,b),c=r.sub(c,l),d=r.mul(m,p),d=r.add(d,d),d=r.add(d,d),new w(c,u,d)}add(e){g(e);const{px:n,py:o,pz:a}=this,{px:i,py:s,pz:c}=e;let u=r.ZERO,d=r.ZERO,l=r.ZERO;const p=t.a,m=r.mul(t.b,f);let b=r.mul(n,i),h=r.mul(o,s),y=r.mul(a,c),v=r.add(n,o),E=r.add(i,s);v=r.mul(v,E),E=r.add(b,h),v=r.sub(v,E),E=r.add(n,a);let P=r.add(i,c);return E=r.mul(E,P),P=r.add(b,y),E=r.sub(E,P),P=r.add(o,a),u=r.add(s,c),P=r.mul(P,u),u=r.add(h,y),P=r.sub(P,u),l=r.mul(p,E),u=r.mul(m,y),l=r.add(u,l),u=r.sub(h,l),l=r.add(h,l),d=r.mul(u,l),h=r.add(b,b),h=r.add(h,b),y=r.mul(p,y),E=r.mul(m,E),h=r.add(h,y),y=r.sub(b,y),y=r.mul(p,y),E=r.add(E,y),b=r.mul(h,E),d=r.add(d,b),b=r.mul(P,E),u=r.mul(v,u),u=r.sub(u,b),b=r.mul(v,h),l=r.mul(P,l),l=r.add(l,b),new w(u,d,l)}subtract(e){return this.add(e.negate())}is0(){return this.equals(w.ZERO)}wNAF(e){return x.wNAFCached(this,e,w.normalizeZ)}multiplyUnsafe(e){const{endo:n,n:o}=t;(0,a.aInRange)("scalar",e,u,o);const i=w.ZERO;if(e===u)return i;if(this.is0()||e===d)return this;if(!n||x.hasPrecomputes(this))return x.wNAFCachedUnsafe(this,e,w.normalizeZ);let{k1neg:s,k1:c,k2neg:l,k2:f}=n.splitScalar(e),p=i,m=i,b=this;for(;c>u||f>u;)c&d&&(p=p.add(b)),f&d&&(m=m.add(b)),b=b.double(),c>>=d,f>>=d;return s&&(p=p.negate()),l&&(m=m.negate()),m=new w(r.mul(m.px,n.beta),m.py,m.pz),p.add(m)}multiply(e){const{endo:n,n:o}=t;let i,s;if((0,a.aInRange)("scalar",e,d,o),n){const{k1neg:t,k1:o,k2neg:a,k2:c}=n.splitScalar(e);let{p:u,f:d}=this.wNAF(o),{p:l,f}=this.wNAF(c);u=x.constTimeNegate(t,u),l=x.constTimeNegate(a,l),l=new w(r.mul(l.px,n.beta),l.py,l.pz),i=u.add(l),s=d.add(f)}else{const{p:t,f:r}=this.wNAF(e);i=t,s=r}return w.normalizeZ([i,s])[0]}multiplyAndAddUnsafe(e,t,r){const n=w.BASE,o=(e,t)=>t!==u&&t!==d&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),a=o(this,t).add(o(e,r));return a.is0()?void 0:a}toAffine(e){return v(this,e)}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===d)return!0;if(r)return r(w,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===d?this:r?r(w,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return(0,a.abool)("isCompressed",e),this.assertValidity(),s(w,this,e)}toHex(e=!0){return(0,a.abool)("isCompressed",e),(0,a.bytesToHex)(this.toRawBytes(e))}}w.BASE=new w(t.Gx,t.Gy,r.ONE),w.ZERO=new w(r.ZERO,r.ONE,r.ZERO);const{endo:P,nBitLength:A}=t,x=(0,n.wNAF)(w,P?Math.ceil(A/2):A);return{CURVE:t,ProjectivePoint:w,normPrivateKeyToScalar:y,weierstrassEquation:l,isWithinCurveOrder:function(e){return(0,a.inRange)(e,d,t.n)}}}function b(e,t){const r=e.ORDER;let n=u;for(let e=r-d;e%l===u;e/=l)n+=d;const o=n,a=l<<o-d-d,i=a*l,s=(r-d)/i,c=(s-d)/l,m=i-d,b=a,h=e.pow(t,s),y=e.pow(t,(s+d)/l);let g=(t,r)=>{let n=h,a=e.pow(r,m),i=e.sqr(a);i=e.mul(i,r);let s=e.mul(t,i);s=e.pow(s,c),s=e.mul(s,a),a=e.mul(s,r),i=e.mul(s,t);let u=e.mul(i,a);s=e.pow(u,b);let f=e.eql(s,e.ONE);a=e.mul(i,y),s=e.mul(u,n),i=e.cmov(a,i,f),u=e.cmov(s,u,f);for(let t=o;t>d;t--){let r=t-l;r=l<<r-d;let o=e.pow(u,r);const s=e.eql(o,e.ONE);a=e.mul(i,n),n=e.mul(n,n),o=e.mul(u,n),i=e.cmov(a,i,s),u=e.cmov(o,u,s)}return{isValid:f,value:i}};if(e.ORDER%p===f){const r=(e.ORDER-f)/p,n=e.sqrt(e.neg(t));g=(t,o)=>{let a=e.sqr(o);const i=e.mul(t,o);a=e.mul(a,i);let s=e.pow(a,r);s=e.mul(s,i);const c=e.mul(s,n),u=e.mul(e.sqr(s),o),d=e.eql(u,t);return{isValid:d,value:e.cmov(c,s,d)}}}return g}},943(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.charCodeMap=void 0,t.assertSize=function(e,t){if(n.size(e)>t)throw new n.SizeOverflowError({givenSize:n.size(e),maxSize:t})},t.assertStartOffset=function(e,t){if("number"==typeof t&&t>0&&t>n.size(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:n.size(e)})},t.assertEndOffset=function(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.size(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:n.size(e)})},t.charCodeToBase16=function(e){return e>=t.charCodeMap.zero&&e<=t.charCodeMap.nine?e-t.charCodeMap.zero:e>=t.charCodeMap.A&&e<=t.charCodeMap.F?e-(t.charCodeMap.A-10):e>=t.charCodeMap.a&&e<=t.charCodeMap.f?e-(t.charCodeMap.a-10):void 0},t.pad=function(e,t={}){const{dir:r,size:o=32}=t;if(0===o)return e;if(e.length>o)throw new n.SizeExceedsPaddingSizeError({size:e.length,targetSize:o,type:"Bytes"});const a=new Uint8Array(o);for(let t=0;t<o;t++){const n="right"===r;a[n?t:o-t-1]=e[n?t:e.length-t-1]}return a},t.trim=function(e,t={}){const{dir:r="left"}=t;let n=e,o=0;for(let e=0;e<n.length-1&&"0"===n["left"===r?e:n.length-e-1].toString();e++)o++;return n="left"===r?n.slice(o):n.slice(0,n.length-o),n};const n=r(7223);t.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102}},945(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItem=function(e){return"function"===e.type?`function ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,n.formatAbiParameters)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,n.formatAbiParameters)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback() external"+("payable"===e.stateMutability?" payable":""):"receive() external payable"};const n=r(6746)},979(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptRevertedError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=void 0,t.prettyPrint=i;const n=r(2945),o=r(1825),a=r(1682);function i(e){const t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`).join("\n")}class s extends a.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n"),{name:"FeeConflictError"})}}t.FeeConflictError=s;class c extends a.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}t.InvalidLegacyVError=c;class u extends a.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}t.InvalidSerializableTransactionError=u;class d extends a.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}t.InvalidSerializedTransactionTypeError=d;class l extends a.BaseError{constructor({attributes:e,serializedTransaction:t,type:r}){const n=Object.entries(e).map(([e,t])=>void 0===t?e:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,n.length>0?`Missing Attributes: ${n.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=t,this.type=r}}t.InvalidSerializedTransactionError=l;class f extends a.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}t.InvalidStorageKeySizeError=f;class p extends a.BaseError{constructor(e,{account:t,docsPath:r,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:l,nonce:f,to:p,value:m}){const b=i({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:p,value:void 0!==m&&`${(0,n.formatEther)(m)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:c,gasPrice:void 0!==u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:void 0!==d&&`${(0,o.formatGwei)(d)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,o.formatGwei)(l)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",b].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.TransactionExecutionError=p;class m extends a.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:o}){let a="Transaction";r&&void 0!==o&&(a=`Transaction at block time "${r}" at index "${o}"`),e&&void 0!==o&&(a=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(a=`Transaction at block number "${t}" at index "${o}"`),n&&(a=`Transaction with hash "${n}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}t.TransactionNotFoundError=m;class b extends a.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}t.TransactionReceiptNotFoundError=b;class h extends a.BaseError{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}t.TransactionReceiptRevertedError=h;class y extends a.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}t.WaitForTransactionReceiptTimeoutError=y},997(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateMaxPriorityFeePerGas=async function(e,t){return c(e,t)},t.internal_estimateMaxPriorityFeePerGas=c;const n=r(5035),o=r(4130),a=r(3115),i=r(3248),s=r(7383);async function c(e,t){const{block:r,chain:c=e.chain,request:u}=t||{};try{const t=c?.fees?.maxPriorityFeePerGas??c?.fees?.defaultPriorityFee;if("function"==typeof t){const n=r||await(0,a.getAction)(e,i.getBlock,"getBlock")({}),o=await t({block:n,client:e,request:u});if(null===o)throw new Error;return o}if(void 0!==t)return t;const n=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,o.hexToBigInt)(n)}catch{const[t,o]=await Promise.all([r?Promise.resolve(r):(0,a.getAction)(e,i.getBlock,"getBlock")({}),(0,a.getAction)(e,s.getGasPrice,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new n.Eip1559FeesNotSupportedError;const c=o-t.baseFeePerGas;return c<0n?0n:c}}},1007(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseGwei=function(e,t="wei"){return(0,o.parseUnits)(e,n.gweiUnits[t])};const n=r(9427),o=r(7916)},1011(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;const n=r(4072);t.SHA256=n.SHA256,t.sha256=n.sha256,t.SHA224=n.SHA224,t.sha224=n.sha224},1028(e,t){function r(e){let t=0;for(const r of e)t+=r.length;const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}function n(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e){return"string"==typeof e[0]?n(e):r(e)},t.concatBytes=r,t.concatHex=n},1030(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.loadState=async function(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}},1039(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712DomainNotFoundError=void 0;const n=r(1682);class o extends n.BaseError{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}t.Eip712DomainNotFoundError=o},1062(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extraEntropy=void 0,t.setExtraEntropy=function(e){t.extraEntropy=e},t.extraEntropy=!1},1154(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=async function({hash:e,signature:t}){return(0,n.publicKeyToAddress)(await(0,o.recoverPublicKey)({hash:e,signature:t}))};const n=r(5339),o=r(7246)},1188(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setAutomine=async function(e,t){"ganache"===e.mode?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}},1246(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransactionSync=async function(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:i}){const s=await e.request({method:"eth_sendRawTransactionSync",params:i?[t,(0,a.numberToHex)(i)]:[t]},{retryCount:0}),c=(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(s);if("reverted"===c.status&&r)throw new n.TransactionReceiptRevertedError({receipt:c});return c};const n=r(979),o=r(3501),a=r(9766)},1251(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(8613),t),o(r(3024),t),o(r(9471),t)},1255(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransactionSync=async function(e,t){const{account:r=e.account,chain:p=e.chain,accessList:E,authorizationList:w,blobs:P,data:A,gas:x,gasPrice:I,maxFeePerBlobGas:S,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:_,pollingInterval:j,throwOnReceiptRevert:C,type:B,value:M,...k}=t,R=t.timeout??Math.max(3*(p?.blockTime??0),5e3);if(void 0===r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});const N=r?(0,n.parseAccount)(r):null;try{(0,m.assertRequest)(t);const r=await(async()=>t.to?t.to:null!==t.to&&w&&w.length>0?await(0,s.recoverAuthorizationAddress)({authorization:w[0]}).catch(()=>{throw new a.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if("json-rpc"===N?.type||null===N){let t;null!==p&&(t=await(0,f.getAction)(e,b.getChainId,"getChainId")({}),(0,c.assertCurrentChain)({currentChainId:t,chain:p}));const n=e.chain?.formatters?.transactionRequest?.format,o=(n||l.formatTransactionRequest)({...(0,d.extract)(k,{format:n}),accessList:E,account:N,authorizationList:w,blobs:P,chainId:t,data:A,gas:x,gasPrice:I,maxFeePerBlobGas:S,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:_,to:r,type:B,value:M},"sendTransaction"),a=v.get(e.uid),s=a?"wallet_sendTransaction":"eth_sendTransaction",u=await(async()=>{try{return await e.request({method:s,params:[o]},{retryCount:0})}catch(t){if(!1===a)throw t;const r=t;if("InvalidInputRpcError"===r.name||"InvalidParamsRpcError"===r.name||"MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)return await e.request({method:"wallet_sendTransaction",params:[o]},{retryCount:0}).then(t=>(v.set(e.uid,!0),t)).catch(t=>{const n=t;if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw v.set(e.uid,!1),r;throw n});throw r}})(),m=await(0,f.getAction)(e,h.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:u,pollingInterval:j,timeout:R});if(C&&"reverted"===m.status)throw new i.TransactionReceiptRevertedError({receipt:m});return m}if("local"===N?.type){const t=await(0,f.getAction)(e,y.prepareTransactionRequest,"prepareTransactionRequest")({account:N,accessList:E,authorizationList:w,blobs:P,chain:p,data:A,gas:x,gasPrice:I,maxFeePerBlobGas:S,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:_,nonceManager:N.nonceManager,parameters:[...y.defaultParameters,"sidecars"],type:B,value:M,...k,to:r}),n=p?.serializers?.transaction,o=await N.signTransaction(t,{serializer:n});return await(0,f.getAction)(e,g.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:o,throwOnReceiptRevert:C})}if("smart"===N?.type)throw new o.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new o.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:N?.type})}catch(e){if(e instanceof o.AccountTypeNotSupportedError)throw e;throw(0,u.getTransactionError)(e,{...t,account:N,chain:t.chain||void 0})}};const n=r(9546),o=r(8328),a=r(1682),i=r(979),s=r(4572),c=r(375),u=r(1279),d=r(4384),l=r(2996),f=r(3115),p=r(2292),m=r(8901),b=r(401),h=r(2673),y=r(211),g=r(1246),v=new p.LruMap(128)},1279(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionError=function(e,{docsPath:t,...r}){const i=(()=>{const t=(0,a.getNodeError)(e,r);return t instanceof n.UnknownNodeError?e:t})();return new o.TransactionExecutionError(i,{docsPath:t,...r})};const n=r(6687),o=r(979),a=r(5871)},1284(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateContractGas=async function(e,t){const{abi:r,address:c,args:u,functionName:d,dataSuffix:l,...f}=t,p=(0,o.encodeFunctionData)({abi:r,args:u,functionName:d});try{return await(0,i.getAction)(e,s.estimateGas,"estimateGas")({data:`${p}${l?l.replace("0x",""):""}`,to:c,...f})}catch(e){const t=f.account?(0,n.parseAccount)(f.account):void 0;throw(0,a.getContractError)(e,{abi:r,address:c,args:u,docsPath:"/docs/contract/estimateContractGas",functionName:d,sender:t?.address})}};const n=r(9546),o=r(5108),a=r(2505),i=r(3115),s=r(2034)},1300(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.memoryStorage={},t}return o(t,e),t.prototype.isAvailable=function(){return!0},t.prototype.set=function(e,t){this.memoryStorage[this.getKey(e)]=t},t.prototype.get=function(e){return this.memoryStorage[this.getKey(e)]||null},t.prototype.remove=function(e){delete this.memoryStorage[this.getKey(e)]},t}(a(r(8620)).default);t.default=i},1374(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForCallsStatusTimeoutError=void 0,t.waitForCallsStatus=async function(e,t){const{id:r,pollingInterval:n=e.pollingInterval,status:p=({statusCode:e})=>200===e||e>=300,retryCount:m=4,retryDelay:b=({count:e})=>200*(1<<e),timeout:h=6e4,throwOnFailure:y=!1}=t,g=(0,d.stringify)(["waitForCallsStatus",e.uid,r]),{promise:v,resolve:E,reject:w}=(0,c.withResolvers)();let P;const A=(0,i.observe)(g,{resolve:E,reject:w},t=>{const i=(0,s.poll)(async()=>{const n=e=>{clearTimeout(P),i(),e(),A()};try{const i=await(0,u.withRetry)(async()=>{const t=await(0,a.getAction)(e,l.getCallsStatus,"getCallsStatus")({id:r});if(y&&"failure"===t.status)throw new o.BundleFailedError(t);return t},{retryCount:m,delay:b});if(!p(i))return;n(()=>t.resolve(i))}catch(e){n(()=>t.reject(e))}},{interval:n,emitOnBegin:!0});return i});return P=h?setTimeout(()=>{A(),clearTimeout(P),w(new f({id:r}))},h):void 0,await v};const n=r(1682),o=r(8030),a=r(3115),i=r(9097),s=r(2464),c=r(3772),u=r(2801),d=r(8352),l=r(34);class f extends n.BaseError{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}t.WaitForCallsStatusTimeoutError=f},1398(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e,t={}){const{as:r=("string"==typeof e?"Hex":"Bytes")}=t,n=(0,o.keccak_256)(i.from(e));return"Bytes"===r?n:s.fromBytes(n)},t.ripemd160=function(e,t={}){const{as:r=("string"==typeof e?"Hex":"Bytes")}=t,o=(0,n.ripemd160)(i.from(e));return"Bytes"===r?o:s.fromBytes(o)},t.sha256=function(e,t={}){const{as:r=("string"==typeof e?"Hex":"Bytes")}=t,n=(0,a.sha256)(i.from(e));return"Bytes"===r?n:s.fromBytes(n)},t.validate=function(e){return s.validate(e)&&32===s.size(e)};const n=r(3810),o=r(5391),a=r(1011),i=r(7223),s=r(1465)},1418(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSiweMessage=function(e){const{scheme:t,statement:o,...a}=e.match(r)?.groups??{},{chainId:i,expirationTime:s,issuedAt:c,notBefore:u,requestId:d,...l}=e.match(n)?.groups??{},f=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...a,...l,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...c?{issuedAt:new Date(c)}:{},...u?{notBefore:new Date(u)}:{},...d?{requestId:d}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...o?{statement:o}:{}}};const r=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/},1421(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidWrappedSignatureError=t.universalSignatureValidatorAbi=t.universalSignatureValidatorBytecode=t.magicBytes=void 0,t.assert=i,t.from=function(e){return"string"==typeof e?s(e):e},t.unwrap=s,t.wrap=function(e){const{data:r,signature:o,to:i}=e;return a.concat(n.encode(n.from("address, bytes, bytes"),[i,r,o]),t.magicBytes)},t.validate=function(e){try{return i(e),!0}catch{return!1}};const n=r(7818),o=r(6573),a=r(1465);function i(e){if(a.slice(e,-32)!==t.magicBytes)throw new c(e)}function s(e){i(e);const[t,r,o]=n.decode(n.from("address, bytes, bytes"),e);return{data:r,signature:o,to:t}}t.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",t.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",t.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];class c extends o.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}t.InvalidWrappedSignatureError=c},1459(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidBytesLengthError=t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=void 0;const n=r(1682);class o extends n.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=o;class a extends n.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=a;class i extends n.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}t.InvalidBytesLengthError=i},1461(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderRpcError=void 0;class r extends Error{constructor(e,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=t}}t.ProviderRpcError=r},1465(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=t.SizeOverflowError=t.InvalidLengthError=t.InvalidHexValueError=t.InvalidHexTypeError=t.InvalidHexBooleanError=t.IntegerOutOfRangeError=void 0,t.assert=l,t.concat=function(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`},t.from=function(e){return e instanceof Uint8Array?f(e):Array.isArray(e)?f(new Uint8Array(e)):e},t.fromBoolean=function(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?(s.assertSize(r,t.size),p(r,t.size)):r},t.fromBytes=f,t.fromNumber=function(e,t={}){const{signed:r,size:n}=t,o=BigInt(e);let a;n?a=r?(1n<<8n*BigInt(n)-1n)-1n:2n**(8n*BigInt(n))-1n:"number"==typeof e&&(a=BigInt(Number.MAX_SAFE_INTEGER));const i="bigint"==typeof a&&r?-a-1n:0;if(a&&o>a||o<i){const t="bigint"==typeof e?"n":"";throw new y({max:a?`${a}${t}`:void 0,min:`${i}${t}`,signed:r,size:n,value:`${e}${t}`})}const s=`0x${(r&&o<0?(1n<<BigInt(8*n))+BigInt(o):o).toString(16)}`;return n?p(s,n):s},t.fromString=function(e,t={}){return f(u.encode(e),t)},t.isEqual=function(e,t){return(0,n.equalBytes)(o.fromHex(e),o.fromHex(t))},t.padLeft=p,t.padRight=m,t.random=function(e){return f(o.random(e))},t.slice=function(e,t,r,n={}){const{strict:o}=n;s.assertStartOffset(e,t);const a=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return o&&s.assertEndOffset(a,t,r),a},t.size=function(e){return Math.ceil((e.length-2)/2)},t.trimLeft=b,t.trimRight=function(e){return s.trim(e,{dir:"right"})},t.toBigInt=h,t.toBoolean=function(e,t={}){t.size&&s.assertSize(e,t.size);const r=b(e);if("0x"===r)return!1;if("0x1"===r)return!0;throw new g(e)},t.toBytes=function(e,t={}){return o.fromHex(e,t)},t.toNumber=function(e,t={}){const{signed:r,size:n}=t;return Number(r||n?h(e,t):e)},t.toString=function(e,t={}){const{size:r}=t;let n=o.fromHex(e);return r&&(i.assertSize(n,r),n=o.trimRight(n)),(new TextDecoder).decode(n)},t.validate=function(e,t={}){const{strict:r=!1}=t;try{return l(e,{strict:r}),!0}catch{return!1}};const n=r(9056),o=r(7223),a=r(6573),i=r(943),s=r(5313),c=r(7348),u=new TextEncoder,d=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function l(e,t={}){const{strict:r=!1}=t;if(!e)throw new v(e);if("string"!=typeof e)throw new v(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new E(e);if(!e.startsWith("0x"))throw new E(e)}function f(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=d[e[t]];const n=`0x${r}`;return"number"==typeof t.size?(s.assertSize(n,t.size),m(n,t.size)):n}function p(e,t){return s.pad(e,{dir:"left",size:t})}function m(e,t){return s.pad(e,{dir:"right",size:t})}function b(e){return s.trim(e,{dir:"left"})}function h(e,t={}){const{signed:r}=t;t.size&&s.assertSize(e,t.size);const n=BigInt(e);if(!r)return n;const o=(e.length-2)/2,a=(1n<<8n*BigInt(o))-1n;return n<=a>>1n?n:n-a-1n}class y extends a.BaseError{constructor({max:e,min:t,signed:r,size:n,value:o}){super(`Number \`${o}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=y;class g extends a.BaseError{constructor(e){super(`Hex value \`"${e}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}t.InvalidHexBooleanError=g;class v extends a.BaseError{constructor(e){super(`Value \`${"object"==typeof e?c.stringify(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}t.InvalidHexTypeError=v;class E extends a.BaseError{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}t.InvalidHexValueError=E;class w extends a.BaseError{constructor(e){super(`Hex value \`"${e}"\` is an odd length (${e.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}t.InvalidLengthError=w;class P extends a.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}t.SizeOverflowError=P;class A extends a.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=A;class x extends a.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=x},1508(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItem=function(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.InvalidDefinitionTypeError(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`},t.formatAbiParams=o;const n=r(9797);function o(e,{includeName:t=!1}={}){return e?e.map(e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t})).join(t?", ":","):""}},1556(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashTypedData=function(e){const{domain:t={},message:r,primaryType:n}=e,a={EIP712Domain:(0,s.getTypesForEIP712Domain)({domain:t}),...e.types};(0,s.validateTypedData)({domain:t,message:r,primaryType:n,types:a});const d=["0x1901"];return t&&d.push(c({domain:t,types:a})),"EIP712Domain"!==n&&d.push(u({data:r,primaryType:n,types:a})),(0,i.keccak256)((0,o.concat)(d))},t.hashDomain=c,t.hashStruct=u,t.encodeType=f;const n=r(3224),o=r(1028),a=r(6669),i=r(1725),s=r(4413);function c({domain:e,types:t}){return u({data:e,primaryType:"EIP712Domain",types:t})}function u({data:e,primaryType:t,types:r}){const n=d({data:e,primaryType:t,types:r});return(0,i.keccak256)(n)}function d({data:e,primaryType:t,types:r}){const o=[{type:"bytes32"}],a=[l({primaryType:t,types:r})];for(const n of r[t]){const[t,i]=m({types:r,name:n.name,type:n.type,value:e[n.name]});o.push(t),a.push(i)}return(0,n.encodeAbiParameters)(o,a)}function l({primaryType:e,types:t}){const r=(0,a.toHex)(f({primaryType:e,types:t}));return(0,i.keccak256)(r)}function f({primaryType:e,types:t}){let r="";const n=p({primaryType:e,types:t});n.delete(e);const o=[e,...Array.from(n).sort()];for(const e of o)r+=`${e}(${t[e].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}function p({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),o=n?.[0];if(r.has(o)||void 0===t[o])return r;r.add(o);for(const e of t[o])p({primaryType:e.type,types:t},r);return r}function m({types:e,name:t,type:r,value:o}){if(void 0!==e[r])return[{type:"bytes32"},(0,i.keccak256)(d({data:o,primaryType:r,types:e}))];if("bytes"===r)return o="0x"+((o.length%2?"0":"")+o.slice(2)),[{type:"bytes32"},(0,i.keccak256)(o)];if("string"===r)return[{type:"bytes32"},(0,i.keccak256)((0,a.toHex)(o))];if(r.lastIndexOf("]")===r.length-1){const a=r.slice(0,r.lastIndexOf("[")),s=o.map(r=>m({name:t,type:a,types:e,value:r}));return[{type:"bytes32"},(0,i.keccak256)((0,n.encodeAbiParameters)(s.map(([e])=>e),s.map(([,e])=>e)))]}return[{type:r},o]}},1609(e,t){function r(e){const r=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),n=r(e,t.promiseCache),o=r(e,t.responseCache);return{clear:()=>{n.clear(),o.clear()},promise:n,response:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.responseCache=t.promiseCache=void 0,t.getCache=r,t.withCache=async function(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const o=r(t),a=o.response.get();if(a&&n>0&&Date.now()-a.created.getTime()<n)return a.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{const e=await i;return o.response.set({created:new Date,data:e}),e}finally{o.promise.clear()}},t.promiseCache=new Map,t.responseCache=new Map},1611(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAddressError=void 0;const n=r(1682);class o extends n.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}t.InvalidAddressError=o},1680(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.1.1"},1682(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0,t.setErrorConfig=function(e){o=e};const n=r(6351);let o={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n.version}`};class a extends Error{constructor(e,t={}){const r=t.cause instanceof a?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof a&&t.cause.docsPath||t.docsPath,s=o.getDocsUrl?.({...t,docsPath:i});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...o.version?[`Version: ${o.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n.version}walk(e){return i(this,e)}}function i(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?i(e.cause,t):t?null:e}t.BaseError=a},1691(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFilterRequestScope=function(e,{method:t}){const r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:o,transport:a})=>{"success"===o&&t===e&&(r[n]=a.request)}),t=>r[t]||e.request}},1695(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructTypeError=t.InvalidPrimaryTypeError=t.InvalidDomainError=void 0;const n=r(8352),o=r(1682);class a extends o.BaseError{constructor({domain:e}){super(`Invalid domain "${(0,n.stringify)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}t.InvalidDomainError=a;class i extends o.BaseError{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}t.InvalidPrimaryTypeError=i;class s extends o.BaseError{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}t.InvalidStructTypeError=s},1699(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toBytes=function(e,t={}){return"number"==typeof e||"bigint"==typeof e?f(e,t):"boolean"==typeof e?u(e,t):(0,o.isHex)(e)?l(e,t):p(e,t)},t.boolToBytes=u,t.hexToBytes=l,t.numberToBytes=f,t.stringToBytes=p;const n=r(1682),o=r(6611),a=r(5599),i=r(4130),s=r(6669),c=new TextEncoder;function u(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),"number"==typeof t.size?((0,i.assertSize)(r,{size:t.size}),(0,a.pad)(r,{size:t.size})):r}function d(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function l(e,t={}){let r=e;t.size&&((0,i.assertSize)(r,{size:t.size}),r=(0,a.pad)(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,c=new Uint8Array(s);for(let e=0,t=0;e<s;e++){const r=d(o.charCodeAt(t++)),a=d(o.charCodeAt(t++));if(void 0===r||void 0===a)throw new n.BaseError(`Invalid byte sequence ("${o[t-2]}${o[t-1]}" in "${o}").`);c[e]=16*r+a}return c}function f(e,t){return l((0,s.numberToHex)(e,t))}function p(e,t={}){const r=c.encode(e);return"number"==typeof t.size?((0,i.assertSize)(r,{size:t.size}),(0,a.pad)(r,{dir:"right",size:t.size})):r}},1725(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e,t){const r=t||"hex",s=(0,n.keccak_256)((0,o.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===r?s:(0,i.toHex)(s)};const n=r(5391),o=r(6611),a=r(1699),i=r(6669)},1756(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionData=function(e){const{abi:t,data:r}=e,c=(0,o.slice)(r,0,4),u=t.find(e=>"function"===e.type&&c===(0,a.toFunctionSelector)((0,s.formatAbiItem)(e)));if(!u)throw new n.AbiFunctionSignatureNotFoundError(c,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:u.name,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,i.decodeAbiParameters)(u.inputs,(0,o.slice)(r,4)):void 0}};const n=r(9797),o=r(1972),a=r(364),i=r(8448),s=r(1508)},1825(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatGwei=function(e,t="wei"){return(0,o.formatUnits)(e,n.gweiUnits[t])};const n=r(9427),o=r(7290)},1839(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.functionModifiers=t.eventModifiers=t.modifiers=void 0,t.isErrorSignature=function(e){return o.test(e)},t.execErrorSignature=function(e){return(0,n.execTyped)(o,e)},t.isEventSignature=function(e){return a.test(e)},t.execEventSignature=function(e){return(0,n.execTyped)(a,e)},t.isFunctionSignature=function(e){return i.test(e)},t.execFunctionSignature=function(e){return(0,n.execTyped)(i,e)},t.isStructSignature=function(e){return s.test(e)},t.execStructSignature=function(e){return(0,n.execTyped)(s,e)},t.isConstructorSignature=function(e){return c.test(e)},t.execConstructorSignature=function(e){return(0,n.execTyped)(c,e)},t.isFallbackSignature=function(e){return u.test(e)},t.execFallbackSignature=function(e){return(0,n.execTyped)(u,e)},t.isReceiveSignature=function(e){return d.test(e)};const n=r(4027),o=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,i=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,s=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,c=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,u=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,d=/^receive\(\) external payable$/;t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},1841(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallFilter=async function(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}},1855(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.readContract=async function(e,t){const{abi:r,address:c,args:u,functionName:d,...l}=t,f=(0,o.encodeFunctionData)({abi:r,args:u,functionName:d});try{const{data:t}=await(0,i.getAction)(e,s.call,"call")({...l,data:f,to:c});return(0,n.decodeFunctionResult)({abi:r,args:u,functionName:d,data:t||"0x"})}catch(e){throw(0,a.getContractError)(e,{abi:r,address:c,args:u,docsPath:"/docs/contract/readContract",functionName:d})}};const n=r(233),o=r(5108),a=r(2505),i=r(3115),s=r(5417)},1901(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getHttpRpcClient=function(e,t={}){return{async request(r){const{body:s,fetchFn:c=t.fetchFn??fetch,onRequest:u=t.onRequest,onResponse:d=t.onResponse,timeout:l=t.timeout??1e4}=r,f={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:p,method:m,signal:b}=f;try{const t=await(0,o.withTimeout)(async({signal:t})=>{const r={...f,body:Array.isArray(s)?(0,a.stringify)(s.map(e=>({jsonrpc:"2.0",id:e.id??i.idCache.take(),...e}))):(0,a.stringify)({jsonrpc:"2.0",id:s.id??i.idCache.take(),...s}),headers:{"Content-Type":"application/json",...p},method:m||"POST",signal:b||(l>0?t:null)},n=new Request(e,r),o=await(u?.(n,r))??{...r,url:e};return await c(o.url??e,o)},{errorInstance:new n.TimeoutError({body:s,url:e}),timeout:l,signal:!0});let r;if(d&&await d(t),t.headers.get("Content-Type")?.startsWith("application/json"))r=await t.json();else{r=await t.text();try{r=JSON.parse(r||"{}")}catch(e){if(t.ok)throw e;r={error:r}}}if(!t.ok)throw new n.HttpRequestError({body:s,details:(0,a.stringify)(r.error)||t.statusText,headers:t.headers,status:t.status,url:e});return r}catch(t){if(t instanceof n.HttpRequestError)throw t;if(t instanceof n.TimeoutError)throw t;throw new n.HttpRequestError({body:s,cause:t,url:e})}}}};const n=r(3318),o=r(3636),a=r(8352),i=r(2660)},1972(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.slice=function(e,t,r,{strict:n}={}){return(0,o.isHex)(e,{strict:!1})?u(e,t,r,{strict:n}):c(e,t,r,{strict:n})},t.sliceBytes=c,t.sliceHex=u;const n=r(1459),o=r(6611),a=r(4025);function i(e,t){if("number"==typeof t&&t>0&&t>(0,a.size)(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:(0,a.size)(e)})}function s(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,a.size)(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:(0,a.size)(e)})}function c(e,t,r,{strict:n}={}){i(e,t);const o=e.slice(t,r);return n&&s(o,t,r),o}function u(e,t,r,{strict:n}={}){i(e,t);const o=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return n&&s(o,t,r),o}},1974(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=async function(e,t){const{address:r,factory:a,factoryData:i,signature:s,message:c,primaryType:u,types:d,domain:l,...f}=t,p=(0,n.hashTypedData)({message:c,primaryType:u,types:d,domain:l});return(0,o.verifyHash)(e,{address:r,factory:a,factoryData:i,hash:p,signature:s,...f})};const n=r(1556),o=r(5968)},1985(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;const n=r(9061);class o extends n.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}t.InvalidParenthesisError=o},2008(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageManager=void 0;var o=r(6973),a=n(r(6737)),i=n(r(1300)),s=n(r(4581)),c=["cookieStorage","localStorage","sessionStorage","memoryStorage"],u=function(){function e(e){this.writeKey=e,this.storages=new Map}return e.prototype.getStorage=function(e){if(!this.storages.has(e)){for(var t=this.createStorage(e);!t.isAvailable();){var r=c.indexOf(e);o.logger.warn("Storage ".concat(e," is not available, trying ").concat(c[r+1])),t=this.createStorage(c[r+1])}this.storages.set(e,t)}return this.storages.get(e)},e.prototype.createStorage=function(e){switch(e){case"cookieStorage":return new a.default(this.writeKey);case"localStorage":return new s.default(this.writeKey,localStorage);case"sessionStorage":return new s.default(this.writeKey,sessionStorage);default:return new i.default(this.writeKey)}},e}();t.StorageManager=u},2015(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.writeContract=u;const n=r(9546),o=r(8328),a=r(5108),i=r(2505),s=r(3115),c=r(9939);async function u(e,t){return u.internal(e,c.sendTransaction,"sendTransaction",t)}!function(e){e.internal=async function(e,t,r,c){const{abi:u,account:d=e.account,address:l,args:f,dataSuffix:p,functionName:m,...b}=c;if(void 0===d)throw new o.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const h=d?(0,n.parseAccount)(d):null,y=(0,a.encodeFunctionData)({abi:u,args:f,functionName:m});try{return await(0,s.getAction)(e,t,r)({data:`${y}${p?p.replace("0x",""):""}`,to:l,account:h,...b})}catch(e){throw(0,i.getContractError)(e,{abi:u,address:l,args:f,docsPath:"/docs/contract/writeContract",functionName:m,sender:h?.address})}}}(u||(t.writeContract=u={}))},2018(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressCache=void 0,t.isAddress=function(e,r){const{strict:n=!0}=r??{},i=`${e}.${n}`;if(t.isAddressCache.has(i))return t.isAddressCache.get(i);const s=!(!a.test(e)||e.toLowerCase()!==e&&n&&(0,o.checksumAddress)(e)!==e);return t.isAddressCache.set(i,s),s};const n=r(2292),o=r(9868),a=/^0x[a-fA-F0-9]{40}$/;t.isAddressCache=new n.LruMap(8192)},2024(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.secureHash=function(e){var t=(0,o.utf8ToBytes)(e),r=(0,n.sha256)(t);return(0,o.bytesToHex)(r).slice(0,8)};var n=r(6997),o=r(7393)},2026(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return(0,a.default)(r)?t:(0,o.default)(function(t){return e(r,t)});default:return(0,a.default)(r)&&(0,a.default)(n)?t:(0,a.default)(r)?(0,o.default)(function(t){return e(t,n)}):(0,a.default)(n)?(0,o.default)(function(t){return e(r,t)}):e(r,n)}}};var o=n(r(6959)),a=n(r(4156))},2034(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=async function(e,t){const{account:r=e.account,prepare:p=!0}=t,m=r?(0,n.parseAccount)(r):void 0,b=Array.isArray(p)?p:"local"!==m?.type?["blobVersionedHashes"]:void 0;try{const{accessList:r,authorizationList:n,blobs:s,blobVersionedHashes:h,blockNumber:y,blockTag:g,data:v,gas:E,gasPrice:w,maxFeePerBlobGas:P,maxFeePerGas:A,maxPriorityFeePerGas:x,nonce:I,value:S,stateOverride:T,...O}=p?await(0,f.prepareTransactionRequest)(e,{...t,parameters:b}):t,_=("bigint"==typeof y?(0,i.numberToHex)(y):void 0)||g,j=(0,d.serializeStateOverride)(T),C=await(async()=>O.to?O.to:n&&n.length>0?await(0,a.recoverAuthorizationAddress)({authorization:n[0]}).catch(()=>{throw new o.BaseError("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,l.assertRequest)(t);const B=e.chain?.formatters?.transactionRequest?.format,M=(B||u.formatTransactionRequest)({...(0,c.extract)(O,{format:B}),account:m,accessList:r,authorizationList:n,blobs:s,blobVersionedHashes:h,data:v,gas:E,gasPrice:w,maxFeePerBlobGas:P,maxFeePerGas:A,maxPriorityFeePerGas:x,nonce:I,to:C,value:S},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:j?[M,_??e.experimental_blockTag??"latest",j]:_?[M,_]:[M]}))}catch(r){throw(0,s.getEstimateGasError)(r,{...t,account:m,chain:e.chain})}};const n=r(9546),o=r(1682),a=r(4572),i=r(6669),s=r(4670),c=r(4384),u=r(2996),d=r(8916),l=r(8901),f=r(211)},2040(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.multicall=async function(e,t){const{account:r,authorizationList:m,allowFailure:b=!0,blockNumber:h,blockOverrides:y,blockTag:g,stateOverride:v}=t,E=t.contracts,{batchSize:w=t.batchSize??1024,deployless:P=t.deployless??!1}="object"==typeof e.batch?.multicall?e.batch.multicall:{},A=(()=>{if(t.multicallAddress)return t.multicallAddress;if(P)return null;if(e.chain)return(0,d.getChainContractAddress)({blockNumber:h,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),x=[[]];let I=0,S=0;for(let e=0;e<E.length;e++){const{abi:t,address:n,args:o,functionName:a}=E[e];try{const e=(0,u.encodeFunctionData)({abi:t,args:o,functionName:a});S+=(e.length-2)/2,w>0&&S>w&&x[I].length>0&&(I++,S=(e.length-2)/2,x[I]=[]),x[I]=[...x[I],{allowFailure:!0,callData:e,target:n}]}catch(e){const i=(0,l.getContractError)(e,{abi:t,address:n,args:o,docsPath:"/docs/contract/multicall",functionName:a,sender:r});if(!b)throw i;x[I]=[...x[I],{allowFailure:!0,callData:"0x",target:n}]}}const T=await Promise.allSettled(x.map(t=>(0,f.getAction)(e,p.readContract,"readContract")({...null===A?{code:o.multicall3Bytecode}:{address:A},abi:n.multicall3Abi,account:r,args:[t],authorizationList:m,blockNumber:h,blockOverrides:y,blockTag:g,functionName:"aggregate3",stateOverride:v}))),O=[];for(let e=0;e<T.length;e++){const t=T[e];if("rejected"===t.status){if(!b)throw t.reason;for(let r=0;r<x[e].length;r++)O.push({status:"failure",error:t.reason,result:void 0});continue}const r=t.value;for(let t=0;t<r.length;t++){const{returnData:n,success:o}=r[t],{callData:i}=x[e][t],{abi:u,address:d,functionName:f,args:p}=E[O.length];try{if("0x"===i)throw new a.AbiDecodingZeroDataError;if(!o)throw new s.RawContractError({data:n});const e=(0,c.decodeFunctionResult)({abi:u,args:p,data:n,functionName:f});O.push(b?{result:e,status:"success"}:e)}catch(e){const t=(0,l.getContractError)(e,{abi:u,address:d,args:p,docsPath:"/docs/contract/multicall",functionName:f});if(!b)throw t;O.push({error:t,result:void 0,status:"failure"})}}}if(O.length!==E.length)throw new i.BaseError("multicall results mismatch");return O};const n=r(138),o=r(4442),a=r(9797),i=r(1682),s=r(3585),c=r(233),u=r(5108),d=r(9858),l=r(2505),f=r(3115),p=r(1855)},2061(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidVError=t.InvalidYParityError=t.InvalidSError=t.InvalidRError=t.MissingPropertiesError=t.InvalidSerializedSizeError=void 0,t.assert=u,t.fromBytes=d,t.fromHex=l,t.extract=function(e){return void 0===e.r||void 0===e.s?void 0:f(e)},t.from=f,t.fromDerBytes=function(e){return p(i.fromBytes(e))},t.fromDerHex=p,t.fromLegacy=m,t.fromRpc=b,t.fromTuple=function(e){const[t,r,n]=e;return f({r:"0x"===r?0n:BigInt(r),s:"0x"===n?0n:BigInt(n),yParity:"0x"===t?0:Number(t)})},t.toBytes=function(e){return o.fromHex(h(e))},t.toHex=h,t.toDerBytes=function(e){return new n.secp256k1.Signature(e.r,e.s).toDERRawBytes()},t.toDerHex=function(e){return`0x${new n.secp256k1.Signature(e.r,e.s).toDERHex()}`},t.toLegacy=function(e){return{r:e.r,s:e.s,v:g(e.yParity)}},t.toRpc=function(e){const{r:t,s:r,yParity:n}=e;return{r:i.fromNumber(t,{size:32}),s:i.fromNumber(r,{size:32}),yParity:0===n?"0x0":"0x1"}},t.toTuple=function(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",0n===t?"0x":i.trimLeft(i.fromNumber(t)),0n===r?"0x":i.trimLeft(i.fromNumber(r))]},t.validate=function(e,t={}){try{return u(e,t),!0}catch{return!1}},t.vToYParity=y,t.yParityToV=g;const n=r(7666),o=r(7223),a=r(6573),i=r(1465),s=r(7348),c=r(2683);function u(e,t={}){const{recovered:r}=t;if(void 0===e.r)throw new E({signature:e});if(void 0===e.s)throw new E({signature:e});if(r&&void 0===e.yParity)throw new E({signature:e});if(e.r<0n||e.r>c.maxUint256)throw new w({value:e.r});if(e.s<0n||e.s>c.maxUint256)throw new P({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new A({value:e.yParity})}function d(e){return l(i.fromBytes(e))}function l(e){if(130!==e.length&&132!==e.length)throw new v({signature:e});const t=BigInt(i.slice(e,0,32)),r=BigInt(i.slice(e,32,64)),n=(()=>{const t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return y(t)}catch{throw new A({value:t})}})();return void 0===n?{r:t,s:r}:{r:t,s:r,yParity:n}}function f(e){const t="string"==typeof e?l(e):e instanceof Uint8Array?d(e):"string"==typeof e.r?b(e):e.v?m(e):{r:e.r,s:e.s,...void 0!==e.yParity?{yParity:e.yParity}:{}};return u(t),t}function p(e){const{r:t,s:r}=n.secp256k1.Signature.fromDER(i.from(e).slice(2));return{r:t,s:r}}function m(e){return{r:e.r,s:e.s,yParity:y(e.v)}}function b(e){const t=(()=>{const t=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if("number"==typeof t&&"number"!=typeof r&&(r=y(t)),"number"!=typeof r)throw new A({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function h(e){u(e);const t=e.r,r=e.s;return i.concat(i.fromNumber(t,{size:32}),i.fromNumber(r,{size:32}),"number"==typeof e.yParity?i.fromNumber(g(e.yParity),{size:1}):"0x")}function y(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return e%2==0?1:0;throw new x({value:e})}function g(e){if(0===e)return 27;if(1===e)return 28;throw new A({value:e})}class v extends a.BaseError{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${i.size(i.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}t.InvalidSerializedSizeError=v;class E extends a.BaseError{constructor({signature:e}){super(`Signature \`${s.stringify(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}t.MissingPropertiesError=E;class w extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}t.InvalidRError=w;class P extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}t.InvalidSError=P;class A extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}t.InvalidYParityError=A;class x extends a.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}t.InvalidVError=x},2070(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLabelhash=function(e){return`[${e.slice(2)}]`}},2071(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodedLabelToLabelhash=function(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,n.isHex)(t)?t:null};const n=r(6611)},2078(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=void 0;const n=r(1682);class o extends n.BaseError{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}t.ChainDoesNotSupportContract=o;class a extends n.BaseError{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}t.ChainMismatchError=a;class i extends n.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n"),{name:"ChainNotFoundError"})}}t.ChainNotFoundError=i;class s extends n.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}t.ClientChainNotConfiguredError=s;class c extends n.BaseError{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}t.InvalidChainIdError=c},2094(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_PROPERTIES_EXCLUDED_FIELDS=t.VERSION=t.CHANNEL=void 0,t.CHANNEL="web",t.VERSION="0";var r=new Set(["utm_source","utm_medium","utm_campaign","utm_term","utm_content","ref","referral","refcode","referrer","category","name","url","path","hash","query"]);t.PAGE_PROPERTIES_EXCLUDED_FIELDS=r},2098(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaManager=void 0;var n=r(6973),o=r(9282),a=function(){function e(e,t){this.formo=e,(null==t?void 0:t.wallet)?(n.logger.info("SolanaManager: Initializing Solana wallet tracking"),this.handler=new o.SolanaAdapter(e,{wallet:t.wallet,connection:t.connection,cluster:t.cluster})):t&&(this.pendingConnection=t.connection,this.pendingCluster=t.cluster)}return Object.defineProperty(e.prototype,"adapter",{get:function(){return this.handler},enumerable:!1,configurable:!0}),e.prototype.setWallet=function(e){this.handler?this.handler.setWallet(e):e&&(n.logger.info("SolanaManager: Initializing Solana wallet tracking (lazy)"),this.handler=new o.SolanaAdapter(this.formo,{wallet:e,connection:this.pendingConnection,cluster:this.pendingCluster}),this.pendingConnection=void 0,this.pendingCluster=void 0)},e.prototype.setConnection=function(e){this.handler?this.handler.setConnection(e):this.pendingConnection=null!=e?e:void 0},e.prototype.setCluster=function(e){this.handler?this.handler.setCluster(e):this.pendingCluster=e},e.prototype.syncWalletState=function(){var e;null===(e=this.handler)||void 0===e||e.syncWalletState()},e.prototype.cleanup=function(){var e;null===(e=this.handler)||void 0===e||e.cleanup(),this.handler=void 0},e}();t.SolanaManager=a},2102(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createTransport=function({key:e,methods:t,name:r,request:a,retryCount:i=3,retryDelay:s=150,timeout:c,type:u},d){const l=(0,o.uid)();return{config:{key:e,methods:t,name:r,request:a,retryCount:i,retryDelay:s,timeout:c,type:u},request:(0,n.buildRequest)(a,{methods:t,retryCount:i,retryDelay:s,uid:l}),value:d}};const n=r(9748),o=r(6367)},2107(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=f,t.pow=function(e,t,r){return v(A(r),e,t)},t.pow2=function(e,t,r){let n=e;for(;t-- >a;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=h,t.FpSqrt=y,t.validateField=function(e){const t=g.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,o.validateObject)(e,t)},t.FpPow=v,t.FpInvertBatch=E,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpLegendre=w,t.FpIsSquare=function(e,t){return 1===w(e,t)},t.nLength=P,t.Field=A,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const n=(e=(0,o.ensureBytes)("privateHash",e)).length,a=P(t).nByteLength+8;if(a<24||n<a||n>1024)throw new Error("hashToPrivateScalar: expected "+a+"-1024 bytes of input, got "+n);return f(r?(0,o.bytesToNumberLE)(e):(0,o.bytesToNumberBE)(e),t-i)+i},t.getFieldBytesLength=x,t.getMinHashLength=I,t.mapHashToField=function(e,t,r=!1){const n=e.length,a=x(t),s=I(t);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const c=f(r?(0,o.bytesToNumberLE)(e):(0,o.bytesToNumberBE)(e),t-i)+i;return r?(0,o.numberToBytesLE)(c,a):(0,o.numberToBytesBE)(c,a)};const n=r(11),o=r(9056),a=BigInt(0),i=BigInt(1),s=BigInt(2),c=BigInt(3),u=BigInt(4),d=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=a?r:t+r}function p(e,t){if(e===a)throw new Error("invert: expected non-zero number");if(t<=a)throw new Error("invert: expected positive modulus, got "+t);let r=f(e,t),n=t,o=a,s=i,c=i,u=a;for(;r!==a;){const e=n/r,t=n%r,a=o-c*e,i=s-u*e;n=r,r=t,o=c,s=u,c=a,u=i}if(n!==i)throw new Error("invert: does not exist");return f(o,t)}function m(e,t){const r=(e.ORDER+i)/u,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function b(e,t){const r=(e.ORDER-d)/l,n=e.mul(t,s),o=e.pow(n,r),a=e.mul(t,o),i=e.mul(e.mul(a,s),o),c=e.mul(a,e.sub(i,e.ONE));if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}function h(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-i,r=0;for(;t%s===a;)t/=s,r++;let n=s;const o=A(e);for(;1===w(o,n);)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===r)return m;let c=o.pow(n,t);const u=(t+i)/s;return function(e,n){if(e.is0(n))return n;if(1!==w(e,n))throw new Error("Cannot find square root");let o=r,a=e.mul(e.ONE,c),s=e.pow(n,t),d=e.pow(n,u);for(;!e.eql(s,e.ONE);){if(e.is0(s))return e.ZERO;let t=1,r=e.sqr(s);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===o)throw new Error("Cannot find square root");const n=i<<BigInt(o-t-1),c=e.pow(a,n);o=t,a=e.sqr(c),s=e.mul(s,a),d=e.mul(d,c)}return d}}function y(e){return e%u===c?m:e%l===d?b:h(e)}t.isNegativeLE=(e,t)=>(f(e,t)&i)===i;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function v(e,t,r){if(r<a)throw new Error("invalid exponent, negatives unsupported");if(r===a)return e.ONE;if(r===i)return t;let n=e.ONE,o=t;for(;r>a;)r&i&&(n=e.mul(n,o)),o=e.sqr(o),r>>=i;return n}function E(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),o=t.reduce((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r)),e.ONE),a=e.inv(o);return t.reduceRight((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r)),a),n}function w(e,t){const r=(e.ORDER-i)/s,n=e.pow(t,r),o=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),c=e.eql(n,e.neg(e.ONE));if(!o&&!a&&!c)throw new Error("invalid Legendre symbol result");return o?1:a?0:-1}function P(e,t){void 0!==t&&(0,n.anumber)(t);const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function A(e,t,r=!1,n={}){if(e<=a)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:c}=P(e,t);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const d=Object.freeze({ORDER:e,isLE:r,BITS:s,BYTES:c,MASK:(0,o.bitMask)(s),ZERO:a,ONE:i,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return a<=t&&t<e},is0:e=>e===a,isOdd:e=>(e&i)===i,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>v(d,e,t),div:(t,r)=>f(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:n.sqrt||(t=>(u||(u=y(e)),u(d,t))),toBytes:e=>r?(0,o.numberToBytesLE)(e,c):(0,o.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+e.length);return r?(0,o.bytesToNumberLE)(e):(0,o.bytesToNumberBE)(e)},invertBatch:e=>E(d,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(d)}function x(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function I(e){const t=x(e);return t+Math.ceil(t/2)}},2118(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createBatchScheduler=function({fn:e,id:t,shouldSplitBatch:r,wait:a=0,sort:i}){const s=async()=>{const t=u();c();const r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{i&&Array.isArray(e)&&e.sort(i);for(let r=0;r<t.length;r++){const{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){const{reject:n}=t[r];n?.(e)}})},c=()=>o.delete(t),u=()=>o.get(t)||[],d=e=>o.set(t,[...u(),e]);return{flush:c,async schedule(e){const{promise:t,resolve:o,reject:i}=(0,n.withResolvers)(),c=r?.([...u().map(({args:e})=>e),e]);return c&&s(),u().length>0?(d({args:e,resolve:o,reject:i}),t):(d({args:e,resolve:o,reject:i}),setTimeout(s,a),t)}}};const n=r(3772),o=new Map},2129(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionHash=void 0;var n=r(6091);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return n.toSignatureHash}})},2135(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defineKzg=function({blobToKzgCommitment:e,computeBlobKzgProof:t}){return{blobToKzgCommitment:e,computeBlobKzgProof:t}}},2163(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setupKzg=function(e,t){try{e.loadTrustedSetup(t)}catch(e){const t=e;if(!t.message.includes("trusted setup is already loaded"))throw t}return(0,n.defineKzg)(e)};const n=r(2135)},2189(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=async function(e,{address:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}){const a="bigint"==typeof r?(0,n.numberToHex)(r):void 0,i=await e.request({method:"eth_getBalance",params:[t,a||o]});return BigInt(i)};const n=r(6669)},2260(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolStatus=async function(e){const{pending:t,queued:r}=await e.request({method:"txpool_status"});return{pending:(0,n.hexToNumber)(t),queued:(0,n.hexToNumber)(r)}};const n=r(4130)},2264(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.socketClientCache=void 0,t.getSocketRpcClient=async function(e){const{getSocket:r,keepAlive:s=!0,key:c="socket",reconnect:u=!0,url:d}=e,{interval:l=3e4}="object"==typeof s?s:{},{attempts:f=5,delay:p=2e3}="object"==typeof u?u:{},m=JSON.stringify({keepAlive:s,key:c,url:d,reconnect:u});let b=t.socketClientCache.get(m);if(b)return b;let h=0;const{schedule:y}=(0,o.createBatchScheduler)({id:m,fn:async()=>{const e=new Map,o=new Map;let c,y,g,v=!1;function E(){if(u&&h<f){if(v)return;v=!0,h++,y?.close(),setTimeout(async()=>{await w().catch(console.error),v=!1},p)}else e.clear(),o.clear()}async function w(){const t=await r({onClose(){for(const t of e.values())t.onError?.(new n.SocketClosedError({url:d}));for(const e of o.values())e.onError?.(new n.SocketClosedError({url:d}));E()},onError(t){c=t;for(const t of e.values())t.onError?.(c);for(const e of o.values())e.onError?.(c);E()},onOpen(){c=void 0,h=0},onResponse(t){const r="eth_subscription"===t.method,n=r?t.params.subscription:t.id,a=r?o:e,i=a.get(n);i&&i.onResponse(t),r||a.delete(n)}});if(y=t,s&&(g&&clearInterval(g),g=setInterval(()=>y.ping?.(),l)),u&&o.size>0){const e=o.entries();for(const[t,{onResponse:r,body:n,onError:a}]of e)n&&(o.delete(t),b?.request({body:n,onResponse:r,onError:a}))}return t}return await w(),c=void 0,b={close(){g&&clearInterval(g),y.close(),t.socketClientCache.delete(m)},get socket(){return y},request({body:t,onError:r,onResponse:n}){c&&r&&r(c);const a=t.id??i.idCache.take(),s=e=>{"number"==typeof e.id&&a!==e.id||("eth_subscribe"===t.method&&"string"==typeof e.result&&o.set(e.result,{onResponse:s,onError:r,body:t}),"eth_unsubscribe"===t.method&&o.delete(t.params?.[0]),n(e))};e.set(a,{onResponse:s,onError:r});try{y.request({body:{jsonrpc:"2.0",id:a,...t}})}catch(e){r?.(e)}},requestAsync({body:e,timeout:t=1e4}){return(0,a.withTimeout)(()=>new Promise((t,r)=>this.request({body:e,onError:r,onResponse:t})),{errorInstance:new n.TimeoutError({body:e,url:d}),timeout:t})},requests:e,subscriptions:o,url:d},t.socketClientCache.set(m,b),[b]}}),[g,[v]]=await y();return v};const n=r(3318),o=r(2118),a=r(3636),i=r(2660);t.socketClientCache=new Map},2279(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.WagmiEventHandler=void 0;var i=r(6561),s=r(6973),c=r(7397),u=r(8412),d=new Set(["status","chainId","address","data","to","value","transactionHash","function_name","function_args","builder_codes"]);function l(e,t,r){if(void 0===t&&(t=1e3),void 0===r&&(r=500),e.size>t)for(var n=Array.from(e),o=0;o<r&&o<n.length;o++)e.delete(n[o])}var f=function(){function e(e,t,r){this.unsubscribers=[],this.trackingState={isProcessing:!1},this.processedMutations=new Set,this.processedQueries=new Set,this.pendingTransactions=new Map,this.formo=e,this.wagmiConfig=t,this.queryClient=r,s.logger.info("WagmiEventHandler: Initializing Wagmi integration"),this.setupConnectionListeners(),this.queryClient?(this.setupMutationTracking(),this.setupQueryTracking()):s.logger.warn("WagmiEventHandler: QueryClient not provided, signature and transaction events will not be tracked")}return e.prototype.setupConnectionListeners=function(){var e=this;s.logger.info("WagmiEventHandler: Setting up connection listeners");var t=this.wagmiConfig.subscribe(function(e){return e.status},function(t,r){e.handleStatusChange(t,r)});this.unsubscribers.push(t);var r=this.wagmiConfig.subscribe(function(e){return e.chainId},function(t,r){e.handleChainChange(t,r)});this.unsubscribers.push(r),s.logger.info("WagmiEventHandler: Connection listeners set up successfully")},e.prototype.handleStatusChange=function(e,t){return o(this,void 0,void 0,function(){var r,o,i,c,u;return a(this,function(a){switch(a.label){case 0:if(this.trackingState.isProcessing)return s.logger.debug("WagmiEventHandler: Already processing status change, skipping"),[2];this.trackingState.isProcessing=!0,a.label=1;case 1:return a.trys.push([1,7,8,9]),r=this.getState(),o=this.getConnectedAddress(r),i=r.chainId,s.logger.info("WagmiEventHandler: Status changed",{status:e,prevStatus:t,address:o,chainId:i}),"disconnected"!==e||"connected"!==t?[3,4]:this.formo.isAutocaptureEnabled("disconnect")?[4,this.formo.disconnect({chainId:this.trackingState.lastChainId,address:this.trackingState.lastAddress})]:[3,3];case 2:a.sent(),a.label=3;case 3:this.trackingState.lastAddress=void 0,this.trackingState.lastChainId=void 0,a.label=4;case 4:return"connected"!==e||"connected"===t?[3,6]:o&&void 0!==i?(this.trackingState.lastAddress=o,this.trackingState.lastChainId=i,this.formo.isAutocaptureEnabled("connect")?(c=this.getConnectorName(r),[4,this.formo.connect({chainId:i,address:o},n({},c&&{providerName:c}))]):[3,6]):[3,6];case 5:a.sent(),a.label=6;case 6:return this.trackingState.lastStatus=e,[3,9];case 7:return u=a.sent(),s.logger.error("WagmiEventHandler: Error handling status change:",u),[3,9];case 8:return this.trackingState.isProcessing=!1,[7];case 9:return[2]}})})},e.prototype.handleChainChange=function(e,t){return o(this,void 0,void 0,function(){var r,n,o;return a(this,function(a){switch(a.label){case 0:if(e===t||void 0===e)return[2];if("connected"!==(r=this.getState()).status)return[2];if(!(n=this.getConnectedAddress(r)))return s.logger.warn("WagmiEventHandler: Chain changed but no address found"),[2];if(s.logger.info("WagmiEventHandler: Chain changed",{chainId:e,prevChainId:t,address:n}),this.trackingState.lastChainId=e,!this.formo.isAutocaptureEnabled("chain"))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.formo.chain({chainId:e,address:n})];case 2:return a.sent(),[3,4];case 3:return o=a.sent(),s.logger.error("WagmiEventHandler: Error tracking chain change:",o),[3,4];case 4:return[2]}})})},e.prototype.setupMutationTracking=function(){var e=this;if(this.queryClient){s.logger.info("WagmiEventHandler: Setting up mutation tracking");var t=this.queryClient.getMutationCache().subscribe(function(t){e.handleMutationEvent(t)});this.unsubscribers.push(t),s.logger.info("WagmiEventHandler: Mutation tracking set up successfully")}},e.prototype.setupQueryTracking=function(){var e=this;if(this.queryClient){s.logger.info("WagmiEventHandler: Setting up query tracking");var t=this.queryClient.getQueryCache().subscribe(function(t){e.handleQueryEvent(t)});this.unsubscribers.push(t),s.logger.info("WagmiEventHandler: Query tracking set up successfully")}},e.prototype.handleQueryEvent=function(e){if("updated"===e.type){var t=e.query,r=t.queryKey;if(r&&0!==r.length){var n=r[0];if("waitForTransactionReceipt"===n){var o=t.state,a=o.data,i=null==a?void 0:a.status,c="".concat(t.queryHash,":").concat(o.status,":").concat(i||"");this.processedQueries.has(c)?s.logger.debug("WagmiEventHandler: Skipping duplicate query event",{queryType:n,queryHash:t.queryHash,status:o.status,receiptStatus:i}):(this.processedQueries.add(c),s.logger.debug("WagmiEventHandler: Query event",{queryType:n,queryHash:t.queryHash,status:o.status}),this.handleTransactionReceiptQuery(t),l(this.processedQueries))}}}},e.prototype.handleTransactionReceiptQuery=function(e){var t;if(this.formo.isAutocaptureEnabled("transaction")){var r=e.state,o=e.queryKey;if("success"===r.status){var a=o[1],c=null==a?void 0:a.hash,u=(null==a?void 0:a.chainId)||this.trackingState.lastChainId;if(c){var d=c.toLowerCase(),l=this.pendingTransactions.get(d),f=(null==l?void 0:l.address)||this.trackingState.lastAddress;if(f)try{var p=r.data,m="reverted"===(null==p?void 0:p.status)?i.TransactionStatus.REVERTED:i.TransactionStatus.CONFIRMED;s.logger.info("WagmiEventHandler: Tracking transaction confirmation",{status:m,transactionHash:c,address:f,chainId:u,blockNumber:null===(t=null==p?void 0:p.blockNumber)||void 0===t?void 0:t.toString()}),this.formo.transaction(n(n(n(n(n(n({status:m,chainId:u||0,address:f,transactionHash:c},(null==l?void 0:l.data)&&{data:l.data}),(null==l?void 0:l.to)&&{to:l.to}),(null==l?void 0:l.value)&&{value:l.value}),(null==l?void 0:l.function_name)&&{function_name:l.function_name}),(null==l?void 0:l.function_args)&&{function_args:l.function_args}),(null==l?void 0:l.builder_codes)&&{builder_codes:l.builder_codes}),null==l?void 0:l.safeFunctionArgs),this.pendingTransactions.delete(d)}catch(e){s.logger.error("WagmiEventHandler: Error handling transaction receipt query:",e)}else s.logger.warn("WagmiEventHandler: Transaction receipt query but no address available")}else s.logger.warn("WagmiEventHandler: Transaction receipt query but no hash found")}}},e.prototype.handleMutationEvent=function(e){if("updated"===e.type){var t=e.mutation,r=t.options.mutationKey;if(r&&0!==r.length){var n=r[0],o=t.state,a="".concat(t.mutationId,":").concat(o.status);this.processedMutations.has(a)?s.logger.debug("WagmiEventHandler: Skipping duplicate mutation event",{mutationType:n,mutationId:t.mutationId,status:o.status}):(this.processedMutations.add(a),s.logger.debug("WagmiEventHandler: Mutation event",{mutationType:n,mutationId:t.mutationId,status:o.status}),"signMessage"!==n&&"signTypedData"!==n||this.handleSignatureMutation(n,t),"sendTransaction"!==n&&"writeContract"!==n||this.handleTransactionMutation(n,t),l(this.processedMutations))}}},e.prototype.handleSignatureMutation=function(e,t){if(this.formo.isAutocaptureEnabled("signature")){var r=t.state,o=r.variables||{},a=this.trackingState.lastChainId,c=this.trackingState.lastAddress;if(c)try{var u,d=void 0;if("pending"===r.status)u=i.SignatureStatus.REQUESTED;else if("success"===r.status)u=i.SignatureStatus.CONFIRMED,d=r.data;else{if("error"!==r.status)return;u=i.SignatureStatus.REJECTED}var l;l="signMessage"===e?o.message||"":JSON.stringify(o.message||o.types||{}),s.logger.info("WagmiEventHandler: Tracking signature event",{status:u,mutationType:e,address:c,chainId:a}),this.formo.signature(n({status:u,chainId:a,address:c,message:l},d&&{signatureHash:d}))}catch(e){s.logger.error("WagmiEventHandler: Error handling signature mutation:",e)}else s.logger.warn("WagmiEventHandler: Signature event but no address available")}},e.prototype.handleTransactionMutation=function(e,t){var r;if(this.formo.isAutocaptureEnabled("transaction")){var o=t.state,a=o.variables||{},l=this.trackingState.lastChainId||a.chainId,f=a.account,p="string"==typeof f?f:null==f?void 0:f.address,m=this.trackingState.lastAddress||p||a.from;if(m)try{var b,h=void 0;if("pending"===o.status)b=i.TransactionStatus.STARTED;else if("success"===o.status)b=i.TransactionStatus.BROADCASTED,h=o.data;else{if("error"!==o.status)return;b=i.TransactionStatus.REJECTED}var y=void 0,g=void 0,v=void 0,E=void 0,w=null===(r=a.value)||void 0===r?void 0:r.toString();if("writeContract"===e){var P=a.abi,A=a.functionName,x=a.args,I=a.address,S=a.dataSuffix;if(g=I,v=A,P&&A){E=(0,c.extractFunctionArgs)(P,A,x);var T=(0,c.encodeWriteContractData)(P,A,x);T&&(y=(0,c.concatCalldataWithSuffix)(T,S),s.logger.debug("WagmiEventHandler: Encoded writeContract data",y.substring(0,10)))}}else y=a.data,g=a.to;var O=(0,u.extractBuilderCodes)(y);s.logger.info("WagmiEventHandler: Tracking transaction event",n({status:b,mutationType:e,address:m,chainId:l,transactionHash:h,function_name:v},O&&{builder_codes:O}));var _=(0,c.buildSafeFunctionArgs)(E,d);if(b===i.TransactionStatus.BROADCASTED&&h){var j=h.toLowerCase(),C=n(n(n(n(n(n(n({address:m},y&&{data:y}),g&&{to:g}),w&&{value:w}),v&&{function_name:v}),E&&{function_args:E}),O&&{builder_codes:O}),_&&{safeFunctionArgs:_});if(this.pendingTransactions.set(j,C),s.logger.debug("WagmiEventHandler: Stored pending transaction for confirmation",{transactionHash:j}),this.pendingTransactions.size>100)for(var B=Array.from(this.pendingTransactions.keys()),M=0;M<50&&M<B.length;M++)this.pendingTransactions.delete(B[M])}this.formo.transaction(n(n(n(n(n(n(n({status:b,chainId:l||0,address:m},y&&{data:y}),g&&{to:g}),w&&{value:w}),h&&{transactionHash:h}),v&&{function_name:v}),E&&{function_args:E}),O&&{builder_codes:O}),_)}catch(e){s.logger.error("WagmiEventHandler: Error handling transaction mutation:",e)}else s.logger.warn("WagmiEventHandler: Transaction event but no address available")}},e.prototype.getState=function(){return"function"==typeof this.wagmiConfig.getState?this.wagmiConfig.getState():this.wagmiConfig.state?this.wagmiConfig.state:(s.logger.warn("WagmiEventHandler: Unable to get state from config, returning default state"),{status:"disconnected",connections:new Map,current:void 0,chainId:void 0})},e.prototype.getConnectedAddress=function(e){if(e.current){var t=e.connections.get(e.current);if(t&&0!==t.accounts.length)return t.accounts[0]}},e.prototype.getConnectorName=function(e){if(e.current){var t=e.connections.get(e.current);return null==t?void 0:t.connector.name}},e.prototype.cleanup=function(){s.logger.debug("WagmiEventHandler: Cleaning up subscriptions");for(var e=0,t=this.unsubscribers;e<t.length;e++){var r=t[e];try{r()}catch(e){s.logger.error("WagmiEventHandler: Error during cleanup:",e)}}this.unsubscribers=[],this.processedMutations.clear(),this.processedQueries.clear(),this.pendingTransactions.clear(),s.logger.debug("WagmiEventHandler: Cleanup complete")},e}();t.WagmiEventHandler=f},2292(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LruMap=void 0;class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}t.LruMap=r},2351(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defineChain=function(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}},2363(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.reset=async function(e,{blockNumber:t,jsonRpcUrl:r}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:r}}]})}},2439(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isErc6492Signature=function(e){return(0,o.sliceHex)(e,-32)===n.erc6492MagicBytes};const n=r(8165),o=r(1972)},2442(e,t){Object.defineProperty(t,"__esModule",{value:!0})},2464(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.poll=function(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let a=!0;const i=()=>a=!1;return(async()=>{let s;t&&(s=await e({unpoll:i}));const c=await(r?.(s))??o;await(0,n.wait)(c);const u=async()=>{a&&(await e({unpoll:i}),await(0,n.wait)(o),u())};u()})(),i};const n=r(4396)},2491(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendUnsignedTransaction=async function(e,t){const{accessList:r,data:a,from:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:l,to:f,value:p,...m}=t,b=e.chain?.formatters?.transactionRequest?.format,h=(b||o.formatTransactionRequest)({...(0,n.extract)(m,{format:b}),accessList:r,data:a,from:i,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:l,to:f,value:p},"sendUnsignedTransaction");return await e.request({method:"eth_sendUnsignedTransaction",params:[h]})};const n=r(4384),o=r(2996)},2505(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContractError=function(e,{abi:t,address:r,args:u,docsPath:d,functionName:l,sender:f}){const p=e instanceof a.RawContractError?e:e instanceof o.BaseError?e.walk(e=>"data"in e)||e.walk():{},{code:m,data:b,details:h,message:y,shortMessage:g}=p,v=e instanceof n.AbiDecodingZeroDataError?new a.ContractFunctionZeroDataError({functionName:l}):[c,s.InternalRpcError.code].includes(m)&&(b||h||y||g)?new a.ContractFunctionRevertedError({abi:t,data:"object"==typeof b?b.data:b,functionName:l,message:p instanceof i.RpcRequestError?h:g??y}):e;return new a.ContractFunctionExecutionError(v,{abi:t,args:u,contractAddress:r,docsPath:d,functionName:l,sender:f})};const n=r(9797),o=r(1682),a=r(3585),i=r(3318),s=r(2564),c=3},2517(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverMessageAddress=async function({message:e,signature:t}){return(0,o.recoverAddress)({hash:(0,n.hashMessage)(e),signature:t})};const n=r(7399),o=r(1154)},2528(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAuthorizationList=function(e){if(!e||0===e.length)return[];const t=[];for(const r of e){const{chainId:e,nonce:a,...i}=r,s=r.address;t.push([e?(0,n.toHex)(e):"0x",s,a?(0,n.toHex)(a):"0x",...(0,o.toYParitySignatureArray)({},i)])}return t};const n=r(6669),o=r(8786)},2534(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=i,t.createCurve=function(e,t){const r=t=>(0,a.weierstrass)({...e,...i(t)});return{...r(t),create:r}};const n=r(3835),o=r(11),a=r(933);function i(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}},2544(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;const n=r(8064);class o extends n.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=o;class a extends n.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=a;class i extends n.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}t.InvalidStructSignatureError=i},2564(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownRpcError=t.AtomicityNotSupportedError=t.AtomicReadyWalletRejectedUpgradeError=t.BundleTooLargeError=t.UnknownBundleIdError=t.DuplicateIdError=t.UnsupportedChainIdError=t.UnsupportedNonOptionalCapabilityError=t.SwitchChainError=t.ChainDisconnectedError=t.ProviderDisconnectedError=t.UnsupportedProviderMethodError=t.UnauthorizedProviderError=t.UserRejectedRequestError=t.JsonRpcVersionUnsupportedError=t.LimitExceededRpcError=t.MethodNotSupportedRpcError=t.TransactionRejectedRpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.InvalidParamsRpcError=t.MethodNotFoundRpcError=t.InvalidRequestRpcError=t.ParseRpcError=t.ProviderRpcError=t.RpcError=void 0;const n=r(1682),o=r(3318);class a extends n.BaseError{constructor(e,{code:t,docsPath:r,metaMessages:n,name:a,shortMessage:i}){super(i,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||e.name,this.code=e instanceof o.RpcRequestError?e.code:t??-1}}t.RpcError=a;class i extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}t.ProviderRpcError=i;class s extends a{constructor(e){super(e,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}t.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends a{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}t.InvalidRequestRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends a{constructor(e,{method:t}={}){super(e,{code:u.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}t.MethodNotFoundRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class d extends a{constructor(e){super(e,{code:d.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")})}}t.InvalidParamsRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class l extends a{constructor(e){super(e,{code:l.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}t.InternalRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends a{constructor(e){super(e,{code:f.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")})}}t.InvalidInputRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class p extends a{constructor(e){super(e,{code:p.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}t.ResourceNotFoundRpcError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class m extends a{constructor(e){super(e,{code:m.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}t.ResourceUnavailableRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class b extends a{constructor(e){super(e,{code:b.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}t.TransactionRejectedRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class h extends a{constructor(e,{method:t}={}){super(e,{code:h.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}t.MethodNotSupportedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends a{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}t.LimitExceededRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class g extends a{constructor(e){super(e,{code:g.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}t.JsonRpcVersionUnsupportedError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends i{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}t.UserRejectedRequestError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class E extends i{constructor(e){super(e,{code:E.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}t.UnauthorizedProviderError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class w extends i{constructor(e,{method:t}={}){super(e,{code:w.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}t.UnsupportedProviderMethodError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class P extends i{constructor(e){super(e,{code:P.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}t.ProviderDisconnectedError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class A extends i{constructor(e){super(e,{code:A.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}t.ChainDisconnectedError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class x extends i{constructor(e){super(e,{code:x.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}t.SwitchChainError=x,Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class I extends i{constructor(e){super(e,{code:I.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}t.UnsupportedNonOptionalCapabilityError=I,Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class S extends i{constructor(e){super(e,{code:S.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}t.UnsupportedChainIdError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class T extends i{constructor(e){super(e,{code:T.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}t.DuplicateIdError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class O extends i{constructor(e){super(e,{code:O.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}t.UnknownBundleIdError=O,Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class _ extends i{constructor(e){super(e,{code:_.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}t.BundleTooLargeError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class j extends i{constructor(e){super(e,{code:j.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}t.AtomicReadyWalletRejectedUpgradeError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class C extends i{constructor(e){super(e,{code:C.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}t.AtomicityNotSupportedError=C,Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760}),t.UnknownRpcError=class extends a{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},2591(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createAccessList=async function(e,t){const{account:r=e.account,blockNumber:u,blockTag:d="latest",blobs:l,data:f,gas:p,gasPrice:m,maxFeePerBlobGas:b,maxFeePerGas:h,maxPriorityFeePerGas:y,to:g,value:v,...E}=t,w=r?(0,n.parseAccount)(r):void 0;try{(0,c.assertRequest)(t);const r=("bigint"==typeof u?(0,o.numberToHex)(u):void 0)||d,n=e.chain?.formatters?.transactionRequest?.format,a=(n||s.formatTransactionRequest)({...(0,i.extract)(E,{format:n}),account:w,blobs:l,data:f,gas:p,gasPrice:m,maxFeePerBlobGas:b,maxFeePerGas:h,maxPriorityFeePerGas:y,to:g,value:v},"createAccessList"),P=await e.request({method:"eth_createAccessList",params:[a,r]});return{accessList:P.accessList,gasUsed:BigInt(P.gasUsed)}}catch(r){throw(0,a.getCallError)(r,{...t,account:w,chain:e.chain})}};const n=r(9546),o=r(6669),a=r(9767),i=r(4384),s=r(2996),c=r(8901)},2601(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e){const{r:t,s:r}=n.secp256k1.Signature.fromCompact(e.slice(2,130)),a=Number(`0x${e.slice(130)}`),[i,s]=(()=>{if(0===a||1===a)return[void 0,a];if(27===a)return[BigInt(a),0];if(28===a)return[BigInt(a),1];throw new Error("Invalid yParityOrV value")})();return void 0!==i?{r:(0,o.numberToHex)(t,{size:32}),s:(0,o.numberToHex)(r,{size:32}),v:i,yParity:s}:{r:(0,o.numberToHex)(t,{size:32}),s:(0,o.numberToHex)(r,{size:32}),yParity:s}};const n=r(7666),o=r(6669)},2634(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setLoggingEnabled=async function(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}},2644(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toEventSelector=void 0;const n=r(6091);t.toEventSelector=n.toSignatureHash},2660(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.idCache=void 0,t.idCache={current:0,take(){return this.current++},reset(){this.current=0}}},2661(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectToString=t.isPrimitive=t.isError=t.isDate=t.isRegExp=t.isObjectAndNotNull=t.isObject=t.isNumber=t.isBoolean=t.isArray=t.isBigInt=t.isDefinedNotNullAndNotEmptyString=t.isDefinedAndNotNull=t.isDefined=t.isTypeOfError=t.isNullOrUndefined=t.isUndefined=t.isNull=t.isString=t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e&&Boolean(e.constructor&&e.call&&e.apply)},t.isString=function(e){return"string"==typeof e};var r=function(e){return null===e};t.isNull=r;var n=function(e){return void 0===e};t.isUndefined=n;var o=function(e){return r(e)||n(e)};t.isNullOrUndefined=o,t.isBigInt=function(e){return"bigint"==typeof e},t.isDefined=function(e){return!n(e)};var a=function(e){return!o(e)};t.isDefinedAndNotNull=a,t.isDefinedNotNullAndNotEmptyString=function(e){return a(e)&&""!==e},t.isTypeOfError=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}};var i=function(e){return Array.isArray(e)};t.isArray=i,t.isBoolean=function(e){return"boolean"==typeof e},t.isNumber=function(e){return"number"==typeof e};var s=function(e){return"object"==typeof e};t.isObject=s,t.isObjectAndNotNull=function(e){return!r(e)&&s(e)&&!i(e)},t.isRegExp=function(e){return s(e)&&"[object RegExp]"===c(e)},t.isDate=function(e){return s(e)&&"[object Date]"===c(e)},t.isError=function(e){return s(e)&&("[object Error]"===c(e)||e instanceof Error)},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e};var c=function(e){return Object.prototype.toString.call(e)};t.objectToString=c},2673(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.waitForTransactionReceipt=async function(e,t){const{checkReplacement:r=!0,confirmations:m=1,hash:b,onReplaced:h,retryCount:y=6,retryDelay:g=({count:e})=>200*(1<<e),timeout:v=18e4}=t,E=(0,u.stringify)(["waitForTransactionReceipt",e.uid,b]),w=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval;let P,A,x,I,S,T=!1;const{promise:O,resolve:_,reject:j}=(0,s.withResolvers)(),C=v?setTimeout(()=>{S?.(),I?.(),j(new o.WaitForTransactionReceiptTimeoutError({hash:b}))},v):void 0;return I=(0,i.observe)(E,{onReplaced:h,resolve:_,reject:j},async t=>{if(x=await(0,a.getAction)(e,f.getTransactionReceipt,"getTransactionReceipt")({hash:b}).catch(()=>{}),x&&m<=1)return clearTimeout(C),t.resolve(x),void I?.();S=(0,a.getAction)(e,p.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:w,async onBlockNumber(i){const s=e=>{clearTimeout(C),S?.(),e(),I?.()};let u=i;if(!T)try{if(x){if(m>1&&(!x.blockNumber||u-x.blockNumber+1n<m))return;return void s(()=>t.resolve(x))}if(r&&!P&&(T=!0,await(0,c.withRetry)(async()=>{P=await(0,a.getAction)(e,l.getTransaction,"getTransaction")({hash:b}),P.blockNumber&&(u=P.blockNumber)},{delay:g,retryCount:y}),T=!1),x=await(0,a.getAction)(e,f.getTransactionReceipt,"getTransactionReceipt")({hash:b}),m>1&&(!x.blockNumber||u-x.blockNumber+1n<m))return;s(()=>t.resolve(x))}catch(r){if(r instanceof o.TransactionNotFoundError||r instanceof o.TransactionReceiptNotFoundError){if(!P)return void(T=!1);try{A=P,T=!0;const r=await(0,c.withRetry)(()=>(0,a.getAction)(e,d.getBlock,"getBlock")({blockNumber:u,includeTransactions:!0}),{delay:g,retryCount:y,shouldRetry:({error:e})=>e instanceof n.BlockNotFoundError});T=!1;const o=r.transactions.find(({from:e,nonce:t})=>e===A.from&&t===A.nonce);if(!o)return;if(x=await(0,a.getAction)(e,f.getTransactionReceipt,"getTransactionReceipt")({hash:o.hash}),m>1&&(!x.blockNumber||u-x.blockNumber+1n<m))return;let i="replaced";o.to===A.to&&o.value===A.value&&o.input===A.input?i="repriced":o.from===o.to&&0n===o.value&&(i="cancelled"),s(()=>{t.onReplaced?.({reason:i,replacedTransaction:A,transaction:o,transactionReceipt:x}),t.resolve(x)})}catch(e){s(()=>t.reject(e))}}else s(()=>t.reject(r))}}})}),O};const n=r(4342),o=r(979),a=r(3115),i=r(9097),s=r(3772),c=r(2801),u=r(8352),d=r(3248),l=r(501),f=r(3949),p=r(9672)},2683(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,t.maxInt8=127n,t.maxInt16=32767n,t.maxInt24=8388607n,t.maxInt32=2n**31n-1n,t.maxInt40=2n**39n-1n,t.maxInt48=2n**47n-1n,t.maxInt56=2n**55n-1n,t.maxInt64=2n**63n-1n,t.maxInt72=2n**71n-1n,t.maxInt80=2n**79n-1n,t.maxInt88=2n**87n-1n,t.maxInt96=2n**95n-1n,t.maxInt104=2n**103n-1n,t.maxInt112=2n**111n-1n,t.maxInt120=2n**119n-1n,t.maxInt128=2n**127n-1n,t.maxInt136=2n**135n-1n,t.maxInt144=2n**143n-1n,t.maxInt152=2n**151n-1n,t.maxInt160=2n**159n-1n,t.maxInt168=2n**167n-1n,t.maxInt176=2n**175n-1n,t.maxInt184=2n**183n-1n,t.maxInt192=2n**191n-1n,t.maxInt200=2n**199n-1n,t.maxInt208=2n**207n-1n,t.maxInt216=2n**215n-1n,t.maxInt224=2n**223n-1n,t.maxInt232=2n**231n-1n,t.maxInt240=2n**239n-1n,t.maxInt248=2n**247n-1n,t.maxInt256=2n**255n-1n,t.minInt8=-128n,t.minInt16=-32768n,t.minInt24=-8388608n,t.minInt32=-(2n**31n),t.minInt40=-(2n**39n),t.minInt48=-(2n**47n),t.minInt56=-(2n**55n),t.minInt64=-(2n**63n),t.minInt72=-(2n**71n),t.minInt80=-(2n**79n),t.minInt88=-(2n**87n),t.minInt96=-(2n**95n),t.minInt104=-(2n**103n),t.minInt112=-(2n**111n),t.minInt120=-(2n**119n),t.minInt128=-(2n**127n),t.minInt136=-(2n**135n),t.minInt144=-(2n**143n),t.minInt152=-(2n**151n),t.minInt160=-(2n**159n),t.minInt168=-(2n**167n),t.minInt176=-(2n**175n),t.minInt184=-(2n**183n),t.minInt192=-(2n**191n),t.minInt200=-(2n**199n),t.minInt208=-(2n**207n),t.minInt216=-(2n**215n),t.minInt224=-(2n**223n),t.minInt232=-(2n**231n),t.minInt240=-(2n**239n),t.minInt248=-(2n**247n),t.minInt256=-(2n**255n),t.maxUint8=255n,t.maxUint16=65535n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},2704(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_PREFIX=t.JSON_PREFIX=void 0,t.JSON_PREFIX="__json=",t.KEY_PREFIX="formo"},2713(e,t){var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,h={};function y(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||m}function g(){}function v(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=y.prototype;var E=v.prototype=new g;E.constructor=v,b(E,y.prototype),E.isPureReactComponent=!0;var w=Array.isArray,P=Object.prototype.hasOwnProperty,A={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var o,a={},i=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)P.call(t,o)&&!x.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var u=Array(c),d=0;d<c;d++)u[d]=arguments[d+2];a.children=u}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:r,type:e,key:i,ref:s,props:a,_owner:A.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var T=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function _(e,t,o,a,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return i=i(c=e),e=""===a?"."+O(c,0):a,w(i)?(o="",null!=e&&(o=e.replace(T,"$&/")+"/"),_(i,t,o,"",function(e){return e})):null!=i&&(S(i)&&(i=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(T,"$&/")+"/")+e)),t.push(i)),1;if(c=0,a=""===a?".":a+":",w(e))for(var u=0;u<e.length;u++){var d=a+O(s=e[u],u);c+=_(s,t,o,d,i)}else if(d=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof d)for(e=d.call(e),u=0;!(s=e.next()).done;)c+=_(s=s.value,t,o,d=a+O(s,u++),i);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function j(e,t,r){if(null==e)return e;var n=[],o=0;return _(e,n,"","",function(e){return t.call(r,e,o++)}),n}function C(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var B={current:null},M={transition:null},k={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:M,ReactCurrentOwner:A};function R(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:j,forEach:function(e,t,r){j(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=i,t.PureComponent=v,t.StrictMode=a,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,t.act=R,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=b({},e.props),a=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=A.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)P.call(t,u)&&!x.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:r,type:e.type,key:a,ref:i,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:C}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=M.transition;M.transition={};try{e()}finally{M.transition=t}},t.unstable_act=R,t.useCallback=function(e,t){return B.current.useCallback(e,t)},t.useContext=function(e){return B.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return B.current.useDeferredValue(e)},t.useEffect=function(e,t){return B.current.useEffect(e,t)},t.useId=function(){return B.current.useId()},t.useImperativeHandle=function(e,t,r){return B.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return B.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return B.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return B.current.useMemo(e,t)},t.useReducer=function(e,t,r){return B.current.useReducer(e,t,r)},t.useRef=function(e){return B.current.useRef(e)},t.useState=function(e){return B.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return B.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return B.current.useTransition()},t.version="18.3.1"},2722(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.offchainLookupAbiItem=t.offchainLookupSignature=void 0,t.offchainLookup=async function(e,{blockNumber:r,blockTag:a,data:d,to:f}){const{args:m}=(0,i.decodeErrorResult)({data:d,abi:[t.offchainLookupAbiItem]}),[b,h,y,g,v]=m,{ccipRead:E}=e,w=E&&"function"==typeof E?.request?E.request:p;try{if(!(0,c.isAddressEqual)(f,b))throw new o.OffchainLookupSenderMismatchError({sender:b,to:f});const t=h.includes(l.localBatchGatewayUrl)?await(0,l.localBatchGatewayRequest)({data:y,ccipRequest:w}):await w({data:y,sender:b,urls:h}),{data:i}=await(0,n.call)(e,{blockNumber:r,blockTag:a,data:(0,u.concat)([g,(0,s.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[t,v])]),to:f});return i}catch(e){throw new o.OffchainLookupError({callbackSelector:g,cause:e,data:d,extraData:v,sender:b,urls:h})}},t.ccipRequest=p;const n=r(5417),o=r(7064),a=r(3318),i=r(6129),s=r(3224),c=r(7624),u=r(1028),d=r(6611),l=r(546),f=r(8352);async function p({data:e,sender:t,urls:r}){let n=new Error("An unknown error occurred.");for(let i=0;i<r.length;i++){const s=r[i],c=s.includes("{data}")?"GET":"POST",u="POST"===c?{data:e,sender:t}:void 0,l="POST"===c?{"Content-Type":"application/json"}:{};try{const r=await fetch(s.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(u),headers:l,method:c});let i;if(i=r.headers.get("Content-Type")?.startsWith("application/json")?(await r.json()).data:await r.text(),!r.ok){n=new a.HttpRequestError({body:u,details:i?.error?(0,f.stringify)(i.error):r.statusText,headers:r.headers,status:r.status,url:s});continue}if(!(0,d.isHex)(i)){n=new o.OffchainLookupResponseMalformedError({result:i,url:s});continue}return i}catch(e){n=new a.HttpRequestError({body:u,details:e.message,url:s})}}throw n}t.offchainLookupSignature="0x556f1830",t.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]}},2747(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeDeployData=function(e){const{abi:t,bytecode:r,data:i}=e;if(i===r)return{bytecode:r};const s=t.find(e=>"type"in e&&"constructor"===e.type);if(!s)throw new n.AbiConstructorNotFoundError({docsPath:a});if(!("inputs"in s))throw new n.AbiConstructorParamsNotFoundError({docsPath:a});if(!s.inputs||0===s.inputs.length)throw new n.AbiConstructorParamsNotFoundError({docsPath:a});return{args:(0,o.decodeAbiParameters)(s.inputs,`0x${i.replace(r,"")}`),bytecode:r}};const n=r(9797),o=r(8448),a="/docs/contract/decodeDeployData"},2801(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.withRetry=function(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>!0}={}){return new Promise((a,i)=>{const s=async({count:c=0}={})=>{try{const t=await e();a(t)}catch(e){if(c<r&&await o({count:c,error:e}))return(async({error:e})=>{const r="function"==typeof t?t({count:c,error:e}):t;r&&await(0,n.wait)(r),s({count:c+1})})({error:e});i(e)}};s()})};const n=r(4396)},2803(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sidecarsToVersionedHashes=function(e){const{sidecars:t,version:r}=e,o=e.to??("string"==typeof t[0].blob?"hex":"bytes"),a=[];for(const{commitment:e}of t)a.push((0,n.commitmentToVersionedHash)({commitment:e,to:o,version:r}));return a};const n=r(7752)},2808(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.noble=void 0,t.createKeyPair=function(e={}){const{as:t="Hex"}=e,r=d({as:t});return{privateKey:r,publicKey:u({privateKey:r})}},t.getPublicKey=u,t.getSharedSecret=function(e){const{as:t="Hex",privateKey:r,publicKey:o}=e,a=n.secp256k1.ProjectivePoint.fromHex(c.toHex(o).slice(2)).multiply(n.secp256k1.utils.normPrivateKeyToScalar(i.from(r).slice(2))).toRawBytes(!0);return"Hex"===t?i.fromBytes(a):a},t.randomPrivateKey=d,t.recoverAddress=l,t.recoverPublicKey=f,t.sign=function(e){const{extraEntropy:t=s.extraEntropy,hash:r,payload:o,privateKey:c}=e,{r:u,s:d,recovery:l}=n.secp256k1.sign(a.from(o),a.from(c),{extraEntropy:"boolean"==typeof t?t:i.from(t).slice(2),lowS:!0,...r?{prehash:!0}:{}});return{r:u,s:d,yParity:l}},t.verify=function(e){const{address:t,hash:r,payload:i,publicKey:s,signature:u}=e;return t?o.isEqual(t,l({payload:i,signature:u})):n.secp256k1.verify(u,a.from(i),c.toBytes(s),...r?[{prehash:!0,lowS:!0}]:[])};const n=r(7666),o=r(7188),a=r(7223),i=r(1465),s=r(1062),c=r(6744);function u(e){const{privateKey:t}=e,r=n.secp256k1.ProjectivePoint.fromPrivateKey(i.from(t).slice(2));return c.from(r)}function d(e={}){const{as:t="Hex"}=e,r=n.secp256k1.utils.randomPrivateKey();return"Hex"===t?i.fromBytes(r):r}function l(e){return o.fromPublicKey(f(e))}function f(e){const{payload:t,signature:r}=e,{r:o,s:a,yParity:s}=r,u=new n.secp256k1.Signature(BigInt(o),BigInt(a)).addRecoveryBit(s).recoverPublicKey(i.from(t).substring(2));return c.from(u)}t.noble=n.secp256k1},2828(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureErc8010=void 0,t.SignatureErc8010=r(4813)},2884(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.presignMessagePrefix=void 0,t.presignMessagePrefix="Ethereum Signed Message:\n"},2921(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareAuthorization=async function(e,t){const{account:r=e.account,chainId:u,nonce:d}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const l=(0,n.parseAccount)(r),f=(()=>{if(t.executor)return"self"===t.executor?t.executor:(0,n.parseAccount)(t.executor)})(),p={address:t.contractAddress??t.address,chainId:u,nonce:d};return void 0===p.chainId&&(p.chainId=e.chain?.id??await(0,i.getAction)(e,s.getChainId,"getChainId")({})),void 0===p.nonce&&(p.nonce=await(0,i.getAction)(e,c.getTransactionCount,"getTransactionCount")({address:l.address,blockTag:"pending"}),("self"===f||f?.address&&(0,a.isAddressEqual)(f.address,l.address))&&(p.nonce+=1)),p};const n=r(9546),o=r(8328),a=r(7624),i=r(3115),s=r(401),c=r(9226)},2923(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=function(e){const t=[],r=e.length;for(let o=0;o<r;o++){const r=e[o],a=(0,n.formatAbiItem)(r);t.push(a)}return t};const n=r(5256)},2936(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setRpcUrl=async function(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}},2942(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameters=function(e){const t=[];if("string"==typeof e){const r=(0,i.splitParameters)(e),n=r.length;for(let e=0;e<n;e++)t.push((0,s.parseAbiParameter)(r[e],{modifiers:o.modifiers}))}else{const r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){const n=e[a];if((0,o.isStructSignature)(n))continue;const c=(0,i.splitParameters)(n),u=c.length;for(let e=0;e<u;e++)t.push((0,s.parseAbiParameter)(c[e],{modifiers:o.modifiers,structs:r}))}}if(0===t.length)throw new n.InvalidAbiParametersError({params:e});return t};const n=r(8144),o=r(1839),a=r(6012),i=r(9263),s=r(9263)},2945(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatEther=function(e,t="wei"){return(0,o.formatUnits)(e,n.etherUnits[t])};const n=r(9427),o=r(7290)},2996(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionRequest=t.rpcTransactionType=void 0,t.formatTransactionRequest=a;const n=r(6669),o=r(9783);function a(e,r){const o={};return void 0!==e.authorizationList&&(o.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,n.numberToHex)(BigInt(e.r)):e.r,s:e.s?(0,n.numberToHex)(BigInt(e.s)):e.s,chainId:(0,n.numberToHex)(e.chainId),nonce:(0,n.numberToHex)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.numberToHex)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.numberToHex)(e.v)}:{}}))),void 0!==e.accessList&&(o.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(o.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?o.blobs=e.blobs.map(e=>(0,n.bytesToHex)(e)):o.blobs=e.blobs),void 0!==e.data&&(o.data=e.data),e.account&&(o.from=e.account.address),void 0!==e.from&&(o.from=e.from),void 0!==e.gas&&(o.gas=(0,n.numberToHex)(e.gas)),void 0!==e.gasPrice&&(o.gasPrice=(0,n.numberToHex)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(o.maxFeePerBlobGas=(0,n.numberToHex)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(o.maxFeePerGas=(0,n.numberToHex)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(o.maxPriorityFeePerGas=(0,n.numberToHex)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(o.nonce=(0,n.numberToHex)(e.nonce)),void 0!==e.to&&(o.to=e.to),void 0!==e.type&&(o.type=t.rpcTransactionType[e.type]),void 0!==e.value&&(o.value=(0,n.numberToHex)(e.value)),o}t.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},t.defineTransactionRequest=(0,o.defineFormatter)("transactionRequest",a)},3009(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setNonce=async function(e,{address:t,nonce:r}){await e.request({method:`${e.mode}_setNonce`,params:[t,(0,n.numberToHex)(r)]})};const n=r(6669)},3024(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.EventManager=void 0;var i=r(6973),s=r(8613),c=r(8522),u=function(){function e(e,t){this.eventQueue=e,this.eventFactory=new s.EventFactory(t)}return e.prototype.addEvent=function(e,t,r){return n(this,void 0,void 0,function(){var n,s,u;return o(this,function(o){switch(o.label){case 0:return n=e.callback,s=a(e,["callback"]),[4,this.eventFactory.create(s,t,r)];case 1:return(u=o.sent()).address&&(0,c.isBlockedAddress)(u.address)?(i.logger.warn("Event blocked: Address ".concat(u.address," is in the blocked list and cannot emit events")),[2]):(this.eventQueue.enqueue(u,function(e,t,r){e?i.logger.error("Error sending events:",e):i.logger.info("Events sent successfully: ".concat(r.length," events")),null==n||n(e,t,r)}),[2])}})})},e}();t.EventManager=u},3028(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toCoinType=function(e){if(1===e)return 60n;if(e>=2147483648||e<0)throw new n.EnsInvalidChainIdError({chainId:e});return BigInt((2147483648|e)>>>0)};const n=r(4219)},3062(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFeeHistory=async function(e,{blockCount:t,blockNumber:r,blockTag:a="latest",rewardPercentiles:i}){const s="bigint"==typeof r?(0,n.numberToHex)(r):void 0,c=await e.request({method:"eth_feeHistory",params:[(0,n.numberToHex)(t),s||a,i]},{dedupe:Boolean(s)});return(0,o.formatFeeHistory)(c)};const n=r(6669),o=r(9433)},3078(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(6962),t),o(r(6561),t),o(r(7617),t)},3085(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.mine=async function(e,{blocks:t,interval:r}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,n.numberToHex)(t)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,n.numberToHex)(t),(0,n.numberToHex)(r||0)]})};const n=r(6669)},3093(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventQueue=void 0;var s=r(4378),c=r(8930),u=r(6973),d=r(9874),l=i(r(7743)),f=function(){},p=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];try{e.apply(void 0,t)}catch(e){}},m=65536,b=function(){function e(e,t){var r=this;this.queue=[],this.payloadHashes=new Set,this.onPageLeave=function(e){var t=!1,r=!1;function n(){t||(t=!0,e(r),setTimeout(function(){t=!1},0))}globalThis.addEventListener("beforeunload",function(){r=!1,n()}),globalThis.addEventListener("blur",function(){r=!0,n()}),globalThis.addEventListener("focus",function(){t=!1}),document.addEventListener("pagehide",function(){r="hidden"===document.visibilityState,n()}),document.addEventListener("visibilitychange",function(){r=!0,"hidden"===document.visibilityState?n():t=!1})},t=t||{},this.queue=[],this.writeKey=e,this.apiHost=t.apiHost,this.retryCount=(0,c.clampNumber)(t.retryCount||3,5,1),this.flushAt=(0,c.clampNumber)(t.flushAt||20,20,1),this.maxQueueSize=(0,c.clampNumber)(t.maxQueueSize||512e3,512e3,200),this.flushIntervalMs=(0,c.clampNumber)(t.flushInterval||3e4,3e5,1e4),this.flushed=!0,this.errorHandler=t.errorHandler,this.pendingFlush=null,this.timer=null,this.onPageLeave(function(e){return o(r,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return!1!==e?[3,2]:[4,this.flush()];case 1:t.sent(),t.label=2;case 2:return[2]}})})})}return e.prototype.generateMessageId=function(e){return o(this,void 0,void 0,function(){var t,r,o;return a(this,function(a){return t=(0,c.toDateHourMinute)(new Date(e.original_timestamp)),r=n(n({},e),{original_timestamp:t}),o=JSON.stringify(r),[2,(0,c.hash)(o)]})})},e.prototype.enqueue=function(e,t){return o(this,void 0,void 0,function(){var r,o,i;return a(this,function(a){switch(a.label){case 0:return t=t||f,[4,this.generateMessageId(e)];case 1:return r=a.sent(),[4,this.isDuplicate(r)];case 2:return a.sent()?(u.logger.warn("Event already enqueued, try again after ".concat((0,c.millisecondsToSecond)(this.flushIntervalMs)," seconds.")),[2]):(this.queue.push({message:n(n({},e),{message_id:r}),callback:t}),u.logger.log("Event enqueued: ".concat((0,c.getActionDescriptor)(e.type,e.properties))),this.flushed?(o=this.queue.length>=this.flushAt,i=this.queue.reduce(function(e,t){return e+JSON.stringify(t).length},0)>=this.maxQueueSize,o||i?(this.flush(),[2]):(this.flushIntervalMs&&!this.timer&&(this.timer=setTimeout(this.flush.bind(this),this.flushIntervalMs)),[2])):(this.flushed=!0,this.flush(),[2]))}})})},e.prototype.flush=function(e){return o(this,void 0,void 0,function(){var t,r,o,i,s=this;return a(this,function(a){switch(a.label){case 0:return e=e||f,this.timer&&(clearTimeout(this.timer),this.timer=null),this.queue.length?this.pendingFlush?[4,this.pendingFlush]:[3,2]:(e(),[2,Promise.resolve()]);case 1:a.sent(),a.label=2;case 2:return t=this.queue.splice(0,this.flushAt),this.payloadHashes.clear(),r=(new Date).toISOString(),o=t.map(function(e){return n(n({},e.message),{sent_at:r})}),i=this.splitIntoBatches(t,o),[2,this.pendingFlush=this.sendBatches(i,o).then(function(t){return t?(p(e,t,o),"function"==typeof s.errorHandler&&p(s.errorHandler,t)):p(e,void 0,o),Promise.resolve(o)}).catch(function(t){p(e,t,o),"function"==typeof s.errorHandler&&p(s.errorHandler,t)})]}})})},e.byteLength=function(e){return(new TextEncoder).encode(e).byteLength},e.prototype.splitIntoBatches=function(t,r){var n=JSON.stringify(r);if(e.byteLength(n)<=m)return[{data:r,items:t,keepalive:!0}];for(var o=[],a=[],i=[],s=2,c=0;c<r.length;c++){var u=r[c],d=e.byteLength(JSON.stringify(u)),l=s+(a.length>0?1:0)+d;l>m?(a.length>0&&o.push({data:a,items:i,keepalive:!0}),d+2>m?(o.push({data:[u],items:[t[c]],keepalive:!1}),a=[],i=[],s=2):(a=[u],i=[t[c]],s=2+d)):(a.push(u),i.push(t[c]),s=l)}return a.length>0&&o.push({data:a,items:i,keepalive:!0}),o},e.prototype.sendBatches=function(e,t){return o(this,void 0,void 0,function(){var r,n,o,i,s,c,u,f,m=this;return a(this,function(a){switch(a.label){case 0:n=0,o=e,a.label=1;case 1:if(!(n<o.length))return[3,6];i=o[n],a.label=2;case 2:return a.trys.push([2,4,,5]),s=JSON.stringify(i.data),[4,(0,l.default)("".concat(this.apiHost),{headers:(0,d.EVENTS_API_REQUEST_HEADER)(this.writeKey),method:"POST",body:s,keepalive:i.keepalive,retries:this.retryCount,retryDelay:function(e){return 1e3*Math.pow(2,e)},retryOn:function(e,t,r){return m.isErrorRetryable(t,r)}})];case 3:if(!(c=a.sent()).ok)throw(u=new Error(c.statusText||"HTTP ".concat(c.status))).response=c,u;return i.items.forEach(function(e){var r=e.message,n=e.callback;return p(n,void 0,r,t)}),[3,5];case 4:return f=a.sent(),r=r||f,i.items.forEach(function(e){var r=e.message,n=e.callback;return p(n,f,r,t)}),[3,5];case 5:return n++,[3,1];case 6:return[2,r]}})})},e.prototype.isErrorRetryable=function(e,t){var r,n;if(e&&(0,s.isNetworkError)(e))return!0;var o=null!==(r=null==t?void 0:t.status)&&void 0!==r?r:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status;return!!o&&(o>=500&&o<=599||429===o)},e.prototype.isDuplicate=function(e){return o(this,void 0,void 0,function(){return a(this,function(t){return this.payloadHashes.has(e)?[2,!0]:(this.payloadHashes.add(e),[2,!1])})})},e}();t.EventQueue=b},3115(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAction=function(e,t,r){const n=e[t.name];if("function"==typeof n)return n;const o=e[r];return"function"==typeof o?o:r=>t(e,r)}},3123(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getAbiItem=function(e){const{abi:t,args:r=[],name:a}=e,d=(0,o.isHex)(a,{strict:!1}),l=t.filter(e=>d?"function"===e.type?(0,s.toFunctionSelector)(e)===a:"event"===e.type&&(0,i.toEventSelector)(e)===a:"name"in e&&e.name===a);if(0===l.length)return;if(1===l.length)return l[0];let f;for(const e of l)if("inputs"in e)if(r&&0!==r.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===r.length&&r.every((t,r)=>{const n="inputs"in e&&e.inputs[r];return!!n&&c(t,n)})){if(f&&"inputs"in f&&f.inputs){const t=u(e.inputs,f.inputs,r);if(t)throw new n.AbiItemAmbiguityError({abiItem:e,type:t[0]},{abiItem:f,type:t[1]})}f=e}}else if(!e.inputs||0===e.inputs.length)return e;return f||l[0]},t.isArgOfType=c,t.getAmbiguousTypes=u;const n=r(9797),o=r(6611),a=r(2018),i=r(2644),s=r(364);function c(e,t){const r=typeof e,n=t.type;switch(n){case"address":return(0,a.isAddress)(e,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===n&&"components"in t?Object.values(t.components).every((t,r)=>c(Object.values(e)[r],t)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)&&Array.isArray(e)&&e.every(e=>c(e,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")}))}}function u(e,t,r){for(const n in e){const o=e[n],i=t[n];if("tuple"===o.type&&"tuple"===i.type&&"components"in o&&"components"in i)return u(o.components,i.components,r[n]);const s=[o.type,i.type];if((()=>!(!s.includes("address")||!s.includes("bytes20"))||(s.includes("address")&&s.includes("string")||!(!s.includes("address")||!s.includes("bytes")))&&(0,a.isAddress)(r[n],{strict:!1}))())return s}}},3171(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockGasLimit=async function(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[(0,n.numberToHex)(t)]})};const n=r(6669)},3188(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.revert=async function(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}},3212(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setCoinbase=async function(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}},3224(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeAbiParameters=function(e,t){if(e.length!==t.length)throw new n.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});const r=b(function({params:e,values:t}){const r=[];for(let n=0;n<e.length;n++)r.push(m({param:e[n],value:t[n]}));return r}({params:e,values:t}));return 0===r.length?"0x":r},t.getArrayComponents=h;const n=r(9797),o=r(1611),a=r(1682),i=r(9130),s=r(2018),c=r(1028),u=r(5599),d=r(4025),l=r(1972),f=r(6669),p=r(9622);function m({param:e,value:t}){const r=h(e.type);if(r){const[o,a]=r;return function(e,{length:t,param:r}){const o=null===t;if(!Array.isArray(e))throw new n.InvalidArrayError(e);if(!o&&e.length!==t)throw new n.AbiEncodingArrayLengthMismatchError({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let a=!1;const i=[];for(let t=0;t<e.length;t++){const n=m({param:r,value:e[t]});n.dynamic&&(a=!0),i.push(n)}if(o||a){const e=b(i);if(o){const t=(0,f.numberToHex)(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?(0,c.concat)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,c.concat)(i.map(({encoded:e})=>e))}}(t,{length:o,param:{...e,type:a}})}if("tuple"===e.type)return function(e,{param:t}){let r=!1;const n=[];for(let o=0;o<t.components.length;o++){const a=t.components[o],i=m({param:a,value:e[Array.isArray(e)?o:a.name]});n.push(i),i.dynamic&&(r=!0)}return{dynamic:r,encoded:r?b(n):(0,c.concat)(n.map(({encoded:e})=>e))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,s.isAddress)(e))throw new o.InvalidAddressError({address:e});return{dynamic:!1,encoded:(0,u.padHex)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new a.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,u.padHex)((0,f.boolToHex)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,n="256"]=p.integerRegex.exec(e.type)??[];return function(e,{signed:t,size:r=256}){if("number"==typeof r){const n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||e<o)throw new i.IntegerOutOfRangeError({max:n.toString(),min:o.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:(0,f.numberToHex)(e,{size:32,signed:t})}}(t,{signed:r,size:Number(n)})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,r]=t.type.split("bytes"),o=(0,d.size)(e);if(!r){let t=e;return o%32!=0&&(t=(0,u.padHex)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,c.concat)([(0,u.padHex)((0,f.numberToHex)(o,{size:32})),t])}}if(o!==Number.parseInt(r,10))throw new n.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:(0,u.padHex)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,f.stringToHex)(e),r=Math.ceil((0,d.size)(t)/32),n=[];for(let e=0;e<r;e++)n.push((0,u.padHex)((0,l.slice)(t,32*e,32*(e+1)),{dir:"right"}));return{dynamic:!0,encoded:(0,c.concat)([(0,u.padHex)((0,f.numberToHex)((0,d.size)(t),{size:32})),...n])}}(t);throw new n.InvalidAbiEncodingTypeError(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function b(e){let t=0;for(let r=0;r<e.length;r++){const{dynamic:n,encoded:o}=e[r];t+=n?32:(0,d.size)(o)}const r=[],n=[];let o=0;for(let a=0;a<e.length;a++){const{dynamic:i,encoded:s}=e[a];i?(r.push((0,f.numberToHex)(t+o,{size:32})),n.push(s),o+=(0,d.size)(s)):r.push(s)}return(0,c.concat)([...r,...n])}function h(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},3248(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlock=async function(e,{blockHash:t,blockNumber:r,blockTag:i=e.experimental_blockTag??"latest",includeTransactions:s}={}){const c=s??!1,u=void 0!==r?(0,o.numberToHex)(r):void 0;let d=null;if(d=t?await e.request({method:"eth_getBlockByHash",params:[t,c]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[u||i,c]},{dedupe:Boolean(u)}),!d)throw new n.BlockNotFoundError({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||a.formatBlock)(d,"getBlock")};const n=r(4342),o=r(6669),a=r(3776)},3263(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameter=function e(t){let r=t.type;if(o.test(t.type)&&"components"in t){r="(";const a=t.components.length;for(let n=0;n<a;n++){r+=e(t.components[n]),n<a-1&&(r+=", ")}const i=(0,n.execTyped)(o,t.type);return r+=`)${i?.array??""}`,e({...t,type:r})}return"indexed"in t&&t.indexed&&(r=`${r} indexed`),t.name?`${r} ${t.name}`:r};const n=r(4027),o=/^tuple(?<array>(\[(\d*)\])*)$/},3288(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedDataAddress=async function(e){const{domain:t,message:r,primaryType:a,signature:i,types:s}=e;return(0,o.recoverAddress)({hash:(0,n.hashTypedData)({domain:t,message:r,primaryType:a,types:s}),signature:i})};const n=r(1556),o=r(1154)},3318(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=t.SocketClosedError=t.RpcRequestError=t.WebSocketRequestError=t.HttpRequestError=void 0;const n=r(8352),o=r(1682),a=r(9946);class i extends o.BaseError{constructor({body:e,cause:t,details:r,headers:o,status:i,url:s}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,a.getUrl)(s)}`,e&&`Request body: ${(0,n.stringify)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=o,this.status=i,this.url=s}}t.HttpRequestError=i;class s extends o.BaseError{constructor({body:e,cause:t,details:r,url:o}){super("WebSocket request failed.",{cause:t,details:r,metaMessages:[`URL: ${(0,a.getUrl)(o)}`,e&&`Request body: ${(0,n.stringify)(e)}`].filter(Boolean),name:"WebSocketRequestError"})}}t.WebSocketRequestError=s;class c extends o.BaseError{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.getUrl)(r)}`,`Request body: ${(0,n.stringify)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data}}t.RpcRequestError=c;class u extends o.BaseError{constructor({url:e}={}){super("The socket has been closed.",{metaMessages:[e&&`URL: ${(0,a.getUrl)(e)}`].filter(Boolean),name:"SocketClosedError"})}}t.SocketClosedError=u;class d extends o.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.getUrl)(t)}`,`Request body: ${(0,n.stringify)(e)}`],name:"TimeoutError"})}}t.TimeoutError=d},3327(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isNullUniversalResolverError=function(e){if(!(e instanceof n.BaseError))return!1;const t=e.walk(e=>e instanceof o.ContractFunctionRevertedError);return t instanceof o.ContractFunctionRevertedError&&("HttpError"===t.data?.errorName||"ResolverError"===t.data?.errorName||"ResolverNotContract"===t.data?.errorName||"ResolverNotFound"===t.data?.errorName||"ReverseAddressMismatch"===t.data?.errorName||"UnsupportedResolverProfile"===t.data?.errorName)};const n=r(1682),o=r(3585)},3349(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItemWithArgs=function({abiItem:e,args:t,includeFunctionName:r=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${o&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,n.stringify)(t[r]):t[r]}`).join(", ")})`};const n=r(8352)},3393(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LruMap=void 0;class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}t.LruMap=r},3434(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateFeesPerGas=async function(e,t){return c(e,t)},t.internal_estimateFeesPerGas=c;const n=r(5035),o=r(3115),a=r(997),i=r(3248),s=r(7383);async function c(e,t){const{block:r,chain:c=e.chain,request:u,type:d="eip1559"}=t||{},l=await(async()=>"function"==typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:r,client:e,request:u}):c?.fees?.baseFeeMultiplier??1.2)();if(l<1)throw new n.BaseFeeScalarError;const f=10**(l.toString().split(".")[1]?.length??0),p=e=>e*BigInt(Math.ceil(l*f))/BigInt(f),m=r||await(0,o.getAction)(e,i.getBlock,"getBlock")({});if("function"==typeof c?.fees?.estimateFeesPerGas){const t=await c.fees.estimateFeesPerGas({block:r,client:e,multiply:p,request:u,type:d});if(null!==t)return t}if("eip1559"===d){if("bigint"!=typeof m.baseFeePerGas)throw new n.Eip1559FeesNotSupportedError;const t="bigint"==typeof u?.maxPriorityFeePerGas?u.maxPriorityFeePerGas:await(0,a.internal_estimateMaxPriorityFeePerGas)(e,{block:m,chain:c,request:u}),r=p(m.baseFeePerGas);return{maxFeePerGas:u?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:u?.gasPrice??p(await(0,o.getAction)(e,s.getGasPrice,"getGasPrice")({}))}}},3453(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsName=async function(e,t){const{address:r,blockNumber:u,blockTag:d,coinType:l=60n,gatewayUrls:f,strict:p}=t,{chain:m}=e,b=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!m)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,o.getChainContractAddress)({blockNumber:u,chain:m,contract:"ensUniversalResolver"})})();try{const t={address:b,abi:n.universalResolverReverseAbi,args:[r,l,f??[i.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:u,blockTag:d},o=(0,s.getAction)(e,c.readContract,"readContract"),[a]=await o(t);return a||null}catch(e){if(p)throw e;if((0,a.isNullUniversalResolverError)(e))return null;throw e}};const n=r(138),o=r(9858),a=r(3327),i=r(546),s=r(3115),c=r(1855)},3501(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionReceipt=t.receiptStatuses=void 0,t.formatTransactionReceipt=s;const n=r(4130),o=r(9783),a=r(9475),i=r(7477);function s(e,r){const o={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,a.formatLog)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,n.hexToNumber)(e.transactionIndex):null,status:e.status?t.receiptStatuses[e.status]:null,type:e.type?i.transactionType[e.type]||e.type:null};return e.blobGasPrice&&(o.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(o.blobGasUsed=BigInt(e.blobGasUsed)),o}t.receiptStatuses={"0x0":"reverted","0x1":"success"},t.defineTransactionReceipt=(0,o.defineFormatter)("transactionReceipt",s)},3585(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RawContractError=t.CounterfactualDeploymentFailedError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=void 0;const n=r(9546),o=r(3792),a=r(6129),i=r(1508),s=r(3349),c=r(3123),u=r(2945),d=r(1825),l=r(9797),f=r(1682),p=r(9098),m=r(979),b=r(9946);class h extends f.BaseError{constructor(e,{account:t,docsPath:r,chain:o,data:a,gas:i,gasPrice:s,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:b,value:h,stateOverride:y}){const g=t?(0,n.parseAccount)(t):void 0;let v=(0,m.prettyPrint)({from:g?.address,to:b,value:void 0!==h&&`${(0,u.formatEther)(h)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:i,gasPrice:void 0!==s&&`${(0,d.formatGwei)(s)} gwei`,maxFeePerGas:void 0!==c&&`${(0,d.formatGwei)(c)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,d.formatGwei)(l)} gwei`,nonce:f});y&&(v+=`\n${(0,p.prettyStateOverride)(y)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.CallExecutionError=h;class y extends f.BaseError{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:a,sender:u}){const d=(0,c.getAbiItem)({abi:t,args:r,name:a}),l=d?(0,s.formatAbiItemWithArgs)({abiItem:d,args:r,includeFunctionName:!1,includeName:!1}):void 0,f=d?(0,i.formatAbiItem)(d,{includeName:!0}):void 0,p=(0,m.prettyPrint)({address:n&&(0,b.getContractAddress)(n),function:f,args:l&&"()"!==l&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${l}`,sender:u});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=a,this.sender=u}}t.ContractFunctionExecutionError=y;class g extends f.BaseError{constructor({abi:e,data:t,functionName:r,message:n}){let c,u,d,f,p;if(t&&"0x"!==t)try{u=(0,a.decodeErrorResult)({abi:e,data:t});const{abiItem:r,errorName:n,args:c}=u;if("Error"===n)f=c[0];else if("Panic"===n){const[e]=c;f=o.panicReasons[e]}else{const e=r?(0,i.formatAbiItem)(r,{includeName:!0}):void 0,t=r&&c?(0,s.formatAbiItemWithArgs)({abiItem:r,args:c,includeFunctionName:!1,includeName:!1}):void 0;d=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){c=e}else n&&(f=n);c instanceof l.AbiErrorSignatureNotFoundError&&(p=c.signature,d=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(f&&"execution reverted"!==f||p?[`The contract function "${r}" reverted with the following ${p?"signature":"reason"}:`,f||p].join("\n"):`The contract function "${r}" reverted.`,{cause:c,metaMessages:d,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.raw=t,this.reason=f,this.signature=p}}t.ContractFunctionRevertedError=g;class v extends f.BaseError{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}t.ContractFunctionZeroDataError=v;class E extends f.BaseError{constructor({factory:e}){super("Deployment for counterfactual contract call failed"+(e?` for factory "${e}".`:""),{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}t.CounterfactualDeploymentFailedError=E;class w extends f.BaseError{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}t.RawContractError=w},3632(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.switchChain=async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,n.numberToHex)(t)}]},{retryCount:0})};const n=r(6669)},3636(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=function(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((o,a)=>{(async()=>{let i;try{const s=new AbortController;r>0&&(i=setTimeout(()=>{n?s.abort():a(t)},r)),o(await e({signal:s?.signal||null}))}catch(e){"AbortError"===e?.name&&a(t),a(e)}finally{clearTimeout(i)}})()})}},3641(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEip712Domain=async function(e,t){const{address:r,factory:s,factoryData:c}=t;try{const[t,n,u,d,l,f,p]=await(0,o.getAction)(e,a.readContract,"readContract")({abi:i,address:r,functionName:"eip712Domain",factory:s,factoryData:c});return{domain:{name:n,version:u,chainId:Number(d),verifyingContract:l,salt:f},extensions:p,fields:t}}catch(e){const t=e;if("ContractFunctionExecutionError"===t.name&&"ContractFunctionZeroDataError"===t.cause.name)throw new n.Eip712DomainNotFoundError({address:r});throw t}};const n=r(1039),o=r(3115),a=r(1855),i=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}]},3657(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=function(e){let t=!0,r="",n=0,a="",i=!1;for(let o=0;o<e.length;o++){const s=e[o];if(["(",")",","].includes(s)&&(t=!0),"("===s&&n++,")"===s&&n--,t)if(0!==n)" "!==s?(a+=s,r+=s):","!==e[o-1]&&","!==r&&",("!==r&&(r="",t=!1);else if(" "===s&&["event","function","error",""].includes(a))a="";else if(a+=s,")"===s){i=!0;break}}if(!i)throw new o.BaseError("Unable to normalize signature.");return a},t.isArgOfType=function e(t,r){const o=typeof t,a=r.type;switch(a){case"address":return n.validate(t,{strict:!1});case"bool":return"boolean"===o;case"function":case"string":return"string"===o;default:return"tuple"===a&&"components"in r?Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(a)?"number"===o||"bigint"===o:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(a)?"string"===o||t instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(a)&&Array.isArray(t)&&t.every(t=>e(t,{...r,type:a.replace(/(\[[0-9]{0,}\])$/,"")}))}},t.getAmbiguousTypes=function e(t,r,o){for(const a in t){const i=t[a],s=r[a];if("tuple"===i.type&&"tuple"===s.type&&"components"in i&&"components"in s)return e(i.components,s.components,o[a]);const c=[i.type,s.type];if((()=>!(!c.includes("address")||!c.includes("bytes20"))||(c.includes("address")&&c.includes("string")||!(!c.includes("address")||!c.includes("bytes")))&&n.validate(o[a],{strict:!1}))())return c}};const n=r(7188),o=r(6573)},3674(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;const n=r(8064);class o extends n.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}t.InvalidParenthesisError=o},3716(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashSignature=function(e){return t=e,(0,o.keccak256)((0,n.toBytes)(t));var t};const n=r(1699),o=r(1725)},3737(e,t){Object.defineProperty(t,"__esModule",{value:!0})},3772(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.withResolvers=function(){let e=()=>{},t=()=>{};return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}},3776(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineBlock=void 0,t.formatBlock=a;const n=r(9783),o=r(7477);function a(e,t){const r=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,o.formatTransaction)(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}t.defineBlock=(0,n.defineFormatter)("block",a)},3785(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.commitmentsToVersionedHashes=function(e){const{commitments:t,version:r}=e,o=e.to??("string"==typeof t[0]?"hex":"bytes"),a=[];for(const e of t)a.push((0,n.commitmentToVersionedHash)({commitment:e,to:o,version:r}));return a};const n=r(7752)},3792(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPanic=t.solidityError=t.panicReasons=void 0,t.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},3810(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(5131);t.RIPEMD160=n.RIPEMD160,t.ripemd160=n.ripemd160},3835(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(11);class o extends n.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.ahash)(e);const r=(0,n.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),(0,n.clean)(a)}update(e){return(0,n.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,n.aexists)(this),(0,n.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:a,outputLen:i}=this;return e.finished=n,e.destroyed=o,e.blockLen=a,e.outputLen=i,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},3842(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=v,t.fromBig=o,t.split=a;const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function a(e,t=!1){const r=e.length;let n=new Uint32Array(r),a=new Uint32Array(r);for(let i=0;i<r;i++){const{h:r,l:s}=o(e[i],t);[n[i],a[i]]=[r,s]}return[n,a]}const i=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=i;const s=(e,t,r)=>e>>>r;t.shrSH=s;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const d=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=d;const l=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=l;const f=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=f;const p=(e,t)=>t;t.rotr32H=p;const m=(e,t)=>e;t.rotr32L=m;const b=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=b;const h=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=h;const y=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=y;const g=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}t.rotlBL=g;const E=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=E;const w=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=w;const P=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=P;const A=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0;t.add4H=A;const x=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);t.add5L=x;const I=(e,t,r,n,o,a)=>t+r+n+o+a+(e/2**32|0)|0;t.add5H=I;const S={fromBig:o,split:a,toBig:i,shrSH:s,shrSL:c,rotrSH:u,rotrSL:d,rotrBH:l,rotrBL:f,rotr32H:p,rotr32L:m,rotlSH:b,rotlSL:h,rotlBH:y,rotlBL:g,add:v,add3L:E,add3H:w,add4L:P,add4H:A,add5H:I,add5L:x};t.default=S},3847(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeErc8010Signature=function(e){const{address:t,data:r,signature:a,to:i="hex"}=e,s=n.SignatureErc8010.wrap({authorization:{address:e.authorization.address,chainId:e.authorization.chainId,nonce:BigInt(e.authorization.nonce),r:BigInt(e.authorization.r),s:BigInt(e.authorization.s),yParity:e.authorization.yParity},data:r,signature:a,to:t});return"hex"===i?s:(0,o.hexToBytes)(s)};const n=r(2828),o=r(1699)},3854(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.requestPermissions=async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}},3863(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=t.InvalidParenthesisError=t.UnknownSignatureError=t.InvalidSignatureError=t.InvalidStructSignatureError=t.InvalidAbiParameterError=t.InvalidAbiParametersError=t.InvalidParameterError=t.SolidityProtectedKeywordError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.UnknownSolidityTypeError=t.InvalidAbiItemError=t.UnknownTypeError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.formatAbiParameters=t.formatAbiParameter=t.formatAbiItem=t.formatAbi=t.narrow=t.BaseError=void 0;var n=r(8064);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return n.BaseError}});var o=r(6232);Object.defineProperty(t,"narrow",{enumerable:!0,get:function(){return o.narrow}});var a=r(2923);Object.defineProperty(t,"formatAbi",{enumerable:!0,get:function(){return a.formatAbi}});var i=r(5256);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return i.formatAbiItem}});var s=r(8504);Object.defineProperty(t,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var c=r(8311);Object.defineProperty(t,"formatAbiParameters",{enumerable:!0,get:function(){return c.formatAbiParameters}});var u=r(7977);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return u.parseAbi}});var d=r(9638);Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return d.parseAbiItem}});var l=r(6954);Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return l.parseAbiParameter}});var f=r(8649);Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return f.parseAbiParameters}});var p=r(243);Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return p.UnknownTypeError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return p.InvalidAbiItemError}}),Object.defineProperty(t,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return p.UnknownSolidityTypeError}});var m=r(5653);Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var b=r(2544);Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return b.InvalidStructSignatureError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return b.InvalidSignatureError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return b.UnknownSignatureError}});var h=r(3674);Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var y=r(6569);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return y.CircularReferenceError}})},3887(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FormoAnalyticsSession=t.SESSION_WALLET_IDENTIFIED_KEY=t.SESSION_WALLET_DETECTED_KEY=void 0;var n=r(7934),o=r(6973);t.SESSION_WALLET_DETECTED_KEY="wallet-detected",t.SESSION_WALLET_IDENTIFIED_KEY="wallet-identified";var a=function(){function e(){}return e.prototype.generateIdentificationKey=function(e,t){return t?"".concat(e,":").concat(t):e},e.prototype.isWalletDetected=function(e){var r;return((null===(r=(0,n.cookie)().get(t.SESSION_WALLET_DETECTED_KEY))||void 0===r?void 0:r.split(","))||[]).includes(e)},e.prototype.markWalletDetected=function(e){var r,o=(null===(r=(0,n.cookie)().get(t.SESSION_WALLET_DETECTED_KEY))||void 0===r?void 0:r.split(","))||[];o.includes(e)||(o.push(e),(0,n.cookie)().set(t.SESSION_WALLET_DETECTED_KEY,o.join(","),{expires:new Date(Date.now()+864e5).toUTCString(),path:"/"}))},e.prototype.isWalletIdentified=function(e,r){var a=this.generateIdentificationKey(e,r),i=(0,n.cookie)().get(t.SESSION_WALLET_IDENTIFIED_KEY),s=((null==i?void 0:i.split(","))||[]).includes(a);return o.logger.debug("Session: Checking wallet identification",{identifiedKey:a,isIdentified:s,hasRdns:!!r}),s},e.prototype.markWalletIdentified=function(e,r){var a,i=this.generateIdentificationKey(e,r),s=(null===(a=(0,n.cookie)().get(t.SESSION_WALLET_IDENTIFIED_KEY))||void 0===a?void 0:a.split(","))||[];if(s.includes(i))o.logger.info("Session: Wallet already marked as identified",{identifiedKey:i,existingWallets:s,hasRdns:!!r});else{s.push(i);var c=s.join(",");(0,n.cookie)().set(t.SESSION_WALLET_IDENTIFIED_KEY,c,{expires:new Date(Date.now()+864e5).toUTCString(),path:"/"}),o.logger.debug("Session: Marked wallet as identified",{identifiedKey:i,hasRdns:!!r})}},e}();t.FormoAnalyticsSession=a},3949(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionReceipt=async function(e,{hash:t}){const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new n.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(r,"getTransactionReceipt")};const n=r(979),o=r(3501)},3962(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.snapshot=async function(e){return await e.request({method:"evm_snapshot"})}},3970(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.simulateCalls=async function(e,t){const{blockNumber:r,blockTag:p,calls:m,stateOverrides:b,traceAssetChanges:h,traceTransfers:y,validation:g}=t,v=t.account?(0,a.parseAccount)(t.account):void 0;if(h&&!v)throw new c.BaseError("`account` is required when `traceAssetChanges` is true");const E=v?n.encode(n.from("constructor(bytes, bytes)"),{bytecode:s.deploylessCallViaBytecodeBytecode,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",o.encodeData(o.from("function getBalance(address)"),[v.address])]}):void 0,w=h?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;const{accessList:r}=await(0,l.createAccessList)(e,{account:v.address,...t,data:t.abi?(0,u.encodeFunctionData)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],P=await(0,f.simulateBlocks)(e,{blockNumber:r,blockTag:p,blocks:[...h?[{calls:[{data:E}],stateOverrides:b},{calls:w.map((e,t)=>({abi:[o.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:e,from:i.zeroAddress,nonce:t})),stateOverrides:[{address:i.zeroAddress,nonce:0}]}]:[],{calls:[...m,{}].map(e=>({...e,from:v?.address})),stateOverrides:b},...h?[{calls:[{data:E}]},{calls:w.map((e,t)=>({abi:[o.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:e,from:i.zeroAddress,nonce:t})),stateOverrides:[{address:i.zeroAddress,nonce:0}]},{calls:w.map((e,t)=>({to:e,abi:[o.from("function decimals() returns (uint256)")],functionName:"decimals",from:i.zeroAddress,nonce:t})),stateOverrides:[{address:i.zeroAddress,nonce:0}]},{calls:w.map((e,t)=>({to:e,abi:[o.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:i.zeroAddress,nonce:t})),stateOverrides:[{address:i.zeroAddress,nonce:0}]},{calls:w.map((e,t)=>({to:e,abi:[o.from("function symbol() returns (string)")],functionName:"symbol",from:i.zeroAddress,nonce:t})),stateOverrides:[{address:i.zeroAddress,nonce:0}]}]:[]],traceTransfers:y,validation:g}),A=h?P[2]:P[0],[x,I,,S,T,O,_,j]=h?P:[],{calls:C,...B}=A,M=C.slice(0,-1)??[],k=[...x?.calls??[],...I?.calls??[]].map(e=>"success"===e.status?(0,d.hexToBigInt)(e.data):null),R=[...S?.calls??[],...T?.calls??[]].map(e=>"success"===e.status?(0,d.hexToBigInt)(e.data):null),N=(O?.calls??[]).map(e=>"success"===e.status?e.result:null),F=(j?.calls??[]).map(e=>"success"===e.status?e.result:null),U=(_?.calls??[]).map(e=>"success"===e.status?e.result:null),H=[];for(const[e,t]of R.entries()){const r=k[e];if("bigint"!=typeof t)continue;if("bigint"!=typeof r)continue;const n=N[e-1],o=F[e-1],a=U[e-1],s=(()=>0===e?{address:i.ethAddress,decimals:18,symbol:"ETH"}:{address:w[e-1],decimals:a||n?Number(n??1):void 0,symbol:o??void 0})();H.some(e=>e.token.address===s.address)||H.push({token:s,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:H,block:B,results:M}};const n=r(7660),o=r(9514),a=r(9546),i=r(5165),s=r(4442),c=r(1682),u=r(5108),d=r(9766),l=r(2591),f=r(5913)},4014(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(2026)),a=n(r(9595)),i=(0,o.default)(function(e,t){return(0,a.default)(function(e,t,r){return r},e,t)});t.default=i},4025(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.size=function(e){return(0,n.isHex)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length};const n=r(6611)},4027(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isTupleRegex=t.integerRegex=t.bytesRegex=void 0,t.execTyped=function(e,t){const r=e.exec(t);return r?.groups},t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,t.isTupleRegex=/^\(.+?\).*?$/},4055(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionSignature=void 0;var n=r(4827);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return n.toSignature}})},4072(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const n=r(7734),o=r(3842),a=r(11),i=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array(64);class c extends n.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:a,G:i,H:s}=this;return[e,t,r,n,o,a,i,s]}set(e,t,r,n,o,a,i,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|a,this.G=0|i,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=s[e-15],r=s[e-2],n=(0,a.rotr)(t,7)^(0,a.rotr)(t,18)^t>>>3,o=(0,a.rotr)(r,17)^(0,a.rotr)(r,19)^r>>>10;s[e]=o+s[e-7]+n+s[e-16]|0}let{A:r,B:o,C:c,D:u,E:d,F:l,G:f,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,a.rotr)(d,6)^(0,a.rotr)(d,11)^(0,a.rotr)(d,25))+(0,n.Chi)(d,l,f)+i[e]+s[e]|0,m=((0,a.rotr)(r,2)^(0,a.rotr)(r,13)^(0,a.rotr)(r,22))+(0,n.Maj)(r,o,c)|0;p=f,f=l,l=d,d=u+t|0,u=c,c=o,o=r,r=t+m|0}r=r+this.A|0,o=o+this.B|0,c=c+this.C|0,u=u+this.D|0,d=d+this.E|0,l=l+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(r,o,c,u,d,l,f,p)}roundClean(){(0,a.clean)(s)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,a.clean)(this.buffer)}}t.SHA256=c;class u extends c{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}t.SHA224=u;const d=(()=>o.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),l=(()=>d[0])(),f=(()=>d[1])(),p=new Uint32Array(80),m=new Uint32Array(80);class b extends n.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:a,Dh:i,Dl:s,Eh:c,El:u,Fh:d,Fl:l,Gh:f,Gl:p,Hh:m,Hl:b}=this;return[e,t,r,n,o,a,i,s,c,u,d,l,f,p,m,b]}set(e,t,r,n,o,a,i,s,c,u,d,l,f,p,m,b){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|a,this.Dh=0|i,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|m,this.Hl=0|b}process(e,t){for(let r=0;r<16;r++,t+=4)p[r]=e.getUint32(t),m[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|p[e-15],r=0|m[e-15],n=o.rotrSH(t,r,1)^o.rotrSH(t,r,8)^o.shrSH(t,r,7),a=o.rotrSL(t,r,1)^o.rotrSL(t,r,8)^o.shrSL(t,r,7),i=0|p[e-2],s=0|m[e-2],c=o.rotrSH(i,s,19)^o.rotrBH(i,s,61)^o.shrSH(i,s,6),u=o.rotrSL(i,s,19)^o.rotrBL(i,s,61)^o.shrSL(i,s,6),d=o.add4L(a,u,m[e-7],m[e-16]),l=o.add4H(d,n,c,p[e-7],p[e-16]);p[e]=0|l,m[e]=0|d}let{Ah:r,Al:n,Bh:a,Bl:i,Ch:s,Cl:c,Dh:u,Dl:d,Eh:b,El:h,Fh:y,Fl:g,Gh:v,Gl:E,Hh:w,Hl:P}=this;for(let e=0;e<80;e++){const t=o.rotrSH(b,h,14)^o.rotrSH(b,h,18)^o.rotrBH(b,h,41),A=o.rotrSL(b,h,14)^o.rotrSL(b,h,18)^o.rotrBL(b,h,41),x=b&y^~b&v,I=h&g^~h&E,S=o.add5L(P,A,I,f[e],m[e]),T=o.add5H(S,w,t,x,l[e],p[e]),O=0|S,_=o.rotrSH(r,n,28)^o.rotrBH(r,n,34)^o.rotrBH(r,n,39),j=o.rotrSL(r,n,28)^o.rotrBL(r,n,34)^o.rotrBL(r,n,39),C=r&a^r&s^a&s,B=n&i^n&c^i&c;w=0|v,P=0|E,v=0|y,E=0|g,y=0|b,g=0|h,({h:b,l:h}=o.add(0|u,0|d,0|T,0|O)),u=0|s,d=0|c,s=0|a,c=0|i,a=0|r,i=0|n;const M=o.add3L(O,j,B);r=o.add3H(M,T,_,C),n=0|M}({h:r,l:n}=o.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:a,l:i}=o.add(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:c}=o.add(0|this.Ch,0|this.Cl,0|s,0|c)),({h:u,l:d}=o.add(0|this.Dh,0|this.Dl,0|u,0|d)),({h:b,l:h}=o.add(0|this.Eh,0|this.El,0|b,0|h)),({h:y,l:g}=o.add(0|this.Fh,0|this.Fl,0|y,0|g)),({h:v,l:E}=o.add(0|this.Gh,0|this.Gl,0|v,0|E)),({h:w,l:P}=o.add(0|this.Hh,0|this.Hl,0|w,0|P)),this.set(r,n,a,i,s,c,u,d,b,h,y,g,v,E,w,P)}roundClean(){(0,a.clean)(p,m)}destroy(){(0,a.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=b;class h extends b{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}t.SHA384=h;const y=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),g=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class v extends b{constructor(){super(28),this.Ah=0|y[0],this.Al=0|y[1],this.Bh=0|y[2],this.Bl=0|y[3],this.Ch=0|y[4],this.Cl=0|y[5],this.Dh=0|y[6],this.Dl=0|y[7],this.Eh=0|y[8],this.El=0|y[9],this.Fh=0|y[10],this.Fl=0|y[11],this.Gh=0|y[12],this.Gl=0|y[13],this.Hh=0|y[14],this.Hl=0|y[15]}}t.SHA512_224=v;class E extends b{constructor(){super(32),this.Ah=0|g[0],this.Al=0|g[1],this.Bh=0|g[2],this.Bl=0|g[3],this.Ch=0|g[4],this.Cl=0|g[5],this.Dh=0|g[6],this.Dl=0|g[7],this.Eh=0|g[8],this.El=0|g[9],this.Fh=0|g[10],this.Fl=0|g[11],this.Gh=0|g[12],this.Gl=0|g[13],this.Hh=0|g[14],this.Hl=0|g[15]}}t.SHA512_256=E,t.sha256=(0,a.createHasher)(()=>new c),t.sha224=(0,a.createHasher)(()=>new u),t.sha512=(0,a.createHasher)(()=>new b),t.sha384=(0,a.createHasher)(()=>new h),t.sha512_256=(0,a.createHasher)(()=>new E),t.sha512_224=(0,a.createHasher)(()=>new v)},4074(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCompactSignature=function(e){const{r:t,s:r}=n.secp256k1.Signature.fromCompact(e.slice(2,130));return{r:(0,o.numberToHex)(t,{size:32}),yParityAndS:(0,o.numberToHex)(r,{size:32})}};const n=r(7666),o=r(6669)},4129(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RecursiveReadLimitExceededError=t.PositionOutOfBoundsError=t.NegativeOffsetError=void 0;const n=r(1682);class o extends n.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}t.NegativeOffsetError=o;class a extends n.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=a;class i extends n.BaseError{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}t.RecursiveReadLimitExceededError=i},4130(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertSize=s,t.fromHex=function(e,t){const r="string"==typeof t?{to:t}:t,n=r.to;return"number"===n?d(e,r):"bigint"===n?c(e,r):"string"===n?l(e,r):"boolean"===n?u(e,r):(0,i.hexToBytes)(e,r)},t.hexToBigInt=c,t.hexToBool=u,t.hexToNumber=d,t.hexToString=l;const n=r(9130),o=r(4025),a=r(7716),i=r(1699);function s(e,{size:t}){if((0,o.size)(e)>t)throw new n.SizeOverflowError({givenSize:(0,o.size)(e),maxSize:t})}function c(e,t={}){const{signed:r}=t;t.size&&s(e,{size:t.size});const n=BigInt(e);if(!r)return n;const o=(e.length-2)/2;return n<=(1n<<8n*BigInt(o)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function u(e,t={}){let r=e;if(t.size&&(s(r,{size:t.size}),r=(0,a.trim)(r)),"0x00"===(0,a.trim)(r))return!1;if("0x01"===(0,a.trim)(r))return!0;throw new n.InvalidHexBooleanError(r)}function d(e,t={}){return Number(c(e,t))}function l(e,t={}){let r=(0,i.hexToBytes)(e);return t.size&&(s(r,{size:t.size}),r=(0,a.trim)(r,{dir:"right"})),(new TextDecoder).decode(r)}},4156(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},4195(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isErc8010Signature=function(e){return n.SignatureErc8010.validate(e)};const n=r(2828)},4208(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.watchAsset=async function(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}},4219(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EnsInvalidChainIdError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarUriResolutionError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarInvalidMetadataError=void 0;const n=r(1682);class o extends n.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}t.EnsAvatarInvalidMetadataError=o;class a extends n.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}t.EnsAvatarInvalidNftUriError=a;class i extends n.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}t.EnsAvatarUriResolutionError=i;class s extends n.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}t.EnsAvatarUnsupportedNamespaceError=s;class c extends n.BaseError{constructor({chainId:e}){super(`Invalid ENSIP-11 chainId: ${e}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}t.EnsInvalidChainIdError=c},4225(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransaction=async function(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}},4255(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.increaseTime=async function(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[(0,n.numberToHex)(t)]})};const n=r(6669)},4258(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseErc8010Signature=function(e){if(!(0,a.isErc8010Signature)(e))return{signature:e};const{authorization:t,to:r,...i}=n.SignatureErc8010.unwrap(e);return{authorization:{address:t.address,chainId:t.chainId,nonce:Number(t.nonce),r:(0,o.numberToHex)(t.r,{size:32}),s:(0,o.numberToHex)(t.s,{size:32}),yParity:t.yParity},...r?{address:r}:{},...i}};const n=r(2828),o=r(6669),a=r(4195)},4264(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.blobsToCommitments=function(e){const{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),a="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.hexToBytes)(e)):e.blobs,i=[];for(const e of a)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?i:i.map(e=>(0,o.bytesToHex)(e))};const n=r(1699),o=r(6669)},4314(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toRlp=s,t.bytesToRlp=function(e,t="bytes"){return s(e,t)},t.hexToRlp=function(e,t="hex"){return s(e,t)};const n=r(1682),o=r(9463),a=r(1699),i=r(6669);function s(e,t="hex"){const r=c(e),n=(0,o.createCursor)(new Uint8Array(r.length));return r.encode(n),"hex"===t?(0,i.bytesToHex)(n.bytes):n.bytes}function c(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),r=u(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map(e=>c(e))):function(e){const t="string"==typeof e?(0,a.hexToBytes)(e):e,r=u(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function u(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new n.BaseError("Length is too large.")}},4326(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchContractEvent=function(e,t){const{abi:r,address:y,args:g,batch:v=!0,eventName:E,fromBlock:w,onError:P,onLogs:A,poll:x,pollingInterval:I=e.pollingInterval,strict:S}=t;return(void 0!==x?x:"bigint"==typeof w||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{const t=S??!1,n=(0,l.stringify)(["watchContractEvent",y,g,v,e.uid,E,I,t,w]);return(0,u.observe)(n,{onLogs:A,onError:P},n=>{let a,i;void 0!==w&&(a=w-1n);let s=!1;const u=(0,d.poll)(async()=>{if(s)try{let o;if(i)o=await(0,c.getAction)(e,b.getFilterChanges,"getFilterChanges")({filter:i});else{const n=await(0,c.getAction)(e,p.getBlockNumber,"getBlockNumber")({});o=a&&a<n?await(0,c.getAction)(e,m.getContractEvents,"getContractEvents")({abi:r,address:y,args:g,eventName:E,fromBlock:a+1n,toBlock:n,strict:t}):[],a=n}if(0===o.length)return;if(v)n.onLogs(o);else for(const e of o)n.onLogs([e])}catch(e){i&&e instanceof o.InvalidInputRpcError&&(s=!1),n.onError?.(e)}else{try{i=await(0,c.getAction)(e,f.createContractEventFilter,"createContractEventFilter")({abi:r,address:y,args:g,eventName:E,strict:t,fromBlock:w})}catch{}s=!0}},{emitOnBegin:!0,interval:I});return async()=>{i&&await(0,c.getAction)(e,h.uninstallFilter,"uninstallFilter")({filter:i}),u()}})})():(()=>{const t=S??!1,o=(0,l.stringify)(["watchContractEvent",y,g,v,e.uid,E,I,t]);let c=!0,d=()=>c=!1;return(0,u.observe)(o,{onLogs:A,onError:P},t=>((async()=>{try{const o=(()=>{if("fallback"===e.transport.type){const t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),u=E?(0,i.encodeEventTopics)({abi:r,eventName:E,args:g}):[],{unsubscribe:l}=await o.subscribe({params:["logs",{address:y,topics:u}],onData(e){if(!c)return;const o=e.result;try{const{eventName:e,args:n}=(0,a.decodeEventLog)({abi:r,data:o.data,topics:o.topics,strict:S}),i=(0,s.formatLog)(o,{args:n,eventName:e});t.onLogs([i])}catch(e){let r,a;if(e instanceof n.DecodeLogDataMismatch||e instanceof n.DecodeLogTopicsMismatch){if(S)return;r=e.abiItem.name,a=e.abiItem.inputs?.some(e=>!("name"in e&&e.name))}const i=(0,s.formatLog)(o,{args:a?[]:{},eventName:r});t.onLogs([i])}},onError(e){t.onError?.(e)}});d=l,c||d()}catch(e){P?.(e)}})(),()=>d()))})()};const n=r(9797),o=r(2564),a=r(6218),i=r(574),s=r(9475),c=r(3115),u=r(9097),d=r(2464),l=r(8352),f=r(6057),p=r(5725),m=r(7702),b=r(4602),h=r(1841)},4337(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return(0,i.default)(r)?t:(0,a.default)(function(t,n){return e(r,t,n)});case 2:return(0,i.default)(r)&&(0,i.default)(n)?t:(0,i.default)(r)?(0,a.default)(function(t,r){return e(t,n,r)}):(0,i.default)(n)?(0,a.default)(function(t,n){return e(r,t,n)}):(0,o.default)(function(t){return e(r,n,t)});default:return(0,i.default)(r)&&(0,i.default)(n)&&(0,i.default)(s)?t:(0,i.default)(r)&&(0,i.default)(n)?(0,a.default)(function(t,r){return e(t,r,s)}):(0,i.default)(r)&&(0,i.default)(s)?(0,a.default)(function(t,r){return e(t,n,r)}):(0,i.default)(n)&&(0,i.default)(s)?(0,a.default)(function(t,n){return e(r,t,n)}):(0,i.default)(r)?(0,o.default)(function(t){return e(t,n,s)}):(0,i.default)(n)?(0,o.default)(function(t){return e(r,t,s)}):(0,i.default)(s)?(0,o.default)(function(t){return e(r,n,t)}):e(r,n,s)}}};var o=n(r(6959)),a=n(r(2026)),i=n(r(4156))},4342(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BlockNotFoundError=void 0;const n=r(1682);class o extends n.BaseError{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}t.BlockNotFoundError=o},4366(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.walletActions=function(e){return{addChain:t=>(0,o.addChain)(e,t),deployContract:t=>(0,a.deployContract)(e,t),getAddresses:()=>(0,i.getAddresses)(e),getCallsStatus:t=>(0,s.getCallsStatus)(e,t),getCapabilities:t=>(0,c.getCapabilities)(e,t),getChainId:()=>(0,n.getChainId)(e),getPermissions:()=>(0,u.getPermissions)(e),prepareAuthorization:t=>(0,d.prepareAuthorization)(e,t),prepareTransactionRequest:t=>(0,l.prepareTransactionRequest)(e,t),requestAddresses:()=>(0,f.requestAddresses)(e),requestPermissions:t=>(0,p.requestPermissions)(e,t),sendCalls:t=>(0,m.sendCalls)(e,t),sendCallsSync:t=>(0,b.sendCallsSync)(e,t),sendRawTransaction:t=>(0,h.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,y.sendRawTransactionSync)(e,t),sendTransaction:t=>(0,g.sendTransaction)(e,t),sendTransactionSync:t=>(0,v.sendTransactionSync)(e,t),showCallsStatus:t=>(0,E.showCallsStatus)(e,t),signAuthorization:t=>(0,w.signAuthorization)(e,t),signMessage:t=>(0,P.signMessage)(e,t),signTransaction:t=>(0,A.signTransaction)(e,t),signTypedData:t=>(0,x.signTypedData)(e,t),switchChain:t=>(0,I.switchChain)(e,t),waitForCallsStatus:t=>(0,S.waitForCallsStatus)(e,t),watchAsset:t=>(0,T.watchAsset)(e,t),writeContract:t=>(0,O.writeContract)(e,t),writeContractSync:t=>(0,_.writeContractSync)(e,t)}};const n=r(401),o=r(5449),a=r(9112),i=r(6373),s=r(34),c=r(4699),u=r(8301),d=r(2921),l=r(211),f=r(9737),p=r(3854),m=r(5790),b=r(6525),h=r(4225),y=r(1246),g=r(9939),v=r(1255),E=r(5533),w=r(7875),P=r(309),A=r(9414),x=r(8430),I=r(3632),S=r(1374),T=r(4208),O=r(2015),_=r(6911)},4378(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(7282),t),o(r(503),t),o(r(2661),t),o(r(6356),t),o(r(7771),t),o(r(9905),t),o(r(6745),t)},4384(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e,{format:t}){if(!t)return{};const r={};return function t(n){const o=Object.keys(n);for(const a of o)a in e&&(r[a]=e[a]),n[a]&&"object"==typeof n[a]&&!Array.isArray(n[a])&&t(n[a])}(t(e||{})),r}},4396(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.wait=async function(e){return new Promise(t=>setTimeout(t,e))}},4413(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTypedData=function(e){const{domain:t,message:r,primaryType:n,types:o}=e,a=(e,t)=>{const r={...t};for(const t of e){const{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},i=o.EIP712Domain&&t?a(o.EIP712Domain,t):{},s=(()=>{if("EIP712Domain"!==n)return a(o[n],r)})();return(0,l.stringify)({domain:i,message:s,primaryType:n,types:o})},t.validateTypedData=function(e){const{domain:t,message:r,primaryType:d,types:l}=e,f=(e,t)=>{for(const r of e){const{name:e,type:a}=r,d=t[e],m=a.match(u.integerRegex);if(m&&("number"==typeof d||"bigint"==typeof d)){const[e,t,r]=m;(0,c.numberToHex)(d,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===a&&"string"==typeof d&&!(0,i.isAddress)(d))throw new o.InvalidAddressError({address:d});const b=a.match(u.bytesRegex);if(b){const[e,t]=b;if(t&&(0,s.size)(d)!==Number.parseInt(t,10))throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(t,10),givenSize:(0,s.size)(d)})}const h=l[a];h&&(p(a),f(h,d))}};if(l.EIP712Domain&&t){if("object"!=typeof t)throw new a.InvalidDomainError({domain:t});f(l.EIP712Domain,t)}if("EIP712Domain"!==d){if(!l[d])throw new a.InvalidPrimaryTypeError({primaryType:d,types:l});f(l[d],r)}},t.getTypesForEIP712Domain=f,t.domainSeparator=function({domain:e}){return(0,d.hashDomain)({domain:e,types:{EIP712Domain:f({domain:e})}})};const n=r(9797),o=r(1611),a=r(1695),i=r(2018),s=r(4025),c=r(6669),u=r(9622),d=r(1556),l=r(8352);function f({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function p(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new a.InvalidStructTypeError({type:e})}},4421(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromBlobs=function(e){const t=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,o.hexToBytes)(e)):e.blobs,i=r.reduce((e,t)=>e+t.length,0),s=(0,n.createCursor)(new Uint8Array(i));let c=!0;for(const e of r){const t=(0,n.createCursor)(e);for(;c&&t.position<e.length;){t.incrementPosition(1);let r=31;e.length-t.position<31&&(r=e.length-t.position);for(const e in Array.from({length:r})){const e=t.readByte();if(128===e&&!t.inspectBytes(t.remaining).includes(128)){c=!1;break}s.pushByte(e)}}}const u=s.bytes.slice(0,s.position);return"hex"===t?(0,a.bytesToHex)(u):u};const n=r(9463),o=r(1699),a=r(6669)},4436(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromBytes=function(e,t){const r="string"==typeof t?{to:t}:t,n=r.to;return"number"===n?u(e,r):"bigint"===n?s(e,r):"boolean"===n?c(e,r):"string"===n?d(e,r):(0,i.bytesToHex)(e,r)},t.bytesToBigInt=s,t.bytesToBool=c,t.bytesToNumber=u,t.bytesToString=d;const n=r(9130),o=r(7716),a=r(4130),i=r(6669);function s(e,t={}){void 0!==t.size&&(0,a.assertSize)(e,{size:t.size});const r=(0,i.bytesToHex)(e,t);return(0,a.hexToBigInt)(r,t)}function c(e,t={}){let r=e;if(void 0!==t.size&&((0,a.assertSize)(r,{size:t.size}),r=(0,o.trim)(r)),r.length>1||r[0]>1)throw new n.InvalidBytesBooleanError(r);return Boolean(r[0])}function u(e,t={}){void 0!==t.size&&(0,a.assertSize)(e,{size:t.size});const r=(0,i.bytesToHex)(e,t);return(0,a.hexToNumber)(r,t)}function d(e,t={}){let r=e;return void 0!==t.size&&((0,a.assertSize)(r,{size:t.size}),r=(0,o.trim)(r,{dir:"right"})),(new TextDecoder).decode(r)}},4442(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.multicall3Bytecode=t.erc6492SignatureValidatorByteCode=t.deploylessCallViaFactoryBytecode=t.deploylessCallViaBytecodeBytecode=void 0,t.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",t.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",t.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",t.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"},4449(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getStorageAt=async function(e,{address:t,blockNumber:r,blockTag:o="latest",slot:a}){const i=void 0!==r?(0,n.numberToHex)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,a,i||o]})};const n=r(6669)},4458(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignature=function({r:e,s:t,to:r="hex",v:i,yParity:s}){const c=(()=>{if(0===s||1===s)return s;if(i&&(27n===i||28n===i||i>=35n))return i%2n==0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),u=`0x${new n.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}${0===c?"1b":"1c"}`;return"hex"===r?u:(0,a.hexToBytes)(u)};const n=r(7666),o=r(4130),a=r(1699)},4512(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.functionModifiers=t.eventModifiers=t.modifiers=void 0,t.isErrorSignature=function(e){return o.test(e)},t.execErrorSignature=function(e){return(0,n.execTyped)(o,e)},t.isEventSignature=function(e){return a.test(e)},t.execEventSignature=function(e){return(0,n.execTyped)(a,e)},t.isFunctionSignature=function(e){return i.test(e)},t.execFunctionSignature=function(e){return(0,n.execTyped)(i,e)},t.isStructSignature=function(e){return s.test(e)},t.execStructSignature=function(e){return(0,n.execTyped)(s,e)},t.isConstructorSignature=function(e){return c.test(e)},t.execConstructorSignature=function(e){return(0,n.execTyped)(c,e)},t.isFallbackSignature=function(e){return u.test(e)},t.execFallbackSignature=function(e){return(0,n.execTyped)(u,e)},t.isReceiveSignature=function(e){return d.test(e)};const n=r(7424),o=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,i=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,s=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,c=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,u=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,d=/^receive\(\) external payable$/;t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},4522(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=function(e,t){const r=t||"hex",s=(0,n.ripemd160)((0,o.isHex)(e,{strict:!1})?(0,a.toBytes)(e):e);return"bytes"===r?s:(0,i.toHex)(s)};const n=r(3810),o=r(6611),a=r(1699),i=r(6669)},4535(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dropTransaction=async function(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}},4547(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dumpState=async function(e){return e.request({method:`${e.mode}_dumpState`})}},4572(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAuthorizationAddress=async function(e){const{authorization:t,signature:r}=e;return(0,n.recoverAddress)({hash:(0,o.hashAuthorization)(t),signature:r??t})};const n=r(1154),o=r(7270)},4581(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(6973),s=r(2704),c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.backend=r,n}return o(t,e),t.prototype.isAvailable=function(){try{var e="__storage_test__";return this.backend.setItem(e,"1"),this.backend.removeItem(e),!0}catch(e){return!1}},t.prototype.set=function(e,t){"boolean"==typeof t&&(t=!0===t?"true":"false"),"object"==typeof t&&(t=s.JSON_PREFIX+JSON.stringify(t)),this.backend.setItem(this.getKey(e),t)},t.prototype.get=function(e){var t=this.backend.getItem(this.getKey(e));if(!t||"string"!=typeof t)return null;if(["null","undefined"].some(function(e){return e==t}))return null;if(t.startsWith(s.JSON_PREFIX))try{return JSON.parse(t.slice(s.JSON_PREFIX.length))}catch(e){return i.logger.error("[FORMO_ERROR] ".concat(this.backend.constructor.name," failed to parse JSON"),e),null}return["true","false"].some(function(e){return e==t})?JSON.parse(t):t},t.prototype.remove=function(e){this.backend.removeItem(this.getKey(e))},t}(a(r(8620)).default);t.default=c},4602(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterChanges=async function(e,{filter:t}){const r="strict"in t&&t.strict,a=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof a[0])return a;const i=a.map(e=>(0,o.formatLog)(e));return"abi"in t&&t.abi?(0,n.parseEventLogs)({abi:t.abi,logs:i,strict:r}):i};const n=r(9028),o=r(9475)},4632(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.28.0"},4670(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimateGasError=function(e,{docsPath:t,...r}){const i=(()=>{const t=(0,a.getNodeError)(e,r);return t instanceof o.UnknownNodeError?e:t})();return new n.EstimateGasExecutionError(i,{docsPath:t,...r})};const n=r(7816),o=r(6687),a=r(5871)},4692(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlocks=function(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:c=!1,onBlock:u,onError:d,includeTransactions:l,poll:f,pollingInterval:p=e.pollingInterval}){const m=void 0!==f?f:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type),b=l??!1;let h;return m?(()=>{const l=(0,i.stringify)(["watchBlocks",e.uid,t,r,c,b,p]);return(0,o.observe)(l,{onBlock:u,onError:d},o=>(0,a.poll)(async()=>{try{const a=await(0,n.getAction)(e,s.getBlock,"getBlock")({blockTag:t,includeTransactions:b});if(null!==a.number&&null!=h?.number){if(a.number===h.number)return;if(a.number-h.number>1&&r)for(let t=h?.number+1n;t<a.number;t++){const r=await(0,n.getAction)(e,s.getBlock,"getBlock")({blockNumber:t,includeTransactions:b});o.onBlock(r,h),h=r}}(null==h?.number||"pending"===t&&null==a?.number||null!==a.number&&a.number>h.number)&&(o.onBlock(a,h),h=a)}catch(e){o.onError?.(e)}},{emitOnBegin:c,interval:p}))})():(()=>{let r=!0,o=!0,a=()=>r=!1;return(async()=>{try{c&&(0,n.getAction)(e,s.getBlock,"getBlock")({blockTag:t,includeTransactions:b}).then(e=>{r&&o&&(u(e,void 0),o=!1)}).catch(d);const i=(()=>{if("fallback"===e.transport.type){const t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:l}=await i.subscribe({params:["newHeads"],async onData(t){if(!r)return;const a=await(0,n.getAction)(e,s.getBlock,"getBlock")({blockNumber:t.result?.number,includeTransactions:b}).catch(()=>{});r&&(u(a,h),o=!1,h=a)},onError(e){d?.(e)}});a=l,r||a()}catch(e){d?.(e)}})(),()=>a()})()};const n=r(3115),o=r(9097),a=r(2464),i=r(8352),s=r(3248)},4699(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCapabilities=async function(e,t={}){const{account:r=e.account,chainId:a}=t,i=r?(0,n.parseAccount)(r):void 0,s=a?[i?.address,[(0,o.numberToHex)(a)]]:[i?.address],c=await e.request({method:"wallet_getCapabilities",params:s}),u={};for(const[e,t]of Object.entries(c)){u[Number(e)]={};for(let[r,n]of Object.entries(t))"addSubAccount"===r&&(r="unstable_addSubAccount"),u[Number(e)][r]=n}return"number"==typeof a?u[a]:u};const n=r(9546),o=r(6669)},4720(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionType=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new n.InvalidSerializableTransactionError({transaction:e})};const n=r(979)},4744(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(3093),t),o(r(2442),t)},4745(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=function(e){const{batch:t,chain:r,ccipRead:a,key:i="base",name:s="Base Client",type:c="base"}=e,u=e.experimental_blockTag??("number"==typeof r?.experimental_preconfirmationTime?"pending":void 0),d=r?.blockTime??12e3,l=Math.min(Math.max(Math.floor(d/2),500),4e3),f=e.pollingInterval??l,p=e.cacheTime??f,m=e.account?(0,n.parseAccount)(e.account):void 0,{config:b,request:h,value:y}=e.transport({chain:r,pollingInterval:f}),g={account:m,batch:t,cacheTime:p,ccipRead:a,chain:r,key:i,name:s,pollingInterval:f,request:h,transport:{...b,...y},type:c,uid:(0,o.uid)(),...u?{experimental_blockTag:u}:{}};return Object.assign(g,{extend:function e(t){return r=>{const n=r(t);for(const e in g)delete n[e];const o={...t,...n};return Object.assign(o,{extend:e(o)})}}(g)})},t.rpcSchema=function(){return null};const n=r(9546),o=r(6367)},4813(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidWrappedSignatureError=t.suffixParameters=t.magicBytes=void 0,t.assert=u,t.from=function(e){return"string"==typeof e?d(e):e},t.unwrap=d,t.wrap=function(e){const{data:r,signature:a}=e;u(e);const d=s.recoverAddress({payload:o.getSignPayload(e.authorization),signature:c.from(e.authorization)}),l=n.encode(t.suffixParameters,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??d,r??"0x"]),f=i.fromNumber(i.size(l),{size:32});return i.concat(a,l,f,t.magicBytes)},t.validate=function(e){try{return u(e),!0}catch{return!1}};const n=r(7818),o=r(21),a=r(6573),i=r(1465),s=r(2808),c=r(2061);function u(e){if("string"==typeof e){if(i.slice(e,-32)!==t.magicBytes)throw new l(e)}else c.assert(e.authorization)}function d(e){u(e);const r=i.toNumber(i.slice(e,-64,-32)),a=i.slice(e,-r-64,-64),s=i.slice(e,0,-r-64),[c,d,l]=n.decode(t.suffixParameters,a);return{authorization:o.from({address:c.delegation,chainId:Number(c.chainId),nonce:c.nonce,yParity:c.yParity,r:c.r,s:c.s}),signature:s,...l&&"0x"!==l?{data:l,to:d}:{}}}t.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",t.suffixParameters=n.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");class l extends a.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}t.InvalidWrappedSignatureError=l},4827(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toSignature=void 0;const n=r(3863),o=r(9435);t.toSignature=e=>{const t="string"==typeof e?e:(0,n.formatAbiItem)(e);return(0,o.normalizeSignature)(t)}},4847(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=async function(e){const{address:t,domain:r,message:i,primaryType:s,signature:c,types:u}=e;return(0,o.isAddressEqual)((0,n.getAddress)(t),await(0,a.recoverTypedDataAddress)({domain:r,message:i,primaryType:s,signature:c,types:u}))};const n=r(9868),o=r(7624),a=r(3288)},4887(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createStore=void 0;const n=r(8919);t.createStore=function(){const e=new Set;let t=[];const r=()=>(0,n.requestProviders)(r=>{t.some(({info:e})=>e.uuid===r.info.uuid)||(t=[...t,r],e.forEach(e=>e(t,{added:[r]})))});let o=r();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),o?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),o?.(),o=r()},subscribe:(r,{emitImmediately:n}={})=>(e.add(r),n&&r(t,{added:t}),()=>e.delete(r))}}},4950(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getLogs=async function(e,{address:t,blockHash:r,fromBlock:s,toBlock:c,event:u,events:d,args:l,strict:f}={}){const p=f??!1,m=d??(u?[u]:void 0);let b,h=[];if(m){const e=m.flatMap(e=>(0,n.encodeEventTopics)({abi:[e],eventName:e.name,args:d?void 0:l}));h=[e],u&&(h=h[0])}b=r?await e.request({method:"eth_getLogs",params:[{address:t,topics:h,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:h,fromBlock:"bigint"==typeof s?(0,a.numberToHex)(s):s,toBlock:"bigint"==typeof c?(0,a.numberToHex)(c):c}]});const y=b.map(e=>(0,i.formatLog)(e));return m?(0,o.parseEventLogs)({abi:m,args:l,logs:y,strict:p}):y};const n=r(574),o=r(9028),a=r(6669),i=r(9475)},5033(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getActionDescriptor=void 0,t.getActionDescriptor=function(e,t){var r=e;return(null==t?void 0:t.status)&&(r+=" ".concat(t.status)),"connect"!==e&&"disconnect"!==e||!(null==t?void 0:t.rdns)||(r+=" (".concat(t.rdns,")")),r}},5035(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=void 0;const n=r(1825),o=r(1682);class a extends o.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}t.BaseFeeScalarError=a;class i extends o.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}t.Eip1559FeesNotSupportedError=i;class s extends o.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,n.formatGwei)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}t.MaxFeePerGasTooLowError=s},5047(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.namehash=function(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,a.bytesToHex)(t);const r=e.split(".");for(let e=r.length-1;e>=0;e-=1){const a=(0,s.encodedLabelToLabelhash)(r[e]),c=a?(0,o.toBytes)(a):(0,i.keccak256)((0,o.stringToBytes)(r[e]),"bytes");t=(0,i.keccak256)((0,n.concat)([t,c]),"bytes")}return(0,a.bytesToHex)(t)};const n=r(1028),o=r(1699),a=r(6669),i=r(1725),s=r(2071)},5057(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSelectorSizeError=t.NotFoundError=t.AmbiguityError=void 0,t.format=function(e){return n.formatAbiItem(e)},t.from=function(e,t={}){const{prepare:r=!0}=t,o=Array.isArray(e)||"string"==typeof e?n.parseAbiItem(e):e;return{...o,...r?{hash:l(o)}:{}}},t.fromAbi=c,t.getSelector=u,t.getSignature=d,t.getSignatureHash=l;const n=r(844),o=r(6573),a=r(1398),i=r(1465),s=r(3657);function c(e,t,r){const{args:n=[],prepare:o=!0}=r??{},a=i.validate(t,{strict:!1}),c=e.filter(e=>a?"function"===e.type||"error"===e.type?u(e)===i.slice(t,0,4):"event"===e.type&&l(e)===t:"name"in e&&e.name===t);if(0===c.length)throw new p({name:t});if(1===c.length)return{...c[0],...o?{hash:l(c[0])}:{}};let d;for(const e of c)if("inputs"in e)if(n&&0!==n.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===n.length&&n.every((t,r)=>{const n="inputs"in e&&e.inputs[r];return!!n&&s.isArgOfType(t,n)})){if(d&&"inputs"in d&&d.inputs){const t=s.getAmbiguousTypes(e.inputs,d.inputs,n);if(t)throw new f({abiItem:e,type:t[0]},{abiItem:d,type:t[1]})}d=e}}else if(!e.inputs||0===e.inputs.length)return{...e,...o?{hash:l(e)}:{}};const m=(()=>{if(d)return d;const[e,...t]=c;return{...e,overloads:t}})();if(!m)throw new p({name:t});return{...m,...o?{hash:l(m)}:{}}}function u(...e){const t=(()=>{if(Array.isArray(e[0])){const[t,r]=e;return c(t,r)}return e[0]})();return i.slice(l(t),0,4)}function d(...e){const t=(()=>{if(Array.isArray(e[0])){const[t,r]=e;return c(t,r)}return e[0]})(),r="string"==typeof t?t:n.formatAbiItem(t);return s.normalizeSignature(r)}function l(...e){const t=(()=>{if(Array.isArray(e[0])){const[t,r]=e;return c(t,r)}return e[0]})();return"string"!=typeof t&&"hash"in t&&t.hash?t.hash:a.keccak256(i.fromString(d(t)))}class f extends o.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${s.normalizeSignature(n.formatAbiItem(e.abiItem))}\`, and`,`\`${t.type}\` in \`${s.normalizeSignature(n.formatAbiItem(t.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}t.AmbiguityError=f;class p extends o.BaseError{constructor({name:e,data:t,type:r="item"}){super(`ABI ${r}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}t.NotFoundError=p;class m extends o.BaseError{constructor({data:e}){super(`Selector size is invalid. Expected 4 bytes. Received ${i.size(e)} bytes ("${e}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}t.InvalidSelectorSizeError=m},5072(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PROVIDER_ICON=t.isValidProvider=t.detectInjectedProviderInfo=void 0;var n=r(9723);Object.defineProperty(t,"detectInjectedProviderInfo",{enumerable:!0,get:function(){return n.detectInjectedProviderInfo}}),Object.defineProperty(t,"isValidProvider",{enumerable:!0,get:function(){return n.isValidProvider}}),Object.defineProperty(t,"DEFAULT_PROVIDER_ICON",{enumerable:!0,get:function(){return n.DEFAULT_PROVIDER_ICON}})},5082(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectBrowser=function(){var e=this;return a?Promise.resolve(a):o||(o=r(e,void 0,void 0,function(){var e,t;return n(this,function(r){switch(r.label){case 0:return e=function(){try{return void 0!==globalThis.navigator?globalThis.navigator.userAgent:""}catch(e){return""}}(),[4,i().catch(function(){return!1})];case 1:return t=r.sent(),a=t?"brave":function(e){return/Firefox\/\d+/i.test(e)?"firefox":/Edg\/\d+/i.test(e)?"edge":/OPR\/\d+/i.test(e)?"opera":/Safari\/\d+/i.test(e)&&!/Chrome\/\d+/i.test(e)?"safari":/Chrome\/\d+/i.test(e)?"chrome":"unknown"}(e),[2,a]}})}).finally(function(){o=null}))};var o=null,a=null;function i(){return r(this,void 0,void 0,function(){var e,t,r,o;return n(this,function(n){switch(n.label){case 0:if(!(e=void 0!==globalThis.navigator?globalThis.navigator:void 0))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(r=e.brave)||void 0===r?void 0:r.isBrave)?[4,e.brave.isBrave().catch(function(){return!1})]:[3,3];case 2:if(n.sent())return[2,!0];n.label=3;case 3:return[3,5];case 4:return n.sent(),[3,5];case 5:try{if(null==(t=null===(o=e.userAgentData)||void 0===o?void 0:o.brands)?void 0:t.some(function(e){return/Brave/i.test(e.brand)}))return[2,!0]}catch(e){}try{if(/Brave/i.test(e.userAgent))return[2,!0]}catch(e){}return[2,!1]}})})}},5091(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.testActions=function({mode:e}){return t=>{const r=t.extend(()=>({mode:e}));return{dropTransaction:e=>(0,n.dropTransaction)(r,e),dumpState:()=>(0,o.dumpState)(r),getAutomine:()=>(0,a.getAutomine)(r),getTxpoolContent:()=>(0,i.getTxpoolContent)(r),getTxpoolStatus:()=>(0,s.getTxpoolStatus)(r),impersonateAccount:e=>(0,c.impersonateAccount)(r,e),increaseTime:e=>(0,u.increaseTime)(r,e),inspectTxpool:()=>(0,d.inspectTxpool)(r),loadState:e=>(0,l.loadState)(r,e),mine:e=>(0,f.mine)(r,e),removeBlockTimestampInterval:()=>(0,p.removeBlockTimestampInterval)(r),reset:e=>(0,m.reset)(r,e),revert:e=>(0,b.revert)(r,e),sendUnsignedTransaction:e=>(0,h.sendUnsignedTransaction)(r,e),setAutomine:e=>(0,y.setAutomine)(r,e),setBalance:e=>(0,g.setBalance)(r,e),setBlockGasLimit:e=>(0,v.setBlockGasLimit)(r,e),setBlockTimestampInterval:e=>(0,E.setBlockTimestampInterval)(r,e),setCode:e=>(0,w.setCode)(r,e),setCoinbase:e=>(0,P.setCoinbase)(r,e),setIntervalMining:e=>(0,A.setIntervalMining)(r,e),setLoggingEnabled:e=>(0,x.setLoggingEnabled)(r,e),setMinGasPrice:e=>(0,I.setMinGasPrice)(r,e),setNextBlockBaseFeePerGas:e=>(0,S.setNextBlockBaseFeePerGas)(r,e),setNextBlockTimestamp:e=>(0,T.setNextBlockTimestamp)(r,e),setNonce:e=>(0,O.setNonce)(r,e),setRpcUrl:e=>(0,_.setRpcUrl)(r,e),setStorageAt:e=>(0,j.setStorageAt)(r,e),snapshot:()=>(0,C.snapshot)(r),stopImpersonatingAccount:e=>(0,B.stopImpersonatingAccount)(r,e)}}};const n=r(4535),o=r(4547),a=r(8992),i=r(9757),s=r(2260),c=r(858),u=r(4255),d=r(550),l=r(1030),f=r(3085),p=r(7680),m=r(2363),b=r(3188),h=r(2491),y=r(1188),g=r(7382),v=r(3171),E=r(6090),w=r(7705),P=r(3212),A=r(5297),x=r(2634),I=r(7572),S=r(9405),T=r(490),O=r(3009),_=r(2936),j=r(5474),C=r(3962),B=r(8351)},5106(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePrivyProperties=function(e){var t,r,n,o,a,i,s,c,u,d,l,f,p,m=e.linkedAccounts||[],b={privyDid:e.id,privyCreatedAt:e.createdAt};if((null===(t=e.email)||void 0===t?void 0:t.address)&&(b.email=e.email.address),(null===(r=e.apple)||void 0===r?void 0:r.email)&&(b.apple=e.apple.email),(null===(n=e.discord)||void 0===n?void 0:n.username)&&(b.discord=e.discord.username),(null===(o=e.farcaster)||void 0===o?void 0:o.username)&&(b.farcaster=e.farcaster.username),(null===(a=e.github)||void 0===a?void 0:a.username)&&(b.github=e.github.username),(null===(i=e.google)||void 0===i?void 0:i.email)&&(b.google=e.google.email),(null===(s=e.instagram)||void 0===s?void 0:s.username)&&(b.instagram=e.instagram.username),(null===(c=e.line)||void 0===c?void 0:c.email)&&(b.line=e.line.email),(null===(u=e.linkedin)||void 0===u?void 0:u.email)&&(b.linkedin=e.linkedin.email),(null===(d=e.spotify)||void 0===d?void 0:d.email)&&(b.spotify=e.spotify.email),(null===(l=e.telegram)||void 0===l?void 0:l.username)&&(b.telegram=e.telegram.username),(null===(f=e.tiktok)||void 0===f?void 0:f.username)&&(b.tiktok=e.tiktok.username),(null===(p=e.twitter)||void 0===p?void 0:p.username)&&(b.twitter=e.twitter.username),!b.email){var h=m.find(function(e){return"email"===e.type});(null==h?void 0:h.address)&&(b.email=h.address)}if(!b.apple){var y=m.find(function(e){return"apple_oauth"===e.type});(null==y?void 0:y.email)&&(b.apple=y.email)}if(!b.discord){var g=m.find(function(e){return"discord_oauth"===e.type});(null==g?void 0:g.username)&&(b.discord=g.username)}if(!b.farcaster){var v=m.find(function(e){return"farcaster"===e.type});(null==v?void 0:v.username)?b.farcaster=v.username:(null==v?void 0:v.displayName)&&(b.farcaster=v.displayName)}if(!b.github){var E=m.find(function(e){return"github_oauth"===e.type});(null==E?void 0:E.username)&&(b.github=E.username)}if(!b.google){var w=m.find(function(e){return"google_oauth"===e.type});(null==w?void 0:w.email)&&(b.google=w.email)}if(!b.instagram){var P=m.find(function(e){return"instagram_oauth"===e.type});(null==P?void 0:P.username)&&(b.instagram=P.username)}if(!b.line){var A=m.find(function(e){return"line"===e.type});(null==A?void 0:A.email)&&(b.line=A.email)}if(!b.linkedin){var x=m.find(function(e){return"linkedin_oauth"===e.type});(null==x?void 0:x.email)&&(b.linkedin=x.email)}if(!b.spotify){var I=m.find(function(e){return"spotify_oauth"===e.type});(null==I?void 0:I.email)&&(b.spotify=I.email)}if(!b.telegram){var S=m.find(function(e){return"telegram"===e.type});(null==S?void 0:S.username)?b.telegram=S.username:(null==S?void 0:S.telegramUserId)&&(b.telegram=S.telegramUserId)}if(!b.tiktok){var T=m.find(function(e){return"tiktok_oauth"===e.type});(null==T?void 0:T.username)&&(b.tiktok=T.username)}if(!b.twitter){var O=m.find(function(e){return"twitter_oauth"===e.type});(null==O?void 0:O.username)&&(b.twitter=O.username)}return b.email||(b.google?b.email=b.google:b.apple?b.email=b.apple:b.linkedin&&(b.email=b.linkedin)),{properties:b,wallets:m.filter(function(e){return"wallet"===e.type&&e.address}).map(function(e){return{address:e.address,walletClient:e.walletClientType||e.walletClient,chainType:e.chainType,isEmbedded:"privy"===e.walletClientType||"privy"===e.walletClient}})}}},5108(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionData=function(e){const{args:t}=e,{abi:r,functionName:i}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:(0,a.prepareEncodeFunctionData)(e),s=r[0],c=i,u="inputs"in s&&s.inputs?(0,o.encodeAbiParameters)(s.inputs,t??[]):void 0;return(0,n.concatHex)([c,u??"0x"])};const n=r(1028),o=r(3224),a=r(9765)},5110(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.clampNumber=t.toDateHourMinute=t.millisecondsToSecond=void 0,t.toSnakeCase=function(e,t){void 0===t&&(t=[]);var r=function(e){return Array.isArray(e)?e.map(r):null!==e&&"object"==typeof e?Object.keys(e).reduce(function(n,o){return n[t.includes(o)?o:o.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()]=t.includes(o)?e[o]:r(e[o]),n},{}):e};return r(e)},t.millisecondsToSecond=function(e){return Math.ceil(e/1e3)},t.toDateHourMinute=function(e){return e.getUTCFullYear()+"-"+("0"+(e.getUTCMonth()+1)).slice(-2)+"-"+("0"+e.getUTCDate()).slice(-2)+" "+("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)},t.clampNumber=function(e,t,r){return Math.min(Math.max(e,r),t)}},5126(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toBytes=function(e){return s(e,"Bytes")},t.toHex=function(e){return s(e,"Hex")},t.to=s,t.decodeRlpCursor=c,t.readLength=u,t.readList=d,t.from=l,t.fromBytes=function(e,t={}){const{as:r="Bytes"}=t;return l(e,{as:r})},t.fromHex=function(e,t={}){const{as:r="Hex"}=t;return l(e,{as:r})};const n=r(7223),o=r(6573),a=r(1465),i=r(896);function s(e,t){const r=t??("string"==typeof e?"Hex":"Bytes"),o=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new a.InvalidLengthError(e);return n.fromHex(e)}return e})();return c(i.create(o,{recursiveReadLimit:Number.POSITIVE_INFINITY}),r)}function c(e,t="Hex"){if(0===e.bytes.length)return"Hex"===t?a.fromBytes(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const n=u(e,r,128),o=e.readBytes(n);return"Hex"===t?a.fromBytes(o):o}return d(e,u(e,r,192),t)}function u(e,t,r){if(128===r&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new o.BaseError("Invalid RLP prefix")}function d(e,t,r){const n=e.position,o=[];for(;e.position-n<t;)o.push(c(e,r));return o}function l(e,t){const{as:r}=t,n=f(e),o=i.create(new Uint8Array(n.length));return n.encode(o),"Hex"===r?a.fromBytes(o.bytes):o.bytes}function f(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),r=p(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map(e=>f(e))):function(e){const t="string"==typeof e?n.fromHex(e):e,r=p(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function p(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new o.BaseError("Length is too large.")}},5131(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=t.md5=t.MD5=t.sha1=t.SHA1=void 0;const n=r(7734),o=r(11),a=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),i=new Uint32Array(80);class s extends n.HashMD{constructor(){super(64,20,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4]}get(){const{A:e,B:t,C:r,D:n,E:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)i[r]=e.getUint32(t,!1);for(let e=16;e<80;e++)i[e]=(0,o.rotl)(i[e-3]^i[e-8]^i[e-14]^i[e-16],1);let{A:r,B:a,C:s,D:c,E:u}=this;for(let e=0;e<80;e++){let t,d;e<20?(t=(0,n.Chi)(a,s,c),d=1518500249):e<40?(t=a^s^c,d=1859775393):e<60?(t=(0,n.Maj)(a,s,c),d=2400959708):(t=a^s^c,d=3395469782);const l=(0,o.rotl)(r,5)+t+u+d+i[e]|0;u=c,c=s,s=(0,o.rotl)(a,30),a=r,r=l}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,c=c+this.D|0,u=u+this.E|0,this.set(r,a,s,c,u)}roundClean(){(0,o.clean)(i)}destroy(){this.set(0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA1=s,t.sha1=(0,o.createHasher)(()=>new s);const c=Math.pow(2,32),u=Array.from({length:64},(e,t)=>Math.floor(c*Math.abs(Math.sin(t+1)))),d=a.slice(0,4),l=new Uint32Array(16);class f extends n.HashMD{constructor(){super(64,16,8,!0),this.A=0|d[0],this.B=0|d[1],this.C=0|d[2],this.D=0|d[3]}get(){const{A:e,B:t,C:r,D:n}=this;return[e,t,r,n]}set(e,t,r,n){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t,!0);let{A:r,B:a,C:i,D:s}=this;for(let e=0;e<64;e++){let t,c,d;e<16?(t=(0,n.Chi)(a,i,s),c=e,d=[7,12,17,22]):e<32?(t=(0,n.Chi)(s,a,i),c=(5*e+1)%16,d=[5,9,14,20]):e<48?(t=a^i^s,c=(3*e+5)%16,d=[4,11,16,23]):(t=i^(a|~s),c=7*e%16,d=[6,10,15,21]),t=t+r+u[e]+l[c],r=s,s=i,i=a,a+=(0,o.rotl)(t,d[e%4])}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,s=s+this.D|0,this.set(r,a,i,s)}roundClean(){(0,o.clean)(l)}destroy(){this.set(0,0,0,0),(0,o.clean)(this.buffer)}}t.MD5=f,t.md5=(0,o.createHasher)(()=>new f);const p=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),m=(()=>Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)))(),b=(()=>m.map(e=>(9*e+5)%16))(),h=(()=>{const e=[[m],[b]];for(let t=0;t<4;t++)for(let r of e)r.push(r[t].map(e=>p[e]));return e})(),y=(()=>h[0])(),g=(()=>h[1])(),v=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),E=y.map((e,t)=>e.map(e=>v[t][e])),w=g.map((e,t)=>e.map(e=>v[t][e])),P=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),A=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function x(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const I=new Uint32Array(16);class S extends n.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)I[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,a=0|this.h1,i=a,s=0|this.h2,c=s,u=0|this.h3,d=u,l=0|this.h4,f=l;for(let e=0;e<5;e++){const t=4-e,p=P[e],m=A[e],b=y[e],h=g[e],v=E[e],S=w[e];for(let t=0;t<16;t++){const n=(0,o.rotl)(r+x(e,a,s,u)+I[b[t]]+p,v[t])+l|0;r=l,l=u,u=0|(0,o.rotl)(s,10),s=a,a=n}for(let e=0;e<16;e++){const r=(0,o.rotl)(n+x(t,i,c,d)+I[h[e]]+m,S[e])+f|0;n=f,f=d,d=0|(0,o.rotl)(c,10),c=i,i=r}}this.set(this.h1+s+d|0,this.h2+u+f|0,this.h3+l+n|0,this.h4+r+i|0,this.h0+a+c|0)}roundClean(){(0,o.clean)(I)}destroy(){this.destroyed=!0,(0,o.clean)(this.buffer),this.set(0,0,0,0,0)}}t.RIPEMD160=S,t.ripemd160=(0,o.createHasher)(()=>new S)},5140(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=function(e){return(0,n.isHex)(e)&&32===(0,o.size)(e)};const n=r(6611),o=r(4025)},5165(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.zeroAddress=t.ethAddress=t.entryPoint08Address=t.entryPoint07Address=t.entryPoint06Address=void 0,t.entryPoint06Address="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",t.entryPoint07Address="0x0000000071727De22E5E9d8BAf0edAc6f37da032",t.entryPoint08Address="0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",t.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",t.zeroAddress="0x0000000000000000000000000000000000000000"},5207(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.1.0"},5219(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createEventFilter=async function(e,{address:t,args:r,event:i,events:s,fromBlock:c,strict:u,toBlock:d}={}){const l=s??(i?[i]:void 0),f=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"});let p=[];if(l){const e=l.flatMap(e=>(0,n.encodeEventTopics)({abi:[e],eventName:e.name,args:r}));p=[e],i&&(p=p[0])}const m=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"==typeof d?(0,o.numberToHex)(d):d,...p.length?{topics:p}:{}}]});return{abi:l,args:r,eventName:i?i.name:void 0,fromBlock:c,id:m,request:f(m),strict:Boolean(u),toBlock:d,type:"event"}};const n=r(574),o=r(6669),a=r(1691)},5231(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toBlobSidecars=function(e){const{data:t,kzg:r,to:i}=e,s=e.blobs??(0,a.toBlobs)({data:t,to:i}),c=e.commitments??(0,n.blobsToCommitments)({blobs:s,kzg:r,to:i}),u=e.proofs??(0,o.blobsToProofs)({blobs:s,commitments:c,kzg:r,to:i}),d=[];for(let e=0;e<s.length;e++)d.push({blob:s[e],commitment:c[e],proof:u[e]});return d};const n=r(4264),o=r(5295),a=r(7330)},5256(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItem=function(e){return"function"===e.type?`function ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,n.formatAbiParameters)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,n.formatAbiParameters)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,n.formatAbiParameters)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?"fallback() external"+("payable"===e.stateMutability?" payable":""):"receive() external payable"};const n=r(8311)},5277(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiItem=function(e){let t;if("string"==typeof e)t=(0,i.parseSignature)(e);else{const r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!(0,o.isStructSignature)(n)){t=(0,i.parseSignature)(n,r);break}}}if(!t)throw new n.InvalidAbiItemError({signature:e});return t};const n=r(8768),o=r(1839),a=r(6012),i=r(9263)},5295(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.blobsToProofs=function(e){const{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),a="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.hexToBytes)(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,n.hexToBytes)(e)):e.commitments,s=[];for(let e=0;e<a.length;e++){const r=a[e],n=i[e];s.push(Uint8Array.from(t.computeBlobKzgProof(r,n)))}return"bytes"===r?s:s.map(e=>(0,o.bytesToHex)(e))};const n=r(1699),o=r(6669)},5297(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setIntervalMining=async function(e,{interval:t}){const r="hardhat"===e.mode?1e3*t:t;await e.request({method:"evm_setIntervalMining",params:[r]})}},5313(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertSize=function(e,t){if(n.size(e)>t)throw new n.SizeOverflowError({givenSize:n.size(e),maxSize:t})},t.assertStartOffset=function(e,t){if("number"==typeof t&&t>0&&t>n.size(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:n.size(e)})},t.assertEndOffset=function(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.size(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:n.size(e)})},t.pad=function(e,t={}){const{dir:r,size:o=32}=t;if(0===o)return e;const a=e.replace("0x","");if(a.length>2*o)throw new n.SizeExceedsPaddingSizeError({size:Math.ceil(a.length/2),targetSize:o,type:"Hex"});return`0x${a["right"===r?"padEnd":"padStart"](2*o,"0")}`},t.trim=function(e,t={}){const{dir:r="left"}=t;let n=e.replace("0x",""),o=0;for(let e=0;e<n.length-1&&"0"===n["left"===r?e:n.length-e-1].toString();e++)o++;return n="left"===r?n.slice(o):n.slice(0,n.length-o),"0"===n?"0x":"right"===r&&n.length%2==1?`0x${n}0`:`0x${n}`};const n=r(1465)},5339(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=function(e){const t=(0,o.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,n.checksumAddress)(`0x${t}`)};const n=r(9868),o=r(1725)},5391(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=v;const n=r(3842),o=r(11),a=BigInt(0),i=BigInt(1),s=BigInt(2),c=BigInt(7),u=BigInt(256),d=BigInt(113),l=[],f=[],p=[];for(let e=0,t=i,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],l.push(2*(5*n+r)),f.push((e+1)*(e+2)/2%64);let o=a;for(let e=0;e<7;e++)t=(t<<i^(t>>c)*d)%u,t&s&&(o^=i<<(i<<BigInt(e))-i);p.push(o)}const m=(0,n.split)(p,!0),b=m[0],h=m[1],y=(e,t,r)=>r>32?(0,n.rotlBH)(e,t,r):(0,n.rotlSH)(e,t,r),g=(e,t,r)=>r>32?(0,n.rotlBL)(e,t,r):(0,n.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,a=r[o],i=r[o+1],s=y(a,i,1)^r[n],c=g(a,i,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=f[r],a=y(t,o,n),i=g(t,o,n),s=l[r];t=e[s],o=e[s+1],e[s]=a,e[s+1]=i}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=b[n],e[1]^=h[n]}(0,o.clean)(r)}class E extends o.Hash{constructor(e,t,r,n=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=a,(0,o.anumber)(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,o.swap32IfBE)(this.state32),v(this.state32,this.rounds),(0,o.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,o.aexists)(this),e=(0,o.toBytes)(e),(0,o.abytes)(e);const{blockLen:t,state:r}=this,n=e.length;for(let o=0;o<n;){const a=Math.min(t-this.pos,n-o);for(let t=0;t<a;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,o.aexists)(this,!1),(0,o.abytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,o.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,o.aoutput)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,o.clean)(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:a}=this;return e||(e=new E(t,r,n,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=a,e.destroyed=this.destroyed,e}}t.Keccak=E;const w=(e,t,r)=>(0,o.createHasher)(()=>new E(t,e,r));t.sha3_224=w(6,144,28),t.sha3_256=w(6,136,32),t.sha3_384=w(6,104,48),t.sha3_512=w(6,72,64),t.keccak_224=w(1,144,28),t.keccak_256=w(1,136,32),t.keccak_384=w(1,104,48),t.keccak_512=w(1,72,64);const P=(e,t,r)=>(0,o.createXOFer)((n={})=>new E(t,e,void 0===n.dkLen?r:n.dkLen,!0));t.shake128=P(31,168,16),t.shake256=P(31,136,32)},5402(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.generateAnonymousId=void 0,t.getCookieDomain=a;var n=r(8930),o=r(7934);function a(e){if(void 0===e&&(e=window.location.hostname),e.includes("localhost")||/^\d{1,3}(\.\d{1,3}){3}$/.test(e))return"";var t=e.split(".");return t.includes("www")&&t.splice(t.indexOf("www"),1),".".concat(t.join("."))}t.generateAnonymousId=function(e){var t=(0,o.cookie)().get(e);if(t&&"string"==typeof t)return t;var r=(0,n.generateNativeUUID)();return(0,o.cookie)().set(e,r,{maxAge:Date.now()+31536e6,domain:a(),path:"/"}),r}},5417(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.call=async function(e,t){const{account:I=e.account,authorizationList:S,batch:T=Boolean(e.batch?.multicall),blockNumber:O,blockTag:_=e.experimental_blockTag??"latest",accessList:j,blobs:C,blockOverrides:B,code:M,data:k,factory:R,factoryData:N,gas:F,gasPrice:U,maxFeePerBlobGas:H,maxFeePerGas:D,maxPriorityFeePerGas:L,nonce:z,to:$,value:G,stateOverride:q,...V}=t,W=I?(0,a.parseAccount)(I):void 0;if(M&&(R||N))throw new u.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(M&&$)throw new u.BaseError("Cannot provide both `code` & `to` as parameters.");const K=M&&k,Z=R&&N&&$&&k,Y=K||Z,J=K?A({code:M,data:k}):Z?function(e){const{data:t,factory:r,factoryData:o,to:a}=e;return(0,p.encodeDeployData)({abi:(0,n.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:c.deploylessCallViaFactoryBytecode,args:[a,t,r,o]})}({data:k,factory:R,factoryData:N,to:$}):k;try{(0,P.assertRequest)(t);const r=("bigint"==typeof O?(0,h.numberToHex)(O):void 0)||_,n=B?o.toRpc(B):void 0,a=(0,w.serializeStateOverride)(q),u=e.chain?.formatters?.transactionRequest?.format,p=(u||v.formatTransactionRequest)({...(0,g.extract)(V,{format:u}),accessList:j,account:W,authorizationList:S,blobs:C,data:J,gas:F,gasPrice:U,maxFeePerBlobGas:H,maxFeePerGas:D,maxPriorityFeePerGas:L,nonce:z,to:Y?void 0:$,value:G},"call");if(T&&function({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(s.aggregate3Signature)||!r||Object.values(n).filter(e=>void 0!==e).length>0)}({request:p})&&!a&&!n)try{return await async function(e,t){const{batchSize:r=1024,deployless:n=!1,wait:o=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:s=e.experimental_blockTag??"latest",data:u,to:p}=t,y=(()=>{if(n)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return(0,b.getChainContractAddress)({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new d.ClientChainNotConfiguredError})(),g=("bigint"==typeof a?(0,h.numberToHex)(a):void 0)||s,{schedule:v}=(0,E.createBatchScheduler)({id:`${e.uid}.${g}`,wait:o,shouldSplitBatch(e){const t=e.reduce((e,{data:t})=>e+(t.length-2),0);return t>2*r},fn:async t=>{const r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,m.encodeFunctionData)({abi:i.multicall3Abi,args:[r],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{...null===y?{data:A({code:c.multicall3Bytecode,data:n})}:{to:y,data:n}},g]});return(0,f.decodeFunctionResult)({abi:i.multicall3Abi,args:[r],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:w,success:P}]=await v({data:u,to:p});if(!P)throw new l.RawContractError({data:w});return"0x"===w?{data:void 0}:{data:w}}(e,{...p,blockNumber:O,blockTag:_})}catch(e){if(!(e instanceof d.ClientChainNotConfiguredError||e instanceof d.ChainDoesNotSupportContract))throw e}const y=(()=>{const e=[p,r];return a&&n?[...e,a,n]:a?[...e,a]:n?[...e,{},n]:e})(),x=await e.request({method:"eth_call",params:y});return"0x"===x?{data:void 0}:{data:x}}catch(n){const o=x(n),{offchainLookup:a,offchainLookupSignature:i}=await Promise.resolve().then(()=>r(2722));if(!1!==e.ccipRead&&o?.slice(0,10)===i&&$)return{data:await a(e,{data:o,to:$})};if(Y&&"0x101bb98d"===o?.slice(0,10))throw new l.CounterfactualDeploymentFailedError({factory:R});throw(0,y.getCallError)(n,{...t,account:W,chain:e.chain})}},t.getRevertErrorData=x;const n=r(3863),o=r(9420),a=r(9546),i=r(138),s=r(8527),c=r(4442),u=r(1682),d=r(2078),l=r(3585),f=r(233),p=r(8851),m=r(5108),b=r(9858),h=r(6669),y=r(9767),g=r(4384),v=r(2996),E=r(2118),w=r(8916),P=r(8901);function A(e){const{code:t,data:r}=e;return(0,p.encodeDeployData)({abi:(0,n.parseAbi)(["constructor(bytes, bytes)"]),bytecode:c.deploylessCallViaBytecodeBytecode,args:[t,r]})}function x(e){if(!(e instanceof u.BaseError))return;const t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}},5441(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.checksum=void 0,t.clear=function(){for(const e of Object.values(n))e.clear()};const n={checksum:new(r(3393).LruMap)(8192)};t.checksum=n.checksum},5449(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.addChain=async function(e,{chain:t}){const{id:r,name:o,nativeCurrency:a,rpcUrls:i,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,n.numberToHex)(r),chainName:o,nativeCurrency:a,rpcUrls:i.default.http,blockExplorerUrls:s?Object.values(s).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})};const n=r(6669)},5474(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setStorageAt=async function(e,{address:t,index:r,value:o}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,"number"==typeof r?(0,n.numberToHex)(r):r,o]})};const n=r(6669)},5490(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAccessList=function(e){if(!e||0===e.length)return[];const t=[];for(let r=0;r<e.length;r++){const{address:i,storageKeys:s}=e[r];for(let e=0;e<s.length;e++)if(s[e].length-2!=64)throw new o.InvalidStorageKeySizeError({storageKey:s[e]});if(!(0,a.isAddress)(i,{strict:!1}))throw new n.InvalidAddressError({address:i});t.push([i,s])}return t};const n=r(1611),o=r(979),a=r(2018)},5494(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.useFormo=t.FormoAnalyticsProvider=t.FormoAnalyticsContext=void 0;var i=r(6070),s=r(758),c=r(7039),u=r(7934),d=r(6973),l={chain:function(){return Promise.resolve()},page:function(){return Promise.resolve()},reset:function(){},cleanup:function(){},detect:function(){return Promise.resolve()},connect:function(){return Promise.resolve()},disconnect:function(){return Promise.resolve()},signature:function(){return Promise.resolve()},transaction:function(){return Promise.resolve()},identify:function(){return Promise.resolve()},track:function(){return Promise.resolve()},optOutTracking:function(){},optInTracking:function(){},hasOptedOutTracking:function(){return!1}};t.FormoAnalyticsContext=(0,s.createContext)(l),t.FormoAnalyticsProvider=function(e){var t=e.writeKey,r=e.disabled,o=void 0!==r&&r,a=e.children;return t?o?(d.logger.warn("FormoAnalytics is disabled"),(0,i.jsx)(i.Fragment,{children:a})):(0,i.jsx)(f,n({},e)):(d.logger.error("FormoAnalyticsProvider: No Write Key provided"),(0,i.jsx)(i.Fragment,{children:a}))};var f=function(e){var r=e.writeKey,n=e.options,f=e.children,p=(0,s.useState)(l),m=p[0],b=p[1],h=(0,s.useRef)(l);(0,u.initStorageManager)(r);var y=(0,s.useMemo)(function(){if(!n)return"undefined";var e={tracking:n.tracking,autocapture:n.autocapture,apiHost:n.apiHost,flushAt:n.flushAt,flushInterval:n.flushInterval,retryCount:n.retryCount,maxQueueSize:n.maxQueueSize,logger:n.logger,referral:n.referral,hasProvider:!!n.provider,hasWagmi:!!n.wagmi,hasReady:!!n.ready};try{return JSON.stringify(e)}catch(e){return d.logger.warn("Failed to serialize options, using timestamp",e),Date.now().toString()}},[n]);return(0,s.useEffect)(function(){var e=!1;return o(void 0,void 0,void 0,function(){var t,o;return a(this,function(a){switch(a.label){case 0:h.current&&h.current!==l&&(d.logger.log("Cleaning up existing FormoAnalytics SDK instance before re-initialization"),h.current.cleanup(),h.current=l,b(l)),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,c.FormoAnalytics.init(r,n)];case 2:return t=a.sent(),e?(d.logger.log("Component unmounted during initialization, cleaning up SDK"),t.cleanup()):(b(t),h.current=t,d.logger.log("Successfully initialized FormoAnalytics SDK")),[3,4];case 3:return o=a.sent(),e||d.logger.error("Failed to initialize FormoAnalytics SDK",o),[3,4];case 4:return[2]}})}),function(){e=!0,h.current&&h.current!==l&&(d.logger.log("Cleaning up FormoAnalytics SDK instance"),h.current.cleanup(),h.current=l)}},[r,y]),(0,i.jsx)(t.FormoAnalyticsContext.Provider,{value:m,children:f})};t.useFormo=function(){var e=(0,s.useContext)(t.FormoAnalyticsContext);return e||d.logger.warn("useFormo called without a valid context"),e}},5496(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCode=async function(e,{address:t,blockNumber:r,blockTag:o="latest"}){const a=void 0!==r?(0,n.numberToHex)(r):void 0,i=await e.request({method:"eth_getCode",params:[t,a||o]},{dedupe:Boolean(a)});return"0x"===i?void 0:i};const n=r(6669)},5533(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.showCallsStatus=async function(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}},5561(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=function(e){return!!e&&"object"==typeof e&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name}},5599(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.pad=function(e,{dir:t,size:r=32}={}){return"string"==typeof e?o(e,{dir:t,size:r}):a(e,{dir:t,size:r})},t.padHex=o,t.padBytes=a;const n=r(1459);function o(e,{dir:t,size:r=32}={}){if(null===r)return e;const o=e.replace("0x","");if(o.length>2*r)throw new n.SizeExceedsPaddingSizeError({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*r,"0")}`}function a(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.SizeExceedsPaddingSizeError({size:e.length,targetSize:r,type:"bytes"});const o=new Uint8Array(r);for(let n=0;n<r;n++){const a="right"===t;o[a?n:r-n-1]=e[a?n:e.length-n-1]}return o}},5628(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(5391),o=r(7393);t.keccak224=(0,o.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,o.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,o.wrapHash)(n.keccak_384),t.keccak512=(0,o.wrapHash)(n.keccak_512)},5643(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePrivyProperties=void 0;var n=r(5106);Object.defineProperty(t,"parsePrivyProperties",{enumerable:!0,get:function(){return n.parsePrivyProperties}})},5653(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;const n=r(8064);class o extends n.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=o;class a extends n.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=a;class i extends n.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=i;class s extends n.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}t.SolidityProtectedKeywordError=s;class c extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}t.InvalidModifierError=c;class u extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}t.InvalidFunctionModifierError=u;class d extends n.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=d},5725(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockNumberCache=function(e){return(0,n.getCache)(o(e))},t.getBlockNumber=async function(e,{cacheTime:t=e.cacheTime}={}){const r=await(0,n.withCache)(()=>e.request({method:"eth_blockNumber"}),{cacheKey:o(e.uid),cacheTime:t});return BigInt(r)};const n=r(1609),o=e=>`blockNumber.${e}`},5746(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchPendingTransactions=function(e,{batch:t=!0,onError:r,onTransactions:d,poll:l,pollingInterval:f=e.pollingInterval}){return(void 0!==l?l:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type)?(()=>{const l=(0,i.stringify)(["watchPendingTransactions",e.uid,t,f]);return(0,o.observe)(l,{onTransactions:d,onError:r},r=>{let o;const i=(0,a.poll)(async()=>{try{if(!o)try{return void(o=await(0,n.getAction)(e,s.createPendingTransactionFilter,"createPendingTransactionFilter")({}))}catch(e){throw i(),e}const a=await(0,n.getAction)(e,c.getFilterChanges,"getFilterChanges")({filter:o});if(0===a.length)return;if(t)r.onTransactions(a);else for(const e of a)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:f});return async()=>{o&&await(0,n.getAction)(e,u.uninstallFilter,"uninstallFilter")({filter:o}),i()}})})():(()=>{let t=!0,n=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const r=e.result;d([r])},onError(e){r?.(e)}});n=o,t||n()}catch(e){r?.(e)}})(),()=>n()})()};const n=r(3115),o=r(9097),a=r(2464),i=r(8352),s=r(7178),c=r(4602),u=r(1841)},5777(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.narrow=function(e){return e}},5790(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackTransactionErrorMagicIdentifier=t.fallbackMagicIdentifier=void 0,t.sendCalls=async function(e,r){const{account:f=e.account,capabilities:p,chain:m=e.chain,experimental_fallback:b,experimental_fallbackDelay:h=32,forceAtomic:y=!1,id:g,version:v="2.0.0"}=r,E=f?(0,n.parseAccount)(f):null,w=r.calls.map(e=>{const t=e,r=t.abi?(0,i.encodeFunctionData)({abi:t.abi,functionName:t.functionName,args:t.args}):t.data;return{data:t.dataSuffix&&r?(0,s.concat)([r,t.dataSuffix]):r,to:t.to,value:t.value?(0,u.numberToHex)(t.value):void 0}});try{const t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:y,calls:w,capabilities:p,chainId:(0,u.numberToHex)(m.id),from:E?.address,id:g,version:v}]},{retryCount:0});return"string"==typeof t?{id:t}:t}catch(n){const i=n;if(b&&("MethodNotFoundRpcError"===i.name||"MethodNotSupportedRpcError"===i.name||"UnknownRpcError"===i.name||i.details.toLowerCase().includes("does not exist / is not available")||i.details.toLowerCase().includes("missing or invalid. request()")||i.details.toLowerCase().includes("did not match any variant of untagged enum")||i.details.toLowerCase().includes("account upgraded to unsupported contract")||i.details.toLowerCase().includes("eip-7702 not supported")||i.details.toLowerCase().includes("unsupported wc_ method")||i.details.toLowerCase().includes("feature toggled misconfigured")||i.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(p&&Object.values(p).some(e=>!e.optional)){const e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new a.UnsupportedNonOptionalCapabilityError(new o.BaseError(e,{details:e}))}if(y&&w.length>1){const e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new a.AtomicityNotSupportedError(new o.BaseError(e,{details:e}))}const r=[];for(const t of w){const n=(0,l.sendTransaction)(e,{account:E,chain:m,data:t.data,to:t.to,value:t.value?(0,c.hexToBigInt)(t.value):void 0});r.push(n),h>0&&await new Promise(e=>setTimeout(e,h))}const n=await Promise.allSettled(r);if(n.every(e=>"rejected"===e.status))throw n[0].reason;const i=n.map(e=>"fulfilled"===e.status?e.value:t.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...i,(0,u.numberToHex)(m.id,{size:32}),t.fallbackMagicIdentifier])}}throw(0,d.getTransactionError)(n,{...r,account:E,chain:r.chain})}};const n=r(9546),o=r(1682),a=r(2564),i=r(5108),s=r(1028),c=r(4130),u=r(6669),d=r(1279),l=r(9939);t.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",t.fallbackTransactionErrorMagicIdentifier=(0,u.numberToHex)(0,{size:32})},5816(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.1.1"},5871(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.containsNodeError=function(e){return e instanceof i.TransactionRejectedRpcError||e instanceof i.InvalidInputRpcError||e instanceof a.RpcRequestError&&e.code===o.ExecutionRevertedError.code},t.getNodeError=function(e,t){const r=(e.details||"").toLowerCase(),a=e instanceof n.BaseError?e.walk(e=>e?.code===o.ExecutionRevertedError.code):e;return a instanceof n.BaseError?new o.ExecutionRevertedError({cause:e,message:a.details}):o.ExecutionRevertedError.nodeMessage.test(r)?new o.ExecutionRevertedError({cause:e,message:e.details}):o.FeeCapTooHighError.nodeMessage.test(r)?new o.FeeCapTooHighError({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.FeeCapTooLowError.nodeMessage.test(r)?new o.FeeCapTooLowError({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.NonceTooHighError.nodeMessage.test(r)?new o.NonceTooHighError({cause:e,nonce:t?.nonce}):o.NonceTooLowError.nodeMessage.test(r)?new o.NonceTooLowError({cause:e,nonce:t?.nonce}):o.NonceMaxValueError.nodeMessage.test(r)?new o.NonceMaxValueError({cause:e,nonce:t?.nonce}):o.InsufficientFundsError.nodeMessage.test(r)?new o.InsufficientFundsError({cause:e}):o.IntrinsicGasTooHighError.nodeMessage.test(r)?new o.IntrinsicGasTooHighError({cause:e,gas:t?.gas}):o.IntrinsicGasTooLowError.nodeMessage.test(r)?new o.IntrinsicGasTooLowError({cause:e,gas:t?.gas}):o.TransactionTypeNotSupportedError.nodeMessage.test(r)?new o.TransactionTypeNotSupportedError({cause:e}):o.TipAboveFeeCapError.nodeMessage.test(r)?new o.TipAboveFeeCapError({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new o.UnknownNodeError({cause:e})};const n=r(1682),o=r(6687),a=r(3318),i=r(2564)},5888(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifySiweMessage=async function(e,t){const{address:r,domain:s,message:c,nonce:u,scheme:d,signature:l,time:f=new Date,...p}=t,m=(0,o.parseSiweMessage)(c);if(!m.address)return!1;if(!(0,a.validateSiweMessage)({address:r,domain:s,message:m,nonce:u,scheme:d,time:f}))return!1;const b=(0,n.hashMessage)(c);return(0,i.verifyHash)(e,{address:m.address,hash:b,signature:l,...p})};const n=r(7399),o=r(1418),a=r(8911),i=r(5968)},5913(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.simulateBlocks=async function(e,t){const{blockNumber:r,blockTag:v=e.experimental_blockTag??"latest",blocks:E,returnFullTransactions:w,traceTransfers:P,validation:A}=t;try{const t=[];for(const e of E){const r=e.blockOverrides?n.toRpc(e.blockOverrides):void 0,a=e.calls.map(e=>{const t=e,r=t.account?(0,o.parseAccount)(t.account):void 0,n=t.abi?(0,u.encodeFunctionData)(t):t.data,a={...t,account:r,data:t.dataSuffix?(0,d.concat)([n||"0x",t.dataSuffix]):n,from:t.from??r?.address};return(0,g.assertRequest)(a),(0,h.formatTransactionRequest)(a)}),i=e.stateOverrides?(0,y.serializeStateOverride)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:a,stateOverrides:i})}const s=("bigint"==typeof r?(0,l.numberToHex)(r):void 0)||v;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:w,traceTransfers:P,validation:A},s]})).map((e,t)=>({...(0,m.formatBlock)(e),calls:e.calls.map((e,r)=>{const{abi:n,args:o,functionName:s,to:u}=E[t].calls[r],d=e.error?.data??e.returnData,l=BigInt(e.gasUsed),p=e.logs?.map(e=>(0,b.formatLog)(e)),m="0x1"===e.status?"success":"failure",h=n&&"success"===m&&"0x"!==d?(0,c.decodeFunctionResult)({abi:n,data:d,functionName:s}):null,y=(()=>{if("success"===m)return;let t;return"0x"===e.error?.data?t=new a.AbiDecodingZeroDataError:e.error&&(t=new i.RawContractError(e.error)),t?(0,f.getContractError)(t,{abi:n??[],address:u??"0x",args:o,functionName:s??"<unknown>"}):void 0})();return{data:d,gasUsed:l,logs:p,status:m,..."success"===m?{result:h}:{error:y}}})}))}catch(e){const t=e,r=(0,p.getNodeError)(t,{});if(r instanceof s.UnknownNodeError)throw t;throw r}};const n=r(9420),o=r(9546),a=r(9797),i=r(3585),s=r(6687),c=r(233),u=r(5108),d=r(1028),l=r(6669),f=r(2505),p=r(5871),m=r(3776),b=r(9475),h=r(2996),y=r(8916),g=r(8901)},5968(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=async function(e,t){const{address:r,hash:f,erc6492VerifierAddress:p=t.universalSignatureVerifierAddress??e.chain?.contracts?.erc6492Verifier?.address,multicallAddress:w=t.multicallAddress??e.chain?.contracts?.multicall3?.address}=t,P=(()=>{const e=t.signature;return(0,m.isHex)(e)?e:"object"==typeof e&&"r"in e&&"s"in e?(0,v.serializeSignature)(e):(0,h.bytesToHex)(e)})();try{return o.SignatureErc8010.validate(P)?await A(e,{...t,multicallAddress:w,signature:P}):await async function(e,t){const{address:r,factory:o,factoryData:d,hash:l,signature:f,verifierAddress:p,...m}=t,h=await(async()=>o||d?n.SignatureErc6492.validate(f)?f:n.SignatureErc6492.wrap({data:d,signature:f,to:o}):f)(),g=p?{to:p,data:(0,u.encodeFunctionData)({abi:a.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[r,l,h]}),...m}:{data:(0,c.encodeDeployData)({abi:a.erc6492SignatureValidatorAbi,args:[r,l,h],bytecode:i.erc6492SignatureValidatorByteCode}),...m},{data:v}=await(0,y.getAction)(e,E.call,"call")(g).catch(e=>{if(e instanceof s.CallExecutionError)throw new I;throw e});if((0,b.hexToBool)(v??"0x0"))return!0;throw new I}(e,{...t,verifierAddress:p,signature:P})}catch(e){try{if((0,l.isAddressEqual)((0,d.getAddress)(r),await(0,g.recoverAddress)({hash:f,signature:P})))return!0}catch{}if(e instanceof I)return!1;throw e}},t.verifyErc8010=A,t.verifyErc1271=x;const n=r(888),o=r(2828),a=r(138),i=r(4442),s=r(3585),c=r(8851),u=r(5108),d=r(9868),l=r(7624),f=r(6437),p=r(1028),m=r(6611),b=r(4130),h=r(6669),y=r(3115),g=r(1154),v=r(4458),E=r(5417),w=r(5496),P=r(1855);async function A(e,t){const{address:r,blockNumber:n,blockTag:s,hash:c,multicallAddress:d}=t,{authorization:l,data:m,signature:b,to:g}=o.SignatureErc8010.unwrap(t.signature);if(await(0,w.getCode)(e,{address:r,blockNumber:n,blockTag:s})===(0,p.concatHex)(["0xef0100",l.address]))return await x(e,{address:r,blockNumber:n,blockTag:s,hash:c,signature:b});const v={address:l.address,chainId:Number(l.chainId),nonce:Number(l.nonce),r:(0,h.numberToHex)(l.r,{size:32}),s:(0,h.numberToHex)(l.s,{size:32}),yParity:l.yParity};if(!await(0,f.verifyAuthorization)({address:r,authorization:v}))throw new I;const E=await(0,y.getAction)(e,P.readContract,"readContract")({...d?{address:d}:{code:i.multicall3Bytecode},authorizationList:[v],abi:a.multicall3Abi,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...m?[{allowFailure:!0,target:g??r,callData:m}]:[],{allowFailure:!0,target:r,callData:(0,u.encodeFunctionData)({abi:a.erc1271Abi,functionName:"isValidSignature",args:[c,b]})}]]}),A=E[E.length-1]?.returnData;if(A?.startsWith("0x1626ba7e"))return!0;throw new I}async function x(e,t){const{address:r,blockNumber:n,blockTag:o,hash:i,signature:c}=t;if((await(0,y.getAction)(e,P.readContract,"readContract")({address:r,abi:a.erc1271Abi,args:[i,c],blockNumber:n,blockTag:o,functionName:"isValidSignature"}).catch(e=>{if(e instanceof s.ContractFunctionExecutionError)throw new I;throw e})).startsWith("0x1626ba7e"))return!0;throw new I}class I extends Error{}},6012(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=function(e){const t={},r=e.length;for(let n=0;n<r;n++){const r=e[n];if(!(0,c.isStructSignature)(r))continue;const o=(0,c.execStructSignature)(r);if(!o)throw new i.InvalidSignatureError({signature:r,type:"struct"});const a=o.properties.split(";"),s=[],d=a.length;for(let e=0;e<d;e++){const t=a[e].trim();if(!t)continue;const r=(0,u.parseAbiParameter)(t,{type:"struct"});s.push(r)}if(!s.length)throw new i.InvalidStructSignatureError({signature:r});t[o.name]=s}const n={},o=Object.entries(t),a=o.length;for(let e=0;e<a;e++){const[r,a]=o[e];n[r]=l(a,t)}return n};const n=r(4027),o=r(8768),a=r(8144),i=r(259),s=r(848),c=r(1839),u=r(9263),d=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function l(e,t,r=new Set){const i=[],c=e.length;for(let f=0;f<c;f++){const c=e[f];if(n.isTupleRegex.test(c.type))i.push(c);else{const e=(0,n.execTyped)(d,c.type);if(!e?.type)throw new a.InvalidAbiTypeParameterError({abiParameter:c});const{array:f,type:p}=e;if(p in t){if(r.has(p))throw new s.CircularReferenceError({type:p});i.push({...c,type:`tuple${f??""}`,components:l(t[p]??[],t,new Set([...r,p]))})}else{if(!(0,u.isSolidityType)(p))throw new o.UnknownTypeError({type:p});i.push(c)}}}return i}},6057(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createContractEventFilter=async function(e,t){const{address:r,abi:i,args:s,eventName:c,fromBlock:u,strict:d,toBlock:l}=t,f=(0,a.createFilterRequestScope)(e,{method:"eth_newFilter"}),p=c?(0,n.encodeEventTopics)({abi:i,args:s,eventName:c}):void 0,m=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof u?(0,o.numberToHex)(u):u,toBlock:"bigint"==typeof l?(0,o.numberToHex)(l):l,topics:p}]});return{abi:i,args:s,eventName:c,id:m,request:f(m),strict:Boolean(d),type:"event"}};const n=r(574),o=r(6669),a=r(1691)},6063(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=function(e,t="wei"){return(0,o.parseUnits)(e,n.etherUnits[t])};const n=r(9427),o=r(7916)},6070(e,t,r){e.exports=r(7462)},6090(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTimestampInterval=async function(e,{interval:t}){const r="hardhat"===e.mode?1e3*t:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[r]})}},6091(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toSignatureHash=function(e){return(0,n.hashSignature)((0,o.toSignature)(e))};const n=r(3716),o=r(4827)},6093(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.simulateContract=async function(e,t){const{abi:r,address:u,args:d,dataSuffix:l,functionName:f,...p}=t,m=p.account?(0,n.parseAccount)(p.account):e.account,b=(0,a.encodeFunctionData)({abi:r,args:d,functionName:f});try{const{data:n}=await(0,s.getAction)(e,c.call,"call")({batch:!1,data:`${b}${l?l.replace("0x",""):""}`,to:u,...p,account:m});return{result:(0,o.decodeFunctionResult)({abi:r,args:d,functionName:f,data:n||"0x"}),request:{abi:r.filter(e=>"name"in e&&e.name===t.functionName),address:u,args:d,dataSuffix:l,functionName:f,...p,account:m}}}catch(e){throw(0,i.getContractError)(e,{abi:r,address:u,args:d,docsPath:"/docs/contract/simulateContract",functionName:f,sender:m?.address})}};const n=r(9546),o=r(233),a=r(5108),i=r(2505),s=r(3115),c=r(5417)},6129(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeErrorResult=function(e){const{abi:t,data:r}=e,u=(0,a.slice)(r,0,4);if("0x"===u)throw new o.AbiDecodingZeroDataError;const d=[...t||[],n.solidityError,n.solidityPanic].find(e=>"error"===e.type&&u===(0,i.toFunctionSelector)((0,c.formatAbiItem)(e)));if(!d)throw new o.AbiErrorSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:d,args:"inputs"in d&&d.inputs&&d.inputs.length>0?(0,s.decodeAbiParameters)(d.inputs,(0,a.slice)(r,4)):void 0,errorName:d.name}};const n=r(3792),o=r(9797),a=r(1972),i=r(364),s=r(8448),c=r(1508)},6185(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContract=function({abi:e,address:t,client:r}){const p=r,[m,b]=p?"public"in p&&"wallet"in p?[p.public,p.wallet]:"public"in p?[p.public,void 0]:"wallet"in p?[void 0,p.wallet]:[p,p]:[void 0,void 0],h=null!=m,y=null!=b,g={};let v=!1,E=!1,w=!1;for(const t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?v=!0:E=!0:"event"===t.type&&(w=!0),v&&E&&w)break;return h&&(v&&(g.read=new Proxy({},{get:(r,o)=>(...r)=>{const{args:a,options:i}=l(r);return(0,n.getAction)(m,s.readContract,"readContract")({abi:e,address:t,functionName:o,args:a,...i})}})),E&&(g.simulate=new Proxy({},{get:(r,o)=>(...r)=>{const{args:a,options:i}=l(r);return(0,n.getAction)(m,c.simulateContract,"simulateContract")({abi:e,address:t,functionName:o,args:a,...i})}})),w&&(g.createEventFilter=new Proxy({},{get:(r,a)=>(...r)=>{const i=e.find(e=>"event"===e.type&&e.name===a),{args:s,options:c}=f(r,i);return(0,n.getAction)(m,o.createContractEventFilter,"createContractEventFilter")({abi:e,address:t,eventName:a,args:s,...c})}}),g.getEvents=new Proxy({},{get:(r,o)=>(...r)=>{const a=e.find(e=>"event"===e.type&&e.name===o),{args:s,options:c}=f(r,a);return(0,n.getAction)(m,i.getContractEvents,"getContractEvents")({abi:e,address:t,eventName:o,args:s,...c})}}),g.watchEvent=new Proxy({},{get:(r,o)=>(...r)=>{const a=e.find(e=>"event"===e.type&&e.name===o),{args:i,options:s}=f(r,a);return(0,n.getAction)(m,u.watchContractEvent,"watchContractEvent")({abi:e,address:t,eventName:o,args:i,...s})}}))),y&&E&&(g.write=new Proxy({},{get:(r,o)=>(...r)=>{const{args:a,options:i}=l(r);return(0,n.getAction)(b,d.writeContract,"writeContract")({abi:e,address:t,functionName:o,args:a,...i})}})),(h||y)&&E&&(g.estimateGas=new Proxy({},{get:(r,o)=>(...r)=>{const{args:i,options:s}=l(r),c=m??b;return(0,n.getAction)(c,a.estimateContractGas,"estimateContractGas")({abi:e,address:t,functionName:o,args:i,...s,account:s.account??b.account})}})),g.address=t,g.abi=e,g},t.getFunctionParameters=l,t.getEventParameters=f;const n=r(3115),o=r(6057),a=r(1284),i=r(7702),s=r(1855),c=r(6093),u=r(4326),d=r(2015);function l(e){const t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function f(e,t){let r=!1;return Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some(e=>e.indexed):2===e.length&&(r=!0),{args:r?e[0]:void 0,options:(r?e[1]:e[0])??{}}}},6187(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeErc6492Signature=function(e){const{address:t,data:r,signature:s,to:c="hex"}=e,u=(0,a.concatHex)([(0,o.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,s]),n.erc6492MagicBytes]);return"hex"===c?u:(0,i.hexToBytes)(u)};const n=r(8165),o=r(3224),a=r(1028),i=r(1699)},6218(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeEventLog=function(e){const{abi:t,data:r,strict:l,topics:f}=e,p=l??!0,[m,...b]=f;if(!m)throw new n.AbiEventSignatureEmptyTopicsError({docsPath:u});const h=t.find(e=>"event"===e.type&&m===(0,i.toEventSelector)((0,c.formatAbiItem)(e)));if(!h||!("name"in h)||"event"!==h.type)throw new n.AbiEventSignatureNotFoundError(m,{docsPath:u});const{name:y,inputs:g}=h,v=g?.some(e=>!("name"in e&&e.name)),E=v?[]:{},w=g.map((e,t)=>[e,t]).filter(([e])=>"indexed"in e&&e.indexed);for(let e=0;e<w.length;e++){const[t,r]=w[e],o=b[e];if(!o)throw new n.DecodeLogTopicsMismatch({abiItem:h,param:t});E[v?r:t.name||r]=d({param:t,value:o})}const P=g.filter(e=>!("indexed"in e&&e.indexed));if(P.length>0)if(r&&"0x"!==r)try{const e=(0,s.decodeAbiParameters)(P,r);if(e)if(v)for(let t=0;t<g.length;t++)E[t]=E[t]??e.shift();else for(let t=0;t<P.length;t++)E[P[t].name]=e[t]}catch(e){if(p){if(e instanceof n.AbiDecodingDataSizeTooSmallError||e instanceof o.PositionOutOfBoundsError)throw new n.DecodeLogDataMismatch({abiItem:h,data:r,params:P,size:(0,a.size)(r)});throw e}}else if(p)throw new n.DecodeLogDataMismatch({abiItem:h,data:"0x",params:P,size:0});return{eventName:y,args:Object.values(E).length>0?E:void 0}};const n=r(9797),o=r(4129),a=r(4025),i=r(2644),s=r(8448),c=r(1508),u="/docs/contract/decodeEventLog";function d({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,s.decodeAbiParameters)([e],t)||[])[0]}},6228(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionConfirmations=async function(e,{hash:t,transactionReceipt:r}){const[i,s]=await Promise.all([(0,n.getAction)(e,o.getBlockNumber,"getBlockNumber")({}),t?(0,n.getAction)(e,a.getTransaction,"getTransaction")({hash:t}):void 0]),c=r?.blockNumber||s?.blockNumber;return c?i-c+1n:0n};const n=r(3115),o=r(5725),a=r(501)},6231(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlobBaseFee=async function(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}},6232(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.narrow=function(e){return e}},6267(e,t,r){r.r(t),r.d(t,{WebSocket:()=>n});const n=function(){if("undefined"!=typeof WebSocket)return WebSocket;if(void 0!==r.g.WebSocket)return r.g.WebSocket;if(void 0!==window.WebSocket)return window.WebSocket;if(void 0!==self.WebSocket)return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}()},6351(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="2.39.0"},6356(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNetworkError=function(e){return!(!e||(t=e,"[object Error]"!==r.call(t))||"TypeError"!==e.name||"string"!=typeof e.message)&&("Load failed"===e.message?void 0===e.stack:n.has(e.message));var t};var r=Object.prototype.toString,n=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"])},6367(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.uid=function(e=11){if(!r||n+e>512){r="",n=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(n,n+++e)};let r,n=256},6373(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getAddresses=async function(e){return"local"===e.account?.type?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,n.checksumAddress)(e))};const n=r(9868)},6387(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.nonceManager=void 0,t.createNonceManager=a,t.jsonRpc=i;const n=r(9226),o=r(2292);function a(e){const{source:t}=e,r=new Map,n=new o.LruMap(8192),a=new Map,i=({address:e,chainId:t})=>`${e}.${t}`;return{async consume({address:e,chainId:r,client:o}){const a=i({address:e,chainId:r}),s=this.get({address:e,chainId:r,client:o});this.increment({address:e,chainId:r});const c=await s;return await t.set({address:e,chainId:r},c),n.set(a,c),c},async increment({address:e,chainId:t}){const n=i({address:e,chainId:t}),o=r.get(n)??0;r.set(n,o+1)},async get({address:e,chainId:o,client:s}){const c=i({address:e,chainId:o});let u=a.get(c);return u||(u=(async()=>{try{const r=await t.get({address:e,chainId:o,client:s}),a=n.get(c)??0;return a>0&&r<=a?a+1:(n.delete(c),r)}finally{this.reset({address:e,chainId:o})}})(),a.set(c,u)),(r.get(c)??0)+await u},reset({address:e,chainId:t}){const n=i({address:e,chainId:t});r.delete(n),a.delete(n)}}}function i(){return{async get(e){const{address:t,client:r}=e;return(0,n.getTransactionCount)(r,{address:t,blockTag:"pending"})},set(){}}}t.nonceManager=a({source:i()})},6405(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializedTransactionType=function(e){const t=(0,o.sliceHex)(e,0,1);if("0x04"===t)return"eip7702";if("0x03"===t)return"eip4844";if("0x02"===t)return"eip1559";if("0x01"===t)return"eip2930";if("0x"!==t&&(0,a.hexToNumber)(t)>=192)return"legacy";throw new n.InvalidSerializedTransactionTypeError({serializedType:t})};const n=r(979),o=r(1972),a=r(4130)},6406(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeErrorResult=function(e){const{abi:t,errorName:r,args:d}=e;let l=t[0];if(r){const e=(0,c.getAbiItem)({abi:t,args:d,name:r});if(!e)throw new n.AbiErrorNotFoundError(r,{docsPath:u});l=e}if("error"!==l.type)throw new n.AbiErrorNotFoundError(void 0,{docsPath:u});const f=(0,s.formatAbiItem)(l),p=(0,a.toFunctionSelector)(f);let m="0x";if(d&&d.length>0){if(!l.inputs)throw new n.AbiErrorInputsNotFoundError(l.name,{docsPath:u});m=(0,i.encodeAbiParameters)(l.inputs,d)}return(0,o.concatHex)([p,m])};const n=r(9797),o=r(1028),a=r(364),i=r(3224),s=r(1508),c=r(3123),u="/docs/contract/encodeErrorResult"},6433(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SOLANA_SYSTEM_ADDRESSES=void 0,t.isSolanaAddress=n,t.getValidSolanaAddress=o,t.isSolanaSystemAddress=a,t.isBlockedSolanaAddress=function(e){var t=o(e);return!!t&&!!a(t)},t.publicKeyToAddress=function(e){if(!e)return null;try{var t=e.toBase58();return n(t)?t:null}catch(e){return null}},t.areSolanaAddressesEqual=function(e,t){var r=o(e),n=o(t);return!(!r||!n)&&r===n};var r=new Set("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function n(e){if("string"!=typeof e)return!1;var t=e.trim();return!(t.length<32||t.length>44)&&function(e){for(var t=0;t<e.length;t++)if(!r.has(e[t]))return!1;return!0}(t)}function o(e){if(!e)return null;if("object"==typeof e&&"toBase58"in e)try{var t=e.toBase58();return n(t)?t:null}catch(e){return null}if("string"==typeof e){var r=e.trim();return n(r)?r:null}return null}function a(e){var r=o(e);return!!r&&Object.values(t.SOLANA_SYSTEM_ADDRESSES).includes(r)}t.SOLANA_SYSTEM_ADDRESSES={SYSTEM_PROGRAM:"11111111111111111111111111111111",TOKEN_PROGRAM:"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",TOKEN_2022_PROGRAM:"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",ASSOCIATED_TOKEN_PROGRAM:"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",RENT_SYSVAR:"SysvarRent111111111111111111111111111111111",CLOCK_SYSVAR:"SysvarC1ock11111111111111111111111111111111"}},6437(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyAuthorization=async function({address:e,authorization:t,signature:r}){return(0,o.isAddressEqual)((0,n.getAddress)(e),await(0,a.recoverAuthorizationAddress)({authorization:t,signature:r}))};const n=r(9868),o=r(7624),a=r(4572)},6447(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toEventSignature=void 0;var n=r(4827);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return n.toSignature}})},6453(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsText=async function(e,t){const{blockNumber:r,blockTag:m,key:b,name:h,gatewayUrls:y,strict:g}=t,{chain:v}=e,E=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!v)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,i.getChainContractAddress)({blockNumber:r,chain:v,contract:"ensUniversalResolver"})})(),w=v?.ensTlds;if(w&&!w.some(e=>h.endsWith(e)))return null;try{const t={address:E,abi:n.universalResolverResolveAbi,args:[(0,s.toHex)((0,l.packetToBytes)(h)),(0,a.encodeFunctionData)({abi:n.textResolverAbi,functionName:"text",args:[(0,d.namehash)(h),b]}),y??[u.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:r,blockTag:m},i=(0,f.getAction)(e,p.readContract,"readContract"),c=await i(t);if("0x"===c[0])return null;const g=(0,o.decodeFunctionResult)({abi:n.textResolverAbi,functionName:"text",data:c[0]});return""===g?null:g}catch(e){if(g)throw e;if((0,c.isNullUniversalResolverError)(e))return null;throw e}};const n=r(138),o=r(233),a=r(5108),i=r(9858),s=r(6669),c=r(3327),u=r(546),d=r(5047),l=r(6818),f=r(3115),p=r(1855)},6472(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.labelhash=function(e){const t=new Uint8Array(32).fill(0);return e?(0,i.encodedLabelToLabelhash)(e)||(0,a.keccak256)((0,n.stringToBytes)(e)):(0,o.bytesToHex)(t)};const n=r(1699),o=r(6669),a=r(1725),i=r(2071)},6525(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendCallsSync=async function(e,t){const{chain:r=e.chain}=t,a=t.timeout??Math.max(3*(r?.blockTime??0),5e3),i=await(0,n.sendCalls)(e,t);return await(0,o.waitForCallsStatus)(e,{...t,id:i.id,timeout:a})};const n=r(5790),o=r(1374)},6561(e,t){var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionStatus=t.SignatureStatus=void 0,function(e){e.REQUESTED="requested",e.REJECTED="rejected",e.CONFIRMED="confirmed"}(r||(t.SignatureStatus=r={})),function(e){e.STARTED="started",e.REJECTED="rejected",e.BROADCASTED="broadcasted",e.CONFIRMED="confirmed",e.REVERTED="reverted"}(n||(t.TransactionStatus=n={}))},6569(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;const n=r(8064);class o extends n.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}t.CircularReferenceError=o},6573(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const n=r(9333);class o extends Error{constructor(e,t={}){const r=(()=>{if(t.cause instanceof o){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),a=t.cause instanceof o&&t.cause.docsPath||t.docsPath,i=`https://oxlib.sh${a??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||a?["",r?`Details: ${r}`:void 0,a?`See: ${i}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${(0,n.getVersion)()}`}),this.cause=t.cause,this.details=r,this.docs=i,this.docsPath=a,this.shortMessage=e}walk(e){return a(this,e)}}function a(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&e.cause?a(e.cause,t):t?null:e}t.BaseError=o},6607(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCompactSignature=function({r:e,yParityAndS:t}){return`0x${new n.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}`};const n=r(7666),o=r(4130)},6611(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=function(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},6669(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toHex=function(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?l(e,t):"boolean"==typeof e?s(e,t):c(e,t)},t.boolToHex=s,t.bytesToHex=c,t.numberToHex=u,t.stringToHex=l;const n=r(9130),o=r(5599),a=r(4130),i=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function s(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.assertSize)(r,{size:t.size}),(0,o.pad)(r,{size:t.size})):r}function c(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=i[e[t]];const n=`0x${r}`;return"number"==typeof t.size?((0,a.assertSize)(n,{size:t.size}),(0,o.pad)(n,{dir:"right",size:t.size})):n}function u(e,t={}){const{signed:r,size:a}=t,i=BigInt(e);let s;a?s=r?(1n<<8n*BigInt(a)-1n)-1n:2n**(8n*BigInt(a))-1n:"number"==typeof e&&(s=BigInt(Number.MAX_SAFE_INTEGER));const c="bigint"==typeof s&&r?-s-1n:0;if(s&&i>s||i<c){const t="bigint"==typeof e?"n":"";throw new n.IntegerOutOfRangeError({max:s?`${s}${t}`:void 0,min:`${c}${t}`,signed:r,size:a,value:`${e}${t}`})}const u=`0x${(r&&i<0?(1n<<BigInt(8*a))+BigInt(i):i).toString(16)}`;return a?(0,o.pad)(u,{size:a}):u}const d=new TextEncoder;function l(e,t={}){return c(d.encode(e),t)}},6687(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNodeError=t.TipAboveFeeCapError=t.TransactionTypeNotSupportedError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.NonceMaxValueError=t.NonceTooLowError=t.NonceTooHighError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=void 0;const n=r(1825),o=r(1682);class a extends o.BaseError{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}t.ExecutionRevertedError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class i extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.formatGwei)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}t.FeeCapTooHighError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.formatGwei)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}t.FeeCapTooLowError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}t.NonceTooHighError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends o.BaseError{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}t.NonceTooLowError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class d extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}t.NonceMaxValueError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class l extends o.BaseError{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}t.InsufficientFundsError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class f extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}t.IntrinsicGasTooHighError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}t.IntrinsicGasTooLowError=p,Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class m extends o.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}t.TransactionTypeNotSupportedError=m,Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class b extends o.BaseError{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.formatGwei)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.formatGwei)(r)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}t.TipAboveFeeCapError=b,Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class h extends o.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}t.UnknownNodeError=h},6706(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbi=function(e){const t=(0,o.parseStructs)(e),r=[],i=e.length;for(let o=0;o<i;o++){const i=e[o];(0,n.isStructSignature)(i)||r.push((0,a.parseSignature)(i,t))}return r};const n=r(1839),o=r(6012),a=r(9263)},6737(e,t,r){var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.isAvailable=function(){return"undefined"!=typeof document&&"string"==typeof document.cookie},t.prototype.set=function(e,t,r){var n=null==r?void 0:r.expires,o=null==r?void 0:r.maxAge,a=(null==r?void 0:r.path)||"/",i=null==r?void 0:r.domain,s=null==r?void 0:r.sameSite,c=(null==r?void 0:r.secure)||!1,u="".concat(encodeURIComponent(this.getKey(e)),"=").concat(encodeURIComponent(t));o?u+="; max-age="+o:n&&(u+="; expires="+n),a&&(u+="; path="+a),i&&(u+="; domain="+i),s&&(u+="; samesite="+s),c&&(u+="; secure"),document.cookie=u},t.prototype.get=function(e){var t=document.cookie.match(new RegExp("(?:^|; )".concat(encodeURIComponent(this.getKey(e)),"=([^;]*)")));return t?decodeURIComponent(t[1]):null},t.prototype.remove=function(e){document.cookie="".concat(encodeURIComponent(this.getKey(e)),"=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT")},t}(a(r(8620)).default);t.default=i},6744(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSerializedSizeError=t.InvalidUncompressedPrefixError=t.InvalidCompressedPrefixError=t.InvalidPrefixError=t.InvalidError=void 0,t.assert=s,t.compress=function(e){const{x:t,y:r}=e;return{prefix:r%2n==0n?2:3,x:t}},t.from=function(e){const t=(()=>{if(a.validate(e))return u(e);if(n.validate(e))return c(e);const{prefix:t,x:r,y:o}=e;return"bigint"==typeof r&&"bigint"==typeof o?{prefix:t??4,x:r,y:o}:{prefix:t,x:r}})();return s(t),t},t.fromBytes=c,t.fromHex=u,t.toBytes=function(e,t={}){return n.fromHex(d(e,t))},t.toHex=d,t.validate=function(e,t={}){try{return s(e,t),!0}catch(e){return!1}};const n=r(7223),o=r(6573),a=r(1465),i=r(7348);function s(e,t={}){const{compressed:r}=t,{prefix:n,x:o,y:a}=e;if(!1===r||"bigint"==typeof o&&"bigint"==typeof a){if(4!==n)throw new f({prefix:n,cause:new m})}else{if(!0!==r&&("bigint"!=typeof o||void 0!==a))throw new l({publicKey:e});if(3!==n&&2!==n)throw new f({prefix:n,cause:new p})}}function c(e){return u(a.fromBytes(e))}function u(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new b({publicKey:e});return 130===e.length?{prefix:4,x:BigInt(a.slice(e,0,32)),y:BigInt(a.slice(e,32,64))}:132===e.length?{prefix:Number(a.slice(e,0,1)),x:BigInt(a.slice(e,1,33)),y:BigInt(a.slice(e,33,65))}:{prefix:Number(a.slice(e,0,1)),x:BigInt(a.slice(e,1,33))}}function d(e,t={}){s(e);const{prefix:r,x:n,y:o}=e,{includePrefix:i=!0}=t;return a.concat(i?a.fromNumber(r,{size:1}):"0x",a.fromNumber(n,{size:32}),"bigint"==typeof o?a.fromNumber(o,{size:32}):"0x")}class l extends o.BaseError{constructor({publicKey:e}){super(`Value \`${i.stringify(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}t.InvalidError=l;class f extends o.BaseError{constructor({prefix:e,cause:t}){super(`Prefix "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}t.InvalidPrefixError=f;class p extends o.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}t.InvalidCompressedPrefixError=p;class m extends o.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}t.InvalidUncompressedPrefixError=m;class b extends o.BaseError{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${a.size(a.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}t.InvalidSerializedSizeError=b},6745(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=function(e){var t,r;return e instanceof Uint8Array||"Uint8Array"===(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)||"Buffer"===(null===(r=null==e?void 0:e.constructor)||void 0===r?void 0:r.name)},t.uint8ArrayToHexString=function(e){for(var t="0x",r=0,n=e;r<n.length;r++){var o=n[r].toString(16);t+=1===o.length?"0".concat(o):o}return t}},6746(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameters=function(e){let t="";const r=e.length;for(let o=0;o<r;o++){const a=e[o];t+=(0,n.formatAbiParameter)(a),o!==r-1&&(t+=", ")}return t};const n=r(3263)},6801(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionResult=function(e){const{abi:t,functionName:r,result:s}=e;let c=t[0];if(r){const e=(0,a.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiFunctionNotFoundError(r,{docsPath:i});c=e}if("function"!==c.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:i});if(!c.outputs)throw new n.AbiFunctionOutputsNotFoundError(c.name,{docsPath:i});const u=(()=>{if(0===c.outputs.length)return[];if(1===c.outputs.length)return[s];if(Array.isArray(s))return s;throw new n.InvalidArrayError(s)})();return(0,o.encodeAbiParameters)(c.outputs,u)};const n=r(9797),o=r(3224),a=r(3123),i="/docs/contract/encodeFunctionResult"},6818(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.packetToBytes=function(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const r=new Uint8Array((0,n.stringToBytes)(t).byteLength+2);let i=0;const s=t.split(".");for(let e=0;e<s.length;e++){let t=(0,n.stringToBytes)(s[e]);t.byteLength>255&&(t=(0,n.stringToBytes)((0,o.encodeLabelhash)((0,a.labelhash)(s[e])))),r[i]=t.length,r.set(t,i+1),i+=t.length+1}return r.byteLength!==i+1?r.slice(0,i+1):r};const n=r(1699),o=r(2070),a=r(6472)},6823(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toPrefixedMessage=function(e){const t="string"==typeof e?(0,i.stringToHex)(e):"string"==typeof e.raw?e.raw:(0,i.bytesToHex)(e.raw),r=(0,i.stringToHex)(`${n.presignMessagePrefix}${(0,a.size)(t)}`);return(0,o.concat)([r,t])};const n=r(2884),o=r(1028),a=r(4025),i=r(6669)},6833(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},6839(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=o,t.abytes=a,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t.numberToHexUnpadded=i,t.hexToNumber=s,t.bytesToHex=d,t.hexToBytes=f,t.bytesToNumberBE=function(e){return s(d(e))},t.bytesToNumberLE=function(e){return a(e),s(d(Uint8Array.from(e).reverse()))},t.numberToBytesBE=p,t.numberToBytesLE=function(e,t){return p(e,t).reverse()},t.numberToVarBytesBE=function(e){return f(i(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=f(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!o(t))throw new Error(e+" must be hex string or Uint8Array");n=Uint8Array.from(t)}const a=n.length;if("number"==typeof r&&a!==r)throw new Error(e+" of length "+r+" expected, got "+a);return n},t.concatBytes=m,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))},t.inRange=h,t.aInRange=function(e,t,r,n){if(!h(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,o){return e|(o?n:r)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=y(e),o=y(e),a=0;const i=()=>{n.fill(1),o.fill(0),a=0},s=(...e)=>r(o,n,...e),c=(e=y(0))=>{o=s(g([0]),e),n=s(),0!==e.length&&(o=s(g([1]),e),n=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=s();const t=n.slice();r.push(t),e+=n.length}return m(...r)};return(e,t)=>{let r;for(i(),c(e);!(r=t(u()));)c();return i(),r}},t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const o=v[r];if("function"!=typeof o)throw new Error("invalid validator function");const a=e[t];if(!(n&&void 0===a||o(a,e)))throw new Error("param "+String(t)+" is invalid. Expected "+r+", got "+a)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e},t.memoized=function(e){const t=new WeakMap;return(r,...n)=>{const o=t.get(r);if(void 0!==o)return o;const a=e(r,...n);return t.set(r,a),a}};const r=BigInt(0),n=BigInt(1);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e){if(!o(e))throw new Error("Uint8Array expected")}function i(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function s(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?r:BigInt("0x"+e)}const c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(a(e),c)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t}function l(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(c)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=l(e.charCodeAt(o)),a=l(e.charCodeAt(o+1));if(void 0===r||void 0===a){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}n[t]=16*r+a}return n}function p(e,t){return f(e.toString(16).padStart(2*t,"0"))}function m(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];a(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}const b=e=>"bigint"==typeof e&&r<=e;function h(e,t,r){return b(e)&&b(t)&&b(r)&&t<=e&&e<r}t.bitMask=e=>(n<<BigInt(e))-n;const y=e=>new Uint8Array(e),g=e=>Uint8Array.from(e),v={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},6845(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.publicActions=function(e){return{call:t=>(0,c.call)(e,t),createAccessList:t=>(0,u.createAccessList)(e,t),createBlockFilter:()=>(0,d.createBlockFilter)(e),createContractEventFilter:t=>(0,l.createContractEventFilter)(e,t),createEventFilter:t=>(0,f.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,p.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,m.estimateContractGas)(e,t),estimateGas:t=>(0,h.estimateGas)(e,t),getBalance:t=>(0,g.getBalance)(e,t),getBlobBaseFee:()=>(0,v.getBlobBaseFee)(e),getBlock:t=>(0,E.getBlock)(e,t),getBlockNumber:t=>(0,w.getBlockNumber)(e,t),getBlockTransactionCount:t=>(0,P.getBlockTransactionCount)(e,t),getBytecode:t=>(0,x.getCode)(e,t),getChainId:()=>(0,A.getChainId)(e),getCode:t=>(0,x.getCode)(e,t),getContractEvents:t=>(0,I.getContractEvents)(e,t),getEip712Domain:t=>(0,S.getEip712Domain)(e,t),getEnsAddress:t=>(0,n.getEnsAddress)(e,t),getEnsAvatar:t=>(0,o.getEnsAvatar)(e,t),getEnsName:t=>(0,a.getEnsName)(e,t),getEnsResolver:t=>(0,i.getEnsResolver)(e,t),getEnsText:t=>(0,s.getEnsText)(e,t),getFeeHistory:t=>(0,T.getFeeHistory)(e,t),estimateFeesPerGas:t=>(0,b.estimateFeesPerGas)(e,t),getFilterChanges:t=>(0,O.getFilterChanges)(e,t),getFilterLogs:t=>(0,_.getFilterLogs)(e,t),getGasPrice:()=>(0,j.getGasPrice)(e),getLogs:t=>(0,C.getLogs)(e,t),getProof:t=>(0,B.getProof)(e,t),estimateMaxPriorityFeePerGas:t=>(0,y.estimateMaxPriorityFeePerGas)(e,t),getStorageAt:t=>(0,M.getStorageAt)(e,t),getTransaction:t=>(0,k.getTransaction)(e,t),getTransactionConfirmations:t=>(0,R.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,N.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,F.getTransactionReceipt)(e,t),multicall:t=>(0,U.multicall)(e,t),prepareTransactionRequest:t=>(0,ee.prepareTransactionRequest)(e,t),readContract:t=>(0,H.readContract)(e,t),sendRawTransaction:t=>(0,te.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,re.sendRawTransactionSync)(e,t),simulate:t=>(0,D.simulateBlocks)(e,t),simulateBlocks:t=>(0,D.simulateBlocks)(e,t),simulateCalls:t=>(0,L.simulateCalls)(e,t),simulateContract:t=>(0,z.simulateContract)(e,t),verifyHash:t=>(0,G.verifyHash)(e,t),verifyMessage:t=>(0,q.verifyMessage)(e,t),verifySiweMessage:t=>(0,X.verifySiweMessage)(e,t),verifyTypedData:t=>(0,V.verifyTypedData)(e,t),uninstallFilter:t=>(0,$.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,W.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,Z.watchBlocks)(e,t),watchBlockNumber:t=>(0,K.watchBlockNumber)(e,t),watchContractEvent:t=>(0,Y.watchContractEvent)(e,t),watchEvent:t=>(0,J.watchEvent)(e,t),watchPendingTransactions:t=>(0,Q.watchPendingTransactions)(e,t)}};const n=r(7300),o=r(7799),a=r(3453),i=r(8132),s=r(6453),c=r(5417),u=r(2591),d=r(9734),l=r(6057),f=r(5219),p=r(7178),m=r(1284),b=r(3434),h=r(2034),y=r(997),g=r(2189),v=r(6231),E=r(3248),w=r(5725),P=r(219),A=r(401),x=r(5496),I=r(7702),S=r(3641),T=r(3062),O=r(4602),_=r(9552),j=r(7383),C=r(4950),B=r(8815),M=r(4449),k=r(501),R=r(6228),N=r(9226),F=r(3949),U=r(2040),H=r(1855),D=r(5913),L=r(3970),z=r(6093),$=r(1841),G=r(5968),q=r(9117),V=r(1974),W=r(2673),K=r(9672),Z=r(4692),Y=r(4326),J=r(8248),Q=r(5746),X=r(5888),ee=r(211),te=r(4225),re=r(1246)},6875(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=async function({address:e,hash:t,signature:r}){return(0,o.isAddressEqual)((0,n.getAddress)(e),await(0,a.recoverAddress)({hash:t,signature:r}))};const n=r(9868),o=r(7624),a=r(1154)},6911(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.writeContractSync=async function(e,t){return o.writeContract.internal(e,n.sendTransactionSync,"sendTransactionSync",t)};const n=r(1255),o=r(2015)},6946(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeParameter=u,t.decodeAddress=d,t.decodeArray=l,t.decodeBool=f,t.decodeBytes=p,t.decodeNumber=m,t.decodeTuple=b,t.decodeString=h,t.prepareParameters=function({checksumAddress:e,parameters:t,values:r}){const n=[];for(let o=0;o<t.length;o++)n.push(y({checksumAddress:e,parameter:t[o],value:r[o]}));return n},t.prepareParameter=y,t.encode=g,t.encodeAddress=v,t.encodeArray=E,t.encodeBytes=w,t.encodeBoolean=P,t.encodeNumber=A,t.encodeString=x,t.encodeTuple=I,t.getArrayComponents=S,t.hasDynamicChild=T;const n=r(7818),o=r(7188),a=r(7223),i=r(6573),s=r(1465),c=r(2683);function u(e,t,r){const{checksumAddress:o,staticPosition:a}=r,i=S(t.type);if(i){const[r,n]=i;return l(e,{...t,type:n},{checksumAddress:o,length:r,staticPosition:a})}if("tuple"===t.type)return b(e,t,{checksumAddress:o,staticPosition:a});if("address"===t.type)return d(e,{checksum:o});if("bool"===t.type)return f(e);if(t.type.startsWith("bytes"))return p(e,t,{staticPosition:a});if(t.type.startsWith("uint")||t.type.startsWith("int"))return m(e,t);if("string"===t.type)return h(e,{staticPosition:a});throw new n.InvalidTypeError(t.type)}function d(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(i=s.fromBytes(a.slice(n,-20)),r?o.checksum(i):i),32];var i}function l(e,t,r){const{checksumAddress:n,length:o,staticPosition:i}=r;if(!o){const r=i+a.toNumber(e.readBytes(32)),o=r+32;e.setPosition(r);const s=a.toNumber(e.readBytes(32)),c=T(t);let d=0;const l=[];for(let r=0;r<s;++r){e.setPosition(o+(c?32*r:d));const[a,i]=u(e,t,{checksumAddress:n,staticPosition:o});d+=i,l.push(a)}return e.setPosition(i+32),[l,32]}if(T(t)){const r=i+a.toNumber(e.readBytes(32)),s=[];for(let a=0;a<o;++a){e.setPosition(r+32*a);const[o]=u(e,t,{checksumAddress:n,staticPosition:r});s.push(o)}return e.setPosition(i+32),[s,32]}let s=0;const c=[];for(let r=0;r<o;++r){const[r,o]=u(e,t,{checksumAddress:n,staticPosition:i+s});s+=o,c.push(r)}return[c,s]}function f(e){return[a.toBoolean(e.readBytes(32),{size:32}),32]}function p(e,t,{staticPosition:r}){const[n,o]=t.type.split("bytes");if(!o){const t=a.toNumber(e.readBytes(32));e.setPosition(r+t);const n=a.toNumber(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];const o=e.readBytes(n);return e.setPosition(r+32),[s.fromBytes(o),32]}return[s.fromBytes(e.readBytes(Number.parseInt(o,10),32)),32]}function m(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[n>48?a.toBigInt(o,{signed:r}):a.toNumber(o,{signed:r}),32]}function b(e,t,r){const{checksumAddress:n,staticPosition:o}=r,i=0===t.components.length||t.components.some(({name:e})=>!e),s=i?[]:{};let c=0;if(T(t)){const r=o+a.toNumber(e.readBytes(32));for(let o=0;o<t.components.length;++o){const a=t.components[o];e.setPosition(r+c);const[d,l]=u(e,a,{checksumAddress:n,staticPosition:r});c+=l,s[i?o:a?.name]=d}return e.setPosition(o+32),[s,32]}for(let r=0;r<t.components.length;++r){const a=t.components[r],[d,l]=u(e,a,{checksumAddress:n,staticPosition:o});s[i?r:a?.name]=d,c+=l}return[s,c]}function h(e,{staticPosition:t}){const r=t+a.toNumber(e.readBytes(32));e.setPosition(r);const n=a.toNumber(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];const o=e.readBytes(n,32),i=a.toString(a.trimLeft(o));return e.setPosition(t+32),[i,32]}function y({checksumAddress:e=!1,parameter:t,value:r}){const o=t,a=S(o.type);if(a){const[t,n]=a;return E(r,{checksumAddress:e,length:t,parameter:{...o,type:n}})}if("tuple"===o.type)return I(r,{checksumAddress:e,parameter:o});if("address"===o.type)return v(r,{checksum:e});if("bool"===o.type)return P(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){const e=o.type.startsWith("int"),[,,t="256"]=c.integerRegex.exec(o.type)??[];return A(r,{signed:e,size:Number(t)})}if(o.type.startsWith("bytes"))return w(r,{type:o.type});if("string"===o.type)return x(r);throw new n.InvalidTypeError(o.type)}function g(e){let t=0;for(let r=0;r<e.length;r++){const{dynamic:n,encoded:o}=e[r];t+=n?32:s.size(o)}const r=[],n=[];let o=0;for(let a=0;a<e.length;a++){const{dynamic:i,encoded:c}=e[a];i?(r.push(s.fromNumber(t+o,{size:32})),n.push(c),o+=s.size(c)):r.push(c)}return s.concat(...r,...n)}function v(e,t){const{checksum:r=!1}=t;return o.assert(e,{strict:r}),{dynamic:!1,encoded:s.padLeft(e.toLowerCase())}}function E(e,t){const{checksumAddress:r,length:o,parameter:a}=t,i=null===o;if(!Array.isArray(e))throw new n.InvalidArrayError(e);if(!i&&e.length!==o)throw new n.ArrayLengthMismatchError({expectedLength:o,givenLength:e.length,type:`${a.type}[${o}]`});let c=!1;const u=[];for(let t=0;t<e.length;t++){const n=y({checksumAddress:r,parameter:a,value:e[t]});n.dynamic&&(c=!0),u.push(n)}if(i||c){const e=g(u);if(i){const t=s.fromNumber(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?s.concat(t,e):t}}if(c)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:s.concat(...u.map(({encoded:e})=>e))}}function w(e,{type:t}){const[,r]=t.split("bytes"),o=s.size(e);if(!r){let t=e;return o%32!=0&&(t=s.padRight(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:s.concat(s.padLeft(s.fromNumber(o,{size:32})),t)}}if(o!==Number.parseInt(r,10))throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:s.padRight(e)}}function P(e){if("boolean"!=typeof e)throw new i.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:s.padLeft(s.fromBoolean(e))}}function A(e,{signed:t,size:r}){if("number"==typeof r){const n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||e<o)throw new s.IntegerOutOfRangeError({max:n.toString(),min:o.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:s.fromNumber(e,{size:32,signed:t})}}function x(e){const t=s.fromString(e),r=Math.ceil(s.size(t)/32),n=[];for(let e=0;e<r;e++)n.push(s.padRight(s.slice(t,32*e,32*(e+1))));return{dynamic:!0,encoded:s.concat(s.padRight(s.fromNumber(s.size(t),{size:32})),...n)}}function I(e,t){const{checksumAddress:r,parameter:n}=t;let o=!1;const a=[];for(let t=0;t<n.components.length;t++){const i=n.components[t],s=y({checksumAddress:r,parameter:i,value:e[Array.isArray(e)?t:i.name]});a.push(s),s.dynamic&&(o=!0)}return{dynamic:o,encoded:o?g(a):s.concat(...a.map(({encoded:e})=>e))}}function S(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function T(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(T);const r=S(e.type);return!(!r||!T({...e,type:r[1]}))}},6954(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameter=function(e){let t;if("string"==typeof e)t=(0,i.parseAbiParameter)(e,{modifiers:o.modifiers});else{const r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!(0,o.isStructSignature)(n)){t=(0,i.parseAbiParameter)(n,{modifiers:o.modifiers,structs:r});break}}}if(!t)throw new n.InvalidAbiParameterError({param:e});return t};const n=r(5653),o=r(4512),a=r(8689),i=r(790)},6959(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function t(r){return 0===arguments.length||(0,o.default)(r)?t:e.apply(this,arguments)}};var o=n(r(4156))},6962(e,t){Object.defineProperty(t,"__esModule",{value:!0})},6973(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(8325),t),o(r(3737),t)},6997(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=void 0;const n=r(4072),o=r(7393);t.sha256=(0,o.wrapHash)(n.sha256)},7013(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parameterCache=void 0,t.getParameterCacheKey=function(e,t,r){let n="";if(r)for(const e of Object.entries(r)){if(!e)continue;let t="";for(const r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:e},t.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])},7039(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.FormoAnalytics=void 0;var s=r(9478),c=r(9874),u=r(7934),d=r(1251),l=r(4744),f=r(6973),p=r(9461),m=r(5072),b=r(3887),h=r(3078),y=r(8522),g=r(8412),v=r(4378),E=r(7055),w=r(312),P=r(9965),A=r(2098),x=function(){function e(e,t){var r,n;if(void 0===t&&(t={}),this.writeKey=e,this.options=t,this._chainState={evm:{},solana:{}},this._providerListenersMap=new Map,this._providers=[],this._trackedProviders=new Set,this._processingAccountsChanged=!1,this._seenProviders=new Set,this.isWagmiMode=!1,this.currentUserId="",this.config={writeKey:e},this.options=t,this.isWagmiMode=!!t.wagmi,this.session=new b.FormoAnalyticsSession,this.currentUserId=(0,u.cookie)().get(c.SESSION_USER_ID_KEY)||void 0,this.identify=this.identify.bind(this),this.connect=this.connect.bind(this),this.disconnect=this.disconnect.bind(this),this.chain=this.chain.bind(this),this.signature=this.signature.bind(this),this.transaction=this.transaction.bind(this),this.detect=this.detect.bind(this),this.track=this.track.bind(this),this.isAutocaptureEnabled=this.isAutocaptureEnabled.bind(this),f.Logger.init({enabled:(null===(r=t.logger)||void 0===r?void 0:r.enabled)||!1,enabledLevels:(null===(n=t.logger)||void 0===n?void 0:n.levels)||[]}),this.eventManager=new d.EventManager(new l.EventQueue(this.config.writeKey,{apiHost:t.apiHost||c.EVENTS_API_HOST,flushAt:t.flushAt,retryCount:t.retryCount,maxQueueSize:t.maxQueueSize,flushInterval:t.flushInterval,errorHandler:t.errorHandler}),t),this.hasOptedOutTracking()&&f.logger.info("User has previously opted out of tracking"),this.isWagmiMode&&t.wagmi)f.logger.info("FormoAnalytics: Initializing in Wagmi mode"),this.wagmiHandler=new w.WagmiEventHandler(this,t.wagmi.config,t.wagmi.queryClient);else{var o=void 0,a=t.provider;a?o=a:"undefined"!=typeof window&&window.ethereum&&(o=window.ethereum),o&&this.trackEIP1193Provider(o)}t.solana&&(this.solanaManager=new A.SolanaManager(this,t.solana)),this.trackPageHit(),this.trackPageHits()}return Object.defineProperty(e.prototype,"_provider",{get:function(){return this._chainState.evm.provider},set:function(e){this._chainState.evm.provider=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_evmAddress",{get:function(){return this._chainState.evm.address},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_evmChainId",{get:function(){return this._chainState.evm.chainId},enumerable:!1,configurable:!0}),e.prototype.isProviderMismatch=function(e){return null!=this._provider&&this._provider!==e},e.init=function(t,r){return o(this,void 0,void 0,function(){var n,o;return a(this,function(a){switch(a.label){case 0:return(0,u.initStorageManager)(t),(n=new e(t,r)).isWagmiMode?[3,3]:(o=n,[4,n.getProviders()]);case 1:return o._providers=a.sent(),[4,n.detectWallets(n._providers)];case 2:return a.sent(),n.trackProviders(n._providers),[3,4];case 3:f.logger.info("FormoAnalytics: Skipping provider detection (Wagmi mode)"),a.label=4;case 4:return[2,n]}})})},e.prototype.page=function(e,t,r,n,i){return o(this,void 0,void 0,function(){return a(this,function(o){switch(o.label){case 0:return[4,this.trackPageHit(e,t,r,n,i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(){this.currentUserId=void 0,(0,u.cookie)().remove(c.LOCAL_ANONYMOUS_ID_KEY),(0,u.cookie)().remove(c.SESSION_USER_ID_KEY),(0,u.cookie)().remove(b.SESSION_WALLET_DETECTED_KEY),(0,u.cookie)().remove(b.SESSION_WALLET_IDENTIFIED_KEY)},e.prototype.cleanup=function(){if(f.logger.debug("FormoAnalytics: Cleaning up resources"),this.wagmiHandler&&(this.wagmiHandler.cleanup(),this.wagmiHandler=void 0),this.solanaManager&&(this.solanaManager.cleanup(),this.solanaManager=void 0),!this.isWagmiMode)for(var e=0,t=Array.from(this._trackedProviders);e<t.length;e++){var r=t[e];this.untrackProvider(r)}f.logger.debug("FormoAnalytics: Cleanup complete")},e.prototype.connect=function(e,t,r,n){return o(this,arguments,void 0,function(e,t,r,n){var o,i=e.chainId,s=e.address;return a(this,function(e){switch(e.label){case 0:return null==i?(f.logger.warn("Connect: Chain ID cannot be null or undefined"),[2]):s?(o=(0,y.validateAddress)(s,i))?(this.setChainState(i,{address:o}),[4,this.trackEvent(c.EventType.CONNECT,{chainId:i,address:o},t,r,n)]):(f.logger.warn('Connect: Invalid address provided ("'.concat(s,'"). Please provide a valid EVM or Solana address.')),[2]):(f.logger.warn("Connect: Address cannot be empty"),[2]);case 1:return e.sent(),[2]}})})},e.prototype.disconnect=function(e,t,r,i){return o(this,void 0,void 0,function(){var o,s,u,d,l;return a(this,function(a){switch(a.label){case 0:return o=(null==e?void 0:e.chainId)||this.currentChainId,s=(null==e?void 0:e.address)||this.currentAddress,u=(0,P.isSolanaChainId)(o),d=!u&&this._provider?this.getProviderInfo(this._provider):null,f.logger.info("Disconnect: Emitting disconnect event with:",{chainId:o,address:s,providerName:null==d?void 0:d.name,rdns:null==d?void 0:d.rdns}),l=n(n({},d&&{providerName:d.name,rdns:d.rdns}),t),[4,this.trackEvent(c.EventType.DISCONNECT,n(n({},o&&{chainId:o}),s&&{address:s}),l,r,i)];case 1:return a.sent(),this.clearChainState(o),f.logger.info("Wallet disconnected: Cleared currentAddress, currentChainId, and provider"),[2]}})})},e.prototype.chain=function(e,t,r,n){return o(this,arguments,void 0,function(e,t,r,n){var o=e.chainId,i=e.address;return a(this,function(e){switch(e.label){case 0:return o&&0!==Number(o)?isNaN(Number(o))?(f.logger.warn("FormoAnalytics::chain: chainId must be a valid decimal number"),[2]):i||this.currentAddress?(this.setChainState(o,{}),[4,this.trackEvent(c.EventType.CHAIN,{chainId:o,address:i||this.currentAddress},t,r,n)]):(f.logger.warn("FormoAnalytics::chain: address was empty and no previous address has been recorded"),[2]):(f.logger.warn("FormoAnalytics::chain: chainId cannot be empty or 0"),[2]);case 1:return e.sent(),[2]}})})},e.prototype.signature=function(e,t,r,i){return o(this,arguments,void 0,function(e,t,r,o){var i=e.status,s=e.chainId,u=e.address,d=e.message,l=e.signatureHash;return a(this,function(e){switch(e.label){case 0:return[4,this.trackEvent(c.EventType.SIGNATURE,n({status:i,chainId:s,address:u,message:d},l&&{signatureHash:l}),t,r,o)];case 1:return e.sent(),[2]}})})},e.prototype.transaction=function(e,t,r,i){return o(this,arguments,void 0,function(e,t,r,o){var i=e.status,s=e.chainId,u=e.address,d=e.data,l=e.to,f=e.value,p=e.transactionHash,m=e.function_name,b=e.function_args,h=e.builder_codes;return a(this,function(e){switch(e.label){case 0:return[4,this.trackEvent(c.EventType.TRANSACTION,n(n(n(n({status:i,chainId:s,address:u,data:d,to:l,value:f},p&&{transactionHash:p}),m&&{function_name:m}),b&&{function_args:b}),h&&{builder_codes:h}),t,r,o)];case 1:return e.sent(),[2]}})})},e.prototype.identify=function(e,t,r,n){return o(this,void 0,void 0,function(){var o,i,s,d,l,p,m,b,h,g,v,E,w,P,A,x;return a(this,function(a){switch(a.label){case 0:if(a.trys.push([0,12,,13]),e)return[3,10];f.logger.info("Auto-identifying with providers:",this._providers.map(function(e){return e.info.name})),o=0,i=this._providers,a.label=1;case 1:if(!(o<i.length))return[3,9];if(s=i[o],!(d=s.provider))return[3,8];a.label=2;case 2:return a.trys.push([2,7,,8]),[4,this.getAddress(d)];case 3:return(l=a.sent())?(p=(0,y.validateAndChecksumAddress)(l),f.logger.info("Auto-identify: Checking deduplication",{validAddress:p,rdns:s.info.rdns,providerName:s.info.name,isAlreadyIdentified:!!p&&this.session.isWalletIdentified(p,s.info.rdns)}),!p||this.session.isWalletIdentified(p,s.info.rdns)?[3,5]:(f.logger.info("Auto-identifying",p,s.info.name,s.info.rdns),[4,this.identify({address:p,providerName:s.info.name,rdns:s.info.rdns},t,r,n)])):[3,6];case 4:return a.sent(),[3,6];case 5:p&&f.logger.info("Auto-identify: Skipping already identified wallet",p,s.info.name,s.info.rdns),a.label=6;case 6:return[3,8];case 7:return m=a.sent(),f.logger.error("Failed to identify provider ".concat(s.info.name,":"),m),[3,8];case 8:return o++,[3,1];case 9:return[2];case 10:return b=e.address,h=e.providerName,g=e.userId,v=e.rdns,b?(f.logger.info("Identify",b,g,h,v),(E=(0,y.validateAddress)(b))?(this.currentAddress=E,g&&(this.currentUserId=g,(0,u.cookie)().set(c.SESSION_USER_ID_KEY,g)),w=this.session.isWalletIdentified(E,v||""),f.logger.debug("Identify: Checking deduplication",{validAddress:E,rdns:v,providerName:h,userId:g,isAlreadyIdentified:w}),w?(f.logger.info("Identify: Wallet ".concat(h||"Unknown"," with address ").concat(E," already identified in this session (rdns: ").concat(v||"empty",")")),[2]):(this.session.markWalletIdentified(E,v||""),[4,this.trackEvent(c.EventType.IDENTIFY,{address:E,providerName:h,userId:g,rdns:v},t,r,n)])):(null===(x=f.logger.warn)||void 0===x||x.call(f.logger,"Invalid address provided to identify:",b),[2])):(null===(A=f.logger.warn)||void 0===A||A.call(f.logger,"identify() called without address - address is required"),[2]);case 11:return a.sent(),[3,13];case 12:return P=a.sent(),f.logger.log("identify error",P),[3,13];case 13:return[2]}})})},e.prototype.detect=function(e,t,r,n){return o(this,arguments,void 0,function(e,t,r,n){var o=e.providerName,i=e.rdns;return a(this,function(e){switch(e.label){case 0:return this.session.isWalletDetected(i)?[2,f.logger.warn("Detect: Wallet ".concat(o," already detected in this session"))]:(this.session.markWalletDetected(i),[4,this.trackEvent(c.EventType.DETECT,{providerName:o,rdns:i},t,r,n)]);case 1:return e.sent(),[2]}})})},e.prototype.track=function(e,t,r,n){return o(this,void 0,void 0,function(){return a(this,function(o){switch(o.label){case 0:return[4,this.trackEvent(c.EventType.TRACK,{event:e},t,r,n)];case 1:return o.sent(),[2]}})})},e.prototype.optOutTracking=function(){f.logger.info("Opting out of tracking"),(0,p.setConsentFlag)(this.writeKey,c.CONSENT_OPT_OUT_KEY,"true"),this.reset(),f.logger.info("Successfully opted out of tracking")},e.prototype.optInTracking=function(){f.logger.info("Opting back into tracking"),(0,p.removeConsentFlag)(this.writeKey,c.CONSENT_OPT_OUT_KEY),f.logger.info("Successfully opted back into tracking")},e.prototype.hasOptedOutTracking=function(){return"true"===(0,p.getConsentFlag)(this.writeKey,c.CONSENT_OPT_OUT_KEY)},e.prototype.trackEIP1193Provider=function(e){if(f.logger.info("trackEIP1193Provider",e),this.isWagmiMode)f.logger.debug("trackEIP1193Provider: Skipping EIP-1193 provider tracking (Wagmi mode - using connector system instead)");else try{if(!(0,m.isValidProvider)(e))return void f.logger.warn("trackEIP1193Provider: Invalid provider - missing required methods");if(this._trackedProviders.has(e))return void f.logger.warn("trackEIP1193Provider: Provider already tracked");this.registerAccountsChangedListener(e),this.isAutocaptureEnabled("chain")&&this.registerChainChangedListener(e),this.isAutocaptureEnabled("connect")&&this.registerConnectListener(e),this.isAutocaptureEnabled("signature")||this.isAutocaptureEnabled("transaction")?this.registerRequestListeners(e):f.logger.debug("TrackProvider: Skipping request wrapping (both signature and transaction autocapture disabled)"),this.isAutocaptureEnabled("disconnect")&&this.registerDisconnectListener(e),this._trackedProviders.add(e)}catch(e){f.logger.error("Error tracking provider:",e)}},e.prototype.trackProviders=function(e){try{for(var t=0,r=e;t<r.length;t++){var n=r[t],o=null==n?void 0:n.provider;o&&!this._trackedProviders.has(o)&&this.trackEIP1193Provider(o)}}catch(e){f.logger.error("Failed to track EIP-6963 providers during initialization:",e)}},e.prototype.addProviderListener=function(e,t,r){var n=this._providerListenersMap.get(e)||{};n[t]=r,this._providerListenersMap.set(e,n)},e.prototype.registerAccountsChangedListener=function(e){var t=this;f.logger.info("registerAccountsChangedListener");var r=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.onAccountsChanged(e,r[0])};e.on("accountsChanged",r),this.addProviderListener(e,"accountsChanged",r)},e.prototype.onAccountsChanged=function(e,t){return o(this,void 0,void 0,function(){return a(this,function(r){switch(r.label){case 0:if(f.logger.info("onAccountsChanged",t),this._processingAccountsChanged)return f.logger.debug("OnAccountsChanged: Already processing accountsChanged, skipping",{provider:this.getProviderInfo(e).name}),[2];this._processingAccountsChanged=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this._handleAccountsChanged(e,t)];case 2:return r.sent(),[3,4];case 3:return this._processingAccountsChanged=!1,[7];case 4:return[2]}})})},e.prototype._handleAccountsChanged=function(e,t){return o(this,void 0,void 0,function(){var r,n,o,i,s,c,u,d,l,p;return a(this,function(a){switch(a.label){case 0:if(0!==t.length)return[3,9];if(this._provider!==e)return[3,7];if(f.logger.info("OnAccountsChanged: Detecting disconnect, current state:",{evmAddress:this._evmAddress,evmChainId:this._evmChainId,providerMatch:this._provider===e}),!this.isAutocaptureEnabled("disconnect"))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.disconnect({chainId:this._evmChainId,address:this._evmAddress})];case 2:return a.sent(),[3,4];case 3:return r=a.sent(),f.logger.error("Failed to disconnect provider on accountsChanged",r),[3,4];case 4:return[3,6];case 5:f.logger.debug("OnAccountsChanged: Disconnect event skipped (autocapture.disconnect: false)"),this.clearChainState("evm"),a.label=6;case 6:return[3,8];case 7:f.logger.info("OnAccountsChanged: Ignoring disconnect for non-active provider"),a.label=8;case 8:return[2];case 9:if(!(n=(0,y.validateAndChecksumAddress)(t[0])))return f.logger.warn("onAccountsChanged: Invalid address received",t[0]),[2];if(!this._provider||this._provider===e)return[3,25];o=this._evmAddress,i=(0,y.validateAndChecksumAddress)(n),f.logger.info("OnAccountsChanged: Different provider attempting to connect",{activeProvider:this.getProviderInfo(this._provider).name,eventProvider:this.getProviderInfo(e).name,currentStoredAddress:o,newProviderAddress:i}),a.label=10;case 10:return a.trys.push([10,21,,25]),[4,this.getAccounts(this._provider)];case 11:return s=a.sent(),f.logger.info("OnAccountsChanged: Checking current provider accounts",{activeProvider:this.getProviderInfo(this._provider).name,accountsLength:s?s.length:0,accounts:s}),s&&s.length>0?i&&o&&i!==o?(f.logger.info("OnAccountsChanged: Different address detected, switching providers despite current provider having accounts",{activeProvider:this.getProviderInfo(this._provider).name,eventProvider:this.getProviderInfo(e).name,currentAddress:o,newAddress:i,reason:"Address mismatch indicates wallet switch"}),this.isAutocaptureEnabled("disconnect")?[4,this.disconnect({chainId:this._evmChainId,address:this._evmAddress})]:[3,13]):[3,15]:[3,17];case 12:return a.sent(),[3,14];case 13:f.logger.debug("OnAccountsChanged: Disconnect event skipped during provider switch (autocapture.disconnect: false)"),this.clearChainState("evm"),a.label=14;case 14:return this.clearActiveProvider(),[3,16];case 15:return f.logger.info("OnAccountsChanged: Current provider still has accounts and same address, ignoring new provider",{activeProvider:this.getProviderInfo(this._provider).name,eventProvider:this.getProviderInfo(e).name,activeProviderAccountsCount:s.length,currentAddress:o,newAddress:i}),[2];case 16:return[3,20];case 17:return f.logger.info("OnAccountsChanged: Current provider has no accounts, switching to new provider",{oldProvider:this.getProviderInfo(this._provider).name,newProvider:this.getProviderInfo(e).name,reason:"Current provider has no accounts"}),this.isAutocaptureEnabled("disconnect")?[4,this.disconnect({chainId:this._evmChainId,address:this._evmAddress})]:[3,19];case 18:return a.sent(),[3,20];case 19:f.logger.debug("OnAccountsChanged: Disconnect event skipped for old provider (autocapture.disconnect: false)"),this.clearChainState("evm"),a.label=20;case 20:return[3,25];case 21:return c=a.sent(),f.logger.warn("OnAccountsChanged: Could not check current provider accounts, switching to new provider",{error:c instanceof Error?c.message:String(c),errorType:c instanceof Error?c.constructor.name:typeof c,oldProvider:this._provider?this.getProviderInfo(this._provider).name:"unknown",newProvider:this.getProviderInfo(e).name,reason:"Could not check current provider accounts"}),this.isAutocaptureEnabled("disconnect")?[4,this.disconnect({chainId:this._evmChainId,address:this._evmAddress})]:[3,23];case 22:return a.sent(),[3,24];case 23:f.logger.debug("OnAccountsChanged: Disconnect event skipped for failed provider check (autocapture.disconnect: false)"),this.clearChainState("evm"),a.label=24;case 24:return[3,25];case 25:return this._provider||(this._provider=e),this._provider===e&&n===this._evmAddress?[2]:[4,this.getCurrentChainId(e)];case 26:return u=a.sent(),d=!this._evmAddress,this.setChainState("evm",{address:n,chainId:u}),l=this.getProviderInfo(e),p=u||0,this.isAutocaptureEnabled("connect")?(f.logger.info("OnAccountsChanged: Detected wallet connection, emitting connect event",{chainId:u,address:n,wasDisconnected:d,providerName:l.name,rdns:l.rdns,hasChainId:!!u}),0===p&&f.logger.info("OnAccountsChanged: Using fallback chainId 0 for connect event"),this.connect({chainId:p,address:n},{providerName:l.name,rdns:l.rdns}).catch(function(e){f.logger.error("Failed to track connect event during account change:",e)})):f.logger.debug("OnAccountsChanged: Connect event skipped (autocapture.connect: false)",{chainId:u,address:n,providerName:l.name}),[2]}})})},e.prototype.registerChainChangedListener=function(e){var t=this;f.logger.info("registerChainChangedListener");var r=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.onChainChanged(e,r[0])};e.on("chainChanged",r),this.addProviderListener(e,"chainChanged",r)},e.prototype.onChainChanged=function(e,t){return o(this,void 0,void 0,function(){var r;return a(this,function(n){if(f.logger.info("onChainChanged",t),r=(0,E.parseChainId)(t),this.isProviderMismatch(e)&&this.handleProviderMismatch(e),!this._evmAddress)return f.logger.info("OnChainChanged: No current address, user appears disconnected"),[2,Promise.resolve()];this._provider||(this._provider=e),this.setChainState("evm",{chainId:r});try{if(this.isAutocaptureEnabled("chain"))return[2,this.chain({chainId:r,address:this._evmAddress})];f.logger.debug("OnChainChanged: Chain event skipped (autocapture.chain: false)",{chainId:this._evmChainId,address:this._evmAddress})}catch(e){f.logger.error("OnChainChanged: Failed to emit chain event:",e)}return[2]})})},e.prototype.registerConnectListener=function(e){var t=this;f.logger.info("registerConnectListener");var r=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=r[0];t.onConnected(e,o)};e.on("connect",r),this.addProviderListener(e,"connect",r)},e.prototype.registerDisconnectListener=function(e){var t=this;f.logger.info("registerDisconnectListener");var r=function(r){return o(t,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:if(this._provider!==e)return[2];if(f.logger.info("OnDisconnect: Wallet disconnect event received, current state:",{currentAddress:this._evmAddress,currentChainId:this._evmChainId}),!this.isAutocaptureEnabled("disconnect"))return[3,5];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.disconnect({chainId:this._evmChainId,address:this._evmAddress})];case 2:return r.sent(),[3,4];case 3:return t=r.sent(),f.logger.error("Error during disconnect in disconnect listener",t),[3,4];case 4:return[3,6];case 5:f.logger.debug("OnDisconnect: Disconnect event skipped (autocapture.disconnect: false)"),this.clearChainState("evm"),r.label=6;case 6:return[2]}})})};e.on("disconnect",r),this.addProviderListener(e,"disconnect",r)},e.prototype.onConnected=function(e,t){return o(this,void 0,void 0,function(){var r,n,o,i,s,c,u;return a(this,function(a){switch(a.label){case 0:f.logger.info("onConnected",t),a.label=1;case 1:return a.trys.push([1,3,,4]),(null==t?void 0:t.chainId)&&"string"==typeof t.chainId?(r=(0,E.parseChainId)(t.chainId),[4,this.getAddress(e)]):[2];case 2:return n=a.sent(),r&&n&&(o=!this._evmAddress,this._provider||(this._provider=e),(i=this._provider===e)&&this.setChainState("evm",{chainId:r,address:(0,y.validateAndChecksumAddress)(n)||void 0}),i&&this._evmAddress?(c=this.getProviderInfo(e),s=r||0,this.isAutocaptureEnabled("connect")?(f.logger.info("OnConnected: Detected wallet connection, emitting connect event",{chainId:r,wasDisconnected:o,providerName:c.name,rdns:c.rdns,hasChainId:!!r,isActiveProvider:i}),0===s&&f.logger.info("OnConnected: Using fallback chainId 0 for connect event"),this.connect({chainId:s,address:n},{providerName:c.name,rdns:c.rdns}).catch(function(e){f.logger.error("Failed to track connect event during provider connection:",e)})):f.logger.debug("OnConnected: Connect event skipped (autocapture.connect: false)",{chainId:r,address:n,providerName:c.name})):n&&!i&&(c=this.getProviderInfo(e),f.logger.debug("OnConnected: Skipping connect event for non-active provider",{chainId:r,providerName:c.name,rdns:c.rdns,isActiveProvider:i,activeProviderInfo:this._provider?this.getProviderInfo(this._provider):null}))),[3,4];case 3:return u=a.sent(),f.logger.error("Error handling connect event",u),[3,4];case 4:return[2]}})})},e.prototype.registerRequestListeners=function(e){var t=this;if(f.logger.info("registerRequestListeners"),e){var r=e.request;if(this.isProviderAlreadyWrapped(e,r))f.logger.info("Provider already wrapped with our SDK; skipping request wrapping.");else{var i=e.request.bind(e),s=function(r){return o(t,[r],void 0,function(t){var r,s,c,u,d,l,p,m=this,b=t.method,y=t.params;return a(this,function(t){switch(t.label){case 0:return Array.isArray(y)&&["eth_signTypedData_v4","personal_sign"].includes(b)?this.isAutocaptureEnabled("signature")?(s=this._evmChainId)?[3,2]:[4,this.getCurrentChainId(e)]:(f.logger.debug("Signature event skipped (autocapture.signature: false)",{method:b}),[2,i({method:b,params:y})]):[3,6];case 1:s=t.sent(),t.label=2;case 2:r=s,o(m,void 0,void 0,function(){return a(this,function(e){try{this.signature(n({status:h.SignatureStatus.REQUESTED},this.buildSignatureEventPayload(b,y,void 0,r)))}catch(e){f.logger.error("Formo: Failed to track signature request",e)}return[2]})}),t.label=3;case 3:return t.trys.push([3,5,,6]),[4,i({method:b,params:y})];case 4:return(c=t.sent())&&o(m,void 0,void 0,function(){return a(this,function(e){try{this.signature(n({status:h.SignatureStatus.CONFIRMED},this.buildSignatureEventPayload(b,y,c,r)))}catch(e){f.logger.error("Formo: Failed to track signature confirmation",e)}return[2]})}),[2,c];case 5:throw u=t.sent(),4001===(null==(p=u)?void 0:p.code)&&o(m,void 0,void 0,function(){return a(this,function(e){try{this.signature(n({status:h.SignatureStatus.REJECTED},this.buildSignatureEventPayload(b,y,void 0,r)))}catch(e){f.logger.error("Formo: Failed to track signature rejection",e)}return[2]})}),u;case 6:if(!Array.isArray(y)||"eth_sendTransaction"!==b||!y[0])return[3,10];if(!this.isAutocaptureEnabled("transaction"))return f.logger.debug("Transaction event skipped (autocapture.transaction: false)",{method:b}),[2,i({method:b,params:y})];o(m,void 0,void 0,function(){var t,r;return a(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.buildTransactionEventPayload(y,e)];case 1:return t=o.sent(),this.transaction(n({status:h.TransactionStatus.STARTED},t)),[3,3];case 2:return r=o.sent(),f.logger.error("Formo: Failed to track transaction start",r),[3,3];case 3:return[2]}})}),t.label=7;case 7:return t.trys.push([7,9,,10]),[4,i({method:b,params:y})];case 8:return d=t.sent(),o(m,void 0,void 0,function(){var t,r;return a(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.buildTransactionEventPayload(y,e)];case 1:return t=o.sent(),this.transaction(n(n({status:h.TransactionStatus.BROADCASTED},t),{transactionHash:d})),this.pollTransactionReceipt(e,d,t),[3,3];case 2:return r=o.sent(),f.logger.error("Formo: Failed to track transaction broadcast",r),[3,3];case 3:return[2]}})}),[2,d];case 9:throw l=t.sent(),4001===(null==(p=l)?void 0:p.code)&&o(m,void 0,void 0,function(){var t,r;return a(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.buildTransactionEventPayload(y,e)];case 1:return t=o.sent(),this.transaction(n({status:h.TransactionStatus.REJECTED},t)),[3,3];case 2:return r=o.sent(),f.logger.error("Formo: Failed to track transaction rejection",r),[3,3];case 3:return[2]}})}),l;case 10:return[2,i({method:b,params:y})]}})})};s[h.WRAPPED_REQUEST_SYMBOL]=!0,e[h.WRAPPED_REQUEST_REF_SYMBOL]=s;try{e.request=s}catch(e){f.logger.warn("Failed to wrap provider.request; skipping",e)}}}else f.logger.error("Provider not found for request (signature, transaction) tracking")},e.prototype.onLocationChange=function(){return o(this,void 0,void 0,function(){return a(this,function(e){return(0,u.cookie)().get(c.SESSION_CURRENT_URL_KEY)!==window.location.href&&((0,u.cookie)().set(c.SESSION_CURRENT_URL_KEY,window.location.href),this.trackPageHit()),[2]})})},e.prototype.trackPageHits=function(){return o(this,void 0,void 0,function(){var e,t,r=this;return a(this,function(n){return e=history.pushState,history.pushState=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t);return window.dispatchEvent(new window.Event("locationchange")),n},t=history.replaceState,history.replaceState=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e);return window.dispatchEvent(new window.Event("locationchange")),n},window.addEventListener("popstate",function(){return r.onLocationChange()}),window.addEventListener("locationchange",function(){return r.onLocationChange()}),[2]})})},e.prototype.trackPageHit=function(e,t,r,n,i){return o(this,void 0,void 0,function(){var s=this;return a(this,function(u){return this.shouldTrack()?(setTimeout(function(){o(s,void 0,void 0,function(){var o;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.trackEvent(c.EventType.PAGE,{category:e,name:t},r,n,i)];case 1:return a.sent(),[3,3];case 2:return o=a.sent(),f.logger.error("Formo: Failed to track page hit",o),[3,3];case 3:return[2]}})})},300),[2]):(f.logger.info("Track page hit: Skipping event due to tracking configuration"),[2])})})},e.prototype.trackEvent=function(e,t,r,i,s){return o(this,void 0,void 0,function(){var o;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),this.shouldTrack()?[4,this.eventManager.addEvent(n(n({type:e},t),{properties:r,context:i,callback:s}),this.currentAddress,this.currentUserId)]:(f.logger.info("Skipping ".concat(e," event due to tracking configuration")),[2]);case 1:return a.sent(),[3,3];case 2:return o=a.sent(),f.logger.error("Error tracking event:",o),[3,3];case 3:return[2]}})})},e.prototype.shouldTrack=function(){if(this.hasOptedOutTracking())return!1;if("boolean"==typeof this.options.tracking)return this.options.tracking;if(null!==this.options.tracking&&"object"==typeof this.options.tracking&&!Array.isArray(this.options.tracking)){var e=this.options.tracking,t=e.excludeHosts,r=void 0===t?[]:t,n=e.excludePaths,o=void 0===n?[]:n,a=e.excludeChains,i=void 0===a?[]:a;if(r.length>0&&"undefined"!=typeof window){var s=window.location.hostname;if(r.includes(s))return!1}if(o.length>0&&"undefined"!=typeof window){var c=window.location.pathname;if(o.includes(c))return!1}return!(i.length>0&&this.currentChainId&&i.includes(this.currentChainId))}return!(0,v.isLocalhost)()},e.prototype.isAutocaptureEnabled=function(e){return void 0===this.options.autocapture||("boolean"==typeof this.options.autocapture?this.options.autocapture:null===this.options.autocapture||"object"!=typeof this.options.autocapture||!1!==this.options.autocapture[e])},e.prototype.getProviderInfo=function(e){var t=this._providers.find(function(t){return t.provider===e});if(t)return{name:t.info.name,rdns:t.info.rdns};var r=(0,m.detectInjectedProviderInfo)(e);return{name:r.name,rdns:r.rdns}},e.prototype.getProviders=function(){return o(this,void 0,void 0,function(){var e,t,r,n,c,u,d,l,p,b=this;return a(this,function(h){if(e=(0,s.createStore)(),t=e.getProviders(),e.subscribe(function(e){t=e;for(var r=e.filter(function(e){var t=null==e?void 0:e.provider;return t&&!b._seenProviders.has(t)}),n=0,i=r;n<i.length;n++){var s=i[n];b.safeAddProviderDetail(s)}var c=e.filter(function(e){var t=null==e?void 0:e.provider;return!!t&&!b._trackedProviders.has(t)});c.length>0&&(b.trackProviders(c),o(b,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.detectWallets(c)];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),f.logger.error("Formo: Failed to detect wallets",e),[3,3];case 3:return[2]}})})),b.cleanupUnavailableProviders()}),0===t.length){if(r="undefined"!=typeof window?window.ethereum:void 0){if(this._injectedProviderDetail&&this._injectedProviderDetail.provider===r)return this._trackedProviders.has(r)||this.trackEIP1193Provider(r),this._providers.some(function(e){return e.provider===r})||(this._providers=i(i([],this._providers,!0),[this._injectedProviderDetail],!1)),[2,this._providers];this._trackedProviders.has(r)||this.trackEIP1193Provider(r),n=(0,m.detectInjectedProviderInfo)(r),c={provider:r,info:n},this._injectedProviderDetail=c,this.safeAddProviderDetail(c)}return[2,this._providers]}for(u=t.filter(function(e){var t=null==e?void 0:e.provider;return t&&!b._seenProviders.has(t)}),d=0,l=u;d<l.length;d++)p=l[d],this.safeAddProviderDetail(p);return[2,this._providers]})})},Object.defineProperty(e.prototype,"providers",{get:function(){return this._providers},enumerable:!1,configurable:!0}),e.prototype.detectWallets=function(e){return o(this,void 0,void 0,function(){var t,r,n,o;return a(this,function(a){switch(a.label){case 0:a.trys.push([0,5,,6]),t=0,r=e,a.label=1;case 1:return t<r.length?(n=r[t],[4,this.detect({providerName:null==n?void 0:n.info.name,rdns:null==n?void 0:n.info.rdns})]):[3,4];case 2:a.sent(),a.label=3;case 3:return t++,[3,1];case 4:return[3,6];case 5:return o=a.sent(),f.logger.error("Error detect all wallets:",o),[3,6];case 6:return[2]}})})},Object.defineProperty(e.prototype,"provider",{get:function(){return this._provider},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"solana",{get:function(){return this.solanaManager||(this.solanaManager=new A.SolanaManager(this)),this.solanaManager},enumerable:!1,configurable:!0}),e.prototype.getAddress=function(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(o){switch(o.label){case 0:if(this._chainState.evm.address)return[2,this._chainState.evm.address];if(!(t=e||this.provider))return f.logger.info("The provider is not set"),[2,null];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.getAccounts(t)];case 2:return(r=o.sent())&&r.length>0?[2,(0,y.validateAndChecksumAddress)(r[0])||null]:[3,4];case 3:return 4001!==(null==(n=o.sent())?void 0:n.code)&&f.logger.error("FormoAnalytics::getAccounts: eth_accounts threw an error",n),[2,null];case 4:return[2,null]}})})},e.prototype.getAccounts=function(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(o){switch(o.label){case 0:t=e||this.provider,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,null==t?void 0:t.request({method:"eth_accounts"})];case 2:return(r=o.sent())&&0!==r.length?[2,r.map(function(e){return(0,y.validateAndChecksumAddress)(e)}).filter(function(e){return void 0!==e})]:[2,null];case 3:return 4001!==(null==(n=o.sent())?void 0:n.code)&&f.logger.error("FormoAnalytics::getAccounts: eth_accounts threw an error",n),[2,null];case 4:return[2]}})})},e.prototype.getCurrentChainId=function(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(o){switch(o.label){case 0:if(!(t=e||this.provider))return f.logger.error("Provider not set for chain ID"),[2,0];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.request({method:"eth_chainId"})];case 2:return(r=o.sent())?[2,(0,E.parseChainId)(r)]:(f.logger.info("Chain id not found"),[2,0]);case 3:return n=o.sent(),f.logger.error("eth_chainId threw an error:",n),[2,0];case 4:return[2]}})})},e.prototype.buildSignatureEventPayload=function(e,t,r,o){var a,i="personal_sign"===e?t[1]:t[0],s=(0,y.validateAndChecksumAddress)(i);if(!s)throw new Error("Invalid address in signature payload: ".concat(i));var c={chainId:null!==(a=null!=o?o:this._evmChainId)&&void 0!==a?a:void 0,address:s};if("personal_sign"===e){var u=Buffer.from(t[0].slice(2),"hex").toString("utf8");return n(n(n({},c),{message:u}),r?{signatureHash:r}:{})}return n(n(n({},c),{message:t[1]}),r?{signatureHash:r}:{})},e.prototype.buildTransactionEventPayload=function(e,t){return o(this,void 0,void 0,function(){var r,o,i,s,c,u,d,l,f;return a(this,function(a){switch(a.label){case 0:if(r=e[0],o=r.data,i=r.from,s=r.to,c=r.value,!(u=(0,y.validateAndChecksumAddress)(i)))throw new Error("Invalid address in transaction payload: ".concat(i));return d=(0,g.extractBuilderCodes)(o),f={},(l=this._evmChainId)?[3,2]:[4,this.getCurrentChainId(t)];case 1:l=a.sent(),a.label=2;case 2:return[2,n.apply(void 0,[(f.chainId=l,f.data=o,f.address=u,f.to=s,f.value=c,f),d&&{builder_codes:d}])]}})})},e.prototype.pollTransactionReceipt=function(e,t,r){return o(this,arguments,void 0,function(e,t,r,i,s){var c,u,d=this;return void 0===i&&(i=10),void 0===s&&(s=3e3),a(this,function(l){return c=0,e?(u=function(){return o(d,void 0,void 0,function(){var o,d;return a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e.request({method:"eth_getTransactionReceipt",params:[t]})];case 1:if(o=a.sent()){if("0x1"===o.status||1===o.status)return this.transaction(n(n({status:h.TransactionStatus.CONFIRMED},r),{transactionHash:t})),[2];if("0x0"===o.status||0===o.status)return this.transaction(n(n({status:h.TransactionStatus.REVERTED},r),{transactionHash:t})),[2]}return[3,3];case 2:return d=a.sent(),f.logger.error("Error polling transaction receipt",d),[3,3];case 3:return++c<i&&setTimeout(u,s),[2]}})})},u(),[2]):[2]})})},e.prototype.removeProviderListeners=function(e){var t=this._providerListenersMap.get(e);if(t){for(var r=0,n=Object.entries(t);r<n.length;r++){var o=n[r],a=o[0],i=o[1];try{e.removeListener(a,i)}catch(e){f.logger.warn("Failed to remove listener for ".concat(String(a)),e)}}this._providerListenersMap.delete(e)}},e.prototype.untrackProvider=function(e){try{this.removeProviderListeners(e),this._trackedProviders.delete(e),this._provider===e&&this.clearActiveProvider()}catch(e){f.logger.warn("Failed to untrack provider",e)}},e.prototype.getTrackedProvidersCount=function(){return this._trackedProviders.size},e.prototype.getProviderState=function(){return{totalProviders:this._providers.length,trackedProviders:this._trackedProviders.size,seenProviders:this._seenProviders.size,activeProvider:!!this._provider}},e.prototype.cleanupUnavailableProviders=function(){for(var e=new Set(this._providers.map(function(e){return e.provider})),t=0,r=Array.from(this._trackedProviders);t<r.length;t++){var n=r[t];e.has(n)||(f.logger.info("Cleaning up unavailable provider: ".concat(n.constructor.name)),this.untrackProvider(n))}},e.prototype.isProviderAlreadyWrapped=function(e,t){return!(!t||"function"!=typeof t||!t[h.WRAPPED_REQUEST_SYMBOL]||e[h.WRAPPED_REQUEST_REF_SYMBOL]!==t)},e.prototype.handleProviderMismatch=function(e){this._provider?this.setChainState("evm",{address:void 0,chainId:void 0,provider:e}):this._provider=e},e.prototype.getNamespace=function(e){return(0,P.isSolanaChainId)(e)?"solana":"evm"},e.prototype.setChainState=function(e,t){var r="string"==typeof e?e:this.getNamespace(e),n=this._chainState[r];"address"in t&&(n.address=t.address),"chainId"in t?n.chainId=t.chainId:"number"==typeof e&&(n.chainId=e),"evm"===r&&"provider"in t&&(n.provider=t.provider),this._activeNamespace=r,this.syncDerivedState()},e.prototype.clearChainState=function(e){"evm"===("string"==typeof e?e:this.getNamespace(e))?this._chainState.evm={}:this._chainState.solana={},this.syncDerivedState()},e.prototype.syncDerivedState=function(){var e=this._activeNamespace;if(e){var t=this._chainState[e];if(t.address||t.chainId)return this.currentAddress=t.address,void(this.currentChainId=t.chainId)}var r="evm"===e?"solana":"evm",n=this._chainState[r];if(n.address||n.chainId)return this.currentAddress=n.address,this.currentChainId=n.chainId,void(this._activeNamespace=r);this.currentAddress=void 0,this.currentChainId=void 0},e.prototype.clearActiveProvider=function(){this._provider=void 0},e.prototype.safeAddProviderDetail=function(e){var t=null==e?void 0:e.provider;return!!t&&(this._providers.some(function(e){return e.provider===t})?(this._seenProviders.add(t),!1):(this._providers=i(i([],this._providers,!0),[e],!1),this._seenProviders.add(t),!0))},e}();t.FormoAnalytics=x},7055(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseChainId=function(e){return"string"!=typeof e?0:e.startsWith("0x")||e.startsWith("0X")?parseInt(e,16):parseInt(e,10)}},7064(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.OffchainLookupSenderMismatchError=t.OffchainLookupResponseMalformedError=t.OffchainLookupError=void 0;const n=r(8352),o=r(1682),a=r(9946);class i extends o.BaseError{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:o,urls:i}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map(e=>` ${(0,a.getUrl)(e)}`)],` Sender: ${o}`,` Data: ${r}`,` Callback selector: ${e}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}t.OffchainLookupError=i;class s extends o.BaseError{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,a.getUrl)(t)}`,`Response: ${(0,n.stringify)(e)}`],name:"OffchainLookupResponseMalformedError"})}}t.OffchainLookupResponseMalformedError=s;class c extends o.BaseError{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}t.OffchainLookupSenderMismatchError=c},7065(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCKED_ADDRESSES=t.DEAD_ADDRESS=t.ZERO_ADDRESS=t.DEFAULT_PROVIDER_ICON=t.CONSENT_OPT_OUT_KEY=t.LOCAL_ANONYMOUS_ID_KEY=t.SESSION_USER_ID_KEY=t.SESSION_CURRENT_URL_KEY=t.SESSION_TRAFFIC_SOURCE_KEY=void 0,t.SESSION_TRAFFIC_SOURCE_KEY="traffic-source",t.SESSION_CURRENT_URL_KEY="analytics-current-url",t.SESSION_USER_ID_KEY="user-id",t.LOCAL_ANONYMOUS_ID_KEY="anonymous-id",t.CONSENT_OPT_OUT_KEY="opt-out-tracking",t.DEFAULT_PROVIDER_ICON="data:image/svg+xml;base64,",t.ZERO_ADDRESS="0x0000000000000000000000000000000000000000",t.DEAD_ADDRESS="0x000000000000000000000000000000000000dEaD",t.BLOCKED_ADDRESSES=[t.ZERO_ADDRESS,t.DEAD_ADDRESS]},7102(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContractAddress=function(e){return"CREATE2"===e.opcode?f(e):l(e)},t.getCreateAddress=l,t.getCreate2Address=f;const n=r(1028),o=r(5561),a=r(5599),i=r(1972),s=r(1699),c=r(4314),u=r(1725),d=r(9868);function l(e){const t=(0,s.toBytes)((0,d.getAddress)(e.from));let r=(0,s.toBytes)(e.nonce);return 0===r[0]&&(r=new Uint8Array([])),(0,d.getAddress)(`0x${(0,u.keccak256)((0,c.toRlp)([t,r],"bytes")).slice(26)}`)}function f(e){const t=(0,s.toBytes)((0,d.getAddress)(e.from)),r=(0,a.pad)((0,o.isBytes)(e.salt)?e.salt:(0,s.toBytes)(e.salt),{size:32}),c="bytecodeHash"in e?(0,o.isBytes)(e.bytecodeHash)?e.bytecodeHash:(0,s.toBytes)(e.bytecodeHash):(0,u.keccak256)(e.bytecode,"bytes");return(0,d.getAddress)((0,i.slice)((0,u.keccak256)((0,n.concat)([(0,s.toBytes)("0xff"),t,r,c])),12))}},7178(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingTransactionFilter=async function(e){const t=(0,n.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}};const n=r(1691)},7188(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChecksumError=t.InvalidInputError=t.InvalidAddressError=void 0,t.assert=u,t.checksum=d,t.from=l,t.fromPublicKey=function(e,t={}){return l(`0x${i.keccak256(`0x${s.toHex(e).slice(4)}`).substring(26)}`,t)},t.isEqual=function(e,t){return u(e,{strict:!1}),u(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()},t.validate=function(e,t={}){const{strict:r=!0}=t??{};try{return u(e,{strict:r}),!0}catch{return!1}};const n=r(7223),o=r(5441),a=r(6573),i=r(1398),s=r(6744),c=/^0x[a-fA-F0-9]{40}$/;function u(e,t={}){const{strict:r=!0}=t;if(!c.test(e))throw new f({address:e,cause:new p});if(r){if(e.toLowerCase()===e)return;if(d(e)!==e)throw new f({address:e,cause:new m})}}function d(e){if(o.checksum.has(e))return o.checksum.get(e);u(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=i.keccak256(n.fromString(t),{as:"Bytes"}),a=t.split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&a[e]&&(a[e]=a[e].toUpperCase()),(15&r[e>>1])>=8&&a[e+1]&&(a[e+1]=a[e+1].toUpperCase());const s=`0x${a.join("")}`;return o.checksum.set(e,s),s}function l(e,t={}){const{checksum:r=!1}=t;return u(e),r?d(e):e}class f extends a.BaseError{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}t.InvalidAddressError=f;class p extends a.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}t.InvalidInputError=p;class m extends a.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}t.InvalidChecksumError=m},7223(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=t.SizeOverflowError=t.InvalidBytesTypeError=t.InvalidBytesBooleanError=void 0,t.assert=l,t.concat=function(...e){let t=0;for(const r of e)t+=r.length;const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r},t.from=function(e){return e instanceof Uint8Array?e:"string"==typeof e?p(e):f(e)},t.fromArray=f,t.fromBoolean=function(e,t={}){const{size:r}=t,n=new Uint8Array(1);return n[0]=Number(e),"number"==typeof r?(i.assertSize(n,r),m(n,r)):n},t.fromHex=p,t.fromNumber=function(e,t){return p(a.fromNumber(e,t))},t.fromString=function(e,t={}){const{size:r}=t,n=d.encode(e);return"number"==typeof r?(i.assertSize(n,r),b(n,r)):n},t.isEqual=function(e,t){return(0,n.equalBytes)(e,t)},t.padLeft=m,t.padRight=b,t.random=function(e){return crypto.getRandomValues(new Uint8Array(e))},t.size=function(e){return e.length},t.slice=function(e,t,r,n={}){const{strict:o}=n;i.assertStartOffset(e,t);const a=e.slice(t,r);return o&&i.assertEndOffset(a,t,r),a},t.toBigInt=function(e,t={}){const{size:r}=t;void 0!==r&&i.assertSize(e,r);const n=a.fromBytes(e,t);return a.toBigInt(n,t)},t.toBoolean=function(e,t={}){const{size:r}=t;let n=e;if(void 0!==r&&(i.assertSize(n,r),n=h(n)),n.length>1||n[0]>1)throw new g(n);return Boolean(n[0])},t.toHex=function(e,t={}){return a.fromBytes(e,t)},t.toNumber=function(e,t={}){const{size:r}=t;void 0!==r&&i.assertSize(e,r);const n=a.fromBytes(e,t);return a.toNumber(n,t)},t.toString=function(e,t={}){const{size:r}=t;let n=e;return void 0!==r&&(i.assertSize(n,r),n=y(n)),u.decode(n)},t.trimLeft=h,t.trimRight=y,t.validate=function(e){try{return l(e),!0}catch{return!1}};const n=r(9056),o=r(6573),a=r(1465),i=r(943),s=r(5313),c=r(7348),u=new TextDecoder,d=new TextEncoder;function l(e){if(!(e instanceof Uint8Array)){if(!e)throw new v(e);if("object"!=typeof e)throw new v(e);if(!("BYTES_PER_ELEMENT"in e))throw new v(e);if(1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name)throw new v(e)}}function f(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function p(e,t={}){const{size:r}=t;let n=e;r&&(s.assertSize(e,r),n=a.padRight(e,r));let c=n.slice(2);c.length%2&&(c=`0${c}`);const u=c.length/2,d=new Uint8Array(u);for(let e=0,t=0;e<u;e++){const r=i.charCodeToBase16(c.charCodeAt(t++)),n=i.charCodeToBase16(c.charCodeAt(t++));if(void 0===r||void 0===n)throw new o.BaseError(`Invalid byte sequence ("${c[t-2]}${c[t-1]}" in "${c}").`);d[e]=16*r+n}return d}function m(e,t){return i.pad(e,{dir:"left",size:t})}function b(e,t){return i.pad(e,{dir:"right",size:t})}function h(e){return i.trim(e,{dir:"left"})}function y(e){return i.trim(e,{dir:"right"})}class g extends o.BaseError{constructor(e){super(`Bytes value \`${e}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=g;class v extends o.BaseError{constructor(e){super(`Value \`${"object"==typeof e?c.stringify(e):e}\` of type \`${typeof e}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}t.InvalidBytesTypeError=v;class E extends o.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}t.SizeOverflowError=E;class w extends o.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=w;class P extends o.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=P},7246(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverPublicKey=async function({hash:e,signature:t}){const c=(0,n.isHex)(e)?e:(0,i.toHex)(e),{secp256k1:u}=await Promise.resolve().then(()=>r(7666));return`0x${(()=>{if("object"==typeof t&&"r"in t&&"s"in t){const{r:e,s:r,v:n,yParity:o}=t,i=s(Number(o??n));return new u.Signature((0,a.hexToBigInt)(e),(0,a.hexToBigInt)(r)).addRecoveryBit(i)}const e=(0,n.isHex)(t)?t:(0,i.toHex)(t);if(65!==(0,o.size)(e))throw new Error("invalid signature length");const r=s((0,a.hexToNumber)(`0x${e.slice(130)}`));return u.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(c.substring(2)).toHex(!1)}`};const n=r(6611),o=r(4025),a=r(4130),i=r(6669);function s(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw new Error("Invalid yParityOrV value")}},7266(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRequiredError=void 0;const n=r(1682);class o extends n.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}t.UrlRequiredError=o},7270(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashAuthorization=function(e){const{chainId:t,nonce:r,to:c}=e,u=e.contractAddress??e.address,d=(0,s.keccak256)((0,n.concatHex)(["0x05",(0,i.toRlp)([t?(0,a.numberToHex)(t):"0x",u,r?(0,a.numberToHex)(r):"0x"])]));return"bytes"===c?(0,o.hexToBytes)(d):d};const n=r(1028),o=r(1699),a=r(6669),i=r(4314),s=r(1725)},7282(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.checkAddressChecksum=t.isAddress=void 0,t.ensureIfUint8Array=s;var n=r(6745),o=r(5628),a=r(7393),i=r(9905);function s(e){var t;return e instanceof Uint8Array||"Uint8Array"!==(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)?e:Uint8Array.from(e)}t.isAddress=function(e,r){return void 0===r&&(r=!0),!("string"!=typeof e&&!(0,n.isUint8Array)(e))&&(o=(0,n.isUint8Array)(e)?(0,n.uint8ArrayToHexString)(e):"string"!=typeof e||(0,i.isHexStrict)(e)||e.toLowerCase().startsWith("0x")?e:"0x".concat(e),!!/^(0x)?[0-9a-f]{40}$/i.test(o)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(o)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(o))||!r||(0,t.checkAddressChecksum)(o)));var o},t.checkAddressChecksum=function(e){if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;for(var t=e.slice(2),r=(0,a.utf8ToBytes)(t.toLowerCase()),i=(0,n.uint8ArrayToHexString)((0,o.keccak256)(s(r))).slice(2),c=0;c<40;c+=1)if(parseInt(i[c],16)>7&&t[c].toUpperCase()!==t[c]||parseInt(i[c],16)<=7&&t[c].toLowerCase()!==t[c])return!1;return!0}},7290(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnits=function(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${a?`.${a}`:""}`}},7295(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatProof=function(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?(0,n.hexToNumber)(e.nonce):void 0,storageProof:e.storageProof?(t=e.storageProof,t.map(e=>({...e,value:BigInt(e.value)}))):void 0};var t};const n=r(9766)},7300(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAddress=async function(e,t){const{blockNumber:r,blockTag:b,coinType:h,name:y,gatewayUrls:g,strict:v}=t,{chain:E}=e,w=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!E)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,i.getChainContractAddress)({blockNumber:r,chain:E,contract:"ensUniversalResolver"})})(),P=E?.ensTlds;if(P&&!P.some(e=>y.endsWith(e)))return null;const A=null!=h?[(0,l.namehash)(y),BigInt(h)]:[(0,l.namehash)(y)];try{const t=(0,a.encodeFunctionData)({abi:n.addressResolverAbi,functionName:"addr",args:A}),i={address:w,abi:n.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,c.toHex)((0,f.packetToBytes)(y)),t,g??[d.localBatchGatewayUrl]],blockNumber:r,blockTag:b},u=(0,p.getAction)(e,m.readContract,"readContract"),l=await u(i);if("0x"===l[0])return null;const h=(0,o.decodeFunctionResult)({abi:n.addressResolverAbi,args:A,functionName:"addr",data:l[0]});return"0x"===h||"0x00"===(0,s.trim)(h)?null:h}catch(e){if(v)throw e;if((0,u.isNullUniversalResolverError)(e))return null;throw e}};const n=r(138),o=r(233),a=r(5108),i=r(9858),s=r(7716),c=r(6669),u=r(3327),d=r(546),l=r(5047),f=r(6818),p=r(3115),m=r(1855)},7330(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toBlobs=function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?(0,s.hexToBytes)(e.data):e.data,u=(0,i.size)(r);if(!u)throw new o.EmptyBlobError;if(u>n.maxBytesPerTransaction)throw new o.BlobSizeTooLargeError({maxSize:n.maxBytesPerTransaction,size:u});const d=[];let l=!0,f=0;for(;l;){const e=(0,a.createCursor)(new Uint8Array(n.bytesPerBlob));let t=0;for(;t<n.fieldElementsPerBlob;){const o=r.slice(f,f+(n.bytesPerFieldElement-1));if(e.pushByte(0),e.pushBytes(o),o.length<31){e.pushByte(128),l=!1;break}t++,f+=31}d.push(e)}return"bytes"===t?d.map(e=>e.bytes):d.map(e=>(0,c.bytesToHex)(e.bytes))};const n=r(9586),o=r(7524),a=r(9463),i=r(4025),s=r(1699),c=r(6669)},7348(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return JSON.parse(e,(e,n)=>{const o=n;return"string"==typeof o&&o.endsWith(r)?BigInt(o.slice(0,-9)):"function"==typeof t?t(e,o):o})},t.stringify=function(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+r:n,n)};const r="#__bigint"},7365(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAvatarRecord=async function(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?async function(e,{gatewayUrls:t,record:r}){const o=(0,n.parseNftUri)(r),a=await(0,n.getNftTokenUri)(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:c}=(0,n.resolveAvatarUri)({uri:a,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const e=c?atob(i.replace("data:application/json;base64,","")):i,r=JSON.parse(e);return(0,n.parseAvatarUri)({uri:(0,n.getJsonImage)(r),gatewayUrls:t})}let u=o.tokenID;return"erc1155"===o.namespace&&(u=u.replace("0x","").padStart(64,"0")),(0,n.getMetadataAvatarUri)({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,u)})}(e,{gatewayUrls:t,record:r}):(0,n.parseAvatarUri)({uri:r,gatewayUrls:t})};const n=r(9839)},7382(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setBalance=async function(e,{address:t,value:r}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[t,(0,n.numberToHex)(r)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,(0,n.numberToHex)(r)]})};const n=r(6669)},7383(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getGasPrice=async function(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}},7393(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertBytes=t.assertBool=t.utf8ToBytes=t.toHex=t.createView=t.concatBytes=t.bytesToHex=void 0,t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,a.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>((0,o.abytes)(t),e(t))};const n=r(6839);Object.defineProperty(t,"assertBool",{enumerable:!0,get:function(){return n.abool}});const o=r(681);Object.defineProperty(t,"assertBytes",{enumerable:!0,get:function(){return o.abytes}});const a=r(11);var i=r(11);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return i.createView}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}})},7397(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.flattenObject=a,t.concatCalldataWithSuffix=function(e,t){if(!t||"0x"===t)return e;var r=s();if(null==r?void 0:r.concatHex)return r.concatHex([e,t]);var n=t.replace(/^0x/i,"");return"".concat(e).concat(n)},t.encodeWriteContractData=function(e,t,r){try{var n=s();return n?n.encodeFunctionData({abi:e,functionName:t,args:r||[]}):void o.logger.debug("WagmiEventHandler: viem not available, cannot encode function data")}catch(e){return void o.logger.warn("WagmiEventHandler: Failed to encode function data",e)}},t.extractFunctionArgs=function(e,t,r){if(e&&t&&r&&Array.isArray(r))try{var n=e.find(function(e){return"function"===e.type&&e.name===t});if(!(null==n?void 0:n.inputs)||!Array.isArray(n.inputs))return;var a={};return n.inputs.forEach(function(e,t){if(t<r.length){var n=r[t],o=e.name||"arg".concat(t);a[o]=i(n)}}),a}catch(e){return void o.logger.warn("WagmiEventHandler: Failed to extract function args",e)}},t.buildSafeFunctionArgs=function(e,t){if(e){for(var r={},n=0,i=Object.entries(e);n<i.length;n++){var s=i[n],c=s[0],u=s[1],d=t.has(c)?"arg_".concat(c):c;if(r[d]=u,null!==u&&"object"==typeof u&&!Array.isArray(u))for(var l=a(u,d),f=0,p=Object.entries(l);f<p.length;f++){var m=p[f],b=m[0],h=m[1];b in r?o.logger.debug("WagmiEventHandler: Skipping flattened key collision",{flatKey:b,existingValue:r[b]}):r[b]=h}}return r}};var n,o=r(6973);function a(e,t){void 0===t&&(t="");for(var r={},n=0,o=Object.entries(e);n<o.length;n++){var i=o[n],s=i[0],c=i[1],u=t?"".concat(t,"_").concat(s):s;if(null===c||"object"!=typeof c||Array.isArray(c))r[u]=c;else{var d=a(c,u);Object.assign(r,d)}}return r}function i(e){if("bigint"==typeof e)return e.toString();if(Array.isArray(e))return e.map(i);if(null!==e&&"object"==typeof e){for(var t={},r=0,n=Object.entries(e);r<n.length;r++){var o=n[r],a=o[0],s=o[1];t[a]=i(s)}return t}return e}function s(){if(void 0!==n)return n;try{var e=r(719);if(null==e?void 0:e.encodeFunctionData)return n={encodeFunctionData:e.encodeFunctionData,concatHex:e.concatHex}}catch(e){}return n=null,null}},7399(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e,t){return(0,n.keccak256)((0,o.toPrefixedMessage)(e),t)};const n=r(1725),o=r(6823)},7416(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createWalletClient=function(e){const{key:t="wallet",name:r="Wallet Client",transport:a}=e;return(0,n.createClient)({...e,key:t,name:r,transport:a,type:"walletClient"}).extend(o.walletActions)};const n=r(4745),o=r(4366)},7424(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isTupleRegex=t.integerRegex=t.bytesRegex=void 0,t.execTyped=function(e,t){const r=e.exec(t);return r?.groups},t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,t.isTupleRegex=/^\(.+?\).*?$/},7462(e,t,r){var n=r(758),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,a={},u=null,d=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(d=t.ref),t)i.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:u,ref:d,props:a,_owner:s.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},7472(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.webSocket=function(e,t={}){const{keepAlive:r,key:c="webSocket",methods:u,name:d="WebSocket JSON-RPC",reconnect:l,retryDelay:f}=t;return({chain:p,retryCount:m,timeout:b})=>{const h=t.retryCount??m,y=b??t.timeout??1e4,g=e||p?.rpcUrls.default.webSocket?.[0],v={keepAlive:r,reconnect:l};if(!g)throw new o.UrlRequiredError;return(0,s.createTransport)({key:c,methods:u,name:d,async request({method:e,params:t}){const r={method:e,params:t},o=await(0,i.getWebSocketRpcClient)(g,v),{error:a,result:s}=await o.requestAsync({body:r,timeout:y});if(a)throw new n.RpcRequestError({body:r,error:a,url:g});return s},retryCount:h,retryDelay:f,timeout:y,type:"webSocket"},{getSocket:()=>(0,a.getSocket)(g),getRpcClient:()=>(0,i.getWebSocketRpcClient)(g,v),async subscribe({params:e,onData:t,onError:r}){const n=await(0,i.getWebSocketRpcClient)(g,v),{result:o}=await new Promise((o,a)=>n.request({body:{method:"eth_subscribe",params:e},onError(e){a(e),r?.(e)},onResponse(e){if(e.error)return a(e.error),void r?.(e.error);"number"!=typeof e.id?"eth_subscription"===e.method&&t(e.params):o(e)}}));return{subscriptionId:o,unsubscribe:async()=>new Promise(e=>n.request({body:{method:"eth_unsubscribe",params:[o]},onResponse:e}))}}})}};const n=r(3318),o=r(7266),a=r(9787),i=r(9574),s=r(2102)},7477(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransaction=t.transactionType=void 0,t.formatTransaction=a;const n=r(4130),o=r(9783);function a(e,r){const o={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,n.hexToNumber)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,n.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?t.transactionType[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(o.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),o.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof o.v){if(0n===o.v||27n===o.v)return 0;if(1n===o.v||28n===o.v)return 1;if(o.v>=35n)return o.v%2n==0n?1:0}})(),"legacy"===o.type&&(delete o.accessList,delete o.maxFeePerBlobGas,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas,delete o.yParity),"eip2930"===o.type&&(delete o.maxFeePerBlobGas,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas),"eip1559"===o.type&&delete o.maxFeePerBlobGas,o}t.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"},t.defineTransaction=(0,o.defineFormatter)("transaction",a)},7505(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FilterTypeNotSupportedError=void 0;const n=r(1682);class o extends n.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}t.FilterTypeNotSupportedError=o},7520(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parameterCache=void 0,t.getParameterCacheKey=function(e,t,r){let n="";if(r)for(const e of Object.entries(r)){if(!e)continue;let t="";for(const r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:e},t.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])},7524(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidVersionedHashVersionError=t.InvalidVersionedHashSizeError=t.EmptyBlobError=t.BlobSizeTooLargeError=void 0;const n=r(8579),o=r(1682);class a extends o.BaseError{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}t.BlobSizeTooLargeError=a;class i extends o.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}t.EmptyBlobError=i;class s extends o.BaseError{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}t.InvalidVersionedHashSizeError=s;class c extends o.BaseError{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${n.versionedHashVersionKzg}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}t.InvalidVersionedHashVersionError=c},7532(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaManager=t.parsePrivyProperties=void 0;var a=r(9114);o(r(5494),t),o(r(7039),t),o(r(3078),t);var i=r(5643);Object.defineProperty(t,"parsePrivyProperties",{enumerable:!0,get:function(){return i.parsePrivyProperties}});var s=r(9965);Object.defineProperty(t,"SolanaManager",{enumerable:!0,get:function(){return s.SolanaManager}}),"undefined"!=typeof window&&(window.formofy=a.formofy)},7572(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setMinGasPrice=async function(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,n.numberToHex)(t)]})};const n=r(6669)},7617(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WRAPPED_REQUEST_REF_SYMBOL=t.WRAPPED_REQUEST_SYMBOL=void 0,t.WRAPPED_REQUEST_SYMBOL=Symbol("formoWrappedRequest"),t.WRAPPED_REQUEST_REF_SYMBOL=Symbol("formoWrappedRequestRef")},7624(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressEqual=function(e,t){if(!(0,o.isAddress)(e,{strict:!1}))throw new n.InvalidAddressError({address:e});if(!(0,o.isAddress)(t,{strict:!1}))throw new n.InvalidAddressError({address:t});return e.toLowerCase()===t.toLowerCase()};const n=r(1611),o=r(2018)},7660(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(...e){const[t,r]=(()=>{if(Array.isArray(e[0])){const[t,r]=e;return[s(t),r]}return e})(),{bytecode:n}=r;if(0===t.inputs.length)return;const o=r.data.replace(n,"0x");return a.decode(t.inputs,o)},t.encode=function(...e){const[t,r]=(()=>{if(Array.isArray(e[0])){const[t,r]=e;return[s(t),r]}return e})(),{bytecode:n,args:o}=r;return i.concat(n,t.inputs?.length&&o?.length?a.encode(t.inputs,o):"0x")},t.format=function(e){return n.formatAbiItem(e)},t.from=function(e){return o.from(e)},t.fromAbi=s;const n=r(844),o=r(5057),a=r(7818),i=r(1465);function s(e){const t=e.find(e=>"constructor"===e.type);if(!t)throw new o.NotFoundError({name:"constructor"});return t}},7666(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;const n=r(4072),o=r(11),a=r(2534),i=r(165),s=r(2107),c=r(9056),u=r(933),d=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(0),p=BigInt(1),m=BigInt(2),b=(e,t)=>(e+t/m)/t;function h(e){const t=d,r=BigInt(3),n=BigInt(6),o=BigInt(11),a=BigInt(22),i=BigInt(23),c=BigInt(44),u=BigInt(88),l=e*e*e%t,f=l*l*e%t,p=(0,s.pow2)(f,r,t)*f%t,b=(0,s.pow2)(p,r,t)*f%t,h=(0,s.pow2)(b,m,t)*l%t,g=(0,s.pow2)(h,o,t)*h%t,v=(0,s.pow2)(g,a,t)*g%t,E=(0,s.pow2)(v,c,t)*v%t,w=(0,s.pow2)(E,u,t)*E%t,P=(0,s.pow2)(w,c,t)*v%t,A=(0,s.pow2)(P,r,t)*f%t,x=(0,s.pow2)(A,i,t)*g%t,I=(0,s.pow2)(x,n,t)*l%t,S=(0,s.pow2)(I,m,t);if(!y.eql(y.sqr(S),e))throw new Error("Cannot find square root");return S}const y=(0,s.Field)(d,void 0,void 0,{sqrt:h});t.secp256k1=(0,a.createCurve)({a:f,b:BigInt(7),Fp:y,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=l,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-p*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,i=BigInt("0x100000000000000000000000000000000"),c=b(a*e,t),u=b(-n*e,t);let d=(0,s.mod)(e-c*r-u*o,t),f=(0,s.mod)(-c*n-u*a,t);const m=d>i,h=f>i;if(m&&(d=t-d),h&&(f=t-f),d>i||f>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:m,k1:d,k2neg:h,k2:f}}}},n.sha256);const g={};function v(e,...t){let r=g[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));r=(0,c.concatBytes)(t,t),g[e]=r}return(0,n.sha256)((0,c.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),w=e=>(0,c.numberToBytesBE)(e,32),P=e=>(0,s.mod)(e,d),A=e=>(0,s.mod)(e,l),x=(()=>t.secp256k1.ProjectivePoint)();function I(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=x.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:A(-r),bytes:E(n)}}function S(e){(0,c.aInRange)("x",e,p,d);const t=P(e*e);let r=h(P(t*e+BigInt(7)));r%m!==f&&(r=P(-r));const n=new x(e,r,p);return n.assertValidity(),n}const T=c.bytesToNumberBE;function O(...e){return A(T(v("BIP0340/challenge",...e)))}function _(e,t,r){const n=(0,c.ensureBytes)("signature",e,64),o=(0,c.ensureBytes)("message",t),a=(0,c.ensureBytes)("publicKey",r,32);try{const e=S(T(a)),t=T(n.subarray(0,32));if(!(0,c.inRange)(t,p,d))return!1;const r=T(n.subarray(32,64));if(!(0,c.inRange)(r,p,l))return!1;const f=O(w(t),E(e),o),m=(i=e,s=r,u=A(-f),x.BASE.multiplyAndAddUnsafe(i,s,u));return!(!m||!m.hasEvenY()||m.toAffine().x!==t)}catch(e){return!1}var i,s,u}t.schnorr={getPublicKey:function(e){return I(e).bytes},sign:function(e,t,r=(0,o.randomBytes)(32)){const n=(0,c.ensureBytes)("message",e),{bytes:a,scalar:i}=I(t),s=(0,c.ensureBytes)("auxRand",r,32),u=w(i^T(v("BIP0340/aux",s))),d=v("BIP0340/nonce",u,a,n),l=A(T(d));if(l===f)throw new Error("sign failed: k is zero");const{bytes:p,scalar:m}=I(l),b=O(p,a,n),h=new Uint8Array(64);if(h.set(p,0),h.set(w(A(m+b*i)),32),!_(h,n,a))throw new Error("sign: Invalid signature produced");return h},verify:_,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:S,pointToBytes:E,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:v,mod:s.mod}};const j=(()=>(0,i.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),C=(()=>(0,u.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))();t.secp256k1_hasher=(0,i.createHasher)(t.secp256k1.ProjectivePoint,e=>{const{x:t,y:r}=C(y.create(e[0]));return j(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},7680(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlockTimestampInterval=async function(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}},7690(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseErc6492Signature=function(e){if(!(0,o.isErc6492Signature)(e))return{signature:e};const[t,r,a]=(0,n.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],e);return{address:t,data:r,signature:a}};const n=r(8448),o=r(2439)},7702(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContractEvents=async function(e,t){const{abi:r,address:i,args:s,blockHash:c,eventName:u,fromBlock:d,toBlock:l,strict:f}=t,p=u?(0,n.getAbiItem)({abi:r,name:u}):void 0,m=p?void 0:r.filter(e=>"event"===e.type);return(0,o.getAction)(e,a.getLogs,"getLogs")({address:i,args:s,blockHash:c,event:p,events:m,fromBlock:d,toBlock:l,strict:f})};const n=r(3123),o=r(3115),a=r(4950)},7705(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setCode=async function(e,{address:t,bytecode:r}){"ganache"===e.mode?await e.request({method:"evm_setAccountCode",params:[t,r]}):await e.request({method:`${e.mode}_setCode`,params:[t,r]})}},7716(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.trim=function(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)n++;return r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}},7734(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=o,t.Chi=function(e,t,r){return e&t^~e&r},t.Maj=function(e,t,r){return e&t^e&r^t&r};const n=r(11);function o(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),a=BigInt(4294967295),i=Number(r>>o&a),s=Number(r&a),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,s,n)}class a extends n.Hash{constructor(e,t,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);const{view:t,buffer:r,blockLen:o}=this,a=e.length;for(let i=0;i<a;){const s=Math.min(o-this.pos,a-i);if(s===o){const t=(0,n.createView)(e);for(;o<=a-i;i+=o)this.process(t,i);continue}r.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.aexists)(this),(0,n.aoutput)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:a,isLE:i}=this;let{pos:s}=this;t[s++]=128,(0,n.clean)(this.buffer.subarray(s)),this.padOffset>a-s&&(this.process(r,0),s=0);for(let e=s;e<a;e++)t[e]=0;o(r,a-8,BigInt(8*this.length),i),this.process(r,0);const c=(0,n.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=u/4,l=this.get();if(d>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)c.setUint32(4*e,l[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:a,pos:i}=this;return e.destroyed=a,e.finished=o,e.length=n,e.pos=i,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}t.HashMD=a,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},7743(e,t){var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},n=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return r(this,void 0,void 0,function(){var r,a,i,s,c,u,d,l,f;return n(this,function(p){switch(p.label){case 0:a=(r=t||{}).retries,i=void 0===a?0:a,s=r.retryDelay,c=r.retryOn,u=o(r,["retries","retryDelay","retryOn"]),d=function(t){var r,o,a,d;return n(this,function(n){switch(n.label){case 0:r=t===i,n.label=1;case 1:return n.trys.push([1,6,,10]),[4,globalThis.fetch(e,u)];case 2:return(o=n.sent()).ok||r?[2,{value:o}]:((a=new Error(o.statusText)).response=o,(null==c?void 0:c(t,a,o))?s?[4,new Promise(function(e){return setTimeout(e,s(t))})]:[3,4]:[3,5]);case 3:n.sent(),n.label=4;case 4:return[2,"continue"];case 5:return[2,{value:o}];case 6:if(d=n.sent(),r)throw d;return(null==c?void 0:c(t,d,null))?s?[4,new Promise(function(e){return setTimeout(e,s(t))})]:[3,8]:[3,9];case 7:n.sent(),n.label=8;case 8:return[2,"continue"];case 9:throw d;case 10:return[2]}})},l=0,p.label=1;case 1:return l<=i?[5,d(l)]:[3,4];case 2:if("object"==typeof(f=p.sent()))return[2,f.value];p.label=3;case 3:return l++,[3,1];case 4:throw new Error("Unexpected: retry loop exited without returning or throwing")}})})}},7752(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.commitmentToVersionedHash=function(e){const{commitment:t,version:r=1}=e,a=e.to??("string"==typeof t?"hex":"bytes"),i=(0,o.sha256)(t,"bytes");return i.set([r],0),"bytes"===a?i:(0,n.bytesToHex)(i)};const n=r(6669),o=r(27)},7771(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNullish=void 0,t.isNullish=function(e){return null==e}},7799(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAvatar=async function(e,{blockNumber:t,blockTag:r,assetGatewayUrls:i,name:s,gatewayUrls:c,strict:u,universalResolverAddress:d}){const l=await(0,o.getAction)(e,a.getEnsText,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:d,gatewayUrls:c,strict:u});if(!l)return null;try{return await(0,n.parseAvatarRecord)(e,{record:l,gatewayUrls:i})}catch{return null}};const n=r(7365),o=r(3115),a=r(6453)},7816(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EstimateGasExecutionError=void 0;const n=r(2945),o=r(1825),a=r(1682),i=r(979);class s extends a.BaseError{constructor(e,{account:t,docsPath:r,chain:a,data:s,gas:c,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:l,nonce:f,to:p,value:m}){const b=(0,i.prettyPrint)({from:t?.address,to:p,value:void 0!==m&&`${(0,n.formatEther)(m)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:c,gasPrice:void 0!==u&&`${(0,o.formatGwei)(u)} gwei`,maxFeePerGas:void 0!==d&&`${(0,o.formatGwei)(d)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,o.formatGwei)(l)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.EstimateGasExecutionError=s},7818(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTypeError=t.InvalidArrayError=t.LengthMismatchError=t.BytesSizeMismatchError=t.ArrayLengthMismatchError=t.ZeroDataError=t.DataSizeTooSmallError=void 0,t.decode=function(e,t,r={}){const{as:n="Array",checksumAddress:o=!1}=r,i="string"==typeof t?a.fromHex(t):t,d=u.create(i);if(0===a.size(i)&&e.length>0)throw new p;if(a.size(i)&&a.size(i)<32)throw new f({data:"string"==typeof t?t:s.fromBytes(t),parameters:e,size:a.size(i)});let l=0;const m="Array"===n?[]:{};for(let t=0;t<e.length;++t){const r=e[t];d.setPosition(l);const[a,i]=c.decodeParameter(d,r,{checksumAddress:o,staticPosition:0});l+=i,"Array"===n?m.push(a):m[r.name??t]=a}return m},t.encode=function(e,t,r){const{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new h({expectedLength:e.length,givenLength:t.length});const o=c.prepareParameters({checksumAddress:n,parameters:e,values:t}),a=c.encode(o);return 0===a.length?"0x":a},t.encodePacked=l,t.format=function(e){return n.formatAbiParameters(e)},t.from=function(e){return Array.isArray(e)&&"string"==typeof e[0]||"string"==typeof e?n.parseAbiParameters(e):e};const n=r(844),o=r(7188),a=r(7223),i=r(6573),s=r(1465),c=r(6946),u=r(896),d=r(2683);function l(e,t){if(e.length!==t.length)throw new h({expectedLength:e.length,givenLength:t.length});const r=[];for(let n=0;n<e.length;n++){const o=e[n],a=t[n];r.push(l.encode(o,a))}return s.concat(...r)}!function(e){e.encode=function e(t,r,n=!1){if("address"===t){const e=r;return o.assert(e),s.padLeft(e.toLowerCase(),n?32:0)}if("string"===t)return s.fromString(r);if("bytes"===t)return r;if("bool"===t)return s.padLeft(s.fromBoolean(r),n?32:1);const a=t.match(d.integerRegex);if(a){const[e,t,o="256"]=a,i=Number.parseInt(o,10)/8;return s.fromNumber(r,{size:n?32:i,signed:"int"===t})}const i=t.match(d.bytesRegex);if(i){const[e,t]=i;if(Number.parseInt(t,10)!==(r.length-2)/2)throw new b({expectedSize:Number.parseInt(t,10),value:r});return s.padRight(r,n?32:0)}const c=t.match(d.arrayRegex);if(c&&Array.isArray(r)){const[t,n]=c,o=[];for(let t=0;t<r.length;t++)o.push(e(n,r[t],!0));return 0===o.length?"0x":s.concat(...o)}throw new g(t)}}(l||(t.encodePacked=l={}));class f extends i.BaseError{constructor({data:e,parameters:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${n.formatAbiParameters(t)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}t.DataSizeTooSmallError=f;class p extends i.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}t.ZeroDataError=p;class m extends i.BaseError{constructor({expectedLength:e,givenLength:t,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}t.ArrayLengthMismatchError=m;class b extends i.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${s.size(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}t.BytesSizeMismatchError=b;class h extends i.BaseError{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}t.LengthMismatchError=h;class y extends i.BaseError{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}t.InvalidArrayError=y;class g extends i.BaseError{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}t.InvalidTypeError=g},7824(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=async function({address:e,message:t,signature:r}){return(0,o.isAddressEqual)((0,n.getAddress)(e),await(0,a.recoverMessageAddress)({message:t,signature:r}))};const n=r(9868),o=r(7624),a=r(2517)},7875(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signAuthorization=async function(e,t){const{account:r=e.account}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const i=(0,n.parseAccount)(r);if(!i.signAuthorization)throw new o.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:i.type});const s=await(0,a.prepareAuthorization)(e,t);return i.signAuthorization(s)};const n=r(9546),o=r(8328),a=r(2921)},7905(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createTestClient=function(e){const{key:t="test",name:r="Test Client",mode:a}=e;return(0,n.createClient)({...e,key:t,name:r,type:"testClient"}).extend(e=>({mode:a,...(0,o.testActions)({mode:a})(e)}))};const n=r(4745),o=r(5091)},7916(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnits=function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new n.InvalidDecimalNumberError({value:e});let[r,o="0"]=e.split(".");const a=r.startsWith("-");if(a&&(r=r.slice(1)),o=o.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${o}`))&&(r=`${BigInt(r)+1n}`),o="";else if(o.length>t){const[e,n,a]=[o.slice(0,t-1),o.slice(t-1,t),o.slice(t)],i=Math.round(Number(`${n}.${a}`));o=i>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${i}`,o.length>t&&(o=o.slice(1),r=`${BigInt(r)+1n}`),o=o.slice(0,t)}else o=o.padEnd(t,"0");return BigInt(`${a?"-":""}${r}${o}`)};const n=r(8197)},7934(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.memory=t.session=t.local=t.cookie=void 0,t.initStorageManager=function(e){i||(i=new a.StorageManager(e))};var a=r(2008);o(r(8672),t);var i=null;function s(e){if(!i)throw new Error("StorageManager not initialized. Call initStorageManager(writeKey) first.");return i.getStorage(e)}t.cookie=function(){return s("cookieStorage")},t.local=function(){return s("localStorage")},t.session=function(){return s("sessionStorage")},t.memory=function(){return s("memoryStorage")}},7960(e,t){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletReadyState=t.DEFAULT_SOLANA_CHAIN_ID=t.SOLANA_CLUSTERS_BY_ID=t.SOLANA_CHAIN_IDS=void 0,t.isSolanaChainId=function(e){return null!=e&&Object.values(t.SOLANA_CHAIN_IDS).includes(e)},t.isSolanaWalletContext=function(e){return null!=e&&"object"==typeof e&&"wallets"in e&&Array.isArray(e.wallets)},t.isSolanaAdapter=function(e){return null!=e&&"object"==typeof e&&"name"in e&&"connect"in e&&!("wallets"in e)},t.SOLANA_CHAIN_IDS={"mainnet-beta":900001,testnet:900002,devnet:900003,localnet:900004},t.SOLANA_CLUSTERS_BY_ID={900001:"mainnet-beta",900002:"testnet",900003:"devnet",900004:"localnet"},t.DEFAULT_SOLANA_CHAIN_ID=t.SOLANA_CHAIN_IDS["mainnet-beta"],function(e){e.Installed="Installed",e.NotDetected="NotDetected",e.Loadable="Loadable",e.Unsupported="Unsupported"}(r||(t.WalletReadyState=r={}))},7977(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbi=function(e){const t=(0,o.parseStructs)(e),r=[],i=e.length;for(let o=0;o<i;o++){const i=e[o];(0,n.isStructSignature)(i)||r.push((0,a.parseSignature)(i,t))}return r};const n=r(4512),o=r(8689),a=r(790)},8030(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BundleFailedError=void 0;const n=r(1682);class o extends n.BaseError{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}}t.BundleFailedError=o},8064(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const n=r(5207);class o extends Error{constructor(e,t={}){const r=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${n.version}`].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=o},8132(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsResolver=async function(e,t){const{blockNumber:r,blockTag:c,name:u}=t,{chain:d}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!d)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,n.getChainContractAddress)({blockNumber:r,chain:d,contract:"ensUniversalResolver"})})(),f=d?.ensTlds;if(f&&!f.some(e=>u.endsWith(e)))throw new Error(`${u} is not a valid ENS TLD (${f?.join(", ")}) for chain "${d.name}" (id: ${d.id}).`);const[p]=await(0,i.getAction)(e,s.readContract,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.toHex)((0,a.packetToBytes)(u))],blockNumber:r,blockTag:c});return p};const n=r(9858),o=r(6669),a=r(6818),i=r(3115),s=r(1855)},8144(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;const n=r(9061);class o extends n.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=o;class a extends n.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=a;class i extends n.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=i;class s extends n.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}t.SolidityProtectedKeywordError=s;class c extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}t.InvalidModifierError=c;class u extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}t.InvalidFunctionModifierError=u;class d extends n.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=d},8165(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.zeroHash=t.erc6492MagicBytes=void 0,t.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",t.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},8197(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDecimalNumberError=void 0;const n=r(1682);class o extends n.BaseError{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}t.InvalidDecimalNumberError=o},8248(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchEvent=function(e,{address:t,args:r,batch:y=!0,event:g,events:v,fromBlock:E,onError:w,onLogs:P,poll:A,pollingInterval:x=e.pollingInterval,strict:I}){const S=void 0!==A?A:"bigint"==typeof E||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type),T=I??!1;return S?(()=>{const n=(0,l.stringify)(["watchEvent",t,r,y,e.uid,g,x,E]);return(0,u.observe)(n,{onLogs:P,onError:w},n=>{let a,i;void 0!==E&&(a=E-1n);let s=!1;const u=(0,d.poll)(async()=>{if(s)try{let o;if(i)o=await(0,c.getAction)(e,m.getFilterChanges,"getFilterChanges")({filter:i});else{const n=await(0,c.getAction)(e,p.getBlockNumber,"getBlockNumber")({});o=a&&a!==n?await(0,c.getAction)(e,b.getLogs,"getLogs")({address:t,args:r,event:g,events:v,fromBlock:a+1n,toBlock:n}):[],a=n}if(0===o.length)return;if(y)n.onLogs(o);else for(const e of o)n.onLogs([e])}catch(e){i&&e instanceof o.InvalidInputRpcError&&(s=!1),n.onError?.(e)}else{try{i=await(0,c.getAction)(e,f.createEventFilter,"createEventFilter")({address:t,args:r,event:g,events:v,strict:T,fromBlock:E})}catch{}s=!0}},{emitOnBegin:!0,interval:x});return async()=>{i&&await(0,c.getAction)(e,h.uninstallFilter,"uninstallFilter")({filter:i}),u()}})})():(()=>{let o=!0,c=()=>o=!1;return(async()=>{try{const u=(()=>{if("fallback"===e.transport.type){const t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),d=v??(g?[g]:void 0);let l=[];if(d){const e=d.flatMap(e=>(0,i.encodeEventTopics)({abi:[e],eventName:e.name,args:r}));l=[e],g&&(l=l[0])}const{unsubscribe:f}=await u.subscribe({params:["logs",{address:t,topics:l}],onData(e){if(!o)return;const t=e.result;try{const{eventName:e,args:r}=(0,a.decodeEventLog)({abi:d??[],data:t.data,topics:t.topics,strict:T}),n=(0,s.formatLog)(t,{args:r,eventName:e});P([n])}catch(e){let r,o;if(e instanceof n.DecodeLogDataMismatch||e instanceof n.DecodeLogTopicsMismatch){if(I)return;r=e.abiItem.name,o=e.abiItem.inputs?.some(e=>!("name"in e&&e.name))}const a=(0,s.formatLog)(t,{args:o?[]:{},eventName:r});P([a])}},onError(e){w?.(e)}});c=f,o||c()}catch(e){w?.(e)}})(),()=>c()})()};const n=r(9797),o=r(2564),a=r(6218),i=r(574),s=r(9475),c=r(3115),u=r(9097),d=r(2464),l=r(8352),f=r(5219),p=r(5725),m=r(4602),b=r(4950),h=r(1841)},8301(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getPermissions=async function(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}},8311(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameters=function(e){let t="";const r=e.length;for(let o=0;o<r;o++){const a=e[o];t+=(0,n.formatAbiParameter)(a),o!==r-1&&(t+=", ")}return t};const n=r(8504)},8325(e,t){var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.Logger=void 0;var n=function(){function e(e,t){void 0===e&&(e=!1),void 0===t&&(t=[]),this.enabled=e,this.enabledLevels=new Set(t)}return e.init=function(t){var r=e.getInstance();void 0!==t.enabled&&r.setEnabled(t.enabled),void 0!==t.enabledLevels&&r.setEnabledLevels(t.enabledLevels)},e.getInstance=function(t){var r,n;return e.instance||(e.instance=new e(null!==(r=null==t?void 0:t.enabled)&&void 0!==r&&r,null!==(n=null==t?void 0:t.enabledLevels)&&void 0!==n?n:[])),e.instance},e.prototype.setEnabled=function(e){this.enabled=e},e.prototype.isLoggingEnabled=function(){return this.enabled},e.prototype.setEnabledLevels=function(e){this.enabledLevels=new Set(e)},e.prototype.getEnabledLevels=function(){return Array.from(this.enabledLevels)},e.prototype.shouldLog=function(e){return!!this.enabled&&this.enabledLevels.has(e)},e.prototype.formatMessage=function(e){var t=(new Date).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return"[Formo SDK][".concat(t,"] ").concat(e)},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("debug")&&console.debug.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("info")&&console.info.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("warn")&&console.warn.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("error")&&console.error.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.shouldLog("trace")&&console.trace.apply(console,r([this.formatMessage(e)],t,!1))},e.prototype.log=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.info.apply(this,r([e],t,!1))},e}();t.Logger=n,t.logger=n.getInstance()},8328(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTypeNotSupportedError=t.AccountNotFoundError=void 0;const n=r(1682);class o extends n.BaseError{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}t.AccountNotFoundError=o;class a extends n.BaseError{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}t.AccountTypeNotSupportedError=a},8351(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stopImpersonatingAccount=async function(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}},8352(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0,t.stringify=(e,t,r)=>JSON.stringify(e,(e,r)=>{const n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},8412(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extractBuilderCodes=function(e){if(e&&"string"==typeof e){var t=e.startsWith("0x")||e.startsWith("0X")?e.slice(2).toLowerCase():e.toLowerCase();if(!(t.length<38)){var r=t.length-32;if("80218021802180218021802180218021"===t.slice(r)){var n=r-2;if(!(n<0)){var o=t.slice(n,r);if("00"===o||"01"===o){var a=function(e,t){var r=t-2;if(!(r<0)){var n=parseInt(e.slice(r,t),16);if(0!==n&&!isNaN(n)){var o=r-2*n;if(!(o<0)){var a=function(e){for(var t=[],r=0;r<e.length;r+=2){var n=parseInt(e.slice(r,r+2),16);if(isNaN(n)||n<32||n>126)return;t.push(n)}for(var o=[],a=[],i=0,s=t;i<s.length;i++)44===(n=s[i])?a.length>0&&(o.push(String.fromCharCode.apply(String,a)),a=[]):a.push(n);return a.length>0&&o.push(String.fromCharCode.apply(String,a)),o.length>0?o.join(","):void 0}(e.slice(o,r));if(a)return{codes:a,codesStart:o}}}}}(t,n);return null==a?void 0:a.codes}}}}}}},8430(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedData=async function(e,t){const{account:r=e.account,domain:i,message:s,primaryType:c}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const u=(0,n.parseAccount)(r),d={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:i}),...t.types};if((0,a.validateTypedData)({domain:i,message:s,primaryType:c,types:d}),u.signTypedData)return u.signTypedData({domain:i,message:s,primaryType:c,types:d});const l=(0,a.serializeTypedData)({domain:i,message:s,primaryType:c,types:d});return e.request({method:"eth_signTypedData_v4",params:[u.address,l]},{retryCount:0})};const n=r(9546),o=r(8328),a=r(4413)},8448(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAbiParameters=function(e,t){const r="string"==typeof t?(0,d.hexToBytes)(t):t,o=(0,a.createCursor)(r);if(0===(0,i.size)(r)&&e.length>0)throw new n.AbiDecodingZeroDataError;if((0,i.size)(t)&&(0,i.size)(t)<32)throw new n.AbiDecodingDataSizeTooSmallError({data:"string"==typeof t?t:(0,l.bytesToHex)(t),params:e,size:(0,i.size)(t)});let s=0;const c=[];for(let t=0;t<e.length;++t){const r=e[t];o.setPosition(s);const[n,a]=p(o,r,{staticPosition:0});s+=a,c.push(n)}return c};const n=r(9797),o=r(9868),a=r(9463),i=r(4025),s=r(1972),c=r(7716),u=r(4436),d=r(1699),l=r(6669),f=r(3224);function p(e,t,{staticPosition:r}){const a=(0,f.getArrayComponents)(t.type);if(a){const[n,o]=a;return function(e,t,{length:r,staticPosition:n}){if(!r){const r=n+(0,u.bytesToNumber)(e.readBytes(32)),o=r+32;e.setPosition(r);const a=(0,u.bytesToNumber)(e.readBytes(32)),i=b(t);let s=0;const c=[];for(let r=0;r<a;++r){e.setPosition(o+(i?32*r:s));const[n,a]=p(e,t,{staticPosition:o});s+=a,c.push(n)}return e.setPosition(n+32),[c,32]}if(b(t)){const o=n+(0,u.bytesToNumber)(e.readBytes(32)),a=[];for(let n=0;n<r;++n){e.setPosition(o+32*n);const[r]=p(e,t,{staticPosition:o});a.push(r)}return e.setPosition(n+32),[a,32]}let o=0;const a=[];for(let i=0;i<r;++i){const[r,i]=p(e,t,{staticPosition:n+o});o+=i,a.push(r)}return[a,o]}(e,{...t,type:o},{length:n,staticPosition:r})}if("tuple"===t.type)return function(e,t,{staticPosition:r}){const n=0===t.components.length||t.components.some(({name:e})=>!e),o=n?[]:{};let a=0;if(b(t)){const i=r+(0,u.bytesToNumber)(e.readBytes(m));for(let r=0;r<t.components.length;++r){const s=t.components[r];e.setPosition(i+a);const[c,u]=p(e,s,{staticPosition:i});a+=u,o[n?r:s?.name]=c}return e.setPosition(r+32),[o,32]}for(let i=0;i<t.components.length;++i){const s=t.components[i],[c,u]=p(e,s,{staticPosition:r});o[n?i:s?.name]=c,a+=u}return[o,a]}(e,t,{staticPosition:r});if("address"===t.type)return function(e){const t=e.readBytes(32);return[(0,o.checksumAddress)((0,l.bytesToHex)((0,s.sliceBytes)(t,-20))),32]}(e);if("bool"===t.type)return function(e){return[(0,u.bytesToBool)(e.readBytes(32),{size:32}),32]}(e);if(t.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){const[n,o]=t.type.split("bytes");if(!o){const t=(0,u.bytesToNumber)(e.readBytes(32));e.setPosition(r+t);const n=(0,u.bytesToNumber)(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];const o=e.readBytes(n);return e.setPosition(r+32),[(0,l.bytesToHex)(o),32]}return[(0,l.bytesToHex)(e.readBytes(Number.parseInt(o,10),32)),32]}(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),o=e.readBytes(32);return[n>48?(0,u.bytesToBigInt)(o,{signed:r}):(0,u.bytesToNumber)(o,{signed:r}),32]}(e,t);if("string"===t.type)return function(e,{staticPosition:t}){const r=t+(0,u.bytesToNumber)(e.readBytes(32));e.setPosition(r);const n=(0,u.bytesToNumber)(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];const o=e.readBytes(n,32),a=(0,u.bytesToString)((0,c.trim)(o));return e.setPosition(t+32),[a,32]}(e,{staticPosition:r});throw new n.InvalidAbiDecodingTypeError(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const m=32;function b(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(b);const r=(0,f.getArrayComponents)(e.type);return!(!r||!b({...e,type:r[1]}))}},8492(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=void 0,t.maxInt8=127n,t.maxInt16=32767n,t.maxInt24=8388607n,t.maxInt32=2n**31n-1n,t.maxInt40=2n**39n-1n,t.maxInt48=2n**47n-1n,t.maxInt56=2n**55n-1n,t.maxInt64=2n**63n-1n,t.maxInt72=2n**71n-1n,t.maxInt80=2n**79n-1n,t.maxInt88=2n**87n-1n,t.maxInt96=2n**95n-1n,t.maxInt104=2n**103n-1n,t.maxInt112=2n**111n-1n,t.maxInt120=2n**119n-1n,t.maxInt128=2n**127n-1n,t.maxInt136=2n**135n-1n,t.maxInt144=2n**143n-1n,t.maxInt152=2n**151n-1n,t.maxInt160=2n**159n-1n,t.maxInt168=2n**167n-1n,t.maxInt176=2n**175n-1n,t.maxInt184=2n**183n-1n,t.maxInt192=2n**191n-1n,t.maxInt200=2n**199n-1n,t.maxInt208=2n**207n-1n,t.maxInt216=2n**215n-1n,t.maxInt224=2n**223n-1n,t.maxInt232=2n**231n-1n,t.maxInt240=2n**239n-1n,t.maxInt248=2n**247n-1n,t.maxInt256=2n**255n-1n,t.minInt8=-128n,t.minInt16=-32768n,t.minInt24=-8388608n,t.minInt32=-(2n**31n),t.minInt40=-(2n**39n),t.minInt48=-(2n**47n),t.minInt56=-(2n**55n),t.minInt64=-(2n**63n),t.minInt72=-(2n**71n),t.minInt80=-(2n**79n),t.minInt88=-(2n**87n),t.minInt96=-(2n**95n),t.minInt104=-(2n**103n),t.minInt112=-(2n**111n),t.minInt120=-(2n**119n),t.minInt128=-(2n**127n),t.minInt136=-(2n**135n),t.minInt144=-(2n**143n),t.minInt152=-(2n**151n),t.minInt160=-(2n**159n),t.minInt168=-(2n**167n),t.minInt176=-(2n**175n),t.minInt184=-(2n**183n),t.minInt192=-(2n**191n),t.minInt200=-(2n**199n),t.minInt208=-(2n**207n),t.minInt216=-(2n**215n),t.minInt224=-(2n**223n),t.minInt232=-(2n**231n),t.minInt240=-(2n**239n),t.minInt248=-(2n**247n),t.minInt256=-(2n**255n),t.maxUint8=255n,t.maxUint16=65535n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},8504(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameter=function e(t){let r=t.type;if(o.test(t.type)&&"components"in t){r="(";const a=t.components.length;for(let n=0;n<a;n++){r+=e(t.components[n]),n<a-1&&(r+=", ")}const i=(0,n.execTyped)(o,t.type);return r+=`)${i?.array??""}`,e({...t,type:r})}return"indexed"in t&&t.indexed&&(r=`${r} indexed`),t.name?`${r} ${t.name}`:r};const n=r(7424),o=/^tuple(?<array>(\[(\d*)\])*)$/},8522(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAddress=t.validateAndChecksumAddress=t.toChecksumAddress=t.isBlockedAddress=t.getValidAddress=t.isValidAddress=void 0;var n=r(5628),o=r(7393),a=r(4378),i=r(7771),s=r(9874),c=r(6433),u=r(7960),d=function(e){return"string"==typeof e&&""!==e.trim()&&(0,a.isAddress)(e.trim())?e.trim():null};t.isValidAddress=function(e){return null!==d(e)},t.getValidAddress=function(e){return d(e)},t.isBlockedAddress=function(e){if(!e)return!1;var r=(0,t.getValidAddress)(e);if(!r)return!1;var n=(0,t.toChecksumAddress)(r);return s.BLOCKED_ADDRESSES.some(function(e){return(0,t.toChecksumAddress)(e)===n})},t.toChecksumAddress=function(e){if(!(0,a.isAddress)(e,!1))throw new Error("Invalid address "+e);var t=e.toLowerCase().replace(/^0x/i,""),r=(0,a.uint8ArrayToHexString)((0,n.keccak256)((0,a.ensureIfUint8Array)((0,o.utf8ToBytes)(t))));if((0,i.isNullish)(r)||"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===r)return"";for(var s="0x",c=r.replace(/^0x/i,""),u=0;u<t.length;u+=1)parseInt(c[u],16)>7?s+=t[u].toUpperCase():s+=t[u];return s},t.validateAndChecksumAddress=function(e){var r=(0,t.getValidAddress)(e);return r?(0,t.toChecksumAddress)(r):void 0},t.validateAddress=function(e,r){var n=Object.values(u.SOLANA_CHAIN_IDS);return null!=r&&n.includes(r)?(0,c.getValidSolanaAddress)(e)||void 0:null!=r?(0,t.validateAndChecksumAddress)(e):(0,t.validateAndChecksumAddress)(e)||(0,c.isSolanaAddress)(e)&&(0,c.getValidSolanaAddress)(e)||void 0}},8527(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.aggregate3Signature=void 0,t.aggregate3Signature="0x82ad56cb"},8528(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacked=function(e,t){if(e.length!==t.length)throw new n.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});const r=[];for(let n=0;n<e.length;n++){const o=e[n],a=t[n];r.push(d(o,a))}return(0,i.concatHex)(r)};const n=r(9797),o=r(1611),a=r(2018),i=r(1028),s=r(5599),c=r(6669),u=r(9622);function d(e,t,r=!1){if("address"===e){const e=t;if(!(0,a.isAddress)(e))throw new o.InvalidAddressError({address:e});return(0,s.pad)(e.toLowerCase(),{size:r?32:null})}if("string"===e)return(0,c.stringToHex)(t);if("bytes"===e)return t;if("bool"===e)return(0,s.pad)((0,c.boolToHex)(t),{size:r?32:1});const l=e.match(u.integerRegex);if(l){const[e,n,o="256"]=l,a=Number.parseInt(o,10)/8;return(0,c.numberToHex)(t,{size:r?32:a,signed:"int"===n})}const f=e.match(u.bytesRegex);if(f){const[e,o]=f;if(Number.parseInt(o,10)!==(t.length-2)/2)throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(o,10),givenSize:(t.length-2)/2});return(0,s.pad)(t,{dir:"right",size:r?32:null})}const p=e.match(u.arrayRegex);if(p&&Array.isArray(t)){const[e,r]=p,n=[];for(let e=0;e<t.length;e++)n.push(d(r,t[e],!0));return 0===n.length?"0x":(0,i.concatHex)(n)}throw new n.UnsupportedPackedAbiType(e)}},8558(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=function(e){const t=[],r=e.length;for(let o=0;o<r;o++){const r=e[o],a=(0,n.formatAbiItem)(r);t.push(a)}return t};const n=r(945)},8579(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.versionedHashVersionKzg=void 0,t.versionedHashVersionKzg=1},8613(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventFactory=void 0;var s=r(9874),c=r(8930),u=r(8522),d=r(9210),l=r(4378),f=r(6973),p=i(r(4014)),m=r(7934),b=r(4632),h=r(2094),y=r(5402),g=r(5082),v=function(){function e(e){var t,r=this;if(this.extractUTMParameters=function(e){var t={utm_campaign:"",utm_content:"",utm_medium:"",utm_source:"",utm_term:""};try{new URL(e).searchParams.forEach(function(e,r){r.startsWith("utm_")&&(t[r]=e.trim())})}catch(e){}return t},this.extractReferralParameter=function(e){for(var t,n,o,a=0,i=(null===(t=r.options)||void 0===t?void 0:t.referral)&&null!==(n=r.options.referral.queryParams)&&void 0!==n?n:["ref","referral","refcode"];a<i.length;a++){var s=i[a],c=null===(o=e.searchParams.get(s))||void 0===o?void 0:o.trim();if(c)return c}if(r.compiledPathPattern){var u=e.pathname.match(r.compiledPathPattern);if(u&&u[1]){var d=u[1].trim();if(d)return d}}return""},this.getTrafficSources=function(e){var t=new URL(e),o=n(n({},r.extractUTMParameters(e)),{ref:r.extractReferralParameter(t),referrer:document.referrer}),a=(0,m.session)().get(s.SESSION_TRAFFIC_SOURCE_KEY)||{},i={ref:o.ref||(null==a?void 0:a.ref)||"",referrer:o.referrer||(null==a?void 0:a.referrer)||"",utm_campaign:o.utm_campaign||(null==a?void 0:a.utm_campaign)||"",utm_content:o.utm_content||(null==a?void 0:a.utm_content)||"",utm_medium:o.utm_medium||(null==a?void 0:a.utm_medium)||"",utm_source:o.utm_source||(null==a?void 0:a.utm_source)||"",utm_term:o.utm_term||(null==a?void 0:a.utm_term)||""},c=Object.keys(i).reduce(function(e,t){var r=i[t];return(0,l.isUndefined)(r)||""===r||(e[t]=r),e},{});return Object.keys(c).length&&(0,m.session)().set(s.SESSION_TRAFFIC_SOURCE_KEY,c),i},this.getPageProperties=function(e){var t=n({},e);(0,l.isUndefined)(t.url)&&(t.url=new URL(globalThis.location.href).href),(0,l.isUndefined)(t.path)&&(t.path=globalThis.location.pathname),(0,l.isUndefined)(t.hash)&&(t.hash=globalThis.location.hash),(0,l.isUndefined)(t.query)&&(t.query=globalThis.location.search.slice(1));try{new URL(globalThis.location.href).searchParams.forEach(function(e,r){(0,l.isUndefined)(t[r])&&!h.PAGE_PROPERTIES_EXCLUDED_FIELDS.has(r)&&(t[r]=e)})}catch(e){f.logger.error("Error parsing query parameters for page properties:",e)}return t},this.options=e,null===(t=null==e?void 0:e.referral)||void 0===t?void 0:t.pathPattern)try{this.compiledPathPattern=new RegExp(e.referral.pathPattern)}catch(t){f.logger.warn("Invalid referral path pattern: ".concat(e.referral.pathPattern,". Error: ").concat(t))}}return e.prototype.validateEventAddress=function(e,t){return e&&(0,u.validateAddress)(e,t)||null},e.prototype.getTimezone=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return f.logger.error("Error resolving timezone:",e),""}},e.prototype.getLocation=function(){try{var e=this.getTimezone();return e in s.COUNTRY_LIST?s.COUNTRY_LIST[e]:e}catch(e){return f.logger.error("Error resolving location:",e),""}},e.prototype.getLanguage=function(){try{return(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language)||"en"}catch(e){return f.logger.error("Error resolving language:",e),"en"}},e.prototype.getLibraryVersion=function(){return b.version},e.prototype.getScreen=function(){var e,t;try{return{screen_width:(null===(e=globalThis.screen)||void 0===e?void 0:e.width)||0,screen_height:(null===(t=globalThis.screen)||void 0===t?void 0:t.height)||0,screen_density:globalThis.devicePixelRatio||1,viewport_width:globalThis.innerWidth||0,viewport_height:globalThis.innerHeight||0}}catch(e){return f.logger.error("Error resolving screen properties:",e),{screen_width:0,screen_height:0,screen_density:1,viewport_width:0,viewport_height:0}}},e.prototype.generateContext=function(e){return o(this,void 0,void 0,function(){var t,r,o,i,s,c;return a(this,function(a){switch(a.label){case 0:return[4,(0,g.detectBrowser)()];case 1:return t=a.sent(),r=this.getLanguage(),o=this.getTimezone(),i=this.getLocation(),s=this.getLibraryVersion(),c=n(n(n({user_agent:globalThis.navigator.userAgent,locale:r,timezone:o,location:i},this.getTrafficSources(globalThis.location.href)),{page_title:document.title,page_url:globalThis.location.href,library_name:"Formo Web SDK",library_version:s,browser:t}),this.getScreen()),[2,(0,p.default)(c,e||{})]}})})},e.prototype.getEnrichedEvent=function(e,t){return o(this,void 0,void 0,function(){var r,n,o,i,u,l;return a(this,function(a){switch(a.label){case 0:return u={},[4,this.generateContext(t)];case 1:return u.context=a.sent(),u.original_timestamp=(0,d.getCurrentTimeFormatted)(),u.user_id=e.user_id,u.type=e.type,u.channel=h.CHANNEL,u.version=h.VERSION,(r=u).anonymous_id=(0,y.generateAnonymousId)(s.LOCAL_ANONYMOUS_ID_KEY),n=null===(l=e.properties)||void 0===l?void 0:l.chainId,o=this.validateEventAddress(e.address,n),r.address=o,void 0===(i=(0,p.default)(e,r)).event&&(i.event=null),void 0===i.properties&&(i.properties=null),[2,(0,c.toSnakeCase)(i)]}})})},e.prototype.generatePageEvent=function(e,t,r,i){return o(this,void 0,void 0,function(){var o,s;return a(this,function(a){return(o=n({},null!=r?r:{})).category=e,o.name=t,o=this.getPageProperties(o),s={properties:o,type:"page"},[2,this.getEnrichedEvent(s,i)]})})},e.prototype.generateDetectWalletEvent=function(e,t,r,i){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n({providerName:e,rdns:t},r),type:"detect"},[2,this.getEnrichedEvent(o,i)]})})},e.prototype.generateIdentifyEvent=function(e,t,r,i,s,c){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n(n(n({},void 0!==e&&{providerName:e}),void 0!==t&&{rdns:t}),s),user_id:i,address:r,type:"identify"},[2,this.getEnrichedEvent(o,c)]})})},e.prototype.generateConnectEvent=function(e,t,r,i){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n({chainId:e},r),address:t,type:"connect"},[2,this.getEnrichedEvent(o,i)]})})},e.prototype.generateDisconnectEvent=function(e,t,r,i){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n({chainId:e},r),address:t,type:"disconnect"},[2,this.getEnrichedEvent(o,i)]})})},e.prototype.generateChainChangedEvent=function(e,t,r,i){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n({chainId:e},r),address:t,type:"chain"},[2,this.getEnrichedEvent(o,i)]})})},e.prototype.generateSignatureEvent=function(e,t,r,i,s,c,u){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n(n({status:e,chainId:t,message:i},s&&{signatureHash:s}),c),address:r,type:"signature"},[2,this.getEnrichedEvent(o,u)]})})},e.prototype.generateTransactionEvent=function(e,t,r,i,s,c,u,d,l,f,p,m){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n(n(n(n(n(n(n(n({status:e,chainId:t},i&&{data:i}),s&&{to:s}),c&&{value:c}),u&&{transactionHash:u}),d&&{function_name:d}),l&&{function_args:l}),f&&{builder_codes:f}),p),address:r,type:"transaction"},[2,this.getEnrichedEvent(o,m)]})})},e.prototype.generateTrackEvent=function(e,t,r){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o={properties:n(n(n(n({},t),void 0!==(null==t?void 0:t.revenue)&&{revenue:Number(t.revenue),currency:("string"==typeof(null==t?void 0:t.currency)?t.currency:"USD").toLowerCase()}),void 0!==(null==t?void 0:t.points)&&{points:Number(t.points)}),void 0!==(null==t?void 0:t.volume)&&{volume:Number(t.volume)}),event:e,type:"track"},[2,this.getEnrichedEvent(o,r)]})})},e.prototype.create=function(e,t,r){return o(this,void 0,void 0,function(){var n,o;return a(this,function(a){switch(a.label){case 0:switch(n={},e.type){case"page":return[3,1];case"detect":return[3,3];case"identify":return[3,5];case"chain":return[3,7];case"connect":return[3,9];case"disconnect":return[3,11];case"signature":return[3,13];case"transaction":return[3,15];case"track":return[3,17]}return[3,17];case 1:return[4,this.generatePageEvent(e.category,e.name,e.properties,e.context)];case 2:case 4:case 6:case 8:case 10:case 12:case 14:case 16:case 18:return n=a.sent(),[3,19];case 3:return[4,this.generateDetectWalletEvent(e.providerName,e.rdns,e.properties,e.context)];case 5:return[4,this.generateIdentifyEvent(e.providerName,e.rdns,e.address,e.userId,e.properties,e.context)];case 7:return[4,this.generateChainChangedEvent(e.chainId,e.address,e.properties,e.context)];case 9:return[4,this.generateConnectEvent(e.chainId,e.address,e.properties,e.context)];case 11:return[4,this.generateDisconnectEvent(e.chainId,e.address,e.properties,e.context)];case 13:return[4,this.generateSignatureEvent(e.status,e.chainId,e.address,e.message,e.signatureHash,e.properties,e.context)];case 15:return[4,this.generateTransactionEvent(e.status,e.chainId,e.address,e.data,e.to,e.value,e.transactionHash,e.function_name,e.function_args,e.builder_codes,e.properties,e.context)];case 17:return[4,this.generateTrackEvent(e.event,e.properties,e.context)];case 19:return void 0!==n.address&&null!==n.address||"identify"===e.type||(o="chainId"in e?e.chainId:void 0,n.address=this.validateEventAddress(t,o)),n.user_id=r||null,[2,n]}})})},e}();t.EventFactory=v},8620(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(2704),o=r(2024),a=function(){function e(e){this.writeKey=e}return e.prototype.getKey=function(e){return"".concat(n.KEY_PREFIX,"_").concat((0,o.secureHash)(this.writeKey),"_").concat(e)},e}();t.default=a},8649(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameters=function(e){const t=[];if("string"==typeof e){const r=(0,i.splitParameters)(e),n=r.length;for(let e=0;e<n;e++)t.push((0,s.parseAbiParameter)(r[e],{modifiers:o.modifiers}))}else{const r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){const n=e[a];if((0,o.isStructSignature)(n))continue;const c=(0,i.splitParameters)(n),u=c.length;for(let e=0;e<u;e++)t.push((0,s.parseAbiParameter)(c[e],{modifiers:o.modifiers,structs:r}))}}if(0===t.length)throw new n.InvalidAbiParametersError({params:e});return t};const n=r(5653),o=r(4512),a=r(8689),i=r(790),s=r(790)},8672(e,t){Object.defineProperty(t,"__esModule",{value:!0})},8688(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertTransactionEIP7702=function(e){const{authorizationList:t}=e;if(t)for(const e of t){const{chainId:t}=e,r=e.address;if(!(0,d.isAddress)(r))throw new a.InvalidAddressError({address:r});if(t<0)throw new c.InvalidChainIdError({chainId:t})}m(e)},t.assertTransactionEIP4844=function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new s.EmptyBlobError;for(const e of t){const t=(0,l.size)(e),r=(0,p.hexToNumber)((0,f.slice)(e,0,1));if(32!==t)throw new s.InvalidVersionedHashSizeError({hash:e,size:t});if(r!==n.versionedHashVersionKzg)throw new s.InvalidVersionedHashVersionError({hash:e,version:r})}}m(e)},t.assertTransactionEIP1559=m,t.assertTransactionEIP2930=function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:l}=e;if(t<=0)throw new c.InvalidChainIdError({chainId:t});if(l&&!(0,d.isAddress)(l))throw new a.InvalidAddressError({address:l});if(r||s)throw new i.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>o.maxUint256)throw new u.FeeCapTooHighError({maxFeePerGas:n})},t.assertTransactionLegacy=function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:l}=e;if(l&&!(0,d.isAddress)(l))throw new a.InvalidAddressError({address:l});if(void 0!==t&&t<=0)throw new c.InvalidChainIdError({chainId:t});if(r||s)throw new i.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>o.maxUint256)throw new u.FeeCapTooHighError({maxFeePerGas:n})};const n=r(8579),o=r(8492),a=r(1611),i=r(1682),s=r(7524),c=r(2078),u=r(6687),d=r(2018),l=r(4025),f=r(1972),p=r(4130);function m(e){const{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:i}=e;if(t<=0)throw new c.InvalidChainIdError({chainId:t});if(i&&!(0,d.isAddress)(i))throw new a.InvalidAddressError({address:i});if(n&&n>o.maxUint256)throw new u.FeeCapTooHighError({maxFeePerGas:n});if(r&&n&&r>n)throw new u.TipAboveFeeCapError({maxFeePerGas:n,maxPriorityFeePerGas:r})}},8689(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=function(e){const t={},r=e.length;for(let n=0;n<r;n++){const r=e[n];if(!(0,c.isStructSignature)(r))continue;const o=(0,c.execStructSignature)(r);if(!o)throw new i.InvalidSignatureError({signature:r,type:"struct"});const a=o.properties.split(";"),s=[],d=a.length;for(let e=0;e<d;e++){const t=a[e].trim();if(!t)continue;const r=(0,u.parseAbiParameter)(t,{type:"struct"});s.push(r)}if(!s.length)throw new i.InvalidStructSignatureError({signature:r});t[o.name]=s}const n={},o=Object.entries(t),a=o.length;for(let e=0;e<a;e++){const[r,a]=o[e];n[r]=l(a,t)}return n};const n=r(7424),o=r(243),a=r(5653),i=r(2544),s=r(6569),c=r(4512),u=r(790),d=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function l(e,t,r=new Set){const i=[],c=e.length;for(let f=0;f<c;f++){const c=e[f];if(n.isTupleRegex.test(c.type))i.push(c);else{const e=(0,n.execTyped)(d,c.type);if(!e?.type)throw new a.InvalidAbiTypeParameterError({abiParameter:c});const{array:f,type:p}=e;if(p in t){if(r.has(p))throw new s.CircularReferenceError({type:p});i.push({...c,type:`tuple${f??""}`,components:l(t[p]??[],t,new Set([...r,p]))})}else{if(!(0,u.isSolidityType)(p))throw new o.UnknownTypeError({type:p});i.push(c)}}}return i}},8768(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;const n=r(9061);class o extends n.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=o;class a extends n.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}t.UnknownTypeError=a;class i extends n.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}t.UnknownSolidityTypeError=i},8786(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTransaction=function(e,t){const r=(0,m.getTransactionType)(e);return"eip1559"===r?function(e,t){const{chainId:r,gas:n,nonce:o,to:a,value:i,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:d,data:m}=e;(0,p.assertTransactionEIP1559)(e);const y=(0,b.serializeAccessList)(d),g=[(0,l.numberToHex)(r),o?(0,l.numberToHex)(o):"0x",c?(0,l.numberToHex)(c):"0x",s?(0,l.numberToHex)(s):"0x",n?(0,l.numberToHex)(n):"0x",a??"0x",i?(0,l.numberToHex)(i):"0x",m??"0x",y,...h(e,t)];return(0,u.concatHex)(["0x02",(0,f.toRlp)(g)])}(e,t):"eip2930"===r?function(e,t){const{chainId:r,gas:n,data:o,nonce:a,to:i,value:s,accessList:c,gasPrice:d}=e;(0,p.assertTransactionEIP2930)(e);const m=(0,b.serializeAccessList)(c),y=[(0,l.numberToHex)(r),a?(0,l.numberToHex)(a):"0x",d?(0,l.numberToHex)(d):"0x",n?(0,l.numberToHex)(n):"0x",i??"0x",s?(0,l.numberToHex)(s):"0x",o??"0x",m,...h(e,t)];return(0,u.concatHex)(["0x01",(0,f.toRlp)(y)])}(e,t):"eip4844"===r?function(e,t){const{chainId:r,gas:n,nonce:o,to:d,value:m,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:v,accessList:E,data:w}=e;(0,p.assertTransactionEIP4844)(e);let P=e.blobVersionedHashes,A=e.sidecars;if(e.blobs&&(void 0===P||void 0===A)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,l.bytesToHex)(e)),r=e.kzg,n=(0,a.blobsToCommitments)({blobs:t,kzg:r});if(void 0===P&&(P=(0,s.commitmentsToVersionedHashes)({commitments:n})),void 0===A){const e=(0,i.blobsToProofs)({blobs:t,commitments:n,kzg:r});A=(0,c.toBlobSidecars)({blobs:t,commitments:n,proofs:e})}}const x=(0,b.serializeAccessList)(E),I=[(0,l.numberToHex)(r),o?(0,l.numberToHex)(o):"0x",v?(0,l.numberToHex)(v):"0x",g?(0,l.numberToHex)(g):"0x",n?(0,l.numberToHex)(n):"0x",d??"0x",m?(0,l.numberToHex)(m):"0x",w??"0x",x,y?(0,l.numberToHex)(y):"0x",P??[],...h(e,t)],S=[],T=[],O=[];if(A)for(let e=0;e<A.length;e++){const{blob:t,commitment:r,proof:n}=A[e];S.push(t),T.push(r),O.push(n)}return(0,u.concatHex)(["0x03",A?(0,f.toRlp)([I,S,T,O]):(0,f.toRlp)(I)])}(e,t):"eip7702"===r?function(e,t){const{authorizationList:r,chainId:n,gas:a,nonce:i,to:s,value:c,maxFeePerGas:d,maxPriorityFeePerGas:m,accessList:y,data:g}=e;(0,p.assertTransactionEIP7702)(e);const v=(0,b.serializeAccessList)(y),E=(0,o.serializeAuthorizationList)(r);return(0,u.concatHex)(["0x04",(0,f.toRlp)([(0,l.numberToHex)(n),i?(0,l.numberToHex)(i):"0x",m?(0,l.numberToHex)(m):"0x",d?(0,l.numberToHex)(d):"0x",a?(0,l.numberToHex)(a):"0x",s??"0x",c?(0,l.numberToHex)(c):"0x",g??"0x",v,E,...h(e,t)])])}(e,t):function(e,t){const{chainId:r=0,gas:o,data:a,nonce:i,to:s,value:c,gasPrice:u}=e;(0,p.assertTransactionLegacy)(e);let m=[i?(0,l.numberToHex)(i):"0x",u?(0,l.numberToHex)(u):"0x",o?(0,l.numberToHex)(o):"0x",s??"0x",c?(0,l.numberToHex)(c):"0x",a??"0x"];if(t){const e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new n.InvalidLegacyVError({v:t.v});return e})(),o=(0,d.trim)(t.r),a=(0,d.trim)(t.s);m=[...m,(0,l.numberToHex)(e),"0x00"===o?"0x":o,"0x00"===a?"0x":a]}else r>0&&(m=[...m,(0,l.numberToHex)(r),"0x","0x"]);return(0,f.toRlp)(m)}(e,t)},t.toYParitySignatureArray=h;const n=r(979),o=r(2528),a=r(4264),i=r(5295),s=r(3785),c=r(5231),u=r(1028),d=r(7716),l=r(6669),f=r(4314),p=r(8688),m=r(4720),b=r(5490);function h(e,t){const r=t??e,{v:n,yParity:o}=r;if(void 0===r.r)return[];if(void 0===r.s)return[];if(void 0===n&&void 0===o)return[];const a=(0,d.trim)(r.r),i=(0,d.trim)(r.s);return["number"==typeof o?o?(0,l.numberToHex)(1):"0x":0n===n?"0x":1n===n?(0,l.numberToHex)(1):27n===n?"0x":(0,l.numberToHex)(1),"0x00"===a?"0x":a,"0x00"===i?"0x":i]}},8798(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},8815(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getProof=async function(e,{address:t,blockNumber:r,blockTag:a,storageKeys:i}){const s=a??"latest",c=void 0!==r?(0,n.numberToHex)(r):void 0,u=await e.request({method:"eth_getProof",params:[t,i,c||s]});return(0,o.formatProof)(u)};const n=r(6669),o=r(7295)},8851(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeDeployData=function(e){const{abi:t,args:r,bytecode:s}=e;if(!r||0===r.length)return s;const c=t.find(e=>"type"in e&&"constructor"===e.type);if(!c)throw new n.AbiConstructorNotFoundError({docsPath:i});if(!("inputs"in c))throw new n.AbiConstructorParamsNotFoundError({docsPath:i});if(!c.inputs||0===c.inputs.length)throw new n.AbiConstructorParamsNotFoundError({docsPath:i});const u=(0,a.encodeAbiParameters)(c.inputs,r);return(0,o.concatHex)([s,u])};const n=r(9797),o=r(1028),a=r(3224),i="/docs/contract/encodeDeployData"},8901(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertRequest=function(e){const{account:t,gasPrice:r,maxFeePerGas:u,maxPriorityFeePerGas:d,to:l}=e,f=t?(0,n.parseAccount)(t):void 0;if(f&&!(0,c.isAddress)(f.address))throw new a.InvalidAddressError({address:f.address});if(l&&!(0,c.isAddress)(l))throw new a.InvalidAddressError({address:l});if(void 0!==r&&(void 0!==u||void 0!==d))throw new s.FeeConflictError;if(u&&u>o.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:u});if(d&&u&&d>u)throw new i.TipAboveFeeCapError({maxFeePerGas:u,maxPriorityFeePerGas:d})};const n=r(9546),o=r(8492),a=r(1611),i=r(6687),s=r(979),c=r(2018)},8911(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSiweMessage=function(e){const{address:t,domain:r,message:a,nonce:i,scheme:s,time:c=new Date}=e;if(r&&a.domain!==r)return!1;if(i&&a.nonce!==i)return!1;if(s&&a.scheme!==s)return!1;if(a.expirationTime&&c>=a.expirationTime)return!1;if(a.notBefore&&c<a.notBefore)return!1;try{if(!a.address)return!1;if(!(0,n.isAddress)(a.address,{strict:!1}))return!1;if(t&&!(0,o.isAddressEqual)(a.address,t))return!1}catch{return!1}return!0};const n=r(2018),o=r(7624)},8916(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeStateMapping=c,t.serializeAccountStateOverride=u,t.serializeStateOverride=function(e){if(!e)return;const t={};for(const{address:r,...o}of e){if(!(0,i.isAddress)(r,{strict:!1}))throw new n.InvalidAddressError({address:r});if(t[r])throw new a.AccountStateConflictError({address:r});t[r]=u(o)}return t};const n=r(1611),o=r(1459),a=r(9098),i=r(2018),s=r(6669);function c(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new o.InvalidBytesLengthError({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new o.InvalidBytesLengthError({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function u(e){const{balance:t,nonce:r,state:n,stateDiff:o,code:i}=e,u={};if(void 0!==i&&(u.code=i),void 0!==t&&(u.balance=(0,s.numberToHex)(t)),void 0!==r&&(u.nonce=(0,s.numberToHex)(r)),void 0!==n&&(u.state=c(n)),void 0!==o){if(u.state)throw new a.StateAssignmentConflictError;u.stateDiff=c(o)}return u}},8919(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.requestProviders=t.announceProvider=void 0,t.announceProvider=function(e){const t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);const r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)},t.requestProviders=function(e){if("undefined"==typeof window)return;const t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}},8928(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.promiseCache=void 0,t.withDedupe=function(e,{enabled:r=!0,id:n}){if(!r||!n)return e();if(t.promiseCache.get(n))return t.promiseCache.get(n);const o=e().finally(()=>t.promiseCache.delete(n));return t.promiseCache.set(n,o),o};const n=r(2292);t.promiseCache=new n.LruMap(8192)},8930(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(8522),t),o(r(5033),t),o(r(8412),t),o(r(5110),t),o(r(875),t),o(r(2024),t)},8970(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=function(e,t){return{constTimeNegate:s,hasPrecomputes:e=>1!==b(e),unsafeLadder(t,r,n=e.ZERO){let o=t;for(;r>a;)r&i&&(n=n.add(o)),o=o.double(),r>>=i;return n},precomputeWindow(e,r){const{windows:n,windowSize:o}=u(r,t),a=[];let i=e,s=i;for(let e=0;e<n;e++){s=i,a.push(s);for(let e=1;e<o;e++)s=s.add(i),a.push(s);i=s.double()}return a},wNAF(r,n,o){let a=e.ZERO,i=e.BASE;const c=u(r,t);for(let e=0;e<c.windows;e++){const{nextN:t,offset:r,isZero:u,isNeg:l,isNegF:f,offsetF:p}=d(o,e,c);o=t,u?i=i.add(s(f,n[p])):a=a.add(s(l,n[r]))}return{p:a,f:i}},wNAFUnsafe(r,n,o,i=e.ZERO){const s=u(r,t);for(let e=0;e<s.windows&&o!==a;e++){const{nextN:t,offset:r,isZero:a,isNeg:c}=d(o,e,s);if(o=t,!a){const e=n[r];i=i.add(c?e.negate():e)}}return i},getPrecomputes(e,t,r){let n=p.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&p.set(t,r(n))),n},wNAFCached(e,t,r){const n=b(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){const o=b(e);return 1===o?this.unsafeLadder(e,t,n):this.wNAFUnsafe(o,this.getPrecomputes(o,e,r),t,n)},setWindowSize(e,r){c(r,t),m.set(e,r),p.delete(e)}}},t.pippenger=function(e,t,r,n){l(r,e),f(n,t);const a=r.length,i=n.length;if(a!==i)throw new Error("arrays of points and scalars must have equal length");const s=e.ZERO,c=(0,o.bitLen)(BigInt(a));let u=1;c>12?u=c-3:c>4?u=c-2:c>0&&(u=2);const d=(0,o.bitMask)(u),p=new Array(Number(d)+1).fill(s);let m=s;for(let e=Math.floor((t.BITS-1)/u)*u;e>=0;e-=u){p.fill(s);for(let t=0;t<i;t++){const o=n[t],a=Number(o>>BigInt(e)&d);p[a]=p[a].add(r[t])}let t=s;for(let e=p.length-1,r=s;e>0;e--)r=r.add(p[e]),t=t.add(r);if(m=m.add(t),0!==e)for(let e=0;e<u;e++)m=m.double()}return m},t.precomputeMSMUnsafe=function(e,t,r,n){c(n,t.BITS),l(r,e);const a=e.ZERO,i=2**n-1,s=Math.ceil(t.BITS/n),u=(0,o.bitMask)(n),d=r.map(e=>{const t=[];for(let r=0,n=e;r<i;r++)t.push(n),n=n.add(e);return t});return e=>{if(f(e,t),e.length>r.length)throw new Error("array of scalars must be smaller than array of points");let o=a;for(let t=0;t<s;t++){if(o!==a)for(let e=0;e<n;e++)o=o.double();const r=BigInt(s*n-(t+1)*n);for(let t=0;t<e.length;t++){const n=e[t],a=Number(n>>r&u);a&&(o=o.add(d[t][a-1]))}}return o}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};const n=r(2107),o=r(9056),a=BigInt(0),i=BigInt(1);function s(e,t){const r=t.negate();return e?r:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){c(e,t);const r=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,o.bitMask)(e),maxNumber:r,shiftBy:BigInt(e)}}function d(e,t,r){const{windowSize:n,mask:o,maxNumber:a,shiftBy:s}=r;let c=Number(e&o),u=e>>s;c>n&&(c-=a,u+=i);const d=t*n;return{nextN:u,offset:d+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:t%2!=0,offsetF:d}}function l(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw new Error("invalid point at index "+r)})}function f(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+r)})}const p=new WeakMap,m=new WeakMap;function b(e){return m.get(e)||1}},8992(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAutomine=async function(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}},9021(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extractChain=function({chains:e,id:t}){return e.find(e=>e.id===t)}},9028(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseEventLogs=function(e){const{abi:t,args:r,logs:u,strict:d=!0}=e,l=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return u.map(e=>{try{const n=t.find(t=>"event"===t.type&&e.topics[0]===(0,s.toEventSelector)(t));if(!n)return null;const u=(0,c.decodeEventLog)({...e,abi:[n],strict:d});return l&&!l.includes(u.eventName)?null:function(e){const{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function s(e,t,r){try{return"address"===e.type?(0,o.isAddressEqual)(t,r):"string"===e.type||"bytes"===e.type?(0,i.keccak256)((0,a.toBytes)(t))===r:t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((e,n)=>{if(null==e)return!0;const o=r[n];return!!o&&(Array.isArray(e)?e:[e]).some(e=>s(o,e,t[n]))}):"object"==typeof t&&!Array.isArray(t)&&"object"==typeof n&&!Array.isArray(n)&&Object.entries(n).every(([e,n])=>{if(null==n)return!0;const o=r.find(t=>t.name===e);return!!o&&(Array.isArray(n)?n:[n]).some(r=>s(o,r,t[e]))})}({args:u.args,inputs:n.inputs,matchArgs:r})?{...u,...e}:null}catch(t){let r,o;if(t instanceof n.AbiEventSignatureNotFoundError)return null;if(t instanceof n.DecodeLogDataMismatch||t instanceof n.DecodeLogTopicsMismatch){if(d)return null;r=t.abiItem.name,o=t.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...e,args:o?[]:{},eventName:r}}}).filter(Boolean)};const n=r(9797),o=r(7624),a=r(1699),i=r(1725),s=r(2644),c=r(6218)},9030(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.compactSignatureToSignature=function({r:e,yParityAndS:t}){const r=(0,n.hexToBytes)(t),a=128&r[0]?1:0,i=r;return 1===a&&(i[0]&=127),{r:e,s:(0,o.bytesToHex)(i),yParity:a}};const n=r(1699),o=r(6669)},9056(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=o,t.abytes=a,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t.numberToHexUnpadded=i,t.hexToNumber=s,t.bytesToHex=d,t.hexToBytes=f,t.bytesToNumberBE=function(e){return s(d(e))},t.bytesToNumberLE=function(e){return a(e),s(d(Uint8Array.from(e).reverse()))},t.numberToBytesBE=p,t.numberToBytesLE=function(e,t){return p(e,t).reverse()},t.numberToVarBytesBE=function(e){return f(i(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=f(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!o(t))throw new Error(e+" must be hex string or Uint8Array");n=Uint8Array.from(t)}const a=n.length;if("number"==typeof r&&a!==r)throw new Error(e+" of length "+r+" expected, got "+a);return n},t.concatBytes=m,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))},t.inRange=h,t.aInRange=function(e,t,r,n){if(!h(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,o){return e|(o?n:r)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=y(e),o=y(e),a=0;const i=()=>{n.fill(1),o.fill(0),a=0},s=(...e)=>r(o,n,...e),c=(e=y(0))=>{o=s(g([0]),e),n=s(),0!==e.length&&(o=s(g([1]),e),n=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=s();const t=n.slice();r.push(t),e+=n.length}return m(...r)};return(e,t)=>{let r;for(i(),c(e);!(r=t(u()));)c();return i(),r}},t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const o=v[r];if("function"!=typeof o)throw new Error("invalid validator function");const a=e[t];if(!(n&&void 0===a||o(a,e)))throw new Error("param "+String(t)+" is invalid. Expected "+r+", got "+a)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e},t.memoized=function(e){const t=new WeakMap;return(r,...n)=>{const o=t.get(r);if(void 0!==o)return o;const a=e(r,...n);return t.set(r,a),a}};const r=BigInt(0),n=BigInt(1);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function a(e){if(!o(e))throw new Error("Uint8Array expected")}function i(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function s(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?r:BigInt("0x"+e)}const c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(a(e),c)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t}function l(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(c)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=l(e.charCodeAt(o)),a=l(e.charCodeAt(o+1));if(void 0===r||void 0===a){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}n[t]=16*r+a}return n}function p(e,t){return f(e.toString(16).padStart(2*t,"0"))}function m(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];a(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}const b=e=>"bigint"==typeof e&&r<=e;function h(e,t,r){return b(e)&&b(t)&&b(r)&&t<=e&&e<r}t.bitMask=e=>(n<<BigInt(e))-n;const y=e=>new Uint8Array(e),g=e=>Uint8Array.from(e),v={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},9061(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;const n=r(5816);class o extends Error{constructor(e,t={}){const r=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof o&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${n.version}`].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=o},9085(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(4337)),a=n(r(6833)),i=(0,o.default)(function(e,t,r){var n,o={};for(n in r=r||{},t=t||{})(0,a.default)(n,t)&&(o[n]=(0,a.default)(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)(0,a.default)(n,r)&&!(0,a.default)(n,o)&&(o[n]=r[n]);return o});t.default=i},9097(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupCache=t.listenersCache=void 0,t.observe=function(e,n,o){const a=++r,i=()=>t.listenersCache.get(e)||[],s=()=>{const r=i();if(!r.some(e=>e.id===a))return;const n=t.cleanupCache.get(e);if(1===r.length&&n){const e=n();e instanceof Promise&&e.catch(()=>{})}(()=>{const r=i();t.listenersCache.set(e,r.filter(e=>e.id!==a))})()},c=i();if(t.listenersCache.set(e,[...c,{id:a,fns:n}]),c&&c.length>0)return s;const u={};for(const e in n)u[e]=(...t)=>{const r=i();if(0!==r.length)for(const n of r)n.fns[e]?.(...t)};const d=o(u);return"function"==typeof d&&t.cleanupCache.set(e,d),s},t.listenersCache=new Map,t.cleanupCache=new Map;let r=0},9098(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.StateAssignmentConflictError=t.AccountStateConflictError=void 0,t.prettyStateMapping=i,t.prettyStateOverride=function(e){return e.reduce((e,{address:t,...r})=>{let n=`${e} ${t}:\n`;return r.nonce&&(n+=` nonce: ${r.nonce}\n`),r.balance&&(n+=` balance: ${r.balance}\n`),r.code&&(n+=` code: ${r.code}\n`),r.state&&(n+=" state:\n",n+=i(r.state)),r.stateDiff&&(n+=" stateDiff:\n",n+=i(r.stateDiff)),n}," State Override:\n").slice(0,-1)};const n=r(1682);class o extends n.BaseError{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}t.AccountStateConflictError=o;class a extends n.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function i(e){return e.reduce((e,{slot:t,value:r})=>`${e} ${t}: ${r}\n`,"")}t.StateAssignmentConflictError=a},9112(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.deployContract=function(e,t){const{abi:r,args:a,bytecode:i,...s}=t,c=(0,n.encodeDeployData)({abi:r,args:a,bytecode:i});return(0,o.sendTransaction)(e,{...s,...s.authorizationList?{to:null}:{},data:c})};const n=r(8851),o=r(9939)},9114(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formofy=function(e,t){e&&"undefined"!=typeof window?n.FormoAnalytics.init(e,t).then(function(e){if(window.formo=e,null==t?void 0:t.ready)try{t.ready(e)}catch(e){console.error("Error in FormoAnalytics ready callback:",e)}}).catch(function(e){return console.error("Error initializing FormoAnalytics:",e)}):console.warn("FormoAnalytics not found")};var n=r(7039)},9117(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=async function(e,{address:t,message:r,factory:a,factoryData:i,signature:s,...c}){const u=(0,n.hashMessage)(r);return(0,o.verifyHash)(e,{address:t,factory:a,factoryData:i,hash:u,signature:s,...c})};const n=r(7399),o=r(5968)},9130(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOverflowError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=void 0;const n=r(1682);class o extends n.BaseError{constructor({max:e,min:t,signed:r,size:n,value:o}){super(`Number "${o}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=o;class a extends n.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=a;class i extends n.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}t.InvalidHexBooleanError=i;class s extends n.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}t.InvalidHexValueError=s;class c extends n.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}t.SizeOverflowError=c},9131(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiParameter=function(e){let t;if("string"==typeof e)t=(0,i.parseAbiParameter)(e,{modifiers:o.modifiers});else{const r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!(0,o.isStructSignature)(n)){t=(0,i.parseAbiParameter)(n,{modifiers:o.modifiers,structs:r});break}}}if(!t)throw new n.InvalidAbiParameterError({param:e});return t};const n=r(8144),o=r(1839),a=r(6012),i=r(9263)},9157(e,t){var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventChannel=t.EventType=void 0,function(e){e.PAGE="page",e.IDENTIFY="identify",e.DETECT="detect",e.CONNECT="connect",e.DISCONNECT="disconnect",e.CHAIN="chain",e.SIGNATURE="signature",e.TRANSACTION="transaction",e.TRACK="track"}(r||(t.EventType=r={})),function(e){e.WEB="web",e.MOBILE="mobile",e.SERVER="server",e.SOURCE="source"}(n||(t.EventChannel=n={}))},9210(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getFormattedTimestamp=t.getCurrentTimeFormatted=void 0;var r=function(e){return e.toISOString()};t.getFormattedTimestamp=r,t.getCurrentTimeFormatted=function(){return r(new Date)}},9226(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionCount=async function(e,{address:t,blockTag:r="latest",blockNumber:a}){const i=await e.request({method:"eth_getTransactionCount",params:[t,"bigint"==typeof a?(0,o.numberToHex)(a):r]},{dedupe:Boolean(a)});return(0,n.hexToNumber)(i)};const n=r(4130),o=r(6669)},9263(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e,t={}){if((0,u.isFunctionSignature)(e))return d(e,t);if((0,u.isEventSignature)(e))return l(e,t);if((0,u.isErrorSignature)(e))return f(e,t);if((0,u.isConstructorSignature)(e))return p(e,t);if((0,u.isFallbackSignature)(e))return m(e);if((0,u.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new i.UnknownSignatureError({signature:e})},t.parseFunctionSignature=d,t.parseEventSignature=l,t.parseErrorSignature=f,t.parseConstructorSignature=p,t.parseFallbackSignature=m,t.parseAbiParameter=g,t.splitParameters=v,t.isSolidityType=E,t.isSolidityKeyword=P,t.isValidDataLocation=A;const n=r(4027),o=r(8768),a=r(8144),i=r(259),s=r(1985),c=r(7520),u=r(1839);function d(e,t={}){const r=(0,u.execFunctionSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"function"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{modifiers:u.functionModifiers,structs:t,type:"function"}));const s=[];if(r.returns){const e=v(r.returns),n=e.length;for(let r=0;r<n;r++)s.push(g(e[r],{modifiers:u.functionModifiers,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:o,outputs:s}}function l(e,t={}){const r=(0,u.execEventSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"event"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{modifiers:u.eventModifiers,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:o}}function f(e,t={}){const r=(0,u.execErrorSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"error"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:o}}function p(e,t={}){const r=(0,u.execConstructorSignature)(e);if(!r)throw new i.InvalidSignatureError({signature:e,type:"constructor"});const n=v(r.parameters),o=[],a=n.length;for(let e=0;e<a;e++)o.push(g(n[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:o}}function m(e){const t=(0,u.execFallbackSignature)(e);if(!t)throw new i.InvalidSignatureError({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const b=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,y=/^u?int$/;function g(e,t){const r=(0,c.getParameterCacheKey)(e,t?.type,t?.structs);if(c.parameterCache.has(r))return c.parameterCache.get(r);const i=n.isTupleRegex.test(e),s=(0,n.execTyped)(i?h:b,e);if(!s)throw new a.InvalidParameterError({param:e});if(s.name&&P(s.name))throw new a.SolidityProtectedKeywordError({param:e,name:s.name});const d=s.name?{name:s.name}:{},l="indexed"===s.modifier?{indexed:!0}:{},f=t?.structs??{};let p,m={};if(i){p="tuple";const e=v(s.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(g(e[n],{structs:f}));m={components:t}}else if(s.type in f)p="tuple",m={components:f[s.type]};else if(y.test(s.type))p=`${s.type}256`;else if("address payable"===s.type)p="address";else if(p=s.type,"struct"!==t?.type&&!E(p))throw new o.UnknownSolidityTypeError({type:p});if(s.modifier){if(!t?.modifiers?.has?.(s.modifier))throw new a.InvalidModifierError({param:e,type:t?.type,modifier:s.modifier});if(u.functionModifiers.has(s.modifier)&&!A(p,!!s.array))throw new a.InvalidFunctionModifierError({param:e,type:t?.type,modifier:s.modifier})}const w={type:`${p}${s.array??""}`,...d,...l,...m};return c.parameterCache.set(r,w),w}function v(e,t=[],r="",n=0){const o=e.trim().length;for(let a=0;a<o;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return 0===n?v(i,[...t,r.trim()]):v(i,t,`${r}${o}`,n);case"(":return v(i,t,`${r}${o}`,n+1);case")":return v(i,t,`${r}${o}`,n-1);default:return v(i,t,`${r}${o}`,n)}}if(""===r)return t;if(0!==n)throw new s.InvalidParenthesisError({current:r,depth:n});return t.push(r.trim()),t}function E(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.bytesRegex.test(e)||n.integerRegex.test(e)}const w=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function P(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||n.bytesRegex.test(e)||n.integerRegex.test(e)||w.test(e)}function A(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}},9282(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaAdapter=void 0;var i=r(6561),s=r(6973),c=r(7960),u=r(6433);function d(e){return Array.from(e).map(function(e){return e.toString(16).padStart(2,"0")}).join("")}var l=function(){function e(e,t){this.wallet=null,this.connection=null,this.unsubscribers=[],this.connectionState={isProcessing:!1},this.processedSignatures=new Set,this.pendingTransactions=new Map,this.pollingTimeouts=new Set,this.isCleanedUp=!1,this.formo=e,this.wallet=t.wallet||null,this.connection=t.connection||null,this.cluster=t.cluster||"mainnet-beta",this.chainId=c.SOLANA_CHAIN_IDS[this.cluster],s.logger.info("SolanaAdapter: Initializing Solana integration",{cluster:this.cluster,chainId:this.chainId,hasWallet:!!this.wallet,hasConnection:!!this.connection}),this.wallet&&this.setupWalletListeners()}return e.prototype.restoreOriginalMethods=function(){this.wrappedAdapter&&(this.originalAdapterSendTransaction&&(this.wrappedAdapter.sendTransaction=this.originalAdapterSendTransaction),this.originalAdapterSignMessage&&(this.wrappedAdapter.signMessage=this.originalAdapterSignMessage),this.originalAdapterSignTransaction&&(this.wrappedAdapter.signTransaction=this.originalAdapterSignTransaction),this.wrappedAdapter=void 0),this.originalAdapterSendTransaction=void 0,this.originalAdapterSignMessage=void 0,this.originalAdapterSignTransaction=void 0,this.boundWrappedSendTransaction=void 0,this.boundWrappedSignMessage=void 0,this.boundWrappedSignTransaction=void 0},e.prototype.setWallet=function(e){if(e&&(0,c.isSolanaWalletContext)(e)&&this.wallet&&(0,c.isSolanaWalletContext)(this.wallet)){var t=this.getAdapterFromContext(e);if(t&&t===this.wrappedAdapter)return void(this.wallet=e)}e&&e===this.wrappedAdapter||(this.restoreOriginalMethods(),this.connectionState.lastAddress=void 0,this.connectionState.lastChainId=void 0,this.cleanupWalletListeners(),this.wallet=e,this.wallet&&(this.isCleanedUp=!1,this.setupWalletListeners()))},e.prototype.syncWalletState=function(){this.checkAndRebindContextAdapter()},e.prototype.setConnection=function(e){this.connection=e},e.prototype.setCluster=function(e){var t=this.cluster;this.cluster=e,this.chainId=c.SOLANA_CHAIN_IDS[e],t!==e&&this.connectionState.lastAddress&&(this.connectionState.lastChainId=this.chainId,this.formo.isAutocaptureEnabled("chain")&&this.formo.chain({chainId:this.chainId,address:this.connectionState.lastAddress}).catch(function(e){s.logger.error("SolanaAdapter: Error emitting chain event",e)}))},e.prototype.getChainId=function(){return this.chainId},e.prototype.setupWalletListeners=function(){this.wallet&&(s.logger.info("SolanaAdapter: Setting up wallet listeners"),(0,c.isSolanaWalletContext)(this.wallet)?this.setupContextListeners(this.wallet):(0,c.isSolanaAdapter)(this.wallet)&&this.setupAdapterListeners(this.wallet),this.checkInitialConnection().catch(function(e){s.logger.error("SolanaAdapter: Error checking initial connection",e)}),s.logger.info("SolanaAdapter: Wallet listeners set up successfully"))},e.prototype.setupContextListeners=function(e){var t=this.getAdapterFromContext(e);t&&(this.setupAdapterEventListenersOnly(t),this.wrapAdapterMethods(t))},e.prototype.checkAndRebindContextAdapter=function(){if(this.wallet&&(0,c.isSolanaWalletContext)(this.wallet)){var e=this.getAdapterFromContext(this.wallet);e!==this.currentBoundAdapter&&(s.logger.info("SolanaAdapter: Detected wallet adapter change, rebinding"),this.restoreOriginalMethods(),this.cleanupAdapterListenersOnly(),e?(this.setupAdapterEventListenersOnly(e),this.wrapAdapterMethods(e),this.checkInitialConnection().catch(function(e){s.logger.error("SolanaAdapter: Error checking initial connection after adapter change",e)})):(this.currentBoundAdapter=void 0,this.connectionState.lastAddress&&this.handleDisconnect()))}},e.prototype.cleanupAdapterListenersOnly=function(){for(var e=0,t=this.unsubscribers;e<t.length;e++){var r=t[e];try{r()}catch(e){s.logger.error("SolanaAdapter: Error cleaning up adapter listener",e)}}this.unsubscribers=[],this.currentBoundAdapter=void 0},e.prototype.registerAdapterListener=function(e,t,r){e.on(t,r),this.unsubscribers.push(function(){return e.off(t,r)})},e.prototype.setupAdapterEventListenersOnly=function(e){var t=this;this.currentBoundAdapter=e,this.registerAdapterListener(e,"connect",function(e){return t.handleConnect(e)}),this.registerAdapterListener(e,"disconnect",function(){return t.handleDisconnect()}),this.registerAdapterListener(e,"error",function(e){return s.logger.error("SolanaAdapter: Wallet error",e)})},e.prototype.setupAdapterListeners=function(e){this.setupAdapterEventListenersOnly(e),this.wrapAdapterMethods(e)},e.prototype.wrapAdapterMethods=function(e){this.wrappedAdapter!==e?(this.wrappedAdapter=e,e.sendTransaction&&(this.originalAdapterSendTransaction=e.sendTransaction.bind(e),this.boundWrappedSendTransaction=this.wrappedSendTransaction.bind(this),e.sendTransaction=this.boundWrappedSendTransaction),e.signMessage&&(this.originalAdapterSignMessage=e.signMessage.bind(e),this.boundWrappedSignMessage=this.wrappedSignMessage.bind(this),e.signMessage=this.boundWrappedSignMessage),e.signTransaction&&(this.originalAdapterSignTransaction=e.signTransaction.bind(e),this.boundWrappedSignTransaction=this.wrappedSignTransaction.bind(this),e.signTransaction=this.boundWrappedSignTransaction)):this.rewrapOverwrittenMethods(e)},e.prototype.rewrapOverwrittenMethods=function(e){var t=!1;e.signMessage&&e.signMessage!==this.boundWrappedSignMessage?(this.originalAdapterSignMessage=e.signMessage.bind(e),this.boundWrappedSignMessage||(this.boundWrappedSignMessage=this.wrappedSignMessage.bind(this)),e.signMessage=this.boundWrappedSignMessage,t=!0):!e.signMessage&&this.boundWrappedSignMessage&&(this.originalAdapterSignMessage=void 0),e.signTransaction&&e.signTransaction!==this.boundWrappedSignTransaction?(this.originalAdapterSignTransaction=e.signTransaction.bind(e),this.boundWrappedSignTransaction||(this.boundWrappedSignTransaction=this.wrappedSignTransaction.bind(this)),e.signTransaction=this.boundWrappedSignTransaction,t=!0):!e.signTransaction&&this.boundWrappedSignTransaction&&(this.originalAdapterSignTransaction=void 0),e.sendTransaction&&e.sendTransaction!==this.boundWrappedSendTransaction&&(this.originalAdapterSendTransaction=e.sendTransaction.bind(e),this.boundWrappedSendTransaction||(this.boundWrappedSendTransaction=this.wrappedSendTransaction.bind(this)),e.sendTransaction=this.boundWrappedSendTransaction,t=!0),t&&s.logger.debug("SolanaAdapter: Re-wrapped overwritten adapter methods")},e.prototype.wrappedSendTransaction=function(e,t,r){return o(this,void 0,void 0,function(){var n,o,s,c;return a(this,function(a){switch(a.label){case 0:if(this.checkAndRebindContextAdapter(),!this.originalAdapterSendTransaction)throw new Error("sendTransaction not available");n=this.chainId,o=this.getCurrentAddress(),this.emitTransactionEvent(i.TransactionStatus.STARTED,o,n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.originalAdapterSendTransaction(e,t,r)];case 2:return s=a.sent(),this.emitTransactionEvent(i.TransactionStatus.BROADCASTED,o,n,s),o&&this.formo.isAutocaptureEnabled("transaction")&&(this.pendingTransactions.set(s,{address:o,startTime:Date.now()}),this.pollTransactionConfirmation(s,o,n,t)),[2,s];case 3:throw c=a.sent(),this.emitTransactionEvent(i.TransactionStatus.REJECTED,o,n),c;case 4:return[2]}})})},e.prototype.wrappedSignMessage=function(e){return o(this,void 0,void 0,function(){var t,r,n,o,s,c;return a(this,function(a){switch(a.label){case 0:if(this.checkAndRebindContextAdapter(),!this.originalAdapterSignMessage)throw new Error("signMessage not available");t=this.chainId,r=this.getCurrentAddress(),n=function(e){try{return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(e):"undefined"!=typeof Buffer?Buffer.from(e).toString("utf-8"):"0x".concat(d(e))}catch(t){return"0x".concat(d(e))}}(e),this.emitSignatureEvent(i.SignatureStatus.REQUESTED,r,t,n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.originalAdapterSignMessage(e)];case 2:return o=a.sent(),s=d(o),this.emitSignatureEvent(i.SignatureStatus.CONFIRMED,r,t,n,s),[2,o];case 3:throw c=a.sent(),this.emitSignatureEvent(i.SignatureStatus.REJECTED,r,t,n),c;case 4:return[2]}})})},e.prototype.wrappedSignTransaction=function(e){return o(this,void 0,void 0,function(){var t,r,n,o,s;return a(this,function(a){switch(a.label){case 0:if(this.checkAndRebindContextAdapter(),!this.originalAdapterSignTransaction)throw new Error("signTransaction not available");t=this.chainId,r=this.getCurrentAddress(),n="[Transaction Signature]",this.emitSignatureEvent(i.SignatureStatus.REQUESTED,r,t,n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.originalAdapterSignTransaction(e)];case 2:return o=a.sent(),this.emitSignatureEvent(i.SignatureStatus.CONFIRMED,r,t,n),[2,o];case 3:throw s=a.sent(),this.emitSignatureEvent(i.SignatureStatus.REJECTED,r,t,n),s;case 4:return[2]}})})},e.prototype.checkInitialConnection=function(){return o(this,void 0,void 0,function(){var e,t;return a(this,function(r){switch(r.label){case 0:return(e=this.getPublicKey())?!(t=(0,u.publicKeyToAddress)(e))||(0,u.isBlockedSolanaAddress)(t)?[3,2]:this.connectionState.lastAddress===t&&this.connectionState.lastChainId===this.chainId?(s.logger.debug("SolanaAdapter: Already tracking this address, skipping duplicate connect",{address:t,chainId:this.chainId}),[2]):(this.connectionState.lastAddress=t,this.connectionState.lastChainId=this.chainId,s.logger.info("SolanaAdapter: Already connected on initialization",{address:t,chainId:this.chainId}),this.formo.isAutocaptureEnabled("connect")?[4,this.formo.connect({chainId:this.chainId,address:t},{providerName:this.getWalletName(),rdns:this.getWalletRdns()})]:[3,2]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},e.prototype.handleConnect=function(e){return o(this,void 0,void 0,function(){var t,r;return a(this,function(n){switch(n.label){case 0:if(this.connectionState.isProcessing)return s.logger.debug("SolanaAdapter: Already processing, skipping connect"),[2];this.connectionState.isProcessing=!0,n.label=1;case 1:return n.trys.push([1,4,5,6]),this.wrappedAdapter&&this.rewrapOverwrittenMethods(this.wrappedAdapter),(t=(0,u.publicKeyToAddress)(e))?(0,u.isBlockedSolanaAddress)(t)?(s.logger.debug("SolanaAdapter: Blocked address, skipping connect event"),[2]):(s.logger.info("SolanaAdapter: Wallet connected",{address:t,chainId:this.chainId,walletName:this.getWalletName()}),this.connectionState.lastAddress=t,this.connectionState.lastChainId=this.chainId,this.formo.isAutocaptureEnabled("connect")?[4,this.formo.connect({chainId:this.chainId,address:t},{providerName:this.getWalletName(),rdns:this.getWalletRdns()})]:[3,3]):(s.logger.warn("SolanaAdapter: Invalid public key on connect"),[2]);case 2:n.sent(),n.label=3;case 3:return[3,6];case 4:return r=n.sent(),s.logger.error("SolanaAdapter: Error handling connect",r),[3,6];case 5:return this.connectionState.isProcessing=!1,[7];case 6:return[2]}})})},e.prototype.handleDisconnect=function(){return o(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:if(this.connectionState.isProcessing)return s.logger.debug("SolanaAdapter: Already processing, skipping disconnect"),[2];if(!this.connectionState.lastAddress)return s.logger.debug("SolanaAdapter: No prior connection tracked, skipping disconnect event"),[2];this.connectionState.isProcessing=!0,t.label=1;case 1:return t.trys.push([1,4,5,6]),s.logger.info("SolanaAdapter: Wallet disconnected",{address:this.connectionState.lastAddress,chainId:this.connectionState.lastChainId}),this.formo.isAutocaptureEnabled("disconnect")?[4,this.formo.disconnect({chainId:this.connectionState.lastChainId,address:this.connectionState.lastAddress})]:[3,3];case 2:t.sent(),t.label=3;case 3:return this.connectionState.lastAddress=void 0,this.connectionState.lastChainId=void 0,[3,6];case 4:return e=t.sent(),s.logger.error("SolanaAdapter: Error handling disconnect",e),[3,6];case 5:return this.connectionState.isProcessing=!1,[7];case 6:return[2]}})})},e.prototype.pollTransactionConfirmation=function(e,t,r,n){return o(this,arguments,void 0,function(e,t,r,n,c,u){var d,l,f,p,m=this;return void 0===c&&(c=30),void 0===u&&(u=2e3),a(this,function(b){return this.isCleanedUp?[2]:(d=n||this.connection)&&(d.getSignatureStatuses||d.getSignatureStatus)?(l=0,f=null,p=function(){return o(m,void 0,void 0,function(){var n,o,m,b,h;return a(this,function(a){switch(a.label){case 0:if(f&&(this.pollingTimeouts.delete(f),f=null),this.isCleanedUp)return this.pendingTransactions.delete(e),[2];a.label=1;case 1:return a.trys.push([1,6,,7]),n=null,d.getSignatureStatuses?[4,d.getSignatureStatuses([e])]:[3,3];case 2:return o=a.sent(),n=o.value[0],[3,5];case 3:return d.getSignatureStatus?[4,d.getSignatureStatus(e)]:[3,5];case 4:o=a.sent(),n=o.value,a.label=5;case 5:if(n){if(m="".concat(e,":").concat(n.confirmationStatus),(b=!!n.err||"confirmed"===n.confirmationStatus||"finalized"===n.confirmationStatus)&&this.processedSignatures.has(m))return[2];if(b&&this.processedSignatures.add(m),n.err)return s.logger.info("SolanaAdapter: Transaction reverted",{signature:e,error:n.err}),this.formo.transaction({status:i.TransactionStatus.REVERTED,chainId:r,address:t,transactionHash:e}),this.pendingTransactions.delete(e),[2];if("confirmed"===n.confirmationStatus||"finalized"===n.confirmationStatus)return s.logger.info("SolanaAdapter: Transaction confirmed",{signature:e,confirmationStatus:n.confirmationStatus}),this.formo.transaction({status:i.TransactionStatus.CONFIRMED,chainId:r,address:t,transactionHash:e}),this.pendingTransactions.delete(e),[2]}return[3,7];case 6:return h=a.sent(),s.logger.error("SolanaAdapter: Error polling transaction status",h),[3,7];case 7:return++l<c&&!this.isCleanedUp?(f=setTimeout(p,u),this.pollingTimeouts.add(f)):this.pendingTransactions.delete(e),[2]}})})},f=setTimeout(p,u),this.pollingTimeouts.add(f),function(e,t,r){if(void 0===t&&(t=1e3),void 0===r&&(r=500),e.size>t)for(var n=Array.from(e),o=0;o<r&&o<n.length;o++)e.delete(n[o])}(this.processedSignatures),[2]):(s.logger.debug("SolanaAdapter: No connection for confirmation polling"),this.pendingTransactions.delete(e),[2])})})},e.prototype.getPublicKey=function(){var e,t;return null!==(t=null===(e=this.wallet)||void 0===e?void 0:e.publicKey)&&void 0!==t?t:null},e.prototype.getCurrentAddress=function(){if(this.connectionState.lastAddress)return this.connectionState.lastAddress;var e=this.getPublicKey(),t=e?(0,u.publicKeyToAddress)(e):null;return t&&(0,u.isBlockedSolanaAddress)(t)?null:t},e.prototype.emitTransactionEvent=function(e,t,r,o){t&&this.formo.isAutocaptureEnabled("transaction")&&this.formo.transaction(n({status:e,chainId:r,address:t},o&&{transactionHash:o}))},e.prototype.emitSignatureEvent=function(e,t,r,o,a){t&&this.formo.isAutocaptureEnabled("signature")&&this.formo.signature(n({status:e,chainId:r,address:t,message:o},a&&{signatureHash:a}))},e.prototype.getAdapterFromContext=function(e){var t=e.wallet;return t&&t.adapter&&"function"==typeof t.adapter.on?t.adapter:null},e.prototype.getWalletName=function(){if(!this.wallet)return"Unknown Solana Wallet";if((0,c.isSolanaWalletContext)(this.wallet)){var e=this.getAdapterFromContext(this.wallet);return(null==e?void 0:e.name)||"Unknown Solana Wallet"}return this.wallet.name},e.prototype.getWalletRdns=function(){var e=this.getWalletName().toLowerCase().replace(/\s+/g,"");return"sol.wallet.".concat(e)},e.prototype.cleanupWalletListeners=function(){for(var e=0,t=this.unsubscribers;e<t.length;e++){var r=t[e];try{r()}catch(e){s.logger.error("SolanaAdapter: Error during listener cleanup",e)}}this.unsubscribers=[],this.currentBoundAdapter=void 0},e.prototype.cleanup=function(){s.logger.debug("SolanaAdapter: Cleaning up"),this.isCleanedUp=!0,Array.from(this.pollingTimeouts).forEach(function(e){clearTimeout(e)}),this.pollingTimeouts.clear(),this.cleanupWalletListeners(),this.processedSignatures.clear(),this.pendingTransactions.clear(),this.connectionState.lastAddress=void 0,this.connectionState.lastChainId=void 0,this.restoreOriginalMethods(),this.wallet=null,this.connection=null,s.logger.debug("SolanaAdapter: Cleanup complete")},e}();t.SolanaAdapter=l},9333(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=function(e){return e},t.getVersion=function(){return n.version},t.prettyPrint=function(e){if(!e)return"";const t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`).join("\n")};const n=r(1680)},9405(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockBaseFeePerGas=async function(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,n.numberToHex)(t)]})};const n=r(6669)},9414(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signTransaction=async function(e,t){const{account:r=e.account,chain:l=e.chain,...f}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const p=(0,n.parseAccount)(r);(0,u.assertRequest)({account:p,...t});const m=await(0,c.getAction)(e,d.getChainId,"getChainId")({});null!==l&&(0,a.assertCurrentChain)({currentChainId:m,chain:l});const b=l?.formatters||e.chain?.formatters,h=b?.transactionRequest?.format||s.formatTransactionRequest;return p.signTransaction?p.signTransaction({...f,chainId:m},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...h({...f,account:p},"signTransaction"),chainId:(0,i.numberToHex)(m),from:p.address}]},{retryCount:0})};const n=r(9546),o=r(8328),a=r(375),i=r(6669),s=r(2996),c=r(3115),u=r(8901),d=r(401)},9420(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpc=function(e){return{...e.baseFeePerGas&&{baseFeePerGas:BigInt(e.baseFeePerGas)},...e.blobBaseFee&&{blobBaseFee:BigInt(e.blobBaseFee)},...e.feeRecipient&&{feeRecipient:e.feeRecipient},...e.gasLimit&&{gasLimit:BigInt(e.gasLimit)},...e.number&&{number:BigInt(e.number)},...e.prevRandao&&{prevRandao:BigInt(e.prevRandao)},...e.time&&{time:BigInt(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(o.fromRpc)}}},t.toRpc=function(e){return{..."bigint"==typeof e.baseFeePerGas&&{baseFeePerGas:n.fromNumber(e.baseFeePerGas)},..."bigint"==typeof e.blobBaseFee&&{blobBaseFee:n.fromNumber(e.blobBaseFee)},..."string"==typeof e.feeRecipient&&{feeRecipient:e.feeRecipient},..."bigint"==typeof e.gasLimit&&{gasLimit:n.fromNumber(e.gasLimit)},..."bigint"==typeof e.number&&{number:n.fromNumber(e.number)},..."bigint"==typeof e.prevRandao&&{prevRandao:n.fromNumber(e.prevRandao)},..."bigint"==typeof e.time&&{time:n.fromNumber(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(o.toRpc)}}};const n=r(1465),o=r(89)},9427(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.weiUnits=t.gweiUnits=t.etherUnits=void 0,t.etherUnits={gwei:9,wei:18},t.gweiUnits={ether:-9,wei:9},t.weiUnits={ether:-18,gwei:-9}},9433(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatFeeHistory=function(e){return{baseFeePerGas:e.baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(e=>e.map(e=>BigInt(e)))}}},9435(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=function(e){let t=!0,r="",o=0,a="",i=!1;for(let n=0;n<e.length;n++){const s=e[n];if(["(",")",","].includes(s)&&(t=!0),"("===s&&o++,")"===s&&o--,t)if(0!==o)" "!==s?(a+=s,r+=s):","!==e[n-1]&&","!==r&&",("!==r&&(r="",t=!1);else if(" "===s&&["event","function",""].includes(a))a="";else if(a+=s,")"===s){i=!0;break}}if(!i)throw new n.BaseError("Unable to normalize signature.");return a};const n=r(1682)},9461(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setConsentFlag=function(e,t,r){var n;if("undefined"!=typeof document){var a=o(e,t),i=new Date(Date.now()+31536e6).toUTCString(),s="https:"===(null===(n=null===window||void 0===window?void 0:window.location)||void 0===n?void 0:n.protocol);document.cookie="".concat(a,"=").concat(encodeURIComponent(r),"; expires=").concat(i,"; path=/; SameSite=Strict").concat(s?"; Secure":"")}},t.getConsentFlag=function(e,t){if("undefined"==typeof document)return null;for(var r=o(e,t),n=0,a=document.cookie.split(";");n<a.length;n++){var i=a[n].trim(),s=i.indexOf("=");if(-1!==s){var c=i.substring(0,s),u=i.substring(s+1);if(c===r)return decodeURIComponent(u||"")}}return null},t.removeConsentFlag=function(e,t){!function(e){if("undefined"!=typeof document&&(document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"),"undefined"!=typeof window)){var t=window.location.hostname,r=t.split(".");if(r.length>=2&&"localhost"!==t){var n=r.slice(-2).join(".");document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.").concat(n,";")}}}(o(e,t))};var n=r(2024);function o(e,t){return"formo_".concat((0,n.secureHash)(e),"_").concat(t)}},9463(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createCursor=function(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(o);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r};const n=r(4129),o={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new n.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.PositionOutOfBoundsError({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.NegativeOffsetError({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new n.NegativeOffsetError({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}}},9471(e,t){Object.defineProperty(t,"__esModule",{value:!0})},9475(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLog=function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}},9478(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.requestProviders=t.announceProvider=t.createStore=void 0;var n=r(4887);Object.defineProperty(t,"createStore",{enumerable:!0,get:function(){return n.createStore}});var o=r(8919);Object.defineProperty(t,"announceProvider",{enumerable:!0,get:function(){return o.announceProvider}}),Object.defineProperty(t,"requestProviders",{enumerable:!0,get:function(){return o.requestProviders}})},9514(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeData=function(...e){const[t,r]=(()=>{if(Array.isArray(e[0])){const[t,r,n]=e;return[s(t,r),n]}return e})(),{overloads:n}=t;if(i.size(r)<4)throw new o.InvalidSelectorSizeError({data:r});if(0===t.inputs.length)return;const c=n?s([t,...n],r):t;return i.size(r)<=4?void 0:a.decode(c.inputs,i.slice(r,4))},t.decodeResult=function(...e){const[t,r,n={}]=(()=>{if(Array.isArray(e[0])){const[t,r,n,o]=e;return[s(t,r),n,o]}return e})(),o=a.decode(t.outputs,r,n);if(!o||0!==Object.keys(o).length)return o&&1===Object.keys(o).length?Array.isArray(o)?o[0]:Object.values(o)[0]:o},t.encodeData=function(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[t,r,n]=e;return[s(t,r,{args:n}),n]}const[t,r]=e;return[t,r]})(),{overloads:n}=t,o=n?s([t,...n],t.name,{args:r}):t,u=c(o),d=r.length>0?a.encode(o.inputs,r):void 0;return d?i.concat(u,d):u},t.encodeResult=function(...e){const[t,r,n={}]=(()=>{if(Array.isArray(e[0])){const[t,r,n,o]=e;return[s(t,r),n,o]}return e})(),{as:o="Array"}=n,i=1===t.outputs.length?[r]:Array.isArray(r)?r:"Object"===o?Object.values(r):[r];return a.encode(t.outputs,i)},t.format=function(e){return n.formatAbiItem(e)},t.from=function(e,t={}){return o.from(e,t)},t.fromAbi=s,t.getSelector=c;const n=r(844),o=r(5057),a=r(7818),i=r(1465);function s(e,t,r){const n=o.fromAbi(e,t,r);if("function"!==n.type)throw new o.NotFoundError({name:t,type:"function"});return n}function c(e){return o.getSelector(e)}},9517(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},9521(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromRlp=function(e,t="hex"){const r=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new o.InvalidHexValueError(e);return(0,i.hexToBytes)(e)}return e})();return c((0,a.createCursor)(r,{recursiveReadLimit:Number.POSITIVE_INFINITY}),t)};const n=r(1682),o=r(9130),a=r(9463),i=r(1699),s=r(6669);function c(e,t="hex"){if(0===e.bytes.length)return"hex"===t?(0,s.bytesToHex)(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const n=u(e,r,128),o=e.readBytes(n);return"hex"===t?(0,s.bytesToHex)(o):o}return function(e,t,r){const n=e.position,o=[];for(;e.position-n<t;)o.push(c(e,r));return o}(e,u(e,r,192),t)}function u(e,t,r){if(128===r&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new n.BaseError("Invalid RLP prefix")}},9546(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=function(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},9552(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterLogs=async function(e,{filter:t}){const r=t.strict??!1,a=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,o.formatLog)(e));return t.abi?(0,n.parseEventLogs)({abi:t.abi,logs:a,strict:r}):a};const n=r(9028),o=r(9475)},9574(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getWebSocketRpcClient=async function(e,t={}){const{keepAlive:a,reconnect:i}=t;return(0,o.getSocketRpcClient)({async getSocket({onClose:t,onError:o,onOpen:a,onResponse:i}){const s=await Promise.resolve().then(()=>r(6267)).then(e=>e.WebSocket),c=new s(e);function u(){c.removeEventListener("close",u),c.removeEventListener("message",d),c.removeEventListener("error",o),c.removeEventListener("open",a),t()}function d({data:e}){if("string"!=typeof e||0!==e.trim().length)try{const t=JSON.parse(e);i(t)}catch(e){o(e)}}c.addEventListener("close",u),c.addEventListener("message",d),c.addEventListener("error",o),c.addEventListener("open",a),c.readyState===s.CONNECTING&&await new Promise((e,t)=>{c&&(c.onopen=e,c.onerror=t)});const{close:l}=c;return Object.assign(c,{close(){l.bind(c)(),u()},ping(){try{if(c.readyState===c.CLOSED||c.readyState===c.CLOSING)throw new n.WebSocketRequestError({url:c.url,cause:new n.SocketClosedError({url:c.url})});const e={jsonrpc:"2.0",id:null,method:"net_version",params:[]};c.send(JSON.stringify(e))}catch(e){o(e)}},request({body:e}){if(c.readyState===c.CLOSED||c.readyState===c.CLOSING)throw new n.WebSocketRequestError({body:e,url:c.url,cause:new n.SocketClosedError({url:c.url})});return c.send(JSON.stringify(e))}})},keepAlive:a,reconnect:i,url:e})};const n=r(3318),o=r(2264)},9586(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.maxBytesPerTransaction=t.bytesPerBlob=t.fieldElementsPerBlob=t.bytesPerFieldElement=void 0,t.bytesPerFieldElement=32,t.fieldElementsPerBlob=4096,t.bytesPerBlob=t.bytesPerFieldElement*t.fieldElementsPerBlob,t.maxBytesPerTransaction=6*t.bytesPerBlob-1-1*t.fieldElementsPerBlob*6},9594(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToCompactSignature=function(e){const{r:t,s:r,v:a,yParity:i}=e;let s=r;if(1===Number(i??a-27n)){const e=(0,n.hexToBytes)(r);e[0]|=128,s=(0,o.bytesToHex)(e)}return{r:t,yParityAndS:s}};const n=r(1699),o=r(6669)},9595(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(4337)),a=n(r(8798)),i=n(r(9085)),s=(0,o.default)(function e(t,r,n){return(0,i.default)(function(r,n,o){return(0,a.default)(n)&&(0,a.default)(o)?e(t,n,o):t(r,n,o)},r,n)});t.default=s},9622(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},9638(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAbiItem=function(e){let t;if("string"==typeof e)t=(0,i.parseSignature)(e);else{const r=(0,a.parseStructs)(e),n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!(0,o.isStructSignature)(n)){t=(0,i.parseSignature)(n,r);break}}}if(!t)throw new n.InvalidAbiItemError({signature:e});return t};const n=r(243),o=r(4512),a=r(8689),i=r(790)},9672(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlockNumber=function(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:u,onError:d,poll:l,pollingInterval:f=e.pollingInterval}){let p;return(void 0!==l?l:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{const n=(0,s.stringify)(["watchBlockNumber",e.uid,t,r,f]);return(0,a.observe)(n,{onBlockNumber:u,onError:d},n=>(0,i.poll)(async()=>{try{const t=await(0,o.getAction)(e,c.getBlockNumber,"getBlockNumber")({cacheTime:0});if(void 0!==p){if(t===p)return;if(t-p>1&&r)for(let e=p+1n;e<t;e++)n.onBlockNumber(e,p),p=e}(void 0===p||t>p)&&(n.onBlockNumber(t,p),p=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:f}))})():(()=>{const o=(0,s.stringify)(["watchBlockNumber",e.uid,t,r]);return(0,a.observe)(o,{onBlockNumber:u,onError:d},t=>{let r=!0,o=()=>r=!1;return(async()=>{try{const a=(()=>{if("fallback"===e.transport.type){const t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:i}=await a.subscribe({params:["newHeads"],onData(e){if(!r)return;const o=(0,n.hexToBigInt)(e.result?.number);t.onBlockNumber(o,p),p=o},onError(e){t.onError?.(e)}});o=i,r||o()}catch(e){d?.(e)}})(),()=>o()})})()};const n=r(4130),o=r(3115),a=r(9097),i=r(2464),s=r(8352),c=r(5725)},9723(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PROVIDER_ICON=void 0,t.detectInjectedProviderInfo=function(e){for(var n="Injected Provider",o="io.injected.provider",a=e,i=0,s=r;i<s.length;i++){var c=s[i];if(a[c.flag]){n=c.name,o=c.rdns;break}}return{name:n,rdns:o,uuid:"injected-".concat(o.replace(/[^a-zA-Z0-9]/g,"-")),icon:t.DEFAULT_PROVIDER_ICON}},t.isValidProvider=function(e){return!!e&&"function"==typeof e.request&&"function"==typeof e.on&&"function"==typeof e.removeListener},t.DEFAULT_PROVIDER_ICON="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSIjRkZGIi8+CjxwYXRoIGQ9Ik0xNiA4TDggMjRoMTZMMTYgOHoiIGZpbGw9IiMzMzMiLz4KPC9zdmc+Cg==";var r=[{flag:"isMetaMask",name:"MetaMask",rdns:"io.metamask"},{flag:"isCoinbaseWallet",name:"Coinbase Wallet",rdns:"com.coinbase.wallet"},{flag:"isWalletConnect",name:"WalletConnect",rdns:"com.walletconnect"},{flag:"isTrust",name:"Trust Wallet",rdns:"com.trustwallet"},{flag:"isBraveWallet",name:"Brave Wallet",rdns:"com.brave.wallet"},{flag:"isPhantom",name:"Phantom",rdns:"app.phantom"}]},9734(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createBlockFilter=async function(e){const t=(0,n.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}};const n=r(1691)},9737(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.requestAddresses=async function(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,n.getAddress)(e))};const n=r(9868)},9748(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.buildRequest=function(e,t={}){return async(r,l={})=>{const{dedupe:f=!1,methods:p,retryDelay:m=150,retryCount:b=3,uid:h}={...t,...l},{method:y}=r;if(p?.exclude?.includes(y))throw new a.MethodNotSupportedRpcError(new Error("method not supported"),{method:y});if(p?.include&&!p.include.includes(y))throw new a.MethodNotSupportedRpcError(new Error("method not supported"),{method:y});const g=f?(0,i.stringToHex)(`${h}.${(0,u.stringify)(r)}`):void 0;return(0,s.withDedupe)(()=>(0,c.withRetry)(async()=>{try{return await e(r)}catch(e){const t=e;switch(t.code){case a.ParseRpcError.code:throw new a.ParseRpcError(t);case a.InvalidRequestRpcError.code:throw new a.InvalidRequestRpcError(t);case a.MethodNotFoundRpcError.code:throw new a.MethodNotFoundRpcError(t,{method:r.method});case a.InvalidParamsRpcError.code:throw new a.InvalidParamsRpcError(t);case a.InternalRpcError.code:throw new a.InternalRpcError(t);case a.InvalidInputRpcError.code:throw new a.InvalidInputRpcError(t);case a.ResourceNotFoundRpcError.code:throw new a.ResourceNotFoundRpcError(t);case a.ResourceUnavailableRpcError.code:throw new a.ResourceUnavailableRpcError(t);case a.TransactionRejectedRpcError.code:throw new a.TransactionRejectedRpcError(t);case a.MethodNotSupportedRpcError.code:throw new a.MethodNotSupportedRpcError(t,{method:r.method});case a.LimitExceededRpcError.code:throw new a.LimitExceededRpcError(t);case a.JsonRpcVersionUnsupportedError.code:throw new a.JsonRpcVersionUnsupportedError(t);case a.UserRejectedRequestError.code:throw new a.UserRejectedRequestError(t);case a.UnauthorizedProviderError.code:throw new a.UnauthorizedProviderError(t);case a.UnsupportedProviderMethodError.code:throw new a.UnsupportedProviderMethodError(t);case a.ProviderDisconnectedError.code:throw new a.ProviderDisconnectedError(t);case a.ChainDisconnectedError.code:throw new a.ChainDisconnectedError(t);case a.SwitchChainError.code:throw new a.SwitchChainError(t);case a.UnsupportedNonOptionalCapabilityError.code:throw new a.UnsupportedNonOptionalCapabilityError(t);case a.UnsupportedChainIdError.code:throw new a.UnsupportedChainIdError(t);case a.DuplicateIdError.code:throw new a.DuplicateIdError(t);case a.UnknownBundleIdError.code:throw new a.UnknownBundleIdError(t);case a.BundleTooLargeError.code:throw new a.BundleTooLargeError(t);case a.AtomicReadyWalletRejectedUpgradeError.code:throw new a.AtomicReadyWalletRejectedUpgradeError(t);case a.AtomicityNotSupportedError.code:throw new a.AtomicityNotSupportedError(t);case 5e3:throw new a.UserRejectedRequestError(t);default:if(e instanceof n.BaseError)throw e;throw new a.UnknownRpcError(t)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof o.HttpRequestError){const e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return(1<<e)*m},retryCount:b,shouldRetry:({error:e})=>d(e)}),{enabled:f,id:g})}},t.shouldRetry=d;const n=r(1682),o=r(3318),a=r(2564),i=r(6669),s=r(8928),c=r(2801),u=r(8352);function d(e){return"code"in e&&"number"==typeof e.code?-1===e.code||e.code===a.LimitExceededRpcError.code||e.code===a.InternalRpcError.code:!(e instanceof o.HttpRequestError&&e.status)||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}},9757(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolContent=async function(e){return await e.request({method:"txpool_content"})}},9765(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareEncodeFunctionData=function(e){const{abi:t,args:r,functionName:c}=e;let u=t[0];if(c){const e=(0,i.getAbiItem)({abi:t,args:r,name:c});if(!e)throw new n.AbiFunctionNotFoundError(c,{docsPath:s});u=e}if("function"!==u.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:s});return{abi:[u],functionName:(0,o.toFunctionSelector)((0,a.formatAbiItem)(u))}};const n=r(9797),o=r(364),a=r(1508),i=r(3123),s="/docs/contract/encodeFunctionData"},9766(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.padBytes=t.pad=t.isHex=t.isBytes=t.concatHex=t.concatBytes=t.concat=t.getChainContractAddress=t.extractChain=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.ccipRequest=t.buildRequest=t.verifyAuthorization=t.serializeAuthorizationList=t.recoverAuthorizationAddress=t.hashAuthorization=t.isAddressEqual=t.isAddress=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAddress=t.parseEventLogs=t.getAbiItem=t.formatAbiItemWithArgs=t.formatAbiParams=t.formatAbiItem=t.encodePacked=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeAbiParameters=t.publicKeyToAddress=t.parseAccount=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=void 0,t.ripemd160=t.keccak256=t.isHash=t.getAction=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatLog=t.defineFormatter=t.extract=t.formatBlock=t.defineBlock=t.getTransactionError=t.getNodeError=t.containsNodeError=t.getEstimateGasError=t.getContractError=t.getCallError=t.toRlp=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.bytesToBigInt=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=void 0,t.validateTypedData=t.serializeTypedData=t.serializeTransaction=t.serializeAccessList=t.parseTransaction=t.getTransactionType=t.getSerializedTransactionType=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.stringify=t.verifyTypedData=t.verifyMessage=t.verifyHash=t.serializeErc8010Signature=t.serializeErc6492Signature=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.parseErc8010Signature=t.parseErc6492Signature=t.isErc8010Signature=t.isErc6492Signature=t.hashTypedData=t.hashStruct=t.hashMessage=t.getWebSocketRpcClient=t.socketClientCache=t.getSocketRpcClient=t.getHttpRpcClient=t.rpc=t.getSocket=t.integerRegex=t.bytesRegex=t.arrayRegex=t.nonceManager=t.createNonceManager=t.getFunctionSignature=t.toFunctionSignature=t.getFunctionSelector=t.toFunctionSelector=t.toFunctionHash=t.getEventSignature=t.toEventSignature=t.getEventSelector=t.toEventSelector=t.toEventHash=t.sha256=void 0,t.parseUnits=t.parseGwei=t.parseEther=t.formatUnits=t.formatGwei=t.formatEther=void 0;var n=r(3863);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return n.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return n.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return n.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return n.parseAbiParameters}});var o=r(9546);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return o.parseAccount}});var a=r(5339);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return a.publicKeyToAddress}});var i=r(8448);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return i.decodeAbiParameters}});var s=r(6129);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var c=r(6218);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return c.decodeEventLog}});var u=r(1756);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return u.decodeFunctionData}});var d=r(233);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return d.decodeFunctionResult}});var l=r(3224);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return l.encodeAbiParameters}});var f=r(8851);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return f.encodeDeployData}});var p=r(6406);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return p.encodeErrorResult}});var m=r(574);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return m.encodeEventTopics}});var b=r(5108);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return b.encodeFunctionData}});var h=r(6801);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return h.encodeFunctionResult}});var y=r(8528);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return y.encodePacked}});var g=r(1508);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return g.formatAbiItem}}),Object.defineProperty(t,"formatAbiParams",{enumerable:!0,get:function(){return g.formatAbiParams}});var v=r(3349);Object.defineProperty(t,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return v.formatAbiItemWithArgs}});var E=r(3123);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return E.getAbiItem}});var w=r(9028);Object.defineProperty(t,"parseEventLogs",{enumerable:!0,get:function(){return w.parseEventLogs}});var P=r(9868);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return P.getAddress}});var A=r(7102);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return A.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return A.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return A.getCreateAddress}});var x=r(2018);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return x.isAddress}});var I=r(7624);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return I.isAddressEqual}});var S=r(7270);Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return S.hashAuthorization}});var T=r(4572);Object.defineProperty(t,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return T.recoverAuthorizationAddress}});var O=r(2528);Object.defineProperty(t,"serializeAuthorizationList",{enumerable:!0,get:function(){return O.serializeAuthorizationList}});var _=r(6437);Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return _.verifyAuthorization}});var j=r(9748);Object.defineProperty(t,"buildRequest",{enumerable:!0,get:function(){return j.buildRequest}});var C=r(2722);Object.defineProperty(t,"ccipRequest",{enumerable:!0,get:function(){return C.ccipRequest}}),Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return C.ccipRequest}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return C.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return C.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return C.offchainLookupSignature}});var B=r(375);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return B.assertCurrentChain}});var M=r(2351);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return M.defineChain}});var k=r(9021);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return k.extractChain}});var R=r(9858);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return R.getChainContractAddress}});var N=r(1028);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return N.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return N.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return N.concatHex}});var F=r(5561);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return F.isBytes}});var U=r(6611);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return U.isHex}});var H=r(5599);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return H.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return H.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return H.padHex}});var D=r(4025);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return D.size}});var L=r(1972);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return L.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return L.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return L.sliceHex}});var z=r(7716);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return z.trim}});var $=r(4436);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return $.bytesToBigInt}}),Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return $.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return $.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return $.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return $.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return $.fromBytes}});var G=r(4130);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return G.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return G.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return G.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return G.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return G.hexToString}});var q=r(9521);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return q.fromRlp}});var V=r(1699);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return V.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return V.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return V.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return V.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return V.toBytes}});var W=r(6669);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return W.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return W.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return W.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return W.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return W.toHex}});var K=r(4314);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return K.toRlp}});var Z=r(9767);Object.defineProperty(t,"getCallError",{enumerable:!0,get:function(){return Z.getCallError}});var Y=r(2505);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return Y.getContractError}});var J=r(4670);Object.defineProperty(t,"getEstimateGasError",{enumerable:!0,get:function(){return J.getEstimateGasError}});var Q=r(5871);Object.defineProperty(t,"containsNodeError",{enumerable:!0,get:function(){return Q.containsNodeError}}),Object.defineProperty(t,"getNodeError",{enumerable:!0,get:function(){return Q.getNodeError}});var X=r(1279);Object.defineProperty(t,"getTransactionError",{enumerable:!0,get:function(){return X.getTransactionError}});var ee=r(3776);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return ee.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return ee.formatBlock}});var te=r(4384);Object.defineProperty(t,"extract",{enumerable:!0,get:function(){return te.extract}});var re=r(9783);Object.defineProperty(t,"defineFormatter",{enumerable:!0,get:function(){return re.defineFormatter}});var ne=r(9475);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return ne.formatLog}});var oe=r(7477);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return oe.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return oe.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return oe.transactionType}});var ae=r(3501);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return ae.defineTransactionReceipt}});var ie=r(2996);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return ie.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return ie.formatTransactionRequest}});var se=r(3115);Object.defineProperty(t,"getAction",{enumerable:!0,get:function(){return se.getAction}});var ce=r(5140);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return ce.isHash}});var ue=r(1725);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return ue.keccak256}});var de=r(4522);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return de.ripemd160}});var le=r(27);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return le.sha256}});var fe=r(905);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return fe.toEventHash}});var pe=r(2644);Object.defineProperty(t,"toEventSelector",{enumerable:!0,get:function(){return pe.toEventSelector}}),Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return pe.toEventSelector}});var me=r(6447);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return me.toEventSignature}}),Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return me.toEventSignature}});var be=r(2129);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return be.toFunctionHash}});var he=r(364);Object.defineProperty(t,"toFunctionSelector",{enumerable:!0,get:function(){return he.toFunctionSelector}}),Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return he.toFunctionSelector}});var ye=r(4055);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return ye.toFunctionSignature}}),Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return ye.toFunctionSignature}});var ge=r(6387);Object.defineProperty(t,"createNonceManager",{enumerable:!0,get:function(){return ge.createNonceManager}}),Object.defineProperty(t,"nonceManager",{enumerable:!0,get:function(){return ge.nonceManager}});var ve=r(9622);Object.defineProperty(t,"arrayRegex",{enumerable:!0,get:function(){return ve.arrayRegex}}),Object.defineProperty(t,"bytesRegex",{enumerable:!0,get:function(){return ve.bytesRegex}}),Object.defineProperty(t,"integerRegex",{enumerable:!0,get:function(){return ve.integerRegex}});var Ee=r(9787);Object.defineProperty(t,"getSocket",{enumerable:!0,get:function(){return Ee.getSocket}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return Ee.rpc}});var we=r(1901);Object.defineProperty(t,"getHttpRpcClient",{enumerable:!0,get:function(){return we.getHttpRpcClient}});var Pe=r(2264);Object.defineProperty(t,"getSocketRpcClient",{enumerable:!0,get:function(){return Pe.getSocketRpcClient}}),Object.defineProperty(t,"socketClientCache",{enumerable:!0,get:function(){return Pe.socketClientCache}});var Ae=r(9574);Object.defineProperty(t,"getWebSocketRpcClient",{enumerable:!0,get:function(){return Ae.getWebSocketRpcClient}});var xe=r(7399);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return xe.hashMessage}});var Ie=r(1556);Object.defineProperty(t,"hashStruct",{enumerable:!0,get:function(){return Ie.hashStruct}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return Ie.hashTypedData}});var Se=r(2439);Object.defineProperty(t,"isErc6492Signature",{enumerable:!0,get:function(){return Se.isErc6492Signature}});var Te=r(4195);Object.defineProperty(t,"isErc8010Signature",{enumerable:!0,get:function(){return Te.isErc8010Signature}});var Oe=r(7690);Object.defineProperty(t,"parseErc6492Signature",{enumerable:!0,get:function(){return Oe.parseErc6492Signature}});var _e=r(4258);Object.defineProperty(t,"parseErc8010Signature",{enumerable:!0,get:function(){return _e.parseErc8010Signature}});var je=r(1154);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return je.recoverAddress}});var Ce=r(2517);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return Ce.recoverMessageAddress}});var Be=r(7246);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return Be.recoverPublicKey}});var Me=r(3288);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return Me.recoverTypedDataAddress}});var ke=r(6187);Object.defineProperty(t,"serializeErc6492Signature",{enumerable:!0,get:function(){return ke.serializeErc6492Signature}});var Re=r(3847);Object.defineProperty(t,"serializeErc8010Signature",{enumerable:!0,get:function(){return Re.serializeErc8010Signature}});var Ne=r(6875);Object.defineProperty(t,"verifyHash",{enumerable:!0,get:function(){return Ne.verifyHash}});var Fe=r(7824);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return Fe.verifyMessage}});var Ue=r(4847);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return Ue.verifyTypedData}});var He=r(8352);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return He.stringify}});var De=r(8901);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return De.assertRequest}});var Le=r(8688);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Le.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Le.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return Le.assertTransactionLegacy}});var ze=r(6405);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return ze.getSerializedTransactionType}});var $e=r(4720);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return $e.getTransactionType}});var Ge=r(925);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return Ge.parseTransaction}});var qe=r(5490);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return qe.serializeAccessList}});var Ve=r(8786);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return Ve.serializeTransaction}});var We=r(4413);Object.defineProperty(t,"serializeTypedData",{enumerable:!0,get:function(){return We.serializeTypedData}}),Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return We.validateTypedData}});var Ke=r(2945);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Ke.formatEther}});var Ze=r(1825);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return Ze.formatGwei}});var Ye=r(7290);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Ye.formatUnits}});var Je=r(6063);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return Je.parseEther}});var Qe=r(1007);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return Qe.parseGwei}});var Xe=r(7916);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Xe.parseUnits}})},9767(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCallError=function(e,{docsPath:t,...r}){const i=(()=>{const t=(0,a.getNodeError)(e,r);return t instanceof o.UnknownNodeError?e:t})();return new n.CallExecutionError(i,{docsPath:t,...r})};const n=r(3585),o=r(6687),a=r(5871)},9783(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defineFormatter=function(e,t){return({exclude:r,format:n})=>({exclude:r,format:(e,o)=>{const a=t(e,o);if(r)for(const e of r)delete a[e];return{...a,...n(e,o)}},type:e})}},9787(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=void 0,t.getSocket=async function(e){const t=await(0,o.getWebSocketRpcClient)(e);return Object.assign(t.socket,{requests:t.requests,subscriptions:t.subscriptions})};const n=r(1901),o=r(9574);t.rpc={http:(e,t)=>(0,n.getHttpRpcClient)(e).request(t),webSocket:function(e,{body:t,onError:r,onResponse:n}){return e.request({body:t,onError:r,onResponse:n}),e},webSocketAsync:async function(e,{body:t,timeout:r=1e4}){return e.requestAsync({body:t,timeout:r})}}},9797(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiDecodingTypeError=t.InvalidAbiEncodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiItemAmbiguityError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=void 0;const n=r(1508),o=r(4025),a=r(1682);class i extends a.BaseError{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e,name:"AbiConstructorNotFoundError"})}}t.AbiConstructorNotFoundError=i;class s extends a.BaseError{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}t.AbiConstructorParamsNotFoundError=s;class c extends a.BaseError{constructor({data:e,size:t}){super([`Data size of ${t} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join("\n"),{metaMessages:[`Data: ${e} (${t} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}t.AbiDecodingDataSizeInvalidError=c;class u extends a.BaseError{constructor({data:e,params:t,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.formatAbiParams)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}t.AbiDecodingDataSizeTooSmallError=u;class d extends a.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}t.AbiDecodingZeroDataError=d;class l extends a.BaseError{constructor({expectedLength:e,givenLength:t,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}t.AbiEncodingArrayLengthMismatchError=l;class f extends a.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.size)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}t.AbiEncodingBytesSizeMismatchError=f;class p extends a.BaseError{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}t.AbiEncodingLengthMismatchError=p;class m extends a.BaseError{constructor(e,{docsPath:t}){super([`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n"),{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}t.AbiErrorInputsNotFoundError=m;class b extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Error ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t,name:"AbiErrorNotFoundError"})}}t.AbiErrorNotFoundError=b;class h extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}t.AbiErrorSignatureNotFoundError=h;class y extends a.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}t.AbiEventSignatureEmptyTopicsError=y;class g extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}t.AbiEventSignatureNotFoundError=g;class v extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t,name:"AbiEventNotFoundError"})}}t.AbiEventNotFoundError=v;class E extends a.BaseError{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}t.AbiFunctionNotFoundError=E;class w extends a.BaseError{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}t.AbiFunctionOutputsNotFoundError=w;class P extends a.BaseError{constructor(e,{docsPath:t}){super([`Encoded function signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}t.AbiFunctionSignatureNotFoundError=P;class A extends a.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.formatAbiItem)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.formatAbiItem)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}t.AbiItemAmbiguityError=A;class x extends a.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}t.BytesSizeMismatchError=x;class I extends a.BaseError{constructor({abiItem:e,data:t,params:r,size:o}){super([`Data size of ${o} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.formatAbiParams)(r,{includeName:!0})})`,`Data: ${t} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=o}}t.DecodeLogDataMismatch=I;class S extends a.BaseError{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.formatAbiItem)(e,{includeName:!0})}".`].join("\n"),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}t.DecodeLogTopicsMismatch=S;class T extends a.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}t.InvalidAbiEncodingTypeError=T;class O extends a.BaseError{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiDecodingType"})}}t.InvalidAbiDecodingTypeError=O;class _ extends a.BaseError{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n"),{name:"InvalidArrayError"})}}t.InvalidArrayError=_;class j extends a.BaseError{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}t.InvalidDefinitionTypeError=j;class C extends a.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}t.UnsupportedPackedAbiType=C},9839(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isImageUri=u,t.getGateway=d,t.resolveAvatarUri=l,t.getJsonImage=f,t.getMetadataAvatarUri=async function({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(e=>e.json());return await p({gatewayUrls:e,uri:f(r)})}catch{throw new o.EnsAvatarUriResolutionError({uri:t})}},t.parseAvatarUri=p,t.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,a]=t.split("/"),[i,s]=r.split(":"),[c,u]=n.split(":");if(!i||"eip155"!==i.toLowerCase())throw new o.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!s)throw new o.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!u)throw new o.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!a)throw new o.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!c)throw new o.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s,10),namespace:c.toLowerCase(),contractAddress:u,tokenID:a}},t.getNftTokenUri=async function(e,{nft:t}){if("erc721"===t.namespace)return(0,n.readContract)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,n.readContract)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new o.EnsAvatarUnsupportedNamespaceError({namespace:t.namespace})};const n=r(1855),o=r(4219),a=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,i=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,s=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,c=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function u(e){try{const t=await fetch(e,{method:"HEAD"});if(200===t.status){const e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){return("object"!=typeof t||void 0===t.response)&&!!Object.hasOwn(globalThis,"Image")&&new Promise(t=>{const r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function d(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function l({uri:e,gatewayUrls:t}){const r=s.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=d(t?.ipfs,"https://ipfs.io"),u=d(t?.arweave,"https://arweave.net"),l=e.match(a),{protocol:f,subpath:p,target:m,subtarget:b=""}=l?.groups||{},h="ipns:/"===f||"ipns/"===p,y="ipfs:/"===f||"ipfs/"===p||i.test(e);if(e.startsWith("http")&&!h&&!y){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((h||y)&&m)return{uri:`${n}/${h?"ipns":"ipfs"}/${m}${b}`,isOnChain:!1,isEncoded:!1};if("ar:/"===f&&m)return{uri:`${u}/${m}${b||""}`,isOnChain:!1,isEncoded:!1};let g=e.replace(c,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return{uri:g,isOnChain:!0,isEncoded:!1};throw new o.EnsAvatarUriResolutionError({uri:e})}function f(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new o.EnsAvatarInvalidMetadataError({data:e});return e.image||e.image_url||e.image_data}async function p({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=l({uri:t,gatewayUrls:e});if(n)return r;if(await u(r))return r;throw new o.EnsAvatarUriResolutionError({uri:t})}},9858(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainContractAddress=function({blockNumber:e,chain:t,contract:r}){const o=t?.contracts?.[r];if(!o)throw new n.ChainDoesNotSupportContract({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new n.ChainDoesNotSupportContract({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address};const n=r(2078)},9867(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.http=function(e,t={}){const{batch:r,fetchFn:c,fetchOptions:u,key:d="http",methods:l,name:f="HTTP JSON-RPC",onFetchRequest:p,onFetchResponse:m,retryDelay:b,raw:h}=t;return({chain:y,retryCount:g,timeout:v})=>{const{batchSize:E=1e3,wait:w=0}="object"==typeof r?r:{},P=t.retryCount??g,A=v??t.timeout??1e4,x=e||y?.rpcUrls.default.http[0];if(!x)throw new o.UrlRequiredError;const I=(0,i.getHttpRpcClient)(x,{fetchFn:c,fetchOptions:u,onRequest:p,onResponse:m,timeout:A});return(0,s.createTransport)({key:d,methods:l,name:f,async request({method:e,params:t}){const o={method:e,params:t},{schedule:i}=(0,a.createBatchScheduler)({id:x,wait:w,shouldSplitBatch:e=>e.length>E,fn:e=>I.request({body:e}),sort:(e,t)=>e.id-t.id}),[{error:s,result:c}]=await(async e=>r?i(e):[await I.request({body:e})])(o);if(h)return{error:s,result:c};if(s)throw new n.RpcRequestError({body:o,error:s,url:x});return c},retryCount:P,retryDelay:b,timeout:A,type:"http"},{fetchOptions:u,url:x})}};const n=r(3318),o=r(7266),a=r(2118),i=r(1901),s=r(2102)},9868(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.checksumAddress=u,t.getAddress=function(e,t){if(!(0,s.isAddress)(e,{strict:!1}))throw new n.InvalidAddressError({address:e});return u(e,t)};const n=r(1611),o=r(1699),a=r(1725),i=r(2292),s=r(2018),c=new i.LruMap(8192);function u(e,t){if(c.has(`${e}.${t}`))return c.get(`${e}.${t}`);const r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,a.keccak256)((0,o.stringToBytes)(r),"bytes"),i=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&n[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());const s=`0x${i.join("")}`;return c.set(`${e}.${t}`,s),s}},9874(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(7065),t),o(r(446),t),o(r(9157),t)},9905(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isHexStrict=void 0,t.isHexStrict=function(e){return"string"==typeof e&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e)}},9939(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransaction=async function(e,t){const{account:r=e.account,chain:f=e.chain,accessList:g,authorizationList:v,blobs:E,data:w,gas:P,gasPrice:A,maxFeePerBlobGas:x,maxFeePerGas:I,maxPriorityFeePerGas:S,nonce:T,type:O,value:_,...j}=t;if(void 0===r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const C=r?(0,n.parseAccount)(r):null;try{(0,p.assertRequest)(t);const r=await(async()=>t.to?t.to:null!==t.to&&v&&v.length>0?await(0,i.recoverAuthorizationAddress)({authorization:v[0]}).catch(()=>{throw new a.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if("json-rpc"===C?.type||null===C){let t;null!==f&&(t=await(0,l.getAction)(e,m.getChainId,"getChainId")({}),(0,s.assertCurrentChain)({currentChainId:t,chain:f}));const n=e.chain?.formatters?.transactionRequest?.format,o=(n||d.formatTransactionRequest)({...(0,u.extract)(j,{format:n}),accessList:g,account:C,authorizationList:v,blobs:E,chainId:t,data:w,gas:P,gasPrice:A,maxFeePerBlobGas:x,maxFeePerGas:I,maxPriorityFeePerGas:S,nonce:T,to:r,type:O,value:_},"sendTransaction"),a=y.get(e.uid),i=a?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:i,params:[o]},{retryCount:0})}catch(t){if(!1===a)throw t;const r=t;if("InvalidInputRpcError"===r.name||"InvalidParamsRpcError"===r.name||"MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)return await e.request({method:"wallet_sendTransaction",params:[o]},{retryCount:0}).then(t=>(y.set(e.uid,!0),t)).catch(t=>{const n=t;if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw y.set(e.uid,!1),r;throw n});throw r}}if("local"===C?.type){const t=await(0,l.getAction)(e,b.prepareTransactionRequest,"prepareTransactionRequest")({account:C,accessList:g,authorizationList:v,blobs:E,chain:f,data:w,gas:P,gasPrice:A,maxFeePerBlobGas:x,maxFeePerGas:I,maxPriorityFeePerGas:S,nonce:T,nonceManager:C.nonceManager,parameters:[...b.defaultParameters,"sidecars"],type:O,value:_,...j,to:r}),n=f?.serializers?.transaction,o=await C.signTransaction(t,{serializer:n});return await(0,l.getAction)(e,h.sendRawTransaction,"sendRawTransaction")({serializedTransaction:o})}if("smart"===C?.type)throw new o.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new o.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:C?.type})}catch(e){if(e instanceof o.AccountTypeNotSupportedError)throw e;throw(0,c.getTransactionError)(e,{...t,account:C,chain:t.chain||void 0})}};const n=r(9546),o=r(8328),a=r(1682),i=r(4572),s=r(375),c=r(1279),u=r(4384),d=r(2996),l=r(3115),f=r(2292),p=r(8901),m=r(401),b=r(211),h=r(4225),y=new f.LruMap(128)},9946(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.getContractAddress=void 0,t.getContractAddress=e=>e,t.getUrl=e=>e},9952(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTransactionAddress=async function(e){const{serializedTransaction:t,signature:r}=e,s=(0,o.parseTransaction)(t),c=r??{r:s.r,s:s.s,v:s.v,yParity:s.yParity},u=(0,a.serializeTransaction)({...s,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,i.recoverAddress)({hash:(0,n.keccak256)(u),signature:c})};const n=r(1725),o=r(925),a=r(8786),i=r(1154)},9965(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaManager=t.SolanaAdapter=void 0;var a=r(9282);Object.defineProperty(t,"SolanaAdapter",{enumerable:!0,get:function(){return a.SolanaAdapter}});var i=r(2098);Object.defineProperty(t,"SolanaManager",{enumerable:!0,get:function(){return i.SolanaManager}}),o(r(7960),t),o(r(6433),t)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7532);return n.FormoAnalytics})());
|
|
3
3
|
//# sourceMappingURL=index.umd.min.js.map
|