Comparing version 1.3.0 to 1.3.1
@@ -17,3 +17,3 @@ try{ | ||
'1.2.27', '1.2.28', '1.2.29', '1.2.30', '1.2.31', | ||
'1.2.32', '1.3.0' | ||
'1.2.32', '1.3.0', '1.3.1' | ||
]; a_calc_versions; | ||
@@ -20,0 +20,0 @@ } |
@@ -1,1 +0,1 @@ | ||
var a_calc=function(exports){"use strict";function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},e=Object.prototype,c=e.hasOwnProperty,l=Object.defineProperty||function(e,t,r){e[t]=r.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag";function i(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o,i,a,s,t=t&&t.prototype instanceof h?t:h,t=Object.create(t.prototype),n=new S(n||[]);return l(t,"_invoke",{value:(o=e,i=r,a=n,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return E()}for(a.method=e,a.arg=t;;){var r=a.delegate;if(r){r=function e(t,r){var n=r.method,o=t.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=void 0,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;n=u(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}(r,a);if(r){if(r===f)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";r=u(o,i,a);if("normal"===r.type){if(s=a.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s="completed",a.method="throw",a.arg=r.arg)}})}),t}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var f={};function h(){}function p(){}function g(){}var t={},_=(i(t,n,function(){return this}),Object.getPrototypeOf),_=_&&_(_(w([]))),d=(_&&_!==e&&c.call(_,n)&&(t=_),g.prototype=h.prototype=Object.create(t));function b(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function y(a,s){var t;l(this,"_invoke",{value:function(r,n){function e(){return new s(function(e,t){!function t(e,r,n,o){var i,e=u(a[e],a,r);if("throw"!==e.type)return(r=(i=e.arg).value)&&"object"==typeof r&&c.call(r,"__await")?s.resolve(r.__await).then(function(e){t("next",e,n,o)},function(e){t("throw",e,n,o)}):s.resolve(r).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,o)});o(e.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}})}function m(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(m,this),this.reset(!0)}function w(t){if(t){var r,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(e=function e(){for(;++r<t.length;)if(c.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e}).next=e}return{next:E}}function E(){return{value:void 0,done:!0}}return l(d,"constructor",{value:p.prototype=g,configurable:!0}),l(g,"constructor",{value:p,configurable:!0}),p.displayName=i(g,o,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,i(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e},a.awrap=function(e){return{__await:e}},b(y.prototype),i(y.prototype,r,function(){return this}),a.AsyncIterator=y,a.async=function(e,t,r,n,o){void 0===o&&(o=Promise);var i=new y(s(e,t,r,n),o);return a.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},b(d),i(d,o,"Generator"),i(d,n,function(){return this}),i(d,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=w,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return i.type="throw",i.arg=r,n.next=e,t&&(n.method="next",n.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=c.call(o,"catchLoc"),s=c.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,v(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},a}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(s){return function(){var e=this,a=arguments;return new Promise(function(t,r){var n=s.apply(e,a);function o(e){asyncGeneratorStep(n,t,r,o,i,"next",e)}function i(e){asyncGeneratorStep(n,t,r,o,i,"throw",e)}o(void 0)})}}function _defineProperty(e,t,r){(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==typeof e?e:String(e)}var version="1.3.0",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function is_operator(e){return-1<"+-*/%()**".indexOf(e)}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r,n=null,o=null,i=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],a=0;a<i.length;a++){var s=e.match(i[a]);if(s){t=s;break}}return t&&(o=t[1],""!==(r=t[2]).trim())&&(n=r),{num:o,unit:n}}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]});else{if(!/[Nn]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number",value:e[1]})}e=e.slice(2)}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol)/\s/.test(o)?e=e.slice(1):symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial);else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o))e=e.slice(1);else{if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}}if(0<r.length&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),1<n.filter(function(e){return"number"===e.type}).length)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{var n=!(e[symToStringTag$1]=void 0)}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:(symToStringTag&&symToStringTag in Object(e)?getRawTag:objectToString)(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){var r;return!isArray$2(e)&&(!("number"!=(r=_typeof(e))&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){return!!isObject$1(e)&&((e=baseGetTag(e))==funcTag||e==genTag||e==asyncTag||e==proxyTag)}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){e=getValue(e,t);return baseIsNative(e)?e:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){e=this.has(e)&&delete this.__data__[e];return this.size-=e?1:0,e}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t,r=this.__data__;return nativeCreate$2?(t=r[e])===HASH_UNDEFINED$1?void 0:t:hasOwnProperty$1.call(r,e)?r[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,e=assocIndexOf$3(t,e);return!(e<0||(e==t.length-1?t.pop():splice.call(t,e,1),--this.size,0))}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,e=assocIndexOf$2(t,e);return e<0?void 0:t[e][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return-1<assocIndexOf$1(this.__data__,e)}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){e=e.__data__;return isKeyable(t)?e["string"==typeof t?"string":"hash"]:e.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){e=getMapData$3(this,e).delete(e);return this.size-=e?1:0,e}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(n,o){if("function"!=typeof n||null!=o&&"function"!=typeof o)throw new TypeError(FUNC_ERROR_TEXT);function i(){var e=arguments,t=o?o.apply(this,e):e[0],r=i.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),i.cache=r.set(t,e)||r,e)}return i.cache=new(memoize$1.Cache||MapCache),i}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var e=memoize(e,function(e){return t.size===MAX_MEMOIZE_SIZE&&t.clear(),e}),t=e.cache;return e}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(e){var o=[];return 46===e.charCodeAt(0)&&o.push(""),e.replace(rePropName,function(e,t,r,n){o.push(r?n.replace(reEscapeChar,"$1"):t||e)}),o}),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){var t;return"string"==typeof e?e:isArray$1(e)?arrayMap(e,baseToString$1)+"":isSymbol$1(e)?symbolToString?symbolToString.call(e):"":"0"==(t=e+"")&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){var t;return"string"==typeof e||isSymbol(e)?e:"0"==(t=e+"")&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){e=null==e?void 0:baseGet(e,t);return void 0===e?r:e}var get_1=get;function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1},n=(not_undefined(n)&&(o.options=n),get_1(n,"_error",!1));if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(""===(t=r).trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===n)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}e=t.split("|");if(o.expr=e[0],1<e.length){n=e[1];if(""!==n.trim())try{o.fmt_tokens=fmt_tokenizer(n)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var i,r=[];try{r=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}null===o.fmt_tokens?o.fmt_tokens=r:(i=o.fmt_tokens.map(function(e){return e.type}),r.forEach(function(e){i.includes(e.type)||o.fmt_tokens.push(e)}))}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r,n,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=state.initial,a=[],s=[],c=function(){a.push(t),e=e.slice(1)},l=function(e){s.push({type:e,value:a.join("")}),a.length=0},u=function(){e=e.slice(1)};e;)switch(t=e[0],i){case state.initial:if(signed.includes(t)){var f=s.at(-1),i=0===s.length||"operator"===f.type||"("===f?state.number:state.operator;c()}else if(operator.includes(t))i=state.operator,c();else if(/\d/.test(t))i=state.number,c();else if(brackets.includes(t))i=state.bracket;else if(/[a-zA-Z_$]/.test(t))i=state.var,c();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));u()}break;case state.bracket:s.push({type:state.bracket,value:t}),u(),i=state.initial;break;case state.operator:f=a.at(-1);"*"===t&&"*"===f&&c(),l(state.operator),i=state.initial;break;case state.number:if(/\d/.test(t))c();else if("."===t){if(0===a.length||a.includes("."))throw new Error("非法的小数部分".concat(a.join("")));c()}else"Ee".includes(t)?(i=state.scientific,c()):["auto","on",!0].includes(o)&&/[^*/+\-()\s]/.test(t)||"space"===o&&/\S/.test(t)?c():(l(state.number),i=state.initial);break;case state.scientific:/\d/.test(t)?c():signed.includes(t)?(r=a.slice(1),n=a.at(-1),r.includes(t)||!/[Ee]/.test(n)?(l(state.scientific),i=state.initial):c()):["auto","on",!0].includes(o)&&/[^*/+\-()\s]/.test(t)||"space"===o&&/\S/.test(t)?c():(l(state.scientific),i=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?c():(l(state.var),i=state.initial);break;default:throw new Error("状态错误")}return 0!==a.length&&(s.push({type:i,value:a.join("")}),a.length=0,i=state.initial),s}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"!==i.type)n.push(i);else{if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],c=get_1(c,i.value);if(void 0!==c){a=c;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}}return n}function token2postfix(e){for(var t=[],r=[],n=e.map(function(e){return e.value});0<n.length;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&0<t.length;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&0<t.length;)r.push(t.pop());t.push(o)}else r.push(o)}if(0<t.length){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;0<t.length;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var d,f,h,t,l,b,a,s,c,u,p,r=x.prototype={constructor:x,toString:null,valueOf:null},g=new x(1),y=20,m=4,_=-7,v=21,S=-1e7,w=1e7,E=!1,o=1,$=0,O={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},C="0123456789abcdefghijklmnopqrstuvwxyz",A=!0;function x(e,t){var r,n,o,i,a,s,c,l,u=this;if(!(u instanceof x))return new x(e,t);if(null==t){if(e&&!0===e._isBigNumber)return u.s=e.s,void(!e.c||e.e>w?u.c=u.e=null:e.e<S?u.c=[u.e=0]:(u.e=e.e,u.c=e.c.slice()));if((s="number"==typeof e)&&0*e==0){if(u.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;10<=a;a/=10,i++);return void(w<i?u.c=u.e=null:(u.e=i,u.c=[e]))}l=String(e)}else{if(!isNumeric.test(l=String(e)))return h(u,l,s);u.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}0<(a=(l=-1<(i=l.indexOf("."))?l.replace(".",""):l).search(/e/i))?(i<0&&(i=a),i+=+l.slice(a+1),l=l.substring(0,a)):i<0&&(i=l.length)}else{if(intCheck(t,2,C.length,"Base"),10==t&&A)return P(u=new x(e),y+u.e+1,m);if(l=String(e),s="number"==typeof e){if(0*e!=0)return h(u,l,s,t);if(u.s=1/e<0?(l=l.slice(1),-1):1,x.DEBUG&&15<l.replace(/^0\.0*|\./,"").length)throw Error(tooManyDigits+e)}else u.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=C.slice(0,t),i=a=0,c=l.length;a<c;a++)if(r.indexOf(n=l.charAt(a))<0){if("."==n){if(i<a){i=c;continue}}else if(!o&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){o=!0,a=-1,i=0;continue}return h(u,String(e),s,t)}s=!1,-1<(i=(l=f(l,t,10,u.s)).indexOf("."))?l=l.replace(".",""):i=l.length}for(a=0;48===l.charCodeAt(a);a++);for(c=l.length;48===l.charCodeAt(--c););if(l=l.slice(a,++c)){if(c-=a,s&&x.DEBUG&&15<c&&(MAX_SAFE_INTEGER<e||e!==mathfloor(e)))throw Error(tooManyDigits+u.s*e);if((i=i-a-1)>w)u.c=u.e=null;else if(i<S)u.c=[u.e=0];else{if(u.e=i,u.c=[],a=(i+1)%LOG_BASE,i<0&&(a+=LOG_BASE),a<c){for(a&&u.c.push(+l.slice(0,a)),c-=LOG_BASE;a<c;)u.c.push(+l.slice(a,a+=LOG_BASE));a=LOG_BASE-(l=l.slice(a)).length}else a-=c;for(;a--;l+="0");u.c.push(+l)}}else u.c=[u.e=0]}function T(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)r-1<a[o]&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}function N(e,t,r){var n,o,i,a=0,s=e.length,c=t%SQRT_BASE,l=t/SQRT_BASE|0;for(e=e.slice();s--;)a=((o=c*(i=e[s]%SQRT_BASE)+(n=l*i+(i=e[s]/SQRT_BASE|0)*c)%SQRT_BASE*SQRT_BASE+a)/r|0)+(n/SQRT_BASE|0)+l*i,e[s]=o%r;return e=a?[a].concat(e):e}function k(e,t,r,n){var o,i;if(r!=n)i=n<r?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function j(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&1<e.length;e.splice(0,1));}function n(e,t,r,n){var o,i,a,s;if(null==r?r=m:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],i=e.e,null==t)s=coeffToString(e.c),s=1==n||2==n&&(i<=_||v<=i)?toExponential(s,i):toFixedPoint(s,i,"0");else if(r=(e=P(new x(e),t,r)).e,a=(s=coeffToString(e.c)).length,1==n||2==n&&(t<=r||r<=_)){for(;a<t;s+="0",a++);s=toExponential(s,r)}else if(t-=i,s=toFixedPoint(s,r,"0"),a<r+1){if(0<--t)for(s+=".";t--;s+="0");}else if(0<(t+=r-a))for(r+1==a&&(s+=".");t--;s+="0");return e.s<0&&o?"-"+s:s}function i(e,t){for(var r,n=1,o=new x(e[0]);n<e.length;n++){if(!(r=new x(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function G(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];10<=o;o/=10,n++);return(r=n+r*LOG_BASE-1)>w?e.c=e.e=null:r<S?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,h=POWS_TEN;if(f){e:{for(o=1,s=f[0];10<=s;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/h[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,a=(i%=LOG_BASE)-LOG_BASE+(o=1)}else{for(c=s=f[l],o=1;10<=s;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/h[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%h[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):5<u||5==u&&(4==r||n||6==r&&(0<i?0<a?c/h[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=h[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=h[LOG_BASE-i],f[l]=0<a?mathfloor(c/h[o-a]%h[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];10<=a;a/=10,i++);for(a=f[0]+=s,s=1;10<=a;a/=10,s++);i!=s&&(e.e++,f[0]==BASE)&&(f[0]=1);break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>w?e.c=e.e=null:e.e<S&&(e.c=[e.e=0])}return e}function L(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=_||v<=r?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return x.clone=clone,x.ROUND_UP=0,x.ROUND_DOWN=1,x.ROUND_CEIL=2,x.ROUND_FLOOR=3,x.ROUND_HALF_UP=4,x.ROUND_HALF_DOWN=5,x.ROUND_HALF_EVEN=6,x.ROUND_HALF_CEIL=7,x.ROUND_HALF_FLOOR=8,x.EUCLID=9,x.config=x.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),y=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),m=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),_=r[0],v=r[1]):(intCheck(r,-MAX,MAX,t),_=-(v=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),S=r[0],w=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);S=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r&&("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes))throw E=!r,Error(bignumberError+"crypto unavailable");E=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),o=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),$=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);O=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);A="0123456789"==r.slice(0,10),C=r}}return{DECIMAL_PLACES:y,ROUNDING_MODE:m,EXPONENTIAL_AT:[_,v],RANGE:[S,w],CRYPTO:E,MODULO_MODE:o,POW_PRECISION:$,FORMAT:O,ALPHABET:C}},x.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!x.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&-MAX<=o&&o<=MAX&&o===mathfloor(o))if(0===n[0]){if(0===o&&1===n.length)return!0}else if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||BASE<=r||r!==mathfloor(r))break e;if(0!==r)return!0}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},x.maximum=x.max=function(){return i(arguments,r.lt)},x.minimum=x.min=function(){return i(arguments,r.gt)},x.random=(t=9007199254740992,l=Math.random()*t&2097151?function(){return mathfloor(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,a=0,s=[],c=new x(g);if(null==e?e=y:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),E)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)9e15<=(i=131072*t[a]+(t[a+1]>>>11))?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(s.push(i%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw E=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);a<o;)9e15<=(i=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])?crypto.randomBytes(7).copy(t,a):(s.push(i%1e14),a+=7);a=o/7}if(!E)for(;a<o;)(i=l())<9e15&&(s[a++]=i%1e14);for(o=s[--a],e%=LOG_BASE,o&&e&&(i=POWS_TEN[LOG_BASE-e],s[a]=mathfloor(o/i)*i);0===s[a];s.pop(),a--);if(a<0)s=[n=0];else{for(n=-1;0===s[0];s.splice(0,1),n-=LOG_BASE);for(a=1,i=s[0];10<=i;i/=10,a++);a<LOG_BASE&&(n-=LOG_BASE-a)}return c.e=n,c.c=s,c}),x.sum=function(){for(var e=1,t=arguments,r=new x(t[0]);e<t.length;)r=r.plus(t[e++]);return r},b="0123456789",f=function(e,t,r,n,o){var i,a,s,c,l,u,f,h,p=e.indexOf("."),g=y,_=m;for(0<=p&&(c=$,$=0,e=e.replace(".",""),u=(h=new x(t)).pow(e.length-p),$=c,h.c=T(toFixedPoint(coeffToString(u.c),u.e,"0"),10,r,b),h.e=h.c.length),s=c=(f=T(e,t,r,o?(i=C,b):(i=b,C))).length;0==f[--c];f.pop());if(!f[0])return i.charAt(0);if(p<0?--s:(u.c=f,u.e=s,u.s=n,f=(u=d(u,h,g,_,r)).c,l=u.r,s=u.e),p=f[a=s+g+1],c=r/2,l=l||a<0||null!=f[a+1],l=_<4?(null!=p||l)&&(0==_||_==(u.s<0?3:2)):c<p||p==c&&(4==_||l||6==_&&1&f[a-1]||_==(u.s<0?8:7)),a<1||!f[0])e=l?toFixedPoint(i.charAt(1),-g,i.charAt(0)):i.charAt(0);else{if(f.length=a,l)for(--r;++f[--a]>r;)f[a]=0,a||(++s,f=[1].concat(f));for(c=f.length;!f[--c];);for(p=0,e="";p<=c;e+=i.charAt(f[p++]));e=toFixedPoint(e,s,i.charAt(0))}return e},d=function(e,t,r,n,o){var i,a,s,c,l,u,f,h,p,g,_,d,b,y,m,v,S,w=e.s==t.s?1:-1,E=e.c,$=t.c;if(!(E&&E[0]&&$&&$[0]))return new x(e.s&&t.s&&(E?!$||E[0]!=$[0]:$)?E&&0==E[0]||!$?0*w:w/0:NaN);for(p=(h=new x(w)).c=[],w=r+(a=e.e-t.e)+1,o||(o=BASE,a=bitFloor(e.e/LOG_BASE)-bitFloor(t.e/LOG_BASE),w=w/LOG_BASE|0),s=0;$[s]==(E[s]||0);s++);if($[s]>(E[s]||0)&&a--,w<0)p.push(1),c=!0;else{for(y=E.length,v=$.length,w+=2,1<(l=mathfloor(o/($[s=0]+1)))&&($=N($,l,o),E=N(E,l,o),v=$.length,y=E.length),b=v,_=(g=E.slice(0,v)).length;_<v;g[_++]=0);S=$.slice(),S=[0].concat(S),m=$[0],$[1]>=o/2&&m++;do{if(l=0,(i=k($,g,v,_))<0){if(d=g[0],v!=_&&(d=d*o+(g[1]||0)),1<(l=mathfloor(d/m)))for(f=(u=N($,l=o<=l?o-1:l,o)).length,_=g.length;1==k(u,g,f,_);)l--,j(u,v<f?S:$,f,o),f=u.length,i=1;else 0==l&&(i=l=1),f=(u=$.slice()).length;if(j(g,u=f<_?[0].concat(u):u,_,o),_=g.length,-1==i)for(;k($,g,v,_)<1;)l++,j(g,v<_?S:$,_,o),_=g.length}else 0===i&&(l++,g=[0])}while(p[s++]=l,g[0]?g[_++]=E[b]||0:(g=[E[b]],_=1),(b++<y||null!=g[0])&&w--);c=null!=g[0],p[0]||p.splice(0,1)}if(o==BASE){for(s=1,w=p[0];10<=w;w/=10,s++);P(h,r+(h.e=s+a*LOG_BASE-1)+1,n,c)}else h.e=a,h.r=+c;return h},a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g,h=function(e,t,r,n){var o,i=r?t:t.replace(p,"");if(u.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t}),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new x(i,o);if(x.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},r.absoluteValue=r.abs=function(){var e=new x(this);return e.s<0&&(e.s=1),e},r.comparedTo=function(e,t){return compare(this,new x(e,t))},r.decimalPlaces=r.dp=function(e,t){var r,n;if(null!=e)return intCheck(e,0,MAX),null==t?t=m:intCheck(t,0,8),P(new x(this),e+this.e+1,t);if(!(e=this.c))return null;if(r=((n=e.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,n=e[n])for(;n%10==0;n/=10,r--);return r=r<0?0:r},r.dividedBy=r.div=function(e,t){return d(this,new x(e,t),y,m)},r.dividedToIntegerBy=r.idiv=function(e,t){return d(this,new x(e,t),0,1)},r.exponentiatedBy=r.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new x(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+L(e));if(null!=t&&(t=new x(t)),a=14<e.e,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new x(Math.pow(+L(u),a?e.s*(2-isOdd(e)):+L(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new x(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(9<e.e&&(0<u.e||u.e<-1||(0==u.e?1<u.c[0]||a&&24e7<=u.c[1]:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,-1<u.e&&(i=1/i),new x(s?1/i:i);$&&(i=mathceil($/LOG_BASE+2))}for(c=a?(r=new x(.5),s&&(e.s=1),isOdd(e)):(o=Math.abs(+L(e)))%2,l=new x(g);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(P(e=e.times(r),e.e+1,1),14<e.e)c=isOdd(e);else{if(0===(o=+L(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=g.div(l)),t?l.mod(t):i?P(l,$,m,void 0):l)},r.integerValue=function(e){var t=new x(this);return null==e?e=m:intCheck(e,0,8),P(t,t.e+1,e)},r.isEqualTo=r.eq=function(e,t){return 0===compare(this,new x(e,t))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(e,t){return 0<compare(this,new x(e,t))},r.isGreaterThanOrEqualTo=r.gte=function(e,t){return 1===(t=compare(this,new x(e,t)))||0===t},r.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},r.isLessThan=r.lt=function(e,t){return compare(this,new x(e,t))<0},r.isLessThanOrEqualTo=r.lte=function(e,t){return-1===(t=compare(this,new x(e,t)))||0===t},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return 0<this.s},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new x(e,t)).s,!s||!t)return new x(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new x(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new x(u[0]?a:3==m?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((o=(i=s<0)?(s=-s,u):(l=c,f)).reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),0<(t=(n=f.length)-(r=u.length)))for(;t--;u[r++]=0);for(t=BASE-1;s<n;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?G(e,u,l):(e.s=3==m?-1:1,e.c=[e.e=0],e)},r.modulo=r.mod=function(e,t){var r,n=this;return e=new x(e,t),!n.c||!e.s||e.c&&!e.c[0]?new x(NaN):!e.c||n.c&&!n.c[0]?new x(n):(9==o?(t=e.s,e.s=1,r=d(n,e,0,3),e.s=t,r.s*=t):r=d(n,e,0,o),(e=n.minus(r.times(e))).c[0]||1!=o||(e.s=n.s),e)},r.multipliedBy=r.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,h,p,g,_=this,d=_.c,b=(e=new x(e,t)).c;if(!(d&&b&&d[0]&&b[0]))return!_.s||!e.s||d&&!d[0]&&!b||b&&!b[0]&&!d?e.c=e.e=e.s=null:(e.s*=_.s,d&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(t=bitFloor(_.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=_.s,(s=d.length)<(_=b.length)&&(h=d,d=b,b=h,n=s,s=_,_=n),n=s+_,h=[];n--;h.push(0));for(p=BASE,g=SQRT_BASE,n=_;0<=--n;){for(u=b[n]%g,f=b[n]/g|(r=0),o=n+(i=s);n<o;)r=((c=u*(c=d[--i]%g)+(a=f*c+(l=d[i]/g|0)*u)%g*g+h[o]+r)/p|0)+(a/g|0)+f*l,h[o--]=c%p;h[o]=r}return r?++t:h.splice(0,1),G(e,h,t)},r.negated=function(){var e=new x(this);return e.s=-e.s||null,e},r.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new x(e,t)).s,!o||!t)return new x(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new x(o/0);if(!s[0]||!c[0])return c[0]?e:new x(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for((r=0<o?(a=i,c):(o=-o,s)).reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),G(e,s,a)},r.precision=r.sd=function(e,t){var r,n;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=m:intCheck(t,0,8),P(new x(this),e,t);if(!(t=this.c))return null;if(r=(n=t.length-1)*LOG_BASE+1,n=t[n]){for(;n%10==0;n/=10,r--);for(n=t[0];10<=n;n/=10,r++);}return r=e&&this.e+1>r?this.e+1:r},r.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},r.squareRoot=r.sqrt=function(){var e,t,r,n,o,i=this,a=i.c,s=i.s,c=i.e,l=y+4,u=new x("0.5");if(1!==s||!a||!a[0])return new x(!s||s<0&&(!a||a[0])?NaN:a?i:1/0);if((r=0==(s=Math.sqrt(+L(i)))||s==1/0?(((t=coeffToString(a)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=bitFloor((c+1)/2)-(c<0||c%2),new x(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):new x(s+"")).c[0])for((s=(c=r.e)+l)<3&&(s=0);;)if(o=r,r=u.times(o.plus(d(i,o,l,1))),coeffToString(o.c).slice(0,s)===(t=coeffToString(r.c)).slice(0,s)){if(r.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(r,r.e+y+2,1),e=!r.times(r).eq(i));break}if(!n&&(P(o,o.e+y+2,0),o.times(o).eq(i))){r=o;break}l+=4,s+=4,n=1}return P(r,r.e+y+1,m,e)},r.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),n(this,e,t,1)},r.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),n(this,e,t)},r.toFormat=function(e,t,r){if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=O;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(e=this.toFixed(e,t),this.c){var n,t=e.split("."),o=+r.groupSize,i=+r.secondaryGroupSize,a=r.groupSeparator||"",s=t[0],t=t[1],c=this.s<0,l=c?s.slice(1):s,u=l.length;if(i&&(n=o,o=i,u-=i=n),0<o&&0<u){for(s=l.substr(0,n=u%o||o);n<u;n+=o)s+=a+l.substr(n,o);0<i&&(s+=a+l.slice(n)),c&&(s="-"+s)}e=t?s+(r.decimalSeparator||"")+((i=+r.fractionGroupSize)?t.replace(new RegExp("\\d{"+i+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):t):s}return(r.prefix||"")+e+(r.suffix||"")},r.toFraction=function(e){var t,r,n,o,i,a,s,c,l,u,f=this,h=f.c;if(null!=e&&(!(s=new x(e)).isInteger()&&(s.c||1!==s.s)||s.lt(g)))throw Error(bignumberError+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+L(s));if(!h)return new x(f);for(t=new x(g),l=r=new x(g),n=c=new x(g),h=coeffToString(h),i=t.e=h.length-f.e-1,t.c[0]=POWS_TEN[(a=i%LOG_BASE)<0?LOG_BASE+a:a],e=!e||0<s.comparedTo(t)?0<i?t:l:s,a=w,w=1/0,s=new x(h),c.c[0]=0;u=d(s,t,0,1),1!=(o=r.plus(u.times(n))).comparedTo(e);)r=n,n=o,l=c.plus(u.times(o=l)),c=o,t=s.minus(u.times(o=t)),s=o;return o=d(e.minus(r),n,0,1),c=c.plus(o.times(l)),r=r.plus(o.times(n)),c.s=l.s=f.s,h=d(l,n,i*=2,m).minus(f).abs().comparedTo(d(c,r,i,m).minus(f).abs())<1?[l,n]:[c,r],w=a,h},r.toNumber=function(){return+L(this)},r.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),n(this,e,t,2)},r.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=null==e?o<=_||v<=o?toExponential(coeffToString(r.c),o):toFixedPoint(coeffToString(r.c),o,"0"):10===e&&A?toFixedPoint(coeffToString((r=P(new x(r),y+o+1,m)).c),r.e,"0"):(intCheck(e,2,C.length,"Base"),f(toFixedPoint(coeffToString(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},r.valueOf=r.toJSON=function(){return L(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,null!=e&&x.set(e),x}function bitFloor(e){var t=0|e;return 0<e||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,e=e.e,t=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=e==t,!o||!i)return n?0:!o^r?1:-1;if(!n)return t<e^r?1:-1;for(s=(e=o.length)<(t=i.length)?e:t,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return e==t?0:t<e^r?1:-1}function intCheck(e,t,r,n){if(e<t||r<e||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||r<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone();function eval_postfix(e){for(var t=[];0<e.length;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop();if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":t.push(o.plus(n));break;case"-":t.push(o.minus(n));break;case"*":t.push(o.times(n));break;case"/":t.push(o.div(n));break;case"%":t.push(o.mod(n));break;case"**":t.push(o.pow(n))}}else t.push(r)}if(1!==t.length)throw"unvalid expression";var i=t[0];if((i=BigNumber.isBigNumber(i)?i:BigNumber(i)).isNaN())throw new Error("计算结果为NaN");return i}function decimal_round(o,i,a,s,e){var c=o,l=i,u=i.length,t={"~-":function(){l=i.slice(0,"<"===a?s-1:s)},"~+":function(){var e,t="<"===a?s-1:s;u<=t||0===u||(e=i.slice(0,t),0!=+i.slice(t,u)&&(e=(+e+1).toString()).length>t?(l=e.slice(1,e.length),c=(+c+1).toString()):l=e)},"~5":function(){var e,t;0===u||(l=i.slice(0,e="<"===a?s-1:s),t=+i[e],Number.isNaN(t))||5<=t&&(l=(+l+1).toString()).length>e&&(l=l.slice(1,l.length),c=(+c+1).toString())},"~6":function(){var e,t,r,n;0!==u&&(t=+i[e="<"===a?s-1:s],r=""===(r=i.slice(+e+1,i.length))?0:parseInt(r),n=0===e?+o[o.length-1]:+i[e-1],l=i.slice(0,e),6<=t||5==t&&0<r||5==t&&n%2!=0)&&(l=(+l+1).toString()).length>e&&(l=l.slice(1,l.length),c=(+c+1).toString())}};return"<="===a?l=u<=s?i:(t[e]&&t[e](),l.replace(/0+$/,"")):"<"===a?l=u<s?i:(t[e]&&t[e](),l.replace(/0+$/,"")):"="===a?u<s?l=i+"0".repeat(s-u):s<u&&t[e]&&t[e]():">="===a?u<s&&(l=i+"0".repeat(s-u)):">"===a&&u<=s&&(l=i+"0".repeat(s-u+1)),{int_part:c,dec_part:l}}function format(e,t,r){var n,o,i,a,s,c,l,u,f,h="";return BigNumber.isBigNumber(e)?h=e.toFixed():"string"!=typeof e&&(h=e.toString()),"undefined"===h||"NaN"===h?null:(o=n=null,a=i=!1,f=u=l=c=!(s="~-"),t.forEach(function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);o=e.value}else if("to-number"===t)f=!0;else if("comma"===t)i=!0;else if("number"===t)n=e.value;else if("plus"===t)a=!0;else if("round"===t)s=e.value;else if("fraction"===t)l=!0;else if("scientific"===t)c=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");u=!0}}),c?(e=BigNumber(h).toExponential(),a&&!e.startsWith("-")?"+"+e:e):l?(t=BigNumber(h).toFraction().map(function(e){return e.toFixed()}).join("/"),a&&!t.startsWith("-")?"+"+t:t):(u&&(h=BigNumber(h).times(100).toFixed()),n&&(t=(e=decimal_round(t=(e=h.split("."))[0],1===e.length?"":e[1],o,+n,s)).int_part,h=""===(e=e.dec_part)?t:"".concat(t,".").concat(e)),i&&(f=!1,h=1<(t=h.split(".")).length?((e=t[0]).includes("-")?t[0]=e[0]+e.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=e.replace(/(?=(?!^)(?:\d{3})+$)/g,","),t.join(".")):(e=t[0]).includes("-")?e[0]+e.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):e.replace(/(?=(?!^)(?:\d{3})+$)/g,",")),a&&(f=!1,h.startsWith("-")||(h="+"+h)),u&&(f=!1,h+="%"),f&&!r?+h:h))}function fill_fmt_tokens(e,n){return e.map(function(e){if("var"!==e.type)return e;for(var t,r=0;r<n.length&&!not_undefined(t=get_1(n[r],e.value));r++);if(is_number(t))return{type:"number",value:t};throw new Error("错误的填充值")})}function get_token_and_unit(e){var r=null;return e.length,{tokens:e.map(function(e){var t=split_unit_num(e.value);return null!==t.unit?(null==r&&(r=t.unit),{type:"number",value:t.num}):e}),unit:r}}var _debug=!1;function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(t,r){var n={},o={_error:"-"};return["string","number"].includes(_typeof(t))?(Array.isArray(r)||void 0===r||Object.keys(r).forEach(function(e){return e.startsWith("_")&&(o[e]=r[e])}),n=null!=r?r:{},/[a-zA-Z_$]/.test(t.toString())?void 0!==r?(n=r,calc(t,_objectSpread2(_objectSpread2({},o),n))):function(e){return calc(t,_objectSpread2(_objectSpread2({},o),e))}:calc(t,_objectSpread2(_objectSpread2({},o),n))):(n=t,function(e){return calc(e,_objectSpread2(_objectSpread2({},o),n))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(){var res,code,versions,last_version,larr,varr,script;return _regeneratorRuntime().wrap(function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name)_context.next=19;else{if(17<=parseInt(process.versions.node))return _context.next=4,fetch("https://cdn.jsdelivr.net/npm/a-calc/a-calc.versions.js");_context.next=17}break;case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map(function(e){return parseInt(e)}),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map(function(e){return parseInt(e)}),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=23;break;case 19:script=document.createElement("script"),script.onload=function(){var e,t,r=a_calc_versions;Array.isArray(r)&&((e=(r=r.at(-1)).match(/(\d+)\.(\d+)\.(\d+)/)).shift(),e=e.map(function(e){return parseInt(e)}),(t=version.match(/(\d+)\.(\d+)\.(\d+)/)).shift(),t=t.map(function(e){return parseInt(e)}),e[0]>t[0]||e[0]===t[0]&&e[1]>t[1]||e[0]===t[0]&&e[1]===t[1]&&e[2]>t[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",r)},script.src="https://cdn.jsdelivr.net/npm/a-calc/a-calc.versions.js",document.body.appendChild(script);case 23:case"end":return _context.stop()}},_callee)})),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o=parse_args(t),i=get_1(o,"options._error",void 0),a=get_1(o,"options._debug",!1),s=get_1(o,"options._unit",!1),c=o.options,l=null;if(o.fmt_err||o.expr_err){if(not_undefined(i))return i;throw new Error("表达式或格式化字符串错误,表达式为:".concat(o.expr))}var u=o.fmt_tokens;if(not_undefined(i))try{n=tokenizer(o.expr,s)}catch(e){return i}else n=tokenizer(o.expr,s);if(is_null(c))f=n;else{var f,h=[];if(Array.isArray(c)?h=c:(h.push(c),not_undefined(c=get_1(c,"_fill_data",{}))&&(Array.isArray(c)?h=[].concat(_toConsumableArray(h),_toConsumableArray(c)):h.push(c))),not_undefined(i))try{f=fill_tokens(n,h,s),not_null(o.fmt_tokens)&&(u=fill_fmt_tokens(o.fmt_tokens,h))}catch(e){return i}else f=fill_tokens(n,h,s),not_null(o.fmt_tokens)&&(u=fill_fmt_tokens(o.fmt_tokens,h));[!0,"on","auto","space"].includes(s)&&(l=(c=get_token_and_unit(f)).unit,f=c.tokens)}h=token2postfix(f),c=null;if(not_undefined(i))try{c=eval_postfix(h)}catch(e){return i}else c=eval_postfix(h);if("Infinity"!==(c=not_null(u)?format(c,u,s):null!==c?c.toFixed():null)&&null!==c)return null!==l&&(c+=l),(get_debug_config()||a)&&(console.groupCollapsed("%c"+o.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,o.origin_expr),console.log(o.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o.origin_fill_data)),console.log(o.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(c)),console.log(c),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o.fmt_tokens)),console.log(o.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(u)),console.log(u),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(h)),console.log(h),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,l),console.log(l),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupEnd()),c;if(not_undefined(i))return i;throw new Error("计算错误可能是非法的计算式")}function check_update(){check_version().catch(function(){})}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug},fmt=calc;return exports.calc=calc,exports.calc_util=calc_util,exports.calc_wrap=calc_wrap,exports.fmt=fmt,exports.version=version,Object.defineProperty(exports,"__esModule",{value:!0}),exports}({}); | ||
var a_calc=function(exports){"use strict";function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},e=Object.prototype,c=e.hasOwnProperty,l=Object.defineProperty||function(e,t,r){e[t]=r.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag";function i(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o,i,a,s,t=t&&t.prototype instanceof h?t:h,t=Object.create(t.prototype),n=new S(n||[]);return l(t,"_invoke",{value:(o=e,i=r,a=n,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return E()}for(a.method=e,a.arg=t;;){var r=a.delegate;if(r){r=function e(t,r){var n=r.method,o=t.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=void 0,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;n=u(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}(r,a);if(r){if(r===f)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";r=u(o,i,a);if("normal"===r.type){if(s=a.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s="completed",a.method="throw",a.arg=r.arg)}})}),t}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var f={};function h(){}function p(){}function g(){}var t={},_=(i(t,n,function(){return this}),Object.getPrototypeOf),_=_&&_(_(w([]))),d=(_&&_!==e&&c.call(_,n)&&(t=_),g.prototype=h.prototype=Object.create(t));function b(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function y(a,s){var t;l(this,"_invoke",{value:function(r,n){function e(){return new s(function(e,t){!function t(e,r,n,o){var i,e=u(a[e],a,r);if("throw"!==e.type)return(r=(i=e.arg).value)&&"object"==typeof r&&c.call(r,"__await")?s.resolve(r.__await).then(function(e){t("next",e,n,o)},function(e){t("throw",e,n,o)}):s.resolve(r).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,o)});o(e.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}})}function m(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(m,this),this.reset(!0)}function w(t){if(t){var r,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(e=function e(){for(;++r<t.length;)if(c.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e}).next=e}return{next:E}}function E(){return{value:void 0,done:!0}}return l(d,"constructor",{value:p.prototype=g,configurable:!0}),l(g,"constructor",{value:p,configurable:!0}),p.displayName=i(g,o,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,i(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e},a.awrap=function(e){return{__await:e}},b(y.prototype),i(y.prototype,r,function(){return this}),a.AsyncIterator=y,a.async=function(e,t,r,n,o){void 0===o&&(o=Promise);var i=new y(s(e,t,r,n),o);return a.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},b(d),i(d,o,"Generator"),i(d,n,function(){return this}),i(d,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=w,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return i.type="throw",i.arg=r,n.next=e,t&&(n.method="next",n.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=c.call(o,"catchLoc"),s=c.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,v(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},a}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(s){return function(){var e=this,a=arguments;return new Promise(function(t,r){var n=s.apply(e,a);function o(e){asyncGeneratorStep(n,t,r,o,i,"next",e)}function i(e){asyncGeneratorStep(n,t,r,o,i,"throw",e)}o(void 0)})}}function _defineProperty(e,t,r){(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==typeof e?e:String(e)}var version="1.3.1",RegexNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*$/,RegexUnitNumber=/^[+-]?\d[\d.]*(?:e\+|E\+|e-|E-|e|E)?\d*\D*$/;function is_operator(e){return-1<"+-*/%()**".indexOf(e)}function get_prioraty(e){switch(e){case"+":case"-":return 1;case"*":case"/":case"%":return 2;case"**":return 3;default:return 0}}function prioraty(e,t){return get_prioraty(e)<=get_prioraty(t)}function not_undefined(e){return void 0!==e}function is_null(e){return null===e}function not_null(e){return null!==e}function is_number(e){return"number"==typeof e||is_str_number(e)}function is_str_number(e){return"string"==typeof e&&!!RegexNumber.test(e)}function split_unit_num(e){for(var t,r,n=null,o=null,i=[/^([+-]?[\d.]+(?:e|E)(?:\+|-)?\d+)(.*)$/,/^([+-]?[\d.]+)(.*)$/],a=0;a<i.length;a++){var s=e.match(i[a]);if(s){t=s;break}}return t&&(o=t[1],""!==(r=t[2]).trim())&&(n=r),{num:o,unit:n}}var state$1={initial:"initial",number:"number",variable:"var",symbol:"symbol",percent:"percent",round:"round",plus:"plus",comma:"comma",fraction:"fraction",to_number:"to-number",scientific:"scientific"},symbol="<>=";function fmt_tokenizer(e){for(var t=state$1.initial,r=[],n=[];e;){var o=e[0];if(t===state$1.initial)if(/\s/.test(o))e=e.slice(1);else if(symbol.includes(o))t=state$1.symbol,r.push(o),e=e.slice(1);else if(","===o)t=state$1.initial,n.push({type:"comma",value:o}),e=e.slice(1);else if(/[a-zA-Z_]/.test(o))t=state$1.variable,r.push(o),e=e.slice(1);else if(/\d/.test(o))t=state$1.number,r.push(o),e=e.slice(1);else if("+"===o)t=state$1.initial,n.push({type:"plus",value:o}),e=e.slice(1);else if("~"===o)t=state$1.round,r.push(o),e=e.slice(1);else if("%"===o)t=state$1.initial,n.push({type:"percent",value:o}),e=e.slice(1);else if("/"===o)t=state$1.initial,n.push({type:"fraction",value:o}),e=e.slice(1);else{if("!"!==o)throw new Error("不识别的fmt字符:".concat(o));if(t=state$1.initial,/[Ee]/.test(e[1]))n.push({type:"scientific",value:e[1]});else{if(!/[Nn]/.test(e[1]))throw new Error("不识别的fmt字符:".concat(e.slice(2)));n.push({type:"to-number",value:e[1]})}e=e.slice(2)}else if(t===state$1.number)/\d/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"number",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.variable)/[\$\w_\-.\[\]"']/.test(o)?(r.push(o),e=e.slice(1)):(n.push({type:"var",value:r.join("")}),r.length=0,t=state$1.initial);else if(t===state$1.symbol)/\s/.test(o)?e=e.slice(1):symbol.includes(o)?(r.push(o),e=e.slice(1)):(n.push({type:"symbol",value:r.join("")}),r.length=0,t=state$1.initial);else{if(t!==state$1.round)throw new Error("错误的自动机状态");if(/\s/.test(o))e=e.slice(1);else{if(!("56+-".includes(o)&&r.length<2))throw new Error("舍入格式化语法错误:".concat(o));r.push(o),e=e.slice(1),n.push({type:"round",value:r.join("")}),r.length=0,t=state$1.initial}}}if(0<r.length&&(n.push({type:t,value:r.join("")}),r.length=0,t=state$1.initial),1<n.filter(function(e){return"number"===e.type}).length)throw new Error("格式化字符串错误,发现多余的数字");return n}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$1="object"==_typeof(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root$3=freeGlobal||freeSelf||Function("return this")(),_root=root$3,root$2=_root,_Symbol2=root$2.Symbol,_Symbol$3=_Symbol2,_Symbol$2=_Symbol$3,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,nativeObjectToString$1=objectProto$4.toString,symToStringTag$1=_Symbol$2?_Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$3.call(e,symToStringTag$1),r=e[symToStringTag$1];try{var n=!(e[symToStringTag$1]=void 0)}catch(e){}var o=nativeObjectToString$1.call(e);return n&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),o}var _getRawTag=getRawTag$1,objectProto$3=Object.prototype,nativeObjectToString=objectProto$3.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_Symbol$1=_Symbol$3,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol$1?_Symbol$1.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:(symToStringTag&&symToStringTag in Object(e)?getRawTag:objectToString)(e)}var _baseGetTag=baseGetTag$2;function isObjectLike$1(e){return null!=e&&"object"==_typeof(e)}var isObjectLike_1=isObjectLike$1,baseGetTag$1=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$3(e){return"symbol"==_typeof(e)||isObjectLike(e)&&baseGetTag$1(e)==symbolTag}var isSymbol_1=isSymbol$3,isArray$2=isArray_1,isSymbol$2=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){var r;return!isArray$2(e)&&(!("number"!=(r=_typeof(e))&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$2(e))||reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$2(e){var t=_typeof(e);return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$2,baseGetTag=_baseGetTag,isObject$1=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){return!!isObject$1(e)&&((e=baseGetTag(e))==funcTag||e==genTag||e==asyncTag||e==proxyTag)}var isFunction_1=isFunction$1,root$1=_root,coreJsData$1=root$1["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$2(e,t){e=getValue(e,t);return baseIsNative(e)?e:void 0}var _getNative=getNative$2,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){e=this.has(e)&&delete this.__data__[e];return this.size-=e?1:0,e}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t,r=this.__data__;return nativeCreate$2?(t=r[e])===HASH_UNDEFINED$1?void 0:t:hasOwnProperty$1.call(r,e)?r[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1,eq=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,e=assocIndexOf$3(t,e);return!(e<0||(e==t.length-1?t.pop():splice.call(t,e,1),--this.size,0))}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,e=assocIndexOf$2(t,e);return e<0?void 0:t[e][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return-1<assocIndexOf$1(this.__data__,e)}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=listCacheClear,ListCache$1.prototype.delete=listCacheDelete,ListCache$1.prototype.get=listCacheGet,ListCache$1.prototype.has=listCacheHas,ListCache$1.prototype.set=listCacheSet;var _ListCache=ListCache$1,getNative=_getNative,root=_root,Map$1=getNative(root,"Map"),_Map=Map$1,Hash=_Hash,ListCache=_ListCache,Map=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=_typeof(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){e=e.__data__;return isKeyable(t)?e["string"==typeof t?"string":"hash"]:e.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){e=getMapData$3(this,e).delete(e);return this.size-=e?1:0,e}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,MapCache=_MapCache,FUNC_ERROR_TEXT="Expected a function";function memoize$1(n,o){if("function"!=typeof n||null!=o&&"function"!=typeof o)throw new TypeError(FUNC_ERROR_TEXT);function i(){var e=arguments,t=o?o.apply(this,e):e[0],r=i.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),i.cache=r.set(t,e)||r,e)}return i.cache=new(memoize$1.Cache||MapCache),i}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var e=memoize(e,function(e){return t.size===MAX_MEMOIZE_SIZE&&t.clear(),e}),t=e.cache;return e}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(e){var o=[];return 46===e.charCodeAt(0)&&o.push(""),e.replace(rePropName,function(e,t,r,n){o.push(r?n.replace(reEscapeChar,"$1"):t||e)}),o}),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap$1,_Symbol=_Symbol$3,arrayMap=_arrayMap,isArray$1=isArray_1,isSymbol$1=isSymbol_1,INFINITY$1=1/0,symbolProto=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(e){var t;return"string"==typeof e?e:isArray$1(e)?arrayMap(e,baseToString$1)+"":isSymbol$1(e)?symbolToString?symbolToString.call(e):"":"0"==(t=e+"")&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(e){return null==e?"":baseToString(e)}var toString_1=toString$1,isArray=isArray_1,isKey=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$1(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var _castPath=castPath$1,isSymbol=isSymbol_1,INFINITY=1/0;function toKey$1(e){var t;return"string"==typeof e||isSymbol(e)?e:"0"==(t=e+"")&&1/e==-INFINITY?"-0":t}var _toKey=toKey$1,castPath=_castPath,toKey=_toKey;function baseGet$1(e,t){for(var r=0,n=(t=castPath(t,e)).length;null!=e&&r<n;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1,baseGet=_baseGet;function get(e,t,r){e=null==e?void 0:baseGet(e,t);return void 0===e?r:e}var get_1=get;function parse_args(e){var t="",r=e[0],n=e[1],o={origin_expr:r,origin_fill_data:n,expr:"",fmt_tokens:null,options:null,fmt_err:!1,expr_err:!1},n=(not_undefined(n)&&(o.options=n),get_1(n,"_error",!1));if(0===e.length)throw new Error("至少传入一个参数");if("string"==typeof r){if(""===(t=r).trim()||r.includes("NaN"))return o.expr_err=!0,o}else{if("number"!=typeof r){if(!0===n)return o.expr_err=!0,o;throw new Error("错误的第一个参数类型: ".concat(r," 类型为:").concat(_typeof(r)))}t=r.toString()}e=t.split("|");if(o.expr=e[0],1<e.length){n=e[1];if(""!==n.trim())try{o.fmt_tokens=fmt_tokenizer(n)}catch(e){return o.fmt_err=!0,o}}if(null!==o.options&&o.options._fmt){var i,r=[];try{r=fmt_tokenizer(o.options._fmt)}catch(e){return o.fmt_err=!0,o}null===o.fmt_tokens?o.fmt_tokens=r:(i=o.fmt_tokens.map(function(e){return e.type}),r.forEach(function(e){i.includes(e.type)||o.fmt_tokens.push(e)}))}return o}var state={initial:"initial",number:"number",scientific:"scientific",operator:"operator",bracket:"bracket",var:"var"},signed="+-",operator="*/%",brackets="()";function tokenizer(e){for(var t,r,n,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=state.initial,a=[],s=[],c=function(){a.push(t),e=e.slice(1)},l=function(e){s.push({type:e,value:a.join("")}),a.length=0},u=function(){e=e.slice(1)};e;)switch(t=e[0],i){case state.initial:if(signed.includes(t)){var f=s.at(-1),i=0===s.length||"operator"===f.type||"("===f?state.number:state.operator;c()}else if(operator.includes(t))i=state.operator,c();else if(/\d/.test(t))i=state.number,c();else if(brackets.includes(t))i=state.bracket;else if(/[a-zA-Z_$]/.test(t))i=state.var,c();else{if(!/\s/.test(t))throw new Error("不识别的字符".concat(t));u()}break;case state.bracket:s.push({type:state.bracket,value:t}),u(),i=state.initial;break;case state.operator:f=a.at(-1);"*"===t&&"*"===f&&c(),l(state.operator),i=state.initial;break;case state.number:if(/\d/.test(t))c();else if("."===t){if(0===a.length||a.includes("."))throw new Error("非法的小数部分".concat(a.join("")));c()}else"Ee".includes(t)?(i=state.scientific,c()):["auto","on",!0].includes(o)&&/[^*/+\-()\s]/.test(t)||"space"===o&&/\S/.test(t)?c():(l(state.number),i=state.initial);break;case state.scientific:/\d/.test(t)?c():signed.includes(t)?(r=a.slice(1),n=a.at(-1),r.includes(t)||!/[Ee]/.test(n)?(l(state.scientific),i=state.initial):c()):["auto","on",!0].includes(o)&&/[^*/+\-()\s]/.test(t)||"space"===o&&/\S/.test(t)?c():(l(state.scientific),i=state.initial);break;case state.var:/[\w_.\[\]"']/.test(t)?c():(l(state.var),i=state.initial);break;default:throw new Error("状态错误")}return 0!==a.length&&(s.push({type:i,value:a.join("")}),a.length=0,i=state.initial),s}function fill_tokens(e,t,r){if(is_null(t))throw new Error("错误的填充数据:",t);for(var n=[],o=0;o<e.length;o++){var i=e[o];if("var"!==i.type)n.push(i);else{if("undefined"===i.value||"NaN"===i.value)throw new Error("key不应该为:".concat(i.value));for(var a=null,s=0;s<t.length;s++){var c=t[s],c=get_1(c,i.value);if(void 0!==c){a=c;break}}if(null===a)throw new Error("token填充失败,请确认".concat(i,"存在"));if("string"==typeof a){if(""===a.trim())throw new Error("token填充失败,".concat(i.value,"值不可为空字符"));if([!0,"on","auto","space"].includes(r)){if(!RegexUnitNumber.test(a))throw new Error("token填充失败,".concat(i.value,"值:").concat(a,"为非法单位数字"))}else if(!is_str_number(a))throw new Error("token填充失败,".concat(i,"值:").concat(a,"为非法数字"))}a="string"!=typeof a?a.toString():a,n.push({type:"number",value:a})}}return n}function token2postfix(e){for(var t=[],r=[],n=e.map(function(e){return e.value});0<n.length;){var o=n.shift();if(is_operator(o))if("("===o)t.push(o);else if(")"===o){for(var i=t.pop();"("!==i&&0<t.length;)r.push(i),i=t.pop();if("("!==i)throw"error: unmatched ()"}else{for(;prioraty(o,t[t.length-1])&&0<t.length;)r.push(t.pop());t.push(o)}else r.push(o)}if(0<t.length){if(")"===t[t.length-1]||"("===t[t.length-1])throw"error: unmatched ()";for(;0<t.length;)r.push(t.pop())}return r}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var d,f,h,t,l,b,a,s,c,u,p,r=x.prototype={constructor:x,toString:null,valueOf:null},g=new x(1),y=20,m=4,_=-7,v=21,S=-1e7,w=1e7,E=!1,o=1,$=0,O={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},C="0123456789abcdefghijklmnopqrstuvwxyz",A=!0;function x(e,t){var r,n,o,i,a,s,c,l,u=this;if(!(u instanceof x))return new x(e,t);if(null==t){if(e&&!0===e._isBigNumber)return u.s=e.s,void(!e.c||e.e>w?u.c=u.e=null:e.e<S?u.c=[u.e=0]:(u.e=e.e,u.c=e.c.slice()));if((s="number"==typeof e)&&0*e==0){if(u.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;10<=a;a/=10,i++);return void(w<i?u.c=u.e=null:(u.e=i,u.c=[e]))}l=String(e)}else{if(!isNumeric.test(l=String(e)))return h(u,l,s);u.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}0<(a=(l=-1<(i=l.indexOf("."))?l.replace(".",""):l).search(/e/i))?(i<0&&(i=a),i+=+l.slice(a+1),l=l.substring(0,a)):i<0&&(i=l.length)}else{if(intCheck(t,2,C.length,"Base"),10==t&&A)return P(u=new x(e),y+u.e+1,m);if(l=String(e),s="number"==typeof e){if(0*e!=0)return h(u,l,s,t);if(u.s=1/e<0?(l=l.slice(1),-1):1,x.DEBUG&&15<l.replace(/^0\.0*|\./,"").length)throw Error(tooManyDigits+e)}else u.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=C.slice(0,t),i=a=0,c=l.length;a<c;a++)if(r.indexOf(n=l.charAt(a))<0){if("."==n){if(i<a){i=c;continue}}else if(!o&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){o=!0,a=-1,i=0;continue}return h(u,String(e),s,t)}s=!1,-1<(i=(l=f(l,t,10,u.s)).indexOf("."))?l=l.replace(".",""):i=l.length}for(a=0;48===l.charCodeAt(a);a++);for(c=l.length;48===l.charCodeAt(--c););if(l=l.slice(a,++c)){if(c-=a,s&&x.DEBUG&&15<c&&(MAX_SAFE_INTEGER<e||e!==mathfloor(e)))throw Error(tooManyDigits+u.s*e);if((i=i-a-1)>w)u.c=u.e=null;else if(i<S)u.c=[u.e=0];else{if(u.e=i,u.c=[],a=(i+1)%LOG_BASE,i<0&&(a+=LOG_BASE),a<c){for(a&&u.c.push(+l.slice(0,a)),c-=LOG_BASE;a<c;)u.c.push(+l.slice(a,a+=LOG_BASE));a=LOG_BASE-(l=l.slice(a)).length}else a-=c;for(;a--;l+="0");u.c.push(+l)}}else u.c=[u.e=0]}function T(e,t,r,n){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)r-1<a[o]&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}function N(e,t,r){var n,o,i,a=0,s=e.length,c=t%SQRT_BASE,l=t/SQRT_BASE|0;for(e=e.slice();s--;)a=((o=c*(i=e[s]%SQRT_BASE)+(n=l*i+(i=e[s]/SQRT_BASE|0)*c)%SQRT_BASE*SQRT_BASE+a)/r|0)+(n/SQRT_BASE|0)+l*i,e[s]=o%r;return e=a?[a].concat(e):e}function k(e,t,r,n){var o,i;if(r!=n)i=n<r?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function j(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&1<e.length;e.splice(0,1));}function n(e,t,r,n){var o,i,a,s;if(null==r?r=m:intCheck(r,0,8),!e.c)return e.toString();if(o=e.c[0],i=e.e,null==t)s=coeffToString(e.c),s=1==n||2==n&&(i<=_||v<=i)?toExponential(s,i):toFixedPoint(s,i,"0");else if(r=(e=P(new x(e),t,r)).e,a=(s=coeffToString(e.c)).length,1==n||2==n&&(t<=r||r<=_)){for(;a<t;s+="0",a++);s=toExponential(s,r)}else if(t-=i,s=toFixedPoint(s,r,"0"),a<r+1){if(0<--t)for(s+=".";t--;s+="0");}else if(0<(t+=r-a))for(r+1==a&&(s+=".");t--;s+="0");return e.s<0&&o?"-"+s:s}function i(e,t){for(var r,n=1,o=new x(e[0]);n<e.length;n++){if(!(r=new x(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function G(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];10<=o;o/=10,n++);return(r=n+r*LOG_BASE-1)>w?e.c=e.e=null:r<S?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var o,i,a,s,c,l,u,f=e.c,h=POWS_TEN;if(f){e:{for(o=1,s=f[0];10<=s;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,u=(c=f[l=0])/h[o-a-1]%10|0;else if((l=mathceil((i+1)/LOG_BASE))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));c=u=0,a=(i%=LOG_BASE)-LOG_BASE+(o=1)}else{for(c=s=f[l],o=1;10<=s;s/=10,o++);u=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/h[o-a-1]%10|0}if(n=n||t<0||null!=f[l+1]||(a<0?c:c%h[o-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):5<u||5==u&&(4==r||n||6==r&&(0<i?0<a?c/h[o-a]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=h[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=l,s=1,l--):(f.length=l+1,s=h[LOG_BASE-i],f[l]=0<a?mathfloor(c/h[o-a]%h[a])*s:0),n)for(;;){if(0==l){for(i=1,a=f[0];10<=a;a/=10,i++);for(a=f[0]+=s,s=1;10<=a;a/=10,s++);i!=s&&(e.e++,f[0]==BASE)&&(f[0]=1);break}if(f[l]+=s,f[l]!=BASE)break;f[l--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>w?e.c=e.e=null:e.e<S&&(e.c=[e.e=0])}return e}function L(e){var t,r=e.e;return null===r?e.toString():(t=coeffToString(e.c),t=r<=_||v<=r?toExponential(t,r):toFixedPoint(t,r,"0"),e.s<0?"-"+t:t)}return x.clone=clone,x.ROUND_UP=0,x.ROUND_DOWN=1,x.ROUND_CEIL=2,x.ROUND_FLOOR=3,x.ROUND_HALF_UP=4,x.ROUND_HALF_DOWN=5,x.ROUND_HALF_EVEN=6,x.ROUND_HALF_CEIL=7,x.ROUND_HALF_FLOOR=8,x.EUCLID=9,x.config=x.set=function(e){var t,r;if(null!=e){if("object"!=_typeof(e))throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(r=e[t],0,MAX,t),y=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(r=e[t],0,8,t),m=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(intCheck(r[0],-MAX,0,t),intCheck(r[1],0,MAX,t),_=r[0],v=r[1]):(intCheck(r,-MAX,MAX,t),_=-(v=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)intCheck(r[0],-MAX,-1,t),intCheck(r[1],1,MAX,t),S=r[0],w=r[1];else{if(intCheck(r,-MAX,MAX,t),!r)throw Error(bignumberError+t+" cannot be zero: "+r);S=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(bignumberError+t+" not true or false: "+r);if(r&&("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes))throw E=!r,Error(bignumberError+"crypto unavailable");E=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(r=e[t],0,9,t),o=r),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(r=e[t],0,MAX,t),$=r),e.hasOwnProperty(t="FORMAT")){if("object"!=_typeof(r=e[t]))throw Error(bignumberError+t+" not an object: "+r);O=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(bignumberError+t+" invalid: "+r);A="0123456789"==r.slice(0,10),C=r}}return{DECIMAL_PLACES:y,ROUNDING_MODE:m,EXPONENTIAL_AT:[_,v],RANGE:[S,w],CRYPTO:E,MODULO_MODE:o,POW_PRECISION:$,FORMAT:O,ALPHABET:C}},x.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!x.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&-MAX<=o&&o<=MAX&&o===mathfloor(o))if(0===n[0]){if(0===o&&1===n.length)return!0}else if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||BASE<=r||r!==mathfloor(r))break e;if(0!==r)return!0}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},x.maximum=x.max=function(){return i(arguments,r.lt)},x.minimum=x.min=function(){return i(arguments,r.gt)},x.random=(t=9007199254740992,l=Math.random()*t&2097151?function(){return mathfloor(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,a=0,s=[],c=new x(g);if(null==e?e=y:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),E)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)9e15<=(i=131072*t[a]+(t[a+1]>>>11))?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(s.push(i%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw E=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);a<o;)9e15<=(i=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])?crypto.randomBytes(7).copy(t,a):(s.push(i%1e14),a+=7);a=o/7}if(!E)for(;a<o;)(i=l())<9e15&&(s[a++]=i%1e14);for(o=s[--a],e%=LOG_BASE,o&&e&&(i=POWS_TEN[LOG_BASE-e],s[a]=mathfloor(o/i)*i);0===s[a];s.pop(),a--);if(a<0)s=[n=0];else{for(n=-1;0===s[0];s.splice(0,1),n-=LOG_BASE);for(a=1,i=s[0];10<=i;i/=10,a++);a<LOG_BASE&&(n-=LOG_BASE-a)}return c.e=n,c.c=s,c}),x.sum=function(){for(var e=1,t=arguments,r=new x(t[0]);e<t.length;)r=r.plus(t[e++]);return r},b="0123456789",f=function(e,t,r,n,o){var i,a,s,c,l,u,f,h,p=e.indexOf("."),g=y,_=m;for(0<=p&&(c=$,$=0,e=e.replace(".",""),u=(h=new x(t)).pow(e.length-p),$=c,h.c=T(toFixedPoint(coeffToString(u.c),u.e,"0"),10,r,b),h.e=h.c.length),s=c=(f=T(e,t,r,o?(i=C,b):(i=b,C))).length;0==f[--c];f.pop());if(!f[0])return i.charAt(0);if(p<0?--s:(u.c=f,u.e=s,u.s=n,f=(u=d(u,h,g,_,r)).c,l=u.r,s=u.e),p=f[a=s+g+1],c=r/2,l=l||a<0||null!=f[a+1],l=_<4?(null!=p||l)&&(0==_||_==(u.s<0?3:2)):c<p||p==c&&(4==_||l||6==_&&1&f[a-1]||_==(u.s<0?8:7)),a<1||!f[0])e=l?toFixedPoint(i.charAt(1),-g,i.charAt(0)):i.charAt(0);else{if(f.length=a,l)for(--r;++f[--a]>r;)f[a]=0,a||(++s,f=[1].concat(f));for(c=f.length;!f[--c];);for(p=0,e="";p<=c;e+=i.charAt(f[p++]));e=toFixedPoint(e,s,i.charAt(0))}return e},d=function(e,t,r,n,o){var i,a,s,c,l,u,f,h,p,g,_,d,b,y,m,v,S,w=e.s==t.s?1:-1,E=e.c,$=t.c;if(!(E&&E[0]&&$&&$[0]))return new x(e.s&&t.s&&(E?!$||E[0]!=$[0]:$)?E&&0==E[0]||!$?0*w:w/0:NaN);for(p=(h=new x(w)).c=[],w=r+(a=e.e-t.e)+1,o||(o=BASE,a=bitFloor(e.e/LOG_BASE)-bitFloor(t.e/LOG_BASE),w=w/LOG_BASE|0),s=0;$[s]==(E[s]||0);s++);if($[s]>(E[s]||0)&&a--,w<0)p.push(1),c=!0;else{for(y=E.length,v=$.length,w+=2,1<(l=mathfloor(o/($[s=0]+1)))&&($=N($,l,o),E=N(E,l,o),v=$.length,y=E.length),b=v,_=(g=E.slice(0,v)).length;_<v;g[_++]=0);S=$.slice(),S=[0].concat(S),m=$[0],$[1]>=o/2&&m++;do{if(l=0,(i=k($,g,v,_))<0){if(d=g[0],v!=_&&(d=d*o+(g[1]||0)),1<(l=mathfloor(d/m)))for(f=(u=N($,l=o<=l?o-1:l,o)).length,_=g.length;1==k(u,g,f,_);)l--,j(u,v<f?S:$,f,o),f=u.length,i=1;else 0==l&&(i=l=1),f=(u=$.slice()).length;if(j(g,u=f<_?[0].concat(u):u,_,o),_=g.length,-1==i)for(;k($,g,v,_)<1;)l++,j(g,v<_?S:$,_,o),_=g.length}else 0===i&&(l++,g=[0])}while(p[s++]=l,g[0]?g[_++]=E[b]||0:(g=[E[b]],_=1),(b++<y||null!=g[0])&&w--);c=null!=g[0],p[0]||p.splice(0,1)}if(o==BASE){for(s=1,w=p[0];10<=w;w/=10,s++);P(h,r+(h.e=s+a*LOG_BASE-1)+1,n,c)}else h.e=a,h.r=+c;return h},a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g,h=function(e,t,r,n){var o,i=r?t:t.replace(p,"");if(u.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t}),n&&(o=n,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new x(i,o);if(x.DEBUG)throw Error(bignumberError+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},r.absoluteValue=r.abs=function(){var e=new x(this);return e.s<0&&(e.s=1),e},r.comparedTo=function(e,t){return compare(this,new x(e,t))},r.decimalPlaces=r.dp=function(e,t){var r,n;if(null!=e)return intCheck(e,0,MAX),null==t?t=m:intCheck(t,0,8),P(new x(this),e+this.e+1,t);if(!(e=this.c))return null;if(r=((n=e.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,n=e[n])for(;n%10==0;n/=10,r--);return r=r<0?0:r},r.dividedBy=r.div=function(e,t){return d(this,new x(e,t),y,m)},r.dividedToIntegerBy=r.idiv=function(e,t){return d(this,new x(e,t),0,1)},r.exponentiatedBy=r.pow=function(e,t){var r,n,o,i,a,s,c,l,u=this;if((e=new x(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+L(e));if(null!=t&&(t=new x(t)),a=14<e.e,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return l=new x(Math.pow(+L(u),a?e.s*(2-isOdd(e)):+L(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new x(NaN);(n=!s&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(9<e.e&&(0<u.e||u.e<-1||(0==u.e?1<u.c[0]||a&&24e7<=u.c[1]:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return i=u.s<0&&isOdd(e)?-0:0,-1<u.e&&(i=1/i),new x(s?1/i:i);$&&(i=mathceil($/LOG_BASE+2))}for(c=a?(r=new x(.5),s&&(e.s=1),isOdd(e)):(o=Math.abs(+L(e)))%2,l=new x(g);;){if(c){if(!(l=l.times(u)).c)break;i?l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(P(e=e.times(r),e.e+1,1),14<e.e)c=isOdd(e);else{if(0===(o=+L(e)))break;c=o%2}u=u.times(u),i?u.c&&u.c.length>i&&(u.c.length=i):n&&(u=u.mod(t))}return n?l:(s&&(l=g.div(l)),t?l.mod(t):i?P(l,$,m,void 0):l)},r.integerValue=function(e){var t=new x(this);return null==e?e=m:intCheck(e,0,8),P(t,t.e+1,e)},r.isEqualTo=r.eq=function(e,t){return 0===compare(this,new x(e,t))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(e,t){return 0<compare(this,new x(e,t))},r.isGreaterThanOrEqualTo=r.gte=function(e,t){return 1===(t=compare(this,new x(e,t)))||0===t},r.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},r.isLessThan=r.lt=function(e,t){return compare(this,new x(e,t))<0},r.isLessThanOrEqualTo=r.lte=function(e,t){return-1===(t=compare(this,new x(e,t)))||0===t},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return 0<this.s},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new x(e,t)).s,!s||!t)return new x(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,l=e.e/LOG_BASE,u=a.c,f=e.c;if(!c||!l){if(!u||!f)return u?(e.s=-t,e):new x(f?a:NaN);if(!u[0]||!f[0])return f[0]?(e.s=-t,e):new x(u[0]?a:3==m?-0:0)}if(c=bitFloor(c),l=bitFloor(l),u=u.slice(),s=c-l){for((o=(i=s<0)?(s=-s,u):(l=c,f)).reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=u.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(u[t]!=f[t]){i=u[t]<f[t];break}if(i&&(o=u,u=f,f=o,e.s=-e.s),0<(t=(n=f.length)-(r=u.length)))for(;t--;u[r++]=0);for(t=BASE-1;s<n;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=BASE}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--l);return u[0]?G(e,u,l):(e.s=3==m?-1:1,e.c=[e.e=0],e)},r.modulo=r.mod=function(e,t){var r,n=this;return e=new x(e,t),!n.c||!e.s||e.c&&!e.c[0]?new x(NaN):!e.c||n.c&&!n.c[0]?new x(n):(9==o?(t=e.s,e.s=1,r=d(n,e,0,3),e.s=t,r.s*=t):r=d(n,e,0,o),(e=n.minus(r.times(e))).c[0]||1!=o||(e.s=n.s),e)},r.multipliedBy=r.times=function(e,t){var r,n,o,i,a,s,c,l,u,f,h,p,g,_=this,d=_.c,b=(e=new x(e,t)).c;if(!(d&&b&&d[0]&&b[0]))return!_.s||!e.s||d&&!d[0]&&!b||b&&!b[0]&&!d?e.c=e.e=e.s=null:(e.s*=_.s,d&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(t=bitFloor(_.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=_.s,(s=d.length)<(_=b.length)&&(h=d,d=b,b=h,n=s,s=_,_=n),n=s+_,h=[];n--;h.push(0));for(p=BASE,g=SQRT_BASE,n=_;0<=--n;){for(u=b[n]%g,f=b[n]/g|(r=0),o=n+(i=s);n<o;)r=((c=u*(c=d[--i]%g)+(a=f*c+(l=d[i]/g|0)*u)%g*g+h[o]+r)/p|0)+(a/g|0)+f*l,h[o--]=c%p;h[o]=r}return r?++t:h.splice(0,1),G(e,h,t)},r.negated=function(){var e=new x(this);return e.s=-e.s||null,e},r.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new x(e,t)).s,!o||!t)return new x(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/LOG_BASE,a=e.e/LOG_BASE,s=n.c,c=e.c;if(!i||!a){if(!s||!c)return new x(o/0);if(!s[0]||!c[0])return c[0]?e:new x(s[0]?n:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for((r=0<o?(a=i,c):(o=-o,s)).reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),G(e,s,a)},r.precision=r.sd=function(e,t){var r,n;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=m:intCheck(t,0,8),P(new x(this),e,t);if(!(t=this.c))return null;if(r=(n=t.length-1)*LOG_BASE+1,n=t[n]){for(;n%10==0;n/=10,r--);for(n=t[0];10<=n;n/=10,r++);}return r=e&&this.e+1>r?this.e+1:r},r.shiftedBy=function(e){return intCheck(e,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER),this.times("1e"+e)},r.squareRoot=r.sqrt=function(){var e,t,r,n,o,i=this,a=i.c,s=i.s,c=i.e,l=y+4,u=new x("0.5");if(1!==s||!a||!a[0])return new x(!s||s<0&&(!a||a[0])?NaN:a?i:1/0);if((r=0==(s=Math.sqrt(+L(i)))||s==1/0?(((t=coeffToString(a)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=bitFloor((c+1)/2)-(c<0||c%2),new x(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):new x(s+"")).c[0])for((s=(c=r.e)+l)<3&&(s=0);;)if(o=r,r=u.times(o.plus(d(i,o,l,1))),coeffToString(o.c).slice(0,s)===(t=coeffToString(r.c)).slice(0,s)){if(r.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(r,r.e+y+2,1),e=!r.times(r).eq(i));break}if(!n&&(P(o,o.e+y+2,0),o.times(o).eq(i))){r=o;break}l+=4,s+=4,n=1}return P(r,r.e+y+1,m,e)},r.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),n(this,e,t,1)},r.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),n(this,e,t)},r.toFormat=function(e,t,r){if(null==r)null!=e&&t&&"object"==_typeof(t)?(r=t,t=null):e&&"object"==_typeof(e)?(r=e,e=t=null):r=O;else if("object"!=_typeof(r))throw Error(bignumberError+"Argument not an object: "+r);if(e=this.toFixed(e,t),this.c){var n,t=e.split("."),o=+r.groupSize,i=+r.secondaryGroupSize,a=r.groupSeparator||"",s=t[0],t=t[1],c=this.s<0,l=c?s.slice(1):s,u=l.length;if(i&&(n=o,o=i,u-=i=n),0<o&&0<u){for(s=l.substr(0,n=u%o||o);n<u;n+=o)s+=a+l.substr(n,o);0<i&&(s+=a+l.slice(n)),c&&(s="-"+s)}e=t?s+(r.decimalSeparator||"")+((i=+r.fractionGroupSize)?t.replace(new RegExp("\\d{"+i+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):t):s}return(r.prefix||"")+e+(r.suffix||"")},r.toFraction=function(e){var t,r,n,o,i,a,s,c,l,u,f=this,h=f.c;if(null!=e&&(!(s=new x(e)).isInteger()&&(s.c||1!==s.s)||s.lt(g)))throw Error(bignumberError+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+L(s));if(!h)return new x(f);for(t=new x(g),l=r=new x(g),n=c=new x(g),h=coeffToString(h),i=t.e=h.length-f.e-1,t.c[0]=POWS_TEN[(a=i%LOG_BASE)<0?LOG_BASE+a:a],e=!e||0<s.comparedTo(t)?0<i?t:l:s,a=w,w=1/0,s=new x(h),c.c[0]=0;u=d(s,t,0,1),1!=(o=r.plus(u.times(n))).comparedTo(e);)r=n,n=o,l=c.plus(u.times(o=l)),c=o,t=s.minus(u.times(o=t)),s=o;return o=d(e.minus(r),n,0,1),c=c.plus(o.times(l)),r=r.plus(o.times(n)),c.s=l.s=f.s,h=d(l,n,i*=2,m).minus(f).abs().comparedTo(d(c,r,i,m).minus(f).abs())<1?[l,n]:[c,r],w=a,h},r.toNumber=function(){return+L(this)},r.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),n(this,e,t,2)},r.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=null==e?o<=_||v<=o?toExponential(coeffToString(r.c),o):toFixedPoint(coeffToString(r.c),o,"0"):10===e&&A?toFixedPoint(coeffToString((r=P(new x(r),y+o+1,m)).c),r.e,"0"):(intCheck(e,2,C.length,"Base"),f(toFixedPoint(coeffToString(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},r.valueOf=r.toJSON=function(){return L(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,null!=e&&x.set(e),x}function bitFloor(e){var t=0|e;return 0<e||e===t?t:t-1}function coeffToString(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=LOG_BASE-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,e=e.e,t=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=e==t,!o||!i)return n?0:!o^r?1:-1;if(!n)return t<e^r?1:-1;for(s=(e=o.length)<(t=i.length)?e:t,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return e==t?0:t<e^r?1:-1}function intCheck(e,t,r,n){if(e<t||r<e||e!==mathfloor(e))throw Error(bignumberError+(n||"Argument")+("number"==typeof e?e<t||r<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber=clone();function eval_postfix(e){for(var t=[];0<e.length;){var r=e.shift();if(is_operator(r)){if(t.length<2)throw new Error("错误的栈长度, 可能是无法计算的表达式");var n=t.pop(),o=t.pop();if("string"==typeof n&&!BigNumber.isBigNumber(n)){if(!is_str_number(n))throw new Error("".concat(n,"不是一个合法的数字"));n=new BigNumber(n)}if("string"==typeof o&&!BigNumber.isBigNumber(o)){if(!is_str_number(o))throw new Error("".concat(o,"不是一个合法的数字"));o=new BigNumber(o)}switch(r){case"+":t.push(o.plus(n));break;case"-":t.push(o.minus(n));break;case"*":t.push(o.times(n));break;case"/":t.push(o.div(n));break;case"%":t.push(o.mod(n));break;case"**":t.push(o.pow(n))}}else t.push(r)}if(1!==t.length)throw"unvalid expression";var i=t[0];if((i=BigNumber.isBigNumber(i)?i:BigNumber(i)).isNaN())throw new Error("计算结果为NaN");return i}function decimal_round(o,i,a,s,e){var c=o,l=i,u=i.length,t={"~-":function(){l=i.slice(0,"<"===a?s-1:s)},"~+":function(){var e,t="<"===a?s-1:s;u<=t||0===u||(e=i.slice(0,t),0!=+i.slice(t,u)&&(e=(+e+1).toString()).length>t?(l=e.slice(1,e.length),c=(+c+1).toString()):l=e)},"~5":function(){var e,t;0===u||(l=i.slice(0,e="<"===a?s-1:s),t=+i[e],Number.isNaN(t))||5<=t&&(l=(+l+1).toString()).length>e&&(l=l.slice(1,l.length),c=(+c+1).toString())},"~6":function(){var e,t,r,n;0!==u&&(t=+i[e="<"===a?s-1:s],r=""===(r=i.slice(+e+1,i.length))?0:parseInt(r),n=0===e?+o[o.length-1]:+i[e-1],l=i.slice(0,e),6<=t||5==t&&0<r||5==t&&n%2!=0)&&(l=(+l+1).toString()).length>e&&(l=l.slice(1,l.length),c=(+c+1).toString())}};return"<="===a?l=u<=s?i:(t[e]&&t[e](),l.replace(/0+$/,"")):"<"===a?l=u<s?i:(t[e]&&t[e](),l.replace(/0+$/,"")):"="===a?u<s?l=i+"0".repeat(s-u):s<u&&t[e]&&t[e]():">="===a?u<s&&(l=i+"0".repeat(s-u)):">"===a&&u<=s&&(l=i+"0".repeat(s-u+1)),{int_part:c,dec_part:l}}function format(e,t,r){var n,o,i,a,s,c,l,u,f,h="";return BigNumber.isBigNumber(e)?h=e.toFixed():"string"!=typeof e&&(h=e.toString()),"undefined"===h||"NaN"===h?null:(o=n=null,a=i=!1,f=u=l=c=!(s="~-"),t.forEach(function(e){var t=e.type;if("symbol"===t){if(![">=","<=","=","<",">"].includes(e.value))throw new Error("错误的格式化参数:",e.value);o=e.value}else if("to-number"===t)f=!0;else if("comma"===t)i=!0;else if("number"===t)n=e.value;else if("plus"===t)a=!0;else if("round"===t)s=e.value;else if("fraction"===t)l=!0;else if("scientific"===t)c=!0;else{if("percent"!==t)throw new Error("错误的fmt Token");u=!0}}),c?(e=BigNumber(h).toExponential(),a&&!e.startsWith("-")?"+"+e:e):l?(t=BigNumber(h).toFraction().map(function(e){return e.toFixed()}).join("/"),a&&!t.startsWith("-")?"+"+t:t):(u&&(h=BigNumber(h).times(100).toFixed()),n&&(t=(e=decimal_round(t=(e=h.split("."))[0],1===e.length?"":e[1],o,+n,s)).int_part,h=""===(e=e.dec_part)?t:"".concat(t,".").concat(e)),i&&(f=!1,h=1<(t=h.split(".")).length?((e=t[0]).includes("-")?t[0]=e[0]+e.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):t[0]=e.replace(/(?=(?!^)(?:\d{3})+$)/g,","),t.join(".")):(e=t[0]).includes("-")?e[0]+e.slice(1).replace(/(?=(?!^)(?:\d{3})+$)/g,","):e.replace(/(?=(?!^)(?:\d{3})+$)/g,",")),a&&(f=!1,h.startsWith("-")||(h="+"+h)),u&&(f=!1,h+="%"),f&&!r?+h:h))}function fill_fmt_tokens(e,n){return e.map(function(e){if("var"!==e.type)return e;for(var t,r=0;r<n.length&&!not_undefined(t=get_1(n[r],e.value));r++);if(is_number(t))return{type:"number",value:t};throw new Error("错误的填充值")})}function get_token_and_unit(e){var r=null;return e.length,{tokens:e.map(function(e){var t=split_unit_num(e.value);return null!==t.unit?(null==r&&(r=t.unit),{type:"number",value:t.num}):e}),unit:r}}var _debug=!1;function open_debug(){_debug=!0}function close_debug(){_debug=!1}function get_debug_config(){return _debug}var debug_color={bg:"#ff8936",fg:"#fff",field:"#67C23A",field2:"#ee7959"},debug_style={expr:"background: ".concat(debug_color.bg,";color: ").concat(debug_color.fg,";font-weight: bold;border-radius: 4px; padding: 3px 8px;"),label1:"color: ".concat(debug_color.field,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),label2:"color: ".concat(debug_color.field2,"; font-weight: bold; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"),nowrap:"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"};function calc_wrap(t,r){var n={},o={_error:"-"};return["string","number"].includes(_typeof(t))?(Array.isArray(r)||void 0===r||Object.keys(r).forEach(function(e){return e.startsWith("_")&&(o[e]=r[e])}),n=null!=r?r:{},/[a-zA-Z_$]/.test(t.toString())?void 0!==r?(n=r,calc(t,_objectSpread2(_objectSpread2({},o),n))):function(e){return calc(t,_objectSpread2(_objectSpread2({},o),e))}:calc(t,_objectSpread2(_objectSpread2({},o),n))):(n=t,function(e){return calc(e,_objectSpread2(_objectSpread2({},o),n))})}function check_version(){return _check_version.apply(this,arguments)}function _check_version(){return _check_version=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(){var res,code,versions,last_version,larr,varr,script;return _regeneratorRuntime().wrap(function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if("undefined"==typeof process||"node"!==process.release.name)_context.next=19;else{if(17<=parseInt(process.versions.node))return _context.next=4,fetch("https://cdn.jsdelivr.net/npm/a-calc/a-calc.versions.js");_context.next=17}break;case 4:return res=_context.sent,_context.next=7,res.text();case 7:code=_context.sent,versions=eval(code),last_version=versions.at(-1),larr=last_version.match(/(\d+)\.(\d+)\.(\d+)/),larr.shift(),larr=larr.map(function(e){return parseInt(e)}),varr=version.match(/(\d+)\.(\d+)\.(\d+)/),varr.shift(),varr=varr.map(function(e){return parseInt(e)}),(larr[0]>varr[0]||larr[0]===varr[0]&&larr[1]>varr[1]||larr[0]===varr[0]&&larr[1]===varr[1]&&larr[2]>varr[2])&&console.warn("a-calc has a new version:",last_version);case 17:_context.next=23;break;case 19:script=document.createElement("script"),script.onload=function(){var e,t,r=a_calc_versions;Array.isArray(r)&&((e=(r=r.at(-1)).match(/(\d+)\.(\d+)\.(\d+)/)).shift(),e=e.map(function(e){return parseInt(e)}),(t=version.match(/(\d+)\.(\d+)\.(\d+)/)).shift(),t=t.map(function(e){return parseInt(e)}),e[0]>t[0]||e[0]===t[0]&&e[1]>t[1]||e[0]===t[0]&&e[1]===t[1]&&e[2]>t[2])&&console.log("%c↑↑↑ a-calc has a new version: %s ↑↑↑","color: #67C23A;",r)},script.src="https://cdn.jsdelivr.net/npm/a-calc/a-calc.versions.js",document.body.appendChild(script);case 23:case"end":return _context.stop()}},_callee)})),_check_version.apply(this,arguments)}function calc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o=parse_args(t),i=get_1(o,"options._error",void 0),a=get_1(o,"options._debug",!1),s=get_1(o,"options._unit",!1),c=o.options,l=null;if(o.fmt_err||o.expr_err){if(not_undefined(i))return i;throw new Error("表达式或格式化字符串错误,表达式为:".concat(o.expr))}var u=o.fmt_tokens;if(not_undefined(i))try{n=tokenizer(o.expr,s)}catch(e){return i}else n=tokenizer(o.expr,s);if(is_null(c))f=n;else{var f,h=[];if(Array.isArray(c)?h=c:(h.push(c),not_undefined(c=get_1(c,"_fill_data",{}))&&(Array.isArray(c)?h=[].concat(_toConsumableArray(h),_toConsumableArray(c)):h.push(c))),not_undefined(i))try{f=fill_tokens(n,h,s),not_null(o.fmt_tokens)&&(u=fill_fmt_tokens(o.fmt_tokens,h))}catch(e){return i}else f=fill_tokens(n,h,s),not_null(o.fmt_tokens)&&(u=fill_fmt_tokens(o.fmt_tokens,h));[!0,"on","auto","space"].includes(s)&&(l=(c=get_token_and_unit(f)).unit,f=c.tokens)}h=token2postfix(f),c=null;if(not_undefined(i))try{c=eval_postfix(h)}catch(e){return i}else c=eval_postfix(h);if("Infinity"!==(c=not_null(u)?format(c,u,s):null!==c?c.toFixed():null)&&null!==c)return null!==l&&(c+=l),(get_debug_config()||a)&&(console.groupCollapsed("%c"+o.origin_expr,debug_style.expr),console.groupCollapsed("%c表达式: %c%s",debug_style.label1,debug_style.nowrap,o.origin_expr),console.log(o.origin_expr),console.groupEnd(),console.groupCollapsed("%c数据源: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o.origin_fill_data)),console.log(o.origin_fill_data),console.groupEnd(),console.groupCollapsed("%c结果: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(c)),console.log(c),console.groupEnd(),console.groupCollapsed("%ctokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(n)),console.log(n),console.groupEnd(),console.groupCollapsed("%cfilled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(f)),console.log(f),console.groupEnd(),console.groupCollapsed("%cfmt-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o.fmt_tokens)),console.log(o.fmt_tokens),console.groupEnd(),console.groupCollapsed("%cfmt-filled-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(u)),console.log(u),console.groupEnd(),console.groupCollapsed("%cpostfix-tokens: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(h)),console.log(h),console.groupEnd(),console.groupCollapsed("%c单位: %c%s",debug_style.label1,debug_style.nowrap,l),console.log(l),console.groupEnd(),console.groupCollapsed("%cparse-arg: %c%s",debug_style.label1,debug_style.nowrap,JSON.stringify(o)),console.log(o),console.groupEnd(),console.groupEnd()),c;if(not_undefined(i))return i;throw new Error("计算错误可能是非法的计算式")}function check_update(){check_version().catch(function(){})}function print_version(){console.log("%ca-calc:%c ".concat(version," %c=> %curl:%c https://www.npmjs.com/package/a-calc"),"color: #fff;background: #67C23A;padding: 2px 5px;border-radius:4px;font-size: 14px;","color: #67C23A;font-size:14px;","color: #67C23A;font-size:14px;","background: #67C23A;font-size:14px; padding: 2px 5px; border-radius: 4px; color: #fff;","font-size:14px;")}var calc_util={check_update:check_update,print_version:print_version,open_debug:open_debug,close_debug:close_debug},fmt=calc;return exports.calc=calc,exports.calc_util=calc_util,exports.calc_wrap=calc_wrap,exports.fmt=fmt,exports.version=version,Object.defineProperty(exports,"__esModule",{value:!0}),exports}({}); |
{ | ||
"name": "a-calc", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Very powerful arbitrary precision calculation library and number formatting library", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.cjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193357