(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-18a125af"],{"172d":function(t,e,r){(function(t){var n;(function(t,u,i){function o(t){var e=this;function r(t,e){var r,n,u,i,o,a=[],s=128;for(e===(0|e)?(n=e,e=null):(e+="\0",n=0,s=Math.max(s,e.length)),u=0,i=-32;i>>15,n^=n<<4,n^=n>>>13,i>=0&&(o=o+1640531527|0,r=a[127&i]^=n+o,u=0==r?u+1:0);for(u>=128&&(a[127&(e&&e.length||0)]=-1),u=127,i=512;i>0;--i)n=a[u+34&127],r=a[u=u+1&127],n^=n<<13,r^=r<<17,n^=n>>>15,r^=r>>>12,a[u]=n^r;t.w=o,t.X=a,t.i=u}e.next=function(){var t,r,n=e.w,u=e.X,i=e.i;return e.w=n=n+1640531527|0,r=u[i+34&127],t=u[i=i+1&127],r^=r<<13,t^=t<<17,r^=r>>>15,t^=t>>>12,r=u[i]=r^t,e.i=i,r+(n^n>>>16)|0},r(e,t)}function a(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function s(t,e){null==t&&(t=+new Date);var r=new o(t),n=e&&e.state,u=function(){return(r.next()>>>0)/4294967296};return u.double=function(){do{var t=r.next()>>>11,e=(r.next()>>>0)/4294967296,n=(t+e)/(1<<21)}while(0===n);return n},u.int32=r.next,u.quick=u,n&&(n.X&&a(n,r),u.state=function(){return a(r,{})}),u}u&&u.exports?u.exports=s:r("46b8")&&r("f3fa")?(n=function(){return s}.call(e,r,e,u),void 0===n||(u.exports=n)):this.xor4096=s})(0,t,r("46b8"))}).call(this,r("adb6")(t))},2:function(t,e){},"239f":function(t,e,r){r("f42a"),r("955f"),r("304d"),r("f257"),r("89a8"),r("8fec"),r("51b3");var n=r("3d37")["default"];function u(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var u=r.call(t,e||"default");if("object"!==n(u))return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}t.exports=u,t.exports.__esModule=!0,t.exports["default"]=t.exports},2478:function(t,e,r){var n=r("a77a");n("iterator")},"270f":function(t,e,r){var n=r("9ad2"),u=r("d9c5");t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",u(1,7)),7!==t.stack)}))},"361a":function(t,e,r){var n=r("545d"),u=r("69d9"),i=r("60a2"),o=r("7e6e"),a=r("172d"),s=r("e4de"),c=r("a0e4");c.alea=n,c.xor128=u,c.xorwow=i,c.xorshift7=o,c.xor4096=a,c.tychei=s,t.exports=c},"3b5d":function(t,e,r){var n=r("ce5b"),u=n("".replace),i=function(t){return String(Error(t).stack)}("zxcasd"),o=/\n\s*at [^:]*:[^\n]*/,a=o.test(i);t.exports=function(t,e){if(a&&"string"==typeof t)while(e--)t=u(t,o,"");return t}},"3d37":function(t,e,r){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports["default"]=t.exports,n(e)}r("304d"),r("f257"),r("89a8"),r("2478"),r("b110"),r("fe35"),t.exports=n,t.exports.__esModule=!0,t.exports["default"]=t.exports},"3edb":function(t,e,r){(function(e,r){t.exports=r()})(0,(function(){"use strict";function t(t,r){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=e(t))||r&&t&&"number"===typeof t.length){n&&(t=n);var u=0,i=function(){};return{s:i,n:function(){return u>=t.length?{done:!0}:{done:!1,value:t[u++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function e(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:"any",n=e?D(e).index:c.length,u=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:",";return t.map((function(t){return t.name})).join(e)}function C(t){var e=0===t.indexOf("..."),r=e?t.length>3?t.slice(3):"any":t,n=r.split("|").map((function(t){return D(t.trim())})),u=!1,i=e?"...":"",o=n.map((function(t){return u=t.isAny||u,i+=t.name+"|",{name:t.name,typeIndex:t.index,test:t.test,isAny:t.isAny,conversion:null,conversionIndex:-1}}));return{types:o,name:i.slice(0,-1),hasAny:u,hasConversion:!1,restParam:e}}function x(t){var e=t.types.map((function(t){return t.name})),r=R(e),n=t.hasAny,u=t.name,i=r.map((function(t){var e=D(t.from);return n=e.isAny||n,u+="|"+t.from,{name:t.from,typeIndex:e.index,test:e.test,isAny:e.isAny,conversion:t,conversionIndex:t.index}}));return{types:t.types.concat(i),name:u,hasAny:n,hasConversion:i.length>0,restParam:t.restParam}}function b(t){return t.typeSet||(t.typeSet=new Set,t.types.forEach((function(e){return t.typeSet.add(e.name)}))),t.typeSet}function B(t){var e=[];if("string"!==typeof t)throw new TypeError("Signatures must be strings");var r=t.trim();if(""===r)return e;for(var n=r.split(","),u=0;u=u+1}}return 0===t.length?function(t){return 0===t.length}:1===t.length?(r=_(t[0]),function(t){return r(t[0])&&1===t.length}):2===t.length?(r=_(t[0]),n=_(t[1]),function(t){return r(t[0])&&n(t[1])&&2===t.length}):(e=t.map(_),function(t){for(var r=0;r0){var r=g(e[o]);return u=new TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+r.join(" | ")+", index: "+o+")"),u.data={category:"wrongType",fn:a,index:o,actual:r,expected:i},{v:u}}}else s=t};for(o=0;ol)return u=new TypeError("Too many arguments in function "+a+" (expected: "+l+", actual: "+e.length+")"),u.data={category:"tooManyArgs",fn:a,index:e.length,expectedLength:l},u;for(var p=[],D=0;D0)return 1;var n=j(t)-j(e);return n<0?-1:n>0?1:0}function q(e,r){var n=e.params,u=r.params,i=G(n),o=G(u),a=M(n),s=M(u);if(a&&i.hasAny){if(!s||!o.hasAny)return 1}else if(s&&o.hasAny)return-1;var c,f,h=0,l=0,p=t(n);try{for(p.s();!(f=p.n()).done;)c=f.value,c.hasAny&&++h,c.hasConversion&&++l}catch(b){p.e(b)}finally{p.f()}var D,d=0,m=0,v=t(u);try{for(v.s();!(D=v.n()).done;)c=D.value,c.hasAny&&++d,c.hasConversion&&++m}catch(b){v.e(b)}finally{v.f()}if(h!==d)return h-d;if(a&&i.hasConversion){if(!s||!o.hasConversion)return 1}else if(s&&o.hasConversion)return-1;if(l!==m)return l-m;if(a){if(!s)return 1}else if(s)return-1;var g=(n.length-u.length)*(a?-1:1);if(0!==g)return g;for(var y,w=[],E=0,F=0;F1&&r.sort((function(t,e){return t.index-e.index}));var n=r[0].conversionsTo;if(1===e.length)return n;n=n.concat([]);for(var u=new Set(e),i=1;i=h:D?h>=l:h===l}function H(t){return t.map((function(t){return ot(t)?ut(t.referToSelf.callback):it(t)?nt(t.referTo.references,t.referTo.callback):t}))}function V(e,r,n){var u,i,o=[],a=t(e);try{for(a.s();!(i=a.n()).done;){u=i.value;var s=n[u];if("number"!==typeof s)throw new TypeError('No definition for referenced signature "'+u+'"');if(s=r[s],"function"!==typeof s)return!1;o.push(s)}}catch(c){a.e(c)}finally{a.f()}return o}function J(t,e,r){var n=H(t),u=new Array(n.length).fill(!1),i=!0;while(i){i=!1;for(var o=!0,a=0;am)return 1}for(var v=0,g=Math.max(p.length,D.length);vu)return 1}return 0}},"545d":function(t,e,r){(function(t){var n;(function(t,u,i){function o(t){var e=this,r=c();e.next=function(){var t=2091639*e.s0+2.3283064365386963e-10*e.c;return e.s0=e.s1,e.s1=e.s2,e.s2=t-(e.c=0|t)},e.c=1,e.s0=r(" "),e.s1=r(" "),e.s2=r(" "),e.s0-=r(t),e.s0<0&&(e.s0+=1),e.s1-=r(t),e.s1<0&&(e.s1+=1),e.s2-=r(t),e.s2<0&&(e.s2+=1),r=null}function a(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function s(t,e){var r=new o(t),n=e&&e.state,u=r.next;return u.int32=function(){return 4294967296*r.next()|0},u.double=function(){return u()+11102230246251565e-32*(2097152*u()|0)},u.quick=u,n&&("object"==typeof n&&a(n,r),u.state=function(){return a(r,{})}),u}function c(){var t=4022871197,e=function(e){e=String(e);for(var r=0;r>>0,n-=t,n*=t,t=n>>>0,n-=t,t+=4294967296*n}return 2.3283064365386963e-10*(t>>>0)};return e}u&&u.exports?u.exports=s:r("46b8")&&r("f3fa")?(n=function(){return s}.call(e,r,e,u),void 0===n||(u.exports=n)):this.alea=s})(0,t,r("46b8"))}).call(this,r("adb6")(t))},"60a2":function(t,e,r){(function(t){var n;(function(t,u,i){function o(t){var e=this,r="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:r+=t;for(var n=0;n>>4),e.next()}function a(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function s(t,e){var r=new o(t),n=e&&e.state,u=function(){return(r.next()>>>0)/4294967296};return u.double=function(){do{var t=r.next()>>>11,e=(r.next()>>>0)/4294967296,n=(t+e)/(1<<21)}while(0===n);return n},u.int32=r.next,u.quick=u,n&&("object"==typeof n&&a(n,r),u.state=function(){return a(r,{})}),u}u&&u.exports?u.exports=s:r("46b8")&&r("f3fa")?(n=function(){return s}.call(e,r,e,u),void 0===n||(u.exports=n)):this.xorwow=s})(0,t,r("46b8"))}).call(this,r("adb6")(t))},"69d9":function(t,e,r){(function(t){var n;(function(t,u,i){function o(t){var e=this,r="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:r+=t;for(var n=0;n>>0)/4294967296};return u.double=function(){do{var t=r.next()>>>11,e=(r.next()>>>0)/4294967296,n=(t+e)/(1<<21)}while(0===n);return n},u.int32=r.next,u.quick=u,n&&("object"==typeof n&&a(n,r),u.state=function(){return a(r,{})}),u}u&&u.exports?u.exports=s:r("46b8")&&r("f3fa")?(n=function(){return s}.call(e,r,e,u),void 0===n||(u.exports=n)):this.xor128=s})(0,t,r("46b8"))}).call(this,r("adb6")(t))},7369:function(t,e,r){"use strict";var n=r("da77"),u=r("6c75"),i=r("ee7c"),o=r("a7b6"),a=r("17b3"),s=r("28f5"),c=r("55f9"),f=r("890f"),h=r("c4a1"),l=r("3b5d"),p=r("270f"),D=r("9f52");t.exports=function(t,e,r,d){var m=d?2:1,v=t.split("."),g=v[v.length-1],y=n.apply(null,v);if(y){var w=y.prototype;if(!D&&u(w,"cause")&&delete w.cause,!r)return y;var E=n("Error"),F=e((function(t,e){var r=f(d?e:t,void 0),n=d?new y(t):new y;return void 0!==r&&i(n,"message",r),p&&i(n,"stack",l(n.stack,2)),this&&o(w,this)&&c(n,this,F),arguments.length>m&&h(n,arguments[m]),n}));if(F.prototype=w,"Error"!==g&&(a?a(F,E):s(F,E,{name:!0})),s(F,y),!D)try{w.name!==g&&i(w,"name",g),w.constructor=F}catch(A){}return F}}},"79e3":function(t,e,r){var n=r("cab1");function u(t,e,r){return e=n(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.exports=u,t.exports.__esModule=!0,t.exports["default"]=t.exports},"7e6e":function(t,e,r){(function(t){var n;(function(t,u,i){function o(t){var e=this;function r(t,e){var r,n=[];if(e===(0|e))n[0]=e;else for(e=""+e,r=0;r0;--r)t.next()}e.next=function(){var t,r,n=e.x,u=e.i;return t=n[u],t^=t>>>7,r=t^t<<24,t=n[u+1&7],r^=t^t>>>10,t=n[u+3&7],r^=t^t>>>3,t=n[u+4&7],r^=t^t<<7,t=n[u+7&7],t^=t<<13,r^=t^t<<9,n[u]=r,e.i=u+1&7,r},r(e,t)}function a(t,e){return e.x=t.x.slice(),e.i=t.i,e}function s(t,e){null==t&&(t=+new Date);var r=new o(t),n=e&&e.state,u=function(){return(r.next()>>>0)/4294967296};return u.double=function(){do{var t=r.next()>>>11,e=(r.next()>>>0)/4294967296,n=(t+e)/(1<<21)}while(0===n);return n},u.int32=r.next,u.quick=u,n&&(n.x&&a(n,r),u.state=function(){return a(r,{})}),u}u&&u.exports?u.exports=s:r("46b8")&&r("f3fa")?(n=function(){return s}.call(e,r,e,u),void 0===n||(u.exports=n)):this.xorshift7=s})(0,t,r("46b8"))}).call(this,r("adb6")(t))},"890f":function(t,e,r){var n=r("3ffc");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},"8fec":function(t,e,r){var n=r("88d4"),u=r("8735"),i=r("e7c5"),o=r("7369"),a="WebAssembly",s=u[a],c=7!==Error("e",{cause:7}).cause,f=function(t,e){var r={};r[t]=o(t,e,c),n({global:!0,forced:c},r)},h=function(t,e){if(s&&s[t]){var r={};r[t]=o(a+"."+t,e,c),n({target:a,stat:!0,forced:c},r)}};f("Error",(function(t){return function(e){return i(t,this,arguments)}})),f("EvalError",(function(t){return function(e){return i(t,this,arguments)}})),f("RangeError",(function(t){return function(e){return i(t,this,arguments)}})),f("ReferenceError",(function(t){return function(e){return i(t,this,arguments)}})),f("SyntaxError",(function(t){return function(e){return i(t,this,arguments)}})),f("TypeError",(function(t){return function(e){return i(t,this,arguments)}})),f("URIError",(function(t){return function(e){return i(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return i(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return i(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return i(t,this,arguments)}}))},"955f":function(t,e,r){var n=r("6c75"),u=r("ef11"),i=r("d984"),o=r("d0ff"),a=o("toPrimitive"),s=Date.prototype;n(s,a)||u(s,a,i)},"988e":function(t,e,r){"use strict";r("d678")},"9a8e":function(t,e,r){var n;(function(u){"use strict"; /*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. * https://github.com/MikeMcl/decimal.js * Copyright (c) 2022 Michael Mclaughlin * MIT Licence */var i,o,a,s=9e15,c=1e9,f="0123456789abcdef",h="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",p={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-s,maxE:s,crypto:!1},D=!0,d="[DecimalError] ",m=d+"Invalid argument: ",v=d+"Precision limit exceeded",g=d+"crypto unavailable",y="[object Decimal]",w=Math.floor,E=Math.pow,F=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,A=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,C=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,x=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,b=1e7,B=7,M=9007199254740991,_=h.length-1,N=l.length-1,T={toStringTag:y};function S(t){var e,r,n,u=t.length-1,i="",o=t[0];if(u>0){for(i+=o,e=1;er)throw Error(m+t)}function I(t,e,r,n){var u,i,o,a;for(i=t[0];i>=10;i/=10)--e;return--e<0?(e+=B,u=0):(u=Math.ceil((e+1)/B),e%=B),i=E(10,B-e),a=t[u]%i|0,null==n?e<3?(0==e?a=a/100|0:1==e&&(a=a/10|0),o=r<4&&99999==a||r>3&&49999==a||5e4==a||0==a):o=(r<4&&a+1==i||r>3&&a+1==i/2)&&(t[u+1]/i/100|0)==E(10,e-2)-1||(a==i/2||0==a)&&0==(t[u+1]/i/100|0):e<4?(0==e?a=a/1e3|0:1==e?a=a/100|0:2==e&&(a=a/10|0),o=(n||r<4)&&9999==a||!n&&r>3&&4999==a):o=((n||r<4)&&a+1==i||!n&&r>3&&a+1==i/2)&&(t[u+1]/i/1e3|0)==E(10,e-3)-1,o}function O(t,e,r){for(var n,u,i=[0],o=0,a=t.length;or-1&&(void 0===i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function k(t,e){var r,n,u;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),u=(1/et(4,r)).toString()):(r=16,u="2.3283064365386962890625e-10"),t.precision+=r,e=tt(t,1,e.times(u),new t(1));for(var i=r;i--;){var o=e.times(e);e=o.times(o).minus(o).times(8).plus(1)}return t.precision-=r,e}T.absoluteValue=T.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),P(t)},T.ceil=function(){return P(new this.constructor(this),this.e+1,2)},T.clampedTo=T.clamp=function(t,e){var r,n=this,u=n.constructor;if(t=new u(t),e=new u(e),!t.s||!e.s)return new u(NaN);if(t.gt(e))throw Error(m+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new u(n)},T.comparedTo=T.cmp=function(t){var e,r,n,u,i=this,o=i.d,a=(t=new i.constructor(t)).d,s=i.s,c=t.s;if(!o||!a)return s&&c?s!==c?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-c:0;if(s!==c)return s;if(i.e!==t.e)return i.e>t.e^s<0?1:-1;for(n=o.length,u=a.length,e=0,r=na[e]^s<0?1:-1;return n===u?0:n>u^s<0?1:-1},T.cosine=T.cos=function(){var t,e,r=this,n=r.constructor;return r.d?r.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+B,n.rounding=1,r=k(n,rt(n,r)),n.precision=t,n.rounding=e,P(2==a||3==a?r.neg():r,t,e,!0)):new n(1):new n(NaN)},T.cubeRoot=T.cbrt=function(){var t,e,r,n,u,i,o,a,s,c,f=this,h=f.constructor;if(!f.isFinite()||f.isZero())return new h(f);for(D=!1,i=f.s*E(f.s*f,1/3),i&&Math.abs(i)!=1/0?n=new h(i.toString()):(r=S(f.d),t=f.e,(i=(t-r.length+1)%3)&&(r+=1==i||-2==i?"0":"00"),i=E(r,1/3),t=w((t+1)/3)-(t%3==(t<0?-1:2)),i==1/0?r="5e"+t:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new h(r),n.s=f.s),o=(t=h.precision)+3;;)if(a=n,s=a.times(a).times(a),c=s.plus(f),n=j(c.plus(f).times(a),c.plus(s),o+2,1),S(a.d).slice(0,o)===(r=S(n.d)).slice(0,o)){if(r=r.slice(o-3,o+1),"9999"!=r&&(u||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(P(n,t+1,1),e=!n.times(n).times(n).eq(f));break}if(!u&&(P(a,t+1,0),a.times(a).times(a).eq(f))){n=a;break}o+=4,u=1}return D=!0,P(n,t,h.rounding,e)},T.decimalPlaces=T.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-w(this.e/B))*B,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r},T.dividedBy=T.div=function(t){return j(this,new this.constructor(t))},T.dividedToIntegerBy=T.divToInt=function(t){var e=this,r=e.constructor;return P(j(e,new r(t),0,1,1),r.precision,r.rounding)},T.equals=T.eq=function(t){return 0===this.cmp(t)},T.floor=function(){return P(new this.constructor(this),this.e+1,3)},T.greaterThan=T.gt=function(t){return this.cmp(t)>0},T.greaterThanOrEqualTo=T.gte=function(t){var e=this.cmp(t);return 1==e||0===e},T.hyperbolicCosine=T.cosh=function(){var t,e,r,n,u,i=this,o=i.constructor,a=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return a;r=o.precision,n=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,u=i.d.length,u<32?(t=Math.ceil(u/3),e=(1/et(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),i=tt(o,1,i.times(e),new o(1),!0);for(var s,c=t,f=new o(8);c--;)s=i.times(i),i=a.minus(s.times(f.minus(s.times(f))));return P(i,o.precision=r,o.rounding=n,!0)},T.hyperbolicSine=T.sinh=function(){var t,e,r,n,u=this,i=u.constructor;if(!u.isFinite()||u.isZero())return new i(u);if(e=i.precision,r=i.rounding,i.precision=e+Math.max(u.e,u.sd())+4,i.rounding=1,n=u.d.length,n<3)u=tt(i,2,u,u,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:0|t,u=u.times(1/et(5,t)),u=tt(i,2,u,u,!0);for(var o,a=new i(5),s=new i(16),c=new i(20);t--;)o=u.times(u),u=u.times(a.plus(o.times(s.times(o).plus(c))))}return i.precision=e,i.rounding=r,P(u,e,r,!0)},T.hyperbolicTangent=T.tanh=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+7,n.rounding=1,j(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)},T.inverseCosine=T.acos=function(){var t,e=this,r=e.constructor,n=e.abs().cmp(1),u=r.precision,i=r.rounding;return-1!==n?0===n?e.isNeg()?U(r,u,i):new r(0):new r(NaN):e.isZero()?U(r,u+4,i).times(.5):(r.precision=u+6,r.rounding=1,e=e.asin(),t=U(r,u+4,i).times(.5),r.precision=u,r.rounding=i,t.minus(e))},T.inverseHyperbolicCosine=T.acosh=function(){var t,e,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,D=!1,r=r.times(r).minus(1).sqrt().plus(r),D=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)},T.inverseHyperbolicSine=T.asinh=function(){var t,e,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,D=!1,r=r.times(r).plus(1).sqrt().plus(r),D=!0,n.precision=t,n.rounding=e,r.ln())},T.inverseHyperbolicTangent=T.atanh=function(){var t,e,r,n,u=this,i=u.constructor;return u.isFinite()?u.e>=0?new i(u.abs().eq(1)?u.s/0:u.isZero()?u:NaN):(t=i.precision,e=i.rounding,n=u.sd(),Math.max(n,t)<2*-u.e-1?P(new i(u),t,e,!0):(i.precision=r=n-u.e,u=j(u.plus(1),new i(1).minus(u),r+t,1),i.precision=t+4,i.rounding=1,u=u.ln(),i.precision=t,i.rounding=e,u.times(.5))):new i(NaN)},T.inverseSine=T.asin=function(){var t,e,r,n,u=this,i=u.constructor;return u.isZero()?new i(u):(e=u.abs().cmp(1),r=i.precision,n=i.rounding,-1!==e?0===e?(t=U(i,r+4,n).times(.5),t.s=u.s,t):new i(NaN):(i.precision=r+6,i.rounding=1,u=u.div(new i(1).minus(u.times(u)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,u.times(2)))},T.inverseTangent=T.atan=function(){var t,e,r,n,u,i,o,a,s,c=this,f=c.constructor,h=f.precision,l=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&h+4<=N)return o=U(f,h+4,l).times(.25),o.s=c.s,o}else{if(!c.s)return new f(NaN);if(h+4<=N)return o=U(f,h+4,l).times(.5),o.s=c.s,o}for(f.precision=a=h+10,f.rounding=1,r=Math.min(28,a/B+2|0),t=r;t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(D=!1,e=Math.ceil(a/B),n=1,s=c.times(c),o=new f(c),u=c;-1!==t;)if(u=u.times(s),i=o.minus(u.div(n+=2)),u=u.times(s),o=i.plus(u.div(n+=2)),void 0!==o.d[e])for(t=e;o.d[t]===i.d[t]&&t--;);return r&&(o=o.times(2<this.d.length-2},T.isNaN=function(){return!this.s},T.isNegative=T.isNeg=function(){return this.s<0},T.isPositive=T.isPos=function(){return this.s>0},T.isZero=function(){return!!this.d&&0===this.d[0]},T.lessThan=T.lt=function(t){return this.cmp(t)<0},T.lessThanOrEqualTo=T.lte=function(t){return this.cmp(t)<1},T.logarithm=T.log=function(t){var e,r,n,u,i,o,a,s,c=this,f=c.constructor,h=f.precision,l=f.rounding,p=5;if(null==t)t=new f(10),e=!0;else{if(t=new f(t),r=t.d,t.s<0||!r||!r[0]||t.eq(1))return new f(NaN);e=t.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new f(r&&!r[0]?-1/0:1!=c.s?NaN:r?0:1/0);if(e)if(r.length>1)i=!0;else{for(u=r[0];u%10===0;)u/=10;i=1!==u}if(D=!1,a=h+p,o=Q(c,a),n=e?$(f,a+10):Q(t,a),s=j(o,n,a,1),I(s.d,u=h,l))do{if(a+=10,o=Q(c,a),n=e?$(f,a+10):Q(t,a),s=j(o,n,a,1),!i){+S(s.d).slice(u+1,u+15)+1==1e14&&(s=P(s,h+1,0));break}}while(I(s.d,u+=10,l));return D=!0,P(s,h,l)},T.minus=T.sub=function(t){var e,r,n,u,i,o,a,s,c,f,h,l,p=this,d=p.constructor;if(t=new d(t),!p.d||!t.d)return p.s&&t.s?p.d?t.s=-t.s:t=new d(t.d||p.s!==t.s?p:NaN):t=new d(NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(c=p.d,l=t.d,a=d.precision,s=d.rounding,!c[0]||!l[0]){if(l[0])t.s=-t.s;else{if(!c[0])return new d(3===s?-0:0);t=new d(p)}return D?P(t,a,s):t}if(r=w(t.e/B),f=w(p.e/B),c=c.slice(),i=f-r,i){for(h=i<0,h?(e=c,i=-i,o=l.length):(e=l,r=f,o=c.length),n=Math.max(Math.ceil(a/B),o)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=c.length,o=l.length,h=n0;--n)c[o++]=0;for(n=l.length;n>i;){if(c[--n]o?i+1:o+1,u>o&&(u=o,r.length=1),r.reverse();u--;)r.push(0);r.reverse()}for(o=c.length,u=f.length,o-u<0&&(u=o,r=f,f=c,c=r),e=0;u;)e=(c[--u]=c[u]+f[u]+e)/b|0,c[u]%=b;for(e&&(c.unshift(e),++n),o=c.length;0==c[--o];)c.pop();return t.d=c,t.e=R(c,n),D?P(t,a,s):t},T.precision=T.sd=function(t){var e,r=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(m+t);return r.d?(e=L(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e},T.round=function(){var t=this,e=t.constructor;return P(new e(t),t.e+1,e.rounding)},T.sine=T.sin=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+B,n.rounding=1,r=K(n,rt(n,r)),n.precision=t,n.rounding=e,P(a>2?r.neg():r,t,e,!0)):new n(NaN)},T.squareRoot=T.sqrt=function(){var t,e,r,n,u,i,o=this,a=o.d,s=o.e,c=o.s,f=o.constructor;if(1!==c||!a||!a[0])return new f(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);for(D=!1,c=Math.sqrt(+o),0==c||c==1/0?(e=S(a),(e.length+s)%2==0&&(e+="0"),c=Math.sqrt(e),s=w((s+1)/2)-(s<0||s%2),c==1/0?e="5e"+s:(e=c.toExponential(),e=e.slice(0,e.indexOf("e")+1)+s),n=new f(e)):n=new f(c.toString()),r=(s=f.precision)+3;;)if(i=n,n=i.plus(j(o,i,r+2,1)).times(.5),S(i.d).slice(0,r)===(e=S(n.d)).slice(0,r)){if(e=e.slice(r-3,r+1),"9999"!=e&&(u||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(P(n,s+1,1),t=!n.times(n).eq(o));break}if(!u&&(P(i,s+1,0),i.times(i).eq(o))){n=i;break}r+=4,u=1}return D=!0,P(n,s,f.rounding,t)},T.tangent=T.tan=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,r=r.sin(),r.s=1,r=j(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,P(2==a||4==a?r.neg():r,t,e,!0)):new n(NaN)},T.times=T.mul=function(t){var e,r,n,u,i,o,a,s,c,f=this,h=f.constructor,l=f.d,p=(t=new h(t)).d;if(t.s*=f.s,!l||!l[0]||!p||!p[0])return new h(!t.s||l&&!l[0]&&!p||p&&!p[0]&&!l?NaN:l&&p?0*t.s:t.s/0);for(r=w(f.e/B)+w(t.e/B),s=l.length,c=p.length,s=0;){for(e=0,u=s+n;u>n;)a=i[u]+p[n]*l[u-n-1]+e,i[u--]=a%b|0,e=a/b|0;i[u]=(i[u]+e)%b|0}for(;!i[--o];)i.pop();return e?++r:i.shift(),t.d=i,t.e=R(i,r),D?P(t,h.precision,h.rounding):t},T.toBinary=function(t,e){return nt(this,2,t,e)},T.toDecimalPlaces=T.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),void 0===t?r:(z(t,0,c),void 0===e?e=n.rounding:z(e,0,8),P(r,t+r.e+1,e))},T.toExponential=function(t,e){var r,n=this,u=n.constructor;return void 0===t?r=q(n,!0):(z(t,0,c),void 0===e?e=u.rounding:z(e,0,8),n=P(new u(n),t+1,e),r=q(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r},T.toFixed=function(t,e){var r,n,u=this,i=u.constructor;return void 0===t?r=q(u):(z(t,0,c),void 0===e?e=i.rounding:z(e,0,8),n=P(new i(u),t+u.e+1,e),r=q(n,!1,t+n.e+1)),u.isNeg()&&!u.isZero()?"-"+r:r},T.toFraction=function(t){var e,r,n,u,i,o,a,s,c,f,h,l,p=this,d=p.d,v=p.constructor;if(!d)return new v(p);if(c=r=new v(1),n=s=new v(0),e=new v(n),i=e.e=L(d)-p.e-1,o=i%B,e.d[0]=E(10,o<0?B+o:o),null==t)t=i>0?e:c;else{if(a=new v(t),!a.isInt()||a.lt(c))throw Error(m+a);t=a.gt(e)?i>0?e:c:a}for(D=!1,a=new v(S(d)),f=v.precision,v.precision=i=d.length*B*2;;){if(h=j(a,e,0,1,1),u=r.plus(h.times(n)),1==u.cmp(t))break;r=n,n=u,u=c,c=s.plus(h.times(u)),s=u,u=e,e=a.minus(h.times(u)),a=u}return u=j(t.minus(r),n,0,1,1),s=s.plus(u.times(c)),r=r.plus(u.times(n)),s.s=c.s=p.s,l=j(c,n,i,1).minus(p).abs().cmp(j(s,r,i,1).minus(p).abs())<1?[c,n]:[s,r],v.precision=f,D=!0,l},T.toHexadecimal=T.toHex=function(t,e){return nt(this,16,t,e)},T.toNearest=function(t,e){var r=this,n=r.constructor;if(r=new n(r),null==t){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),void 0===e?e=n.rounding:z(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(D=!1,r=j(r,t,0,e,1).times(t),D=!0,P(r)):(t.s=r.s,r=t),r},T.toNumber=function(){return+this},T.toOctal=function(t,e){return nt(this,8,t,e)},T.toPower=T.pow=function(t){var e,r,n,u,i,o,a=this,s=a.constructor,c=+(t=new s(t));if(!a.d||!t.d||!a.d[0]||!t.d[0])return new s(E(+a,c));if(a=new s(a),a.eq(1))return a;if(n=s.precision,i=s.rounding,t.eq(1))return P(a,n,i);if(e=w(t.e/B),e>=t.d.length-1&&(r=c<0?-c:c)<=M)return u=H(s,a,r,n),t.s<0?new s(1).div(u):P(u,n,i);if(o=a.s,o<0){if(es.maxE+1||e0?o/0:0):(D=!1,s.rounding=a.s=1,r=Math.min(12,(e+"").length),u=Y(t.times(Q(a,n+r)),n),u.d&&(u=P(u,n+5,1),I(u.d,n,i)&&(e=n+10,u=P(Y(t.times(Q(a,e+r)),e),e+5,1),+S(u.d).slice(n+1,n+15)+1==1e14&&(u=P(u,n+1,0)))),u.s=o,D=!0,s.rounding=i,P(u,n,i))},T.toPrecision=function(t,e){var r,n=this,u=n.constructor;return void 0===t?r=q(n,n.e<=u.toExpNeg||n.e>=u.toExpPos):(z(t,1,c),void 0===e?e=u.rounding:z(e,0,8),n=P(new u(n),t,e),r=q(n,t<=n.e||n.e<=u.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r},T.toSignificantDigits=T.toSD=function(t,e){var r=this,n=r.constructor;return void 0===t?(t=n.precision,e=n.rounding):(z(t,1,c),void 0===e?e=n.rounding:z(e,0,8)),P(new n(r),t,e)},T.toString=function(){var t=this,e=t.constructor,r=q(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r},T.truncated=T.trunc=function(){return P(new this.constructor(this),this.e+1,1)},T.valueOf=T.toJSON=function(){var t=this,e=t.constructor,r=q(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};var j=function(){function t(t,e,r){var n,u=0,i=t.length;for(t=t.slice();i--;)n=t[i]*e+u,t[i]=n%r|0,u=n/r|0;return u&&t.unshift(u),t}function e(t,e,r,n){var u,i;if(r!=n)i=r>n?1:-1;else for(u=i=0;ue[u]?1:-1;break}return i}function r(t,e,r,n){for(var u=0;r--;)t[r]-=u,u=t[r]1;)t.shift()}return function(n,u,i,a,s,c){var f,h,l,p,D,d,m,v,g,y,E,F,A,C,x,M,_,N,T,S,z=n.constructor,I=n.s==u.s?1:-1,O=n.d,k=u.d;if(!O||!O[0]||!k||!k[0])return new z(n.s&&u.s&&(O?!k||O[0]!=k[0]:k)?O&&0==O[0]||!k?0*I:I/0:NaN);for(c?(D=1,h=n.e-u.e):(c=b,D=B,h=w(n.e/D)-w(u.e/D)),T=k.length,_=O.length,g=new z(I),y=g.d=[],l=0;k[l]==(O[l]||0);l++);if(k[l]>(O[l]||0)&&h--,null==i?(C=i=z.precision,a=z.rounding):C=s?i+(n.e-u.e)+1:i,C<0)y.push(1),d=!0;else{if(C=C/D+2|0,l=0,1==T){for(p=0,k=k[0],C++;(l<_||p)&&C--;l++)x=p*c+(O[l]||0),y[l]=x/k|0,p=x%k|0;d=p||l<_}else{for(p=c/(k[0]+1)|0,p>1&&(k=t(k,p,c),O=t(O,p,c),T=k.length,_=O.length),M=T,E=O.slice(0,T),F=E.length;F=c/2&&++N;do{p=0,f=e(k,E,T,F),f<0?(A=E[0],T!=F&&(A=A*c+(E[1]||0)),p=A/N|0,p>1?(p>=c&&(p=c-1),m=t(k,p,c),v=m.length,F=E.length,f=e(m,E,v,F),1==f&&(p--,r(m,T=10;p/=10)l++;g.e=l+h*D-1,P(g,s?i+g.e+1:i,a,d)}return g}}();function P(t,e,r,n){var u,i,o,a,s,c,f,h,l,p=t.constructor;t:if(null!=e){if(h=t.d,!h)return t;for(u=1,a=h[0];a>=10;a/=10)u++;if(i=e-u,i<0)i+=B,o=e,f=h[l=0],s=f/E(10,u-o-1)%10|0;else if(l=Math.ceil((i+1)/B),a=h.length,l>=a){if(!n)break t;for(;a++<=l;)h.push(0);f=s=0,u=1,i%=B,o=i-B+1}else{for(f=a=h[l],u=1;a>=10;a/=10)u++;i%=B,o=i-B+u,s=o<0?0:f/E(10,u-o-1)%10|0}if(n=n||e<0||void 0!==h[l+1]||(o<0?f:f%E(10,u-o-1)),c=r<4?(s||n)&&(0==r||r==(t.s<0?3:2)):s>5||5==s&&(4==r||n||6==r&&(i>0?o>0?f/E(10,u-o):0:h[l-1])%10&1||r==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=E(10,(B-e%B)%B),t.e=-e||0):h[0]=t.e=0,t;if(0==i?(h.length=l,a=1,l--):(h.length=l+1,a=E(10,B-i),h[l]=o>0?(f/E(10,u-o)%E(10,o)|0)*a:0),c)for(;;){if(0==l){for(i=1,o=h[0];o>=10;o/=10)i++;for(o=h[0]+=a,a=1;o>=10;o/=10)a++;i!=a&&(t.e++,h[0]==b&&(h[0]=1));break}if(h[l]+=a,h[l]!=b)break;h[l--]=0,a=1}for(i=h.length;0===h[--i];)h.pop()}return D&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e0?i=i.charAt(0)+"."+i.slice(1)+Z(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(t.e<0?"e":"e+")+t.e):u<0?(i="0."+Z(-u-1)+i,r&&(n=r-o)>0&&(i+=Z(n))):u>=o?(i+=Z(u+1-o),r&&(n=r-u-1)>0&&(i=i+"."+Z(n))):((n=u+1)0&&(u+1===o&&(i+="."),i+=Z(n))),i}function R(t,e){var r=t[0];for(e*=B;r>=10;r/=10)e++;return e}function $(t,e,r){if(e>_)throw D=!0,r&&(t.precision=r),Error(v);return P(new t(h),e,1,!0)}function U(t,e,r){if(e>N)throw Error(v);return P(new t(l),e,r,!0)}function L(t){var e=t.length-1,r=e*B+1;if(e=t[e],e){for(;e%10==0;e/=10)r--;for(e=t[0];e>=10;e/=10)r++}return r}function Z(t){for(var e="";t--;)e+="0";return e}function H(t,e,r,n){var u,i=new t(1),o=Math.ceil(n/B+4);for(D=!1;;){if(r%2&&(i=i.times(e),ut(i.d,o)&&(u=!0)),r=w(r/2),0===r){r=i.d.length-1,u&&0===i.d[r]&&++i.d[r];break}e=e.times(e),ut(e.d,o)}return D=!0,i}function V(t){return 1&t.d[t.d.length-1]}function J(t,e,r){for(var n,u=new t(e[0]),i=0;++i17)return new l(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);null==e?(D=!1,s=d):s=e,a=new l(.03125);while(t.e>-2)t=t.times(a),h+=5;for(n=Math.log(E(2,h))/Math.LN10*2+5|0,s+=n,r=i=o=new l(1),l.precision=s;;){if(i=P(i.times(t),s,1),r=r.times(++f),a=o.plus(j(i,r,s,1)),S(a.d).slice(0,s)===S(o.d).slice(0,s)){u=h;while(u--)o=P(o.times(o),s,1);if(null!=e)return l.precision=d,o;if(!(c<3&&I(o.d,s-n,p,c)))return P(o,l.precision=d,p,D=!0);l.precision=s+=10,r=i=a=new l(1),f=0,c++}o=a}}function Q(t,e){var r,n,u,i,o,a,s,c,f,h,l,p=1,d=10,m=t,v=m.d,g=m.constructor,y=g.rounding,w=g.precision;if(m.s<0||!v||!v[0]||!m.e&&1==v[0]&&1==v.length)return new g(v&&!v[0]?-1/0:1!=m.s?NaN:v?0:m);if(null==e?(D=!1,f=w):f=e,g.precision=f+=d,r=S(v),n=r.charAt(0),!(Math.abs(i=m.e)<15e14))return c=$(g,f+2,w).times(i+""),m=Q(new g(n+"."+r.slice(1)),f-d).plus(c),g.precision=w,null==e?P(m,w,y,D=!0):m;while(n<7&&1!=n||1==n&&r.charAt(1)>3)m=m.times(t),r=S(m.d),n=r.charAt(0),p++;for(i=m.e,n>1?(m=new g("0."+r),i++):m=new g(n+"."+r.slice(1)),h=m,s=o=m=j(m.minus(1),m.plus(1),f,1),l=P(m.times(m),f,1),u=3;;){if(o=P(o.times(l),f,1),c=s.plus(j(o,new g(u),f,1)),S(c.d).slice(0,f)===S(s.d).slice(0,f)){if(s=s.times(2),0!==i&&(s=s.plus($(g,f+2,w).times(i+""))),s=j(s,new g(p),f,1),null!=e)return g.precision=w,s;if(!I(s.d,f-d,y,a))return P(s,g.precision=w,y,D=!0);g.precision=f+=d,c=o=m=j(h.minus(1),h.plus(1),f,1),l=P(m.times(m),f,1),u=a=1}s=c,u+=2}}function X(t){return String(t.s*t.s/0)}function W(t,e){var r,n,u;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;48===e.charCodeAt(n);n++);for(u=e.length;48===e.charCodeAt(u-1);--u);if(e=e.slice(n,u),e){if(u-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%B,r<0&&(n+=B),nt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),x.test(e))return W(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(A.test(e))r=16,e=e.toLowerCase();else if(F.test(e))r=2;else{if(!C.test(e))throw Error(m+e);r=8}for(o=e.search(/p/i),o>0?(c=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),o=e.indexOf("."),a=o>=0,n=t.constructor,a&&(e=e.replace(".",""),s=e.length,o=s-o,u=H(n,new n(r),o,2*o)),f=O(e,r,b),h=f.length-1,o=h;0===f[o];--o)f.pop();return o<0?new n(0*t.s):(t.e=R(f,h),t.d=f,D=!1,a&&(t=j(t,u,4*s)),c&&(t=t.times(Math.abs(c)<54?E(2,c):i.pow(2,c))),D=!0,t)}function K(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:tt(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:0|r,e=e.times(1/et(5,r)),e=tt(t,2,e,e);for(var u,i=new t(5),o=new t(16),a=new t(20);r--;)u=e.times(e),e=e.times(i.plus(u.times(o.times(u).minus(a))));return e}function tt(t,e,r,n,u){var i,o,a,s,c=t.precision,f=Math.ceil(c/B);for(D=!1,s=r.times(r),a=new t(n);;){if(o=j(a.times(s),new t(e++*e++),c,1),a=u?n.plus(o):n.minus(o),n=j(o.times(s),new t(e++*e++),c,1),o=a.plus(n),void 0!==o.d[f]){for(i=f;o.d[i]===a.d[i]&&i--;);if(-1==i)break}i=a,a=n,n=o,o=i}return D=!0,o.d.length=f+1,o}function et(t,e){var r=t;while(--e)r*=t;return r}function rt(t,e){var r,n=e.s<0,u=U(t,t.precision,1),i=u.times(.5);if(e=e.abs(),e.lte(i))return a=n?4:1,e;if(r=e.divToInt(u),r.isZero())a=n?3:2;else{if(e=e.minus(r.times(u)),e.lte(i))return a=V(r)?n?2:3:n?4:1,e;a=V(r)?n?1:4:n?3:2}return e.minus(u).abs()}function nt(t,e,r,n){var u,i,a,s,h,l,p,D,d,m=t.constructor,v=void 0!==r;if(v?(z(r,1,c),void 0===n?n=m.rounding:z(n,0,8)):(r=m.precision,n=m.rounding),t.isFinite()){for(p=q(t),a=p.indexOf("."),v?(u=2,16==e?r=4*r-3:8==e&&(r=3*r-2)):u=e,a>=0&&(p=p.replace(".",""),d=new m(1),d.e=p.length-a,d.d=O(q(d),10,u),d.e=d.d.length),D=O(p,10,u),i=h=D.length;0==D[--h];)D.pop();if(D[0]){if(a<0?i--:(t=new m(t),t.d=D,t.e=i,t=j(t,d,r,n,0,u),D=t.d,i=t.e,l=o),a=D[r],s=u/2,l=l||void 0!==D[r+1],l=n<4?(void 0!==a||l)&&(0===n||n===(t.s<0?3:2)):a>s||a===s&&(4===n||l||6===n&&1&D[r-1]||n===(t.s<0?8:7)),D.length=r,l)for(;++D[--r]>u-1;)D[r]=0,r||(++i,D.unshift(1));for(h=D.length;!D[h-1];--h);for(a=0,p="";a1)if(16==e||8==e){for(a=16==e?4:3,--h;h%a;h++)p+="0";for(D=O(p,u,e),h=D.length;!D[h-1];--h);for(a=1,p="1.";ah)for(i-=h;i--;)p+="0";else ie)return t.length=e,!0}function it(t){return new this(t).abs()}function ot(t){return new this(t).acos()}function at(t){return new this(t).acosh()}function st(t,e){return new this(t).plus(e)}function ct(t){return new this(t).asin()}function ft(t){return new this(t).asinh()}function ht(t){return new this(t).atan()}function lt(t){return new this(t).atanh()}function pt(t,e){t=new this(t),e=new this(e);var r,n=this.precision,u=this.rounding,i=n+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(r=e.s<0?U(this,n,u):new this(0),r.s=t.s):!t.d||e.isZero()?(r=U(this,i,1).times(.5),r.s=t.s):e.s<0?(this.precision=i,this.rounding=1,r=this.atan(j(t,e,i,1)),e=U(this,i,1),this.precision=n,this.rounding=u,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(j(t,e,i,1)):(r=U(this,i,1).times(e.s>0?.25:.75),r.s=t.s):r=new this(NaN),r}function Dt(t){return new this(t).cbrt()}function dt(t){return P(t=new this(t),t.e+1,2)}function mt(t,e,r){return new this(t).clamp(e,r)}function vt(t){if(!t||"object"!==typeof t)throw Error(d+"Object expected");var e,r,n,u=!0===t.defaults,i=["precision",1,c,"rounding",0,8,"toExpNeg",-s,0,"toExpPos",0,s,"maxE",0,s,"minE",-s,0,"modulo",0,9];for(e=0;e=i[e+1]&&n<=i[e+2]))throw Error(m+r+": "+n);this[r]=n}if(r="crypto",u&&(this[r]=p[r]),void 0!==(n=t[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(m+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(g);this[r]=!0}else this[r]=!1}return this}function gt(t){return new this(t).cos()}function yt(t){return new this(t).cosh()}function wt(t){var e,r,n;function u(t){var e,r,n,i=this;if(!(i instanceof u))return new u(t);if(i.constructor=u,xt(t))return i.s=t.s,void(D?!t.d||t.e>u.maxE?(i.e=NaN,i.d=null):t.e=10;r/=10)e++;return void(D?e>u.maxE?(i.e=NaN,i.d=null):e=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=u%1e7;else{if(!crypto.randomBytes)throw Error(g);for(e=crypto.randomBytes(n*=4);i=214e7?crypto.randomBytes(4).copy(e,i):(a.push(u%1e7),i+=4);i=n/4}else for(;i=10;u/=10)n++;n=D)t/=2,e/=2,r>>>=1;return(t+r)/e};return f.int32=function(){return 0|a.g(4)},f.quick=function(){return a.g(4)/4294967296},f.double=f,w(F(a.S),i),(e.pass||r||function(t,e,r,n){return n&&(n.S&&g(n,a),t.state=function(){return g(a,{})}),r?(o[h]=t,e):t})(f,u,"global"in e?e.global:this==o,e.state)}function v(t){var e,r=t.length,n=this,u=0,i=n.i=n.j=0,o=n.S=[];r||(t=[r++]);while(u1&&(e[r]=(e[r]||0)+1):e[t]=(e[t]||0)+1,e}var f=function(t,e){var r,n=0,u=1,i=1,s=0,c=0,f=0,h=1,l=1,p=0,D=1,m=1,v=1,g=1e7;if(void 0===t||null===t);else if(void 0!==e){if(n=t,u=e,i=n*u,n%1!==0||u%1!==0)throw d["NonIntegerParameter"]}else switch(typeof t){case"object":if("d"in t&&"n"in t)n=t["n"],u=t["d"],"s"in t&&(n*=t["s"]);else{if(!(0 in t))throw d["InvalidParameter"];n=t[0],1 in t&&(u=t[1])}i=n*u;break;case"number":if(t<0&&(i=t,t=-t),t%1===0)n=t;else if(t>0){t>=1&&(l=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=l);while(D<=g&&v<=g){if(r=(p+m)/(D+v),t===r){D+v<=g?(n=p+m,u=D+v):v>D?(n=m,u=v):(n=p,u=D);break}t>r?(p+=m,D+=v):(m+=p,v+=D),D>g?(n=m,u=v):(n=p,u=D)}n*=l}else(isNaN(t)||isNaN(e))&&(u=n=NaN);break;case"string":if(D=t.match(/\d+|./g),null===D)throw d["InvalidParameter"];if("-"===D[p]?(i=-1,p++):"+"===D[p]&&p++,D.length===p+1?c=a(D[p++],i):"."===D[p+1]||"."===D[p]?("."!==D[p]&&(s=a(D[p++],i)),p++,(p+1===D.length||"("===D[p+1]&&")"===D[p+3]||"'"===D[p+1]&&"'"===D[p+3])&&(c=a(D[p],i),h=Math.pow(10,D[p].length),p++),("("===D[p]&&")"===D[p+2]||"'"===D[p]&&"'"===D[p+2])&&(f=a(D[p+1],i),l=Math.pow(10,D[p+1].length)-1,p+=3)):"/"===D[p+1]||":"===D[p+1]?(c=a(D[p],i),h=a(D[p+2],1),p+=3):"/"===D[p+3]&&" "===D[p+1]&&(s=a(D[p],i),c=a(D[p+2],i),h=a(D[p+4],1),p+=5),D.length<=p){u=h*l,i=n=f+u*s+l*c;break}default:throw d["InvalidParameter"]}if(0===u)throw d["DivisionByZero"];o["s"]=i<0?-1:1,o["n"]=Math.abs(n),o["d"]=Math.abs(u)};function h(t,e,r){for(var n=1;e>0;t=t*t%r,e>>=1)1&e&&(n=n*t%r);return n}function l(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var r=10%e,n=1;1!==r;n++)if(r=10*r%e,n>i)return 0;return n}function p(t,e,r){for(var n=1,u=h(10,r,e),i=0;i<300;i++){if(n===u)return i;n=10*n%e,u=10*u%e}return 0}function D(t,e){if(!t)return e;if(!e)return t;while(1){if(t%=e,!t)return e;if(e%=t,!e)return t}}function d(t,e){if(f(t,e),!(this instanceof d))return s(o["s"]*o["n"],o["d"]);t=D(o["d"],o["n"]),this["s"]=o["s"],this["n"]=o["n"]/t,this["d"]=o["d"]/t}d["DivisionByZero"]=new Error("Division by Zero"),d["InvalidParameter"]=new Error("Invalid argument"),d["NonIntegerParameter"]=new Error("Parameters must be integer"),d.prototype={s:1,n:0,d:1,abs:function(){return s(this["n"],this["d"])},neg:function(){return s(-this["s"]*this["n"],this["d"])},add:function(t,e){return f(t,e),s(this["s"]*this["n"]*o["d"]+o["s"]*this["d"]*o["n"],this["d"]*o["d"])},sub:function(t,e){return f(t,e),s(this["s"]*this["n"]*o["d"]-o["s"]*this["d"]*o["n"],this["d"]*o["d"])},mul:function(t,e){return f(t,e),s(this["s"]*o["s"]*this["n"]*o["n"],this["d"]*o["d"])},div:function(t,e){return f(t,e),s(this["s"]*o["s"]*this["n"]*o["d"],this["d"]*o["n"])},clone:function(){return s(this["s"]*this["n"],this["d"])},mod:function(t,e){if(isNaN(this["n"])||isNaN(this["d"]))return new d(NaN);if(void 0===t)return s(this["s"]*this["n"]%this["d"],1);if(f(t,e),0===o["n"]&&0===this["d"])throw d["DivisionByZero"];return s(this["s"]*(o["d"]*this["n"])%(o["n"]*this["d"]),o["d"]*this["d"])},gcd:function(t,e){return f(t,e),s(D(o["n"],this["n"])*D(o["d"],this["d"]),o["d"]*this["d"])},lcm:function(t,e){return f(t,e),0===o["n"]&&0===this["n"]?s(0,1):s(o["n"]*this["n"],D(o["n"],this["n"])*D(o["d"],this["d"]))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this["n"])||isNaN(this["d"])?new d(NaN):s(Math.ceil(t*this["s"]*this["n"]/this["d"]),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this["n"])||isNaN(this["d"])?new d(NaN):s(Math.floor(t*this["s"]*this["n"]/this["d"]),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this["n"])||isNaN(this["d"])?new d(NaN):s(Math.round(t*this["s"]*this["n"]/this["d"]),t)},inverse:function(){return s(this["s"]*this["d"],this["n"])},pow:function(t,e){if(f(t,e),1===o["d"])return o["s"]<0?s(Math.pow(this["s"]*this["d"],o["n"]),Math.pow(this["n"],o["n"])):s(Math.pow(this["s"]*this["n"],o["n"]),Math.pow(this["d"],o["n"]));if(this["s"]<0)return null;var r=c(this["n"]),n=c(this["d"]),u=1,i=1;for(var a in r)if("1"!==a){if("0"===a){u=0;break}if(r[a]*=o["n"],r[a]%o["d"]!==0)return null;r[a]/=o["d"],u*=Math.pow(a,r[a])}for(var a in n)if("1"!==a){if(n[a]*=o["n"],n[a]%o["d"]!==0)return null;n[a]/=o["d"],i*=Math.pow(a,n[a])}return o["s"]<0?s(i,u):s(u,i)},equals:function(t,e){return f(t,e),this["s"]*this["n"]*o["d"]===o["s"]*o["n"]*this["d"]},compare:function(t,e){f(t,e);var r=this["s"]*this["n"]*o["d"]-o["s"]*o["n"]*this["d"];return(0=0;i--)u=u["inverse"]()["add"](r[i]);if(u["sub"](e)["abs"]().valueOf()0&&(r+=e,r+=" ",n%=u),r+=n,r+="/",r+=u),r},toLatex:function(t){var e,r="",n=this["n"],u=this["d"];return this["s"]<0&&(r+="-"),1===u?r+=n:(t&&(e=Math.floor(n/u))>0&&(r+=e,n%=u),r+="\\frac{",r+=n,r+="}{",r+=u,r+="}"),r},toContinued:function(){var t,e=this["n"],r=this["d"],n=[];if(isNaN(e)||isNaN(r))return n;do{n.push(Math.floor(e/r)),t=e%r,e=r,r=t}while(1!==e);return n},toString:function(t){var e=this["n"],r=this["d"];if(isNaN(e)||isNaN(r))return"NaN";t=t||15;var n=l(e,r),u=p(e,r,n),i=this["s"]<0?"-":"";if(i+=e/r|0,e%=r,e*=10,e&&(i+="."),n){for(var o=u;o--;)i+=e/r|0,e%=r,e*=10;i+="(";for(o=n;o--;)i+=e/r|0,e%=r,e*=10;i+=")"}else for(o=t;e&&o--;)i+=e/r|0,e%=r,e*=10;return i}},n=[],u=function(){return d}.apply(e,n),void 0===u||(t.exports=u)})()},adb6:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},c499:function(t,e,r){var n,u; /** * @license Complex.js v2.1.1 12/05/2020 * * Copyright (c) 2020, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. **/(function(r){"use strict";var i=Math.cosh||function(t){return Math.abs(t)<1e-9?1-t:.5*(Math.exp(t)+Math.exp(-t))},o=Math.sinh||function(t){return Math.abs(t)<1e-9?t:.5*(Math.exp(t)-Math.exp(-t))},a=function(t){var e=Math.PI/4;if(-e>t||t>e)return Math.cos(t)-1;var r=t*t;return r*(r*(r*(r*(r*(r*(r*(r/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-.5)},s=function(t,e){var r=Math.abs(t),n=Math.abs(e);return r<3e3&&n<3e3?Math.sqrt(r*r+n*n):(r0&&c();break;case"number":r["im"]=0,r["re"]=t;break;default:c()}return isNaN(r["re"])||isNaN(r["im"]),r};function l(t,e){if(!(this instanceof l))return new l(t,e);var r=h(t,e);this["re"]=r["re"],this["im"]=r["im"]}l.prototype={re:0,im:0,sign:function(){var t=this["abs"]();return new l(this["re"]/t,this["im"]/t)},add:function(t,e){var r=new l(t,e);return this["isInfinite"]()&&r["isInfinite"]()?l["NAN"]:this["isInfinite"]()||r["isInfinite"]()?l["INFINITY"]:new l(this["re"]+r["re"],this["im"]+r["im"])},sub:function(t,e){var r=new l(t,e);return this["isInfinite"]()&&r["isInfinite"]()?l["NAN"]:this["isInfinite"]()||r["isInfinite"]()?l["INFINITY"]:new l(this["re"]-r["re"],this["im"]-r["im"])},mul:function(t,e){var r=new l(t,e);return this["isInfinite"]()&&r["isZero"]()||this["isZero"]()&&r["isInfinite"]()?l["NAN"]:this["isInfinite"]()||r["isInfinite"]()?l["INFINITY"]:0===r["im"]&&0===this["im"]?new l(this["re"]*r["re"],0):new l(this["re"]*r["re"]-this["im"]*r["im"],this["re"]*r["im"]+this["im"]*r["re"])},div:function(t,e){var r=new l(t,e);if(this["isZero"]()&&r["isZero"]()||this["isInfinite"]()&&r["isInfinite"]())return l["NAN"];if(this["isInfinite"]()||r["isZero"]())return l["INFINITY"];if(this["isZero"]()||r["isInfinite"]())return l["ZERO"];t=this["re"],e=this["im"];var n,u,i=r["re"],o=r["im"];return 0===o?new l(t/i,e/i):Math.abs(i)0)return new l(Math.pow(t,r["re"]),0);if(0===t)switch((r["re"]%4+4)%4){case 0:return new l(Math.pow(e,r["re"]),0);case 1:return new l(0,Math.pow(e,r["re"]));case 2:return new l(-Math.pow(e,r["re"]),0);case 3:return new l(0,-Math.pow(e,r["re"]))}}if(0===t&&0===e&&r["re"]>0&&r["im"]>=0)return l["ZERO"];var n=Math.atan2(e,t),u=f(t,e);return t=Math.exp(r["re"]*u-r["im"]*n),e=r["im"]*u+r["re"]*n,new l(t*Math.cos(e),t*Math.sin(e))},sqrt:function(){var t,e,r=this["re"],n=this["im"],u=this["abs"]();if(r>=0){if(0===n)return new l(Math.sqrt(r),0);t=.5*Math.sqrt(2*(u+r))}else t=Math.abs(n)/Math.sqrt(2*(u-r));return e=r<=0?.5*Math.sqrt(2*(u-r)):Math.abs(n)/Math.sqrt(2*(u+r)),new l(t,n<0?-e:e)},exp:function(){var t=Math.exp(this["re"]);return this["im"],new l(t*Math.cos(this["im"]),t*Math.sin(this["im"]))},expm1:function(){var t=this["re"],e=this["im"];return new l(Math.expm1(t)*Math.cos(e)+a(e),Math.exp(t)*Math.sin(e))},log:function(){var t=this["re"],e=this["im"];return new l(f(t,e),Math.atan2(e,t))},abs:function(){return s(this["re"],this["im"])},arg:function(){return Math.atan2(this["im"],this["re"])},sin:function(){var t=this["re"],e=this["im"];return new l(Math.sin(t)*i(e),Math.cos(t)*o(e))},cos:function(){var t=this["re"],e=this["im"];return new l(Math.cos(t)*i(e),-Math.sin(t)*o(e))},tan:function(){var t=2*this["re"],e=2*this["im"],r=Math.cos(t)+i(e);return new l(Math.sin(t)/r,o(e)/r)},cot:function(){var t=2*this["re"],e=2*this["im"],r=Math.cos(t)-i(e);return new l(-Math.sin(t)/r,o(e)/r)},sec:function(){var t=this["re"],e=this["im"],r=.5*i(2*e)+.5*Math.cos(2*t);return new l(Math.cos(t)*i(e)/r,Math.sin(t)*o(e)/r)},csc:function(){var t=this["re"],e=this["im"],r=.5*i(2*e)-.5*Math.cos(2*t);return new l(Math.sin(t)*i(e)/r,-Math.cos(t)*o(e)/r)},asin:function(){var t=this["re"],e=this["im"],r=new l(e*e-t*t+1,-2*t*e)["sqrt"](),n=new l(r["re"]-e,r["im"]+t)["log"]();return new l(n["im"],-n["re"])},acos:function(){var t=this["re"],e=this["im"],r=new l(e*e-t*t+1,-2*t*e)["sqrt"](),n=new l(r["re"]-e,r["im"]+t)["log"]();return new l(Math.PI/2-n["im"],n["re"])},atan:function(){var t=this["re"],e=this["im"];if(0===t){if(1===e)return new l(0,1/0);if(-1===e)return new l(0,-1/0)}var r=t*t+(1-e)*(1-e),n=new l((1-e*e-t*t)/r,-2*t/r).log();return new l(-.5*n["im"],.5*n["re"])},acot:function(){var t=this["re"],e=this["im"];if(0===e)return new l(Math.atan2(1,t),0);var r=t*t+e*e;return 0!==r?new l(t/r,-e/r).atan():new l(0!==t?t/0:0,0!==e?-e/0:0).atan()},asec:function(){var t=this["re"],e=this["im"];if(0===t&&0===e)return new l(0,1/0);var r=t*t+e*e;return 0!==r?new l(t/r,-e/r).acos():new l(0!==t?t/0:0,0!==e?-e/0:0).acos()},acsc:function(){var t=this["re"],e=this["im"];if(0===t&&0===e)return new l(Math.PI/2,1/0);var r=t*t+e*e;return 0!==r?new l(t/r,-e/r).asin():new l(0!==t?t/0:0,0!==e?-e/0:0).asin()},sinh:function(){var t=this["re"],e=this["im"];return new l(o(t)*Math.cos(e),i(t)*Math.sin(e))},cosh:function(){var t=this["re"],e=this["im"];return new l(i(t)*Math.cos(e),o(t)*Math.sin(e))},tanh:function(){var t=2*this["re"],e=2*this["im"],r=i(t)+Math.cos(e);return new l(o(t)/r,Math.sin(e)/r)},coth:function(){var t=2*this["re"],e=2*this["im"],r=i(t)-Math.cos(e);return new l(o(t)/r,-Math.sin(e)/r)},csch:function(){var t=this["re"],e=this["im"],r=Math.cos(2*e)-i(2*t);return new l(-2*o(t)*Math.cos(e)/r,2*i(t)*Math.sin(e)/r)},sech:function(){var t=this["re"],e=this["im"],r=Math.cos(2*e)+i(2*t);return new l(2*i(t)*Math.cos(e)/r,-2*o(t)*Math.sin(e)/r)},asinh:function(){var t=this["im"];this["im"]=-this["re"],this["re"]=t;var e=this["asin"]();return this["re"]=-this["im"],this["im"]=t,t=e["re"],e["re"]=-e["im"],e["im"]=t,e},acosh:function(){var t=this["acos"]();if(t["im"]<=0){var e=t["re"];t["re"]=-t["im"],t["im"]=e}else{e=t["im"];t["im"]=-t["re"],t["re"]=e}return t},atanh:function(){var t=this["re"],e=this["im"],r=t>1&&0===e,n=1-t,u=1+t,i=n*n+e*e,o=0!==i?new l((u*n-e*e)/i,(e*n+u*e)/i):new l(-1!==t?t/0:0,0!==e?e/0:0),a=o["re"];return o["re"]=f(o["re"],o["im"])/2,o["im"]=Math.atan2(o["im"],a)/2,r&&(o["im"]=-o["im"]),o},acoth:function(){var t=this["re"],e=this["im"];if(0===t&&0===e)return new l(0,Math.PI/2);var r=t*t+e*e;return 0!==r?new l(t/r,-e/r).atanh():new l(0!==t?t/0:0,0!==e?-e/0:0).atanh()},acsch:function(){var t=this["re"],e=this["im"];if(0===e)return new l(0!==t?Math.log(t+Math.sqrt(t*t+1)):1/0,0);var r=t*t+e*e;return 0!==r?new l(t/r,-e/r).asinh():new l(0!==t?t/0:0,0!==e?-e/0:0).asinh()},asech:function(){var t=this["re"],e=this["im"];if(this["isZero"]())return l["INFINITY"];var r=t*t+e*e;return 0!==r?new l(t/r,-e/r).acosh():new l(0!==t?t/0:0,0!==e?-e/0:0).acosh()},inverse:function(){if(this["isZero"]())return l["INFINITY"];if(this["isInfinite"]())return l["ZERO"];var t=this["re"],e=this["im"],r=t*t+e*e;return new l(t/r,-e/r)},conjugate:function(){return new l(this["re"],-this["im"])},neg:function(){return new l(-this["re"],-this["im"])},ceil:function(t){return t=Math.pow(10,t||0),new l(Math.ceil(this["re"]*t)/t,Math.ceil(this["im"]*t)/t)},floor:function(t){return t=Math.pow(10,t||0),new l(Math.floor(this["re"]*t)/t,Math.floor(this["im"]*t)/t)},round:function(t){return t=Math.pow(10,t||0),new l(Math.round(this["re"]*t)/t,Math.round(this["im"]*t)/t)},equals:function(t,e){var r=new l(t,e);return Math.abs(r["re"]-this["re"])<=l["EPSILON"]&&Math.abs(r["im"]-this["im"])<=l["EPSILON"]},clone:function(){return new l(this["re"],this["im"])},toString:function(){var t=this["re"],e=this["im"],r="";return this["isNaN"]()?"NaN":this["isInfinite"]()?"Infinity":(Math.abs(t)>>7^r,r=r-n|0,n=n<<24^n>>>8^u,u=u-t|0,e.b=t=t<<20^t>>>12^r,e.c=r=r-n|0,e.d=n<<16^r>>>16^u,e.a=u-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):r+=t;for(var n=0;n>>0)/4294967296};return u.double=function(){do{var t=r.next()>>>11,e=(r.next()>>>0)/4294967296,n=(t+e)/(1<<21)}while(0===n);return n},u.int32=r.next,u.quick=u,n&&("object"==typeof n&&a(n,r),u.state=function(){return a(r,{})}),u}u&&u.exports?u.exports=s:r("46b8")&&r("f3fa")?(n=function(){return s}.call(e,r,e,u),void 0===n||(u.exports=n)):this.tychei=s})(0,t,r("46b8"))}).call(this,r("adb6")(t))},f3fa:function(t,e){(function(e){t.exports=e}).call(this,{})},f42a:function(t,e,r){var n=r("a77a");n("toPrimitive")},fe55:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"context"},[r("div",{staticClass:"panel"},[r("el-page-header",{attrs:{content:"活动详情"},on:{back:t.goBack}}),r("div",{staticClass:"panel-body"},[r("div",{staticClass:"panel_control"},[r("el-row",{attrs:{gutter:1}},[r("el-col",{attrs:{span:6}},[r("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.addNew()}}},[t._v("新增")]),r("el-button",{attrs:{type:"",size:"mini"},on:{click:function(e){return t.deleteItem()}}},[t._v("删除")]),r("el-button",{attrs:{type:"",size:"mini"},on:{click:function(e){return t.editItem()}}},[t._v("编辑")])],1)],1)],1)])],1),r("div",{staticClass:"table"},[r("el-table",{attrs:{data:t.tableData,border:"","is-horizontal-resize":"","default-sort":{prop:"date",order:"descending"},"element-loading-background":"rgba(0, 0, 0, 0.8)","summary-method":t.getSummaries},on:{"current-change":t.clickChange}},[r("el-table-column",{attrs:{label:"选择",width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-radio",{attrs:{label:e.row},model:{value:t.tableRadio,callback:function(e){t.tableRadio=e},expression:"tableRadio"}},[r("i")])]}}])}),r("el-table-column",{attrs:{label:"序号",type:"index",width:"50",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(t.start+e.$index+1))])]}}])}),r("el-table-column",{attrs:{prop:"PdName",label:"名称",sortable:""}}),r("el-table-column",{attrs:{prop:"DType",label:"类型",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t._f("getDType")(e.row.DType))+" ")]}}])}),r("el-table-column",{attrs:{prop:"Price",label:"价格",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.Price/100)+" ")]}}])}),r("el-table-column",{attrs:{prop:"EffectiveMonths",label:"月租","min-width":"30dp",sortable:"",align:"center"}},[r("el-table-column",{attrs:{prop:"EffectiveMonths",label:"购买",sortable:""}}),r("el-table-column",{attrs:{prop:"GiftMonths",label:"赠送",sortable:""}})],1),r("el-table-column",{attrs:{prop:"EffectiveMonths",label:"课时","min-width":"30dp",sortable:"",align:"center"}},[r("el-table-column",{attrs:{prop:"NormalHour",label:"购买",sortable:""}}),r("el-table-column",{attrs:{prop:"GiftHour",label:"赠送",sortable:""}})],1),r("el-table-column",{attrs:{prop:"ShowBt",label:"课时时限",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.beginTimeStr?r("div",[t._v(" "+t._s(t._f("filterTime")(e.row.beginTimeStr))+" 至 "+t._s(t._f("filterTime")(e.row.endTimeStr))+" ")]):r("div",[t._v(" 无 ")])]}}])}),r("el-table-column",{attrs:{prop:"ShowBt",label:"显示时限",sortable:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t._f("filterTime")(e.row.ShowBt))+" 至 "+t._s(t._f("filterTime")(e.row.ShowEt))+" ")]}}])})],1),r("br"),r("el-pagination",{attrs:{background:"",total:t.pageination.total,"page-size":t.pageination.pageItem},on:{"current-change":t.pageChange}})],1),r("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialogVisible,width:"840px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("div",{staticClass:"dialogContent"},[r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"115px"}},[r("el-form-item",{attrs:{label:"详情名称"}},[r("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:"价格"}},[r("el-input",{model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}})],1),r("el-form-item",{attrs:{label:"活动类型",required:!0}},[r("el-radio-group",{staticStyle:{"margin-left":"-180px"},model:{value:t.form.dType,callback:function(e){t.$set(t.form,"dType",e)},expression:"form.dType"}},[1==t.pType||2==t.pType?r("el-radio",{attrs:{label:"1"}},[t._v("月租包")]):t._e(),1==t.pType?r("el-radio",{attrs:{label:"2"}},[t._v("课时包")]):t._e(),1==t.pType?r("el-radio",{attrs:{label:"4"}},[t._v("限时课时包")]):t._e(),2==t.pType?r("el-radio",{attrs:{label:"5"}},[t._v("特殊活动包")]):t._e()],1)],1),2==t.form.dType||4==t.form.dType?r("el-form-item",{attrs:{label:"有效类型",required:!0}},[r("el-radio-group",{staticStyle:{"margin-left":"-180px"},model:{value:t.form.validityType,callback:function(e){t.$set(t.form,"validityType",e)},expression:"form.validityType"}},[r("el-radio",{attrs:{label:"1"}},[t._v("长期")]),r("el-radio",{attrs:{label:"2"}},[t._v("短期")])],1)],1):t._e(),2!=t.form.dType&&4!=t.form.dType||2!=t.form.validityType?t._e():r("el-form-item",{attrs:{label:"课时时限"}},[r("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.form.timeScope,callback:function(e){t.$set(t.form,"timeScope",e)},expression:"form.timeScope"}})],1),1==t.form.dType?r("el-form-item",{attrs:{label:"购买月租"}},[r("el-input",{model:{value:t.form.effectiveMonths,callback:function(e){t.$set(t.form,"effectiveMonths",e)},expression:"form.effectiveMonths"}})],1):t._e(),1==t.form.dType?r("el-form-item",{attrs:{label:"赠送月租"}},[r("el-input",{model:{value:t.form.giftMonths,callback:function(e){t.$set(t.form,"giftMonths",e)},expression:"form.giftMonths"}})],1):t._e(),2==t.form.dType||4==t.form.dType?r("el-form-item",{attrs:{label:"购买课时"}},[r("el-input",{model:{value:t.form.normalHour,callback:function(e){t.$set(t.form,"normalHour",e)},expression:"form.normalHour"}})],1):t._e(),2==t.form.dType||4==t.form.dType?r("el-form-item",{attrs:{label:"赠送课时"}},[r("el-input",{model:{value:t.form.giftHour,callback:function(e){t.$set(t.form,"giftHour",e)},expression:"form.giftHour"}})],1):t._e(),r("el-form-item",{attrs:{label:"显示时限"}},[r("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.form.showTimeScope,callback:function(e){t.$set(t.form,"showTimeScope",e)},expression:"form.showTimeScope"}})],1)],1)],1),r("div",{staticClass:"dialogFooter"},[1==t.form.dialogType?r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.confirmAdd()}}},[t._v("确定")]):t._e(),2==t.form.dialogType?r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.confirmEdit()}}},[t._v("确定")]):t._e(),r("el-button",{attrs:{type:"info",size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("关闭")])],1)])],1)},u=[],i=(r("10dd"),r("acc0"),r("89a8"),r("d5ee"),r("5a05"),r("1a91"),r("8ea3"),r("51b3"),r("379d"),r("a2fc")),o=r.n(i),a={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function s(t){return"number"===typeof t}function c(t){return!(!t||"object"!==typeof t||"function"!==typeof t.constructor)&&(!0===t.isBigNumber&&"object"===typeof t.constructor.prototype&&!0===t.constructor.prototype.isBigNumber||"function"===typeof t.constructor.isDecimal&&!0===t.constructor.isDecimal(t))}function f(t){return t&&"object"===typeof t&&!0===Object.getPrototypeOf(t).isComplex||!1}function h(t){return t&&"object"===typeof t&&!0===Object.getPrototypeOf(t).isFraction||!1}function l(t){return t&&!0===t.constructor.prototype.isUnit||!1}function p(t){return"string"===typeof t}var D=Array.isArray;function d(t){return t&&!0===t.constructor.prototype.isMatrix||!1}function m(t){return Array.isArray(t)||d(t)}function v(t){return t&&t.isDenseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function g(t){return t&&t.isSparseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function y(t){return t&&!0===t.constructor.prototype.isRange||!1}function w(t){return t&&!0===t.constructor.prototype.isIndex||!1}function E(t){return"boolean"===typeof t}function F(t){return t&&!0===t.constructor.prototype.isResultSet||!1}function A(t){return t&&!0===t.constructor.prototype.isHelp||!1}function C(t){return"function"===typeof t}function x(t){return t instanceof Date}function b(t){return t instanceof RegExp}function B(t){return!(!t||"object"!==typeof t||t.constructor!==Object||f(t)||h(t))}function M(t){return null===t}function _(t){return void 0===t}function N(t){return t&&!0===t.isAccessorNode&&!0===t.constructor.prototype.isNode||!1}function T(t){return t&&!0===t.isArrayNode&&!0===t.constructor.prototype.isNode||!1}function S(t){return t&&!0===t.isAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function z(t){return t&&!0===t.isBlockNode&&!0===t.constructor.prototype.isNode||!1}function I(t){return t&&!0===t.isConditionalNode&&!0===t.constructor.prototype.isNode||!1}function O(t){return t&&!0===t.isConstantNode&&!0===t.constructor.prototype.isNode||!1}function k(t){return t&&!0===t.isFunctionAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function j(t){return t&&!0===t.isFunctionNode&&!0===t.constructor.prototype.isNode||!1}function P(t){return t&&!0===t.isIndexNode&&!0===t.constructor.prototype.isNode||!1}function q(t){return t&&!0===t.isNode&&!0===t.constructor.prototype.isNode||!1}function R(t){return t&&!0===t.isObjectNode&&!0===t.constructor.prototype.isNode||!1}function $(t){return t&&!0===t.isOperatorNode&&!0===t.constructor.prototype.isNode||!1}function U(t){return t&&!0===t.isParenthesisNode&&!0===t.constructor.prototype.isNode||!1}function L(t){return t&&!0===t.isRangeNode&&!0===t.constructor.prototype.isNode||!1}function Z(t){return t&&!0===t.isRelationalNode&&!0===t.constructor.prototype.isNode||!1}function H(t){return t&&!0===t.isSymbolNode&&!0===t.constructor.prototype.isNode||!1}function V(t){return t&&!0===t.constructor.prototype.isChain||!1}function J(t){var e=typeof t;return"object"===e?null===t?"null":c(t)?"BigNumber":t.constructor&&t.constructor.name?t.constructor.name:"Object":e}function Y(t){var e=typeof t;if("number"===e||"string"===e||"boolean"===e||null===t||void 0===t)return t;if("function"===typeof t.clone)return t.clone();if(Array.isArray(t))return t.map((function(t){return Y(t)}));if(t instanceof Date)return new Date(t.valueOf());if(c(t))return t;if(t instanceof RegExp)throw new TypeError("Cannot clone "+t);return Q(t,Y)}function Q(t,e){var r={};for(var n in t)W(t,n)&&(r[n]=e(t[n]));return r}function X(t,e){var r,n,u;if(Array.isArray(t)){if(!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(n=0,u=t.length;n0?1:t<0?-1:0},ot=Math.log2||function(t){return Math.log(t)/Math.LN2},at=Math.log10||function(t){return Math.log(t)/Math.LN10},st=Math.log1p||function(t){return Math.log(t+1)},ct=Math.cbrt||function(t){if(0===t)return t;var e,r=t<0;return r&&(t=-t),isFinite(t)?(e=Math.exp(Math.log(t)/3),e=(t/(e*e)+2*e)/3):e=t,r?-e:e},ft=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function ht(t,e,r){var n={2:"0b",8:"0o",16:"0x"},u=n[e],i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!ut(r))throw new Error("size must be an integer");if(t>2**(r-1)-1||t<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!ut(t))throw new Error("Value must be an integer");t<0&&(t+=2**r),i="i".concat(r)}var o="";return t<0&&(t=-t,o="-"),"".concat(o).concat(u).concat(t.toString(e)).concat(i)}function lt(t,e){if("function"===typeof e)return e(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var r,n,u="auto";if(e&&(e.notation&&(u=e.notation),s(e)?r=e:s(e.precision)&&(r=e.precision),e.wordSize&&(n=e.wordSize,"number"!==typeof n)))throw new Error('Option "wordSize" must be a number');switch(u){case"fixed":return dt(t,r);case"exponential":return mt(t,r);case"engineering":return Dt(t,r);case"bin":return ht(t,2,n);case"oct":return ht(t,8,n);case"hex":return ht(t,16,n);case"auto":return vt(t,r,e&&e).replace(/((\.\d*?)(0+))($|e)/,(function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e}));default:throw new Error('Unknown notation "'+u+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function pt(t){var e=String(t).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var r=e[1],n=e[2],u=parseFloat(e[4]||"0"),i=n.indexOf(".");u+=-1!==i?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,(function(t){return u-=t.length,""})).replace(/0*$/,"").split("").map((function(t){return parseInt(t)}));return 0===o.length&&(o.push(0),u++),{sign:r,coefficients:o,exponent:u}}function Dt(t,e){if(isNaN(t)||!isFinite(t))return String(t);var r=pt(t),n=gt(r,e),u=n.exponent,i=n.coefficients,o=u%3===0?u:u<0?u-3-u%3:u-u%3;if(s(e))while(e>i.length||u-o+1>i.length)i.push(0);else for(var a=Math.abs(u-o)-(i.length-1),c=0;c0)h++,f--;var l=i.slice(h).join(""),p=s(e)&&l.length||l.match(/[1-9]/)?"."+l:"",D=i.slice(0,h).join("")+p+"e"+(u>=0?"+":"")+o.toString();return n.sign+D}function dt(t,e){if(isNaN(t)||!isFinite(t))return String(t);var r=pt(t),n="number"===typeof e?gt(r,r.exponent+1+e):r,u=n.coefficients,i=n.exponent+1,o=i+(e||0);return u.length0?"."+u.join(""):"")+"e"+(i>=0?"+":"")+i}function vt(t,e,r){if(isNaN(t)||!isFinite(t))return String(t);var n=r&&void 0!==r.lowerExp?r.lowerExp:-3,u=r&&void 0!==r.upperExp?r.upperExp:5,i=pt(t),o=e?gt(i,e):i;if(o.exponent=u)return mt(t,e);var a=o.coefficients,s=o.exponent;a.length0?s:0;return ce){var u=n.splice(e,n.length-e);if(u[0]>=5){var i=e-1;n[i]++;while(10===n[i])n.pop(),0===i&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}}return r}function yt(t){for(var e=[],r=0;r=o&&c=0?"+":"")+n.toString()}function St(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()}function zt(t,e){return t.toFixed(e)}function It(t,e){var r=Ot(t,e);return e&&"object"===typeof e&&"truncate"in e&&r.length>e.truncate?r.substring(0,e.truncate-3)+"...":r}function Ot(t,e){if("number"===typeof t)return lt(t,e);if(c(t))return Nt(t,e);if(jt(t))return e&&"decimal"===e.fraction?t.toString():t.s*t.n+"/"+t.d;if(Array.isArray(t))return kt(t,e);if(p(t))return'"'+t+'"';if("function"===typeof t)return t.syntax?String(t.syntax):"function";if(t&&"object"===typeof t){if("function"===typeof t.format)return t.format(e);if(t&&t.toString(e)!=={}.toString())return t.toString(e);var r=Object.keys(t).map(r=>'"'+r+'": '+It(t[r],e));return"{"+r.join(", ")+"}"}return String(t)}function kt(t,e){if(Array.isArray(t)){for(var r="[",n=t.length,u=0;ue?1:-1}function qt(t,e,r){if(!(this instanceof qt))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=(new Error).stack}function Rt(t,e,r){if(!(this instanceof Rt))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=r),void 0!==this.min&&this.index=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function $t(t){var e=[];while(Array.isArray(t))e.push(t.length),t=t[0];return e}function Ut(t,e,r){var n,u=t.length;if(u!==e[r])throw new qt(u,e[r]);if(r")}function Lt(t,e){var r=0===e.length;if(r){if(Array.isArray(t))throw new qt(t.length,0)}else Ut(t,e,0)}function Zt(t,e){if(!s(t)||!ut(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"===typeof e&&t>=e)throw new Rt(t,e)}function Ht(t,e,r){if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(0===e.length)throw new Error("Resizing to scalar is not supported");e.forEach((function(t){if(!s(t)||!ut(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+It(e)+")")}));var n=void 0!==r?r:0;return Vt(t,e,0,n),t}function Vt(t,e,r,n){var u,i,o=t.length,a=e[r],s=Math.min(o,a);if(t.length=a,r=0,s=e%r===0;if(a){if(!s)throw new Error("Could not replace wildcard, since "+e+" is no multiple of "+-r);n[i]=-e/r}return n}function Qt(t){return t.reduce((t,e)=>t*e,1)}function Xt(t,e){for(var r,n=t,u=e.length-1;u>0;u--){var i=e[u];r=[];for(var o=n.length/i,a=0;a!ne(t)).every(t=>void 0!==r[t]);if(!n){var u=e.filter(t=>void 0===r[t]);throw new Error('Cannot create function "'.concat(t,'", ')+"some dependencies are missing: ".concat(u.map(t=>'"'.concat(t,'"')).join(", "),"."))}}function ne(t){return t&&"?"===t[0]}function ue(t){return t&&"?"===t[0]?t.slice(1):t}qt.prototype=new RangeError,qt.prototype.constructor=RangeError,qt.prototype.name="DimensionError",qt.prototype.isDimensionError=!0,Rt.prototype=new RangeError,Rt.prototype.constructor=RangeError,Rt.prototype.name="IndexError",Rt.prototype.isIndexError=!0;var ie="BigNumber",oe=["?on","config"],ae=ee(ie,oe,t=>{var{on:e,config:r}=t,n=nt.a.clone({precision:r.precision,modulo:nt.a.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(t){return new n(t.value)},e&&e("config",(function(t,e){t.precision!==e.precision&&n.config({precision:t.precision})})),n},{isClass:!0}),se=r("c499"),ce=r.n(se),fe="Complex",he=[],le=ee(fe,he,()=>(Object.defineProperty(ce.a,"name",{value:"Complex"}),ce.a.prototype.constructor=ce.a,ce.a.prototype.type="Complex",ce.a.prototype.isComplex=!0,ce.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ce.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ce.a.prototype.format=function(t){var e="",r=this.im,n=this.re,u=lt(this.re,t),i=lt(this.im,t),o=s(t)?t:t?t.precision:null;if(null!==o){var a=Math.pow(10,-o);Math.abs(n/r)e.re?1:t.ree.im?1:t.im1&&void 0!==arguments[1]?arguments[1]:{};return r=null==r?Number.POSITIVE_INFINITY:r,e=null==e?JSON.stringify:e,function n(){"object"!==typeof n.cache&&(n.cache={values:new Map,lru:pe(r||Number.POSITIVE_INFINITY)});for(var u=[],i=0;i{var{config:r,BigNumber:n}=t;return"BigNumber"===r.number?new n(e):e})}var ye=r("a407"),we=r.n(ye),Ee="Fraction",Fe=[],Ae=ee(Ee,Fe,()=>(Object.defineProperty(we.a,"name",{value:"Fraction"}),we.a.prototype.constructor=we.a,we.a.prototype.type="Fraction",we.a.prototype.isFraction=!0,we.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},we.a.fromJSON=function(t){return new we.a(t)},we.a),{isClass:!0}),Ce="Matrix",xe=[],be=ee(Ce,xe,()=>{function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}return t.prototype.type="Matrix",t.prototype.isMatrix=!0,t.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},t.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},t.prototype.create=function(t,e){throw new Error("Cannot invoke create on a Matrix interface")},t.prototype.subset=function(t,e,r){throw new Error("Cannot invoke subset on a Matrix interface")},t.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},t.prototype.set=function(t,e,r){throw new Error("Cannot invoke set on a Matrix interface")},t.prototype.resize=function(t,e){throw new Error("Cannot invoke resize on a Matrix interface")},t.prototype.reshape=function(t,e){throw new Error("Cannot invoke reshape on a Matrix interface")},t.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},t.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},t.prototype.map=function(t,e){throw new Error("Cannot invoke map on a Matrix interface")},t.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},t.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},t.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},t.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},t.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},t.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},t},{isClass:!0}),Be="DenseMatrix",Me=["Matrix"],_e=ee(Be,Me,t=>{var{Matrix:e}=t;function r(t,e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!p(e))throw new Error("Invalid datatype: "+e);if(d(t))"DenseMatrix"===t.type?(this._data=Y(t._data),this._size=Y(t._size),this._datatype=e||t._datatype):(this._data=t.toArray(),this._size=t.size(),this._datatype=e||t._datatype);else if(t&&D(t.data)&&D(t.size))this._data=t.data,this._size=t.size,Lt(this._data,this._size),this._datatype=e||t.datatype;else if(D(t))this._data=h(t),this._size=$t(this._data),Lt(this._data,this._size),this._datatype=e;else{if(t)throw new TypeError("Unsupported type of data ("+J(t)+")");this._data=[],this._size=[0],this._datatype=e}}function n(t,e){if(!w(e))throw new TypeError("Invalid index");var n=e.isScalar();if(n)return t.get(e.min());var i=e.size();if(i.length!==t._size.length)throw new qt(i.length,t._size.length);for(var o=e.min(),a=e.max(),s=0,c=t._size.length;s");var h=e.max().map((function(t){return t+1}));f(t,h,n);var l=i.length,p=0;o(t._data,e,r,l,p)}return t}function o(t,e,r,n,u){var i=u===n-1,a=e.dimension(u);i?a.forEach((function(e,n){Zt(e),t[e]=r[n[0]]})):a.forEach((function(i,a){Zt(i),o(t[i],e,r[a[0]],n,u+1)}))}function a(t,e,r){if(0===e.length){var n=t._data;while(D(n))n=n[0];return n}return t._size=e.slice(0),t._data=Ht(t._data,t._size,r),t}function f(t,e,r){var n=t._size.slice(0),u=!1;while(n.lengthn[i]&&(n[i]=e[i],u=!0);u&&a(t,n,r)}function h(t){for(var e=0,r=t.length;eArray.isArray(t)&&1===t.length?t[0]:t),u=r?this.clone():this;return a(u,n,e)},r.prototype.reshape=function(t,e){var r=e?this.clone():this;r._data=Jt(r._data,t);var n=r._size.reduce((t,e)=>t*e);return r._size=Yt(t,n),r},r.prototype.clone=function(){var t=new r({data:Y(this._data),size:Y(this._size),datatype:this._datatype});return t},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(t){var e=this,n=de(t),u=function r(u,i){return D(u)?u.map((function(t,e){return r(t,i.concat(e))})):1===n?t(u):2===n?t(u,i):t(u,i,e)},i=u(this._data,[]),o=void 0!==this._datatype?te(i,J):void 0;return new r(i,o)},r.prototype.forEach=function(t){var e=this,r=function r(n,u){D(n)?n.forEach((function(t,e){r(t,u.concat(e))})):t(n,u,e)};r(this._data,[])},r.prototype[Symbol.iterator]=function*(){var t=function*t(e,r){if(D(e))for(var n=0;n[t[n]]);e.push(new r(i,t._datatype))},o=0;o0?t:0,n=t<0?-t:0,u=this._size[0],i=this._size[1],o=Math.min(u-n,i-e),a=[],f=0;f0?n:0,a=n<0?-n:0,f=t[0],h=t[1],l=Math.min(f-a,h-o);if(D(e)){if(e.length!==l)throw new Error("Invalid value array length");i=function(t){return e[t]}}else if(d(e)){var p=e.size();if(1!==p.length||p[0]!==l)throw new Error("Invalid matrix length");i=function(t){return e.get([t])}}else i=function(){return e};u||(u=c(i(0))?i(0).mul(0):0);var m=[];if(t.length>0){m=Ht(m,t,u);for(var v=0;vp&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])*$/.test(t)},{name:"string",test:p},{name:"Chain",test:V},{name:"Array",test:D},{name:"Matrix",test:d},{name:"DenseMatrix",test:v},{name:"SparseMatrix",test:g},{name:"Range",test:y},{name:"Index",test:w},{name:"boolean",test:E},{name:"ResultSet",test:F},{name:"Help",test:A},{name:"function",test:C},{name:"Date",test:x},{name:"RegExp",test:b},{name:"null",test:M},{name:"undefined",test:_},{name:"AccessorNode",test:N},{name:"ArrayNode",test:T},{name:"AssignmentNode",test:S},{name:"BlockNode",test:z},{name:"ConditionalNode",test:I},{name:"ConstantNode",test:O},{name:"FunctionNode",test:j},{name:"FunctionAssignmentNode",test:k},{name:"IndexNode",test:P},{name:"Node",test:q},{name:"ObjectNode",test:R},{name:"OperatorNode",test:$},{name:"ParenthesisNode",test:U},{name:"RangeNode",test:L},{name:"RelationalNode",test:Z},{name:"SymbolNode",test:H},{name:"Map",test:$e},{name:"Object",test:B}]),i.addConversions([{from:"number",to:"BigNumber",convert:function(t){if(e||He(t),wt(t)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+t+"). Use function bignumber(x) to convert to BigNumber.");return new e(t)}},{from:"number",to:"Complex",convert:function(t){return r||Ve(t),new r(t,0)}},{from:"BigNumber",to:"Complex",convert:function(t){return r||Ve(t),new r(t.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(t){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(t){return r||Ve(t),new r(t.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(t){u||Ye(t);var e=new u(t);if(e.valueOf()!==t)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+t+"). Use function fraction(x) to convert to Fraction.");return e}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw new Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(t){e||He(t);try{return new e(t)}catch(r){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){u||Ye(t);try{return new u(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){r||Ve(t);try{return new r(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(t){return e||He(t),new e(+t)}},{from:"boolean",to:"Fraction",convert:function(t){return u||Ye(t),new u(+t)}},{from:"boolean",to:"string",convert:function(t){return String(t)}},{from:"Array",to:"Matrix",convert:function(t){return n||Je(),new n(t)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}]),i.onMismatch=(t,e,r)=>{var n=i.createError(t,e,r);if(["wrongType","mismatch"].includes(n.data.category)&&1===e.length&&m(e[0])&&r.some(t=>!t.params.includes(","))){var u=new TypeError("Function '".concat(t,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(t,")'."));throw u.data=n.data,u}throw n},i.onMismatch=(t,e,r)=>{var n=i.createError(t,e,r);if(["wrongType","mismatch"].includes(n.data.category)&&1===e.length&&m(e[0])&&r.some(t=>!t.params.includes(","))){var u=new TypeError("Function '".concat(t,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(t,")'."));throw u.data=n.data,u}throw n},i}));function He(t){throw new Error("Cannot convert value ".concat(t," into a BigNumber: no class 'BigNumber' provided"))}function Ve(t){throw new Error("Cannot convert value ".concat(t," into a Complex number: no class 'Complex' provided"))}function Je(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Ye(t){throw new Error("Cannot convert value ".concat(t," into a Fraction, no class 'Fraction' provided."))}function Qe(t,e,r){return t&&"function"===typeof t.map?t.map((function(t){return Qe(t,e,r)})):e(t)}var Xe="number",We="number, number";function Ge(t){return Math.abs(t)}function Ke(t,e){return t+e}function tr(t,e){return t-e}function er(t,e){return t*e}function rr(t,e){return t/e}function nr(t){return-t}function ur(t){return t}function ir(t){return ct(t)}function or(t){return t*t*t}function ar(t){return Math.exp(t)}function sr(t){return ft(t)}function cr(t,e){if(!ut(t)||!ut(e))throw new Error("Parameters in function gcd must be integer numbers");var r;while(0!==e)r=t%e,t=e,e=r;return t<0?-t:t}function fr(t,e){if(!ut(t)||!ut(e))throw new Error("Parameters in function lcm must be integer numbers");if(0===t||0===e)return 0;var r,n=t*e;while(0!==e)r=e,e=t%r,t=r;return Math.abs(n/t)}function hr(t){return at(t)}function lr(t){return ot(t)}function pr(t){return st(t)}function Dr(t,e){if(e>0)return t-e*Math.floor(t/e);if(0===e)return t;throw new Error("Cannot calculate mod for a negative divisor")}function dr(t){return it(t)}function mr(t){return Math.sqrt(t)}function vr(t){return t*t}function gr(t,e){var r,n,u,i,o=0,a=1,s=1,c=0;if(!ut(t)||!ut(e))throw new Error("Parameters in function xgcd must be integer numbers");while(e)n=Math.floor(t/e),u=t-n*e,r=o,o=a-n*o,a=r,r=s,s=c-n*s,c=r,t=e,e=u;return i=t<0?[-t,-a,-c]:[t,t?a:0,c],i}function yr(t,e){return t*t<1&&e===1/0||t*t>1&&e===-1/0?0:Math.pow(t,e)}function wr(t){return Math.abs(t)}Ge.signature=Xe,Ke.signature=We,tr.signature=We,er.signature=We,rr.signature=We,nr.signature=Xe,ur.signature=Xe,ir.signature=Xe,or.signature=Xe,ar.signature=Xe,sr.signature=Xe,cr.signature=We,fr.signature=We,hr.signature=Xe,lr.signature=Xe,pr.signature=Xe,Dr.signature=We,dr.signature=Xe,mr.signature=Xe,vr.signature=Xe,gr.signature=We,yr.signature=We,wr.signature=Xe;var Er="number",Fr="number, number";function Ar(t){return Math.acos(t)}function Cr(t){return At(t)}function xr(t){return Math.atan(1/t)}function br(t){return isFinite(t)?(Math.log((t+1)/t)+Math.log(t/(t-1)))/2:0}function Br(t){return Math.asin(1/t)}function Mr(t){var e=1/t;return Math.log(e+Math.sqrt(e*e+1))}function _r(t){return Math.acos(1/t)}function Nr(t){var e=1/t,r=Math.sqrt(e*e-1);return Math.log(r+e)}function Tr(t){return Math.asin(t)}function Sr(t){return Ct(t)}function zr(t){return Math.atan(t)}function Ir(t,e){return Math.atan2(t,e)}function Or(t){return xt(t)}function kr(t){return Math.cos(t)}function jr(t){return bt(t)}function Pr(t){return 1/Math.tan(t)}function qr(t){var e=Math.exp(2*t);return(e+1)/(e-1)}function Rr(t){return 1/Math.sin(t)}function $r(t){return 0===t?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(t)-Math.exp(-t)))*it(t)}function Ur(t){return 1/Math.cos(t)}function Lr(t){return 2/(Math.exp(t)+Math.exp(-t))}function Zr(t){return Math.sin(t)}function Hr(t){return Bt(t)}function Vr(t){return Math.tan(t)}function Jr(t){return Mt(t)}Ar.signature=Er,Cr.signature=Er,xr.signature=Er,br.signature=Er,Br.signature=Er,Mr.signature=Er,_r.signature=Er,Nr.signature=Er,Tr.signature=Er,Sr.signature=Er,zr.signature=Er,Ir.signature=Fr,Or.signature=Er,kr.signature=Er,jr.signature=Er,Pr.signature=Er,qr.signature=Er,Rr.signature=Er,$r.signature=Er,Ur.signature=Er,Lr.signature=Er,Zr.signature=Er,Hr.signature=Er,Vr.signature=Er,Jr.signature=Er;var Yr="addScalar",Qr=["typed"],Xr=ee(Yr,Qr,t=>{var{typed:e}=t;return e(Yr,{"number, number":Ke,"Complex, Complex":function(t,e){return t.add(e)},"BigNumber, BigNumber":function(t,e){return t.plus(e)},"Fraction, Fraction":function(t,e){return t.add(e)},"Unit, Unit":e.referToSelf(t=>(r,n)=>{if(null===r.value||void 0===r.value)throw new Error("Parameter x contains a unit with undefined value");if(null===n.value||void 0===n.value)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(n))throw new Error("Units do not match");var u=r.clone();return u.value=e.find(t,[u.valueType(),n.valueType()])(u.value,n.value),u.fixPrefix=!1,u})})}),Wr="bignumber",Gr=["typed","BigNumber"],Kr=ee(Wr,Gr,t=>{var{typed:e,BigNumber:r}=t;return e("bignumber",{"":function(){return new r(0)},number:function(t){return new r(t+"")},string:function(t){var e=t.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(e){var n=e[2],u=r(e[1]),i=new r(2).pow(Number(n));if(u.gt(i.sub(1)))throw new SyntaxError('String "'.concat(t,'" is out of range'));var o=new r(2).pow(Number(n)-1);return u.gte(o)?u.sub(i):u}return new r(t)},BigNumber:function(t){return t},Fraction:function(t){return new r(t.n).div(t.d).times(t.s)},null:function(t){return new r(0)},"Array | Matrix":e.referToSelf(t=>e=>Qe(e,t))})});var tn="number",en="number, number";function rn(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function bitAnd");return t&e}function nn(t){if(!ut(t))throw new Error("Integer expected in function bitNot");return~t}function un(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function bitOr");return t|e}function on(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function bitXor");return t^e}function an(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function leftShift");return t<>e}function cn(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function rightLogShift");return t>>>e}rn.signature=en,nn.signature=tn,un.signature=en,on.signature=en,an.signature=en,sn.signature=en,cn.signature=en;function fn(t,e){if(e>1;return fn(t,r)*fn(r+1,e)}function hn(t,e){if(!ut(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(!ut(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(e>t)throw new TypeError("k must be less than or equal to n");for(var r=t-e,n=1,u=e{var{typed:e}=t;return e(ln,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.conjugate(),"Array | Matrix":e.referToSelf(t=>e=>Qe(e,t))})});function dn(t,e,r){if(null===r||void 0===r)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var n=t.minus(e).abs();if(n.isZero())return!0;var u=t.constructor.max(t.abs(),e.abs());return n.lte(u.times(r))}return!1}function mn(t,e,r){return Ft(t.re,e.re,r)&&Ft(t.im,e.im,r)}var vn=ee("compareUnits",["typed"],t=>{var{typed:e}=t;return{"Unit, Unit":e.referToSelf(t=>(r,n)=>{if(!r.equalBase(n))throw new Error("Cannot compare units with different base");return e.find(t,[r.valueType(),n.valueType()])(r.value,n.value)})}}),gn="equalScalar",yn=["typed","config"],wn=ee(gn,yn,t=>{var{typed:e,config:r}=t,n=vn({typed:e});return e(gn,{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,e){return Ft(t,e,r.epsilon)},"BigNumber, BigNumber":function(t,e){return t.eq(e)||dn(t,e,r.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){return mn(t,e,r.epsilon)}},n)});ee(gn,["typed","config"],t=>{var{typed:e,config:r}=t;return e(gn,{"number, number":function(t,e){return Ft(t,e,r.epsilon)}})}),Math.pow(2,53);var En="hex",Fn=["typed","format"],An=(ee(En,Fn,t=>{var{typed:e,format:r}=t;return e(En,{"number | BigNumber":function(t){return r(t,{notation:"hex"})},"number | BigNumber, number":function(t,e){return r(t,{notation:"hex",wordSize:e})}})}),"number");function Cn(t){return ut(t)}function xn(t){return t<0}function bn(t){return t>0}function Bn(t){return 0===t}function Mn(t){return Number.isNaN(t)}Cn.signature=An,xn.signature=An,bn.signature=An,Bn.signature=An,Mn.signature=An;function _n(t){var e;if(ut(t))return t<=0?isFinite(t)?1/0:NaN:t>171?1/0:fn(1,t-1);if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*_n(1-t));if(t>=171.35)return 1/0;if(t>85){var r=t*t,n=r*t,u=n*t,i=u*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*r)-139/(51840*n)-571/(2488320*u)+163879/(209018880*i)+5246819/(75246796800*i*t))}--t,e=Tn[0];for(var o=1;o=1;n--)r+=On[n]/(t+n);return Sn+(t+.5)*Math.log(e)-e+Math.log(r)}kn.signature="number";var jn="multiplyScalar",Pn=["typed"],qn=ee(jn,Pn,t=>{var{typed:e}=t;return e("multiplyScalar",{"number, number":er,"Complex, Complex":function(t,e){return t.mul(e)},"BigNumber, BigNumber":function(t,e){return t.times(e)},"Fraction, Fraction":function(t,e){return t.mul(e)},"number | Fraction | BigNumber | Complex, Unit":(t,e)=>e.multiply(t),"Unit, number | Fraction | BigNumber | Complex | Unit":(t,e)=>t.multiply(e)})}),Rn="number",$n="number, number";function Un(t){return!t}function Ln(t,e){return!(!t&&!e)}function Zn(t,e){return!!t!==!!e}function Hn(t,e){return!(!t||!e)}Un.signature=Rn,Ln.signature=$n,Zn.signature=$n,Hn.signature=$n;var Vn="oct",Jn=["typed","format"],Yn=(ee(Vn,Jn,t=>{var{typed:e,format:r}=t;return e(Vn,{"number | BigNumber":function(t){return r(t,{notation:"oct"})},"number | BigNumber, number":function(t,e){return r(t,{notation:"oct",wordSize:e})}})}),r("361a")),Qn=r.n(Yn);Date.now();var Xn="SparseMatrix",Wn=["typed","equalScalar","Matrix"],Gn=ee(Xn,Wn,t=>{var{typed:e,equalScalar:r,Matrix:n}=t;function u(t,e){if(!(this instanceof u))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!p(e))throw new Error("Invalid datatype: "+e);if(d(t))i(this,t,e);else if(t&&D(t.index)&&D(t.ptr)&&D(t.size))this._values=t.values,this._index=t.index,this._ptr=t.ptr,this._size=t.size,this._datatype=e||t.datatype;else if(D(t))o(this,t,e);else{if(t)throw new TypeError("Unsupported type of data ("+J(t)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=e}}function i(t,e,r){"SparseMatrix"===e.type?(t._values=e._values?Y(e._values):void 0,t._index=Y(e._index),t._ptr=Y(e._ptr),t._size=Y(e._size),t._datatype=r||e._datatype):o(t,e.valueOf(),r||e._datatype)}function o(t,n,u){t._values=[],t._index=[],t._ptr=[],t._datatype=u;var i=n.length,o=0,a=r,s=0;if(p(u)&&(a=e.find(r,[u,u])||r,s=e.convert(0,u)),i>0){var c=0;do{t._ptr.push(t._index.length);for(var f=0;f");if(1===i.length){var c=e.dimension(0);c.forEach((function(e,u){Zt(e),t.set([e,0],r[u[0]],n)}))}else{var f=e.dimension(0),h=e.dimension(1);f.forEach((function(e,u){Zt(e),h.forEach((function(i,o){Zt(i),t.set([e,i],r[u[0]][o[0]],n)}))}))}}return t}function h(t,e,r,n){if(r-e===0)return r;for(var u=e;ud){for(f=d;fD){if(l){var m=0;for(f=0;fn-1&&(t._values.splice(h,1),t._index.splice(h,1),g++)}t._ptr[f]=t._values.length}return t._size[0]=n,t._size[1]=u,t}function y(t,n,i,o,a,s,c){var f=[],h=[],l=[],D=r,d=0;p(t._datatype)&&(D=e.find(r,[t._datatype,t._datatype])||r,d=e.convert(0,t._datatype));for(var m=function(t,e,r){t=s(t,e,r),D(t,d)||(f.push(t),h.push(e))},v=o;v<=a;v++){l.push(f.length);var g=t._ptr[v],y=t._ptr[v+1];if(c)for(var w=g;w=n&&E<=i&&m(t._values[w],E-n,v-o)}else{for(var F={},A=g;Aa-1||o>s-1)&&(g(this,Math.max(i+1,a),Math.max(o+1,s),u),a=this._size[0],s=this._size[1]),Zt(i,a),Zt(o,s);var d=h(i,this._ptr[o],this._ptr[o+1],this._index);return dArray.isArray(t)&&1===t.length?t[0]:t);if(2!==n.length)throw new Error("Only two dimensions matrix are supported");n.forEach((function(t){if(!s(t)||!ut(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+It(n)+")")}));var u=r?this.clone():this;return g(u,n[0],n[1],e)},u.prototype.reshape=function(t,e){if(!D(t))throw new TypeError("Array expected");if(2!==t.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");t.forEach((function(e){if(!s(e)||!ut(e)||e<=-2||0===e)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+It(t)+")")}));var r=this._size[0]*this._size[1];t=Yt(t,r);var n=t[0]*t[1];if(r!==n)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var u=e?this.clone():this;if(this._size[0]===t[0]&&this._size[1]===t[1])return u;for(var i=[],o=0;o "+(this._values?It(this._values[s],t):"X")}return u},u.prototype.toString=function(){return It(this.toArray())},u.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},u.prototype.diagonal=function(t){if(t){if(c(t)&&(t=t.toNumber()),!s(t)||!ut(t))throw new TypeError("The parameter k must be an integer number")}else t=0;var e=t>0?t:0,r=t<0?-t:0,n=this._size[0],i=this._size[1],o=Math.min(n-r,i-e),a=[],f=[],h=[];h[0]=0;for(var l=e;l0?i:0,v=i<0?-i:0,g=t[0],y=t[1],w=Math.min(g-v,y-m);if(D(n)){if(n.length!==w)throw new Error("Invalid value array length");l=function(t){return n[t]}}else if(d(n)){var E=n.size();if(1!==E.length||E[0]!==w)throw new Error("Invalid matrix length");l=function(t){return n.get([t])}}else l=function(){return n};for(var F=[],A=[],C=[],x=0;x=0&&b=s||u[f]!==e)){var p=n?n[c]:void 0;u.splice(f,0,e),n&&n.splice(f,0,p),u.splice(f<=c?c+1:c,1),n&&n.splice(f<=c?c+1:c,1)}else if(f=s||u[c]!==t)){var D=n?n[f]:void 0;u.splice(c,0,t),n&&n.splice(c,0,D),u.splice(c<=f?f+1:f,1),n&&n.splice(c<=f?f+1:f,1)}}},u},{isClass:!0});var Kn="bin",tu=["typed","format"];ee(Kn,tu,t=>{var{typed:e,format:r}=t;return e(Kn,{"number | BigNumber":function(t){return r(t,{notation:"bin"})},"number | BigNumber, number":function(t,e){return r(t,{notation:"bin",wordSize:e})}})});var eu="matrix",ru=["typed","Matrix","DenseMatrix","SparseMatrix"],nu=ee(eu,ru,t=>{var{typed:e,Matrix:r,DenseMatrix:n,SparseMatrix:u}=t;return e(eu,{"":function(){return i([])},string:function(t){return i([],t)},"string, string":function(t,e){return i([],t,e)},Array:function(t){return i(t)},Matrix:function(t){return i(t,t.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(t,e,r){if("dense"===e||"default"===e||void 0===e)return new n(t,r);if("sparse"===e)return new u(t,r);throw new TypeError("Unknown matrix type "+JSON.stringify(e)+".")}});function uu(){throw new Error('No "matrix" implementation available')}var iu="size",ou=["typed","config","?matrix"],au=ee(iu,ou,t=>{var{typed:e,config:r,matrix:n}=t;return e(iu,{Matrix:function(t){return t.create(t.size())},Array:$t,string:function(t){return"Array"===r.matrix?[t.length]:n([t.length])},"number | Complex | BigNumber | Unit | boolean | null":function(t){return"Array"===r.matrix?[]:n?n([]):uu()}})});var su="matAlgo11xS0s",cu=["typed","equalScalar"],fu=ee(su,cu,t=>{var{typed:e,equalScalar:r}=t;return function(t,n,u,i){var o=t._values,a=t._index,s=t._ptr,c=t._size,f=t._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h,l=c[0],p=c[1],D=r,d=0,m=u;"string"===typeof f&&(h=f,D=e.find(r,[h,h]),d=e.convert(0,h),n=e.convert(n,h),m=e.find(u,[h,h]));for(var v=[],g=[],y=[],w=0;w{var{typed:e}=t;return function(t,n,u,i){var o,a=t._data,s=t._size,c=t._datatype,f=u;"string"===typeof c&&(o=c,n=e.convert(n,o),f=e.find(u,[o,o]));var h=s.length>0?r(f,0,s,s[0],a,n,i):[];return t.createDenseMatrix({data:h,size:Y(s),datatype:o})};function r(t,e,n,u,i,o,a){var s=[];if(e===n.length-1)for(var c=0;c{var{typed:e,equalScalar:r}=t;return e(Du,{"any, any":function(t,e){return null===t?null===e:null===e?null===t:void 0===t?void 0===e:void 0===e?void 0===t:r(t,e)}})});function du(t,e,r,n){if(!(this instanceof du))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+r+(void 0!==n&&null!==n?"-"+n:"")+" expected)",this.stack=(new Error).stack}du.prototype=new Error,du.prototype.constructor=Error,du.prototype.name="ArgumentsError",du.prototype.isArgumentsError=!0;var mu="number | BigNumber | Fraction | Matrix | Array";"".concat(mu,", ").concat(mu,", ...").concat(mu);var vu="unequal";ee(vu,["typed","equalScalar"],t=>{var{typed:e,equalScalar:r}=t;return e(vu,{"any, any":function(t,e){return null===t?null!==e:null===e?null!==t:void 0===t?void 0!==e:void 0===e?void 0!==t:!r(t,e)}})});Pt.signature="any, any";var gu="dot",yu=["typed","addScalar","multiplyScalar","conj","size"],wu=ee(gu,yu,t=>{var{typed:e,addScalar:r,multiplyScalar:n,conj:u,size:i}=t;return e(gu,{"Array | DenseMatrix, Array | DenseMatrix":a,"SparseMatrix, SparseMatrix":s});function o(t,e){var r,n,u=c(t),i=c(e);if(1===u.length)r=u[0];else{if(2!==u.length||1!==u[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+u.join(", ")+")");r=u[0]}if(1===i.length)n=i[0];else{if(2!==i.length||1!==i[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+i.join(", ")+")");n=i[0]}if(r!==n)throw new RangeError("Vectors must have equal length ("+r+" != "+n+")");if(0===r)throw new RangeError("Cannot calculate the dot product of empty vectors");return r}function a(t,i){var a=o(t,i),s=d(t)?t._data:t,f=d(t)?t._datatype:void 0,h=d(i)?i._data:i,l=d(i)?i._datatype:void 0,p=2===c(t).length,D=2===c(i).length,m=r,v=n;if(f&&l&&f===l&&"string"===typeof f){var g=f;m=e.find(r,[g,g]),v=e.find(n,[g,g])}if(!p&&!D){for(var y=v(u(s[0]),h[0]),w=1;wd?p++:D===d&&(c=f(c,h(i[l],s[p])),l++,p++)}return c}function c(t){return d(t)?t.size():i(t)}}),Eu="multiply",Fu=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Au=ee(Eu,Fu,t=>{var{typed:e,matrix:r,addScalar:n,multiplyScalar:u,equalScalar:i,dot:o}=t,a=fu({typed:e,equalScalar:i}),s=pu({typed:e});function c(t,e){switch(t.length){case 1:switch(e.length){case 1:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+t[0]+") must match Matrix rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;case 2:switch(e.length){case 1:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+t[1]+") must match Vector length ("+e[0]+")");break;case 2:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+t[1]+") must match Matrix B rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+t.length+" dimensions)")}}function f(t,e,r){if(0===r)throw new Error("Cannot multiply two empty vectors");return o(t,e)}function h(t,e){if("dense"!==e.storage())throw new Error("Support for SparseMatrix not implemented");return l(t,e)}function l(t,r){var i,o=t._data,a=t._size,s=t._datatype,c=r._data,f=r._size,h=r._datatype,l=a[0],p=f[1],D=n,d=u;s&&h&&s===h&&"string"===typeof s&&(i=s,D=e.find(n,[i,i]),d=e.find(u,[i,i]));for(var m=[],v=0;vb)for(var M=0,_=0;_(e,n)=>{c($t(e),$t(n));var u=t(r(e),r(n));return d(u)?u.valueOf():u}),"Matrix, Matrix":function(t,e){var r=t.size(),n=e.size();return c(r,n),1===r.length?1===n.length?f(t,e,r[0]):h(t,e):1===n.length?p(t,e):D(t,e)},"Matrix, Array":e.referTo("Matrix,Matrix",t=>(e,n)=>t(e,r(n))),"Array, Matrix":e.referToSelf(t=>(e,n)=>t(r(e,n.storage()),n)),"SparseMatrix, any":function(t,e){return a(t,e,u,!1)},"DenseMatrix, any":function(t,e){return s(t,e,u,!1)},"any, SparseMatrix":function(t,e){return a(e,t,u,!0)},"any, DenseMatrix":function(t,e){return s(e,t,u,!0)},"Array, any":function(t,e){return s(r(t),e,u,!1).valueOf()},"any, Array":function(t,e){return s(r(e),t,u,!0).valueOf()},"any, any":u,"any, any, ...any":e.referToSelf(t=>(e,r,n)=>{for(var u=t(e,r),i=0;i