Pay with Esprit and earn an instant 2% cashback!
To pay, scan the QR code with your Esprit App and confirm the payment. Leave this window open during payment.
')),r.allChannels().includes(data.paymentId)||r.subscribe("my-channel").bind("my-event",(async t=>{alert(JSON.stringify(t)),r.unsubscribe("my-channel"),n("#place_order").show(),await new Promise((t=>setTimeout(t,1e3))),n("#place_order").click()}))}))}else n(document).unbind("ajaxComplete"),n("#place_order").show()}i(),n("form.checkout").on("change",'input[name="payment_method"]',(function(){selectedPayment=n(this).val(),"esprit_pay"===selectedPayment?i():(n(document).unbind("ajaxComplete"),n("#place_order").show()),n(document.body).trigger("update_checkout")}))}))})()})();
\ No newline at end of file
+(()=>{var e={8159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ZKSYNC_ADDRESS=t.GELATO_RELAY_CONCURRENT_ERC2771_ZKSYNC_ADDRESS=t.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ADDRESS=t.GELATO_RELAY_CONCURRENT_ERC2771_ADDRESS=t.GELATO_RELAY_1BALANCE_ERC2771_ZKSYNC_ADDRESS=t.GELATO_RELAY_ERC2771_ZKSYNC_ADDRESS=t.GELATO_RELAY_1BALANCE_ERC2771_ADDRESS=t.GELATO_RELAY_ERC2771_ADDRESS=t.USER_NONCE_ABI=t.DEFAULT_DEADLINE_GAP=t.DEFAULT_INTERNAL_ERROR_MESSAGE=t.SIGN_TYPED_DATA_V4=t.GELATO_RELAY_URL=void 0,t.GELATO_RELAY_URL="https://api.gelato.digital",t.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",t.DEFAULT_INTERNAL_ERROR_MESSAGE="Internal Error",t.DEFAULT_DEADLINE_GAP=86400,t.USER_NONCE_ABI=["function userNonce(address account) external view returns (uint256)"],t.GELATO_RELAY_ERC2771_ADDRESS="0xb539068872230f20456CF38EC52EF2f91AF4AE49",t.GELATO_RELAY_1BALANCE_ERC2771_ADDRESS="0xd8253782c45a12053594b9deB72d8e8aB2Fca54c",t.GELATO_RELAY_ERC2771_ZKSYNC_ADDRESS="0x22DCC39b2AC376862183dd35A1664798dafC7Da6",t.GELATO_RELAY_1BALANCE_ERC2771_ZKSYNC_ADDRESS="0x97015cD4C3d456997DD1C40e2a18c79108FCc412",t.GELATO_RELAY_CONCURRENT_ERC2771_ADDRESS="0x8598806401A63Ddf52473F1B3C55bC9E33e2d73b",t.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ADDRESS="0xc65d82ECE367EF06bf2AB791B3f3CF037Dc0e816",t.GELATO_RELAY_CONCURRENT_ERC2771_ZKSYNC_ADDRESS="0xBa4082F4961c8Fb76231995C967CD9aa40f321b5",t.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ZKSYNC_ADDRESS="0xB8828e4c662D1a7e4f3d1f622EfAE6B63D852ED8"},3352:function(e,t,r){"use strict";var n,s,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},l=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.GelatoRelay=t.TaskState=t.ERC2771Type=void 0;const d=a(r(7187)),h=r(2219);Object.defineProperty(t,"ERC2771Type",{enumerable:!0,get:function(){return h.ERC2771Type}});const f=r(8530);Object.defineProperty(t,"TaskState",{enumerable:!0,get:function(){return f.TaskState}});const p=r(8159),g=r(2756);t.GelatoRelay=class{constructor(e){n.set(this,void 0),s.set(this,void 0),this.configure=e=>{u(this,n,this._getConfiguration(e),"f")},this._getConfiguration=e=>{var t,r,n,s,i,o,a,c,u,l,d,h,f,g,y,m,b;const v=null!==(t=null==e?void 0:e.url)&&void 0!==t?t:p.GELATO_RELAY_URL;return{url:v,websocketUrl:v.replace(/^http/,"ws"),contract:{relayERC2771:null!==(n=null===(r=null==e?void 0:e.contract)||void 0===r?void 0:r.relayERC2771)&&void 0!==n?n:p.GELATO_RELAY_ERC2771_ADDRESS,relay1BalanceERC2771:null!==(i=null===(s=null==e?void 0:e.contract)||void 0===s?void 0:s.relay1BalanceERC2771)&&void 0!==i?i:p.GELATO_RELAY_1BALANCE_ERC2771_ADDRESS,relayERC2771zkSync:null!==(a=null===(o=null==e?void 0:e.contract)||void 0===o?void 0:o.relayERC2771zkSync)&&void 0!==a?a:p.GELATO_RELAY_ERC2771_ZKSYNC_ADDRESS,relay1BalanceERC2771zkSync:null!==(u=null===(c=null==e?void 0:e.contract)||void 0===c?void 0:c.relay1BalanceERC2771zkSync)&&void 0!==u?u:p.GELATO_RELAY_1BALANCE_ERC2771_ZKSYNC_ADDRESS,relayConcurrentERC2771:null!==(d=null===(l=null==e?void 0:e.contract)||void 0===l?void 0:l.relayConcurrentERC2771)&&void 0!==d?d:p.GELATO_RELAY_CONCURRENT_ERC2771_ADDRESS,relay1BalanceConcurrentERC2771:null!==(f=null===(h=null==e?void 0:e.contract)||void 0===h?void 0:h.relay1BalanceConcurrentERC2771)&&void 0!==f?f:p.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ADDRESS,relayConcurrentERC2771zkSync:null!==(y=null===(g=null==e?void 0:e.contract)||void 0===g?void 0:g.relayConcurrentERC2771zkSync)&&void 0!==y?y:p.GELATO_RELAY_CONCURRENT_ERC2771_ZKSYNC_ADDRESS,relay1BalanceConcurrentERC2771zkSync:null!==(b=null===(m=null==e?void 0:e.contract)||void 0===m?void 0:m.relay1BalanceConcurrentERC2771zkSync)&&void 0!==b?b:p.GELATO_RELAY_1BALANCE_CONCURRENT_ERC2771_ZKSYNC_ADDRESS}}},this.callWithSyncFee=(e,t,r)=>c(this,void 0,void 0,(function*(){const i=yield d.relayWithSyncFee({request:e,sponsorApiKey:r,options:t},l(this,n,"f"));return l(this,s,"f").hasHandlers()&&(yield l(this,s,"f").subscribe(i.taskId)),i})),this.callWithSyncFeeERC2771=(e,t,r,i)=>c(this,void 0,void 0,(function*(){const o=yield d.relayWithCallWithSyncFeeERC2771({request:e,signerOrProvider:t,sponsorApiKey:i,options:r},l(this,n,"f"));return l(this,s,"f").hasHandlers()&&(yield l(this,s,"f").subscribe(o.taskId)),o})),this.sponsoredCall=(e,t,r)=>c(this,void 0,void 0,(function*(){const i=yield d.relayWithSponsoredCall({request:e,sponsorApiKey:t,options:r},l(this,n,"f"));return l(this,s,"f").hasHandlers()&&(yield l(this,s,"f").subscribe(i.taskId)),i})),this.sponsoredCallERC2771=(e,t,r,i)=>c(this,void 0,void 0,(function*(){const o=yield d.relayWithSponsoredCallERC2771({request:e,signerOrProvider:t,sponsorApiKey:r,options:i},l(this,n,"f"));return l(this,s,"f").hasHandlers()&&(yield l(this,s,"f").subscribe(o.taskId)),o})),this.getSignatureDataERC2771=(e,t,r)=>d.getSignatureDataERC2771({request:e,signerOrProvider:t,type:r},l(this,n,"f")),this.getDataToSignERC2771=(e,t,r)=>d.getDataToSignERC2771({request:e,signerOrProvider:r,type:t},l(this,n,"f")),this.sponsoredCallERC2771WithSignature=(e,t,r,i)=>c(this,void 0,void 0,(function*(){const o=yield d.sponsoredCallERC2771WithSignature({struct:e,signature:t,sponsorApiKey:r,options:i},l(this,n,"f"));return l(this,s,"f").hasHandlers()&&(yield l(this,s,"f").subscribe(o.taskId)),o})),this.callWithSyncFeeERC2771WithSignature=(e,t,r,i,o)=>c(this,void 0,void 0,(function*(){const a=yield d.callWithSyncFeeERC2771WithSignature({struct:e,syncFeeParams:t,signature:r,options:i,sponsorApiKey:o},l(this,n,"f"));return l(this,s,"f").hasHandlers()&&(yield l(this,s,"f").subscribe(a.taskId)),a})),this.isNetworkSupported=e=>d.isNetworkSupported({chainId:e},l(this,n,"f")),this.getSupportedNetworks=()=>d.getSupportedNetworks(l(this,n,"f")),this.isOracleActive=e=>d.isOracleActive({chainId:e},l(this,n,"f")),this.getGelatoOracles=()=>d.getGelatoOracles(l(this,n,"f")),this.getPaymentTokens=e=>d.getPaymentTokens({chainId:e},l(this,n,"f")),this.getEstimatedFee=(e,t,r,s,i=BigInt(0))=>d.getEstimatedFee({chainId:e,paymentToken:t,gasLimit:r,isHighPriority:s,gasLimitL1:i},l(this,n,"f")),this.getTaskStatus=e=>d.getTaskStatus({taskId:e},l(this,n,"f")),this.onTaskStatusUpdate=e=>{l(this,s,"f").onUpdate(e)},this.offTaskStatusUpdate=e=>{l(this,s,"f").offUpdate(e)},this.onError=e=>{l(this,s,"f").onError(e)},this.offError=e=>{l(this,s,"f").offError(e)},this.subscribeTaskStatusUpdate=e=>c(this,void 0,void 0,(function*(){yield l(this,s,"f").subscribe(e)})),this.unsubscribeTaskStatusUpdate=e=>c(this,void 0,void 0,(function*(){yield l(this,s,"f").unsubscribe(e)})),u(this,n,this._getConfiguration(e),"f"),u(this,s,new g.WebsocketHandler(l(this,n,"f").websocketUrl),"f")}},n=new WeakMap,s=new WeakMap},919:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.relayWithSyncFee=void 0;const s=r(2756),i=r(5538),o=r(8320);t.relayWithSyncFee=(e,t)=>n(void 0,void 0,void 0,(function*(){var r;try{const{request:n,options:a,sponsorApiKey:c}=e;if(!(yield(0,i.isNetworkSupported)({chainId:n.chainId},t)))throw new Error(`Chain id [${n.chainId}] is not supported`);return yield(0,s.post)({relayCall:o.RelayCall.CallWithSyncFee,request:Object.assign(Object.assign({},n),{isRelayContext:null===(r=n.isRelayContext)||void 0===r||r,sponsorApiKey:c,chainId:n.chainId.toString(),gasLimit:(null==a?void 0:a.gasLimit)?a.gasLimit.toString():void 0,retries:null==a?void 0:a.retries})},t)}catch(e){throw new Error(`GelatoRelaySDK/relayWithSyncFee: Failed with error: ${(0,s.getHttpErrorMessage)(e)}`)}}))},8932:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.callWithSyncFeeERC2771WithSignature=void 0;const s=r(2756),i=r(5538),o=r(8320),a=r(3134);t.callWithSyncFeeERC2771WithSignature=(e,t)=>n(void 0,void 0,void 0,(function*(){var r,n;try{const{signature:c,struct:u,syncFeeParams:l,options:d,sponsorApiKey:h}=e;if(!(yield(0,i.isNetworkSupported)({chainId:u.chainId},t)))throw new Error(`Chain id [${u.chainId}] is not supported`);if((0,s.isConcurrentStruct)(u)){const e=!0;return yield(0,s.post)({relayCall:o.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign(Object.assign({},(0,a.safeTransformStruct)(u)),l),{isRelayContext:null===(r=l.isRelayContext)||void 0===r||r,userSignature:c,isConcurrent:e,sponsorApiKey:h,gasLimit:(null==d?void 0:d.gasLimit)?d.gasLimit.toString():void 0,retries:null==d?void 0:d.retries})},t)}{const e=!1;return yield(0,s.post)({relayCall:o.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign(Object.assign({},(0,a.safeTransformStruct)(u)),l),{isRelayContext:null===(n=l.isRelayContext)||void 0===n||n,userSignature:c,isConcurrent:e,sponsorApiKey:h,gasLimit:(null==d?void 0:d.gasLimit)?d.gasLimit.toString():void 0,retries:null==d?void 0:d.retries})},t)}}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/callWithSyncFeeERC2771WithSignature: Failed with error: ${t}`)}}))},871:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.relayWithCallWithSyncFeeERC2771=void 0;const s=r(2756),i=r(8320),o=r(2219),a=r(1331),c=r(3134);t.relayWithCallWithSyncFeeERC2771=(e,t)=>n(void 0,void 0,void 0,(function*(){try{const{request:r,signerOrProvider:n,options:u,sponsorApiKey:l}=e;if(r.isConcurrent){const e=!0,{isRelayContext:d,feeToken:h}=r,f=o.ERC2771Type.ConcurrentCallWithSyncFee,{struct:p,signature:g}=yield(0,a.getSignatureDataERC2771)({request:r,signerOrProvider:n,type:f},t);return yield(0,s.post)({relayCall:i.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign({},(0,c.safeTransformStruct)(p)),{feeToken:h,isRelayContext:null==d||d,userSignature:g,isConcurrent:e,sponsorApiKey:l,gasLimit:(null==u?void 0:u.gasLimit)?u.gasLimit.toString():void 0,retries:null==u?void 0:u.retries})},t)}{const e=!1,{isRelayContext:d,feeToken:h}=r,f=o.ERC2771Type.CallWithSyncFee,{struct:p,signature:g}=yield(0,a.getSignatureDataERC2771)({request:r,signerOrProvider:n,type:f},t);return yield(0,s.post)({relayCall:i.RelayCall.CallWithSyncFeeERC2771,request:Object.assign(Object.assign({},(0,c.safeTransformStruct)(p)),{feeToken:h,isRelayContext:null==d||d,userSignature:g,isConcurrent:e,sponsorApiKey:l,gasLimit:(null==u?void 0:u.gasLimit)?u.gasLimit.toString():void 0,retries:null==u?void 0:u.retries})},t)}}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/callWithSyncFeeERC2771: Failed with error: ${t}`)}}))},1046:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getDataToSignERC2771=void 0;const s=r(2756),i=r(5538),o=r(5630);t.getDataToSignERC2771=function(e,t){return n(this,void 0,void 0,(function*(){try{const{request:r,signerOrProvider:n}=e,{chainId:a}=r;if(!(yield(0,i.isNetworkSupported)({chainId:a},t)))throw new Error(`Chain id [${a.toString()}] is not supported`);if((0,s.isConcurrentRequest)(r)){const s=e.type,{struct:i,typedData:a}=yield(0,o.populatePayloadToSign)({request:r,type:s,signerOrProvider:n},t);return{struct:i,typedData:a}}{const s=e.type,{struct:i,typedData:a}=yield(0,o.populatePayloadToSign)({request:r,type:s,signerOrProvider:n},t);return{struct:i,typedData:a}}}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/getDataToSignERC2771: Failed with error: ${t}`)}}))}},1331:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getSignatureDataERC2771=void 0;const s=r(2756),i=r(1046);t.getSignatureDataERC2771=function(e,t){return n(this,void 0,void 0,(function*(){try{const{request:r,signerOrProvider:n}=e;if((0,s.isConcurrentRequest)(r)){const o=e.type,{struct:a,typedData:c}=yield(0,i.getDataToSignERC2771)({request:r,signerOrProvider:n,type:o},t);return{struct:a,signature:yield(0,s.signTypedDataV4)(n,r.user,c)}}{const o=e.type,{struct:a,typedData:c}=yield(0,i.getDataToSignERC2771)({request:r,signerOrProvider:n,type:o},t);return{struct:a,signature:yield(0,s.signTypedDataV4)(n,r.user,c)}}}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/getSignatureDataERC2771: Failed with error: ${t}`)}}))}},698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callWithSyncFeeERC2771WithSignature=t.relayWithCallWithSyncFeeERC2771=t.sponsoredCallERC2771WithSignature=t.relayWithSponsoredCallERC2771=t.getDataToSignERC2771=t.getSignatureDataERC2771=void 0;var n=r(1331);Object.defineProperty(t,"getSignatureDataERC2771",{enumerable:!0,get:function(){return n.getSignatureDataERC2771}});var s=r(1046);Object.defineProperty(t,"getDataToSignERC2771",{enumerable:!0,get:function(){return s.getDataToSignERC2771}});var i=r(7502);Object.defineProperty(t,"relayWithSponsoredCallERC2771",{enumerable:!0,get:function(){return i.relayWithSponsoredCallERC2771}});var o=r(6497);Object.defineProperty(t,"sponsoredCallERC2771WithSignature",{enumerable:!0,get:function(){return o.sponsoredCallERC2771WithSignature}});var a=r(871);Object.defineProperty(t,"relayWithCallWithSyncFeeERC2771",{enumerable:!0,get:function(){return a.relayWithCallWithSyncFeeERC2771}});var c=r(8932);Object.defineProperty(t,"callWithSyncFeeERC2771WithSignature",{enumerable:!0,get:function(){return c.callWithSyncFeeERC2771WithSignature}})},6497:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.sponsoredCallERC2771WithSignature=void 0;const s=r(2756),i=r(5538),o=r(8320),a=r(3134);t.sponsoredCallERC2771WithSignature=(e,t)=>n(void 0,void 0,void 0,(function*(){try{const{signature:r,sponsorApiKey:n,struct:c,options:u}=e;if(!(yield(0,i.isNetworkSupported)({chainId:c.chainId},t)))throw new Error(`Chain id [${c.chainId}] is not supported`);if((0,s.isConcurrentStruct)(c)){const e=!0;return yield(0,s.post)({relayCall:o.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,a.safeTransformStruct)(c)),{userSignature:r,sponsorApiKey:n,isConcurrent:e,gasLimit:(null==u?void 0:u.gasLimit)?u.gasLimit.toString():void 0,retries:null==u?void 0:u.retries})},t)}{const e=!1;return yield(0,s.post)({relayCall:o.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,a.safeTransformStruct)(c)),{userSignature:r,sponsorApiKey:n,isConcurrent:e,gasLimit:(null==u?void 0:u.gasLimit)?u.gasLimit.toString():void 0,retries:null==u?void 0:u.retries})},t)}}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/sponsoredCallERC2771WithSignature: Failed with error: ${t}`)}}))},7502:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.relayWithSponsoredCallERC2771=void 0;const s=r(2756),i=r(8320),o=r(2219),a=r(1331),c=r(3134);t.relayWithSponsoredCallERC2771=(e,t)=>n(void 0,void 0,void 0,(function*(){return yield u(e,t)}));const u=(e,t)=>n(void 0,void 0,void 0,(function*(){try{const{request:r,sponsorApiKey:n,signerOrProvider:u,options:l}=e;if((0,s.isConcurrentRequest)(r)){const e=!0,d=o.ERC2771Type.ConcurrentSponsoredCall,{struct:h,signature:f}=yield(0,a.getSignatureDataERC2771)({request:r,signerOrProvider:u,type:d},t);return yield(0,s.post)({relayCall:i.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,c.safeTransformStruct)(h)),{userSignature:f,sponsorApiKey:n,isConcurrent:e,gasLimit:(null==l?void 0:l.gasLimit)?l.gasLimit.toString():void 0,retries:null==l?void 0:l.retries})},t)}{const e=!1,d=o.ERC2771Type.SponsoredCall,{struct:h,signature:f}=yield(0,a.getSignatureDataERC2771)({request:r,signerOrProvider:u,type:d},t);return yield(0,s.post)({relayCall:i.RelayCall.SponsoredCallERC2771,request:Object.assign(Object.assign({},(0,c.safeTransformStruct)(h)),{userSignature:f,sponsorApiKey:n,isConcurrent:e,gasLimit:(null==l?void 0:l.gasLimit)?l.gasLimit.toString():void 0,retries:null==l?void 0:l.retries})},t)}}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/sponsoredCallERC2771: Failed with error: ${t}`)}}))},2219:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ERC2771Type=t.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA=t.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA=t.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA=t.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA=void 0,t.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA={SponsoredCallERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userNonce",type:"uint256"},{name:"userDeadline",type:"uint256"}]},t.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA={CallWithSyncFeeERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userNonce",type:"uint256"},{name:"userDeadline",type:"uint256"}]},t.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA={SponsoredCallConcurrentERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userSalt",type:"bytes32"},{name:"userDeadline",type:"uint256"}]},t.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA={CallWithSyncFeeConcurrentERC2771:[{name:"chainId",type:"uint256"},{name:"target",type:"address"},{name:"data",type:"bytes"},{name:"user",type:"address"},{name:"userSalt",type:"bytes32"},{name:"userDeadline",type:"uint256"}]},(r=t.ERC2771Type||(t.ERC2771Type={})).CallWithSyncFee="CallWithSyncFee",r.SponsoredCall="SponsoredCall",r.ConcurrentCallWithSyncFee="ConcurrentCallWithSyncFee",r.ConcurrentSponsoredCall="ConcurrentSponsoredCall"},8946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPayloadToSign=void 0;const n=r(2756),s=r(8320),i=r(2219);t.getPayloadToSign=function(e,t){const{isSigner:r,struct:o,type:a}=e,c=(0,n.getEIP712Domain)({chainId:BigInt(o.chainId),type:a},t);switch(a){case i.ERC2771Type.SponsoredCall:return r?{domain:c,types:Object.assign({},i.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA),message:o}:{domain:c,types:Object.assign(Object.assign({},i.EIP712_SPONSORED_CALL_ERC2771_TYPE_DATA),s.EIP712_DOMAIN_TYPE_DATA),primaryType:"SponsoredCallERC2771",message:o};case i.ERC2771Type.CallWithSyncFee:return r?{domain:c,types:Object.assign({},i.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA),message:o}:{domain:c,types:Object.assign(Object.assign({},i.EIP712_CALL_WITH_SYNC_FEE_ERC2771_TYPE_DATA),s.EIP712_DOMAIN_TYPE_DATA),primaryType:"CallWithSyncFeeERC2771",message:o};case i.ERC2771Type.ConcurrentSponsoredCall:return r?{domain:c,types:Object.assign({},i.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA),message:o}:{domain:c,types:Object.assign(Object.assign({},i.EIP712_SPONSORED_CALL_CONCURRENT_ERC2771_TYPE_DATA),s.EIP712_DOMAIN_TYPE_DATA),primaryType:"SponsoredCallConcurrentERC2771",message:o};case i.ERC2771Type.ConcurrentCallWithSyncFee:return r?{domain:c,types:Object.assign({},i.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA),message:o}:{domain:c,types:Object.assign(Object.assign({},i.EIP712_CALL_WITH_SYNC_FEE_CONCURRENT_ERC2771_TYPE_DATA),s.EIP712_DOMAIN_TYPE_DATA),primaryType:"CallWithSyncFeeConcurrentERC2771",message:o};default:return a}}},5630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.populatePayloadToSign=void 0;var n=r(8048);Object.defineProperty(t,"populatePayloadToSign",{enumerable:!0,get:function(){return n.populatePayloadToSign}})},7244:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.mapRequestToStruct=void 0;const s=r(9237),i=r(2756);t.mapRequestToStruct=function(e,t){var r,o,a;return n(this,void 0,void 0,(function*(){if(!t.userDeadline&&!e.userDeadline)throw new Error("userDeadline is not found in the request, nor fetched");if((0,i.isConcurrentRequest)(e)){const n=t;return{userDeadline:null!==(r=n.userDeadline)&&void 0!==r?r:e.userDeadline,chainId:e.chainId,target:(0,s.getAddress)(e.target),data:e.data,user:(0,s.getAddress)(e.user),userSalt:null!==(o=n.userSalt)&&void 0!==o?o:e.userSalt}}{const r=t;if(void 0===r.userNonce&&void 0===e.userNonce)throw new Error("userNonce is not found in the request, nor fetched");return{userDeadline:null!==(a=r.userDeadline)&&void 0!==a?a:e.userDeadline,chainId:e.chainId,target:(0,s.getAddress)(e.target),data:e.data,user:(0,s.getAddress)(e.user),userNonce:void 0!==r.userNonce?r.userNonce:e.userNonce}}}))}},8048:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.populatePayloadToSign=void 0;const s=r(2756),i=r(7244),o=r(8946),a=r(3134);t.populatePayloadToSign=function(e,t){return n(this,void 0,void 0,(function*(){const{request:r,signerOrProvider:n}=e;if((0,s.isConcurrentRequest)(r)){const c=e.type,u=yield(0,s.populateOptionalUserParameters)({request:r,type:c,signerOrProvider:n},t),l=yield(0,i.mapRequestToStruct)(r,u),d=(0,a.safeTransformStruct)(l);return{struct:l,typedData:(0,o.getPayloadToSign)({struct:d,type:c,isSigner:n?(0,s.isSigner)(n):void 0},t)}}{const c=e.type,u=yield(0,s.populateOptionalUserParameters)({request:r,type:c,signerOrProvider:n},t),l=yield(0,i.mapRequestToStruct)(r,u),d=(0,a.safeTransformStruct)(l);return{struct:l,typedData:(0,o.getPayloadToSign)({struct:d,type:c,isSigner:n?(0,s.isSigner)(n):void 0},t)}}}))}},3134:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeTransformStruct=void 0;const n=r(2756);t.safeTransformStruct=function(e){return(0,n.isConcurrentStruct)(e)?Object.assign(Object.assign({},e),{chainId:e.chainId.toString()}):Object.assign(Object.assign({},e),{chainId:e.chainId.toString(),userNonce:e.userNonce.toString()})}},7187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskStatus=t.isNetworkSupported=t.getSupportedNetworks=t.isOracleActive=t.getPaymentTokens=t.getGelatoOracles=t.getEstimatedFee=t.relayWithCallWithSyncFeeERC2771=t.callWithSyncFeeERC2771WithSignature=t.sponsoredCallERC2771WithSignature=t.getDataToSignERC2771=t.getSignatureDataERC2771=t.relayWithSponsoredCallERC2771=t.relayWithSponsoredCall=t.relayWithSyncFee=void 0;var n=r(919);Object.defineProperty(t,"relayWithSyncFee",{enumerable:!0,get:function(){return n.relayWithSyncFee}});var s=r(8928);Object.defineProperty(t,"relayWithSponsoredCall",{enumerable:!0,get:function(){return s.relayWithSponsoredCall}});var i=r(698);Object.defineProperty(t,"relayWithSponsoredCallERC2771",{enumerable:!0,get:function(){return i.relayWithSponsoredCallERC2771}}),Object.defineProperty(t,"getSignatureDataERC2771",{enumerable:!0,get:function(){return i.getSignatureDataERC2771}}),Object.defineProperty(t,"getDataToSignERC2771",{enumerable:!0,get:function(){return i.getDataToSignERC2771}}),Object.defineProperty(t,"sponsoredCallERC2771WithSignature",{enumerable:!0,get:function(){return i.sponsoredCallERC2771WithSignature}}),Object.defineProperty(t,"callWithSyncFeeERC2771WithSignature",{enumerable:!0,get:function(){return i.callWithSyncFeeERC2771WithSignature}}),Object.defineProperty(t,"relayWithCallWithSyncFeeERC2771",{enumerable:!0,get:function(){return i.relayWithCallWithSyncFeeERC2771}});var o=r(6229);Object.defineProperty(t,"getEstimatedFee",{enumerable:!0,get:function(){return o.getEstimatedFee}}),Object.defineProperty(t,"getGelatoOracles",{enumerable:!0,get:function(){return o.getGelatoOracles}}),Object.defineProperty(t,"getPaymentTokens",{enumerable:!0,get:function(){return o.getPaymentTokens}}),Object.defineProperty(t,"isOracleActive",{enumerable:!0,get:function(){return o.isOracleActive}});var a=r(5538);Object.defineProperty(t,"getSupportedNetworks",{enumerable:!0,get:function(){return a.getSupportedNetworks}}),Object.defineProperty(t,"isNetworkSupported",{enumerable:!0,get:function(){return a.isNetworkSupported}});var c=r(9644);Object.defineProperty(t,"getTaskStatus",{enumerable:!0,get:function(){return c.getTaskStatus}})},5538:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedNetworks=t.isNetworkSupported=void 0;const s=r(2756);t.isNetworkSupported=(e,r)=>n(void 0,void 0,void 0,(function*(){return(yield(0,t.getSupportedNetworks)(r)).includes(e.chainId.toString())})),t.getSupportedNetworks=e=>n(void 0,void 0,void 0,(function*(){try{return(yield s.axiosInstance.get(`${e.url}/relays/v2`)).data.relays}catch(e){throw new Error(`GelatoRelaySDK/getSupportedNetworks: Failed with error: ${(0,s.getHttpErrorMessage)(e)}`)}}))},6229:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimatedFee=t.getPaymentTokens=t.getGelatoOracles=t.isOracleActive=void 0;const s=r(2756);t.isOracleActive=(e,r)=>n(void 0,void 0,void 0,(function*(){return(yield(0,t.getGelatoOracles)(r)).includes(e.chainId.toString())})),t.getGelatoOracles=e=>n(void 0,void 0,void 0,(function*(){try{return(yield s.axiosInstance.get(`${e.url}/oracles/`)).data.oracles}catch(e){throw new Error(`GelatoRelaySDK/getGelatoOracles: Failed with error: ${(0,s.getHttpErrorMessage)(e)}`)}})),t.getPaymentTokens=(e,t)=>n(void 0,void 0,void 0,(function*(){try{return(yield s.axiosInstance.get(`${t.url}/oracles/${e.chainId.toString()}/paymentTokens/`)).data.paymentTokens}catch(e){throw new Error(`GelatoRelaySDK/getPaymentTokens: Failed with error: ${(0,s.getHttpErrorMessage)(e)}`)}})),t.getEstimatedFee=(e,t)=>n(void 0,void 0,void 0,(function*(){const{chainId:r,gasLimit:n,gasLimitL1:i,isHighPriority:o,paymentToken:a}=e,c={paymentToken:a,gasLimit:n.toString(),isHighPriority:o,gasLimitL1:i.toString()};try{const e=yield s.axiosInstance.get(`${t.url}/oracles/${r.toString()}/estimate`,{params:c});return BigInt(e.data.estimatedFee)}catch(e){throw new Error(`GelatoRelaySDK/getEstimatedFee: Failed with error: ${(0,s.getHttpErrorMessage)(e)}`)}}))},8928:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.relayWithSponsoredCall=void 0;const s=r(9237),i=r(2756),o=r(5538),a=r(8320);t.relayWithSponsoredCall=(e,t)=>n(void 0,void 0,void 0,(function*(){return yield c(e,t)}));const c=(e,t)=>n(void 0,void 0,void 0,(function*(){try{const{request:r,sponsorApiKey:n,options:c}=e;if(!(yield(0,o.isNetworkSupported)({chainId:r.chainId},t)))throw new Error(`Chain id [${r.chainId}] is not supported`);const u=yield(e=>({chainId:e.chainId.toString(),target:(0,s.getAddress)(e.target),data:e.data}))(r);return yield(0,i.post)({relayCall:a.RelayCall.SponsoredCall,request:Object.assign(Object.assign({},u),{sponsorApiKey:n,gasLimit:(null==c?void 0:c.gasLimit)?c.gasLimit.toString():void 0,retries:null==c?void 0:c.retries})},t)}catch(e){const t=e.message;throw new Error(`GelatoRelaySDK/sponsoredCall: Failed with error: ${t}`)}}))},9644:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskStatus=void 0;const s=r(2756);t.getTaskStatus=(e,t)=>n(void 0,void 0,void 0,(function*(){try{return(yield s.axiosInstance.get(`${t.url}/tasks/status/${e.taskId}`)).data.task}catch(e){throw new Error(`GelatoRelaySDK/getTaskStatus: Failed with error: ${(0,s.getHttpErrorMessage)(e)}`)}}))},8530:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.TaskState=void 0,(r=t.TaskState||(t.TaskState={})).CheckPending="CheckPending",r.ExecPending="ExecPending",r.WaitingForConfirmation="WaitingForConfirmation",r.ExecSuccess="ExecSuccess",r.ExecReverted="ExecReverted",r.Cancelled="Cancelled"},8320:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712_DOMAIN_TYPE_DATA=t.RelayCall=void 0,(r=t.RelayCall||(t.RelayCall={}))[r.CallWithSyncFee=0]="CallWithSyncFee",r[r.CallWithSyncFeeERC2771=1]="CallWithSyncFeeERC2771",r[r.SponsoredCall=2]="SponsoredCall",r[r.SponsoredCallERC2771=3]="SponsoredCallERC2771",t.EIP712_DOMAIN_TYPE_DATA={EIP712Domain:[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}]}},8791: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.axiosInstance=void 0;const s=n(r(1497));t.axiosInstance=s.default.create()},7839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDeadline=void 0,t.calculateDeadline=e=>Math.floor(Date.now()/1e3)+e},1309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEIP712Domain=void 0;const n=r(2219),s=r(1561);t.getEIP712Domain=(e,t)=>{const{chainId:r,type:i}=e;switch(i){case n.ERC2771Type.CallWithSyncFee:return{name:"GelatoRelayERC2771",version:"1",chainId:r.toString(),verifyingContract:(0,s.getGelatoRelayERC2771Address)({chainId:r,type:i},t)};case n.ERC2771Type.SponsoredCall:return{name:"GelatoRelay1BalanceERC2771",version:"1",chainId:r.toString(),verifyingContract:(0,s.getGelatoRelayERC2771Address)({chainId:r,type:i},t)};case n.ERC2771Type.ConcurrentCallWithSyncFee:return{name:"GelatoRelayConcurrentERC2771",version:"1",chainId:r.toString(),verifyingContract:(0,s.getGelatoRelayERC2771Address)({chainId:r,type:i},t)};case n.ERC2771Type.ConcurrentSponsoredCall:return{name:"GelatoRelay1BalanceConcurrentERC2771",version:"1",chainId:r.toString(),verifyingContract:(0,s.getGelatoRelayERC2771Address)({chainId:r,type:i},t)};default:return i}}},5124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateSalt=void 0;const n=r(9237);t.generateSalt=()=>{const e=Math.floor(1e6*Math.random()),t=n.ethers.AbiCoder.defaultAbiCoder().encode(["uint256","uint256"],[e,(new Date).getMilliseconds()]);return n.ethers.keccak256(t)}},6522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHttpErrorMessage=void 0;const n=r(8159);t.getHttpErrorMessage=e=>{var t,r,s,i;return null!==(i=null!==(s=null===(r=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===r?void 0:r.message)&&void 0!==s?s:e.message)&&void 0!==i?i:n.DEFAULT_INTERNAL_ERROR_MESSAGE}},2417:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getProviderChainId=void 0;const s=r(3339);t.getProviderChainId=e=>n(void 0,void 0,void 0,(function*(){let t;if((0,s.isSigner)(e)){if(!e.provider)throw new Error("Missing provider");t=e.provider}else t=e;const{chainId:r}=yield t.getNetwork();return r}))},6812:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getUserNonce=void 0;const s=r(9237),i=r(8159),o=r(1561),a=r(2417);t.getUserNonce=(e,t)=>n(void 0,void 0,void 0,(function*(){const{account:r,type:n,signerOrProvider:c}=e;if(!c.provider)throw new Error("Missing provider");const u=yield(0,a.getProviderChainId)(c),l=new s.ethers.Contract((0,o.getGelatoRelayERC2771Address)({chainId:u,type:n},t),i.USER_NONCE_ABI,c);return yield l.userNonce(r)}))},2756:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=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}),s(r(9655),t),s(r(7839),t),s(r(6812),t),s(r(1309),t),s(r(6522),t),s(r(2797),t),s(r(6071),t),s(r(3339),t),s(r(1561),t),s(r(4156),t),s(r(2417),t),s(r(8791),t),s(r(1173),t),s(r(6426),t),s(r(5124),t),s(r(4125),t),s(r(3013),t)},6426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isConcurrentRequest=void 0,t.isConcurrentRequest=e=>!!e.isConcurrent},1173:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isConcurrentStruct=void 0,t.isConcurrentStruct=e=>!!e.userSalt},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFinalTaskState=void 0;const n=r(8530);t.isFinalTaskState=e=>{switch(e){case n.TaskState.ExecSuccess:case n.TaskState.ExecReverted:case n.TaskState.Cancelled:return!0;default:return!1}}},3339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSigner=void 0,t.isSigner=e=>"signTransaction"in e},4156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isZkSync=void 0,t.isZkSync=e=>e===BigInt(324)||e===BigInt(280)},2797:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.populateOptionalUserParameters=void 0;const s=r(8159),i=r(7839),o=r(6812),a=r(6426),c=r(5124),u=r(2417);t.populateOptionalUserParameters=function(e,t){return n(this,void 0,void 0,(function*(){if((0,a.isConcurrentRequest)(e.request)){const{request:t}=e,r={};return t.userDeadline||(r.userDeadline=(0,i.calculateDeadline)(s.DEFAULT_DEADLINE_GAP)),t.userSalt||(r.userSalt=(0,c.generateSalt)()),r}{const{type:r,signerOrProvider:n,request:a}=e,c={};if(a.userDeadline||(c.userDeadline=(0,i.calculateDeadline)(s.DEFAULT_DEADLINE_GAP)),void 0===a.userNonce){if(!n||!n.provider)throw new Error("Missing provider.");const e=yield(0,u.getProviderChainId)(n);if(a.chainId!==e)throw new Error(`Request and provider chain id mismatch. Request: [${a.chainId.toString()}], provider: [${e.toString()}]`);c.userNonce=yield(0,o.getUserNonce)({account:a.user,type:r,signerOrProvider:n},t)}return c}}))}},6071:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.post=void 0;const s=r(8320),i=r(8791),o=r(6522);t.post=(e,t)=>n(void 0,void 0,void 0,(function*(){try{const{relayCall:r,request:n}=e;let o;switch(r){case s.RelayCall.CallWithSyncFee:o=`${t.url}/relays/v2/call-with-sync-fee`;break;case s.RelayCall.CallWithSyncFeeERC2771:o=`${t.url}/relays/v2/call-with-sync-fee-erc2771`;break;case s.RelayCall.SponsoredCall:o=`${t.url}/relays/v2/sponsored-call`;break;case s.RelayCall.SponsoredCallERC2771:o=`${t.url}/relays/v2/sponsored-call-erc2771`;break;default:return r}return(yield i.axiosInstance.post(o,n)).data}catch(e){throw new Error((0,o.getHttpErrorMessage)(e))}}))},1561:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGelatoRelayERC2771Address=void 0;const n=r(9237),s=r(2219),i=r(4156);t.getGelatoRelayERC2771Address=(e,t)=>{const{chainId:r,type:o}=e;switch(o){case s.ERC2771Type.CallWithSyncFee:return(0,i.isZkSync)(r)?(0,n.getAddress)(t.contract.relayERC2771zkSync):(0,n.getAddress)(t.contract.relayERC2771);case s.ERC2771Type.SponsoredCall:return(0,i.isZkSync)(r)?(0,n.getAddress)(t.contract.relay1BalanceERC2771zkSync):(0,n.getAddress)(t.contract.relay1BalanceERC2771);case s.ERC2771Type.ConcurrentCallWithSyncFee:return(0,i.isZkSync)(r)?(0,n.getAddress)(t.contract.relayConcurrentERC2771zkSync):(0,n.getAddress)(t.contract.relayConcurrentERC2771);case s.ERC2771Type.ConcurrentSponsoredCall:return(0,i.isZkSync)(r)?(0,n.getAddress)(t.contract.relay1BalanceConcurrentERC2771zkSync):(0,n.getAddress)(t.contract.relay1BalanceConcurrentERC2771);default:return o}}},9655:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedDataV4=void 0;const s=r(8159),i=r(3339);t.signTypedDataV4=(e,t,r)=>n(void 0,void 0,void 0,(function*(){return(0,i.isSigner)(e)?yield e.signTypedData(r.domain,r.types,r.message):e.provider.isMagic?yield e.send(s.SIGN_TYPED_DATA_V4,[t,r]):(yield e.send(s.SIGN_TYPED_DATA_V4,[t,JSON.stringify(r)])).replace(/00$/,"1b").replace(/01$/,"1c")}))},3013:function(e,t,r){"use strict";var n,s,i,o,a,c,u,l=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))},d=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},h=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketHandler=void 0;const p=f(r(6792)),g=r(4125),y=r(5344);t.WebsocketHandler=class{constructor(e){n.set(this,void 0),s.set(this,new Set),i.set(this,[]),o.set(this,[]),a.set(this,void 0),c.set(this,1e3),u.set(this,1e4),d(this,n,`${e}/tasks/ws/status`,"f")}onUpdate(e){if(!e)throw new Error("Callback handler is not provided");h(this,i,"f").push(e),this._connect()}offUpdate(e){if(!e)throw new Error("Callback handler is not provided");d(this,i,h(this,i,"f").filter((t=>t!==e)),"f"),this._disconnectIfUnused()}onError(e){if(!e)throw new Error("Callback handler is not provided");h(this,o,"f").push(e),this._connect()}offError(e){if(!e)throw new Error("Callback handler is not provided");d(this,o,h(this,o,"f").filter((t=>t!==e)),"f"),this._disconnectIfUnused()}subscribe(e){return l(this,void 0,void 0,(function*(){h(this,s,"f").has(e)||(h(this,s,"f").add(e),yield this._sendWebsocketMessage({action:"subscribe",taskId:e}))}))}unsubscribe(e){return l(this,void 0,void 0,(function*(){h(this,s,"f").has(e)&&(h(this,s,"f").delete(e),yield this._sendWebsocketMessage({action:"unsubscribe",taskId:e}))}))}hasHandlers(){return h(this,i,"f").length>0||h(this,o,"f").length>0}_connect(){h(this,a,"f")||(d(this,a,new p.default(h(this,n,"f")),"f"),h(this,a,"f").onopen=()=>l(this,void 0,void 0,(function*(){h(this,s,"f").forEach((e=>{this._sendWebsocketMessage({action:"subscribe",taskId:e})}))})),h(this,a,"f").onclose=()=>{setTimeout((()=>{this._reconnect()}),h(this,c,"f"))},h(this,a,"f").onerror=e=>{this._handleError(e)},h(this,a,"f").onmessage=e=>l(this,void 0,void 0,(function*(){const t=JSON.parse(e.data.toString());switch(t.event){case y.WebsocketEvent.ERROR:{const e=t.payload;this._handleError(e);break}case y.WebsocketEvent.UPDATE:{const e=t.payload;h(this,i,"f").forEach((t=>{t(e)})),(0,g.isFinalTaskState)(e.taskState)&&(yield this.unsubscribe(e.taskId));break}}})))}_sendWebsocketMessage(e){return l(this,void 0,void 0,(function*(){(yield this._ensureIsConnected())&&h(this,a,"f").send(JSON.stringify(e))}))}_disconnectIfUnused(){0===h(this,i,"f").length&&0===h(this,o,"f").length&&h(this,a,"f")&&this._disconnect()}_disconnect(){h(this,a,"f")&&(h(this,a,"f").close(),d(this,a,void 0,"f"))}_reconnect(){this._disconnect(),this._connect()}_ensureIsConnected(){return l(this,void 0,void 0,(function*(){return h(this,a,"f")?h(this,a,"f").readyState!==p.default.CONNECTING&&h(this,a,"f").readyState!==p.default.OPEN&&this._reconnect():this._connect(),yield this._awaitConnection()}))}_awaitConnection(){return l(this,void 0,void 0,(function*(){const e=Date.now();for(;!h(this,a,"f")||h(this,a,"f").readyState!==p.default.OPEN;){const t=Date.now()-e;if(t>h(this,u,"f"))return this._handleError(new Error(`Timeout connecting to ${h(this,n,"f")} after ${t}ms`)),!1;yield new Promise((e=>setTimeout(e,10)))}return!0}))}_handleError(e){h(this,o,"f").forEach((t=>{t(e)}))}},n=new WeakMap,s=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap},5344:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketEvent=void 0,(r=t.WebsocketEvent||(t.WebsocketEvent={})).ERROR="error",r.UPDATE="update"},1497:(e,t,r)=>{e.exports=r(2573)},5944:(e,t,r)=>{"use strict";var n=r(7702),s=r(6090),i=r(1412),o=r(5783),a=r(5166),c=r(115),u=r(8393),l=r(2914),d=r(9778),h=r(4577),f=r(7526);e.exports=function(e){return new Promise((function(t,r){var p,g=e.data,y=e.headers,m=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}n.isFormData(g)&&n.isStandardBrowserEnv()&&delete y["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(w+":"+A)}var P=a(e.baseURL,e.url);function E(){if(v){var n="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,i={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:e,request:v};s((function(e){t(e),b()}),(function(e){r(e),b()}),i),v=null}}if(v.open(e.method.toUpperCase(),o(P,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=E:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(E)},v.onabort=function(){v&&(r(new d("Request aborted",d.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,v,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,v)),v=null},n.isStandardBrowserEnv()){var C=(e.withCredentials||u(P))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;C&&(y[e.xsrfHeaderName]=C)}"setRequestHeader"in v&&n.forEach(y,(function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete y[t]:v.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),m&&"json"!==m&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){v&&(r(!e||e&&e.type?new h:e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),g||(g=null);var S=f(P);S&&-1===["http","https","file"].indexOf(S)?r(new d("Unsupported protocol "+S+":",d.ERR_BAD_REQUEST,e)):v.send(g)}))}},2573:(e,t,r)=>{"use strict";var n=r(7702),s=r(3889),i=r(2322),o=r(8697),a=function e(t){var r=new i(t),a=s(i.prototype.request,r);return n.extend(a,i.prototype,r),n.extend(a,r),a.create=function(r){return e(o(t,r))},a}(r(9814));a.Axios=i,a.CanceledError=r(4577),a.CancelToken=r(4667),a.isCancel=r(4901),a.VERSION=r(4007).version,a.toFormData=r(4548),a.AxiosError=r(9778),a.Cancel=a.CanceledError,a.all=function(e){return Promise.all(e)},a.spread=r(5578),a.isAxiosError=r(7993),e.exports=a,e.exports.default=a},4667:(e,t,r)=>{"use strict";var n=r(4577);function s(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t