PageSourceSearch

https://www.moondao.com/_next/static/chunks/9612-c0e566e6db867463.js

js moondao.com collected 2026-10-02 14:50:42 UTC 595,616 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9612],{45853:function(f,r,s){"use strict";f.exports=s(49478)},49478:function(f,r,s){"use strict";function t(f){return f&&"object"==typeof f&&"default"in f?f.default:f}Object.defineProperty(r,"__esModule",{value:!0});var l,m=s(26005),h=t(s(28518)),E=s(22002),I=t(s(31621)),w=t(s(35841)),B=s(11938),D=t(s(49264)),M=t(s(22110)),L=t(s(13079)),W=s(22630),V=s(91440),G=s(43898),Z="0x0000000000000000000000000000000000000000",X="0x0000000000000000000000000000000000000001",K="0x0000000000000000000000000000000000000002",$=h.BigInt(0),ee=h.BigInt(1),et=new m.Percent($),ef=new m.Percent(100,100);function x(f){return Object.keys(f).some(function(f){return"recipient"===f})}(l=r.ApprovalTypes||(r.ApprovalTypes={}))[l.NOT_REQUIRED=0]="NOT_REQUIRED",l[l.MAX=1]="MAX",l[l.MAX_MINUS_ONE=2]="MAX_MINUS_ONE",l[l.ZERO_THEN_MAX=3]="ZERO_THEN_MAX",l[l.ZERO_THEN_MAX_MINUS_ONE=4]="ZERO_THEN_MAX_MINUS_ONE";var en=function(){function t(){}return t.encodeApproveMax=function(f){return t.INTERFACE.encodeFunctionData("approveMax",[f.address])},t.encodeApproveMaxMinusOne=function(f){return t.INTERFACE.encodeFunctionData("approveMaxMinusOne",[f.address])},t.encodeApproveZeroThenMax=function(f){return t.INTERFACE.encodeFunctionData("approveZeroThenMax",[f.address])},t.encodeApproveZeroThenMaxMinusOne=function(f){return t.INTERFACE.encodeFunctionData("approveZeroThenMaxMinusOne",[f.address])},t.encodeCallPositionManager=function(f){if(f.length>0||I(!1),1===f.length)return t.INTERFACE.encodeFunctionData("callPositionManager",f);var r=B.NonfungiblePositionManager.INTERFACE.encodeFunctionData("multicall",[f]);return t.INTERFACE.encodeFunctionData("callPositionManager",[r])},t.encodeAddLiquidity=function(f,r,s,l){var m=f.mintAmountsWithSlippage(l),E=m.amount0,I=m.amount1;return h.lessThan(r.amount0.quotient,E)&&(E=r.amount0.quotient),h.lessThan(r.amount1.quotient,I)&&(I=r.amount1.quotient),x(s)?t.INTERFACE.encodeFunctionData("mint",[{token0:f.pool.token0.address,token1:f.pool.token1.address,fee:f.pool.fee,tickLower:f.tickLower,tickUpper:f.tickUpper,amount0Min:B.toHex(E),amount1Min:B.toHex(I),recipient:s.recipient}]):t.INTERFACE.encodeFunctionData("increaseLiquidity",[{token0:f.pool.token0.address,token1:f.pool.token1.address,amount0Min:B.toHex(E),amount1Min:B.toHex(I),tokenId:B.toHex(s.tokenId)}])},t.encodeApprove=function(f,s){switch(s){case r.ApprovalTypes.MAX:return t.encodeApproveMax(f.wrapped);case r.ApprovalTypes.MAX_MINUS_ONE:return t.encodeApproveMaxMinusOne(f.wrapped);case r.ApprovalTypes.ZERO_THEN_MAX:return t.encodeApproveZeroThenMax(f.wrapped);case r.ApprovalTypes.ZERO_THEN_MAX_MINUS_ONE:return t.encodeApproveZeroThenMaxMinusOne(f.wrapped);default:throw Error("Error: invalid ApprovalType")}},t}();en.INTERFACE=new E.Interface(w.abi);var er=function(){function t(){}return t.encodeMulticall=function(f,r){if(void 0===r)return B.Multicall.encodeMulticall(f);if(Array.isArray(f)||(f=[f]),"string"==typeof r&&r.startsWith("0x")){var s=function(f){if(!f.match(/^0x[0-9a-fA-F]{64}$/))throw Error(f+" is not valid bytes32.");return f.toLowerCase()}(r);return t.INTERFACE.encodeFunctionData("multicall(bytes32,bytes[])",[s,f])}var l=B.toHex(r);return t.INTERFACE.encodeFunctionData("multicall(uint256,bytes[])",[l,f])},t}();function g(f){return B.toHex(f.multiply(1e4).quotient)}er.INTERFACE=new E.Interface(D.abi);var ea=function(){function t(){}return t.encodeUnwrapWETH9=function(f,r,s){if("string"==typeof r)return B.Payments.encodeUnwrapWETH9(f,r,s);if(s){var l=g(s.fee),h=m.validateAndParseAddress(s.recipient);return t.INTERFACE.encodeFunctionData("unwrapWETH9WithFee(uint256,uint256,address)",[B.toHex(f),l,h])}return t.INTERFACE.encodeFunctionData("unwrapWETH9(uint256)",[B.toHex(f)])},t.encodeSweepToken=function(f,r,s,l){if("string"==typeof s)return B.Payments.encodeSweepToken(f,r,s,l);if(l){var h=g(l.fee),E=m.validateAndParseAddress(l.recipient);return t.INTERFACE.encodeFunctionData("sweepTokenWithFee(address,uint256,uint256,address)",[f.address,B.toHex(r),h,E])}return t.INTERFACE.encodeFunctionData("sweepToken(address,uint256)",[f.address,B.toHex(r)])},t.encodePull=function(f,r){return t.INTERFACE.encodeFunctionData("pull",[f.address,B.toHex(r)])},t.encodeWrapETH=function(f){return t.INTERFACE.encodeFunctionData("wrapETH",[B.toHex(f)])},t}();function P(f,r){(null==r||r>f.length)&&(r=f.length);for(var s=0,l=Array(r);s<r;s++)l[s]=f[s];return l}function R(f,r,s,l,m,h,E){try{var I=f[h](E),w=I.value}catch(f){return void s(f)}I.done?r(w):Promise.resolve(w).then(l,m)}function b(f){return function(){var r=this,s=arguments;return new Promise(function(l,m){var h=f.apply(r,s);function i(f){R(h,l,m,i,a,"next",f)}function a(f){R(h,l,m,i,a,"throw",f)}i(void 0)})}}function _(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,"string");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(f);return"symbol"==typeof r?r:r+""}(l.key),l)}}function O(f,r,s){return r&&_(f.prototype,r),s&&_(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function N(f,r){var s="undefined"!=typeof Symbol&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=function(f,r){if(f){if("string"==typeof f)return P(f,r);var s=({}).toString.call(f).slice(8,-1);return"Object"===s&&f.constructor&&(s=f.constructor.name),"Map"===s||"Set"===s?Array.from(f):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?P(f,r):void 0}}(f))||r&&f&&"number"==typeof f.length){s&&(f=s);var l=0;return function(){return l>=f.length?{done:!0}:{done:!1,value:f[l++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function q(){return(q=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function F(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}function C(){C=function(){return r};var f,r={},s=Object.prototype,l=s.hasOwnProperty,m=Object.defineProperty||function(f,r,s){f[r]=s.value},h="function"==typeof Symbol?Symbol:{},E=h.iterator||"@@iterator",I=h.asyncIterator||"@@asyncIterator",w=h.toStringTag||"@@toStringTag";function p(f,r,s){return Object.defineProperty(f,r,{value:s,enumerable:!0,configurable:!0,writable:!0}),f[r]}try{p({},"")}catch(f){p=function(f,r,s){return f[r]=s}}function c(r,s,l,h){var E,I,w=Object.create((s&&s.prototype instanceof v?s:v).prototype);return m(w,"_invoke",{value:(E=new _(h||[]),I=B,function(s,m){if(I===D)throw Error("Generator is already running");if(I===M){if("throw"===s)throw m;return{value:f,done:!0}}for(E.method=s,E.arg=m;;){var h=E.delegate;if(h){var w=function P(r,s){var l=s.method,m=r.iterator[l];if(m===f)return s.delegate=null,"throw"===l&&r.iterator.return&&
vendor: 4,172 bytes, line 1
1(s.method="return",s.arg=f,P(r,s),"throw"===s.method)||"return"!==l&&(s.method="throw",s.arg=TypeError("The iterator does not provide a '"+l+"' method")),L;var h=d(m,r.iterator,s.arg);if("throw"===h.type)return s.method="throw",s.arg=h.arg,s.delegate=null,L;var E=h.arg;return E?E.done?(s[r.resultName]=E.value,s.next=r.nextLoc,"return"!==s.method&&(s.method="next",s.arg=f),s.delegate=null,L):E:(s.method="throw",s.arg=TypeError("iterator result is not an object"),s.delegate=null,L)}(h,E);if(w){if(w===L)continue;return w}}if("next"===E.method)E.sent=E._sent=E.arg;else if("throw"===E.method){if(I===B)throw I=M,E.arg;E.dispatchException(E.arg)}else"return"===E.method&&E.abrupt("return",E.arg);I=D;var W=d(r,l,E);if("normal"===W.type){if(I=E.done?M:"suspendedYield",W.arg===L)continue;return{value:W.arg,done:E.done}}"throw"===W.type&&(I=M,E.method="throw",E.arg=W.arg)}})}),w}function d(f,r,s){try{return{type:"normal",arg:f.call(r,s)}}catch(f){return{type:"throw",arg:f}}}r.wrap=c;var B="suspendedStart",D="executing",M="completed",L={};function v(){}function A(){}function y(){}var W={};p(W,E,function(){return this});var V=Object.getPrototypeOf,G=V&&V(V(O([])));G&&G!==s&&l.call(G,E)&&(W=G);var Z=y.prototype=v.prototype=Object.create(W);function k(f){["next","throw","return"].forEach(function(r){p(f,r,function(f){return this._invoke(r,f)})})}function g(f,r){var s;m(this,"_invoke",{value:function(m,h){function o(){return new r(function(s,E){!function n(s,m,h,E){var I=d(f[s],f,m);if("throw"!==I.type){var w=I.arg,B=w.value;return B&&"object"==typeof B&&l.call(B,"__await")?r.resolve(B.__await).then(function(f){n("next",f,h,E)},function(f){n("throw",f,h,E)}):r.resolve(B).then(function(f){w.value=f,h(w)},function(f){return n("throw",f,h,E)})}E(I.arg)}(m,h,s,E)})}return s=s?s.then(o,o):o()}})}function R(f){var r={tryLoc:f[0]};1 in f&&(r.catchLoc=f[1]),2 in f&&(r.finallyLoc=f[2],r.afterLoc=f[3]),this.tryEntries.push(r)}function b(f){var r=f.completion||{};r.type="normal",delete r.arg,f.completion=r}function _(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(R,this),this.reset(!0)}function O(r){if(r||""===r){var s=r[E];if(s)return s.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var m=-1,u=function n(){for(;++m<r.length;)if(l.call(r,m))return n.value=r[m],n.done=!1,n;return n.value=f,n.done=!0,n};return u.next=u}}throw TypeError(typeof r+" is not iterable")}return A.prototype=y,m(Z,"constructor",{value:y,configurable:!0}),m(y,"constructor",{value:A,configurable:!0}),A.displayName=p(y,w,"GeneratorFunction"),r.isGeneratorFunction=function(f){var r="function"==typeof f&&f.constructor;return!!r&&(r===A||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,y):(f.__proto__=y,p(f,w,"GeneratorFunction")),f.prototype=Object.create(Z),f},r.awrap=function(f){return{__await:f}},k(g.prototype),p(g.prototype,I,function(){return this}),r.AsyncIterator=g,r.async=function(f,s,l,m,h){void 0===h&&(h=Promise);var E=new g(c(f,s,l,m),h);return r.isGeneratorFunction(s)?E:E.next().then(function(f){return f.done?f.value:E.next()})},k(Z),p(Z,w,"Generator"),p(Z,E,function(){return this}),p(Z,"toString",function(){return"[object Generator]"}),r.keys=function(f){var r=Object(f),s=[];for(var l in r)s.push(l);return s.reverse(),function t(){for(;s.length;){var f=s.pop();if(f in r)return t.value=f,t.done=!1,t}return t.done=!0,t}},r.values=O,_.prototype={constructor:_,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(b),!r)for(var s in this)"t"===s.charAt(0)&&l.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=f)},stop:function(){this.done=!0;var f=this.tryEntries[0].completion;if("throw"===f.type)throw f.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var s=this;function o(l,m){return E.type="throw",E.arg=r,s.next=l,m&&(s.method="next",s.arg=f),!!m}for(var m=this.tryEntries.length-1;m>=0;--m){var h=this.tryEntries[m],E=h.completion;if("root"===h.tryLoc)return o("end");if(h.tryLoc<=this.prev){var I=l.call(h,"catchLoc"),w=l.call(h,"finallyLoc");
1if(I&&w){if(this.prev<h.catchLoc)return o(h.catchLoc,!0);if(this.prev<h.finallyLoc)return o(h.finallyLoc)}else if(I){if(this.prev<h.catchLoc)return o(h.catchLoc,!0)}else{if(!w)throw Error("try statement without catch or finally");if(this.prev<h.finallyLoc)return o(h.finallyLoc)}}}},abrupt:function(f,r){for(var s=this.tryEntries.length-1;s>=0;--s){var m=this.tryEntries[s];if(m.tryLoc<=this.prev&&l.call(m,"finallyLoc")&&this.prev<m.finallyLoc){var h=m;break}}h&&("break"===f||"continue"===f)&&h.tryLoc<=r&&r<=h.finallyLoc&&(h=null);var E=h?h.completion:{};return E.type=f,E.arg=r,h?(this.method="next",this.next=h.finallyLoc,L):this.complete(E)},complete:function(f,r){if("throw"===f.type)throw f.arg;return"break"===f.type||"continue"===f.type?this.next=f.arg:"return"===f.type?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):"normal"===f.type&&r&&(this.next=r),L},finish:function(f){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.finallyLoc===f)return this.complete(s.completion,s.afterLoc),b(s),L}},catch:function(f){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc===f){var l=s.completion;if("throw"===l.type){var m=l.arg;b(s)}return m}}throw Error("illegal catch attempt")},delegateYield:function(r,s,l){return this.delegate={iterator:O(r),resultName:s,nextLoc:l},"next"===this.method&&(this.arg=f),L}},r}function S(f,r){return m.CurrencyAmount.fromFractionalAmount(H(f.currency,r),f.numerator,f.denominator)}function H(f,r){if(r.involvesToken(f))return f;if(r.involvesToken(f.wrapped))return f.wrapped;if(!(r instanceof V.Pool))throw Error("Expected currency "+f.symbol+" to be either "+r.token0.symbol+" or "+r.token1.symbol);return r.token0.wrapped.equals(f)?r.token0:r.token1.wrapped.equals(f)?r.token1:f}ea.INTERFACE=new E.Interface(M.abi);var ei=O(function(f,r,s,l){void 0===l&&(l=!1),this._midPrice=null,(f=l?f:f.filter(function(f){return!(f instanceof V.Pool&&0===f.tickSpacing)})).length>0||I(!1);var m=f[0].chainId;f.every(function(f){return f.chainId===m})||I(!1),this.pathInput=H(r,f[0]),this.pathOutput=H(s,f[f.length-1]),f[0]instanceof V.Pool?f[0].v4InvolvesToken(this.pathInput)||I(!1):f[0].involvesToken(this.pathInput)||I(!1);var h=f[f.length-1];h instanceof V.Pool?h.v4InvolvesToken(s)||h.v4InvolvesToken(s.wrapped)||I(!1):h.involvesToken(s.wrapped)||I(!1);var E=[this.pathInput];f[0].token0.equals(this.pathInput)?E.push(f[0].token1):E.push(f[0].token0);for(var w=1;w<f.length;w++){var B=f[w],D=E[w],M=void 0;if(B instanceof V.Pool&&!B.involvesToken(D)||!(B instanceof V.Pool)&&D.isNative){if(D.equals(B.token0.wrapped))M=B.token1;else{if(!D.wrapped.equals(B.token0)&&!D.wrapped.equals(B.token1))throw Error("POOL_MISMATCH pool: "+JSON.stringify(B)+" inputToken: "+JSON.stringify(D));M=D.wrapped.equals(B.token0)?B.token1:B.token0}}else D.equals(B.token0)||D.equals(B.token1)||I(!1),M=D.equals(B.token0)?B.token1:B.token0;E.push(M)}this.pools=f,this.path=E,this.input=r,this.output=null!=s?s:E[E.length-1]},[{key:"chainId",get:function(){return this.pools[0].chainId}},{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;var f=this.pools.slice(1).reduce(function(f,r){var s=f.price;return f.nextInput.equals(r.token0)?{nextInput:r.token1,price:s.multiply(r.token0Price.asFraction)}:{nextInput:r.token0,price:s.multiply(r.token1Price.asFraction)}},this.pools[0].token0.equals(this.pathInput)?{nextInput:this.pools[0].token1,price:this.pools[0].token0Price.asFraction}:{nextInput:this.pools[0].token0,price:this.pools[0].token1Price.asFraction}).price;return this._midPrice=new m.Price(this.input,this.output,f.denominator,f.numerator)}}]);function U(f,r){return f.inputAmount.currency.equals(r.inputAmount.currency)||I(!1),f.outputAmount.currency.equals(r.outputAmount.currency)||I(!1),f.outputAmount.equalTo(r.outputAmount)?f.inputAmount.equalTo(r.inputAmount)?f.swaps.reduce(function(f,r){return f+r.route.path.length},0)-r.swaps.reduce(function(f,r){return f+r.route.path.length},0):f.inputAmount.lessThan(r.inputAmount)?-1:1:f.outputAmount.lessThan(r.outputAmount)?1:-1}var eo,es=function(){function t(f){var r=f.routes,s=f.tradeType,l=r[0].inputAmount.currency,h=r[0].outputAmount.currency;r.every(function(f){return l.wrapped.equals(f.route.input.wrapped)})||I(!1),r.every(function(f){return h.wrapped.equals(f.route.output.wrapped)})||I(!1);for(var E,w=r.map(function(f){return f.route.pools.length}).reduce(function(f,r){return f+r},0),D=new Set,M=N(r);!(E=M()).done;)for(var L,G=N(E.value.route.pools);!(L=G()).done;){var Z=L.value;if(Z instanceof V.Pool)D.add(Z.poolId);else if(Z instanceof B.Pool)D.add(B.Pool.getAddress(Z.token0,Z.token1,Z.fee));else{if(!(Z instanceof W.Pair))throw Error("Unexpected pool type in route when constructing trade object");D.add(W.Pair.getAddress(Z.token0,Z.token1))}}w!==D.size&&I(!1),s!==m.TradeType.EXACT_INPUT&&I(!1),this.swaps=r,this.tradeType=s}t.fromRoute=(f=b(C().mark(function e(f,r,s){var l,h,E,w,B;return C().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:l=Array(f.path.length),s!==m.TradeType.EXACT_INPUT&&I(!1),r.currency.equals(f.input)||I(!1),l[0]=S(r,f.pools[0]),w=0;case 5:if(!(w<f.path.length-1)){D.next=15;break}return B=f.pools[w],D.next=9,B.getOutputAmount(S(l[w],B));case 9:l[w+1]=D.sent[0];case 12:w++,D.next=5;break;case 15:return h=m.CurrencyAmount.fromFractionalAmount(f.input,r.numerator,r.denominator),E=m.CurrencyAmount.fromFractionalAmount(f.output,l[l.length-1].numerator,l[l.length-1].denominator),D.abrupt("return",new t({routes:[{inputAmount:h,outputAmount:E,route:f}],tradeType:s}));case 18:case"end":return D.stop()}},e)})),function(r,s,l){return f.apply(this,arguments)}),t.fromRoutes=(r=b(C().mark(function e(f,r){var s,l,h,E,w,B,D,M,L,W,V;return C().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:s=[],r!==m.TradeType.EXACT_INPUT&&I(!1),l=N(f);case 3:if((h=l()).done){G.next=26;break}w=(E=h.value).route,B=E.amount,D=Array(w.path.length),M=void 0,L=void 0,B.currency.equals(w.input)||I(!1),M=m.CurrencyAmount.fromFractionalAmount(w.input,B.numerator,B.denominator),D[0]=m.CurrencyAmount.fromFractionalAmount(w.pathInput,B.numerator,B.denominator),W=0;case 12:if(!(W<w.path.length-1)){G.next=22;break}return V=w.pools[W],G.next=16,V.getOutputAmount(S(D[W],V));case 16:D[W+1]=G.sent[0];case 19:W++,G.next=12;break;case 22:L=m.CurrencyAmount.fromFractionalAmount(w.output,D[D.length-1].numerator,D[D.length-1].denominator),s.push({route:w,inputAmount:M,outputAmount:L});case 24:G.next=3;break;case 26:return G.abrupt("return",new t({routes:s,tradeType:r}));case 27:case"end":return G.stop()}},e)})),function(f,s){return r.apply(this,arguments)}),t.createUncheckedTrade=function(f){return new t(q({},f,{routes:[{inputAmount:f.inputAmount,outputAmount:f.outputAmount,route:f.route}]}))},t.createUncheckedTradeWithMultipleRoutes=function(f){return new t(f)};var f,r,s,l=t.prototype;return l.minimumAmountOut=function(f,r){void 0===r&&(r=this.outputAmount),f.lessThan($)&&I(!1);var s=new m.Fraction(ee).add(f).invert().multiply(r.quotient).quotient;return m.CurrencyAmount.fromRawAmount(r.currency,s)},l.maximumAmountIn=function(f,r){return void 0===r&&(r=this.inputAmount),f.lessThan($)&&I(!1),r},l.worstExecutionPrice=function(f){return new m.Price(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(f).quotient,this.minimumAmountOut(f).quotient)},t.bestTradeExactIn=(s=b(C().mark(function e(f,r,s,l,h,E,w){var B,D,M,L,G,Z,X,K,ee,et,ef;return C().wrap(function(en){for(;;)switch(en.prev=en.next){case 0:M=void 0===(D=(B=void 0===l?{}:l).maxNumResults)?3:D,G=void 0===(L=B.maxHops)?3:L,void 0===h&&(h=[]),void 0===E&&(E=r),void 0===w&&(w=[]),f.length>0||I(!1),G>0||I(!1),r===E||h.length>0||I(!1),Z=E,X=0;case 9:if(!(X<f.length)){en.next=56;break}if((K=f[X]).token0.equals((ee=K instanceof V.Pool?Z:Z.wrapped).currency)||K.token1.equals(ee.currency)){en.next=14;break}return en.abrupt("continue",53);case 14:if(!(K instanceof W.Pair)||!K.reserve0.equalTo($)&&!K.reserve1.equalTo($)){en.next=17;break}return en.abrupt("continue",53);case 17:if(et=void 0,en.prev=18,!(K instanceof V.Pool)){en.next=26;break}return en.next=23,K.getOutputAmount(ee);case 23:en.t0=en.sent,en.next=29;break;case 26:return en.next=28,K.getOutputAmount(ee.wrapped);case 28:en.t0=en.sent;case 29:et=en.t0[0],en.next=38;break;case 33:if(en.prev=33,en.t1=en.catch(18),!en.t1.isInsufficientInputAmountError){en.next=37;break}return en.abrupt("continue",53);case 37:throw en.t1;case 38:if(!et.currency.wrapped.equals(s.wrapped)){en.next=49;break}return en.t2=m.sortedInsert,en.t3=w,en.next=43,t.fromRoute(new ei([].concat(h,[K]),r.currency,s),r,m.TradeType.EXACT_INPUT);case 43:en.t4=en.sent,en.t5=M,en.t6=U,(0,en.t2)(en.t3,en.t4,en.t5,en.t6),en.next=53;break;case 49:if(!(G>1&&f.length>1)){en.next=53;break}
1return ef=f.slice(0,X).concat(f.slice(X+1,f.length)),en.next=53,t.bestTradeExactIn(ef,r,s,{maxNumResults:M,maxHops:G-1},[].concat(h,[K]),et,w);case 53:X++,en.next=9;break;case 56:return en.abrupt("return",w);case 57:case"end":return en.stop()}},e,null,[[18,33]])})),function(f,r,l,m,h,E,I){return s.apply(this,arguments)}),O(t,[{key:"route",get:function(){return 1!==this.swaps.length&&I(!1),this.swaps[0].route}},{key:"inputAmount",get:function(){if(this._inputAmount)return this._inputAmount;var f=this.swaps[0].inputAmount.currency,r=this.swaps.map(function(f){return f.inputAmount}).reduce(function(f,r){return f.add(r)},m.CurrencyAmount.fromRawAmount(f,0));return this._inputAmount=r,this._inputAmount}},{key:"outputAmount",get:function(){if(this._outputAmount)return this._outputAmount;var f=this.swaps[0].outputAmount.currency,r=this.swaps.map(function(f){return f.outputAmount}).reduce(function(f,r){return f.add(r)},m.CurrencyAmount.fromRawAmount(f,0));return this._outputAmount=r,this._outputAmount}},{key:"executionPrice",get:function(){var f;return null!=(f=this._executionPrice)?f:this._executionPrice=new m.Price(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient)}},{key:"priceImpact",get:function(){if(this._priceImpact)return this._priceImpact;for(var f,r=m.CurrencyAmount.fromRawAmount(this.outputAmount.currency,0),s=N(this.swaps);!(f=s()).done;){var l=f.value;r=r.add(l.route.midPrice.quote(l.inputAmount))}var h=r.subtract(this.outputAmount).divide(r);return this._priceImpact=new m.Percent(h.numerator,h.denominator),this._priceImpact}}])}();function j(f,r){if(r.token0.wrapped.equals(f.wrapped))return r.token0;if(r.token1.wrapped.equals(f.wrapped))return r.token1;throw Error("Expected token "+f.symbol+" to be either "+r.token0.symbol+" or "+r.token1.symbol)}(eo=r.Protocol||(r.Protocol={})).V2="V2",eo.V3="V3",eo.V4="V4",eo.MIXED="MIXED";var eu=function(f){function e(s){var l;return(l=f.call(this,s.pairs,s.input,s.output)||this).protocol=r.Protocol.V2,l.pools=l.pairs,l.pathInput=j(s.input,l.pairs[0]),l.pathOutput=j(s.output,l.pairs[l.pairs.length-1]),l}return F(e,f),e}(W.Route),ec=function(f){function e(s){var l;return(l=f.call(this,s.pools,s.input,s.output)||this).protocol=r.Protocol.V3,l.path=s.tokenPath,l.pathInput=j(s.input,l.pools[0]),l.pathOutput=j(s.output,l.pools[l.pools.length-1]),l}return F(e,f),e}(B.Route),ed=function(f){function e(s){var l;return(l=f.call(this,s.pools,s.input,s.output)||this).protocol=r.Protocol.V4,l.path=s.currencyPath,l}return F(e,f),e}(V.Route),ep=function(f){function e(s){var l;return(l=f.call(this,s.pools,s.input,s.output)||this).protocol=r.Protocol.MIXED,l}return F(e,f),e}(ei),el=function(){function t(f){var r=f.v2Routes,s=void 0===r?[]:r,l=f.v3Routes,m=void 0===l?[]:l,h=f.v4Routes,E=void 0===h?[]:h,w=f.mixedRoutes,D=void 0===w?[]:w,M=f.tradeType;this.swaps=[],this.routes=[];for(var L,G=N(s);!(L=G()).done;){var Z=L.value,X=Z.inputAmount,K=Z.outputAmount,$=new eu(Z.routev2);this.routes.push($),this.swaps.push({route:$,inputAmount:X,outputAmount:K})}for(var ee,et=N(m);!(ee=et()).done;){var ef=ee.value,en=ef.inputAmount,er=ef.outputAmount,ea=new ec(ef.routev3);this.routes.push(ea),this.swaps.push({route:ea,inputAmount:en,outputAmount:er})}for(var ei,eo=N(E);!(ei=eo()).done;){var es=ei.value,el=es.inputAmount,eb=es.outputAmount,em=new ed(es.routev4);this.routes.push(em),this.swaps.push({route:em,inputAmount:el,outputAmount:eb})}for(var ey,eA=N(D);!(ey=eA()).done;){var eh=ey.value,eE=eh.inputAmount,eg=eh.outputAmount,ev=new ep(eh.mixedRoute);this.routes.push(ev),this.swaps.push({route:ev,inputAmount:eE,outputAmount:eg})}if(0===this.swaps.length)throw Error("No routes provided when calling Trade constructor");this.tradeType=M;var eT=this.swaps[0].inputAmount.currency,e_=this.swaps[0].outputAmount.currency;this.swaps.every(function(f){return eT.wrapped.equals(f.route.input.wrapped)})||I(!1),this.swaps.every(function(f){return e_.wrapped.equals(f.route.output.wrapped)})||I(!1);for(var eC,ex=this.swaps.map(function(f){return f.route.pools.length}).reduce(function(f,r){return f+r},0),eI=new Set,ew=N(this.swaps);!(eC=ew()).done;)for(var eP,eB=N(eC.value.route.pools);!(eP=eB()).done;){var eF=eP.value;if(eF instanceof V.Pool)eI.add(eF.poolId);else if(eF instanceof B.Pool)eI.add(B.Pool.getAddress(eF.token0,eF.token1,eF.fee));else{if(!(eF instanceof W.Pair))throw Error("Unexpected pool type in route when constructing trade object");eI.add(W.Pair.getAddress(eF.token0,eF.token1))}}ex!==eI.size&&I(!1)}var f,r,s=t.prototype;return s.isWrappedNative=function(f){return f.equals(m.Ether.onChain(f.chainId).wrapped)},s.minimumAmountOut=function(f,r){if(void 0===r&&(r=this.outputAmount),f.lessThan($)&&I(!1),this.tradeType===m.TradeType.EXACT_OUTPUT)return r;var s=new m.Fraction(ee).add(f).invert().multiply(r.quotient).quotient;return m.CurrencyAmount.fromRawAmount(r.currency,s)},s.maximumAmountIn=function(f,r){if(void 0===r&&(r=this.inputAmount),f.lessThan($)&&I(!1),this.tradeType===m.TradeType.EXACT_INPUT)return r;var s=new m.Fraction(ee).add(f).multiply(r.quotient).quotient;return m.CurrencyAmount.fromRawAmount(r.currency,s)},s.worstExecutionPrice=function(f){return new m.Price(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(f).quotient,this.minimumAmountOut(f).quotient)},t.fromRoutes=(f=b(C().mark(function e(f,r,s,l,m){var h,E,I,w,D,M,L,G,Z,X,K,$,ee,et,ef,en,er,ea,ei,eo,eu,ec,ed,ep,el,eb,em;return C().wrap(function(ey){for(;;)switch(ey.prev=ey.next){case 0:for(h=[],E=[],I=[],w=[],D=N(f);!(M=D()).done;)Z=new W.Trade(G=(L=M.value).routev2,L.amount,s),h.push({routev2:G,inputAmount:Z.inputAmount,outputAmount:Z.outputAmount});X=N(r);case 6:if((K=X()).done){ey.next=15;break}return ee=($=K.value).routev3,et=$.amount,ey.next=10,B.Trade.fromRoute(ee,et,s);case 10:E.push({routev3:ee,inputAmount:(ef=ey.sent).inputAmount,outputAmount:ef.outputAmount});case 13:ey.next=6;break;case 15:if(!m){ey.next=26;break}en=N(m);case 17:if((er=en()).done){ey.next=26;break}return ei=(ea=er.value).routev4,eo=ea.amount,ey.next=21,V.Trade.fromRoute(ei,eo,s);case 21:I.push({routev4:ei,inputAmount:(eu=ey.sent).inputAmount,outputAmount:eu.outputAmount});case 24:ey.next=17;break;case 26:if(!l){ey.next=37;break}ec=N(l);case 28:if((ed=ec()).done){ey.next=37;break}return el=(ep=ed.value).mixedRoute,eb=ep.amount,ey.next=32,es.fromRoute(el,eb,s);case 32:w.push({mixedRoute:el,inputAmount:(em=ey.sent).inputAmount,outputAmount:em.outputAmount});case 35:ey.next=28;break;case 37:return ey.abrupt("return",new t({v2Routes:h,v3Routes:E,v4Routes:I,mixedRoutes:w,tradeType:s}));case 38:case"end":return ey.stop()}},e)})),function(r,s,l,m,h){return f.apply(this,arguments)}),t.fromRoute=(r=b(C().mark(function e(f,r,s){var l,m,h,E,I,w,D,M;return C().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(l=[],m=[],h=[],E=[],!(f instanceof W.Route)){L.next=10;break}I=new W.Trade(f,r,s),l=[{routev2:f,inputAmount:I.inputAmount,outputAmount:I.outputAmount}],L.next=35;break;case 10:if(!(f instanceof B.Route)){L.next=18;break}return L.next=13,B.Trade.fromRoute(f,r,s);case 13:m=[{routev3:f,inputAmount:(w=L.sent).inputAmount,outputAmount:w.outputAmount}],L.next=35;break;case 18:if(!(f instanceof V.Route)){L.next=26;break}return L.next=21,V.Trade.fromRoute(f,r,s);case 21:h=[{routev4:f,inputAmount:(D=L.sent).inputAmount,outputAmount:D.outputAmount}],L.next=35;break;case 26:if(!(f instanceof ei)){L.next=34;break}return L.next=29,es.fromRoute(f,r,s);case 29:E=[{mixedRoute:f,inputAmount:(M=L.sent).inputAmount,outputAmount:M.outputAmount}],L.next=35;break;case 34:throw Error("Invalid route type");case 35:return L.abrupt("return",new t({v2Routes:l,v3Routes:m,v4Routes:h,mixedRoutes:E,tradeType:s}));case 36:case"end":return L.stop()}},e)})),function(f,s,l){return r.apply(this,arguments)}),O(t,[{key:"inputAmount",get:function(){if(this._inputAmount)return this._inputAmount;var f=this.swaps[0].inputAmount.currency,r=this.swaps.map(function(f){return f.inputAmount}).reduce(function(f,r){return f.add(r)},m.CurrencyAmount.fromRawAmount(f,0));return this._inputAmount=r,this._inputAmount}},{key:"outputAmount",get:function(){if(this._outputAmount)return this._outputAmount;var f=this.swaps[0].outputAmount.currency,r=this.swaps.map(function(f){return f.outputAmount}).reduce(function(f,r){return f.add(r)},m.CurrencyAmount.fromRawAmount(f,0));return this._outputAmount=r,this._outputAmount}},{key:"amounts",get:function(){var f,r,s=null==(f=this.swaps.find(function(f){return f.inputAmount.currency.isNative}))?void 0:f.inputAmount.currency,l=null==(r=this.swaps.find(function(f){return f.outputAmount.currency.isNative}))?void 0:r.outputAmount.currency;return{inputAmount:this.inputAmount,inputAmountNative:s?this.swaps.reduce(function(f,r){return r.route.pathInput.isNative?f.add(r.inputAmount):f},m.CurrencyAmount.fromRawAmount(s,0)):void 0,outputAmount:this.outputAmount,outputAmountNative:l?this.swaps.reduce(function(f,r){return r.route.pathOutput.isNative?f.add(r.outputAmount):f},m.CurrencyAmount.fromRawAmount(l,0)):void 0}}},{key:"numberOfInputWraps",get:function(){return this.inputAmount.currency.isNative?this.wethInputRoutes.length:0}},{key:"numberOfInputUnwraps",get:function(){return this.isWrappedNative(this.inputAmount.currency)?this.nativeInputRoutes.length:0}},{key:"nativeInputRoutes",get:function(){return this._nativeInputRoutes||(this._nativeInputRoutes=this.routes.filter(function(f){return f.pathInput.isNative})),this._nativeInputRoutes}},{key:"wethInputRoutes",get:function(){var f=this;return this._wethInputRoutes||(this._wethInputRoutes=this.routes.filter(function(r){return f.isWrappedNative(r.pathInput)})),this._wethInputRoutes}},{key:"executionPrice",get:function(){var f;return null!=(f=this._executionPrice)?f:this._executionPrice=new m.Price(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient)}},{key:"inputTax",get:function(){var f=this.inputAmount.currency;return f.isNative||!f.wrapped.sellFeeBps?et:new m.Percent(f.wrapped.sellFeeBps.toNumber(),1e4)}},{key:"outputTax",get:function(){var f=this.outputAmount.currency;return f.isNative||!f.wrapped.buyFeeBps?et:new m.Percent(f.wrapped.buyFeeBps.toNumber(),1e4)}},{key:"priceImpact",get:function(){if(this._priceImpact)return this._priceImpact;if(this.outputTax.equalTo(ef))return et;for(var f,r=m.CurrencyAmount.fromRawAmount(this.outputAmount.currency,0),s=N(this.swaps);!(f=s()).done;){var l=f.value,h=l.route.midPrice,E=l.inputAmount.multiply(new m.Fraction(ee).subtract(this.inputTax));r=r.add(h.quote(E))}if(r.equalTo($))return et;var I=this.outputAmount.divide(new m.Fraction(ee).subtract(this.outputTax)),w=r.subtract(I).divide(r);return this._priceImpact=new m.Percent(w.numerator,w.denominator),this._priceImpact}}])}();function Q(f,r){var s,l;if(null!=r?r:f.pools.some(function(f){return f instanceof V.Pool})){s=[f.pathInput.isNative?Z:f.pathInput.address],l=["address"];for(var m,h=f.pathInput,E=N(f.pools);!(m=E()).done;){var I=m.value,w=h.equals(I.token0)?I.token1:I.token0;if(I instanceof V.Pool)0===I.tickSpacing?(s.push(0,w.isNative?Z:w.wrapped.address),l.push("uint8","address")):(s.push(I.fee+4194304,I.tickSpacing,I.hooks,w.isNative?Z:w.wrapped.address),l.push("uint24","uint24","address","address"));else if(I instanceof B.Pool)s.push(I.fee+3145728,w.wrapped.address),l.push("uint24","address");else{if(!(I instanceof W.Pair))throw Error("Unsupported pool type "+JSON.stringify(I));s.push(32,w.wrapped.address),l.push("uint8","address")}h=w}}else{var D=f.pools.reduce(function(f,r,s){var l=f.inputToken,m=f.path,h=f.types,E=r.token0.equals(l)?r.token1:r.token0;return 0===s?{inputToken:E,types:["address","uint24","address"],path:[l.wrapped.address,r instanceof B.Pool?r.fee:8388608,E.wrapped.address]}:{inputToken:E,types:[].concat(h,["uint24","address"]),path:[].concat(m,[r instanceof B.Pool?r.fee:8388608,E.wrapped.address])}},{inputToken:f.input,path:[],types:[]});s=D.path,l=D.types}return G.pack(l,s)}var J=function(f){for(var r=[],s=0,l=0;l<f.pools.length;)(f.pools[s]instanceof V.Pool&&!(f.pools[l]instanceof V.Pool)||f.pools[s]instanceof B.Pool&&!(f.pools[l]instanceof B.Pool)||f.pools[s]instanceof W.Pair&&!(f.pools[l]instanceof W.Pair))&&(r.push(f.pools.slice(s,l)),s=l),++l===f.pools.length&&r.push(f.pools.slice(s,l));return r},z=function(f,r){return f.reduce(function(f,r){var s=f.inputToken;if(!r.involvesToken(s))throw Error("PATH");return{inputToken:r.token0.equals(s)?r.token1:r.token0}},{inputToken:r}).inputToken},eb=h.BigInt(0),em=new m.Percent(h.BigInt(50),h.BigInt(100)),ey=function(){function t(){}return t.encodeV2Swap=function(f,r,s,l){var h=B.toHex(f.maximumAmountIn(r.slippageTolerance).quotient),E=B.toHex(f.minimumAmountOut(r.slippageTolerance).quotient),I=f.route.path.map(function(f){return f.address}
1),w=s?K:void 0===r.recipient?X:m.validateAndParseAddress(r.recipient);return f.tradeType===m.TradeType.EXACT_INPUT?t.INTERFACE.encodeFunctionData("swapExactTokensForTokens",[h,l?0:E,I,w]):t.INTERFACE.encodeFunctionData("swapTokensForExactTokens",[E,h,I,w])},t.encodeV3Swap=function(f,r,s,l){for(var h,E=[],I=N(f.swaps);!(h=I()).done;){var w=h.value,D=w.route,M=w.outputAmount,L=B.toHex(f.maximumAmountIn(r.slippageTolerance,w.inputAmount).quotient),W=B.toHex(f.minimumAmountOut(r.slippageTolerance,M).quotient),V=1===D.pools.length,G=s?K:void 0===r.recipient?X:m.validateAndParseAddress(r.recipient);if(V)E.push(f.tradeType===m.TradeType.EXACT_INPUT?t.INTERFACE.encodeFunctionData("exactInputSingle",[{tokenIn:D.tokenPath[0].address,tokenOut:D.tokenPath[1].address,fee:D.pools[0].fee,recipient:G,amountIn:L,amountOutMinimum:l?0:W,sqrtPriceLimitX96:0}]):t.INTERFACE.encodeFunctionData("exactOutputSingle",[{tokenIn:D.tokenPath[0].address,tokenOut:D.tokenPath[1].address,fee:D.pools[0].fee,recipient:G,amountOut:W,amountInMaximum:L,sqrtPriceLimitX96:0}]));else{var Z=B.encodeRouteToPath(D,f.tradeType===m.TradeType.EXACT_OUTPUT);E.push(f.tradeType===m.TradeType.EXACT_INPUT?t.INTERFACE.encodeFunctionData("exactInput",[{path:Z,recipient:G,amountIn:L,amountOutMinimum:l?0:W}]):t.INTERFACE.encodeFunctionData("exactOutput",[{path:Z,recipient:G,amountOut:W,amountInMaximum:L}]))}}return E},t.encodeMixedRouteSwap=function(f,r,s,l){var h=[];f.tradeType!==m.TradeType.EXACT_INPUT&&I(!1);for(var E,w=N(f.swaps);!(E=w()).done;)(function(){var I=E.value,w=I.route,D=I.inputAmount,M=I.outputAmount;if(w.pools.some(function(f){return f instanceof V.Pool}))throw Error("Encoding mixed routes with V4 not supported");var L=B.toHex(f.maximumAmountIn(r.slippageTolerance,D).quotient),W=B.toHex(f.minimumAmountOut(r.slippageTolerance,M).quotient),G=1===w.pools.length,Z=s?K:void 0===r.recipient?X:m.validateAndParseAddress(r.recipient),T=function(f){return f.pools.every(function(f){return f instanceof B.Pool})};if(G){if(T(w))h.push(t.INTERFACE.encodeFunctionData("exactInputSingle",[{tokenIn:w.path[0].wrapped.address,tokenOut:w.path[1].wrapped.address,fee:w.pools[0].fee,recipient:Z,amountIn:L,amountOutMinimum:l?0:W,sqrtPriceLimitX96:0}]));else{var $=w.path.map(function(f){return f.wrapped.address});h.push(t.INTERFACE.encodeFunctionData("swapExactTokensForTokens",[L,l?0:W,$,Z]))}}else for(var ee,et=J(w),g=function(f){return f===et.length-1},ef=w.input.wrapped,en=0;en<et.length;en++){var er=et[en];ee=z(er,ef);var ea=new ei([].concat(er),er[0].token0.equals(ef)?er[0].token0:er[0].token1,ee),eo=new ep(ea);if(ef=ee.wrapped,T(eo)){var es={path:Q(eo),recipient:g(en)?Z:K,amountIn:0===en?L:0,amountOutMinimum:g(en)?W:0};h.push(t.INTERFACE.encodeFunctionData("exactInput",[es]))}else{var eu=[0===en?L:0,g(en)?W:0,eo.path.map(function(f){return f.wrapped.address}),g(en)?Z:K];h.push(t.INTERFACE.encodeFunctionData("swapExactTokensForTokens",eu))}}})();return h},t.encodeSwaps=function(f,s,l){if(f instanceof el){f.swaps.every(function(f){return f.route.protocol===r.Protocol.V3||f.route.protocol===r.Protocol.V2||f.route.protocol===r.Protocol.MIXED})||I(!1);for(var h,E=[],w=N(f.swaps);!(h=w()).done;){var D=h.value,M=D.route,L=D.inputAmount,V=D.outputAmount;if(M.protocol===r.Protocol.V2)E.push(new W.Trade(M,f.tradeType===m.TradeType.EXACT_INPUT?L:V,f.tradeType));else if(M.protocol===r.Protocol.V3)E.push(B.Trade.createUncheckedTrade({route:M,inputAmount:L,outputAmount:V,tradeType:f.tradeType}));else{if(M.protocol!==r.Protocol.MIXED)throw Error("UNSUPPORTED_TRADE_PROTOCOL");E.push(es.createUncheckedTrade({route:M,inputAmount:L,outputAmount:V,tradeType:f.tradeType}))}}f=E}Array.isArray(f)||(f=[f]);var G=f.reduce(function(f,r){return f+(r instanceof B.Trade||r instanceof es?r.swaps.length:1)},0),Z=f[0];f.every(function(f){return f.inputAmount.currency.equals(Z.inputAmount.currency)})||I(!1),f.every(function(f){return f.outputAmount.currency.equals(Z.outputAmount.currency)})||I(!1),f.every(function(f){return f.tradeType===Z.tradeType})||I(!1);var X=[],K=Z.inputAmount.currency.isNative,$=Z.outputAmount.currency.isNative,ee=Z.tradeType===m.TradeType.EXACT_INPUT&&G>2,et=$||!!s.fee||!!l||ee;s.inputTokenPermit&&(Z.inputAmount.currency.isToken||I(!1),X.push(B.SelfPermit.encodePermit(Z.inputAmount.currency,s.inputTokenPermit)));for(var ef,en=N(f);!(ef=en()).done;){var er=ef.value;if(er instanceof W.Trade)X.push(t.encodeV2Swap(er,s,et,ee));else if(er instanceof B.Trade)for(var ea,ei=N(t.encodeV3Swap(er,s,et,ee));!(ea=ei()).done;)X.push(ea.value);else{if(!(er instanceof es))throw Error("Unsupported trade object");for(var eo,eu=N(t.encodeMixedRouteSwap(er,s,et,ee));!(eo=eu()).done;)X.push(eo.value)}}var ec=m.CurrencyAmount.fromRawAmount(Z.inputAmount.currency,0),ed=m.CurrencyAmount.fromRawAmount(Z.outputAmount.currency,0),ep=f.reduce(function(f,r){return f.add(r.minimumAmountOut(s.slippageTolerance))},ed),eb=f.reduce(function(f,r){return f.add(r.outputAmount)},ed);return{calldatas:X,sampleTrade:Z,routerMustCustody:et,inputIsNative:K,outputIsNative:$,totalAmountIn:f.reduce(function(f,r){return f.add(r.maximumAmountIn(s.slippageTolerance))}
1,ec),minimumAmountOut:ep,quoteAmountOut:eb}},t.swapCallParameters=function(f,r){var s=t.encodeSwaps(f,r),l=s.calldatas,h=s.sampleTrade,E=s.inputIsNative,I=s.totalAmountIn,w=s.minimumAmountOut;return s.routerMustCustody&&l.push(s.outputIsNative?ea.encodeUnwrapWETH9(w.quotient,r.recipient,r.fee):ea.encodeSweepToken(h.outputAmount.currency.wrapped,w.quotient,r.recipient,r.fee)),E&&(h.tradeType===m.TradeType.EXACT_OUTPUT||t.riskOfPartialFill(f))&&l.push(B.Payments.encodeRefundETH()),{calldata:er.encodeMulticall(l,r.deadlineOrPreviousBlockhash),value:B.toHex(E?I.quotient:eb)}},t.swapAndAddCallParameters=function(f,s,l,h,E,w){var D=t.encodeSwaps(f,s,!0),M=D.calldatas,L=D.inputIsNative,W=D.outputIsNative,V=D.sampleTrade,G=D.totalAmountIn,Z=D.quoteAmountOut,X=D.minimumAmountOut;s.outputTokenPermit&&(Z.currency.isToken||I(!1),M.push(B.SelfPermit.encodePermit(Z.currency,s.outputTokenPermit)));var K=V.route.chainId,$=l.pool.token0.wrapped.address===G.currency.wrapped.address,ee=t.getPositionAmounts(l,$),et=ee.positionAmountIn,ef=ee.positionAmountOut,ei=L?m.WETH9[K]:et.currency.wrapped,eo=W?m.WETH9[K]:ef.currency.wrapped,es=ef.subtract(Z.wrapped);es.greaterThan(m.CurrencyAmount.fromRawAmount(ef.currency,0))&&M.push(W?ea.encodeWrapETH(es.quotient):ea.encodePull(eo,es.quotient)),M.push(L?ea.encodeWrapETH(et.quotient):ea.encodePull(ei,et.quotient)),E!==r.ApprovalTypes.NOT_REQUIRED&&M.push(en.encodeApprove(ei,E)),w!==r.ApprovalTypes.NOT_REQUIRED&&M.push(en.encodeApprove(eo,w));var eu,ec=B.Position.fromAmounts({pool:l.pool,tickLower:l.tickLower,tickUpper:l.tickUpper,amount0:$?l.amount0.quotient.toString():X.quotient.toString(),amount1:$?X.quotient.toString():l.amount1.quotient.toString(),useFullPrecision:!1});return M.push(en.encodeAddLiquidity(l,ec,h,s.slippageTolerance)),M.push(L?ea.encodeUnwrapWETH9(eb):ea.encodeSweepToken(ei,eb)),M.push(W?ea.encodeUnwrapWETH9(eb):ea.encodeSweepToken(eo,eb)),eu=L?G.wrapped.add(et.wrapped).quotient:W?es.quotient:eb,{calldata:er.encodeMulticall(M,s.deadlineOrPreviousBlockhash),value:eu.toString()}},t.riskOfPartialFill=function(f){return Array.isArray(f)?f.some(function(f){return t.v3TradeWithHighPriceImpact(f)}):t.v3TradeWithHighPriceImpact(f)},t.v3TradeWithHighPriceImpact=function(f){return!(f instanceof W.Trade)&&f.priceImpact.greaterThan(em)},t.getPositionAmounts=function(f,r){var s=f.mintAmounts,l=s.amount1,h=m.CurrencyAmount.fromRawAmount(f.pool.token0,s.amount0),E=m.CurrencyAmount.fromRawAmount(f.pool.token1,l),I=r?[h,E]:[E,h];return{positionAmountIn:I[0],positionAmountOut:I[1]}},t}();ey.INTERFACE=new E.Interface(L.abi),r.ADDRESS_THIS=K,r.ADDRESS_ZERO=Z,r.ApproveAndCall=en,r.MIXED_QUOTER_V1_V2_FEE_PATH_PLACEHOLDER=8388608,r.MIXED_QUOTER_V2_V2_FEE_PATH_PLACEHOLDER=32,r.MIXED_QUOTER_V2_V3_FEE_PATH_PLACEHOLDER=3145728,r.MIXED_QUOTER_V2_V4_FEE_PATH_PLACEHOLDER=4194304,r.MSG_SENDER=X,r.MixedRoute=ep,r.MixedRouteSDK=ei,r.MixedRouteTrade=es,r.MulticallExtended=er,r.ONE=ee,r.ONE_HUNDRED_PERCENT=ef,r.PaymentsExtended=ea,r.RouteV2=eu,r.RouteV3=ec,r.RouteV4=ed,r.SwapRouter=ey,r.Trade=el,r.ZERO=$,r.ZERO_PERCENT=et,r.amountWithPathCurrency=S,r.encodeMixedRouteToPath=Q,r.getOutputOfPools=z,r.getPathCurrency=H,r.getPathToken=j,r.isMint=x,r.partitionMixedRouteByProtocol=J,r.tradeComparator=U},26005:function(f,r,s){"use strict";s.r(r),s.d(r,{ARGENT_WALLET_DETECTOR_ADDRESS:function(){return eq},CHAIN_TO_ADDRESSES_MAP:function(){return eF},ChainId:function(){return I},CurrencyAmount:function(){return e$},ENS_REGISTRAR_ADDRESSES:function(){return eW},Ether:function(){return e4},Fraction:function(){return ez},GOVERNANCE_ALPHA_V0_ADDRESSES:function(){return eS},GOVERNANCE_ALPHA_V1_ADDRESSES:function(){return eM},GOVERNANCE_BRAVO_ADDRESSES:function(){return eR},MERKLE_DISTRIBUTOR_ADDRESS:function(){return eL},MIXED_ROUTE_QUOTER_V1_ADDRESSES:function(){return eZ},MULTICALL_ADDRESSES:function(){return ek},MaxUint256:function(){return eX},NONFUNGIBLE_POSITION_MANAGER_ADDRESSES:function(){return eH},NativeCurrency:function(){return e5},NativeCurrencyName:function(){return w},Percent:function(){return e1},Price:function(){return e6},QUOTER_ADDRESSES:function(){return eU},Rounding:function(){return K},SOCKS_CONTROLLER_ADDRESSES:function(){return eV},SUPPORTED_CHAINS:function(){return em},SWAP_ROUTER_02_ADDRESSES:function(){return SWAP_ROUTER_02_ADDRESSES},TICK_LENS_ADDRESSES:function(){return eG},TIMELOCK_ADDRESSES:function(){return eN},Token:function(){return e3},TradeType:function(){return X},UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS:function(){return eh},UNI_ADDRESSES:function(){return eA},V2_FACTORY_ADDRESS:function(){return eE},V2_FACTORY_ADDRESSES:function(){return eg},V2_ROUTER_ADDRESS:function(){return ev},V2_ROUTER_ADDRESSES:function(){return eT},V3_CORE_FACTORY_ADDRESSES:function(){return eD},V3_MIGRATOR_ADDRESSES:function(){return eO},WETH9:function(){return e8},computePriceImpact:function(){return computePriceImpact},computeZksyncCreate2Address:function(){return computeZksyncCreate2Address},sortedInsert:function(){return sortedInsert},sqrt:function(){return sqrt},validateAndParseAddress:function(){return validateAndParseAddress}});var l,m,h,E,I,w,B,D,M,L,W,V,G,Z,X,K,$,ee,et=s(28518),ef=s.n(et),en=s(4554),er=s(39585),ea=s.n(er),ei=s(32021),eo=s.n(ei),es=s(8064),eu=s.n(es),ec=s(39898),ed=s(13858),ep=s(89388),el=s(30887),eb=s(65017);function _defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function _createClass(f,r,s){return r&&_defineProperties(f.prototype,r),s&&_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _inheritsLoose(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,_setPrototypeOf(f,r)}function _setPrototypeOf(f,r){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}(l=I||(I={}))[l.MAINNET=1]="MAINNET",l[l.GOERLI=5]="GOERLI",l[l.SEPOLIA=11155111]="SEPOLIA",l[l.OPTIMISM=10]="OPTIMISM",l[l.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",l[l.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",l[l.ARBITRUM_ONE=42161]="ARBITRUM_ONE",l[l.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",l[l.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",l[l.POLYGON=137]="POLYGON",l[l.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",l[l.CELO=42220]="CELO",l[l.CELO_ALFAJORES=44787]="CELO_ALFAJORES",l[l.GNOSIS=100]="GNOSIS",l[l.MOONBEAM=1284]="MOONBEAM",l[l.BNB=56]="BNB",l[l.AVALANCHE=43114]="AVALANCHE",l[l.BASE_GOERLI=84531]="BASE_GOERLI",l[l.BASE_SEPO
1LIA=84532]="BASE_SEPOLIA",l[l.BASE=8453]="BASE",l[l.ZORA=7777777]="ZORA",l[l.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",l[l.ROOTSTOCK=30]="ROOTSTOCK",l[l.BLAST=81457]="BLAST",l[l.ZKSYNC=324]="ZKSYNC",l[l.WORLDCHAIN=480]="WORLDCHAIN",l[l.UNICHAIN_SEPOLIA=1301]="UNICHAIN_SEPOLIA",l[l.UNICHAIN=130]="UNICHAIN",l[l.MONAD_TESTNET=10143]="MONAD_TESTNET",l[l.SONEIUM=1868]="SONEIUM";var em=[I.MAINNET,I.OPTIMISM,I.OPTIMISM_GOERLI,I.OPTIMISM_SEPOLIA,I.ARBITRUM_ONE,I.ARBITRUM_GOERLI,I.ARBITRUM_SEPOLIA,I.POLYGON,I.POLYGON_MUMBAI,I.GOERLI,I.SEPOLIA,I.CELO_ALFAJORES,I.CELO,I.BNB,I.AVALANCHE,I.BASE,I.BASE_GOERLI,I.BASE_SEPOLIA,I.ZORA,I.ZORA_SEPOLIA,I.ROOTSTOCK,I.BLAST,I.ZKSYNC,I.WORLDCHAIN,I.UNICHAIN_SEPOLIA,I.UNICHAIN,I.MONAD_TESTNET,I.SONEIUM];(m=w||(w={})).ETHER="ETH",m.MATIC="MATIC",m.CELO="CELO",m.GNOSIS="XDAI",m.MOONBEAM="GLMR",m.BNB="BNB",m.AVAX="AVAX",m.ROOTSTOCK="RBTC";var ey=[I.MAINNET,I.GOERLI,I.SEPOLIA];function constructSameAddressMap(f,r){return void 0===r&&(r=[]),ey.concat(r).reduce(function(r,s){return r[s]=f,r},{})}var eA=constructSameAddressMap("0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",[I.OPTIMISM,I.ARBITRUM_ONE,I.POLYGON,I.POLYGON_MUMBAI,I.SEPOLIA]),eh="0x8B799381ac40b838BBA4131ffB26197C432AFe78",eE="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",eg=((B={})[I.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.SEPOLIA]="0xF62c03E08ada871A0bEb309762E260a7a6a880E6",B[I.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",B[I.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",B[I.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",B[I.BASE_SEPOLIA]="0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e",B[I.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",B[I.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",B[I.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",B[I.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",B[I.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",B[I.WORLDCHAIN]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.UNICHAIN_SEPOLIA]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.UNICHAIN]="0x1f98400000000000000000000000000000000002",B[I.MONAD_TESTNET]="0x733e88f248b742db6c14c0b1713af5ad7fdd59d0",B[I.SONEIUM]="0x97febbc2adbd5644ba22736e962564b23f5828ce",B),ev="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",eT=((D={})[I.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",D[I.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",D[I.SEPOLIA]="0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3",D[I.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",D[I.BASE_SEPOLIA]="0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",D[I.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",D[I.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",D[I.WORLDCHAIN]="0x541aB7c31A119441eF3575F6973277DE0eF460bd",D[I.UNICHAIN_SEPOLIA]="0x920b806E40A00E02E7D2b94fFc89860fDaEd3640",D[I.UNICHAIN]="0x284f11109359a7e1306c3e447ef14d38400063ff",D[I.MONAD_TESTNET]="0xfb8e1c3b833f9e67a71c859a132cf783b645e436",D[I.SONEIUM]="0x273f68c234fa55b550b40e563c4a488e0d334320",D),e_={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},eC=_extends({},e_,{mixedRouteQuoterV1Address:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E",v4PoolManagerAddress:"0x000000000004444c5dc75cB358380D2e3dE08A90",v4PositionManagerAddress:"0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e",v4StateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",v4QuoterAddress:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203"}),ex=_extends({},e_,{mixedRouteQuoterV1Address:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),eI=_extends({},e_,{v4PoolManagerAddress:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",v4PositionManagerAddress:"0x3c3ea4b57a46241e54610e5f022e5c45859a1017",v4StateView:"0xc18a3169788f4f75a170290584e
1ca6395c75ecdb",v4QuoterAddress:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7"}),ew=_extends({},e_,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0xd88f38f930b7952f2db2432cb002e7abbf3dd869",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"}),eP=_extends({},e_,{v4PoolManagerAddress:"0x67366782805870060151383f4bbff9dab53e5cd6",v4PositionManagerAddress:"0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9",v4StateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",v4QuoterAddress:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9"}),eB={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"},eF=((M={})[I.MAINNET]=eC,M[I.OPTIMISM]=eI,M[I.ARBITRUM_ONE]=ew,M[I.POLYGON]=eP,M[I.POLYGON_MUMBAI]=eP,M[I.GOERLI]=ex,M[I.CELO]=eB,M[I.CELO_ALFAJORES]=eB,M[I.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",v4PoolManagerAddress:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",v4PositionManagerAddress:"0x7a4a5c919ae2541aed11041a1aeee68f1287f95b",v4StateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",v4QuoterAddress:"0x9f75dd27d6664c475b90e105573e550ff69437b0"},M[I.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},M[I.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},M[I.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},M[I.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E",v4PoolManagerAddress:"0xFB3e0C6F74eB1a21CC1Da29aeC80D2Dfe6C9a317",v4PositionManagerAddress:"0xAc631556d3d4019C95769033B5E719dD77124BAc",v4StateView:"0x9d467fa9062b6e9b1a46e26007ad82db116c67cb",v4QuoterAddress:"0x7de51022d70a725b508085468052e25e22b5c4c9"},M[I.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad0
17",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",mixedRouteQuoterV2Address:"0x4745f77b56a0e2294426e3936dc4fab68d9543cd",v4PoolManagerAddress:"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",v4PositionManagerAddress:"0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4",v4StateView:"0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c",v4QuoterAddress:"0x61b3f2011a92d183c7dbadbda940a7555ccf9227"},M[I.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",v4PoolManagerAddress:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",v4PositionManagerAddress:"0xb74b1f14d2754acfcbbe1a221023a5cf50ab8acd",v4StateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",v4QuoterAddress:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2"},M[I.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapRouter02Address:"0x2626664c2603336E57B271c5C0b26F421741e481",mixedRouteQuoterV1Address:"0xe544efae946f0008ae9a8d64493efa7886b73776",v4PoolManagerAddress:"0x498581ff718922c3f8e6a244956af099b2652b2b",v4PositionManagerAddress:"0x7c5f5a4bbd8fd63184577525326123b519429bdc",v4StateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",v4QuoterAddress:"0x0d5e0f971ed27fbff6c2837bf31316121532048d"},M[I.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},M[I.BASE_SEPOLIA]={v3CoreFactoryAddress:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",multicallAddress:"0xd867e273eAbD6c853fCd0Ca0bFB6a3aE6491d2C1",quoterAddress:"0xC5290058841028F1614F3A6F0F5816cAd0df5E27",v3MigratorAddress:"0xCbf8b7f80800bd4888Fbc7bf1713B80FE4E23E10",nonfungiblePositionManagerAddress:"0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",tickLensAddress:"0xedf6066a2b290C185783862C7F4776A2C8077AD1",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",v4PoolManagerAddress:"0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",v4PositionManagerAddress:"0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80",v4StateView:"0x571291b572ed32ce6751a2cb2486ebee8defb9b4",v4QuoterAddress:"0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba"},M[I.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557",v4PoolManagerAddress:"0x0575338e4c17006ae181b47900a84404247ca30f",v4PositionManagerAddress:"0xf66c7b99e2040f0d9b326b3b7c152e9663543d63",v4StateView:"0x385785af07d63b50d0a0ea57c4ff89d06adf7328",v4QuoterAddress:"0x5edaccc0660e0a2c44b06e07ce8b915e625dc2c6"},M[I.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877
1a1Fc4e20A78018f9831365c85f3064"},M[I.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},M[I.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730AeeCd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66",v4PoolManagerAddress:"0x1631559198a9e474033433b2958dabc135ab6446",v4PositionManagerAddress:"0x4ad2f4cca2682cbb5b950d660dd458a1d3f1baad",v4StateView:"0x12a88ae16f46dce4e8b15368008ab3380885df30",v4QuoterAddress:"0x6f71cdcb0d119ff72c6eb501abceb576fbf62bcf"},M[I.ZKSYNC]={v3CoreFactoryAddress:"0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422",multicallAddress:"0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C",quoterAddress:"0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28",v3MigratorAddress:"0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E",nonfungiblePositionManagerAddress:"0x0616e5762c1E7Dc3723c50663dF10a162D690a86",tickLensAddress:"0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89",swapRouter02Address:"0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3"},M[I.WORLDCHAIN]={v3CoreFactoryAddress:"0x7a5028BDa40e7B173C278C5342087826455ea25a",multicallAddress:"0x0a22c04215c97E3F532F4eF30e0aD9458792dAB9",quoterAddress:"0x10158D43e6cc414deE1Bd1eB0EfC6a5cBCfF244c",v3MigratorAddress:"0x9EBDdCBa71C9027E1eB45135672a30bcFEec9de3",nonfungiblePositionManagerAddress:"0xec12a9F9a09f50550686363766Cc153D03c27b5e",tickLensAddress:"0xE61df0CaC9d85876aCE5E3037005D80943570623",swapRouter02Address:"0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6",v4PoolManagerAddress:"0xb1860d529182ac3bc1f51fa2abd56662b7d13f33",v4PositionManagerAddress:"0xc585e0f504613b5fbf874f21af14c65260fb41fa",v4StateView:"0x51d394718bc09297262e368c1a481217fdeb71eb",v4QuoterAddress:"0x55d235b3ff2daf7c3ede0defc9521f1d6fe6c5c0"},M[I.UNICHAIN_SEPOLIA]={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1",quoterAddress:"0x6Dd37329A1A225a6Fca658265D460423DCafBF89",v3MigratorAddress:"0xb5FA244C9d6D04B2FBac84418b3c4910ED1Ae5f2",nonfungiblePositionManagerAddress:"0xB7F724d6dDDFd008eFf5cc2834edDE5F9eF0d075",tickLensAddress:"0x5f739c790a48E97eec0efb81bab5D152c0A0ecA0",swapRouter02Address:"0xd1AAE39293221B77B0C71fBD6dCb7Ea29Bb5B166",v4PoolManagerAddress:"0x00b036b58a818b1bc34d502d3fe730db729e62ac",v4PositionManagerAddress:"0xf969aee60879c54baaed9f3ed26147db216fd664",v4StateView:"0xc199f1072a74d4e905aba1a84d9a45e2546b6222",v4QuoterAddress:"0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472"},M[I.UNICHAIN]={v3CoreFactoryAddress:"0x1f98400000000000000000000000000000000003",multicallAddress:"0xb7610f9b733e7d45184be3a1bc966960ccc54f0b",quoterAddress:"0x565ac8c7863d9bb16d07e809ff49fe5cd467634c",v3MigratorAddress:"0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc",nonfungiblePositionManagerAddress:"0x943e6e07a7e8e791dafc44083e54041d743c46e9",tickLensAddress:"0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443",swapRouter02Address:"0x73855d06de49d0fe4a9c42636ba96c62da12ff9c",v4PoolManagerAddress:"0x1f98400000000000000000000000000000000004",v4PositionManagerAddress:"0x4529a01c7a0410167c5740c487a8de60232617bf",v4StateView:"0x86e8631a016f9068c3f085faf484ee3f5fdee8f2",v4QuoterAddress:"0x333e3c607b141b18ff6de9f258db6e77fe7491e0"},M[I.MONAD_TESTNET]={v3CoreFactoryAddress:"0x961235a9020b05c44df1026d956d1f4d78014276",multicallAddress:"0xa707ceb989cc3728551ed0e6e44b718dd114cf44",quoterAddress:"0x1ba215c17565de7b0cb7ecab971bcf540c24a862",v3MigratorAddress:"0x0a78348b71f8ae8caff2f8f9d4d74a2f36516661",nonfungiblePositionManagerAddress:"0x3dcc735c74f10fe2b9db2bb55c40fbbbf24490f7",tickLensAddress:"0x337478eb6058455ecb3696184b30dd6a29e3a893",swapRouter02Address:"0x4c4eabd5fb1d1a7234a48692551eaecff8194ca7"},M[I.SONEIUM]={v3CoreFactoryAddress:"0x42ae7ec7ff020412639d443e245d936429fbe717",multicallAddress:"0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2",quoterAddress:"0x3e6c707d0125226ff60f291b6bd1404634f00aba",v3MigratorAddress:"0xa107580f73bd797bd8b87ff24e98346d99f93ddb",nonfungiblePositionManagerAddress:"0x56c1205b0244332011c1e866f4ea5384eb6bfa2c",tickLensAddress:"0xcd08eefb928c86499e6235ac155906bb7c4dc41a",swapR
1outer02Address:"0x7e40db01736f88464e5f4e42394f3d5bbb6705b9",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0x1b35d13a2e2528f192637f14b05f0dc0e7deb566",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"},M),eD=_extends({},em.reduce(function(f,r){return f[r]=eF[r].v3CoreFactoryAddress,f},{})),eO=_extends({},em.reduce(function(f,r){var s=eF[r].v3MigratorAddress;return s&&(f[r]=s),f},{})),ek=_extends({},em.reduce(function(f,r){return f[r]=eF[r].multicallAddress,f},{})),eS=constructSameAddressMap("0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F"),eM=((L={})[I.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",L),eR=((W={})[I.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",W),eN=constructSameAddressMap("0x1a9C8182C09F50C8318d769245beA52c32BE35BC"),eL=((V={})[I.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",V),eq=((G={})[I.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",G),eU=_extends({},em.reduce(function(f,r){return f[r]=eF[r].quoterAddress,f},{})),eH=_extends({},em.reduce(function(f,r){var s=eF[r].nonfungiblePositionManagerAddress;return s&&(f[r]=s),f},{})),eW=_extends({},constructSameAddressMap("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e")),eV=((Z={})[I.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",Z),eG=_extends({},em.reduce(function(f,r){var s=eF[r].tickLensAddress;return s&&(f[r]=s),f},{})),eZ=em.reduce(function(f,r){var s=eF[r].mixedRouteQuoterV1Address;return s&&(f[r]=s),f},{}),SWAP_ROUTER_02_ADDRESSES=function(f){if(em.includes(f)){var r;return null!=(r=eF[f].swapRouter02Address)?r:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"}return""};(h=X||(X={}))[h.EXACT_INPUT=0]="EXACT_INPUT",h[h.EXACT_OUTPUT=1]="EXACT_OUTPUT",(E=K||(K={}))[E.ROUND_DOWN=0]="ROUND_DOWN",E[E.ROUND_HALF_UP=1]="ROUND_HALF_UP",E[E.ROUND_UP=2]="ROUND_UP";var eX=ef().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ej=eu()(ea()),eQ=eu()(eo()),eK=(($={})[K.ROUND_DOWN]=ej.ROUND_DOWN,$[K.ROUND_HALF_UP]=ej.ROUND_HALF_UP,$[K.ROUND_UP]=ej.ROUND_UP,$),eY=((ee={})[K.ROUND_DOWN]=0,ee[K.ROUND_HALF_UP]=1,ee[K.ROUND_UP]=3,ee),ez=function(){function Fraction(f,r){void 0===r&&(r=ef().BigInt(1)),this.numerator=ef().BigInt(f),this.denominator=ef().BigInt(r)}Fraction.tryParseFraction=function(f){if(f instanceof ef()||"number"==typeof f||"string"==typeof f)return new Fraction(f);if("numerator"in f&&"denominator"in f)return f;throw Error("Could not parse fraction")};var f=Fraction.prototype;return f.invert=function(){return new Fraction(this.denominator,this.numerator)},f.add=function(f){var r=Fraction.tryParseFraction(f);return ef().equal(this.denominator,r.denominator)?new Fraction(ef().add(this.numerator,r.numerator),this.denominator):new Fraction(ef().add(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator)),ef().multiply(this.denominator,r.denominator))},f.subtract=function(f){var r=Fraction.tryParseFraction(f);return ef().equal(this.denominator,r.denominator)?new Fraction(ef().subtract(this.numerator,r.numerator),this.denominator):new Fraction(ef().subtract(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator)),ef().multiply(this.denominator,r.denominator))},f.lessThan=function(f){var r=Fraction.tryParseFraction(f);return ef().lessThan(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator))},f.equalTo=function(f){var r=Fraction.tryParseFraction(f);return ef().equal(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator))},f.greaterThan=function(f){var r=Fraction.tryParseFraction(f);return ef().greaterThan(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator))},f.multiply=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ef().multiply(this.numerator,r.numerator),ef().multiply(this.denominator,r.denominator))},f.divide=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ef().multiply(this.numerator,r.denominator),ef().multiply(this.denominator,r.numerator))},f.toSignificant=function(f,r,s){void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=K.ROUND_HALF_UP),Number.isInteger(f)||(0,en.Z)(!1),f>0||(0,en.Z)(!1),ej.set({precision:f+1,rounding:eK[s]});var l=new ej(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(f);return l.toFormat(l.decimalPlaces(),r)},f.toFixed=function(f,r,s){return void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=K.ROUND_HALF_UP),Number.isInteger(f)||(0,en.Z)(!1),f>=0||(0,en.Z)(!1),eQ.DP=f,eQ.RM=eY[s],new eQ(this.numerator.toString()).div(this.denominator.toString()).toFormat(f,r)},_createClass(Fraction,[{key:"quotient",get:function(){return ef().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new Fraction(ef().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new Fraction(this.numerator,this.denominator)}}])}(),eJ=eu()(eo()),e$=function(f){function CurrencyAmount(r,s,l){var m;return m=f.call(this,s,l)||this,ef().lessThanOrEqual(m.quotient,eX)||(0,en.Z)(!1),m.currency=r,m.decimalScale=ef().exponentiate(ef().BigInt(10),ef().BigInt(r.decimals)),m}_inheritsLoose(CurrencyAmount,f),CurrencyAmount.fromRawAmount=function(f,r){return new CurrencyAmount(f,r)},CurrencyAmount.fromFractionalAmount=function(f,r,s){return new CurrencyAmount(f,r,s)};var r=CurrencyAmount.prototype;return r.add=function(r){this.currency.equals(r.currency)||(0,en.Z)(!1);var s=f.prototype.add.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.subtract=function(r){this.currency.equals(r.currency)||(0,en.Z)(!1);var s=f.prototype.subtract.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.multiply=function(r){var s=f.prototype.multiply.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)}
1,r.divide=function(r){var s=f.prototype.divide.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.toSignificant=function(r,s,l){return void 0===r&&(r=6),void 0===l&&(l=K.ROUND_DOWN),f.prototype.divide.call(this,this.decimalScale).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=this.currency.decimals),void 0===l&&(l=K.ROUND_DOWN),r<=this.currency.decimals||(0,en.Z)(!1),f.prototype.divide.call(this,this.decimalScale).toFixed(r,s,l)},r.toExact=function(f){return void 0===f&&(f={groupSeparator:""}),eJ.DP=this.currency.decimals,new eJ(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(f)},_createClass(CurrencyAmount,[{key:"wrapped",get:function(){return this.currency.isToken?this:CurrencyAmount.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}])}(ez),e0=new ez(ef().BigInt(100));function toPercent(f){return new e1(f.numerator,f.denominator)}var e1=function(f){function Percent(){var r;return r=f.apply(this,arguments)||this,r.isPercent=!0,r}_inheritsLoose(Percent,f);var r=Percent.prototype;return r.add=function(r){return toPercent(f.prototype.add.call(this,r))},r.subtract=function(r){return toPercent(f.prototype.subtract.call(this,r))},r.multiply=function(r){return toPercent(f.prototype.multiply.call(this,r))},r.divide=function(r){return toPercent(f.prototype.divide.call(this,r))},r.toSignificant=function(r,s,l){return void 0===r&&(r=5),f.prototype.multiply.call(this,e0).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=2),f.prototype.multiply.call(this,e0).toFixed(r,s,l)},Percent}(ez),e6=function(f){function Price(){for(var r,s,l,m,h,E=arguments.length,I=Array(E),w=0;w<E;w++)I[w]=arguments[w];if(4===I.length)s=I[0],l=I[1],m=I[2],h=I[3];else{var B=I[0].quoteAmount.divide(I[0].baseAmount),D=[I[0].baseAmount.currency,I[0].quoteAmount.currency,B.denominator,B.numerator];s=D[0],l=D[1],m=D[2],h=D[3]}return(r=f.call(this,h,m)||this).baseCurrency=s,r.quoteCurrency=l,r.scalar=new ez(ef().exponentiate(ef().BigInt(10),ef().BigInt(s.decimals)),ef().exponentiate(ef().BigInt(10),ef().BigInt(l.decimals))),r}_inheritsLoose(Price,f);var r=Price.prototype;return r.invert=function(){return new Price(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){this.quoteCurrency.equals(r.baseCurrency)||(0,en.Z)(!1);var s=f.prototype.multiply.call(this,r);return new Price(this.baseCurrency,r.quoteCurrency,s.denominator,s.numerator)},r.quote=function(r){r.currency.equals(this.baseCurrency)||(0,en.Z)(!1);var s=f.prototype.multiply.call(this,r);return e$.fromFractionalAmount(this.quoteCurrency,s.numerator,s.denominator)},r.toSignificant=function(f,r,s){return void 0===f&&(f=6),this.adjustedForDecimals.toSignificant(f,r,s)},r.toFixed=function(f,r,s){return void 0===f&&(f=4),this.adjustedForDecimals.toFixed(f,r,s)},_createClass(Price,[{key:"adjustedForDecimals",get:function(){return f.prototype.multiply.call(this,this.scalar)}}])}(ez),BaseCurrency=function(f,r,s,l){Number.isSafeInteger(f)||(0,en.Z)(!1),r>=0&&r<255&&Number.isInteger(r)||(0,en.Z)(!1),this.chainId=f,this.decimals=r,this.symbol=s,this.name=l},e5=function(f){function NativeCurrency(){var r;return r=f.apply(this,arguments)||this,r.isNative=!0,r.isToken=!1,r}return _inheritsLoose(NativeCurrency,f),NativeCurrency}(BaseCurrency);function validateAndParseAddress(f){try{return(0,ed.getAddress)(f)}catch(r){throw Error(f+" is not a valid address.")}}var e2=/^0x[0-9a-fA-F]{40}$/,e3=function(f){function Token(r,s,l,m,h,E,I,w){var B;return(B=f.call(this,r,l,m,h)||this).isNative=!1,B.isToken=!0,E?B.address=function(f){if(e2.test(f))return f;throw Error(f+" is not a valid address.")}(s):B.address=validateAndParseAddress(s),I&&(I.gte(ec.O$.from(0))||(0,en.Z)(!1)),w&&(w.gte(ec.O$.from(0))||(0,en.Z)(!1)),B.buyFeeBps=I,B.sellFeeBps=w,B}_inheritsLoose(Token,f);var r=Token.prototype;return r.equals=function(f){return f.isToken&&this.chainId===f.chainId&&this.address.toLowerCase()===f.address.toLowerCase()},r.sortsBefore=function(f){return this.chainId!==f.chainId&&(0,en.Z)(!1),this.address.toLowerCase()!==f.address.toLowerCase()||(0,en.Z)(!1),this.address.toLowerCase()<f.address.toLowerCase()},_createClass(Token,[{key:"wrapped",get:function(){return this}}])}(BaseCurrency),e8={1:new e3(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),11155111:new e3(11155111,"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",18,"WETH","Wrapped Ether"),3:new e3(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),4:new e3(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),5:new e3(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),42:new e3(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),10:new e3(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),69:new e3(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),11155420:new e3(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),42161:new e3(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),421611:new e3(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),421614:new e3(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),8453:new e3(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),84532:new e3(84532,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),56:new e3(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),137:new e3(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),43114:new e3(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX"),7777777:new e3(7777777,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),81457:new e3(81457,"0x4300000000000000000000000000000000000004",18,"WETH","Wrapped Ether"),324:new e3(324,"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",18,"WETH","Wrapped Ether"),480:new e3(480,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),1301:new e3(1301,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),130:new e3(130,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),10143:new e3(10143,"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",18,"WMON","Wrapped Monad"),1868:new e3(1868,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether")},e4=function(f){function Ether(r){return f.call(this,r,18,"ETH","Ether")||this}return _inheritsLoose(Ether,f),Ether.onChain=function(f){var r;return null!=(r=this._etherCache[f])?r:this._etherCache[f]=new Ether(f)},Ether.prototype.equals=function(f){return f.isNative&&f.chainId===this.chainId},_createClass(Ether,[{key:"wrapped",get:function(){var f=e8[this.chainId];return f||(0,en.Z)(!1),f}}])}(e5);function computePriceImpact(f,r,s){var l=f.quote(r),m=l.subtract(s).divide(l);return new e1(m.numerator,m.denominator)}function computeZksyncCreate2Address(f,r,s,l){void 0===l&&(l="0x");var m=(0,el.keccak256)((0,eb.Y0)("zksyncCreate2")),h=(0,el.keccak256)(l),E=(0,el.keccak256)((0,ep.concat)([m,(0,ep.hexZeroPad)(f,32),s,r,h])).slice(26);return(0,ed.getAddress)(E)}function sortedInsert(f,r,s,l){if(s>0||(0,en.Z)(!1),f.length<=s||(0,en.Z)(!1),0===f.length)return f.push(r),null;var m=f.length===s;if(m&&0>=l(f[f.length-1],r))return r;for(var h=0,E=f.length;h<E;){var I=h+E>>>1;0>=l(f[I],r)?h=I+1:E=I}return f.splice(h,0,r),m?f.pop():null}e4._etherCache={};var e9=ef().BigInt(Number.MAX_SAFE_INTEGER),e7=ef().BigInt(0),te=ef().BigInt(1),tt=ef().BigInt(2);function sqrt(f){var r,s;if(ef().greaterThanOrEqual(f,e7)||(0,en.Z)(!1),ef().lessThan(f,e9))return ef().BigInt(Math.floor(Math.sqrt(ef().toNumber(f))));for(r=f,s=ef().add(ef().divide(f,tt),te);ef().lessThan(s,r);)r=s,s=ef().divide(ef().add(ef().divide(f,s),s),tt);return r}},32021:function(f,r,s){var l;!function(m){"use strict";var h,E="[big.js] ",I=E+"Invalid ",w=I+"decimal places",B=I+"rounding mode",D=E+"Division by zero",M={},L=void 0,W=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function round(f,r,s,l){var m=f.c,h=f.e+r+1;if(h<m.length){if(1===s)l=m[h]>=5;else if(2===s)l=m[h]>5||5==m[h]&&(l||h<0||m[h+1]!==L||1&m[h-1]);else if(3===s)l=l||!!m[0];else if(l=!1,0!==s)throw Error(B);if(h<1)m.length=1,l?(f.e=-r,m[0]=1):m[0]=f.e=0;else{if(m.length=h--,l)for(;++m[h]>9;)m[h]=0,h--||(++f.e,m.unshift(1));for(h=m.length;!m[--h];)m.pop()}}else if(s<0||s>3||s!==~~s)throw Error(B);return f}function stringify(f,r,s,l){var m,h,E=f.constructor,B=!f.c[0];if(s!==L){if(s!==~~s||s<(3==r)||s>1e6)throw Error(3==r?I+"precision":w);for(s=l-(f=new E(f)).e,f.c.length>++l&&round(f,s,E.RM),2==r&&(l=f.e+s+1);f.c.length<l;)f.c.push(0)}if(m=f.e,s=(h=f.c.join("")).length,2!=r&&(1==r||3==r&&l<=m||m<=E.NE||m>=E.PE))h=h.charAt(0)+(s>1?"."+h.slice(1):"")+(m<0?"e":"e+")+m;else if(m<0){for(;++m;)h="0"+h;h="0."+h}else if(m>0){if(++m>s)for(m-=s;m--;)h+="0";else m<s&&(h=h.slice(0,m)+"."+h.slice(m))}else s>1&&(h=h.charAt(0)+"."+h.slice(1));return f.s<0&&(!B||4==r)?"-"+h:h}M.abs=function(){var f=new this.constructor(this);return f.s=1,f},M.cmp=function(f){var r,s=this.c,l=(f=new this.constructor(f)).c,m=this.s,h=f.s,E=this.e,I=f.e;if(!s[0]||!l[0])return s[0]?m:l[0]?-h:0;if(m!=h)return m;if(r=m<0,E!=I)return E>I^r?1:-1;for(m=-1,h=(E=s.length)<(I=l.length)?E:I;++m<h;)if(s[m]!=l[m])return s[m]>l[m]^r?1:-1;return E==I?0:E>I^r?1:-1},M.div=function(f){var r=this.constructor,s=this.c,l=(f=new r(f)).c,m=this.s==f.s?1:-1,h=r.DP;if(h!==~~h||h<0||h>1e6)throw Error(w);if(!l[0])throw Error(D);if(!s[0])return new r(0*m);var E,I,B,M,W,V=l.slice(),G=E=l.length,Z=s.length,X=s.slice(0,E),K=X.length,$=f,ee=$.c=[],et=0,ef=h+($.e=this.e-f.e)+1;for($.s=m,m=ef<0?0:ef,V.unshift(0);K++<E;)X.push(0);do{for(B=0;B<10;B++){if(E!=(K=X.length))M=E>K?1:-1;else for(W=-1,M=0;++W<E;)if(l[W]!=X[W]){M=l[W]>X[W]?1:-1;break}if(M<0){for(I=K==E?l:V;K;){if(X[--K]<I[K]){for(W=K;W&&!X[--W];)X[W]=9;--X[W],X[K]+=10}X[K]-=I[K]}for(;!X[0];)X.shift()}else break}ee[et++]=M?B:++B,X[0]&&M?X[K]=s[G]||0:X=[s[G]]}while((G++<Z||X[0]!==L)&&m--);return!ee[0]&&1!=et&&(ee.shift(),$.e--),et>ef&&round($,h,r.RM,X[0]!==L),$},M.eq=function(f){return!this.cmp(f)},M.gt=function(f){return this.cmp(f)>0},M.gte=function(f){return this.cmp(f)>-1},M.lt=function(f){return 0>this.cmp(f)},M.lte=function(f){return 1>this.cmp(f)},M.minus=M.sub=function(f){var r,s,l,m,h=this.constructor,E=this.s,I=(f=new h(f)).s;if(E!=I)return f.s=-I,this.plus(f);var w=this.c.slice(),B=this.e,D=f.c,M=f.e;if(!w[0]||!D[0])return D[0]?(f.s=-I,f):new h(w[0]?this:0);if(E=B-M){for((m=E<0)?(E=-E,l=w):(M=B,l=D),l.reverse(),I=E;I--;)l.push(0);l.reverse()}else for(s=((m=w.length<D.length)?w:D).length,E=I=0;I<s;I++)if(w[I]!=D[I]){m=w[I]<D[I];break}if(m&&(l=w,w=D,D=l,f.s=-f.s),(I=(s=D.length)-(r=w.length))>0)for(;I--;)w[r++]=0;for(I=r;s>E;){if(w[--s]<D[s]){for(r=s;r&&!w[--r];)w[r]=9;--w[r],w[s]+=10}w[s]-=D[s]}for(;0===w[--I];)w.pop();for(;0===w[0];)w.shift(),--M;return w[0]||(f.s=1,w=[M=0]),f.c=w,f.e=M,f},M.mod=function(f){var r,s=this,l=s.constructor,m=s.s,h=(f=new l(f)).s;if(!f.c[0])throw Error(D);return(s.s=f.s=1,r=1==f.cmp(s),s.s=m,f.s=h,r)?new l(s):(m=l.DP,h=l.RM,l.DP=l.RM=0,s=s.div(f),l.DP=m,l.RM=h,this.minus(s.times(f)))},M.plus=M.add=function(f){var r,s=this.constructor,l=this.s,m=(f=new s(f)).s;if(l!=m)return f.s=-m,this.minus(f);var h=this.e,E=this.c,I=f.e,w=f.c;if(!E[0]||!w[0])return w[0]?f:new s(E[0]?this:0*l);if(E=E.slice(),l=h-I){for(l>0?(I=h,r=w):(l=-l,r=E),r.reverse();l--;)r.push(0);r.reverse()}for(E.length-w.length<0&&(r=w,w=E,E=r),l=w.length,m=0;l;E[l]%=10)m=(E[--l]=E[l]+w[l]+m)/10|0;for(m&&(E.unshift(m),++I),l=E.length;0===E[--l];)E.pop();return f.c=E,f.e=I,f},M.pow=function(f){var r=this,s=new r.constructor(1),l=s,m=f<0;if(f!==~~f||f<-1e6||f>1e6)throw Error(I+"exponent");for(m&&(f=-f);1&f&&(l=l.times(r)),f>>=1;)r=r.times(r);return m?s.div(l):l},M.round=function(f,r){var s=this.constructor;if(f===L)f=0;else if(f!==~~f||f<-1e6||f>1e6)throw Error(w);return round(new s(this),f,r===L?s.RM:r)},M.sqrt=function(){var f,r,s,l=this.constructor,m=this.s,h=this.e,I=new l(.5);if(!this.c[0])return new l(this);if(m<0)throw Error(E+"No square root");0===(m=Math.sqrt(this+""))||m===1/0?((r=this.c.join("")).length+h&1||(r+="0"),m=Math.sqrt(r),h=((h+1)/2|0)-(h<0||1&h),f=new l((m==1/0?"1e":(m=m.toExponential()).slice(0,m.indexOf("e")+1))+h)):f=new l(m),h=f.e+(l.DP+=4);do s=f,f=I.times(s.plus(this.div(s)));while(s.c.slice(0,h).join("")!==f.c.slice(0,h).join(""));return round(f,l.DP-=4,l.RM)},M.times=M.mul=function(f){var r,s=this.constructor,l=this.c,m=(f=new s(f)).c,h=l.length,E=m.length,I=this.e,w=f.e;if(f.s=this.s==f.s?1:-1,!l[0]||!m[0])return new s(0*f.s);for(f.e=I+w,h<E&&(r=l,l=m,m=r,w=h,h=E,E=w),r=Array(w=h+E);w--;)r[w]=0;for(I=E;I--;){for(E=0,w=h+I;w>I;)E=r[w]+m[I]*l[w-I-1]+E,r[w--]=E%10,E=E/10|0;r[w]=(r[w]+E)%10}
1for(E?++f.e:r.shift(),I=r.length;!r[--I];)r.pop();return f.c=r,f},M.toExponential=function(f){return stringify(this,1,f,f)},M.toFixed=function(f){return stringify(this,2,f,this.e+f)},M.toPrecision=function(f){return stringify(this,3,f,f-1)},M.toString=function(){return stringify(this)},M.valueOf=M.toJSON=function(){return stringify(this,4)},(h=function _Big_(){function Big(f){if(!(this instanceof Big))return f===L?_Big_():new Big(f);f instanceof Big?(this.s=f.s,this.e=f.e,this.c=f.c.slice()):function(f,r){var s,l,m;if(0===r&&1/r<0)r="-0";else if(!W.test(r+=""))throw Error(I+"number");for(f.s="-"==r.charAt(0)?(r=r.slice(1),-1):1,(s=r.indexOf("."))>-1&&(r=r.replace(".","")),(l=r.search(/e/i))>0?(s<0&&(s=l),s+=+r.slice(l+1),r=r.substring(0,l)):s<0&&(s=r.length),m=r.length,l=0;l<m&&"0"==r.charAt(l);)++l;if(l==m)f.c=[f.e=0];else{for(;m>0&&"0"==r.charAt(--m););for(f.e=s-l-1,f.c=[],s=0;l<=m;)f.c[s++]=+r.charAt(l++)}return f}(this,f),this.constructor=Big}return Big.prototype=M,Big.DP=20,Big.RM=1,Big.NE=-7,Big.PE=21,Big.version="5.2.2",Big}()).default=h.Big=h,void 0!==(l=(function(){return h}).call(r,s,r,f))&&(f.exports=l)}(0)},19612:function(f,r,s){"use strict";function e(f){return f&&"object"==typeof f&&"default"in f?f.default:f}var l,m,h,E,I,w=e(s(31621)),B=e(s(22367)),D=s(22002),M=s(66710),L=s(11938),W=s(91440),V=s(62849),G=s(92791),Z=s(22630),X=s(45853);function A(f,r){(null==r||r>f.length)&&(r=f.length);for(var s=0,l=Array(r);s<r;s++)l[s]=f[s];return l}function T(f,r){var s="undefined"!=typeof Symbol&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=function(f,r){if(f){if("string"==typeof f)return A(f,r);var s=({}).toString.call(f).slice(8,-1);return"Object"===s&&f.constructor&&(s=f.constructor.name),"Map"===s||"Set"===s?Array.from(f):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?A(f,r):void 0}}(f))||r&&f&&"number"==typeof f.length){s&&(f=s);var l=0;return function(){return l>=f.length?{done:!0}:{done:!1,value:f[l++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}s(28518),s(87336),(h=r.wI||(r.wI={}))[h.V3_SWAP_EXACT_IN=0]="V3_SWAP_EXACT_IN",h[h.V3_SWAP_EXACT_OUT=1]="V3_SWAP_EXACT_OUT",h[h.PERMIT2_TRANSFER_FROM=2]="PERMIT2_TRANSFER_FROM",h[h.PERMIT2_PERMIT_BATCH=3]="PERMIT2_PERMIT_BATCH",h[h.SWEEP=4]="SWEEP",h[h.TRANSFER=5]="TRANSFER",h[h.PAY_PORTION=6]="PAY_PORTION",h[h.V2_SWAP_EXACT_IN=8]="V2_SWAP_EXACT_IN",h[h.V2_SWAP_EXACT_OUT=9]="V2_SWAP_EXACT_OUT",h[h.PERMIT2_PERMIT=10]="PERMIT2_PERMIT",h[h.WRAP_ETH=11]="WRAP_ETH",h[h.UNWRAP_WETH=12]="UNWRAP_WETH",h[h.PERMIT2_TRANSFER_FROM_BATCH=13]="PERMIT2_TRANSFER_FROM_BATCH",h[h.BALANCE_CHECK_ERC20=14]="BALANCE_CHECK_ERC20",h[h.V4_SWAP=16]="V4_SWAP",h[h.V3_POSITION_MANAGER_PERMIT=17]="V3_POSITION_MANAGER_PERMIT",h[h.V3_POSITION_MANAGER_CALL=18]="V3_POSITION_MANAGER_CALL",h[h.V4_INITIALIZE_POOL=19]="V4_INITIALIZE_POOL",h[h.V4_POSITION_MANAGER_CALL=20]="V4_POSITION_MANAGER_CALL",h[h.EXECUTE_SUB_PLAN=33]="EXECUTE_SUB_PLAN",(E=r.CA||(r.CA={}))[E.V3PathExactIn=0]="V3PathExactIn",E[E.V3PathExactOut=1]="V3PathExactOut",(I=r._b||(r._b={}))[I.Abi=0]="Abi",I[I.V4Actions=1]="V4Actions",I[I.V3Actions=2]="V3Actions";var K,$,ee,et,ef,en,er,ea,ei,eo,es,eu,ec,ed,ep,el,eb,em,ey,eA,eh,eE,eg,ev,eT,e_,eC,ex=new Set([r.wI.EXECUTE_SUB_PLAN]),eI=((m={})[r.wI.EXECUTE_SUB_PLAN]={parser:r._b.Abi,params:[{name:"commands",type:"bytes"},{name:"inputs",type:"bytes[]"}]},m[r.wI.PERMIT2_PERMIT]={parser:r._b.Abi,params:[{name:"permit",type:"((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)"},{name:"signature",type:"bytes"}]},m[r.wI.PERMIT2_PERMIT_BATCH]={parser:r._b.Abi,params:[{name:"permit",type:"((address token,uint160 amount,uint48 expiration,uint48 nonce)[] details,address spender,uint256 sigDeadline)"},{name:"signature",type:"bytes"}]},m[r.wI.PERMIT2_TRANSFER_FROM]={parser:r._b.Abi,params:[{name:"token",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint160"}]},m[r.wI.PERMIT2_TRANSFER_FROM_BATCH]={parser:r._b.Abi,params:[{name:"transferFrom",type:"(address from,address to,uint160 amount,address token)[]"}]},m[r.wI.V3_SWAP_EXACT_IN]={parser:r._b.Abi,params:[{name:"recipient",type:"address"},{name:"amountIn",type:"uint256"},{name:"amountOutMin",type:"uint256"},{name:"path",subparser:r.CA.V3PathExactIn,type:"bytes"},{name:"payerIsUser",type:"bool"}]},m[r.wI.V3_SWAP_EXACT_OUT]={parser:r._b.Abi,params:[{name:"recipient",type:"address"},{name:"amountOut",type:"uint256"},{name:"amountInMax",type:"uint256"},{name:"path",subparser:r.CA.V3PathExactOut,type:"bytes"},{name:"payerIsUser",type:"bool"}]},m[r.wI.V2_SWAP_EXACT_IN]={parser:r._b.Abi,params:[{name:"recipient",type:"address"},{name:"amountIn",type:"uint256"},{name:"amountOutMin",type:"uint256"},{name:"path",type:"address[]"},{name:"payerIsUser",type:"bool"}]},m[r.wI.V2_SWAP_EXACT_OUT]={parser:r._b.Abi,params:[{name:"recipient",type:"address"},{name:"amountOut",type:"uint256"},{name:"amountInMax",type:"uint256"},{name:"path",type:"address[]"},{name:"payerIsUser",type:"bool"}]},m[r.wI.V4_SWAP]={parser:r._b.V4Actions},m[r.wI.WRAP_ETH]={parser:r._b.Abi,params:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}]},m[r.wI.UNWRAP_WETH]={parser:r._b.Abi,params:[{name:"recipient",type:"address"},{name:"amountMin",type:"uint256"}]},m[r.wI.SWEEP]={parser:r._b.Abi,params:[{name:"token",type:"address"},{name:"recipient",type:"address"},{name:"amountMin",type:"uint256"}]},m[r.wI.TRANSFER]={parser:r._b.Abi,params:[{name:"token",type:"address"},{name:"recipient",type:"address"},{name:"value",type:"uint256"}]},m[r.wI.PAY_PORTION]={parser:r._b.Abi,params:[{name:"token",type:"address"},{name:"recipient",type:"address"},{name:"bips",type:"uint256"}]},m[r.wI.BALANCE_CHECK_ERC20]={parser:r._b.Abi,params:[{name:"owner",type:"address"},{name:"token",type:"address"},{name:"minBalance",type:"uint256"}]},m[r.wI.V4_INITIALIZE_POOL]={parser:r._b.Abi,params:[{name:"poolKey",type:"(address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks)"},{name:"sqrtPriceX96",type:"uint160"}]},m[r.wI.V3_POSITION_MANAGER_PERMIT]={parser:r._b.V3Actions},m[r.wI.V3_POSITION_MANAGER_CALL]={parser:r._b.V3Actions},m[r.wI.V4_POSITION_MANAGER_CALL]={parser:r._b.V4Actions},m),ew=function(){function e(){this.commands="0x",this.inputs=[]}var f=e.prototype;return f.addSubPlan=function(f){return this.addCommand(r.wI.EXECUTE_SUB_PLAN,[f.commands,f.input
1s],!0),this},f.addCommand=function(f,s,l){void 0===l&&(l=!1);var m=function(f,s){var l=eI[f];switch(l.parser){case r._b.Abi:return{type:f,encodedInput:G.defaultAbiCoder.encode(l.params.map(function(f){return f.type}),s)};case r._b.V4Actions:case r._b.V3Actions:return{type:f,encodedInput:s[0]}}}(f,s);if(this.inputs.push(m.encodedInput),l){if(!ex.has(m.type))throw Error("command type: "+m.type+" cannot be allowed to revert");m.type=128|m.type}return this.commands=this.commands.concat(m.type.toString(16).padStart(2,"0")),this},e}();function Y(f,r){if(r.involvesToken(f))return f;if(r.involvesToken(f.wrapped))return f.wrapped;if(r instanceof W.Pool&&r.token0.wrapped.equals(f))return r.token0;if(r instanceof W.Pool&&r.token1.wrapped.equals(f))return r.token1;throw Error("Expected currency "+f.symbol+" to be either "+r.token0.symbol+" or "+r.token1.symbol)}(K=r.di||(r.di={})).UniswapTrade="UniswapTrade",K.UnwrapWETH="UnwrapWETH",(eC=r.wl||(r.wl={})).V1_2="1.2",eC.V2_0="2.0";var eP=((e_={})[1]={weth:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",routerConfigs:(($={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:17143817},$[r.wl.V2_0]={address:"0x66a9893cc07d91d95644aedd05d03f95e1dba8af",creationBlock:1737658355},$)},e_[5]={weth:"0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6",routerConfigs:((ee={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:8940568},ee[r.wl.V2_0]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:8940568},ee)},e_[11155111]={weth:"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",routerConfigs:((et={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:3543575},et[r.wl.V2_0]={address:"0x3a9d48ab9751398bbfa63ad67599bb04e4bdf98b",creationBlock:7259601},et)},e_[137]={weth:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",routerConfigs:((ef={})[r.wl.V1_2]={address:"0xec7BE89e9d109e7e3Fec59c222CF297125FEFda2",creationBlock:52210153},ef[r.wl.V2_0]={address:"0x1095692a6237d83c6a72f3f5efedb9a670c49223",creationBlock:1737492197},ef)},e_[80001]={weth:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",routerConfigs:((en={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:35176052},en[r.wl.V2_0]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:35176052},en)},e_[10]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((er={})[r.wl.V1_2]={address:"0xCb1355ff08Ab38bBCE60111F1bb2B784bE25D7e8",creationBlock:114702266},er[r.wl.V2_0]={address:"0x851116d9223fabed8e56c0e6b8ad0c31d98b3507",creationBlock:1737494278},er)},e_[420]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((ea={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:8887728},ea[r.wl.V2_0]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:8887728},ea)},e_[42161]={weth:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",routerConfigs:((ei={})[r.wl.V1_2]={address:"0x5E325eDA8064b456f4781070C0738d849c824258",creationBlock:169472836},ei[r.wl.V2_0]={address:"0xa51afafe0263b40edaef0df8781ea9aa03e381a3",creationBlock:1737487458},ei)},e_[421613]={weth:"0xe39Ab88f8A4777030A534146A9Ca3B52bd5D43A3",routerConfigs:((eo={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:18815277},eo[r.wl.V2_0]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:18815277},eo)},e_[42220]={weth:"0x0000000000000000000000000000000000000000",routerConfigs:((es={})[r.wl.V1_2]={address:"0x643770e279d5d0733f21d6dc03a8efbabf3255b4",creationBlock:21407637},es[r.wl.V2_0]={address:"0x643770e279d5d0733f21d6dc03a8efbabf3255b4",creationBlock:21407637},es)},e_[44787]={weth:"0x0000000000000000000000000000000000000000",routerConfigs:((eu={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:17566658},eu[r.wl.V2_0]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:17566658},eu)},e_[56]={weth:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",routerConfigs:((ec={})[r.wl.V1_2]={address:"0x4Dae2f939ACf50408e13d58534Ff8c2776d45265",creationBlock:35160263},ec[r.wl.V2_0]={address:"0x1906c1d672b88cd1b9ac7593301ca990f94eae07",creationBlock:1737493275},ec)},e_[43114]={weth:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",routerConfigs:((ed={})[r.wl.V1_2]={address:"0x4Dae2f939ACf50408e13d58534Ff8c2776d45265",creationBlock:40237257},ed[r.wl.V2_0]={address:"0x94b75331ae8d42c1b61065089b7d48fe14aa73b7",creationBlock:1737558236},ed)},e_[84531]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((ep={})[r.wl.V1_2]={address:"0xd0872d928672ae2ff74bdb2f5130ac12229cafaf",creationBlock:6915289},ep[r.wl.V2_0]={address:"0xd0872d928672ae2ff74bdb2f5130ac12229cafaf",creationBlock:6915289},ep)},e_[8453]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((el={})[r.wl.V1_2]={address:"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",creationBlock:9107268},el[r.wl.V2_0]={address:"0x6ff5693b99212da76ad316178a184ab56d299b43",creationBlock:1737491485},el)},e_[81457]={weth:"0x4300000000000000000000000000000000000004",routerConfigs:((eb={})[r.wl.V1_2]={address:"0x643770E279d5D0733F21d6DC03A8efbABf3255B4",creationBlock:1116444},eb[r.wl.V2_0]={address:"0xeabbcb3e8e415306207ef514f660a3f820025be3",creationBlock:1737564586},eb)},e_[7777777]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((em={})[r.wl.V1_2]={address:"0x2986d9721A49838ab4297b695858aF7F17f38014",creationBlock:11832155},em[r.wl.V2_0]={address:"0x3315ef7ca28db74abadc6c44570efdf06b04b020",creationBlock:1737562927},em)},e_[324]={weth:"0x5aea5775959fbc2557cc8789bc1bf90a239d9a91",routerConfigs:((ey={}
1)[r.wl.V1_2]={address:"0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06",creationBlock:12640979},ey[r.wl.V2_0]={address:"0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06",creationBlock:12640979},ey)},e_[480]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((eA={})[r.wl.V1_2]={address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",creationBlock:4063979},eA[r.wl.V2_0]={address:"0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743",creationBlock:1737559557},eA)},e_[1301]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((eh={})[r.wl.V1_2]={address:"0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",creationBlock:1241811},eh[r.wl.V2_0]={address:"0xf70536b3bcc1bd1a972dc186a2cf84cc6da6be5d",creationBlock:7100543},eh)},e_[130]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((eE={})[r.wl.V1_2]={address:"0x4D73A4411CA1c660035e4AECC8270E5DdDEC8C17",creationBlock:23678},eE[r.wl.V2_0]={address:"0xef740bf23acae26f6492b10de645d6b98dc8eaf3",creationBlock:1737568156},eE)},e_[10143]={weth:"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",routerConfigs:((eg={})[r.wl.V1_2]={address:"0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893",creationBlock:23678},eg[r.wl.V2_0]={address:"0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893",creationBlock:23678},eg)},e_[84532]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((ev={})[r.wl.V1_2]={address:"0x492e6456d9528771018deb9e87ef7750ef184104",creationBlock:20216585},ev[r.wl.V2_0]={address:"0x492e6456d9528771018deb9e87ef7750ef184104",creationBlock:20216585},ev)},e_[1868]={weth:"0x4200000000000000000000000000000000000006",routerConfigs:((eT={})[r.wl.V1_2]={address:"0x0e2850543f69f678257266e0907ff9a58b3f13de",creationBlock:3254782},eT[r.wl.V2_0]={address:"0x0e2850543f69f678257266e0907ff9a58b3f13de",creationBlock:3254782},eT)},e_),z=function(f,r){if(!(r in eP))throw Error("Universal Router not deployed on chain "+r);return eP[r].routerConfigs[f].address},Q=function(f){if(!(f in eP))throw Error("Universal Router not deployed on chain "+f);if("0x0000000000000000000000000000000000000000"==eP[f].weth)throw Error("Chain "+f+" does not have WETH");return eP[f].weth},eB=M.BigNumber.from(2).pow(255),eF="0x0000000000000000000000000000000000000000",eD="0x0000000000000000000000000000000000000001",eO="0x0000000000000000000000000000000000000002";function re(f){return f.isNative?eF:f.wrapped.address}var ek=new V.Percent(50,100),eS=function(){var f;function e(f,s){if(this.trade=f,this.options=s,this.tradeType=r.di.UniswapTrade,s.fee&&s.flatFee)throw Error("Only one fee option permitted");this.payerIsUser=!(this.inputRequiresWrap||this.inputRequiresUnwrap||this.options.useRouterBalance)}return e.prototype.encode=function(f,s){this.inputRequiresWrap?f.addCommand(r.wI.WRAP_ETH,[eO,this.trade.maximumAmountIn(this.options.slippageTolerance).quotient.toString()]):this.inputRequiresUnwrap&&(f.addCommand(r.wI.PERMIT2_TRANSFER_FROM,[this.trade.inputAmount.currency.address,eO,this.trade.maximumAmountIn(this.options.slippageTolerance).quotient.toString()]),f.addCommand(r.wI.UNWRAP_WETH,[eO,0])),this.options.recipient=null!=(l=this.options.recipient)?l:eD;for(var l,m,h,E=this.trade.tradeType===V.TradeType.EXACT_INPUT&&this.trade.routes.length>2||this.outputRequiresTransition||!!(m=this.options).fee||!!m.flatFee,I=T(this.trade.swaps);!(h=I()).done;){var w=h.value;switch(w.route.protocol){case X.Protocol.V2:ae(f,w,this.trade.tradeType,this.options,this.payerIsUser,E);break;case X.Protocol.V3:ie(f,w,this.trade.tradeType,this.options,this.payerIsUser,E);break;case X.Protocol.V4:se(f,w,this.trade.tradeType,this.options,this.payerIsUser,E);break;case X.Protocol.MIXED:(function(f,s,l,m,h,E){var I,w=s.route,B=s.inputAmount,D=s.outputAmount,M=E?eO:null!=(I=m.recipient)?I:eD;if(1===w.pools.length){if(w.pools[0]instanceof W.Pool)return se(f,s,l,m,h,E);if(w.pools[0]instanceof L.Pool)return ie(f,s,l,m,h,E);if(w.pools[0]instanceof Z.Pair)return ae(f,s,l,m,h,E);throw Error("Invalid route type")}for(var V=X.MixedRouteTrade.createUncheckedTrade({route:w,inputAmount:B,outputAmount:D,tradeType:l}),G=V.maximumAmountIn(m.slippageTolerance,B).quotient.toString(),K=E?0:V.minimumAmountOut(m.slippageTolerance,D).quotient.toString(),$=X.partitionMixedRouteByProtocol(w),y=function(f){return f===$.length-1},ee=w.pathInput,et=0;et<$.length;et++){var ef=$[et],en=ef[0],er=X.getOutputOfPools(ef,ee),ea=new X.MixedRoute(new X.MixedRouteSDK([].concat(ef),ee,er)),ei=void 0,eo=void 0;if(y(et))ei=er,eo=M;else{var es=$[et+1][0];ei=Y(er,es),eo=es instanceof Z.Pair&&er.equals(ei)?es.liquidityToken.address:eO}if(en instanceof W.Pool){var eu=new W.V4Planner,ec=new W.Route(ef,ea.input,ea.output);eu.addSettle(ee,h&&0===et,0==et?G:eB),eu.addAction(W.Actions.SWAP_EXACT_IN,[{currencyIn:ee.isNative?eF:ee.address,path:W.encodeRouteToPath(ec),amountIn:0,amountOutMinimum:y(et)?K:0}]),eu.addTake(er,eo),f.addCommand(r.wI.V4_SWAP,[eu.finalize()])}else if(en instanceof L.Pool)f.addCommand(r.wI.V3_SWAP_EXACT_IN,[eo,0==et?G:eB,y(et)?K:0,X.encodeMixedRouteToPath(ea),h&&0===et]);else{if(!(en instanceof Z.Pair))throw Error("Unexpected Pool Type");f.addCommand(r.wI.V2_SWAP_EXACT_IN,[eo,0===et?G:eB,y(et)?K:0,ea.path.map(function(f){return f.wrapped.address}),h&&0===et])}y(et)||(er.isNative&&!ei.isNative?f.addCommand(r.wI.WRAP_ETH,[eO,eB]):!er.isNative&&ei.isNative&&f.addCommand(r.wI.UNWRAP_WETH,[eO,0])),ee=ei}})(f,w,this.trade.tradeType,this.options,this.payerIsUser,E);break;default:throw Error("UNSUPPORTED_TRADE_PROTOCOL")}}var B=M.BigNumber.from(this.trade.minimumAmountOut(this.options.slippageTolerance).quotient.toString());if(E){var D=this.trade.swaps[0].route.pools,G=re(Y(this.trade.outputAmount.currency,D[D.length-1]));if(this.options.fee){var K=L.toHex(this.options.fee.fee.multiply(1e4).quotient);f.addCommand(r.wI.PAY_PORTION,[G,this.options.fee.recipient,K]),this.trade.tradeType===V.TradeType.EXACT_OUTPUT&&(B=B.sub(B.mul(K).div(1e4)))}if(this.options.flatFee){var $=this.options.flatFee.amount;if(B.lt($))throw Error("Flat fee amount greater than minimumAmountOut");f.addCommand(r.wI.TRANSFER,[G,this.options.flatFee.recipient,$]),this.trade.tradeType===V.TradeType.EXACT_OUTPUT&&(B=B.sub($))}this.outputRequiresUnwrap?f.addCommand(r.wI.UNWRAP_WETH,[this.options.recipient,B]):this.outputRequiresWrap?f.addCommand(r.wI.WRAP_ETH,[this.options.recipient,eB]):f.addCommand(r.wI.SWEEP,[re(this.trade.outputAmount.currency),this.options.recipient,B])}(this.trade.tradeType===V.TradeType.EXACT_OUTPUT||this.trade.priceImpact.greaterThan(ek))&&(this.inputRequiresWrap?f.addCommand(r.wI.UNWRAP_WETH,[this.options.recipient,0]):this.inputRequiresUnwrap?f.addCommand(r.wI.WRAP_ETH,[this.options.recipient,eB]):this.trade.inputAmount.currency.isNative&&f.addCommand(r.wI.SWEEP,[eF,this.options.recipient,0])),this.options.safeMode&&f.addCommand(r.wI.SWEEP,[eF,this.options.recipient,0])},f=[{key:"isAllV4",get:function(){for(var f,r=!0,s=T(this.trade.swaps);!(f=s()).done;)r=r&&f.value.route.protocol==X.Protocol.V4;return r}},{key:"inputRequiresWrap",get:function(){return this.trade.swaps[0].route.pools[0]instanceof W.Pool?this.trade.inputAmount.currency.isNative&&!this.trade.swaps[0].route.pathInput.isNative:this.trade.inputAmount.currency.isNative}},{key:"inputRequiresUnwrap",get:function(){return this.trade.swaps[0].route.pools[0]instanceof W.Pool&&!this.trade.inputAmount.currency.isNative&&this.trade.swaps[0].route.pathInput.isNative}},{key:"outputRequiresWrap",get:function(){var f=this.trade.swaps[0].route;return f.pools[f.pools.length-1]instanceof W.Pool&&!this.trade.outputAmount.currency.isNative&&f.pathOutput.isNative}},{key:"outputRequiresUnwrap",get:function(){var f=this.trade.swaps[0].route;return f.pools[f.pools.length-1]instanceof W.Pool?this.trade.outputAmount.currency.isNative&&!this.trade.swaps[0].route.pathOutput.isNative:this.trade.outputAmount.currency.isNative}},{key:"outputRequiresTransition",get:function(){return this.outputRequiresWrap||this.outputRequiresUnwrap}}],function(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,"string");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(f);return"symbol"==typeof r?r:r+""}(l.key),l)}}(e.prototype,f),Object.defineProperty(e,"prototype",{writable:!1}),e}();function ae(f,s,l,m,h,E){var I=s.route,w=new Z.Trade(I,l==V.TradeType.EXACT_INPUT?s.inputAmount:s.outputAmount,l);l==V.TradeType.EXACT_INPUT?f.addCommand(r.wI.V2_SWAP_EXACT_IN,[E?eO:m.recipient,w.maximumAmountIn(m.slippageTolerance).quotient.toString(),E?0:w.minimumAmountOut(m.slippageTolerance).quotient.toString(),I.path.map(function(f){return f.wrapped.address}),h]):l==V.TradeType.EXACT_OUTPUT&&f.addCommand(r.wI.V2_SWAP_EXACT_OUT,[E?eO:m.recipient,w.minimumAmountOut(m.slippageTolerance).quotient.toString(),w.maximumAmountIn(m.slippageTolerance).quotient.toString(),I.path.map(function(f){return f.wrapped.address}),h])}function ie(f,s,l,m,h,E){var I=s.route,w=L.Trade.createUncheckedTrade({route:I,inputAmount:s.inputAmount,outputAmount:s.outputAmount,tradeType:l}),B=L.encodeRouteToPath(I,w.tradeType===V.TradeType.EXACT_OUTPUT);l==V.TradeType.EXACT_INPUT?f.addCommand(r.wI.V3_SWAP_EXACT_IN,[E?eO:m.recipient,w.maximumAmountIn(m.slippageTolerance).quotient.toString(),E?0:w.minimumAmountOut(m.slippageTolerance).quotient.toString(),B,h]):l==V.TradeType.EXACT_OUTPUT&&f.addCommand(r.wI.V3_SWAP_EXACT_OUT,[E?eO:m.recipient,w.minimumAmountOut(m.slippageTolerance).quotient.toString(),w.maximumAmountIn(m.slippageTolerance).quotient.toString(),B,h])}function se(f,s,l,m,h,E){var I,w=s.inputAmount,B=s.outputAmount,D=s.route.pools.map(function(f){return f}),M=new W.Route(D,w.currency,B.currency),L=W.Trade.createUncheckedTrade({route:M,inputAmount:w,outputAmount:B,tradeType:l}),G=E&&l==V.TradeType.EXACT_INPUT?void 0:m.slippageTolerance,Z=new W.V4Planner;Z.addTrade(L,G),Z.addSettle(L.route.pathInput,h),Z.addTake(L.route.pathOutput,E?eO:null!=(I=m.recipient)?I:eD),f.addCommand(r.wI.V4_SWAP,[Z.finalize()])}function pe(f,s){var l=s.signature,m=M.ethers.utils.arrayify(s.signature).length;65!==m&&64!==m||(l=M.ethers.utils.joinSignature(M.ethers.utils.splitSignature(s.signature))),f.addCommand(r.wI.PERMIT2_PERMIT,[s,l])}(function(){function e(){}return e.swapCallParameters=function(f,r){var s=new ew,l=new eS(f,r),m=l.trade.inputAmount.currency;m.isNative&&r.inputTokenPermit&&w(!1),r.inputTokenPermit&&pe(s,r.inputTokenPermit);var h=M.BigNumber.from(m.isNative?l.trade.maximumAmountIn(r.slippageTolerance).quotient.toString():0);return l.encode(s,{allowRevert:!1}),e.encodePlan(s,h,{deadline:r.deadlineOrPreviousBlockhash?M.BigNumber.from(r.deadlineOrPreviousBlockhash):void 0})},e.migrateV3ToV4CallParameters=function(f,s){var l=f.outputPosition.pool,m=f.inputPosition.pool.token0,h=f.inputPosition.pool.token1,E=null!=s?s:V.CHAIN_TO_ADDRESSES_MAP[l.chainId].v4PositionManagerAddress;l.currency0.isNative?l.currency0.wrapped.equals(m)&&l.currency1.equals(h)||l.currency0.wrapped.equals(h)&&l.currency1.equals(m)||w(!1):(m!==l.token0&&w(!1),h!==l.token1&&w(!1)),f.v3RemoveLiquidityOptions.liquidityPercentage.equalTo(new V.Percent(100,100))||w(!1),1!=f.v3RemoveLiquidityOptions.burnToken&&w(!1),f.v3RemoveLiquidityOptions.collectOptions.recipient!==E&&w(!1),Object.keys(f.v4AddLiquidityOptions).some(function(f){return"recipient"===f})||w(!1),f.v4AddLiquidityOptions.migrate||w(!1);var I=new ew;if(f.v4AddLiquidityOptions.createPool){var B=W.Pool.getPoolKey(l.currency0,l.currency1,l.fee,l.tickSpacing,l.hooks);I.addCommand(r.wI.V4_INITIALIZE_POOL,[B,l.sqrtRatioX96.toString()]),delete f.v4AddLiquidityOptions.createPool}f.v3RemoveLiquidityOptions.permit&&(z(r.wl.V2_0,f.inputPosition.pool.chainId)!=f.v3RemoveLiquidityOptions.permit.spender&&w(!1),function(f,s,l){var m=L.NonfungiblePositionManager.INTERFACE.encodeFunctionData("permit",[V.validateAndParseAddress(s.spender),l,s.deadline,s.v,s.r,s.s]);f.addCommand(r.wI.V3_POSITION_MANAGER_PERMIT,[m])}(I,f.v3RemoveLiquidityOptions.permit,f.v3RemoveLiquidityOptions.tokenId),delete f.v3RemoveLiquidityOptions.permit);for(var D,G=L.NonfungiblePositionManager.removeCallParameters(f.inputPosition,f.v3RemoveLiquidityOptions),Z=T(L.Multicall.decodeMulticall(G.calldata));!(D=Z()).done;){var X=D.value,K=X.slice(0,10);K!=L.NonfungiblePositionManager.INTERFACE.getSighash("collect")&&K!=L.NonfungiblePositionManager.INTERFACE.getSighash("decreaseLiquidity")&&K!=L.NonfungiblePositionManager.INTERFACE.getSighash("burn")&&w(!1),I.addCommand(r.wI.V3_POSITION_MANAGER_CALL,[X])}var $=W.V4PositionManager.addCallParameters(f.outputPosition,f.v4AddLiquidityOptions);return $.calldata.slice(0,10)!=W.V4PositionManager.INTERFACE.getSighash("modifyLiquidities")&&w(!1),I.addCommand(r.wI.V4_POSITION_MANAGER_CALL,[$.calldata]),e.encodePlan(I,M.BigNumber.from(0),{deadline:M.BigNumber.from(f.v4AddLiquidityOptions.deadline)})},e.encodePlan=function(f,r,s){void 0===s&&(s={});var l=f.commands,m=f.inputs;return{calldata:e.INTERFACE.encodeFunctionData(s.deadline?"execute(bytes,b
1ytes[],uint256)":"execute(bytes,bytes[])",s.deadline?[l,m,s.deadline]:[l,m]),value:r.toHexString()}},e})().INTERFACE=new D.Interface(B.abi),(function(f,s,l){this.tradeType=r.di.UnwrapWETH,this.wethAddress=Q(s),this.amount=f,l&&(l.details.token.toLowerCase()!==this.wethAddress.toLowerCase()&&w(!1),l.details.amount>=f||w(!1),this.permit2Data=l)}).prototype.encode=function(f,s){var l;(l={permit2Permit:this.permit2Data,permit2TransferFrom:{token:this.wethAddress,amount:this.amount.toString()}}).permit2TransferFrom&&l.permit2Permit&&l.permit2TransferFrom.token!==l.permit2Permit.details.token&&w(!1),l.permit2Permit&&pe(f,l.permit2Permit),l.permit2TransferFrom&&f.addCommand(r.wI.PERMIT2_TRANSFER_FROM,[l.permit2TransferFrom.token,l.permit2TransferFrom.recipient?l.permit2TransferFrom.recipient:eO,l.permit2TransferFrom.amount]),f.addCommand(r.wI.UNWRAP_WETH,[eO,this.amount])},(l=r.W4||(r.W4={})).V2Pool="v2-pool",l.V3Pool="v3-pool",l.V4Pool="v4-pool";var le=function(f){return f.toLowerCase()===eF.toLowerCase()||"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"===f.toLowerCase()},eM=function(){function e(){}return e.fromClassicQuote=function(f){var s=f.route,l=f.tokenIn,m=f.tokenOut;if(!s)throw Error("Expected route to be present");if(!s.length)throw Error("Expected there to be at least one route");if(s.some(function(f){return!f.length}))throw Error("Expected all routes to have at least one pool");var h=s[0],E=h[0].tokenIn,I=h[h.length-1].tokenOut;if(!E||!I)throw Error("Expected both tokenIn and tokenOut to be present");if(E.chainId!==I.chainId)throw Error("Expected tokenIn and tokenOut to be have same chainId");var w=e.toCurrency(le(l),E),B=e.toCurrency(le(m),I),D=s.map(function(f){var s=f[0].amountIn,l=f[f.length-1].amountOut;if(!s||!l)throw Error("Expected both raw amountIn and raw amountOut to be present");var m=V.CurrencyAmount.fromRawAmount(w,s),h=V.CurrencyAmount.fromRawAmount(B,l),E=e.isVersionedRoute(r.W4.V2Pool,f),I=e.isVersionedRoute(r.W4.V3Pool,f),D=e.isVersionedRoute(r.W4.V4Pool,f);return{routev4:D?new W.Route(f.map(e.toV4Pool),w,B):null,routev3:I?new L.Route(f.map(e.toV3Pool),w,B):null,routev2:E?new Z.Route(f.map(e.toPair),w,B):null,mixedRoute:D||I||E?null:new X.MixedRouteSDK(f.map(e.toPoolOrPair),w,B),inputAmount:m,outputAmount:h}});return new X.Trade({v2Routes:D.filter(function(f){return f.routev2}).map(function(f){return{routev2:f.routev2,inputAmount:f.inputAmount,outputAmount:f.outputAmount}}),v3Routes:D.filter(function(f){return f.routev3}).map(function(f){return{routev3:f.routev3,inputAmount:f.inputAmount,outputAmount:f.outputAmount}}),v4Routes:D.filter(function(f){return f.routev4}).map(function(f){return{routev4:f.routev4,inputAmount:f.inputAmount,outputAmount:f.outputAmount}}),mixedRoutes:D.filter(function(f){return f.mixedRoute}).map(function(f){return{mixedRoute:f.mixedRoute,inputAmount:f.inputAmount,outputAmount:f.outputAmount}}),tradeType:f.tradeType})},e.toCurrency=function(f,r){return f?V.Ether.onChain(r.chainId):this.toToken(r)},e.toToken=function(f){var r=f.symbol,s=f.buyFeeBps,l=f.sellFeeBps;return new V.Token(f.chainId,f.address,parseInt(f.decimals.toString()),r,void 0,!1,s?M.BigNumber.from(s):void 0,l?M.BigNumber.from(l):void 0)},e.toV3Pool=function(f){var r=f.fee,s=f.sqrtRatioX96,l=f.liquidity,m=f.tickCurrent,h=f.tokenOut;return new L.Pool(e.toToken(f.tokenIn),e.toToken(h),parseInt(r),s,l,parseInt(m))},e.toV4Pool=function(f){var r=e.toCurrency(le(f.tokenIn.address),f.tokenIn),s=e.toCurrency(le(f.tokenOut.address),f.tokenOut);return new W.Pool(r,s,parseInt(f.fee),parseInt(f.tickSpacing),f.hooks,f.sqrtRatioX96,f.liquidity,parseInt(f.tickCurrent))},e.isVersionedRoute=function(f,r){return r.every(function(r){return r.type===f})},e}();eM.toPoolOrPair=function(f){switch(f.type){case r.W4.V4Pool:return eM.toV4Pool(f);case r.W4.V3Pool:return eM.toV3Pool(f);case r.W4.V2Pool:return eM.toPair(f);default:throw Error("Invalid pool type")}},eM.toPair=function(f){var r=f.reserve0,s=f.reserve1;return new Z.Pair(V.CurrencyAmount.fromRawAmount(eM.toToken(r.token),r.quotient),V.CurrencyAmount.fromRawAmount(eM.toToken(s.token),s.quotient))},function(){function e(){}return e.parseCalldata=function(f){var r=new eR(eI),s=e.INTERFACE.parseTransaction({data:f}).args;return r.parse(s.commands,s.inputs)},e}().INTERFACE=new D.Interface(B.abi);var eR=function(){function e(f){this.commandDefinition=f}return e.prototype.parse=function(f,s){var l=this;return{commands:e.getCommands(f).map(function(f,m){var h=l.commandDefinition[f];
1if(h.parser===r._b.V4Actions){var E=W.V4BaseActionsParser.parseCalldata(s[m]);return{commandName:r.wI[f],commandType:f,params:E.actions.map(function(f){return{name:f.actionName,value:f.params.map(function(f){return{name:f.name,value:f.value}})}})}}if(h.parser===r._b.Abi){var I=h.params,w=M.ethers.utils.defaultAbiCoder.decode(I.map(function(f){return f.type}),s[m]).map(function(f,s){switch(I[s].subparser){case r.CA.V3PathExactIn:return{name:I[s].name,value:function(f){for(var r=f.replace("0x",""),s=M.ethers.utils.getAddress(r.substring(0,40)),l=40,m=[];l<r.length;){var h=r.substring(l,l+46),E=parseInt(h.substring(0,6),16),I=M.ethers.utils.getAddress(h.substring(6,46));m.push({tokenIn:s,tokenOut:I,fee:E}),s=I,l+=46}return m}(f)};case r.CA.V3PathExactOut:return{name:I[s].name,value:function(f){for(var r=f.replace("0x",""),s=M.ethers.utils.getAddress(r.substring(r.length-40)),l=r.length-86,m=[];l>=0;){var h=r.substring(l,l+46),E=M.ethers.utils.getAddress(h.substring(0,40)),I=parseInt(h.substring(40,46),16);m.push({tokenIn:s,tokenOut:E,fee:I}),s=E,l-=46}return m}(f)};default:return{name:I[s].name,value:f}}});return{commandName:r.wI[f],commandType:f,params:w}}if(h.parser===r._b.V3Actions)return{commandName:r.wI[f],commandType:f,params:s.map(function(f){return{name:"command",value:f}})};throw Error("Unsupported parser: "+h)})}},e.getCommands=function(f){for(var r=[],s=2;s<f.length;s+=2){var l=f.substring(s,s+2);r.push(parseInt(l,16))}return r},e}();r.IO=ew},62849:function(f,r,s){"use strict";s.r(r),s.d(r,{ARGENT_WALLET_DETECTOR_ADDRESS:function(){return eq},CHAIN_TO_ADDRESSES_MAP:function(){return eF},ChainId:function(){return I},CurrencyAmount:function(){return e$},ENS_REGISTRAR_ADDRESSES:function(){return eW},Ether:function(){return e4},Fraction:function(){return ez},GOVERNANCE_ALPHA_V0_ADDRESSES:function(){return eS},GOVERNANCE_ALPHA_V1_ADDRESSES:function(){return eM},GOVERNANCE_BRAVO_ADDRESSES:function(){return eR},MERKLE_DISTRIBUTOR_ADDRESS:function(){return eL},MIXED_ROUTE_QUOTER_V1_ADDRESSES:function(){return eZ},MULTICALL_ADDRESSES:function(){return ek},MaxUint256:function(){return eX},NONFUNGIBLE_POSITION_MANAGER_ADDRESSES:function(){return eH},NativeCurrency:function(){return e5},NativeCurrencyName:function(){return w},Percent:function(){return e1},Price:function(){return e6},QUOTER_ADDRESSES:function(){return eU},Rounding:function(){return K},SOCKS_CONTROLLER_ADDRESSES:function(){return eV},SUPPORTED_CHAINS:function(){return em},SWAP_ROUTER_02_ADDRESSES:function(){return SWAP_ROUTER_02_ADDRESSES},TICK_LENS_ADDRESSES:function(){return eG},TIMELOCK_ADDRESSES:function(){return eN},Token:function(){return e3},TradeType:function(){return X},UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS:function(){return eh},UNI_ADDRESSES:function(){return eA},V2_FACTORY_ADDRESS:function(){return eE},V2_FACTORY_ADDRESSES:function(){return eg},V2_ROUTER_ADDRESS:function(){return ev},V2_ROUTER_ADDRESSES:function(){return eT},V3_CORE_FACTORY_ADDRESSES:function(){return eD},V3_MIGRATOR_ADDRESSES:function(){return eO},WETH9:function(){return e8},computePriceImpact:function(){return computePriceImpact},computeZksyncCreate2Address:function(){return computeZksyncCreate2Address},sortedInsert:function(){return sortedInsert},sqrt:function(){return sqrt},validateAndParseAddress:function(){return validateAndParseAddress}});var l,m,h,E,I,w,B,D,M,L,W,V,G,Z,X,K,$,ee,et=s(28518),ef=s.n(et),en=s(4554),er=s(39585),ea=s.n(er),ei=s(97854),eo=s.n(ei),es=s(8064),eu=s.n(es),ec=s(39898),ed=s(13858),ep=s(89388),el=s(30887),eb=s(65017);function _defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function _createClass(f,r,s){return r&&_defineProperties(f.prototype,r),s&&_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _inheritsLoose(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,_setPrototypeOf(f,r)}function _setPrototypeOf(f,r){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}(l=I||(I={}))[l.MAINNET=1]="MAINNET",l[l.GOERLI=5]="GOERLI",l[l.SEPOLIA=11155111]="SEPOLIA",l[l.OPTIMISM=10]="OPTIMISM",l[l.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",l[l.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",l[l.ARBITRUM_ONE=42161]="ARBITRUM_ONE",l[l.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",l[l.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",l[l.POLYGON=137]="POLYGON",l[l.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",l[l.CELO=42220]="CELO",l[l.CELO_ALFAJORES=44787]="CELO_ALFAJORES",l[l.GNOSIS=100]="GNOSIS",l[l.MOONBEAM=1284]="MOONBEAM",l[l.BNB=56]="BNB",l[l.AVALANCHE=43114]="AVALANCHE",l[l.BASE_GOERLI=84531]="BASE_GOERLI",l[l.BASE_SEPO
1LIA=84532]="BASE_SEPOLIA",l[l.BASE=8453]="BASE",l[l.ZORA=7777777]="ZORA",l[l.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",l[l.ROOTSTOCK=30]="ROOTSTOCK",l[l.BLAST=81457]="BLAST",l[l.ZKSYNC=324]="ZKSYNC",l[l.WORLDCHAIN=480]="WORLDCHAIN",l[l.UNICHAIN_SEPOLIA=1301]="UNICHAIN_SEPOLIA",l[l.UNICHAIN=130]="UNICHAIN",l[l.MONAD_TESTNET=10143]="MONAD_TESTNET",l[l.SONEIUM=1868]="SONEIUM";var em=[I.MAINNET,I.OPTIMISM,I.OPTIMISM_GOERLI,I.OPTIMISM_SEPOLIA,I.ARBITRUM_ONE,I.ARBITRUM_GOERLI,I.ARBITRUM_SEPOLIA,I.POLYGON,I.POLYGON_MUMBAI,I.GOERLI,I.SEPOLIA,I.CELO_ALFAJORES,I.CELO,I.BNB,I.AVALANCHE,I.BASE,I.BASE_GOERLI,I.BASE_SEPOLIA,I.ZORA,I.ZORA_SEPOLIA,I.ROOTSTOCK,I.BLAST,I.ZKSYNC,I.WORLDCHAIN,I.UNICHAIN_SEPOLIA,I.UNICHAIN,I.MONAD_TESTNET,I.SONEIUM];(m=w||(w={})).ETHER="ETH",m.MATIC="MATIC",m.CELO="CELO",m.GNOSIS="XDAI",m.MOONBEAM="GLMR",m.BNB="BNB",m.AVAX="AVAX",m.ROOTSTOCK="RBTC";var ey=[I.MAINNET,I.GOERLI,I.SEPOLIA];function constructSameAddressMap(f,r){return void 0===r&&(r=[]),ey.concat(r).reduce(function(r,s){return r[s]=f,r},{})}var eA=constructSameAddressMap("0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",[I.OPTIMISM,I.ARBITRUM_ONE,I.POLYGON,I.POLYGON_MUMBAI,I.SEPOLIA]),eh="0x8B799381ac40b838BBA4131ffB26197C432AFe78",eE="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",eg=((B={})[I.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.SEPOLIA]="0xF62c03E08ada871A0bEb309762E260a7a6a880E6",B[I.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",B[I.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",B[I.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",B[I.BASE_SEPOLIA]="0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e",B[I.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",B[I.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",B[I.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",B[I.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",B[I.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",B[I.WORLDCHAIN]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.UNICHAIN_SEPOLIA]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.UNICHAIN]="0x1f98400000000000000000000000000000000002",B[I.MONAD_TESTNET]="0x733e88f248b742db6c14c0b1713af5ad7fdd59d0",B[I.SONEIUM]="0x97febbc2adbd5644ba22736e962564b23f5828ce",B),ev="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",eT=((D={})[I.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",D[I.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",D[I.SEPOLIA]="0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3",D[I.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",D[I.BASE_SEPOLIA]="0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",D[I.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",D[I.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",D[I.WORLDCHAIN]="0x541aB7c31A119441eF3575F6973277DE0eF460bd",D[I.UNICHAIN_SEPOLIA]="0x920b806E40A00E02E7D2b94fFc89860fDaEd3640",D[I.UNICHAIN]="0x284f11109359a7e1306c3e447ef14d38400063ff",D[I.MONAD_TESTNET]="0xfb8e1c3b833f9e67a71c859a132cf783b645e436",D[I.SONEIUM]="0x273f68c234fa55b550b40e563c4a488e0d334320",D),e_={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},eC=_extends({},e_,{mixedRouteQuoterV1Address:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E",v4PoolManagerAddress:"0x000000000004444c5dc75cB358380D2e3dE08A90",v4PositionManagerAddress:"0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e",v4StateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",v4QuoterAddress:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203"}),ex=_extends({},e_,{mixedRouteQuoterV1Address:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),eI=_extends({},e_,{v4PoolManagerAddress:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",v4PositionManagerAddress:"0x3c3ea4b57a46241e54610e5f022e5c45859a1017",v4StateView:"0xc18a3169788f4f75a170290584e
1ca6395c75ecdb",v4QuoterAddress:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7"}),ew=_extends({},e_,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0xd88f38f930b7952f2db2432cb002e7abbf3dd869",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"}),eP=_extends({},e_,{v4PoolManagerAddress:"0x67366782805870060151383f4bbff9dab53e5cd6",v4PositionManagerAddress:"0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9",v4StateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",v4QuoterAddress:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9"}),eB={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"},eF=((M={})[I.MAINNET]=eC,M[I.OPTIMISM]=eI,M[I.ARBITRUM_ONE]=ew,M[I.POLYGON]=eP,M[I.POLYGON_MUMBAI]=eP,M[I.GOERLI]=ex,M[I.CELO]=eB,M[I.CELO_ALFAJORES]=eB,M[I.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",v4PoolManagerAddress:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",v4PositionManagerAddress:"0x7a4a5c919ae2541aed11041a1aeee68f1287f95b",v4StateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",v4QuoterAddress:"0x9f75dd27d6664c475b90e105573e550ff69437b0"},M[I.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},M[I.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},M[I.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},M[I.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E",v4PoolManagerAddress:"0xFB3e0C6F74eB1a21CC1Da29aeC80D2Dfe6C9a317",v4PositionManagerAddress:"0xAc631556d3d4019C95769033B5E719dD77124BAc",v4StateView:"0x9d467fa9062b6e9b1a46e26007ad82db116c67cb",v4QuoterAddress:"0x7de51022d70a725b508085468052e25e22b5c4c9"},M[I.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad0
17",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",mixedRouteQuoterV2Address:"0x4745f77b56a0e2294426e3936dc4fab68d9543cd",v4PoolManagerAddress:"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",v4PositionManagerAddress:"0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4",v4StateView:"0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c",v4QuoterAddress:"0x61b3f2011a92d183c7dbadbda940a7555ccf9227"},M[I.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",v4PoolManagerAddress:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",v4PositionManagerAddress:"0xb74b1f14d2754acfcbbe1a221023a5cf50ab8acd",v4StateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",v4QuoterAddress:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2"},M[I.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapRouter02Address:"0x2626664c2603336E57B271c5C0b26F421741e481",mixedRouteQuoterV1Address:"0xe544efae946f0008ae9a8d64493efa7886b73776",v4PoolManagerAddress:"0x498581ff718922c3f8e6a244956af099b2652b2b",v4PositionManagerAddress:"0x7c5f5a4bbd8fd63184577525326123b519429bdc",v4StateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",v4QuoterAddress:"0x0d5e0f971ed27fbff6c2837bf31316121532048d"},M[I.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},M[I.BASE_SEPOLIA]={v3CoreFactoryAddress:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",multicallAddress:"0xd867e273eAbD6c853fCd0Ca0bFB6a3aE6491d2C1",quoterAddress:"0xC5290058841028F1614F3A6F0F5816cAd0df5E27",v3MigratorAddress:"0xCbf8b7f80800bd4888Fbc7bf1713B80FE4E23E10",nonfungiblePositionManagerAddress:"0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",tickLensAddress:"0xedf6066a2b290C185783862C7F4776A2C8077AD1",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",v4PoolManagerAddress:"0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",v4PositionManagerAddress:"0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80",v4StateView:"0x571291b572ed32ce6751a2cb2486ebee8defb9b4",v4QuoterAddress:"0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba"},M[I.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557",v4PoolManagerAddress:"0x0575338e4c17006ae181b47900a84404247ca30f",v4PositionManagerAddress:"0xf66c7b99e2040f0d9b326b3b7c152e9663543d63",v4StateView:"0x385785af07d63b50d0a0ea57c4ff89d06adf7328",v4QuoterAddress:"0x5edaccc0660e0a2c44b06e07ce8b915e625dc2c6"},M[I.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877
1a1Fc4e20A78018f9831365c85f3064"},M[I.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},M[I.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730AeeCd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66",v4PoolManagerAddress:"0x1631559198a9e474033433b2958dabc135ab6446",v4PositionManagerAddress:"0x4ad2f4cca2682cbb5b950d660dd458a1d3f1baad",v4StateView:"0x12a88ae16f46dce4e8b15368008ab3380885df30",v4QuoterAddress:"0x6f71cdcb0d119ff72c6eb501abceb576fbf62bcf"},M[I.ZKSYNC]={v3CoreFactoryAddress:"0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422",multicallAddress:"0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C",quoterAddress:"0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28",v3MigratorAddress:"0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E",nonfungiblePositionManagerAddress:"0x0616e5762c1E7Dc3723c50663dF10a162D690a86",tickLensAddress:"0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89",swapRouter02Address:"0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3"},M[I.WORLDCHAIN]={v3CoreFactoryAddress:"0x7a5028BDa40e7B173C278C5342087826455ea25a",multicallAddress:"0x0a22c04215c97E3F532F4eF30e0aD9458792dAB9",quoterAddress:"0x10158D43e6cc414deE1Bd1eB0EfC6a5cBCfF244c",v3MigratorAddress:"0x9EBDdCBa71C9027E1eB45135672a30bcFEec9de3",nonfungiblePositionManagerAddress:"0xec12a9F9a09f50550686363766Cc153D03c27b5e",tickLensAddress:"0xE61df0CaC9d85876aCE5E3037005D80943570623",swapRouter02Address:"0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6",v4PoolManagerAddress:"0xb1860d529182ac3bc1f51fa2abd56662b7d13f33",v4PositionManagerAddress:"0xc585e0f504613b5fbf874f21af14c65260fb41fa",v4StateView:"0x51d394718bc09297262e368c1a481217fdeb71eb",v4QuoterAddress:"0x55d235b3ff2daf7c3ede0defc9521f1d6fe6c5c0"},M[I.UNICHAIN_SEPOLIA]={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1",quoterAddress:"0x6Dd37329A1A225a6Fca658265D460423DCafBF89",v3MigratorAddress:"0xb5FA244C9d6D04B2FBac84418b3c4910ED1Ae5f2",nonfungiblePositionManagerAddress:"0xB7F724d6dDDFd008eFf5cc2834edDE5F9eF0d075",tickLensAddress:"0x5f739c790a48E97eec0efb81bab5D152c0A0ecA0",swapRouter02Address:"0xd1AAE39293221B77B0C71fBD6dCb7Ea29Bb5B166",v4PoolManagerAddress:"0x00b036b58a818b1bc34d502d3fe730db729e62ac",v4PositionManagerAddress:"0xf969aee60879c54baaed9f3ed26147db216fd664",v4StateView:"0xc199f1072a74d4e905aba1a84d9a45e2546b6222",v4QuoterAddress:"0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472"},M[I.UNICHAIN]={v3CoreFactoryAddress:"0x1f98400000000000000000000000000000000003",multicallAddress:"0xb7610f9b733e7d45184be3a1bc966960ccc54f0b",quoterAddress:"0x565ac8c7863d9bb16d07e809ff49fe5cd467634c",v3MigratorAddress:"0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc",nonfungiblePositionManagerAddress:"0x943e6e07a7e8e791dafc44083e54041d743c46e9",tickLensAddress:"0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443",swapRouter02Address:"0x73855d06de49d0fe4a9c42636ba96c62da12ff9c",v4PoolManagerAddress:"0x1f98400000000000000000000000000000000004",v4PositionManagerAddress:"0x4529a01c7a0410167c5740c487a8de60232617bf",v4StateView:"0x86e8631a016f9068c3f085faf484ee3f5fdee8f2",v4QuoterAddress:"0x333e3c607b141b18ff6de9f258db6e77fe7491e0"},M[I.MONAD_TESTNET]={v3CoreFactoryAddress:"0x961235a9020b05c44df1026d956d1f4d78014276",multicallAddress:"0xa707ceb989cc3728551ed0e6e44b718dd114cf44",quoterAddress:"0x1ba215c17565de7b0cb7ecab971bcf540c24a862",v3MigratorAddress:"0x0a78348b71f8ae8caff2f8f9d4d74a2f36516661",nonfungiblePositionManagerAddress:"0x3dcc735c74f10fe2b9db2bb55c40fbbbf24490f7",tickLensAddress:"0x337478eb6058455ecb3696184b30dd6a29e3a893",swapRouter02Address:"0x4c4eabd5fb1d1a7234a48692551eaecff8194ca7"},M[I.SONEIUM]={v3CoreFactoryAddress:"0x42ae7ec7ff020412639d443e245d936429fbe717",multicallAddress:"0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2",quoterAddress:"0x3e6c707d0125226ff60f291b6bd1404634f00aba",v3MigratorAddress:"0xa107580f73bd797bd8b87ff24e98346d99f93ddb",nonfungiblePositionManagerAddress:"0x56c1205b0244332011c1e866f4ea5384eb6bfa2c",tickLensAddress:"0xcd08eefb928c86499e6235ac155906bb7c4dc41a",swapR
1outer02Address:"0x7e40db01736f88464e5f4e42394f3d5bbb6705b9",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0x1b35d13a2e2528f192637f14b05f0dc0e7deb566",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"},M),eD=_extends({},em.reduce(function(f,r){return f[r]=eF[r].v3CoreFactoryAddress,f},{})),eO=_extends({},em.reduce(function(f,r){var s=eF[r].v3MigratorAddress;return s&&(f[r]=s),f},{})),ek=_extends({},em.reduce(function(f,r){return f[r]=eF[r].multicallAddress,f},{})),eS=constructSameAddressMap("0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F"),eM=((L={})[I.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",L),eR=((W={})[I.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",W),eN=constructSameAddressMap("0x1a9C8182C09F50C8318d769245beA52c32BE35BC"),eL=((V={})[I.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",V),eq=((G={})[I.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",G),eU=_extends({},em.reduce(function(f,r){return f[r]=eF[r].quoterAddress,f},{})),eH=_extends({},em.reduce(function(f,r){var s=eF[r].nonfungiblePositionManagerAddress;return s&&(f[r]=s),f},{})),eW=_extends({},constructSameAddressMap("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e")),eV=((Z={})[I.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",Z),eG=_extends({},em.reduce(function(f,r){var s=eF[r].tickLensAddress;return s&&(f[r]=s),f},{})),eZ=em.reduce(function(f,r){var s=eF[r].mixedRouteQuoterV1Address;return s&&(f[r]=s),f},{}),SWAP_ROUTER_02_ADDRESSES=function(f){if(em.includes(f)){var r;return null!=(r=eF[f].swapRouter02Address)?r:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"}return""};(h=X||(X={}))[h.EXACT_INPUT=0]="EXACT_INPUT",h[h.EXACT_OUTPUT=1]="EXACT_OUTPUT",(E=K||(K={}))[E.ROUND_DOWN=0]="ROUND_DOWN",E[E.ROUND_HALF_UP=1]="ROUND_HALF_UP",E[E.ROUND_UP=2]="ROUND_UP";var eX=ef().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ej=eu()(ea()),eQ=eu()(eo()),eK=(($={})[K.ROUND_DOWN]=ej.ROUND_DOWN,$[K.ROUND_HALF_UP]=ej.ROUND_HALF_UP,$[K.ROUND_UP]=ej.ROUND_UP,$),eY=((ee={})[K.ROUND_DOWN]=0,ee[K.ROUND_HALF_UP]=1,ee[K.ROUND_UP]=3,ee),ez=function(){function Fraction(f,r){void 0===r&&(r=ef().BigInt(1)),this.numerator=ef().BigInt(f),this.denominator=ef().BigInt(r)}Fraction.tryParseFraction=function(f){if(f instanceof ef()||"number"==typeof f||"string"==typeof f)return new Fraction(f);if("numerator"in f&&"denominator"in f)return f;throw Error("Could not parse fraction")};var f=Fraction.prototype;return f.invert=function(){return new Fraction(this.denominator,this.numerator)},f.add=function(f){var r=Fraction.tryParseFraction(f);return ef().equal(this.denominator,r.denominator)?new Fraction(ef().add(this.numerator,r.numerator),this.denominator):new Fraction(ef().add(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator)),ef().multiply(this.denominator,r.denominator))},f.subtract=function(f){var r=Fraction.tryParseFraction(f);return ef().equal(this.denominator,r.denominator)?new Fraction(ef().subtract(this.numerator,r.numerator),this.denominator):new Fraction(ef().subtract(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator)),ef().multiply(this.denominator,r.denominator))},f.lessThan=function(f){var r=Fraction.tryParseFraction(f);return ef().lessThan(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator))},f.equalTo=function(f){var r=Fraction.tryParseFraction(f);return ef().equal(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator))},f.greaterThan=function(f){var r=Fraction.tryParseFraction(f);return ef().greaterThan(ef().multiply(this.numerator,r.denominator),ef().multiply(r.numerator,this.denominator))},f.multiply=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ef().multiply(this.numerator,r.numerator),ef().multiply(this.denominator,r.denominator))},f.divide=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ef().multiply(this.numerator,r.denominator),ef().multiply(this.denominator,r.numerator))},f.toSignificant=function(f,r,s){void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=K.ROUND_HALF_UP),Number.isInteger(f)||(0,en.Z)(!1),f>0||(0,en.Z)(!1),ej.set({precision:f+1,rounding:eK[s]});var l=new ej(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(f);return l.toFormat(l.decimalPlaces(),r)},f.toFixed=function(f,r,s){return void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=K.ROUND_HALF_UP),Number.isInteger(f)||(0,en.Z)(!1),f>=0||(0,en.Z)(!1),eQ.DP=f,eQ.RM=eY[s],new eQ(this.numerator.toString()).div(this.denominator.toString()).toFormat(f,r)},_createClass(Fraction,[{key:"quotient",get:function(){return ef().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new Fraction(ef().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new Fraction(this.numerator,this.denominator)}}])}(),eJ=eu()(eo()),e$=function(f){function CurrencyAmount(r,s,l){var m;return m=f.call(this,s,l)||this,ef().lessThanOrEqual(m.quotient,eX)||(0,en.Z)(!1),m.currency=r,m.decimalScale=ef().exponentiate(ef().BigInt(10),ef().BigInt(r.decimals)),m}_inheritsLoose(CurrencyAmount,f),CurrencyAmount.fromRawAmount=function(f,r){return new CurrencyAmount(f,r)},CurrencyAmount.fromFractionalAmount=function(f,r,s){return new CurrencyAmount(f,r,s)};var r=CurrencyAmount.prototype;return r.add=function(r){this.currency.equals(r.currency)||(0,en.Z)(!1);var s=f.prototype.add.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.subtract=function(r){this.currency.equals(r.currency)||(0,en.Z)(!1);var s=f.prototype.subtract.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.multiply=function(r){var s=f.prototype.multiply.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)}
1,r.divide=function(r){var s=f.prototype.divide.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.toSignificant=function(r,s,l){return void 0===r&&(r=6),void 0===l&&(l=K.ROUND_DOWN),f.prototype.divide.call(this,this.decimalScale).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=this.currency.decimals),void 0===l&&(l=K.ROUND_DOWN),r<=this.currency.decimals||(0,en.Z)(!1),f.prototype.divide.call(this,this.decimalScale).toFixed(r,s,l)},r.toExact=function(f){return void 0===f&&(f={groupSeparator:""}),eJ.DP=this.currency.decimals,new eJ(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(f)},_createClass(CurrencyAmount,[{key:"wrapped",get:function(){return this.currency.isToken?this:CurrencyAmount.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}])}(ez),e0=new ez(ef().BigInt(100));function toPercent(f){return new e1(f.numerator,f.denominator)}var e1=function(f){function Percent(){var r;return r=f.apply(this,arguments)||this,r.isPercent=!0,r}_inheritsLoose(Percent,f);var r=Percent.prototype;return r.add=function(r){return toPercent(f.prototype.add.call(this,r))},r.subtract=function(r){return toPercent(f.prototype.subtract.call(this,r))},r.multiply=function(r){return toPercent(f.prototype.multiply.call(this,r))},r.divide=function(r){return toPercent(f.prototype.divide.call(this,r))},r.toSignificant=function(r,s,l){return void 0===r&&(r=5),f.prototype.multiply.call(this,e0).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=2),f.prototype.multiply.call(this,e0).toFixed(r,s,l)},Percent}(ez),e6=function(f){function Price(){for(var r,s,l,m,h,E=arguments.length,I=Array(E),w=0;w<E;w++)I[w]=arguments[w];if(4===I.length)s=I[0],l=I[1],m=I[2],h=I[3];else{var B=I[0].quoteAmount.divide(I[0].baseAmount),D=[I[0].baseAmount.currency,I[0].quoteAmount.currency,B.denominator,B.numerator];s=D[0],l=D[1],m=D[2],h=D[3]}return(r=f.call(this,h,m)||this).baseCurrency=s,r.quoteCurrency=l,r.scalar=new ez(ef().exponentiate(ef().BigInt(10),ef().BigInt(s.decimals)),ef().exponentiate(ef().BigInt(10),ef().BigInt(l.decimals))),r}_inheritsLoose(Price,f);var r=Price.prototype;return r.invert=function(){return new Price(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){this.quoteCurrency.equals(r.baseCurrency)||(0,en.Z)(!1);var s=f.prototype.multiply.call(this,r);return new Price(this.baseCurrency,r.quoteCurrency,s.denominator,s.numerator)},r.quote=function(r){r.currency.equals(this.baseCurrency)||(0,en.Z)(!1);var s=f.prototype.multiply.call(this,r);return e$.fromFractionalAmount(this.quoteCurrency,s.numerator,s.denominator)},r.toSignificant=function(f,r,s){return void 0===f&&(f=6),this.adjustedForDecimals.toSignificant(f,r,s)},r.toFixed=function(f,r,s){return void 0===f&&(f=4),this.adjustedForDecimals.toFixed(f,r,s)},_createClass(Price,[{key:"adjustedForDecimals",get:function(){return f.prototype.multiply.call(this,this.scalar)}}])}(ez),BaseCurrency=function(f,r,s,l){Number.isSafeInteger(f)||(0,en.Z)(!1),r>=0&&r<255&&Number.isInteger(r)||(0,en.Z)(!1),this.chainId=f,this.decimals=r,this.symbol=s,this.name=l},e5=function(f){function NativeCurrency(){var r;return r=f.apply(this,arguments)||this,r.isNative=!0,r.isToken=!1,r}return _inheritsLoose(NativeCurrency,f),NativeCurrency}(BaseCurrency);function validateAndParseAddress(f){try{return(0,ed.getAddress)(f)}catch(r){throw Error(f+" is not a valid address.")}}var e2=/^0x[0-9a-fA-F]{40}$/,e3=function(f){function Token(r,s,l,m,h,E,I,w){var B;return(B=f.call(this,r,l,m,h)||this).isNative=!1,B.isToken=!0,E?B.address=function(f){if(e2.test(f))return f;throw Error(f+" is not a valid address.")}(s):B.address=validateAndParseAddress(s),I&&(I.gte(ec.O$.from(0))||(0,en.Z)(!1)),w&&(w.gte(ec.O$.from(0))||(0,en.Z)(!1)),B.buyFeeBps=I,B.sellFeeBps=w,B}_inheritsLoose(Token,f);var r=Token.prototype;return r.equals=function(f){return f.isToken&&this.chainId===f.chainId&&this.address.toLowerCase()===f.address.toLowerCase()},r.sortsBefore=function(f){return this.chainId!==f.chainId&&(0,en.Z)(!1),this.address.toLowerCase()!==f.address.toLowerCase()||(0,en.Z)(!1),this.address.toLowerCase()<f.address.toLowerCase()},_createClass(Token,[{key:"wrapped",get:function(){return this}}])}(BaseCurrency),e8={1:new e3(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),11155111:new e3(11155111,"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",18,"WETH","Wrapped Ether"),3:new e3(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),4:new e3(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),5:new e3(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),42:new e3(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),10:new e3(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),69:new e3(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),11155420:new e3(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),42161:new e3(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),421611:new e3(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),421614:new e3(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),8453:new e3(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),84532:new e3(84532,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),56:new e3(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),137:new e3(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),43114:new e3(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX"),7777777:new e3(7777777,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),81457:new e3(81457,"0x4300000000000000000000000000000000000004",18,"WETH","Wrapped Ether"),324:new e3(324,"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",18,"WETH","Wrapped Ether"),480:new e3(480,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),1301:new e3(1301,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),130:new e3(130,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),10143:new e3(10143,"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",18,"WMON","Wrapped Monad"),1868:new e3(1868,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether")},e4=function(f){function Ether(r){return f.call(this,r,18,"ETH","Ether")||this}return _inheritsLoose(Ether,f),Ether.onChain=function(f){var r;return null!=(r=this._etherCache[f])?r:this._etherCache[f]=new Ether(f)},Ether.prototype.equals=function(f){return f.isNative&&f.chainId===this.chainId},_createClass(Ether,[{key:"wrapped",get:function(){var f=e8[this.chainId];return f||(0,en.Z)(!1),f}}])}(e5);function computePriceImpact(f,r,s){var l=f.quote(r),m=l.subtract(s).divide(l);return new e1(m.numerator,m.denominator)}function computeZksyncCreate2Address(f,r,s,l){void 0===l&&(l="0x");var m=(0,el.keccak256)((0,eb.Y0)("zksyncCreate2")),h=(0,el.keccak256)(l),E=(0,el.keccak256)((0,ep.concat)([m,(0,ep.hexZeroPad)(f,32),s,r,h])).slice(26);return(0,ed.getAddress)(E)}function sortedInsert(f,r,s,l){if(s>0||(0,en.Z)(!1),f.length<=s||(0,en.Z)(!1),0===f.length)return f.push(r),null;var m=f.length===s;if(m&&0>=l(f[f.length-1],r))return r;for(var h=0,E=f.length;h<E;){var I=h+E>>>1;0>=l(f[I],r)?h=I+1:E=I}return f.splice(h,0,r),m?f.pop():null}e4._etherCache={};var e9=ef().BigInt(Number.MAX_SAFE_INTEGER),e7=ef().BigInt(0),te=ef().BigInt(1),tt=ef().BigInt(2);function sqrt(f){var r,s;if(ef().greaterThanOrEqual(f,e7)||(0,en.Z)(!1),ef().lessThan(f,e9))return ef().BigInt(Math.floor(Math.sqrt(ef().toNumber(f))));for(r=f,s=ef().add(ef().divide(f,tt),te);ef().lessThan(s,r);)r=s,s=ef().divide(ef().add(ef().divide(f,s),s),tt);return r}},97854:function(f,r,s){var l;!function(m){"use strict";var h,E="[big.js] ",I=E+"Invalid ",w=I+"decimal places",B=I+"rounding mode",D=E+"Division by zero",M={},L=void 0,W=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function round(f,r,s,l){var m=f.c,h=f.e+r+1;if(h<m.length){if(1===s)l=m[h]>=5;else if(2===s)l=m[h]>5||5==m[h]&&(l||h<0||m[h+1]!==L||1&m[h-1]);else if(3===s)l=l||!!m[0];else if(l=!1,0!==s)throw Error(B);if(h<1)m.length=1,l?(f.e=-r,m[0]=1):m[0]=f.e=0;else{if(m.length=h--,l)for(;++m[h]>9;)m[h]=0,h--||(++f.e,m.unshift(1));for(h=m.length;!m[--h];)m.pop()}}else if(s<0||s>3||s!==~~s)throw Error(B);return f}function stringify(f,r,s,l){var m,h,E=f.constructor,B=!f.c[0];if(s!==L){if(s!==~~s||s<(3==r)||s>1e6)throw Error(3==r?I+"precision":w);for(s=l-(f=new E(f)).e,f.c.length>++l&&round(f,s,E.RM),2==r&&(l=f.e+s+1);f.c.length<l;)f.c.push(0)}if(m=f.e,s=(h=f.c.join("")).length,2!=r&&(1==r||3==r&&l<=m||m<=E.NE||m>=E.PE))h=h.charAt(0)+(s>1?"."+h.slice(1):"")+(m<0?"e":"e+")+m;else if(m<0){for(;++m;)h="0"+h;h="0."+h}else if(m>0){if(++m>s)for(m-=s;m--;)h+="0";else m<s&&(h=h.slice(0,m)+"."+h.slice(m))}else s>1&&(h=h.charAt(0)+"."+h.slice(1));return f.s<0&&(!B||4==r)?"-"+h:h}M.abs=function(){var f=new this.constructor(this);return f.s=1,f},M.cmp=function(f){var r,s=this.c,l=(f=new this.constructor(f)).c,m=this.s,h=f.s,E=this.e,I=f.e;if(!s[0]||!l[0])return s[0]?m:l[0]?-h:0;if(m!=h)return m;if(r=m<0,E!=I)return E>I^r?1:-1;for(m=-1,h=(E=s.length)<(I=l.length)?E:I;++m<h;)if(s[m]!=l[m])return s[m]>l[m]^r?1:-1;return E==I?0:E>I^r?1:-1},M.div=function(f){var r=this.constructor,s=this.c,l=(f=new r(f)).c,m=this.s==f.s?1:-1,h=r.DP;if(h!==~~h||h<0||h>1e6)throw Error(w);if(!l[0])throw Error(D);if(!s[0])return new r(0*m);var E,I,B,M,W,V=l.slice(),G=E=l.length,Z=s.length,X=s.slice(0,E),K=X.length,$=f,ee=$.c=[],et=0,ef=h+($.e=this.e-f.e)+1;for($.s=m,m=ef<0?0:ef,V.unshift(0);K++<E;)X.push(0);do{for(B=0;B<10;B++){if(E!=(K=X.length))M=E>K?1:-1;else for(W=-1,M=0;++W<E;)if(l[W]!=X[W]){M=l[W]>X[W]?1:-1;break}if(M<0){for(I=K==E?l:V;K;){if(X[--K]<I[K]){for(W=K;W&&!X[--W];)X[W]=9;--X[W],X[K]+=10}X[K]-=I[K]}for(;!X[0];)X.shift()}else break}ee[et++]=M?B:++B,X[0]&&M?X[K]=s[G]||0:X=[s[G]]}while((G++<Z||X[0]!==L)&&m--);return!ee[0]&&1!=et&&(ee.shift(),$.e--),et>ef&&round($,h,r.RM,X[0]!==L),$},M.eq=function(f){return!this.cmp(f)},M.gt=function(f){return this.cmp(f)>0},M.gte=function(f){return this.cmp(f)>-1},M.lt=function(f){return 0>this.cmp(f)},M.lte=function(f){return 1>this.cmp(f)},M.minus=M.sub=function(f){var r,s,l,m,h=this.constructor,E=this.s,I=(f=new h(f)).s;if(E!=I)return f.s=-I,this.plus(f);var w=this.c.slice(),B=this.e,D=f.c,M=f.e;if(!w[0]||!D[0])return D[0]?(f.s=-I,f):new h(w[0]?this:0);if(E=B-M){for((m=E<0)?(E=-E,l=w):(M=B,l=D),l.reverse(),I=E;I--;)l.push(0);l.reverse()}else for(s=((m=w.length<D.length)?w:D).length,E=I=0;I<s;I++)if(w[I]!=D[I]){m=w[I]<D[I];break}if(m&&(l=w,w=D,D=l,f.s=-f.s),(I=(s=D.length)-(r=w.length))>0)for(;I--;)w[r++]=0;for(I=r;s>E;){if(w[--s]<D[s]){for(r=s;r&&!w[--r];)w[r]=9;--w[r],w[s]+=10}w[s]-=D[s]}for(;0===w[--I];)w.pop();for(;0===w[0];)w.shift(),--M;return w[0]||(f.s=1,w=[M=0]),f.c=w,f.e=M,f},M.mod=function(f){var r,s=this,l=s.constructor,m=s.s,h=(f=new l(f)).s;if(!f.c[0])throw Error(D);return(s.s=f.s=1,r=1==f.cmp(s),s.s=m,f.s=h,r)?new l(s):(m=l.DP,h=l.RM,l.DP=l.RM=0,s=s.div(f),l.DP=m,l.RM=h,this.minus(s.times(f)))},M.plus=M.add=function(f){var r,s=this.constructor,l=this.s,m=(f=new s(f)).s;if(l!=m)return f.s=-m,this.minus(f);var h=this.e,E=this.c,I=f.e,w=f.c;if(!E[0]||!w[0])return w[0]?f:new s(E[0]?this:0*l);if(E=E.slice(),l=h-I){for(l>0?(I=h,r=w):(l=-l,r=E),r.reverse();l--;)r.push(0);r.reverse()}for(E.length-w.length<0&&(r=w,w=E,E=r),l=w.length,m=0;l;E[l]%=10)m=(E[--l]=E[l]+w[l]+m)/10|0;for(m&&(E.unshift(m),++I),l=E.length;0===E[--l];)E.pop();return f.c=E,f.e=I,f},M.pow=function(f){var r=this,s=new r.constructor(1),l=s,m=f<0;if(f!==~~f||f<-1e6||f>1e6)throw Error(I+"exponent");for(m&&(f=-f);1&f&&(l=l.times(r)),f>>=1;)r=r.times(r);return m?s.div(l):l},M.round=function(f,r){var s=this.constructor;if(f===L)f=0;else if(f!==~~f||f<-1e6||f>1e6)throw Error(w);return round(new s(this),f,r===L?s.RM:r)},M.sqrt=function(){var f,r,s,l=this.constructor,m=this.s,h=this.e,I=new l(.5);if(!this.c[0])return new l(this);if(m<0)throw Error(E+"No square root");0===(m=Math.sqrt(this+""))||m===1/0?((r=this.c.join("")).length+h&1||(r+="0"),m=Math.sqrt(r),h=((h+1)/2|0)-(h<0||1&h),f=new l((m==1/0?"1e":(m=m.toExponential()).slice(0,m.indexOf("e")+1))+h)):f=new l(m),h=f.e+(l.DP+=4);do s=f,f=I.times(s.plus(this.div(s)));while(s.c.slice(0,h).join("")!==f.c.slice(0,h).join(""));return round(f,l.DP-=4,l.RM)},M.times=M.mul=function(f){var r,s=this.constructor,l=this.c,m=(f=new s(f)).c,h=l.length,E=m.length,I=this.e,w=f.e;if(f.s=this.s==f.s?1:-1,!l[0]||!m[0])return new s(0*f.s);for(f.e=I+w,h<E&&(r=l,l=m,m=r,w=h,h=E,E=w),r=Array(w=h+E);w--;)r[w]=0;for(I=E;I--;){for(E=0,w=h+I;w>I;)E=r[w]+m[I]*l[w-I-1]+E,r[w--]=E%10,E=E/10|0;r[w]=(r[w]+E)%10}
1for(E?++f.e:r.shift(),I=r.length;!r[--I];)r.pop();return f.c=r,f},M.toExponential=function(f){return stringify(this,1,f,f)},M.toFixed=function(f){return stringify(this,2,f,this.e+f)},M.toPrecision=function(f){return stringify(this,3,f,f-1)},M.toString=function(){return stringify(this)},M.valueOf=M.toJSON=function(){return stringify(this,4)},(h=function _Big_(){function Big(f){if(!(this instanceof Big))return f===L?_Big_():new Big(f);f instanceof Big?(this.s=f.s,this.e=f.e,this.c=f.c.slice()):function(f,r){var s,l,m;if(0===r&&1/r<0)r="-0";else if(!W.test(r+=""))throw Error(I+"number");for(f.s="-"==r.charAt(0)?(r=r.slice(1),-1):1,(s=r.indexOf("."))>-1&&(r=r.replace(".","")),(l=r.search(/e/i))>0?(s<0&&(s=l),s+=+r.slice(l+1),r=r.substring(0,l)):s<0&&(s=r.length),m=r.length,l=0;l<m&&"0"==r.charAt(l);)++l;if(l==m)f.c=[f.e=0];else{for(;m>0&&"0"==r.charAt(--m););for(f.e=s-l-1,f.c=[],s=0;l<=m;)f.c[s++]=+r.charAt(l++)}return f}(this,f),this.constructor=Big}return Big.prototype=M,Big.DP=20,Big.RM=1,Big.NE=-7,Big.PE=21,Big.version="5.2.2",Big}()).default=h.Big=h,void 0!==(l=(function(){return h}).call(r,s,r,f))&&(f.exports=l)}(0)},22630:function(f,r,s){"use strict";s.r(r),s.d(r,{FACTORY_ADDRESS_MAP:function(){return eM},INIT_CODE_HASH:function(){return eR},InsufficientInputAmountError:function(){return eQ},InsufficientReservesError:function(){return ej},MINIMUM_LIQUIDITY:function(){return eN},Pair:function(){return eK},Route:function(){return eY},Router:function(){return eJ},Trade:function(){return ez},computePairAddress:function(){return computePairAddress},inputOutputComparator:function(){return inputOutputComparator},tradeComparator:function(){return tradeComparator}});var l,m,h,E,I,w,B,D,M,L,W,V,G,Z=s(28518),X=s.n(Z),K=s(4554),$=s(39585),ee=s.n($),et=s(46989),ef=s.n(et),en=s(8064),er=s.n(en),ea=s(39898),ei=s(13858);function _defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function _createClass(f,r,s){return r&&_defineProperties(f.prototype,r),s&&_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _inheritsLoose(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,_setPrototypeOf(f,r)}function _setPrototypeOf(f,r){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}(l=I||(I={}))[l.MAINNET=1]="MAINNET",l[l.GOERLI=5]="GOERLI",l[l.SEPOLIA=11155111]="SEPOLIA",l[l.OPTIMISM=10]="OPTIMISM",l[l.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",l[l.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",l[l.ARBITRUM_ONE=42161]="ARBITRUM_ONE",l[l.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",l[l.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",l[l.POLYGON=137]="POLYGON",l[l.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",l[l.CELO=42220]="CELO",l[l.CELO_ALFAJORES=44787]="CELO_ALFAJORES",l[l.GNOSIS=100]="GNOSIS",l[l.MOONBEAM=1284]="MOONBEAM",l[l.BNB=56]="BNB",l[l.AVALANCHE=43114]="AVALANCHE",l[l.BASE_GOERLI=84531]="BASE_GOERLI",l[l.BASE_SEPOLIA=84532]="BASE_SEPOLIA",l[l.BASE=8453]="BASE",l[l.ZORA=7777777]="ZORA",l[l.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",l[l.ROOTSTOCK=30]="ROOTSTOCK",l[l.BLAST=81457]="BLAST",l[l.ZKSYNC=324]="ZKSYNC",l[l.WORLDCHAIN=480]="WORLDCHAIN",l[l.UNICHAIN_SEPOLIA=1301]="UNICHAIN_SEPOLIA",l[l.UNICHAIN=130]="UNICHAIN",l[l.MONAD_TESTNET=10143]="MONAD_TESTNET",l[l.SONEIUM=1868]="SONEIUM",I.MAINNET,I.OPTIMISM,I.OPTIMISM_GOERLI,I.OPTIMISM_SEPOLIA,I.ARBITRUM_ONE,I.ARBITRUM_GOERLI,I.ARBITRUM_SEPOLIA,I.POLYGON,I.POLYGON_MUMBAI,I.GOERLI,I.SEPOLIA,I.CELO_ALFAJORES,I.CELO,I.BNB,I.AVALANCHE,I.BASE,I.BASE_GOERLI,I.BASE_SEPO
1LIA,I.ZORA,I.ZORA_SEPOLIA,I.ROOTSTOCK,I.BLAST,I.ZKSYNC,I.WORLDCHAIN,I.UNICHAIN_SEPOLIA,I.UNICHAIN,I.MONAD_TESTNET,I.SONEIUM,(m=w||(w={})).ETHER="ETH",m.MATIC="MATIC",m.CELO="CELO",m.GNOSIS="XDAI",m.MOONBEAM="GLMR",m.BNB="BNB",m.AVAX="AVAX",m.ROOTSTOCK="RBTC",I.MAINNET,I.GOERLI,I.SEPOLIA,I.OPTIMISM,I.ARBITRUM_ONE,I.POLYGON,I.POLYGON_MUMBAI,I.SEPOLIA;var eo=((B={})[I.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.SEPOLIA]="0xF62c03E08ada871A0bEb309762E260a7a6a880E6",B[I.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",B[I.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",B[I.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",B[I.BASE_SEPOLIA]="0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e",B[I.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",B[I.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",B[I.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",B[I.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",B[I.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",B[I.WORLDCHAIN]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.UNICHAIN_SEPOLIA]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",B[I.UNICHAIN]="0x1f98400000000000000000000000000000000002",B[I.MONAD_TESTNET]="0x733e88f248b742db6c14c0b1713af5ad7fdd59d0",B[I.SONEIUM]="0x97febbc2adbd5644ba22736e962564b23f5828ce",B);(D={})[I.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",D[I.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",D[I.SEPOLIA]="0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3",D[I.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",D[I.BASE_SEPOLIA]="0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",D[I.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",D[I.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",D[I.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",D[I.WORLDCHAIN]="0x541aB7c31A119441eF3575F6973277DE0eF460bd",D[I.UNICHAIN_SEPOLIA]="0x920b806E40A00E02E7D2b94fFc89860fDaEd3640",D[I.UNICHAIN]="0x284f11109359a7e1306c3e447ef14d38400063ff",D[I.MONAD_TESTNET]="0xfb8e1c3b833f9e67a71c859a132cf783b645e436",D[I.SONEIUM]="0x273f68c234fa55b550b40e563c4a488e0d334320";var es={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},eu=_extends({},es,{mixedRouteQuoterV1Address:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E",v4PoolManagerAddress:"0x000000000004444c5dc75cB358380D2e3dE08A90",v4PositionManagerAddress:"0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e",v4StateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",v4QuoterAddress:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203"}),ec=_extends({},es,{mixedRouteQuoterV1Address:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),ed=_extends({},es,{v4PoolManagerAddress:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",v4PositionManagerAddress:"0x3c3ea4b57a46241e54610e5f022e5c45859a1017",v4StateView:"0xc18a3169788f4f75a170290584eca6395c75ecdb",v4QuoterAddress:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7"}),ep=_extends({},es,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0xd88f38f930b7952f2db2432cb002e7abbf3dd869",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"}),el=_extends({},es,{v4PoolManagerAddress:"0x67366782805870060151383f4bbff9dab53e5cd6",v4PositionManagerAddress:"0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9",v4StateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",v4QuoterAddress:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9"}),eb={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"};(M={})[I.MAINNET]=eu,M[I.OPTIMISM]=ed,M[I.ARBITRUM_ONE]=ep,M[I.POLYGON]=el,M[I.POLYGON_MUMBAI]=el,M[I.GOERLI]=ec,M[I.CELO]=eb,M[I.CELO_ALFAJORES]=eb,M[I.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117
1ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",v4PoolManagerAddress:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",v4PositionManagerAddress:"0x7a4a5c919ae2541aed11041a1aeee68f1287f95b",v4StateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",v4QuoterAddress:"0x9f75dd27d6664c475b90e105573e550ff69437b0"},M[I.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},M[I.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},M[I.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},M[I.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E",v4PoolManagerAddress:"0xFB3e0C6F74eB1a21CC1Da29aeC80D2Dfe6C9a317",v4PositionManagerAddress:"0xAc631556d3d4019C95769033B5E719dD77124BAc",v4StateView:"0x9d467fa9062b6e9b1a46e26007ad82db116c67cb",v4QuoterAddress:"0x7de51022d70a725b508085468052e25e22b5c4c9"},M[I.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",mixedRouteQuoterV2Address:"0x4745f77b56a0e2294426e3936dc4fab68d9543cd",v4PoolManagerAddress:"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",v4PositionManagerAddress:"0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4",v4StateView:"0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c",v4QuoterAddress:"0x61b3f2011a92d183c7dbadbda940a7555ccf9227"},M[I.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",v4PoolManagerAddress:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",v4PositionManagerAddress:"0xb74b1f14d2754acfcbbe1a221023a5cf50ab8acd",v4StateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",v4QuoterAddress:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2"},M[I.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapR
1outer02Address:"0x2626664c2603336E57B271c5C0b26F421741e481",mixedRouteQuoterV1Address:"0xe544efae946f0008ae9a8d64493efa7886b73776",v4PoolManagerAddress:"0x498581ff718922c3f8e6a244956af099b2652b2b",v4PositionManagerAddress:"0x7c5f5a4bbd8fd63184577525326123b519429bdc",v4StateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",v4QuoterAddress:"0x0d5e0f971ed27fbff6c2837bf31316121532048d"},M[I.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},M[I.BASE_SEPOLIA]={v3CoreFactoryAddress:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",multicallAddress:"0xd867e273eAbD6c853fCd0Ca0bFB6a3aE6491d2C1",quoterAddress:"0xC5290058841028F1614F3A6F0F5816cAd0df5E27",v3MigratorAddress:"0xCbf8b7f80800bd4888Fbc7bf1713B80FE4E23E10",nonfungiblePositionManagerAddress:"0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",tickLensAddress:"0xedf6066a2b290C185783862C7F4776A2C8077AD1",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",v4PoolManagerAddress:"0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",v4PositionManagerAddress:"0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80",v4StateView:"0x571291b572ed32ce6751a2cb2486ebee8defb9b4",v4QuoterAddress:"0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba"},M[I.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557",v4PoolManagerAddress:"0x0575338e4c17006ae181b47900a84404247ca30f",v4PositionManagerAddress:"0xf66c7b99e2040f0d9b326b3b7c152e9663543d63",v4StateView:"0x385785af07d63b50d0a0ea57c4ff89d06adf7328",v4QuoterAddress:"0x5edaccc0660e0a2c44b06e07ce8b915e625dc2c6"},M[I.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877a1Fc4e20A78018f9831365c85f3064"},M[I.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},M[I.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730Aee
1Cd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66",v4PoolManagerAddress:"0x1631559198a9e474033433b2958dabc135ab6446",v4PositionManagerAddress:"0x4ad2f4cca2682cbb5b950d660dd458a1d3f1baad",v4StateView:"0x12a88ae16f46dce4e8b15368008ab3380885df30",v4QuoterAddress:"0x6f71cdcb0d119ff72c6eb501abceb576fbf62bcf"},M[I.ZKSYNC]={v3CoreFactoryAddress:"0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422",multicallAddress:"0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C",quoterAddress:"0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28",v3MigratorAddress:"0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E",nonfungiblePositionManagerAddress:"0x0616e5762c1E7Dc3723c50663dF10a162D690a86",tickLensAddress:"0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89",swapRouter02Address:"0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3"},M[I.WORLDCHAIN]={v3CoreFactoryAddress:"0x7a5028BDa40e7B173C278C5342087826455ea25a",multicallAddress:"0x0a22c04215c97E3F532F4eF30e0aD9458792dAB9",quoterAddress:"0x10158D43e6cc414deE1Bd1eB0EfC6a5cBCfF244c",v3MigratorAddress:"0x9EBDdCBa71C9027E1eB45135672a30bcFEec9de3",nonfungiblePositionManagerAddress:"0xec12a9F9a09f50550686363766Cc153D03c27b5e",tickLensAddress:"0xE61df0CaC9d85876aCE5E3037005D80943570623",swapRouter02Address:"0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6",v4PoolManagerAddress:"0xb1860d529182ac3bc1f51fa2abd56662b7d13f33",v4PositionManagerAddress:"0xc585e0f504613b5fbf874f21af14c65260fb41fa",v4StateView:"0x51d394718bc09297262e368c1a481217fdeb71eb",v4QuoterAddress:"0x55d235b3ff2daf7c3ede0defc9521f1d6fe6c5c0"},M[I.UNICHAIN_SEPOLIA]={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1",quoterAddress:"0x6Dd37329A1A225a6Fca658265D460423DCafBF89",v3MigratorAddress:"0xb5FA244C9d6D04B2FBac84418b3c4910ED1Ae5f2",nonfungiblePositionManagerAddress:"0xB7F724d6dDDFd008eFf5cc2834edDE5F9eF0d075",tickLensAddress:"0x5f739c790a48E97eec0efb81bab5D152c0A0ecA0",swapRouter02Address:"0xd1AAE39293221B77B0C71fBD6dCb7Ea29Bb5B166",v4PoolManagerAddress:"0x00b036b58a818b1bc34d502d3fe730db729e62ac",v4PositionManagerAddress:"0xf969aee60879c54baaed9f3ed26147db216fd664",v4StateView:"0xc199f1072a74d4e905aba1a84d9a45e2546b6222",v4QuoterAddress:"0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472"},M[I.UNICHAIN]={v3CoreFactoryAddress:"0x1f98400000000000000000000000000000000003",multicallAddress:"0xb7610f9b733e7d45184be3a1bc966960ccc54f0b",quoterAddress:"0x565ac8c7863d9bb16d07e809ff49fe5cd467634c",v3MigratorAddress:"0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc",nonfungiblePositionManagerAddress:"0x943e6e07a7e8e791dafc44083e54041d743c46e9",tickLensAddress:"0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443",swapRouter02Address:"0x73855d06de49d0fe4a9c42636ba96c62da12ff9c",v4PoolManagerAddress:"0x1f98400000000000000000000000000000000004",v4PositionManagerAddress:"0x4529a01c7a0410167c5740c487a8de60232617bf",v4StateView:"0x86e8631a016f9068c3f085faf484ee3f5fdee8f2",v4QuoterAddress:"0x333e3c607b141b18ff6de9f258db6e77fe7491e0"},M[I.MONAD_TESTNET]={v3CoreFactoryAddress:"0x961235a9020b05c44df1026d956d1f4d78014276",multicallAddress:"0xa707ceb989cc3728551ed0e6e44b718dd114cf44",quoterAddress:"0x1ba215c17565de7b0cb7ecab971bcf540c24a862",v3MigratorAddress:"0x0a78348b71f8ae8caff2f8f9d4d74a2f36516661",nonfungiblePositionManagerAddress:"0x3dcc735c74f10fe2b9db2bb55c40fbbbf24490f7",tickLensAddress:"0x337478eb6058455ecb3696184b30dd6a29e3a893",swapRouter02Address:"0x4c4eabd5fb1d1a7234a48692551eaecff8194ca7"},M[I.SONEIUM]={v3CoreFactoryAddress:"0x42ae7ec7ff020412639d443e245d936429fbe717",multicallAddress:"0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2",quoterAddress:"0x3e6c707d0125226ff60f291b6bd1404634f00aba",v3MigratorAddress:"0xa107580f73bd797bd8b87ff24e98346d99f93ddb",nonfungiblePositionManagerAddress:"0x56c1205b0244332011c1e866f4ea5384eb6bfa2c",tickLensAddress:"0xcd08eefb928c86499e6235ac155906bb7c4dc41a",swapRouter02Address:"0x7e40db01736f88464e5f4e42394f3d5bbb6705b9",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0x1b35d13a2e2528f192637f14b05f0dc0e7deb566",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"},({})[I.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",({})[I.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",({})[I.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",({})[I.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",({})[I.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",(h=L||(L={}))[h.EXACT_INPUT=0]="EXACT_INPUT",h[h.EXACT_OUTPUT=1]="EXACT_OUTPUT",(E=W||(W={}))[E.ROUND_DOWN=0]="ROUND_DOWN",E[E.ROUND_HALF_UP=1]="ROUND_HALF_UP",E[E.ROUND_UP=2]="ROUND_UP";var em=X().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ey=er()(ee()),eA=er()(ef()),eh=((V={})[W.ROUND_DOWN]=ey.ROUND_DOWN,V[W.ROUND_HALF_UP]=ey.ROUND_HALF_UP,V[W.ROUND_UP]=ey.ROUND_UP,V),eE=((G={})[W.ROUND_DOWN]=0,G[W.ROUND_HALF_UP]=1,G[W.ROUND_UP]=3,G),eg=function(){function Fraction(f,r){void 0===r&&(r=X().BigInt(1)),this.numerator=X().BigInt(f),this.denominator=X().BigInt(r)}Fraction.tryParseFraction=function(f){if(f instanceof X()||"number"==typeof f||"string"==typeof f)return new Fraction(f);if("numerator"in f&&"denominator"in f)return f;throw Error("Could not parse fraction")};var f=Fraction.prototype;return f.invert=function(){return new Fraction(this.denominator,this.numerator)},f.add=function(f){var r=Fraction.tryParseFraction(f);return X().equal(this.denominator,r.denominator)?new Fraction(X().add(this.numerator,r.numerator),this.denominator):new Fraction(X().add(X().multiply(this.numerator,r.denominator),X().multiply(r.numerator,this.denominator)),X().multiply(this.denominator,r.denominator))},f.subtract=function(f){var r=Fraction.tryParseFraction(f);return X().equal(this.denominator,r.denominator)?new Fraction(X().subtract(this.numerator,r.numerator),this.denominator):new Fraction(X().subtract(X().multiply(this.numerator,r.denominator),X().multiply(r.numerator,this.denominator)),X().multiply(this.denominator,r.denominator))},f.lessThan=function(f){var r=Fraction.tryParseFraction(f);return X().lessThan(X().multiply(this.numerator,r.denominator),X().multiply(r.numerator,this.denominator))},f.equalTo=function(f){var r=Fraction.tryParseFraction(f);return X().equal(X().multiply(this.numerator,r.denominator),X().multiply(r.numerator,this.denominator))},f.greaterThan=function(f){var r=Fraction.tryParseFraction(f);return X().greaterThan(X().multiply(this.numerator,r.denominator),X().multiply(r.numerator,this.denominator))},f.multiply=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(X().multiply(this.numerator,r.numerator),X().multiply(this.denominator,r.denominator))},f.divide=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(X().multiply(this.numerator,r.denominator),X().multiply(this.denominator,r.numerator))},f.toSignificant=function(f,r,s){void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=W.ROUND_HALF_UP),Number.isInteger(f)||(0,K.Z)(!1),f>0||(0,K.Z)(!1),ey.set({precision:f+1,rounding:eh[s]});var l=new ey(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(f);return l.toFormat(l.decimalPlaces(),r)},f.toFixed=function(f,r,s){return void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=W.ROUND_HALF_UP),Number.isInteger(f)||(0,K.Z)(!1),f>=0||(0,K.Z)(!1),eA.DP=f,eA.RM=eE[s],new eA(this.numerator.toString()).div(this.denominator.toString()).toFormat(f,r)},_createClass(Fraction,[{key:"quotient",get:function(){return X().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new Fraction(X().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new Fraction(this.numerator,this.denominator)}}])}(),ev=er()(ef()),eT=function(f){function CurrencyAmount(r,s,l){var m;return m=f.call(this,s,l)||this,X().lessThanOrEqual(m.quotient,em)||(0,K.Z)(!1),m.currency=r,m.decimalScale=X().exponentiate(X().BigInt(10),X().BigInt(r.decimals)),m}_inheritsLoose(CurrencyAmount,f),CurrencyAmount.fromRawAmount=function(f,r){return new CurrencyAmount(f,r)},CurrencyAmount.fromFractionalAmount=function(f,r,s){return new CurrencyAmount(f,r,s)};var r=CurrencyAmount.prototype;return r.add=function(r){this.currency.equals(r.currency)||(0,K.Z)(!1);var s=f.prototype.add.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.subtract=function(r){this.currency.equals(r.currency)||(0,K.Z)(!1);var s=f.prototype.subtract.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.multiply=function(r){var s=f.prototype.multiply.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)}
1,r.divide=function(r){var s=f.prototype.divide.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.toSignificant=function(r,s,l){return void 0===r&&(r=6),void 0===l&&(l=W.ROUND_DOWN),f.prototype.divide.call(this,this.decimalScale).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=this.currency.decimals),void 0===l&&(l=W.ROUND_DOWN),r<=this.currency.decimals||(0,K.Z)(!1),f.prototype.divide.call(this,this.decimalScale).toFixed(r,s,l)},r.toExact=function(f){return void 0===f&&(f={groupSeparator:""}),ev.DP=this.currency.decimals,new ev(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(f)},_createClass(CurrencyAmount,[{key:"wrapped",get:function(){return this.currency.isToken?this:CurrencyAmount.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}])}(eg),e_=new eg(X().BigInt(100));function toPercent(f){return new eC(f.numerator,f.denominator)}var eC=function(f){function Percent(){var r;return r=f.apply(this,arguments)||this,r.isPercent=!0,r}_inheritsLoose(Percent,f);var r=Percent.prototype;return r.add=function(r){return toPercent(f.prototype.add.call(this,r))},r.subtract=function(r){return toPercent(f.prototype.subtract.call(this,r))},r.multiply=function(r){return toPercent(f.prototype.multiply.call(this,r))},r.divide=function(r){return toPercent(f.prototype.divide.call(this,r))},r.toSignificant=function(r,s,l){return void 0===r&&(r=5),f.prototype.multiply.call(this,e_).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=2),f.prototype.multiply.call(this,e_).toFixed(r,s,l)},Percent}(eg),ex=function(f){function Price(){for(var r,s,l,m,h,E=arguments.length,I=Array(E),w=0;w<E;w++)I[w]=arguments[w];if(4===I.length)s=I[0],l=I[1],m=I[2],h=I[3];else{var B=I[0].quoteAmount.divide(I[0].baseAmount),D=[I[0].baseAmount.currency,I[0].quoteAmount.currency,B.denominator,B.numerator];s=D[0],l=D[1],m=D[2],h=D[3]}return(r=f.call(this,h,m)||this).baseCurrency=s,r.quoteCurrency=l,r.scalar=new eg(X().exponentiate(X().BigInt(10),X().BigInt(s.decimals)),X().exponentiate(X().BigInt(10),X().BigInt(l.decimals))),r}_inheritsLoose(Price,f);var r=Price.prototype;return r.invert=function(){return new Price(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){this.quoteCurrency.equals(r.baseCurrency)||(0,K.Z)(!1);var s=f.prototype.multiply.call(this,r);return new Price(this.baseCurrency,r.quoteCurrency,s.denominator,s.numerator)},r.quote=function(r){r.currency.equals(this.baseCurrency)||(0,K.Z)(!1);var s=f.prototype.multiply.call(this,r);return eT.fromFractionalAmount(this.quoteCurrency,s.numerator,s.denominator)},r.toSignificant=function(f,r,s){return void 0===f&&(f=6),this.adjustedForDecimals.toSignificant(f,r,s)},r.toFixed=function(f,r,s){return void 0===f&&(f=4),this.adjustedForDecimals.toFixed(f,r,s)},_createClass(Price,[{key:"adjustedForDecimals",get:function(){return f.prototype.multiply.call(this,this.scalar)}}])}(eg),BaseCurrency=function(f,r,s,l){Number.isSafeInteger(f)||(0,K.Z)(!1),r>=0&&r<255&&Number.isInteger(r)||(0,K.Z)(!1),this.chainId=f,this.decimals=r,this.symbol=s,this.name=l},eI=function(f){function NativeCurrency(){var r;return r=f.apply(this,arguments)||this,r.isNative=!0,r.isToken=!1,r}return _inheritsLoose(NativeCurrency,f),NativeCurrency}(BaseCurrency);function validateAndParseAddress(f){try{return(0,ei.getAddress)(f)}catch(r){throw Error(f+" is not a valid address.")}}var ew=/^0x[0-9a-fA-F]{40}$/,eP=function(f){function Token(r,s,l,m,h,E,I,w){var B;return(B=f.call(this,r,l,m,h)||this).isNative=!1,B.isToken=!0,E?B.address=function(f){if(ew.test(f))return f;throw Error(f+" is not a valid address.")}(s):B.address=validateAndParseAddress(s),I&&(I.gte(ea.O$.from(0))||(0,K.Z)(!1)),w&&(w.gte(ea.O$.from(0))||(0,K.Z)(!1)),B.buyFeeBps=I,B.sellFeeBps=w,B}_inheritsLoose(Token,f);var r=Token.prototype;return r.equals=function(f){return f.isToken&&this.chainId===f.chainId&&this.address.toLowerCase()===f.address.toLowerCase()},r.sortsBefore=function(f){return this.chainId!==f.chainId&&(0,K.Z)(!1),this.address.toLowerCase()!==f.address.toLowerCase()||(0,K.Z)(!1),this.address.toLowerCase()<f.address.toLowerCase()},_createClass(Token,[{key:"wrapped",get:function(){return this}}])}(BaseCurrency),eB={1:new eP(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),11155111:new eP(11155111,"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",18,"WETH","Wrapped Ether"),3:new eP(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),4:new eP(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),5:new eP(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),42:new eP(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),10:new eP(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),69:new eP(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),11155420:new eP(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),42161:new eP(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),421611:new eP(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),421614:new eP(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),8453:new eP(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),84532:new eP(84532,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),56:new eP(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),137:new eP(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),43114:new eP(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX"),7777777:new eP(7777777,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),81457:new eP(81457,"0x4300000000000000000000000000000000000004",18,"WETH","Wrapped Ether"),324:new eP(324,"0
1x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",18,"WETH","Wrapped Ether"),480:new eP(480,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),1301:new eP(1301,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),130:new eP(130,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),10143:new eP(10143,"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",18,"WMON","Wrapped Monad"),1868:new eP(1868,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether")};function sortedInsert(f,r,s,l){if(s>0||(0,K.Z)(!1),f.length<=s||(0,K.Z)(!1),0===f.length)return f.push(r),null;var m=f.length===s;if(m&&0>=l(f[f.length-1],r))return r;for(var h=0,E=f.length;h<E;){var I=h+E>>>1;0>=l(f[I],r)?h=I+1:E=I}return f.splice(h,0,r),m?f.pop():null}(function(f){function Ether(r){return f.call(this,r,18,"ETH","Ether")||this}return _inheritsLoose(Ether,f),Ether.onChain=function(f){var r;return null!=(r=this._etherCache[f])?r:this._etherCache[f]=new Ether(f)},Ether.prototype.equals=function(f){return f.isNative&&f.chainId===this.chainId},_createClass(Ether,[{key:"wrapped",get:function(){var f=eB[this.chainId];return f||(0,K.Z)(!1),f}}])})(eI)._etherCache={};var eF=X().BigInt(Number.MAX_SAFE_INTEGER),eD=X().BigInt(0),eO=X().BigInt(1),ek=X().BigInt(2);function sqrt(f){var r,s;if(X().greaterThanOrEqual(f,eD)||(0,K.Z)(!1),X().lessThan(f,eF))return X().BigInt(Math.floor(Math.sqrt(X().toNumber(f))));for(r=f,s=X().add(X().divide(f,ek),eO);X().lessThan(s,r);)r=s,s=X().divide(X().add(X().divide(f,s),s),ek);return r}var eS=s(43898),eM=eo,eR="0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f",eN=X().BigInt(1e3),eL=X().BigInt(0),eq=X().BigInt(1),eU=X().BigInt(5),eH=X().BigInt(997),eW=X().BigInt(1e3),eV=X().BigInt(1e4),eG=new eC(eL),eZ=new eC(eq);function _arrayLikeToArray(f,r){(null==r||r>f.length)&&(r=f.length);for(var s=0,l=Array(r);s<r;s++)l[s]=f[s];return l}function v2_sdk_esm_defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function v2_sdk_esm_createClass(f,r,s){return r&&v2_sdk_esm_defineProperties(f.prototype,r),s&&v2_sdk_esm_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _createForOfIteratorHelperLoose(f,r){var s="undefined"!=typeof Symbol&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=function(f,r){if(f){if("string"==typeof f)return _arrayLikeToArray(f,r);var s=({}).toString.call(f).slice(8,-1);return"Object"===s&&f.constructor&&(s=f.constructor.name),"Map"===s||"Set"===s?Array.from(f):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?_arrayLikeToArray(f,r):void 0}}(f))||r&&f&&"number"==typeof f.length){s&&(f=s);var l=0;return function(){return l>=f.length?{done:!0}:{done:!1,value:f[l++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _getPrototypeOf(f){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)})(f)}function v2_sdk_esm_inheritsLoose(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,v2_sdk_esm_setPrototypeOf(f,r)}function _isNativeReflectConstruct(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(f){}return(_isNativeReflectConstruct=function(){return!!f})()}function v2_sdk_esm_setPrototypeOf(f,r){return(v2_sdk_esm_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}function _wrapNativeSuper(f){var r="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(f){if(null===f||!function(f){try{return -1!==Function.toString.call(f).indexOf("[native code]")}catch(r){return"function"==typeof f}}(f))return f;if("function"!=typeof f)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(f))return r.get(f);r.set(f,Wrapper)}function Wrapper(){return function(f,r,s){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var l=[null];l.push.apply(l,r);var m=new(f.bind.apply(f,l));return s&&v2_sdk_esm_setPrototypeOf(m,s.prototype),m}(f,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(f.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),v2_sdk_esm_setPrototypeOf(Wrapper,f)})(f)}var eX="setPrototypeOf"in Object,ej=function(f){function InsufficientReservesError(){var r;return(r=f.call(this)||this).isInsufficientReservesError=!0,r.name=r.constructor.name,eX&&Object.setPrototypeOf(r,(this instanceof InsufficientReservesError?this.constructor:void 0).prototype),r}return v2_sdk_esm_inheritsLoose(InsufficientReservesError,f),InsufficientReservesError}(_wrapNativeSuper(Error)),eQ=function(f){function InsufficientInputAmountError(){var r;return(r=f.call(this)||this).isInsufficientInputAmountError=!0,r.name=r.constructor.name,eX&&Object.setPrototypeOf(r,(this instanceof InsufficientInputAmountError?this.constructor:void 0).prototype),r}return v2_sdk_esm_inheritsLoose(InsufficientInputAmountError,f),InsufficientInputAmountError}(_wrapNativeSuper(Error)),computePairAddress=function(f){var r=f.factoryAddress,s=f.tokenA,l=f.tokenB,m=s.sortsBefore(l)?[s,l]:[l,s],h=m[0],E=m[1];return(0,ei.getCreate2Address)(r,(0,eS.keccak256)(["bytes"],[(0,eS.pack)(["address","address"],[h.address,E.address])]),eR)},eK=function(){function Pair(f,r){var s=f.currency.sortsBefore(r.currency)?[f,r]:[r,f];this.liquidityToken=new eP(s[0].currency.chainId,Pair.getAddress(s[0].currency,s[1].currency),18,"UNI-V2","Uniswap V2"),this.tokenAmounts=s}Pair.getAddress=function(f,r){var s;return computePairAddress({factoryAddress:null!=(s=eM[f.chainId])?s:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",tokenA:f,tokenB:r})};var f=Pair.prototype;return f.involvesToken=function(f){return f.equals(this.token0)||f.equals(this.token1)},f.priceOf=function(f){return this.involvesToken(f)||(0,K.Z)(!1),f.equals(this.token0)?this.token0Price:this.token1Price},f.reserveOf=function(f){return this.involvesToken(f)||(0,K.Z)(!1),f.equals(this.token0)?this.reserve0:this.reserve1},f.getOutputAmount=function(f,r){if(void 0===r&&(r=!0),this.involvesToken(f.currency)||(0,K.Z)(!1),X().equal(this.reserve0.quotient,eL)||X().equal(this.reserve1.quotient,eL))throw new ej;var s=this.reserveOf(f.currency),l=this.reserveOf(f.currency.equals(this.token0)?this.token1:this.token0),m=r?this.derivePercentAfterSellFees(f):eG,h=m.greaterThan(eG)?eT.fromRawAmount(f.currency,m.multiply(f).quotient):f,E=X().multiply(h.quotient,eH),I=X().multiply(E,l.quotient),w=X().add(X().multiply(s.quotient,eW),E),B=eT.fromRawAmount(f.currency.equals(this.token0)?this.token1:this.token0,X().divide(I,w));if(X().equal(B.quotient,eL))throw new eQ;var D=r?this.derivePercentAfterBuyFees(B):eG,M=D.greaterThan(eG)?eT.fromRawAmount(B.currency,B.multiply(D).quotient):B;if(X().equal(M.quotient,eL))throw new eQ;return[M,new Pair(s.add(h),l.subtract(M))]},f.getInputAmount=function(f,r){void 0===r&&(r=!0),this.involvesToken(f.currency)||(0,K.Z)(!1);var s=r?this.derivePercentAfterBuyFees(f):eG,l=s.greaterThan(eG)?eT.fromRawAmount(f.currency,X().add(f.divide(s).quotient,eq)):f;if(X().equal(this.reserve0.quotient,eL)||X().equal(this.reserve1.quotient,eL)||X().greaterThanOrEqual(f.quotient,this.reserveOf(f.currency).quotient)||X().greaterThanOrEqual(l.quotient,this.reserveOf(f.currency).quotient))throw new ej;var m=this.reserveOf(f.currency),h=this.reserveOf(f.currency.equals(this.token0)?this.token1:this.token0),E=X().multiply(X().multiply(h.quotient,l.quotient),eW),I=X().multiply(X().subtract(m.quotient,l.quotient),eH),w=eT.fromRawAmount(f.currency.equals(this.token0)?this.token1:this.token0,X().add(X().divide(E,I),eq)),B=r?this.derivePercentAfterSellFees(w):eG;return[B.greaterThan(eG)?eT.fromRawAmount(w.currency,X().add(w.divide(B).quotient,eq)):w,new Pair(h.add(w),m.subtract(f))]},f.getLiquidityMinted=function(f,r,s){f.currency.equals(this.liquidityToken)||(0,K.Z)(!1);var l,m=r.currency.sortsBefore(s.currency)?[r,s]:[s,r];if(m[0].currency.equals(this.token0)&&m[1].currency.equals(this.token1)||(0,K.Z)(!1),X().equal(f.quotient,eL))l=X().subtract(sqrt(X().multiply(m[0].quotient,m[1].quotient)),eN);else{var h=X().divide(X().multiply(m[0].quotient,f.quotient),this.reserve0.quotient),E=X().divide(X().multiply(m[1].quotient,f.quotient),this.reserve1.quotient);l=X().lessThanOrEqual(h,E)?h:E}if(!X().greaterThan(l,eL))throw new eQ;return eT.fromRawAmount(this.liquidityToken,l)},f.getLiquidityValue=function(f,r,s,l,m){if(void 0===l&&(l=!1),this.involvesToken(f)||(0,K.Z)(!1),r.currency.equals(this.liquidityToken)||(0,K.Z)(!1),s.currency.equals(this.liquidityToken)||(0,K.Z)(!1),X().lessThanOrEqual(s.quotient,r.quotient)||(0,K.Z)(!1),l){m||(0,K.Z)(!1);var h,E=X().BigInt(m);if(X().equal(E,eL))h=r;else{var I=sqrt(X().multiply(this.reserve0.quotient,this.reserve1.quotient)),w=sqrt(E);if(X().greaterThan(I,w)){var B=X().multiply(r.quotient,X().subtract(I,w)),D=X().add(X().multiply(I,eU),w),M=X().divide(B,D);h=r.add(eT.fromRawAmount(this.liquidityToken,M))}else h=r}}else h=r;return eT.fromRawAmount(f,X().divide(X().multiply(s.quotient,this.reserveOf(f).quotient),h.quotient))},f.derivePercentAfterSellFees=function(f){var r=this.token0.wrapped.equals(f.wrapped.currency)?this.token0.wrapped.sellFeeBps:this.token1.wrapped.sellFeeBps;return null!=r&&r.gt(ea.O$.from(0))?eZ.subtract(new eC(X().BigInt(r)).divide(eV)):eG},f.derivePercentAfterBuyFees=function(f){var r=this.token0.wrapped.equals(f.wrapped.currency)?this.token0.wrapped.buyFeeBps:this.token1.wrapped.buyFeeBps;return null!=r&&r.gt(ea.O$.from(0))?eZ.subtract(new eC(X().BigInt(r)).divide(eV)):eG},v2_sdk_esm_createClass(Pair,[{key:"token0Price",get:function(){var f=this.tokenAmounts[1].divide(this.tokenAmounts[0]);return new ex(this.token0,this.token1,f.denominator,f.numerator)}},{key:"token1Price",get:function(){var f=this.tokenAmounts[0].divide(this.tokenAmounts[1]);return new ex(this.token1,this.token0,f.denominator,f.numerator)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].currency}},{key:"token1",get:function(){return this.tokenAmounts[1].currency}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}])}(),eY=v2_sdk_esm_createClass(function(f,r,s){this._midPrice=null,f.length>0||(0,K.Z)(!1);var l=f[0].chainId;f.every(function(f){return f.chainId===l})||(0,K.Z)(!1);var m=r.wrapped;f[0].involvesToken(m)||(0,K.Z)(!1),void 0===s||f[f.length-1].involvesToken(s.wrapped)||(0,K.Z)(!1);for(var h,E=[m],I=_createForOfIteratorHelperLoose(f.entries());!(h=I()).done;){var w=h.value,B=w[0],D=w[1],M=E[B];M.equals(D.token0)||M.equals(D.token1)||(0,K.Z)(!1);var L=M.equals(D.token0)?D.token1:D.token0;E.push(L)}this.pairs=f,this.path=E,this.input=r,this.output=s}
1,[{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;for(var f,r=[],s=_createForOfIteratorHelperLoose(this.pairs.entries());!(f=s()).done;){var l=f.value,m=l[0],h=l[1];r.push(this.path[m].equals(h.token0)?new ex(h.reserve0.currency,h.reserve1.currency,h.reserve0.quotient,h.reserve1.quotient):new ex(h.reserve1.currency,h.reserve0.currency,h.reserve1.quotient,h.reserve0.quotient))}var E=r.slice(1).reduce(function(f,r){return f.multiply(r)},r[0]);return this._midPrice=new ex(this.input,this.output,E.denominator,E.numerator)}},{key:"chainId",get:function(){return this.pairs[0].chainId}}]);function inputOutputComparator(f,r){return(f.inputAmount.currency.equals(r.inputAmount.currency)||(0,K.Z)(!1),f.outputAmount.currency.equals(r.outputAmount.currency)||(0,K.Z)(!1),f.outputAmount.equalTo(r.outputAmount))?f.inputAmount.equalTo(r.inputAmount)?0:f.inputAmount.lessThan(r.inputAmount)?-1:1:f.outputAmount.lessThan(r.outputAmount)?1:-1}function tradeComparator(f,r){var s=inputOutputComparator(f,r);return 0!==s?s:f.priceImpact.lessThan(r.priceImpact)?-1:f.priceImpact.greaterThan(r.priceImpact)?1:f.route.path.length-r.route.path.length}var ez=function(){function Trade(f,r,s){this.route=f,this.tradeType=s;var l,m,h,E,I,w=Array(f.path.length);if(s===L.EXACT_INPUT){r.currency.equals(f.input)||(0,K.Z)(!1),w[0]=r.wrapped;for(var B=0;B<f.path.length-1;B++){var D=f.pairs[B].getOutputAmount(w[B])[0];w[B+1]=D}this.inputAmount=eT.fromFractionalAmount(f.input,r.numerator,r.denominator),this.outputAmount=eT.fromFractionalAmount(f.output,w[w.length-1].numerator,w[w.length-1].denominator)}else{r.currency.equals(f.output)||(0,K.Z)(!1),w[w.length-1]=r.wrapped;for(var M=f.path.length-1;M>0;M--){var W=f.pairs[M-1].getInputAmount(w[M])[0];w[M-1]=W}this.inputAmount=eT.fromFractionalAmount(f.input,w[0].numerator,w[0].denominator),this.outputAmount=eT.fromFractionalAmount(f.output,r.numerator,r.denominator)}this.executionPrice=new ex(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient),this.priceImpact=(l=f.midPrice,m=this.inputAmount,h=this.outputAmount,I=(E=l.quote(m)).subtract(h).divide(E),new eC(I.numerator,I.denominator))}Trade.exactIn=function(f,r){return new Trade(f,r,L.EXACT_INPUT)},Trade.exactOut=function(f,r){return new Trade(f,r,L.EXACT_OUTPUT)};var f=Trade.prototype;return f.minimumAmountOut=function(f){if(f.lessThan(eL)&&(0,K.Z)(!1),this.tradeType===L.EXACT_OUTPUT)return this.outputAmount;var r=new eg(eq).add(f).invert().multiply(this.outputAmount.quotient).quotient;return eT.fromRawAmount(this.outputAmount.currency,r)},f.maximumAmountIn=function(f){if(f.lessThan(eL)&&(0,K.Z)(!1),this.tradeType===L.EXACT_INPUT)return this.inputAmount;var r=new eg(eq).add(f).multiply(this.inputAmount.quotient).quotient;return eT.fromRawAmount(this.inputAmount.currency,r)},Trade.bestTradeExactIn=function(f,r,s,l,m,h,E){var I=void 0===l?{}:l,w=I.maxNumResults,B=void 0===w?3:w,D=I.maxHops,M=void 0===D?3:D;void 0===m&&(m=[]),void 0===h&&(h=r),void 0===E&&(E=[]),f.length>0||(0,K.Z)(!1),M>0||(0,K.Z)(!1),r===h||m.length>0||(0,K.Z)(!1);for(var W=h.wrapped,V=s.wrapped,G=0;G<f.length;G++){var Z=f[G];if((Z.token0.equals(W.currency)||Z.token1.equals(W.currency))&&!(Z.reserve0.equalTo(eL)||Z.reserve1.equalTo(eL))){var X=void 0;try{X=Z.getOutputAmount(W)[0]}catch(f){if(f.isInsufficientInputAmountError)continue;throw f}if(X.currency.equals(V))sortedInsert(E,new Trade(new eY([].concat(m,[Z]),r.currency,s),r,L.EXACT_INPUT),B,tradeComparator);else if(M>1&&f.length>1){var $=f.slice(0,G).concat(f.slice(G+1,f.length));Trade.bestTradeExactIn($,r,s,{maxNumResults:B,maxHops:M-1},[].concat(m,[Z]),X,E)}}}return E},f.worstExecutionPrice=function(f){return new ex(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(f).quotient,this.minimumAmountOut(f).quotient)},Trade.bestTradeExactOut=function(f,r,s,l,m,h,E){var I=void 0===l?{}:l,w=I.maxNumResults,B=void 0===w?3:w,D=I.maxHops,M=void 0===D?3:D;void 0===m&&(m=[]),void 0===h&&(h=s),void 0===E&&(E=[]),f.length>0||(0,K.Z)(!1),M>0||(0,K.Z)(!1),s===h||m.length>0||(0,K.Z)(!1);for(var W=h.wrapped,V=r.wrapped,G=0;G<f.length;G++){var Z=f[G];if((Z.token0.equals(W.currency)||Z.token1.equals(W.currency))&&!(Z.reserve0.equalTo(eL)||Z.reserve1.equalTo(eL))){var X=void 0;try{X=Z.getInputAmount(W)[0]}catch(f){if(f.isInsufficientReservesError)continue;throw f}if(X.currency.equals(V))sortedInsert(E,new Trade(new eY([Z].concat(m),r,s.currency),s,L.EXACT_OUTPUT),B,tradeComparator);else if(M>1&&f.length>
11){var $=f.slice(0,G).concat(f.slice(G+1,f.length));Trade.bestTradeExactOut($,r,s,{maxNumResults:B,maxHops:M-1},[Z].concat(m),X,E)}}}return E},Trade}();function toHex(f){return"0x"+f.quotient.toString(16)}var eJ=function(){function Router(){}return Router.swapCallParameters=function(f,r){var s,l,m,h=f.inputAmount.currency.isNative,E=f.outputAmount.currency.isNative;h&&E&&(0,K.Z)(!1),"ttl"in r&&!(r.ttl>0)&&(0,K.Z)(!1);var I=validateAndParseAddress(r.recipient),w=toHex(f.maximumAmountIn(r.allowedSlippage)),B=toHex(f.minimumAmountOut(r.allowedSlippage)),D=f.route.path.map(function(f){return f.address}),M="ttl"in r?"0x"+(Math.floor(new Date().getTime()/1e3)+r.ttl).toString(16):"0x"+r.deadline.toString(16),W=!!r.feeOnTransfer;switch(f.tradeType){case L.EXACT_INPUT:h?(s=W?"swapExactETHForTokensSupportingFeeOnTransferTokens":"swapExactETHForTokens",l=[B,D,I,M],m=w):(s=E?W?"swapExactTokensForETHSupportingFeeOnTransferTokens":"swapExactTokensForETH":W?"swapExactTokensForTokensSupportingFeeOnTransferTokens":"swapExactTokensForTokens",l=[w,B,D,I,M],m="0x0");break;case L.EXACT_OUTPUT:W&&(0,K.Z)(!1),h?(s="swapETHForExactTokens",l=[B,D,I,M],m=w):(s=E?"swapTokensForExactETH":"swapTokensForExactTokens",l=[B,w,D,I,M],m="0x0")}return{methodName:s,args:l,value:m}},Router}()},46989:function(f,r,s){var l;!function(m){"use strict";var h,E="[big.js] ",I=E+"Invalid ",w=I+"decimal places",B=I+"rounding mode",D=E+"Division by zero",M={},L=void 0,W=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function round(f,r,s,l){var m=f.c,h=f.e+r+1;if(h<m.length){if(1===s)l=m[h]>=5;else if(2===s)l=m[h]>5||5==m[h]&&(l||h<0||m[h+1]!==L||1&m[h-1]);else if(3===s)l=l||!!m[0];else if(l=!1,0!==s)throw Error(B);if(h<1)m.length=1,l?(f.e=-r,m[0]=1):m[0]=f.e=0;else{if(m.length=h--,l)for(;++m[h]>9;)m[h]=0,h--||(++f.e,m.unshift(1));for(h=m.length;!m[--h];)m.pop()}}else if(s<0||s>3||s!==~~s)throw Error(B);return f}function stringify(f,r,s,l){var m,h,E=f.constructor,B=!f.c[0];if(s!==L){if(s!==~~s||s<(3==r)||s>1e6)throw Error(3==r?I+"precision":w);for(s=l-(f=new E(f)).e,f.c.length>++l&&round(f,s,E.RM),2==r&&(l=f.e+s+1);f.c.length<l;)f.c.push(0)}if(m=f.e,s=(h=f.c.join("")).length,2!=r&&(1==r||3==r&&l<=m||m<=E.NE||m>=E.PE))h=h.charAt(0)+(s>1?"."+h.slice(1):"")+(m<0?"e":"e+")+m;else if(m<0){for(;++m;)h="0"+h;h="0."+h}else if(m>0){if(++m>s)for(m-=s;m--;)h+="0";else m<s&&(h=h.slice(0,m)+"."+h.slice(m))}else s>1&&(h=h.charAt(0)+"."+h.slice(1));return f.s<0&&(!B||4==r)?"-"+h:h}M.abs=function(){var f=new this.constructor(this);return f.s=1,f},M.cmp=function(f){var r,s=this.c,l=(f=new this.constructor(f)).c,m=this.s,h=f.s,E=this.e,I=f.e;if(!s[0]||!l[0])return s[0]?m:l[0]?-h:0;if(m!=h)return m;if(r=m<0,E!=I)return E>I^r?1:-1;for(m=-1,h=(E=s.length)<(I=l.length)?E:I;++m<h;)if(s[m]!=l[m])return s[m]>l[m]^r?1:-1;return E==I?0:E>I^r?1:-1},M.div=function(f){var r=this.constructor,s=this.c,l=(f=new r(f)).c,m=this.s==f.s?1:-1,h=r.DP;if(h!==~~h||h<0||h>1e6)throw Error(w);if(!l[0])throw Error(D);if(!s[0])return new r(0*m);var E,I,B,M,W,V=l.slice(),G=E=l.length,Z=s.length,X=s.slice(0,E),K=X.length,$=f,ee=$.c=[],et=0,ef=h+($.e=this.e-f.e)+1;for($.s=m,m=ef<0?0:ef,V.unshift(0);K++<E;)X.push(0);do{for(B=0;B<10;B++){if(E!=(K=X.length))M=E>K?1:-1;else for(W=-1,M=0;++W<E;)if(l[W]!=X[W]){M=l[W]>X[W]?1:-1;break}if(M<0){for(I=K==E?l:V;K;){if(X[--K]<I[K]){for(W=K;W&&!X[--W];)X[W]=9;--X[W],X[K]+=10}X[K]-=I[K]}for(;!X[0];)X.shift()}else break}ee[et++]=M?B:++B,X[0]&&M?X[K]=s[G]||0:X=[s[G]]}while((G++<Z||X[0]!==L)&&m--);return!ee[0]&&1!=et&&(ee.shift(),$.e--),et>ef&&round($,h,r.RM,X[0]!==L),$},M.eq=function(f){return!this.cmp(f)},M.gt=function(f){return this.cmp(f)>0},M.gte=function(f){return this.cmp(f)>-1},M.lt=function(f){return 0>this.cmp(f)},M.lte=function(f){return 1>this.cmp(f)},M.minus=M.sub=function(f){var r,s,l,m,h=this.constructor,E=this.s,I=(f=new h(f)).s;if(E!=I)return f.s=-I,this.plus(f);var w=this.c.slice(),B=this.e,D=f.c,M=f.e;if(!w[0]||!D[0])return D[0]?(f.s=-I,f):new h(w[0]?this:0);if(E=B-M){for((m=E<0)?(E=-E,l=w):(M=B,l=D),l.reverse(),I=E;I--;)l.push(0);l.reverse()}else for(s=((m=w.length<D.length)?w:D).length,E=I=0;I<s;I++)if(w[I]!=D[I]){m=w[I]<D[I];break}if(m&&(l=w,w=D,D=l,f.s=-f.s),(I=(s=D.length)-(r=w.length))>0)for(;I--;)w[r++]=0;for(I=r;s>E;){if(w[--s]<D[s]){for(r=s;r&&!w[--r];)w[r]=9;--w[r],w[s]+=10}w[s]-=D[s]}for(;0===w[--I];)w.pop();for(;0===w[0];)w.shift(),--M;return w[0]||(f.s=1,w=[M=0]),f.c=w,f.e=M,f},M.mod=function(f){var r,s=this,l=s.constructor,m=s.s,h=(f=new l(f)).s;if(!f.c[0])throw Error(D);return(s.s=f.s=1,r=1==f.cmp(s),s.s=m,f.s=h,r)?new l(s):(m=l.DP,h=l.RM,l.DP=l.RM=0,s=s.div(f),l.DP=m,l.RM=h,this.minus(s.times(f)))},M.plus=M.add=function(f){var r,s=this.constructor,l=this.s,m=(f=new s(f)).s;if(l!=m)return f.s=-m,this.minus(f);var h=this.e,E=this.c,I=f.e,w=f.c;if(!E[0]||!w[0])return w[0]?f:new s(E[0]?this:0*l);if(E=E.slice(),l=h-I){for(l>0?(I=h,r=w):(l=-l,r=E),r.reverse();l--;)r.push(0);r.reverse()}for(E.length-w.length<0&&(r=w,w=E,E=r),l=w.length,m=0;l;E[l]%=10)m=(E[--l]=E[l]+w[l]+m)/10|0;for(m&&(E.unshift(m),++I),l=E.length;0===E[--l];)E.pop();return f.c=E,f.e=I,f},M.pow=function(f){var r=this,s=new r.constructor(1),l=s,m=f<0;if(f!==~~f||f<-1e6||f>1e6)throw Error(I+"exponent");for(m&&(f=-f);1&f&&(l=l.times(r)),f>>=1;)r=r.times(r);return m?s.div(l):l},M.round=function(f,r){var s=this.constructor;if(f===L)f=0;else if(f!==~~f||f<-1e6||f>1e6)throw Error(w);return round(new s(this),f,r===L?s.RM:r)},M.sqrt=function(){var f,r,s,l=this.constructor,m=this.s,h=this.e,I=new l(.5);if(!this.c[0])return new l(this);if(m<0)throw Error(E+"No square root");0===(m=Math.sqrt(this+""))||m===1/0?((r=this.c.join("")).length+h&1||(r+="0"),m=Math.sqrt(r),h=((h+1)/2|0)-(h<0||1&h),f=new l((m==1/0?"1e":(m=m.toExponential()).slice(0,m.indexOf("e")+1))+h)):f=new l(m),h=f.e+(l.DP+=4);do s=f,f=I.times(s.plus(this.div(s)));while(s.c.slice(0,h).join("")!==f.c.slice(0,h).join(""));return round(f,l.DP-=4,l.RM)},M.times=M.mul=function(f){var r,s=this.constructor,l=this.c,m=(f=new s(f)).c,h=l.length,E=m.length,I=this.e,w=f.e;if(f.s=this.s==f.s?1:-1,!l[0]||!m[0])return new s(0*f.s);for(f.e=I+w,h<E&&(r=l,l=m,m=r,w=h,h=E,E=w),r=Array(w=h+E);w--;)r[w]=0;for(I=E;I--;){for(E=0,w=h+I;w>I;)E=r[w]+m[I]*l[w-I-1]+E,r[w--]=E%10,E=E/10|0;r[w]=(r[w]+E)%10}
1for(E?++f.e:r.shift(),I=r.length;!r[--I];)r.pop();return f.c=r,f},M.toExponential=function(f){return stringify(this,1,f,f)},M.toFixed=function(f){return stringify(this,2,f,this.e+f)},M.toPrecision=function(f){return stringify(this,3,f,f-1)},M.toString=function(){return stringify(this)},M.valueOf=M.toJSON=function(){return stringify(this,4)},(h=function _Big_(){function Big(f){if(!(this instanceof Big))return f===L?_Big_():new Big(f);f instanceof Big?(this.s=f.s,this.e=f.e,this.c=f.c.slice()):function(f,r){var s,l,m;if(0===r&&1/r<0)r="-0";else if(!W.test(r+=""))throw Error(I+"number");for(f.s="-"==r.charAt(0)?(r=r.slice(1),-1):1,(s=r.indexOf("."))>-1&&(r=r.replace(".","")),(l=r.search(/e/i))>0?(s<0&&(s=l),s+=+r.slice(l+1),r=r.substring(0,l)):s<0&&(s=r.length),m=r.length,l=0;l<m&&"0"==r.charAt(l);)++l;if(l==m)f.c=[f.e=0];else{for(;m>0&&"0"==r.charAt(--m););for(f.e=s-l-1,f.c=[],s=0;l<=m;)f.c[s++]=+r.charAt(l++)}return f}(this,f),this.constructor=Big}return Big.prototype=M,Big.DP=20,Big.RM=1,Big.NE=-7,Big.PE=21,Big.version="5.2.2",Big}()).default=h.Big=h,void 0!==(l=(function(){return h}).call(r,s,r,f))&&(f.exports=l)}(0)},11938:function(f,r,s){"use strict";s.r(r),s.d(r,{ADDRESS_ZERO:function(){return ez},FACTORY_ADDRESS:function(){return eY},FeeAmount:function(){return K},FullMath:function(){return e3},LiquidityMath:function(){return te},Multicall:function(){return tA},NoTickDataProvider:function(){return ta},NonfungiblePositionManager:function(){return t_},POOL_INIT_CODE_HASH:function(){return eJ},Payments:function(){return tE},Pool:function(){return tl},Position:function(){return tb},PositionLibrary:function(){return ts},Route:function(){return tm},SelfPermit:function(){return th},SqrtPriceMath:function(){return e4},Staker:function(){return tx},SwapMath:function(){return e7},SwapQuoter:function(){return tC},SwapRouter:function(){return tI},TICK_SPACINGS:function(){return e$},Tick:function(){return Tick},TickLibrary:function(){return tc},TickList:function(){return ti},TickListDataProvider:function(){return td},TickMath:function(){return tr},Trade:function(){return ty},computePoolAddress:function(){return computePoolAddress},encodeRouteToPath:function(){return encodeRouteToPath},encodeSqrtRatioX96:function(){return encodeSqrtRatioX96},isSorted:function(){return isSorted},maxLiquidityForAmounts:function(){return maxLiquidityForAmounts},mostSignificantBit:function(){return mostSignificantBit},nearestUsableTick:function(){return nearestUsableTick},poolInitCodeHash:function(){return poolInitCodeHash},priceToClosestTick:function(){return priceToClosestTick},subIn256:function(){return subIn256},tickToPrice:function(){return tickToPrice},toHex:function(){return toHex},tradeComparator:function(){return tradeComparator},v3Swap:function(){return v3Swap}});var l,m,h,E,I,w,B,D,M,L,W,V,G,Z,X,K,$=s(28518),ee=s.n($),et=s(4554),ef=s(39585),en=s.n(ef),er=s(16406),ea=s.n(er),ei=s(8064),eo=s.n(ei),es=s(39898),eu=s(13858),ec=s(89388),ed=s(30887),ep=s(65017);function _defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function _createClass(f,r,s){return r&&_defineProperties(f.prototype,r),s&&_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _inheritsLoose(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,_setPrototypeOf(f,r)}function _setPrototypeOf(f,r){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}(l=w||(w={}))[l.MAINNET=1]="MAINNET",l[l.GOERLI=5]="GOERLI",l[l.SEPOLIA=11155111]="SEPOLIA",l[l.OPTIMISM=10]="OPTIMISM",l[l.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",l[l.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",l[l.ARBITRUM_ONE=42161]="ARBITRUM_ONE",l[l.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",l[l.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",l[l.POLYGON=137]="POLYGON",l[l.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",l[l.CELO=42220]="CELO",l[l.CELO_ALFAJORES=44787]="CELO_ALFAJORES",l[l.GNOSIS=100]="GNOSIS",l[l.MOONBEAM=1284]="MOONBEAM",l[l.BNB=56]="BNB",l[l.AVALANCHE=43114]="AVALANCHE",l[l.BASE_GOERLI=84531]="BASE_GOERLI",l[l.BASE_SEPO
1LIA=84532]="BASE_SEPOLIA",l[l.BASE=8453]="BASE",l[l.ZORA=7777777]="ZORA",l[l.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",l[l.ROOTSTOCK=30]="ROOTSTOCK",l[l.BLAST=81457]="BLAST",l[l.ZKSYNC=324]="ZKSYNC",l[l.WORLDCHAIN=480]="WORLDCHAIN",l[l.UNICHAIN_SEPOLIA=1301]="UNICHAIN_SEPOLIA",l[l.UNICHAIN=130]="UNICHAIN",l[l.MONAD_TESTNET=10143]="MONAD_TESTNET",l[l.SONEIUM=1868]="SONEIUM",w.MAINNET,w.OPTIMISM,w.OPTIMISM_GOERLI,w.OPTIMISM_SEPOLIA,w.ARBITRUM_ONE,w.ARBITRUM_GOERLI,w.ARBITRUM_SEPOLIA,w.POLYGON,w.POLYGON_MUMBAI,w.GOERLI,w.SEPOLIA,w.CELO_ALFAJORES,w.CELO,w.BNB,w.AVALANCHE,w.BASE,w.BASE_GOERLI,w.BASE_SEPOLIA,w.ZORA,w.ZORA_SEPOLIA,w.ROOTSTOCK,w.BLAST,w.ZKSYNC,w.WORLDCHAIN,w.UNICHAIN_SEPOLIA,w.UNICHAIN,w.MONAD_TESTNET,w.SONEIUM,(m=B||(B={})).ETHER="ETH",m.MATIC="MATIC",m.CELO="CELO",m.GNOSIS="XDAI",m.MOONBEAM="GLMR",m.BNB="BNB",m.AVAX="AVAX",m.ROOTSTOCK="RBTC",w.MAINNET,w.GOERLI,w.SEPOLIA,w.OPTIMISM,w.ARBITRUM_ONE,w.POLYGON,w.POLYGON_MUMBAI,w.SEPOLIA,(D={})[w.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",D[w.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",D[w.SEPOLIA]="0xF62c03E08ada871A0bEb309762E260a7a6a880E6",D[w.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",D[w.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",D[w.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",D[w.BASE_SEPOLIA]="0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e",D[w.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",D[w.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",D[w.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",D[w.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",D[w.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",D[w.WORLDCHAIN]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",D[w.UNICHAIN_SEPOLIA]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",D[w.UNICHAIN]="0x1f98400000000000000000000000000000000002",D[w.MONAD_TESTNET]="0x733e88f248b742db6c14c0b1713af5ad7fdd59d0",D[w.SONEIUM]="0x97febbc2adbd5644ba22736e962564b23f5828ce",(M={})[w.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",M[w.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",M[w.SEPOLIA]="0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3",M[w.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",M[w.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",M[w.BASE_SEPOLIA]="0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",M[w.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",M[w.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",M[w.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",M[w.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",M[w.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",M[w.WORLDCHAIN]="0x541aB7c31A119441eF3575F6973277DE0eF460bd",M[w.UNICHAIN_SEPOLIA]="0x920b806E40A00E02E7D2b94fFc89860fDaEd3640",M[w.UNICHAIN]="0x284f11109359a7e1306c3e447ef14d38400063ff",M[w.MONAD_TESTNET]="0xfb8e1c3b833f9e67a71c859a132cf783b645e436",M[w.SONEIUM]="0x273f68c234fa55b550b40e563c4a488e0d334320";var el={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},eb=_extends({},el,{mixedRouteQuoterV1Address:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E",v4PoolManagerAddress:"0x000000000004444c5dc75cB358380D2e3dE08A90",v4PositionManagerAddress:"0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e",v4StateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",v4QuoterAddress:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203"}),em=_extends({},el,{mixedRouteQuoterV1Address:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),ey=_extends({},el,{v4PoolManagerAddress:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",v4PositionManagerAddress:"0x3c3ea4b57a46241e54610e5f022e5c45859a1017",v4StateView:"0xc18a3169788f4f75a170290584eca6395c75ecdb",v4QuoterAddress:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7"}),eA=_extends({},el,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0xd88f38f930b7952f2db2432cb002e7abbf3dd869",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"}),eh=_extends({},el,{v4PoolManagerAddress:"0x67366782805870060151383f4bbff9dab53e5cd6",v4PositionManagerAddress:"0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9",v4StateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",v4QuoterAddress:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9"}),eE={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"};(L={})[w.MAINNET]=eb,L[w.OPTIMISM]=ey,L[w.ARBITRUM_ONE]=eA,L[w.POLYGON]=eh,L[w.POLYGON_MUMBAI]=eh,L[w.GOERLI]=em,L[w.CELO]=eE,L[w.CELO_ALFAJORES]=eE,L[w.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117
1ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",v4PoolManagerAddress:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",v4PositionManagerAddress:"0x7a4a5c919ae2541aed11041a1aeee68f1287f95b",v4StateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",v4QuoterAddress:"0x9f75dd27d6664c475b90e105573e550ff69437b0"},L[w.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},L[w.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},L[w.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},L[w.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E",v4PoolManagerAddress:"0xFB3e0C6F74eB1a21CC1Da29aeC80D2Dfe6C9a317",v4PositionManagerAddress:"0xAc631556d3d4019C95769033B5E719dD77124BAc",v4StateView:"0x9d467fa9062b6e9b1a46e26007ad82db116c67cb",v4QuoterAddress:"0x7de51022d70a725b508085468052e25e22b5c4c9"},L[w.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",mixedRouteQuoterV2Address:"0x4745f77b56a0e2294426e3936dc4fab68d9543cd",v4PoolManagerAddress:"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",v4PositionManagerAddress:"0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4",v4StateView:"0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c",v4QuoterAddress:"0x61b3f2011a92d183c7dbadbda940a7555ccf9227"},L[w.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",v4PoolManagerAddress:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",v4PositionManagerAddress:"0xb74b1f14d2754acfcbbe1a221023a5cf50ab8acd",v4StateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",v4QuoterAddress:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2"},L[w.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapR
1outer02Address:"0x2626664c2603336E57B271c5C0b26F421741e481",mixedRouteQuoterV1Address:"0xe544efae946f0008ae9a8d64493efa7886b73776",v4PoolManagerAddress:"0x498581ff718922c3f8e6a244956af099b2652b2b",v4PositionManagerAddress:"0x7c5f5a4bbd8fd63184577525326123b519429bdc",v4StateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",v4QuoterAddress:"0x0d5e0f971ed27fbff6c2837bf31316121532048d"},L[w.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},L[w.BASE_SEPOLIA]={v3CoreFactoryAddress:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",multicallAddress:"0xd867e273eAbD6c853fCd0Ca0bFB6a3aE6491d2C1",quoterAddress:"0xC5290058841028F1614F3A6F0F5816cAd0df5E27",v3MigratorAddress:"0xCbf8b7f80800bd4888Fbc7bf1713B80FE4E23E10",nonfungiblePositionManagerAddress:"0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",tickLensAddress:"0xedf6066a2b290C185783862C7F4776A2C8077AD1",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",v4PoolManagerAddress:"0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",v4PositionManagerAddress:"0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80",v4StateView:"0x571291b572ed32ce6751a2cb2486ebee8defb9b4",v4QuoterAddress:"0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba"},L[w.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557",v4PoolManagerAddress:"0x0575338e4c17006ae181b47900a84404247ca30f",v4PositionManagerAddress:"0xf66c7b99e2040f0d9b326b3b7c152e9663543d63",v4StateView:"0x385785af07d63b50d0a0ea57c4ff89d06adf7328",v4QuoterAddress:"0x5edaccc0660e0a2c44b06e07ce8b915e625dc2c6"},L[w.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877a1Fc4e20A78018f9831365c85f3064"},L[w.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},L[w.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730Aee
1Cd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66",v4PoolManagerAddress:"0x1631559198a9e474033433b2958dabc135ab6446",v4PositionManagerAddress:"0x4ad2f4cca2682cbb5b950d660dd458a1d3f1baad",v4StateView:"0x12a88ae16f46dce4e8b15368008ab3380885df30",v4QuoterAddress:"0x6f71cdcb0d119ff72c6eb501abceb576fbf62bcf"},L[w.ZKSYNC]={v3CoreFactoryAddress:"0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422",multicallAddress:"0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C",quoterAddress:"0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28",v3MigratorAddress:"0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E",nonfungiblePositionManagerAddress:"0x0616e5762c1E7Dc3723c50663dF10a162D690a86",tickLensAddress:"0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89",swapRouter02Address:"0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3"},L[w.WORLDCHAIN]={v3CoreFactoryAddress:"0x7a5028BDa40e7B173C278C5342087826455ea25a",multicallAddress:"0x0a22c04215c97E3F532F4eF30e0aD9458792dAB9",quoterAddress:"0x10158D43e6cc414deE1Bd1eB0EfC6a5cBCfF244c",v3MigratorAddress:"0x9EBDdCBa71C9027E1eB45135672a30bcFEec9de3",nonfungiblePositionManagerAddress:"0xec12a9F9a09f50550686363766Cc153D03c27b5e",tickLensAddress:"0xE61df0CaC9d85876aCE5E3037005D80943570623",swapRouter02Address:"0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6",v4PoolManagerAddress:"0xb1860d529182ac3bc1f51fa2abd56662b7d13f33",v4PositionManagerAddress:"0xc585e0f504613b5fbf874f21af14c65260fb41fa",v4StateView:"0x51d394718bc09297262e368c1a481217fdeb71eb",v4QuoterAddress:"0x55d235b3ff2daf7c3ede0defc9521f1d6fe6c5c0"},L[w.UNICHAIN_SEPOLIA]={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1",quoterAddress:"0x6Dd37329A1A225a6Fca658265D460423DCafBF89",v3MigratorAddress:"0xb5FA244C9d6D04B2FBac84418b3c4910ED1Ae5f2",nonfungiblePositionManagerAddress:"0xB7F724d6dDDFd008eFf5cc2834edDE5F9eF0d075",tickLensAddress:"0x5f739c790a48E97eec0efb81bab5D152c0A0ecA0",swapRouter02Address:"0xd1AAE39293221B77B0C71fBD6dCb7Ea29Bb5B166",v4PoolManagerAddress:"0x00b036b58a818b1bc34d502d3fe730db729e62ac",v4PositionManagerAddress:"0xf969aee60879c54baaed9f3ed26147db216fd664",v4StateView:"0xc199f1072a74d4e905aba1a84d9a45e2546b6222",v4QuoterAddress:"0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472"},L[w.UNICHAIN]={v3CoreFactoryAddress:"0x1f98400000000000000000000000000000000003",multicallAddress:"0xb7610f9b733e7d45184be3a1bc966960ccc54f0b",quoterAddress:"0x565ac8c7863d9bb16d07e809ff49fe5cd467634c",v3MigratorAddress:"0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc",nonfungiblePositionManagerAddress:"0x943e6e07a7e8e791dafc44083e54041d743c46e9",tickLensAddress:"0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443",swapRouter02Address:"0x73855d06de49d0fe4a9c42636ba96c62da12ff9c",v4PoolManagerAddress:"0x1f98400000000000000000000000000000000004",v4PositionManagerAddress:"0x4529a01c7a0410167c5740c487a8de60232617bf",v4StateView:"0x86e8631a016f9068c3f085faf484ee3f5fdee8f2",v4QuoterAddress:"0x333e3c607b141b18ff6de9f258db6e77fe7491e0"},L[w.MONAD_TESTNET]={v3CoreFactoryAddress:"0x961235a9020b05c44df1026d956d1f4d78014276",multicallAddress:"0xa707ceb989cc3728551ed0e6e44b718dd114cf44",quoterAddress:"0x1ba215c17565de7b0cb7ecab971bcf540c24a862",v3MigratorAddress:"0x0a78348b71f8ae8caff2f8f9d4d74a2f36516661",nonfungiblePositionManagerAddress:"0x3dcc735c74f10fe2b9db2bb55c40fbbbf24490f7",tickLensAddress:"0x337478eb6058455ecb3696184b30dd6a29e3a893",swapRouter02Address:"0x4c4eabd5fb1d1a7234a48692551eaecff8194ca7"},L[w.SONEIUM]={v3CoreFactoryAddress:"0x42ae7ec7ff020412639d443e245d936429fbe717",multicallAddress:"0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2",quoterAddress:"0x3e6c707d0125226ff60f291b6bd1404634f00aba",v3MigratorAddress:"0xa107580f73bd797bd8b87ff24e98346d99f93ddb",nonfungiblePositionManagerAddress:"0x56c1205b0244332011c1e866f4ea5384eb6bfa2c",tickLensAddress:"0xcd08eefb928c86499e6235ac155906bb7c4dc41a",swapRouter02Address:"0x7e40db01736f88464e5f4e42394f3d5bbb6705b9",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0x1b35d13a2e2528f192637f14b05f0dc0e7deb566",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"},({})[w.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",({})[w.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",({})[w.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",({})[w.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",({})[w.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",(h=W||(W={}))[h.EXACT_INPUT=0]="EXACT_INPUT",h[h.EXACT_OUTPUT=1]="EXACT_OUTPUT",(E=V||(V={}))[E.ROUND_DOWN=0]="ROUND_DOWN",E[E.ROUND_HALF_UP=1]="ROUND_HALF_UP",E[E.ROUND_UP=2]="ROUND_UP";var eg=ee().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ev=eo()(en()),eT=eo()(ea()),e_=((G={})[V.ROUND_DOWN]=ev.ROUND_DOWN,G[V.ROUND_HALF_UP]=ev.ROUND_HALF_UP,G[V.ROUND_UP]=ev.ROUND_UP,G),eC=((Z={})[V.ROUND_DOWN]=0,Z[V.ROUND_HALF_UP]=1,Z[V.ROUND_UP]=3,Z),ex=function(){function Fraction(f,r){void 0===r&&(r=ee().BigInt(1)),this.numerator=ee().BigInt(f),this.denominator=ee().BigInt(r)}Fraction.tryParseFraction=function(f){if(f instanceof ee()||"number"==typeof f||"string"==typeof f)return new Fraction(f);if("numerator"in f&&"denominator"in f)return f;throw Error("Could not parse fraction")};var f=Fraction.prototype;return f.invert=function(){return new Fraction(this.denominator,this.numerator)},f.add=function(f){var r=Fraction.tryParseFraction(f);return ee().equal(this.denominator,r.denominator)?new Fraction(ee().add(this.numerator,r.numerator),this.denominator):new Fraction(ee().add(ee().multiply(this.numerator,r.denominator),ee().multiply(r.numerator,this.denominator)),ee().multiply(this.denominator,r.denominator))},f.subtract=function(f){var r=Fraction.tryParseFraction(f);return ee().equal(this.denominator,r.denominator)?new Fraction(ee().subtract(this.numerator,r.numerator),this.denominator):new Fraction(ee().subtract(ee().multiply(this.numerator,r.denominator),ee().multiply(r.numerator,this.denominator)),ee().multiply(this.denominator,r.denominator))},f.lessThan=function(f){var r=Fraction.tryParseFraction(f);return ee().lessThan(ee().multiply(this.numerator,r.denominator),ee().multiply(r.numerator,this.denominator))},f.equalTo=function(f){var r=Fraction.tryParseFraction(f);return ee().equal(ee().multiply(this.numerator,r.denominator),ee().multiply(r.numerator,this.denominator))},f.greaterThan=function(f){var r=Fraction.tryParseFraction(f);return ee().greaterThan(ee().multiply(this.numerator,r.denominator),ee().multiply(r.numerator,this.denominator))},f.multiply=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ee().multiply(this.numerator,r.numerator),ee().multiply(this.denominator,r.denominator))},f.divide=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ee().multiply(this.numerator,r.denominator),ee().multiply(this.denominator,r.numerator))},f.toSignificant=function(f,r,s){void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=V.ROUND_HALF_UP),Number.isInteger(f)||(0,et.Z)(!1),f>0||(0,et.Z)(!1),ev.set({precision:f+1,rounding:e_[s]});var l=new ev(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(f);return l.toFormat(l.decimalPlaces(),r)},f.toFixed=function(f,r,s){return void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=V.ROUND_HALF_UP),Number.isInteger(f)||(0,et.Z)(!1),f>=0||(0,et.Z)(!1),eT.DP=f,eT.RM=eC[s],new eT(this.numerator.toString()).div(this.denominator.toString()).toFormat(f,r)},_createClass(Fraction,[{key:"quotient",get:function(){return ee().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new Fraction(ee().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new Fraction(this.numerator,this.denominator)}}])}(),eI=eo()(ea()),ew=function(f){function CurrencyAmount(r,s,l){var m;return m=f.call(this,s,l)||this,ee().lessThanOrEqual(m.quotient,eg)||(0,et.Z)(!1),m.currency=r,m.decimalScale=ee().exponentiate(ee().BigInt(10),ee().BigInt(r.decimals)),m}_inheritsLoose(CurrencyAmount,f),CurrencyAmount.fromRawAmount=function(f,r){return new CurrencyAmount(f,r)},CurrencyAmount.fromFractionalAmount=function(f,r,s){return new CurrencyAmount(f,r,s)};var r=CurrencyAmount.prototype;return r.add=function(r){this.currency.equals(r.currency)||(0,et.Z)(!1);var s=f.prototype.add.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.subtract=function(r){this.currency.equals(r.currency)||(0,et.Z)(!1);var s=f.prototype.subtract.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.multiply=function(r){var s=f.prototype.multiply.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)}
1,r.divide=function(r){var s=f.prototype.divide.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.toSignificant=function(r,s,l){return void 0===r&&(r=6),void 0===l&&(l=V.ROUND_DOWN),f.prototype.divide.call(this,this.decimalScale).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=this.currency.decimals),void 0===l&&(l=V.ROUND_DOWN),r<=this.currency.decimals||(0,et.Z)(!1),f.prototype.divide.call(this,this.decimalScale).toFixed(r,s,l)},r.toExact=function(f){return void 0===f&&(f={groupSeparator:""}),eI.DP=this.currency.decimals,new eI(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(f)},_createClass(CurrencyAmount,[{key:"wrapped",get:function(){return this.currency.isToken?this:CurrencyAmount.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}])}(ex),eP=new ex(ee().BigInt(100));function toPercent(f){return new eB(f.numerator,f.denominator)}var eB=function(f){function Percent(){var r;return r=f.apply(this,arguments)||this,r.isPercent=!0,r}_inheritsLoose(Percent,f);var r=Percent.prototype;return r.add=function(r){return toPercent(f.prototype.add.call(this,r))},r.subtract=function(r){return toPercent(f.prototype.subtract.call(this,r))},r.multiply=function(r){return toPercent(f.prototype.multiply.call(this,r))},r.divide=function(r){return toPercent(f.prototype.divide.call(this,r))},r.toSignificant=function(r,s,l){return void 0===r&&(r=5),f.prototype.multiply.call(this,eP).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=2),f.prototype.multiply.call(this,eP).toFixed(r,s,l)},Percent}(ex),eF=function(f){function Price(){for(var r,s,l,m,h,E=arguments.length,I=Array(E),w=0;w<E;w++)I[w]=arguments[w];if(4===I.length)s=I[0],l=I[1],m=I[2],h=I[3];else{var B=I[0].quoteAmount.divide(I[0].baseAmount),D=[I[0].baseAmount.currency,I[0].quoteAmount.currency,B.denominator,B.numerator];s=D[0],l=D[1],m=D[2],h=D[3]}return(r=f.call(this,h,m)||this).baseCurrency=s,r.quoteCurrency=l,r.scalar=new ex(ee().exponentiate(ee().BigInt(10),ee().BigInt(s.decimals)),ee().exponentiate(ee().BigInt(10),ee().BigInt(l.decimals))),r}_inheritsLoose(Price,f);var r=Price.prototype;return r.invert=function(){return new Price(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){this.quoteCurrency.equals(r.baseCurrency)||(0,et.Z)(!1);var s=f.prototype.multiply.call(this,r);return new Price(this.baseCurrency,r.quoteCurrency,s.denominator,s.numerator)},r.quote=function(r){r.currency.equals(this.baseCurrency)||(0,et.Z)(!1);var s=f.prototype.multiply.call(this,r);return ew.fromFractionalAmount(this.quoteCurrency,s.numerator,s.denominator)},r.toSignificant=function(f,r,s){return void 0===f&&(f=6),this.adjustedForDecimals.toSignificant(f,r,s)},r.toFixed=function(f,r,s){return void 0===f&&(f=4),this.adjustedForDecimals.toFixed(f,r,s)},_createClass(Price,[{key:"adjustedForDecimals",get:function(){return f.prototype.multiply.call(this,this.scalar)}}])}(ex),BaseCurrency=function(f,r,s,l){Number.isSafeInteger(f)||(0,et.Z)(!1),r>=0&&r<255&&Number.isInteger(r)||(0,et.Z)(!1),this.chainId=f,this.decimals=r,this.symbol=s,this.name=l},eD=function(f){function NativeCurrency(){var r;return r=f.apply(this,arguments)||this,r.isNative=!0,r.isToken=!1,r}return _inheritsLoose(NativeCurrency,f),NativeCurrency}(BaseCurrency);function validateAndParseAddress(f){try{return(0,eu.getAddress)(f)}catch(r){throw Error(f+" is not a valid address.")}}var eO=/^0x[0-9a-fA-F]{40}$/,ek=function(f){function Token(r,s,l,m,h,E,I,w){var B;return(B=f.call(this,r,l,m,h)||this).isNative=!1,B.isToken=!0,E?B.address=function(f){if(eO.test(f))return f;throw Error(f+" is not a valid address.")}(s):B.address=validateAndParseAddress(s),I&&(I.gte(es.O$.from(0))||(0,et.Z)(!1)),w&&(w.gte(es.O$.from(0))||(0,et.Z)(!1)),B.buyFeeBps=I,B.sellFeeBps=w,B}_inheritsLoose(Token,f);var r=Token.prototype;return r.equals=function(f){return f.isToken&&this.chainId===f.chainId&&this.address.toLowerCase()===f.address.toLowerCase()},r.sortsBefore=function(f){return this.chainId!==f.chainId&&(0,et.Z)(!1),this.address.toLowerCase()!==f.address.toLowerCase()||(0,et.Z)(!1),this.address.toLowerCase()<f.address.toLowerCase()},_createClass(Token,[{key:"wrapped",get:function(){return this}}])}(BaseCurrency),eS={1:new ek(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),11155111:new ek(11155111,"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",18,"WETH","Wrapped Ether"),3:new ek(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),4:new ek(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),5:new ek(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),42:new ek(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),10:new ek(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),69:new ek(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),11155420:new ek(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),42161:new ek(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),421611:new ek(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),421614:new ek(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),8453:new ek(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),84532:new ek(84532,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),56:new ek(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),137:new ek(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),43114:new ek(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX"),7777777:new ek(7777777,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),81457:new ek(81457,"0x4300000000000000000000000000000000000004",18,"WETH","Wrapped Ether"),324:new ek(324,"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",18,"WETH","Wrapped Ether"),480:new ek(480,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),1301:new ek(1301,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),130:new ek(130,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),10143:new ek(10143,"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",18,"WMON","Wrapped Monad"),1868:new ek(1868,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether")};function sortedInsert(f,r,s,l){if(s>0||(0,et.Z)(!1),f.length<=s||(0,et.Z)(!1),0===f.length)return f.push(r),null;var m=f.length===s;if(m&&0>=l(f[f.length-1],r))return r;for(var h=0,E=f.length;h<E;){var I=h+E>>>1;0>=l(f[I],r)?h=I+1:E=I}return f.splice(h,0,r),m?f.pop():null}(function(f){function Ether(r){return f.call(this,r,18,"ETH","Ether")||this}return _inheritsLoose(Ether,f),Ether.onChain=function(f){var r;return null!=(r=this._etherCache[f])?r:this._etherCache[f]=new Ether(f)},Ether.prototype.equals=function(f){return f.isNative&&f.chainId===this.chainId},_createClass(Ether,[{key:"wrapped",get:function(){var f=eS[this.chainId];return f||(0,et.Z)(!1),f}}])})(eD)._etherCache={};var eM=ee().BigInt(Number.MAX_SAFE_INTEGER),eR=ee().BigInt(0),eN=ee().BigInt(1),eL=ee().BigInt(2),eq=s(93317),eU=s(99203),eH=s(43898),eW=s(34271),eV=JSON.parse('{"Mt":[{"input
1s":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"},{"internalType":"address","name":"_tokenDescriptor_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"DecreaseLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"IncreaseLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint128","name":"amount0Max","type":"uint128"},{"internalType":"uint128","name":"amount1Max","type":"uint128"}],"internalType":"struct INonfungiblePositionManager.CollectParams","name":"params","type":"tuple"}],"name":"collect","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"name":"createAndInitializePoolIfNecessary","outputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct INonfungiblePositionManager.DecreaseLiquidityParams","name":"params","type":"tuple"}],"name":"decreaseLiquidity","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct INonfungiblePositionManager.IncreaseLiquidityParams","name":"params","type":"tuple"}],"name":"increaseLiquidity","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct INonfungiblePositionManager.MintParams","name":"params","type":"tuple"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"positions","outputs":[{"internalType":"uint96","name":"nonce","type":"uint96"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"feeGrowthInside0LastX128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthInside1LastX128","type":"uint256"},{"internalType":"uint128","name":"tokensOwed0","type":"uint128"},{"internalType":"uint128","name":"tokensOwed1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","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":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}
1,{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Owed","type":"uint256"},{"internalType":"uint256","name":"amount1Owed","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3MintCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]}'),eG=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"}]}'),eZ=JSON.parse('{"Mt":[{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"sweepTokenWithFee","outputs":[],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"unwrapWETH9WithFee","outputs":[],"stateMutability":"payable","type":"function"}]}'),eX=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"quoteExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"quoteExactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"quoteExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"quoteExactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"view","type":"function"}]}'),ej=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"quoteExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160[]","name":"sqrtPriceX96AfterList","type":"uint160[]"},{"internalType":"uint32[]","name":"initializedTicksCrossedList","type":"uint32[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IQuoterV2.QuoteExactInputSingleParams","name":"params","type":"tuple"}],"name":"quoteExactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceX96After","type":"uint160"},{"internalType":"uint32","name":"initializedTicksCrossed","type":"uint32"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}
1,{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"quoteExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160[]","name":"sqrtPriceX96AfterList","type":"uint160[]"},{"internalType":"uint32[]","name":"initializedTicksCrossedList","type":"uint32[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IQuoterV2.QuoteExactOutputSingleParams","name":"params","type":"tuple"}],"name":"quoteExactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceX96After","type":"uint160"},{"internalType":"uint32","name":"initializedTicksCrossed","type":"uint32"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"view","type":"function"}]}'),eQ=JSON.parse('{"Mt":[{"inputs":[{"internalType":"contract IUniswapV3Factory","name":"_factory","type":"address"},{"internalType":"contract INonfungiblePositionManager","name":"_nonfungiblePositionManager","type":"address"},{"internalType":"uint256","name":"_maxIncentiveStartLeadTime","type":"uint256"},{"internalType":"uint256","name":"_maxIncentiveDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"DepositTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"indexed":true,"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"address","name":"refundee","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"IncentiveCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"incentiveId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"refund","type":"uint256"}],"name":"IncentiveEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"incentiveId","type":"bytes32"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"incentiveId","type":"bytes32"}],"name":"TokenUnstaked","type":"event"},{"inputs":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountRequested","type":"uint256"}],"name":"claimReward","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}
1,{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"createIncentive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposits","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint48","name":"numberOfStakes","type":"uint48"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"}],"name":"endIncentive","outputs":[{"internalType":"uint256","name":"refund","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV3Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRewardInfo","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint160","name":"secondsInsideX128","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"incentives","outputs":[{"internalType":"uint256","name":"totalRewardUnclaimed","type":"uint256"},{"internalType":"uint160","name":"totalSecondsClaimedX128","type":"uint160"},{"internalType":"uint96","name":"numberOfStakes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxIncentiveDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxIncentiveStartLeadTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nonfungiblePositionManager","outputs":[{"internalType":"contract INonfungiblePositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Minimal","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}
1,{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"incentiveId","type":"bytes32"}],"name":"stakes","outputs":[{"internalType":"uint160","name":"secondsPerLiquidityInsideInitialX128","type":"uint160"},{"internalType":"uint128","name":"liquidity","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"transferDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20Minimal","name":"rewardToken","type":"address"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address","name":"refundee","type":"address"}],"internalType":"struct IUniswapV3Staker.IncentiveKey","name":"key","type":"tuple"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]}'),eK=JSON.parse('{"Mt":[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"internalType":"struct ISwapRouter.ExactInputParams","name":"params","type":"tuple"}],"name":"exactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct ISwapRouter.ExactInputSingleParams","name":"params","type":"tuple"}],"name":"exactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMaximum","type":"uint256"}],"internalType":"struct ISwapRouter.ExactOutputParams","name":"params","type":"tuple"}],"name":"exactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMaximum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct ISwapRouter.ExactOutputSingleParams","name":"params","type":"tuple"}],"name":"exactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"sweepTokenWithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"unwrapWETH9WithFee","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]}');function _arrayLikeToArray(f,r){(null==r||r>f.length)&&(r=f.length);for(var s=0,l=Array(r);s<r;s++)l[s]=f[s];return l}function asyncGeneratorStep(f,r,s,l,m,h,E){try{var I=f[h](E),w=I.value}catch(f){return void s(f)}I.done?r(w):Promise.resolve(w).then(l,m)}function _asyncToGenerator(f){return function(){var r=this,s=arguments;return new Promise(function(l,m){var h=f.apply(r,s);function _next(f){asyncGeneratorStep(h,l,m,_next,_throw,"next",f)}function _throw(f){asyncGeneratorStep(h,l,m,_next,_throw,"throw",f)}_next(void 0)})}}function v3_sdk_esm_defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function v3_sdk_esm_createClass(f,r,s){return r&&v3_sdk_esm_defineProperties(f.prototype,r),s&&v3_sdk_esm_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _createForOfIteratorHelperLoose(f,r){var s="undefined"!=typeof Symbol&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=function(f,r){if(f){if("string"==typeof f)return _arrayLikeToArray(f,r);var s=({}).toString.call(f).slice(8,-1);return"Object"===s&&f.constructor&&(s=f.constructor.name),"Map"===s||"Set"===s?Array.from(f):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?_arrayLikeToArray(f,r):void 0}}(f))||r&&f&&"number"==typeof f.length){s&&(f=s);var l=0;return function(){return l>=f.length?{done:!0}:{done:!1,value:f[l++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v3_sdk_esm_extends(){return(v3_sdk_esm_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return r};var f,r={},s=Object.prototype,l=s.hasOwnProperty,m=Object.defineProperty||function(f,r,s){f[r]=s.value},h="function"==typeof Symbol?Symbol:{},E=h.iterator||"@@iterator",I=h.asyncIterator||"@@asyncIterator",w=h.toStringTag||"@@toStringTag";function define(f,r,s){return Object.defineProperty(f,r,{value:s,enumerable:!0,configurable:!0,writable:!0}),f[r]}try{define({},"")}catch(f){define=function(f,r,s){return f[r]=s}}function wrap(r,s,l,h){var E,I,w=Object.create((s&&s.prototype instanceof Generator?s:Generator).prototype);return m(w,"_invoke",{value:(E=new Context(h||[]),I=B,function(s,m){if(I===D)throw Error("Generator is already running");if(I===M){if("throw"===s)throw m;return{value:f,done:!0}}for(E.method=s,E.arg=m;;){var h=E.delegate;if(h){var w=function maybeInvokeDelegate(r,s){var l=s.method,m=r.iterator[l];if(m===f)return s.delegate=null,"throw"===l&&r.iterator.return&&(s.method="return",s.arg=f,maybeInvokeDelegate(r,s),"throw"===s.method)||"return"!==l&&(s.method="throw",s.arg=TypeError("The iterator does not provide a '"+l+"' method")),L;var h=tryCatch(m,r.iterator,s.arg);if("throw"===h.type)return s.method="throw",s.arg=h.arg,s.delegate=null,L;var E=h.arg;return E?E.done?(s[r.resultName]=E.value,s.next=r.nextLoc,"return"!==s.method&&(s.method="next",s.arg=f),s.delegate=null,L):E:(s.method="throw",s.arg=TypeError("iterator result is not an object"),s.delegate=null,L)}(h,E);if(w){if(w===L)continue;return w}}if("next"===E.method)E.sent=E._sent=E.arg;else if("throw"===E.method){if(I===B)throw I=M,E.arg;E.dispatchException(E.arg)}else"return"===E.method&&E.abrupt("return",E.arg);I=D;var W=tryCatch(r,l,E);if("normal"===W.type){if(I=E.done?M:"suspendedYield",W.arg===L)continue;return{value:W.arg,done:E.done}}"throw"===W.type&&(I=M,E.method="throw",E.arg=W.arg)}})}),w}function tryCatch(f,r,s){try{return{type:"normal",arg:f.call(r,s)}}catch(f){return{type:"throw",arg:f}}}r.wrap=wrap;var B="suspendedStart",D="executing",M="completed",L={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var W={};define(W,E,function(){return this});var V=Object.getPrototypeOf,G=V&&V(V(values([])));
vendor: 4,737 bytes, line 1
1G&&G!==s&&l.call(G,E)&&(W=G);var Z=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(W);function defineIteratorMethods(f){["next","throw","return"].forEach(function(r){define(f,r,function(f){return this._invoke(r,f)})})}function AsyncIterator(f,r){var s;m(this,"_invoke",{value:function(m,h){function callInvokeWithMethodAndArg(){return new r(function(s,E){!function invoke(s,m,h,E){var I=tryCatch(f[s],f,m);if("throw"!==I.type){var w=I.arg,B=w.value;return B&&"object"==typeof B&&l.call(B,"__await")?r.resolve(B.__await).then(function(f){invoke("next",f,h,E)},function(f){invoke("throw",f,h,E)}):r.resolve(B).then(function(f){w.value=f,h(w)},function(f){return invoke("throw",f,h,E)})}E(I.arg)}(m,h,s,E)})}return s=s?s.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function pushTryEntry(f){var r={tryLoc:f[0]};1 in f&&(r.catchLoc=f[1]),2 in f&&(r.finallyLoc=f[2],r.afterLoc=f[3]),this.tryEntries.push(r)}function resetTryEntry(f){var r=f.completion||{};r.type="normal",delete r.arg,f.completion=r}function Context(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var s=r[E];if(s)return s.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var m=-1,i=function next(){for(;++m<r.length;)if(l.call(r,m))return next.value=r[m],next.done=!1,next;return next.value=f,next.done=!0,next};return i.next=i}}throw TypeError(typeof r+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,m(Z,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),m(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,w,"GeneratorFunction"),r.isGeneratorFunction=function(f){var r="function"==typeof f&&f.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,GeneratorFunctionPrototype):(f.__proto__=GeneratorFunctionPrototype,define(f,w,"GeneratorFunction")),f.prototype=Object.create(Z),f},r.awrap=function(f){return{__await:f}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,I,function(){return this}),r.AsyncIterator=AsyncIterator,r.async=function(f,s,l,m,h){void 0===h&&(h=Promise);var E=new AsyncIterator(wrap(f,s,l,m),h);return r.isGeneratorFunction(s)?E:E.next().then(function(f){return f.done?f.value:E.next()})},defineIteratorMethods(Z),define(Z,w,"Generator"),define(Z,E,function(){return this}),define(Z,"toString",function(){return"[object Generator]"}),r.keys=function(f){var r=Object(f),s=[];for(var l in r)s.push(l);return s.reverse(),function next(){for(;s.length;){var f=s.pop();if(f in r)return next.value=f,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(resetTryEntry),!r)for(var s in this)"t"===s.charAt(0)&&l.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=f)},stop:function(){this.done=!0;var f=this.tryEntries[0].completion;if("throw"===f.type)throw f.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var s=this;function handle(l,m){return E.type="throw",E.arg=r,s.next=l,m&&(s.method="next",s.arg=f),!!m}for(var m=this.tryEntries.length-1;m>=0;--m){var h=this.tryEntries[m],E=h.completion;if("root"===h.tryLoc)return handle("end");if(h.tryLoc<=this.prev){var I=l.call(h,"catchLoc"),w=l.call(h,"finallyLoc");if(I&&w){if(this.prev<h.catchLoc)return handle(h.catchLoc,!0);if(this.prev<h.finallyLoc)return handle(h.finallyLoc)}else if(I){if(this.prev<h.catchLoc)return handle(h.catchLoc,!0)}else{if(!w)throw Error("try statement without catch or finally");if(this.prev<h.finallyLoc)return handle(h.finallyLoc)}}}},abrupt:function(f,r){for(var s=this.tryEntries.length-1;s>=0;--s){var m=this.tryEntries[s];if(m.tryLoc<=this.prev&&l.call(m,"finallyLoc")&&this.prev<m.finallyLoc){var h=m;break}}h&&("break"===f||"continue"===f)&&h.tryLoc<=r&&r<=h.finallyLoc&&(h=null);var E=h?h.completion:{};return E.type=f,E.arg=r,h?(this.method="next",this.next=h.finallyLoc,L):this.complete(E)},complete:function(f,r){if("throw"===f.type)throw f.arg;return"break"===f.type||"continue"===f.type?this.next=f.arg:"return"===f.type?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):"normal"===f.type&&r&&(this.next=r),L},finish:function(f){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.finallyLoc===f)return this.complete(s.completion,s.afterLoc),resetTryEntry(s),L}}
1,catch:function(f){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc===f){var l=s.completion;if("throw"===l.type){var m=l.arg;resetTryEntry(s)}return m}}throw Error("illegal catch attempt")},delegateYield:function(r,s,l){return this.delegate={iterator:values(r),resultName:s,nextLoc:l},"next"===this.method&&(this.arg=f),L}},r}var eY="0x1F98431c8aD98523631AE4a59f267346ea31F984",ez="0x0000000000000000000000000000000000000000",eJ="0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54";function poolInitCodeHash(f){return f===w.ZKSYNC?"0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed":eJ}(I=K||(K={}))[I.LOWEST=100]="LOWEST",I[I.LOW_200=200]="LOW_200",I[I.LOW_300=300]="LOW_300",I[I.LOW_400=400]="LOW_400",I[I.LOW=500]="LOW",I[I.MEDIUM=3e3]="MEDIUM",I[I.HIGH=1e4]="HIGH";var e$=((X={})[K.LOWEST]=1,X[K.LOW_200]=4,X[K.LOW_300]=6,X[K.LOW_400]=8,X[K.LOW]=10,X[K.MEDIUM]=60,X[K.HIGH]=200,X),e0=ee().BigInt(-1),e1=ee().BigInt(0),e6=ee().BigInt(1),e5=ee().exponentiate(ee().BigInt(2),ee().BigInt(96)),e2=ee().exponentiate(e5,ee().BigInt(2));function computePoolAddress(f){var r,s,l,m,h=f.factoryAddress,E=f.tokenA,I=f.tokenB,B=f.fee,D=f.initCodeHashManualOverride,M=f.chainId,L=E.sortsBefore(I)?[E,I]:[I,E],W=L[0],V=L[1],G=(0,eH.keccak256)(["bytes"],[eq.$.encode(["address","address","uint24"],[W.address,V.address,B])]),Z=null!=D?D:poolInitCodeHash(M);return M===w.ZKSYNC?(void 0===r&&(r="0x"),s=(0,ed.keccak256)((0,ep.Y0)("zksyncCreate2")),l=(0,ed.keccak256)(r),m=(0,ed.keccak256)((0,ec.concat)([s,(0,ec.hexZeroPad)(h,32),G,Z,l])).slice(26),(0,eu.getAddress)(m)):(0,eu.getCreate2Address)(h,G,Z)}var e3=function(){function FullMath(){}return FullMath.mulDivRoundingUp=function(f,r,s){var l=ee().multiply(f,r),m=ee().divide(l,s);return ee().notEqual(ee().remainder(l,s),e1)&&(m=ee().add(m,e6)),m},FullMath}(),e8=ee().subtract(ee().exponentiate(ee().BigInt(2),ee().BigInt(160)),e6);function multiplyIn256(f,r){var s=ee().multiply(f,r);return ee().bitwiseAnd(s,eg)}var e4=function(){function SqrtPriceMath(){}return SqrtPriceMath.getAmount0Delta=function(f,r,s,l){if(ee().greaterThan(f,r)){var m=[r,f];f=m[0],r=m[1]}var h=ee().leftShift(s,ee().BigInt(96)),E=ee().subtract(r,f);return l?e3.mulDivRoundingUp(e3.mulDivRoundingUp(h,E,r),e6,f):ee().divide(ee().divide(ee().multiply(h,E),r),f)}
1,SqrtPriceMath.getAmount1Delta=function(f,r,s,l){if(ee().greaterThan(f,r)){var m=[r,f];f=m[0],r=m[1]}return l?e3.mulDivRoundingUp(s,ee().subtract(r,f),e5):ee().divide(ee().multiply(s,ee().subtract(r,f)),e5)},SqrtPriceMath.getNextSqrtPriceFromInput=function(f,r,s,l){return ee().greaterThan(f,e1)||(0,et.Z)(!1),ee().greaterThan(r,e1)||(0,et.Z)(!1),l?this.getNextSqrtPriceFromAmount0RoundingUp(f,r,s,!0):this.getNextSqrtPriceFromAmount1RoundingDown(f,r,s,!0)},SqrtPriceMath.getNextSqrtPriceFromOutput=function(f,r,s,l){return ee().greaterThan(f,e1)||(0,et.Z)(!1),ee().greaterThan(r,e1)||(0,et.Z)(!1),l?this.getNextSqrtPriceFromAmount1RoundingDown(f,r,s,!1):this.getNextSqrtPriceFromAmount0RoundingUp(f,r,s,!1)},SqrtPriceMath.getNextSqrtPriceFromAmount0RoundingUp=function(f,r,s,l){if(ee().equal(s,e1))return f;var m=ee().leftShift(r,ee().BigInt(96));if(l){var h=multiplyIn256(s,f);if(ee().equal(ee().divide(h,s),f)){var E,I=(E=ee().add(m,h),ee().bitwiseAnd(E,eg));if(ee().greaterThanOrEqual(I,m))return e3.mulDivRoundingUp(m,f,I)}return e3.mulDivRoundingUp(m,e6,ee().add(ee().divide(m,f),s))}var w=multiplyIn256(s,f);ee().equal(ee().divide(w,s),f)||(0,et.Z)(!1),ee().greaterThan(m,w)||(0,et.Z)(!1);var B=ee().subtract(m,w);return e3.mulDivRoundingUp(m,f,B)},SqrtPriceMath.getNextSqrtPriceFromAmount1RoundingDown=function(f,r,s,l){if(l){var m=ee().lessThanOrEqual(s,e8)?ee().divide(ee().leftShift(s,ee().BigInt(96)),r):ee().divide(ee().multiply(s,e5),r);return ee().add(f,m)}var h=e3.mulDivRoundingUp(s,e5,r);return ee().greaterThan(f,h)||(0,et.Z)(!1),ee().subtract(f,h)},SqrtPriceMath}(),e9=ee().exponentiate(ee().BigInt(10),ee().BigInt(6)),e7=function(){function SwapMath(){}return SwapMath.computeSwapStep=function(f,r,s,l,m){var h={};m=ee().BigInt(m);var E=ee().greaterThanOrEqual(f,r),I=ee().greaterThanOrEqual(l,e1);if(I){var w=ee().divide(ee().multiply(l,ee().subtract(e9,m)),e9);h.amountIn=E?e4.getAmount0Delta(r,f,s,!0):e4.getAmount1Delta(f,r,s,!0),ee().greaterThanOrEqual(w,h.amountIn)?h.sqrtRatioNextX96=r:h.sqrtRatioNextX96=e4.getNextSqrtPriceFromInput(f,s,w,E)}else h.amountOut=E?e4.getAmount1Delta(r,f,s,!1):e4.getAmount0Delta(f,r,s,!1),ee().greaterThanOrEqual(ee().multiply(l,e0),h.amountOut)?h.sqrtRatioNextX96=r:h.sqrtRatioNextX96=e4.getNextSqrtPriceFromOutput(f,s,ee().multiply(l,e0),E);var B=ee().equal(r,h.sqrtRatioNextX96);return E?(h.amountIn=B&&I?h.amountIn:e4.getAmount0Delta(h.sqrtRatioNextX96,f,s,!0),h.amountOut=B&&!I?h.amountOut:e4.getAmount1Delta(h.sqrtRatioNextX96,f,s,!1)):(h.amountIn=B&&I?h.amountIn:e4.getAmount1Delta(f,h.sqrtRatioNextX96,s,!0),h.amountOut=B&&!I?h.amountOut:e4.getAmount0Delta(f,h.sqrtRatioNextX96,s,!1)),!I&&ee().greaterThan(h.amountOut,ee().multiply(l,e0))&&(h.amountOut=ee().multiply(l,e0)),I&&ee().notEqual(h.sqrtRatioNextX96,r)?h.feeAmount=ee().subtract(l,h.amountIn):h.feeAmount=e3.mulDivRoundingUp(h.amountIn,m,ee().subtract(e9,m)),[h.sqrtRatioNextX96,h.amountIn,h.amountOut,h.feeAmount]},SwapMath}(),te=function(){function LiquidityMath(){}return LiquidityMath.addDelta=function(f,r){return ee().lessThan(r,e1)?ee().subtract(f,ee().multiply(r,e0)):ee().add(f,r)},LiquidityMath}(),tt=ee().BigInt(2),tf=[128,64,32,16,8,4,2,1].map(function(f){return[f,ee().exponentiate(tt,ee().BigInt(f))]});function mostSignificantBit(f){ee().greaterThan(f,e1)||(0,et.Z)(!1),ee().lessThanOrEqual(f,eg)||(0,et.Z)(!1);for(var r,s=0,l=_createForOfIteratorHelperLoose(tf);!(r=l()).done;){var m=r.value,h=m[0],E=m[1];ee().greaterThanOrEqual(f,E)&&(f=ee().signedRightShift(f,ee().BigInt(h)),s+=h)}return s}function mulShift(f,r){return ee().signedRightShift(ee().multiply(f,ee().BigInt(r)),ee().BigInt(128))}var tn=ee().exponentiate(ee().BigInt(2),ee().BigInt(32)),tr=function(){function TickMath(){}return TickMath.getSqrtRatioAtTick=function(f){f>=TickMath.MIN_TICK&&f<=TickMath.MAX_TICK&&Number.isInteger(f)||(0,et.Z)(!1);var r=f<0?-1*f:f,s=(1&r)!=0?ee().BigInt("0xfffcb933bd6fad37aa2d162d1a594001"):ee().BigInt("0x100000000000000000000000000000000");return(2&r)!=0&&(s=mulShift(s,"0xfff97272373d413259a46990580e213a")),(4&r)!=0&&(s=mulShift(s,"0xfff2e50f5f656932ef12357cf3c7fdcc")),(8&r)!=0&&(s=mulShift(s,"0xffe5caca7e10e4e61c3624eaa0941cd0")),(16&r)!=0&&(s=mulShift(s,"0xffcb9843d60f6159c9db58835c926644")),(32&r)!=0&&(s=mulShift(s,"0xff973b41fa98c081472e6896dfb254c0")),(64&r)!=0&&(s=mulShift(s,"0xff2ea16466c96a3843ec78b326b52861")),(128&r)!=0&&(s=mulShift(s,"0xfe5dee046a99a2a811c461f1969c3053")),(256&r)!=0&&(s=mulShift(s,"0xfcbe86c7900a88aedcffc83b479aa3a4")),(512&r)!=0&&(s=mulShift(s,"0xf987a7253ac413176f2b074cf7815e54")),(1024&r)!=0&&(s=mulShift(s,"0xf3392b0822b70005940c7a398e4b70f3")),(2048&r)!=0&&(s=mulShift(s,"0xe7159475a2c29b7443b29c7fa6e889d9")),(4096&r)!=0&&(s=mulShift(s,"0xd097f3bdfd2022b8845ad8f792aa5825")),(8192&r)!=0&&(s=mulShift(s,"0xa9f746462d870fdf8a65dc1f90e061e5")),(16384&r)!=0&&(s=mulShift(s,"0x70d869a156d2a1b890bb3df62baf32f7")),(32768&r)!=0&&(s=mulShift(s,"0x31be135f97d08fd981231505542fcfa6")),(65536&r)!=0&&(s=mulShift(s,"0x9aa508b5b7a84e1c677de54f3e99bc9")),(131072&r)!=0&&(s=mulShift(s,"0x5d6af8dedb81196699c329225ee604")),(262144&r)!=0&&(s=mulShift(s,"0x2216e584f5fa1ea926041bedfe98")),(524288&r)!=0&&(s=mulShift(s,"0x48a170391f7dc42444e8fa2")),f>0&&(s=ee().divide(eg,s)),ee().greaterThan(ee().remainder(s,tn),e1)?ee().add(ee().divide(s,tn),e6):ee().divide(s,tn)},TickMath.getTickAtSqrtRatio=function(f){ee().greaterThanOrEqual(f,TickMath.MIN_SQRT_RATIO)&&ee().lessThan(f,TickMath.MAX_
1SQRT_RATIO)||(0,et.Z)(!1);var r,s=ee().leftShift(f,ee().BigInt(32)),l=mostSignificantBit(s);r=ee().greaterThanOrEqual(ee().BigInt(l),ee().BigInt(128))?ee().signedRightShift(s,ee().BigInt(l-127)):ee().leftShift(s,ee().BigInt(127-l));for(var m=ee().leftShift(ee().subtract(ee().BigInt(l),ee().BigInt(128)),ee().BigInt(64)),h=0;h<14;h++){r=ee().signedRightShift(ee().multiply(r,r),ee().BigInt(127));var E=ee().signedRightShift(r,ee().BigInt(128));m=ee().bitwiseOr(m,ee().leftShift(E,ee().BigInt(63-h))),r=ee().signedRightShift(r,E)}var I=ee().multiply(m,ee().BigInt("255738958999603826347141")),w=ee().toNumber(ee().signedRightShift(ee().subtract(I,ee().BigInt("3402992956809132418596140100660247210")),ee().BigInt(128))),B=ee().toNumber(ee().signedRightShift(ee().add(I,ee().BigInt("291339464771989622907027621153398088495")),ee().BigInt(128)));return w===B?w:ee().lessThanOrEqual(TickMath.getSqrtRatioAtTick(B),f)?B:w},TickMath}();function v3Swap(f,r,s,l,m,h,E,I,w){return _v3Swap.apply(this,arguments)}function _v3Swap(){return(_v3Swap=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f,r,s,l,m,h,E,I,w){var B,D,M,L,W,V;return _regeneratorRuntime().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:w||(w=E?ee().add(tr.MIN_SQRT_RATIO,e6):ee().subtract(tr.MAX_SQRT_RATIO,e6)),E?(ee().greaterThan(w,tr.MIN_SQRT_RATIO)||(0,et.Z)(!1),ee().lessThan(w,r)||(0,et.Z)(!1)):(ee().lessThan(w,tr.MAX_SQRT_RATIO)||(0,et.Z)(!1),ee().greaterThan(w,r)||(0,et.Z)(!1)),B=ee().greaterThanOrEqual(I,e1),D={amountSpecifiedRemaining:I,amountCalculated:e1,sqrtPriceX96:r,tick:s,liquidity:l};case 4:if(!(ee().notEqual(D.amountSpecifiedRemaining,e1)&&D.sqrtPriceX96!==w)){G.next=35;break}return(M={}).sqrtPriceStartX96=D.sqrtPriceX96,G.next=9,h.nextInitializedTickWithinOneWord(D.tick,E,m);case 9:if(L=G.sent,M.tickNext=L[0],M.initialized=L[1],M.tickNext<tr.MIN_TICK?M.tickNext=tr.MIN_TICK:M.tickNext>tr.MAX_TICK&&(M.tickNext=tr.MAX_TICK),M.sqrtPriceNextX96=tr.getSqrtRatioAtTick(M.tickNext),W=e7.computeSwapStep(D.sqrtPriceX96,(E?ee().lessThan(M.sqrtPriceNextX96,w):ee().greaterThan(M.sqrtPriceNextX96,w))?w:M.sqrtPriceNextX96,D.liquidity,D.amountSpecifiedRemaining,f),D.sqrtPriceX96=W[0],M.amountIn=W[1],M.amountOut=W[2],M.feeAmount=W[3],B?(D.amountSpecifiedRemaining=ee().subtract(D.amountSpecifiedRemaining,ee().add(M.amountIn,M.feeAmount)),D.amountCalculated=ee().subtract(D.amountCalculated,M.amountOut)):(D.amountSpecifiedRemaining=ee().add(D.amountSpecifiedRemaining,M.amountOut),D.amountCalculated=ee().add(D.amountCalculated,ee().add(M.amountIn,M.feeAmount))),!ee().equal(D.sqrtPriceX96,M.sqrtPriceNextX96)){G.next=32;break}if(!M.initialized){G.next=29;break}return G.t0=ee(),G.next=25,h.getTick(M.tickNext);case 25:G.t1=G.sent.liquidityNet,V=G.t0.BigInt.call(G.t0,G.t1),E&&(V=ee().multiply(V,e0)),D.liquidity=te.addDelta(D.liquidity,V);case 29:D.tick=E?M.tickNext-1:M.tickNext,G.next=33;break;case 32:ee().notEqual(D.sqrtPriceX96,M.sqrtPriceStartX96)&&(D.tick=tr.getTickAtSqrtRatio(D.sqrtPriceX96));case 33:G.next=4;break;case 35:return G.abrupt("return",{amountCalculated:D.amountCalculated,sqrtRatioX96:D.sqrtPriceX96,liquidity:D.liquidity,tickCurrent:D.tick});case 36:case"end":return G.stop()}},_callee)}))).apply(this,arguments)}tr.MIN_TICK=-887272,tr.MAX_TICK=-tr.MIN_TICK,tr.MIN_SQRT_RATIO=ee().BigInt("4295128739"),tr.MAX_SQRT_RATIO=ee().BigInt("1461446703485210103287273052203988822378723970342");var ta=function(){function NoTickDataProvider(){}var f,r,s=NoTickDataProvider.prototype;return s.getTick=(f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f){return _regeneratorRuntime().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:throw Error(NoTickDataProvider.ERROR_MESSAGE);case 1:case"end":return f.stop()}},_callee)})),function(r){return f.apply(this,arguments)}),s.nextInitializedTickWithinOneWord=(r=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(f,r,s){return _regeneratorRuntime().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:throw Error(NoTickDataProvider.ERROR_MESSAGE);case 1:case"end":return f.stop()}},_callee2)})),function(f,s,l){return r.apply(this,arguments)}),NoTickDataProvider}();function isSorted(f,r){for(var s=0;s<f.length-1;s++)if(r(f[s],f[s+1])>0)return!1;return!0}function tickComparator(f,r){return f.index-r.index}ta.ERROR_MESSAGE="No tick data provider was given";var ti=function(){function TickList(){}return TickList.validateList=function(f,r){r>0||(0,et.Z)(!1),f.every(function(f){return f.index%r==0})||(0,et.Z)(!1),ee().equal(f.reduce(function(f,r){var s=r.liquidityNet;return ee().add(f,s)},e1),e1)||(0,et.Z)(!1),isSorted(f,tickComparator)||(0,et.Z)(!1)},TickList.isBelowSmallest=function(f,r){return f.length>0||(0,et.Z)(!1),r<f[0].index},TickList.isAtOrAboveLargest=function(f,r){return f.length>0||(0,et.Z)(!1),r>=f[f.length-1].index},TickList.getTick=function(f,r){var s=f[this.binarySearch(f,r)];return s.index!==r&&(0,et.Z)(!1),s},TickList.binarySearch=function(f,r){this.isBelowSmallest(f,r)&&(0,et.Z)(!1);for(var s,l=0,m=f.length-1;;){if(f[s=Math.floor((l+m)/2)].index<=r&&(s===f.length-1||f[s+1].index>r))return s;f[s].index<r?l=s+1:m=s-1}},TickList.nextInitializedTick=function(f,r,s){if(s){if(TickList.isBelowSmallest(f,r)&&(0,et.Z)(!1),TickList.isAtOrAboveLargest(f,r))return f[f.length-1];var l=this.binarySearch(f,r);return f[l]}if(this.isAtOrAboveLargest(f,r)&&(0,et.Z)(!1),this.isBelowSmallest(f,r))return f[0];var m=this.binarySearch(f,r);return f[m+1]},TickList.nextInitializedTickWithinOneWord=function(f,r,s,l){var m=Math.floor(r/l);if(s){var h=(m>>8<<8)*l;if(TickList.isBelowSmallest(f,r))return[h,!1];var E=TickList.nextInitializedTick(f,r,s).index,I=Math.max(h,E);return[I,I===E]}var w=(((m+1>>8)+1<<8)-1)*l;if(this.isAtOrAboveLargest(f,r))return[w,!1];var B=this.nextInitializedTick(f,r,s).index,D=Math.min(w,B);return[D,D===B]},TickList}();function toHex(f){var r=ee().BigInt(f).toString(16);return r.length%2!=0&&(r="0"+r),"0x"+r}function encodeRouteToPath(f,r){var s=f.input.wrapped,l=f.pools.reduce(function(f,r,s){var l=f.inputToken,m=f.path,h=f.types,E=r.token0.equals(l)?r.token1:r.token0;return 0===s?{inputToken:E,types:["address","uint24","address"],path:[l.address,r.fee,E.address]}:{inputToken:E,types:[].concat(h,["uint24","address"]),path:[].concat(m,[r.fee,E.address])}},{inputToken:s,path:[],types:[]}),m=l.path,h=l.types;return r?(0,eH.pack)(h.reverse(),m.reverse()):(0,eH.pack)(h,m)}function encodeSqrtRatioX96(f,r){var s=ee().leftShift(ee().BigInt(f),ee().BigInt(192)),l=ee().BigInt(r);return function(f){var r,s;if(ee().greaterThanOrEqual(f,eR)||(0,et.Z)(!1),ee().lessThan(f,eM))return ee().BigInt(Math.floor(Math.sqrt(ee().toNumber(f))));for(r=f,s=ee().add(ee().divide(f,eL),eN);ee().lessThan(s,r);)r=s,s=ee().divide(ee().add(ee().divide(f,s),s),eL);return r}(ee().divide(s,l))}function maxLiquidityForAmount0Imprecise(f,r,s){if(ee().greaterThan(f,r)){var l=[r,f];f=l[0],r=l[1]}var m=ee().divide(ee().multiply(f,r),e5);return ee().divide(ee().multiply(ee().BigInt(s),m),ee().subtract(r,f))}function maxLiquidityForAmount0Precise(f,r,s){if(ee().greaterThan(f,r)){var l=[r,f];f=l[0],r=l[1]}
1var m=ee().multiply(ee().multiply(ee().BigInt(s),f),r),h=ee().multiply(e5,ee().subtract(r,f));return ee().divide(m,h)}function maxLiquidityForAmount1(f,r,s){if(ee().greaterThan(f,r)){var l=[r,f];f=l[0],r=l[1]}return ee().divide(ee().multiply(ee().BigInt(s),e5),ee().subtract(r,f))}function maxLiquidityForAmounts(f,r,s,l,m,h){if(ee().greaterThan(r,s)){var E=[s,r];r=E[0],s=E[1]}var I=h?maxLiquidityForAmount0Precise:maxLiquidityForAmount0Imprecise;if(ee().lessThanOrEqual(f,r))return I(r,s,l);if(!ee().lessThan(f,s))return maxLiquidityForAmount1(r,s,m);var w=I(f,s,l),B=maxLiquidityForAmount1(r,f,m);return ee().lessThan(w,B)?w:B}function nearestUsableTick(f,r){Number.isInteger(f)&&Number.isInteger(r)||(0,et.Z)(!1),r>0||(0,et.Z)(!1),f>=tr.MIN_TICK&&f<=tr.MAX_TICK||(0,et.Z)(!1);var s=Math.round(f/r)*r;return s<tr.MIN_TICK?s+r:s>tr.MAX_TICK?s-r:s}var to=ee().exponentiate(ee().BigInt(2),ee().BigInt(128)),ts=function(){function PositionLibrary(){}return PositionLibrary.getTokensOwed=function(f,r,s,l,m){return[ee().divide(ee().multiply(subIn256(l,f),s),to),ee().divide(ee().multiply(subIn256(m,r),s),to)]},PositionLibrary}();function tickToPrice(f,r,s){var l=tr.getSqrtRatioAtTick(s),m=ee().multiply(l,l);return f.sortsBefore(r)?new eF(f,r,e2,m):new eF(f,r,m,e2)}function priceToClosestTick(f){var r=f.baseCurrency.sortsBefore(f.quoteCurrency),s=r?encodeSqrtRatioX96(f.numerator,f.denominator):encodeSqrtRatioX96(f.denominator,f.numerator),l=tr.getTickAtSqrtRatio(s),m=tickToPrice(f.baseCurrency,f.quoteCurrency,l+1);return r?!f.lessThan(m)&&l++:!f.greaterThan(m)&&l++,l}var tu=ee().exponentiate(ee().BigInt(2),ee().BigInt(256));function subIn256(f,r){var s=ee().subtract(f,r);return ee().lessThan(s,e1)?ee().add(tu,s):s}var tc=function(){function TickLibrary(){}return TickLibrary.getFeeGrowthInside=function(f,r,s,l,m,h,E){var I,w,B,D;return m>=s?(I=f.feeGrowthOutside0X128,w=f.feeGrowthOutside1X128):(I=subIn256(h,f.feeGrowthOutside0X128),w=subIn256(E,f.feeGrowthOutside1X128)),m<l?(B=r.feeGrowthOutside0X128,D=r.feeGrowthOutside1X128):(B=subIn256(h,r.feeGrowthOutside0X128),D=subIn256(E,r.feeGrowthOutside1X128)),[subIn256(subIn256(h,I),B),subIn256(subIn256(E,w),D)]},TickLibrary}(),Tick=function(f){var r=f.index,s=f.liquidityGross,l=f.liquidityNet;r>=tr.MIN_TICK&&r<=tr.MAX_TICK||(0,et.Z)(!1),this.index=r,this.liquidityGross=ee().BigInt(s),this.liquidityNet=ee().BigInt(l)},td=function(){function TickListDataProvider(f,r){var s=f.map(function(f){return f instanceof Tick?f:new Tick(f)});ti.validateList(s,r),this.ticks=s}var f,r,s=TickListDataProvider.prototype;return s.getTick=(f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f){return _regeneratorRuntime().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",ti.getTick(this.ticks,f));case 1:case"end":return r.stop()}},_callee,this)})),function(r){return f.apply(this,arguments)}),s.nextInitializedTickWithinOneWord=(r=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(f,r,s){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",ti.nextInitializedTickWithinOneWord(this.ticks,f,r,s));case 1:case"end":return l.stop()}},_callee2,this)})),function(f,s,l){return r.apply(this,arguments)}),TickListDataProvider}(),tp=new ta,tl=function(){function Pool(f,r,s,l,m,h,E){void 0===E&&(E=tp),Number.isInteger(s)&&s<1e6||(0,et.Z)(!1);var I=tr.getSqrtRatioAtTick(h),w=tr.getSqrtRatioAtTick(h+1);ee().greaterThanOrEqual(ee().BigInt(l),I)&&ee().lessThanOrEqual(ee().BigInt(l),w)||(0,et.Z)(!1);var B=f.sortsBefore(r)?[f,r]:[r,f];this.token0=B[0],this.token1=B[1],this.fee=s,this.sqrtRatioX96=ee().BigInt(l),this.liquidity=ee().BigInt(m),this.tickCurrent=h,this.tickDataProvider=Array.isArray(E)?new td(E,e$[s]):E}Pool.getAddress=function(f,r,s,l,m){return computePoolAddress({factoryAddress:null!=m?m:eY,fee:s,tokenA:f,tokenB:r,initCodeHashManualOverride:l})};var f,r,s,l=Pool.prototype;return l.involvesToken=function(f){return f.equals(this.token0)||f.equals(this.token1)},l.priceOf=function(f){return this.involvesToken(f)||(0,et.Z)(!1),f.equals(this.token0)?this.token0Price:this.token1Price},l.getOutputAmount=(f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f,r){var s,l,m,h,E,I,w;return _regeneratorRuntime().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return this.involvesToken(f.currency)||(0,et.Z)(!1),s=f.currency.equals(this.token0),B.next=4,this.swap(s,f.quotient,r);
1case 4:return m=(l=B.sent).amountCalculated,h=l.sqrtRatioX96,E=l.liquidity,I=l.tickCurrent,w=s?this.token1:this.token0,B.abrupt("return",[ew.fromRawAmount(w,ee().multiply(m,e0)),new Pool(this.token0,this.token1,this.fee,h,E,I,this.tickDataProvider)]);case 11:case"end":return B.stop()}},_callee,this)})),function(r,s){return f.apply(this,arguments)}),l.getInputAmount=(r=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(f,r){var s,l,m,h,E,I,w;return _regeneratorRuntime().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return f.currency.isToken&&this.involvesToken(f.currency)||(0,et.Z)(!1),s=f.currency.equals(this.token1),B.next=4,this.swap(s,ee().multiply(f.quotient,e0),r);case 4:return m=(l=B.sent).amountCalculated,h=l.sqrtRatioX96,E=l.liquidity,I=l.tickCurrent,w=s?this.token0:this.token1,B.abrupt("return",[ew.fromRawAmount(w,m),new Pool(this.token0,this.token1,this.fee,h,E,I,this.tickDataProvider)]);case 11:case"end":return B.stop()}},_callee2,this)})),function(f,s){return r.apply(this,arguments)}),l.swap=(s=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(f,r,s){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",v3Swap(ee().BigInt(this.fee),this.sqrtRatioX96,this.tickCurrent,this.liquidity,this.tickSpacing,this.tickDataProvider,f,r,s));case 1:case"end":return l.stop()}},_callee3,this)})),function(f,r,l){return s.apply(this,arguments)}),v3_sdk_esm_createClass(Pool,[{key:"token0Price",get:function(){var f;return null!=(f=this._token0Price)?f:this._token0Price=new eF(this.token0,this.token1,e2,ee().multiply(this.sqrtRatioX96,this.sqrtRatioX96))}},{key:"token1Price",get:function(){var f;return null!=(f=this._token1Price)?f:this._token1Price=new eF(this.token1,this.token0,ee().multiply(this.sqrtRatioX96,this.sqrtRatioX96),e2)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"tickSpacing",get:function(){return e$[this.fee]}}])}(),tb=function(){function Position(f){var r=f.pool,s=f.liquidity,l=f.tickLower,m=f.tickUpper;this._token0Amount=null,this._token1Amount=null,this._mintAmounts=null,l<m||(0,et.Z)(!1),l>=tr.MIN_TICK&&l%r.tickSpacing==0||(0,et.Z)(!1),m<=tr.MAX_TICK&&m%r.tickSpacing==0||(0,et.Z)(!1),this.pool=r,this.tickLower=l,this.tickUpper=m,this.liquidity=ee().BigInt(s)}var f=Position.prototype;return f.ratiosAfterSlippage=function(f){var r=this.pool.token0Price.asFraction.multiply(new eB(1).subtract(f)),s=this.pool.token0Price.asFraction.multiply(f.add(1)),l=encodeSqrtRatioX96(r.numerator,r.denominator);ee().lessThanOrEqual(l,tr.MIN_SQRT_RATIO)&&(l=ee().add(tr.MIN_SQRT_RATIO,ee().BigInt(1)));var m=encodeSqrtRatioX96(s.numerator,s.denominator);return ee().greaterThanOrEqual(m,tr.MAX_SQRT_RATIO)&&(m=ee().subtract(tr.MAX_SQRT_RATIO,ee().BigInt(1))),{sqrtRatioX96Lower:l,sqrtRatioX96Upper:m}}
1,f.mintAmountsWithSlippage=function(f){var r=this.ratiosAfterSlippage(f),s=r.sqrtRatioX96Upper,l=r.sqrtRatioX96Lower,m=new tl(this.pool.token0,this.pool.token1,this.pool.fee,l,0,tr.getTickAtSqrtRatio(l)),h=new tl(this.pool.token0,this.pool.token1,this.pool.fee,s,0,tr.getTickAtSqrtRatio(s)),E=Position.fromAmounts(v3_sdk_esm_extends({pool:this.pool,tickLower:this.tickLower,tickUpper:this.tickUpper},this.mintAmounts,{useFullPrecision:!1}));return{amount0:new Position({pool:h,liquidity:E.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount0,amount1:new Position({pool:m,liquidity:E.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount1}},f.burnAmountsWithSlippage=function(f){var r=this.ratiosAfterSlippage(f),s=r.sqrtRatioX96Upper,l=r.sqrtRatioX96Lower,m=new tl(this.pool.token0,this.pool.token1,this.pool.fee,l,0,tr.getTickAtSqrtRatio(l)),h=new tl(this.pool.token0,this.pool.token1,this.pool.fee,s,0,tr.getTickAtSqrtRatio(s)),E=new Position({pool:h,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount0,I=new Position({pool:m,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount1;return{amount0:E.quotient,amount1:I.quotient}},Position.fromAmounts=function(f){var r=f.pool,s=f.tickLower,l=f.tickUpper,m=f.amount0,h=f.amount1,E=f.useFullPrecision,I=tr.getSqrtRatioAtTick(s),w=tr.getSqrtRatioAtTick(l);return new Position({pool:r,tickLower:s,tickUpper:l,liquidity:maxLiquidityForAmounts(r.sqrtRatioX96,I,w,m,h,E)})},Position.fromAmount0=function(f){var r=f.pool,s=f.tickLower,l=f.tickUpper,m=f.amount0,h=f.useFullPrecision;return Position.fromAmounts({pool:r,tickLower:s,tickUpper:l,amount0:m,amount1:eg,useFullPrecision:h})},Position.fromAmount1=function(f){var r=f.pool,s=f.tickLower,l=f.tickUpper,m=f.amount1;return Position.fromAmounts({pool:r,tickLower:s,tickUpper:l,amount0:eg,amount1:m,useFullPrecision:!0})},v3_sdk_esm_createClass(Position,[{key:"token0PriceLower",get:function(){return tickToPrice(this.pool.token0,this.pool.token1,this.tickLower)}},{key:"token0PriceUpper",get:function(){return tickToPrice(this.pool.token0,this.pool.token1,this.tickUpper)}},{key:"amount0",get:function(){return null===this._token0Amount&&(this.pool.tickCurrent<this.tickLower?this._token0Amount=ew.fromRawAmount(this.pool.token0,e4.getAmount0Delta(tr.getSqrtRatioAtTick(this.tickLower),tr.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!1)):this.pool.tickCurrent<this.tickUpper?this._token0Amount=ew.fromRawAmount(this.pool.token0,e4.getAmount0Delta(this.pool.sqrtRatioX96,tr.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!1)):this._token0Amount=ew.fromRawAmount(this.pool.token0,e1)),this._token0Amount}},{key:"amount1",get:function(){return null===this._token1Amount&&(this.pool.tickCurrent<this.tickLower?this._token1Amount=ew.fromRawAmount(this.pool.token1,e1):this.pool.tickCurrent<this.tickUpper?this._token1Amount=ew.fromRawAmount(this.pool.token1,e4.getAmount1Delta(tr.getSqrtRatioAtTick(this.tickLower),this.pool.sqrtRatioX96,this.liquidity,!1)):this._token1Amount=ew.fromRawAmount(this.pool.token1,e4.getAmount1Delta(tr.getSqrtRatioAtTick(this.tickLower),tr.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!1))),this._token1Amount}},{key:"mintAmounts",get:function(){return null===this._mintAmounts?this.pool.tickCurrent<this.tickLower?{amount0:e4.getAmount0Delta(tr.getSqrtRatioAtTick(this.tickLower),tr.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!0),amount1:e1}:this.pool.tickCurrent<this.tickUpper?{amount0:e4.getAmount0Delta(this.pool.sqrtRatioX96,tr.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!0),amount1:e4.getAmount1Delta(tr.getSqrtRatioAtTick(this.tickLower),this.pool.sqrtRatioX96,this.liquidity,!0)}:{amount0:e1,amount1:e4.getAmount1Delta(tr.getSqrtRatioAtTick(this.tickLower),tr.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!0)}:this._mintAmounts}}])}(),tm=v3_sdk_esm_createClass(function(f,r,s){this._midPrice=null,f.length>0||(0,et.Z)(!1);var l=f[0].chainId;f.every(function(f){return f.chainId===l})||(0,et.Z)(!1);var m=r.wrapped;f[0].involvesToken(m)||(0,et.Z)(!1),f[f.length-1].involvesToken(s.wrapped)||(0,et.Z)(!1);for(var h,E=[m],I=_createForOfIteratorHelperLoose(f.entries());!(h=I()).done;){var w=h.value,B=w[0],D=w[1],M=E[B];M.equals(D.token0)||M.equals(D.token1)||(0,et.Z)(!1);var L=M.equals(D.token0)?D.token1:D.token0;E.push(L)}this.pools=f,this.tokenPath=E,this.input=r,this.output=null!=s?s:E[E.length-1]},[{key:"chainId",get:function(){return this.pools[0].chainId}},{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;var f=this.pools.slice(1).reduce(function(f,r){var s=f.nextInput,l=f.price;return s.equals(r.token0)?{nextInput:r.token1,price:l.multiply(r.token0Price)}:{nextInput:r.token0,price:l.multiply(r.token1Price)}},this.pools[0].token0.equals(this.input.wrapped)?{nextInput:this.pools[0].token1,price:this.pools[0].token0Price}:{nextInput:this.pools[0].token0,price:this.pools[0].token1Price}).price;return this._midPrice=new eF(this.input,this.output,f.denominator,f.numerator)}}]);function tradeComparator(f,r){return(f.inputAmount.currency.equals(r.inputAmount.currency)||(0,et.Z)(!1),f.outputAmount.currency.equals(r.outputAmount.currency)||(0,et.Z)(!1),f.outputAmount.equalTo(r.outputAmount))?f.inputAmount.equalTo(r.inputAmount)?f.swaps.reduce(function(f,r){return f+r.route.tokenPath.length},0)-r.swaps.reduce(function(f,r){return f+r.route.tokenPath.length},0):f.inputAmount.lessThan(r.inputAmount)?-1:1:f.outputAmount.lessThan(r.outputAmount)?1:-1}var ty=function(){function Trade(f){var r=f.routes,s=f.tradeType,l=r[0].inputAmount.currency,m=r[0].outputAmount.currency;r.every(function(f){var r=f.route;return l.wrapped.equals(r.input.wrapped)}
1)||(0,et.Z)(!1),r.every(function(f){var r=f.route;return m.wrapped.equals(r.output.wrapped)})||(0,et.Z)(!1);for(var h,E=r.map(function(f){return f.route.pools.length}).reduce(function(f,r){return f+r},0),I=new Set,w=_createForOfIteratorHelperLoose(r);!(h=w()).done;)for(var B,D=h.value.route,M=_createForOfIteratorHelperLoose(D.pools);!(B=M()).done;){var L=B.value;I.add(tl.getAddress(L.token0,L.token1,L.fee))}E!==I.size&&(0,et.Z)(!1),this.swaps=r,this.tradeType=s}Trade.exactIn=(f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f,r){return _regeneratorRuntime().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",Trade.fromRoute(f,r,W.EXACT_INPUT));case 1:case"end":return s.stop()}},_callee)})),function(r,s){return f.apply(this,arguments)}),Trade.exactOut=(r=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(f,r){return _regeneratorRuntime().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",Trade.fromRoute(f,r,W.EXACT_OUTPUT));case 1:case"end":return s.stop()}},_callee2)})),function(f,s){return r.apply(this,arguments)}),Trade.fromRoute=(s=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(f,r,s){var l,m,h,E,I,w,B,D,M;return _regeneratorRuntime().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(l=Array(f.tokenPath.length),s!==W.EXACT_INPUT){L.next=19;break}r.currency.equals(f.input)||(0,et.Z)(!1),l[0]=r.wrapped,E=0;case 5:if(!(E<f.tokenPath.length-1)){L.next=15;break}return I=f.pools[E],L.next=9,I.getOutputAmount(l[E]);case 9:w=L.sent[0],l[E+1]=w;case 12:E++,L.next=5;break;case 15:m=ew.fromFractionalAmount(f.input,r.numerator,r.denominator),h=ew.fromFractionalAmount(f.output,l[l.length-1].numerator,l[l.length-1].denominator),L.next=34;break;case 19:r.currency.equals(f.output)||(0,et.Z)(!1),l[l.length-1]=r.wrapped,B=f.tokenPath.length-1;case 22:if(!(B>0)){L.next=32;break}return D=f.pools[B-1],L.next=26,D.getInputAmount(l[B]);case 26:M=L.sent[0],l[B-1]=M;case 29:B--,L.next=22;break;case 32:m=ew.fromFractionalAmount(f.input,l[0].numerator,l[0].denominator),h=ew.fromFractionalAmount(f.output,r.numerator,r.denominator);case 34:return L.abrupt("return",new Trade({routes:[{inputAmount:m,outputAmount:h,route:f}],tradeType:s}));case 35:case"end":return L.stop()}},_callee3)})),function(f,r,l){return s.apply(this,arguments)}),Trade.fromRoutes=(l=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(f,r){var s,l,m,h,E,I,w,B,D,M,L,V,G,Z,X;return _regeneratorRuntime().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:s=[],l=_createForOfIteratorHelperLoose(f);case 2:if((m=l()).done){K.next=43;break}if(E=(h=m.value).route,I=h.amount,w=Array(E.tokenPath.length),B=void 0,D=void 0,r!==W.EXACT_INPUT){K.next=25;break}I.currency.equals(E.input)||(0,et.Z)(!1),B=ew.fromFractionalAmount(E.input,I.numerator,I.denominator),w[0]=ew.fromFractionalAmount(E.input.wrapped,I.numerator,I.denominator),M=0;case 12:if(!(M<E.tokenPath.length-1)){K.next=22;break}return L=E.pools[M],K.next=16,L.getOutputAmount(w[M]);case 16:V=K.sent[0],w[M+1]=V;case 19:M++,K.next=12;break;case 22:D=ew.fromFractionalAmount(E.output,w[w.length-1].numerator,w[w.length-1].denominator),K.next=40;break;case 25:I.currency.equals(E.output)||(0,et.Z)(!1),D=ew.fromFractionalAmount(E.output,I.numerator,I.denominator),w[w.length-1]=ew.fromFractionalAmount(E.output.wrapped,I.numerator,I.denominator),G=E.tokenPath.length-1;case 29:if(!(G>0)){K.next=39;break}return Z=E.pools[G-1],K.next=33,Z.getInputAmount(w[G]);case 33:X=K.sent[0],w[G-1]=X;case 36:G--,K.next=29;break;case 39:B=ew.fromFractionalAmount(E.input,w[0].numerator,w[0].denominator);case 40:s.push({route:E,inputAmount:B,outputAmount:D});case 41:K.next=2;break;case 43:return K.abrupt("return",new Trade({routes:s,tradeType:r}));case 44:case"end":return K.stop()}},_callee4)})),function(f,r){return l.apply(this,arguments)}),Trade.createUncheckedTrade=function(f){return new Trade(v3_sdk_esm_extends({},f,{routes:[{inputAmount:f.inputAmount,outputAmount:f.outputAmount,route:f.route}]}))},Trade.createUncheckedTradeWithMultipleRoutes=function(f){return new Trade(f)};var f,r,s,l,m,h,E=Trade.prototype;return E.minimumAmountOut=function(f,r){if(void 0===r&&(r=this.outputAmount),f.lessThan(e1)&&(0,et.Z)(!1),this.tradeType===W.EXACT_OUTPUT)return r;var s=new ex(e6).add(f).invert().multiply(r.quotient).quotient;return ew.fromRawAmount(r.currency,s)},E.maximumAmountIn=function(f,r){if(void 0===r&&(r=this.inputAmount),f.lessThan(e1)&&(0,et.Z)(!1),this.tradeType===W.EXACT_INPUT)return r;var s=new ex(e6).add(f).multiply(r.quotient).quotient;return ew.fromRawAmount(r.currency,s)},E.worstExecutionPrice=function(f){return new eF(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(f).quotient,this.minimumAmountOut(f).quotient)},Trade.bestTradeExactIn=(m=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(f,r,s,l,m,h,E){var I,w,B,D,M,L,V,G,Z,X,K;return _regeneratorRuntime().wrap(function($){for(;;)switch($.prev=$.next){case 0:B=void 0===(w=(I=void 0===l?{}:l).maxNumResults)?3:w,M=void 0===(D=I.maxHops)?3:D,void 0===m&&(m=[]),void 0===h&&(h=r),void 0===E&&(E=[]),f.length>0||(0,et.Z)(!1),M>0||(0,et.Z)(!1),r===h||m.length>0||(0,et.Z)(!1),L=h.wrapped,V=s.wrapped,G=0;case 10:if(!(G<f.length)){$.next=46;break}if(!(!(Z=f[G]).token0.equals(L.currency)&&!Z.token1.equals(L.currency))){$.next=14;break}return $.abrupt("continue",43);case 14:return X=void 0,$.prev=15,$.next=19,Z.getOutputAmount(L);case 19:X=$.sent[0],$.next=28;break;
1case 23:if($.prev=23,$.t0=$.catch(15),!$.t0.isInsufficientInputAmountError){$.next=27;break}return $.abrupt("continue",43);case 27:throw $.t0;case 28:if(!(X.currency.isToken&&X.currency.equals(V))){$.next=39;break}return $.t1=sortedInsert,$.t2=E,$.next=33,Trade.fromRoute(new tm([].concat(m,[Z]),r.currency,s),r,W.EXACT_INPUT);case 33:$.t3=$.sent,$.t4=B,$.t5=tradeComparator,(0,$.t1)($.t2,$.t3,$.t4,$.t5),$.next=43;break;case 39:if(!(M>1&&f.length>1)){$.next=43;break}return K=f.slice(0,G).concat(f.slice(G+1,f.length)),$.next=43,Trade.bestTradeExactIn(K,r,s,{maxNumResults:B,maxHops:M-1},[].concat(m,[Z]),X,E);case 43:G++,$.next=10;break;case 46:return $.abrupt("return",E);case 47:case"end":return $.stop()}},_callee5,null,[[15,23]])})),function(f,r,s,l,h,E,I){return m.apply(this,arguments)}),Trade.bestTradeExactOut=(h=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(f,r,s,l,m,h,E){var I,w,B,D,M,L,V,G,Z,X,K;return _regeneratorRuntime().wrap(function($){for(;;)switch($.prev=$.next){case 0:B=void 0===(w=(I=void 0===l?{}:l).maxNumResults)?3:w,M=void 0===(D=I.maxHops)?3:D,void 0===m&&(m=[]),void 0===h&&(h=s),void 0===E&&(E=[]),f.length>0||(0,et.Z)(!1),M>0||(0,et.Z)(!1),s===h||m.length>0||(0,et.Z)(!1),L=h.wrapped,V=r.wrapped,G=0;case 10:if(!(G<f.length)){$.next=46;break}if(!(!(Z=f[G]).token0.equals(L.currency)&&!Z.token1.equals(L.currency))){$.next=14;break}return $.abrupt("continue",43);case 14:return X=void 0,$.prev=15,$.next=19,Z.getInputAmount(L);case 19:X=$.sent[0],$.next=28;break;
1case 23:if($.prev=23,$.t0=$.catch(15),!$.t0.isInsufficientReservesError){$.next=27;break}return $.abrupt("continue",43);case 27:throw $.t0;case 28:if(!X.currency.equals(V)){$.next=39;break}return $.t1=sortedInsert,$.t2=E,$.next=33,Trade.fromRoute(new tm([Z].concat(m),r,s.currency),s,W.EXACT_OUTPUT);case 33:$.t3=$.sent,$.t4=B,$.t5=tradeComparator,(0,$.t1)($.t2,$.t3,$.t4,$.t5),$.next=43;break;case 39:if(!(M>1&&f.length>1)){$.next=43;break}return K=f.slice(0,G).concat(f.slice(G+1,f.length)),$.next=43,Trade.bestTradeExactOut(K,r,s,{maxNumResults:B,maxHops:M-1},[Z].concat(m),X,E);case 43:G++,$.next=10;break;case 46:return $.abrupt("return",E);case 47:case"end":return $.stop()}},_callee6,null,[[15,23]])})),function(f,r,s,l,m,E,I){return h.apply(this,arguments)}),v3_sdk_esm_createClass(Trade,[{key:"route",get:function(){return 1!==this.swaps.length&&(0,et.Z)(!1),this.swaps[0].route}},{key:"inputAmount",get:function(){if(this._inputAmount)return this._inputAmount;var f=this.swaps[0].inputAmount.currency,r=this.swaps.map(function(f){return f.inputAmount}).reduce(function(f,r){return f.add(r)},ew.fromRawAmount(f,0));return this._inputAmount=r,this._inputAmount}},{key:"outputAmount",get:function(){if(this._outputAmount)return this._outputAmount;var f=this.swaps[0].outputAmount.currency,r=this.swaps.map(function(f){return f.outputAmount}).reduce(function(f,r){return f.add(r)},ew.fromRawAmount(f,0));return this._outputAmount=r,this._outputAmount}},{key:"executionPrice",get:function(){var f;return null!=(f=this._executionPrice)?f:this._executionPrice=new eF(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient)}},{key:"priceImpact",get:function(){if(this._priceImpact)return this._priceImpact;for(var f,r=ew.fromRawAmount(this.outputAmount.currency,0),s=_createForOfIteratorHelperLoose(this.swaps);!(f=s()).done;){var l=f.value,m=l.route,h=l.inputAmount,E=m.midPrice;r=r.add(E.quote(h))}var I=r.subtract(this.outputAmount).divide(r);return this._priceImpact=new eB(I.numerator,I.denominator),this._priceImpact}}])}(),tA=function(){function Multicall(){}return Multicall.encodeMulticall=function(f){return Array.isArray(f)||(f=[f]),1===f.length?f[0]:Multicall.INTERFACE.encodeFunctionData("multicall",[f])},Multicall.decodeMulticall=function(f){return Multicall.INTERFACE.decodeFunctionData("multicall",f).data},Multicall}();tA.INTERFACE=new eU.vU(eW.Mt);var th=function(){function SelfPermit(){}return SelfPermit.encodePermit=function(f,r){return"nonce"in r?SelfPermit.INTERFACE.encodeFunctionData("selfPermitAllowed",[f.address,toHex(r.nonce),toHex(r.expiry),r.v,r.r,r.s]):SelfPermit.INTERFACE.encodeFunctionData("selfPermit",[f.address,toHex(r.amount),toHex(r.deadline),r.v,r.r,r.s])},SelfPermit}();th.INTERFACE=new eU.vU(eG.Mt);var tE=function(){function Payments(){}return Payments.encodeFeeBips=function(f){return toHex(f.multiply(1e4).quotient)},Payments.encodeUnwrapWETH9=function(f,r,s){if(r=validateAndParseAddress(r),!s)return Payments.INTERFACE.encodeFunctionData("unwrapWETH9",[toHex(f),r]);var l=this.encodeFeeBips(s.fee),m=validateAndParseAddress(s.recipient);return Payments.INTERFACE.encodeFunctionData("unwrapWETH9WithFee",[toHex(f),r,l,m])},Payments.encodeSweepToken=function(f,r,s,l){if(s=validateAndParseAddress(s),!l)return Payments.INTERFACE.encodeFunctionData("sweepToken",[f.address,toHex(r),s]);var m=this.encodeFeeBips(l.fee),h=validateAndParseAddress(l.recipient);return Payments.INTERFACE.encodeFunctionData("sweepTokenWithFee",[f.address,toHex(r),s,m,h])},Payments.encodeRefundETH=function(){return Payments.INTERFACE.encodeFunctionData("refundETH")},Payments}();tE.INTERFACE=new eU.vU(eZ.Mt);var tg=["expectedCurrencyOwed0","expectedCurrencyOwed1"],tv=toHex(ee().subtract(ee().exponentiate(ee().BigInt(2),ee().BigInt(128)),ee().BigInt(1)));function isMint(f){return Object.keys(f).some(function(f){return"recipient"===f})}var tT={Permit:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},t_=function(){function NonfungiblePositionManager(){}return NonfungiblePositionManager.encodeCreate=function(f){return NonfungiblePositionManager.INTERFACE.encodeFunctionData("createAndInitializePoolIfNecessary",[f.token0.address,f.token1.address,f.fee,toHex(f.sqrtRatioX96)])},NonfungiblePositionManager.createCallParameters=function(f){return{calldata:this.encodeCreate(f),value:toHex(0)}}
1,NonfungiblePositionManager.addCallParameters=function(f,r){ee().greaterThan(f.liquidity,e1)||(0,et.Z)(!1);var s=[],l=f.mintAmounts,m=l.amount0,h=l.amount1,E=f.mintAmountsWithSlippage(r.slippageTolerance),I=toHex(E.amount0),w=toHex(E.amount1),B=toHex(r.deadline);if(isMint(r)&&r.createPool&&s.push(this.encodeCreate(f.pool)),r.token0Permit&&s.push(th.encodePermit(f.pool.token0,r.token0Permit)),r.token1Permit&&s.push(th.encodePermit(f.pool.token1,r.token1Permit)),isMint(r)){var D=validateAndParseAddress(r.recipient);s.push(NonfungiblePositionManager.INTERFACE.encodeFunctionData("mint",[{token0:f.pool.token0.address,token1:f.pool.token1.address,fee:f.pool.fee,tickLower:f.tickLower,tickUpper:f.tickUpper,amount0Desired:toHex(m),amount1Desired:toHex(h),amount0Min:I,amount1Min:w,recipient:D,deadline:B}]))}else s.push(NonfungiblePositionManager.INTERFACE.encodeFunctionData("increaseLiquidity",[{tokenId:toHex(r.tokenId),amount0Desired:toHex(m),amount1Desired:toHex(h),amount0Min:I,amount1Min:w,deadline:B}]));var M=toHex(0);if(r.useNative){var L=r.useNative.wrapped;f.pool.token0.equals(L)||f.pool.token1.equals(L)||(0,et.Z)(!1);var W=f.pool.token0.equals(L)?m:h;ee().greaterThan(W,e1)&&s.push(tE.encodeRefundETH()),M=toHex(W)}return{calldata:tA.encodeMulticall(s),value:M}},NonfungiblePositionManager.encodeCollect=function(f){var r=[],s=toHex(f.tokenId),l=f.expectedCurrencyOwed0.currency.isNative||f.expectedCurrencyOwed1.currency.isNative,m=validateAndParseAddress(f.recipient);if(r.push(NonfungiblePositionManager.INTERFACE.encodeFunctionData("collect",[{tokenId:s,recipient:l?ez:m,amount0Max:tv,amount1Max:tv}])),l){var h=f.expectedCurrencyOwed0.currency.isNative?f.expectedCurrencyOwed0.quotient:f.expectedCurrencyOwed1.quotient,E=f.expectedCurrencyOwed0.currency.isNative?f.expectedCurrencyOwed1.currency:f.expectedCurrencyOwed0.currency,I=f.expectedCurrencyOwed0.currency.isNative?f.expectedCurrencyOwed1.quotient:f.expectedCurrencyOwed0.quotient;r.push(tE.encodeUnwrapWETH9(h,m)),r.push(tE.encodeSweepToken(E,I,m))}return r},NonfungiblePositionManager.collectCallParameters=function(f){var r=NonfungiblePositionManager.encodeCollect(f);return{calldata:tA.encodeMulticall(r),value:toHex(0)}},NonfungiblePositionManager.removeCallParameters=function(f,r){var s=[],l=toHex(r.deadline),m=toHex(r.tokenId),h=new tb({pool:f.pool,liquidity:r.liquidityPercentage.multiply(f.liquidity).quotient,tickLower:f.tickLower,tickUpper:f.tickUpper});ee().greaterThan(h.liquidity,e1)||(0,et.Z)(!1);var E=h.burnAmountsWithSlippage(r.slippageTolerance),I=E.amount0,w=E.amount1;r.permit&&s.push(NonfungiblePositionManager.INTERFACE.encodeFunctionData("permit",[validateAndParseAddress(r.permit.spender),m,toHex(r.permit.deadline),r.permit.v,r.permit.r,r.permit.s])),s.push(NonfungiblePositionManager.INTERFACE.encodeFunctionData("decreaseLiquidity",[{tokenId:m,liquidity:toHex(h.liquidity),amount0Min:toHex(I),amount1Min:toHex(w),deadline:l}]));var B=r.collectOptions,D=B.expectedCurrencyOwed0,M=B.expectedCurrencyOwed1,L=function(f,r){if(null==f)return{};var s={};for(var l in f)if(({}).hasOwnProperty.call(f,l)){if(-1!==r.indexOf(l))continue;s[l]=f[l]}return s}(B,tg);return s.push.apply(s,NonfungiblePositionManager.encodeCollect(v3_sdk_esm_extends({tokenId:toHex(r.tokenId),expectedCurrencyOwed0:D.add(ew.fromRawAmount(D.currency,I)),expectedCurrencyOwed1:M.add(ew.fromRawAmount(M.currency,w))},L))),r.liquidityPercentage.equalTo(e6)?r.burnToken&&s.push(NonfungiblePositionManager.INTERFACE.encodeFunctionData("burn",[m])):!0!==r.burnToken||(0,et.Z)(!1),{calldata:tA.encodeMulticall(s),value:toHex(0)}},NonfungiblePositionManager.safeTransferFromParameters=function(f){var r=validateAndParseAddress(f.recipient),s=validateAndParseAddress(f.sender);return{calldata:f.data?NonfungiblePositionManager.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256,bytes)",[s,r,toHex(f.tokenId),f.data]):NonfungiblePositionManager.INTERFACE.encodeFunctionData("safeTransferFrom(address,address,uint256)",[s,r,toHex(f.tokenId)]),value:toHex(0)}},NonfungiblePositionManager.getPermitData=function(f,r,s){return{domain:{name:"Uniswap V3 Positions NFT-V1",chainId:s,version:"1",verifyingContract:r},types:tT,values:f}},NonfungiblePositionManager}();t_.INTERFACE=new eU.vU(eV.Mt);var tC=function(){function SwapQuoter(){}return SwapQuoter.quoteCallParameters=function(f,r,s,l){void 0===l&&(l={});var m=1===f.pools.length,h=toHex(r.quotient),E=l.useQuoterV2?this.V2INTERFACE:this.V1INTERFACE;if(m){var I,w,B,D={tokenIn:f.tokenPath[0].address,tokenOut:f.tokenPath[1].address,fee:f.pools[0].fee,sqrtPriceLimitX96:toHex(null!=(w=null==(B=l)?void 0:B.sqrtPriceLimitX96)?w:0)},M=v3_sdk_esm_extends({},D,s===W.EXACT_INPUT?{amountIn:h}:{amount:h}),L=[D.tokenIn,D.tokenOut,D.fee,h,D.sqrtPriceLimitX96],V=s===W.EXACT_INPUT?"quoteExactInputSingle":"quoteExactOutputSingle";I=E.encodeFunctionData(V,l.useQuoterV2?[M]:L)}else{(null==(G=l)?void 0:G.sqrtPriceLimitX96)!==void 0&&(0,et.Z)(!1);var G,Z=encodeRouteToPath(f,s===W.EXACT_OUTPUT),X=s===W.EXACT_INPUT?"quoteExactInput":"quoteExactOutput";I=E.encodeFunctionData(X,[Z,h])}return{calldata:I,value:toHex(0)}},SwapQuoter}();tC.V1INTERFACE=new eU.vU(eX.Mt),tC.V2INTERFACE=new eU.vU(ej.Mt);var tx=function(){function Staker(){}return Staker.encodeClaim=function(f,r){var s,l=[];l.push(Staker.INTERFACE.encodeFunctionData("unstakeToken",[this._encodeIncentiveKey(f),toHex(r.tokenId)]));
1var m=validateAndParseAddress(r.recipient),h=null!=(s=r.amount)?s:0;return l.push(Staker.INTERFACE.encodeFunctionData("claimReward",[f.rewardToken.address,m,toHex(h)])),l},Staker.collectRewards=function(f,r){f=Array.isArray(f)?f:[f];for(var s=[],l=0;l<f.length;l++){var m=f[l];(s=s.concat(this.encodeClaim(m,r))).push(Staker.INTERFACE.encodeFunctionData("stakeToken",[this._encodeIncentiveKey(m),toHex(r.tokenId)]))}return{calldata:tA.encodeMulticall(s),value:toHex(0)}},Staker.withdrawToken=function(f,r){var s=[];f=Array.isArray(f)?f:[f];for(var l={tokenId:r.tokenId,recipient:r.recipient,amount:r.amount},m=0;m<f.length;m++){var h=f[m];s=s.concat(this.encodeClaim(h,l))}var E=validateAndParseAddress(r.owner);return s.push(Staker.INTERFACE.encodeFunctionData("withdrawToken",[toHex(r.tokenId),E,r.data?r.data:toHex(0)])),{calldata:tA.encodeMulticall(s),value:toHex(0)}},Staker.encodeDeposit=function(f){if((f=Array.isArray(f)?f:[f]).length>1){for(var r,s=[],l=0;l<f.length;l++){var m=f[l];s.push(this._encodeIncentiveKey(m))}r=eq.$.encode([Staker.INCENTIVE_KEY_ABI+"[]"],[s])}else r=eq.$.encode([Staker.INCENTIVE_KEY_ABI],[this._encodeIncentiveKey(f[0])]);return r},Staker._encodeIncentiveKey=function(f){var r=f.pool,s=r.token0,l=r.token1,m=r.fee,h=validateAndParseAddress(f.refundee);return{rewardToken:f.rewardToken.address,pool:tl.getAddress(s,l,m),startTime:toHex(f.startTime),endTime:toHex(f.endTime),refundee:h}},Staker}();tx.INTERFACE=new eU.vU(eQ.Mt),tx.INCENTIVE_KEY_ABI="tuple(address rewardToken, address pool, uint256 startTime, uint256 endTime, address refundee)";var tI=function(){function SwapRouter(){}
1return SwapRouter.swapCallParameters=function(f,r){Array.isArray(f)||(f=[f]);var s=f[0],l=s.inputAmount.currency.wrapped,m=s.outputAmount.currency.wrapped;f.every(function(f){return f.inputAmount.currency.wrapped.equals(l)})||(0,et.Z)(!1),f.every(function(f){return f.outputAmount.currency.wrapped.equals(m)})||(0,et.Z)(!1);var h=[],E=ew.fromRawAmount(f[0].inputAmount.currency,0),I=ew.fromRawAmount(f[0].outputAmount.currency,0),w=f.reduce(function(f,s){return f.add(s.minimumAmountOut(r.slippageTolerance))},I),B=s.inputAmount.currency.isNative&&s.tradeType===W.EXACT_OUTPUT,D=s.inputAmount.currency.isNative,M=s.outputAmount.currency.isNative,L=M||!!r.fee,V=D?f.reduce(function(f,s){return f.add(s.maximumAmountIn(r.slippageTolerance))},E):E;r.inputTokenPermit&&(s.inputAmount.currency.isToken||(0,et.Z)(!1),h.push(th.encodePermit(s.inputAmount.currency,r.inputTokenPermit)));for(var G,Z=validateAndParseAddress(r.recipient),X=toHex(r.deadline),K=_createForOfIteratorHelperLoose(f);!(G=K()).done;)for(var $,ee=G.value,ef=_createForOfIteratorHelperLoose(ee.swaps);!($=ef()).done;){var en=$.value,er=en.route,ea=en.inputAmount,ei=en.outputAmount,eo=toHex(ee.maximumAmountIn(r.slippageTolerance,ea).quotient),es=toHex(ee.minimumAmountOut(r.slippageTolerance,ei).quotient);if(1===er.pools.length){if(ee.tradeType===W.EXACT_INPUT){var eu,ec={tokenIn:er.tokenPath[0].address,tokenOut:er.tokenPath[1].address,fee:er.pools[0].fee,recipient:L?ez:Z,deadline:X,amountIn:eo,amountOutMinimum:es,sqrtPriceLimitX96:toHex(null!=(eu=r.sqrtPriceLimitX96)?eu:0)};h.push(SwapRouter.INTERFACE.encodeFunctionData("exactInputSingle",[ec]))}else{var ed,ep={tokenIn:er.tokenPath[0].address,tokenOut:er.tokenPath[1].address,fee:er.pools[0].fee,recipient:L?ez:Z,deadline:X,amountOut:es,amountInMaximum:eo,sqrtPriceLimitX96:toHex(null!=(ed=r.sqrtPriceLimitX96)?ed:0)};h.push(SwapRouter.INTERFACE.encodeFunctionData("exactOutputSingle",[ep]))}}else{void 0!==r.sqrtPriceLimitX96&&(0,et.Z)(!1);var el=encodeRouteToPath(er,ee.tradeType===W.EXACT_OUTPUT);if(ee.tradeType===W.EXACT_INPUT){var eb={path:el,recipient:L?ez:Z,deadline:X,amountIn:eo,amountOutMinimum:es};h.push(SwapRouter.INTERFACE.encodeFunctionData("exactInput",[eb]))}else{var em={path:el,recipient:L?ez:Z,deadline:X,amountOut:es,amountInMaximum:eo};h.push(SwapRouter.INTERFACE.encodeFunctionData("exactOutput",[em]))}}}return L&&(r.fee?M?h.push(tE.encodeUnwrapWETH9(w.quotient,Z,r.fee)):h.push(tE.encodeSweepToken(s.outputAmount.currency.wrapped,w.quotient,Z,r.fee)):h.push(tE.encodeUnwrapWETH9(w.quotient,Z))),B&&h.push(tE.encodeRefundETH()),{calldata:tA.encodeMulticall(h),value:toHex(V.quotient)}},SwapRouter}();tI.INTERFACE=new eU.vU(eK.Mt)},16406:function(f,r,s){var l;!function(m){"use strict";var h,E="[big.js] ",I=E+"Invalid ",w=I+"decimal places",B=I+"rounding mode",D=E+"Division by zero",M={},L=void 0,W=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function round(f,r,s,l){var m=f.c,h=f.e+r+1;if(h<m.length){if(1===s)l=m[h]>=5;else if(2===s)l=m[h]>5||5==m[h]&&(l||h<0||m[h+1]!==L||1&m[h-1]);else if(3===s)l=l||!!m[0];else if(l=!1,0!==s)throw Error(B);if(h<1)m.length=1,l?(f.e=-r,m[0]=1):m[0]=f.e=0;else{if(m.length=h--,l)for(;++m[h]>9;)m[h]=0,h--||(++f.e,m.unshift(1));for(h=m.length;!m[--h];)m.pop()}}else if(s<0||s>3||s!==~~s)throw Error(B);return f}function stringify(f,r,s,l){var m,h,E=f.constructor,B=!f.c[0];if(s!==L){if(s!==~~s||s<(3==r)||s>1e6)throw Error(3==r?I+"precision":w);for(s=l-(f=new E(f)).e,f.c.length>++l&&round(f,s,E.RM),2==r&&(l=f.e+s+1);f.c.length<l;)f.c.push(0)}if(m=f.e,s=(h=f.c.join("")).length,2!=r&&(1==r||3==r&&l<=m||m<=E.NE||m>=E.PE))h=h.charAt(0)+(s>1?"."+h.slice(1):"")+(m<0?"e":"e+")+m;else if(m<0){for(;++m;)h="0"+h;h="0."+h}else if(m>0){if(++m>s)for(m-=s;m--;)h+="0";else m<s&&(h=h.slice(0,m)+"."+h.slice(m))}else s>1&&(h=h.charAt(0)+"."+h.slice(1));return f.s<0&&(!B||4==r)?"-"+h:h}M.abs=function(){var f=new this.constructor(this);return f.s=1,f},M.cmp=function(f){var r,s=this.c,l=(f=new this.constructor(f)).c,m=this.s,h=f.s,E=this.e,I=f.e;if(!s[0]||!l[0])return s[0]?m:l[0]?-h:0;if(m!=h)return m;if(r=m<0,E!=I)return E>I^r?1:-1;for(m=-1,h=(E=s.length)<(I=l.length)?E:I;++m<h;)if(s[m]!=l[m])return s[m]>l[m]^r?1:-1;return E==I?0:E>I^r?1:-1},M.div=function(f){var r=this.constructor,s=this.c,l=(f=new r(f)).c,m=this.s==f.s?1:-1,h=r.DP;if(h!==~~h||h<0||h>1e6)throw Error(w);if(!l[0])throw Error(D);if(!s[0])return new r(0*m);var E,I,B,M,W,V=l.slice(),G=E=l.length,Z=s.length,X=s.slice(0,E),K=X.length,$=f,ee=$.c=[],et=0,ef=h+($.e=this.e-f.e)+1;for($.s=m,m=ef<0?0:ef,V.unshift(0);K++<E;)X.push(0);do{for(B=0;B<10;B++){if(E!=(K=X.length))M=E>K?1:-1;else for(W=-1,M=0;++W<E;)if(l[W]!=X[W]){M=l[W]>X[W]?1:-1;break}if(M<0){for(I=K==E?l:V;K;){if(X[--K]<I[K]){for(W=K;W&&!X[--W];)X[W]=9;--X[W],X[K]+=10}X[K]-=I[K]}for(;!X[0];)X.shift()}else break}ee[et++]=M?B:++B,X[0]&&M?X[K]=s[G]||0:X=[s[G]]}while((G++<Z||X[0]!==L)&&m--);return!ee[0]&&1!=et&&(ee.shift(),$.e--),et>ef&&round($,h,r.RM,X[0]!==L),$},M.eq=function(f){return!this.cmp(f)},M.gt=function(f){return this.cmp(f)>0},M.gte=function(f){return this.cmp(f)>-1},M.lt=function(f){return 0>this.cmp(f)},M.lte=function(f){return 1>this.cmp(f)},M.minus=M.sub=function(f){var r,s,l,m,h=this.constructor,E=this.s,I=(f=new h(f)).s;if(E!=I)return f.s=-I,this.plus(f);var w=this.c.slice(),B=this.e,D=f.c,M=f.e;if(!w[0]||!D[0])return D[0]?(f.s=-I,f):new h(w[0]?this:0);if(E=B-M){for((m=E<0)?(E=-E,l=w):(M=B,l=D),l.reverse(),I=E;I--;)l.push(0);l.reverse()}else for(s=((m=w.length<D.length)?w:D).length,E=I=0;I<s;I++)if(w[I]!=D[I]){m=w[I]<D[I];break}if(m&&(l=w,w=D,D=l,f.s=-f.s),(I=(s=D.length)-(r=w.length))>0)for(;I--;)w[r++]=0;for(I=r;s>E;){if(w[--s]<D[s]){for(r=s;r&&!w[--r];)w[r]=9;--w[r],w[s]+=10}w[s]-=D[s]}for(;0===w[--I];)w.pop();for(;0===w[0];)w.shift(),--M;return w[0]||(f.s=1,w=[M=0]),f.c=w,f.e=M,f},M.mod=function(f){var r,s=this,l=s.constructor,m=s.s,h=(f=new l(f)).s;if(!f.c[0])throw Error(D);return(s.s=f.s=1,r=1==f.cmp(s),s.s=m,f.s=h,r)?new l(s):(m=l.DP,h=l.RM,l.DP=l.RM=0,s=s.div(f),l.DP=m,l.RM=h,this.minus(s.times(f)))},M.plus=M.add=function(f){var r,s=this.constructor,l=this.s,m=(f=new s(f)).s;if(l!=m)return f.s=-m,this.minus(f);var h=this.e,E=this.c,I=f.e,w=f.c;if(!E[0]||!w[0])return w[0]?f:new s(E[0]?this:0*l);if(E=E.slice(),l=h-I){for(l>0?(I=h,r=w):(l=-l,r=E),r.reverse();l--;)r.push(0);r.reverse()}for(E.length-w.length<0&&(r=w,w=E,E=r),l=w.length,m=0;l;E[l]%=10)m=(E[--l]=E[l]+w[l]+m)/10|0;for(m&&(E.unshift(m),++I),l=E.length;0===E[--l];)E.pop();return f.c=E,f.e=I,f},M.pow=function(f){var r=this,s=new r.constructor(1),l=s,m=f<0;if(f!==~~f||f<-1e6||f>1e6)throw Error(I+"exponent");for(m&&(f=-f);1&f&&(l=l.times(r)),f>>=1;)r=r.times(r);return m?s.div(l):l},M.round=function(f,r){var s=this.constructor;if(f===L)f=0;else if(f!==~~f||f<-1e6||f>1e6)throw Error(w);return round(new s(this),f,r===L?s.RM:r)},M.sqrt=function(){var f,r,s,l=this.constructor,m=this.s,h=this.e,I=new l(.5);if(!this.c[0])return new l(this);if(m<0)throw Error(E+"No square root");0===(m=Math.sqrt(this+""))||m===1/0?((r=this.c.join("")).length+h&1||(r+="0"),m=Math.sqrt(r),h=((h+1)/2|0)-(h<0||1&h),f=new l((m==1/0?"1e":(m=m.toExponential()).slice(0,m.indexOf("e")+1))+h)):f=new l(m),h=f.e+(l.DP+=4);do s=f,f=I.times(s.plus(this.div(s)));while(s.c.slice(0,h).join("")!==f.c.slice(0,h).join(""));return round(f,l.DP-=4,l.RM)},M.times=M.mul=function(f){var r,s=this.constructor,l=this.c,m=(f=new s(f)).c,h=l.length,E=m.length,I=this.e,w=f.e;if(f.s=this.s==f.s?1:-1,!l[0]||!m[0])return new s(0*f.s);for(f.e=I+w,h<E&&(r=l,l=m,m=r,w=h,h=E,E=w),r=Array(w=h+E);w--;)r[w]=0;for(I=E;I--;){for(E=0,w=h+I;w>I;)E=r[w]+m[I]*l[w-I-1]+E,r[w--]=E%10,E=E/10|0;r[w]=(r[w]+E)%10}
1for(E?++f.e:r.shift(),I=r.length;!r[--I];)r.pop();return f.c=r,f},M.toExponential=function(f){return stringify(this,1,f,f)},M.toFixed=function(f){return stringify(this,2,f,this.e+f)},M.toPrecision=function(f){return stringify(this,3,f,f-1)},M.toString=function(){return stringify(this)},M.valueOf=M.toJSON=function(){return stringify(this,4)},(h=function _Big_(){function Big(f){if(!(this instanceof Big))return f===L?_Big_():new Big(f);f instanceof Big?(this.s=f.s,this.e=f.e,this.c=f.c.slice()):function(f,r){var s,l,m;if(0===r&&1/r<0)r="-0";else if(!W.test(r+=""))throw Error(I+"number");for(f.s="-"==r.charAt(0)?(r=r.slice(1),-1):1,(s=r.indexOf("."))>-1&&(r=r.replace(".","")),(l=r.search(/e/i))>0?(s<0&&(s=l),s+=+r.slice(l+1),r=r.substring(0,l)):s<0&&(s=r.length),m=r.length,l=0;l<m&&"0"==r.charAt(l);)++l;if(l==m)f.c=[f.e=0];else{for(;m>0&&"0"==r.charAt(--m););for(f.e=s-l-1,f.c=[],s=0;l<=m;)f.c[s++]=+r.charAt(l++)}return f}(this,f),this.constructor=Big}return Big.prototype=M,Big.DP=20,Big.RM=1,Big.NE=-7,Big.PE=21,Big.version="5.2.2",Big}()).default=h.Big=h,void 0!==(l=(function(){return h}).call(r,s,r,f))&&(f.exports=l)}(0)},91440:function(f,r,s){"use strict";s.r(r),s.d(r,{Actions:function(){return eo},DYNAMIC_FEE_FLAG:function(){return e3},Hook:function(){return ez},HookOptions:function(){return ef},Pool:function(){return e4},Position:function(){return te},Route:function(){return e9},Subparser:function(){return es},Trade:function(){return e7},V4BaseActionsParser:function(){return ts},V4Planner:function(){return ti},V4PositionManager:function(){return tp},V4PositionPlanner:function(){return to},V4_BASE_ACTIONS_ABI_DEFINITION:function(){return ta},amountWithPathCurrency:function(){return amountWithPathCurrency},encodeRouteToPath:function(){return encodeRouteToPath},getPathCurrency:function(){return getPathCurrency},hookFlagIndex:function(){return eY},priceToClosestTick:function(){return priceToClosestTick},sortsBefore:function(){return sortsBefore},tickToPrice:function(){return tickToPrice},toAddress:function(){return toAddress},toHex:function(){return toHex},tradeComparator:function(){return tradeComparator}});var l,m,h,E,I,w,B,D,M,L,W,V,G,Z,X,K,$,ee,et,ef,en,er,ea,ei,eo,es,eu=s(4554),ec=s(43898),ed=s(28518),ep=s.n(ed),el=s(39585),eb=s.n(el),em=s(38513),ey=s.n(em),eA=s(8064),eh=s.n(eA),eE=s(39898),eg=s(13858);function _defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function _createClass(f,r,s){return r&&_defineProperties(f.prototype,r),s&&_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _inheritsLoose(f,r){f.prototype=Object.create(r.prototype),f.prototype.constructor=f,_setPrototypeOf(f,r)}function _setPrototypeOf(f,r){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}(l=L||(L={}))[l.MAINNET=1]="MAINNET",l[l.GOERLI=5]="GOERLI",l[l.SEPOLIA=11155111]="SEPOLIA",l[l.OPTIMISM=10]="OPTIMISM",l[l.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",l[l.OPTIMISM_SEPOLIA=11155420]="OPTIMISM_SEPOLIA",l[l.ARBITRUM_ONE=42161]="ARBITRUM_ONE",l[l.ARBITRUM_GOERLI=421613]="ARBITRUM_GOERLI",l[l.ARBITRUM_SEPOLIA=421614]="ARBITRUM_SEPOLIA",l[l.POLYGON=137]="POLYGON",l[l.POLYGON_MUMBAI=80001]="POLYGON_MUMBAI",l[l.CELO=42220]="CELO",l[l.CELO_ALFAJORES=44787]="CELO_ALFAJORES",l[l.GNOSIS=100]="GNOSIS",l[l.MOONBEAM=1284]="MOONBEAM",l[l.BNB=56]="BNB",l[l.AVALANCHE=43114]="AVALANCHE",l[l.BASE_GOERLI=84531]="BASE_GOERLI",l[l.BASE_SEPO
1LIA=84532]="BASE_SEPOLIA",l[l.BASE=8453]="BASE",l[l.ZORA=7777777]="ZORA",l[l.ZORA_SEPOLIA=999999999]="ZORA_SEPOLIA",l[l.ROOTSTOCK=30]="ROOTSTOCK",l[l.BLAST=81457]="BLAST",l[l.ZKSYNC=324]="ZKSYNC",l[l.WORLDCHAIN=480]="WORLDCHAIN",l[l.UNICHAIN_SEPOLIA=1301]="UNICHAIN_SEPOLIA",l[l.UNICHAIN=130]="UNICHAIN",l[l.MONAD_TESTNET=10143]="MONAD_TESTNET",l[l.SONEIUM=1868]="SONEIUM",L.MAINNET,L.OPTIMISM,L.OPTIMISM_GOERLI,L.OPTIMISM_SEPOLIA,L.ARBITRUM_ONE,L.ARBITRUM_GOERLI,L.ARBITRUM_SEPOLIA,L.POLYGON,L.POLYGON_MUMBAI,L.GOERLI,L.SEPOLIA,L.CELO_ALFAJORES,L.CELO,L.BNB,L.AVALANCHE,L.BASE,L.BASE_GOERLI,L.BASE_SEPOLIA,L.ZORA,L.ZORA_SEPOLIA,L.ROOTSTOCK,L.BLAST,L.ZKSYNC,L.WORLDCHAIN,L.UNICHAIN_SEPOLIA,L.UNICHAIN,L.MONAD_TESTNET,L.SONEIUM,(m=W||(W={})).ETHER="ETH",m.MATIC="MATIC",m.CELO="CELO",m.GNOSIS="XDAI",m.MOONBEAM="GLMR",m.BNB="BNB",m.AVAX="AVAX",m.ROOTSTOCK="RBTC",L.MAINNET,L.GOERLI,L.SEPOLIA,L.OPTIMISM,L.ARBITRUM_ONE,L.POLYGON,L.POLYGON_MUMBAI,L.SEPOLIA,(V={})[L.MAINNET]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",V[L.GOERLI]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",V[L.SEPOLIA]="0xF62c03E08ada871A0bEb309762E260a7a6a880E6",V[L.OPTIMISM]="0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",V[L.ARBITRUM_ONE]="0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",V[L.AVALANCHE]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",V[L.BASE_SEPOLIA]="0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e",V[L.BASE]="0x8909dc15e40173ff4699343b6eb8132c65e18ec6",V[L.BNB]="0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6",V[L.POLYGON]="0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",V[L.CELO]="0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",V[L.BLAST]="0x5C346464d33F90bABaf70dB6388507CC889C1070",V[L.WORLDCHAIN]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",V[L.UNICHAIN_SEPOLIA]="0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",V[L.UNICHAIN]="0x1f98400000000000000000000000000000000002",V[L.MONAD_TESTNET]="0x733e88f248b742db6c14c0b1713af5ad7fdd59d0",V[L.SONEIUM]="0x97febbc2adbd5644ba22736e962564b23f5828ce",(G={})[L.MAINNET]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",G[L.GOERLI]="0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",G[L.SEPOLIA]="0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3",G[L.ARBITRUM_ONE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",G[L.OPTIMISM]="0x4a7b5da61326a6379179b40d00f57e5bbdc962c2",G[L.BASE_SEPOLIA]="0x1689E7B1F10000AE47eBfE339a4f69dECd19F602",G[L.BASE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",G[L.AVALANCHE]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",G[L.BNB]="0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24",G[L.POLYGON]="0xedf6066a2b290c185783862c7f4776a2c8077ad1",G[L.BLAST]="0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035",G[L.WORLDCHAIN]="0x541aB7c31A119441eF3575F6973277DE0eF460bd",G[L.UNICHAIN_SEPOLIA]="0x920b806E40A00E02E7D2b94fFc89860fDaEd3640",G[L.UNICHAIN]="0x284f11109359a7e1306c3e447ef14d38400063ff",G[L.MONAD_TESTNET]="0xfb8e1c3b833f9e67a71c859a132cf783b645e436",G[L.SONEIUM]="0x273f68c234fa55b550b40e563c4a488e0d334320";var ev={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x1F98415757620B543A52E61c46B32eB19261F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",v3MigratorAddress:"0xA5644E29708357803b5A882D272c41cC0dF92B34",nonfungiblePositionManagerAddress:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88"},eT=_extends({},ev,{mixedRouteQuoterV1Address:"0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E",v4PoolManagerAddress:"0x000000000004444c5dc75cB358380D2e3dE08A90",v4PositionManagerAddress:"0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e",v4StateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",v4QuoterAddress:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203"}),e_=_extends({},ev,{mixedRouteQuoterV1Address:"0xBa60b6e6fF25488308789E6e0A65D838be34194e"}),eC=_extends({},ev,{v4PoolManagerAddress:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",v4PositionManagerAddress:"0x3c3ea4b57a46241e54610e5f022e5c45859a1017",v4StateView:"0xc18a3169788f4f75a170290584eca6395c75ecdb",v4QuoterAddress:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7"}),ex=_extends({},ev,{multicallAddress:"0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB",tickLensAddress:"0xbfd8137f7d1516D3ea5cA83523914859ec47F573",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0xd88f38f930b7952f2db2432cb002e7abbf3dd869",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"}),eI=_extends({},ev,{v4PoolManagerAddress:"0x67366782805870060151383f4bbff9dab53e5cd6",v4PositionManagerAddress:"0x1ec2ebf4f37e7363fdfe3551602425af0b3ceef9",v4StateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",v4QuoterAddress:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9"}),ew={v3CoreFactoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",multicallAddress:"0x633987602DE5C4F337e3DbF265303A1080324204",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",v3MigratorAddress:"0x3cFd4d48EDfDCC53D3f173F596f621064614C582",nonfungiblePositionManagerAddress:"0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A",tickLensAddress:"0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D"};(Z={})[L.MAINNET]=eT,Z[L.OPTIMISM]=eC,Z[L.ARBITRUM_ONE]=ex,Z[L.POLYGON]=eI,Z[L.POLYGON_MUMBAI]=eI,Z[L.GOERLI]=e_,Z[L.CELO]=ew,Z[L.CELO_ALFAJORES]=ew,Z[L.BNB]={v3CoreFactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",multicallAddress:"0x963Df249eD09c358A4819E39d9Cd5736c3087184",quoterAddress:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",v3MigratorAddress:"0x32681814957e0C13117
1ddc0c2aba232b5c9e760f",nonfungiblePositionManagerAddress:"0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613",tickLensAddress:"0xD9270014D396281579760619CCf4c3af0501A47C",swapRouter02Address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",v4PoolManagerAddress:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",v4PositionManagerAddress:"0x7a4a5c919ae2541aed11041a1aeee68f1287f95b",v4StateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",v4QuoterAddress:"0x9f75dd27d6664c475b90e105573e550ff69437b0"},Z[L.OPTIMISM_GOERLI]={v3CoreFactoryAddress:"0xB656dA17129e7EB733A557f4EBc57B76CFbB5d10",multicallAddress:"0x07F2D8a2a02251B62af965f22fC4744A5f96BCCd",quoterAddress:"0x9569CbA925c8ca2248772A9A4976A516743A246F",v3MigratorAddress:"0xf6c55fBe84B1C8c3283533c53F51bC32F5C7Aba8",nonfungiblePositionManagerAddress:"0x39Ca85Af2F383190cBf7d7c41ED9202D27426EF6",tickLensAddress:"0xe6140Bd164b63E8BfCfc40D5dF952f83e171758e"},Z[L.OPTIMISM_SEPOLIA]={v3CoreFactoryAddress:"0x8CE191193D15ea94e11d327b4c7ad8bbE520f6aF",multicallAddress:"0x80e4e06841bb76AA9735E0448cB8d003C0EF009a",quoterAddress:"0x0FBEa6cf957d95ee9313490050F6A0DA68039404",v3MigratorAddress:"0xE7EcbAAaA54D007A00dbb6c1d2f150066D69dA07",nonfungiblePositionManagerAddress:"0xdA75cEf1C93078e8b736FCA5D5a30adb97C8957d",tickLensAddress:"0xCb7f54747F58F8944973cea5b8f4ac2209BadDC5",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"},Z[L.ARBITRUM_GOERLI]={v3CoreFactoryAddress:"0x4893376342d5D7b3e31d4184c08b265e5aB2A3f6",multicallAddress:"0x8260CB40247290317a4c062F3542622367F206Ee",quoterAddress:"0x1dd92b83591781D0C6d98d07391eea4b9a6008FA",v3MigratorAddress:"0xA815919D2584Ac3F76ea9CB62E6Fd40a43BCe0C3",nonfungiblePositionManagerAddress:"0x622e4726a167799826d1E1D150b076A7725f5D81",tickLensAddress:"0xb52429333da969a0C79a60930a4Bf0020E5D1DE8"},Z[L.ARBITRUM_SEPOLIA]={v3CoreFactoryAddress:"0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e",multicallAddress:"0x2B718b475e385eD29F56775a66aAB1F5cC6B2A0A",quoterAddress:"0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B",v3MigratorAddress:"0x398f43ef2c67B941147157DA1c5a868E906E043D",nonfungiblePositionManagerAddress:"0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65",tickLensAddress:"0x0fd18587734e5C2dcE2dccDcC7DD1EC89ba557d9",swapRouter02Address:"0x101F443B4d1b059569D643917553c771E1b9663E",v4PoolManagerAddress:"0xFB3e0C6F74eB1a21CC1Da29aeC80D2Dfe6C9a317",v4PositionManagerAddress:"0xAc631556d3d4019C95769033B5E719dD77124BAc",v4StateView:"0x9d467fa9062b6e9b1a46e26007ad82db116c67cb",v4QuoterAddress:"0x7de51022d70a725b508085468052e25e22b5c4c9"},Z[L.SEPOLIA]={v3CoreFactoryAddress:"0x0227628f3F023bb0B980b67D528571c95c6DaC1c",multicallAddress:"0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07",quoterAddress:"0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",v3MigratorAddress:"0x729004182cF005CEC8Bd85df140094b6aCbe8b15",nonfungiblePositionManagerAddress:"0x1238536071E1c677A632429e3655c799b22cDA52",tickLensAddress:"0xd7f33bcdb21b359c8ee6f0251d30e94832baad07",swapRouter02Address:"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",mixedRouteQuoterV2Address:"0x4745f77b56a0e2294426e3936dc4fab68d9543cd",v4PoolManagerAddress:"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",v4PositionManagerAddress:"0x429ba70129df741B2Ca2a85BC3A2a3328e5c09b4",v4StateView:"0xe1dd9c3fa50edb962e442f60dfbc432e24537e4c",v4QuoterAddress:"0x61b3f2011a92d183c7dbadbda940a7555ccf9227"},Z[L.AVALANCHE]={v3CoreFactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",multicallAddress:"0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2",quoterAddress:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",v3MigratorAddress:"0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97",nonfungiblePositionManagerAddress:"0x655C406EBFa14EE2006250925e54ec43AD184f8B",tickLensAddress:"0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950",swapRouter02Address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",v4PoolManagerAddress:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",v4PositionManagerAddress:"0xb74b1f14d2754acfcbbe1a221023a5cf50ab8acd",v4StateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",v4QuoterAddress:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2"},Z[L.BASE]={v3CoreFactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",multicallAddress:"0x091e99cb1C49331a94dD62755D168E941AbD0693",quoterAddress:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",v3MigratorAddress:"0x23cF10b1ee3AdfCA73B0eF17C07F7577e7ACd2d7",nonfungiblePositionManagerAddress:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",tickLensAddress:"0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d",swapR
1outer02Address:"0x2626664c2603336E57B271c5C0b26F421741e481",mixedRouteQuoterV1Address:"0xe544efae946f0008ae9a8d64493efa7886b73776",v4PoolManagerAddress:"0x498581ff718922c3f8e6a244956af099b2652b2b",v4PositionManagerAddress:"0x7c5f5a4bbd8fd63184577525326123b519429bdc",v4StateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",v4QuoterAddress:"0x0d5e0f971ed27fbff6c2837bf31316121532048d"},Z[L.BASE_GOERLI]={v3CoreFactoryAddress:"0x9323c1d6D800ed51Bd7C6B216cfBec678B7d0BC2",multicallAddress:"0xB206027a9E0E13F05eBEFa5D2402Bab3eA716439",quoterAddress:"0xedf539058e28E5937dAef3f69cEd0b25fbE66Ae9",v3MigratorAddress:"0x3efe5d02a04b7351D671Db7008ec6eBA9AD9e3aE",nonfungiblePositionManagerAddress:"0x3c61369ef0D1D2AFa70d8feC2F31C5D6Ce134F30",tickLensAddress:"0x1acB873Ee909D0c98adB18e4474943249F931b92",swapRouter02Address:"0x8357227D4eDc78991Db6FDB9bD6ADE250536dE1d"},Z[L.BASE_SEPOLIA]={v3CoreFactoryAddress:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",multicallAddress:"0xd867e273eAbD6c853fCd0Ca0bFB6a3aE6491d2C1",quoterAddress:"0xC5290058841028F1614F3A6F0F5816cAd0df5E27",v3MigratorAddress:"0xCbf8b7f80800bd4888Fbc7bf1713B80FE4E23E10",nonfungiblePositionManagerAddress:"0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",tickLensAddress:"0xedf6066a2b290C185783862C7F4776A2C8077AD1",swapRouter02Address:"0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",v4PoolManagerAddress:"0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",v4PositionManagerAddress:"0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80",v4StateView:"0x571291b572ed32ce6751a2cb2486ebee8defb9b4",v4QuoterAddress:"0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba"},Z[L.ZORA]={v3CoreFactoryAddress:"0x7145F8aeef1f6510E92164038E1B6F8cB2c42Cbb",multicallAddress:"0xA51c76bEE6746cB487a7e9312E43e2b8f4A37C15",quoterAddress:"0x11867e1b3348F3ce4FcC170BC5af3d23E07E64Df",v3MigratorAddress:"0x048352d8dCF13686982C799da63fA6426a9D0b60",nonfungiblePositionManagerAddress:"0xbC91e8DfA3fF18De43853372A3d7dfe585137D78",tickLensAddress:"0x209AAda09D74Ad3B8D0E92910Eaf85D2357e3044",swapRouter02Address:"0x7De04c96BE5159c3b5CeffC82aa176dc81281557",v4PoolManagerAddress:"0x0575338e4c17006ae181b47900a84404247ca30f",v4PositionManagerAddress:"0xf66c7b99e2040f0d9b326b3b7c152e9663543d63",v4StateView:"0x385785af07d63b50d0a0ea57c4ff89d06adf7328",v4QuoterAddress:"0x5edaccc0660e0a2c44b06e07ce8b915e625dc2c6"},Z[L.ZORA_SEPOLIA]={v3CoreFactoryAddress:"0x4324A677D74764f46f33ED447964252441aA8Db6",multicallAddress:"0xA1E7e3A69671C4494EC59Dbd442de930a93F911A",quoterAddress:"0xC195976fEF0985886E37036E2DF62bF371E12Df0",v3MigratorAddress:"0x65ef259b31bf1d977c37e9434658694267674897",nonfungiblePositionManagerAddress:"0xB8458EaAe43292e3c1F7994EFd016bd653d23c20",tickLensAddress:"0x23C0F71877a1Fc4e20A78018f9831365c85f3064"},Z[L.ROOTSTOCK]={v3CoreFactoryAddress:"0xaF37EC98A00FD63689CF3060BF3B6784E00caD82",multicallAddress:"0x996a9858cDfa45Ad68E47c9A30a7201E29c6a386",quoterAddress:"0xb51727c996C68E60F598A923a5006853cd2fEB31",v3MigratorAddress:"0x16678977CA4ec3DAD5efc7b15780295FE5f56162",nonfungiblePositionManagerAddress:"0x9d9386c042F194B460Ec424a1e57ACDE25f5C4b1",tickLensAddress:"0x55B9dF5bF68ADe972191a91980459f48ecA16afC",swapRouter02Address:"0x0B14ff67f0014046b4b99057Aec4509640b3947A"},Z[L.BLAST]={v3CoreFactoryAddress:"0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd",multicallAddress:"0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705",quoterAddress:"0x6Cdcd65e03c1CEc3730Aee
1Cd45bc140D57A25C77",v3MigratorAddress:"0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0",nonfungiblePositionManagerAddress:"0xB218e4f7cF0533d4696fDfC419A0023D33345F28",tickLensAddress:"0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274",swapRouter02Address:"0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66",v4PoolManagerAddress:"0x1631559198a9e474033433b2958dabc135ab6446",v4PositionManagerAddress:"0x4ad2f4cca2682cbb5b950d660dd458a1d3f1baad",v4StateView:"0x12a88ae16f46dce4e8b15368008ab3380885df30",v4QuoterAddress:"0x6f71cdcb0d119ff72c6eb501abceb576fbf62bcf"},Z[L.ZKSYNC]={v3CoreFactoryAddress:"0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422",multicallAddress:"0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C",quoterAddress:"0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28",v3MigratorAddress:"0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E",nonfungiblePositionManagerAddress:"0x0616e5762c1E7Dc3723c50663dF10a162D690a86",tickLensAddress:"0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89",swapRouter02Address:"0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3"},Z[L.WORLDCHAIN]={v3CoreFactoryAddress:"0x7a5028BDa40e7B173C278C5342087826455ea25a",multicallAddress:"0x0a22c04215c97E3F532F4eF30e0aD9458792dAB9",quoterAddress:"0x10158D43e6cc414deE1Bd1eB0EfC6a5cBCfF244c",v3MigratorAddress:"0x9EBDdCBa71C9027E1eB45135672a30bcFEec9de3",nonfungiblePositionManagerAddress:"0xec12a9F9a09f50550686363766Cc153D03c27b5e",tickLensAddress:"0xE61df0CaC9d85876aCE5E3037005D80943570623",swapRouter02Address:"0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6",v4PoolManagerAddress:"0xb1860d529182ac3bc1f51fa2abd56662b7d13f33",v4PositionManagerAddress:"0xc585e0f504613b5fbf874f21af14c65260fb41fa",v4StateView:"0x51d394718bc09297262e368c1a481217fdeb71eb",v4QuoterAddress:"0x55d235b3ff2daf7c3ede0defc9521f1d6fe6c5c0"},Z[L.UNICHAIN_SEPOLIA]={v3CoreFactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",multicallAddress:"0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1",quoterAddress:"0x6Dd37329A1A225a6Fca658265D460423DCafBF89",v3MigratorAddress:"0xb5FA244C9d6D04B2FBac84418b3c4910ED1Ae5f2",nonfungiblePositionManagerAddress:"0xB7F724d6dDDFd008eFf5cc2834edDE5F9eF0d075",tickLensAddress:"0x5f739c790a48E97eec0efb81bab5D152c0A0ecA0",swapRouter02Address:"0xd1AAE39293221B77B0C71fBD6dCb7Ea29Bb5B166",v4PoolManagerAddress:"0x00b036b58a818b1bc34d502d3fe730db729e62ac",v4PositionManagerAddress:"0xf969aee60879c54baaed9f3ed26147db216fd664",v4StateView:"0xc199f1072a74d4e905aba1a84d9a45e2546b6222",v4QuoterAddress:"0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472"},Z[L.UNICHAIN]={v3CoreFactoryAddress:"0x1f98400000000000000000000000000000000003",multicallAddress:"0xb7610f9b733e7d45184be3a1bc966960ccc54f0b",quoterAddress:"0x565ac8c7863d9bb16d07e809ff49fe5cd467634c",v3MigratorAddress:"0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc",nonfungiblePositionManagerAddress:"0x943e6e07a7e8e791dafc44083e54041d743c46e9",tickLensAddress:"0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443",swapRouter02Address:"0x73855d06de49d0fe4a9c42636ba96c62da12ff9c",v4PoolManagerAddress:"0x1f98400000000000000000000000000000000004",v4PositionManagerAddress:"0x4529a01c7a0410167c5740c487a8de60232617bf",v4StateView:"0x86e8631a016f9068c3f085faf484ee3f5fdee8f2",v4QuoterAddress:"0x333e3c607b141b18ff6de9f258db6e77fe7491e0"},Z[L.MONAD_TESTNET]={v3CoreFactoryAddress:"0x961235a9020b05c44df1026d956d1f4d78014276",multicallAddress:"0xa707ceb989cc3728551ed0e6e44b718dd114cf44",quoterAddress:"0x1ba215c17565de7b0cb7ecab971bcf540c24a862",v3MigratorAddress:"0x0a78348b71f8ae8caff2f8f9d4d74a2f36516661",nonfungiblePositionManagerAddress:"0x3dcc735c74f10fe2b9db2bb55c40fbbbf24490f7",tickLensAddress:"0x337478eb6058455ecb3696184b30dd6a29e3a893",swapRouter02Address:"0x4c4eabd5fb1d1a7234a48692551eaecff8194ca7"},Z[L.SONEIUM]={v3CoreFactoryAddress:"0x42ae7ec7ff020412639d443e245d936429fbe717",multicallAddress:"0x8ad5ef2f2508288d2de66f04dd883ad5f4ef62b2",quoterAddress:"0x3e6c707d0125226ff60f291b6bd1404634f00aba",v3MigratorAddress:"0xa107580f73bd797bd8b87ff24e98346d99f93ddb",nonfungiblePositionManagerAddress:"0x56c1205b0244332011c1e866f4ea5384eb6bfa2c",tickLensAddress:"0xcd08eefb928c86499e6235ac155906bb7c4dc41a",swapRouter02Address:"0x7e40db01736f88464e5f4e42394f3d5bbb6705b9",v4PoolManagerAddress:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",v4PositionManagerAddress:"0x1b35d13a2e2528f192637f14b05f0dc0e7deb566",v4StateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",v4QuoterAddress:"0x3972c00f7ed4885e145823eb7c655375d275a1c5"},({})[L.MAINNET]="0xC4e172459f1E7939D522503B81AFAaC1014CE6F6",({})[L.MAINNET]="0x408ED6354d4973f66138C91495F2f2FCbd8724C3",({})[L.MAINNET]="0x090D4613473dEE047c3f2706764f49E0821D256e",({})[L.MAINNET]="0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8",({})[L.MAINNET]="0x65770b5283117639760beA3F867b69b3697a91dd",(h=X||(X={}))[h.EXACT_INPUT=0]="EXACT_INPUT",h[h.EXACT_OUTPUT=1]="EXACT_OUTPUT",(E=K||(K={}))[E.ROUND_DOWN=0]="ROUND_DOWN",E[E.ROUND_HALF_UP=1]="ROUND_HALF_UP",E[E.ROUND_UP=2]="ROUND_UP";var eP=ep().BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),eB=eh()(eb()),eF=eh()(ey()),eD=(($={})[K.ROUND_DOWN]=eB.ROUND_DOWN,$[K.ROUND_HALF_UP]=eB.ROUND_HALF_UP,$[K.ROUND_UP]=eB.ROUND_UP,$),eO=((ee={})[K.ROUND_DOWN]=0,ee[K.ROUND_HALF_UP]=1,ee[K.ROUND_UP]=3,ee),ek=function(){function Fraction(f,r){void 0===r&&(r=ep().BigInt(1)),this.numerator=ep().BigInt(f),this.denominator=ep().BigInt(r)}Fraction.tryParseFraction=function(f){if(f instanceof ep()||"number"==typeof f||"string"==typeof f)return new Fraction(f);if("numerator"in f&&"denominator"in f)return f;throw Error("Could not parse fraction")};var f=Fraction.prototype;return f.invert=function(){return new Fraction(this.denominator,this.numerator)},f.add=function(f){var r=Fraction.tryParseFraction(f);return ep().equal(this.denominator,r.denominator)?new Fraction(ep().add(this.numerator,r.numerator),this.denominator):new Fraction(ep().add(ep().multiply(this.numerator,r.denominator),ep().multiply(r.numerator,this.denominator)),ep().multiply(this.denominator,r.denominator))},f.subtract=function(f){var r=Fraction.tryParseFraction(f);return ep().equal(this.denominator,r.denominator)?new Fraction(ep().subtract(this.numerator,r.numerator),this.denominator):new Fraction(ep().subtract(ep().multiply(this.numerator,r.denominator),ep().multiply(r.numerator,this.denominator)),ep().multiply(this.denominator,r.denominator))},f.lessThan=function(f){var r=Fraction.tryParseFraction(f);return ep().lessThan(ep().multiply(this.numerator,r.denominator),ep().multiply(r.numerator,this.denominator))},f.equalTo=function(f){var r=Fraction.tryParseFraction(f);return ep().equal(ep().multiply(this.numerator,r.denominator),ep().multiply(r.numerator,this.denominator))},f.greaterThan=function(f){var r=Fraction.tryParseFraction(f);return ep().greaterThan(ep().multiply(this.numerator,r.denominator),ep().multiply(r.numerator,this.denominator))},f.multiply=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ep().multiply(this.numerator,r.numerator),ep().multiply(this.denominator,r.denominator))},f.divide=function(f){var r=Fraction.tryParseFraction(f);return new Fraction(ep().multiply(this.numerator,r.denominator),ep().multiply(this.denominator,r.numerator))},f.toSignificant=function(f,r,s){void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=K.ROUND_HALF_UP),Number.isInteger(f)||(0,eu.Z)(!1),f>0||(0,eu.Z)(!1),eB.set({precision:f+1,rounding:eD[s]});var l=new eB(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(f);return l.toFormat(l.decimalPlaces(),r)},f.toFixed=function(f,r,s){return void 0===r&&(r={groupSeparator:""}),void 0===s&&(s=K.ROUND_HALF_UP),Number.isInteger(f)||(0,eu.Z)(!1),f>=0||(0,eu.Z)(!1),eF.DP=f,eF.RM=eO[s],new eF(this.numerator.toString()).div(this.denominator.toString()).toFormat(f,r)},_createClass(Fraction,[{key:"quotient",get:function(){return ep().divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new Fraction(ep().remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new Fraction(this.numerator,this.denominator)}}])}(),eS=eh()(ey()),eM=function(f){function CurrencyAmount(r,s,l){var m;return m=f.call(this,s,l)||this,ep().lessThanOrEqual(m.quotient,eP)||(0,eu.Z)(!1),m.currency=r,m.decimalScale=ep().exponentiate(ep().BigInt(10),ep().BigInt(r.decimals)),m}_inheritsLoose(CurrencyAmount,f),CurrencyAmount.fromRawAmount=function(f,r){return new CurrencyAmount(f,r)},CurrencyAmount.fromFractionalAmount=function(f,r,s){return new CurrencyAmount(f,r,s)};var r=CurrencyAmount.prototype;return r.add=function(r){this.currency.equals(r.currency)||(0,eu.Z)(!1);var s=f.prototype.add.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.subtract=function(r){this.currency.equals(r.currency)||(0,eu.Z)(!1);var s=f.prototype.subtract.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.multiply=function(r){var s=f.prototype.multiply.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)}
1,r.divide=function(r){var s=f.prototype.divide.call(this,r);return CurrencyAmount.fromFractionalAmount(this.currency,s.numerator,s.denominator)},r.toSignificant=function(r,s,l){return void 0===r&&(r=6),void 0===l&&(l=K.ROUND_DOWN),f.prototype.divide.call(this,this.decimalScale).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=this.currency.decimals),void 0===l&&(l=K.ROUND_DOWN),r<=this.currency.decimals||(0,eu.Z)(!1),f.prototype.divide.call(this,this.decimalScale).toFixed(r,s,l)},r.toExact=function(f){return void 0===f&&(f={groupSeparator:""}),eS.DP=this.currency.decimals,new eS(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(f)},_createClass(CurrencyAmount,[{key:"wrapped",get:function(){return this.currency.isToken?this:CurrencyAmount.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}])}(ek),eR=new ek(ep().BigInt(100));function toPercent(f){return new eN(f.numerator,f.denominator)}var eN=function(f){function Percent(){var r;return r=f.apply(this,arguments)||this,r.isPercent=!0,r}_inheritsLoose(Percent,f);var r=Percent.prototype;return r.add=function(r){return toPercent(f.prototype.add.call(this,r))},r.subtract=function(r){return toPercent(f.prototype.subtract.call(this,r))},r.multiply=function(r){return toPercent(f.prototype.multiply.call(this,r))},r.divide=function(r){return toPercent(f.prototype.divide.call(this,r))},r.toSignificant=function(r,s,l){return void 0===r&&(r=5),f.prototype.multiply.call(this,eR).toSignificant(r,s,l)},r.toFixed=function(r,s,l){return void 0===r&&(r=2),f.prototype.multiply.call(this,eR).toFixed(r,s,l)},Percent}(ek),eL=function(f){function Price(){for(var r,s,l,m,h,E=arguments.length,I=Array(E),w=0;w<E;w++)I[w]=arguments[w];if(4===I.length)s=I[0],l=I[1],m=I[2],h=I[3];else{var B=I[0].quoteAmount.divide(I[0].baseAmount),D=[I[0].baseAmount.currency,I[0].quoteAmount.currency,B.denominator,B.numerator];s=D[0],l=D[1],m=D[2],h=D[3]}return(r=f.call(this,h,m)||this).baseCurrency=s,r.quoteCurrency=l,r.scalar=new ek(ep().exponentiate(ep().BigInt(10),ep().BigInt(s.decimals)),ep().exponentiate(ep().BigInt(10),ep().BigInt(l.decimals))),r}_inheritsLoose(Price,f);var r=Price.prototype;return r.invert=function(){return new Price(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){this.quoteCurrency.equals(r.baseCurrency)||(0,eu.Z)(!1);var s=f.prototype.multiply.call(this,r);return new Price(this.baseCurrency,r.quoteCurrency,s.denominator,s.numerator)},r.quote=function(r){r.currency.equals(this.baseCurrency)||(0,eu.Z)(!1);var s=f.prototype.multiply.call(this,r);return eM.fromFractionalAmount(this.quoteCurrency,s.numerator,s.denominator)},r.toSignificant=function(f,r,s){return void 0===f&&(f=6),this.adjustedForDecimals.toSignificant(f,r,s)},r.toFixed=function(f,r,s){return void 0===f&&(f=4),this.adjustedForDecimals.toFixed(f,r,s)},_createClass(Price,[{key:"adjustedForDecimals",get:function(){return f.prototype.multiply.call(this,this.scalar)}}])}(ek),BaseCurrency=function(f,r,s,l){Number.isSafeInteger(f)||(0,eu.Z)(!1),r>=0&&r<255&&Number.isInteger(r)||(0,eu.Z)(!1),this.chainId=f,this.decimals=r,this.symbol=s,this.name=l},eq=function(f){function NativeCurrency(){var r;return r=f.apply(this,arguments)||this,r.isNative=!0,r.isToken=!1,r}return _inheritsLoose(NativeCurrency,f),NativeCurrency}(BaseCurrency);function validateAndParseAddress(f){try{return(0,eg.getAddress)(f)}catch(r){throw Error(f+" is not a valid address.")}}var eU=/^0x[0-9a-fA-F]{40}$/,eH=function(f){function Token(r,s,l,m,h,E,I,w){var B;return(B=f.call(this,r,l,m,h)||this).isNative=!1,B.isToken=!0,E?B.address=function(f){if(eU.test(f))return f;throw Error(f+" is not a valid address.")}(s):B.address=validateAndParseAddress(s),I&&(I.gte(eE.O$.from(0))||(0,eu.Z)(!1)),w&&(w.gte(eE.O$.from(0))||(0,eu.Z)(!1)),B.buyFeeBps=I,B.sellFeeBps=w,B}_inheritsLoose(Token,f);var r=Token.prototype;return r.equals=function(f){return f.isToken&&this.chainId===f.chainId&&this.address.toLowerCase()===f.address.toLowerCase()},r.sortsBefore=function(f){return this.chainId!==f.chainId&&(0,eu.Z)(!1),this.address.toLowerCase()!==f.address.toLowerCase()||(0,eu.Z)(!1),this.address.toLowerCase()<f.address.toLowerCase()},_createClass(Token,[{key:"wrapped",get:function(){return this}}])}(BaseCurrency),eW={1:new eH(1,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),11155111:new eH(11155111,"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",18,"WETH","Wrapped Ether"),3:new eH(3,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),4:new eH(4,"0xc778417E063141139Fce010982780140Aa0cD5Ab",18,"WETH","Wrapped Ether"),5:new eH(5,"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",18,"WETH","Wrapped Ether"),42:new eH(42,"0xd0A1E359811322d97991E03f863a0C30C2cF029C",18,"WETH","Wrapped Ether"),10:new eH(10,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),69:new eH(69,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),11155420:new eH(11155420,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),42161:new eH(42161,"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",18,"WETH","Wrapped Ether"),421611:new eH(421611,"0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681",18,"WETH","Wrapped Ether"),421614:new eH(421614,"0x980B62Da83eFf3D4576C647993b0c1D7faf17c73",18,"WETH","Wrapped Ether"),8453:new eH(8453,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),84532:new eH(84532,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),56:new eH(56,"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",18,"WBNB","Wrapped BNB"),137:new eH(137,"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",18,"WMATIC","Wrapped MATIC"),43114:new eH(43114,"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",18,"WAVAX","Wrapped AVAX"),7777777:new eH(7777777,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),81457:new eH(81457,"0x4300000000000000000000000000000000000004",18,"WETH","Wrapped Ether"),324:new eH(324,"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",18,"WETH","Wrapped Ether"),480:new eH(480,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),1301:new eH(1301,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),130:new eH(130,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether"),10143:new eH(10143,"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",18,"WMON","Wrapped Monad"),1868:new eH(1868,"0x4200000000000000000000000000000000000006",18,"WETH","Wrapped Ether")};function sortedInsert(f,r,s,l){if(s>0||(0,eu.Z)(!1),f.length<=s||(0,eu.Z)(!1),0===f.length)return f.push(r),null;var m=f.length===s;if(m&&0>=l(f[f.length-1],r))return r;for(var h=0,E=f.length;h<E;){var I=h+E>>>1;0>=l(f[I],r)?h=I+1:E=I}return f.splice(h,0,r),m?f.pop():null}(function(f){function Ether(r){return f.call(this,r,18,"ETH","Ether")||this}return _inheritsLoose(Ether,f),Ether.onChain=function(f){var r;return null!=(r=this._etherCache[f])?r:this._etherCache[f]=new Ether(f)},Ether.prototype.equals=function(f){return f.isNative&&f.chainId===this.chainId},_createClass(Ether,[{key:"wrapped",get:function(){var f=eW[this.chainId];return f||(0,eu.Z)(!1),f}}])})(eq)._etherCache={};var eV=s(11938),eG=s(92791),eZ=s(89566),eX=s(10188),ej=s(93317),eQ=s(99203),eK=s(34271);function _arrayLikeToArray(f,r){(null==r||r>f.length)&&(r=f.length);for(var s=0,l=Array(r);s<r;s++)l[s]=f[s];return l}function asyncGeneratorStep(f,r,s,l,m,h,E){try{var I=f[h](E),w=I.value}catch(f){return void s(f)}I.done?r(w):Promise.resolve(w).then(l,m)}function _asyncToGenerator(f){return function(){var r=this,s=arguments;return new Promise(function(l,m){var h=f.apply(r,s);function _next(f){asyncGeneratorStep(h,l,m,_next,_throw,"next",f)}function _throw(f){asyncGeneratorStep(h,l,m,_next,_throw,"throw",f)}_next(void 0)})}}function v4_sdk_esm_defineProperties(f,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(f,function(f){var r=function(f,r){if("object"!=typeof f||!f)return f;var s=f[Symbol.toPrimitive];if(void 0!==s){var l=s.call(f,r||"default");if("object"!=typeof l)return l;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(f)}(f,"string");return"symbol"==typeof r?r:r+""}(l.key),l)}}function v4_sdk_esm_createClass(f,r,s){return r&&v4_sdk_esm_defineProperties(f.prototype,r),s&&v4_sdk_esm_defineProperties(f,s),Object.defineProperty(f,"prototype",{writable:!1}),f}function _createForOfIteratorHelperLoose(f,r){var s="undefined"!=typeof Symbol&&f[Symbol.iterator]||f["@@iterator"];if(s)return(s=s.call(f)).next.bind(s);if(Array.isArray(f)||(s=function(f,r){if(f){if("string"==typeof f)return _arrayLikeToArray(f,r);var s=({}).toString.call(f).slice(8,-1);return"Object"===s&&f.constructor&&(s=f.constructor.name),"Map"===s||"Set"===s?Array.from(f):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?_arrayLikeToArray(f,r):void 0}}(f))||r&&f&&"number"==typeof f.length){s&&(f=s);var l=0;return function(){return l>=f.length?{done:!0}:{done:!1,value:f[l++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v4_sdk_esm_extends(){return(v4_sdk_esm_extends=Object.assign?Object.assign.bind():function(f){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var l in s)({}).hasOwnProperty.call(s,l)&&(f[l]=s[l])}return f}).apply(null,arguments)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return r};var f,r={},s=Object.prototype,l=s.hasOwnProperty,m=Object.defineProperty||function(f,r,s){f[r]=s.value},h="function"==typeof Symbol?Symbol:{},E=h.iterator||"@@iterator",I=h.asyncIterator||"@@asyncIterator",w=h.toStringTag||"@@toStringTag";function define(f,r,s){return Object.defineProperty(f,r,{value:s,enumerable:!0,configurable:!0,writable:!0}),f[r]}try{define({},"")}catch(f){define=function(f,r,s){return f[r]=s}}function wrap(r,s,l,h){var E,I,w=Object.create((s&&s.prototype instanceof Generator?s:Generator).prototype);return m(w,"_invoke",{value:(E=new Context(h||[]),I=B,function(s,m){if(I===D)throw Error("Generator is already running");if(I===M){if("throw"===s)throw m;return{value:f,done:!0}}for(E.method=s,E.arg=m;;){var h=E.delegate;if(h){var w=function maybeInvokeDelegate(r,s){var l=s.method,m=r.iterator[l];if(m===f)return s.delegate=null,"throw"===l&&r.iterator.return&&
vendor: 4,348 bytes, line 1
1(s.method="return",s.arg=f,maybeInvokeDelegate(r,s),"throw"===s.method)||"return"!==l&&(s.method="throw",s.arg=TypeError("The iterator does not provide a '"+l+"' method")),L;var h=tryCatch(m,r.iterator,s.arg);if("throw"===h.type)return s.method="throw",s.arg=h.arg,s.delegate=null,L;var E=h.arg;return E?E.done?(s[r.resultName]=E.value,s.next=r.nextLoc,"return"!==s.method&&(s.method="next",s.arg=f),s.delegate=null,L):E:(s.method="throw",s.arg=TypeError("iterator result is not an object"),s.delegate=null,L)}(h,E);if(w){if(w===L)continue;return w}}if("next"===E.method)E.sent=E._sent=E.arg;else if("throw"===E.method){if(I===B)throw I=M,E.arg;E.dispatchException(E.arg)}else"return"===E.method&&E.abrupt("return",E.arg);I=D;var W=tryCatch(r,l,E);if("normal"===W.type){if(I=E.done?M:"suspendedYield",W.arg===L)continue;return{value:W.arg,done:E.done}}"throw"===W.type&&(I=M,E.method="throw",E.arg=W.arg)}})}),w}function tryCatch(f,r,s){try{return{type:"normal",arg:f.call(r,s)}}catch(f){return{type:"throw",arg:f}}}r.wrap=wrap;var B="suspendedStart",D="executing",M="completed",L={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var W={};define(W,E,function(){return this});var V=Object.getPrototypeOf,G=V&&V(V(values([])));G&&G!==s&&l.call(G,E)&&(W=G);var Z=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(W);function defineIteratorMethods(f){["next","throw","return"].forEach(function(r){define(f,r,function(f){return this._invoke(r,f)})})}function AsyncIterator(f,r){var s;m(this,"_invoke",{value:function(m,h){function callInvokeWithMethodAndArg(){return new r(function(s,E){!function invoke(s,m,h,E){var I=tryCatch(f[s],f,m);if("throw"!==I.type){var w=I.arg,B=w.value;return B&&"object"==typeof B&&l.call(B,"__await")?r.resolve(B.__await).then(function(f){invoke("next",f,h,E)},function(f){invoke("throw",f,h,E)}):r.resolve(B).then(function(f){w.value=f,h(w)},function(f){return invoke("throw",f,h,E)})}E(I.arg)}(m,h,s,E)})}return s=s?s.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function pushTryEntry(f){var r={tryLoc:f[0]};1 in f&&(r.catchLoc=f[1]),2 in f&&(r.finallyLoc=f[2],r.afterLoc=f[3]),this.tryEntries.push(r)}function resetTryEntry(f){var r=f.completion||{};r.type="normal",delete r.arg,f.completion=r}function Context(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var s=r[E];if(s)return s.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var m=-1,i=function next(){for(;++m<r.length;)if(l.call(r,m))return next.value=r[m],next.done=!1,next;return next.value=f,next.done=!0,next};return i.next=i}}throw TypeError(typeof r+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,m(Z,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),m(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,w,"GeneratorFunction"),r.isGeneratorFunction=function(f){var r="function"==typeof f&&f.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,GeneratorFunctionPrototype):(f.__proto__=GeneratorFunctionPrototype,define(f,w,"GeneratorFunction")),f.prototype=Object.create(Z),f},r.awrap=function(f){return{__await:f}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,I,function(){return this}),r.AsyncIterator=AsyncIterator,r.async=function(f,s,l,m,h){void 0===h&&(h=Promise);var E=new AsyncIterator(wrap(f,s,l,m),h);return r.isGeneratorFunction(s)?E:E.next().then(function(f){return f.done?f.value:E.next()})},defineIteratorMethods(Z),define(Z,w,"Generator"),define(Z,E,function(){return this}),define(Z,"toString",function(){return"[object Generator]"}),r.keys=function(f){var r=Object(f),s=[];for(var l in r)s.push(l);return s.reverse(),function next(){for(;s.length;){var f=s.pop();if(f in r)return next.value=f,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEac
1h(resetTryEntry),!r)for(var s in this)"t"===s.charAt(0)&&l.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=f)},stop:function(){this.done=!0;var f=this.tryEntries[0].completion;if("throw"===f.type)throw f.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var s=this;function handle(l,m){return E.type="throw",E.arg=r,s.next=l,m&&(s.method="next",s.arg=f),!!m}for(var m=this.tryEntries.length-1;m>=0;--m){var h=this.tryEntries[m],E=h.completion;if("root"===h.tryLoc)return handle("end");if(h.tryLoc<=this.prev){var I=l.call(h,"catchLoc"),w=l.call(h,"finallyLoc");if(I&&w){if(this.prev<h.catchLoc)return handle(h.catchLoc,!0);if(this.prev<h.finallyLoc)return handle(h.finallyLoc)}else if(I){if(this.prev<h.catchLoc)return handle(h.catchLoc,!0)}else{if(!w)throw Error("try statement without catch or finally");if(this.prev<h.finallyLoc)return handle(h.finallyLoc)}}}},abrupt:function(f,r){for(var s=this.tryEntries.length-1;s>=0;--s){var m=this.tryEntries[s];if(m.tryLoc<=this.prev&&l.call(m,"finallyLoc")&&this.prev<m.finallyLoc){var h=m;break}}h&&("break"===f||"continue"===f)&&h.tryLoc<=r&&r<=h.finallyLoc&&(h=null);var E=h?h.completion:{};return E.type=f,E.arg=r,h?(this.method="next",this.next=h.finallyLoc,L):this.complete(E)},complete:function(f,r){if("throw"===f.type)throw f.arg;return"break"===f.type||"continue"===f.type?this.next=f.arg:"return"===f.type?(this.rval=this.arg=f.arg,this.method="return",this.next="end"):"normal"===f.type&&r&&(this.next=r),L},finish:function(f){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.finallyLoc===f)return this.complete(s.completion,s.afterLoc),resetTryEntry(s),L}},catch:function(f){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc===f){var l=s.completion;if("throw"===l.type){var m=l.arg;resetTryEntry(s)}return m}}throw Error("illegal catch attempt")},delegateYield:function(r,s,l){return this.delegate={iterator:values(r),resultName:s,nextLoc:l},"next"===this.method&&(this.arg=f),L}},r}function v4_sdk_esm_setPrototypeOf(f,r){return(v4_sdk_esm_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,r){return f.__proto__=r,f})(f,r)}function sortsBefore(f,r){return!!f.isNative||!r.isNative&&f.wrapped.sortsBefore(r.wrapped)}(I=ef||(ef={})).AfterRemoveLiquidityReturnsDelta="afterRemoveLiquidityReturnsDelta",I.AfterAddLiquidityReturnsDelta="afterAddLiquidityReturnsDelta",I.AfterSwapReturnsDelta="afterSwapReturnsDelta",I.BeforeSwapReturnsDelta="beforeSwapReturnsDelta",I.AfterDonate="afterDonate",I.BeforeDonate="beforeDonate",I.AfterSwap="afterSwap",I.BeforeSwap="beforeSwap",I.AfterRemoveLiquidity="afterRemoveLiquidity",I.BeforeRemoveLiquidity="beforeRemoveLiquidity",I.AfterAddLiquidity="afterAddLiquidity",I.BeforeAddLiquidity="beforeAddLiquidity",I.AfterInitialize="afterInitialize",I.BeforeInitialize="beforeInitialize";var eY=((et={})[ef.AfterRemoveLiquidityReturnsDelta]=0,et[ef.AfterAddLiquidityReturnsDelta]=1,et[ef.AfterSwapReturnsDelta]=2,et[ef.BeforeSwapReturnsDelta]=3,et[ef.AfterDonate]=4,et[ef.BeforeDonate]=5,et[ef.AfterSwap]=6,et[ef.BeforeSwap]=7,et[ef.AfterRemoveLiquidity]=8,et[ef.BeforeRemoveLiquidity]=9,et[ef.AfterAddLiquidity]=10,et[ef.BeforeAddLiquidity]=11,et[ef.AfterInitialize]=12,et[ef.BeforeInitialize]=13,et),ez=function(){function Hook(){}return Hook.permissions=function(f){return this._checkAddress(f),{beforeInitialize:this._hasPermission(f,ef.BeforeInitialize),afterInitialize:this._hasPermission(f,ef.AfterInitialize),beforeAddLiquidity:this._hasPermission(f,ef.BeforeAddLiquidity),afterAddLiquidity:this._hasPermission(f,ef.AfterAddLiquidity),beforeRemoveLiquidity:this._hasPermission(f,ef.BeforeRemoveLiquidity),afterRemoveLiquidity:this._hasPermission(f,ef.AfterRemoveLiquidity),beforeSwap:this._hasPermission(f,ef.BeforeSwap),afterSwap:this._hasPermission(f,ef.AfterSwap),beforeDonate:this._hasPermission(f,ef.BeforeDonate),afterDonate:this._hasPermission(f,ef.AfterDonate),beforeSwapReturnsDelta:this._hasPermission(f,ef.BeforeSwapReturnsDelta),afterSwapReturnsDelta:this._hasPermission(f,ef.AfterSwapReturnsDelta),afterAddLiquidityReturnsDelta:this._hasPermission(f,ef.AfterAddLiquidityReturnsDelta),afterRemoveLiquidityReturnsDelta:this._hasPermission(f,ef.AfterRemoveLiquidityReturnsDelta)}},Hook.hasPermission=function(f,r){return this._checkAddress(f),this._hasPermission(f,r)},Hook.hasInitializePermissions=function(f){return this._checkAddress(f),this._hasPermission(f,ef.BeforeInitialize)||Hook._hasPermission(f,ef.AfterInitialize)},Hook.hasLiquidityPermissions=function(f){return this._checkAddress(f),this._hasPermission(f,ef.BeforeAddLiquidity)||Hook._hasPermission(f,ef.AfterAddLiquidity)||Hook._hasPermission(f,ef.BeforeRemoveLiquidity)||Hook._hasPermission(f,ef.AfterRemoveLiquidity)},Hook.hasSwapPermissions=function(f){return this._checkAddress(f),this._hasPermission(f,ef.BeforeSwap)||Hook._hasPermission(f,ef.AfterSwap)},Hook.hasDonatePermissions=function(f){return this._checkAddress(f),this._hasPermission(f,ef.BeforeDonate)||Hook._hasPermission(f,ef.AfterDonate)},Hook._hasPermission=function(f,r){return!!(parseInt(f,16)&1<<eY[r])},Hook._checkAddress=function(f){(0,eG.isAddress)(f)||(0,eu.Z)(!1)},Hook}(),eJ=eZ.d,e$=ep().BigInt(-1),e0=ep().BigInt(0),e1=ep().BigInt(1),e6=ep().exponentiate(ep().BigInt(2),ep().BigInt(96)),e5=ep().exponentiate(e6,ep().BigInt(2)),e2=eX._Y;(w=er||(er={})).INITIALIZE_POOL="initializePool",w.MODIFY_LIQUIDITIES="modifyLiquidities",w.PERMIT_BATCH="0x002a3e3a",w.ERC721PERMIT_PERMIT="0x0f5730f1",(
1B=ea||(ea={}))[B.LOWEST=100]="LOWEST",B[B.LOW=500]="LOW",B[B.MEDIUM=3e3]="MEDIUM",B[B.HIGH=1e4]="HIGH",(en={})[ea.LOWEST]=1,en[ea.LOW]=10,en[ea.MEDIUM]=60,en[ea.HIGH]=200;var e3=8388608,e8=new eV.NoTickDataProvider,e4=function(){function Pool(f,r,s,l,m,h,E,I,w){void 0===w&&(w=e8),(0,eG.isAddress)(m)||(0,eu.Z)(!1),Number.isInteger(s)&&(s===e3||s<1e6)||(0,eu.Z)(!1),s===e3&&(Number(m)>0||(0,eu.Z)(!1));var B=eV.TickMath.getSqrtRatioAtTick(I),D=eV.TickMath.getSqrtRatioAtTick(I+1);ep().greaterThanOrEqual(ep().BigInt(h),B)&&ep().lessThanOrEqual(ep().BigInt(h),D)||(0,eu.Z)(!1);var M=sortsBefore(f,r)?[f,r]:[r,f];this.currency0=M[0],this.currency1=M[1],this.fee=s,this.sqrtRatioX96=ep().BigInt(h),this.tickSpacing=l,this.hooks=m,this.liquidity=ep().BigInt(E),this.tickCurrent=I,this.tickDataProvider=Array.isArray(w)?new eV.TickListDataProvider(w,l):w,this.poolKey=Pool.getPoolKey(this.currency0,this.currency1,this.fee,this.tickSpacing,this.hooks),this.poolId=Pool.getPoolId(this.currency0,this.currency1,this.fee,this.tickSpacing,this.hooks)}Pool.getPoolKey=function(f,r,s,l,m){(0,eG.isAddress)(m)||(0,eu.Z)(!1);var h=sortsBefore(f,r)?[f,r]:[r,f],E=h[0],I=h[1];return{currency0:E.isNative?eJ:E.wrapped.address,currency1:I.isNative?eJ:I.wrapped.address,fee:s,tickSpacing:l,hooks:m}},Pool.getPoolId=function(f,r,s,l,m){var h=sortsBefore(f,r)?[f,r]:[r,f],E=h[0],I=h[1],w=E.isNative?eJ:E.wrapped.address,B=I.isNative?eJ:I.wrapped.address;return(0,ec.keccak256)(["bytes"],[eG.defaultAbiCoder.encode(["address","address","uint24","int24","address"],[w,B,s,l,m])])};var f,r,s,l=Pool.prototype;return l.involvesCurrency=function(f){return f.equals(this.currency0)||f.equals(this.currency1)},l.involvesToken=function(f){return this.involvesCurrency(f)},l.v4InvolvesToken=function(f){return this.involvesCurrency(f)||f.wrapped.equals(this.currency0)||f.wrapped.equals(this.currency1)||f.wrapped.equals(this.currency0.wrapped)||f.wrapped.equals(this.currency1.wrapped)},l.priceOf=function(f){return this.involvesCurrency(f)||(0,eu.Z)(!1),f.equals(this.currency0)?this.currency0Price:this.currency1Price},l.getOutputAmount=(f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f,r){var s,l,m,h,E,I,w;return _regeneratorRuntime().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return this.involvesCurrency(f.currency)||(0,eu.Z)(!1),s=f.currency.equals(this.currency0),B.next=4,this.swap(s,f.quotient,r);case 4:return m=(l=B.sent).amountCalculated,h=l.sqrtRatioX96,E=l.liquidity,I=l.tickCurrent,w=s?this.currency1:this.currency0,B.abrupt("return",[eM.fromRawAmount(w,ep().multiply(m,e$)),new Pool(this.currency0,this.currency1,this.fee,this.tickSpacing,this.hooks,h,E,I,this.tickDataProvider)]);case 11:case"end":return B.stop()}},_callee,this)})),function(r,s){return f.apply(this,arguments)}),l.getInputAmount=(r=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(f,r){var s,l,m,h,E,I,w;return _regeneratorRuntime().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return this.involvesCurrency(f.currency)||(0,eu.Z)(!1),s=f.currency.equals(this.currency1),B.next=4,this.swap(s,ep().multiply(f.quotient,e$),r);case 4:return m=(l=B.sent).amountCalculated,h=l.sqrtRatioX96,E=l.liquidity,I=l.tickCurrent,w=s?this.currency0:this.currency1,B.abrupt("return",[eM.fromRawAmount(w,m),new Pool(this.currency0,this.currency1,this.fee,this.tickSpacing,this.hooks,h,E,I,this.tickDataProvider)]);case 11:case"end":return B.stop()}},_callee2,this)})),function(f,s){return r.apply(this,arguments)}),l.swap=(s=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(f,r,s){return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this.hookImpactsSwap()){l.next=4;break}return l.abrupt("return",(0,eV.v3Swap)(ep().BigInt(this.fee),this.sqrtRatioX96,this.tickCurrent,this.liquidity,this.tickSpacing,this.tickDataProvider,f,r,s));case 4:throw Error("Unsupported hook");case 5:case"end":return l.stop()}},_callee3,this)})),function(f,r,l){return s.apply(this,arguments)}),l.hookImpactsSwap=function(){return ez.hasSwapPermissions(this.hooks)},v4_sdk_esm_createClass(Pool,[{key:"token0",get:function(){return this.currency0}},{key:"token1",get:function(){return this.currency1}},{key:"currency0Price",get:function(){var f;return null!=(f=this._currency0Price)?f:this._currency0Price=new eL(this.currency0,this.currency1,e5,ep().multiply(this.sqrtRatioX96,this.sqrtRatioX96))}},{key:"token0Price",get:function(){return this.currency0Price}},{key:"currency1Price",get:function(){var f;return null!=(f=this._currency1Price)?f:this._currency1Price=new eL(this.currency1,this.currency0,ep().multiply(this.sqrtRatioX96,this.sqrtRatioX96),e5)}},{key:"token1Price",get:function(){return this.currency1Price}},{key:"chainId",get:function(){return this.currency0.chainId}}])}();function amountWithPathCurrency(f,r){return eM.fromFractionalAmount(getPathCurrency(f.currency,r),f.numerator,f.denominator)}function getPathCurrency(f,r){if(r.involvesCurrency(f))return f;if(r.involvesCurrency(f.wrapped))return f.wrapped;
1if(r.currency0.wrapped.equals(f))return r.currency0;if(r.currency1.wrapped.equals(f))return r.currency1;throw Error("Expected currency "+f.symbol+" to be either "+r.currency0.symbol+" or "+r.currency1.symbol)}var e9=v4_sdk_esm_createClass(function(f,r,s){this._midPrice=null,f.length>0||(0,eu.Z)(!1);var l=f[0].chainId;f.every(function(f){return f.chainId===l})||(0,eu.Z)(!1),this.pathInput=getPathCurrency(r,f[0]),this.pathOutput=getPathCurrency(s,f[f.length-1]);for(var m,h=[this.pathInput],E=_createForOfIteratorHelperLoose(f.entries());!(m=E()).done;){var I=m.value,w=I[0],B=I[1],D=h[w];D.equals(B.currency0)||D.equals(B.currency1)||(0,eu.Z)(!1);var M=D.equals(B.currency0)?B.currency1:B.currency0;h.push(M)}this.pools=f,this.currencyPath=h,this.input=r,this.output=null!=s?s:h[h.length-1]},[{key:"chainId",get:function(){return this.pools[0].chainId}},{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;var f=this.pools.slice(1).reduce(function(f,r){var s=f.nextInput,l=f.price;return s.equals(r.currency0)?{nextInput:r.currency1,price:l.multiply(r.currency0Price)}:{nextInput:r.currency0,price:l.multiply(r.currency1Price)}},this.pools[0].currency0.equals(this.input)?{nextInput:this.pools[0].currency1,price:this.pools[0].currency0Price}:{nextInput:this.pools[0].currency0,price:this.pools[0].currency1Price}).price;return this._midPrice=new eL(this.input,this.output,f.denominator,f.numerator)}}]);function tradeComparator(f,r){return(f.inputAmount.currency.equals(r.inputAmount.currency)||(0,eu.Z)(!1),f.outputAmount.currency.equals(r.outputAmount.currency)||(0,eu.Z)(!1),f.outputAmount.equalTo(r.outputAmount))?f.inputAmount.equalTo(r.inputAmount)?f.swaps.reduce(function(f,r){return f+r.route.currencyPath.length},0)-r.swaps.reduce(function(f,r){return f+r.route.currencyPath.length},0):f.inputAmount.lessThan(r.inputAmount)?-1:1:f.outputAmount.lessThan(r.outputAmount)?1:-1}var e7=function(){function Trade(f){var r=f.routes,s=f.tradeType,l=r[0].inputAmount.currency,m=r[0].outputAmount.currency;r.every(function(f){var r=f.route;return l.equals(r.input)})||(0,eu.Z)(!1),r.every(function(f){var r=f.route;return m.equals(r.output)})||(0,eu.Z)(!1);for(var h,E=r.map(function(f){return f.route.pools.length}).reduce(function(f,r){return f+r},0),I=new Set,w=_createForOfIteratorHelperLoose(r);!(h=w()).done;)for(var B,D=h.value.route,M=_createForOfIteratorHelperLoose(D.pools);!(B=M()).done;){var L=B.value;I.add(e4.getPoolId(L.currency0,L.currency1,L.fee,L.tickSpacing,L.hooks))}E!==I.size&&(0,eu.Z)(!1),this.swaps=r,this.tradeType=s}Trade.exactIn=(f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(f,r){return _regeneratorRuntime().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",Trade.fromRoute(f,r,X.EXACT_INPUT));case 1:case"end":return s.stop()}},_callee)})),function(r,s){return f.apply(this,arguments)}),Trade.exactOut=(r=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(f,r){return _regeneratorRuntime().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",Trade.fromRoute(f,r,X.EXACT_OUTPUT));case 1:case"end":return s.stop()}},_callee2)})),function(f,s){return r.apply(this,arguments)}),Trade.fromRoute=(s=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(f,r,s){var l,m,h,E,I,w,B,D;return _regeneratorRuntime().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(s!==X.EXACT_INPUT){M.next=17;break}r.currency.equals(f.input)||(0,eu.Z)(!1),h=amountWithPathCurrency(r,f.pools[0]),E=0;case 4:if(!(E<f.pools.length)){M.next=13;break}return I=f.pools[E],M.next=8,I.getOutputAmount(h);case 8:h=M.sent[0];case 10:E++,M.next=4;break;case 13:l=eM.fromFractionalAmount(f.input,r.numerator,r.denominator),m=eM.fromFractionalAmount(f.output,h.numerator,h.denominator),M.next=31;break;case 17:r.currency.equals(f.output)||(0,eu.Z)(!1),w=amountWithPathCurrency(r,f.pools[f.pools.length-1]),B=f.pools.length-1;case 20:if(!(B>=0)){M.next=29;break}return D=f.pools[B],M.next=24,D.getInputAmount(w);case 24:w=M.sent[0];case 26:B--,M.next=20;break;case 29:l=eM.fromFractionalAmount(f.input,w.numerator,w.denominator),m=eM.fromFractionalAmount(f.output,r.numerator,r.denominator);case 31:return M.abrupt("return",new Trade({routes:[{inputAmount:l,outputAmount:m,route:f}],tradeType:s}));case 32:case"end":return M.stop()}},_callee3)})),function(f,r,l){return s.apply(this,arguments)}),Trade.fromRoutes=(l=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(f,r){var s;return _regeneratorRuntime().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Promise.all(f.map(function(){var f=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(f){var s,l,m;return _regeneratorRuntime().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return s=f.amount,l=f.route,h.next=3,Trade.fromRoute(l,s,r);case 3:return m=h.sent,h.abrupt("return",m.swaps[0]);case 5:case"end":return h.stop()}},_callee4)}));return function(r){return f.apply(this,arguments)}}()));case 2:return s=l.sent,l.abrupt("return",new Trade({routes:s,tradeType:r}));case 4:case"end":return l.stop()}},_callee5)})),function(f,r){return l.apply(this,arguments)}),Trade.createUncheckedTrade=function(f){return new Trade(v4_sdk_esm_extends({},f,{routes:[{inputAmount:f.inputAmount,outputAmount:f.outputAmount,route:f.route}]}))},Trade.createUncheckedTradeWithMultipleRoutes=function(f){return new Trade(f)};var f,r,s,l,m,h,E=Trade.prototype;return E.minimumAmountOut=function(f,r){if(void 0===r&&(r=this.outputAmount),f.lessThan(e0)&&(0,eu.Z)(!1),this.tradeType===X.EXACT_OUTPUT)return r;var s=new ek(e1).add(f).invert().multiply(r.quotient).quotient;return eM.fromRawAmount(r.currency,s)},E.maximumAmountIn=function(f,r){if(void 0===r&&(r=this.inputAmount),f.lessThan(e0)&&(0,eu.Z)(!1),this.tradeType===X.EXACT_INPUT)return r;var s=new ek(e1).add(f).multiply(r.quotient).quotient;return eM.fromRawAmount(r.currency,s)},E.worstExecutionPrice=function(f){return new eL(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(f).quotient,this.minimumAmountOut(f).quotient)},Trade.bestTradeExactIn=(m=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(f,r,s,l,m,h,E){var I,w,B,D,M,L,W,V,G,Z;return _regeneratorRuntime().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:B=void 0===(w=(I=void 0===l?{}:l).maxNumResults)?3:w,M=void 0===(D=I.maxHops)?3:D,void 0===m&&(m=[]),void 0===h&&(h=r),void 0===E&&(E=[]),f.length>0||(0,eu.Z)(!1),M>0||(0,eu.Z)(!1),r===h||m.length>0||(0,eu.Z)(!1),L=h,W=0;case 9:if(!(W<f.length)){K.next=45;break}if(!(!(V=f[W]).currency0.equals(L.currency)&&!V.currency1.equals(L.currency))){K.next=13;break}return K.abrupt("continue",42);case 13:return G=void 0,K.prev=14,K.next=18,V.getOutputAmount(L);case 18:G=K.sent[0],K.next=27;break;case 22:if(K.prev=22,K.t0=K.catch(14),!K.t0.isInsufficientInputAmountError){K.next=26;break}return K.abrupt("continue",42);case 26:throw K.t0;case 27:if(!G.currency.equals(s)){K.next=38;break}return K.t1=sortedInsert,K.t2=E,K.next=32,Trade.fromRoute(new e9([].concat(m,[V]),r.currency,s),r,X.EXACT_INPUT);case 32:K.t3=K.sent,K.t4=B,K.t5=tradeComparator,(0,K.t1)(K.t2,K.t3,K.t4,K.t5),K.next=42;break;case 38:if(!(M>1&&f.length>1)){K.next=42;break}return Z=f.slice(0,W).concat(f.slice(W+1,f.length)),K.next=42,Trade.bestTradeExactIn(Z,r,s,{maxNumResults:B,maxHops:M-1},[].concat(m,[V]),G,E);case 42:W++,K.next=9;break;case 45:return K.abrupt("return",E);case 46:case"end":return K.stop()}},_callee6,null,[[14,22]])})),function(f,r,s,l,h,E,I){return m.apply(this,arguments)}),Trade.bestTradeExactOut=(h=_asyncToGenerator(_regeneratorRuntime().mark(function _callee7(f,r,s,l,m,h,E){var I,w,B,D,M,L,W,V,G,Z;return _regeneratorRuntime().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:B=void 0===(w=(I=void 0===l?{}:l).maxNumResults)?3:w,M=void 0===(D=I.maxHops)?3:D,void 0===m&&(m=[]),void 0===h&&(h=s),void 0===E&&(E=[]),f.length>0||(0,eu.Z)(!1),M>0||(0,eu.Z)(!1),s===h||m.length>0||(0,eu.Z)(!1),L=h,W=0;case 9:if(!(W<f.length)){K.next=45;break}if(!(!(V=f[W]).currency0.equals(L.currency)&&!V.currency1.equals(L.currency))){K.next=13;break}return K.abrupt("continue",42);case 13:return G=void 0,K.prev=14,K.next=18,V.getInputAmount(L);case 18:G=K.sent[0],K.next=27;break;case 22:if(K.prev=22,K.t0=K.catch(14),!K.t0.isInsufficientReservesError){K.next=26;break}return K.abrupt("continue",42);case 26:throw K.t0;case 27:if(!G.currency.equals(r)){K.next=38;break}return K.t1=sortedInsert,K.t2=E,K.next=32,Trade.fromRoute(new e9([V].concat(m),r,s.currency),s,X.EXACT_OUTPUT);case 32:K.t3=K.sent,K.t4=B,K.t5=tradeComparator,(0,K.t1)(K.t2,K.t3,K.t4,K.t5),K.next=42;break;case 38:if(!(M>1&&f.length>1)){K.next=42;break}return Z=f.slice(0,W).concat(f.slice(W+1,f.length)),K.next=42,Trade.bestTradeExactOut(Z,r,s,{maxNumResults:B,maxHops:M-1},[V].concat(m),G,E);case 42:W++,K.next=9;break;case 45:return K.abrupt("return",E);case 46:case"end":return K.stop()}},_callee7,null,[[14,22]])})),function(f,r,s,l,m,E,I){return h.apply(this,arguments)}),v4_sdk_esm_createClass(Trade,[{key:"route",get:function(){return 1!==this.swaps.length&&(0,eu.Z)(!1),this.swaps[0].route}},{key:"inputAmount",get:function(){if(this._inputAmount)return this._inputAmount;var f=this.swaps[0].inputAmount.currency,r=this.swaps.map(function(f){return f.inputAmount}).reduce(function(f,r){return f.add(r)},eM.fromRawAmount(f,0));return this._inputAmount=r,this._inputAmount}},{key:"outputAmount",get:function(){if(this._outputAmount)return this._outputAmount;var f=this.swaps[0].outputAmount.currency,r=this.swaps.map(function(f){return f.outputAmount}).reduce(function(f,r){return f.add(r)},eM.fromRawAmount(f,0));return this._outputAmount=r,this._outputAmount}},{key:"executionPrice",get:function(){var f;return null!=(f=this._executionPrice)?f:this._executionPrice=new eL(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient)}},{key:"priceImpact",get:function(){if(this._priceImpact)return this._priceImpact;for(var f,r=eM.fromRawAmount(this.outputAmount.currency,0),s=_createForOfIteratorHelperLoose(this.swaps);!(f=s()).done;){var l=f.value,m=l.route,h=l.inputAmount,E=m.midPrice;r=r.add(E.quote(h))}var I=r.subtract(this.outputAmount).divide(r);return this._priceImpact=new eN(I.numerator,I.denominator),this._priceImpact}}])}();function tickToPrice(f,r,s){var l=eV.TickMath.getSqrtRatioAtTick(s),m=ep().multiply(l,l);return sortsBefore(f,r)?new eL(f,r,e5,m):new eL(f,r,m,e5)}function priceToClosestTick(f){var r=sortsBefore(f.baseCurrency,f.quoteCurrency),s=r?(0,eV.encodeSqrtRatioX96)(f.numerator,f.denominator):(0,eV.encodeSqrtRatioX96)(f.denominator,f.numerator),l=eV.TickMath.getTickAtSqrtRatio(s),m=tickToPrice(f.baseCurrency,f.quoteCurrency,l+1);return r?!f.lessThan(m)&&l++:!f.greaterThan(m)&&l++,l}var te=function(){function Position(f){var r=f.pool,s=f.liquidity,l=f.tickLower,m=f.tickUpper;
1this._token0Amount=null,this._token1Amount=null,this._mintAmounts=null,l<m||(0,eu.Z)(!1),l>=eV.TickMath.MIN_TICK&&l%r.tickSpacing==0||(0,eu.Z)(!1),m<=eV.TickMath.MAX_TICK&&m%r.tickSpacing==0||(0,eu.Z)(!1),this.pool=r,this.tickLower=l,this.tickUpper=m,this.liquidity=ep().BigInt(s)}var f=Position.prototype;return f.ratiosAfterSlippage=function(f){var r=this.pool.token0Price.asFraction.multiply(new eN(1).subtract(f)),s=this.pool.token0Price.asFraction.multiply(f.add(1)),l=(0,eV.encodeSqrtRatioX96)(r.numerator,r.denominator);ep().lessThanOrEqual(l,eV.TickMath.MIN_SQRT_RATIO)&&(l=ep().add(eV.TickMath.MIN_SQRT_RATIO,ep().BigInt(1)));var m=(0,eV.encodeSqrtRatioX96)(s.numerator,s.denominator);return ep().greaterThanOrEqual(m,eV.TickMath.MAX_SQRT_RATIO)&&(m=ep().subtract(eV.TickMath.MAX_SQRT_RATIO,ep().BigInt(1))),{sqrtRatioX96Lower:l,sqrtRatioX96Upper:m}},f.mintAmountsWithSlippage=function(f){var r=this.ratiosAfterSlippage(f),s=r.sqrtRatioX96Upper,l=r.sqrtRatioX96Lower,m=new e4(this.pool.token0,this.pool.token1,this.pool.fee,this.pool.tickSpacing,this.pool.hooks,l,0,eV.TickMath.getTickAtSqrtRatio(l)),h=new e4(this.pool.token0,this.pool.token1,this.pool.fee,this.pool.tickSpacing,this.pool.hooks,s,0,eV.TickMath.getTickAtSqrtRatio(s)),E=new Position({pool:h,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount1;return{amount0:new Position({pool:m,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).mintAmounts.amount0,amount1:E}},f.burnAmountsWithSlippage=function(f){var r=this.ratiosAfterSlippage(f),s=r.sqrtRatioX96Upper,l=r.sqrtRatioX96Lower,m=new e4(this.pool.currency0,this.pool.currency1,this.pool.fee,this.pool.tickSpacing,this.pool.hooks,l,0,eV.TickMath.getTickAtSqrtRatio(l)),h=new e4(this.pool.currency0,this.pool.currency1,this.pool.fee,this.pool.tickSpacing,this.pool.hooks,s,0,eV.TickMath.getTickAtSqrtRatio(s)),E=new Position({pool:h,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount0,I=new Position({pool:m,liquidity:this.liquidity,tickLower:this.tickLower,tickUpper:this.tickUpper}).amount1;return{amount0:E.quotient,amount1:I.quotient}},f.permitBatchData=function(f,r,s,l){var m=this.mintAmountsWithSlippage(f),h=m.amount0,E=m.amount1;return{details:[{token:this.pool.currency0.wrapped.address,amount:h,expiration:l,nonce:s},{token:this.pool.currency1.wrapped.address,amount:E,expiration:l,nonce:s}],spender:r,sigDeadline:l}},Position.fromAmounts=function(f){var r=f.pool,s=f.tickLower,l=f.tickUpper,m=f.amount0,h=f.amount1,E=f.useFullPrecision,I=eV.TickMath.getSqrtRatioAtTick(s),w=eV.TickMath.getSqrtRatioAtTick(l);return new Position({pool:r,tickLower:s,tickUpper:l,liquidity:(0,eV.maxLiquidityForAmounts)(r.sqrtRatioX96,I,w,m,h,E)})},Position.fromAmount0=function(f){var r=f.pool,s=f.tickLower,l=f.tickUpper,m=f.amount0,h=f.useFullPrecision;return Position.fromAmounts({pool:r,tickLower:s,tickUpper:l,amount0:m,amount1:eP,useFullPrecision:h})},Position.fromAmount1=function(f){var r=f.pool,s=f.tickLower,l=f.tickUpper,m=f.amount1;return Position.fromAmounts({pool:r,tickLower:s,tickUpper:l,amount0:eP,amount1:m,useFullPrecision:!0})},v4_sdk_esm_createClass(Position,[{key:"token0PriceLower",get:function(){return tickToPrice(this.pool.currency0,this.pool.currency1,this.tickLower)}},{key:"token0PriceUpper",get:function(){return tickToPrice(this.pool.currency0,this.pool.currency1,this.tickUpper)}},{key:"amount0",get:function(){return this._token0Amount||(this.pool.tickCurrent<this.tickLower?this._token0Amount=eM.fromRawAmount(this.pool.currency0,eV.SqrtPriceMath.getAmount0Delta(eV.TickMath.getSqrtRatioAtTick(this.tickLower),eV.TickMath.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!1)):this.pool.tickCurrent<this.tickUpper?this._token0Amount=eM.fromRawAmount(this.pool.currency0,eV.SqrtPriceMath.getAmount0Delta(this.pool.sqrtRatioX96,eV.TickMath.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!1)):this._token0Amount=eM.fromRawAmount(this.pool.currency0,e0)),this._token0Amount}},{key:"amount1",get:function(){return this._token1Amount||(this.pool.tickCurrent<this.tickLower?this._token1Amount=eM.fromRawAmount(this.pool.currency1,e0):this.pool.tickCurrent<this.tickUpper?this._token1Amount=eM.fromRawAmount(this.pool.currency1,eV.SqrtPriceMath.getAmount
11Delta(eV.TickMath.getSqrtRatioAtTick(this.tickLower),this.pool.sqrtRatioX96,this.liquidity,!1)):this._token1Amount=eM.fromRawAmount(this.pool.currency1,eV.SqrtPriceMath.getAmount1Delta(eV.TickMath.getSqrtRatioAtTick(this.tickLower),eV.TickMath.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!1))),this._token1Amount}},{key:"mintAmounts",get:function(){return null===this._mintAmounts?this.pool.tickCurrent<this.tickLower?{amount0:eV.SqrtPriceMath.getAmount0Delta(eV.TickMath.getSqrtRatioAtTick(this.tickLower),eV.TickMath.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!0),amount1:e0}:this.pool.tickCurrent<this.tickUpper?{amount0:eV.SqrtPriceMath.getAmount0Delta(this.pool.sqrtRatioX96,eV.TickMath.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!0),amount1:eV.SqrtPriceMath.getAmount1Delta(eV.TickMath.getSqrtRatioAtTick(this.tickLower),this.pool.sqrtRatioX96,this.liquidity,!0)}:{amount0:e0,amount1:eV.SqrtPriceMath.getAmount1Delta(eV.TickMath.getSqrtRatioAtTick(this.tickLower),eV.TickMath.getSqrtRatioAtTick(this.tickUpper),this.liquidity,!0)}:this._mintAmounts}}])}(),encodeRouteToPath=function(f,r){var s=f.pools.map(function(f){return f});r&&(s=s.reverse());for(var l,m=r?f.pathOutput:f.pathInput,h=[],E=_createForOfIteratorHelperLoose(s);!(l=E()).done;){var I=l.value,w=m.equals(I.currency0)?I.currency1:I.currency0;h.push({intermediateCurrency:w.isNative?eJ:w.address,fee:I.fee,tickSpacing:I.tickSpacing,hooks:I.hooks,hookData:"0x"}),m=w}return r?h.reverse():h};(D=eo||(eo={}))[D.INCREASE_LIQUIDITY=0]="INCREASE_LIQUIDITY",D[D.DECREASE_LIQUIDITY=1]="DECREASE_LIQUIDITY",D[D.MINT_POSITION=2]="MINT_POSITION",D[D.BURN_POSITION=3]="BURN_POSITION",D[D.SWAP_EXACT_IN_SINGLE=6]="SWAP_EXACT_IN_SINGLE",D[D.SWAP_EXACT_IN=7]="SWAP_EXACT_IN",D[D.SWAP_EXACT_OUT_SINGLE=8]="SWAP_EXACT_OUT_SINGLE",D[D.SWAP_EXACT_OUT=9]="SWAP_EXACT_OUT",D[D.SETTLE=11]="SETTLE",D[D.SETTLE_ALL=12]="SETTLE_ALL",D[D.SETTLE_PAIR=13]="SETTLE_PAIR",D[D.TAKE=14]="TAKE",D[D.TAKE_ALL=15]="TAKE_ALL",D[D.TAKE_PORTION=16]="TAKE_PORTION",D[D.TAKE_PAIR=17]="TAKE_PAIR",D[D.CLOSE_CURRENCY=18]="CLOSE_CURRENCY",D[D.SWEEP=20]="SWEEP",D[D.UNWRAP=22]="UNWRAP",(M=es||(es={}))[M.V4SwapExactInSingle=0]="V4SwapExactInSingle",M[M.V4SwapExactIn=1]="V4SwapExactIn",M[M.V4SwapExactOutSingle=2]="V4SwapExactOutSingle",M[M.V4SwapExactOut=3]="V4SwapExactOut",M[M.PoolKey=4]="PoolKey";var tt="(address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks)",tf="(address intermediateCurrency,uint256 fee,int24 tickSpacing,address hooks,bytes hookData)",tn="("+tt+" poolKey,bool zeroForOne,uint128 amountIn,uint128 amountOutMinimum,bytes hookData)",tr="("+tt+" poolKey,bool zeroForOne,uint128 amountOut,uint128 amountInMaximum,bytes hookData)",ta=((ei={})[eo.INCREASE_LIQUIDITY]=[{name:"tokenId",type:"uint256"},{name:"liquidity",type:"uint256"},{name:"amount0Max",type:"uint128"},{name:"amount1Max",type:"uint128"},{name:"hookData",type:"bytes"}],ei[eo.DECREASE_LIQUIDITY]=[{name:"tokenId",type:"uint256"},{name:"liquidity",type:"uint256"},{name:"amount0Min",type:"uint128"},{name:"amount1Min",type:"uint128"},{name:"hookData",type:"bytes"}],ei[eo.MINT_POSITION]=[{name:"poolKey",type:tt,subparser:es.PoolKey},{name:"tickLower",type:"int24"},{name:"tickUpper",type:"int24"},{name:"liquidity",type:"uint256"},{name:"amount0Max",type:"uint128"},{name:"amount1Max",type:"uint128"},{name:"owner",type:"address"},{name:"hookData",type:"bytes"}],ei[eo.BURN_POSITION]=[{name:"tokenId",type:"uint256"},{name:"amount0Min",type:"uint128"},{name:"amount1Min",type:"uint128"},{name:"hookData",type:"bytes"}],ei[eo.SWAP_EXACT_IN_SINGLE]=[{name:"swap",type:tn,subparser:es.V4SwapExactInSingle}],ei[eo.SWAP_EXACT_IN]=[{name:"swap",type:"(address currencyIn,"+tf+"[] path,uint128 amountIn,uint128 amountOutMinimum)",subparser:es.V4SwapExactIn}],ei[eo.SWAP_EXACT_OUT_SINGLE]=[{name:"swap",type:tr,subparser:es.V4SwapExactOutSingle}],ei[eo.SWAP_EXACT_OUT]=[{name:"swap",type:"(address currencyOut,"+tf+"[] path,uint128 amountOut,uint128 amountInMaximum)",subparser:es.V4SwapExactOut}],ei[eo.SETTLE]=[{name:"currency",type:"address"},{name:"amount",type:"uint256"},{name:"payerIsUser",type:"bool"}],ei[eo.SETTLE_ALL]=[{name:"currency",type:"address"},{name:"maxAmount",type:"uint256"}],ei[eo.SETTLE_PAIR]=[{name:"currency0",type:"address"},{name:"currency1",type:"address"}],ei[eo.TAKE]=[{name:"currency",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],ei[eo.TAKE_ALL]=[{name:"currency",type:"address"},{name:"minAmount",type:"uint256"}],ei[eo.TAKE_PORTION]=[{name:"currency",type:"address"},{name:"recipient",type:"address"},{name:"bips",type:"uint256"}],ei[eo.TAKE_PAIR]=[{name:"currency0",type:"address"},{name:"currency1",type:"address"},{name:"recipient",type:"address"}],ei[eo.CLOSE_CURRENCY]=[{name:"currency",type:"address"}],ei[eo.SWEEP]=[{name:"currency",type:"address"},{name:"recipient",type:"address"}],ei[eo.UNWRAP]=[{name:"amount",type:"uint256"}],ei),ti=function(){function V4Planner(){this.actions="0x",this.params=[]}var f=V4Planner.prototype;return f.addAction=function(f,r){var s,l=(s=eG.defaultAbiCoder.encode(ta[f].map(function(f){return f.type}),r),{action:f,encodedInput:s});return this.params.push(l.encodedInput),this.actions=this.actions.concat(l.action.toString(16).padStart(2,"0")),this},f.addTrade=function(f,r){var s=f.tradeType===X.EXACT_OUTPUT;s&&(r||(0,eu.Z)(!1)),1!==f.swaps.length&&(0,eu.Z)(!1);var l=s?eo.SWAP_EXACT_OUT:eo.SWAP_EXACT_IN,m=currencyAddress(f.route.pathInput),h=currencyAddress(f.route.pathOutput);return this.addAction(l,[s?{currencyOut:h,path:encodeRouteToPath(f.route,s),amountInMaximum:f.maximumAmountIn(null!=r?r:new eN(0)).quotient.toString(),amountOut:f.outputAmount.quotient.toString()}:{currencyIn:m,path:encodeRouteToPath(f.route,s),amountIn:f.inputAmount.quotient.toString(),amountOutMinimum:r?f.minimumAmountOut(r).quotient.toString():0}]),this},f.addSettle=function(f,r,s){return this.addAction(eo.SETTLE,[currencyAddress(f),null!=s?s:0,r]),this},f.addTake=function(f,r,s){var l=null!=s?s:0;return this.addAction(eo.TAKE,[currencyAddress(f),r,l]),this},f.addUnwrap=function(f){return this.addAction(eo.UNWRAP,[f]),this},f.finalize=function(){return eG.defaultAbiCoder.encode(["bytes","bytes[]"],[this.actions,this.params])},V4Planner}();function currencyAddress(f){return f.isNative?eJ:f.wrapped.address}function toAddress(f){return f.isNative?eJ:f.wrapped.address}var to=function(f){function V4PositionPlanner(){return f.apply(this,arguments)||this}V4PositionPlanner.prototype=Object.create(f.prototype),V4PositionPlanner.prototype.constructor=V4PositionPlanner,v4_sdk_esm_setPrototypeOf(V4PositionPlanner,f);var r=V4PositionPlanner.prototype;return r.addMint=function(f,r,s,l,m,h,E,I){void 0===I&&(I="0x");var w=[e4.getPoolKey(f.currency0,f.currency1,f.fee,f.tickSpacing,f.hooks),r,s,l.toString(),m.toString(),h.toString(),E,I];this.addAction(eo.MINT_POSITION,w)},r.addIncrease=function(f,r,s,l,m){void 0===m&&(m="0x");var h=[f.toString(),r.toString(),s.toString(),l.toString(),m];this.addAction(eo.INCREASE_LIQUIDITY,h)},r.addDecrease=function(f,r,s,l,m){void 0===m&&(m="0x");var h=[f.toString(),r.toString(),s.toString(),l.toString(),m];this.addAction(eo.DECREASE_LIQUIDITY,h)},r.addBurn=function(f,r,s,l){void 0===l&&(l="0x");var m=[f.toString(),r.toString(),s.toString(),l];this.addAction(eo.BURN_POSITION,m)},r.addSettlePair=function(f,r){var s=[toAddress(f),toAddress(r)];this.addAction(eo.SETTLE_PAIR,s)},r.addTakePair=function(f,r,s){var l=[toAddress(f),toAddress(r),s];this.addAction(eo.TAKE_PAIR,l)},r.addSweep=function(f,r){var s=[toAddress(f),r];this.addAction(eo.SWEEP,s)},V4PositionPlanner}(ti);function toHex(f){var r=ep().BigInt(f).toString(16);return r.length%2!=0&&(r="0"+r),"0x"+r}var ts=function(){function V4BaseActionsParser(){}return V4BaseActionsParser.parseCalldata=function(f){var r=ej.$.decode(["bytes","bytes[]"],f),s=r[0],l=r[1];return{actions:V4BaseActionsParser.getActions(s).map(function(f,r){var s=ta[f],m=ej.$.decode(s.map(function(f){return f.type}),l[r]).map(function(f,r){var l,m,h,E,I,w,B,D,M,L,W,V,G,Z,X,K,$,ee,et,ef,en,er,ea;switch(s[r].subparser){case es.V4SwapExactInSingle:return{name:s[r].name,value:(l=f[0],m=f[1],h=f[2],E=f[3],I=f[4],{poolKey:{currency0:l[0],currency1:l[1],fee:l[2],tickSpacing:l[3],hooks:l[4]},zeroForOne:m,amountIn:h,amountOutMinimum:E,hookData:I})};case es.V4SwapExactIn:return{name:s[r].name,value:(w=f[0],B=f[1],D=f[2],M=f[3],{path:B.map(function(f){return parsePathKey(f)}),currencyIn:w,amountIn:D,amountOutMinimum:M})};case es.V4SwapExactOutSingle:return{name:s[r].name,value:(L=f[0],W=f[1],V=f[2],G=f[3],Z=f[4],{poolKey:{currency0:L.currency0,currency1:L.currency1,fee:L.fee,tickSpacing:L.tickSpacing,hooks:L.hooks},zeroForOne:W,amountOut:V,amountInMaximum:G,hookData:Z})};case es.V4SwapExactOut:return{name:s[r].name,value:(X=f[0],K=f[1],$=f[2],ee=f[3],{path:K.map(function(f){return parsePathKey(f)}),currencyOut:X,amountOut:$,amountInMaximum:ee})};case es.PoolKey:return{name:s[r].name,value:(et=f[0],ef=f[1],en=f[2],er=f[3],ea=f[4],{currency0:et,currency1:ef,fee:parseInt(en),tickSpacing:parseInt(er),hooks:ea})};default:return{name:s[r].name,value:f}}});return{actionName:eo[f],actionType:f,params:m}})}},V4BaseActionsParser.getActions=function(f){for(var r=[],s=2;s<f.length;s+=2){var l=f.substring(s,s+2);r.push(parseInt(l,16))}return r},V4BaseActionsParser}();function parsePathKey(f){var r=f[0],s=f[1],l=f[2],m=f[3],h=f[4];return{intermediateCurrency:r,fee:parseInt(s),tickSpacing:parseInt(l),hooks:m,hookData:h}}var tu="0x0000000000000000000000000000000000000001",tc=function(){function Multicall(){}return Multicall.encodeMulticall=function(f){return Array.isArray(f)||(f=[f]),1===f.length?f[0]:Multicall.INTERFACE.encodeFunctionData("multicall",[f])},Multicall.decodeMulticall=function(f){return Multicall.INTERFACE.decodeFunctionData("multicall",f)[0]},Multicall}();tc.INTERFACE=new eQ.vU(eK.Mt);var td={Permit:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]};function isMint(f){return Object.keys(f).some(function(f){return"recipient"===f})}var tp=function(){function V4PositionManager(){}return V4PositionManager.createCallParameters=function(f,r){return{calldata:this.encodeInitializePool(f,r),value:toHex(0)}},V4PositionManager.addCallParameters=function(f,r){ep().greaterThan(f.liquidity,e0)||(0,eu.Z)(!1);var s=[],l=new to;isMint(r)&&r.createPool&&(void 0!==r.sqrtPriceX96||(0,eu.Z)(!1),1)&&s.push(V4PositionManager.encodeInitializePool(f.pool.poolKey,r.sqrtPriceX96)),f.pool.currency0!==r.useNative&&(f.pool.currency0.isNative||void 0!==r.useNative)&&(0,eu.Z)(!1);
1var m=f.mintAmountsWithSlippage(r.slippageTolerance),h=toHex(m.amount0),E=toHex(m.amount1);if(r.batchPermit&&s.push(V4PositionManager.encodePermitBatch(r.batchPermit.owner,r.batchPermit.permitBatch,r.batchPermit.signature)),isMint(r)){var I=validateAndParseAddress(r.recipient);l.addMint(f.pool,f.tickLower,f.tickUpper,f.liquidity,h,E,I,r.hookData)}else l.addIncrease(r.tokenId,f.liquidity,h,E,r.hookData);var w=toHex(0);return isMint(r)&&r.migrate?(r.useNative?(l.addUnwrap(e2),l.addSettle(f.pool.currency0,!1),l.addSettle(f.pool.currency1,!1),l.addSweep(f.pool.currency0.wrapped,r.recipient)):(l.addSettle(f.pool.currency0,!1),l.addSettle(f.pool.currency1,!1),l.addSweep(f.pool.currency0,r.recipient)),l.addSweep(f.pool.currency1,r.recipient)):(l.addSettlePair(f.pool.currency0,f.pool.currency1),r.useNative&&(w=toHex(h),l.addSweep(f.pool.currency0,tu))),s.push(V4PositionManager.encodeModifyLiquidities(l.finalize(),r.deadline)),{calldata:tc.encodeMulticall(s),value:w}},V4PositionManager.removeCallParameters=function(f,r){var s=[],l=new to,m=toHex(r.tokenId);if(r.burnToken){r.liquidityPercentage.equalTo(e1)||(0,eu.Z)(!1),r.permit&&s.push(V4PositionManager.encodeERC721Permit(r.permit.spender,r.permit.tokenId,r.permit.deadline,r.permit.nonce,r.permit.
1signature));var h=f.burnAmountsWithSlippage(r.slippageTolerance),E=h.amount0,I=h.amount1;l.addBurn(m,E,I,r.hookData)}else{var w,B=new te({pool:f.pool,liquidity:r.liquidityPercentage.multiply(f.liquidity).quotient,tickLower:f.tickLower,tickUpper:f.tickUpper});ep().greaterThan(B.liquidity,e0)||(0,eu.Z)(!1);var D=B.burnAmountsWithSlippage(r.slippageTolerance),M=D.amount0,L=D.amount1;l.addDecrease(m,B.liquidity.toString(),M.toString(),L.toString(),null!=(w=r.hookData)?w:"0x")}return l.addTakePair(f.pool.currency0,f.pool.currency1,tu),s.push(V4PositionManager.encodeModifyLiquidities(l.finalize(),r.deadline)),{calldata:tc.encodeMulticall(s),value:toHex(0)}},V4PositionManager.collectCallParameters=function(f,r){var s=[],l=new to,m=toHex(r.tokenId),h=validateAndParseAddress(r.recipient);return l.addDecrease(m,"0","0","0",r.hookData),l.addTakePair(f.pool.currency0,f.pool.currency1,h),s.push(V4PositionManager.encodeModifyLiquidities(l.finalize(),r.deadline)),{calldata:tc.encodeMulticall(s),value:toHex(0)}},V4PositionManager.encodeInitializePool=function(f,r){return V4PositionManager.INTERFACE.encodeFunctionData(er.INITIALIZE_POOL,[f,r.toString()])},V4PositionManager.encodeModifyLiquidities=function(f,r){return V4PositionManager.INTERFACE.encodeFunctionData(er.MODIFY_LIQUIDITIES,[f,r])},V4PositionManager.encodePermitBatch=function(f,r,s){return V4PositionManager.INTERFACE.encodeFunctionData(er.PERMIT_BATCH,[f,r,s])},V4PositionManager.encodeERC721Permit=function(f,r,s,l,m){return V4PositionManager.INTERFACE.encodeFunctionData(er.ERC721PERMIT_PERMIT,[f,r,s,l,m])},V4PositionManager.getPermitData=function(f,r,s){return{domain:{name:"Uniswap V4 Positions NFT",chainId:s,verifyingContract:r},types:td,values:f}},V4PositionManager}();tp.INTERFACE=new eQ.vU([{type:"constructor",inputs:[{name:"_poolManager",type:"address",internalType:"contract IPoolManager"},{name:"_permit2",type:"address",internalType:"contract IAllowanceTransfer"},{name:"_unsubscribeGasLimit",type:"uint256",internalType:"uint256"},{name:"_tokenDescriptor",type:"address",internalType:"contract IPositionDescriptor"},{name:"_weth9",type:"address",internalType:"contract IWETH9"}],stateMutability:"nonpayable"},{type:"receive",stateMutability:"payable"},{type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"WETH9",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IWETH9"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"spender",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"balanceOf",inputs:[{name:"owner",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getApproved",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getPoolAndPositionInfo",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"poolKey",type:"tuple",internalType:"struct PoolKey",components:[{name:"currency0",type:"address",internalType:"Currency"},{name:"currency1",type:"address",internalType:"Currency"},{name:"fee",type:"uint24",internalType:"uint24"},{name:"tickSpacing",type:"int24",internalType:"int24"},{name:"hooks",type:"address",internalType:"contract IHooks"}]},{name:"info",type:"uint256",internalType:"PositionInfo"}],stateMutability:"view"},{type:"function",name:"getPositionLiquidity",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"liquidity",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{type:"function",name:"initializePool",inputs:[{name:"key",type:"tuple",internalType:"struct PoolKey",components:[{name:"currency0",type:"address",internalType:"Currency"},{name:"currency1",type:"address",internalType:"Currency"},{name:"fee",type:"uint24",internalType:"uint24"},{name:"tickSpacing",type:"int24",internalType:"int24"},{name:"hooks",type:"address",internalType:"contract IHooks"}]},{name:"sqrtPriceX96",type:"uint160",internalType:"uint160"}],outputs:[{name:"",type:"int24",internalType:"int24"}],stateMutability:"payable"},{type:"function",name:"isApprovedForAll",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"modifyLiquidities",inputs:[{name:"unlockData",type:"bytes",internalType:"bytes"},{name:"deadline",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"payable"},{type:"function",name:"modifyLiquiditiesWithoutUnlock",inputs:[{name:"actions",type:"bytes",internalType:"bytes"},{name:"params",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"payable"}
1,{type:"function",name:"msgSender",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"multicall",inputs:[{name:"data",type:"bytes[]",internalType:"bytes[]"}],outputs:[{name:"results",type:"bytes[]",internalType:"bytes[]"}],stateMutability:"payable"},{type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"nextTokenId",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"nonces",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"word",type:"uint256",internalType:"uint256"}],outputs:[{name:"bitmap",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"owner",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"permit",inputs:[{name:"spender",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"deadline",type:"uint256",internalType:"uint256"},{name:"nonce",type:"uint256",internalType:"uint256"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"permit",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"permitSingle",type:"tuple",internalType:"struct IAllowanceTransfer.PermitSingle",components:[{name:"details",type:"tuple",internalType:"struct IAllowanceTransfer.PermitDetails",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint160",internalType:"uint160"},{name:"expiration",type:"uint48",internalType:"uint48"},{name:"nonce",type:"uint48",internalType:"uint48"}]},{name:"spender",type:"address",internalType:"address"},{name:"sigDeadline",type:"uint256",internalType:"uint256"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[{name:"err",type:"bytes",internalType:"bytes"}],stateMutability:"payable"},{type:"function",name:"permit2",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IAllowanceTransfer"}],stateMutability:"view"},{type:"function",name:"permitBatch",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"_permitBatch",type:"tuple",internalType:"struct IAllowanceTransfer.PermitBatch",components:[{name:"details",type:"tuple[]",internalType:"struct IAllowanceTransfer.PermitDetails[]",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint160",internalType:"uint160"},{name:"expiration",type:"uint48",internalType:"uint48"},{name:"nonce",type:"uint48",internalType:"uint48"}]},{name:"spender",type:"address",internalType:"address"},{name:"sigDeadline",type:"uint256",internalType:"uint256"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[{name:"err",type:"bytes",internalType:"bytes"}],stateMutability:"payable"},{type:"function",name:"permitForAll",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"},{name:"deadline",type:"uint256",internalType:"uint256"},{name:"nonce",type:"uint256",internalType:"uint256"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"poolKeys",inputs:[{name:"poolId",type:"bytes25",internalType:"bytes25"}],outputs:[{name:"currency0",type:"address",internalType:"Currency"},{name:"currency1",type:"address",internalType:"Currency"},{name:"fee",type:"uint24",internalType:"uint24"},{name:"tickSpacing",type:"int24",internalType:"int24"},{name:"hooks",type:"address",internalType:"contract IHooks"}],stateMutability:"view"},{type:"function",name:"poolManager",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IPoolManager"}],stateMutability:"view"},{type:"function",name:"positionInfo",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"info",type:"uint256",internalType:"PositionInfo"}],stateMutability:"view"}
1,{type:"function",name:"revokeNonce",inputs:[{name:"nonce",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"payable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"subscribe",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"newSubscriber",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"subscriber",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"subscriber",type:"address",internalType:"contract ISubscriber"}],stateMutability:"view"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"tokenDescriptor",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IPositionDescriptor"}],stateMutability:"view"},{type:"function",name:"tokenURI",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"transferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unlockCallback",inputs:[{name:"data",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"nonpayable"},{type:"function",name:"unsubscribe",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"payable"},{type:"function",name:"unsubscribeGasLimit",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"event",name:"Approval",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"spender",type:"address",indexed:!0,internalType:"address"},{name:"id",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ApprovalForAll",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"Subscription",inputs:[{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"subscriber",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Transfer",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"id",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Unsubscription",inputs:[{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"},{name:"subscriber",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"error",name:"AlreadySubscribed",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"subscriber",type:"address",internalType:"address"}]},{type:"error",name:"BurnNotificationReverted",inputs:[{name:"subscriber",type:"address",internalType:"address"},{name:"reason",type:"bytes",internalType:"bytes"}]},{type:"error",name:"ContractLocked",inputs:[]},{type:"error",name:"DeadlinePassed",inputs:[{name:"deadline",type:"uint256",internalType:"uint256"}]},{type:"error",name:"DeltaNotNegative",inputs:[{name:"currency",type:"address",internalType:"Currency"}]},{type:"error",name:"DeltaNotPositive",inputs:[{name:"currency",type:"address",internalType:"Currency"}]},{type:"error",name:"GasLimitTooLow",inputs:[]},{type:"error",name:"InputLengthMismatch",inputs:[]}
1,{type:"error",name:"InsufficientBalance",inputs:[]},{type:"error",name:"InvalidContractSignature",inputs:[]},{type:"error",name:"InvalidEthSender",inputs:[]},{type:"error",name:"InvalidSignature",inputs:[]},{type:"error",name:"InvalidSignatureLength",inputs:[]},{type:"error",name:"InvalidSigner",inputs:[]},{type:"error",name:"MaximumAmountExceeded",inputs:[{name:"maximumAmount",type:"uint128",internalType:"uint128"},{name:"amountRequested",type:"uint128",internalType:"uint128"}]},{type:"error",name:"MinimumAmountInsufficient",inputs:[{name:"minimumAmount",type:"uint128",internalType:"uint128"},{name:"amountReceived",type:"uint128",internalType:"uint128"}]},{type:"error",name:"ModifyLiquidityNotificationReverted",inputs:[{name:"subscriber",type:"address",internalType:"address"},{name:"reason",type:"bytes",internalType:"bytes"}]},{type:"error",name:"NoCodeSubscriber",inputs:[]},{type:"error",name:"NoSelfPermit",inputs:[]},{type:"error",name:"NonceAlreadyUsed",inputs:[]},{type:"error",name:"NotApproved",inputs:[{name:"caller",type:"address",internalType:"address"}]},{type:"error",name:"NotPoolManager",inputs:[]},{type:"error",name:"NotSubscribed",inputs:[]},{type:"error",name:"PoolManagerMustBeLocked",inputs:[]},{type:"error",name:"SignatureDeadlineExpired",inputs:[]},{type:"error",name:"SubscriptionReverted",inputs:[{name:"subscriber",type:"address",internalType:"address"},{name:"reason",type:"bytes",internalType:"bytes"}]},{type:"error",name:"TransferNotificationReverted",inputs:[{name:"subscriber",type:"address",internalType:"address"},{name:"reason",type:"bytes",internalType:"bytes"}]},{type:"error",name:"Unauthorized",inputs:[]},{type:"error",name:"UnsupportedAction",inputs:[{name:"action",type:"uint256",internalType:"uint256"}]}])},38513:function(f,r,s){var l;!function(m){"use strict";var h,E="[big.js] ",I=E+"Invalid ",w=I+"decimal places",B=I+"rounding mode",D=E+"Division by zero",M={},L=void 0,W=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function round(f,r,s,l){var m=f.c,h=f.e+r+1;if(h<m.length){if(1===s)l=m[h]>=5;else if(2===s)l=m[h]>5||5==m[h]&&(l||h<0||m[h+1]!==L||1&m[h-1]);else if(3===s)l=l||!!m[0];else if(l=!1,0!==s)throw Error(B);if(h<1)m.length=1,l?(f.e=-r,m[0]=1):m[0]=f.e=0;else{if(m.length=h--,l)for(;++m[h]>9;)m[h]=0,h--||(++f.e,m.unshift(1));for(h=m.length;!m[--h];)m.pop()}}else if(s<0||s>3||s!==~~s)throw Error(B);return f}function stringify(f,r,s,l){var m,h,E=f.constructor,B=!f.c[0];if(s!==L){if(s!==~~s||s<(3==r)||s>1e6)throw Error(3==r?I+"precision":w);for(s=l-(f=new E(f)).e,f.c.length>++l&&round(f,s,E.RM),2==r&&(l=f.e+s+1);f.c.length<l;)f.c.push(0)}if(m=f.e,s=(h=f.c.join("")).length,2!=r&&(1==r||3==r&&l<=m||m<=E.NE||m>=E.PE))h=h.charAt(0)+(s>1?"."+h.slice(1):"")+(m<0?"e":"e+")+m;else if(m<0){for(;++m;)h="0"+h;h="0."+h}else if(m>0){if(++m>s)for(m-=s;m--;)h+="0";else m<s&&(h=h.slice(0,m)+"."+h.slice(m))}else s>1&&(h=h.charAt(0)+"."+h.slice(1));return f.s<0&&(!B||4==r)?"-"+h:h}M.abs=function(){var f=new this.constructor(this);return f.s=1,f},M.cmp=function(f){var r,s=this.c,l=(f=new this.constructor(f)).c,m=this.s,h=f.s,E=this.e,I=f.e;if(!s[0]||!l[0])return s[0]?m:l[0]?-h:0;if(m!=h)return m;if(r=m<0,E!=I)return E>I^r?1:-1;for(m=-1,h=(E=s.length)<(I=l.length)?E:I;++m<h;)if(s[m]!=l[m])return s[m]>l[m]^r?1:-1;return E==I?0:E>I^r?1:-1},M.div=function(f){var r=this.constructor,s=this.c,l=(f=new r(f)).c,m=this.s==f.s?1:-1,h=r.DP;if(h!==~~h||h<0||h>1e6)throw Error(w);if(!l[0])throw Error(D);if(!s[0])return new r(0*m);var E,I,B,M,W,V=l.slice(),G=E=l.length,Z=s.length,X=s.slice(0,E),K=X.length,$=f,ee=$.c=[],et=0,ef=h+($.e=this.e-f.e)+1;for($.s=m,m=ef<0?0:ef,V.unshift(0);K++<E;)X.push(0);do{for(B=0;B<10;B++){if(E!=(K=X.length))M=E>K?1:-1;else for(W=-1,M=0;++W<E;)if(l[W]!=X[W]){M=l[W]>X[W]?1:-1;break}if(M<0){for(I=K==E?l:V;K;){if(X[--K]<I[K]){for(W=K;W&&!X[--W];)X[W]=9;--X[W],X[K]+=10}X[K]-=I[K]}for(;!X[0];)X.shift()}else break}ee[et++]=M?B:++B,X[0]&&M?X[K]=s[G]||0:X=[s[G]]}while((G++<Z||X[0]!==L)&&m--);return!ee[0]&&1!=et&&(ee.shift(),$.e--),et>ef&&round($,h,r.RM,X[0]!==L),$},M.eq=function(f){return!this.cmp(f)},M.gt=function(f){return this.cmp(f)>0},M.gte=function(f){return this.cmp(f)>-1},M.lt=function(f){return 0>this.cmp(f)},M.lte=function(f){return 1>this.cmp(f)},M.minus=M.sub=function(f){var r,s,l,m,h=this.constructor,E=this.s,I=(f=new h(f)).s;if(E!=I)return f.s=-I,this.plus(f);var w=this.c.slice(),B=this.e,D=f.c,M=f.e;if(!w[0]||!D[0])return D[0]?(f.s=-I,f):new h(w[0]?this:0);if(E=B-M){for((m=E<0)?(E=-E,l=w):(M=B,l=D),l.reverse(),I=E;I--;)l.push(0);l.reverse()}else for(s=((m=w.length<D.length)?w:D).length,E=I=0;I<s;I++)if(w[I]!=D[I]){m=w[I]<D[I];break}if(m&&(l=w,w=D,D=l,f.s=-f.s),(I=(s=D.length)-(r=w.length))>0)for(;I--;)w[r++]=0;for(I=r;s>E;){if(w[--s]<D[s]){for(r=s;r&&!w[--r];)w[r]=9;--w[r],w[s]+=10}w[s]-=D[s]}for(;0===w[--I];)w.pop();for(;0===w[0];)w.shift(),--M;return w[0]||(f.s=1,w=[M=0]),f.c=w,f.e=M,f},M.mod=function(f){var r,s=this,l=s.constructor,m=s.s,h=(f=new l(f)).s;if(!f.c[0])throw Error(D);return(s.s=f.s=1,r=1==f.cmp(s),s.s=m,f.s=h,r)?new l(s):(m=l.DP,h=l.RM,l.DP=l.RM=0,s=s.div(f),l.DP=m,l.RM=h,this.minus(s.times(f)))},M.plus=M.add=function(f){var r,s=this.constructor,l=this.s,m=(f=new s(f)).s;if(l!=m)return f.s=-m,this.minus(f);var h=this.e,E=this.c,I=f.e,w=f.c;if(!E[0]||!w[0])return w[0]?f:new s(E[0]?this:0*l);if(E=E.slice(),l=h-I){for(l>0?(I=h,r=w):(l=-l,r=E),r.reverse();l--;)r.push(0);r.reverse()}for(E.length-w.length<0&&(r=w,w=E,E=r),l=w.length,m=0;l;E[l]%=10)m=(E[--l]=E[l]+w[l]+m)/10|0;for(m&&(E.unshift(m),++I),l=E.length;0===E[--l];)E.pop();return f.c=E,f.e=I,f},M.pow=function(f){var r=this,s=new r.constructor(1),l=s,m=f<0;if(f!==~~f||f<-1e6||f>1e6)throw Error(I+"exponent");for(m&&(f=-f);1&f&&(l=l.times(r)),f>>=1;)r=r.times(r);return m?s.div(l):l},M.round=function(f,r){var s=this.constructor;if(f===L)f=0;else if(f!==~~f||f<-1e6||f>1e6)throw Error(w);return round(new s(this),f,r===L?s.RM:r)},M.sqrt=function(){var f,r,s,l=this.constructor,m=this.s,h=this.e,I=new l(.5);if(!this.c[0])return new l(this);if(m<0)throw Error(E+"No square root");0===(m=Math.sqrt(this+""))||m===1/0?((r=this.c.join("")).length+h&1||(r+="0"),m=Math.sqrt(r),h=((h+1)/2|0)-(h<0||1&h),f=new l((m==1/0?"1e":(m=m.toExponential()).slice(0,m.indexOf("e")+1))+h)):f=new l(m),h=f.e+(l.DP+=4);do s=f,f=I.times(s.plus(this.div(s)));while(s.c.slice(0,h).join("")!==f.c.slice(0,h).join(""));return round(f,l.DP-=4,l.RM)},M.times=M.mul=function(f){var r,s=this.constructor,l=this.c,m=(f=new s(f)).c,h=l.length,E=m.length,I=this.e,w=f.e;if(f.s=this.s==f.s?1:-1,!l[0]||!m[0])return new s(0*f.s);for(f.e=I+w,h<E&&(r=l,l=m,m=r,w=h,h=E,E=w),r=Array(w=h+E);w--;)r[w]=0;for(I=E;I--;){for(E=0,w=h+I;w>I;)E=r[w]+m[I]*l[w-I-1]+E,r[w--]=E%10,E=E/10|0;r[w]=(r[w]+E)%10}
1for(E?++f.e:r.shift(),I=r.length;!r[--I];)r.pop();return f.c=r,f},M.toExponential=function(f){return stringify(this,1,f,f)},M.toFixed=function(f){return stringify(this,2,f,this.e+f)},M.toPrecision=function(f){return stringify(this,3,f,f-1)},M.toString=function(){return stringify(this)},M.valueOf=M.toJSON=function(){return stringify(this,4)},(h=function _Big_(){function Big(f){if(!(this instanceof Big))return f===L?_Big_():new Big(f);f instanceof Big?(this.s=f.s,this.e=f.e,this.c=f.c.slice()):function(f,r){var s,l,m;if(0===r&&1/r<0)r="-0";else if(!W.test(r+=""))throw Error(I+"number");for(f.s="-"==r.charAt(0)?(r=r.slice(1),-1):1,(s=r.indexOf("."))>-1&&(r=r.replace(".","")),(l=r.search(/e/i))>0?(s<0&&(s=l),s+=+r.slice(l+1),r=r.substring(0,l)):s<0&&(s=r.length),m=r.length,l=0;l<m&&"0"==r.charAt(l);)++l;if(l==m)f.c=[f.e=0];else{for(;m>0&&"0"==r.charAt(--m););for(f.e=s-l-1,f.c=[],s=0;l<=m;)f.c[s++]=+r.charAt(l++)}return f}(this,f),this.constructor=Big}return Big.prototype=M,Big.DP=20,Big.RM=1,Big.NE=-7,Big.PE=21,Big.version="5.2.2",Big}()).default=h.Big=h,void 0!==(l=(function(){return h}).call(r,s,r,f))&&(f.exports=l)}(0)},87336:function(f,r,s){var l;!function(m){"use strict";var h,E=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,I=Math.ceil,w=Math.floor,B="[BigNumber Error] ",D=B+"Number primitive has more than 15 significant digits: ",M=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function bitFloor(f){var r=0|f;return f>0||f===r?r:r-1}function coeffToString(f){for(var r,s,l=1,m=f.length,h=f[0]+"";l<m;){for(s=14-(r=f[l++]+"").length;s--;r="0"+r);h+=r}for(m=h.length;48===h.charCodeAt(--m););return h.slice(0,m+1||1)}function compare(f,r){var s,l,m=f.c,h=r.c,E=f.s,I=r.s,w=f.e,B=r.e;if(!E||!I)return null;if(s=m&&!m[0],l=h&&!h[0],s||l)return s?l?0:-I:E;if(E!=I)return E;if(s=E<0,l=w==B,!m||!h)return l?0:!m^s?1:-1;if(!l)return w>B^s?1:-1;for(E=0,I=(w=m.length)<(B=h.length)?w:B;E<I;E++)if(m[E]!=h[E])return m[E]>h[E]^s?1:-1;return w==B?0:w>B^s?1:-1}function intCheck(f,r,s,l){if(f<r||f>s||f!==w(f))throw Error(B+(l||"Argument")+("number"==typeof f?f<r||f>s?" out of range: ":" not an integer: ":" not a primitive number: ")+String(f))}function isOdd(f){var r=f.c.length-1;return bitFloor(f.e/14)==r&&f.c[r]%2!=0}function toExponential(f,r){return(f.length>1?f.charAt(0)+"."+f.slice(1):f)+(r<0?"e":"e+")+r}function toFixedPoint(f,r,s){var l,m;if(r<0){for(m=s+".";++r;m+=s);f=m+f}else if(l=f.length,++r>l){for(m=s,r-=l;--r;m+=s);f+=m}else r<l&&(f=f.slice(0,r)+"."+f.slice(r));return f}(h=function clone(f){var r,s,l,m,h,L,W,V,G,Z=BigNumber.prototype={constructor:BigNumber,toString:null,valueOf:null},X=new BigNumber(1),K=20,$=4,ee=-7,et=21,ef=-1e7,en=1e7,er=!1,ea=1,ei=0,eo={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},es="0123456789abcdefghijklmnopqrstuvwxyz",eu=!0;function BigNumber(f,r){var s,l,m,h,I,B,M,L,W=this;if(!(W instanceof BigNumber))return new BigNumber(f,r);if(null==r){if(f&&!0===f._isBigNumber){W.s=f.s,!f.c||f.e>en?W.c=W.e=null:f.e<ef?W.c=[W.e=0]:(W.e=f.e,W.c=f.c.slice());return}if((B="number"==typeof f)&&0*f==0){if(W.s=1/f<0?(f=-f,-1):1,f===~~f){for(h=0,I=f;I>=10;I/=10,h++);h>en?W.c=W.e=null:(W.e=h,W.c=[f]);return}L=String(f)}else{if(!E.test(L=String(f)))return G(W,L,B);W.s=45==L.charCodeAt(0)?(L=L.slice(1),-1):1}(h=L.indexOf("."))>-1&&(L=L.replace(".","")),(I=L.search(/e/i))>0?(h<0&&(h=I),h+=+L.slice(I+1),L=L.substring(0,I)):h<0&&(h=L.length)}else{if(intCheck(r,2,es.length,"Base"),10==r&&eu)return round(W=new BigNumber(f),K+W.e+1,$);if(L=String(f),B="number"==typeof f){if(0*f!=0)return G(W,L,B,r);if(W.s=1/f<0?(L=L.slice(1),-1):1,BigNumber.DEBUG&&L.replace(/^0\.0*|\./,"").length>15)throw Error(D+f)}else W.s=45===L.charCodeAt(0)?(L=L.slice(1),-1):1;for(s=es.slice(0,r),h=I=0,M=L.length;I<M;I++)if(0>s.indexOf(l=L.charAt(I))){if("."==l){if(I>h){h=M;continue}}else if(!m&&(L==L.toUpperCase()&&(L=L.toLowerCase())||L==L.toLowerCase()&&(L=L.toUpperCase()))){m=!0,I=-1,h=0;continue}return G(W,String(f),B,r)}B=!1,(h=(L=V(L,r,10,W.s)).indexOf("."))>-1?L=L.replace(".",""):h=L.length}for(I=0;48===L.charCodeAt(I);I++);for(M=L.length;48===L.charCodeAt(--M););if(L=L.slice(I,++M)){if(M-=I,B&&BigNumber.DEBUG&&M>15&&(f>9007199254740991||f!==w(f)))throw Error(D+W.s*f);if((h=h-I-1)>en)W.c=W.e=null;else if(h<ef)W.c=[W.e=0];else{if(W.e=h,W.c=[],I=(h+1)%14,h<0&&(I+=14),I<M){for(I&&W.c.push(+L.slice(0,I)),M-=14;I<M;)W.c.push(+L.slice(I,I+=14));I=14-(L=L.slice(I)).length}else I-=M;for(;I--;L+="0");W.c.push(+L)}}else W.c=[W.e=0]}function format(f,r,s,l){var m,h,E,I,w;if(null==s?s=$:intCheck(s,0,8),!f.c)return f.toString();if(m=f.c[0],E=f.e,null==r)w=coeffToString(f.c),w=1==l||2==l&&(E<=ee||E>=et)?toExponential(w,E):toFixedPoint(w,E,"0");else if(h=(f=round(new BigNumber(f),r,s)).e,I=(w=coeffToString(f.c)).length,1==l||2==l&&(r<=h||h<=ee)){for(;I<r;w+="0",I++);w=toExponential(w,h)}else if(r-=E,w=toFixedPoint(w,h,"0"),h+1>I){if(--r>0)for(w+=".";r--;w+="0");}else if((r+=h-I)>0)for(h+1==I&&(w+=".");r--;w+="0");return f.s<0&&m?"-"+w:w}function maxOrMin(f,r){for(var s,l,m=1,h=new BigNumber(f[0]);m<f.length;m++)(l=new BigNumber(f[m])).s&&(s=compare(h,l))!==r&&(0!==s||h.s!==r)||(h=l);return h}function normalise(f,r,s){for(var l=1,m=r.length;!r[--m];r.pop());for(m=r[0];m>=10;m/=10,l++);return(s=l+14*s-1)>en?f.c=f.e=null:s<ef?f.c=[f.e=0]:(f.e=s,f.c=r),f}function round(f,r,s,l){var m,h,E,B,D,L,W,V=f.c;if(V){e:{for(m=1,B=V[0];B>=10;B/=10,m++);if((h=r-m)<0)h+=14,E=r,W=w((D=V[L=0])/M[m-E-1]%10);else if((L=I((h+1)/14))>=V.length){if(l){for(;V.length<=L;V.push(0));D=W=0,m=1,h%=14,E=h-14+1}else break e}else{for(m=1,D=B=V[L];B>=10;B/=10,m++);h%=14,W=(E=h-14+m)<0?0:w(D/M[m-E-1]%10)}if(l=l||r<0||null!=V[L+1]||(E<0?D:D%M[m-E-1]),l=s<4?(W||l)&&(0==s||s==(f.s<0?3:2)):W>5||5==W&&(4==s||l||6==s&&(h>0?E>0?D/M[m-E]:0:V[L-1])%10&1||s==(f.s<0?8:7)),r<1||!V[0])return V.length=0,l?(r-=f.e+1,V[0]=M[(14-r%14)%14],f.e=-r||0):V[0]=f.e=0,f;if(0==h?(V.length=L,B=1,L--):(V.length=L+1,B=M[14-h],V[L]=E>0?w(D/M[m-E]%M[E])*B:0),l)for(;;){if(0==L){for(h=1,E=V[0];E>=10;E/=10,h++);for(E=V[0]+=B,B=1;E>=10;E/=10,B++);h!=B&&(f.e++,1e14==V[0]&&(V[0]=1));break}if(V[L]+=B,1e14!=V[L])break;V[L--]=0,B=1}for(h=V.length;0===V[--h];V.pop());}f.e>en?f.c=f.e=null:f.e<ef&&(f.c=[f.e=0])}return f}function valueOf(f){var r,s=f.e;return null===s?f.toString():(r=coeffToString(f.c),r=s<=ee||s>
1=et?toExponential(r,s):toFixedPoint(r,s,"0"),f.s<0?"-"+r:r)}return BigNumber.clone=clone,BigNumber.ROUND_UP=0,BigNumber.ROUND_DOWN=1,BigNumber.ROUND_CEIL=2,BigNumber.ROUND_FLOOR=3,BigNumber.ROUND_HALF_UP=4,BigNumber.ROUND_HALF_DOWN=5,BigNumber.ROUND_HALF_EVEN=6,BigNumber.ROUND_HALF_CEIL=7,BigNumber.ROUND_HALF_FLOOR=8,BigNumber.EUCLID=9,BigNumber.config=BigNumber.set=function(f){var r,s;if(null!=f){if("object"==typeof f){if(f.hasOwnProperty(r="DECIMAL_PLACES")&&(intCheck(s=f[r],0,1e9,r),K=s),f.hasOwnProperty(r="ROUNDING_MODE")&&(intCheck(s=f[r],0,8,r),$=s),f.hasOwnProperty(r="EXPONENTIAL_AT")&&((s=f[r])&&s.pop?(intCheck(s[0],-1e9,0,r),intCheck(s[1],0,1e9,r),ee=s[0],et=s[1]):(intCheck(s,-1e9,1e9,r),ee=-(et=s<0?-s:s))),f.hasOwnProperty(r="RANGE")){if((s=f[r])&&s.pop)intCheck(s[0],-1e9,-1,r),intCheck(s[1],1,1e9,r),ef=s[0],en=s[1];else if(intCheck(s,-1e9,1e9,r),s)ef=-(en=s<0?-s:s);else throw Error(B+r+" cannot be zero: "+s)}if(f.hasOwnProperty(r="CRYPTO")){if(!!(s=f[r])===s){if(s){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))er=s;else throw er=!s,Error(B+"crypto unavailable")}else er=s}else throw Error(B+r+" not true or false: "+s)}if(f.hasOwnProperty(r="MODULO_MODE")&&(intCheck(s=f[r],0,9,r),ea=s),f.hasOwnProperty(r="POW_PRECISION")&&(intCheck(s=f[r],0,1e9,r),ei=s),f.hasOwnProperty(r="FORMAT")){if("object"==typeof(s=f[r]))eo=s;else throw Error(B+r+" not an object: "+s)}if(f.hasOwnProperty(r="ALPHABET")){if("string"!=typeof(s=f[r])||/^.?$|[+\-.\s]|(.).*\1/.test(s))throw Error(B+r+" invalid: "+s);eu="0123456789"==s.slice(0,10),es=s}}else throw Error(B+"Object expected: "+f)}return{DECIMAL_PLACES:K,ROUNDING_MODE:$,EXPONENTIAL_AT:[ee,et],RANGE:[ef,en],CRYPTO:er,MODULO_MODE:ea,POW_PRECISION:ei,FORMAT:eo,ALPHABET:es}},BigNumber.isBigNumber=function(f){if(!f||!0!==f._isBigNumber)return!1;if(!BigNumber.DEBUG)return!0;var r,s,l=f.c,m=f.e,h=f.s;e:if("[object Array]"==({}).toString.call(l)){if((1===h||-1===h)&&m>=-1e9&&m<=1e9&&m===w(m)){if(0===l[0]){if(0===m&&1===l.length)return!0;break e}if((r=(m+1)%14)<1&&(r+=14),String(l[0]).length==r){for(r=0;r<l.length;r++)if((s=l[r])<0||s>=1e14||s!==w(s))break e;if(0!==s)return!0}}}else if(null===l&&null===m&&(null===h||1===h||-1===h))return!0;throw Error(B+"Invalid BigNumber: "+f)},BigNumber.maximum=BigNumber.max=function(){return maxOrMin(arguments,-1)},BigNumber.minimum=BigNumber.min=function(){return maxOrMin(arguments,1)},BigNumber.random=(r=9007199254740992*Math.random()&2097151?function(){return w(9007199254740992*Math.random())}:function(){return(1073741824*Math.random()|0)*8388608+(8388608*Math.random()|0)},function(f){var s,l,m,h,E,D=0,L=[],W=new BigNumber(X);if(null==f?f=K:intCheck(f,0,1e9),h=I(f/14),er){if(crypto.getRandomValues){for(s=crypto.getRandomValues(new Uint32Array(h*=2));D<h;)(E=131072*s[D]+(s[D+1]>>>11))>=9e15?(l=crypto.getRandomValues(new Uint32Array(2)),s[D]=l[0],s[D+1]=l[1]):(L.push(E%1e14),D+=2);D=h/2}else if(crypto.randomBytes){for(s=crypto.randomBytes(h*=7);D<h;)(E=(31&s[D])*281474976710656+1099511627776*s[D+1]+4294967296*s[D+2]+16777216*s[D+3]+(s[D+4]<<16)+(s[D+5]<<8)+s[D+6])>=9e15?crypto.randomBytes(7).copy(s,D):(L.push(E%1e14),D+=7);D=h/7}else throw er=!1,Error(B+"crypto unavailable")}if(!er)for(;D<h;)(E=r())<9e15&&(L[D++]=E%1e14);for(h=L[--D],f%=14,h&&f&&(E=M[14-f],L[D]=w(h/E)*E);0===L[D];L.pop(),D--);if(D<0)L=[m=0];else{for(m=-1;0===L[0];L.splice(0,1),m-=14);for(D=1,E=L[0];E>=10;E/=10,D++);D<14&&(m-=14-D)}return W.e=m,W.c=L,W}),BigNumber.sum=function(){for(var f=1,r=arguments,s=new BigNumber(r[0]);f<r.length;)s=s.plus(r[f++]);return s},V=function(){var f="0123456789";function toBaseOut(f,r,s,l){for(var m,h,E=[0],I=0,w=f.length;I<w;){for(h=E.length;h--;E[h]*=r);for(E[0]+=l.indexOf(f.charAt(I++)),m=0;m<E.length;m++)E[m]>
1s-1&&(null==E[m+1]&&(E[m+1]=0),E[m+1]+=E[m]/s|0,E[m]%=s)}return E.reverse()}return function(r,s,l,m,h){var E,I,w,B,D,M,L,V,G=r.indexOf("."),Z=K,X=$;for(G>=0&&(B=ei,ei=0,r=r.replace(".",""),M=(V=new BigNumber(s)).pow(r.length-G),ei=B,V.c=toBaseOut(toFixedPoint(coeffToString(M.c),M.e,"0"),10,l,f),V.e=V.c.length),w=B=(L=toBaseOut(r,s,l,h?(E=es,f):(E=f,es))).length;0==L[--B];L.pop());if(!L[0])return E.charAt(0);if(G<0?--w:(M.c=L,M.e=w,M.s=m,L=(M=W(M,V,Z,X,l)).c,D=M.r,w=M.e),G=L[I=w+Z+1],B=l/2,D=D||I<0||null!=L[I+1],D=X<4?(null!=G||D)&&(0==X||X==(M.s<0?3:2)):G>B||G==B&&(4==X||D||6==X&&1&L[I-1]||X==(M.s<0?8:7)),I<1||!L[0])r=D?toFixedPoint(E.charAt(1),-Z,E.charAt(0)):E.charAt(0);else{if(L.length=I,D)for(--l;++L[--I]>l;)L[I]=0,I||(++w,L=[1].concat(L));for(B=L.length;!L[--B];);for(G=0,r="";G<=B;r+=E.charAt(L[G++]));r=toFixedPoint(r,w,E.charAt(0))}return r}}(),W=function(){function multiply(f,r,s){var l,m,h,E,I=0,w=f.length,B=r%1e7,D=r/1e7|0;for(f=f.slice();w--;)l=D*(h=f[w]%1e7)+(E=f[w]/1e7|0)*B,I=((m=B*h+l%1e7*1e7+I)/s|0)+(l/1e7|0)+D*E,f[w]=m%s;return I&&(f=[I].concat(f)),f}function compare(f,r,s,l){var m,h;if(s!=l)h=s>l?1:-1;else for(m=h=0;m<s;m++)if(f[m]!=r[m]){h=f[m]>r[m]?1:-1;break}return h}function subtract(f,r,s,l){for(var m=0;s--;)f[s]-=m,m=f[s]<r[s]?1:0,f[s]=m*l+f[s]-r[s];for(;!f[0]&&f.length>1;f.splice(0,1));}return function(f,r,s,l,m){var h,E,I,B,D,M,L,W,V,G,Z,X,K,$,ee,et,ef,en=f.s==r.s?1:-1,er=f.c,ea=r.c;if(!er||!er[0]||!ea||!ea[0])return new BigNumber(f.s&&r.s&&(er?!ea||er[0]!=ea[0]:ea)?er&&0==er[0]||!ea?0*en:en/0:NaN);for(V=(W=new BigNumber(en)).c=[],en=s+(E=f.e-r.e)+1,m||(m=1e14,E=bitFloor(f.e/14)-bitFloor(r.e/14),en=en/14|0),I=0;ea[I]==(er[I]||0);I++);if(ea[I]>(er[I]||0)&&E--,en<0)V.push(1),B=!0;else{for($=er.length,et=ea.length,I=0,en+=2,(D=w(m/(ea[0]+1)))>1&&(ea=multiply(ea,D,m),er=multiply(er,D,m),et=ea.length,$=er.length),K=et,Z=(G=er.slice(0,et)).length;Z<et;G[Z++]=0);ef=[0].concat(ef=ea.slice()),ee=ea[0],ea[1]>=m/2&&ee++;do{if(D=0,(h=compare(ea,G,et,Z))<0){if(X=G[0],et!=Z&&(X=X*m+(G[1]||0)),(D=w(X/ee))>1)for(D>=m&&(D=m-1),L=(M=multiply(ea,D,m)).length,Z=G.length;1==compare(M,G,L,Z);)D--,subtract(M,et<L?ef:ea,L,m),L=M.length,h=1;else 0==D&&(h=D=1),L=(M=ea.slice()).length;if(L<Z&&(M=[0].concat(M)),subtract(G,M,Z,m),Z=G.length,-1==h)for(;1>compare(ea,G,et,Z);)D++,subtract(G,et<Z?ef:ea,Z,m),Z=G.length}else 0===h&&(D++,G=[0]);V[I++]=D,G[0]?G[Z++]=er[K]||0:(G=[er[K]],Z=1)}while((K++<$||null!=G[0])&&en--);B=null!=G[0],V[0]||V.splice(0,1)}if(1e14==m){for(I=1,en=V[0];en>=10;en/=10,I++);round(W,s+(W.e=I+14*E-1)+1,l,B)}else W.e=E,W.r=+B;return W}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,l=/^([^.]+)\.$/,m=/^\.([^.]+)$/,h=/^-?(Infinity|NaN)$/,L=/^\s*\+(?=[\w.])|^\s+|\s+$/g,G=function(f,r,E,I){var w,D=E?r:r.replace(L,"");if(h.test(D))f.s=isNaN(D)?null:D<0?-1:1;else{if(!E&&(D=D.replace(s,function(f,r,s){return w="x"==(s=s.toLowerCase())?16:"b"==s?2:8,I&&I!=w?f:r}),I&&(w=I,D=D.replace(l,"$1").replace(m,"0.$1")),r!=D))return new BigNumber(D,w);if(BigNumber.DEBUG)throw Error(B+"Not a"+(I?" base "+I:"")+" number: "+r);f.s=null}f.c=f.e=null},Z.absoluteValue=Z.abs=function(){var f=new BigNumber(this);return f.s<0&&(f.s=1),f},Z.comparedTo=function(f,r){return compare(this,new BigNumber(f,r))},Z.decimalPlaces=Z.dp=function(f,r){var s,l,m;if(null!=f)return intCheck(f,0,1e9),null==r?r=$:intCheck(r,0,8),round(new BigNumber(this),f+this.e+1,r);if(!(s=this.c))return null;if(l=((m=s.length-1)-bitFloor(this.e/14))*14,m=s[m])for(;m%10==0;m/=10,l--);return l<0&&(l=0),l},Z.dividedBy=Z.div=function(f,r){return W(this,new BigNumber(f,r),K,$)},Z.dividedToIntegerBy=Z.idiv=function(f,r){return W(this,new BigNumber(f,r),0,1)},Z.exponentiatedBy=Z.pow=function(f,r){var s,l,m,h,E,D,M,L,W,V=this;if((f=new BigNumber(f)).c&&!f.isInteger())throw Error(B+"Exponent not an integer: "+valueOf(f));if(null!=r&&(r=new BigNumber(r)),D=f.e>14,!V.c||!V.c[0]||1==V.c[0]&&!V.e&&1==V.c.length||!f.c||!f.c[0])return W=new BigNumber(Math.pow(+valueOf(V),D?f.s*(2-isOdd(f)):+valueOf(f))),r?W.mod(r):W;if(M=f.s<0,r){if(r.c?!r.c[0]:!r.s)return new BigNumber(NaN);(l=!M&&V.isInteger()&&r.isInteger())&&(V=V.mod(r))}else{if(f.e>9&&(V.e>0||V.e<-1||(0==V.e?V.c[0]>1||D&&V.c[1]>=24e7:V.c[0]<8e13||D&&V.c[0]<=9999975e7)))return h=V.s<0&&isOdd(f)?-0:0,V.e>-1&&(h=1/h),new BigNumber(M?1/h:h);ei&&(h=I(ei/14+2))}for(D?(s=new BigNumber(.5),M&&(f.s=1),L=isOdd(f)):L=(m=Math.abs(+valueOf(f)))%2,W=new BigNumber(X);;){if(L){if(!(W=W.times(V)).c)break;h?W.c.length>h&&(W.c.length=h):l&&(W=W.mod(r))}if(m){if(0===(m=w(m/2)))break;L=m%2}else if(round(f=f.times(s),f.e+1,1),f.e>14)L=isOdd(f);else{if(0==(m=+valueOf(f)))break;L=m%2}V=V.times(V),h?V.c&&V.c.length>h&&(V.c.length=h):l&&(V=V.mod(r))}
1return l?W:(M&&(W=X.div(W)),r?W.mod(r):h?round(W,ei,$,E):W)},Z.integerValue=function(f){var r=new BigNumber(this);return null==f?f=$:intCheck(f,0,8),round(r,r.e+1,f)},Z.isEqualTo=Z.eq=function(f,r){return 0===compare(this,new BigNumber(f,r))},Z.isFinite=function(){return!!this.c},Z.isGreaterThan=Z.gt=function(f,r){return compare(this,new BigNumber(f,r))>0},Z.isGreaterThanOrEqualTo=Z.gte=function(f,r){return 1===(r=compare(this,new BigNumber(f,r)))||0===r},Z.isInteger=function(){return!!this.c&&bitFloor(this.e/14)>this.c.length-2},Z.isLessThan=Z.lt=function(f,r){return 0>compare(this,new BigNumber(f,r))},Z.isLessThanOrEqualTo=Z.lte=function(f,r){return -1===(r=compare(this,new BigNumber(f,r)))||0===r},Z.isNaN=function(){return!this.s},Z.isNegative=function(){return this.s<0},Z.isPositive=function(){return this.s>0},Z.isZero=function(){return!!this.c&&0==this.c[0]},Z.minus=function(f,r){var s,l,m,h,E=this.s;if(r=(f=new BigNumber(f,r)).s,!E||!r)return new BigNumber(NaN);if(E!=r)return f.s=-r,this.plus(f);var I=this.e/14,w=f.e/14,B=this.c,D=f.c;if(!I||!w){if(!B||!D)return B?(f.s=-r,f):new BigNumber(D?this:NaN);if(!B[0]||!D[0])return D[0]?(f.s=-r,f):new BigNumber(B[0]?this:3==$?-0:0)}if(I=bitFloor(I),w=bitFloor(w),B=B.slice(),E=I-w){for((h=E<0)?(E=-E,m=B):(w=I,m=D),m.reverse(),r=E;r--;m.push(0));m.reverse()}else for(l=(h=(E=B.length)<(r=D.length))?E:r,E=r=0;r<l;r++)if(B[r]!=D[r]){h=B[r]<D[r];break}if(h&&(m=B,B=D,D=m,f.s=-f.s),(r=(l=D.length)-(s=B.length))>0)for(;r--;B[s++]=0);for(r=1e14-1;l>E;){if(B[--l]<D[l]){for(s=l;s&&!B[--s];B[s]=r);--B[s],B[l]+=1e14}B[l]-=D[l]}for(;0==B[0];B.splice(0,1),--w);return B[0]?normalise(f,B,w):(f.s=3==$?-1:1,f.c=[f.e=0],f)},Z.modulo=Z.mod=function(f,r){var s,l;return(f=new BigNumber(f,r),this.c&&f.s&&(!f.c||f.c[0]))?f.c&&(!this.c||this.c[0])?(9==ea?(l=f.s,f.s=1,s=W(this,f,0,3),f.s=l,s.s*=l):s=W(this,f,0,ea),(f=this.minus(s.times(f))).c[0]||1!=ea||(f.s=this.s),f):new BigNumber(this):new BigNumber(NaN)},Z.multipliedBy=Z.times=function(f,r){var s,l,m,h,E,I,w,B,D,M,L,W,V,G=this.c,Z=(f=new BigNumber(f,r)).c;if(!G||!Z||!G[0]||!Z[0])return this.s&&f.s&&(!G||G[0]||Z)&&(!Z||Z[0]||G)?(f.s*=this.s,G&&Z?(f.c=[0],f.e=0):f.c=f.e=null):f.c=f.e=f.s=null,f;for(l=bitFloor(this.e/14)+bitFloor(f.e/14),f.s*=this.s,(w=G.length)<(M=Z.length)&&(V=G,G=Z,Z=V,m=w,w=M,M=m),m=w+M,V=[];m--;V.push(0));for(m=M;--m>=0;){for(s=0,L=Z[m]%1e7,W=Z[m]/1e7|0,h=m+(E=w);h>m;)I=W*(B=G[--E]%1e7)+(D=G[E]/1e7|0)*L,s=((B=L*B+I%1e7*1e7+V[h]+s)/1e14|0)+(I/1e7|0)+W*D,V[h--]=B%1e14;V[h]=s}return s?++l:V.splice(0,1),normalise(f,V,l)},Z.negated=function(){var f=new BigNumber(this);return f.s=-f.s||null,f},Z.plus=function(f,r){var s,l=this.s;if(r=(f=new BigNumber(f,r)).s,!l||!r)return new BigNumber(NaN);if(l!=r)return f.s=-r,this.minus(f);var m=this.e/14,h=f.e/14,E=this.c,I=f.c;if(!m||!h){if(!E||!I)return new BigNumber(l/0);if(!E[0]||!I[0])return I[0]?f:new BigNumber(E[0]?this:0*l)}if(m=bitFloor(m),h=bitFloor(h),E=E.slice(),l=m-h){for(l>0?(h=m,s=I):(l=-l,s=E),s.reverse();l--;s.push(0));s.reverse()}for((l=E.length)-(r=I.length)<0&&(s=I,I=E,E=s,r=l),l=0;r;)l=(E[--r]=E[r]+I[r]+l)/1e14|0,E[r]=1e14===E[r]?0:E[r]%1e14;return l&&(E=[l].concat(E),++h),normalise(f,E,h)},Z.precision=Z.sd=function(f,r){var s,l,m;if(null!=f&&!!f!==f)return intCheck(f,1,1e9),null==r?r=$:intCheck(r,0,8),round(new BigNumber(this),f,r);if(!(s=this.c))return null;if(l=14*(m=s.length-1)+1,m=s[m]){for(;m%10==0;m/=10,l--);for(m=s[0];m>=10;m/=10,l++);}return f&&this.e+1>l&&(l=this.e+1),l},Z.shiftedBy=function(f){return intCheck(f,-9007199254740991,9007199254740991),this.times("1e"+f)},Z.squareRoot=Z.sqrt=function(){var f,r,s,l,m,h=this.c,E=this.s,I=this.e,w=K+4,B=new BigNumber("0.5");if(1!==E||!h||!h[0])return new BigNumber(!E||E<0&&(!h||h[0])?NaN:h?this:1/0);if(0==(E=Math.sqrt(+valueOf(this)))||E==1/0?(((r=coeffToString(h)).length+I)%2==0&&(r+="0"),E=Math.sqrt(+r),I=bitFloor((I+1)/2)-(I<0||I%2),r=E==1/0?"5e"+I:(r=E.toExponential()).slice(0,r.indexOf("e")+1)+I,s=new BigNumber(r)):s=new BigNumber(E+""),s.c[0]){for((E=(I=s.e)+w)<3&&(E=0);;)if(m=s,s=B.times(m.plus(W(this,m,w,1))),coeffToString(m.c).slice(0,E)===(r=coeffToString(s.c)).slice(0,E)){if(s.e<I&&--E,"9999"!=(r=r.slice(E-3,E+1))&&(l||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(round(s,s.e+K+2,1),f=!s.times(s).eq(this));break}if(!l&&(round(m,m.e+K+2,0),m.times(m).eq(this))){s=m;break}w+=4,E+=4,l=1}}return round(s,s.e+K+1,$,f)},Z.toExponential=function(f,r){return null!=f&&(intCheck(f,0,1e9),f++),format(this,f,r,1)},Z.toFixed=function(f,r){return null!=f&&(intCheck(f,0,1e9),f=f+this.e+1),format(this,f,r)},Z.toFormat=function(f,r,s){var l;if(null==s)null!=f&&r&&"object"==typeof r?(s=r,r=null):f&&"object"==typeof f?(s=f,f=r=null):s=eo;else if("object"!=typeof s)throw Error(B+"Argument not an object: "+s);if(l=this.toFixed(f,r),this.c){var m,h=l.split("."),E=+s.groupSize,I=+s.secondaryGroupSize,w=s.groupSeparator||"",D=h[0],M=h[1],L=this.s<0,W=L?D.slice(1):D,V=W.length;if(I&&(m=E,E=I,I=m,V-=m),E>0&&V>0){for(m=V%E||E,D=W.substr(0,m);m<V;m+=E)D+=w+W.substr(m,E);I>0&&(D+=w+W.slice(m)),L&&(D="-"+D)}l=M?D+(s.decimalSeparator||"")+((I=+s.fractionGroupSize)?M.replace(RegExp("\\d{"+I+"}\\B","g"),"$&"+(s.fractionGroupSeparator||"")):M):D}return(s.prefix||"")+l+(s.suffix||"")},Z.toFraction=function(f){var r,s,l,m,h,E,I,w,D,L,V,G,Z=this.c;if(null!=f&&(!(I=new BigNumber(f)).isInteger()&&(I.c||1!==I.s)||I.lt(X)))throw Error(B+"Argument "+(I.isInteger()?"out of range: ":"not an integer: ")+valueOf(I));if(!Z)return new BigNumber(this);for(r=new BigNumber(X),D=s=new BigNumber(X),l=w=new BigNumber(X),G=coeffToString(Z),h=r.e=G.length-this.e-1,r.c[0]=M[(E=h%14)<0?14+E:E],f=!f||I.comparedTo(r)>0?h>0?r:D:I,E=en,en=1/0,I=new BigNumber(G),w.c[0]=0;L=W(I,r,0,1),1!=(m=s.plus(L.times(l))).comparedTo(f);)s=l,l=m,D=w.plus(L.times(m=D)),w=m,r=I.minus(L.times(m=r)),I=m;return m=W(f.minus(s),l,0,1),w=w.plus(m.times(D)),s=s.plus(m.times(l)),w.s=D.s=this.s,h*=2,V=1>W(D,l,h,$).minus(this).abs().comparedTo(W(w,s,h,$).minus(this).abs())?[D,l]:[w,s],en=E,V},Z.toNumber=function(){return+valueOf(this)},Z.toPrecision=function(f,r){return null!=f&&intCheck(f,1,1e9),format(this,f,r,2)},Z.toString=function(f){var r,s=this,l=s.s,m=s.e;return null===m?l?(r="Infinity",l<0&&(r="-"+r)):r="NaN":(null==f?r=m<=ee||m>=et?toExponential(coeffToString(s.c),m):toFixedPoint(coeffToString(s.c),m,"0"):10===f&&eu?r=toFixedPoint(coeffToString((s=round(new BigNumber(s),K+m+1,$)).c),s.e,"0"):(intCheck(f,2,es.length,"Base"),r=V(toFixedPoint(coeffToString(s.c),m,"0"),10,f,l,!0)),l<0&&s.c[0]&&(r="-"+r)),r},Z.valueOf=Z.toJSON=function(){return valueOf(this)},Z._isBigNumber=!0,null!=f&&BigNumber.set(f),BigNumber}()).default=h.BigNumber=h,void 0!==(l=(function(){return h}).call(r,s,r,f))&&(f.exports=l)}(0)},28518:function(f){f.exports=function(){"use strict";var f=Math.clz32,r=Math.abs,s=Math.max,l=Math.floor;let o=class o extends Array{constructor(f,r){if(super(f),this.sign=r,f>o.__kMaxLength)throw RangeError("Maximum BigInt size exceeded")}static BigInt(f){var r=Number.isFinite;if("number"==typeof f){if(0===f)return o.__zero();if(o.__isOneDigitInt(f))return 0>f?o.__oneDigit(-f,!0):o.__oneDigit(f,!1);if(!r(f)||l(f)!==f)throw RangeError("The number "+f+" cannot be converted to BigInt because it is not an integer");return o.__fromDouble(f)}if("string"==typeof f){let r=o.__fromString(f);if(null===r)throw SyntaxError("Cannot convert "+f+" to a BigInt");return r}
1if("boolean"==typeof f)return!0===f?o.__oneDigit(1,!1):o.__zero();if("object"==typeof f){if(f.constructor===o)return f;let r=o.__toPrimitive(f);return o.BigInt(r)}throw TypeError("Cannot convert "+f+" to a BigInt")}toDebugString(){let f=["BigInt["];for(let r of this)f.push((r?(r>>>0).toString(16):r)+", ");return f.push("]"),f.join("")}toString(f=10){if(2>f||36<f)throw RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(f&f-1)?o.__toStringBasePowerOfTwo(this,f):o.__toStringGeneric(this,f,!1)}static toNumber(f){let r=f.length;if(0===r)return 0;if(1===r){let r=f.__unsignedDigit(0);return f.sign?-r:r}let s=f.__digit(r-1),l=o.__clz30(s),m=30*r-l;if(1024<m)return f.sign?-1/0:1/0;let h=m-1,E=s,I=r-1,w=l+3,B=32===w?0:E<<w;B>>>=12;let D=w-12,M=12<=w?0:E<<20+w,L=20+w;for(0<D&&0<I&&(I--,B|=(E=f.__digit(I))>>>30-D,M=E<<D+2,L=D+2);0<L&&0<I;)I--,E=f.__digit(I),M|=30<=L?E<<L-30:E>>>30-L,L-=30;let W=o.__decideRounding(f,L,I,E);if((1===W||0===W&&1==(1&M))&&0==(M=M+1>>>0)&&0!=++B>>>20&&(B=0,1023<++h))return f.sign?-1/0:1/0;let V=f.sign?-2147483648:0;return h=h+1023<<20,o.__kBitConversionInts[1]=V|h|B,o.__kBitConversionInts[0]=M,o.__kBitConversionDouble[0]}static unaryMinus(f){if(0===f.length)return f;let r=f.__copy();return r.sign=!f.sign,r}static bitwiseNot(f){return f.sign?o.__absoluteSubOne(f).__trim():o.__absoluteAddOne(f,!0)}static exponentiate(f,r){if(r.sign)throw RangeError("Exponent must be positive");if(0===r.length)return o.__oneDigit(1,!1);if(0===f.length)return f;if(1===f.length&&1===f.__digit(0))return f.sign&&0==(1&r.__digit(0))?o.unaryMinus(f):f;if(1<r.length)throw RangeError("BigInt too big");let s=r.__unsignedDigit(0);if(1===s)return f;if(s>=o.__kMaxLengthBits)throw RangeError("BigInt too big");if(1===f.length&&2===f.__digit(0)){let r=1+(0|s/30),l=f.sign&&0!=(1&s),m=new o(r,l);m.__initializeDigits();let h=1<<s%30;return m.__setDigit(r-1,h),m}let l=null,m=f;for(0!=(1&s)&&(l=f),s>>=1;0!==s;s>>=1)m=o.multiply(m,m),0!=(1&s)&&(l=null===l?m:o.multiply(l,m));return l}static multiply(f,r){if(0===f.length)return f;if(0===r.length)return r;let s=f.length+r.length;30<=f.__clzmsd()+r.__clzmsd()&&s--;let l=new o(s,f.sign!==r.sign);l.__initializeDigits();for(let s=0;s<f.length;s++)o.__multiplyAccumulate(r,f.__digit(s),l,s);return l.__trim()}static divide(f,r){let s;if(0===r.length)throw RangeError("Division by zero");if(0>o.__absoluteCompare(f,r))return o.__zero();let l=f.sign!==r.sign,m=r.__unsignedDigit(0);if(1===r.length&&32767>=m){if(1===m)return l===f.sign?f:o.unaryMinus(f);s=o.__absoluteDivSmall(f,m,null)}else s=o.__absoluteDivLarge(f,r,!0,!1);return s.sign=l,s.__trim()}static remainder(f,r){if(0===r.length)throw RangeError("Division by zero");if(0>o.__absoluteCompare(f,r))return f;let s=r.__unsignedDigit(0);if(1===r.length&&32767>=s){if(1===s)return o.__zero();let r=o.__absoluteModSmall(f,s);return 0===r?o.__zero():o.__oneDigit(r,f.sign)}let l=o.__absoluteDivLarge(f,r,!1,!0);return l.sign=f.sign,l.__trim()}static add(f,r){let s=f.sign;return s===r.sign?o.__absoluteAdd(f,r,s):0<=o.__absoluteCompare(f,r)?o.__absoluteSub(f,r,s):o.__absoluteSub(r,f,!s)}static subtract(f,r){let s=f.sign;return s===r.sign?0<=o.__absoluteCompare(f,r)?o.__absoluteSub(f,r,s):o.__absoluteSub(r,f,!s):o.__absoluteAdd(f,r,s)}static leftShift(f,r){return 0===r.length||0===f.length?f:r.sign?o.__rightShiftByAbsolute(f,r):o.__leftShiftByAbsolute(f,r)}static signedRightShift(f,r){return 0===r.length||0===f.length?f:r.sign?o.__leftShiftByAbsolute(f,r):o.__rightShiftByAbsolute(f,r)}static unsignedRightShift(){throw TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(f,r){return 0>o.__compareToBigInt(f,r)}static lessThanOrEqual(f,r){return 0>=o.__compareToBigInt(f,r)}static greaterThan(f,r){return 0<o.__compareToBigInt(f,r)}static greaterThanOrEqual(f,r){return 0<=o.__compareToBigInt(f,r)}static equal(f,r){if(f.sign!==r.sign||f.length!==r.length)return!1;for(let s=0;s<f.length;s++)if(f.__digit(s)!==r.__digit(s))return!1;return!0}static notEqual(f,r){return!o.equal(f,r)}static bitwiseAnd(f,r){if(!f.sign&&!r.sign)return o.__absoluteAnd(f,r).__trim();if(f.sign&&r.sign){let l=s(f.length,r.length)+1,m=o.__absoluteSubOne(f,l),h=o.__absoluteSubOne(r);return m=o.__absoluteOr(m,h,m),o.__absoluteAddOne(m,!0,m).__trim()}return f.sign&&([f,r]=[r,f]),o.__absoluteAndNot(f,o.__absoluteSubOne(r)).__trim()}static bitwiseXor(f,r){if(!f.sign&&!r.sign)return o.__absoluteXor(f,r).__trim();if(f.sign&&r.sign){let l=s(f.length,r.length),m=o.__absoluteSubOne(f,l),h=o.__absoluteSubOne(r);return o.__absoluteXor(m,h,m).__trim()}let l=s(f.length,r.length)+1;f.sign&&([f,r]=[r,f]);let m=o.__absoluteSubOne(r,l);return m=o.__absoluteXor(m,f,m),o.__absoluteAddOne(m,!0,m).__trim()}static bitwiseOr(f,r){let l=s(f.length,r.length);if(!f.sign&&!r.sign)return o.__absoluteOr(f,r).__trim();if(f.sign&&r.sign){let s=o.__absoluteSubOne(f,l),m=o.__absoluteSubOne(r);return s=o.__absoluteAnd(s,m,s),o.__absoluteAddOne(s,!0,s).__trim()}f.sign&&([f,r]=[r,f]);let m=o.__absoluteSubOne(r,l);return m=o.__absoluteAndNot(m,f,m),o.__absoluteAddOne(m,!0,m).__trim()}static asIntN(f,r){if(0===r.length)return r;if(0>
1(f=l(f)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===f)return o.__zero();if(f>=o.__kMaxLengthBits)return r;let s=0|(f+29)/30;if(r.length<s)return r;let m=r.__unsignedDigit(s-1),h=1<<(f-1)%30;if(r.length===s&&m<h)return r;if((m&h)!==h)return o.__truncateToNBits(f,r);if(!r.sign)return o.__truncateAndSubFromPowerOfTwo(f,r,!0);if(0==(m&h-1)){for(let l=s-2;0<=l;l--)if(0!==r.__digit(l))return o.__truncateAndSubFromPowerOfTwo(f,r,!1);return r.length===s&&m===h?r:o.__truncateToNBits(f,r)}return o.__truncateAndSubFromPowerOfTwo(f,r,!1)}static asUintN(f,r){if(0===r.length)return r;if(0>(f=l(f)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===f)return o.__zero();if(r.sign){if(f>o.__kMaxLengthBits)throw RangeError("BigInt too big");return o.__truncateAndSubFromPowerOfTwo(f,r,!1)}if(f>=o.__kMaxLengthBits)return r;let s=0|(f+29)/30;if(r.length<s)return r;let m=f%30;if(r.length==s){if(0===m)return r;let f=r.__digit(s-1);if(0==f>>>m)return r}return o.__truncateToNBits(f,r)}static ADD(f,r){if(f=o.__toPrimitive(f),r=o.__toPrimitive(r),"string"==typeof f)return"string"!=typeof r&&(r=r.toString()),f+r;if("string"==typeof r)return f.toString()+r;if(f=o.__toNumeric(f),r=o.__toNumeric(r),o.__isBigInt(f)&&o.__isBigInt(r))return o.add(f,r);if("number"==typeof f&&"number"==typeof r)return f+r;throw TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(f,r){return o.__compare(f,r,0)}static LE(f,r){return o.__compare(f,r,1)}static GT(f,r){return o.__compare(f,r,2)}static GE(f,r){return o.__compare(f,r,3)}static EQ(f,r){for(;;){if(o.__isBigInt(f))return o.__isBigInt(r)?o.equal(f,r):o.EQ(r,f);if("number"==typeof f){if(o.__isBigInt(r))return o.__equalToNumber(r,f);if("object"!=typeof r)return f==r;r=o.__toPrimitive(r)}else if("string"==typeof f){if(o.__isBigInt(r))return null!==(f=o.__fromString(f))&&o.equal(f,r);if("object"!=typeof r)return f==r;r=o.__toPrimitive(r)}else if("boolean"==typeof f){if(o.__isBigInt(r))return o.__equalToNumber(r,+f);if("object"!=typeof r)return f==r;r=o.__toPrimitive(r)}else if("symbol"==typeof f){if(o.__isBigInt(r))return!1;if("object"!=typeof r)return f==r;r=o.__toPrimitive(r)}else{if("object"!=typeof f||"object"==typeof r&&r.constructor!==o)return f==r;f=o.__toPrimitive(f)}}}static NE(f,r){return!o.EQ(f,r)}static __zero(){return new o(0,!1)}static __oneDigit(f,r){let s=new o(1,r);return s.__setDigit(0,f),s}__copy(){let f=new o(this.length,this.sign);for(let r=0;r<this.length;r++)f[r]=this[r];return f}__trim(){let f=this.length,r=this[f-1];for(;0===r;)r=this[--f-1],this.pop();return 0===f&&(this.sign=!1),this}__initializeDigits(){for(let f=0;f<this.length;f++)this[f]=0}static __decideRounding(f,r,s,l){let m;if(0<r)return -1;if(0>r)m=-r-1;else{if(0===s)return -1;s--,l=f.__digit(s),m=29}let h=1<<m;if(0==(l&h))return -1;if(0!=(l&(h-=1)))return 1;for(;0<s;)if(s--,0!==f.__digit(s))return 1;return 0}static __fromDouble(f){o.__kBitConversionDouble[0]=f;let r=2047&o.__kBitConversionInts[1]>>>20,s=r-1023,l=(0|s/30)+1,m=new o(l,0>f),h=1048575&o.__kBitConversionInts[1]|1048576,E=o.__kBitConversionInts[0],I=s%30,w,B=0;if(20>I){let f=20-I;B=f+32,w=h>>>f,h=h<<32-f|E>>>f,E<<=32-f}else if(20===I)B=32,w=h,h=E,E=0;else{let f=I-20;B=32-f,w=h<<f|E>>>32-f,h=E<<f,E=0}m.__setDigit(l-1,w);for(let f=l-2;0<=f;f--)0<B?(B-=30,w=h>>>2,h=h<<30|E>>>2,E<<=30):w=0,m.__setDigit(f,w);return m.__trim()}static __isWhitespace(f){return!!(13>=f&&9<=f)||(159>=f?32==f:131071>=f?160==f||5760==f:196607>=f?10>=(f&=131071)||40==f||41==f||47==f||95==f||4096==f:65279==f)}static __fromString(f,r=0){let s=0,l=f.length,m=0;if(0===l)return o.__zero();let h=f.charCodeAt(m);for(;o.__isWhitespace(h);){if(++m===l)return o.__zero();h=f.charCodeAt(m)}if(43===h){if(++m===l)return null;h=f.charCodeAt(m),s=1}else if(45===h){if(++m===l)return null;h=f.charCodeAt(m),s=-1}if(0===r){if(r=10,48===h){if(++m===l)return o.__zero();if(88===(h=f.charCodeAt(m))||120===h){if(r=16,++m===l)return null;h=f.charCodeAt(m)}else if(79===h||111===h){if(r=8,++m===l)return null;h=f.charCodeAt(m)}else if(66===h||98===h){if(r=2,++m===l)return null;h=f.charCodeAt(m)}}}else if(16===r&&48===h){if(++m===l)return o.__zero();if(88===(h=f.charCodeAt(m))||120===h){if(++m===l)return null;h=f.charCodeAt(m)}}if(0!=s&&10!==r)return null;for(;48===h;){if(++m===l)return o.__zero();h=f.charCodeAt(m)}let E=l-m,I=o.__kMaxBitsPerChar[r],w=o.__kBitsPerCharTableMultiplier-1;if(E>1073741824/I)return null;let B=I*E+w>>>o.__kBitsPerCharTableShift,D=new o(0|(B+29)/30,!1),M=10>r?r:10,L=10<r?r-10:0;if(0==(r&r-1)){I>>=o.__kBitsPerCharTableShift;let r=[],s=[],E=!1;do{let w=0,B=0;for(;;){let r;if(h-48>>>0<M)r=h-48;else if((32|h)-97>>>0<L)r=(32|h)-87;else{E=!0;break}if(B+=I,w=w<<I|r,++m===l){E=!0;break}if(h=f.charCodeAt(m),30<B+I)break}r.push(w),s.push(B)}while(!E);o.__fillFromParts(D,r,s)}else{D.__initializeDigits();let s=!1,E=0;do{let B=0,W=1;for(;;){let I;if(h-48>>>0<M)I=h-48;else if((32|h)-97>>>0<L)I=(32|h)-87;else{s=!0;break}let w=W*r;if(1073741823<w)break;if(W=w,B=B*r+I,E++,++m===l){s=!0;break}h=f.charCodeAt(m)}w=30*o.__kBitsPerCharTableMultiplier-1;let V=0|(I*E+w>>>o.__kBitsPerCharTableShift)/30;D.__inplaceMultiplyAdd(W,B,V)}while(!s)}if(m!==l){if(!o.__isWhitespace(h))return null;for(m++;m<l;m++)if(h=f.charCodeAt(m),!o.__isWhitespace(h))return null}return D.sign=-1==s,D.__trim()}static __fillFromParts(f,r,s){let l=0,m=0,h=0;for(let E=r.length-1;0<=E;E--){let I=r[E],w=s[E];m|=I<<h,30===(h+=w)?(f.__setDigit(l++,m),h=0,m=0):30<h&&(f.__setDigit(l++,1073741823&m),h-=30,m=I>>>w-h)}if(0!==m){if(l>=f.length)throw Error("implementation bug");f.__setDigit(l++,m)}for(;l<f.length;l++)f.__setDigit(l,0)}static __toStringBasePowerOfTwo(f,r){let s=f.length,l=r-1;
1l=(15&(l=(51&(l=(85&l>>>1)+(85&l))>>>2)+(51&l))>>>4)+(15&l);let m=l,h=r-1,E=f.__digit(s-1),I=o.__clz30(E),w=0|(30*s-I+m-1)/m;if(f.sign&&w++,268435456<w)throw Error("string too long");let B=Array(w),D=w-1,M=0,L=0;for(let r=0;r<s-1;r++){let s=f.__digit(r),l=(M|s<<L)&h;B[D--]=o.__kConversionChars[l];let E=m-L;for(M=s>>>E,L=30-E;L>=m;)B[D--]=o.__kConversionChars[M&h],M>>>=m,L-=m}let W=(M|E<<L)&h;for(B[D--]=o.__kConversionChars[W],M=E>>>m-L;0!==M;)B[D--]=o.__kConversionChars[M&h],M>>>=m;if(f.sign&&(B[D--]="-"),-1!=D)throw Error("implementation bug");return B.join("")}static __toStringGeneric(f,r,s){let l,m;let h=f.length;if(0===h)return"";if(1===h){let l=f.__unsignedDigit(0).toString(r);return!1===s&&f.sign&&(l="-"+l),l}let E=30*h-o.__clz30(f.__digit(h-1)),I=o.__kMaxBitsPerChar[r],w=I-1,B=E*o.__kBitsPerCharTableMultiplier;B+=w-1,B=0|B/w;let D=B+1>>1,M=o.exponentiate(o.__oneDigit(r,!1),o.__oneDigit(D,!1)),L=M.__unsignedDigit(0);if(1===M.length&&32767>=L){(l=new o(f.length,!1)).__initializeDigits();let s=0;for(let r=2*f.length-1;0<=r;r--){let m=s<<15|f.__halfDigit(r);l.__setHalfDigit(r,0|m/L),s=0|m%L}m=s.toString(r)}else{let s=o.__absoluteDivLarge(f,M,!0,!0);l=s.quotient;let h=s.remainder.__trim();m=o.__toStringGeneric(h,r,!0)}l.__trim();let W=o.__toStringGeneric(l,r,!0);for(;m.length<D;)m="0"+m;return!1===s&&f.sign&&(W="-"+W),W+m}static __unequalSign(f){return f?-1:1}static __absoluteGreater(f){return f?-1:1}static __absoluteLess(f){return f?1:-1}static __compareToBigInt(f,r){let s=f.sign;if(s!==r.sign)return o.__unequalSign(s);let l=o.__absoluteCompare(f,r);return 0<l?o.__absoluteGreater(s):0>l?o.__absoluteLess(s):0}static __compareToNumber(f,s){if(o.__isOneDigitInt(s)){let l=f.sign,m=0>s;if(l!==m)return o.__unequalSign(l);if(0===f.length){if(m)throw Error("implementation bug");return 0===s?0:-1}if(1<f.length)return o.__absoluteGreater(l);let h=r(s),E=f.__unsignedDigit(0);return E>h?o.__absoluteGreater(l):E<h?o.__absoluteLess(l):0}return o.__compareToDouble(f,s)}static __compareToDouble(f,r){if(r!=r)return r;if(r===1/0)return -1;if(r===-1/0)return 1;let s=f.sign;if(s!==0>r)return o.__unequalSign(s);if(0===r)throw Error("implementation bug: should be handled elsewhere");if(0===f.length)return -1;o.__kBitConversionDouble[0]=r;let l=2047&o.__kBitConversionInts[1]>>>20;if(2047==l)throw Error("implementation bug: handled elsewhere");let m=l-1023;if(0>m)return o.__absoluteGreater(s);let h=f.length,E=f.__digit(h-1),I=o.__clz30(E),w=30*h-I,B=m+1;if(w<B)return o.__absoluteLess(s);if(w>B)return o.__absoluteGreater(s);let D=1048576|1048575&o.__kBitConversionInts[1],M=o.__kBitConversionInts[0],L=29-I;if(L!==(0|(w-1)%30))throw Error("implementation bug");let W,V=0;if(20>L){let f=20-L;V=f+32,W=D>>>f,D=D<<32-f|M>>>f,M<<=32-f}else if(20===L)V=32,W=D,D=M,M=0;else{let f=L-20;V=32-f,W=D<<f|M>>>32-f,D=M<<f,M=0}if((E>>>=0)>(W>>>=0))return o.__absoluteGreater(s);if(E<W)return o.__absoluteLess(s);for(let r=h-2;0<=r;r--){0<V?(V-=30,W=D>>>2,D=D<<30|M>>>2,M<<=30):W=0;let l=f.__unsignedDigit(r);if(l>W)return o.__absoluteGreater(s);if(l<W)return o.__absoluteLess(s)}if(0!==D||0!==M){if(0===V)throw Error("implementation bug");return o.__absoluteLess(s)}return 0}static __equalToNumber(f,s){return o.__isOneDigitInt(s)?0===s?0===f.length:1===f.length&&f.sign===0>s&&f.__unsignedDigit(0)===r(s):0===o.__compareToDouble(f,s)}static __comparisonResultToBool(f,r){return 0===r?0>f:1===r?0>=f:2===r?0<f:3===r?0<=f:void 0}static __compare(f,r,s){if(f=o.__toPrimitive(f),r=o.__toPrimitive(r),"string"==typeof f&&"string"==typeof r)switch(s){case 0:return f<r;case 1:return f<=r;case 2:return f>r;case 3:return f>=r}if(o.__isBigInt(f)&&"string"==typeof r)return null!==(r=o.__fromString(r))&&o.__comparisonResultToBool(o.__compareToBigInt(f,r),s);if("string"==typeof f&&o.__isBigInt(r))return null!==(f=o.__fromString(f))&&o.__comparisonResultToBool(o.__compareToBigInt(f,r),s);if(f=o.__toNumeric(f),r=o.__toNumeric(r),o.__isBigInt(f)){if(o.__isBigInt(r))return o.__comparisonResultToBool(o.__compareToBigInt(f,r),s);if("number"!=typeof r)throw Error("implementation bug");return o.__comparisonResultToBool(o.__compareToNumber(f,r),s)}if("number"!=typeof f)throw Error("implementation bug");if(o.__isBigInt(r))return o.__comparisonResultToBool(o.__compareToNumber(r,f),2^s);if("number"!=typeof r)throw Error("implementation bug");return 0===s?f<r:1===s?f<=r:2===s?f>r:3===s?f>=r:void 0}__clzmsd(){return o.__clz30(this.__digit(this.length-1))}static __absoluteAdd(f,r,s){if(f.length<r.length)return o.__absoluteAdd(r,f,s);if(0===f.length)return f;if(0===r.length)return f.sign===s?f:o.unaryMinus(f);let l=f.length;(0===f.__clzmsd()||r.length===f.length&&0===r.__clzmsd())&&l++;let m=new o(l,s),h=0,E=0;for(;E<r.length;E++){let s=f.__digit(E)+r.__digit(E)+h;h=s>>>30,m.__setDigit(E,1073741823&s)}for(;E<f.length;E++){let r=f.__digit(E)+h;h=r>>>30,m.__setDigit(E,1073741823&r)}return E<m.length&&m.__setDigit(E,h),m.__trim()}static __absoluteSub(f,r,s){if(0===f.length)return f;if(0===r.length)return f.sign===s?f:o.unaryMinus(f);let l=new o(f.length,s),m=0,h=0;for(;h<r.length;h++){let s=f.__digit(h)-r.__digit(h)-m;m=1&s>>>30,l.__setDigit(h,1073741823&s)}for(;h<f.length;h++){let r=f.__digit(h)-m;m=1&r>>>30,l.__setDigit(h,1073741823&r)}return l.__trim()}static __absoluteAddOne(f,r,s=null){let l=f.length;null===s?s=new o(l,r):s.sign=r;let m=1;for(let r=0;r<l;r++){let l=f.__digit(r)+m;m=l>>>30,s.__setDigit(r,1073741823&l)}return 0!=m&&s.__setDigitGrow(l,1),s}static __absoluteSubOne(f,r){let s=f.length;r=r||s;let l=new o(r,!1),m=1;for(let r=0;r<s;r++){let s=f.__digit(r)-m;m=1&s>>>30,l.__setDigit(r,1073741823&s)}if(0!=m)throw Error("implementation bug");for(let f=s;f<r;f++)l.__setDigit(f,0);return l}static __absoluteAnd(f,r,s=null){let l=f.length,m=r.length,h=m;if(l<m){h=l;let s=f,E=l;f=r,l=m,r=s,m=E}let E=h;null===s?s=new o(E,!1):E=s.length;let I=0;for(;I<h;I++)s.__setDigit(I,f.__digit(I)&r.__digit(I));for(;I<E;I++)s.__setDigit(I,0);return s}static __absoluteAndNot(f,r,s=null){let l=f.length,m=r.length,h=m;l<m&&(h=l);let E=l;null===s?s=new o(E,!1):E=s.length;let I=0;for(;I<h;I++)s.__setDigit(I,f.__digit(I)&~r.__digit(I));for(;I<l;I++)s.__setDigit(I,f.__digit(I));for(;I<E;I++)s.__setDigit(I,0);return s}static __absoluteOr(f,r,s=null){let l=f.length,m=r.length,h=m;if(l<m){h=l;let s=f,E=l;f=r,l=m,r=s,m=E}let E=l;null===s?s=new o(E,!1):E=s.length;let I=0;for(;I<h;I++)s.__setDigit(I,f.__digit(I)|r.__digit(I));for(;I<l;I++)s.__setDigit(I,f.__digit(I));for(;I<E;I++)s.__setDigit(I,0);return s}static __absoluteXor(f,r,s=null){let l=f.length,m=r.length,h=m;if(l<m){h=l;let s=f,E=l;f=r,l=m,r=s,m=E}let E=l;null===s?s=new o(E,!1):E=s.length;let I=0;for(;I<h;I++)s.__setDigit(I,f.__digit(I)^r.__digit(I));for(;I<l;I++)s.__setDigit(I,f.__digit(I));for(;I<E;I++)s.__setDigit(I,0);return s}static __absoluteCompare(f,r){let s=f.length-r.length;if(0!=s)return s;let l=f.length-1;for(;0<=l&&f.__digit(l)===r.__digit(l);)l--;return 0>l?0:f.__unsignedDigit(l)>r.__unsignedDigit(l)?1:-1}static __multiplyAccumulate(f,r,s,l){if(0===r)return;let m=32767&r,h=r>>>15,E=0,I=0;for(let r,w=0;w<f.length;w++,l++){r=s.__digit(l);let B=f.__digit(w),D=32767&B,M=B>>>15,L=o.__imul(D,m),W=o.__imul(D,h),V=o.__imul(M,m),G=o.__imul(M,h);r+=I+L+E,E=r>>>30,r&=1073741823,r+=((32767&W)<<15)+((32767&V)<<15),E+=r>>>30,I=G+(W>>>15)+(V>>>15),s.__setDigit(l,1073741823&r)}for(;0!=E||0!==I;l++){let f=s.__digit(l);f+=E+I,I=0,E=f>>>30,s.__setDigit(l,1073741823&f)}}static __internalMultiplyAdd(f,r,s,l,m){let h=s,E=0;for(let s=0;s<l;s++){let l=f.__digit(s),I=o.__imul(32767&l,r),w=o.__imul(l>>>15,r),B=I+((32767&w)<<15)+E+h;h=B>>>30,E=w>>>15,m.__setDigit(s,1073741823&B)}if(m.length>l)for(m.__setDigit(l++,h+E);l<m.length;)m.__setDigit(l++,0);else if(0!==h+E)throw Error("implementation bug")}__inplaceMultiplyAdd(f,r,s){s>this.length&&(s=this.length);let l=32767&f,m=f>>>15,h=0,E=r;for(let f=0;f<s;f++){let r=this.__digit(f),s=32767&r,I=r>>>15,w=o.__imul(s,l),B=o.__imul(s,m),D=o.__imul(I,l),M=o.__imul(I,m),L=E+w+h;h=L>>>30,L&=1073741823,L+=((32767&B)<<15)+((32767&D)<<15),h+=L>>>30,E=M+(B>>>15)+(D>>>15),this.__setDigit(f,1073741823&L)}if(0!=h||0!==E)throw Error("implementation bug")}static __absoluteDivSmall(f,r,s=null){null===s&&(s=new o(f.length,!1));let l=0;for(let m,h=2*f.length-1;0<=h;h-=2){m=(l<<15|f.__halfDigit(h))>>>0;let E=0|m/r;m=((l=0|m%r)<<15|f.__halfDigit(h-1))>>>0;let I=0|m/r;l=0|m%r,s.__setDigit(h>>>1,E<<15|I)}return s}static __absoluteModSmall(f,r){let s=0;for(let l=2*f.length-1;0<=l;l--){let m=(s<<15|f.__halfDigit(l))>>>0;s=0|m%r}return s}static __absoluteDivLarge(f,r,s,l){let m=r.__halfDigitLength(),h=r.length,E=f.__halfDigitLength()-m,I=null;s&&(I=new o(E+2>>>1,!1)).__initializeDigits();let w=new o(m+2>>>1,!1);w.__initializeDigits();let B=o.__clz15(r.__halfDigit(m-1));0<B&&(r=o.__specialLeftShift(r,B,0));let D=o.__specialLeftShift(f,B,1),M=r.__halfDigit(m-1),L=0;for(let f,l=E;0<=l;l--){f=32767;let E=D.__halfDigit(l+m);if(E!==M){let s=(E<<15|D.__halfDigit(l+m-1))>>>0;f=0|s/M;let h=0|s%M,I=r.__halfDigit(m-2),w=D.__halfDigit(l+m-2);for(;o.__imul(f,I)>>>0>(h<<16|w)>>>0&&(f--,!(32767<(h+=M))););}o.__internalMultiplyAdd(r,f,0,h,w);let B=D.__inplaceSub(w,l,m+1);0!==B&&(B=D.__inplaceAdd(r,l,m),D.__setHalfDigit(l+m,32767&D.__halfDigit(l+m)+B),f--),s&&(1&l?L=f<<15:I.__setDigit(l>>>1,L|f))}if(l)return D.__inplaceRightShift(B),s?{quotient:I,remainder:D}:D;if(s)return I;throw Error("unreachable")}static __clz15(f){return o.__clz30(f)-15}__inplaceAdd(f,r,s){let l=0;for(let m=0;m<s;m++){let s=this.__halfDigit(r+m)+f.__halfDigit(m)+l;l=s>>>15,this.__setHalfDigit(r+m,32767&s)}return l}__inplaceSub(f,r,s){let l=0;if(1&r){r>>=1;let m=this.__digit(r),h=32767&m,E=0;for(;E<s-1>>>1;E++){let s=f.__digit(E),I=(m>>>15)-(32767&s)-l;l=1&I>>>15,this.__setDigit(r+E,(32767&I)<<15|32767&h),l=1&(h=(32767&(m=this.__digit(r+E+1)))-(s>>>15)-l)>>>15}let I=f.__digit(E),w=(m>>>15)-(32767&I)-l;if(l=1&w>>>15,this.__setDigit(r+E,(32767&w)<<15|32767&h),r+E+1>=this.length)throw RangeError("out of bounds");0==(1&s)&&(l=1&(h=(32767&(m=this.__digit(r+E+1)))-(I>>>15)-l)>>>15,this.__setDigit(r+f.length,1073709056&m|32767&h))}else{r>>=1;let m=0;for(;m<f.length-1;m++){let s=this.__digit(r+m),h=f.__digit(m),E=(32767&s)-(32767&h)-l;l=1&E>>>15;let I=(s>>>15)-(h>>>15)-l;l=1&I>>>15,this.__setDigit(r+m,(32767&I)<<15|32767&E)}let h=this.__digit(r+m),E=f.__digit(m),I=(32767&h)-(32767&E)-l;l=1&I>>>15;let w=0;0==(1&s)&&(l=1&(w=(h>>>15)-(E>>>15)-l)>>>15),this.__setDigit(r+m,(32767&w)<<15|32767&I)}return l}__inplaceRightShift(f){if(0===f)return;let r=this.__digit(0)>>>f,s=this.length-1;for(let l=0;l<s;l++){let s=this.__digit(l+1);this.__setDigit(l,1073741823&s<<30-f|r),r=s>>>f}this.__setDigit(s,r)}static __specialLeftShift(f,r,s){let l=f.length,m=new o(l+s,!1);if(0===r){for(let r=0;r<l;r++)m.__setDigit(r,f.__digit(r));return 0<s&&m.__setDigit(l,0),m}let h=0;for(let s=0;s<l;s++){let l=f.__digit(s);m.__setDigit(s,1073741823&l<<r|h),h=l>>>30-r}return 0<s&&m.__setDigit(l,h),m}static __leftShiftByAbsolute(f,r){let s=o.__toShiftAmount(r);if(0>s)throw RangeError("BigInt too big");let l=0|s/30,m=s%30,h=f.length,E=0!==m&&0!=f.__digit(h-1)>>>30-m,I=h+l+(E?1:0),w=new o(I,f.sign);if(0===m){let r=0;for(;r<l;r++)w.__setDigit(r,0);for(;r<I;r++)w.__setDigit(r,f.__digit(r-l))}else{let r=0;for(let f=0;f<l;f++)w.__setDigit(f,0);for(let s=0;s<h;s++){let h=f.__digit(s);w.__setDigit(s+l,1073741823&h<<m|r),r=h>>>30-m}if(E)w.__setDigit(h+l,r);else if(0!==r)throw Error("implementation bug")}return w.__trim()}static __rightShiftByAbsolute(f,r){let s=f.length,l=f.sign,m=o.__toShiftAmount(r);if(0>m)return o.__rightShiftByMaximum(l);let h=0|m/30,E=m%30,I=s-h;if(0>=I)return o.__rightShiftByMaximum(l);let w=!1;if(l){if(0!=(f.__digit(h)&(1<<E)-1))w=!0;else for(let r=0;r<h;r++)if(0!==f.__digit(r)){w=!0;break}}if(w&&0===E){let r=f.__digit(s-1);0==~r&&I++}let B=new o(I,l);if(0===E){B.__setDigit(I-1,0);for(let r=h;r<s;r++)B.__setDigit(r-h,f.__digit(r))}else{let r=f.__digit(h)>>>E,l=s-h-1;for(let s=0;s<l;s++){let l=f.__digit(s+h+1);B.__setDigit(s,1073741823&l<<30-E|r),r=l>>>E}B.__setDigit(l,r)}return w&&(B=o.__absoluteAddOne(B,!0,B)),B.__trim()}
1static __rightShiftByMaximum(f){return f?o.__oneDigit(1,!0):o.__zero()}static __toShiftAmount(f){if(1<f.length)return -1;let r=f.__unsignedDigit(0);return r>o.__kMaxLengthBits?-1:r}static __toPrimitive(f,r="default"){if("object"!=typeof f||f.constructor===o)return f;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){let s=f[Symbol.toPrimitive];if(s){let f=s(r);if("object"!=typeof f)return f;throw TypeError("Cannot convert object to primitive value")}}let s=f.valueOf;if(s){let r=s.call(f);if("object"!=typeof r)return r}let l=f.toString;if(l){let r=l.call(f);if("object"!=typeof r)return r}throw TypeError("Cannot convert object to primitive value")}static __toNumeric(f){return o.__isBigInt(f)?f:+f}static __isBigInt(f){return"object"==typeof f&&null!==f&&f.constructor===o}static __truncateToNBits(f,r){let s=0|(f+29)/30,l=new o(s,r.sign),m=s-1;for(let f=0;f<m;f++)l.__setDigit(f,r.__digit(f));let h=r.__digit(m);if(0!=f%30){let r=32-f%30;h=h<<r>>>r}return l.__setDigit(m,h),l.__trim()}static __truncateAndSubFromPowerOfTwo(f,r,s){let l;let m=0|(f+29)/30,h=new o(m,s),E=0,I=m-1,w=0;for(let f=(0,Math.min)(I,r.length);E<f;E++){let f=0-r.__digit(E)-w;w=1&f>>>30,h.__setDigit(E,1073741823&f)}for(;E<I;E++)h.__setDigit(E,0|1073741823&-w);let B=I<r.length?r.__digit(I):0,D=f%30;if(0==D)l=0-B-w&1073741823;else{let f=32-D;B=B<<f>>>f;let r=1<<32-f;l=r-B-w&r-1}return h.__setDigit(I,l),h.__trim()}__digit(f){return this[f]}__unsignedDigit(f){return this[f]>>>0}__setDigit(f,r){this[f]=0|r}__setDigitGrow(f,r){this[f]=0|r}__halfDigitLength(){let f=this.length;return 32767>=this.__unsignedDigit(f-1)?2*f-1:2*f}__halfDigit(f){return 32767&this[f>>>1]>>>15*(1&f)}__setHalfDigit(f,r){let s=f>>>1,l=this.__digit(s);this.__setDigit(s,1&f?32767&l|r<<15:1073709056&l|32767&r)}static __digitPow(f,r){let s=1;for(;0<r;)1&r&&(s*=f),r>>>=1,f*=f;return s}static __isOneDigitInt(f){return(1073741823&f)===f}};return o.__kMaxLength=33554432,o.__kMaxLengthBits=o.__kMaxLength<<5,o.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],o.__kBitsPerCharTableShift=5,o.__kBitsPerCharTableMultiplier=1<<o.__kBitsPerCharTableShift,o.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],o.__kBitConversionBuffer=new ArrayBuffer(8),o.__kBitConversionDouble=new Float64Array(o.__kBitConversionBuffer),o.__kBitConversionInts=new Int32Array(o.__kBitConversionBuffer),o.__clz30=f?function(r){return f(r)-2}:function(f){return 0===f?30:0|29-(0|(0,Math.log)(f>>>0)/Math.LN2)},o.__imul=Math.imul||function(f,r){return 0|f*r},o}()},31621:function(f){"use strict";f.exports=function(f,r){if(!f)throw Error("Invariant failed")}},8064:function(f){f.exports&&(f.exports=function(f){return f.prototype.toFormat=function(f,r,s){if(!this.e&&0!==this.e)return this.toString();var l,m,h,E,I,w,B,D,M,L,W,V,G,Z,X,K=this.format||{},$=this.constructor.format||{};if(f!=I?"object"==typeof f?(s=f,f=I):r!=I?"object"==typeof r?(s=r,r=I):"object"!=typeof s&&(s={}):s={}:s={},D=(l=this.toFixed(f,r).split("."))[0],M=l[1],w=(B=this.s<0?D.slice(1):D).length,(L=s.decimalSeparator)==I&&(L=K.decimalSeparator)==I&&(L=$.decimalSeparator)==I&&(L="."),(W=s.groupSeparator)==I&&(W=K.groupSeparator)==I&&(W=$.groupSeparator),W&&((V=s.groupSize)==I&&(V=K.groupSize)==I&&(V=$.groupSize)==I&&(V=0),(G=s.secondaryGroupSize)==I&&(G=K.secondaryGroupSize)==I&&(G=$.secondaryGroupSize)==I&&(G=0),G?(m=+G,w-=h=+V):(m=+V,h=+G),m>0&&w>0)){for(E=w%m||m,D=B.substr(0,E);E<w;E+=m)D+=W+B.substr(E,m);h>0&&(D+=W+B.slice(E)),this.s<0&&(D="-"+D)}return M?((Z=s.fractionGroupSeparator)==I&&(Z=K.fractionGroupSeparator)==I&&(Z=$.fractionGroupSeparator),Z&&((X=s.fractionGroupSize)==I&&(X=K.fractionGroupSize)==I&&(X=$.fractionGroupSize)==I&&(X=0),(X=+X)&&(M=M.replace(RegExp("\\d{"+X+"}\\B","g"),"$&"+Z))),D+L+M):D},f.format={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0},f})},35841:function(f){"use strict";f.exports=JSON.parse('{"_format":"hh-sol-artifact-1","contractName":"IApproveAndCall","sourceName":"contracts/interfaces/IApproveAndCall.sol","abi":[{"input
1s":[{"internalType":"address","name":"token","type":"address"}],"name":"approveMax","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveMaxMinusOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveZeroThenMax","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveZeroThenMaxMinusOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"callPositionManager","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getApprovalType","outputs":[{"internalType":"enum IApproveAndCall.ApprovalType","name":"","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"}],"internalType":"struct IApproveAndCall.IncreaseLiquidityParams","name":"params","type":"tuple"}],"name":"increaseLiquidity","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct IApproveAndCall.MintParams","name":"params","type":"tuple"}],"name":"mint","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","linkReferences":{},"deployedLinkReferences":{}}')},49264:function(f){"use strict";f.exports=JSON.parse('{"_format":"hh-sol-artifact-1","contractName":"IMulticallExtended","sourceName":"contracts/interfaces/IMulticallExtended.sol","abi":[{"inputs":[{"internalType":"bytes32","name":"previousBlockhash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","linkReferences":{},"deployedLinkReferences":{}}')},22110:function(f){"use strict";f.exports=JSON.parse('{"_format":"hh-sol-artifact-1","contractName":"IPeripheryPaymentsWithFeeExtended","sourceName":"contracts/interfaces/IPeripheryPaymentsWithFeeExtended.sol","abi":[{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"pull","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"refundETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"}],"name":"sweepToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"sweepTokenWithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"sweepTokenWithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"}],"name":"unwrapWETH9","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"unwrapWETH9WithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountMinimum","type":"uint256"},{"internalType":"uint256","name":"feeBips","type":"uint256"},{"internalType":"address","name":"feeRecipient","type":"address"}],"name":"unwrapWETH9WithFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"wrapETH","outputs":[],"stateMutability":"payable","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","linkReferences":{},"deployedLinkReferences":{}}')},13079:function(f){"use strict";f.exports=JSON.parse('{"_format":"hh-sol-artifact-1","contractName":"ISwapRouter02","sourceName":"contracts/interfaces/ISwapRouter02.sol","abi":[{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveMax","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveMaxMinusOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveZeroThenMax","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveZeroThenMaxMinusOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"callPositionManager","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"internalType":"struct IV3SwapRouter.ExactInputParams","name":"params","type":"tuple"}],"name":"exactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IV3SwapRouter.ExactInputSingleParams","name":"params","type":"tuple"}],"name":"exactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMaximum","type":"uint256"}],"internalType":"struct IV3SwapRouter.ExactOutputParams","name":"params","type":"tuple"}],"name":"exactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMaximum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IV3SwapRouter.ExactOutputSingleParams","name":"params","type":"tuple"}],"name":"exactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getApprovalType","outputs":[{"internalType":"enum IApproveAndCall.ApprovalType","name":"","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"}],"internalType":"struct IApproveAndCall.IncreaseLiquidityParams","name":"params","type":"tuple"}],"name":"increaseLiquidity","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct IApproveAndCall.MintParams","name":"params","type":"tuple"}],"name":"mint","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"previousBlockhash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowed","outputs":[],"stateMutability":"payable","type":"function"}
1,{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitAllowedIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"selfPermitIfNecessary","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x","deployedBytecode":"0x","linkReferences":{},"deployedLinkReferences":{}}')},22367:function(f){"use strict";f.exports=JSON.parse('{"_format":"hh-sol-artifact-1","contractName":"UniversalRouter","sourceName":"contracts/UniversalRouter.sol","abi":[{"inputs":[{"components":[{"internalType":"address","name":"permit2","type":"address"},{"internalType":"address","name":"weth9","type":"address"},{"internalType":"address","name":"v2Factory","type":"address"},{"internalType":"address","name":"v3Factory","type":"address"},{"internalType":"bytes32","name":"pairInitCodeHash","type":"bytes32"},{"internalType":"bytes32","name":"poolInitCodeHash","type":"bytes32"},{"internalType":"address","name":"v4PoolManager","type":"address"},{"internalType":"address","name":"v3NFTPositionManager","type":"address"},{"internalType":"address","name":"v4PositionManager","type":"address"}],"internalType":"struct RouterParameters","name":"params","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BalanceTooLow","type":"error"},{"inputs":[],"name":"ContractLocked","type":"error"},{"inputs":[{"internalType":"Currency","name":"currency","type":"address"}],"name":"DeltaNotNegative","type":"error"},{"inputs":[{"internalType":"Currency","name":"currency","type":"address"}],"name":"DeltaNotPositive","type":"error"},{"inputs":[],"name":"ETHNotAccepted","type":"error"},{"inputs":[{"internalType":"uint256","name":"commandIndex","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"ExecutionFailed","type":"error"},{"inputs":[],"name":"FromAddressIsNotOwner","type":"error"},{"inputs":[],"name":"InputLengthMismatch","type":"error"},{"inputs":[],"name":"InsufficientETH","type":"error"},{"inputs":[],"name":"InsufficientToken","type":"error"},{"inputs":[{"internalType":"bytes4","name":"action","type":"bytes4"}],"name":"InvalidAction","type":"error"},{"inputs":[],"name":"InvalidBips","type":"error"},{"inputs":[{"internalType":"uint256","name":"commandType","type":"uint256"}],"name":"InvalidCommandType","type":"error"}
1,{"inputs":[],"name":"InvalidEthSender","type":"error"},{"inputs":[],"name":"InvalidPath","type":"error"},{"inputs":[],"name":"InvalidReserves","type":"error"},{"inputs":[],"name":"LengthMismatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotAuthorizedForToken","type":"error"},{"inputs":[],"name":"NotPoolManager","type":"error"},{"inputs":[],"name":"OnlyMintAllowed","type":"error"},{"inputs":[],"name":"SliceOutOfBounds","type":"error"},{"inputs":[],"name":"TransactionDeadlinePassed","type":"error"},{"inputs":[],"name":"UnsafeCast","type":"error"},{"inputs":[{"internalType":"uint256","name":"action","type":"uint256"}],"name":"UnsupportedAction","type":"error"},{"inputs":[],"name":"V2InvalidPath","type":"error"},{"inputs":[],"name":"V2TooLittleReceived","type":"error"},{"inputs":[],"name":"V2TooMuchRequested","type":"error"},{"inputs":[],"name":"V3InvalidAmountOut","type":"error"},{"inputs":[],"name":"V3InvalidCaller","type":"error"},{"inputs":[],"name":"V3InvalidSwap","type":"error"},{"inputs":[],"name":"V3TooLittleReceived","type":"error"},{"inputs":[],"name":"V3TooMuchRequested","type":"error"},{"inputs":[{"internalType":"uint256","name":"minAmountOutReceived","type":"uint256"},{"internalType":"uint256","name":"amountReceived","type":"uint256"}],"name":"V4TooLittleReceived","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxAmountInRequested","type":"uint256"},{"internalType":"uint256","name":"amountRequested","type":"uint256"}],"name":"V4TooMuchRequested","type":"error"},{"inputs":[],"name":"V3_POSITION_MANAGER","outputs":[{"internalType":"contract INonfungiblePositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"V4_POSITION_MANAGER","outputs":[{"internalType":"contract IPositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"commands","type":"bytes"},{"internalType":"bytes[]","name":"inputs","type":"bytes[]"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"commands","type":"bytes"},{"internalType":"bytes[]","name":"inputs","type":"bytes[]"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"msgSender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolManager","outputs":[{"internalType":"contract IPoolManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"unlockCallback","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x6101a0604052346102e457604051601f61501638819003918201601f19168301916001600160401b038311848410176102d057808492610120946040528339810103126102e4576040519061012082016001600160401b038111838210176102d05760405261006d81610307565b825261007b60208201610307565b6020830190815261008e60408301610307565b604084019081526100a160608401610307565b93606081019485526080840151946080820195865260a08501519560a083019687526100cf60c08701610307565b9660c084019788526100f66101006100e960e08a01610307565b988960e088015201610307565b97886101008601526101066102e8565b6001600160a01b03988916815298881660208a0190815290519451965190989796871696908116959416936101396102e8565b968752602087019586525192519151905160405190936001600160a01b0393841693169060808101906001600160401b038211818310176102d057604091825282815260208101948552808201938452606001948552608091909152905160a05290516001600160a01b0390811660c052915160e052610100929092529151821661012052915181166101405291518216610160529151166101805251614cfa908161031c82396080518181816115be0152818161180c015261382d015260a05181818161159d0152818161182e015261380c015260c05181612f07015260e05181612f5a015261010051818181609e01528181610449015281816105b10152818161232801528181612892015281816143b70152818161444201528181614589015281816145fc015281816146e90152614ac7015261012051818181602f01528181611cc30152611e360152610140518181816110b901528181611b700152818161207101526133d60152610160518181816106e30152818161245c0152612556015261018051818181610527015261298b0152f35b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b60408051919082016001600160401b038111838210176102d057604052565b51906001600160a01b03821682036102e45756fe60c060405260043610156100c6575b3615610018575f80fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633141580610086575b61005e57005b7f38bbd576000000000000000000000000000000000000000000000000000000005f5260045ffd5b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016331415610058565b5f3560e01c806324856bc3146108685780633593564c14610707578063817122dc1461069957806391dd73461461054b578063d0c9f6cb146104dd578063d737d0c71461046d578063dc4c90d3146103ff5763fa461e330361000e57346102e05760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760243560043560443567ffffffffffffffff81116102e057610177903690600401610942565b5f8313918215806103f5575b6103cd578181016040828203126102e057813567ffffffffffffffff81116102e057820181601f820112156102e05780356101bd81612c8a565b926101cb6040519485612c49565b818452602082840101116102e0575f928160208094018483013701015260208101359173ffffffffffffffffffffffffffffffffffffffff83168093036102e05761021591612e33565b90601790602b83106103a5578035968760601c9561024362ffffff8585013560601c9a60481c168a89612e86565b73ffffffffffffffffffffffffffffffffffffffff3391160361037d571561037357508685105b156102805750505061027e93503391612fcf565b005b91935091939482602b0180602b116103465784106102e457508282116102e05781019103907f80000000000000000000000000000000000000000000000000000000000000008410156102e05761027e936102db3391612cc4565b613061565b5f80fd5b925050507faf28d9864a81dfdf71cab65f4e5d79a0cf9b0839
105fb8971425e6cb581b3f6929291925c821161031e5761027e923391612fcf565b7f739dbe52000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b955084871061026a565b7f32b13d91000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3b99b53d000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f316cf0eb000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f851315610183565b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760207f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102e05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760043567ffffffffffffffff81116102e05761059a903690600401610942565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163303610671576105e091613479565b90818303610649575f5b83811061061d57610619604051610602602082612c49565b5f81526040519182916020835260208301906109a1565b0390f35b8061064361062e60019387896109e4565b3560f81c61063d838787610a6e565b91613b0c565b016105ea565b7faaad13f7000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fae18210a000000000000000000000000000000000000000000000000000000005f5260045ffd5b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760043567ffffffffffffffff81116102e057610751903690600401610942565b60243567ffffffffffffffff81116102e057610771903690600401610970565b916044354211610840573330146108375773ffffffffffffffffffffffffffffffffffffffff7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c1661080f576107ea93337f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085d610a89565b5f7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085d005b7f6f5ffb7e000000000000000000000000000000000000000000000000000000005f5260045ffd5b61027e93610a89565b7f5bf6f916000000000000000000000000000000000000000000000000000000005f5260045ffd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760043567ffffffffffffffff81116102e0576108b2903690600401610942565b60243567ffffffffffffffff81116102e0576108d2903690600401610970565b913330146108375773ffffffffffffffffffffffffffffffffffffffff7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c1661080f576107ea93337f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085d610a89565b9181601f840112156102e05782359167ffffffffffffffff83116102e057602083818601950101116102e057565b9181601f840112156102e05782359167ffffffffffffffff83116102e0576020808501948460051b0101116102e057565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b908210156109f0570190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102e0570180359067ffffffffffffffff82116102e0576020019181360383136102e057565b908210156109f057610a859160051b810190610a1d565b9091565b9290808203612bbc579291905f915b848310610aa6575050505050565b9091929394610ab68487876109e4565b3592610ac3858285610a6e565b979092606097603f8760f81c1695600196602181105f14612a215760108110156122b55760088110156115095780610eeb5750610b0560208701359b87612e5b565b9590608088013515610ee4577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c9c5b610b3f893561326f565b9d9188816080527f80000000000000000000000000000000000000000000000000000000000000008314610e58575b50505b604260a052602b7f800000000000000000000000000000000000000000000000000000000000000082101
156102e05760a0518f908a10610e52575030915b8982116102e05760409173ffffffffffffffffffffffffffffffffffffffff5f6080513595610cb2610c2b610c5d85610c018b60601c6017608051013560601c62ffffff8183109e60481c1691612e86565b16968a8614610e37576401000276a49b5b878b519485938d60208601526060850190608051612cf0565b91168b830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612c49565b8488519a8b98899788967f128acb080000000000000000000000000000000000000000000000000000000088521660048701528b6024870152604486015216606484015260a0608484015260a48301906109a1565b03925af1908115610e2c575f905f92610df0575b610cd6935015610de95750612cc4565b60a0519096908110610d1d573090806017116102e0576080805160170190527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe90196610b71565b50979396929a50979490989360409091013511610dc1575b159081610d96575b50610d4f575060010191909392610a98565b90610d926040519283927f2c4029e900000000000000000000000000000000000000000000000000000000845260048401526040602484015260448301906109a1565b0390fd5b7f8000000000000000000000000000000000000000000000000000000000000000915016155f610d3d565b7f39d35496000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050612cc4565b9150506040823d8211610e24575b81610e0b60409383612c49565b810103126102e057816020610cd6935191015191610cc6565b3d9150610dfe565b6040513d5f823e3d90fd5b73fffd8963efd1fc6a506488495d951d5263988d259b610c12565b91610baf565b6014919250106103a5576020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301523560601c5afa908115610e2c575f91610eb3575b505f80610b6e565b90506020813d8211610edc575b81610ecd60209383612c49565b810103126102e057515f610eab565b3d9150610ec0565b309c610b35565b6001819c939b96999598949c9a97929a145f146110245750610f1260208201359282612e5b565b60808301351561101d577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c915b6040610f4c853561326f565b9401357faf28d9864a81dfdf71cab65f4e5d79a0cf9b083905fb8971425e6cb581b3f6925d7f80000000000000000000000000000000000000000000000000000000000000008510156102e057610fa6936102db86612cc4565b9091901561100e5750610fb890612cc4565b03610fe6575f7faf28d9864a81dfdf71cab65f4e5d79a0cf9b083905fb8971425e6cb581b3f6925d5b610d35565b7fd4e0248e000000000000000000000000000000000000000000000000000000005f5260045ffd5b6110189150612cc4565b610fb8565b3091610f40565b6002810361106e5750610fe191506040810135907f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c611067602083013561326f565b91356133bd565b6003810361128a57508035810163ffffffff60208301351682019263ffffffff8435169260208086019585010191011061127d5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c93833b156102e05773ffffffffffffffffffffffffffffffffffffffff604051957f2a2d80d10000000000000000000000000000000000000000000000000000000087521660048601526060602486015260c485019280357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156102e05781016020813591019467ffffffffffffffff82116102e0578160071b360386136102e05760606064890152819052869460e48601949392915f905b808210611255575050506112305f96948694889460408573ffffffffffffffffffffffffffffffffffffffff6111f460208b9901612d5d565b166084880152013560a48601527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc858403016044860152612cf0565b03925af18015610e2c57611245575b50610d35565b5f61124f91612c49565b5f61123f565b919650919293946080808261126c6001948b612dbe565b0197019201889695949392916111bb565b633b99b53d5f526004601cfd5b909150600481036113df57506112a3602082013561326f565b9073ffffffffffffffffffffffffffffffffffffffff8060408301351691351680155f146113195750479081106112f157806112e1575b5050610d35565b6112ea91613511565b5f806112da565b7f6a12f104000000000000000000000000000000000000000000000000000000005f5260045ffd5b91604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481875afa928315610e2c575f936113ac575b5082106113845781611373575b505050610d35565b61137c92613a5d565b5f808061136b565b7f675cae38000000000000000000000000000000000000000000000000000000005f5260045ffd5b9092506020813d82116113d7575b816113c760209383612c49565b810103126102e05751915f61135e565b3d91506113ba565b600581036114065750806040610fe1920135906113ff602082013561326f565b90356132e1565b600681036114de575060408101359073ffffffffffffffffffffffffffffffffffffffff611437602083013561326f565b91351680611453575061144d610fe19247613a1b565b90613511565b906040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481865afa908115610e2c575f916114ab575b50610fe1936114a591613a1b565b91613a5d565b90506020813d82116114d6575b816114c560209383612c49565b810103126102e05751610fe1611497565b3d91506114b8565b7fd76a1e9e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6008819c929a97939b96999598949c145f146117be575061152f602083
10135918361322a565b906080840135156117b7577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c915b611568853561326f565b9282156109f0576115788261324e565b83600110156109f05761159a6115e2916115946020860161324e565b906142a2565b907f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006142da565b94858161179d575b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82018281116103465761163f61163a73ffffffffffffffffffffffffffffffffffffffff9285856132c4565b61324e565b1693604051927f70a0823100000000000000000000000000000000000000000000000000000000845273ffffffffffffffffffffffffffffffffffffffff8516928360048601526020856024818a5afa948515610e2c575f95611760575b50946116ad9291602095966135cf565b6024604051809581937f70a0823100000000000000000000000000000000000000000000000000000000835260048301525afa918215610e2c575f9261172c575b5060406116fe92930135926132d4565b1015610d35577f849eaf98000000000000000000000000000000000000000000000000000000005f5260045ffd5b91506020823d8211611758575b8161174660209383612c49565b810103126102e05790519060406116ee565b3d9150611739565b92919450946020833d8211611795575b8161177d60209383612c49565b810103126102e05791519194919390916116ad61169d565b3d9150611770565b6117af926117aa8561324e565b612fcf565b5f80856115ea565b309161155e565b60098103611b2857506117d1908261322a565b608083013515611b21577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c915b611809843561326f565b917f0000000000000000000000000000000000000000000000000000000000000000937f0000000000000000000000000000000000000000000000000000000000000000955f9560028510611af9576020820135977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601868111610346579190825b6118e2575050506040013586116118ba5782156109f057610fe195856118b5926117aa8561324e565b6135cf565b7f8ab0bc16000000000000000000000000000000000000000000000000000000005f5260045ffd5b90919897507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901978989116103465761192361163a6119459a89896132c4565b61193a61193461163a8d8b8b6132c4565b826142a2565b8185879d939d6142da565b90604051907f0902f1ac00000000000000000000000000000000000000000000000000000000825260608260048173ffffffffffffffffffffffffffffffffffffffff87165afa918215610e2c575f905f93611a9c575b5073ffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff8082931694169d169116145f14611a965799905b9980158015611a8e575b611a6657826119ed916139d1565b916103e88302928084046103e8149015171561034657611a0c916132d4565b6103e58102908082046103e5149015171561034657611a2a916139e4565b6001810180911161034657988015610346577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0191908261188c565b7f7b9c8916000000000000000000000000000000000000000000000000000000005f5260045ffd5b5081156119df565b906119d5565b6dffffffffffffffffffffffffffff80945073ffffffffffffffffffffffffffffffffffffffff9250611ae6839260603d8111611af2575b611ade8183612c49565b810190613599565b5095909350505061199c565b503d611ad4565b7f20db8267000000000000000000000000000000000000000000000000000000005f5260045ffd5b30916117ff565b600a8103611c5a575063ffffffff60c08301351682019163ffffffff833516918160208086019585010191011061127d5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c92813b156102e0575f809461123060a09773ffffffffffffffffffffffffffffffffffffffff94604051998a98899788967f2b67b570000000000000000000000000000000000000000000000000000000008852166004870152611c196024870182612dbe565b73ffffffffffffffffffffffffffffffffffffffff611c3a60808301612d5d565b1660a4870152013560c485015261010060e4850152610104840191612cf0565b600b8103611e0a575050611c736020820135913561326f565b90807f80000000000000000000000000000000000000000000000000000000000000008103611ddb575050475b80611cac575050610d35565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691823b156102e057604051907fd0e30db00000000000000000000000000000000000000000000000000000000082525f8260048186885af1918215610e2c5773ffffffffffffffffffffffffffffffffffffffff92611dcb575b501690308203611d4e575b506112da565b60446020925f60405195869485937fa9059cbb000000000000000000000000000000000000000000000000000000008552600485015260248401525af18015610e2c57611d9d575b8080611d48565b611dbd9060203d8111611dc4575b611db58183612c49565b810190613212565b505f611d96565b503d611dab565b5f611dd591612c49565b5f611d3d565b471015611ca0577f6a12f104000000000000000000000000000000000000000000000000000000005f5260045ffd5b600c8103611f74575050611e1e813561326f565b9073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481855afa928315610e2c575f93611f40575b506020013582106112f15781611eb257505050610d35565b803b156102e0575f80916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528760048401525af18015610e2c57611f30575b503073ffffffffffffffffffffffffffffffffffffffff831603611f20575b8061136b565b611f2991613511565b5f80611f1a565b5f611f3a91612c49565b5f611efb565b9092506020813d8211611f6c575b81611f5b60209383612c49565b810103126102e05751916020611e9a565b3d9150611f4e565b600d819c939c9b929597989b99949699145f146121aa57508a358b0198893594611fa66020808d019e8d030187612fc2565b116103a55773ffffffffffffffffffffffffffffffffffffffff7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c169a935f5b8681101561204c578c73ffffffffffffffffffffffffffffffffffffffff61201660208f8560071b010161324e565b160361202457600101611fe7565b7fe7002877000000000000000000000000000000000000000000000000000000005f5260045ffd5b50989593979694929b919a50985073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156102e0576040517f0d58b1db000000000000000000000000000000000000000000000000000000008152602060048201526024810184905292839160448301915f9
105b8082106120fc5750505091815f81819503925af18015610e2c576112455750610d35565b9193509160808060019273ffffffffffffffffffffffffffffffffffffffff61212488612d5d565b16815273ffffffffffffffffffffffffffffffffffffffff61214860208901612d5d565b16602082015273ffffffffffffffffffffffffffffffffffffffff61216f60408901612d5d565b16604082015273ffffffffffffffffffffffffffffffffffffffff61219660608901612d5d565b1660608201520194019201859392916120d8565b80929b93989550600e919a97969450145f146114de5750604051907f70a0823100000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff813516600483015260208260248173ffffffffffffffffffffffffffffffffffffffff84860135165afa918215610e2c575f92612281575b5060400135111580610fe15791506040517fa32816720000000000000000000000000000000000000000000000000000000060208201526004815261227b602482612c49565b91610d35565b9091506020813d82116122ad575b8161229c60209383612c49565b810103126102e05751906040612235565b3d915061228f565b6010819c929a97939b96999598949c145f146123d0575061230e915f9160405193849283927f48c89491000000000000000000000000000000000000000000000000000000008452602060048501526024840191612cf0565b03818373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af18015610e2c5761235a5750610d35565b3d805f833e6123698183612c49565b8101906020818303126102e05780519067ffffffffffffffff82116102e0570181601f820112156102e057805161239f81612c8a565b926123ad6040519485612c49565b818452602082840101116102e0575f928160208094018483015e0101525f61123f565b80929495506011919350145f146124b25750907fffffffff000000000000000000000000000000000000000000000000000000008135167f7ac2ff7b0000000000000000000000000000000000000000000000000000000081036124875750815f929183926040519283928337810183815203908273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19061227b612d2e565b7ff801e525000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b601281036127b257507fffffffff000000000000000000000000000000000000000000000000000000008235167f0c49ccbe0000000000000000000000000000000000000000000000000000000081148015612789575b8015612760575b1561248757506004820135917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c9273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016936040517f6352211e000000000000000000000000000000000000000000000000000000008152826004820152602081602481895afa908115610e2c5773ffffffffffffffffffffffffffffffffffffffff9182915f91612742575b50169116908082149182156126ae575b821561263d575b505015612612575091815f809481946040519384928337810182815203925af19061227b612d2e565b7fbb25d4c5000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b909150604051917fe985e9c500000000000000000000000000000000000000000000000000000000835260048301526024820152602081604481885afa908115610e2c575f91612690575b505f806125e9565b6126a8915060203d8111611dc457611db58183612c49565b5f612688565b91506040517f081812fc0000000000000000000000000000000000000000000000000000000081528360048201526020816024818a5afa908115610e2c57839173ffffffffffffffffffffffffffffffffffffffff915f91612714575b501614916125e2565b612735915060203d811161273b575b61272d8183612c49565b8101906131e6565b5f61270b565b503d612723565b61275a915060203d811161273b5761272d8183612c49565b5f6125d2565b507f42966c68000000000000000000000000000000000000000000000000000000008114612510565b507ffc6f7865000000000000000000000000000000000000000000000000000000008114612509565b601381036128bd5750505f809160405173ffffffffffffffffffffffffffffffffffffffff60a060208301937f6276cbbe
10000000000000000000000000000000000000000000000000000000085528261280b82612d5d565b1660248501528261281e60208301612d5d565b16604485015262ffffff61283460408301612d7e565b16606485015261284660608201612d8e565b60020b60848501528261285b60808301612d5d565b1660a485015201351660c482015260c4815261287860e482612c49565b51908273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19061227b612d2e565b601481036114de57507fffffffff000000000000000000000000000000000000000000000000000000008235167fdd46508f0000000000000000000000000000000000000000000000000000000081036124875750806004116102e05761295261294c7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc830160048501612e33565b90612e33565b5f5b8181106129b6575050505f91829147918160405192839283378101848152039173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19061227b612d2e565b6129c18183856109e4565b3560f81c8015908115612a16575b8115612a0b575b506129e357600101612954565b7f5d1d0f9f000000000000000000000000000000000000000000000000000000005f5260045ffd5b60039150145f6129d6565b6001811491506129cf565b9098959199506021819b939b989598979497145f146114de575090612a4591613479565b612a886040959395519460208601967f24856bc3000000000000000000000000000000000000000000000000000000008852604060248801526064870191612cf0565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc858503016044860152818452602084019160208160051b86010194845f907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603015b848310612b425750505050505050509181612b335f94938594037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612c49565b519082305af19061227b612d2e565b90919293949596977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08582030188528835828112156102e0578301906020823592019167ffffffffffffffff81116102e05780360383136102e057612bac60209283928b95612cf0565b9a01980196959493019190612aee565b7fff633a38000000000000000000000000000000000000000000000000000000005f5260045ffd5b60a0810190811067ffffffffffffffff821117612c0057604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6060810190811067ffffffffffffffff821117612c0057604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612c0057604052565b67ffffffffffffffff8111612c0057601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b7f80000000000000000000000000000000000000000000000000000000000000008114610346575f0390565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b3d15612d58573d90612d3f82612c8a565b91612d4d6040519384612c49565b82523d5f602084013e56
15b606090565b359073ffffffffffffffffffffffffffffffffffffffff821682036102e057565b359062ffffff821682036102e057565b35908160020b82036102e057565b908160209103126102e0575190565b359065ffffffffffff821682036102e057565b65ffffffffffff612e2d6060809373ffffffffffffffffffffffffffffffffffffffff612dea82612d5d565b16865273ffffffffffffffffffffffffffffffffffffffff612e0e60208301612d5d565b16602087015283612e2160408301612dab565b16604087015201612dab565b16910152565b909163ffffffff82351682019263ffffffff8435169260208086019585010191011061127d57565b909163ffffffff60608301351682019263ffffffff8435169260208086019585010191011061127d57565b9073ffffffffffffffffffffffffffffffffffffffff9283821684841611612fba575b62ffffff90846040519381602086019616865216604084015216606082015260608152612ed7608082612c49565b5190206040517fff00000000000000000000000000000000000000000000000000000000000000602082019081527f000000000000000000000000000000000000000000000000000000000000000060601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602183015260358201929092527f00000000000000000000000000000000000000000000000000000000000000006055820152612fb381607581015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612c49565b5190201690565b909190612ea9565b9190820180921161034657565b9092919073ffffffffffffffffffffffffffffffffffffffff84163003612ffc57612ffa93506132e1565b565b919273ffffffffffffffffffffffffffffffffffffffff84116130395773ffffffffffffffffffffffffffffffffffffffff612ffa9416926133bd565b7fc4bd89a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b939290602b82106103a5578235938460601c92601785013560601c9380851094859760481c62ffffff169061309592612e86565b73ffffffffffffffffffffffffffffffffffffffff1692845f1460409673ffffffffffffffffffffffffffffffffffffffff809561312a5f9661317d956131cb576401000276a4925b846130f88e51978f94899560208701526060860191612cf0565b91168d830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101855284612c49565b89519b8c998a9889977f128acb080000000000000000000000000000000000000000000000000000000089521660048801526024870152604486015216606484015260a0608484015260a48301906109a1565b03925af18015610e2c575f925f9161319457509192565b9250506040823d6040116131c3575b816131b060409383612c49565b810103126102e057602082519201519192565b3d91506131a3565b73fffd8963efd1fc6a506488495d951d5263988d25926130de565b908160209103126102e0575173ffffffffffffffffffffffffffffffffffffffff811681036102e05790565b908160209103126102e0575180151581036102e05790565b916060830135830191613247602084359581860195030185612fc2565b116103a557565b3573ffffffffffffffffffffffffffffffffffffffff811681036102e05790565b73ffffffffffffffffffffffffffffffffffffffff8116600181036132b55750507f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c90565b6002036132c157503090565b90565b91908110156109f05760051b0190565b9190820391821161034657565b90919073ffffffffffffffffffffffffffffffffffffffff16806133095750612ffa91613511565b7f8000000000000000000000000000000000000000000000000000000000000000821461333b575b91612ffa92613a5d565b9050604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481855afa8015610e2c575f90613389575b90925090613331565b506020833d6020116133b5575b816133a360209383612c49565b810103126102e057612ffa9251613380565b3d9150613396565b919273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691823b156102e0575f73ffffffffffffffffffffffffffffffffffffffff9384829681608496816040519b8c9a8b997f36c78516000000000000000000000000000000000000000000000000000000008b521660048a01521660248801521660448601521660648401525af18015610e2c5761346f5750565b5f612ffa91612c49565b604081351891606082019363ffffffff6040840135169363ffffffe0601f8601169060608201602086013518179084019260608401359463ffffffff861694641fffffffe0608082019760051b1680915f925b8084106134e457506080925001019101101761127d57565b90916020809163ffffffe0601f60808089890101359b848d18179b880101350116010193019291906134cc565b5f80809381935af11561352057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152fd5b51906dffffffffffffffffffffffffffff821682036102e057565b908160609103126102e0576135ad8161357e565b9160406135bc6020840161357e565b92015163ffffffff811681036102e05790565b91600282106139a95781156109f0576135e78361324e565b82600110156109f057613603906115946020869795960161324e565b50927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101937ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8201955f906020937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08501965b88841061368a5750505050505050505050565b61369861163a8584866132c4565b9473ffffffffffffffffffffffffffffffffffffffff6136bf61163a6001880186886132c4565b921695604051917f0902f1ac0000000000000000000000000000000000000000000000000000000083526060836004818b5afa918215610e2c57895f945f94613956575b5073ffffffffffffffffffffffffffffffffffffffff806dffffffffffffffffffffffffffff80602496979816971693169416841494855f146139505791935b604051938480927f70a082310000000000000000000000000000000000000000000000000000000082528d60048301525afa918215610e2c575f92613921575b5080820392811592838015613919575b611a6657826103e586029586046103e51491141715610346576137b690846139d1565b916103e882029182046103e8141715610346576137dc926137d691612fc2565b906139e4565b9015613912575f90915b8b86101561390957906138076138519261159461163a60028a01888a6132c4565b8193917f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006142da565b915b96604051906138628a83612c49565b5f82528b368b840137803b156102e0576138dd945f8094604051978895869485937f022c0d9f0000000000000000000000000000000000000000000000000000000085526004850152602484015273ffffffffffffffffffffffffffffffffffffffff891660448401526080606484015260848301906109a1565b03925af1918215610e2c576001926138f9575b50930192613677565b5f61390391612c49565b5f6138f0565b5087905f613853565b5f916137e6565b508115613793565b9091508981813d8311613949575b6139398183612c49565b810103126102e05751905f613783565b503d61392f565b93613743565b6dffffffffffffffffffffffffffff9550602493945073ffffffffffffffffffffffffffffffffffffffff8661399a829360603d8111611af257611ade8183612c49565b50989098979650505050613703565b7fae52ad0c000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561034657565b81156139ee570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b6127108211613a355761271091613a31916139d1565b0490565b7fdeaa01e6000000000000000000000000000000000000000000000000000000005f5260045ffd5b5f9182604492602095604051937fa9059cbb000000000000000000000000000000000000000000000000000000008552600485015260248401525af13d15601f3d1160015f511416171615613aae57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b90915060098110156140675760058103613c7757508035016020810190613b3382826147f4565b90505f92613b408361324e565b90613b4d60408501614761565b906fffffffffffffffffffffffffffffffff821615613c5e575b92915f915b838310613bed5750505050506060016fffffffffffffffffffffffffffffffff80613b9683614761565b169216918210613ba4575050565b613bbe6fffffffffffffffffffffffffffffffff91614761565b7f8b063d73000000000000000000000000000000000000000000000000000000005f521660045260245260445ffd5b8496506fffffffffffffffffffffffffffffffff613c4291613c29613c2286613c1c613c479798999a8c6147f4565b90614848565b9586614ba7565b613c366080880188610a1d565b949093165f03916149cf56
15b614cce565b946001613c54879361324e565b9194930191613b6c565b9050613c71613c6c836143b0565b61498a565b90613b67565b60048103613d745750803501613c8f60c08201614761565b6fffffffffffffffffffffffffffffffff811615613d23575b613d06613c4260e092613cd86fffffffffffffffffffffffffffffffff613cd160a0880161477e565b9216612cc4565b90613ce6610100870161324e565b613cf4610120880188610a1d565b939092613d01368a61478b565b614b5a565b91016fffffffffffffffffffffffffffffffff80613b9683614761565b50613d3060a0820161477e565b15613d5a5760e0613d06613c42613d51613c6c613d4c8661324e565b6143b0565b92505050613ca8565b60e0613d06613c42613d51613c6c613d4c6020870161324e565b60078103613f1057508035016020810190613d8f82826147f4565b5f939150613d9f60408401614761565b613da88461324e565b916fffffffffffffffffffffffffffffffff821615613efc575b92919290815b613e4557505050506060016fffffffffffffffffffffffffffffffff80613dee83614761565b169216918211613dfc575050565b613e166fffffffffffffffffffffffffffffffff91614761565b7f12bacdd3000000000000000000000000000000000000000000000000000000005f521660045260245260445ffd5b829395506fffffffffffffffffffffffffffffffff613ebc91613ea2613e9b613e72613ec696978a6147f4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890191614848565b9889614ba7565b90613eb060808b018b610a1d565b949093169115906149cf565b600f0b5f0361498a565b937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613ef2869261324e565b9392019081613dc8565b9050613f0a613c6c836146e2565b90613dc2565b919060068314613f485750505b7f5cda29d7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b809192503501613f5a60c08201614761565b6fffffffffffffffffffffffffffffffff811615613fec575b613fcf613c6c613fc76fffffffffffffffffffffffffffffffff60e094613f9c60a0880161477e565b613fa9610100890161324e565b90613fb86101208a018a610a1d565b9490931690613d01368b61478b565b600f0b612cc4565b91016fffffffffffffffffffffffffffffffff80613dee83614761565b50613ff960a0820161477e565b1561403c5760e0613fcf613c6c613fc76fffffffffffffffffffffffffffffffff614031613c6c61402c6020890161324e565b6146e2565b945050505050613f73565b60e0613fcf613c6c613fc76fffffffffffffffffffffffffffffffff614031613c6c61402c8861324e565b601681036140e15750806140b06020612ffa9335920135917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c6140aa826146e2565b91614526565b7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c6140db826143b0565b91614429565b601081036141605750602081013590356140fa816146e2565b91808311614130575090612ffa917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c90614526565b90507f12bacdd3000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b601381036141df575060208101359035614179816143b0565b918083106141af575090612ffa917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c90614429565b90507f8b063d73000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b91906009830361423b57612ffa91925080359060408101355f1461422e576140aa8260207f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c935b01356144e5565b6140aa8260203093614227565b6012830361426757612ffa9192508035906140db82604061425f602085013561326f565b9301356144d1565b60148314614276575050613f1d565b612ffa9192508035906140db6040614291602084013561326f565b92013561429d846143b0565b613a1b565b73ffffffffffffffffffffffffffffffffffffffff821673ffffffffffffffffffffffffffffffffffffffff8216105f14610a855791565b91612fb39073ffffffffffffffffffffffffffffffffffffffff947fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519181602084019460601b16845260601b1660348201526028815261433e604882612c49565b519020612f87604051938492602084019687917fffffffffffffffffffffffffffffffffffffffff000000000000000000000000605594927fff00000000000000000000000000000000000000000000000000000000000000855260601b166001840152601583015260358201520190565b6143db81307f0000000000000000000000000000000000000000000000000000000000000000614888565b905f82126143e7575090565b73ffffffffffffffffffffffffffffffffffffffff907f4c085bf1000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b909173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156102e0575f928360649273ffffffffffffffffffffffffffffffffffffffff948560405198899788967f0b0d9c0900000000000000000000000000000000000000000000000000000000885216600487015216602485015260448401525af18015610e2c5761346f5750565b90816144e1576132c191506143b0565b5090565b907f80000000000000000000000000000000000000000000000000000000000000008203614517576132c19150614922565b816144e1576132c191506146e2565b73ffffffffffffffffffffffffffffffffffffffff16806145e35750506020600491604051928380927f11da60b400000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af18015610e2c576145b85750565b6145d99060203d6020116145dc575b6145d18183612c49565b810190612d9c565b50565b503d6145c7565b909173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156102e057604051927fa58411940000000000000000000000000000000000000000000000000000000084525f938160048201525f8160248183885af18015610e2c576146c1575b508291602093859661467893612fcf565b6004604051809581937f11da60b40000000000000000000000000000000000000000000000000000000083525af19081156146b557506145b85750565b604051903d90823e3d90fd5b614678919450916146d55f60209594612c49565b825f959250509192614667565b61470d81307f0000000000000000000000000000000000000000000000000000000000000000614888565b905f821361471f57506132c190612cc4565b73ffffffffffffffffffffffffffffffffffffffff907f3351b260000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b356fffffffffffffffffffffffffffffffff811681036102e05790565b3580151581036102e05790565b91908260a09103126102e0576040516147a381612be4565b60806147ef8183956147b481612d5d565b85526147c260208201612d5d565b60208601526147d360408201612d7e565b60408601526147e460608201612d8e56
15b606086015201612d5d565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102e0570180359067ffffffffffffffff82116102e057602001918160051b360383136102e057565b91908110156109f05760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61813603018212156102e0570190565b73ffffffffffffffffffffffffffffffffffffffff809381602094165f52168252602460405f2060405194859384927ff135baaa0000000000000000000000000000000000000000000000000000000084526004840152165afa908115610e2c575f916148f3575090565b90506020813d60201161491a575b8161490e60209383612c49565b810103126102e0575190565b3d9150614901565b73ffffffffffffffffffffffffffffffffffffffff168061494257504790565b6020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa908115610e2c575f916148f3575090565b906fffffffffffffffffffffffffffffffff82168092036149a757565b7f93dafdf1000000000000000000000000000000000000000000000000000000005f5260045ffd5b608090614aad6020939573ffffffffffffffffffffffffffffffffffffffff97875f14614b3f57886401000276a45b60405199614a0b8b612c2d565b1515998a8152888101908a82528360408201931683526040519c8d998a997ff3cd914c000000000000000000000000000000000000000000000000000000008b528281511660048c0152828d8201511660248c015262ffffff60408201511660448c0152606081015160020b60648c0152015116608489015251151560a48801525160c4870152511660e4850152610120610104850152610124840191612cf0565b03815f73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af1928315610e2c575f93614b0b575b505f1303614b0557600f0b90565b60801d90565b9092506020813d602011614b37575b81614b2760209383612c49565b810103126102e05751915f614af7565b3d9150614b1a565b8873fffd8963efd1fc6a506488495d951d5263988d256149fe565b614aad6080929573ffffffffffffffffffffffffffffffffffffffff9760209596898116155f14614ba057508715614b3f57886401000276a460405199614a0b8b612c2d565b89906149fe565b905f6080604051614bb781612be4565b8281528260208201528260408201528260608201520152614bd78261324e565b73ffffffffffffffffffffffffffffffffffffffff82169173ffffffffffffffffffffffffffffffffffffffff82168084105f14614caf575073ffffffffffffffffffffffffffffffffffffffff905b1680921492602081013562ffffff81168091036102e0576040820135918260020b8093036102e057606001359273ffffffffffffffffffffffffffffffffffffffff84168094036102e05773ffffffffffffffffffffffffffffffffffffffff9060405195614c9587612be4565b865216602085015260408401526060830152608082015291565b91505073ffffffffffffffffffffffffffffffffffffffff8291614c27565b5f81600f0b126149a7576fffffffffffffffffffffffffffffffff169056fea164736f6c634300081a000a","deployedBytecode":"0x60c060405260043610156100c6575b3615610018575f80fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633141580610086575b61005e57005b7f38bbd576000000000000000000000000000000000000000000000000000000005f5260045ffd5b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016331415610058565b5f3560e01c806324856bc3146108685780633593564c14610707578063817122dc1461069957806391dd73461461054b578063d0c9f6cb146104dd578063d737d0c71461046d578063dc4c90d3146103ff5763fa461e330361000e57346102e05760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760243560043560443567ffffffffffffffff81116102e057610177903690600401610942565b5f8313918215806103f5575b6103cd578181016040828203126102e057813567ffffffffffffffff81116102e057820181601f820112156102e05780356101bd81612c8a565b926101cb6040519485612c49565b818452602082840101116102e0575f928160208094018483013701015260208101359173ffffffffffffffffffffffffffffffffffffffff83168093036102e05761021591612e33565b90601790602b83106103a5578035968760601c9561024362ffffff8585013560601c9a60481c168a89612e86565b73ffffffffffffffffffffffffffffffffffffffff3391160361037d571561037357508685105b156102805750505061027e93503391612fcf565b005b91935091939482602b0180602b116103465784106102e457508282116102e05781019103907f80000000000000000000000000000000000000000000000000000000000000008410156102e05761027e936102db3391612cc4565b613061565b5f80fd5b925050507faf28d9864a81dfdf71cab65f4e5d79a0cf9b0839
105fb8971425e6cb581b3f6929291925c821161031e5761027e923391612fcf565b7f739dbe52000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b955084871061026a565b7f32b13d91000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f3b99b53d000000000000000000000000000000000000000000000000000000005f5260045ffd5b7f316cf0eb000000000000000000000000000000000000000000000000000000005f5260045ffd5b505f851315610183565b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760207f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102e05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760043567ffffffffffffffff81116102e05761059a903690600401610942565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163303610671576105e091613479565b90818303610649575f5b83811061061d57610619604051610602602082612c49565b5f81526040519182916020835260208301906109a1565b0390f35b8061064361062e60019387896109e4565b3560f81c61063d838787610a6e565b91613b0c565b016105ea565b7faaad13f7000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fae18210a000000000000000000000000000000000000000000000000000000005f5260045ffd5b346102e0575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e057602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b60607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760043567ffffffffffffffff81116102e057610751903690600401610942565b60243567ffffffffffffffff81116102e057610771903690600401610970565b916044354211610840573330146108375773ffffffffffffffffffffffffffffffffffffffff7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c1661080f576107ea93337f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085d610a89565b5f7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085d005b7f6f5ffb7e000000000000000000000000000000000000000000000000000000005f5260045ffd5b61027e93610a89565b7f5bf6f916000000000000000000000000000000000000000000000000000000005f5260045ffd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102e05760043567ffffffffffffffff81116102e0576108b2903690600401610942565b60243567ffffffffffffffff81116102e0576108d2903690600401610970565b913330146108375773ffffffffffffffffffffffffffffffffffffffff7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c1661080f576107ea93337f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085d610a89565b9181601f840112156102e05782359167ffffffffffffffff83116102e057602083818601950101116102e057565b9181601f840112156102e05782359167ffffffffffffffff83116102e0576020808501948460051b0101116102e057565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602080948051918291828752018686015e5f8582860101520116010190565b908210156109f0570190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102e0570180359067ffffffffffffffff82116102e0576020019181360383136102e057565b908210156109f057610a859160051b810190610a1d565b9091565b9290808203612bbc579291905f915b848310610aa6575050505050565b9091929394610ab68487876109e4565b3592610ac3858285610a6e565b979092606097603f8760f81c1695600196602181105f14612a215760108110156122b55760088110156115095780610eeb5750610b0560208701359b87612e5b565b9590608088013515610ee4577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c9c5b610b3f893561326f565b9d9188816080527f80000000000000000000000000000000000000000000000000000000000000008314610e58575b50505b604260a052602b7f800000000000000000000000000000000000000000000000000000000000000082101
156102e05760a0518f908a10610e52575030915b8982116102e05760409173ffffffffffffffffffffffffffffffffffffffff5f6080513595610cb2610c2b610c5d85610c018b60601c6017608051013560601c62ffffff8183109e60481c1691612e86565b16968a8614610e37576401000276a49b5b878b519485938d60208601526060850190608051612cf0565b91168b830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612c49565b8488519a8b98899788967f128acb080000000000000000000000000000000000000000000000000000000088521660048701528b6024870152604486015216606484015260a0608484015260a48301906109a1565b03925af1908115610e2c575f905f92610df0575b610cd6935015610de95750612cc4565b60a0519096908110610d1d573090806017116102e0576080805160170190527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe90196610b71565b50979396929a50979490989360409091013511610dc1575b159081610d96575b50610d4f575060010191909392610a98565b90610d926040519283927f2c4029e900000000000000000000000000000000000000000000000000000000845260048401526040602484015260448301906109a1565b0390fd5b7f8000000000000000000000000000000000000000000000000000000000000000915016155f610d3d565b7f39d35496000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050612cc4565b9150506040823d8211610e24575b81610e0b60409383612c49565b810103126102e057816020610cd6935191015191610cc6565b3d9150610dfe565b6040513d5f823e3d90fd5b73fffd8963efd1fc6a506488495d951d5263988d259b610c12565b91610baf565b6014919250106103a5576020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301523560601c5afa908115610e2c575f91610eb3575b505f80610b6e565b90506020813d8211610edc575b81610ecd60209383612c49565b810103126102e057515f610eab565b3d9150610ec0565b309c610b35565b6001819c939b96999598949c9a97929a145f146110245750610f1260208201359282612e5b565b60808301351561101d577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c915b6040610f4c853561326f565b9401357faf28d9864a81dfdf71cab65f4e5d79a0cf9b083905fb8971425e6cb581b3f6925d7f80000000000000000000000000000000000000000000000000000000000000008510156102e057610fa6936102db86612cc4565b9091901561100e5750610fb890612cc4565b03610fe6575f7faf28d9864a81dfdf71cab65f4e5d79a0cf9b083905fb8971425e6cb581b3f6925d5b610d35565b7fd4e0248e000000000000000000000000000000000000000000000000000000005f5260045ffd5b6110189150612cc4565b610fb8565b3091610f40565b6002810361106e5750610fe191506040810135907f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c611067602083013561326f565b91356133bd565b6003810361128a57508035810163ffffffff60208301351682019263ffffffff8435169260208086019585010191011061127d5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c93833b156102e05773ffffffffffffffffffffffffffffffffffffffff604051957f2a2d80d10000000000000000000000000000000000000000000000000000000087521660048601526060602486015260c485019280357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156102e05781016020813591019467ffffffffffffffff82116102e0578160071b360386136102e05760606064890152819052869460e48601949392915f905b808210611255575050506112305f96948694889460408573ffffffffffffffffffffffffffffffffffffffff6111f460208b9901612d5d565b166084880152013560a48601527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc858403016044860152612cf0565b03925af18015610e2c57611245575b50610d35565b5f61124f91612c49565b5f61123f565b919650919293946080808261126c6001948b612dbe565b0197019201889695949392916111bb565b633b99b53d5f526004601cfd5b909150600481036113df57506112a3602082013561326f565b9073ffffffffffffffffffffffffffffffffffffffff8060408301351691351680155f146113195750479081106112f157806112e1575b5050610d35565b6112ea91613511565b5f806112da565b7f6a12f104000000000000000000000000000000000000000000000000000000005f5260045ffd5b91604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481875afa928315610e2c575f936113ac575b5082106113845781611373575b505050610d35565b61137c92613a5d565b5f808061136b565b7f675cae38000000000000000000000000000000000000000000000000000000005f5260045ffd5b9092506020813d82116113d7575b816113c760209383612c49565b810103126102e05751915f61135e565b3d91506113ba565b600581036114065750806040610fe1920135906113ff602082013561326f565b90356132e1565b600681036114de575060408101359073ffffffffffffffffffffffffffffffffffffffff611437602083013561326f565b91351680611453575061144d610fe19247613a1b565b90613511565b906040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481865afa908115610e2c575f916114ab575b50610fe1936114a591613a1b565b91613a5d565b90506020813d82116114d6575b816114c560209383612c49565b810103126102e05751610fe1611497565b3d91506114b8565b7fd76a1e9e000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b6008819c929a97939b96999598949c145f146117be575061152f602083
10135918361322a565b906080840135156117b7577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c915b611568853561326f565b9282156109f0576115788261324e565b83600110156109f05761159a6115e2916115946020860161324e565b906142a2565b907f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006142da565b94858161179d575b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82018281116103465761163f61163a73ffffffffffffffffffffffffffffffffffffffff9285856132c4565b61324e565b1693604051927f70a0823100000000000000000000000000000000000000000000000000000000845273ffffffffffffffffffffffffffffffffffffffff8516928360048601526020856024818a5afa948515610e2c575f95611760575b50946116ad9291602095966135cf565b6024604051809581937f70a0823100000000000000000000000000000000000000000000000000000000835260048301525afa918215610e2c575f9261172c575b5060406116fe92930135926132d4565b1015610d35577f849eaf98000000000000000000000000000000000000000000000000000000005f5260045ffd5b91506020823d8211611758575b8161174660209383612c49565b810103126102e05790519060406116ee565b3d9150611739565b92919450946020833d8211611795575b8161177d60209383612c49565b810103126102e05791519194919390916116ad61169d565b3d9150611770565b6117af926117aa8561324e565b612fcf565b5f80856115ea565b309161155e565b60098103611b2857506117d1908261322a565b608083013515611b21577f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c915b611809843561326f565b917f0000000000000000000000000000000000000000000000000000000000000000937f0000000000000000000000000000000000000000000000000000000000000000955f9560028510611af9576020820135977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8601868111610346579190825b6118e2575050506040013586116118ba5782156109f057610fe195856118b5926117aa8561324e565b6135cf565b7f8ab0bc16000000000000000000000000000000000000000000000000000000005f5260045ffd5b90919897507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8901978989116103465761192361163a6119459a89896132c4565b61193a61193461163a8d8b8b6132c4565b826142a2565b8185879d939d6142da565b90604051907f0902f1ac00000000000000000000000000000000000000000000000000000000825260608260048173ffffffffffffffffffffffffffffffffffffffff87165afa918215610e2c575f905f93611a9c575b5073ffffffffffffffffffffffffffffffffffffffff6dffffffffffffffffffffffffffff8082931694169d169116145f14611a965799905b9980158015611a8e575b611a6657826119ed916139d1565b916103e88302928084046103e8149015171561034657611a0c916132d4565b6103e58102908082046103e5149015171561034657611a2a916139e4565b6001810180911161034657988015610346577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0191908261188c565b7f7b9c8916000000000000000000000000000000000000000000000000000000005f5260045ffd5b5081156119df565b906119d5565b6dffffffffffffffffffffffffffff80945073ffffffffffffffffffffffffffffffffffffffff9250611ae6839260603d8111611af2575b611ade8183612c49565b810190613599565b5095909350505061199c565b503d611ad4565b7f20db8267000000000000000000000000000000000000000000000000000000005f5260045ffd5b30916117ff565b600a8103611c5a575063ffffffff60c08301351682019163ffffffff833516918160208086019585010191011061127d5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c92813b156102e0575f809461123060a09773ffffffffffffffffffffffffffffffffffffffff94604051998a98899788967f2b67b570000000000000000000000000000000000000000000000000000000008852166004870152611c196024870182612dbe565b73ffffffffffffffffffffffffffffffffffffffff611c3a60808301612d5d565b1660a4870152013560c485015261010060e4850152610104840191612cf0565b600b8103611e0a575050611c736020820135913561326f565b90807f80000000000000000000000000000000000000000000000000000000000000008103611ddb575050475b80611cac575050610d35565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691823b156102e057604051907fd0e30db00000000000000000000000000000000000000000000000000000000082525f8260048186885af1918215610e2c5773ffffffffffffffffffffffffffffffffffffffff92611dcb575b501690308203611d4e575b506112da565b60446020925f60405195869485937fa9059cbb000000000000000000000000000000000000000000000000000000008552600485015260248401525af18015610e2c57611d9d575b8080611d48565b611dbd9060203d8111611dc4575b611db58183612c49565b810190613212565b505f611d96565b503d611dab565b5f611dd591612c49565b5f611d3d565b471015611ca0577f6a12f104000000000000000000000000000000000000000000000000000000005f5260045ffd5b600c8103611f74575050611e1e813561326f565b9073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481855afa928315610e2c575f93611f40575b506020013582106112f15781611eb257505050610d35565b803b156102e0575f80916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528760048401525af18015610e2c57611f30575b503073ffffffffffffffffffffffffffffffffffffffff831603611f20575b8061136b565b611f2991613511565b5f80611f1a565b5f611f3a91612c49565b5f611efb565b9092506020813d8211611f6c575b81611f5b60209383612c49565b810103126102e05751916020611e9a565b3d9150611f4e565b600d819c939c9b929597989b99949699145f146121aa57508a358b0198893594611fa66020808d019e8d030187612fc2565b116103a55773ffffffffffffffffffffffffffffffffffffffff7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c169a935f5b8681101561204c578c73ffffffffffffffffffffffffffffffffffffffff61201660208f8560071b010161324e565b160361202457600101611fe7565b7fe7002877000000000000000000000000000000000000000000000000000000005f5260045ffd5b50989593979694929b919a50985073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156102e0576040517f0d58b1db000000000000000000000000000000000000000000000000000000008152602060048201526024810184905292839160448301915f9
105b8082106120fc5750505091815f81819503925af18015610e2c576112455750610d35565b9193509160808060019273ffffffffffffffffffffffffffffffffffffffff61212488612d5d565b16815273ffffffffffffffffffffffffffffffffffffffff61214860208901612d5d565b16602082015273ffffffffffffffffffffffffffffffffffffffff61216f60408901612d5d565b16604082015273ffffffffffffffffffffffffffffffffffffffff61219660608901612d5d565b1660608201520194019201859392916120d8565b80929b93989550600e919a97969450145f146114de5750604051907f70a0823100000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff813516600483015260208260248173ffffffffffffffffffffffffffffffffffffffff84860135165afa918215610e2c575f92612281575b5060400135111580610fe15791506040517fa32816720000000000000000000000000000000000000000000000000000000060208201526004815261227b602482612c49565b91610d35565b9091506020813d82116122ad575b8161229c60209383612c49565b810103126102e05751906040612235565b3d915061228f565b6010819c929a97939b96999598949c145f146123d0575061230e915f9160405193849283927f48c89491000000000000000000000000000000000000000000000000000000008452602060048501526024840191612cf0565b03818373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af18015610e2c5761235a5750610d35565b3d805f833e6123698183612c49565b8101906020818303126102e05780519067ffffffffffffffff82116102e0570181601f820112156102e057805161239f81612c8a565b926123ad6040519485612c49565b818452602082840101116102e0575f928160208094018483015e0101525f61123f565b80929495506011919350145f146124b25750907fffffffff000000000000000000000000000000000000000000000000000000008135167f7ac2ff7b0000000000000000000000000000000000000000000000000000000081036124875750815f929183926040519283928337810183815203908273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19061227b612d2e565b7ff801e525000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b601281036127b257507fffffffff000000000000000000000000000000000000000000000000000000008235167f0c49ccbe0000000000000000000000000000000000000000000000000000000081148015612789575b8015612760575b1561248757506004820135917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c9273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016936040517f6352211e000000000000000000000000000000000000000000000000000000008152826004820152602081602481895afa908115610e2c5773ffffffffffffffffffffffffffffffffffffffff9182915f91612742575b50169116908082149182156126ae575b821561263d575b505015612612575091815f809481946040519384928337810182815203925af19061227b612d2e565b7fbb25d4c5000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b909150604051917fe985e9c500000000000000000000000000000000000000000000000000000000835260048301526024820152602081604481885afa908115610e2c575f91612690575b505f806125e9565b6126a8915060203d8111611dc457611db58183612c49565b5f612688565b91506040517f081812fc0000000000000000000000000000000000000000000000000000000081528360048201526020816024818a5afa908115610e2c57839173ffffffffffffffffffffffffffffffffffffffff915f91612714575b501614916125e2565b612735915060203d811161273b575b61272d8183612c49565b8101906131e6565b5f61270b565b503d612723565b61275a915060203d811161273b5761272d8183612c49565b5f6125d2565b507f42966c68000000000000000000000000000000000000000000000000000000008114612510565b507ffc6f7865000000000000000000000000000000000000000000000000000000008114612509565b601381036128bd5750505f809160405173ffffffffffffffffffffffffffffffffffffffff60a060208301937f6276cbbe
10000000000000000000000000000000000000000000000000000000085528261280b82612d5d565b1660248501528261281e60208301612d5d565b16604485015262ffffff61283460408301612d7e565b16606485015261284660608201612d8e565b60020b60848501528261285b60808301612d5d565b1660a485015201351660c482015260c4815261287860e482612c49565b51908273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19061227b612d2e565b601481036114de57507fffffffff000000000000000000000000000000000000000000000000000000008235167fdd46508f0000000000000000000000000000000000000000000000000000000081036124875750806004116102e05761295261294c7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc830160048501612e33565b90612e33565b5f5b8181106129b6575050505f91829147918160405192839283378101848152039173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19061227b612d2e565b6129c18183856109e4565b3560f81c8015908115612a16575b8115612a0b575b506129e357600101612954565b7f5d1d0f9f000000000000000000000000000000000000000000000000000000005f5260045ffd5b60039150145f6129d6565b6001811491506129cf565b9098959199506021819b939b989598979497145f146114de575090612a4591613479565b612a886040959395519460208601967f24856bc3000000000000000000000000000000000000000000000000000000008852604060248801526064870191612cf0565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc858503016044860152818452602084019160208160051b86010194845f907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603015b848310612b425750505050505050509181612b335f94938594037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612c49565b519082305af19061227b612d2e565b90919293949596977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08582030188528835828112156102e0578301906020823592019167ffffffffffffffff81116102e05780360383136102e057612bac60209283928b95612cf0565b9a01980196959493019190612aee565b7fff633a38000000000000000000000000000000000000000000000000000000005f5260045ffd5b60a0810190811067ffffffffffffffff821117612c0057604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6060810190811067ffffffffffffffff821117612c0057604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612c0057604052565b67ffffffffffffffff8111612c0057601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b7f80000000000000000000000000000000000000000000000000000000000000008114610346575f0390565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b3d15612d58573d90612d3f82612c8a565b91612d4d6040519384612c49565b82523d5f602084013e56
15b606090565b359073ffffffffffffffffffffffffffffffffffffffff821682036102e057565b359062ffffff821682036102e057565b35908160020b82036102e057565b908160209103126102e0575190565b359065ffffffffffff821682036102e057565b65ffffffffffff612e2d6060809373ffffffffffffffffffffffffffffffffffffffff612dea82612d5d565b16865273ffffffffffffffffffffffffffffffffffffffff612e0e60208301612d5d565b16602087015283612e2160408301612dab565b16604087015201612dab565b16910152565b909163ffffffff82351682019263ffffffff8435169260208086019585010191011061127d57565b909163ffffffff60608301351682019263ffffffff8435169260208086019585010191011061127d57565b9073ffffffffffffffffffffffffffffffffffffffff9283821684841611612fba575b62ffffff90846040519381602086019616865216604084015216606082015260608152612ed7608082612c49565b5190206040517fff00000000000000000000000000000000000000000000000000000000000000602082019081527f000000000000000000000000000000000000000000000000000000000000000060601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602183015260358201929092527f00000000000000000000000000000000000000000000000000000000000000006055820152612fb381607581015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612c49565b5190201690565b909190612ea9565b9190820180921161034657565b9092919073ffffffffffffffffffffffffffffffffffffffff84163003612ffc57612ffa93506132e1565b565b919273ffffffffffffffffffffffffffffffffffffffff84116130395773ffffffffffffffffffffffffffffffffffffffff612ffa9416926133bd565b7fc4bd89a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b939290602b82106103a5578235938460601c92601785013560601c9380851094859760481c62ffffff169061309592612e86565b73ffffffffffffffffffffffffffffffffffffffff1692845f1460409673ffffffffffffffffffffffffffffffffffffffff809561312a5f9661317d956131cb576401000276a4925b846130f88e51978f94899560208701526060860191612cf0565b91168d830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101855284612c49565b89519b8c998a9889977f128acb080000000000000000000000000000000000000000000000000000000089521660048801526024870152604486015216606484015260a0608484015260a48301906109a1565b03925af18015610e2c575f925f9161319457509192565b9250506040823d6040116131c3575b816131b060409383612c49565b810103126102e057602082519201519192565b3d91506131a3565b73fffd8963efd1fc6a506488495d951d5263988d25926130de565b908160209103126102e0575173ffffffffffffffffffffffffffffffffffffffff811681036102e05790565b908160209103126102e0575180151581036102e05790565b916060830135830191613247602084359581860195030185612fc2565b116103a557565b3573ffffffffffffffffffffffffffffffffffffffff811681036102e05790565b73ffffffffffffffffffffffffffffffffffffffff8116600181036132b55750507f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c90565b6002036132c157503090565b90565b91908110156109f05760051b0190565b9190820391821161034657565b90919073ffffffffffffffffffffffffffffffffffffffff16806133095750612ffa91613511565b7f8000000000000000000000000000000000000000000000000000000000000000821461333b575b91612ffa92613a5d565b9050604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481855afa8015610e2c575f90613389575b90925090613331565b506020833d6020116133b5575b816133a360209383612c49565b810103126102e057612ffa9251613380565b3d9150613396565b919273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691823b156102e0575f73ffffffffffffffffffffffffffffffffffffffff9384829681608496816040519b8c9a8b997f36c78516000000000000000000000000000000000000000000000000000000008b521660048a01521660248801521660448601521660648401525af18015610e2c5761346f5750565b5f612ffa91612c49565b604081351891606082019363ffffffff6040840135169363ffffffe0601f8601169060608201602086013518179084019260608401359463ffffffff861694641fffffffe0608082019760051b1680915f925b8084106134e457506080925001019101101761127d57565b90916020809163ffffffe0601f60808089890101359b848d18179b880101350116010193019291906134cc565b5f80809381935af11561352057565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152fd5b51906dffffffffffffffffffffffffffff821682036102e057565b908160609103126102e0576135ad8161357e565b9160406135bc6020840161357e565b92015163ffffffff811681036102e05790565b91600282106139a95781156109f0576135e78361324e565b82600110156109f057613603906115946020869795960161324e565b50927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101937ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8201955f906020937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08501965b88841061368a5750505050505050505050565b61369861163a8584866132c4565b9473ffffffffffffffffffffffffffffffffffffffff6136bf61163a6001880186886132c4565b921695604051917f0902f1ac0000000000000000000000000000000000000000000000000000000083526060836004818b5afa918215610e2c57895f945f94613956575b5073ffffffffffffffffffffffffffffffffffffffff806dffffffffffffffffffffffffffff80602496979816971693169416841494855f146139505791935b604051938480927f70a082310000000000000000000000000000000000000000000000000000000082528d60048301525afa918215610e2c575f92613921575b5080820392811592838015613919575b611a6657826103e586029586046103e51491141715610346576137b690846139d1565b916103e882029182046103e8141715610346576137dc926137d691612fc2565b906139e4565b9015613912575f90915b8b86101561390957906138076138519261159461163a60028a01888a6132c4565b8193917f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006142da565b915b96604051906138628a83612c49565b5f82528b368b840137803b156102e0576138dd945f8094604051978895869485937f022c0d9f0000000000000000000000000000000000000000000000000000000085526004850152602484015273ffffffffffffffffffffffffffffffffffffffff891660448401526080606484015260848301906109a1565b03925af1918215610e2c576001926138f9575b50930192613677565b5f61390391612c49565b5f6138f0565b5087905f613853565b5f916137e6565b508115613793565b9091508981813d8311613949575b6139398183612c49565b810103126102e05751905f613783565b503d61392f565b93613743565b6dffffffffffffffffffffffffffff9550602493945073ffffffffffffffffffffffffffffffffffffffff8661399a829360603d8111611af257611ade8183612c49565b50989098979650505050613703565b7fae52ad0c000000000000000000000000000000000000000000000000000000005f5260045ffd5b8181029291811591840414171561034657565b81156139ee570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b6127108211613a355761271091613a31916139d1565b0490565b7fdeaa01e6000000000000000000000000000000000000000000000000000000005f5260045ffd5b5f9182604492602095604051937fa9059cbb000000000000000000000000000000000000000000000000000000008552600485015260248401525af13d15601f3d1160015f511416171615613aae57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152fd5b90915060098110156140675760058103613c7757508035016020810190613b3382826147f4565b90505f92613b408361324e565b90613b4d60408501614761565b906fffffffffffffffffffffffffffffffff821615613c5e575b92915f915b838310613bed5750505050506060016fffffffffffffffffffffffffffffffff80613b9683614761565b169216918210613ba4575050565b613bbe6fffffffffffffffffffffffffffffffff91614761565b7f8b063d73000000000000000000000000000000000000000000000000000000005f521660045260245260445ffd5b8496506fffffffffffffffffffffffffffffffff613c4291613c29613c2286613c1c613c479798999a8c6147f4565b90614848565b9586614ba7565b613c366080880188610a1d565b949093165f03916149cf56
15b614cce565b946001613c54879361324e565b9194930191613b6c565b9050613c71613c6c836143b0565b61498a565b90613b67565b60048103613d745750803501613c8f60c08201614761565b6fffffffffffffffffffffffffffffffff811615613d23575b613d06613c4260e092613cd86fffffffffffffffffffffffffffffffff613cd160a0880161477e565b9216612cc4565b90613ce6610100870161324e565b613cf4610120880188610a1d565b939092613d01368a61478b565b614b5a565b91016fffffffffffffffffffffffffffffffff80613b9683614761565b50613d3060a0820161477e565b15613d5a5760e0613d06613c42613d51613c6c613d4c8661324e565b6143b0565b92505050613ca8565b60e0613d06613c42613d51613c6c613d4c6020870161324e565b60078103613f1057508035016020810190613d8f82826147f4565b5f939150613d9f60408401614761565b613da88461324e565b916fffffffffffffffffffffffffffffffff821615613efc575b92919290815b613e4557505050506060016fffffffffffffffffffffffffffffffff80613dee83614761565b169216918211613dfc575050565b613e166fffffffffffffffffffffffffffffffff91614761565b7f12bacdd3000000000000000000000000000000000000000000000000000000005f521660045260245260445ffd5b829395506fffffffffffffffffffffffffffffffff613ebc91613ea2613e9b613e72613ec696978a6147f4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff890191614848565b9889614ba7565b90613eb060808b018b610a1d565b949093169115906149cf565b600f0b5f0361498a565b937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613ef2869261324e565b9392019081613dc8565b9050613f0a613c6c836146e2565b90613dc2565b919060068314613f485750505b7f5cda29d7000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b809192503501613f5a60c08201614761565b6fffffffffffffffffffffffffffffffff811615613fec575b613fcf613c6c613fc76fffffffffffffffffffffffffffffffff60e094613f9c60a0880161477e565b613fa9610100890161324e565b90613fb86101208a018a610a1d565b9490931690613d01368b61478b565b600f0b612cc4565b91016fffffffffffffffffffffffffffffffff80613dee83614761565b50613ff960a0820161477e565b1561403c5760e0613fcf613c6c613fc76fffffffffffffffffffffffffffffffff614031613c6c61402c6020890161324e565b6146e2565b945050505050613f73565b60e0613fcf613c6c613fc76fffffffffffffffffffffffffffffffff614031613c6c61402c8861324e565b601681036140e15750806140b06020612ffa9335920135917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c6140aa826146e2565b91614526565b7f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c6140db826143b0565b91614429565b601081036141605750602081013590356140fa816146e2565b91808311614130575090612ffa917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c90614526565b90507f12bacdd3000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b601381036141df575060208101359035614179816143b0565b918083106141af575090612ffa917f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c90614429565b90507f8b063d73000000000000000000000000000000000000000000000000000000005f5260045260245260445ffd5b91906009830361423b57612ffa91925080359060408101355f1461422e576140aa8260207f0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a7085c935b01356144e5565b6140aa8260203093614227565b6012830361426757612ffa9192508035906140db82604061425f602085013561326f565b9301356144d1565b60148314614276575050613f1d565b612ffa9192508035906140db6040614291602084013561326f565b92013561429d846143b0565b613a1b565b73ffffffffffffffffffffffffffffffffffffffff821673ffffffffffffffffffffffffffffffffffffffff8216105f14610a855791565b91612fb39073ffffffffffffffffffffffffffffffffffffffff947fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519181602084019460601b16845260601b1660348201526028815261433e604882612c49565b519020612f87604051938492602084019687917fffffffffffffffffffffffffffffffffffffffff000000000000000000000000605594927fff00000000000000000000000000000000000000000000000000000000000000855260601b166001840152601583015260358201520190565b6143db81307f0000000000000000000000000000000000000000000000000000000000000000614888565b905f82126143e7575090565b73ffffffffffffffffffffffffffffffffffffffff907f4c085bf1000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b909173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156102e0575f928360649273ffffffffffffffffffffffffffffffffffffffff948560405198899788967f0b0d9c0900000000000000000000000000000000000000000000000000000000885216600487015216602485015260448401525af18015610e2c5761346f5750565b90816144e1576132c191506143b0565b5090565b907f80000000000000000000000000000000000000000000000000000000000000008203614517576132c19150614922565b816144e1576132c191506146e2565b73ffffffffffffffffffffffffffffffffffffffff16806145e35750506020600491604051928380927f11da60b400000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af18015610e2c576145b85750565b6145d99060203d6020116145dc575b6145d18183612c49565b810190612d9c565b50565b503d6145c7565b909173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156102e057604051927fa58411940000000000000000000000000000000000000000000000000000000084525f938160048201525f8160248183885af18015610e2c576146c1575b508291602093859661467893612fcf565b6004604051809581937f11da60b40000000000000000000000000000000000000000000000000000000083525af19081156146b557506145b85750565b604051903d90823e3d90fd5b614678919450916146d55f60209594612c49565b825f959250509192614667565b61470d81307f0000000000000000000000000000000000000000000000000000000000000000614888565b905f821361471f57506132c190612cc4565b73ffffffffffffffffffffffffffffffffffffffff907f3351b260000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b356fffffffffffffffffffffffffffffffff811681036102e05790565b3580151581036102e05790565b91908260a09103126102e0576040516147a381612be4565b60806147ef8183956147b481612d5d565b85526147c260208201612d5d565b60208601526147d360408201612d7e565b60408601526147e460608201612d8e56
15b606086015201612d5d565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102e0570180359067ffffffffffffffff82116102e057602001918160051b360383136102e057565b91908110156109f05760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61813603018212156102e0570190565b73ffffffffffffffffffffffffffffffffffffffff809381602094165f52168252602460405f2060405194859384927ff135baaa0000000000000000000000000000000000000000000000000000000084526004840152165afa908115610e2c575f916148f3575090565b90506020813d60201161491a575b8161490e60209383612c49565b810103126102e0575190565b3d9150614901565b73ffffffffffffffffffffffffffffffffffffffff168061494257504790565b6020602491604051928380927f70a082310000000000000000000000000000000000000000000000000000000082523060048301525afa908115610e2c575f916148f3575090565b906fffffffffffffffffffffffffffffffff82168092036149a757565b7f93dafdf1000000000000000000000000000000000000000000000000000000005f5260045ffd5b608090614aad6020939573ffffffffffffffffffffffffffffffffffffffff97875f14614b3f57886401000276a45b60405199614a0b8b612c2d565b1515998a8152888101908a82528360408201931683526040519c8d998a997ff3cd914c000000000000000000000000000000000000000000000000000000008b528281511660048c0152828d8201511660248c015262ffffff60408201511660448c0152606081015160020b60648c0152015116608489015251151560a48801525160c4870152511660e4850152610120610104850152610124840191612cf0565b03815f73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af1928315610e2c575f93614b0b575b505f1303614b0557600f0b90565b60801d90565b9092506020813d602011614b37575b81614b2760209383612c49565b810103126102e05751915f614af7565b3d9150614b1a565b8873fffd8963efd1fc6a506488495d951d5263988d256149fe565b614aad6080929573ffffffffffffffffffffffffffffffffffffffff9760209596898116155f14614ba057508715614b3f57886401000276a460405199614a0b8b612c2d565b89906149fe565b905f6080604051614bb781612be4565b8281528260208201528260408201528260608201520152614bd78261324e565b73ffffffffffffffffffffffffffffffffffffffff82169173ffffffffffffffffffffffffffffffffffffffff82168084105f14614caf575073ffffffffffffffffffffffffffffffffffffffff905b1680921492602081013562ffffff81168091036102e0576040820135918260020b8093036102e057606001359273ffffffffffffffffffffffffffffffffffffffff84168094036102e05773ffffffffffffffffffffffffffffffffffffffff9060405195614c9587612be4565b865216602085015260408401526060830152608082015291565b91505073ffffffffffffffffffffffffffffffffffffffff8291614c27565b5f81600f0b126149a7576fffffffffffffffffffffffffffffffff169056fea164736f6c634300081a000a","linkReferences":{},"deployedLinkReferences":{}}')},34271:function(f){"use strict";f.exports=JSON.parse('{"Mt":[{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"}]}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.