@byomakase/omakase-player 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* https://github.com/MikeMcl/decimal.js
|
|
8
8
|
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
9
9
|
* MIT Licence
|
|
10
|
-
*/var ei=9e15,Dt=1e9,Ns="0123456789abcdef",$r="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gs={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ei,maxE:ei,crypto:!1},qo,ht,q=!0,Kr="[DecimalError] ",Lt=Kr+"Invalid argument: ",Yo=Kr+"Precision limit exceeded",Ko=Kr+"crypto unavailable",Jo="[object Decimal]",Me=Math.floor,Se=Math.pow,Wc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Uc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Zc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Qo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,je=1e7,j=7,jc=9007199254740991,Xc=$r.length-1,Ds=Vr.length-1,C={toStringTag:Jo};C.absoluteValue=C.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),z(r)};C.ceil=function(){return z(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(r,e){var t,i=this,s=i.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(Lt+e);return t=i.cmp(r),t<0?r:i.cmp(e)>0?e:new s(i)};C.comparedTo=C.cmp=function(r){var e,t,i,s,n=this,a=n.d,o=(r=new n.constructor(r)).d,h=n.s,l=r.s;if(!a||!o)return!h||!l?NaN:h!==l?h:a===o?0:!a^h<0?1:-1;if(!a[0]||!o[0])return a[0]?h:o[0]?-l:0;if(h!==l)return h;if(n.e!==r.e)return n.e>r.e^h<0?1:-1;for(i=a.length,s=o.length,e=0,t=i<s?i:s;e<t;++e)if(a[e]!==o[e])return a[e]>o[e]^h<0?1:-1;return i===s?0:i>s^h<0?1:-1};C.cosine=C.cos=function(){var r,e,t=this,i=t.constructor;return t.d?t.d[0]?(r=i.precision,e=i.rounding,i.precision=r+Math.max(t.e,t.sd())+j,i.rounding=1,t=qc(i,sl(i,t)),i.precision=r,i.rounding=e,z(ht==2||ht==3?t.neg():t,r,e,!0)):new i(1):new i(NaN)};C.cubeRoot=C.cbrt=function(){var r,e,t,i,s,n,a,o,h,l,d=this,u=d.constructor;if(!d.isFinite()||d.isZero())return new u(d);for(q=!1,n=d.s*Se(d.s*d,1/3),!n||Math.abs(n)==1/0?(t=xe(d.d),r=d.e,(n=(r-t.length+1)%3)&&(t+=n==1||n==-2?"0":"00"),n=Se(t,1/3),r=Me((r+1)/3)-(r%3==(r<0?-1:2)),n==1/0?t="5e"+r:(t=n.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),i=new u(t),i.s=d.s):i=new u(n.toString()),a=(r=u.precision)+3;;)if(o=i,h=o.times(o).times(o),l=h.plus(d),i=ue(l.plus(d).times(o),l.plus(h),a+2,1),xe(o.d).slice(0,a)===(t=xe(i.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(z(o,r+1,0),o.times(o).times(o).eq(d))){i=o;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(z(i,r+1,1),e=!i.times(i).times(i).eq(d));break}return q=!0,z(i,r,u.rounding,e)};C.decimalPlaces=C.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-Me(this.e/j))*j,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};C.dividedBy=C.div=function(r){return ue(this,new this.constructor(r))};C.dividedToIntegerBy=C.divToInt=function(r){var e=this,t=e.constructor;return z(ue(e,new t(r),0,1,1),t.precision,t.rounding)};C.equals=C.eq=function(r){return this.cmp(r)===0};C.floor=function(){return z(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(r){return this.cmp(r)>0};C.greaterThanOrEqualTo=C.gte=function(r){var e=this.cmp(r);return e==1||e===0};C.hyperbolicCosine=C.cosh=function(){var r,e,t,i,s,n=this,a=n.constructor,o=new a(1);if(!n.isFinite())return new a(n.s?1/0:NaN);if(n.isZero())return o;t=a.precision,i=a.rounding,a.precision=t+Math.max(n.e,n.sd())+4,a.rounding=1,s=n.d.length,s<32?(r=Math.ceil(s/3),e=(1/Qr(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),n=ci(a,1,n.times(e),new a(1),!0);for(var h,l=r,d=new a(8);l--;)h=n.times(n),n=o.minus(h.times(d.minus(h.times(d))));return z(n,a.precision=t,a.rounding=i,!0)};C.hyperbolicSine=C.sinh=function(){var r,e,t,i,s=this,n=s.constructor;if(!s.isFinite()||s.isZero())return new n(s);if(e=n.precision,t=n.rounding,n.precision=e+Math.max(s.e,s.sd())+4,n.rounding=1,i=s.d.length,i<3)s=ci(n,2,s,s,!0);else{r=1.4*Math.sqrt(i),r=r>16?16:r|0,s=s.times(1/Qr(5,r)),s=ci(n,2,s,s,!0);for(var a,o=new n(5),h=new n(16),l=new n(20);r--;)a=s.times(s),s=s.times(o.plus(a.times(h.times(a).plus(l))))}return n.precision=e,n.rounding=t,z(s,e,t,!0)};C.hyperbolicTangent=C.tanh=function(){var r,e,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+7,i.rounding=1,ue(t.sinh(),t.cosh(),i.precision=r,i.rounding=e)):new i(t.s)};C.inverseCosine=C.acos=function(){var r,e=this,t=e.constructor,i=e.abs().cmp(1),s=t.precision,n=t.rounding;return i!==-1?i===0?e.isNeg()?Ue(t,s,n):new t(0):new t(NaN):e.isZero()?Ue(t,s+4,n).times(.5):(t.precision=s+6,t.rounding=1,e=e.asin(),r=Ue(t,s+4,n).times(.5),t.precision=s,t.rounding=n,r.minus(e))};C.inverseHyperbolicCosine=C.acosh=function(){var r,e,t=this,i=t.constructor;return t.lte(1)?new i(t.eq(1)?0:NaN):t.isFinite()?(r=i.precision,e=i.rounding,i.precision=r+Math.max(Math.abs(t.e),t.sd())+4,i.rounding=1,q=!1,t=t.times(t).minus(1).sqrt().plus(t),q=!0,i.precision=r,i.rounding=e,t.ln()):new i(t)};C.inverseHyperbolicSine=C.asinh=function(){var r,e,t=this,i=t.constructor;return!t.isFinite()||t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,i.rounding=1,q=!1,t=t.times(t).plus(1).sqrt().plus(t),q=!0,i.precision=r,i.rounding=e,t.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var r,e,t,i,s=this,n=s.constructor;return s.isFinite()?s.e>=0?new n(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=n.precision,e=n.rounding,i=s.sd(),Math.max(i,r)<2*-s.e-1?z(new n(s),r,e,!0):(n.precision=t=i-s.e,s=ue(s.plus(1),new n(1).minus(s),t+r,1),n.precision=r+4,n.rounding=1,s=s.ln(),n.precision=r,n.rounding=e,s.times(.5))):new n(NaN)};C.inverseSine=C.asin=function(){var r,e,t,i,s=this,n=s.constructor;return s.isZero()?new n(s):(e=s.abs().cmp(1),t=n.precision,i=n.rounding,e!==-1?e===0?(r=Ue(n,t+4,i).times(.5),r.s=s.s,r):new n(NaN):(n.precision=t+6,n.rounding=1,s=s.div(new n(1).minus(s.times(s)).sqrt().plus(1)).atan(),n.precision=t,n.rounding=i,s.times(2)))};C.inverseTangent=C.atan=function(){var r,e,t,i,s,n,a,o,h,l=this,d=l.constructor,u=d.precision,c=d.rounding;if(l.isFinite()){if(l.isZero())return new d(l);if(l.abs().eq(1)&&u+4<=Ds)return a=Ue(d,u+4,c).times(.25),a.s=l.s,a}else{if(!l.s)return new d(NaN);if(u+4<=Ds)return a=Ue(d,u+4,c).times(.5),a.s=l.s,a}for(d.precision=o=u+10,d.rounding=1,t=Math.min(28,o/j+2|0),r=t;r;--r)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(q=!1,e=Math.ceil(o/j),i=1,h=l.times(l),a=new d(l),s=l;r!==-1;)if(s=s.times(h),n=a.minus(s.div(i+=2)),s=s.times(h),a=n.plus(s.div(i+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===n.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),q=!0,z(a,d.precision=u,d.rounding=c,!0)};C.isFinite=function(){return!!this.d};C.isInteger=C.isInt=function(){return!!this.d&&Me(this.e/j)>this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(r){return this.cmp(r)<0};C.lessThanOrEqualTo=C.lte=function(r){return this.cmp(r)<1};C.logarithm=C.log=function(r){var e,t,i,s,n,a,o,h,l=this,d=l.constructor,u=d.precision,c=d.rounding,p=5;if(r==null)r=new d(10),e=!0;else{if(r=new d(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new d(NaN);e=r.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new d(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)n=!0;else{for(s=t[0];s%10===0;)s/=10;n=s!==1}if(q=!1,o=u+p,a=Pt(l,o),i=e?zr(d,o+10):Pt(r,o),h=ue(a,i,o,1),Zi(h.d,s=u,c))do if(o+=10,a=Pt(l,o),i=e?zr(d,o+10):Pt(r,o),h=ue(a,i,o,1),!n){+xe(h.d).slice(s+1,s+15)+1==1e14&&(h=z(h,u+1,0));break}while(Zi(h.d,s+=10,c));return q=!0,z(h,u,c)};C.minus=C.sub=function(r){var e,t,i,s,n,a,o,h,l,d,u,c,p=this,f=p.constructor;if(r=new f(r),!p.d||!r.d)return!p.s||!r.s?r=new f(NaN):p.d?r.s=-r.s:r=new f(r.d||p.s!==r.s?p:NaN),r;if(p.s!=r.s)return r.s=-r.s,p.plus(r);if(l=p.d,c=r.d,o=f.precision,h=f.rounding,!l[0]||!c[0]){if(c[0])r.s=-r.s;else if(l[0])r=new f(p);else return new f(h===3?-0:0);return q?z(r,o,h):r}if(t=Me(r.e/j),d=Me(p.e/j),l=l.slice(),n=d-t,n){for(u=n<0,u?(e=l,n=-n,a=c.length):(e=c,t=d,a=l.length),i=Math.max(Math.ceil(o/j),a)+2,n>i&&(n=i,e.length=1),e.reverse(),i=n;i--;)e.push(0);e.reverse()}else{for(i=l.length,a=c.length,u=i<a,u&&(a=i),i=0;i<a;i++)if(l[i]!=c[i]){u=l[i]<c[i];break}n=0}for(u&&(e=l,l=c,c=e,r.s=-r.s),a=l.length,i=c.length-a;i>0;--i)l[a++]=0;for(i=c.length;i>n;){if(l[--i]<c[i]){for(s=i;s&&l[--s]===0;)l[s]=je-1;--l[s],l[i]+=je}l[i]-=c[i]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(r.d=l,r.e=Jr(l,t),q?z(r,o,h):r):new f(h===3?-0:0)};C.modulo=C.mod=function(r){var e,t=this,i=t.constructor;return r=new i(r),!t.d||!r.s||r.d&&!r.d[0]?new i(NaN):!r.d||t.d&&!t.d[0]?z(new i(t),i.precision,i.rounding):(q=!1,i.modulo==9?(e=ue(t,r.abs(),0,3,1),e.s*=r.s):e=ue(t,r,0,i.modulo,1),e=e.times(r),q=!0,t.minus(e))};C.naturalExponential=C.exp=function(){return Fs(this)};C.naturalLogarithm=C.ln=function(){return Pt(this)};C.negated=C.neg=function(){var r=new this.constructor(this);return r.s=-r.s,z(r)};C.plus=C.add=function(r){var e,t,i,s,n,a,o,h,l,d,u=this,c=u.constructor;if(r=new c(r),!u.d||!r.d)return!u.s||!r.s?r=new c(NaN):u.d||(r=new c(r.d||u.s===r.s?u:NaN)),r;if(u.s!=r.s)return r.s=-r.s,u.minus(r);if(l=u.d,d=r.d,o=c.precision,h=c.rounding,!l[0]||!d[0])return d[0]||(r=new c(u)),q?z(r,o,h):r;if(n=Me(u.e/j),i=Me(r.e/j),l=l.slice(),s=n-i,s){for(s<0?(t=l,s=-s,a=d.length):(t=d,i=n,a=l.length),n=Math.ceil(o/j),a=n>a?n+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=l.length,s=d.length,a-s<0&&(s=a,t=d,d=l,l=t),e=0;s;)e=(l[--s]=l[s]+d[s]+e)/je|0,l[s]%=je;for(e&&(l.unshift(e),++i),a=l.length;l[--a]==0;)l.pop();return r.d=l,r.e=Jr(l,i),q?z(r,o,h):r};C.precision=C.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(Lt+r);return t.d?(e=el(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};C.round=function(){var r=this,e=r.constructor;return z(new e(r),r.e+1,e.rounding)};C.sine=C.sin=function(){var r,e,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+Math.max(t.e,t.sd())+j,i.rounding=1,t=Kc(i,sl(i,t)),i.precision=r,i.rounding=e,z(ht>2?t.neg():t,r,e,!0)):new i(NaN)};C.squareRoot=C.sqrt=function(){var r,e,t,i,s,n,a=this,o=a.d,h=a.e,l=a.s,d=a.constructor;if(l!==1||!o||!o[0])return new d(!l||l<0&&(!o||o[0])?NaN:o?a:1/0);for(q=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=xe(o),(e.length+h)%2==0&&(e+="0"),l=Math.sqrt(e),h=Me((h+1)/2)-(h<0||h%2),l==1/0?e="5e"+h:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+h),i=new d(e)):i=new d(l.toString()),t=(h=d.precision)+3;;)if(n=i,i=n.plus(ue(a,n,t+2,1)).times(.5),xe(n.d).slice(0,t)===(e=xe(i.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(z(n,h+1,0),n.times(n).eq(a))){i=n;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(z(i,h+1,1),r=!i.times(i).eq(a));break}return q=!0,z(i,h,d.rounding,r)};C.tangent=C.tan=function(){var r,e,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+10,i.rounding=1,t=t.sin(),t.s=1,t=ue(t,new i(1).minus(t.times(t)).sqrt(),r+10,0),i.precision=r,i.rounding=e,z(ht==2||ht==4?t.neg():t,r,e,!0)):new i(NaN)};C.times=C.mul=function(r){var e,t,i,s,n,a,o,h,l,d=this,u=d.constructor,c=d.d,p=(r=new u(r)).d;if(r.s*=d.s,!c||!c[0]||!p||!p[0])return new u(!r.s||c&&!c[0]&&!p||p&&!p[0]&&!c?NaN:!c||!p?r.s/0:r.s*0);for(t=Me(d.e/j)+Me(r.e/j),h=c.length,l=p.length,h<l&&(n=c,c=p,p=n,a=h,h=l,l=a),n=[],a=h+l,i=a;i--;)n.push(0);for(i=l;--i>=0;){for(e=0,s=h+i;s>i;)o=n[s]+p[i]*c[s-i-1]+e,n[s--]=o%je|0,e=o/je|0;n[s]=(n[s]+e)%je|0}for(;!n[--a];)n.pop();return e?++t:n.shift(),r.d=n,r.e=Jr(n,t),q?z(r,u.precision,u.rounding):r};C.toBinary=function(r,e){return dn(this,2,r,e)};C.toDecimalPlaces=C.toDP=function(r,e){var t=this,i=t.constructor;return t=new i(t),r===void 0?t:(Ne(r,0,Dt),e===void 0?e=i.rounding:Ne(e,0,8),z(t,r+t.e+1,e))};C.toExponential=function(r,e){var t,i=this,s=i.constructor;return r===void 0?t=nt(i,!0):(Ne(r,0,Dt),e===void 0?e=s.rounding:Ne(e,0,8),i=z(new s(i),r+1,e),t=nt(i,!0,r+1)),i.isNeg()&&!i.isZero()?"-"+t:t};C.toFixed=function(r,e){var t,i,s=this,n=s.constructor;return r===void 0?t=nt(s):(Ne(r,0,Dt),e===void 0?e=n.rounding:Ne(e,0,8),i=z(new n(s),r+s.e+1,e),t=nt(i,!1,r+i.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};C.toFraction=function(r){var e,t,i,s,n,a,o,h,l,d,u,c,p=this,f=p.d,m=p.constructor;if(!f)return new m(p);if(l=t=new m(1),i=h=new m(0),e=new m(i),n=e.e=el(f)-p.e-1,a=n%j,e.d[0]=Se(10,a<0?j+a:a),r==null)r=n>0?e:l;else{if(o=new m(r),!o.isInt()||o.lt(l))throw Error(Lt+o);r=o.gt(e)?n>0?e:l:o}for(q=!1,o=new m(xe(f)),d=m.precision,m.precision=n=f.length*j*2;u=ue(o,e,0,1,1),s=t.plus(u.times(i)),s.cmp(r)!=1;)t=i,i=s,s=l,l=h.plus(u.times(s)),h=s,s=e,e=o.minus(u.times(s)),o=s;return s=ue(r.minus(t),i,0,1,1),h=h.plus(s.times(l)),t=t.plus(s.times(i)),h.s=l.s=p.s,c=ue(l,i,n,1).minus(p).abs().cmp(ue(h,t,n,1).minus(p).abs())<1?[l,i]:[h,t],m.precision=d,q=!0,c};C.toHexadecimal=C.toHex=function(r,e){return dn(this,16,r,e)};C.toNearest=function(r,e){var t=this,i=t.constructor;if(t=new i(t),r==null){if(!t.d)return t;r=new i(1),e=i.rounding}else{if(r=new i(r),e===void 0?e=i.rounding:Ne(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(q=!1,t=ue(t,r,0,e,1).times(r),q=!0,z(t)):(r.s=t.s,t=r),t};C.toNumber=function(){return+this};C.toOctal=function(r,e){return dn(this,8,r,e)};C.toPower=C.pow=function(r){var e,t,i,s,n,a,o=this,h=o.constructor,l=+(r=new h(r));if(!o.d||!r.d||!o.d[0]||!r.d[0])return new h(Se(+o,l));if(o=new h(o),o.eq(1))return o;if(i=h.precision,n=h.rounding,r.eq(1))return z(o,i,n);if(e=Me(r.e/j),e>=r.d.length-1&&(t=l<0?-l:l)<=jc)return s=tl(h,o,t,i),r.s<0?new h(1).div(s):z(s,i,n);if(a=o.s,a<0){if(e<r.d.length-1)return new h(NaN);if(r.d[e]&1||(a=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=a,o}return t=Se(+o,l),e=t==0||!isFinite(t)?Me(l*(Math.log("0."+xe(o.d))/Math.LN10+o.e+1)):new h(t+"").e,e>h.maxE+1||e<h.minE-1?new h(e>0?a/0:0):(q=!1,h.rounding=o.s=1,t=Math.min(12,(e+"").length),s=Fs(r.times(Pt(o,i+t)),i),s.d&&(s=z(s,i+5,1),Zi(s.d,i,n)&&(e=i+10,s=z(Fs(r.times(Pt(o,e+t)),e),e+5,1),+xe(s.d).slice(i+1,i+15)+1==1e14&&(s=z(s,i+1,0)))),s.s=a,q=!0,h.rounding=n,z(s,i,n))};C.toPrecision=function(r,e){var t,i=this,s=i.constructor;return r===void 0?t=nt(i,i.e<=s.toExpNeg||i.e>=s.toExpPos):(Ne(r,1,Dt),e===void 0?e=s.rounding:Ne(e,0,8),i=z(new s(i),r,e),t=nt(i,r<=i.e||i.e<=s.toExpNeg,r)),i.isNeg()&&!i.isZero()?"-"+t:t};C.toSignificantDigits=C.toSD=function(r,e){var t=this,i=t.constructor;return r===void 0?(r=i.precision,e=i.rounding):(Ne(r,1,Dt),e===void 0?e=i.rounding:Ne(e,0,8)),z(new i(t),r,e)};C.toString=function(){var r=this,e=r.constructor,t=nt(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};C.truncated=C.trunc=function(){return z(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var r=this,e=r.constructor,t=nt(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function xe(r){var e,t,i,s=r.length-1,n="",a=r[0];if(s>0){for(n+=a,e=1;e<s;e++)i=r[e]+"",t=j-i.length,t&&(n+=kt(t)),n+=i;a=r[e],i=a+"",t=j-i.length,t&&(n+=kt(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return n+a}function Ne(r,e,t){if(r!==~~r||r<e||r>t)throw Error(Lt+r)}function Zi(r,e,t,i){var s,n,a,o;for(n=r[0];n>=10;n/=10)--e;return--e<0?(e+=j,s=0):(s=Math.ceil((e+1)/j),e%=j),n=Se(10,j-e),o=r[s]%n|0,i==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),a=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):a=(t<4&&o+1==n||t>3&&o+1==n/2)&&(r[s+1]/n/100|0)==Se(10,e-2)-1||(o==n/2||o==0)&&(r[s+1]/n/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),a=(i||t<4)&&o==9999||!i&&t>3&&o==4999):a=((i||t<4)&&o+1==n||!i&&t>3&&o+1==n/2)&&(r[s+1]/n/1e3|0)==Se(10,e-3)-1,a}function Sr(r,e,t){for(var i,s=[0],n,a=0,o=r.length;a<o;){for(n=s.length;n--;)s[n]*=e;for(s[0]+=Ns.indexOf(r.charAt(a++)),i=0;i<s.length;i++)s[i]>t-1&&(s[i+1]===void 0&&(s[i+1]=0),s[i+1]+=s[i]/t|0,s[i]%=t)}return s.reverse()}function qc(r,e){var t,i,s;if(e.isZero())return e;i=e.d.length,i<32?(t=Math.ceil(i/3),s=(1/Qr(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=ci(r,1,e.times(s),new r(1));for(var n=t;n--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}var ue=function(){function r(i,s,n){var a,o=0,h=i.length;for(i=i.slice();h--;)a=i[h]*s+o,i[h]=a%n|0,o=a/n|0;return o&&i.unshift(o),i}function e(i,s,n,a){var o,h;if(n!=a)h=n>a?1:-1;else for(o=h=0;o<n;o++)if(i[o]!=s[o]){h=i[o]>s[o]?1:-1;break}return h}function t(i,s,n,a){for(var o=0;n--;)i[n]-=o,o=i[n]<s[n]?1:0,i[n]=o*a+i[n]-s[n];for(;!i[0]&&i.length>1;)i.shift()}return function(i,s,n,a,o,h){var l,d,u,c,p,f,m,v,_,w,b,T,L,A,G,R,H,$,I,K,W=i.constructor,le=i.s==s.s?1:-1,ne=i.d,U=s.d;if(!ne||!ne[0]||!U||!U[0])return new W(!i.s||!s.s||(ne?U&&ne[0]==U[0]:!U)?NaN:ne&&ne[0]==0||!U?le*0:le/0);for(h?(p=1,d=i.e-s.e):(h=je,p=j,d=Me(i.e/p)-Me(s.e/p)),I=U.length,H=ne.length,_=new W(le),w=_.d=[],u=0;U[u]==(ne[u]||0);u++);if(U[u]>(ne[u]||0)&&d--,n==null?(A=n=W.precision,a=W.rounding):o?A=n+(i.e-s.e)+1:A=n,A<0)w.push(1),f=!0;else{if(A=A/p+2|0,u=0,I==1){for(c=0,U=U[0],A++;(u<H||c)&&A--;u++)G=c*h+(ne[u]||0),w[u]=G/U|0,c=G%U|0;f=c||u<H}else{for(c=h/(U[0]+1)|0,c>1&&(U=r(U,c,h),ne=r(ne,c,h),I=U.length,H=ne.length),R=I,b=ne.slice(0,I),T=b.length;T<I;)b[T++]=0;K=U.slice(),K.unshift(0),$=U[0],U[1]>=h/2&&++$;do c=0,l=e(U,b,I,T),l<0?(L=b[0],I!=T&&(L=L*h+(b[1]||0)),c=L/$|0,c>1?(c>=h&&(c=h-1),m=r(U,c,h),v=m.length,T=b.length,l=e(m,b,v,T),l==1&&(c--,t(m,I<v?K:U,v,h))):(c==0&&(l=c=1),m=U.slice()),v=m.length,v<T&&m.unshift(0),t(b,m,T,h),l==-1&&(T=b.length,l=e(U,b,I,T),l<1&&(c++,t(b,I<T?K:U,T,h))),T=b.length):l===0&&(c++,b=[0]),w[u++]=c,l&&b[0]?b[T++]=ne[R]||0:(b=[ne[R]],T=1);while((R++<H||b[0]!==void 0)&&A--);f=b[0]!==void 0}w[0]||w.shift()}if(p==1)_.e=d,qo=f;else{for(u=1,c=w[0];c>=10;c/=10)u++;_.e=u+d*p-1,z(_,o?n+_.e+1:n,a,f)}return _}}();function z(r,e,t,i){var s,n,a,o,h,l,d,u,c,p=r.constructor;e:if(e!=null){if(u=r.d,!u)return r;for(s=1,o=u[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=j,a=e,d=u[c=0],h=d/Se(10,s-a-1)%10|0;else if(c=Math.ceil((n+1)/j),o=u.length,c>=o)if(i){for(;o++<=c;)u.push(0);d=h=0,s=1,n%=j,a=n-j+1}else break e;else{for(d=o=u[c],s=1;o>=10;o/=10)s++;n%=j,a=n-j+s,h=a<0?0:d/Se(10,s-a-1)%10|0}if(i=i||e<0||u[c+1]!==void 0||(a<0?d:d%Se(10,s-a-1)),l=t<4?(h||i)&&(t==0||t==(r.s<0?3:2)):h>5||h==5&&(t==4||i||t==6&&(n>0?a>0?d/Se(10,s-a):0:u[c-1])%10&1||t==(r.s<0?8:7)),e<1||!u[0])return u.length=0,l?(e-=r.e+1,u[0]=Se(10,(j-e%j)%j),r.e=-e||0):u[0]=r.e=0,r;if(n==0?(u.length=c,o=1,c--):(u.length=c+1,o=Se(10,j-n),u[c]=a>0?(d/Se(10,s-a)%Se(10,a)|0)*o:0),l)for(;;)if(c==0){for(n=1,a=u[0];a>=10;a/=10)n++;for(a=u[0]+=o,o=1;a>=10;a/=10)o++;n!=o&&(r.e++,u[0]==je&&(u[0]=1));break}else{if(u[c]+=o,u[c]!=je)break;u[c--]=0,o=1}for(n=u.length;u[--n]===0;)u.pop()}return q&&(r.e>p.maxE?(r.d=null,r.e=NaN):r.e<p.minE&&(r.e=0,r.d=[0])),r}function nt(r,e,t){if(!r.isFinite())return rl(r);var i,s=r.e,n=xe(r.d),a=n.length;return e?(t&&(i=t-a)>0?n=n.charAt(0)+"."+n.slice(1)+kt(i):a>1&&(n=n.charAt(0)+"."+n.slice(1)),n=n+(r.e<0?"e":"e+")+r.e):s<0?(n="0."+kt(-s-1)+n,t&&(i=t-a)>0&&(n+=kt(i))):s>=a?(n+=kt(s+1-a),t&&(i=t-s-1)>0&&(n=n+"."+kt(i))):((i=s+1)<a&&(n=n.slice(0,i)+"."+n.slice(i)),t&&(i=t-a)>0&&(s+1===a&&(n+="."),n+=kt(i))),n}function Jr(r,e){var t=r[0];for(e*=j;t>=10;t/=10)e++;return e}function zr(r,e,t){if(e>Xc)throw q=!0,t&&(r.precision=t),Error(Yo);return z(new r($r),e,1,!0)}function Ue(r,e,t){if(e>Ds)throw Error(Yo);return z(new r(Vr),e,t,!0)}function el(r){var e=r.length-1,t=e*j+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}function kt(r){for(var e="";r--;)e+="0";return e}function tl(r,e,t,i){var s,n=new r(1),a=Math.ceil(i/j+4);for(q=!1;;){if(t%2&&(n=n.times(e),ra(n.d,a)&&(s=!0)),t=Me(t/2),t===0){t=n.d.length-1,s&&n.d[t]===0&&++n.d[t];break}e=e.times(e),ra(e.d,a)}return q=!0,n}function ia(r){return r.d[r.d.length-1]&1}function il(r,e,t){for(var i,s=new r(e[0]),n=0;++n<e.length;)if(i=new r(e[n]),i.s)s[t](i)&&(s=i);else{s=i;break}return s}function Fs(r,e){var t,i,s,n,a,o,h,l=0,d=0,u=0,c=r.constructor,p=c.rounding,f=c.precision;if(!r.d||!r.d[0]||r.e>17)return new c(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:0/0);for(e==null?(q=!1,h=f):h=e,o=new c(.03125);r.e>-2;)r=r.times(o),u+=5;for(i=Math.log(Se(2,u))/Math.LN10*2+5|0,h+=i,t=n=a=new c(1),c.precision=h;;){if(n=z(n.times(r),h,1),t=t.times(++d),o=a.plus(ue(n,t,h,1)),xe(o.d).slice(0,h)===xe(a.d).slice(0,h)){for(s=u;s--;)a=z(a.times(a),h,1);if(e==null)if(l<3&&Zi(a.d,h-i,p,l))c.precision=h+=10,t=n=o=new c(1),d=0,l++;else return z(a,c.precision=f,p,q=!0);else return c.precision=f,a}a=o}}function Pt(r,e){var t,i,s,n,a,o,h,l,d,u,c,p=1,f=10,m=r,v=m.d,_=m.constructor,w=_.rounding,b=_.precision;if(m.s<0||!v||!v[0]||!m.e&&v[0]==1&&v.length==1)return new _(v&&!v[0]?-1/0:m.s!=1?NaN:v?0:m);if(e==null?(q=!1,d=b):d=e,_.precision=d+=f,t=xe(v),i=t.charAt(0),Math.abs(n=m.e)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)m=m.times(r),t=xe(m.d),i=t.charAt(0),p++;n=m.e,i>1?(m=new _("0."+t),n++):m=new _(i+"."+t.slice(1))}else return l=zr(_,d+2,b).times(n+""),m=Pt(new _(i+"."+t.slice(1)),d-f).plus(l),_.precision=b,e==null?z(m,b,w,q=!0):m;for(u=m,h=a=m=ue(m.minus(1),m.plus(1),d,1),c=z(m.times(m),d,1),s=3;;){if(a=z(a.times(c),d,1),l=h.plus(ue(a,new _(s),d,1)),xe(l.d).slice(0,d)===xe(h.d).slice(0,d))if(h=h.times(2),n!==0&&(h=h.plus(zr(_,d+2,b).times(n+""))),h=ue(h,new _(p),d,1),e==null)if(Zi(h.d,d-f,w,o))_.precision=d+=f,l=a=m=ue(u.minus(1),u.plus(1),d,1),c=z(m.times(m),d,1),s=o=1;else return z(h,_.precision=b,w,q=!0);else return _.precision=b,h;h=l,s+=2}}function rl(r){return String(r.s*r.s/0)}function Hs(r,e){var t,i,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(t<0&&(t=i),t+=+e.slice(i+1),e=e.substring(0,i)):t<0&&(t=e.length),i=0;e.charCodeAt(i)===48;i++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(i,s),e){if(s-=i,r.e=t=t-i-1,r.d=[],i=(t+1)%j,t<0&&(i+=j),i<s){for(i&&r.d.push(+e.slice(0,i)),s-=j;i<s;)r.d.push(+e.slice(i,i+=j));e=e.slice(i),i=j-e.length}else i-=s;for(;i--;)e+="0";r.d.push(+e),q&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}function Yc(r,e){var t,i,s,n,a,o,h,l,d;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Qo.test(e))return Hs(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(Uc.test(e))t=16,e=e.toLowerCase();else if(Wc.test(e))t=2;else if(Zc.test(e))t=8;else throw Error(Lt+e);for(n=e.search(/p/i),n>0?(h=+e.slice(n+1),e=e.substring(2,n)):e=e.slice(2),n=e.indexOf("."),a=n>=0,i=r.constructor,a&&(e=e.replace(".",""),o=e.length,n=o-n,s=tl(i,new i(t),n,n*2)),l=Sr(e,t,je),d=l.length-1,n=d;l[n]===0;--n)l.pop();return n<0?new i(r.s*0):(r.e=Jr(l,d),r.d=l,q=!1,a&&(r=ue(r,s,o*4)),h&&(r=r.times(Math.abs(h)<54?Se(2,h):Z.pow(2,h))),q=!0,r)}function Kc(r,e){var t,i=e.d.length;if(i<3)return e.isZero()?e:ci(r,2,e,e);t=1.4*Math.sqrt(i),t=t>16?16:t|0,e=e.times(1/Qr(5,t)),e=ci(r,2,e,e);for(var s,n=new r(5),a=new r(16),o=new r(20);t--;)s=e.times(e),e=e.times(n.plus(s.times(a.times(s).minus(o))));return e}function ci(r,e,t,i,s){var n,a,o,h,l=r.precision,d=Math.ceil(l/j);for(q=!1,h=t.times(t),o=new r(i);;){if(a=ue(o.times(h),new r(e++*e++),l,1),o=s?i.plus(a):i.minus(a),i=ue(a.times(h),new r(e++*e++),l,1),a=o.plus(i),a.d[d]!==void 0){for(n=d;a.d[n]===o.d[n]&&n--;);if(n==-1)break}n=o,o=i,i=a,a=n}return q=!0,a.d.length=d+1,a}function Qr(r,e){for(var t=r;--e;)t*=r;return t}function sl(r,e){var t,i=e.s<0,s=Ue(r,r.precision,1),n=s.times(.5);if(e=e.abs(),e.lte(n))return ht=i?4:1,e;if(t=e.divToInt(s),t.isZero())ht=i?3:2;else{if(e=e.minus(t.times(s)),e.lte(n))return ht=ia(t)?i?2:3:i?4:1,e;ht=ia(t)?i?1:4:i?3:2}return e.minus(s).abs()}function dn(r,e,t,i){var s,n,a,o,h,l,d,u,c,p=r.constructor,f=t!==void 0;if(f?(Ne(t,1,Dt),i===void 0?i=p.rounding:Ne(i,0,8)):(t=p.precision,i=p.rounding),!r.isFinite())d=rl(r);else{for(d=nt(r),a=d.indexOf("."),f?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(d=d.replace(".",""),c=new p(1),c.e=d.length-a,c.d=Sr(nt(c),10,s),c.e=c.d.length),u=Sr(d,10,s),n=h=u.length;u[--h]==0;)u.pop();if(!u[0])d=f?"0p+0":"0";else{if(a<0?n--:(r=new p(r),r.d=u,r.e=n,r=ue(r,c,t,i,0,s),u=r.d,n=r.e,l=qo),a=u[t],o=s/2,l=l||u[t+1]!==void 0,l=i<4?(a!==void 0||l)&&(i===0||i===(r.s<0?3:2)):a>o||a===o&&(i===4||l||i===6&&u[t-1]&1||i===(r.s<0?8:7)),u.length=t,l)for(;++u[--t]>s-1;)u[t]=0,t||(++n,u.unshift(1));for(h=u.length;!u[h-1];--h);for(a=0,d="";a<h;a++)d+=Ns.charAt(u[a]);if(f){if(h>1)if(e==16||e==8){for(a=e==16?4:3,--h;h%a;h++)d+="0";for(u=Sr(d,s,e),h=u.length;!u[h-1];--h);for(a=1,d="1.";a<h;a++)d+=Ns.charAt(u[a])}else d=d.charAt(0)+"."+d.slice(1);d=d+(n<0?"p":"p+")+n}else if(n<0){for(;++n;)d="0"+d;d="0."+d}else if(++n>h)for(n-=h;n--;)d+="0";else n<h&&(d=d.slice(0,n)+"."+d.slice(n))}d=(e==16?"0x":e==2?"0b":e==8?"0o":"")+d}return r.s<0?"-"+d:d}function ra(r,e){if(r.length>e)return r.length=e,!0}function Jc(r){return new this(r).abs()}function Qc(r){return new this(r).acos()}function ef(r){return new this(r).acosh()}function tf(r,e){return new this(r).plus(e)}function rf(r){return new this(r).asin()}function sf(r){return new this(r).asinh()}function nf(r){return new this(r).atan()}function af(r){return new this(r).atanh()}function of(r,e){r=new this(r),e=new this(e);var t,i=this.precision,s=this.rounding,n=i+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Ue(this,n,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Ue(this,i,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Ue(this,n,1).times(.5),t.s=r.s):e.s<0?(this.precision=n,this.rounding=1,t=this.atan(ue(r,e,n,1)),e=Ue(this,n,1),this.precision=i,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(ue(r,e,n,1)),t}function lf(r){return new this(r).cbrt()}function hf(r){return z(r=new this(r),r.e+1,2)}function df(r,e,t){return new this(r).clamp(e,t)}function uf(r){if(!r||typeof r!="object")throw Error(Kr+"Object expected");var e,t,i,s=r.defaults===!0,n=["precision",1,Dt,"rounding",0,8,"toExpNeg",-ei,0,"toExpPos",0,ei,"maxE",0,ei,"minE",-ei,0,"modulo",0,9];for(e=0;e<n.length;e+=3)if(t=n[e],s&&(this[t]=Gs[t]),(i=r[t])!==void 0)if(Me(i)===i&&i>=n[e+1]&&i<=n[e+2])this[t]=i;else throw Error(Lt+t+": "+i);if(t="crypto",s&&(this[t]=Gs[t]),(i=r[t])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Ko);else this[t]=!1;else throw Error(Lt+t+": "+i);return this}function cf(r){return new this(r).cos()}function ff(r){return new this(r).cosh()}function nl(r){var e,t,i;function s(n){var a,o,h,l=this;if(!(l instanceof s))return new s(n);if(l.constructor=s,sa(n)){l.s=n.s,q?!n.d||n.e>s.maxE?(l.e=NaN,l.d=null):n.e<s.minE?(l.e=0,l.d=[0]):(l.e=n.e,l.d=n.d.slice()):(l.e=n.e,l.d=n.d?n.d.slice():n.d);return}if(h=typeof n,h==="number"){if(n===0){l.s=1/n<0?-1:1,l.e=0,l.d=[0];return}if(n<0?(n=-n,l.s=-1):l.s=1,n===~~n&&n<1e7){for(a=0,o=n;o>=10;o/=10)a++;q?a>s.maxE?(l.e=NaN,l.d=null):a<s.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[n]):(l.e=a,l.d=[n]);return}else if(n*0!==0){n||(l.s=NaN),l.e=NaN,l.d=null;return}return Hs(l,n.toString())}else if(h!=="string")throw Error(Lt+n);return(o=n.charCodeAt(0))===45?(n=n.slice(1),l.s=-1):(o===43&&(n=n.slice(1)),l.s=1),Qo.test(n)?Hs(l,n):Yc(l,n)}if(s.prototype=C,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=uf,s.clone=nl,s.isDecimal=sa,s.abs=Jc,s.acos=Qc,s.acosh=ef,s.add=tf,s.asin=rf,s.asinh=sf,s.atan=nf,s.atanh=af,s.atan2=of,s.cbrt=lf,s.ceil=hf,s.clamp=df,s.cos=cf,s.cosh=ff,s.div=pf,s.exp=mf,s.floor=gf,s.hypot=vf,s.ln=yf,s.log=bf,s.log10=wf,s.log2=_f,s.max=Sf,s.min=Tf,s.mod=Cf,s.mul=Ef,s.pow=kf,s.random=xf,s.round=Pf,s.sign=Af,s.sin=Of,s.sinh=Mf,s.sqrt=Lf,s.sub=Rf,s.sum=If,s.tan=Nf,s.tanh=Gf,s.trunc=Df,r===void 0&&(r={}),r&&r.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<i.length;)r.hasOwnProperty(t=i[e++])||(r[t]=this[t]);return s.config(r),s}function pf(r,e){return new this(r).div(e)}function mf(r){return new this(r).exp()}function gf(r){return z(r=new this(r),r.e+1,3)}function vf(){var r,e,t=new this(0);for(q=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),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 sa(r){return r instanceof Z||r&&r.toStringTag===Jo||!1}function yf(r){return new this(r).ln()}function bf(r,e){return new this(r).log(e)}function _f(r){return new this(r).log(2)}function wf(r){return new this(r).log(10)}function Sf(){return il(this,arguments,"lt")}function Tf(){return il(this,arguments,"gt")}function Cf(r,e){return new this(r).mod(e)}function Ef(r,e){return new this(r).mul(e)}function kf(r,e){return new this(r).pow(e)}function xf(r){var e,t,i,s,n=0,a=new this(1),o=[];if(r===void 0?r=this.precision:Ne(r,1,Dt),i=Math.ceil(r/j),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(i));n<i;)s=e[n],s>=429e7?e[n]=crypto.getRandomValues(new Uint32Array(1))[0]:o[n++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(i*=4);n<i;)s=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+((e[n+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,n):(o.push(s%1e7),n+=4);n=i/4}else throw Error(Ko);else for(;n<i;)o[n++]=Math.random()*1e7|0;for(i=o[--n],r%=j,i&&r&&(s=Se(10,j-r),o[n]=(i/s|0)*s);o[n]===0;n--)o.pop();if(n<0)t=0,o=[0];else{for(t=-1;o[0]===0;t-=j)o.shift();for(i=1,s=o[0];s>=10;s/=10)i++;i<j&&(t-=j-i)}return a.e=t,a.d=o,a}function Pf(r){return z(r=new this(r),r.e+1,this.rounding)}function Af(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}function Of(r){return new this(r).sin()}function Mf(r){return new this(r).sinh()}function Lf(r){return new this(r).sqrt()}function Rf(r,e){return new this(r).sub(e)}function If(){var r=0,e=arguments,t=new this(e[r]);for(q=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return q=!0,z(t,this.precision,this.rounding)}function Nf(r){return new this(r).tan()}function Gf(r){return new this(r).tanh()}function Df(r){return z(r=new this(r),r.e+1,1)}C[Symbol.for("nodejs.util.inspect.custom")]=C.toString;C[Symbol.toStringTag]="Decimal";var Z=C.constructor=nl(Gs);$r=new Z($r);Vr=new Z(Vr);const na={editable:!0,style:{...jo,markerSymbolSize:20,periodMarkerHandleType:"start"}};class aa extends Xo{constructor(e,t,i){super({...na,...e,style:{...na.style,...e.style}},t,i)}createSymbol(){switch(this.style.markerSymbolType){case"triangle":let t=Z.sqrt(2).mul(this.style.markerSymbolSize).toNumber()/2;return new O.Line({points:this.style.periodMarkerHandleType==="start"?[-t,0,0,0,0,t]:[0,0,t,0,0,t],fill:this.style.color,closed:!0,offsetY:t/2});case"circle":return new O.Arc({fill:this.style.color,innerRadius:0,outerRadius:this.style.markerSymbolSize/2,angle:180,rotation:this.style.periodMarkerHandleType==="start"?90:-90});case"square":return new O.Line({points:[0,0,this.style.markerSymbolSize,0,this.style.markerSymbolSize,this.style.markerSymbolSize],fill:this.style.color,closed:!0,rotation:this.style.periodMarkerHandleType==="start"?225:45,offsetX:this.style.markerSymbolSize/2,offsetY:this.style.markerSymbolSize/2});default:throw Error("Unknown type")}}}const oa={editable:!0,style:{...Uo,selectedAreaOpacity:.2,markerHandleAreaOpacity:.7}};class al extends Zo{constructor(e){super({...oa,...e,style:{...oa.style,...e.style}}),this.observation.start=_e.coerce.number().min(0).optional().nullable().parse(this.observation.start),this.observation.end=_e.coerce.number().min(0).optional().nullable().parse(this.observation.end),this.observation.end!=null&&this.observation.start!=null&&(this.observation.start=_e.coerce.number().lte(this.observation.end).parse(this.observation.start))}createCanvasNode(){return super.createCanvasNode(),this.initStartMarkerHandle(),this.initEndMarkerHandle(),this.initSelectedAreaRect(),this.group}onChange(){this.settlePosition();let e={timeObservation:this.observation};this.onChange$.next(e)}onMeasurementsChange(){super.onMeasurementsChange();let e=this.startMarkerHandle.getVerticalMeasurement();this.selectedAreaRect&&this.selectedAreaRect.setAttrs({y:e.y,height:e.height});let t={y:this.startMarkerHandle.getHandleGroup().y(),height:this.startMarkerHandle.getHandleGroup().getClientRect().height};this.markerHandleRect.setAttrs({y:e.y+t.y-t.height/2,height:t.height}),this.settlePosition()}initSelectedAreaRect(){if(this.selectedAreaRect&&this.selectedAreaRect.destroy(),this.markerHandleRect&&this.markerHandleRect.destroy(),!this.hasStart()||!this.hasEnd())return;let e=this.startMarkerHandle.getVerticalMeasurement(),t=this.timeline.timeToTimelinePosition(this.observation.start),i=this.timeline.timeToTimelinePosition(this.observation.end);this.selectedAreaRect=new O.Rect({x:t,y:e.y,width:i-t,height:e.height,listening:!1,fill:this.style.color,opacity:this.style.selectedAreaOpacity});let s={y:this.startMarkerHandle.getHandleGroup().y(),height:this.startMarkerHandle.getHandleGroup().getClientRect().height};this.markerHandleRect=new O.Rect({x:t,y:e.y+s.y-s.height/2,width:i-t,height:s.height,listening:!1,fill:this.style.color,opacity:this.style.markerHandleAreaOpacity}),this.group.add(this.selectedAreaRect),this.group.add(this.markerHandleRect)}initStartMarkerHandle(){if(this.startMarkerHandle&&(this.startMarkerHandle.destroy(),this.startMarkerHandle=void 0),!this.hasStart())return;let e=this.timeline.timeToTimelinePosition(this.observation.start);this.startMarkerHandle=new aa({x:e,editable:this.editable,style:{color:this.style.color,markerRenderType:this.style.renderType,markerSymbolType:this.style.symbolType,periodMarkerHandleType:"start"}},this.markerLane,this.timeline),this.startMarkerHandle.onDrag=t=>{this.editable&&(this.hasEnd()&&t.x()>this.endMarkerHandle.getPosition().x&&t.x(this.endMarkerHandle.getPosition().x),this.settleMeasurements(),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(1))},this.startMarkerHandle.onDragEnd=t=>{if(this.editable){let i=this.timeline.timelinePositionToTime(t.x());this.setTimeObservation({...this.observation,start:i}),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(this.style.markerHandleAreaOpacity)}},this.group.add(this.startMarkerHandle.initCanvasNode())}initEndMarkerHandle(){if(this.endMarkerHandle&&(this.endMarkerHandle.destroy(),this.endMarkerHandle=void 0),!this.hasEnd())return;let e=this.hasEnd()?this.timeline.timeToTimelinePosition(this.observation.end):void 0;this.endMarkerHandle=new aa({x:e,editable:this.editable,style:{periodMarkerHandleType:"end",color:this.style.color,markerRenderType:this.style.renderType,markerSymbolType:this.style.symbolType}},this.markerLane,this.timeline),this.endMarkerHandle.onDrag=t=>{this.editable&&(this.hasStart()&&t.x()<this.startMarkerHandle.getPosition().x&&t.x(this.startMarkerHandle.getPosition().x),this.settleMeasurements(),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(1))},this.endMarkerHandle.onDragEnd=t=>{if(this.editable){let i=this.timeline.timelinePositionToTime(t.x());this.setTimeObservation({...this.observation,end:i}),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(this.style.markerHandleAreaOpacity)}},this.group.add(this.endMarkerHandle.initCanvasNode())}settlePosition(){this.hasStart()&&this.startMarkerHandle.setPosition({...this.startMarkerHandle.getPosition(),x:this.timeline.timeToTimelinePosition(this.observation.start)}),this.hasEnd()&&this.endMarkerHandle.setPosition({...this.endMarkerHandle.getPosition(),x:this.timeline.timeToTimelinePosition(this.observation.end)}),this.settleMeasurements()}settleMeasurements(){this.hasStart()&&this.hasEnd()&&(this.selectedAreaRect.setAttrs({x:this.startMarkerHandle.getPosition().x,width:this.endMarkerHandle.getPosition().x-this.startMarkerHandle.getPosition().x}),this.markerHandleRect.setAttrs({x:this.startMarkerHandle.getPosition().x,width:this.endMarkerHandle.getPosition().x-this.startMarkerHandle.getPosition().x}))}setTimeObservation(e){this.editable&&(this.observation=e,this.initStartMarkerHandle(),this.initEndMarkerHandle(),this.initSelectedAreaRect(),this.onChange())}setEditable(e){super.setEditable(e)}afterCanvasNodeInit(){super.afterCanvasNodeInit(),this.styleAdapter.onChange$.pipe(k(this.onDestroy$)).subscribe(e=>{this.hasStart()&&this.initStartMarkerHandle(),this.hasEnd()&&this.initEndMarkerHandle(),this.hasStart()&&this.hasEnd()&&this.initSelectedAreaRect()})}hasStart(){return this.observation&&this.observation.start!==null&&this.observation.start!==void 0}hasEnd(){return this.observation&&this.observation.end!==null&&this.observation.end!==void 0}}const la={editable:!0,style:{...jo,markerSymbolSize:20}};class Ff extends Xo{constructor(e,t,i){super({...la,...e,style:{...la.style,...e.style}},t,i)}createSymbol(){switch(this.style.markerSymbolType){case"triangle":let t=Z.sqrt(2).mul(this.style.markerSymbolSize).toNumber()/2;return new O.Line({points:[-t,0,t,0,0,t],fill:this.style.color,closed:!0,offsetY:t/2});case"circle":return new O.Circle({fill:this.style.color,radius:this.style.markerSymbolSize/2});case"square":return new O.Rect({fill:this.style.color,width:this.style.markerSymbolSize,height:this.style.markerSymbolSize,rotation:45,offsetX:this.style.markerSymbolSize/2,offsetY:this.style.markerSymbolSize/2});default:throw Error("Unknown type")}}}const ha={description:"",editable:!0,style:{...Uo}};class ol extends Zo{constructor(e){super({...ha,...e,style:{...ha.style,...e.style}}),this.observation.time=_e.coerce.number().min(0).parse(this.observation.time)}createCanvasNode(){return super.createCanvasNode(),this.initMarkerHandle(),this.group}afterCanvasNodeInit(){super.afterCanvasNodeInit(),this.styleAdapter.onChange$.subscribe(e=>{this.initMarkerHandle()})}initMarkerHandle(){this.markerHandle&&(this.markerHandle.destroy(),this.markerHandle=void 0);let e=this.timeline.timeToTimelinePosition(this.observation.time);this.markerHandle=new Ff({x:e,editable:this.editable,style:{color:this.style.color,markerRenderType:this.style.renderType,markerSymbolType:this.style.symbolType}},this.markerLane,this.timeline),this.markerHandle.onDragEnd=t=>{if(this.editable){let i=this.timeline.timelinePositionToTime(t.x());this.setTimeObservation({...this.observation,time:i})}},this.group.add(this.markerHandle.initCanvasNode())}onChange(){this.settlePosition();let e={timeObservation:this.observation};this.onChange$.next(e)}onMeasurementsChange(){super.onMeasurementsChange(),this.markerHandle.onMeasurementsChange(),this.settlePosition()}settlePosition(){this.markerHandle.setPosition({...this.markerHandle.getPosition(),x:this.timeline.timeToTimelinePosition(this.observation.time)})}setEditable(e){super.setEditable(e)}}const Hf={...Qi};class Bs extends er{constructor(e){super({...e,style:{...Hf,...e.style}}),this.onMarkerFocus$=new V,this.markers=[],this.markersMap=new Map}createCanvasNode(){return super.createCanvasNode(),this.markersGroup=new O.Group({...F.POSITION_TOP_LEFT,...this.timeline.getTimecodedGroupDimension()}),this.timeline.addToTimecodedMarkersGroup(this.markersGroup),this.bodyGroup}settleLayout(){super.settleLayout();let e=this.timeline.getTimecodedGroupHorizontalMeasurement();[this.markersGroup].forEach(t=>{t.width(e.width)}),this.markers&&this.markers.forEach(t=>{t.onMeasurementsChange()})}destroy(){super.destroy(),this.markersGroup.destroy()}clearContent(){this.removeAllMarkers(),this.markers=[],this.markersMap=new Map,this.markersGroup.destroyChildren()}createMomentMarker(e){return this.addMarker(new ol(e))}createPeriodMarker(e){return this.addMarker(new al(e))}addMarker(e){if(!this.isInitialized())throw new Error("MarkerLane not initalized. Maybe you forgot to add MarkerLane to Timeline?");if(this.markersMap.has(e.getId()))throw new Error(`Marker with id=${e.getId()} already exists`);return e.setMarkerLane(this),e.setTimeline(this.timeline),e.onClick$.pipe(k(this.onDestroy$)).subscribe(t=>{this.focusMarker(e.getId())}),e.onMouseEnter$.pipe(k(this.onDestroy$)).subscribe(t=>{this.focusMarker(e.getId())}),this.markers.push(e),this.markersMap.set(e.getId(),e),this.markersGroup.add(e.initCanvasNode()),e}removeAllMarkers(){this.markers&&this.markers.forEach(e=>{this.removeMarker(e.getId())})}removeMarker(e){let t=this.getMarker(e);t&&(this.markers.splice(this.markers.findIndex(i=>i.getId()===t.getId()),1),this.markersMap.delete(t.getId()),t.destroy())}getMarker(e){return this.markersMap.get(e)}getMarkers(){return this.markers}focusMarker(e){let t=this.getMarker(e);t&&(this.moveToTop(t),this.markerInFocus=t,this.onMarkerFocus$.next({marker:t}))}getMarkerInFocus(){return this.markerInFocus}moveToTop(e){e&&(this.markersGroup.moveToTop(),e.getCanvasNode().moveToTop())}}class Bf{static randomHexColor(){return`#${Math.floor(Math.random()*16777215).toString(16)}`}}class yi{static createGoldenRatioWedge(e){let t=new Z(e.height).div(F.GOLDEN_RATIO+1).toDecimalPlaces(2).toNumber(),i=e.height-t,s=i/2;return new O.Line({points:[e.x-s,e.y,e.x+s,e.y,e.x+s,e.y+i,e.x,e.y+i+t,e.x-s,e.y+i],fill:e.color,stroke:e.color,closed:!0,listening:!1})}static createTriangle(e){let t=e.height/2;return new O.Line({points:[e.x-t,e.y,e.x+t,e.y,e.x,e.y+e.height],fill:e.color,closed:!0,listening:!1})}static createEventCatcher(e={}){return new O.Rect({...F.POSITION_TOP_LEFT,opacity:0,listening:!0,...e})}static createDebugRect(){return new O.Rect({...F.POSITION_TOP_LEFT,width:100,height:100,fill:Bf.randomHexColor(),opacity:1})}}function ll(r,e){return function(){return r.apply(e,arguments)}}const{toString:hl}=Object.prototype,{getPrototypeOf:un}=Object,cn=(r=>e=>{const t=hl.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),wt=r=>(r=r.toLowerCase(),e=>cn(e)===r),es=r=>e=>typeof e===r,{isArray:bi}=Array,ji=es("undefined");function $f(r){return r!==null&&!ji(r)&&r.constructor!==null&&!ji(r.constructor)&&Rt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const dl=wt("ArrayBuffer");function Vf(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&dl(r.buffer),e}const zf=es("string"),Rt=es("function"),ul=es("number"),fn=r=>r!==null&&typeof r=="object",Wf=r=>r===!0||r===!1,Tr=r=>{if(cn(r)!=="object")return!1;const e=un(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Uf=wt("Date"),Zf=wt("File"),jf=wt("Blob"),Xf=wt("FileList"),qf=r=>fn(r)&&Rt(r.pipe),Yf=r=>{const e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||hl.call(r)===e||Rt(r.toString)&&r.toString()===e)},Kf=wt("URLSearchParams"),Jf=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tr(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let i,s;if(typeof r!="object"&&(r=[r]),bi(r))for(i=0,s=r.length;i<s;i++)e.call(null,r[i],i,r);else{const n=t?Object.getOwnPropertyNames(r):Object.keys(r),a=n.length;let o;for(i=0;i<a;i++)o=n[i],e.call(null,r[o],o,r)}}function cl(r,e){e=e.toLowerCase();const t=Object.keys(r);let i=t.length,s;for(;i-- >0;)if(s=t[i],e===s.toLowerCase())return s;return null}const fl=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),pl=r=>!ji(r)&&r!==fl;function $s(){const{caseless:r}=pl(this)&&this||{},e={},t=(i,s)=>{const n=r&&cl(e,s)||s;Tr(e[n])&&Tr(i)?e[n]=$s(e[n],i):Tr(i)?e[n]=$s({},i):bi(i)?e[n]=i.slice():e[n]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&tr(arguments[i],t);return e}const Qf=(r,e,t,{allOwnKeys:i}={})=>(tr(e,(s,n)=>{t&&Rt(s)?r[n]=ll(s,t):r[n]=s},{allOwnKeys:i}),r),ep=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),tp=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},ip=(r,e,t,i)=>{let s,n,a;const o={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),n=s.length;n-- >0;)a=s[n],(!i||i(a,r,e))&&!o[a]&&(e[a]=r[a],o[a]=!0);r=t!==!1&&un(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},rp=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const i=r.indexOf(e,t);return i!==-1&&i===t},sp=r=>{if(!r)return null;if(bi(r))return r;let e=r.length;if(!ul(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},np=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&un(Uint8Array)),ap=(r,e)=>{const i=(r&&r[Symbol.iterator]).call(r);let s;for(;(s=i.next())&&!s.done;){const n=s.value;e.call(r,n[0],n[1])}},op=(r,e)=>{let t;const i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},lp=wt("HTMLFormElement"),hp=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,s){return i.toUpperCase()+s}),da=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),dp=wt("RegExp"),ml=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),i={};tr(t,(s,n)=>{e(s,n,r)!==!1&&(i[n]=s)}),Object.defineProperties(r,i)},up=r=>{ml(r,(e,t)=>{if(Rt(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=r[t];if(Rt(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},cp=(r,e)=>{const t={},i=s=>{s.forEach(n=>{t[n]=!0})};return bi(r)?i(r):i(String(r).split(e)),t},fp=()=>{},pp=(r,e)=>(r=+r,Number.isFinite(r)?r:e),gs="abcdefghijklmnopqrstuvwxyz",ua="0123456789",gl={DIGIT:ua,ALPHA:gs,ALPHA_DIGIT:gs+gs.toUpperCase()+ua},mp=(r=16,e=gl.ALPHA_DIGIT)=>{let t="";const{length:i}=e;for(;r--;)t+=e[Math.random()*i|0];return t};function gp(r){return!!(r&&Rt(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const vp=r=>{const e=new Array(10),t=(i,s)=>{if(fn(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[s]=i;const n=bi(i)?[]:{};return tr(i,(a,o)=>{const h=t(a,s+1);!ji(h)&&(n[o]=h)}),e[s]=void 0,n}}return i};return t(r,0)},S={isArray:bi,isArrayBuffer:dl,isBuffer:$f,isFormData:Yf,isArrayBufferView:Vf,isString:zf,isNumber:ul,isBoolean:Wf,isObject:fn,isPlainObject:Tr,isUndefined:ji,isDate:Uf,isFile:Zf,isBlob:jf,isRegExp:dp,isFunction:Rt,isStream:qf,isURLSearchParams:Kf,isTypedArray:np,isFileList:Xf,forEach:tr,merge:$s,extend:Qf,trim:Jf,stripBOM:ep,inherits:tp,toFlatObject:ip,kindOf:cn,kindOfTest:wt,endsWith:rp,toArray:sp,forEachEntry:ap,matchAll:op,isHTMLForm:lp,hasOwnProperty:da,hasOwnProp:da,reduceDescriptors:ml,freezeMethods:up,toObjectSet:cp,toCamelCase:hp,noop:fp,toFiniteNumber:pp,findKey:cl,global:fl,isContextDefined:pl,ALPHABET:gl,generateString:mp,isSpecCompliantForm:gp,toJSONObject:vp};function ie(r,e,t,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),s&&(this.response=s)}S.inherits(ie,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:S.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const vl=ie.prototype,yl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{yl[r]={value:r}});Object.defineProperties(ie,yl);Object.defineProperty(vl,"isAxiosError",{value:!0});ie.from=(r,e,t,i,s,n)=>{const a=Object.create(vl);return S.toFlatObject(r,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),ie.call(a,r.message,e,t,i,s),a.cause=r,a.name=r.name,n&&Object.assign(a,n),a};const yp=null;function Vs(r){return S.isPlainObject(r)||S.isArray(r)}function bl(r){return S.endsWith(r,"[]")?r.slice(0,-2):r}function ca(r,e,t){return r?r.concat(e).map(function(s,n){return s=bl(s),!t&&n?"["+s+"]":s}).join(t?".":""):e}function bp(r){return S.isArray(r)&&!r.some(Vs)}const _p=S.toFlatObject(S,{},null,function(e){return/^is[A-Z]/.test(e)});function ts(r,e,t){if(!S.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=S.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!S.isUndefined(v[m])});const i=t.metaTokens,s=t.visitor||d,n=t.dots,a=t.indexes,h=(t.Blob||typeof Blob<"u"&&Blob)&&S.isSpecCompliantForm(e);if(!S.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(S.isDate(f))return f.toISOString();if(!h&&S.isBlob(f))throw new ie("Blob is not supported. Use a Buffer instead.");return S.isArrayBuffer(f)||S.isTypedArray(f)?h&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function d(f,m,v){let _=f;if(f&&!v&&typeof f=="object"){if(S.endsWith(m,"{}"))m=i?m:m.slice(0,-2),f=JSON.stringify(f);else if(S.isArray(f)&&bp(f)||(S.isFileList(f)||S.endsWith(m,"[]"))&&(_=S.toArray(f)))return m=bl(m),_.forEach(function(b,T){!(S.isUndefined(b)||b===null)&&e.append(a===!0?ca([m],T,n):a===null?m:m+"[]",l(b))}),!1}return Vs(f)?!0:(e.append(ca(v,m,n),l(f)),!1)}const u=[],c=Object.assign(_p,{defaultVisitor:d,convertValue:l,isVisitable:Vs});function p(f,m){if(!S.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(f),S.forEach(f,function(_,w){(!(S.isUndefined(_)||_===null)&&s.call(e,_,S.isString(w)?w.trim():w,m,c))===!0&&p(_,m?m.concat(w):[w])}),u.pop()}}if(!S.isObject(r))throw new TypeError("data must be an object");return p(r),e}function fa(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function pn(r,e){this._pairs=[],r&&ts(r,this,e)}const _l=pn.prototype;_l.append=function(e,t){this._pairs.push([e,t])};_l.toString=function(e){const t=e?function(i){return e.call(this,i,fa)}:fa;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function wp(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wl(r,e,t){if(!e)return r;const i=t&&t.encode||wp,s=t&&t.serialize;let n;if(s?n=s(e,t):n=S.isURLSearchParams(e)?e.toString():new pn(e,t).toString(i),n){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+n}return r}class Sp{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){S.forEach(this.handlers,function(i){i!==null&&e(i)})}}const pa=Sp,Sl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tp=typeof URLSearchParams<"u"?URLSearchParams:pn,Cp=typeof FormData<"u"?FormData:null,Ep=(()=>{let r;return typeof navigator<"u"&&((r=navigator.product)==="ReactNative"||r==="NativeScript"||r==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),kp=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),tt={isBrowser:!0,classes:{URLSearchParams:Tp,FormData:Cp,Blob},isStandardBrowserEnv:Ep,isStandardBrowserWebWorkerEnv:kp,protocols:["http","https","file","blob","url","data"]};function xp(r,e){return ts(r,new tt.classes.URLSearchParams,Object.assign({visitor:function(t,i,s,n){return tt.isNode&&S.isBuffer(t)?(this.append(i,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}function Pp(r){return S.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ap(r){const e={},t=Object.keys(r);let i;const s=t.length;let n;for(i=0;i<s;i++)n=t[i],e[n]=r[n];return e}function Tl(r){function e(t,i,s,n){let a=t[n++];const o=Number.isFinite(+a),h=n>=t.length;return a=!a&&S.isArray(s)?s.length:a,h?(S.hasOwnProp(s,a)?s[a]=[s[a],i]:s[a]=i,!o):((!s[a]||!S.isObject(s[a]))&&(s[a]=[]),e(t,i,s[a],n)&&S.isArray(s[a])&&(s[a]=Ap(s[a])),!o)}if(S.isFormData(r)&&S.isFunction(r.entries)){const t={};return S.forEachEntry(r,(i,s)=>{e(Pp(i),s,t,0)}),t}return null}const Op={"Content-Type":void 0};function Mp(r,e,t){if(S.isString(r))try{return(e||JSON.parse)(r),S.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}const is={transitional:Sl,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",s=i.indexOf("application/json")>-1,n=S.isObject(e);if(n&&S.isHTMLForm(e)&&(e=new FormData(e)),S.isFormData(e))return s&&s?JSON.stringify(Tl(e)):e;if(S.isArrayBuffer(e)||S.isBuffer(e)||S.isStream(e)||S.isFile(e)||S.isBlob(e))return e;if(S.isArrayBufferView(e))return e.buffer;if(S.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return xp(e,this.formSerializer).toString();if((o=S.isFileList(e))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ts(o?{"files[]":e}:e,h&&new h,this.formSerializer)}}return n||s?(t.setContentType("application/json",!1),Mp(e)):e}],transformResponse:[function(e){const t=this.transitional||is.transitional,i=t&&t.forcedJSONParsing,s=this.responseType==="json";if(e&&S.isString(e)&&(i&&!this.responseType||s)){const a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?ie.from(o,ie.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};S.forEach(["delete","get","head"],function(e){is.headers[e]={}});S.forEach(["post","put","patch"],function(e){is.headers[e]=S.merge(Op)});const mn=is,Lp=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rp=r=>{const e={};let t,i,s;return r&&r.split(`
|
|
10
|
+
*/var ei=9e15,Dt=1e9,Ns="0123456789abcdef",$r="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Vr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gs={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ei,maxE:ei,crypto:!1},qo,ht,q=!0,Kr="[DecimalError] ",Lt=Kr+"Invalid argument: ",Yo=Kr+"Precision limit exceeded",Ko=Kr+"crypto unavailable",Jo="[object Decimal]",Me=Math.floor,Se=Math.pow,Wc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Uc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Zc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Qo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,je=1e7,j=7,jc=9007199254740991,Xc=$r.length-1,Ds=Vr.length-1,C={toStringTag:Jo};C.absoluteValue=C.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),z(r)};C.ceil=function(){return z(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(r,e){var t,i=this,s=i.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(Lt+e);return t=i.cmp(r),t<0?r:i.cmp(e)>0?e:new s(i)};C.comparedTo=C.cmp=function(r){var e,t,i,s,n=this,a=n.d,o=(r=new n.constructor(r)).d,h=n.s,l=r.s;if(!a||!o)return!h||!l?NaN:h!==l?h:a===o?0:!a^h<0?1:-1;if(!a[0]||!o[0])return a[0]?h:o[0]?-l:0;if(h!==l)return h;if(n.e!==r.e)return n.e>r.e^h<0?1:-1;for(i=a.length,s=o.length,e=0,t=i<s?i:s;e<t;++e)if(a[e]!==o[e])return a[e]>o[e]^h<0?1:-1;return i===s?0:i>s^h<0?1:-1};C.cosine=C.cos=function(){var r,e,t=this,i=t.constructor;return t.d?t.d[0]?(r=i.precision,e=i.rounding,i.precision=r+Math.max(t.e,t.sd())+j,i.rounding=1,t=qc(i,sl(i,t)),i.precision=r,i.rounding=e,z(ht==2||ht==3?t.neg():t,r,e,!0)):new i(1):new i(NaN)};C.cubeRoot=C.cbrt=function(){var r,e,t,i,s,n,a,o,h,l,d=this,u=d.constructor;if(!d.isFinite()||d.isZero())return new u(d);for(q=!1,n=d.s*Se(d.s*d,1/3),!n||Math.abs(n)==1/0?(t=xe(d.d),r=d.e,(n=(r-t.length+1)%3)&&(t+=n==1||n==-2?"0":"00"),n=Se(t,1/3),r=Me((r+1)/3)-(r%3==(r<0?-1:2)),n==1/0?t="5e"+r:(t=n.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),i=new u(t),i.s=d.s):i=new u(n.toString()),a=(r=u.precision)+3;;)if(o=i,h=o.times(o).times(o),l=h.plus(d),i=ue(l.plus(d).times(o),l.plus(h),a+2,1),xe(o.d).slice(0,a)===(t=xe(i.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(z(o,r+1,0),o.times(o).times(o).eq(d))){i=o;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(z(i,r+1,1),e=!i.times(i).times(i).eq(d));break}return q=!0,z(i,r,u.rounding,e)};C.decimalPlaces=C.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-Me(this.e/j))*j,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};C.dividedBy=C.div=function(r){return ue(this,new this.constructor(r))};C.dividedToIntegerBy=C.divToInt=function(r){var e=this,t=e.constructor;return z(ue(e,new t(r),0,1,1),t.precision,t.rounding)};C.equals=C.eq=function(r){return this.cmp(r)===0};C.floor=function(){return z(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(r){return this.cmp(r)>0};C.greaterThanOrEqualTo=C.gte=function(r){var e=this.cmp(r);return e==1||e===0};C.hyperbolicCosine=C.cosh=function(){var r,e,t,i,s,n=this,a=n.constructor,o=new a(1);if(!n.isFinite())return new a(n.s?1/0:NaN);if(n.isZero())return o;t=a.precision,i=a.rounding,a.precision=t+Math.max(n.e,n.sd())+4,a.rounding=1,s=n.d.length,s<32?(r=Math.ceil(s/3),e=(1/Qr(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),n=ci(a,1,n.times(e),new a(1),!0);for(var h,l=r,d=new a(8);l--;)h=n.times(n),n=o.minus(h.times(d.minus(h.times(d))));return z(n,a.precision=t,a.rounding=i,!0)};C.hyperbolicSine=C.sinh=function(){var r,e,t,i,s=this,n=s.constructor;if(!s.isFinite()||s.isZero())return new n(s);if(e=n.precision,t=n.rounding,n.precision=e+Math.max(s.e,s.sd())+4,n.rounding=1,i=s.d.length,i<3)s=ci(n,2,s,s,!0);else{r=1.4*Math.sqrt(i),r=r>16?16:r|0,s=s.times(1/Qr(5,r)),s=ci(n,2,s,s,!0);for(var a,o=new n(5),h=new n(16),l=new n(20);r--;)a=s.times(s),s=s.times(o.plus(a.times(h.times(a).plus(l))))}return n.precision=e,n.rounding=t,z(s,e,t,!0)};C.hyperbolicTangent=C.tanh=function(){var r,e,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+7,i.rounding=1,ue(t.sinh(),t.cosh(),i.precision=r,i.rounding=e)):new i(t.s)};C.inverseCosine=C.acos=function(){var r,e=this,t=e.constructor,i=e.abs().cmp(1),s=t.precision,n=t.rounding;return i!==-1?i===0?e.isNeg()?Ue(t,s,n):new t(0):new t(NaN):e.isZero()?Ue(t,s+4,n).times(.5):(t.precision=s+6,t.rounding=1,e=e.asin(),r=Ue(t,s+4,n).times(.5),t.precision=s,t.rounding=n,r.minus(e))};C.inverseHyperbolicCosine=C.acosh=function(){var r,e,t=this,i=t.constructor;return t.lte(1)?new i(t.eq(1)?0:NaN):t.isFinite()?(r=i.precision,e=i.rounding,i.precision=r+Math.max(Math.abs(t.e),t.sd())+4,i.rounding=1,q=!1,t=t.times(t).minus(1).sqrt().plus(t),q=!0,i.precision=r,i.rounding=e,t.ln()):new i(t)};C.inverseHyperbolicSine=C.asinh=function(){var r,e,t=this,i=t.constructor;return!t.isFinite()||t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,i.rounding=1,q=!1,t=t.times(t).plus(1).sqrt().plus(t),q=!0,i.precision=r,i.rounding=e,t.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var r,e,t,i,s=this,n=s.constructor;return s.isFinite()?s.e>=0?new n(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=n.precision,e=n.rounding,i=s.sd(),Math.max(i,r)<2*-s.e-1?z(new n(s),r,e,!0):(n.precision=t=i-s.e,s=ue(s.plus(1),new n(1).minus(s),t+r,1),n.precision=r+4,n.rounding=1,s=s.ln(),n.precision=r,n.rounding=e,s.times(.5))):new n(NaN)};C.inverseSine=C.asin=function(){var r,e,t,i,s=this,n=s.constructor;return s.isZero()?new n(s):(e=s.abs().cmp(1),t=n.precision,i=n.rounding,e!==-1?e===0?(r=Ue(n,t+4,i).times(.5),r.s=s.s,r):new n(NaN):(n.precision=t+6,n.rounding=1,s=s.div(new n(1).minus(s.times(s)).sqrt().plus(1)).atan(),n.precision=t,n.rounding=i,s.times(2)))};C.inverseTangent=C.atan=function(){var r,e,t,i,s,n,a,o,h,l=this,d=l.constructor,u=d.precision,c=d.rounding;if(l.isFinite()){if(l.isZero())return new d(l);if(l.abs().eq(1)&&u+4<=Ds)return a=Ue(d,u+4,c).times(.25),a.s=l.s,a}else{if(!l.s)return new d(NaN);if(u+4<=Ds)return a=Ue(d,u+4,c).times(.5),a.s=l.s,a}for(d.precision=o=u+10,d.rounding=1,t=Math.min(28,o/j+2|0),r=t;r;--r)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(q=!1,e=Math.ceil(o/j),i=1,h=l.times(l),a=new d(l),s=l;r!==-1;)if(s=s.times(h),n=a.minus(s.div(i+=2)),s=s.times(h),a=n.plus(s.div(i+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===n.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),q=!0,z(a,d.precision=u,d.rounding=c,!0)};C.isFinite=function(){return!!this.d};C.isInteger=C.isInt=function(){return!!this.d&&Me(this.e/j)>this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(r){return this.cmp(r)<0};C.lessThanOrEqualTo=C.lte=function(r){return this.cmp(r)<1};C.logarithm=C.log=function(r){var e,t,i,s,n,a,o,h,l=this,d=l.constructor,u=d.precision,c=d.rounding,p=5;if(r==null)r=new d(10),e=!0;else{if(r=new d(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new d(NaN);e=r.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new d(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)n=!0;else{for(s=t[0];s%10===0;)s/=10;n=s!==1}if(q=!1,o=u+p,a=Pt(l,o),i=e?zr(d,o+10):Pt(r,o),h=ue(a,i,o,1),Zi(h.d,s=u,c))do if(o+=10,a=Pt(l,o),i=e?zr(d,o+10):Pt(r,o),h=ue(a,i,o,1),!n){+xe(h.d).slice(s+1,s+15)+1==1e14&&(h=z(h,u+1,0));break}while(Zi(h.d,s+=10,c));return q=!0,z(h,u,c)};C.minus=C.sub=function(r){var e,t,i,s,n,a,o,h,l,d,u,c,p=this,f=p.constructor;if(r=new f(r),!p.d||!r.d)return!p.s||!r.s?r=new f(NaN):p.d?r.s=-r.s:r=new f(r.d||p.s!==r.s?p:NaN),r;if(p.s!=r.s)return r.s=-r.s,p.plus(r);if(l=p.d,c=r.d,o=f.precision,h=f.rounding,!l[0]||!c[0]){if(c[0])r.s=-r.s;else if(l[0])r=new f(p);else return new f(h===3?-0:0);return q?z(r,o,h):r}if(t=Me(r.e/j),d=Me(p.e/j),l=l.slice(),n=d-t,n){for(u=n<0,u?(e=l,n=-n,a=c.length):(e=c,t=d,a=l.length),i=Math.max(Math.ceil(o/j),a)+2,n>i&&(n=i,e.length=1),e.reverse(),i=n;i--;)e.push(0);e.reverse()}else{for(i=l.length,a=c.length,u=i<a,u&&(a=i),i=0;i<a;i++)if(l[i]!=c[i]){u=l[i]<c[i];break}n=0}for(u&&(e=l,l=c,c=e,r.s=-r.s),a=l.length,i=c.length-a;i>0;--i)l[a++]=0;for(i=c.length;i>n;){if(l[--i]<c[i]){for(s=i;s&&l[--s]===0;)l[s]=je-1;--l[s],l[i]+=je}l[i]-=c[i]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(r.d=l,r.e=Jr(l,t),q?z(r,o,h):r):new f(h===3?-0:0)};C.modulo=C.mod=function(r){var e,t=this,i=t.constructor;return r=new i(r),!t.d||!r.s||r.d&&!r.d[0]?new i(NaN):!r.d||t.d&&!t.d[0]?z(new i(t),i.precision,i.rounding):(q=!1,i.modulo==9?(e=ue(t,r.abs(),0,3,1),e.s*=r.s):e=ue(t,r,0,i.modulo,1),e=e.times(r),q=!0,t.minus(e))};C.naturalExponential=C.exp=function(){return Fs(this)};C.naturalLogarithm=C.ln=function(){return Pt(this)};C.negated=C.neg=function(){var r=new this.constructor(this);return r.s=-r.s,z(r)};C.plus=C.add=function(r){var e,t,i,s,n,a,o,h,l,d,u=this,c=u.constructor;if(r=new c(r),!u.d||!r.d)return!u.s||!r.s?r=new c(NaN):u.d||(r=new c(r.d||u.s===r.s?u:NaN)),r;if(u.s!=r.s)return r.s=-r.s,u.minus(r);if(l=u.d,d=r.d,o=c.precision,h=c.rounding,!l[0]||!d[0])return d[0]||(r=new c(u)),q?z(r,o,h):r;if(n=Me(u.e/j),i=Me(r.e/j),l=l.slice(),s=n-i,s){for(s<0?(t=l,s=-s,a=d.length):(t=d,i=n,a=l.length),n=Math.ceil(o/j),a=n>a?n+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=l.length,s=d.length,a-s<0&&(s=a,t=d,d=l,l=t),e=0;s;)e=(l[--s]=l[s]+d[s]+e)/je|0,l[s]%=je;for(e&&(l.unshift(e),++i),a=l.length;l[--a]==0;)l.pop();return r.d=l,r.e=Jr(l,i),q?z(r,o,h):r};C.precision=C.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(Lt+r);return t.d?(e=el(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};C.round=function(){var r=this,e=r.constructor;return z(new e(r),r.e+1,e.rounding)};C.sine=C.sin=function(){var r,e,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+Math.max(t.e,t.sd())+j,i.rounding=1,t=Kc(i,sl(i,t)),i.precision=r,i.rounding=e,z(ht>2?t.neg():t,r,e,!0)):new i(NaN)};C.squareRoot=C.sqrt=function(){var r,e,t,i,s,n,a=this,o=a.d,h=a.e,l=a.s,d=a.constructor;if(l!==1||!o||!o[0])return new d(!l||l<0&&(!o||o[0])?NaN:o?a:1/0);for(q=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=xe(o),(e.length+h)%2==0&&(e+="0"),l=Math.sqrt(e),h=Me((h+1)/2)-(h<0||h%2),l==1/0?e="5e"+h:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+h),i=new d(e)):i=new d(l.toString()),t=(h=d.precision)+3;;)if(n=i,i=n.plus(ue(a,n,t+2,1)).times(.5),xe(n.d).slice(0,t)===(e=xe(i.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(z(n,h+1,0),n.times(n).eq(a))){i=n;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(z(i,h+1,1),r=!i.times(i).eq(a));break}return q=!0,z(i,h,d.rounding,r)};C.tangent=C.tan=function(){var r,e,t=this,i=t.constructor;return t.isFinite()?t.isZero()?new i(t):(r=i.precision,e=i.rounding,i.precision=r+10,i.rounding=1,t=t.sin(),t.s=1,t=ue(t,new i(1).minus(t.times(t)).sqrt(),r+10,0),i.precision=r,i.rounding=e,z(ht==2||ht==4?t.neg():t,r,e,!0)):new i(NaN)};C.times=C.mul=function(r){var e,t,i,s,n,a,o,h,l,d=this,u=d.constructor,c=d.d,p=(r=new u(r)).d;if(r.s*=d.s,!c||!c[0]||!p||!p[0])return new u(!r.s||c&&!c[0]&&!p||p&&!p[0]&&!c?NaN:!c||!p?r.s/0:r.s*0);for(t=Me(d.e/j)+Me(r.e/j),h=c.length,l=p.length,h<l&&(n=c,c=p,p=n,a=h,h=l,l=a),n=[],a=h+l,i=a;i--;)n.push(0);for(i=l;--i>=0;){for(e=0,s=h+i;s>i;)o=n[s]+p[i]*c[s-i-1]+e,n[s--]=o%je|0,e=o/je|0;n[s]=(n[s]+e)%je|0}for(;!n[--a];)n.pop();return e?++t:n.shift(),r.d=n,r.e=Jr(n,t),q?z(r,u.precision,u.rounding):r};C.toBinary=function(r,e){return dn(this,2,r,e)};C.toDecimalPlaces=C.toDP=function(r,e){var t=this,i=t.constructor;return t=new i(t),r===void 0?t:(Ne(r,0,Dt),e===void 0?e=i.rounding:Ne(e,0,8),z(t,r+t.e+1,e))};C.toExponential=function(r,e){var t,i=this,s=i.constructor;return r===void 0?t=nt(i,!0):(Ne(r,0,Dt),e===void 0?e=s.rounding:Ne(e,0,8),i=z(new s(i),r+1,e),t=nt(i,!0,r+1)),i.isNeg()&&!i.isZero()?"-"+t:t};C.toFixed=function(r,e){var t,i,s=this,n=s.constructor;return r===void 0?t=nt(s):(Ne(r,0,Dt),e===void 0?e=n.rounding:Ne(e,0,8),i=z(new n(s),r+s.e+1,e),t=nt(i,!1,r+i.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};C.toFraction=function(r){var e,t,i,s,n,a,o,h,l,d,u,c,p=this,f=p.d,m=p.constructor;if(!f)return new m(p);if(l=t=new m(1),i=h=new m(0),e=new m(i),n=e.e=el(f)-p.e-1,a=n%j,e.d[0]=Se(10,a<0?j+a:a),r==null)r=n>0?e:l;else{if(o=new m(r),!o.isInt()||o.lt(l))throw Error(Lt+o);r=o.gt(e)?n>0?e:l:o}for(q=!1,o=new m(xe(f)),d=m.precision,m.precision=n=f.length*j*2;u=ue(o,e,0,1,1),s=t.plus(u.times(i)),s.cmp(r)!=1;)t=i,i=s,s=l,l=h.plus(u.times(s)),h=s,s=e,e=o.minus(u.times(s)),o=s;return s=ue(r.minus(t),i,0,1,1),h=h.plus(s.times(l)),t=t.plus(s.times(i)),h.s=l.s=p.s,c=ue(l,i,n,1).minus(p).abs().cmp(ue(h,t,n,1).minus(p).abs())<1?[l,i]:[h,t],m.precision=d,q=!0,c};C.toHexadecimal=C.toHex=function(r,e){return dn(this,16,r,e)};C.toNearest=function(r,e){var t=this,i=t.constructor;if(t=new i(t),r==null){if(!t.d)return t;r=new i(1),e=i.rounding}else{if(r=new i(r),e===void 0?e=i.rounding:Ne(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(q=!1,t=ue(t,r,0,e,1).times(r),q=!0,z(t)):(r.s=t.s,t=r),t};C.toNumber=function(){return+this};C.toOctal=function(r,e){return dn(this,8,r,e)};C.toPower=C.pow=function(r){var e,t,i,s,n,a,o=this,h=o.constructor,l=+(r=new h(r));if(!o.d||!r.d||!o.d[0]||!r.d[0])return new h(Se(+o,l));if(o=new h(o),o.eq(1))return o;if(i=h.precision,n=h.rounding,r.eq(1))return z(o,i,n);if(e=Me(r.e/j),e>=r.d.length-1&&(t=l<0?-l:l)<=jc)return s=tl(h,o,t,i),r.s<0?new h(1).div(s):z(s,i,n);if(a=o.s,a<0){if(e<r.d.length-1)return new h(NaN);if(r.d[e]&1||(a=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=a,o}return t=Se(+o,l),e=t==0||!isFinite(t)?Me(l*(Math.log("0."+xe(o.d))/Math.LN10+o.e+1)):new h(t+"").e,e>h.maxE+1||e<h.minE-1?new h(e>0?a/0:0):(q=!1,h.rounding=o.s=1,t=Math.min(12,(e+"").length),s=Fs(r.times(Pt(o,i+t)),i),s.d&&(s=z(s,i+5,1),Zi(s.d,i,n)&&(e=i+10,s=z(Fs(r.times(Pt(o,e+t)),e),e+5,1),+xe(s.d).slice(i+1,i+15)+1==1e14&&(s=z(s,i+1,0)))),s.s=a,q=!0,h.rounding=n,z(s,i,n))};C.toPrecision=function(r,e){var t,i=this,s=i.constructor;return r===void 0?t=nt(i,i.e<=s.toExpNeg||i.e>=s.toExpPos):(Ne(r,1,Dt),e===void 0?e=s.rounding:Ne(e,0,8),i=z(new s(i),r,e),t=nt(i,r<=i.e||i.e<=s.toExpNeg,r)),i.isNeg()&&!i.isZero()?"-"+t:t};C.toSignificantDigits=C.toSD=function(r,e){var t=this,i=t.constructor;return r===void 0?(r=i.precision,e=i.rounding):(Ne(r,1,Dt),e===void 0?e=i.rounding:Ne(e,0,8)),z(new i(t),r,e)};C.toString=function(){var r=this,e=r.constructor,t=nt(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};C.truncated=C.trunc=function(){return z(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var r=this,e=r.constructor,t=nt(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function xe(r){var e,t,i,s=r.length-1,n="",a=r[0];if(s>0){for(n+=a,e=1;e<s;e++)i=r[e]+"",t=j-i.length,t&&(n+=kt(t)),n+=i;a=r[e],i=a+"",t=j-i.length,t&&(n+=kt(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return n+a}function Ne(r,e,t){if(r!==~~r||r<e||r>t)throw Error(Lt+r)}function Zi(r,e,t,i){var s,n,a,o;for(n=r[0];n>=10;n/=10)--e;return--e<0?(e+=j,s=0):(s=Math.ceil((e+1)/j),e%=j),n=Se(10,j-e),o=r[s]%n|0,i==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),a=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):a=(t<4&&o+1==n||t>3&&o+1==n/2)&&(r[s+1]/n/100|0)==Se(10,e-2)-1||(o==n/2||o==0)&&(r[s+1]/n/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),a=(i||t<4)&&o==9999||!i&&t>3&&o==4999):a=((i||t<4)&&o+1==n||!i&&t>3&&o+1==n/2)&&(r[s+1]/n/1e3|0)==Se(10,e-3)-1,a}function Sr(r,e,t){for(var i,s=[0],n,a=0,o=r.length;a<o;){for(n=s.length;n--;)s[n]*=e;for(s[0]+=Ns.indexOf(r.charAt(a++)),i=0;i<s.length;i++)s[i]>t-1&&(s[i+1]===void 0&&(s[i+1]=0),s[i+1]+=s[i]/t|0,s[i]%=t)}return s.reverse()}function qc(r,e){var t,i,s;if(e.isZero())return e;i=e.d.length,i<32?(t=Math.ceil(i/3),s=(1/Qr(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=ci(r,1,e.times(s),new r(1));for(var n=t;n--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}var ue=function(){function r(i,s,n){var a,o=0,h=i.length;for(i=i.slice();h--;)a=i[h]*s+o,i[h]=a%n|0,o=a/n|0;return o&&i.unshift(o),i}function e(i,s,n,a){var o,h;if(n!=a)h=n>a?1:-1;else for(o=h=0;o<n;o++)if(i[o]!=s[o]){h=i[o]>s[o]?1:-1;break}return h}function t(i,s,n,a){for(var o=0;n--;)i[n]-=o,o=i[n]<s[n]?1:0,i[n]=o*a+i[n]-s[n];for(;!i[0]&&i.length>1;)i.shift()}return function(i,s,n,a,o,h){var l,d,u,c,p,f,m,v,_,w,b,T,L,A,G,R,H,$,I,K,W=i.constructor,le=i.s==s.s?1:-1,ne=i.d,U=s.d;if(!ne||!ne[0]||!U||!U[0])return new W(!i.s||!s.s||(ne?U&&ne[0]==U[0]:!U)?NaN:ne&&ne[0]==0||!U?le*0:le/0);for(h?(p=1,d=i.e-s.e):(h=je,p=j,d=Me(i.e/p)-Me(s.e/p)),I=U.length,H=ne.length,_=new W(le),w=_.d=[],u=0;U[u]==(ne[u]||0);u++);if(U[u]>(ne[u]||0)&&d--,n==null?(A=n=W.precision,a=W.rounding):o?A=n+(i.e-s.e)+1:A=n,A<0)w.push(1),f=!0;else{if(A=A/p+2|0,u=0,I==1){for(c=0,U=U[0],A++;(u<H||c)&&A--;u++)G=c*h+(ne[u]||0),w[u]=G/U|0,c=G%U|0;f=c||u<H}else{for(c=h/(U[0]+1)|0,c>1&&(U=r(U,c,h),ne=r(ne,c,h),I=U.length,H=ne.length),R=I,b=ne.slice(0,I),T=b.length;T<I;)b[T++]=0;K=U.slice(),K.unshift(0),$=U[0],U[1]>=h/2&&++$;do c=0,l=e(U,b,I,T),l<0?(L=b[0],I!=T&&(L=L*h+(b[1]||0)),c=L/$|0,c>1?(c>=h&&(c=h-1),m=r(U,c,h),v=m.length,T=b.length,l=e(m,b,v,T),l==1&&(c--,t(m,I<v?K:U,v,h))):(c==0&&(l=c=1),m=U.slice()),v=m.length,v<T&&m.unshift(0),t(b,m,T,h),l==-1&&(T=b.length,l=e(U,b,I,T),l<1&&(c++,t(b,I<T?K:U,T,h))),T=b.length):l===0&&(c++,b=[0]),w[u++]=c,l&&b[0]?b[T++]=ne[R]||0:(b=[ne[R]],T=1);while((R++<H||b[0]!==void 0)&&A--);f=b[0]!==void 0}w[0]||w.shift()}if(p==1)_.e=d,qo=f;else{for(u=1,c=w[0];c>=10;c/=10)u++;_.e=u+d*p-1,z(_,o?n+_.e+1:n,a,f)}return _}}();function z(r,e,t,i){var s,n,a,o,h,l,d,u,c,p=r.constructor;e:if(e!=null){if(u=r.d,!u)return r;for(s=1,o=u[0];o>=10;o/=10)s++;if(n=e-s,n<0)n+=j,a=e,d=u[c=0],h=d/Se(10,s-a-1)%10|0;else if(c=Math.ceil((n+1)/j),o=u.length,c>=o)if(i){for(;o++<=c;)u.push(0);d=h=0,s=1,n%=j,a=n-j+1}else break e;else{for(d=o=u[c],s=1;o>=10;o/=10)s++;n%=j,a=n-j+s,h=a<0?0:d/Se(10,s-a-1)%10|0}if(i=i||e<0||u[c+1]!==void 0||(a<0?d:d%Se(10,s-a-1)),l=t<4?(h||i)&&(t==0||t==(r.s<0?3:2)):h>5||h==5&&(t==4||i||t==6&&(n>0?a>0?d/Se(10,s-a):0:u[c-1])%10&1||t==(r.s<0?8:7)),e<1||!u[0])return u.length=0,l?(e-=r.e+1,u[0]=Se(10,(j-e%j)%j),r.e=-e||0):u[0]=r.e=0,r;if(n==0?(u.length=c,o=1,c--):(u.length=c+1,o=Se(10,j-n),u[c]=a>0?(d/Se(10,s-a)%Se(10,a)|0)*o:0),l)for(;;)if(c==0){for(n=1,a=u[0];a>=10;a/=10)n++;for(a=u[0]+=o,o=1;a>=10;a/=10)o++;n!=o&&(r.e++,u[0]==je&&(u[0]=1));break}else{if(u[c]+=o,u[c]!=je)break;u[c--]=0,o=1}for(n=u.length;u[--n]===0;)u.pop()}return q&&(r.e>p.maxE?(r.d=null,r.e=NaN):r.e<p.minE&&(r.e=0,r.d=[0])),r}function nt(r,e,t){if(!r.isFinite())return rl(r);var i,s=r.e,n=xe(r.d),a=n.length;return e?(t&&(i=t-a)>0?n=n.charAt(0)+"."+n.slice(1)+kt(i):a>1&&(n=n.charAt(0)+"."+n.slice(1)),n=n+(r.e<0?"e":"e+")+r.e):s<0?(n="0."+kt(-s-1)+n,t&&(i=t-a)>0&&(n+=kt(i))):s>=a?(n+=kt(s+1-a),t&&(i=t-s-1)>0&&(n=n+"."+kt(i))):((i=s+1)<a&&(n=n.slice(0,i)+"."+n.slice(i)),t&&(i=t-a)>0&&(s+1===a&&(n+="."),n+=kt(i))),n}function Jr(r,e){var t=r[0];for(e*=j;t>=10;t/=10)e++;return e}function zr(r,e,t){if(e>Xc)throw q=!0,t&&(r.precision=t),Error(Yo);return z(new r($r),e,1,!0)}function Ue(r,e,t){if(e>Ds)throw Error(Yo);return z(new r(Vr),e,t,!0)}function el(r){var e=r.length-1,t=e*j+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}function kt(r){for(var e="";r--;)e+="0";return e}function tl(r,e,t,i){var s,n=new r(1),a=Math.ceil(i/j+4);for(q=!1;;){if(t%2&&(n=n.times(e),ra(n.d,a)&&(s=!0)),t=Me(t/2),t===0){t=n.d.length-1,s&&n.d[t]===0&&++n.d[t];break}e=e.times(e),ra(e.d,a)}return q=!0,n}function ia(r){return r.d[r.d.length-1]&1}function il(r,e,t){for(var i,s=new r(e[0]),n=0;++n<e.length;)if(i=new r(e[n]),i.s)s[t](i)&&(s=i);else{s=i;break}return s}function Fs(r,e){var t,i,s,n,a,o,h,l=0,d=0,u=0,c=r.constructor,p=c.rounding,f=c.precision;if(!r.d||!r.d[0]||r.e>17)return new c(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:0/0);for(e==null?(q=!1,h=f):h=e,o=new c(.03125);r.e>-2;)r=r.times(o),u+=5;for(i=Math.log(Se(2,u))/Math.LN10*2+5|0,h+=i,t=n=a=new c(1),c.precision=h;;){if(n=z(n.times(r),h,1),t=t.times(++d),o=a.plus(ue(n,t,h,1)),xe(o.d).slice(0,h)===xe(a.d).slice(0,h)){for(s=u;s--;)a=z(a.times(a),h,1);if(e==null)if(l<3&&Zi(a.d,h-i,p,l))c.precision=h+=10,t=n=o=new c(1),d=0,l++;else return z(a,c.precision=f,p,q=!0);else return c.precision=f,a}a=o}}function Pt(r,e){var t,i,s,n,a,o,h,l,d,u,c,p=1,f=10,m=r,v=m.d,_=m.constructor,w=_.rounding,b=_.precision;if(m.s<0||!v||!v[0]||!m.e&&v[0]==1&&v.length==1)return new _(v&&!v[0]?-1/0:m.s!=1?NaN:v?0:m);if(e==null?(q=!1,d=b):d=e,_.precision=d+=f,t=xe(v),i=t.charAt(0),Math.abs(n=m.e)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)m=m.times(r),t=xe(m.d),i=t.charAt(0),p++;n=m.e,i>1?(m=new _("0."+t),n++):m=new _(i+"."+t.slice(1))}else return l=zr(_,d+2,b).times(n+""),m=Pt(new _(i+"."+t.slice(1)),d-f).plus(l),_.precision=b,e==null?z(m,b,w,q=!0):m;for(u=m,h=a=m=ue(m.minus(1),m.plus(1),d,1),c=z(m.times(m),d,1),s=3;;){if(a=z(a.times(c),d,1),l=h.plus(ue(a,new _(s),d,1)),xe(l.d).slice(0,d)===xe(h.d).slice(0,d))if(h=h.times(2),n!==0&&(h=h.plus(zr(_,d+2,b).times(n+""))),h=ue(h,new _(p),d,1),e==null)if(Zi(h.d,d-f,w,o))_.precision=d+=f,l=a=m=ue(u.minus(1),u.plus(1),d,1),c=z(m.times(m),d,1),s=o=1;else return z(h,_.precision=b,w,q=!0);else return _.precision=b,h;h=l,s+=2}}function rl(r){return String(r.s*r.s/0)}function Hs(r,e){var t,i,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(t<0&&(t=i),t+=+e.slice(i+1),e=e.substring(0,i)):t<0&&(t=e.length),i=0;e.charCodeAt(i)===48;i++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(i,s),e){if(s-=i,r.e=t=t-i-1,r.d=[],i=(t+1)%j,t<0&&(i+=j),i<s){for(i&&r.d.push(+e.slice(0,i)),s-=j;i<s;)r.d.push(+e.slice(i,i+=j));e=e.slice(i),i=j-e.length}else i-=s;for(;i--;)e+="0";r.d.push(+e),q&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}function Yc(r,e){var t,i,s,n,a,o,h,l,d;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Qo.test(e))return Hs(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(Uc.test(e))t=16,e=e.toLowerCase();else if(Wc.test(e))t=2;else if(Zc.test(e))t=8;else throw Error(Lt+e);for(n=e.search(/p/i),n>0?(h=+e.slice(n+1),e=e.substring(2,n)):e=e.slice(2),n=e.indexOf("."),a=n>=0,i=r.constructor,a&&(e=e.replace(".",""),o=e.length,n=o-n,s=tl(i,new i(t),n,n*2)),l=Sr(e,t,je),d=l.length-1,n=d;l[n]===0;--n)l.pop();return n<0?new i(r.s*0):(r.e=Jr(l,d),r.d=l,q=!1,a&&(r=ue(r,s,o*4)),h&&(r=r.times(Math.abs(h)<54?Se(2,h):Z.pow(2,h))),q=!0,r)}function Kc(r,e){var t,i=e.d.length;if(i<3)return e.isZero()?e:ci(r,2,e,e);t=1.4*Math.sqrt(i),t=t>16?16:t|0,e=e.times(1/Qr(5,t)),e=ci(r,2,e,e);for(var s,n=new r(5),a=new r(16),o=new r(20);t--;)s=e.times(e),e=e.times(n.plus(s.times(a.times(s).minus(o))));return e}function ci(r,e,t,i,s){var n,a,o,h,l=r.precision,d=Math.ceil(l/j);for(q=!1,h=t.times(t),o=new r(i);;){if(a=ue(o.times(h),new r(e++*e++),l,1),o=s?i.plus(a):i.minus(a),i=ue(a.times(h),new r(e++*e++),l,1),a=o.plus(i),a.d[d]!==void 0){for(n=d;a.d[n]===o.d[n]&&n--;);if(n==-1)break}n=o,o=i,i=a,a=n}return q=!0,a.d.length=d+1,a}function Qr(r,e){for(var t=r;--e;)t*=r;return t}function sl(r,e){var t,i=e.s<0,s=Ue(r,r.precision,1),n=s.times(.5);if(e=e.abs(),e.lte(n))return ht=i?4:1,e;if(t=e.divToInt(s),t.isZero())ht=i?3:2;else{if(e=e.minus(t.times(s)),e.lte(n))return ht=ia(t)?i?2:3:i?4:1,e;ht=ia(t)?i?1:4:i?3:2}return e.minus(s).abs()}function dn(r,e,t,i){var s,n,a,o,h,l,d,u,c,p=r.constructor,f=t!==void 0;if(f?(Ne(t,1,Dt),i===void 0?i=p.rounding:Ne(i,0,8)):(t=p.precision,i=p.rounding),!r.isFinite())d=rl(r);else{for(d=nt(r),a=d.indexOf("."),f?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(d=d.replace(".",""),c=new p(1),c.e=d.length-a,c.d=Sr(nt(c),10,s),c.e=c.d.length),u=Sr(d,10,s),n=h=u.length;u[--h]==0;)u.pop();if(!u[0])d=f?"0p+0":"0";else{if(a<0?n--:(r=new p(r),r.d=u,r.e=n,r=ue(r,c,t,i,0,s),u=r.d,n=r.e,l=qo),a=u[t],o=s/2,l=l||u[t+1]!==void 0,l=i<4?(a!==void 0||l)&&(i===0||i===(r.s<0?3:2)):a>o||a===o&&(i===4||l||i===6&&u[t-1]&1||i===(r.s<0?8:7)),u.length=t,l)for(;++u[--t]>s-1;)u[t]=0,t||(++n,u.unshift(1));for(h=u.length;!u[h-1];--h);for(a=0,d="";a<h;a++)d+=Ns.charAt(u[a]);if(f){if(h>1)if(e==16||e==8){for(a=e==16?4:3,--h;h%a;h++)d+="0";for(u=Sr(d,s,e),h=u.length;!u[h-1];--h);for(a=1,d="1.";a<h;a++)d+=Ns.charAt(u[a])}else d=d.charAt(0)+"."+d.slice(1);d=d+(n<0?"p":"p+")+n}else if(n<0){for(;++n;)d="0"+d;d="0."+d}else if(++n>h)for(n-=h;n--;)d+="0";else n<h&&(d=d.slice(0,n)+"."+d.slice(n))}d=(e==16?"0x":e==2?"0b":e==8?"0o":"")+d}return r.s<0?"-"+d:d}function ra(r,e){if(r.length>e)return r.length=e,!0}function Jc(r){return new this(r).abs()}function Qc(r){return new this(r).acos()}function ef(r){return new this(r).acosh()}function tf(r,e){return new this(r).plus(e)}function rf(r){return new this(r).asin()}function sf(r){return new this(r).asinh()}function nf(r){return new this(r).atan()}function af(r){return new this(r).atanh()}function of(r,e){r=new this(r),e=new this(e);var t,i=this.precision,s=this.rounding,n=i+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Ue(this,n,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Ue(this,i,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Ue(this,n,1).times(.5),t.s=r.s):e.s<0?(this.precision=n,this.rounding=1,t=this.atan(ue(r,e,n,1)),e=Ue(this,n,1),this.precision=i,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(ue(r,e,n,1)),t}function lf(r){return new this(r).cbrt()}function hf(r){return z(r=new this(r),r.e+1,2)}function df(r,e,t){return new this(r).clamp(e,t)}function uf(r){if(!r||typeof r!="object")throw Error(Kr+"Object expected");var e,t,i,s=r.defaults===!0,n=["precision",1,Dt,"rounding",0,8,"toExpNeg",-ei,0,"toExpPos",0,ei,"maxE",0,ei,"minE",-ei,0,"modulo",0,9];for(e=0;e<n.length;e+=3)if(t=n[e],s&&(this[t]=Gs[t]),(i=r[t])!==void 0)if(Me(i)===i&&i>=n[e+1]&&i<=n[e+2])this[t]=i;else throw Error(Lt+t+": "+i);if(t="crypto",s&&(this[t]=Gs[t]),(i=r[t])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Ko);else this[t]=!1;else throw Error(Lt+t+": "+i);return this}function cf(r){return new this(r).cos()}function ff(r){return new this(r).cosh()}function nl(r){var e,t,i;function s(n){var a,o,h,l=this;if(!(l instanceof s))return new s(n);if(l.constructor=s,sa(n)){l.s=n.s,q?!n.d||n.e>s.maxE?(l.e=NaN,l.d=null):n.e<s.minE?(l.e=0,l.d=[0]):(l.e=n.e,l.d=n.d.slice()):(l.e=n.e,l.d=n.d?n.d.slice():n.d);return}if(h=typeof n,h==="number"){if(n===0){l.s=1/n<0?-1:1,l.e=0,l.d=[0];return}if(n<0?(n=-n,l.s=-1):l.s=1,n===~~n&&n<1e7){for(a=0,o=n;o>=10;o/=10)a++;q?a>s.maxE?(l.e=NaN,l.d=null):a<s.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[n]):(l.e=a,l.d=[n]);return}else if(n*0!==0){n||(l.s=NaN),l.e=NaN,l.d=null;return}return Hs(l,n.toString())}else if(h!=="string")throw Error(Lt+n);return(o=n.charCodeAt(0))===45?(n=n.slice(1),l.s=-1):(o===43&&(n=n.slice(1)),l.s=1),Qo.test(n)?Hs(l,n):Yc(l,n)}if(s.prototype=C,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=uf,s.clone=nl,s.isDecimal=sa,s.abs=Jc,s.acos=Qc,s.acosh=ef,s.add=tf,s.asin=rf,s.asinh=sf,s.atan=nf,s.atanh=af,s.atan2=of,s.cbrt=lf,s.ceil=hf,s.clamp=df,s.cos=cf,s.cosh=ff,s.div=pf,s.exp=mf,s.floor=gf,s.hypot=vf,s.ln=yf,s.log=bf,s.log10=wf,s.log2=_f,s.max=Sf,s.min=Tf,s.mod=Cf,s.mul=Ef,s.pow=kf,s.random=xf,s.round=Pf,s.sign=Af,s.sin=Of,s.sinh=Mf,s.sqrt=Lf,s.sub=Rf,s.sum=If,s.tan=Nf,s.tanh=Gf,s.trunc=Df,r===void 0&&(r={}),r&&r.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<i.length;)r.hasOwnProperty(t=i[e++])||(r[t]=this[t]);return s.config(r),s}function pf(r,e){return new this(r).div(e)}function mf(r){return new this(r).exp()}function gf(r){return z(r=new this(r),r.e+1,3)}function vf(){var r,e,t=new this(0);for(q=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),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 sa(r){return r instanceof Z||r&&r.toStringTag===Jo||!1}function yf(r){return new this(r).ln()}function bf(r,e){return new this(r).log(e)}function _f(r){return new this(r).log(2)}function wf(r){return new this(r).log(10)}function Sf(){return il(this,arguments,"lt")}function Tf(){return il(this,arguments,"gt")}function Cf(r,e){return new this(r).mod(e)}function Ef(r,e){return new this(r).mul(e)}function kf(r,e){return new this(r).pow(e)}function xf(r){var e,t,i,s,n=0,a=new this(1),o=[];if(r===void 0?r=this.precision:Ne(r,1,Dt),i=Math.ceil(r/j),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(i));n<i;)s=e[n],s>=429e7?e[n]=crypto.getRandomValues(new Uint32Array(1))[0]:o[n++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(i*=4);n<i;)s=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+((e[n+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,n):(o.push(s%1e7),n+=4);n=i/4}else throw Error(Ko);else for(;n<i;)o[n++]=Math.random()*1e7|0;for(i=o[--n],r%=j,i&&r&&(s=Se(10,j-r),o[n]=(i/s|0)*s);o[n]===0;n--)o.pop();if(n<0)t=0,o=[0];else{for(t=-1;o[0]===0;t-=j)o.shift();for(i=1,s=o[0];s>=10;s/=10)i++;i<j&&(t-=j-i)}return a.e=t,a.d=o,a}function Pf(r){return z(r=new this(r),r.e+1,this.rounding)}function Af(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}function Of(r){return new this(r).sin()}function Mf(r){return new this(r).sinh()}function Lf(r){return new this(r).sqrt()}function Rf(r,e){return new this(r).sub(e)}function If(){var r=0,e=arguments,t=new this(e[r]);for(q=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return q=!0,z(t,this.precision,this.rounding)}function Nf(r){return new this(r).tan()}function Gf(r){return new this(r).tanh()}function Df(r){return z(r=new this(r),r.e+1,1)}C[Symbol.for("nodejs.util.inspect.custom")]=C.toString;C[Symbol.toStringTag]="Decimal";var Z=C.constructor=nl(Gs);$r=new Z($r);Vr=new Z(Vr);const na={editable:!0,style:{...jo,markerSymbolSize:20,periodMarkerHandleType:"start"}};class aa extends Xo{constructor(e,t,i){super({...na,...e,style:{...na.style,...e.style}},t,i)}createSymbol(){switch(this.style.markerSymbolType){case"triangle":let t=Z.sqrt(2).mul(this.style.markerSymbolSize).toNumber()/2;return new O.Line({points:this.style.periodMarkerHandleType==="start"?[-t,0,0,0,0,t]:[0,0,t,0,0,t],fill:this.style.color,closed:!0,offsetY:t/2});case"circle":return new O.Arc({fill:this.style.color,innerRadius:0,outerRadius:this.style.markerSymbolSize/2,angle:180,rotation:this.style.periodMarkerHandleType==="start"?90:-90});case"square":return new O.Line({points:[0,0,this.style.markerSymbolSize,0,this.style.markerSymbolSize,this.style.markerSymbolSize],fill:this.style.color,closed:!0,rotation:this.style.periodMarkerHandleType==="start"?225:45,offsetX:this.style.markerSymbolSize/2,offsetY:this.style.markerSymbolSize/2});default:throw Error("Unknown type")}}}const oa={editable:!0,style:{...Uo,selectedAreaOpacity:.2,markerHandleAreaOpacity:.7}};class al extends Zo{constructor(e){super({...oa,...e,style:{...oa.style,...e.style}}),this.observation.start=_e.coerce.number().min(0).optional().nullable().parse(this.observation.start),this.observation.end=_e.coerce.number().min(0).optional().nullable().parse(this.observation.end),this.observation.end!=null&&this.observation.start!=null&&(this.observation.start=_e.coerce.number().lte(this.observation.end).parse(this.observation.start))}createCanvasNode(){return super.createCanvasNode(),this.initStartMarkerHandle(),this.initEndMarkerHandle(),this.initSelectedAreaRect(),this.group}onChange(){this.settlePosition();let e={timeObservation:this.observation};this.onChange$.next(e)}onMeasurementsChange(){var i,s,n,a,o;super.onMeasurementsChange();let e=(i=this.startMarkerHandle)==null?void 0:i.getVerticalMeasurement();(s=this.selectedAreaRect)==null||s.setAttrs({y:e.y,height:e.height});let t={y:(n=this.startMarkerHandle)==null?void 0:n.getHandleGroup().y(),height:(a=this.startMarkerHandle)==null?void 0:a.getHandleGroup().getClientRect().height};(o=this.markerHandleRect)==null||o.setAttrs({y:e.y+t.y-t.height/2,height:t.height}),this.settlePosition()}initSelectedAreaRect(){if(this.selectedAreaRect&&this.selectedAreaRect.destroy(),this.markerHandleRect&&this.markerHandleRect.destroy(),!this.hasStart()||!this.hasEnd())return;let e=this.startMarkerHandle.getVerticalMeasurement(),t=this.timeline.timeToTimelinePosition(this.observation.start),i=this.timeline.timeToTimelinePosition(this.observation.end);this.selectedAreaRect=new O.Rect({x:t,y:e.y,width:i-t,height:e.height,listening:!1,fill:this.style.color,opacity:this.style.selectedAreaOpacity});let s={y:this.startMarkerHandle.getHandleGroup().y(),height:this.startMarkerHandle.getHandleGroup().getClientRect().height};this.markerHandleRect=new O.Rect({x:t,y:e.y+s.y-s.height/2,width:i-t,height:s.height,listening:!1,fill:this.style.color,opacity:this.style.markerHandleAreaOpacity}),this.group.add(this.selectedAreaRect),this.group.add(this.markerHandleRect)}initStartMarkerHandle(){if(this.startMarkerHandle&&(this.startMarkerHandle.destroy(),this.startMarkerHandle=void 0),!this.hasStart())return;let e=this.timeline.timeToTimelinePosition(this.observation.start);this.startMarkerHandle=new aa({x:e,editable:this.editable,style:{color:this.style.color,markerRenderType:this.style.renderType,markerSymbolType:this.style.symbolType,periodMarkerHandleType:"start"}},this.markerLane,this.timeline),this.startMarkerHandle.onDrag=t=>{this.editable&&(this.hasEnd()&&t.x()>this.endMarkerHandle.getPosition().x&&t.x(this.endMarkerHandle.getPosition().x),this.settleMeasurements(),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(1))},this.startMarkerHandle.onDragEnd=t=>{if(this.editable){let i=this.timeline.timelinePositionToTime(t.x());this.setTimeObservation({...this.observation,start:i}),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(this.style.markerHandleAreaOpacity)}},this.group.add(this.startMarkerHandle.initCanvasNode())}initEndMarkerHandle(){if(this.endMarkerHandle&&(this.endMarkerHandle.destroy(),this.endMarkerHandle=void 0),!this.hasEnd())return;let e=this.hasEnd()?this.timeline.timeToTimelinePosition(this.observation.end):void 0;this.endMarkerHandle=new aa({x:e,editable:this.editable,style:{periodMarkerHandleType:"end",color:this.style.color,markerRenderType:this.style.renderType,markerSymbolType:this.style.symbolType}},this.markerLane,this.timeline),this.endMarkerHandle.onDrag=t=>{this.editable&&(this.hasStart()&&t.x()<this.startMarkerHandle.getPosition().x&&t.x(this.startMarkerHandle.getPosition().x),this.settleMeasurements(),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(1))},this.endMarkerHandle.onDragEnd=t=>{if(this.editable){let i=this.timeline.timelinePositionToTime(t.x());this.setTimeObservation({...this.observation,end:i}),this.hasStart()&&this.hasEnd()&&this.markerHandleRect.opacity(this.style.markerHandleAreaOpacity)}},this.group.add(this.endMarkerHandle.initCanvasNode())}settlePosition(){this.hasStart()&&this.startMarkerHandle.setPosition({...this.startMarkerHandle.getPosition(),x:this.timeline.timeToTimelinePosition(this.observation.start)}),this.hasEnd()&&this.endMarkerHandle.setPosition({...this.endMarkerHandle.getPosition(),x:this.timeline.timeToTimelinePosition(this.observation.end)}),this.settleMeasurements()}settleMeasurements(){this.hasStart()&&this.hasEnd()&&(this.selectedAreaRect.setAttrs({x:this.startMarkerHandle.getPosition().x,width:this.endMarkerHandle.getPosition().x-this.startMarkerHandle.getPosition().x}),this.markerHandleRect.setAttrs({x:this.startMarkerHandle.getPosition().x,width:this.endMarkerHandle.getPosition().x-this.startMarkerHandle.getPosition().x}))}setTimeObservation(e){this.editable&&(this.observation=e,this.initStartMarkerHandle(),this.initEndMarkerHandle(),this.initSelectedAreaRect(),this.onChange())}setEditable(e){super.setEditable(e)}afterCanvasNodeInit(){super.afterCanvasNodeInit(),this.styleAdapter.onChange$.pipe(k(this.onDestroy$)).subscribe(e=>{this.hasStart()&&this.initStartMarkerHandle(),this.hasEnd()&&this.initEndMarkerHandle(),this.hasStart()&&this.hasEnd()&&this.initSelectedAreaRect()})}hasStart(){return this.observation&&this.observation.start!==null&&this.observation.start!==void 0}hasEnd(){return this.observation&&this.observation.end!==null&&this.observation.end!==void 0}}const la={editable:!0,style:{...jo,markerSymbolSize:20}};class Ff extends Xo{constructor(e,t,i){super({...la,...e,style:{...la.style,...e.style}},t,i)}createSymbol(){switch(this.style.markerSymbolType){case"triangle":let t=Z.sqrt(2).mul(this.style.markerSymbolSize).toNumber()/2;return new O.Line({points:[-t,0,t,0,0,t],fill:this.style.color,closed:!0,offsetY:t/2});case"circle":return new O.Circle({fill:this.style.color,radius:this.style.markerSymbolSize/2});case"square":return new O.Rect({fill:this.style.color,width:this.style.markerSymbolSize,height:this.style.markerSymbolSize,rotation:45,offsetX:this.style.markerSymbolSize/2,offsetY:this.style.markerSymbolSize/2});default:throw Error("Unknown type")}}}const ha={description:"",editable:!0,style:{...Uo}};class ol extends Zo{constructor(e){super({...ha,...e,style:{...ha.style,...e.style}}),this.observation.time=_e.coerce.number().min(0).parse(this.observation.time)}createCanvasNode(){return super.createCanvasNode(),this.initMarkerHandle(),this.group}afterCanvasNodeInit(){super.afterCanvasNodeInit(),this.styleAdapter.onChange$.subscribe(e=>{this.initMarkerHandle()})}initMarkerHandle(){this.markerHandle&&(this.markerHandle.destroy(),this.markerHandle=void 0);let e=this.timeline.timeToTimelinePosition(this.observation.time);this.markerHandle=new Ff({x:e,editable:this.editable,style:{color:this.style.color,markerRenderType:this.style.renderType,markerSymbolType:this.style.symbolType}},this.markerLane,this.timeline),this.markerHandle.onDragEnd=t=>{if(this.editable){let i=this.timeline.timelinePositionToTime(t.x());this.setTimeObservation({...this.observation,time:i})}},this.group.add(this.markerHandle.initCanvasNode())}onChange(){this.settlePosition();let e={timeObservation:this.observation};this.onChange$.next(e)}onMeasurementsChange(){super.onMeasurementsChange(),this.markerHandle.onMeasurementsChange(),this.settlePosition()}settlePosition(){this.markerHandle.setPosition({...this.markerHandle.getPosition(),x:this.timeline.timeToTimelinePosition(this.observation.time)})}setEditable(e){super.setEditable(e)}}const Hf={...Qi};class Bs extends er{constructor(e){super({...e,style:{...Hf,...e.style}}),this.onMarkerFocus$=new V,this.markers=[],this.markersMap=new Map}createCanvasNode(){return super.createCanvasNode(),this.markersGroup=new O.Group({...F.POSITION_TOP_LEFT,...this.timeline.getTimecodedGroupDimension()}),this.timeline.addToTimecodedMarkersGroup(this.markersGroup),this.bodyGroup}settleLayout(){super.settleLayout();let e=this.timeline.getTimecodedGroupHorizontalMeasurement();[this.markersGroup].forEach(t=>{t.width(e.width)}),this.markers&&this.markers.forEach(t=>{t.onMeasurementsChange()})}destroy(){super.destroy(),this.markersGroup.destroy()}clearContent(){this.removeAllMarkers(),this.markers=[],this.markersMap=new Map,this.markersGroup.destroyChildren()}createMomentMarker(e){return this.addMarker(new ol(e))}createPeriodMarker(e){return this.addMarker(new al(e))}addMarker(e){if(!this.isInitialized())throw new Error("MarkerLane not initalized. Maybe you forgot to add MarkerLane to Timeline?");if(this.markersMap.has(e.getId()))throw new Error(`Marker with id=${e.getId()} already exists`);return e.setMarkerLane(this),e.setTimeline(this.timeline),e.onClick$.pipe(k(this.onDestroy$)).subscribe(t=>{this.focusMarker(e.getId())}),e.onMouseEnter$.pipe(k(this.onDestroy$)).subscribe(t=>{this.focusMarker(e.getId())}),this.markers.push(e),this.markersMap.set(e.getId(),e),this.markersGroup.add(e.initCanvasNode()),e}removeAllMarkers(){this.markers&&this.markers.forEach(e=>{this.removeMarker(e.getId())})}removeMarker(e){let t=this.getMarker(e);t&&(this.markers.splice(this.markers.findIndex(i=>i.getId()===t.getId()),1),this.markersMap.delete(t.getId()),t.destroy())}getMarker(e){return this.markersMap.get(e)}getMarkers(){return this.markers}focusMarker(e){let t=this.getMarker(e);t&&(this.moveToTop(t),this.markerInFocus=t,this.onMarkerFocus$.next({marker:t}))}getMarkerInFocus(){return this.markerInFocus}moveToTop(e){e&&(this.markersGroup.moveToTop(),e.getCanvasNode().moveToTop())}}class Bf{static randomHexColor(){return`#${Math.floor(Math.random()*16777215).toString(16)}`}}class yi{static createGoldenRatioWedge(e){let t=new Z(e.height).div(F.GOLDEN_RATIO+1).toDecimalPlaces(2).toNumber(),i=e.height-t,s=i/2;return new O.Line({points:[e.x-s,e.y,e.x+s,e.y,e.x+s,e.y+i,e.x,e.y+i+t,e.x-s,e.y+i],fill:e.color,stroke:e.color,closed:!0,listening:!1})}static createTriangle(e){let t=e.height/2;return new O.Line({points:[e.x-t,e.y,e.x+t,e.y,e.x,e.y+e.height],fill:e.color,closed:!0,listening:!1})}static createEventCatcher(e={}){return new O.Rect({...F.POSITION_TOP_LEFT,opacity:0,listening:!0,...e})}static createDebugRect(){return new O.Rect({...F.POSITION_TOP_LEFT,width:100,height:100,fill:Bf.randomHexColor(),opacity:1})}}function ll(r,e){return function(){return r.apply(e,arguments)}}const{toString:hl}=Object.prototype,{getPrototypeOf:un}=Object,cn=(r=>e=>{const t=hl.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),wt=r=>(r=r.toLowerCase(),e=>cn(e)===r),es=r=>e=>typeof e===r,{isArray:bi}=Array,ji=es("undefined");function $f(r){return r!==null&&!ji(r)&&r.constructor!==null&&!ji(r.constructor)&&Rt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const dl=wt("ArrayBuffer");function Vf(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&dl(r.buffer),e}const zf=es("string"),Rt=es("function"),ul=es("number"),fn=r=>r!==null&&typeof r=="object",Wf=r=>r===!0||r===!1,Tr=r=>{if(cn(r)!=="object")return!1;const e=un(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Uf=wt("Date"),Zf=wt("File"),jf=wt("Blob"),Xf=wt("FileList"),qf=r=>fn(r)&&Rt(r.pipe),Yf=r=>{const e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||hl.call(r)===e||Rt(r.toString)&&r.toString()===e)},Kf=wt("URLSearchParams"),Jf=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tr(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let i,s;if(typeof r!="object"&&(r=[r]),bi(r))for(i=0,s=r.length;i<s;i++)e.call(null,r[i],i,r);else{const n=t?Object.getOwnPropertyNames(r):Object.keys(r),a=n.length;let o;for(i=0;i<a;i++)o=n[i],e.call(null,r[o],o,r)}}function cl(r,e){e=e.toLowerCase();const t=Object.keys(r);let i=t.length,s;for(;i-- >0;)if(s=t[i],e===s.toLowerCase())return s;return null}const fl=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),pl=r=>!ji(r)&&r!==fl;function $s(){const{caseless:r}=pl(this)&&this||{},e={},t=(i,s)=>{const n=r&&cl(e,s)||s;Tr(e[n])&&Tr(i)?e[n]=$s(e[n],i):Tr(i)?e[n]=$s({},i):bi(i)?e[n]=i.slice():e[n]=i};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&tr(arguments[i],t);return e}const Qf=(r,e,t,{allOwnKeys:i}={})=>(tr(e,(s,n)=>{t&&Rt(s)?r[n]=ll(s,t):r[n]=s},{allOwnKeys:i}),r),ep=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),tp=(r,e,t,i)=>{r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},ip=(r,e,t,i)=>{let s,n,a;const o={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),n=s.length;n-- >0;)a=s[n],(!i||i(a,r,e))&&!o[a]&&(e[a]=r[a],o[a]=!0);r=t!==!1&&un(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},rp=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const i=r.indexOf(e,t);return i!==-1&&i===t},sp=r=>{if(!r)return null;if(bi(r))return r;let e=r.length;if(!ul(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},np=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&un(Uint8Array)),ap=(r,e)=>{const i=(r&&r[Symbol.iterator]).call(r);let s;for(;(s=i.next())&&!s.done;){const n=s.value;e.call(r,n[0],n[1])}},op=(r,e)=>{let t;const i=[];for(;(t=r.exec(e))!==null;)i.push(t);return i},lp=wt("HTMLFormElement"),hp=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,s){return i.toUpperCase()+s}),da=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),dp=wt("RegExp"),ml=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),i={};tr(t,(s,n)=>{e(s,n,r)!==!1&&(i[n]=s)}),Object.defineProperties(r,i)},up=r=>{ml(r,(e,t)=>{if(Rt(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=r[t];if(Rt(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},cp=(r,e)=>{const t={},i=s=>{s.forEach(n=>{t[n]=!0})};return bi(r)?i(r):i(String(r).split(e)),t},fp=()=>{},pp=(r,e)=>(r=+r,Number.isFinite(r)?r:e),gs="abcdefghijklmnopqrstuvwxyz",ua="0123456789",gl={DIGIT:ua,ALPHA:gs,ALPHA_DIGIT:gs+gs.toUpperCase()+ua},mp=(r=16,e=gl.ALPHA_DIGIT)=>{let t="";const{length:i}=e;for(;r--;)t+=e[Math.random()*i|0];return t};function gp(r){return!!(r&&Rt(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const vp=r=>{const e=new Array(10),t=(i,s)=>{if(fn(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[s]=i;const n=bi(i)?[]:{};return tr(i,(a,o)=>{const h=t(a,s+1);!ji(h)&&(n[o]=h)}),e[s]=void 0,n}}return i};return t(r,0)},S={isArray:bi,isArrayBuffer:dl,isBuffer:$f,isFormData:Yf,isArrayBufferView:Vf,isString:zf,isNumber:ul,isBoolean:Wf,isObject:fn,isPlainObject:Tr,isUndefined:ji,isDate:Uf,isFile:Zf,isBlob:jf,isRegExp:dp,isFunction:Rt,isStream:qf,isURLSearchParams:Kf,isTypedArray:np,isFileList:Xf,forEach:tr,merge:$s,extend:Qf,trim:Jf,stripBOM:ep,inherits:tp,toFlatObject:ip,kindOf:cn,kindOfTest:wt,endsWith:rp,toArray:sp,forEachEntry:ap,matchAll:op,isHTMLForm:lp,hasOwnProperty:da,hasOwnProp:da,reduceDescriptors:ml,freezeMethods:up,toObjectSet:cp,toCamelCase:hp,noop:fp,toFiniteNumber:pp,findKey:cl,global:fl,isContextDefined:pl,ALPHABET:gl,generateString:mp,isSpecCompliantForm:gp,toJSONObject:vp};function ie(r,e,t,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),s&&(this.response=s)}S.inherits(ie,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:S.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const vl=ie.prototype,yl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{yl[r]={value:r}});Object.defineProperties(ie,yl);Object.defineProperty(vl,"isAxiosError",{value:!0});ie.from=(r,e,t,i,s,n)=>{const a=Object.create(vl);return S.toFlatObject(r,a,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),ie.call(a,r.message,e,t,i,s),a.cause=r,a.name=r.name,n&&Object.assign(a,n),a};const yp=null;function Vs(r){return S.isPlainObject(r)||S.isArray(r)}function bl(r){return S.endsWith(r,"[]")?r.slice(0,-2):r}function ca(r,e,t){return r?r.concat(e).map(function(s,n){return s=bl(s),!t&&n?"["+s+"]":s}).join(t?".":""):e}function bp(r){return S.isArray(r)&&!r.some(Vs)}const _p=S.toFlatObject(S,{},null,function(e){return/^is[A-Z]/.test(e)});function ts(r,e,t){if(!S.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=S.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!S.isUndefined(v[m])});const i=t.metaTokens,s=t.visitor||d,n=t.dots,a=t.indexes,h=(t.Blob||typeof Blob<"u"&&Blob)&&S.isSpecCompliantForm(e);if(!S.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(S.isDate(f))return f.toISOString();if(!h&&S.isBlob(f))throw new ie("Blob is not supported. Use a Buffer instead.");return S.isArrayBuffer(f)||S.isTypedArray(f)?h&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function d(f,m,v){let _=f;if(f&&!v&&typeof f=="object"){if(S.endsWith(m,"{}"))m=i?m:m.slice(0,-2),f=JSON.stringify(f);else if(S.isArray(f)&&bp(f)||(S.isFileList(f)||S.endsWith(m,"[]"))&&(_=S.toArray(f)))return m=bl(m),_.forEach(function(b,T){!(S.isUndefined(b)||b===null)&&e.append(a===!0?ca([m],T,n):a===null?m:m+"[]",l(b))}),!1}return Vs(f)?!0:(e.append(ca(v,m,n),l(f)),!1)}const u=[],c=Object.assign(_p,{defaultVisitor:d,convertValue:l,isVisitable:Vs});function p(f,m){if(!S.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(f),S.forEach(f,function(_,w){(!(S.isUndefined(_)||_===null)&&s.call(e,_,S.isString(w)?w.trim():w,m,c))===!0&&p(_,m?m.concat(w):[w])}),u.pop()}}if(!S.isObject(r))throw new TypeError("data must be an object");return p(r),e}function fa(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function pn(r,e){this._pairs=[],r&&ts(r,this,e)}const _l=pn.prototype;_l.append=function(e,t){this._pairs.push([e,t])};_l.toString=function(e){const t=e?function(i){return e.call(this,i,fa)}:fa;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function wp(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wl(r,e,t){if(!e)return r;const i=t&&t.encode||wp,s=t&&t.serialize;let n;if(s?n=s(e,t):n=S.isURLSearchParams(e)?e.toString():new pn(e,t).toString(i),n){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+n}return r}class Sp{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){S.forEach(this.handlers,function(i){i!==null&&e(i)})}}const pa=Sp,Sl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tp=typeof URLSearchParams<"u"?URLSearchParams:pn,Cp=typeof FormData<"u"?FormData:null,Ep=(()=>{let r;return typeof navigator<"u"&&((r=navigator.product)==="ReactNative"||r==="NativeScript"||r==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),kp=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),tt={isBrowser:!0,classes:{URLSearchParams:Tp,FormData:Cp,Blob},isStandardBrowserEnv:Ep,isStandardBrowserWebWorkerEnv:kp,protocols:["http","https","file","blob","url","data"]};function xp(r,e){return ts(r,new tt.classes.URLSearchParams,Object.assign({visitor:function(t,i,s,n){return tt.isNode&&S.isBuffer(t)?(this.append(i,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}function Pp(r){return S.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ap(r){const e={},t=Object.keys(r);let i;const s=t.length;let n;for(i=0;i<s;i++)n=t[i],e[n]=r[n];return e}function Tl(r){function e(t,i,s,n){let a=t[n++];const o=Number.isFinite(+a),h=n>=t.length;return a=!a&&S.isArray(s)?s.length:a,h?(S.hasOwnProp(s,a)?s[a]=[s[a],i]:s[a]=i,!o):((!s[a]||!S.isObject(s[a]))&&(s[a]=[]),e(t,i,s[a],n)&&S.isArray(s[a])&&(s[a]=Ap(s[a])),!o)}if(S.isFormData(r)&&S.isFunction(r.entries)){const t={};return S.forEachEntry(r,(i,s)=>{e(Pp(i),s,t,0)}),t}return null}const Op={"Content-Type":void 0};function Mp(r,e,t){if(S.isString(r))try{return(e||JSON.parse)(r),S.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(r)}const is={transitional:Sl,adapter:["xhr","http"],transformRequest:[function(e,t){const i=t.getContentType()||"",s=i.indexOf("application/json")>-1,n=S.isObject(e);if(n&&S.isHTMLForm(e)&&(e=new FormData(e)),S.isFormData(e))return s&&s?JSON.stringify(Tl(e)):e;if(S.isArrayBuffer(e)||S.isBuffer(e)||S.isStream(e)||S.isFile(e)||S.isBlob(e))return e;if(S.isArrayBufferView(e))return e.buffer;if(S.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return xp(e,this.formSerializer).toString();if((o=S.isFileList(e))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ts(o?{"files[]":e}:e,h&&new h,this.formSerializer)}}return n||s?(t.setContentType("application/json",!1),Mp(e)):e}],transformResponse:[function(e){const t=this.transitional||is.transitional,i=t&&t.forcedJSONParsing,s=this.responseType==="json";if(e&&S.isString(e)&&(i&&!this.responseType||s)){const a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?ie.from(o,ie.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};S.forEach(["delete","get","head"],function(e){is.headers[e]={}});S.forEach(["post","put","patch"],function(e){is.headers[e]=S.merge(Op)});const mn=is,Lp=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rp=r=>{const e={};let t,i,s;return r&&r.split(`
|
|
11
11
|
`).forEach(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),i=a.substring(s+1).trim(),!(!t||e[t]&&Lp[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},ma=Symbol("internals");function Ci(r){return r&&String(r).trim().toLowerCase()}function Cr(r){return r===!1||r==null?r:S.isArray(r)?r.map(Cr):String(r)}function Ip(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(r);)e[i[1]]=i[2];return e}function Np(r){return/^[-_a-zA-Z]+$/.test(r.trim())}function vs(r,e,t,i,s){if(S.isFunction(i))return i.call(this,e,t);if(s&&(e=t),!!S.isString(e)){if(S.isString(i))return e.indexOf(i)!==-1;if(S.isRegExp(i))return i.test(e)}}function Gp(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function Dp(r,e){const t=S.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+t,{value:function(s,n,a){return this[i].call(this,e,s,n,a)},configurable:!0})})}class rs{constructor(e){e&&this.set(e)}set(e,t,i){const s=this;function n(o,h,l){const d=Ci(h);if(!d)throw new Error("header name must be a non-empty string");const u=S.findKey(s,d);(!u||s[u]===void 0||l===!0||l===void 0&&s[u]!==!1)&&(s[u||h]=Cr(o))}const a=(o,h)=>S.forEach(o,(l,d)=>n(l,d,h));return S.isPlainObject(e)||e instanceof this.constructor?a(e,t):S.isString(e)&&(e=e.trim())&&!Np(e)?a(Rp(e),t):e!=null&&n(t,e,i),this}get(e,t){if(e=Ci(e),e){const i=S.findKey(this,e);if(i){const s=this[i];if(!t)return s;if(t===!0)return Ip(s);if(S.isFunction(t))return t.call(this,s,i);if(S.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ci(e),e){const i=S.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||vs(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let s=!1;function n(a){if(a=Ci(a),a){const o=S.findKey(i,a);o&&(!t||vs(i,i[o],o,t))&&(delete i[o],s=!0)}}return S.isArray(e)?e.forEach(n):n(e),s}clear(e){const t=Object.keys(this);let i=t.length,s=!1;for(;i--;){const n=t[i];(!e||vs(this,this[n],n,e,!0))&&(delete this[n],s=!0)}return s}normalize(e){const t=this,i={};return S.forEach(this,(s,n)=>{const a=S.findKey(i,n);if(a){t[a]=Cr(s),delete t[n];return}const o=e?Gp(n):String(n).trim();o!==n&&delete t[n],t[o]=Cr(s),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return S.forEach(this,(i,s)=>{i!=null&&i!==!1&&(t[s]=e&&S.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
12
12
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(s=>i.set(s)),i}static accessor(e){const i=(this[ma]=this[ma]={accessors:{}}).accessors,s=this.prototype;function n(a){const o=Ci(a);i[o]||(Dp(s,a),i[o]=!0)}return S.isArray(e)?e.forEach(n):n(e),this}}rs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.freezeMethods(rs.prototype);S.freezeMethods(rs);const pt=rs;function ys(r,e){const t=this||mn,i=e||t,s=pt.from(i.headers);let n=i.data;return S.forEach(r,function(o){n=o.call(t,n,s.normalize(),e?e.status:void 0)}),s.normalize(),n}function Cl(r){return!!(r&&r.__CANCEL__)}function ir(r,e,t){ie.call(this,r??"canceled",ie.ERR_CANCELED,e,t),this.name="CanceledError"}S.inherits(ir,ie,{__CANCEL__:!0});function Fp(r,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new ie("Request failed with status code "+t.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const Hp=tt.isStandardBrowserEnv?function(){return{write:function(t,i,s,n,a,o){const h=[];h.push(t+"="+encodeURIComponent(i)),S.isNumber(s)&&h.push("expires="+new Date(s).toGMTString()),S.isString(n)&&h.push("path="+n),S.isString(a)&&h.push("domain="+a),o===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(t){const i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Bp(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function $p(r,e){return e?r.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):r}function El(r,e){return r&&!Bp(e)?$p(r,e):e}const Vp=tt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function s(n){let a=n;return e&&(t.setAttribute("href",a),a=t.href),t.setAttribute("href",a),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=s(window.location.href),function(a){const o=S.isString(a)?s(a):a;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}();function zp(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function Wp(r,e){r=r||10;const t=new Array(r),i=new Array(r);let s=0,n=0,a;return e=e!==void 0?e:1e3,function(h){const l=Date.now(),d=i[n];a||(a=l),t[s]=h,i[s]=l;let u=n,c=0;for(;u!==s;)c+=t[u++],u=u%r;if(s=(s+1)%r,s===n&&(n=(n+1)%r),l-a<e)return;const p=d&&l-d;return p?Math.round(c*1e3/p):void 0}}function ga(r,e){let t=0;const i=Wp(50,250);return s=>{const n=s.loaded,a=s.lengthComputable?s.total:void 0,o=n-t,h=i(o),l=n<=a;t=n;const d={loaded:n,total:a,progress:a?n/a:void 0,bytes:o,rate:h||void 0,estimated:h&&a&&l?(a-n)/h:void 0,event:s};d[e?"download":"upload"]=!0,r(d)}}const Up=typeof XMLHttpRequest<"u",Zp=Up&&function(r){return new Promise(function(t,i){let s=r.data;const n=pt.from(r.headers).normalize(),a=r.responseType;let o;function h(){r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}S.isFormData(s)&&(tt.isStandardBrowserEnv||tt.isStandardBrowserWebWorkerEnv)&&n.setContentType(!1);let l=new XMLHttpRequest;if(r.auth){const p=r.auth.username||"",f=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";n.set("Authorization","Basic "+btoa(p+":"+f))}const d=El(r.baseURL,r.url);l.open(r.method.toUpperCase(),wl(d,r.params,r.paramsSerializer),!0),l.timeout=r.timeout;function u(){if(!l)return;const p=pt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:r,request:l};Fp(function(_){t(_),h()},function(_){i(_),h()},m),l=null}if("onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(u)},l.onabort=function(){l&&(i(new ie("Request aborted",ie.ECONNABORTED,r,l)),l=null)},l.onerror=function(){i(new ie("Network Error",ie.ERR_NETWORK,r,l)),l=null},l.ontimeout=function(){let f=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const m=r.transitional||Sl;r.timeoutErrorMessage&&(f=r.timeoutErrorMessage),i(new ie(f,m.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,r,l)),l=null},tt.isStandardBrowserEnv){const p=(r.withCredentials||Vp(d))&&r.xsrfCookieName&&Hp.read(r.xsrfCookieName);p&&n.set(r.xsrfHeaderName,p)}s===void 0&&n.setContentType(null),"setRequestHeader"in l&&S.forEach(n.toJSON(),function(f,m){l.setRequestHeader(m,f)}),S.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),a&&a!=="json"&&(l.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&l.addEventListener("progress",ga(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",ga(r.onUploadProgress)),(r.cancelToken||r.signal)&&(o=p=>{l&&(i(!p||p.type?new ir(null,r,l):p),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const c=zp(d);if(c&&tt.protocols.indexOf(c)===-1){i(new ie("Unsupported protocol "+c+":",ie.ERR_BAD_REQUEST,r));return}l.send(s||null)})},Er={http:yp,xhr:Zp};S.forEach(Er,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const jp={getAdapter:r=>{r=S.isArray(r)?r:[r];const{length:e}=r;let t,i;for(let s=0;s<e&&(t=r[s],!(i=S.isString(t)?Er[t.toLowerCase()]:t));s++);if(!i)throw i===!1?new ie(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(S.hasOwnProp(Er,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!S.isFunction(i))throw new TypeError("adapter is not a function");return i},adapters:Er};function bs(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ir(null,r)}function va(r){return bs(r),r.headers=pt.from(r.headers),r.data=ys.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),jp.getAdapter(r.adapter||mn.adapter)(r).then(function(i){return bs(r),i.data=ys.call(r,r.transformResponse,i),i.headers=pt.from(i.headers),i},function(i){return Cl(i)||(bs(r),i&&i.response&&(i.response.data=ys.call(r,r.transformResponse,i.response),i.response.headers=pt.from(i.response.headers))),Promise.reject(i)})}const ya=r=>r instanceof pt?r.toJSON():r;function fi(r,e){e=e||{};const t={};function i(l,d,u){return S.isPlainObject(l)&&S.isPlainObject(d)?S.merge.call({caseless:u},l,d):S.isPlainObject(d)?S.merge({},d):S.isArray(d)?d.slice():d}function s(l,d,u){if(S.isUndefined(d)){if(!S.isUndefined(l))return i(void 0,l,u)}else return i(l,d,u)}function n(l,d){if(!S.isUndefined(d))return i(void 0,d)}function a(l,d){if(S.isUndefined(d)){if(!S.isUndefined(l))return i(void 0,l)}else return i(void 0,d)}function o(l,d,u){if(u in e)return i(l,d);if(u in r)return i(void 0,l)}const h={url:n,method:n,data:n,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(l,d)=>s(ya(l),ya(d),!0)};return S.forEach(Object.keys(r).concat(Object.keys(e)),function(d){const u=h[d]||s,c=u(r[d],e[d],d);S.isUndefined(c)&&u!==o||(t[d]=c)}),t}const kl="1.3.3",gn={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{gn[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});const ba={};gn.transitional=function(e,t,i){function s(n,a){return"[Axios v"+kl+"] Transitional option '"+n+"'"+a+(i?". "+i:"")}return(n,a,o)=>{if(e===!1)throw new ie(s(a," has been removed"+(t?" in "+t:"")),ie.ERR_DEPRECATED);return t&&!ba[a]&&(ba[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(n,a,o):!0}};function Xp(r,e,t){if(typeof r!="object")throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let s=i.length;for(;s-- >0;){const n=i[s],a=e[n];if(a){const o=r[n],h=o===void 0||a(o,n,r);if(h!==!0)throw new ie("option "+n+" must be "+h,ie.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ie("Unknown option "+n,ie.ERR_BAD_OPTION)}}const zs={assertOptions:Xp,validators:gn},Ct=zs.validators;class Wr{constructor(e){this.defaults=e,this.interceptors={request:new pa,response:new pa}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=fi(this.defaults,t);const{transitional:i,paramsSerializer:s,headers:n}=t;i!==void 0&&zs.assertOptions(i,{silentJSONParsing:Ct.transitional(Ct.boolean),forcedJSONParsing:Ct.transitional(Ct.boolean),clarifyTimeoutError:Ct.transitional(Ct.boolean)},!1),s!==void 0&&zs.assertOptions(s,{encode:Ct.function,serialize:Ct.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a;a=n&&S.merge(n.common,n[t.method]),a&&S.forEach(["delete","get","head","post","put","patch","common"],f=>{delete n[f]}),t.headers=pt.concat(a,n);const o=[];let h=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(h=h&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let d,u=0,c;if(!h){const f=[va.bind(this),void 0];for(f.unshift.apply(f,o),f.push.apply(f,l),c=f.length,d=Promise.resolve(t);u<c;)d=d.then(f[u++],f[u++]);return d}c=o.length;let p=t;for(u=0;u<c;){const f=o[u++],m=o[u++];try{p=f(p)}catch(v){m.call(this,v);break}}try{d=va.call(this,p)}catch(f){return Promise.reject(f)}for(u=0,c=l.length;u<c;)d=d.then(l[u++],l[u++]);return d}getUri(e){e=fi(this.defaults,e);const t=El(e.baseURL,e.url);return wl(t,e.params,e.paramsSerializer)}}S.forEach(["delete","get","head","options"],function(e){Wr.prototype[e]=function(t,i){return this.request(fi(i||{},{method:e,url:t,data:(i||{}).data}))}});S.forEach(["post","put","patch"],function(e){function t(i){return function(n,a,o){return this.request(fi(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:n,data:a}))}}Wr.prototype[e]=t(),Wr.prototype[e+"Form"]=t(!0)});const kr=Wr;class vn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(n){t=n});const i=this;this.promise.then(s=>{if(!i._listeners)return;let n=i._listeners.length;for(;n-- >0;)i._listeners[n](s);i._listeners=null}),this.promise.then=s=>{let n;const a=new Promise(o=>{i.subscribe(o),n=o}).then(s);return a.cancel=function(){i.unsubscribe(n)},a},e(function(n,a,o){i.reason||(i.reason=new ir(n,a,o),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new vn(function(s){e=s}),cancel:e}}}const qp=vn;function Yp(r){return function(t){return r.apply(null,t)}}function Kp(r){return S.isObject(r)&&r.isAxiosError===!0}const Ws={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ws).forEach(([r,e])=>{Ws[e]=r});const Jp=Ws;function xl(r){const e=new kr(r),t=ll(kr.prototype.request,e);return S.extend(t,kr.prototype,e,{allOwnKeys:!0}),S.extend(t,e,null,{allOwnKeys:!0}),t.create=function(s){return xl(fi(r,s))},t}const Te=xl(mn);Te.Axios=kr;Te.CanceledError=ir;Te.CancelToken=qp;Te.isCancel=Cl;Te.VERSION=kl;Te.toFormData=ts;Te.AxiosError=ie;Te.Cancel=Te.CanceledError;Te.all=function(e){return Promise.all(e)};Te.spread=Yp;Te.isAxiosError=Kp;Te.mergeConfig=fi;Te.AxiosHeaders=pt;Te.formToJSON=r=>Tl(S.isHTMLForm(r)?new FormData(r):r);Te.HttpStatusCode=Jp;Te.default=Te;const _a=Te;function Qp(r,e){return e!=null?_a.get(r,e):_a.get(r)}function He(r,e){this.message=r,this.error=e}He.prototype=Object.create(Error.prototype);const yn=/([0-9]+)?:?([0-9]{2}):([0-9]{2}\.[0-9]{2,3})/;function em(r,e){e||(e={});const{meta:t=!1,strict:i=!0}=e;if(typeof r!="string")throw new He("Input must be a string");r=r.trim(),r=r.replace(/\r\n/g,`
|
|
13
13
|
`),r=r.replace(/\r/g,`
|