UNPKG

snapper-sdk

Version:

An SDK for building applications on top of Snapper.

1 lines 184 kB
import{PublicKey as xt}from"@solana/web3.js";import{createTransferInstruction as po,TOKEN_PROGRAM_ID as pe,TOKEN_2022_PROGRAM_ID as Fn}from"@solana/spl-token";import _n from"bn.js";var St=9e15,lt=1e9,vn="0123456789abcdef",on="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",sn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Vn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-St,maxE:St,crypto:!1},Wi,$e,q=!0,un="[DecimalError] ",ct=un+"Invalid argument: ",Di=un+"Precision limit exceeded",qi=un+"crypto unavailable",Gi="[object Decimal]",Te=Math.floor,ge=Math.pow,bo=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,yo=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,go=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ui=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ve=1e7,W=7,Po=9007199254740991,Ao=on.length-1,Wn=sn.length-1,T={toStringTag:Gi};T.absoluteValue=T.abs=function(){var i=new this.constructor(this);return i.s<0&&(i.s=1),_(i)};T.ceil=function(){return _(new this.constructor(this),this.e+1,2)};T.clampedTo=T.clamp=function(i,e){var t,n=this,r=n.constructor;if(i=new r(i),e=new r(e),!i.s||!e.s)return new r(NaN);if(i.gt(e))throw Error(ct+e);return t=n.cmp(i),t<0?i:n.cmp(e)>0?e:new r(n)};T.comparedTo=T.cmp=function(i){var e,t,n,r,o=this,s=o.d,a=(i=new o.constructor(i)).d,c=o.s,u=i.s;if(!s||!a)return!c||!u?NaN:c!==u?c:s===a?0:!s^c<0?1:-1;if(!s[0]||!a[0])return s[0]?c:a[0]?-u:0;if(c!==u)return c;if(o.e!==i.e)return o.e>i.e^c<0?1:-1;for(n=s.length,r=a.length,e=0,t=n<r?n:r;e<t;++e)if(s[e]!==a[e])return s[e]>a[e]^c<0?1:-1;return n===r?0:n>r^c<0?1:-1};T.cosine=T.cos=function(){var i,e,t=this,n=t.constructor;return t.d?t.d[0]?(i=n.precision,e=n.rounding,n.precision=i+Math.max(t.e,t.sd())+W,n.rounding=1,t=ko(n,Yi(n,t)),n.precision=i,n.rounding=e,_($e==2||$e==3?t.neg():t,i,e,!0)):new n(1):new n(NaN)};T.cubeRoot=T.cbrt=function(){var i,e,t,n,r,o,s,a,c,u,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(q=!1,o=l.s*ge(l.s*l,1/3),!o||Math.abs(o)==1/0?(t=we(l.d),i=l.e,(o=(i-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=ge(t,1/3),i=Te((i+1)/3)-(i%3==(i<0?-1:2)),o==1/0?t="5e"+i:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+i),n=new d(t),n.s=l.s):n=new d(o.toString()),s=(i=d.precision)+3;;)if(a=n,c=a.times(a).times(a),u=c.plus(l),n=ie(u.plus(l).times(a),u.plus(c),s+2,1),we(a.d).slice(0,s)===(t=we(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!r&&t=="4999"){if(!r&&(_(a,i+1,0),a.times(a).times(a).eq(l))){n=a;break}s+=4,r=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(_(n,i+1,1),e=!n.times(n).times(n).eq(l));break}return q=!0,_(n,i,d.rounding,e)};T.decimalPlaces=T.dp=function(){var i,e=this.d,t=NaN;if(e){if(i=e.length-1,t=(i-Te(this.e/W))*W,i=e[i],i)for(;i%10==0;i/=10)t--;t<0&&(t=0)}return t};T.dividedBy=T.div=function(i){return ie(this,new this.constructor(i))};T.dividedToIntegerBy=T.divToInt=function(i){var e=this,t=e.constructor;return _(ie(e,new t(i),0,1,1),t.precision,t.rounding)};T.equals=T.eq=function(i){return this.cmp(i)===0};T.floor=function(){return _(new this.constructor(this),this.e+1,3)};T.greaterThan=T.gt=function(i){return this.cmp(i)>0};T.greaterThanOrEqualTo=T.gte=function(i){var e=this.cmp(i);return e==1||e===0};T.hyperbolicCosine=T.cosh=function(){var i,e,t,n,r,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,r=o.d.length,r<32?(i=Math.ceil(r/3),e=(1/ln(4,i)).toString()):(i=16,e="2.3283064365386962890625e-10"),o=Kt(s,1,o.times(e),new s(1),!0);for(var c,u=i,l=new s(8);u--;)c=o.times(o),o=a.minus(c.times(l.minus(c.times(l))));return _(o,s.precision=t,s.rounding=n,!0)};T.hyperbolicSine=T.sinh=function(){var i,e,t,n,r=this,o=r.constructor;if(!r.isFinite()||r.isZero())return new o(r);if(e=o.precision,t=o.rounding,o.precision=e+Math.max(r.e,r.sd())+4,o.rounding=1,n=r.d.length,n<3)r=Kt(o,2,r,r,!0);else{i=1.4*Math.sqrt(n),i=i>16?16:i|0,r=r.times(1/ln(5,i)),r=Kt(o,2,r,r,!0);for(var s,a=new o(5),c=new o(16),u=new o(20);i--;)s=r.times(r),r=r.times(a.plus(s.times(c.times(s).plus(u))))}return o.precision=e,o.rounding=t,_(r,e,t,!0)};T.hyperbolicTangent=T.tanh=function(){var i,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(i=n.precision,e=n.rounding,n.precision=i+7,n.rounding=1,ie(t.sinh(),t.cosh(),n.precision=i,n.rounding=e)):new n(t.s)};T.inverseCosine=T.acos=function(){var i,e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,o=t.rounding;return n!==-1?n===0?e.isNeg()?ve(t,r,o):new t(0):new t(NaN):e.isZero()?ve(t,r+4,o).times(.5):(t.precision=r+6,t.rounding=1,e=e.asin(),i=ve(t,r+4,o).times(.5),t.precision=r,t.rounding=o,i.minus(e))};T.inverseHyperbolicCosine=T.acosh=function(){var i,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(i=n.precision,e=n.rounding,n.precision=i+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,q=!1,t=t.times(t).minus(1).sqrt().plus(t),q=!0,n.precision=i,n.rounding=e,t.ln()):new n(t)};T.inverseHyperbolicSine=T.asinh=function(){var i,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(i=n.precision,e=n.rounding,n.precision=i+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,q=!1,t=t.times(t).plus(1).sqrt().plus(t),q=!0,n.precision=i,n.rounding=e,t.ln())};T.inverseHyperbolicTangent=T.atanh=function(){var i,e,t,n,r=this,o=r.constructor;return r.isFinite()?r.e>=0?new o(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(i=o.precision,e=o.rounding,n=r.sd(),Math.max(n,i)<2*-r.e-1?_(new o(r),i,e,!0):(o.precision=t=n-r.e,r=ie(r.plus(1),new o(1).minus(r),t+i,1),o.precision=i+4,o.rounding=1,r=r.ln(),o.precision=i,o.rounding=e,r.times(.5))):new o(NaN)};T.inverseSine=T.asin=function(){var i,e,t,n,r=this,o=r.constructor;return r.isZero()?new o(r):(e=r.abs().cmp(1),t=o.precision,n=o.rounding,e!==-1?e===0?(i=ve(o,t+4,n).times(.5),i.s=r.s,i):new o(NaN):(o.precision=t+6,o.rounding=1,r=r.div(new o(1).minus(r.times(r)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,r.times(2)))};T.inverseTangent=T.atan=function(){var i,e,t,n,r,o,s,a,c,u=this,l=u.constructor,d=l.precision,m=l.rounding;if(u.isFinite()){if(u.isZero())return new l(u);if(u.abs().eq(1)&&d+4<=Wn)return s=ve(l,d+4,m).times(.25),s.s=u.s,s}else{if(!u.s)return new l(NaN);if(d+4<=Wn)return s=ve(l,d+4,m).times(.5),s.s=u.s,s}for(l.precision=a=d+10,l.rounding=1,t=Math.min(28,a/W+2|0),i=t;i;--i)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(q=!1,e=Math.ceil(a/W),n=1,c=u.times(u),s=new l(u),r=u;i!==-1;)if(r=r.times(c),o=s.minus(r.div(n+=2)),r=r.times(c),s=o.plus(r.div(n+=2)),s.d[e]!==void 0)for(i=e;s.d[i]===o.d[i]&&i--;);return t&&(s=s.times(2<<t-1)),q=!0,_(s,l.precision=d,l.rounding=m,!0)};T.isFinite=function(){return!!this.d};T.isInteger=T.isInt=function(){return!!this.d&&Te(this.e/W)>this.d.length-2};T.isNaN=function(){return!this.s};T.isNegative=T.isNeg=function(){return this.s<0};T.isPositive=T.isPos=function(){return this.s>0};T.isZero=function(){return!!this.d&&this.d[0]===0};T.lessThan=T.lt=function(i){return this.cmp(i)<0};T.lessThanOrEqualTo=T.lte=function(i){return this.cmp(i)<1};T.logarithm=T.log=function(i){var e,t,n,r,o,s,a,c,u=this,l=u.constructor,d=l.precision,m=l.rounding,p=5;if(i==null)i=new l(10),e=!0;else{if(i=new l(i),t=i.d,i.s<0||!t||!t[0]||i.eq(1))return new l(NaN);e=i.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new l(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)o=!0;else{for(r=t[0];r%10===0;)r/=10;o=r!==1}if(q=!1,a=d+p,s=ut(u,a),n=e?an(l,a+10):ut(i,a),c=ie(s,n,a,1),Et(c.d,r=d,m))do if(a+=10,s=ut(u,a),n=e?an(l,a+10):ut(i,a),c=ie(s,n,a,1),!o){+we(c.d).slice(r+1,r+15)+1==1e14&&(c=_(c,d+1,0));break}while(Et(c.d,r+=10,m));return q=!0,_(c,d,m)};T.minus=T.sub=function(i){var e,t,n,r,o,s,a,c,u,l,d,m,p=this,b=p.constructor;if(i=new b(i),!p.d||!i.d)return!p.s||!i.s?i=new b(NaN):p.d?i.s=-i.s:i=new b(i.d||p.s!==i.s?p:NaN),i;if(p.s!=i.s)return i.s=-i.s,p.plus(i);if(u=p.d,m=i.d,a=b.precision,c=b.rounding,!u[0]||!m[0]){if(m[0])i.s=-i.s;else if(u[0])i=new b(p);else return new b(c===3?-0:0);return q?_(i,a,c):i}if(t=Te(i.e/W),l=Te(p.e/W),u=u.slice(),o=l-t,o){for(d=o<0,d?(e=u,o=-o,s=m.length):(e=m,t=l,s=u.length),n=Math.max(Math.ceil(a/W),s)+2,o>n&&(o=n,e.length=1),e.reverse(),n=o;n--;)e.push(0);e.reverse()}else{for(n=u.length,s=m.length,d=n<s,d&&(s=n),n=0;n<s;n++)if(u[n]!=m[n]){d=u[n]<m[n];break}o=0}for(d&&(e=u,u=m,m=e,i.s=-i.s),s=u.length,n=m.length-s;n>0;--n)u[s++]=0;for(n=m.length;n>o;){if(u[--n]<m[n]){for(r=n;r&&u[--r]===0;)u[r]=Ve-1;--u[r],u[n]+=Ve}u[n]-=m[n]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--t;return u[0]?(i.d=u,i.e=cn(u,t),q?_(i,a,c):i):new b(c===3?-0:0)};T.modulo=T.mod=function(i){var e,t=this,n=t.constructor;return i=new n(i),!t.d||!i.s||i.d&&!i.d[0]?new n(NaN):!i.d||t.d&&!t.d[0]?_(new n(t),n.precision,n.rounding):(q=!1,n.modulo==9?(e=ie(t,i.abs(),0,3,1),e.s*=i.s):e=ie(t,i,0,n.modulo,1),e=e.times(i),q=!0,t.minus(e))};T.naturalExponential=T.exp=function(){return Dn(this)};T.naturalLogarithm=T.ln=function(){return ut(this)};T.negated=T.neg=function(){var i=new this.constructor(this);return i.s=-i.s,_(i)};T.plus=T.add=function(i){var e,t,n,r,o,s,a,c,u,l,d=this,m=d.constructor;if(i=new m(i),!d.d||!i.d)return!d.s||!i.s?i=new m(NaN):d.d||(i=new m(i.d||d.s===i.s?d:NaN)),i;if(d.s!=i.s)return i.s=-i.s,d.minus(i);if(u=d.d,l=i.d,a=m.precision,c=m.rounding,!u[0]||!l[0])return l[0]||(i=new m(d)),q?_(i,a,c):i;if(o=Te(d.e/W),n=Te(i.e/W),u=u.slice(),r=o-n,r){for(r<0?(t=u,r=-r,s=l.length):(t=l,n=o,s=u.length),o=Math.ceil(a/W),s=o>s?o+1:s+1,r>s&&(r=s,t.length=1),t.reverse();r--;)t.push(0);t.reverse()}for(s=u.length,r=l.length,s-r<0&&(r=s,t=l,l=u,u=t),e=0;r;)e=(u[--r]=u[r]+l[r]+e)/Ve|0,u[r]%=Ve;for(e&&(u.unshift(e),++n),s=u.length;u[--s]==0;)u.pop();return i.d=u,i.e=cn(u,n),q?_(i,a,c):i};T.precision=T.sd=function(i){var e,t=this;if(i!==void 0&&i!==!!i&&i!==1&&i!==0)throw Error(ct+i);return t.d?(e=Xi(t.d),i&&t.e+1>e&&(e=t.e+1)):e=NaN,e};T.round=function(){var i=this,e=i.constructor;return _(new e(i),i.e+1,e.rounding)};T.sine=T.sin=function(){var i,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(i=n.precision,e=n.rounding,n.precision=i+Math.max(t.e,t.sd())+W,n.rounding=1,t=ho(n,Yi(n,t)),n.precision=i,n.rounding=e,_($e>2?t.neg():t,i,e,!0)):new n(NaN)};T.squareRoot=T.sqrt=function(){var i,e,t,n,r,o,s=this,a=s.d,c=s.e,u=s.s,l=s.constructor;if(u!==1||!a||!a[0])return new l(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(q=!1,u=Math.sqrt(+s),u==0||u==1/0?(e=we(a),(e.length+c)%2==0&&(e+="0"),u=Math.sqrt(e),c=Te((c+1)/2)-(c<0||c%2),u==1/0?e="5e"+c:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+c),n=new l(e)):n=new l(u.toString()),t=(c=l.precision)+3;;)if(o=n,n=o.plus(ie(s,o,t+2,1)).times(.5),we(o.d).slice(0,t)===(e=we(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!r&&e=="4999"){if(!r&&(_(o,c+1,0),o.times(o).eq(s))){n=o;break}t+=4,r=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(_(n,c+1,1),i=!n.times(n).eq(s));break}return q=!0,_(n,c,l.rounding,i)};T.tangent=T.tan=function(){var i,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(i=n.precision,e=n.rounding,n.precision=i+10,n.rounding=1,t=t.sin(),t.s=1,t=ie(t,new n(1).minus(t.times(t)).sqrt(),i+10,0),n.precision=i,n.rounding=e,_($e==2||$e==4?t.neg():t,i,e,!0)):new n(NaN)};T.times=T.mul=function(i){var e,t,n,r,o,s,a,c,u,l=this,d=l.constructor,m=l.d,p=(i=new d(i)).d;if(i.s*=l.s,!m||!m[0]||!p||!p[0])return new d(!i.s||m&&!m[0]&&!p||p&&!p[0]&&!m?NaN:!m||!p?i.s/0:i.s*0);for(t=Te(l.e/W)+Te(i.e/W),c=m.length,u=p.length,c<u&&(o=m,m=p,p=o,s=c,c=u,u=s),o=[],s=c+u,n=s;n--;)o.push(0);for(n=u;--n>=0;){for(e=0,r=c+n;r>n;)a=o[r]+p[n]*m[r-n-1]+e,o[r--]=a%Ve|0,e=a/Ve|0;o[r]=(o[r]+e)%Ve|0}for(;!o[--s];)o.pop();return e?++t:o.shift(),i.d=o,i.e=cn(o,t),q?_(i,d.precision,d.rounding):i};T.toBinary=function(i,e){return Gn(this,2,i,e)};T.toDecimalPlaces=T.toDP=function(i,e){var t=this,n=t.constructor;return t=new n(t),i===void 0?t:(Ke(i,0,lt),e===void 0?e=n.rounding:Ke(e,0,8),_(t,i+t.e+1,e))};T.toExponential=function(i,e){var t,n=this,r=n.constructor;return i===void 0?t=ze(n,!0):(Ke(i,0,lt),e===void 0?e=r.rounding:Ke(e,0,8),n=_(new r(n),i+1,e),t=ze(n,!0,i+1)),n.isNeg()&&!n.isZero()?"-"+t:t};T.toFixed=function(i,e){var t,n,r=this,o=r.constructor;return i===void 0?t=ze(r):(Ke(i,0,lt),e===void 0?e=o.rounding:Ke(e,0,8),n=_(new o(r),i+r.e+1,e),t=ze(n,!1,i+n.e+1)),r.isNeg()&&!r.isZero()?"-"+t:t};T.toFraction=function(i){var e,t,n,r,o,s,a,c,u,l,d,m,p=this,b=p.d,f=p.constructor;if(!b)return new f(p);if(u=t=new f(1),n=c=new f(0),e=new f(n),o=e.e=Xi(b)-p.e-1,s=o%W,e.d[0]=ge(10,s<0?W+s:s),i==null)i=o>0?e:u;else{if(a=new f(i),!a.isInt()||a.lt(u))throw Error(ct+a);i=a.gt(e)?o>0?e:u:a}for(q=!1,a=new f(we(b)),l=f.precision,f.precision=o=b.length*W*2;d=ie(a,e,0,1,1),r=t.plus(d.times(n)),r.cmp(i)!=1;)t=n,n=r,r=u,u=c.plus(d.times(r)),c=r,r=e,e=a.minus(d.times(r)),a=r;return r=ie(i.minus(t),n,0,1,1),c=c.plus(r.times(u)),t=t.plus(r.times(n)),c.s=u.s=p.s,m=ie(u,n,o,1).minus(p).abs().cmp(ie(c,t,o,1).minus(p).abs())<1?[u,n]:[c,t],f.precision=l,q=!0,m};T.toHexadecimal=T.toHex=function(i,e){return Gn(this,16,i,e)};T.toNearest=function(i,e){var t=this,n=t.constructor;if(t=new n(t),i==null){if(!t.d)return t;i=new n(1),e=n.rounding}else{if(i=new n(i),e===void 0?e=n.rounding:Ke(e,0,8),!t.d)return i.s?t:i;if(!i.d)return i.s&&(i.s=t.s),i}return i.d[0]?(q=!1,t=ie(t,i,0,e,1).times(i),q=!0,_(t)):(i.s=t.s,t=i),t};T.toNumber=function(){return+this};T.toOctal=function(i,e){return Gn(this,8,i,e)};T.toPower=T.pow=function(i){var e,t,n,r,o,s,a=this,c=a.constructor,u=+(i=new c(i));if(!a.d||!i.d||!a.d[0]||!i.d[0])return new c(ge(+a,u));if(a=new c(a),a.eq(1))return a;if(n=c.precision,o=c.rounding,i.eq(1))return _(a,n,o);if(e=Te(i.e/W),e>=i.d.length-1&&(t=u<0?-u:u)<=Po)return r=zi(c,a,t,n),i.s<0?new c(1).div(r):_(r,n,o);if(s=a.s,s<0){if(e<i.d.length-1)return new c(NaN);if((i.d[e]&1)==0&&(s=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=s,a}return t=ge(+a,u),e=t==0||!isFinite(t)?Te(u*(Math.log("0."+we(a.d))/Math.LN10+a.e+1)):new c(t+"").e,e>c.maxE+1||e<c.minE-1?new c(e>0?s/0:0):(q=!1,c.rounding=a.s=1,t=Math.min(12,(e+"").length),r=Dn(i.times(ut(a,n+t)),n),r.d&&(r=_(r,n+5,1),Et(r.d,n,o)&&(e=n+10,r=_(Dn(i.times(ut(a,e+t)),e),e+5,1),+we(r.d).slice(n+1,n+15)+1==1e14&&(r=_(r,n+1,0)))),r.s=s,q=!0,c.rounding=o,_(r,n,o))};T.toPrecision=function(i,e){var t,n=this,r=n.constructor;return i===void 0?t=ze(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(Ke(i,1,lt),e===void 0?e=r.rounding:Ke(e,0,8),n=_(new r(n),i,e),t=ze(n,i<=n.e||n.e<=r.toExpNeg,i)),n.isNeg()&&!n.isZero()?"-"+t:t};T.toSignificantDigits=T.toSD=function(i,e){var t=this,n=t.constructor;return i===void 0?(i=n.precision,e=n.rounding):(Ke(i,1,lt),e===void 0?e=n.rounding:Ke(e,0,8)),_(new n(t),i,e)};T.toString=function(){var i=this,e=i.constructor,t=ze(i,i.e<=e.toExpNeg||i.e>=e.toExpPos);return i.isNeg()&&!i.isZero()?"-"+t:t};T.truncated=T.trunc=function(){return _(new this.constructor(this),this.e+1,1)};T.valueOf=T.toJSON=function(){var i=this,e=i.constructor,t=ze(i,i.e<=e.toExpNeg||i.e>=e.toExpPos);return i.isNeg()?"-"+t:t};function we(i){var e,t,n,r=i.length-1,o="",s=i[0];if(r>0){for(o+=s,e=1;e<r;e++)n=i[e]+"",t=W-n.length,t&&(o+=at(t)),o+=n;s=i[e],n=s+"",t=W-n.length,t&&(o+=at(t))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function Ke(i,e,t){if(i!==~~i||i<e||i>t)throw Error(ct+i)}function Et(i,e,t,n){var r,o,s,a;for(o=i[0];o>=10;o/=10)--e;return--e<0?(e+=W,r=0):(r=Math.ceil((e+1)/W),e%=W),o=ge(10,W-e),a=i[r]%o|0,n==null?e<3?(e==0?a=a/100|0:e==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(i[r+1]/o/100|0)==ge(10,e-2)-1||(a==o/2||a==0)&&(i[r+1]/o/100|0)==0:e<4?(e==0?a=a/1e3|0:e==1?a=a/100|0:e==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(i[r+1]/o/1e3|0)==ge(10,e-3)-1,s}function rn(i,e,t){for(var n,r=[0],o,s=0,a=i.length;s<a;){for(o=r.length;o--;)r[o]*=e;for(r[0]+=vn.indexOf(i.charAt(s++)),n=0;n<r.length;n++)r[n]>t-1&&(r[n+1]===void 0&&(r[n+1]=0),r[n+1]+=r[n]/t|0,r[n]%=t)}return r.reverse()}function ko(i,e){var t,n,r;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),r=(1/ln(4,t)).toString()):(t=16,r="2.3283064365386962890625e-10"),i.precision+=t,e=Kt(i,1,e.times(r),new i(1));for(var o=t;o--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return i.precision-=t,e}var ie=function(){function i(n,r,o){var s,a=0,c=n.length;for(n=n.slice();c--;)s=n[c]*r+a,n[c]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function e(n,r,o,s){var a,c;if(o!=s)c=o>s?1:-1;else for(a=c=0;a<o;a++)if(n[a]!=r[a]){c=n[a]>r[a]?1:-1;break}return c}function t(n,r,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]<r[o]?1:0,n[o]=a*s+n[o]-r[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,r,o,s,a,c){var u,l,d,m,p,b,f,y,g,k,A,w,x,h,K,C,V,B,M,ce,Q=n.constructor,Ae=n.s==r.s?1:-1,j=n.d,v=r.d;if(!j||!j[0]||!v||!v[0])return new Q(!n.s||!r.s||(j?v&&j[0]==v[0]:!v)?NaN:j&&j[0]==0||!v?Ae*0:Ae/0);for(c?(p=1,l=n.e-r.e):(c=Ve,p=W,l=Te(n.e/p)-Te(r.e/p)),M=v.length,V=j.length,g=new Q(Ae),k=g.d=[],d=0;v[d]==(j[d]||0);d++);if(v[d]>(j[d]||0)&&l--,o==null?(h=o=Q.precision,s=Q.rounding):a?h=o+(n.e-r.e)+1:h=o,h<0)k.push(1),b=!0;else{if(h=h/p+2|0,d=0,M==1){for(m=0,v=v[0],h++;(d<V||m)&&h--;d++)K=m*c+(j[d]||0),k[d]=K/v|0,m=K%v|0;b=m||d<V}else{for(m=c/(v[0]+1)|0,m>1&&(v=i(v,m,c),j=i(j,m,c),M=v.length,V=j.length),C=M,A=j.slice(0,M),w=A.length;w<M;)A[w++]=0;ce=v.slice(),ce.unshift(0),B=v[0],v[1]>=c/2&&++B;do m=0,u=e(v,A,M,w),u<0?(x=A[0],M!=w&&(x=x*c+(A[1]||0)),m=x/B|0,m>1?(m>=c&&(m=c-1),f=i(v,m,c),y=f.length,w=A.length,u=e(f,A,y,w),u==1&&(m--,t(f,M<y?ce:v,y,c))):(m==0&&(u=m=1),f=v.slice()),y=f.length,y<w&&f.unshift(0),t(A,f,w,c),u==-1&&(w=A.length,u=e(v,A,M,w),u<1&&(m++,t(A,M<w?ce:v,w,c))),w=A.length):u===0&&(m++,A=[0]),k[d++]=m,u&&A[0]?A[w++]=j[C]||0:(A=[j[C]],w=1);while((C++<V||A[0]!==void 0)&&h--);b=A[0]!==void 0}k[0]||k.shift()}if(p==1)g.e=l,Wi=b;else{for(d=1,m=k[0];m>=10;m/=10)d++;g.e=d+l*p-1,_(g,a?o+g.e+1:o,s,b)}return g}}();function _(i,e,t,n){var r,o,s,a,c,u,l,d,m,p=i.constructor;e:if(e!=null){if(d=i.d,!d)return i;for(r=1,a=d[0];a>=10;a/=10)r++;if(o=e-r,o<0)o+=W,s=e,l=d[m=0],c=l/ge(10,r-s-1)%10|0;else if(m=Math.ceil((o+1)/W),a=d.length,m>=a)if(n){for(;a++<=m;)d.push(0);l=c=0,r=1,o%=W,s=o-W+1}else break e;else{for(l=a=d[m],r=1;a>=10;a/=10)r++;o%=W,s=o-W+r,c=s<0?0:l/ge(10,r-s-1)%10|0}if(n=n||e<0||d[m+1]!==void 0||(s<0?l:l%ge(10,r-s-1)),u=t<4?(c||n)&&(t==0||t==(i.s<0?3:2)):c>5||c==5&&(t==4||n||t==6&&(o>0?s>0?l/ge(10,r-s):0:d[m-1])%10&1||t==(i.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=i.e+1,d[0]=ge(10,(W-e%W)%W),i.e=-e||0):d[0]=i.e=0,i;if(o==0?(d.length=m,a=1,m--):(d.length=m+1,a=ge(10,W-o),d[m]=s>0?(l/ge(10,r-s)%ge(10,s)|0)*a:0),u)for(;;)if(m==0){for(o=1,s=d[0];s>=10;s/=10)o++;for(s=d[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(i.e++,d[0]==Ve&&(d[0]=1));break}else{if(d[m]+=a,d[m]!=Ve)break;d[m--]=0,a=1}for(o=d.length;d[--o]===0;)d.pop()}return q&&(i.e>p.maxE?(i.d=null,i.e=NaN):i.e<p.minE&&(i.e=0,i.d=[0])),i}function ze(i,e,t){if(!i.isFinite())return Qi(i);var n,r=i.e,o=we(i.d),s=o.length;return e?(t&&(n=t-s)>0?o=o.charAt(0)+"."+o.slice(1)+at(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i.e<0?"e":"e+")+i.e):r<0?(o="0."+at(-r-1)+o,t&&(n=t-s)>0&&(o+=at(n))):r>=s?(o+=at(r+1-s),t&&(n=t-r-1)>0&&(o=o+"."+at(n))):((n=r+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),t&&(n=t-s)>0&&(r+1===s&&(o+="."),o+=at(n))),o}function cn(i,e){var t=i[0];for(e*=W;t>=10;t/=10)e++;return e}function an(i,e,t){if(e>Ao)throw q=!0,t&&(i.precision=t),Error(Di);return _(new i(on),e,1,!0)}function ve(i,e,t){if(e>Wn)throw Error(Di);return _(new i(sn),e,t,!0)}function Xi(i){var e=i.length-1,t=e*W+1;if(e=i[e],e){for(;e%10==0;e/=10)t--;for(e=i[0];e>=10;e/=10)t++}return t}function at(i){for(var e="";i--;)e+="0";return e}function zi(i,e,t,n){var r,o=new i(1),s=Math.ceil(n/W+4);for(q=!1;;){if(t%2&&(o=o.times(e),vi(o.d,s)&&(r=!0)),t=Te(t/2),t===0){t=o.d.length-1,r&&o.d[t]===0&&++o.d[t];break}e=e.times(e),vi(e.d,s)}return q=!0,o}function _i(i){return i.d[i.d.length-1]&1}function Hi(i,e,t){for(var n,r=new i(e[0]),o=0;++o<e.length;)if(n=new i(e[o]),n.s)r[t](n)&&(r=n);else{r=n;break}return r}function Dn(i,e){var t,n,r,o,s,a,c,u=0,l=0,d=0,m=i.constructor,p=m.rounding,b=m.precision;if(!i.d||!i.d[0]||i.e>17)return new m(i.d?i.d[0]?i.s<0?0:1/0:1:i.s?i.s<0?0:i:0/0);for(e==null?(q=!1,c=b):c=e,a=new m(.03125);i.e>-2;)i=i.times(a),d+=5;for(n=Math.log(ge(2,d))/Math.LN10*2+5|0,c+=n,t=o=s=new m(1),m.precision=c;;){if(o=_(o.times(i),c,1),t=t.times(++l),a=s.plus(ie(o,t,c,1)),we(a.d).slice(0,c)===we(s.d).slice(0,c)){for(r=d;r--;)s=_(s.times(s),c,1);if(e==null)if(u<3&&Et(s.d,c-n,p,u))m.precision=c+=10,t=o=a=new m(1),l=0,u++;else return _(s,m.precision=b,p,q=!0);else return m.precision=b,s}s=a}}function ut(i,e){var t,n,r,o,s,a,c,u,l,d,m,p=1,b=10,f=i,y=f.d,g=f.constructor,k=g.rounding,A=g.precision;if(f.s<0||!y||!y[0]||!f.e&&y[0]==1&&y.length==1)return new g(y&&!y[0]?-1/0:f.s!=1?NaN:y?0:f);if(e==null?(q=!1,l=A):l=e,g.precision=l+=b,t=we(y),n=t.charAt(0),Math.abs(o=f.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)f=f.times(i),t=we(f.d),n=t.charAt(0),p++;o=f.e,n>1?(f=new g("0."+t),o++):f=new g(n+"."+t.slice(1))}else return u=an(g,l+2,A).times(o+""),f=ut(new g(n+"."+t.slice(1)),l-b).plus(u),g.precision=A,e==null?_(f,A,k,q=!0):f;for(d=f,c=s=f=ie(f.minus(1),f.plus(1),l,1),m=_(f.times(f),l,1),r=3;;){if(s=_(s.times(m),l,1),u=c.plus(ie(s,new g(r),l,1)),we(u.d).slice(0,l)===we(c.d).slice(0,l))if(c=c.times(2),o!==0&&(c=c.plus(an(g,l+2,A).times(o+""))),c=ie(c,new g(p),l,1),e==null)if(Et(c.d,l-b,k,a))g.precision=l+=b,u=s=f=ie(d.minus(1),d.plus(1),l,1),m=_(f.times(f),l,1),r=a=1;else return _(c,g.precision=A,k,q=!0);else return g.precision=A,c;c=u,r+=2}}function Qi(i){return String(i.s*i.s/0)}function qn(i,e){var t,n,r;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(r=e.length;e.charCodeAt(r-1)===48;--r);if(e=e.slice(n,r),e){if(r-=n,i.e=t=t-n-1,i.d=[],n=(t+1)%W,t<0&&(n+=W),n<r){for(n&&i.d.push(+e.slice(0,n)),r-=W;n<r;)i.d.push(+e.slice(n,n+=W));e=e.slice(n),n=W-e.length}else n-=r;for(;n--;)e+="0";i.d.push(+e),q&&(i.e>i.constructor.maxE?(i.d=null,i.e=NaN):i.e<i.constructor.minE&&(i.e=0,i.d=[0]))}else i.e=0,i.d=[0];return i}function wo(i,e){var t,n,r,o,s,a,c,u,l;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Ui.test(e))return qn(i,e)}else if(e==="Infinity"||e==="NaN")return+e||(i.s=NaN),i.e=NaN,i.d=null,i;if(yo.test(e))t=16,e=e.toLowerCase();else if(bo.test(e))t=2;else if(go.test(e))t=8;else throw Error(ct+e);for(o=e.search(/p/i),o>0?(c=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),o=e.indexOf("."),s=o>=0,n=i.constructor,s&&(e=e.replace(".",""),a=e.length,o=a-o,r=zi(n,new n(t),o,o*2)),u=rn(e,t,Ve),l=u.length-1,o=l;u[o]===0;--o)u.pop();return o<0?new n(i.s*0):(i.e=cn(u,l),i.d=u,q=!1,s&&(i=ie(i,r,a*4)),c&&(i=i.times(Math.abs(c)<54?ge(2,c):Ft.pow(2,c))),q=!0,i)}function ho(i,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:Kt(i,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/ln(5,t)),e=Kt(i,2,e,e);for(var r,o=new i(5),s=new i(16),a=new i(20);t--;)r=e.times(e),e=e.times(o.plus(r.times(s.times(r).minus(a))));return e}function Kt(i,e,t,n,r){var o,s,a,c,u=1,l=i.precision,d=Math.ceil(l/W);for(q=!1,c=t.times(t),a=new i(n);;){if(s=ie(a.times(c),new i(e++*e++),l,1),a=r?n.plus(s):n.minus(s),n=ie(s.times(c),new i(e++*e++),l,1),s=a.plus(n),s.d[d]!==void 0){for(o=d;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return q=!0,s.d.length=d+1,s}function ln(i,e){for(var t=i;--e;)t*=i;return t}function Yi(i,e){var t,n=e.s<0,r=ve(i,i.precision,1),o=r.times(.5);if(e=e.abs(),e.lte(o))return $e=n?4:1,e;if(t=e.divToInt(r),t.isZero())$e=n?3:2;else{if(e=e.minus(t.times(r)),e.lte(o))return $e=_i(t)?n?2:3:n?4:1,e;$e=_i(t)?n?1:4:n?3:2}return e.minus(r).abs()}function Gn(i,e,t,n){var r,o,s,a,c,u,l,d,m,p=i.constructor,b=t!==void 0;if(b?(Ke(t,1,lt),n===void 0?n=p.rounding:Ke(n,0,8)):(t=p.precision,n=p.rounding),!i.isFinite())l=Qi(i);else{for(l=ze(i),s=l.indexOf("."),b?(r=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):r=e,s>=0&&(l=l.replace(".",""),m=new p(1),m.e=l.length-s,m.d=rn(ze(m),10,r),m.e=m.d.length),d=rn(l,10,r),o=c=d.length;d[--c]==0;)d.pop();if(!d[0])l=b?"0p+0":"0";else{if(s<0?o--:(i=new p(i),i.d=d,i.e=o,i=ie(i,m,t,n,0,r),d=i.d,o=i.e,u=Wi),s=d[t],a=r/2,u=u||d[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(i.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&d[t-1]&1||n===(i.s<0?8:7)),d.length=t,u)for(;++d[--t]>r-1;)d[t]=0,t||(++o,d.unshift(1));for(c=d.length;!d[c-1];--c);for(s=0,l="";s<c;s++)l+=vn.charAt(d[s]);if(b){if(c>1)if(e==16||e==8){for(s=e==16?4:3,--c;c%s;c++)l+="0";for(d=rn(l,r,e),c=d.length;!d[c-1];--c);for(s=1,l="1.";s<c;s++)l+=vn.charAt(d[s])}else l=l.charAt(0)+"."+l.slice(1);l=l+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)l="0"+l;l="0."+l}else if(++o>c)for(o-=c;o--;)l+="0";else o<c&&(l=l.slice(0,o)+"."+l.slice(o))}l=(e==16?"0x":e==2?"0b":e==8?"0o":"")+l}return i.s<0?"-"+l:l}function vi(i,e){if(i.length>e)return i.length=e,!0}function To(i){return new this(i).abs()}function Bo(i){return new this(i).acos()}function Io(i){return new this(i).acosh()}function xo(i,e){return new this(i).plus(e)}function So(i){return new this(i).asin()}function Ko(i){return new this(i).asinh()}function Co(i){return new this(i).atan()}function No(i){return new this(i).atanh()}function Lo(i,e){i=new this(i),e=new this(e);var t,n=this.precision,r=this.rounding,o=n+4;return!i.s||!e.s?t=new this(NaN):!i.d&&!e.d?(t=ve(this,o,1).times(e.s>0?.25:.75),t.s=i.s):!e.d||i.isZero()?(t=e.s<0?ve(this,n,r):new this(0),t.s=i.s):!i.d||e.isZero()?(t=ve(this,o,1).times(.5),t.s=i.s):e.s<0?(this.precision=o,this.rounding=1,t=this.atan(ie(i,e,o,1)),e=ve(this,o,1),this.precision=n,this.rounding=r,t=i.s<0?t.minus(e):t.plus(e)):t=this.atan(ie(i,e,o,1)),t}function Ro(i){return new this(i).cbrt()}function Oo(i){return _(i=new this(i),i.e+1,2)}function Mo(i,e,t){return new this(i).clamp(e,t)}function Eo(i){if(!i||typeof i!="object")throw Error(un+"Object expected");var e,t,n,r=i.defaults===!0,o=["precision",1,lt,"rounding",0,8,"toExpNeg",-St,0,"toExpPos",0,St,"maxE",0,St,"minE",-St,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(t=o[e],r&&(this[t]=Vn[t]),(n=i[t])!==void 0)if(Te(n)===n&&n>=o[e+1]&&n<=o[e+2])this[t]=n;else throw Error(ct+t+": "+n);if(t="crypto",r&&(this[t]=Vn[t]),(n=i[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(qi);else this[t]=!1;else throw Error(ct+t+": "+n);return this}function Fo(i){return new this(i).cos()}function _o(i){return new this(i).cosh()}function ji(i){var e,t,n;function r(o){var s,a,c,u=this;if(!(u instanceof r))return new r(o);if(u.constructor=r,Vi(o)){u.s=o.s,q?!o.d||o.e>r.maxE?(u.e=NaN,u.d=null):o.e<r.minE?(u.e=0,u.d=[0]):(u.e=o.e,u.d=o.d.slice()):(u.e=o.e,u.d=o.d?o.d.slice():o.d);return}if(c=typeof o,c==="number"){if(o===0){u.s=1/o<0?-1:1,u.e=0,u.d=[0];return}if(o<0?(o=-o,u.s=-1):u.s=1,o===~~o&&o<1e7){for(s=0,a=o;a>=10;a/=10)s++;q?s>r.maxE?(u.e=NaN,u.d=null):s<r.minE?(u.e=0,u.d=[0]):(u.e=s,u.d=[o]):(u.e=s,u.d=[o]);return}else if(o*0!==0){o||(u.s=NaN),u.e=NaN,u.d=null;return}return qn(u,o.toString())}else if(c!=="string")throw Error(ct+o);return(a=o.charCodeAt(0))===45?(o=o.slice(1),u.s=-1):(a===43&&(o=o.slice(1)),u.s=1),Ui.test(o)?qn(u,o):wo(u,o)}if(r.prototype=T,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=Eo,r.clone=ji,r.isDecimal=Vi,r.abs=To,r.acos=Bo,r.acosh=Io,r.add=xo,r.asin=So,r.asinh=Ko,r.atan=Co,r.atanh=No,r.atan2=Lo,r.cbrt=Ro,r.ceil=Oo,r.clamp=Mo,r.cos=Fo,r.cosh=_o,r.div=vo,r.exp=Vo,r.floor=Wo,r.hypot=Do,r.ln=qo,r.log=Go,r.log10=Xo,r.log2=Uo,r.max=zo,r.min=Ho,r.mod=Qo,r.mul=Yo,r.pow=jo,r.random=Zo,r.round=Jo,r.sign=$o,r.sin=es,r.sinh=ts,r.sqrt=ns,r.sub=is,r.sum=rs,r.tan=os,r.tanh=ss,r.trunc=as,i===void 0&&(i={}),i&&i.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)i.hasOwnProperty(t=n[e++])||(i[t]=this[t]);return r.config(i),r}function vo(i,e){return new this(i).div(e)}function Vo(i){return new this(i).exp()}function Wo(i){return _(i=new this(i),i.e+1,3)}function Do(){var i,e,t=new this(0);for(q=!1,i=0;i<arguments.length;)if(e=new this(arguments[i++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return q=!0,new this(1/0);t=e}return q=!0,t.sqrt()}function Vi(i){return i instanceof Ft||i&&i.toStringTag===Gi||!1}function qo(i){return new this(i).ln()}function Go(i,e){return new this(i).log(e)}function Uo(i){return new this(i).log(2)}function Xo(i){return new this(i).log(10)}function zo(){return Hi(this,arguments,"lt")}function Ho(){return Hi(this,arguments,"gt")}function Qo(i,e){return new this(i).mod(e)}function Yo(i,e){return new this(i).mul(e)}function jo(i,e){return new this(i).pow(e)}function Zo(i){var e,t,n,r,o=0,s=new this(1),a=[];if(i===void 0?i=this.precision:Ke(i,1,lt),n=Math.ceil(i/W),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));o<n;)r=e[o],r>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=r%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);o<n;)r=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((e[o+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(e,o):(a.push(r%1e7),o+=4);o=n/4}else throw Error(qi);else for(;o<n;)a[o++]=Math.random()*1e7|0;for(n=a[--o],i%=W,n&&i&&(r=ge(10,W-i),a[o]=(n/r|0)*r);a[o]===0;o--)a.pop();if(o<0)t=0,a=[0];else{for(t=-1;a[0]===0;t-=W)a.shift();for(n=1,r=a[0];r>=10;r/=10)n++;n<W&&(t-=W-n)}return s.e=t,s.d=a,s}function Jo(i){return _(i=new this(i),i.e+1,this.rounding)}function $o(i){return i=new this(i),i.d?i.d[0]?i.s:0*i.s:i.s||NaN}function es(i){return new this(i).sin()}function ts(i){return new this(i).sinh()}function ns(i){return new this(i).sqrt()}function is(i,e){return new this(i).sub(e)}function rs(){var i=0,e=arguments,t=new this(e[i]);for(q=!1;t.s&&++i<e.length;)t=t.plus(e[i]);return q=!0,_(t,this.precision,this.rounding)}function os(i){return new this(i).tan()}function ss(i){return new this(i).tanh()}function as(i){return _(i=new this(i),i.e+1,1)}T[Symbol.for("nodejs.util.inspect.custom")]=T.toString;T[Symbol.toStringTag]="Decimal";var Ft=T.constructor=ji(Vn);on=new Ft(on);sn=new Ft(sn);var O=Ft;import{PublicKey as $i}from"@solana/web3.js";import{get as Zi,set as us}from"lodash";var Un=class{constructor(e){this.logLevel=e.logLevel!==void 0?e.logLevel:0,this.name=e.name}set level(e){this.logLevel=e}get time(){return Date.now().toString()}get moduleName(){return this.name}isLogLevel(e){return e<=this.logLevel}error(...e){return this.isLogLevel(0)?(console.error(this.time,this.name,"sdk logger error",...e),this):this}logWithError(...e){let t=e.map(n=>typeof n=="object"?JSON.stringify(n):n).join(", ");throw new Error(t)}warning(...e){return this.isLogLevel(1)?(console.warn(this.time,this.name,"sdk logger warning",...e),this):this}info(...e){return this.isLogLevel(2)?(console.info(this.time,this.name,"sdk logger info",...e),this):this}debug(...e){return this.isLogLevel(3)?(console.debug(this.time,this.name,"sdk logger debug",...e),this):this}},Ji={},cs={};function re(i){let e=Zi(Ji,i);if(!e){let t=Zi(cs,i);e=new Un({name:i,logLevel:t}),us(Ji,i,e)}return e}import{MINT_SIZE as ls,TOKEN_PROGRAM_ID as ms,getTransferFeeConfig as ds,unpackMint as ps}from"@solana/spl-token";var Xn=re("Raydium_accountInfo_util");async function et(i,e,t){let{batchRequest:n,commitment:r="confirmed",chunkCount:o=100}={batchRequest:!1,...t},s=zn(e,o),a=new Array(s.length).fill([]);if(n){let c=s.map(d=>{let m=i._buildArgs([d.map(p=>p.toBase58())],r,"base64");return{methodName:"getMultipleAccounts",args:m}}),u=zn(c,10);a=(await(await Promise.all(u.map(async d=>await i._rpcBatchRequest(d)))).flat()).map(d=>(d.error&&Xn.logWithError(`failed to get info for multiple accounts, RPC_ERROR, ${d.error.message}`),d.result.value.map(m=>{if(m){let{data:p,executable:b,lamports:f,owner:y,rentEpoch:g}=m;return p.length!==2&&p[1]!=="base64"&&Xn.logWithError("info must be base64 encoded, RPC_ERROR"),{data:Buffer.from(p[0],"base64"),executable:b,lamports:f,owner:new $i(y),rentEpoch:g}}return null})))}else try{a=await Promise.all(s.map(c=>i.getMultipleAccountsInfo(c,r)))}catch(c){c instanceof Error&&Xn.logWithError(`failed to get info for multiple accounts, RPC_ERROR, ${c.message}`)}return a.flat()}async function bt(i,e,t){let n=await et(i,e.map(r=>r.pubkey),t);return e.map((r,o)=>({...r,accountInfo:n[o]}))}async function Hn({connection:i,mints:e,config:t}){var o,s,a;if(e.length===0)return{};let n=await bt(i,e.map(c=>({pubkey:He(c)})),t),r={};for(let c of n){if(!c.accountInfo||c.accountInfo.data.length<ls){console.log("invalid mint account",c.pubkey.toBase58());continue}let u=ps(c.pubkey,c.accountInfo,(o=c.accountInfo)==null?void 0:o.owner);r[c.pubkey.toString()]={...u,programId:((s=c.accountInfo)==null?void 0:s.owner)||ms,feeConfig:(a=ds(u))!=null?a:void 0}}return r[$i.default.toBase58()]=r[We.toBase58()],r}import nt from"bn.js";import ws from"big.js";import pn from"bn.js";import fs from"toformat";var bs=fs,_t=bs;import dn from"big.js";import gs from"bn.js";import Ps from"decimal.js-light";import vt from"bn.js";var er=9007199254740991;function oe(i){let e=re("Raydium_parseBigNumberish");if(i instanceof vt)return i;if(typeof i=="string"){if(i.match(/^-?[0-9]+$/))return new vt(i);e.logWithError(`invalid BigNumberish string: ${i}`)}return typeof i=="number"?(i%1&&e.logWithError(`BigNumberish number underflow: ${i}`),(i>=er||i<=-er)&&e.logWithError(`BigNumberish number overflow: ${i}`),new vt(String(i))):typeof i=="bigint"?new vt(i.toString()):(e.error(`invalid BigNumberish value: ${i}`),new vt(0))}var mn=re("module/fraction"),Qn=_t(dn),Vt=_t(Ps),As={[0]:Vt.ROUND_DOWN,[1]:Vt.ROUND_HALF_UP,[2]:Vt.ROUND_UP},ks={[0]:dn.roundDown,[1]:dn.roundHalfUp,[2]:dn.roundUp},te=class{constructor(e,t=new gs(1)){this.numerator=oe(e),this.denominator=oe(t)}get quotient(){return this.numerator.div(this.denominator)}invert(){return new te(this.denominator,this.numerator)}add(e){let t=e instanceof te?e:new te(oe(e));return this.denominator.eq(t.denominator)?new te(this.numerator.add(t.numerator),this.denominator):new te(this.numerator.mul(t.denominator).add(t.numerator.mul(this.denominator)),this.denominator.mul(t.denominator))}sub(e){let t=e instanceof te?e:new te(oe(e));return this.denominator.eq(t.denominator)?new te(this.numerator.sub(t.numerator),this.denominator):new te(this.numerator.mul(t.denominator).sub(t.numerator.mul(this.denominator)),this.denominator.mul(t.denominator))}mul(e){let t=e instanceof te?e:new te(oe(e));return new te(this.numerator.mul(t.numerator),this.denominator.mul(t.denominator))}div(e){let t=e instanceof te?e:new te(oe(e));return new te(this.numerator.mul(t.denominator),this.denominator.mul(t.numerator))}toSignificant(e,t={groupSeparator:""},n=1){Number.isInteger(e)||mn.logWithError(`${e} is not an integer.`),e<=0&&mn.logWithError(`${e} is not positive.`),Vt.set({precision:e+1,rounding:As[n]});let r=new Vt(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return r.toFormat(r.decimalPlaces(),t)}toFixed(e,t={groupSeparator:""},n=1){return Number.isInteger(e)||mn.logWithError(`${e} is not an integer.`),e<0&&mn.logWithError(`${e} is negative.`),Qn.DP=e,Qn.RM=ks[n]||1,new Qn(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,t)}isZero(){return this.numerator.isZero()}};var hs=re("Raydium_amount"),tr=_t(ws);function Ts(i,e){let t="0",n="0";if(i.includes(".")){let r=i.split(".");r.length===2?([t,n]=r,n=n.padEnd(e,"0")):hs.logWithError(`invalid number string, num: ${i}`)}else t=i;return[t,n.slice(0,e)||n]}var se=class extends te{constructor(t,n,r=!0,o){let s=new pn(0),a=Yn.pow(new pn(t.decimals));if(r)s=oe(n);else{let c=new pn(0),u=new pn(0);if(typeof n=="string"||typeof n=="number"||typeof n=="bigint"){let[l,d]=Ts(n.toString(),t.decimals);c=oe(l),u=oe(d)}c=c.mul(a),s=c.add(u)}super(s,a);this.logger=re(o||"TokenAmount"),this.token=t}get raw(){return this.numerator}isZero(){return this.raw.isZero()}gt(t){return this.token.equals(t.token)||this.logger.logWithError("gt token not equals"),this.raw.gt(t.raw)}lt(t){return this.token.equals(t.token)||this.logger.logWithError("lt token not equals"),this.raw.lt(t.raw)}add(t){return this.token.equals(t.token)||this.logger.logWithError("add token not equals"),new se(this.token,this.raw.add(t.raw))}subtract(t){return this.token.equals(t.token)||this.logger.logWithError("sub token not equals"),new se(this.token,this.raw.sub(t.raw))}toSignificant(t=this.token.decimals,n,r=0){return super.toSignificant(t,n,r)}toFixed(t=this.token.decimals,n,r=0){return t>this.token.decimals&&this.logger.logWithError("decimals overflow"),super.toFixed(t,n,r)}toExact(t={groupSeparator:""}){return tr.DP=this.token.decimals,new tr(this.numerator.toString()).div(this.denominator.toString()).toFormat(t)}};import{PublicKey as Bs}from"@solana/web3.js";import{TOKEN_PROGRAM_ID as nr}from"@solana/spl-token";var jn={chainId:101,address:Bs.default.toBase58(),programId:nr.toBase58(),decimals:9,symbol:"SOL",name:"solana",logoURI:"https://img.raydium.io/icon/So11111111111111111111111111111111111111112.png",tags:[],priority:2,type:"raydium",extensions:{coingeckoId:"solana"}},Qe={chainId:101,address:"So11111111111111111111111111111111111111112",programId:nr.toBase58(),decimals:9,symbol:"WSOL",name:"Wrapped SOL",logoURI:"https://img.raydium.io/icon/So11111111111111111111111111111111111111112.png",tags:[],priority:2,type:"raydium",extensions:{coingeckoId:"solana"}};import{PublicKey as $n}from"@solana/web3.js";import{PublicKey as le,SystemProgram as ir,SYSVAR_RENT_PUBKEY as Is}from"@solana/web3.js";import{TOKEN_PROGRAM_ID as xs}from"@solana/spl-token";function I({pubkey:i,isSigner:e=!1,isWritable:t=!0}){return{pubkey:i,isWritable:t,isSigner:e}}var zu=[I({pubkey:xs,isWritable:!1}),I({pubkey:ir.programId,isWritable:!1}),I({pubkey:Is,isWritable:!1})];function Zn({publicKey:i,transformSol:e}){let t=Jn(i.toString());if(t instanceof le)return e&&t.equals(Wt)?We:t;if(e&&t.toString()===Wt.toBase58())return We;if(typeof t=="string"){if(t===le.default.toBase58())return le.default;try{return new le(t)}catch{throw new Error("invalid public key")}}throw new Error("invalid public key")}function Jn(i){try{return new le(i)}catch{return i}}var fn=new le("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"),Ct=new le("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"),mt=new le("SysvarRent111111111111111111111111111111111"),Hu=new le("SysvarC1ock11111111111111111111111111111111"),dt=new le("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),Qu=new le("Sysvar1nstructions1111111111111111111111111"),Ss=ir.programId,Yu=new le("2cpMA1jNS4obgRz8XNg38QuSP83L1AXpUgfxPNcvnAGj"),ju=new le("Ea5SjE2Y6yvCeW5dYTn7PYMuW5ikXkvbGdcmSnXeaLjS"),Zu=new le("SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt"),Ju=new le("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"),$u=new le("Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"),ec=new le("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So"),tc=new le("7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj"),nc=new le("USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX"),ic=new le("NRVwhjBQiUPYtfDT5zRBVJajzFQHaBUNtC7SNVvqRFa"),rc=new le("ANAxByE6G2WjFp7A4NqtWYXb3mgruyzZYg3spfxe6Lbo"),oc=new le("7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs"),We=new le("So11111111111111111111111111111111111111112"),Wt=le.default;function He(i){return Zn({publicKey:i,transformSol:!0})}var ei=class{constructor({mint:e,decimals:t,symbol:n,name:r,skipMint:o=!1,isToken2022:s=!1}){if(e===Wt.toBase58()||e instanceof $n&&Wt.equals(e)){this.decimals=Qe.decimals,this.symbol=Qe.symbol,this.name=Qe.name,this.mint=new $n(Qe.address),this.isToken2022=!1;return}this.decimals=t,this.symbol=n||e.toString().substring(0,6),this.name=r||e.toString().substring(0,6),this.mint=o?$n.default:Zn({publicKey:e}),this.isToken2022=s}equals(e){return this===e?!0:this.mint.equals(e.mint)}},Oe=ei;Oe.WSOL=new ei({...Qe,mint:Qe.address});var ti=class{constructor({decimals:e,symbol:t="UNKNOWN",name:n="UNKNOWN"}){this.decimals=e,this.symbol=t,this.name=n}equals(e){return this===e}},bn=ti;bn.SOL=new ti(jn);import Ks from"bn.js";var rr=new te(new Ks(100)),tt=class extends te{toSignificant(e=5,t,n){return this.mul(rr).toSignificant(e,t,n)}toFixed(e=2,t,n){return this.mul(rr).toFixed(e,t,n)}};var Cs=re("Raydium_price"),Ce=class extends te{constructor(t){let{baseToken:n,quoteToken:r,numerator:o,denominator:s}=t;super(o,s);this.baseToken=n,this.quoteToken=r,this.scalar=new te(ni(n.decimals),ni(r.decimals))}get raw(){return new te(this.numerator,this.denominator)}get adjusted(){return super.mul(this.scalar)}invert(){return new Ce({baseToken:this.quoteToken,quoteToken:this.baseToken,denominator:this.numerator,numerator:this.denominator})}mul(t){this.quoteToken!==t.baseToken&&Cs.logWithError("mul token not equals");let n=super.mul(t);return new Ce({baseToken:this.baseToken,quoteToken:t.quoteToken,denominator:n.denominator,numerator:n.numerator})}toSignificant(t=this.quoteToken.decimals,n,r){return this.adjusted.toSignificant(t,n,r)}toFixed(t=this.quoteToken.decimals,n,r){return this.adjusted.toFixed(t,n,r)}};import{PublicKey as Ns}from"@solana/web3.js";import Ls from"bn.js";function sr(i){return typeof i=="object"&&i!==null&&![Oe,se,Ns,te,Ls,Ce,tt].some(e=>typeof e=="object"&&i instanceof e)}function yt(i){return typeof i=="string"?Jn(i):Array.isArray(i)?i.map(e=>yt(e)):sr(i)?Object.fromEntries(Object.entries(i).map(([e,t])=>[e,yt(t)])):i}var or=new nt(0),Rs=new nt(1),el=new nt(2),tl=new nt(3),nl=new nt(5),Yn=new nt(10),il=new nt(100),rl=new nt(1e3),ol=new nt(1e4);function ni(i){return Yn.pow(oe(i))}function zn(i,e=1,t=[]){let n=[...i];if(e<=0)return t;for(;n.length;)t.push(n.splice(0,e));return t}import{PublicKey as Vs}from"@solana/web3.js";import{TOKEN_PROGRAM_ID as Ws}from"@solana/spl-token";import{ComputeBudgetProgram as ar,Keypair as cr,PublicKey as Os,Transaction as lr,TransactionMessage as Ms,VersionedTransaction as mr}from"@solana/web3.js";var Z={CreateAccount:"CreateAccount",InitAccount:"InitAccount",CreateATA:"CreateATA",CloseAccount:"CloseAccount",TransferAmount:"TransferAmount",InitMint:"InitMint",MintTo:"MintTo",InitMarket:"InitMarket",Util1216OwnerClaim:"Util1216OwnerClaim",SetComputeUnitPrice:"SetComputeUnitPrice",SetComputeUnitLimit:"SetComputeUnitLimit",ClmmCreatePool:"ClmmCreatePool",ClmmOpenPosition:"ClmmOpenPosition",ClmmIncreasePosition:"ClmmIncreasePosition",ClmmDecreasePosition:"ClmmDecreasePosition",ClmmClosePosition:"ClmmClosePosition",ClmmSwapBaseIn:"ClmmSwapBaseIn",ClmmSwapBaseOut:"ClmmSwapBaseOut",ClmmInitReward:"ClmmInitReward",ClmmSetReward:"ClmmSetReward",ClmmCollectReward:"ClmmCollectReward",ClmmLockPosition:"ClmmLockPosition",ClmmHarvestLockPosition:"ClmmHarvestLockPosition",AmmV4Swap:"AmmV4Swap",AmmV4AddLiquidity:"AmmV4AddLiquidity",AmmV4RemoveLiquidity:"AmmV4RemoveLiquidity",AmmV4SimulatePoolInfo:"AmmV4SimulatePoolInfo",AmmV4SwapBaseIn:"AmmV4SwapBaseIn",AmmV4SwapBaseOut:"AmmV4SwapBaseOut",AmmV4CreatePool:"AmmV4CreatePool",AmmV4InitPool:"AmmV4InitPool",AmmV5AddLiquidity:"AmmV5AddLiquidity",AmmV5RemoveLiquidity:"AmmV5RemoveLiquidity",AmmV5SimulatePoolInfo:"AmmV5SimulatePoolInfo",AmmV5SwapBaseIn:"AmmV5SwapBaseIn",AmmV5SwapBaseOut:"AmmV5SwapBaseOut",RouteSwap:"RouteSwap",RouteSwap1:"RouteSwap1",RouteSwap2:"RouteSwap2",FarmV3Deposit:"FarmV3Deposit",FarmV3Withdraw:"FarmV3Withdraw",FarmV3CreateLedger:"FarmV3CreateLedger",FarmV5Deposit:"FarmV5Deposit",FarmV5Withdraw:"FarmV5Withdraw",FarmV5CreateLedger:"FarmV5CreateLedger",FarmV6Deposit:"FarmV6Deposit",FarmV6Withdraw:"FarmV6Withdraw",FarmV6Create:"FarmV6Create",FarmV6Restart:"FarmV6Restart",FarmV6CreatorAddReward:"FarmV6CreatorAddReward",FarmV6CreatorWithdraw:"FarmV6CreatorWithdraw",CpmmCreatePool:"CpmmCreatePool",CpmmCreateConfig:"CpmmCreateConfig",CpmmAddLiquidity:"CpmmAddLiquidity",CpmmWithdrawLiquidity:"CpmmWithdrawLiquidity",CpmmSwapBaseIn:"CpmmSwapBaseIn",CpmmSwapBaseOut:"CpmmSwapBaseOut",CpmmLockLp:"CpmmLockLp",CpmmCollectLockFee:"CpmmCollectLockFee"};import{TOKEN_PROGRAM_ID as Es}from"@solana/spl-token";var ur=re("Raydium_txUtil"),dr=1644;function yn(i){let e=[],t=[];return i.microLamports&&(e.push(ar.setComputeUnitPrice({microLamports:i.microLamports})),t.push(Z.SetComputeUnitPrice)),i.units&&(e.push(ar.setComputeUnitLimit({units:i.units})),t.push(Z.SetComputeUnitLimit)),{instructions:e,instructionTypes:t}}async function Nt(i,e){var n,r;let t=e!=null?e:"confirmed";return(r=await((n=i.getLatestBlockhash)==null?void 0:n.call(i,{commitment:t})))==null?void 0:r.blockhash}async function gn(i,e){return i.getSignatureStatuses([e]),new Promise((t,n)=>{let r=setTimeout(n,6e4);i.onSignature(e,o=>{if(clearTimeout(r),!o.err){t("");return}n(o.err.toString())},"confirmed")})}function Fs(i,e){i.length<1&&ur.logWithError(`no instructions provided: ${i.toString()}`),e.length<1&&ur.logWithError(`no signers provided:, ${e.toString()}`);let t=new lr;t.recentBlockhash="11111111111111111111111111111111",t.feePayer=e[0],t.add(...i);try{return Buffer.from(t.serialize({verifySignatures:!1})).toString("base64").length<dr}catch{return!1}}function fe(i,e){let[t,n]=Os.findProgramAddressSync(i,e);return{publicKey:t,nonce:n}}function Dt({instructions:i,payer:e,signers:t}){return Fs(i,[e,...t])}function qt({instructions:i,payer:e,lookupTableAddressAccount:t,recentBlockhash:n=cr.generate().publicKey.toString()}){let o=new Ms({payerKey:e,recentBlockhash:n,instructions:i}).compileToV0Message(Object.values(t!=null?t:{}));try{return Buffer.from(new mr(o).serialize()).toString("base64").length<dr}catch{return!1}}var _s=i=>Buffer.isBuffer(i)?i:i instanceof Uint8Array?Buffer.from(i.buffer,i.byteOffset,i.byteLength):Buffer.from(i),vs=i=>{let e=i.serialize({requireAllSignatures:!1,verifySignatures:!1});i instanceof mr&&(e=_s(e));try{return e instanceof Buffer?e.toString("base64"):Buffer.from(e).toString("base64")}catch{return e.toString("base64")}};function gt(i){let e=[];return i.forEach(t=>{t instanceof lr&&(t.recentBlockhash||(t.recentBlockhash=Es.toBase58()),t.feePayer||(t.feePayer=cr.generate().publicKey)),e.push(vs(t))}),console.log("simulate tx string:",e),e}function Ie(i,e,t){return fe([i.toBuffer(),(t!=null?t:Ws).toBuffer(),e.toBuffer()],new Vs("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"))}import{PublicKey as Y}from"@solana/web3.js";var xl=new Y("EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q"),Sl=new Y("9KEPoZmtHUrBbhWN1v1KWLMkkvwY6WLtAVUCPRtRjP4z"),Kl=new Y("FarmqiPv5eAj3j1GMdMCMUGXqPUvmquZtMy86QH6rzhG"),Cl=new Y("CLaimxFqjHzgTJtAGHU47NPhg6qrc5sCnpC4tBLyABQS"),Nl=new Y("srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"),ii=new Y("9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin"),pr=new Y("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"),Ll=new Y("5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h"),fr=new Y("CDSr3ssLcRB6XYPJwAfFt18MZvEZp4LjHcvzBVZ45duo"),ri=new Y("CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK"),Ds=new Y("LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"),qs=new Y("kN1kEznaF5Xbd8LYuqtEFcxzWSBk5Fv6ygX6SqEGJVy"),Rl=new Y("routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS"),Ol=new Y("7YttLkHDoNj9wyDur5pM1ejNaAvT9X4eqaYcHQqtj2G5"),Ml=new Y("6FJon3QE27qgPVggARueB22hLvoh22VzJpXv4rBEoSLF"),El=new Y("CC12se5To1CdEuw7fDS27B7Geo5jJyL7t5UK2B44NgiH"),Fl=new Y("9HzJyW1qZsEiSfMUf6L2jo3CcTKAyBmSyKdwQeYisHrC"),_l=new Y("DropEU8AvevN3UrXWXTMuz3rqnMczQVNjq3kcSdW2SQi"),oi=new Y("SNaPnpKUY656VPwbKmKT8FG4T85g4VWhRH1B4TQUfKs"),Gs=new Y("9pR79Lqe6wDNjag3v8MeVYUostoXjY2ognTydor6AtEZ"),vl=new Y("DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"),Us=new Y("4AscABy58S62owbByjUUkQfZsP7fxYH1rDYb69V58HPM"),Xs=new Y("7rQ1QFNosMkUCuh7Z7fPbTHvh73b68sQYdirycEzJVuw"),zs=new Y("G11FKBRaAkHAKuLCgLM6K6NUc9rTjPAznRCjZifrTQe2"),Vl=new Y("LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"),Hs=new Y("DLockwT7X7sxtLmGH9g5kmfcjaBtncdbUmi738m5bvQC"),Wl=new Y("3f7GcQFG397GAaEnv51zR6tsTVihYRydnydDD1cXekxH"),Qs=new Y("7AFUeLVRjBfzqK3tTGw8hN48KLQWSk6DTE8xprWd