@dazhicheng/utils 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +8 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -6
- package/dist/axios/error.d.ts +0 -86
- package/dist/axios/error.d.ts.map +0 -1
- package/dist/axios/index.d.ts +0 -4
- package/dist/axios/index.d.ts.map +0 -1
- package/dist/axios/loadinSvg.d.ts +0 -2
- package/dist/axios/loadinSvg.d.ts.map +0 -1
- package/dist/axios/loading.d.ts +0 -12
- package/dist/axios/loading.d.ts.map +0 -1
- package/dist/axios/status.d.ts +0 -38
- package/dist/axios/status.d.ts.map +0 -1
- package/dist/axios/type.d.ts +0 -24
- package/dist/axios/type.d.ts.map +0 -1
- package/dist/file.d.ts +0 -13
- package/dist/file.d.ts.map +0 -1
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.iife.js +0 -2
- package/dist/index.iife.js.map +0 -1
- package/dist/math.d.ts +0 -5
- package/dist/math.d.ts.map +0 -1
- package/dist/string.d.ts +0 -3
- package/dist/string.d.ts.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import e from"axios";import{ElMessage as t,ElLoading as r}from"element-plus";import{nextTick as n}from"vue";function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e){return e.trim()}function s(e,t){return e+t}function i(e,t){return e*t}function c(e,t){return e-t}function d(e,t){return e/t}const u=(e,t)=>{try{const r=new Blob([e.data],{type:t}),n=document.createElement("a"),o=(window.URL||window.webkitURL).createObjectURL(r);n.href=o;let a=((e.headers["content-disposition"]||"").split("=")||[]).at(-1)||"";a=a?decodeURI(a.replace(/"/g,"")):"";const s=a?.split("''");a=s.at(-1)||"",n.download=a,n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(o)}catch(e){console.log(e)}};var l,m;!function(e){e[e.success=200]="success",e[e.success1=0]="success1",e[e.error=400]="error",e[e.unauthorized=401]="unauthorized",e[e.forbidden=403]="forbidden",e[e.notFound=404]="notFound",e[e.methodNotAllowed=405]="methodNotAllowed",e[e.requestTimeout=408]="requestTimeout",e[e.internalServerError=500]="internalServerError",e[e.notImplemented=501]="notImplemented",e[e.badGateway=502]="badGateway",e[e.serviceUnavailable=503]="serviceUnavailable",e[e.gatewayTimeout=504]="gatewayTimeout",e[e.httpVersionNotSupported=505]="httpVersionNotSupported",e[e.NEED_REFRESH_TOKEN=1001]="NEED_REFRESH_TOKEN",e[e.API_NO_AUTH=1002]="API_NO_AUTH",e[e.INVALID_TOKEN=1005]="INVALID_TOKEN"}(l||(l={})),function(e){e.badGateway="网关错误,请稍后重试",e.forbidden="禁止访问该资源",e.gatewayTimeout="网关超时,请稍后重试",e.internalServerError="服务器内部错误,请稍后重试",e.methodNotAllowed="请求方法不允许",e.networkError="网络连接异常,请检查网络连接",e.notFound="请求的资源不存在",e.requestCancelled="请求已取消",e.requestConfigError="请求配置错误",e.requestFailed="请求失败",e.requestTimeout="请求超时,请稍后重试",e.serviceUnavailable="服务暂时不可用,请稍后重试",e.unauthorized="未授权访问,请重新登录"}(m||(m={}));class h extends Error{code;data;timestamp;url;method;constructor(e,t,r){super(e),this.name="HttpError",this.code=t,this.data=r?.data,this.timestamp=(new Date).toISOString(),this.url=r?.url||"",this.method=r?.method||""}toLogData(){return{code:this.code,message:this.message,data:this.data,timestamp:this.timestamp,url:this.url||"",method:this.method||"",stack:this.stack||""}}}function p(e){if("ERR_CANCELED"===e.code)throw console.warn("Request cancelled:",e.message),new h(m.requestCancelled,l.error);const t=e.response?.status,r=e.response?.data?.msg||e.message,n=e.config;if(!e.response)throw new h(m.networkError,l.error,{url:n?.url||"",method:n?.method?.toUpperCase()||""});const o=t?(a=t,{[l.unauthorized]:m.unauthorized,[l.forbidden]:m.forbidden,[l.notFound]:m.notFound,[l.methodNotAllowed]:m.methodNotAllowed,[l.requestTimeout]:m.requestTimeout,[l.internalServerError]:m.internalServerError,[l.badGateway]:m.badGateway,[l.serviceUnavailable]:m.serviceUnavailable,[l.gatewayTimeout]:m.gatewayTimeout}[a]||m.internalServerError):r||m.requestFailed;var a;throw new h(o,t||l.error,{data:e.response.data,url:n?.url||"",method:n?.method?.toUpperCase()||""})}function f(e,r=!0){r&&t.error(e.message),console.error("[HTTP Error]",e.toLogData())}const g=()=>document.documentElement.classList.contains("dark")?"rgba(7, 7, 7, 0.85)":"rgba(255, 255, 255, 0.5)",w={lock:!0,get background(){return g()},svg:'\n <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <style>\n .spinner {\n transform-origin: 20px 20px;\n animation: rotate 1.6s linear infinite;\n }\n .dot {\n fill: var(--theme-color);\n animation: fade 1.6s infinite;\n }\n .dot:nth-child(1) { animation-delay: 0s; }\n .dot:nth-child(2) { animation-delay: 0.5s; }\n .dot:nth-child(3) { animation-delay: 1s; }\n .dot:nth-child(4) { animation-delay: 1.5s; }\n @keyframes rotate {\n 100% { transform: rotate(360deg); }\n }\n @keyframes fade {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n </style>\n <g class="spinner">\n <circle class="dot" cx="20" cy="8" r="4"/>\n <circle class="dot" cx="32" cy="20" r="4"/>\n <circle class="dot" cx="20" cy="32" r="4"/>\n <circle class="dot" cx="8" cy="20" r="4"/>\n </g>\n </svg>\n',svgViewBox:"0 0 40 40",customClass:"art-loading-fix"};let E=null;const y={showLoading(){if(!E){const e={...w,background:g()};E=r.service(e)}return()=>this.hideLoading()},hideLoading(){E&&(E.close(),E=null)}};function T(r){const{router:o,useUserStore:a,VITE_API_URL:s,VITE_WITH_CREDENTIALS:i}=r;let c=!1;const d=["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"];let g=0;function w(){setTimeout(()=>{g--,0===g&&c&&n(()=>{y.hideLoading(),c=!1})},0)}let E=!1,T=null;const v=e.create({timeout:6e4,baseURL:"/"+s,withCredentials:"true"===i,validateStatus:e=>e>=200&&e<300,transformResponse:[(e,t)=>{const r=t["content-type"];if(r?.includes("application/json"))try{return JSON.parse(e)}catch{return e}return e}]});function b(e,t){return new h(e,t)}function N(e){const t=b(e||m.unauthorized,l.unauthorized);if(!E)throw E=!0,U(),T=setTimeout(S,3e3),f(t,!0),t;throw t}function S(){E=!1,T&&clearTimeout(T),T=null}v.interceptors.request.use(e=>{const{accessToken:t,info:r}=a();return t&&(e.headers.set("Authorization",t),e.headers.set("token",t),e.headers.set("x-userid-header",r.userId),e.headers.set("x-permission-code-header",o.currentRoute.value.meta.permissionOnlyCode)),e.hideLoading||0!==g||(c=!0,y.showLoading()),g++,!e.data||e.data instanceof FormData||e.headers["Content-Type"]||(e.headers.set("Content-Type","application/json"),e.data=JSON.stringify(e.data)),e},e=>(f(b(m.requestConfigError,l.error)),Promise.reject(e))),v.interceptors.response.use(e=>{w();const t=e.headers["content-type"];if(t?.includes("application/json")){const{code:t,msg:r}=e.data;if([l.success,l.success1].includes(t))return e;throw[l.unauthorized,l.INVALID_TOKEN].includes(t)&&N(r),b(r||m.requestFailed,t)}if(d.includes(t))return u(e,t),e},e=>(w(),e.response?.status===l.unauthorized&&N(),Promise.reject(p(e))));const U=()=>{setTimeout(()=>{a().logOut()},500)};async function L(e,r=0){try{return await async function(e){["POST","PUT"].includes(e.method?.toUpperCase()||"")&&e.params&&!e.data&&(e.data=e.params,e.params=void 0);try{const r=await v.request(e);return e.showSuccessMessage&&r.data.msg&&function(e,r=!0){r&&t.success(e)}(r.data.msg),r.data.data}catch(t){const r=[l.unauthorized,l.NEED_REFRESH_TOKEN].includes(t.code);if(t instanceof h&&!r){f(t,!1!==e.showErrorMessage)}return Promise.reject(t)}}(e)}catch(t){if(t instanceof h&&[l.NEED_REFRESH_TOKEN].includes(t.code)&&!e.url?.includes("/iam/user/refreshToken"))return await a().refreshTokenFunc(),await R(1e3),L(e,r-1);if(r>0&&t instanceof h&&(n=t.code,[l.requestTimeout,l.internalServerError,l.badGateway,l.serviceUnavailable,l.gatewayTimeout].includes(n)))return await R(1e3),L(e,r-1);throw t}var n}function R(e){return new Promise(t=>setTimeout(t,e))}const _={get:e=>L({...e,method:"GET"}),post:e=>L({...e,method:"POST"}),put:e=>L({...e,method:"PUT"}),del:e=>L({...e,method:"DELETE"}),request:e=>L(e)};return{..._,logOut:U}}export{T as TtHttp,o as capitalize,d as divide,u as downloadFile,i as multiply,c as subtract,s as sum,a as trim};
|
|
1
|
+
import n from"axios";import{ElMessage as t,ElLoading as e}from"element-plus";import{nextTick as r,computed as i}from"vue";function o(n){return n.charAt(0).toUpperCase()+n.slice(1)}function u(n){return n.trim()}function s(n){return n.replace(/-(\w)/g,(n,t)=>t?t.toUpperCase():"")}function a(n,t){return n+t}const c=(n,t)=>{try{const e=new Blob([n.data],{type:t}),r=document.createElement("a"),i=(window.URL||window.webkitURL).createObjectURL(e);r.href=i;let o=((n.headers["content-disposition"]||"").split("=")||[]).at(-1)||"";o=o?decodeURI(o.replace(/"/g,"")):"";const u=o?.split("''");o=u.at(-1)||"",r.download=o,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(i)}catch(n){console.log(n)}};var f,l;!function(n){n[n.success=200]="success",n[n.success1=0]="success1",n[n.error=400]="error",n[n.unauthorized=401]="unauthorized",n[n.forbidden=403]="forbidden",n[n.notFound=404]="notFound",n[n.methodNotAllowed=405]="methodNotAllowed",n[n.requestTimeout=408]="requestTimeout",n[n.internalServerError=500]="internalServerError",n[n.notImplemented=501]="notImplemented",n[n.badGateway=502]="badGateway",n[n.serviceUnavailable=503]="serviceUnavailable",n[n.gatewayTimeout=504]="gatewayTimeout",n[n.httpVersionNotSupported=505]="httpVersionNotSupported",n[n.NEED_REFRESH_TOKEN=1001]="NEED_REFRESH_TOKEN",n[n.API_NO_AUTH=1002]="API_NO_AUTH",n[n.INVALID_TOKEN=1005]="INVALID_TOKEN"}(f||(f={})),function(n){n.badGateway="网关错误,请稍后重试",n.forbidden="禁止访问该资源",n.gatewayTimeout="网关超时,请稍后重试",n.internalServerError="服务器内部错误,请稍后重试",n.methodNotAllowed="请求方法不允许",n.networkError="网络连接异常,请检查网络连接",n.notFound="请求的资源不存在",n.requestCancelled="请求已取消",n.requestConfigError="请求配置错误",n.requestFailed="请求失败",n.requestTimeout="请求超时,请稍后重试",n.serviceUnavailable="服务暂时不可用,请稍后重试",n.unauthorized="未授权访问,请重新登录"}(l||(l={}));class h extends Error{code;data;timestamp;url;method;constructor(n,t,e){super(n),this.name="HttpError",this.code=t,this.data=e?.data,this.timestamp=(new Date).toISOString(),this.url=e?.url||"",this.method=e?.method||""}toLogData(){return{code:this.code,message:this.message,data:this.data,timestamp:this.timestamp,url:this.url||"",method:this.method||"",stack:this.stack||""}}}function d(n){if("ERR_CANCELED"===n.code)throw console.warn("Request cancelled:",n.message),new h(l.requestCancelled,f.error);const t=n.response?.status,e=n.response?.data?.msg||n.message,r=n.config;if(!n.response)throw new h(l.networkError,f.error,{url:r?.url||"",method:r?.method?.toUpperCase()||""});const i=t?(o=t,{[f.unauthorized]:l.unauthorized,[f.forbidden]:l.forbidden,[f.notFound]:l.notFound,[f.methodNotAllowed]:l.methodNotAllowed,[f.requestTimeout]:l.requestTimeout,[f.internalServerError]:l.internalServerError,[f.badGateway]:l.badGateway,[f.serviceUnavailable]:l.serviceUnavailable,[f.gatewayTimeout]:l.gatewayTimeout}[o]||l.internalServerError):e||l.requestFailed;var o;throw new h(i,t||f.error,{data:n.response.data,url:r?.url||"",method:r?.method?.toUpperCase()||""})}function p(n,e=!0){e&&t.error(n.message),console.error("[HTTP Error]",n.toLogData())}const g=()=>document.documentElement.classList.contains("dark")?"rgba(7, 7, 7, 0.85)":"rgba(255, 255, 255, 0.5)",m={lock:!0,get background(){return g()},svg:'\n <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">\n <style>\n .spinner {\n transform-origin: 20px 20px;\n animation: rotate 1.6s linear infinite;\n }\n .dot {\n fill: var(--theme-color);\n animation: fade 1.6s infinite;\n }\n .dot:nth-child(1) { animation-delay: 0s; }\n .dot:nth-child(2) { animation-delay: 0.5s; }\n .dot:nth-child(3) { animation-delay: 1s; }\n .dot:nth-child(4) { animation-delay: 1.5s; }\n @keyframes rotate {\n 100% { transform: rotate(360deg); }\n }\n @keyframes fade {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n </style>\n <g class="spinner">\n <circle class="dot" cx="20" cy="8" r="4"/>\n <circle class="dot" cx="32" cy="20" r="4"/>\n <circle class="dot" cx="20" cy="32" r="4"/>\n <circle class="dot" cx="8" cy="20" r="4"/>\n </g>\n </svg>\n',svgViewBox:"0 0 40 40",customClass:"art-loading-fix"};let v=null;const w={showLoading(){if(!v){const n={...m,background:g()};v=e.service(n)}return()=>this.hideLoading()},hideLoading(){v&&(v.close(),v=null)}};function y(e){const{router:i,useUserStore:o,VITE_API_URL:u,VITE_WITH_CREDENTIALS:s}=e;let a=!1;const g=["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"];let m=0;function v(){setTimeout(()=>{m--,0===m&&a&&r(()=>{w.hideLoading(),a=!1})},0)}let y=!1,b=null;const N=n.create({timeout:6e4,baseURL:"/"+u,withCredentials:"true"===s,validateStatus:n=>n>=200&&n<300,transformResponse:[(n,t)=>{const e=t["content-type"];if(e?.includes("application/json"))try{return JSON.parse(n)}catch{return n}return n}]});function E(n,t){return new h(n,t)}function S(n){const t=E(n||l.unauthorized,f.unauthorized);if(!y)throw y=!0,M(),b=setTimeout(O,3e3),p(t,!0),t;throw t}function O(){y=!1,b&&clearTimeout(b),b=null}N.interceptors.request.use(n=>{const{accessToken:t,info:e}=o();return t&&(n.headers.set("Authorization",t),n.headers.set("token",t),n.headers.set("x-userid-header",e.userId),n.headers.set("x-permission-code-header",i.currentRoute.value.meta.permissionOnlyCode)),n.hideLoading||0!==m||(a=!0,w.showLoading()),m++,!n.data||n.data instanceof FormData||n.headers["Content-Type"]||(n.headers.set("Content-Type","application/json"),n.data=JSON.stringify(n.data)),n},n=>(p(E(l.requestConfigError,f.error)),Promise.reject(n))),N.interceptors.response.use(n=>{v();const t=n.headers["content-type"];if(t?.includes("application/json")){const{code:t,msg:e}=n.data;if([f.success,f.success1].includes(t))return n;throw[f.unauthorized,f.INVALID_TOKEN].includes(t)&&S(e),E(e||l.requestFailed,t)}if(g.includes(t))return c(n,t),n},n=>(v(),n.response?.status===f.unauthorized&&S(),Promise.reject(d(n))));const M=()=>{setTimeout(()=>{o().logOut()},500)};async function D(n,e=0){try{return await async function(n){["POST","PUT"].includes(n.method?.toUpperCase()||"")&&n.params&&!n.data&&(n.data=n.params,n.params=void 0);try{const e=await N.request(n);return n.showSuccessMessage&&e.data.msg&&function(n,e=!0){e&&t.success(n)}(e.data.msg),e.data.data}catch(t){const e=[f.unauthorized,f.NEED_REFRESH_TOKEN].includes(t.code);if(t instanceof h&&!e){p(t,!1!==n.showErrorMessage)}return Promise.reject(t)}}(n)}catch(t){if(t instanceof h&&[f.NEED_REFRESH_TOKEN].includes(t.code)&&!n.url?.includes("/iam/user/refreshToken"))return await o().refreshTokenFunc(),await x(1e3),D(n,e-1);if(e>0&&t instanceof h&&(r=t.code,[f.requestTimeout,f.internalServerError,f.badGateway,f.serviceUnavailable,f.gatewayTimeout].includes(r)))return await x(1e3),D(n,e-1);throw t}var r}function x(n){return new Promise(t=>setTimeout(t,n))}const $={get:n=>D({...n,method:"GET"}),post:n=>D({...n,method:"POST"}),put:n=>D({...n,method:"PUT"}),del:n=>D({...n,method:"DELETE"}),request:n=>D(n)};return{...$,logOut:M}}function b(n,t){if(n.install=e=>{for(const r of[n,...Object.values(t??{})]){const n=r.name;n&&e.component(n,r)}},t)for(const[e,r]of Object.entries(t))n[e]=r;return n}function N(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var E,S={exports:{}};var O=(E||(E=1,S.exports=function(){var n=1e3,t=6e4,e=36e5,r="millisecond",i="second",o="minute",u="hour",s="day",a="week",c="month",f="quarter",l="year",h="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var t=["th","st","nd","rd"],e=n%100;return"["+n+(t[(e-20)%10]||t[e]||t[0])+"]"}},v=function(n,t,e){var r=String(n);return!r||r.length>=t?n:""+Array(t+1-r.length).join(e)+n},w={s:v,z:function(n){var t=-n.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),i=e%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function n(t,e){if(t.date()<e.date())return-n(e,t);var r=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(r,c),o=e-i<0,u=t.clone().add(r+(o?-1:1),c);return+(-(r+(e-i)/(o?i-u:u-i))||0)},a:function(n){return n<0?Math.ceil(n)||0:Math.floor(n)},p:function(n){return{M:c,y:l,w:a,d:s,D:h,h:u,m:o,s:i,ms:r,Q:f}[n]||String(n||"").toLowerCase().replace(/s$/,"")},u:function(n){return void 0===n}},y="en",b={};b[y]=m;var N="$isDayjsObject",E=function(n){return n instanceof D||!(!n||!n[N])},S=function n(t,e,r){var i;if(!t)return y;if("string"==typeof t){var o=t.toLowerCase();b[o]&&(i=o),e&&(b[o]=e,i=o);var u=t.split("-");if(!i&&u.length>1)return n(u[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},O=function(n,t){if(E(n))return n.clone();var e="object"==typeof t?t:{};return e.date=n,e.args=arguments,new D(e)},M=w;M.l=S,M.i=E,M.w=function(n,t){return O(n,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function m(n){this.$L=S(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[N]=!0}var v=m.prototype;return v.parse=function(n){this.$d=function(n){var t=n.date,e=n.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return e?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(n),this.init()},v.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},v.$utils=function(){return M},v.isValid=function(){return!(this.$d.toString()===d)},v.isSame=function(n,t){var e=O(n);return this.startOf(t)<=e&&e<=this.endOf(t)},v.isAfter=function(n,t){return O(n)<this.startOf(t)},v.isBefore=function(n,t){return this.endOf(t)<O(n)},v.$g=function(n,t,e){return M.u(n)?this[t]:this.set(e,n)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(n,t){var e=this,r=!!M.u(t)||t,f=M.p(n),d=function(n,t){var i=M.w(e.$u?Date.UTC(e.$y,t,n):new Date(e.$y,t,n),e);return r?i:i.endOf(s)},p=function(n,t){return M.w(e.toDate()[n].apply(e.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),e)},g=this.$W,m=this.$M,v=this.$D,w="set"+(this.$u?"UTC":"");switch(f){case l:return r?d(1,0):d(31,11);case c:return r?d(1,m):d(0,m+1);case a:var y=this.$locale().weekStart||0,b=(g<y?g+7:g)-y;return d(r?v-b:v+(6-b),m);case s:case h:return p(w+"Hours",0);case u:return p(w+"Minutes",1);case o:return p(w+"Seconds",2);case i:return p(w+"Milliseconds",3);default:return this.clone()}},v.endOf=function(n){return this.startOf(n,!1)},v.$set=function(n,t){var e,a=M.p(n),f="set"+(this.$u?"UTC":""),d=(e={},e[s]=f+"Date",e[h]=f+"Date",e[c]=f+"Month",e[l]=f+"FullYear",e[u]=f+"Hours",e[o]=f+"Minutes",e[i]=f+"Seconds",e[r]=f+"Milliseconds",e)[a],p=a===s?this.$D+(t-this.$W):t;if(a===c||a===l){var g=this.clone().set(h,1);g.$d[d](p),g.init(),this.$d=g.set(h,Math.min(this.$D,g.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},v.set=function(n,t){return this.clone().$set(n,t)},v.get=function(n){return this[M.p(n)]()},v.add=function(r,f){var h,d=this;r=Number(r);var p=M.p(f),g=function(n){var t=O(d);return M.w(t.date(t.date()+Math.round(n*r)),d)};if(p===c)return this.set(c,this.$M+r);if(p===l)return this.set(l,this.$y+r);if(p===s)return g(1);if(p===a)return g(7);var m=(h={},h[o]=t,h[u]=e,h[i]=n,h)[p]||1,v=this.$d.getTime()+r*m;return M.w(v,this)},v.subtract=function(n,t){return this.add(-1*n,t)},v.format=function(n){var t=this,e=this.$locale();if(!this.isValid())return e.invalidDate||d;var r=n||"YYYY-MM-DDTHH:mm:ssZ",i=M.z(this),o=this.$H,u=this.$m,s=this.$M,a=e.weekdays,c=e.months,f=e.meridiem,l=function(n,e,i,o){return n&&(n[e]||n(t,r))||i[e].slice(0,o)},h=function(n){return M.s(o%12||12,n,"0")},p=f||function(n,t,e){var r=n<12?"AM":"PM";return e?r.toLowerCase():r};return r.replace(g,function(n,r){return r||function(n){switch(n){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return l(e.monthsShort,s,c,3);case"MMMM":return l(c,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return l(e.weekdaysMin,t.$W,a,2);case"ddd":return l(e.weekdaysShort,t.$W,a,3);case"dddd":return a[t.$W];case"H":return String(o);case"HH":return M.s(o,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return p(o,u,!0);case"A":return p(o,u,!1);case"m":return String(u);case"mm":return M.s(u,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return i}return null}(n)||i.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,h,d){var p,g=this,m=M.p(h),v=O(r),w=(v.utcOffset()-this.utcOffset())*t,y=this-v,b=function(){return M.m(g,v)};switch(m){case l:p=b()/12;break;case c:p=b();break;case f:p=b()/3;break;case a:p=(y-w)/6048e5;break;case s:p=(y-w)/864e5;break;case u:p=y/e;break;case o:p=y/t;break;case i:p=y/n;break;default:p=y}return d?p:M.a(p)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return b[this.$L]},v.locale=function(n,t){if(!n)return this.$L;var e=this.clone(),r=S(n,t,!0);return r&&(e.$L=r),e},v.clone=function(){return M.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),x=D.prototype;return O.prototype=x,[["$ms",r],["$s",i],["$m",o],["$H",u],["$W",s],["$M",c],["$y",l],["$D",h]].forEach(function(n){x[n[1]]=function(t){return this.$g(t,n[0],n[1])}}),O.extend=function(n,t){return n.$i||(n(t,D,O),n.$i=!0),O},O.locale=S,O.isDayjs=E,O.unix=function(n){return O(1e3*n)},O.en=b[y],O.Ls=b,O.p={},O}()),S.exports),M=N(O);const D=Object.prototype.toString;function x(n,t){return D.call(n)===`[object ${t}]`}function $(n){return void 0!==n}function A(n){return!$(n)}function T(n){return null===n}function k(n){return A(n)||T(n)}function _(n){return!k(n)&&(n instanceof Promise||x(n,"Object"))}function j(n){return!!k(n)||(U(n)||P(n)?0===n.length:n instanceof Map||n instanceof Set?0===n.size:!!_(n)&&0===Object.keys(n).length)}function F(n){return!!j(n)||(0===n||!!P(n)&&("0"===n||"undefined"===n||"null"===n))}function I(n){return x(n,"Date")}function C(n){return x(n,"Number")&&n==n}function R(n){return x(n,"Promise")&&_(n)&&L(n.then)&&L(n.catch)}function P(n){return x(n,"String")}function L(n){return"function"==typeof n}function q(n){return x(n,"Boolean")}function H(n){return x(n,"RegExp")}function U(n){return n&&Array.isArray(n)}function W(n){return"undefined"!=typeof window&&x(n,"Window")}function Z(n){return"undefined"!=typeof Element&&n instanceof Element}function z(n){return x(n,"Map")}const Y="undefined"==typeof window,B=!Y;function V(n){return/(?:^https?:(?:\/\/)?(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)(?:\/[+~%/.\w-]*)?\??[-+=&;%@.\w]*(?:#\w*)?$/.test(n)}function J(n){return!!P(n)&&!Number.isNaN(Number(n))}function K(n){return null==n||"object"!=typeof n&&"function"!=typeof n}function G(n){return"Error"===Object.prototype.toString.call(n).slice(8,-1)}function Q(n){return"Symbol"===Object.prototype.toString.call(n).slice(8,-1)}function X(n){return"Set"===Object.prototype.toString.call(n).slice(8,-1)}function nn(n){return!n||n===T(n)||n===A(n)||!1===n||n===Number.isNaN(n)||!(!U(n)||0!==n.length)}function tn(n){return!nn(n)}function en(){const n=navigator.userAgent;return n.includes("Android")||n.includes("Linux")?"Android":n.includes("iPhone")?"iPhone":n.includes("iPad")?"iPad":n.includes("Windows Phone")?"Windows Phone":n}function rn(){const n=navigator.userAgent;return function(n){const t=n.includes("Opera");return n.includes("compatible")&&n.includes("MSIE")&&!t}(n)?function(n){const t=/MSIE (\d+\.\d+);/,e=n.match(t),r=e?Number.parseFloat(e[1]||"0"):0;return 7===r?"IE7":8===r?"IE8":9===r?"IE9":10===r?"IE10":"IE7以下"}(n):function(n){return n.includes("Trident")&&n.includes("rv:11.0")}(n)?"IE11":function(n){const t=n.includes("compatible")&&n.includes("MSIE");return n.includes("Edge")&&!t}(n)?"Edge":function(n){return n.includes("Firefox")}(n)?"FF":function(n){return n.includes("Opera")}(n)?"Opera":function(n){return n.includes("Safari")&&!n.includes("Chrome")}(n)?"Safari":function(n){return n.includes("Chrome")&&n.includes("Safari")}(n)?"Chrome":""}function on(){return"iPhone"===en()}function un(){return"Android"===en()}function sn(){const n=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];let e=!0;for(let r=0;r<t.length;r++){const i=t[r];if(i&&n.indexOf(i)>0){e=!1;break}}return e}function an(n){return/^(?:https?:|mailto:|tel:|\/\/)/.test(n)}function cn(n){if("string"==typeof n)try{const t=JSON.parse(n);return!("object"!=typeof t||!t)}catch(n){return console.error(`error:${n}`),!1}return!1}function fn(n){return M.isDayjs(n)}function ln(n){if("string"==typeof n)return n.trim();if("function"==typeof n){return(n.name||"").replace(/^bound\s+/i,"")}return""}function hn(...n){return n.filter(n=>null!=n&&""!==n).join("-")}function dn(n){return n?n.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[\s_]+/g,"-").replace(/[^\w\u4E00-\u9FA5-]+/g,"-").toLowerCase().replace(/^-+|-+$/g,"").replace(/-+/g,"-"):""}function pn(n,t=3){if(!n||0===n.length)return"form";const e=n.filter(n=>null!=n&&""!==n).slice(0,t);return 0===e.length?"form":e.join("-")}function gn(n){return n?dn(n):""}function mn(n){if(!n)return!1;return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(n)}var vn={keyId:1,cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};function wn(n,t,e){if(n)if(n.forEach)n.forEach(t,e);else for(var r=0,i=n.length;r<i;r++)t.call(e,n[r],r,n)}var yn=Object.prototype.toString;function bn(n){return function(t){return"[object "+n+"]"===yn.call(t)}}var Nn=Array.isArray||bn("Array");function En(n,t){return!(!n||!n.hasOwnProperty)&&n.hasOwnProperty(t)}function Sn(n,t,e){if(n)for(var r in n)En(n,r)&&t.call(e,n[r],r,n)}function On(n,t,e){return n?(Nn(n)?wn:Sn)(n,t,e):n}function Mn(n){return function(t){return typeof t===n}}var Dn=Mn("function");function xn(n,t){var e=Object[n];return function(n){var r=[];if(n){if(e)return e(n);On(n,t>1?function(t){r.push([""+t,n[t]])}:function(){r.push(arguments[t])})}return r}}var $n=xn("keys",1);function An(n,t){var e=n.__proto__.constructor;return t?new e(t):new e}function Tn(n,t){return t?kn(n,t):n}function kn(n,t){if(n)switch(yn.call(n)){case"[object Object]":var e=Object.create(Object.getPrototypeOf(n));return Sn(n,function(n,r){e[r]=Tn(n,t)}),e;case"[object Date]":case"[object RegExp]":return An(n,n.valueOf());case"[object Array]":case"[object Arguments]":var r=[];return wn(n,function(n){r.push(Tn(n,t))}),r;case"[object Set]":var i=An(n);return i.forEach(function(n){i.add(Tn(n,t))}),i;case"[object Map]":var o=An(n);return o.forEach(function(n,e){o.set(e,Tn(n,t))}),o}return n}function _n(n,t){return n?kn(n,t):n}var jn=Object.assign;function Fn(n,t,e){for(var r,i=t.length,o=1;o<i;o++)r=t[o],wn($n(t[o]),e?function(t){n[t]=_n(r[t],e)}:function(t){n[t]=r[t]});return n}var In=function(n){if(n){var t=arguments;if(!0!==n)return jn?jn.apply(Object,t):Fn(n,t);if(t.length>1)return Fn(n=Nn(n[1])?[]:{},t,!0)}return n},Cn=function(){};function Rn(n){return In(vn,n)}var Pn="4.0.0";function Ln(n,t,e){for(var r=n.length-1;r>=0;r--)t.call(e,n[r],r,n)}function qn(n,t,e){Ln($n(n),function(r){t.call(e,n[r],r,n)})}function Hn(n){return null===n}function Un(n,t){return function(e){return Hn(e)?t:e[n]}}function Wn(n){return!!n&&n.constructor===Object}function Zn(n){return"__proto__"!==n&&"constructor"!==n}function zn(n,t){return Wn(n)&&Wn(t)||Nn(n)&&Nn(t)?(On(t,function(e,r){Zn(r)&&(n[r]=Dn(t)?e:zn(n[r],e))}),n):t}Cn.VERSION=Pn,Cn.version=Pn,Cn.mixin=function(){wn(arguments,function(n){On(n,function(n,t){Cn[t]=Dn(n)?function(){var t=n.apply(Cn.$context,arguments);return Cn.$context=null,t}:n})})},Cn.setup=Rn,Cn.setConfig=Rn,Cn.getConfig=function(){return vn};function Yn(n,t,e){var r=[];if(n&&arguments.length>1){if(n.map)return n.map(t,e);On(n,function(){r.push(t.apply(e,arguments))})}return r}function Bn(n,t,e,r,i){return function(o,u,s){if(o&&u){if(n&&o[n])return o[n](u,s);if(t&&Nn(o)){for(var a=0,c=o.length;a<c;a++)if(!!u.call(s,o[a],a,o)===r)return[!0,!1,a,o[a]][e]}else for(var f in o)if(En(o,f)&&!!u.call(s,o[f],f,o)===r)return[!0,!1,f,o[f]][e]}return i}}var Vn=Bn("some",1,0,!0,!1),Jn=Bn("every",1,1,!1,!0);function Kn(n,t){if(n){if(n.includes)return n.includes(t);for(var e in n)if(En(n,e)&&t===n[e])return!0}return!1}function Gn(n,t){var e,r=0;if(Nn(n)&&Nn(t)){for(e=t.length;r<e;r++)if(!Kn(n,t[r]))return!1;return!0}return Kn(n,t)}function Qn(n,t,e){var r=[];if(t){Dn(t)||(t=Un(t));var i,o={};On(n,function(u,s){i=t.call(e,u,s,n),o[i]||(o[i]=1,r.push(u))})}else On(n,function(n){Kn(r,n)||r.push(n)});return r}function Xn(n){return Yn(n,function(n){return n})}var nt="undefined",tt=Mn(nt);function et(n){return Hn(n)||tt(n)}var rt=/(.+)?\[(\d+)\]$/;function it(n){return n?n.splice&&n.join?n:(""+n).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function ot(n,t,e){if(et(n))return e;var r=function(n,t){if(n){var e,r,i,o=0;if(n[t]||En(n,t))return n[t];if(i=(r=it(t)).length)for(e=n;o<i;o++)if(et(e=ut(e,r[o])))return o===i-1?e:void 0;return e}}(n,t);return tt(r)?e:r}function ut(n,t){var e=t?t.match(rt):"";return e?e[1]?n[e[1]]?n[e[1]][e[2]]:void 0:n[e[2]]:n[t]}function st(n,t){return tt(n)?1:Hn(n)?tt(t)?-1:1:n&&n.localeCompare?n.localeCompare(t):n>t?1:-1}function at(n,t,e){return function(r,i){var o=r[n],u=i[n];return o===u?e?e(r,i):0:"desc"===t.order?st(u,o):st(o,u)}}function ct(n,t,e){if(n){if(et(t))return Xn(n).sort(st);for(var r,i=Yn(n,function(n){return{data:n}}),o=function(n,t,e,r){var i=[];return wn(e=Nn(e)?e:[e],function(e,o){if(e){var u,s=e;Nn(e)?(s=e[0],u=e[1]):Wn(e)&&(s=e.field,u=e.order),i.push({field:s,order:u||"asc"}),wn(t,Dn(s)?function(t,e){t[o]=s.call(r,t.data,e,n)}:function(n){n[o]=s?ot(n.data,s):n.data})}}),i}(n,i,t,e),u=o.length-1;u>=0;)r=at(u,o[u],r),u--;return r&&(i=i.sort(r)),Yn(i,Un("data"))}return[]}var ft=ct;function lt(n,t){return n>=t?n:(n|=0)+Math.round(Math.random()*((t||9)-n))}var ht=xn("values",0);function dt(n){for(var t,e=[],r=ht(n),i=r.length-1;i>=0;i--)t=i>0?lt(0,i):0,e.push(r[t]),r.splice(t,1);return e}function pt(n){return function(t){if(t){var e=n(t&&t.replace?t.replace(/,/g,""):t);if(!isNaN(e))return e}return 0}}var gt=pt(parseFloat);function mt(n,t,e){var r=[],i=arguments.length;if(n){if(t=i>=2?gt(t):0,e=i>=3?gt(e):n.length,n.slice)return n.slice(t,e);for(;t<e;t++)r.push(n[t])}return r}var vt=Bn("",0,2,!0),wt=Bn("find",1,3,!0);function yt(n,t){return Yn(n,Un(t))}function bt(n){return function(t,e){var r,i;return t&&t.length?(wn(t,function(o,u){e&&(o=Dn(e)?e(o,u,t):ot(o,e)),et(o)||!et(r)&&!n(r,o)||(i=u,r=o)}),t[i]):r}}var Nt=bt(function(n,t){return n<t});function Et(n){var t,e,r,i=[];if(n&&n.length)for(t=0,r=(e=Nt(n,function(n){return n?n.length:0}))?e.length:0;t<r;t++)i.push(yt(n,t));return i}function St(n,t){var e=[];return wn(n,function(n){e=e.concat(Nn(n)?t?St(n,t):n:[n])}),e}function Ot(n,t){return(console[n]||console.log)(t)}function Mt(n,t){try{delete n[t]}catch(e){n[t]=void 0}}function Dt(n,t,e){return n?(Nn(n)?Ln:qn)(n,t,e):n}var xt=Mn("object");function $t(n,t,e){if(n){var r,i=arguments.length>1&&(Hn(t)||!xt(t)),o=i?e:t;if(Wn(n))Sn(n,i?function(e,r){n[r]=t}:function(t,e){Mt(n,e)}),o&&In(n,o);else if(Nn(n)){if(i)for(r=n.length;r>0;)r--,n[r]=t;else n.length=0;o&&n.push.apply(n,o)}}return n}function At(n,t,e){if(n){if(!et(t)){var r=[],i=[];return Dn(t)||(o=t,t=function(n,t){return t===o}),On(n,function(n,i,o){t.call(e,n,i,o)&&r.push(i)}),Nn(n)?Dt(r,function(t,e){i.push(n[t]),n.splice(t,1)}):(i={},wn(r,function(t){i[t]=n[t],Mt(n,t)})),i}return $t(n)}var o;return n}function Tt(n,t,e,r){var i=r.key,o=r.parentKey,u=r.children,s=r.data,a=r.updated,c=r.clear;return wn(e,function(e){var f=e[u];s&&(e=e[s]),!1!==a&&(e[o]=t?t[i]:null),n.push(e),f&&f.length&&Tt(n,e,f,r),c&&delete e[u]}),n}function kt(n){return function(t,e,r,i){var o=r||{},u=o.children||"children";return n(null,t,e,i,[],[],u,o)}}var _t=kt(function n(t,e,r,i,o,u,s,a){var c,f,l,h,d,p;if(e)for(f=0,l=e.length;f<l;f++){if(c=e[f],h=o.concat([""+f]),d=u.concat([c]),r.call(i,c,f,e,h,t,d))return{index:f,item:c,path:h,items:e,parent:t,nodes:d};if(s&&c&&(p=n(c,c[s],r,i,h.concat([s]),d,s)))return p}});var jt=kt(function n(t,e,r,i,o,u,s,a){var c,f;On(e,function(a,l){c=o.concat([""+l]),f=u.concat([a]),r.call(i,a,l,e,c,t,f),a&&s&&(c.push(s),n(a,a[s],r,i,c,f,s))})});var Ft=kt(function n(t,e,r,i,o,u,s,a){var c,f,l,h=a.mapChildren||s;return Yn(e,function(d,p){return c=o.concat([""+p]),f=u.concat([d]),(l=r.call(i,d,p,e,c,t,f))&&d&&s&&d[s]&&(l[h]=n(d,d[s],r,i,c,f,s,a)),l})});function It(n,t,e,r,i,o,u,s,a){var c,f,l,h,d,p=[],g=a.original,m=a.data,v=a.mapChildren||s,w=a.isEvery;return wn(e,function(y,b){c=o.concat([""+b]),f=u.concat([y]),h=n&&!w||r.call(i,y,b,e,c,t,f),d=s&&y[s],h||d?(g?l=y:(l=In({},y),m&&(l[m]=y)),l[v]=It(h,y,y[s],r,i,c,f,s,a),(h||l[v].length)&&p.push(l)):h&&p.push(l)}),p}var Ct=kt(function(n,t,e,r,i,o,u,s){return It(0,n,t,e,r,i,o,u,s)});function Rt(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,r=n.length;e<r;e++)if(t===n[e])return e}function Pt(n,t){if(n.lastIndexOf)return n.lastIndexOf(t);for(var e=n.length-1;e>=0;e--)if(t===n[e])return e;return-1}var Lt=Mn("number");var qt=Mn("string"),Ht=bn("Date"),Ut=parseInt;function Wt(n){return Date.UTC(n.y,n.M||0,n.d||1,n.H||0,n.m||0,n.s||0,n.S||0)}function Zt(n){return n.getTime()}function zt(n){return"(\\d{"+n+"})"}function Yt(n){return isNaN(n)?n:Ut(n)}for(var Bt=zt(2),Vt=zt("1,2"),Jt=zt("1,7"),Kt=zt("3,4"),Gt=".{1}",Qt=Gt+Vt,Xt="(([zZ])|([-+]\\d{2}:?\\d{2}))",ne=[Kt,Qt,Qt,Qt,Qt,Qt,Gt+Jt,Xt],te=[],ee=ne.length-1;ee>=0;ee--){for(var re="",ie=0;ie<ee+1;ie++)re+=ne[ie];te.push(new RegExp("^"+re+"$"))}var oe=[["yyyy",Kt],["yy",Bt],["MM",Bt],["M",Vt],["dd",Bt],["d",Vt],["HH",Bt],["H",Vt],["mm",Bt],["m",Vt],["ss",Bt],["s",Vt],["SSS",zt(3)],["S",Jt],["Z",Xt]],ue={},se=["\\[([^\\]]+)\\]"];for(ie=0;ie<oe.length;ie++){var ae=oe[ie];ue[ae[0]]=ae[1]+"?",se.push(ae[0])}var ce=new RegExp(se.join("|"),"g"),fe={};function le(n,t){if(n){var e=Ht(n);if(e||!t&&/^[0-9]{11,15}$/.test(n))return new Date(e?Zt(n):Ut(n));if(qt(n)){var r=t?function(n,t){var e=fe[t];if(!e){var r=[],i=t.replace(/([$(){}*+.?\\^|])/g,"\\$1").replace(ce,function(n,t){var e=n.charAt(0);return"["===e?t:(r.push(e),ue[n])});e=fe[t]={_i:r,_r:new RegExp(i)}}var o={},u=n.match(e._r);if(u){for(var s=e._i,a=1,c=u.length;a<c;a++)o[s[a-1]]=u[a];return o}return o}(n,t):function(n){for(var t,e={},r=0,i=te.length;r<i;r++)if(t=n.match(te[r])){e.y=t[1],e.M=t[2],e.d=t[3],e.H=t[4],e.m=t[5],e.s=t[6],e.S=t[7],e.Z=t[8];break}return e}(n);if(r.y)return r.M&&(r.M=Yt(r.M)-1),r.S&&(r.S=(i=Yt(r.S.substring(0,3)))<10?100*i:i<100?10*i:i),r.Z?function(n){if(/^[zZ]/.test(n.Z))return new Date(Wt(n));var t=n.Z.match(/([-+])(\d{2}):?(\d{2})/);return t?new Date(Wt(n)-("-"===t[1]?-1:1)*Ut(t[2])*36e5+6e4*Ut(t[3])):new Date("")}(r):new Date(r.y,r.M||0,r.d||1,r.H||0,r.m||0,r.s||0,r.S||0)}}var i;return new Date("")}function he(){return new Date}function de(n){var t,e=n?le(n):he();return!!Ht(e)&&((t=e.getFullYear())%4==0&&(t%100!=0||t%400==0))}function pe(n,t){return function(e,r){if(e){if(e[n])return e[n](r);if(qt(e)||Nn(e))return t(e,r);for(var i in e)if(En(e,i)&&r===e[i])return i}return-1}}var ge=pe("indexOf",Rt),me=pe("lastIndexOf",Pt);function ve(n){var t=0;return qt(n)||Nn(n)?n.length:(On(n,function(){t++}),t)}var we=function(n){return!Hn(n)&&!isNaN(n)&&!Nn(n)&&n%1==0};var ye=Mn("boolean"),be=bn("RegExp"),Ne=bn("Error");function Ee(n){for(var t in n)return!1;return!0}var Se=typeof Symbol!==nt;function Oe(n){return Se&&Symbol.isSymbol?Symbol.isSymbol(n):"symbol"==typeof n}var Me=bn("Arguments");var De=typeof document===nt?0:document;var xe=typeof window===nt?0:window;var $e=typeof FormData!==nt;var Ae=typeof Map!==nt;var Te=typeof WeakMap!==nt;var ke=typeof Set!==nt;var _e=typeof WeakSet!==nt;function je(n){return function(t,e,r){if(t&&Dn(e)){if(Nn(t)||qt(t))return n(t,e,r);for(var i in t)if(En(t,i)&&e.call(r,t[i],i,t))return i}return-1}}var Fe=je(function(n,t,e){for(var r=0,i=n.length;r<i;r++)if(t.call(e,n[r],r,n))return r;return-1});function Ie(n,t,e,r,i,o,u){if(n===t)return!0;if(n&&t&&!Lt(n)&&!Lt(t)&&!qt(n)&&!qt(t)){if(be(n))return e(""+n,""+t,i,o,u);if(Ht(n)||ye(n))return e(+n,+t,i,o,u);var s,a,c,f=Nn(n),l=Nn(t);if(f||l?f&&l:n.constructor===t.constructor)return a=$n(n),c=$n(t),r&&(s=r(n,t,i)),a.length===c.length&&(tt(s)?Jn(a,function(i,o){return i===c[o]&&Ie(n[i],t[c[o]],e,r,f||l?o:i,n,t)}):!!s)}return e(n,t,i,o,u)}function Ce(n,t){return n===t}function Re(n,t){return Ie(n,t,Ce)}var Pe=je(function(n,t,e){for(var r=n.length-1;r>=0;r--)if(t.call(e,n[r],r,n))return r;return-1});var Le=xn("entries",2);function qe(n,t){return function(e,r){var i,o,u={},s=[],a=this,c=arguments,f=c.length;if(!Dn(r)){for(o=1;o<f;o++)i=c[o],s.push.apply(s,Nn(i)?i:[i]);r=0}return On(e,function(i,o){((r?r.call(a,i,o,e):Fe(s,function(n){return n===o})>-1)?n:t)&&(u[o]=i)}),u}}var He=qe(1,0),Ue=qe(0,1);var We=/(.+)?\[(\d+)\]$/;function Ze(n,t,e,r,i){if(!n[t]){var o,u,s=t?t.match(We):null;if(e)u=i;else{var a=r?r.match(We):null;u=a&&!a[1]?new Array(Ut(a[2])+1):{}}return s?s[1]?(o=Ut(s[2]),n[s[1]]?e?n[s[1]][o]=u:n[s[1]][o]?u=n[s[1]][o]:n[s[1]][o]=u:(n[s[1]]=new Array(o+1),n[s[1]][o]=u)):n[s[2]]=u:n[t]=u,u}return e&&(n[t]=i),n[t]}function ze(n){return"__proto__"===n||"constructor"===n||"prototype"===n}function Ye(n,t,e){var r,i={};return n&&(t&&xt(t)?t=function(n){return function(){return Ee(n)}}(t):Dn(t)||(t=Un(t)),On(n,function(o,u){r=t?t.call(e,o,u,n):o,i[r]?i[r].push(o):i[r]=[o]})),i}function Be(n,t,e){var r,i,o=[],u=arguments;if(u.length<2&&(t=u[0],n=0),i=t|0,(r=n|0)<t)for(e=e|0||1;r<i;r+=e)o.push(r);return o}var Ve=bt(function(n,t){return n>t});function Je(n){return(n.split(".")[1]||"").length}function Ke(n,t){if(n.repeat)return n.repeat(t);var e=isNaN(t)?[]:new Array(Ut(t));return e.join(n)+(e.length>0?n:"")}function Ge(n,t){return n.substring(0,t)+"."+n.substring(t,n.length)}function Qe(n){var t=""+n,e=t.match(/^([-+]?)((\d+)|((\d+)?[.](\d+)?))e([-+]{1})([0-9]+)$/);if(e){var r=n<0?"-":"",i=e[3]||"",o=e[5]||"",u=e[6]||"",s=e[7],a=e[8],c=a-u.length,f=a-i.length,l=a-o.length;return"+"===s?i?r+i+Ke("0",a):c>0?r+o+u+Ke("0",c):r+o+Ge(u,a):i?f>0?r+"0."+Ke("0",Math.abs(f))+i:r+Ge(i,f):l>0?r+"0."+Ke("0",Math.abs(l))+o+u:r+Ge(o,l)+u}return t}function Xe(n,t){var e=Qe(n),r=Qe(t);return parseInt(e.replace(".",""))*parseInt(r.replace(".",""))/Math.pow(10,Je(e)+Je(r))}function nr(n){return function(t,e){var r=gt(t),i=r;if(r){e|=0;var o=Qe(r).split("."),u=o[0],s=o[1]||"",a=s.substring(0,e+1),c=u+(a?"."+a:"");if(e>=s.length)return gt(c);if(c=r,e>0){var f=Math.pow(10,e);i=Math[n](Xe(c,f))/f}else i=Math[n](c)}return i}}var tr=nr("round"),er=nr("ceil"),rr=nr("floor");function ir(n){return Lt(n)?Qe(n):""+(et(n)?"":n)}function or(n,t){var e=ir(tr(n,t|=0)).split("."),r=e[0],i=e[1]||"",o=t-i.length;return t?o>0?r+"."+i+Ke("0",o):r+Ge(i,Math.abs(o)):r}var ur=pt(Ut);function sr(n,t){return Xe(gt(n),gt(t))}function ar(n,t){var e=Qe(n),r=Qe(t),i=Math.pow(10,Math.max(Je(e),Je(r)));return(sr(n,i)+sr(t,i))/i}function cr(n,t){var e=Qe(n),r=Qe(t),i=Je(e),o=Je(r)-i,u=o<0,s=Math.pow(10,u?Math.abs(o):o);return sr(e.replace(".","")/r.replace(".",""),u?1/s:s)}function fr(n,t,e){var r=0;return On(n&&n.length>2&&Nn(n)?n.sort():n,t?Dn(t)?function(){r=ar(r,t.apply(e,arguments))}:function(n){r=ar(r,ot(n,t))}:function(n){r=ar(r,n)}),r}var lr="first",hr="last";function dr(n){return n.getFullYear()}var pr=864e5;function gr(n){return n.getMonth()}function mr(n){return Ht(n)&&!isNaN(Zt(n))}function vr(n,t,e){var r=t&&!isNaN(t)?t:0;if(mr(n=le(n))){if(e===lr)return new Date(dr(n),gr(n)+r,1);if(e===hr)return new Date(Zt(vr(n,r+1,lr))-1);if(Lt(e)&&n.setDate(e),r){var i=n.getDate();if(n.setMonth(gr(n)+r),i!==n.getDate())return n.setDate(1),new Date(Zt(n)-pr)}}return n}function wr(n,t,e){var r;if(mr(n=le(n))&&(t&&(r=t&&!isNaN(t)?t:0,n.setFullYear(dr(n)+r)),e||!isNaN(e))){if(e===lr)return new Date(dr(n),0,1);if(e===hr)return n.setMonth(11),vr(n,0,hr);n.setMonth(e)}return n}var yr=6048e5;function br(n,t,e,r){if(mr(n=le(n))){var i=Lt(e),o=Lt(r),u=Zt(n);if(i||o){var s=o?r:vn.firstDayOfWeek,a=n.getDay(),c=i?e:a;if(a!==c){var f=0;s>a?f=-(7-s+a):s<a&&(f=s-a),u+=c>s?((0===c?7:c)-s+f)*pr:c<s?(7-s+c+f)*pr:f*pr}}return t&&!isNaN(t)&&(u+=t*yr),new Date(u)}return n}function Nr(n,t,e){if(mr(n=le(n))&&!isNaN(t)){if(n.setDate(n.getDate()+Ut(t)),e===lr)return new Date(dr(n),gr(n),n.getDate());if(e===hr)return new Date(Zt(Nr(n,1,lr))-1)}return n}function Er(n){return n.toUpperCase()}var Sr=Yn(Be(0,7),function(n){return[(n+1)%7,(n+2)%7,(n+3)%7]});function Or(n,t){var e=new Date(n).getDay();return Kn(Sr[t],e)}function Mr(n,t){return function(e,r){var i=Lt(r)?r:vn.firstDayOfWeek,o=le(e);if(mr(o)){var u,s=br(o,0,i,i),a=n(s),c=Zt(a),f=Zt(s),l=f+5184e5,h=new Date(l),d=br(a,0,i,i),p=Zt(d);if(f===p)return 1;if(t(s,h))for(u=Zt(n(h));u<l;u+=pr)if(Or(u,i))return 1;var g=p+5184e5,m=new Date(l),v=1;if(t(d,m))for(v=0,u=c;u<g;u+=pr)if(Or(u,i)){v++;break}return Math.floor((f-p)/yr)+v}return NaN}}var Dr=Mr(function(n){return new Date(n.getFullYear(),0,1)},function(n,t){return n.getFullYear()!==t.getFullYear()});function xr(n){return Zt(function(n){return new Date(dr(n),gr(n),n.getDate())}(n))}function $r(n){return mr(n=le(n))?Math.floor((xr(n)-xr(wr(n,0,lr)))/pr)+1:NaN}function Ar(n,t,e){var r=ir(n);return t|=0,e=tt(e)?" ":""+e,r.padStart?r.padStart(t,e):t>r.length?((t-=r.length)>e.length&&(e+=Ke(e,t/e.length)),e.slice(0,t)+r):r}function Tr(n,t,e,r){var i=t[e];return i?Dn(i)?i(r,e,n):i[r]:r}var kr=/\[([^\]]+)]|y{2,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|S{1,3}|Z{1,2}|W{1,2}|D{1,3}|[aAeEq]/g;function _r(n,t,e){if(n){if(mr(n=le(n))){var r=e||{},i=t||vn.parseDateFormat||vn.formatString,o=n.getHours(),u=o<12?"am":"pm",s=In({},vn.parseDateRules||vn.formatStringMatchs,r.formats),a=function(t,e){return(""+dr(n)).substring(4-e)},c=function(t,e){return Ar(gr(n)+1,e,"0")},f=function(t,e){return Ar(n.getDate(),e,"0")},l=function(n,t){return Ar(o,t,"0")},h=function(n,t){return Ar(o<=12?o:o-12,t,"0")},d=function(t,e){return Ar(n.getMinutes(),e,"0")},p=function(t,e){return Ar(n.getSeconds(),e,"0")},g=function(t,e){return Ar(n.getMilliseconds(),e,"0")},m=function(t,e){var r=n.getTimezoneOffset()/60*-1;return Tr(n,s,t,(r>=0?"+":"-")+Ar(r,2,"0")+(1===e?":":"")+"00")},v=function(t,e){return Ar(Tr(n,s,t,Dr(n,et(r.firstDay)?vn.firstDayOfWeek:r.firstDay)),e,"0")},w=function(t,e){return Ar(Tr(n,s,t,$r(n)),e,"0")},y={yyyy:a,yy:a,MM:c,M:c,dd:f,d:f,HH:l,H:l,hh:h,h:h,mm:d,m:d,ss:p,s:p,SSS:g,S:g,ZZ:m,Z:m,WW:v,W:v,DDD:w,D:w,a:function(t){return Tr(n,s,t,u)},A:function(t){return Tr(n,s,t,Er(u))},e:function(t){return Tr(n,s,t,n.getDay())},E:function(t){return Tr(n,s,t,n.getDay())},q:function(t){return Tr(n,s,t,Math.floor((gr(n)+3)/3))}};return i.replace(kr,function(n,t){return t||(y[n]?y[n](n,n.length):n)})}return"Invalid Date"}return""}var jr=Date.now||function(){return Zt(he())};var Fr=Mr(function(n){return new Date(n.getFullYear(),n.getMonth(),1)},function(n,t){return n.getMonth()!==t.getMonth()});var Ir=[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]];function Cr(n){return n&&n.trimRight?n.trimRight():ir(n).replace(/[\s\uFEFF\xA0]+$/g,"")}function Rr(n){return n&&n.trimLeft?n.trimLeft():ir(n).replace(/^[\s\uFEFF\xA0]+/g,"")}function Pr(n){return n&&n.trim?n.trim():Cr(Rr(n))}var Lr={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};function qr(n){var t=new RegExp("(?:"+$n(n).join("|")+")","g");return function(e){return ir(e).replace(t,function(t){return n[t]})}}var Hr=qr(Lr),Ur={};On(Lr,function(n,t){Ur[Lr[t]]=t});var Wr=qr(Ur);function Zr(n,t,e){return n.substring(t,e)}function zr(n){return n.toLowerCase()}var Yr={};var Br={};function Vr(n,t,e){return ir(n).replace((e||vn).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(n,e){return ot(t,Pr(e))})}var Jr=decodeURIComponent;function Kr(n){var t,e={};return n&&qt(n)&&wn(n.split("&"),function(n){t=n.split("="),e[Jr(t[0])]=Jr(t[1]||"")}),e}var Gr=encodeURIComponent;function Qr(n,t,e){var r,i=[];return On(n,function(n,o){r=Nn(n),Wn(n)||r?i=i.concat(Qr(n,t+"["+o+"]",r)):i.push(Gr(t+"["+(e?"":o)+"]")+"="+Gr(Hn(n)?"":n))}),i}var Xr=typeof location===nt?0:location;function ni(){return Xr?Xr.origin||Xr.protocol+"//"+Xr.host:""}function ti(n){return Kr(n.split("?")[1]||"")}function ei(n){var t,e,r,i,o=""+n;return 0===o.indexOf("//")?o=(Xr?Xr.protocol:"")+o:0===o.indexOf("/")&&(o=ni()+o),r=o.replace(/#.*/,"").match(/(\?.*)/),(i={href:o,hash:"",host:"",hostname:"",protocol:"",port:"",search:r&&r[1]&&r[1].length>1?r[1]:""}).path=o.replace(/^([a-z0-9.+-]*:)\/\//,function(n,t){return i.protocol=t,""}).replace(/^([a-z0-9.+-]*)(:\d+)?\/?/,function(n,t,r){return e=r||"",i.port=e.replace(":",""),i.hostname=t,i.host=t+e,"/"}).replace(/(#.*)/,function(n,t){return i.hash=t.length>1?t:"",""}),t=i.hash.match(/#((.*)\?|(.*))/),i.pathname=i.path.replace(/(\?|#.*).*/,""),i.origin=i.protocol+"//"+i.host,i.hashKey=t&&(t[2]||t[1])||"",i.hashQuery=ti(i.hash),i.searchQuery=ti(i.search),i}function ri(n,t){var e=parseFloat(t),r=he(),i=Zt(r);switch(n){case"y":return Zt(wr(r,e));case"M":return Zt(vr(r,e));case"d":return Zt(Nr(r,e));case"h":case"H":return i+60*e*60*1e3;case"m":return i+60*e*1e3;case"s":return i+1e3*e}return i}function ii(n){return(Ht(n)?n:new Date(n)).toUTCString()}function oi(n,t,e){if(De){var r,i,o,u,s,a,c=[],f=arguments;return Nn(n)?c=n:f.length>1?c=[In({name:n,value:t},e)]:xt(n)&&(c=[n]),c.length>0?(wn(c,function(n){r=In({},vn.cookies,n),o=[],r.name&&(i=r.expires,o.push(Gr(r.name)+"="+Gr(xt(r.value)?JSON.stringify(r.value):r.value)),i&&(i=isNaN(i)?i.replace(/^([0-9]+)(y|M|d|H|h|m|s)$/,function(n,t,e){return ii(ri(e,t))}):/^[0-9]{11,13}$/.test(i)||Ht(i)?ii(i):ii(ri("d",i)),r.expires=i),wn(["expires","path","domain","secure"],function(n){tt(r[n])||o.push(r[n]&&"secure"===n?n:n+"="+r[n])})),De.cookie=o.join("; ")}),!0):(u={},(s=De.cookie)&&wn(s.split("; "),function(n){a=n.indexOf("="),u[Jr(n.substring(0,a))]=Jr(n.substring(a+1)||"")}),1===f.length?u[n]:u)}return!1}function ui(n){return oi(n)}function si(n,t,e){return oi(n,t,e),oi}function ai(n,t){oi(n,"",In({expires:-1},vn.cookies,t))}function ci(){return $n(oi())}function fi(n){try{var t="__xe_t";return n.setItem(t,1),n.removeItem(t),!0}catch(n){return!1}}function li(n){return navigator.userAgent.indexOf(n)>-1}function hi(n){if(!n)return null;const t=localStorage.getItem(n);if(!t)return null;try{return JSON.parse(t,(n,t)=>{if(t&&"string"==typeof t){const n=function(){return t.replace("SJZY_FUNCTION","")};return t.includes("SJZY_FUNCTION")?n():t}return t})}catch{return t}}function di(n){let t=0;const e=document.createElement("canvas").getContext("2d");return e&&(e.font='12px -apple-system, "blinkmacsystemfont", "segoe ui", "pingfang sc", "hiragino sans gb", "microsoft yahei", "helvetica neue", "helvetica", "arial", sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol"',t=e.measureText(n).width),t}function pi(n,t,e){const r=e?.excludeAll||[],i=e?.exclude||[];return r.includes("Id")||r.push("Id"),r.includes("rowId")||r.push("rowId"),Object.fromEntries(Object.entries(n).reduce((n,[o,u])=>(r.includes(o)||i.includes(o)||(u&&_(u)?gi(e,t,u,o,n):u&&U(u)?mi(e,t,u,o,n):vi(e,t,u,o,n)),n),[]))}function gi(n,t,e,r,i){const o=pi(e,t[r]||{},{excludeAll:n?.excludeAll,...n});Object.keys(o).length&&i.push([r,o])}function mi(n,t,e,r,i){const o=[],u=(n||{})[r]?.key;if(t[r]){const i=e?.length>=t[r]?.length?e:t[r],s=e?.length<t[r]?.length?e:t[r];u?i.forEach(t=>{const e=s.find(n=>n[u]===t[u]);if(e){const i=pi(t,e,{excludeAll:n?.excludeAll,...n[r]});Object.keys(i).length&&o.push({[u]:e[u],...i})}else o.push(t)}):i.forEach((t,e)=>{const r=s[e];if(_(t)&&!_(r)||U(t)&&!U(r)||typeof t!=typeof r||!r)o.push(t);else if(_(t)||U(t)){const e=pi(t,r,{excludeAll:n?.excludeAll});Object.keys(e).length&&o.push({...e})}else t!==r&&o.push(t)})}else o.push(...e);o.length&&i.push([r,o])}function vi(n,t,e,r,i){const o=n?.notNullToFalse||[];if("string"==typeof e&&"number"==typeof t[r]||"number"==typeof e&&"string"==typeof t[r])Number(e)!==Number(t[r])&&i.push([r,e]);else if([void 0,null,""].includes(e))[void 0,null,""].includes(t[r])||i.push([r,e]);else if(e!==t[r]){if(!1===e&&[void 0,null,""].includes(t[r])&&!o.includes(r))return;i.push([r,e])}}function wi(n={},t={}){let e;for(e in t)n[e]=_(n[e])?wi(n[e],t[e]):n[e]=t[e];return n}function yi(n,t="px"){return Cn.isNumber(n)||/^\d+$/.test(`${n}`)?`${n}${t}`:`${n||""}`}function bi(n,t,e){return i({get:()=>new Proxy(n[t],{set:(n,r,i)=>(e(`update:${t}`,{...n,[r]:i}),!0)}),set(n){e(`update:${t}`,n)}})}function Ni(n){const t=Object.getPrototypeOf(n);if(!t||t===Object.prototype)return n;const e=Object.getOwnPropertyNames(t);for(const t of e){const e=n[t];"constructor"!==t&&"function"==typeof e&&(n[t]=e.bind(n))}return n}function Ei(n){if(null===n||"object"!=typeof n)return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n);if(Array.isArray(n))return n.map(n=>Ei(n));const t={};return Object.keys(n).forEach(e=>{t[e]=Ei(n[e])}),t}function Si(n,t="id",e="parentId",r="children"){const i=new Map,o=[];return n.forEach(n=>{i.set(n[t],{...n,[r]:[]})}),n.forEach(n=>{const u=i.get(n[t]);if(n[e]){const t=i.get(n[e]);t&&t[r].push(u)}else o.push(u)}),o}function Oi(...n){for(const t of n)if(null!=t)return t}function Mi(n){if(null===n||"object"!=typeof n)return!1;const t=Object.getPrototypeOf(n);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&(!(Symbol.iterator in n)&&(!(Symbol.toStringTag in n)||"[object Module]"===Object.prototype.toString.call(n)))}function Di(n,t,e=".",r){if(!Mi(t))return Di(n,{},e,r);const i=Object.assign({},t);for(const t in n){if("__proto__"===t||"constructor"===t)continue;const o=n[t];null!=o&&(r&&r(i,t,o,e)||(Array.isArray(o)&&Array.isArray(i[t])?i[t]=[...o,...i[t]]:Mi(o)&&Mi(i[t])?i[t]=Di(o,i[t],(e?`${e}.`:"")+t.toString(),r):i[t]=o))}return i}function xi(n){return(...t)=>t.reduce((t,e)=>Di(t,e,"",n),{})}In(oi,{has:function(n){return Kn(ci(),n)},set:si,setItem:si,get:ui,getItem:ui,remove:ai,removeItem:ai,keys:ci,getJSON:function(){return oi()}}),In(Cn,{assign:In,objectEach:Sn,lastObjectEach:qn,objectMap:function(n,t,e){var r={};if(n){if(!t)return n;Dn(t)||(t=Un(t)),On(n,function(i,o){r[o]=t.call(e,i,o,n)})}return r},merge:function(n){n||(n={});for(var t,e=arguments,r=e.length,i=1;i<r;i++)(t=e[i])&&zn(n,t);return n},uniq:Qn,union:function(){for(var n=arguments,t=[],e=0,r=n.length;e<r;e++)t=t.concat(Xn(n[e]));return Qn(t)},sortBy:ft,orderBy:ct,shuffle:dt,sample:function(n,t){var e=dt(n);return arguments.length<=1?e[0]:(t<e.length&&(e.length=t||0),e)},some:Vn,every:Jn,slice:mt,filter:function(n,t,e){var r=[];if(n&&t){if(n.filter)return n.filter(t,e);On(n,function(i,o){t.call(e,i,o,n)&&r.push(i)})}return r},find:wt,findLast:function(n,t,e){if(n){Nn(n)||(n=ht(n));for(var r=n.length-1;r>=0;r--)if(t.call(e,n[r],r,n))return n[r]}},findKey:vt,includes:Kn,arrayIndexOf:Rt,arrayLastIndexOf:Pt,map:Yn,reduce:function(n,t,e){if(n){var r,i,o=0,u=e,s=arguments.length>2,a=$n(n);if(n.length&&n.reduce)return i=function(){return t.apply(null,arguments)},s?n.reduce(i,u):n.reduce(i);for(s&&(o=1,u=n[a[0]]),r=a.length;o<r;o++)u=t.call(null,u,n[a[o]],o,n);return u}},copyWithin:function(n,t,e,r){if(Nn(n)&&n.copyWithin)return n.copyWithin(t,e,r);var i,o,u=t|0,s=e|0,a=n.length,c=arguments.length>3?r|0:a;if(u<a&&(u=u>=0?u:a+u)>=0&&(s=s>=0?s:a+s)<(c=c>=0?c:a+c))for(i=0,o=n.slice(s,c);u<a&&!(o.length<=i);u++)n[u]=o[i++];return n},chunk:function(n,t){var e,r=[],i=t|0||1;if(Nn(n))if(i>=0&&n.length>i)for(e=0;e<n.length;)r.push(n.slice(e,e+i)),e+=i;else r=n.length?[n]:n;return r},zip:function(){return Et(arguments)},unzip:Et,zipObject:function(n,t){var e={};return t=t||[],On(ht(n),function(n,r){e[n]=t[r]}),e},flatten:function(n,t){return Nn(n)?St(n,t):[]},toArray:Xn,includeArrays:Gn,pluck:yt,invoke:function(n,t){for(var e,r=arguments,i=[],o=[],u=2,s=r.length;u<s;u++)i.push(r[u]);if(Nn(t)){for(s=t.length-1,u=0;u<s;u++)o.push(t[u]);t=t[s]}return Yn(n,function(n){if(o.length&&(n=function(n,t){for(var e=0,r=t.length;n&&e<r;)n=n[t[e++]];return r&&n?n:0}(n,o)),(e=n[t]||t)&&e.apply)return e.apply(n,i)})},arrayEach:wn,lastArrayEach:Ln,toArrayTree:function(n,t){var e,r,i,o=In({},vn.treeOptions,t),u=o.strict,s=o.key,a=o.parentKey,c=o.children,f=o.mapChildren,l=o.sortKey,h=o.reverse,d=o.data,p=[],g={},m={};return l&&(n=ct(_n(n),l),h&&(n=n.reverse())),On(n,function(n){e=n[s],m[e]&&Ot("warn","Duplicate primary key="+e),m[e]=!0}),On(n,function(n){e=n[s],d?(r={})[d]=n:r=n,i=n[a],g[e]=g[e]||[],r[s]=e,r[a]=i,e===i&&(i=null,Ot("warn","Error infinite Loop. key="+e+" parentKey="+e)),g[i]=g[i]||[],g[i].push(r),r[c]=g[e],f&&(r[f]=g[e]),(!u||u&&et(i))&&(m[i]||p.push(r))}),u&&function(n,t){On(n,function(n){n[t]&&!n[t].length&&At(n,t)})}(n,c),p},toTreeArray:function(n,t){return Tt([],null,n,In({},vn.treeOptions,t))},findTree:_t,eachTree:jt,mapTree:Ft,filterTree:function(n,t,e,r){var i=[];return n&&t&&jt(n,function(n,e,o,u,s,a){t.call(r,n,e,o,u,s,a)&&i.push(n)},e),i},searchTree:Ct,hasOwnProp:En,eqNull:et,isNaN:function(n){return Lt(n)&&isNaN(n)},isFinite:function(n){return Lt(n)&&isFinite(n)},isUndefined:tt,isArray:Nn,isFloat:function(n){return!(Hn(n)||isNaN(n)||Nn(n)||we(n))},isInteger:we,isFunction:Dn,isBoolean:ye,isString:qt,isNumber:Lt,isRegExp:be,isObject:xt,isPlainObject:Wn,isDate:Ht,isError:Ne,isTypeError:function(n){return!!n&&n.constructor===TypeError},isEmpty:Ee,isNull:Hn,isSymbol:Oe,isArguments:Me,isElement:function(n){return!!(n&&qt(n.nodeName)&&Lt(n.nodeType))},isDocument:function(n){return!(!n||!De||9!==n.nodeType)},isWindow:function(n){return!(!xe||!n||n!==n.window)},isFormData:function(n){return $e&&n instanceof FormData},isMap:function(n){return Ae&&n instanceof Map},isWeakMap:function(n){return Te&&n instanceof WeakMap},isSet:function(n){return ke&&n instanceof Set},isWeakSet:function(n){return _e&&n instanceof WeakSet},isLeapYear:de,isMatch:function(n,t){var e=$n(n),r=$n(t);return!r.length||(Gn(e,r)?Vn(r,function(r){return Fe(e,function(e){return e===r&&Re(n[e],t[r])})>-1}):Re(n,t))},isEqual:Re,isEqualWith:function(n,t,e){return Dn(e)?Ie(n,t,function(n,t,r,i,o){var u=e(n,t,r,i,o);return tt(u)?Ce(n,t):!!u},e):Ie(n,t,Ce)},getType:function(n){return Hn(n)?"null":Oe(n)?"symbol":Ht(n)?"date":Nn(n)?"array":be(n)?"regexp":Ne(n)?"error":typeof n},uniqueId:function(n){return""+(et(n)?"":n)+vn.keyId++},getSize:ve,indexOf:ge,lastIndexOf:me,findIndexOf:Fe,findLastIndexOf:Pe,toStringJSON:function(n){if(Wn(n))return n;if(qt(n))try{return JSON.parse(n)}catch(n){}return{}},toJSONString:function(n){return et(n)?"":JSON.stringify(n)},keys:$n,values:ht,entries:Le,pick:He,omit:Ue,first:function(n){return ht(n)[0]},last:function(n){var t=ht(n);return t[t.length-1]},each:On,forOf:function(n,t,e){if(n)if(Nn(n))for(var r=0,i=n.length;r<i&&!1!==t.call(e,n[r],r,n);r++);else for(var o in n)if(En(n,o)&&!1===t.call(e,n[o],o,n))break},lastForOf:function(n,t,e){var r,i;if(n)if(Nn(n))for(r=n.length-1;r>=0&&!1!==t.call(e,n[r],r,n);r--);else for(r=(i=En(n)).length-1;r>=0&&!1!==t.call(e,n[i[r]],i[r],n);r--);},lastEach:Dt,has:function(n,t){if(n){if(En(n,t))return!0;var e,r,i,o,u,s,a=it(t),c=0,f=a.length;for(u=n;c<f&&(s=!1,(o=(e=a[c])?e.match(rt):"")?(r=o[1],i=o[2],r?u[r]&&En(u[r],i)&&(s=!0,u=u[r][i]):En(u,i)&&(s=!0,u=u[i])):En(u,e)&&(s=!0,u=u[e]),s);c++)if(c===f-1)return!0}return!1},get:ot,set:function(n,t,e){if(n&&Zn(t))if(!n[t]&&!En(n,t)||ze(t)){for(var r=n,i=it(t),o=i.length,u=0;u<o;u++)if(!ze(i[u])){var s=u===o-1;r=Ze(r,i[u],s,s?null:i[u+1],e)}}else n[t]=e;return n},groupBy:Ye,countBy:function(n,t,e){var r=Ye(n,t,e||this);return Sn(r,function(n,t){r[t]=n.length}),r},clone:_n,clear:$t,remove:At,range:Be,destructuring:function(n,t){if(n&&t){var e=In.apply(this,[{}].concat(mt(arguments,1))),r=$n(e);wn($n(n),function(t){Kn(r,t)&&(n[t]=e[t])})}return n},random:lt,min:Ve,max:Nt,commafy:function(n,t){var e,r,i,o,u,s=In({},vn.commafyOptions,t),a=s.digits;return Lt(n)?(e=(s.ceil?er:s.floor?rr:tr)(n,a),o=(r=Qe(a?or(e,a):e).split("."))[0],u=r[1],(i=o&&e<0)&&(o=o.substring(1,o.length))):o=(r=(e=ir(n).replace(/,/g,""))?[e]:[])[0],r.length?(i?"-":"")+o.replace(new RegExp("(?=(?!(\\b))(.{"+(s.spaceNumber||3)+"})+$)","g"),s.separator||",")+(u?"."+u:""):e},round:tr,ceil:er,floor:rr,toFixed:or,toNumber:gt,toNumberString:Qe,toInteger:ur,add:function(n,t){return ar(gt(n),gt(t))},subtract:function(n,t){var e=gt(n),r=gt(t),i=Qe(e),o=Qe(r),u=Je(i),s=Je(o),a=Math.pow(10,Math.max(u,s));return parseFloat(or((e*a-r*a)/a,u>=s?u:s))},multiply:sr,divide:function(n,t){return cr(gt(n),gt(t))},sum:fr,mean:function(n,t,e){return cr(fr(n,t,e),ve(n))},now:jr,timestamp:function(n,t){if(n){var e=le(n,t);return Ht(e)?Zt(e):e}return jr()},isValidDate:mr,isDateSame:function(n,t,e){return!(!n||!t)&&("Invalid Date"!==(n=_r(n,e))&&n===_r(t,e))},toStringDate:le,toDateString:_r,getWhatYear:wr,getWhatQuarter:function(n,t,e){var r,i=t&&!isNaN(t)?3*t:0;return mr(n=le(n))?(r=3*(function(n){var t=n.getMonth();return t<3?1:t<6?2:t<9?3:4}(n)-1),n.setMonth(r),vr(n,i,e)):n},getWhatMonth:vr,getWhatWeek:br,getWhatDay:Nr,getWhatHours:function n(t,e,r){if(mr(t=le(t))&&!isNaN(e)){if(t.setHours(t.getHours()+Ut(e)),r===lr)return new Date(dr(t),gr(t),t.getDate(),t.getHours());if(r===hr)return new Date(Zt(n(t,1,lr))-1)}return t},getWhatMinutes:function n(t,e,r){if(mr(t=le(t))&&!isNaN(e)){if(t.setMinutes(t.getMinutes()+Ut(e)),r===lr)return new Date(dr(t),gr(t),t.getDate(),t.getHours(),t.getMinutes());if(r===hr)return new Date(Zt(n(t,1,lr))-1)}return t},getWhatSeconds:function n(t,e,r){if(mr(t=le(t))&&!isNaN(e)){if(t.setSeconds(t.getSeconds()+Ut(e)),r===lr)return new Date(dr(t),gr(t),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());if(r===hr)return new Date(Zt(n(t,1,lr))-1)}return t},getYearDay:$r,getYearWeek:Dr,getMonthWeek:Fr,getDayOfYear:function(n,t){return mr(n=le(n))?de(wr(n,t))?366:365:NaN},getDayOfMonth:function(n,t){return mr(n=le(n))?Math.floor((Zt(vr(n,t,hr))-Zt(vr(n,t,lr)))/pr)+1:NaN},getDateDiff:function(n,t){var e,r,i,o,u,s,a={done:!1,status:!1,time:0};if(n=le(n),t=t?le(t):he(),mr(n)&&mr(t)&&(e=Zt(n))<(r=Zt(t)))for(o=a.time=r-e,a.done=!0,a.status=!0,s=0,u=Ir.length;s<u;s++)o>=(i=Ir[s])[1]?s===u-1?a[i[0]]=o||0:(a[i[0]]=Math.floor(o/i[1]),o-=a[i[0]]*i[1]):a[i[0]]=0;return a},trim:Pr,trimLeft:Rr,trimRight:Cr,escape:Hr,unescape:Wr,camelCase:function(n){if(n=ir(n),Yr[n])return Yr[n];var t=n.length,e=n.replace(/([-]+)/g,function(n,e,r){return r&&r+e.length<t?"-":""});return t=e.length,e=e.replace(/([A-Z]+)/g,function(n,e,r){var i=e.length;return e=zr(e),r?i>2&&r+i<t?Er(Zr(e,0,1))+Zr(e,1,i-1)+Er(Zr(e,i-1,i)):Er(Zr(e,0,1))+Zr(e,1,i):i>1&&r+i<t?Zr(e,0,i-1)+Er(Zr(e,i-1,i)):e}).replace(/(-[a-zA-Z])/g,function(n,t){return Er(Zr(t,1,t.length))}),Yr[n]=e,e},kebabCase:function(n){if(n=ir(n),Br[n])return Br[n];if(/^[A-Z]+$/.test(n))return zr(n);var t=n.replace(/^([a-z])([A-Z]+)([a-z]+)$/,function(n,t,e,r){var i=e.length;return i>1?t+"-"+zr(Zr(e,0,i-1))+"-"+zr(Zr(e,i-1,i))+r:zr(t+"-"+e+r)}).replace(/^([A-Z]+)([a-z]+)?$/,function(n,t,e){var r=t.length;return zr(Zr(t,0,r-1)+"-"+Zr(t,r-1,r)+(e||""))}).replace(/([a-z]?)([A-Z]+)([a-z]?)/g,function(n,t,e,r,i){var o=e.length;return o>1&&(t&&(t+="-"),r)?(t||"")+zr(Zr(e,0,o-1))+"-"+zr(Zr(e,o-1,o))+r:(t||"")+(i?"-":"")+zr(e)+(r||"")});return t=t.replace(/([-]+)/g,function(n,e,r){return r&&r+e.length<t.length?"-":""}),Br[n]=t,t},repeat:function(n,t){return Ke(ir(n),t)},padStart:Ar,padEnd:function(n,t,e){var r=ir(n);return t|=0,e=tt(e)?" ":""+e,r.padEnd?r.padEnd(t,e):t>r.length?((t-=r.length)>e.length&&(e+=Ke(e,t/e.length)),r+e.slice(0,t)):r},startsWith:function(n,t,e){var r=ir(n);return 0===(1===arguments.length?r:r.substring(e)).indexOf(t)},endsWith:function(n,t,e){var r=ir(n),i=arguments.length;return i>1&&(i>2?r.substring(0,e).indexOf(t)===e-1:r.indexOf(t)===r.length-1)},template:Vr,toFormatString:function(n,t){return Vr(n,t,{tmplRE:/\{([.\w[\]\s]+)\}/g})},toString:ir,toValueString:ir,noop:function(){},property:Un,bind:function(n,t){var e=mt(arguments,2);return function(){return n.apply(t,mt(arguments).concat(e))}},once:function(n,t){var e=!1,r=null,i=mt(arguments,2);return function(){return e||(r=n.apply(t,mt(arguments).concat(i)),e=!0),r}},after:function(n,t,e){var r=0,i=[];return function(){var o=arguments;++r<=n&&i.push(o[0]),r>=n&&t.apply(e,[i].concat(mt(o)))}},before:function(n,t,e){var r=0,i=[];return e=e||this,function(){var o=arguments;++r<n&&(i.push(o[0]),t.apply(e,[i].concat(mt(o))))}},throttle:function(n,t,e){var r=null,i=null,o=!1,u=null,s=In({leading:!0,trailing:!0},e),a=s.leading,c=s.trailing,f=function(){r=null,i=null},l=function(){o=!0,n.apply(i,r),u=setTimeout(h,t),f()},h=function(){u=null,o||!0!==c?f():l()},d=function(){r=arguments,i=this,o=!1,null!==u||!0!==a?!0===c&&(u=setTimeout(h,t)):l()};return d.cancel=function(){var n=null!==u;return n&&clearTimeout(u),f(),u=null,o=!1,n},d},debounce:function(n,t,e){var r=null,i=null,o="boolean"==typeof e?{leading:e,trailing:!e}:In({leading:!1,trailing:!0},e),u=!1,s=null,a=o.leading,c=o.trailing,f=function(){r=null,i=null},l=function(){u=!0,n.apply(i,r),f()},h=function(){!0===a&&(s=null),u||!0!==c?f():l()},d=function(){u=!1,r=arguments,i=this,null===s?!0===a&&l():clearTimeout(s),s=setTimeout(h,t)};return d.cancel=function(){var n=null!==s;return n&&clearTimeout(s),f(),s=null,u=!1,n},d},delay:function(n,t){var e=mt(arguments,2),r=this;return setTimeout(function(){n.apply(r,e)},t)},unserialize:Kr,serialize:function(n){var t,e=[];return On(n,function(n,r){tt(n)||(t=Nn(n),Wn(n)||t?e=e.concat(Qr(n,r,t)):e.push(Gr(r)+"="+Gr(Hn(n)?"":n)))}),e.join("&").replace(/%20/g,"+")},parseUrl:ei,getBaseURL:function(){if(Xr){var n=Xr.pathname,t=me(n,"/")+1;return ni()+(t===n.length?n:n.substring(0,t))}return""},locat:function(){return Xr?ei(Xr.href):{}},browse:function(){var n,t,e,r=!1,i=!1,o=!1,u={isNode:!1,isMobile:r,isPC:!1,isDoc:!!De};if(xe||typeof process===nt){e=li("Edge"),t=li("Chrome"),r=/(Android|webOS|iPhone|iPad|iPod|SymbianOS|BlackBerry|Windows Phone)/.test(navigator.userAgent),u.isDoc&&(n=De.body||De.documentElement,wn(["webkit","khtml","moz","ms","o"],function(t){u["-"+t]=!!n[t+"MatchesSelector"]}));try{i=fi(xe.localStorage)}catch(n){}try{o=fi(xe.sessionStorage)}catch(n){}In(u,{edge:e,firefox:li("Firefox"),msie:!e&&u["-ms"],safari:!t&&!e&&li("Safari"),isMobile:r,isPC:!r,isLocalStorage:i,isSessionStorage:o})}else u.isNode=!0;return u},cookie:oi});const $i=xi(),Ai=xi((n,t,e)=>{if(void 0!==n[t]&&"function"==typeof e)return n[t]=e(n[t]),!0});function Ti(n,...t){let e=[];const r=t[t.length-1];return t.length>0&&Array.isArray(r)&&r.every(n=>["string","number","symbol"].includes(typeof n))&&(e=t.pop()),xi((n,t,r)=>e.includes(t)||Array.isArray(n[t])&&Array.isArray(r)?(n[t]=r,!0):void 0)(n,...t)}
|
|
2
|
+
/*!
|
|
3
|
+
* decimal.js v10.6.0
|
|
4
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
5
|
+
* https://github.com/MikeMcl/decimal.js
|
|
6
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
7
|
+
* MIT Licence
|
|
8
|
+
*/var ki,_i,ji=9e15,Fi=1e9,Ii="0123456789abcdef",Ci="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ri="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Pi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ji,maxE:ji,crypto:!1},Li=!0,qi="[DecimalError] ",Hi=qi+"Invalid argument: ",Ui=qi+"Precision limit exceeded",Wi=qi+"crypto unavailable",Zi="[object Decimal]",zi=Math.floor,Yi=Math.pow,Bi=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Vi=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ji=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ki=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gi=1e7,Qi=Ci.length-1,Xi=Ri.length-1,no={toStringTag:Zi};function to(n){var t,e,r,i=n.length-1,o="",u=n[0];if(i>0){for(o+=u,t=1;t<i;t++)(e=7-(r=n[t]+"").length)&&(o+=ho(e)),o+=r;(e=7-(r=(u=n[t])+"").length)&&(o+=ho(e))}else if(0===u)return"0";for(;u%10==0;)u/=10;return o+u}function eo(n,t,e){if(n!==~~n||n<t||n>e)throw Error(Hi+n)}function ro(n,t,e,r){var i,o,u,s;for(o=n[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Yi(10,7-t),s=n[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),u=e<4&&99999==s||e>3&&49999==s||5e4==s||0==s):u=(e<4&&s+1==o||e>3&&s+1==o/2)&&(n[i+1]/o/100|0)==Yi(10,t-2)-1||(s==o/2||0==s)&&!(n[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),u=(r||e<4)&&9999==s||!r&&e>3&&4999==s):u=((r||e<4)&&s+1==o||!r&&e>3&&s+1==o/2)&&(n[i+1]/o/1e3|0)==Yi(10,t-3)-1,u}function io(n,t,e){for(var r,i,o=[0],u=0,s=n.length;u<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=Ii.indexOf(n.charAt(u++)),r=0;r<o.length;r++)o[r]>e-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/e|0,o[r]%=e)}return o.reverse()}no.absoluteValue=no.abs=function(){var n=new this.constructor(this);return n.s<0&&(n.s=1),uo(n)},no.ceil=function(){return uo(new this.constructor(this),this.e+1,2)},no.clampedTo=no.clamp=function(n,t){var e=this,r=e.constructor;if(n=new r(n),t=new r(t),!n.s||!t.s)return new r(NaN);if(n.gt(t))throw Error(Hi+t);return e.cmp(n)<0?n:e.cmp(t)>0?t:new r(e)},no.comparedTo=no.cmp=function(n){var t,e,r,i,o=this,u=o.d,s=(n=new o.constructor(n)).d,a=o.s,c=n.s;if(!u||!s)return a&&c?a!==c?a:u===s?0:!u^a<0?1:-1:NaN;if(!u[0]||!s[0])return u[0]?a:s[0]?-c:0;if(a!==c)return a;if(o.e!==n.e)return o.e>n.e^a<0?1:-1;for(t=0,e=(r=u.length)<(i=s.length)?r:i;t<e;++t)if(u[t]!==s[t])return u[t]>s[t]^a<0?1:-1;return r===i?0:r>i^a<0?1:-1},no.cosine=no.cos=function(){var n,t,e=this,r=e.constructor;return e.d?e.d[0]?(n=r.precision,t=r.rounding,r.precision=n+Math.max(e.e,e.sd())+7,r.rounding=1,e=function(n,t){var e,r,i;if(t.isZero())return t;r=t.d.length,r<32?i=(1/So(4,e=Math.ceil(r/3))).toString():(e=16,i="2.3283064365386962890625e-10");n.precision+=e,t=Eo(n,1,t.times(i),new n(1));for(var o=e;o--;){var u=t.times(t);t=u.times(u).minus(u).times(8).plus(1)}return n.precision-=e,t}(r,Oo(r,e)),r.precision=n,r.rounding=t,uo(2==_i||3==_i?e.neg():e,n,t,!0)):new r(1):new r(NaN)},no.cubeRoot=no.cbrt=function(){var n,t,e,r,i,o,u,s,a,c,f=this,l=f.constructor;if(!f.isFinite()||f.isZero())return new l(f);for(Li=!1,(o=f.s*Yi(f.s*f,1/3))&&Math.abs(o)!=1/0?r=new l(o.toString()):(e=to(f.d),(o=((n=f.e)-e.length+1)%3)&&(e+=1==o||-2==o?"0":"00"),o=Yi(e,1/3),n=zi((n+1)/3)-(n%3==(n<0?-1:2)),(r=new l(e=o==1/0?"5e"+n:(e=o.toExponential()).slice(0,e.indexOf("e")+1)+n)).s=f.s),u=(n=l.precision)+3;;)if(c=(a=(s=r).times(s).times(s)).plus(f),r=oo(c.plus(f).times(s),c.plus(a),u+2,1),to(s.d).slice(0,u)===(e=to(r.d)).slice(0,u)){if("9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(uo(r,n+1,1),t=!r.times(r).times(r).eq(f));break}if(!i&&(uo(s,n+1,0),s.times(s).times(s).eq(f))){r=s;break}u+=4,i=1}return Li=!0,uo(r,n,l.rounding,t)},no.decimalPlaces=no.dp=function(){var n,t=this.d,e=NaN;if(t){if(e=7*((n=t.length-1)-zi(this.e/7)),n=t[n])for(;n%10==0;n/=10)e--;e<0&&(e=0)}return e},no.dividedBy=no.div=function(n){return oo(this,new this.constructor(n))},no.dividedToIntegerBy=no.divToInt=function(n){var t=this.constructor;return uo(oo(this,new t(n),0,1,1),t.precision,t.rounding)},no.equals=no.eq=function(n){return 0===this.cmp(n)},no.floor=function(){return uo(new this.constructor(this),this.e+1,3)},no.greaterThan=no.gt=function(n){return this.cmp(n)>0},no.greaterThanOrEqualTo=no.gte=function(n){var t=this.cmp(n);return 1==t||0===t},no.hyperbolicCosine=no.cosh=function(){var n,t,e,r,i,o=this,u=o.constructor,s=new u(1);if(!o.isFinite())return new u(o.s?1/0:NaN);if(o.isZero())return s;e=u.precision,r=u.rounding,u.precision=e+Math.max(o.e,o.sd())+4,u.rounding=1,(i=o.d.length)<32?t=(1/So(4,n=Math.ceil(i/3))).toString():(n=16,t="2.3283064365386962890625e-10"),o=Eo(u,1,o.times(t),new u(1),!0);for(var a,c=n,f=new u(8);c--;)a=o.times(o),o=s.minus(a.times(f.minus(a.times(f))));return uo(o,u.precision=e,u.rounding=r,!0)},no.hyperbolicSine=no.sinh=function(){var n,t,e,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,e=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=Eo(o,2,i,i,!0);else{n=(n=1.4*Math.sqrt(r))>16?16:0|n,i=Eo(o,2,i=i.times(1/So(5,n)),i,!0);for(var u,s=new o(5),a=new o(16),c=new o(20);n--;)u=i.times(i),i=i.times(s.plus(u.times(a.times(u).plus(c))))}return o.precision=t,o.rounding=e,uo(i,t,e,!0)},no.hyperbolicTangent=no.tanh=function(){var n,t,e=this,r=e.constructor;return e.isFinite()?e.isZero()?new r(e):(n=r.precision,t=r.rounding,r.precision=n+7,r.rounding=1,oo(e.sinh(),e.cosh(),r.precision=n,r.rounding=t)):new r(e.s)},no.inverseCosine=no.acos=function(){var n=this,t=n.constructor,e=n.abs().cmp(1),r=t.precision,i=t.rounding;return-1!==e?0===e?n.isNeg()?fo(t,r,i):new t(0):new t(NaN):n.isZero()?fo(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,n=new t(1).minus(n).div(n.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,n.times(2))},no.inverseHyperbolicCosine=no.acosh=function(){var n,t,e=this,r=e.constructor;return e.lte(1)?new r(e.eq(1)?0:NaN):e.isFinite()?(n=r.precision,t=r.rounding,r.precision=n+Math.max(Math.abs(e.e),e.sd())+4,r.rounding=1,Li=!1,e=e.times(e).minus(1).sqrt().plus(e),Li=!0,r.precision=n,r.rounding=t,e.ln()):new r(e)},no.inverseHyperbolicSine=no.asinh=function(){var n,t,e=this,r=e.constructor;return!e.isFinite()||e.isZero()?new r(e):(n=r.precision,t=r.rounding,r.precision=n+2*Math.max(Math.abs(e.e),e.sd())+6,r.rounding=1,Li=!1,e=e.times(e).plus(1).sqrt().plus(e),Li=!0,r.precision=n,r.rounding=t,e.ln())},no.inverseHyperbolicTangent=no.atanh=function(){var n,t,e,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(n=o.precision,t=o.rounding,r=i.sd(),Math.max(r,n)<2*-i.e-1?uo(new o(i),n,t,!0):(o.precision=e=r-i.e,i=oo(i.plus(1),new o(1).minus(i),e+n,1),o.precision=n+4,o.rounding=1,i=i.ln(),o.precision=n,o.rounding=t,i.times(.5))):new o(NaN)},no.inverseSine=no.asin=function(){var n,t,e,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),e=o.precision,r=o.rounding,-1!==t?0===t?((n=fo(o,e+4,r).times(.5)).s=i.s,n):new o(NaN):(o.precision=e+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=e,o.rounding=r,i.times(2)))},no.inverseTangent=no.atan=function(){var n,t,e,r,i,o,u,s,a,c=this,f=c.constructor,l=f.precision,h=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=Xi)return(u=fo(f,l+4,h).times(.25)).s=c.s,u}else{if(!c.s)return new f(NaN);if(l+4<=Xi)return(u=fo(f,l+4,h).times(.5)).s=c.s,u}for(f.precision=s=l+10,f.rounding=1,n=e=Math.min(28,s/7+2|0);n;--n)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Li=!1,t=Math.ceil(s/7),r=1,a=c.times(c),u=new f(c),i=c;-1!==n;)if(i=i.times(a),o=u.minus(i.div(r+=2)),i=i.times(a),void 0!==(u=o.plus(i.div(r+=2))).d[t])for(n=t;u.d[n]===o.d[n]&&n--;);return e&&(u=u.times(2<<e-1)),Li=!0,uo(u,f.precision=l,f.rounding=h,!0)},no.isFinite=function(){return!!this.d},no.isInteger=no.isInt=function(){return!!this.d&&zi(this.e/7)>this.d.length-2},no.isNaN=function(){return!this.s},no.isNegative=no.isNeg=function(){return this.s<0},no.isPositive=no.isPos=function(){return this.s>0},no.isZero=function(){return!!this.d&&0===this.d[0]},no.lessThan=no.lt=function(n){return this.cmp(n)<0},no.lessThanOrEqualTo=no.lte=function(n){return this.cmp(n)<1},no.logarithm=no.log=function(n){var t,e,r,i,o,u,s,a,c=this,f=c.constructor,l=f.precision,h=f.rounding;if(null==n)n=new f(10),t=!0;else{if(e=(n=new f(n)).d,n.s<0||!e||!e[0]||n.eq(1))return new f(NaN);t=n.eq(10)}if(e=c.d,c.s<0||!e||!e[0]||c.eq(1))return new f(e&&!e[0]?-1/0:1!=c.s?NaN:e?0:1/0);if(t)if(e.length>1)o=!0;else{for(i=e[0];i%10==0;)i/=10;o=1!==i}if(Li=!1,u=wo(c,s=l+5),r=t?co(f,s+10):wo(n,s),ro((a=oo(u,r,s,1)).d,i=l,h))do{if(u=wo(c,s+=10),r=t?co(f,s+10):wo(n,s),a=oo(u,r,s,1),!o){+to(a.d).slice(i+1,i+15)+1==1e14&&(a=uo(a,l+1,0));break}}while(ro(a.d,i+=10,h));return Li=!0,uo(a,l,h)},no.minus=no.sub=function(n){var t,e,r,i,o,u,s,a,c,f,l,h,d=this,p=d.constructor;if(n=new p(n),!d.d||!n.d)return d.s&&n.s?d.d?n.s=-n.s:n=new p(n.d||d.s!==n.s?d:NaN):n=new p(NaN),n;if(d.s!=n.s)return n.s=-n.s,d.plus(n);if(c=d.d,h=n.d,s=p.precision,a=p.rounding,!c[0]||!h[0]){if(h[0])n.s=-n.s;else{if(!c[0])return new p(3===a?-0:0);n=new p(d)}return Li?uo(n,s,a):n}if(e=zi(n.e/7),f=zi(d.e/7),c=c.slice(),o=f-e){for((l=o<0)?(t=c,o=-o,u=h.length):(t=h,e=f,u=c.length),o>(r=Math.max(Math.ceil(s/7),u)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((l=(r=c.length)<(u=h.length))&&(u=r),r=0;r<u;r++)if(c[r]!=h[r]){l=c[r]<h[r];break}o=0}for(l&&(t=c,c=h,h=t,n.s=-n.s),u=c.length,r=h.length-u;r>0;--r)c[u++]=0;for(r=h.length;r>o;){if(c[--r]<h[r]){for(i=r;i&&0===c[--i];)c[i]=Gi-1;--c[i],c[r]+=Gi}c[r]-=h[r]}for(;0===c[--u];)c.pop();for(;0===c[0];c.shift())--e;return c[0]?(n.d=c,n.e=ao(c,e),Li?uo(n,s,a):n):new p(3===a?-0:0)},no.modulo=no.mod=function(n){var t,e=this,r=e.constructor;return n=new r(n),!e.d||!n.s||n.d&&!n.d[0]?new r(NaN):!n.d||e.d&&!e.d[0]?uo(new r(e),r.precision,r.rounding):(Li=!1,9==r.modulo?(t=oo(e,n.abs(),0,3,1)).s*=n.s:t=oo(e,n,0,r.modulo,1),t=t.times(n),Li=!0,e.minus(t))},no.naturalExponential=no.exp=function(){return vo(this)},no.naturalLogarithm=no.ln=function(){return wo(this)},no.negated=no.neg=function(){var n=new this.constructor(this);return n.s=-n.s,uo(n)},no.plus=no.add=function(n){var t,e,r,i,o,u,s,a,c,f,l=this,h=l.constructor;if(n=new h(n),!l.d||!n.d)return l.s&&n.s?l.d||(n=new h(n.d||l.s===n.s?l:NaN)):n=new h(NaN),n;if(l.s!=n.s)return n.s=-n.s,l.minus(n);if(c=l.d,f=n.d,s=h.precision,a=h.rounding,!c[0]||!f[0])return f[0]||(n=new h(l)),Li?uo(n,s,a):n;if(o=zi(l.e/7),r=zi(n.e/7),c=c.slice(),i=o-r){for(i<0?(e=c,i=-i,u=f.length):(e=f,r=o,u=c.length),i>(u=(o=Math.ceil(s/7))>u?o+1:u+1)&&(i=u,e.length=1),e.reverse();i--;)e.push(0);e.reverse()}for((u=c.length)-(i=f.length)<0&&(i=u,e=f,f=c,c=e),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/Gi|0,c[i]%=Gi;for(t&&(c.unshift(t),++r),u=c.length;0==c[--u];)c.pop();return n.d=c,n.e=ao(c,r),Li?uo(n,s,a):n},no.precision=no.sd=function(n){var t,e=this;if(void 0!==n&&n!==!!n&&1!==n&&0!==n)throw Error(Hi+n);return e.d?(t=lo(e.d),n&&e.e+1>t&&(t=e.e+1)):t=NaN,t},no.round=function(){var n=this,t=n.constructor;return uo(new t(n),n.e+1,t.rounding)},no.sine=no.sin=function(){var n,t,e=this,r=e.constructor;return e.isFinite()?e.isZero()?new r(e):(n=r.precision,t=r.rounding,r.precision=n+Math.max(e.e,e.sd())+7,r.rounding=1,e=function(n,t){var e,r=t.d.length;if(r<3)return t.isZero()?t:Eo(n,2,t,t);e=1.4*Math.sqrt(r),e=e>16?16:0|e,t=t.times(1/So(5,e)),t=Eo(n,2,t,t);for(var i,o=new n(5),u=new n(16),s=new n(20);e--;)i=t.times(t),t=t.times(o.plus(i.times(u.times(i).minus(s))));return t}(r,Oo(r,e)),r.precision=n,r.rounding=t,uo(_i>2?e.neg():e,n,t,!0)):new r(NaN)},no.squareRoot=no.sqrt=function(){var n,t,e,r,i,o,u=this,s=u.d,a=u.e,c=u.s,f=u.constructor;if(1!==c||!s||!s[0])return new f(!c||c<0&&(!s||s[0])?NaN:s?u:1/0);for(Li=!1,0==(c=Math.sqrt(+u))||c==1/0?(((t=to(s)).length+a)%2==0&&(t+="0"),c=Math.sqrt(t),a=zi((a+1)/2)-(a<0||a%2),r=new f(t=c==1/0?"5e"+a:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new f(c.toString()),e=(a=f.precision)+3;;)if(r=(o=r).plus(oo(u,o,e+2,1)).times(.5),to(o.d).slice(0,e)===(t=to(r.d)).slice(0,e)){if("9999"!=(t=t.slice(e-3,e+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(uo(r,a+1,1),n=!r.times(r).eq(u));break}if(!i&&(uo(o,a+1,0),o.times(o).eq(u))){r=o;break}e+=4,i=1}return Li=!0,uo(r,a,f.rounding,n)},no.tangent=no.tan=function(){var n,t,e=this,r=e.constructor;return e.isFinite()?e.isZero()?new r(e):(n=r.precision,t=r.rounding,r.precision=n+10,r.rounding=1,(e=e.sin()).s=1,e=oo(e,new r(1).minus(e.times(e)).sqrt(),n+10,0),r.precision=n,r.rounding=t,uo(2==_i||4==_i?e.neg():e,n,t,!0)):new r(NaN)},no.times=no.mul=function(n){var t,e,r,i,o,u,s,a,c,f=this,l=f.constructor,h=f.d,d=(n=new l(n)).d;if(n.s*=f.s,!(h&&h[0]&&d&&d[0]))return new l(!n.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:h&&d?0*n.s:n.s/0);for(e=zi(f.e/7)+zi(n.e/7),(a=h.length)<(c=d.length)&&(o=h,h=d,d=o,u=a,a=c,c=u),o=[],r=u=a+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=a+r;i>r;)s=o[i]+d[r]*h[i-r-1]+t,o[i--]=s%Gi|0,t=s/Gi|0;o[i]=(o[i]+t)%Gi|0}for(;!o[--u];)o.pop();return t?++e:o.shift(),n.d=o,n.e=ao(o,e),Li?uo(n,l.precision,l.rounding):n},no.toBinary=function(n,t){return Mo(this,2,n,t)},no.toDecimalPlaces=no.toDP=function(n,t){var e=this,r=e.constructor;return e=new r(e),void 0===n?e:(eo(n,0,Fi),void 0===t?t=r.rounding:eo(t,0,8),uo(e,n+e.e+1,t))},no.toExponential=function(n,t){var e,r=this,i=r.constructor;return void 0===n?e=so(r,!0):(eo(n,0,Fi),void 0===t?t=i.rounding:eo(t,0,8),e=so(r=uo(new i(r),n+1,t),!0,n+1)),r.isNeg()&&!r.isZero()?"-"+e:e},no.toFixed=function(n,t){var e,r,i=this,o=i.constructor;return void 0===n?e=so(i):(eo(n,0,Fi),void 0===t?t=o.rounding:eo(t,0,8),e=so(r=uo(new o(i),n+i.e+1,t),!1,n+r.e+1)),i.isNeg()&&!i.isZero()?"-"+e:e},no.toFraction=function(n){var t,e,r,i,o,u,s,a,c,f,l,h,d=this,p=d.d,g=d.constructor;if(!p)return new g(d);if(c=e=new g(1),r=a=new g(0),u=(o=(t=new g(r)).e=lo(p)-d.e-1)%7,t.d[0]=Yi(10,u<0?7+u:u),null==n)n=o>0?t:c;else{if(!(s=new g(n)).isInt()||s.lt(c))throw Error(Hi+s);n=s.gt(t)?o>0?t:c:s}for(Li=!1,s=new g(to(p)),f=g.precision,g.precision=o=7*p.length*2;l=oo(s,t,0,1,1),1!=(i=e.plus(l.times(r))).cmp(n);)e=r,r=i,i=c,c=a.plus(l.times(i)),a=i,i=t,t=s.minus(l.times(i)),s=i;return i=oo(n.minus(e),r,0,1,1),a=a.plus(i.times(c)),e=e.plus(i.times(r)),a.s=c.s=d.s,h=oo(c,r,o,1).minus(d).abs().cmp(oo(a,e,o,1).minus(d).abs())<1?[c,r]:[a,e],g.precision=f,Li=!0,h},no.toHexadecimal=no.toHex=function(n,t){return Mo(this,16,n,t)},no.toNearest=function(n,t){var e=this,r=e.constructor;if(e=new r(e),null==n){if(!e.d)return e;n=new r(1),t=r.rounding}else{if(n=new r(n),void 0===t?t=r.rounding:eo(t,0,8),!e.d)return n.s?e:n;if(!n.d)return n.s&&(n.s=e.s),n}return n.d[0]?(Li=!1,e=oo(e,n,0,t,1).times(n),Li=!0,uo(e)):(n.s=e.s,e=n),e},no.toNumber=function(){return+this},no.toOctal=function(n,t){return Mo(this,8,n,t)},no.toPower=no.pow=function(n){var t,e,r,i,o,u,s=this,a=s.constructor,c=+(n=new a(n));if(!(s.d&&n.d&&s.d[0]&&n.d[0]))return new a(Yi(+s,c));if((s=new a(s)).eq(1))return s;if(r=a.precision,o=a.rounding,n.eq(1))return uo(s,r,o);if((t=zi(n.e/7))>=n.d.length-1&&(e=c<0?-c:c)<=9007199254740991)return i=po(a,s,e,r),n.s<0?new a(1).div(i):uo(i,r,o);if((u=s.s)<0){if(t<n.d.length-1)return new a(NaN);if(1&n.d[t]||(u=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=u,s}return(t=0!=(e=Yi(+s,c))&&isFinite(e)?new a(e+"").e:zi(c*(Math.log("0."+to(s.d))/Math.LN10+s.e+1)))>a.maxE+1||t<a.minE-1?new a(t>0?u/0:0):(Li=!1,a.rounding=s.s=1,e=Math.min(12,(t+"").length),(i=vo(n.times(wo(s,r+e)),r)).d&&ro((i=uo(i,r+5,1)).d,r,o)&&(t=r+10,+to((i=uo(vo(n.times(wo(s,t+e)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=uo(i,r+1,0))),i.s=u,Li=!0,a.rounding=o,uo(i,r,o))},no.toPrecision=function(n,t){var e,r=this,i=r.constructor;return void 0===n?e=so(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(eo(n,1,Fi),void 0===t?t=i.rounding:eo(t,0,8),e=so(r=uo(new i(r),n,t),n<=r.e||r.e<=i.toExpNeg,n)),r.isNeg()&&!r.isZero()?"-"+e:e},no.toSignificantDigits=no.toSD=function(n,t){var e=this.constructor;return void 0===n?(n=e.precision,t=e.rounding):(eo(n,1,Fi),void 0===t?t=e.rounding:eo(t,0,8)),uo(new e(this),n,t)},no.toString=function(){var n=this,t=n.constructor,e=so(n,n.e<=t.toExpNeg||n.e>=t.toExpPos);return n.isNeg()&&!n.isZero()?"-"+e:e},no.truncated=no.trunc=function(){return uo(new this.constructor(this),this.e+1,1)},no.valueOf=no.toJSON=function(){var n=this,t=n.constructor,e=so(n,n.e<=t.toExpNeg||n.e>=t.toExpPos);return n.isNeg()?"-"+e:e};var oo=function(){function n(n,t,e){var r,i=0,o=n.length;for(n=n.slice();o--;)r=n[o]*t+i,n[o]=r%e|0,i=r/e|0;return i&&n.unshift(i),n}function t(n,t,e,r){var i,o;if(e!=r)o=e>r?1:-1;else for(i=o=0;i<e;i++)if(n[i]!=t[i]){o=n[i]>t[i]?1:-1;break}return o}function e(n,t,e,r){for(var i=0;e--;)n[e]-=i,i=n[e]<t[e]?1:0,n[e]=i*r+n[e]-t[e];for(;!n[0]&&n.length>1;)n.shift()}return function(r,i,o,u,s,a){var c,f,l,h,d,p,g,m,v,w,y,b,N,E,S,O,M,D,x,$,A=r.constructor,T=r.s==i.s?1:-1,k=r.d,_=i.d;if(!(k&&k[0]&&_&&_[0]))return new A(r.s&&i.s&&(k?!_||k[0]!=_[0]:_)?k&&0==k[0]||!_?0*T:T/0:NaN);for(a?(d=1,f=r.e-i.e):(a=Gi,d=7,f=zi(r.e/d)-zi(i.e/d)),x=_.length,M=k.length,w=(v=new A(T)).d=[],l=0;_[l]==(k[l]||0);l++);if(_[l]>(k[l]||0)&&f--,null==o?(E=o=A.precision,u=A.rounding):E=s?o+(r.e-i.e)+1:o,E<0)w.push(1),p=!0;else{if(E=E/d+2|0,l=0,1==x){for(h=0,_=_[0],E++;(l<M||h)&&E--;l++)S=h*a+(k[l]||0),w[l]=S/_|0,h=S%_|0;p=h||l<M}else{for((h=a/(_[0]+1)|0)>1&&(_=n(_,h,a),k=n(k,h,a),x=_.length,M=k.length),O=x,b=(y=k.slice(0,x)).length;b<x;)y[b++]=0;($=_.slice()).unshift(0),D=_[0],_[1]>=a/2&&++D;do{h=0,(c=t(_,y,x,b))<0?(N=y[0],x!=b&&(N=N*a+(y[1]||0)),(h=N/D|0)>1?(h>=a&&(h=a-1),1==(c=t(g=n(_,h,a),y,m=g.length,b=y.length))&&(h--,e(g,x<m?$:_,m,a))):(0==h&&(c=h=1),g=_.slice()),(m=g.length)<b&&g.unshift(0),e(y,g,b,a),-1==c&&(c=t(_,y,x,b=y.length))<1&&(h++,e(y,x<b?$:_,b,a)),b=y.length):0===c&&(h++,y=[0]),w[l++]=h,c&&y[0]?y[b++]=k[O]||0:(y=[k[O]],b=1)}while((O++<M||void 0!==y[0])&&E--);p=void 0!==y[0]}w[0]||w.shift()}if(1==d)v.e=f,ki=p;else{for(l=1,h=w[0];h>=10;h/=10)l++;v.e=l+f*d-1,uo(v,s?o+v.e+1:o,u,p)}return v}}();function uo(n,t,e,r){var i,o,u,s,a,c,f,l,h,d=n.constructor;n:if(null!=t){if(!(l=n.d))return n;for(i=1,s=l[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,u=t,a=(f=l[h=0])/Yi(10,i-u-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(s=l.length)){if(!r)break n;for(;s++<=h;)l.push(0);f=a=0,i=1,u=(o%=7)-7+1}else{for(f=s=l[h],i=1;s>=10;s/=10)i++;a=(u=(o%=7)-7+i)<0?0:f/Yi(10,i-u-1)%10|0}if(r=r||t<0||void 0!==l[h+1]||(u<0?f:f%Yi(10,i-u-1)),c=e<4?(a||r)&&(0==e||e==(n.s<0?3:2)):a>5||5==a&&(4==e||r||6==e&&(o>0?u>0?f/Yi(10,i-u):0:l[h-1])%10&1||e==(n.s<0?8:7)),t<1||!l[0])return l.length=0,c?(t-=n.e+1,l[0]=Yi(10,(7-t%7)%7),n.e=-t||0):l[0]=n.e=0,n;if(0==o?(l.length=h,s=1,h--):(l.length=h+1,s=Yi(10,7-o),l[h]=u>0?(f/Yi(10,i-u)%Yi(10,u)|0)*s:0),c)for(;;){if(0==h){for(o=1,u=l[0];u>=10;u/=10)o++;for(u=l[0]+=s,s=1;u>=10;u/=10)s++;o!=s&&(n.e++,l[0]==Gi&&(l[0]=1));break}if(l[h]+=s,l[h]!=Gi)break;l[h--]=0,s=1}for(o=l.length;0===l[--o];)l.pop()}return Li&&(n.e>d.maxE?(n.d=null,n.e=NaN):n.e<d.minE&&(n.e=0,n.d=[0])),n}function so(n,t,e){if(!n.isFinite())return yo(n);var r,i=n.e,o=to(n.d),u=o.length;return t?(e&&(r=e-u)>0?o=o.charAt(0)+"."+o.slice(1)+ho(r):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(n.e<0?"e":"e+")+n.e):i<0?(o="0."+ho(-i-1)+o,e&&(r=e-u)>0&&(o+=ho(r))):i>=u?(o+=ho(i+1-u),e&&(r=e-i-1)>0&&(o=o+"."+ho(r))):((r=i+1)<u&&(o=o.slice(0,r)+"."+o.slice(r)),e&&(r=e-u)>0&&(i+1===u&&(o+="."),o+=ho(r))),o}function ao(n,t){var e=n[0];for(t*=7;e>=10;e/=10)t++;return t}function co(n,t,e){if(t>Qi)throw Li=!0,e&&(n.precision=e),Error(Ui);return uo(new n(Ci),t,1,!0)}function fo(n,t,e){if(t>Xi)throw Error(Ui);return uo(new n(Ri),t,e,!0)}function lo(n){var t=n.length-1,e=7*t+1;if(t=n[t]){for(;t%10==0;t/=10)e--;for(t=n[0];t>=10;t/=10)e++}return e}function ho(n){for(var t="";n--;)t+="0";return t}function po(n,t,e,r){var i,o=new n(1),u=Math.ceil(r/7+4);for(Li=!1;;){if(e%2&&Do((o=o.times(t)).d,u)&&(i=!0),0===(e=zi(e/2))){e=o.d.length-1,i&&0===o.d[e]&&++o.d[e];break}Do((t=t.times(t)).d,u)}return Li=!0,o}function go(n){return 1&n.d[n.d.length-1]}function mo(n,t,e){for(var r,i,o=new n(t[0]),u=0;++u<t.length;){if(!(i=new n(t[u])).s){o=i;break}((r=o.cmp(i))===e||0===r&&o.s===e)&&(o=i)}return o}function vo(n,t){var e,r,i,o,u,s,a,c=0,f=0,l=0,h=n.constructor,d=h.rounding,p=h.precision;if(!n.d||!n.d[0]||n.e>17)return new h(n.d?n.d[0]?n.s<0?0:1/0:1:n.s?n.s<0?0:n:NaN);for(null==t?(Li=!1,a=p):a=t,s=new h(.03125);n.e>-2;)n=n.times(s),l+=5;for(a+=r=Math.log(Yi(2,l))/Math.LN10*2+5|0,e=o=u=new h(1),h.precision=a;;){if(o=uo(o.times(n),a,1),e=e.times(++f),to((s=u.plus(oo(o,e,a,1))).d).slice(0,a)===to(u.d).slice(0,a)){for(i=l;i--;)u=uo(u.times(u),a,1);if(null!=t)return h.precision=p,u;if(!(c<3&&ro(u.d,a-r,d,c)))return uo(u,h.precision=p,d,Li=!0);h.precision=a+=10,e=o=s=new h(1),f=0,c++}u=s}}function wo(n,t){var e,r,i,o,u,s,a,c,f,l,h,d=1,p=n,g=p.d,m=p.constructor,v=m.rounding,w=m.precision;if(p.s<0||!g||!g[0]||!p.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=p.s?NaN:g?0:p);if(null==t?(Li=!1,f=w):f=t,m.precision=f+=10,r=(e=to(g)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=co(m,f+2,w).times(o+""),p=wo(new m(r+"."+e.slice(1)),f-10).plus(c),m.precision=w,null==t?uo(p,w,v,Li=!0):p;for(;r<7&&1!=r||1==r&&e.charAt(1)>3;)r=(e=to((p=p.times(n)).d)).charAt(0),d++;for(o=p.e,r>1?(p=new m("0."+e),o++):p=new m(r+"."+e.slice(1)),l=p,a=u=p=oo(p.minus(1),p.plus(1),f,1),h=uo(p.times(p),f,1),i=3;;){if(u=uo(u.times(h),f,1),to((c=a.plus(oo(u,new m(i),f,1))).d).slice(0,f)===to(a.d).slice(0,f)){if(a=a.times(2),0!==o&&(a=a.plus(co(m,f+2,w).times(o+""))),a=oo(a,new m(d),f,1),null!=t)return m.precision=w,a;if(!ro(a.d,f-10,v,s))return uo(a,m.precision=w,v,Li=!0);m.precision=f+=10,c=u=p=oo(l.minus(1),l.plus(1),f,1),h=uo(p.times(p),f,1),i=s=1}a=c,i+=2}}function yo(n){return String(n.s*n.s/0)}function bo(n,t){var e,r,i;for((e=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(e<0&&(e=r),e+=+t.slice(r+1),t=t.substring(0,r)):e<0&&(e=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,n.e=e=e-r-1,n.d=[],r=(e+1)%7,e<0&&(r+=7),r<i){for(r&&n.d.push(+t.slice(0,r)),i-=7;r<i;)n.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";n.d.push(+t),Li&&(n.e>n.constructor.maxE?(n.d=null,n.e=NaN):n.e<n.constructor.minE&&(n.e=0,n.d=[0]))}else n.e=0,n.d=[0];return n}function No(n,t){var e,r,i,o,u,s,a,c,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Ki.test(t))return bo(n,t)}else if("Infinity"===t||"NaN"===t)return+t||(n.s=NaN),n.e=NaN,n.d=null,n;if(Vi.test(t))e=16,t=t.toLowerCase();else if(Bi.test(t))e=2;else{if(!Ji.test(t))throw Error(Hi+t);e=8}for((o=t.search(/p/i))>0?(a=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),u=(o=t.indexOf("."))>=0,r=n.constructor,u&&(o=(s=(t=t.replace(".","")).length)-o,i=po(r,new r(e),o,2*o)),o=f=(c=io(t,e,Gi)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*n.s):(n.e=ao(c,f),n.d=c,Li=!1,u&&(n=oo(n,i,4*s)),a&&(n=n.times(Math.abs(a)<54?Yi(2,a):du.pow(2,a))),Li=!0,n)}function Eo(n,t,e,r,i){var o,u,s,a,c=n.precision,f=Math.ceil(c/7);for(Li=!1,a=e.times(e),s=new n(r);;){if(u=oo(s.times(a),new n(t++*t++),c,1),s=i?r.plus(u):r.minus(u),r=oo(u.times(a),new n(t++*t++),c,1),void 0!==(u=s.plus(r)).d[f]){for(o=f;u.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=u,u=o}return Li=!0,u.d.length=f+1,u}function So(n,t){for(var e=n;--t;)e*=n;return e}function Oo(n,t){var e,r=t.s<0,i=fo(n,n.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return _i=r?4:1,t;if((e=t.divToInt(i)).isZero())_i=r?3:2;else{if((t=t.minus(e.times(i))).lte(o))return _i=go(e)?r?2:3:r?4:1,t;_i=go(e)?r?1:4:r?3:2}return t.minus(i).abs()}function Mo(n,t,e,r){var i,o,u,s,a,c,f,l,h,d=n.constructor,p=void 0!==e;if(p?(eo(e,1,Fi),void 0===r?r=d.rounding:eo(r,0,8)):(e=d.precision,r=d.rounding),n.isFinite()){for(p?(i=2,16==t?e=4*e-3:8==t&&(e=3*e-2)):i=t,(u=(f=so(n)).indexOf("."))>=0&&(f=f.replace(".",""),(h=new d(1)).e=f.length-u,h.d=io(so(h),10,i),h.e=h.d.length),o=a=(l=io(f,10,i)).length;0==l[--a];)l.pop();if(l[0]){if(u<0?o--:((n=new d(n)).d=l,n.e=o,l=(n=oo(n,h,e,r,0,i)).d,o=n.e,c=ki),u=l[e],s=i/2,c=c||void 0!==l[e+1],c=r<4?(void 0!==u||c)&&(0===r||r===(n.s<0?3:2)):u>s||u===s&&(4===r||c||6===r&&1&l[e-1]||r===(n.s<0?8:7)),l.length=e,c)for(;++l[--e]>i-1;)l[e]=0,e||(++o,l.unshift(1));for(a=l.length;!l[a-1];--a);for(u=0,f="";u<a;u++)f+=Ii.charAt(l[u]);if(p){if(a>1)if(16==t||8==t){for(u=16==t?4:3,--a;a%u;a++)f+="0";for(a=(l=io(f,i,t)).length;!l[a-1];--a);for(u=1,f="1.";u<a;u++)f+=Ii.charAt(l[u])}else f=f.charAt(0)+"."+f.slice(1);f=f+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)f="0"+f;f="0."+f}else if(++o>a)for(o-=a;o--;)f+="0";else o<a&&(f=f.slice(0,o)+"."+f.slice(o))}else f=p?"0p+0":"0";f=(16==t?"0x":2==t?"0b":8==t?"0o":"")+f}else f=yo(n);return n.s<0?"-"+f:f}function Do(n,t){if(n.length>t)return n.length=t,!0}function xo(n){return new this(n).abs()}function $o(n){return new this(n).acos()}function Ao(n){return new this(n).acosh()}function To(n,t){return new this(n).plus(t)}function ko(n){return new this(n).asin()}function _o(n){return new this(n).asinh()}function jo(n){return new this(n).atan()}function Fo(n){return new this(n).atanh()}function Io(n,t){n=new this(n),t=new this(t);var e,r=this.precision,i=this.rounding,o=r+4;return n.s&&t.s?n.d||t.d?!t.d||n.isZero()?(e=t.s<0?fo(this,r,i):new this(0)).s=n.s:!n.d||t.isZero()?(e=fo(this,o,1).times(.5)).s=n.s:t.s<0?(this.precision=o,this.rounding=1,e=this.atan(oo(n,t,o,1)),t=fo(this,o,1),this.precision=r,this.rounding=i,e=n.s<0?e.minus(t):e.plus(t)):e=this.atan(oo(n,t,o,1)):(e=fo(this,o,1).times(t.s>0?.25:.75)).s=n.s:e=new this(NaN),e}function Co(n){return new this(n).cbrt()}function Ro(n){return uo(n=new this(n),n.e+1,2)}function Po(n,t,e){return new this(n).clamp(t,e)}function Lo(n){if(!n||"object"!=typeof n)throw Error(qi+"Object expected");var t,e,r,i=!0===n.defaults,o=["precision",1,Fi,"rounding",0,8,"toExpNeg",-ji,0,"toExpPos",0,ji,"maxE",0,ji,"minE",-ji,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(e=o[t],i&&(this[e]=Pi[e]),void 0!==(r=n[e])){if(!(zi(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(Hi+e+": "+r);this[e]=r}if(e="crypto",i&&(this[e]=Pi[e]),void 0!==(r=n[e])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Hi+e+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Wi);this[e]=!0}else this[e]=!1}return this}function qo(n){return new this(n).cos()}function Ho(n){return new this(n).cosh()}function Uo(n,t){return new this(n).div(t)}function Wo(n){return new this(n).exp()}function Zo(n){return uo(n=new this(n),n.e+1,3)}function zo(){var n,t,e=new this(0);for(Li=!1,n=0;n<arguments.length;)if((t=new this(arguments[n++])).d)e.d&&(e=e.plus(t.times(t)));else{if(t.s)return Li=!0,new this(1/0);e=t}return Li=!0,e.sqrt()}function Yo(n){return n instanceof du||n&&n.toStringTag===Zi||!1}function Bo(n){return new this(n).ln()}function Vo(n,t){return new this(n).log(t)}function Jo(n){return new this(n).log(2)}function Ko(n){return new this(n).log(10)}function Go(){return mo(this,arguments,-1)}function Qo(){return mo(this,arguments,1)}function Xo(n,t){return new this(n).mod(t)}function nu(n,t){return new this(n).mul(t)}function tu(n,t){return new this(n).pow(t)}function eu(n){var t,e,r,i,o=0,u=new this(1),s=[];if(void 0===n?n=this.precision:eo(n,1,Fi),r=Math.ceil(n/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(Wi);for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(n%=7,(r=s[--o])&&n&&(i=Yi(10,7-n),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)e=0,s=[0];else{for(e=-1;0===s[0];e-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(e-=7-r)}return u.e=e,u.d=s,u}function ru(n){return uo(n=new this(n),n.e+1,this.rounding)}function iu(n){return(n=new this(n)).d?n.d[0]?n.s:0*n.s:n.s||NaN}function ou(n){return new this(n).sin()}function uu(n){return new this(n).sinh()}function su(n){return new this(n).sqrt()}function au(n,t){return new this(n).sub(t)}function cu(){var n=0,t=arguments,e=new this(t[n]);for(Li=!1;e.s&&++n<t.length;)e=e.plus(t[n]);return Li=!0,uo(e,this.precision,this.rounding)}function fu(n){return new this(n).tan()}function lu(n){return new this(n).tanh()}function hu(n){return uo(n=new this(n),n.e+1,1)}no[Symbol.for("nodejs.util.inspect.custom")]=no.toString,no[Symbol.toStringTag]="Decimal";var du=no.constructor=function n(t){var e,r,i;function o(n){var t,e,r,i=this;if(!(i instanceof o))return new o(n);if(i.constructor=o,Yo(n))return i.s=n.s,void(Li?!n.d||n.e>o.maxE?(i.e=NaN,i.d=null):n.e<o.minE?(i.e=0,i.d=[0]):(i.e=n.e,i.d=n.d.slice()):(i.e=n.e,i.d=n.d?n.d.slice():n.d));if("number"===(r=typeof n)){if(0===n)return i.s=1/n<0?-1:1,i.e=0,void(i.d=[0]);if(n<0?(n=-n,i.s=-1):i.s=1,n===~~n&&n<1e7){for(t=0,e=n;e>=10;e/=10)t++;return void(Li?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[n]):(i.e=t,i.d=[n]))}return 0*n!=0?(n||(i.s=NaN),i.e=NaN,void(i.d=null)):bo(i,n.toString())}if("string"===r)return 45===(e=n.charCodeAt(0))?(n=n.slice(1),i.s=-1):(43===e&&(n=n.slice(1)),i.s=1),Ki.test(n)?bo(i,n):No(i,n);if("bigint"===r)return n<0?(n=-n,i.s=-1):i.s=1,bo(i,n.toString());throw Error(Hi+n)}if(o.prototype=no,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=Lo,o.clone=n,o.isDecimal=Yo,o.abs=xo,o.acos=$o,o.acosh=Ao,o.add=To,o.asin=ko,o.asinh=_o,o.atan=jo,o.atanh=Fo,o.atan2=Io,o.cbrt=Co,o.ceil=Ro,o.clamp=Po,o.cos=qo,o.cosh=Ho,o.div=Uo,o.exp=Wo,o.floor=Zo,o.hypot=zo,o.ln=Bo,o.log=Vo,o.log10=Ko,o.log2=Jo,o.max=Go,o.min=Qo,o.mod=Xo,o.mul=nu,o.pow=tu,o.random=eu,o.round=ru,o.sign=iu,o.sin=ou,o.sinh=uu,o.sqrt=su,o.sub=au,o.sum=cu,o.tan=fu,o.tanh=lu,o.trunc=hu,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<i.length;)t.hasOwnProperty(r=i[e++])||(t[r]=this[r]);return o.config(t),o}(Pi);function pu(...n){let t=new du(n[0]);for(let e=1;e<n.length;e++)t=t.add(new du(n[e]));return t.toNumber()}function gu(...n){return n.reduce((n,t)=>wu(n).add(t).toNumber(),0)}function mu(n,t){return n.reduce((n,e)=>wu(n).add(t(e)).toNumber(),0)}function vu(n,t,e){const r={},i=e;return n.forEach(n=>{const e=t(n);if(e){const t=i(n);r[e]=wu(r[e]||0).add(t).toNumber()}}),r}function wu(n){const t=Number(n)||0===n,e=Number.isNaN(Number(n)),r=new du(n);if(t&&!e)return r;console.error("请输入合理数字!");return new du(Number.NaN)}Ci=new du(Ci),Ri=new du(Ri);export{y as TtHttp,pu as add,Si as arrayToTree,Ni as bindMethods,wu as calc,di as calcWordsWidth,o as capitalize,vu as clsSumTotalBy,xi as createMerge,Ei as deepCopy,wi as deepMerge,c as downloadFile,gn as extractIdFromTitle,ln as extractResourceFromApi,pn as generateFormName,hn as generateTestId,rn as getBrowserType,en as getDeviceType,pi as getDifference,Oi as getFirstNonNullOrUndefined,hi as getStorage,x as is,un as isAndroid,U as isArray,q as isBoolean,B as isClient,I as isDate,fn as isDayjsObject,$ as isDef,Z as isElement,j as isEmpty,F as isEmptyZero,G as isError,an as isExternal,nn as isFalse,L as isFunction,on as isIos,cn as isJson,z as isMap,T as isNull,k as isNullOrUnDef,C as isNumber,_ as isObject,sn as isPC,K as isPrimitive,R as isPromise,H as isRegExp,Y as isServer,X as isSet,P as isString,J as isStringNumber,Q as isSymbol,tn as isTrue,A as isUndefined,V as isUrl,mn as isValidTestId,W as isWindow,s as kebabToCamelCase,Ai as mergFn,$i as merge,Ti as mergeWithArrayOverride,mi as setDifferenceArr,vi as setDifferenceField,gi as setDifferenceObj,a as sum,gu as sumTotal,mu as sumTotalBy,yi as toCssUnit,dn as toKebabCase,u as trim,bi as useVModel,b as withInstall};
|
|
2
9
|
//# sourceMappingURL=index.esm.js.map
|