182 lines
60 KiB
JavaScript
182 lines
60 KiB
JavaScript
import{U as $t}from"./wt3vyHO9.js";import{d as ze,G as We,J as tt,r as j,a1 as Ve,y as oe,S as _e,z as Y,A as W,C as $e,H as Q,B as Ee,a4 as Et,a2 as Te,a3 as qe,F as Ae,bY as Fe,d2 as st,k as mt,aI as lt,af as je,D as Le,R as Mt,u as Dt,c_ as At,o as vt,ah as yt,bi as kt,al as Ct,U as wt,a7 as ot,am as ut,c$ as Tt,d3 as Lt,d4 as It}from"./G_17LgpR.js";import{B as He}from"./DUAMdf4s.js";import{d as Ut,e as Pt,f as Rt}from"./Dc3SYjr6.js";import{_ as Ft,C as Vt,i as ct}from"./CrTfCzgt.js";import{S as qt,a as jt}from"./DiiZMebn.js";/* empty css */import{u as Ht}from"./CCZ3DOmR.js";import{e as ft}from"./DWEdiVkG.js";import{r as Gt}from"./CeBJwJdi.js";import{S as zt}from"./vaBmzT43.js";import{B as Wt}from"./C_gIYN7y.js";import{s as Xt}from"./x_rD_Ya3.js";import{_ as Zt}from"./DlAUqK2U.js";var Yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/var Ke,dt;function Jt(){return dt||(dt=1,Ke={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(i){let t=i%10;return~~(i%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),Ke}/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/var Je,ht;function bt(){if(ht)return Je;ht=1;const i=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function t(w){return w.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function f(w,m,O,$,M,E,V){if(!isNaN(+w))return+w;let L="",D=w.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(D!==w)return-1*f(D,m,O,$,M,E);for(let x=0;x<i.length;x++){let S=i[x];if(L=w.replace(RegExp(`([0-9 ])(${S.key})$`),"$1"),L!==w)return f(L,m,O,$,M,E)*S.factor}if(L=w.replace("%",""),L!==w)return f(L,m,O,$,M,E)/100;let U=parseFloat(w);if(isNaN(U))return;let C=$(U);if(C&&C!=="."&&(L=w.replace(new RegExp(`${t(C)}$`),""),L!==w))return f(L,m,O,$,M,E);let J={};Object.keys(E).forEach(x=>{J[E[x]]=x});let ee=Object.keys(J).sort().reverse(),P=ee.length;for(let x=0;x<P;x++){let S=ee[x],T=J[S];if(L=w.replace(S,""),L!==w){let I;switch(T){case"thousand":I=Math.pow(10,3);break;case"million":I=Math.pow(10,6);break;case"billion":I=Math.pow(10,9);break;case"trillion":I=Math.pow(10,12);break}return f(L,m,O,$,M,E)*I}}}function g(w,m,O){let $=w.replace(O,"");return $=$.replace(new RegExp(`([0-9])${t(m.thousands)}([0-9])`,"g"),"$1$2"),$=$.replace(m.decimal,"."),$}function v(w,m,O="",$,M,E,V){if(w==="")return;if(w===M)return 0;let L=g(w,m,O);return f(L,m,O,$,M,E)}function y(w,m){if(!(w.indexOf(":")&&m.thousands!==":"))return!1;let $=w.split(":");if($.length!==3)return!1;let M=+$[0],E=+$[1],V=+$[2];return!isNaN(M)&&!isNaN(E)&&!isNaN(V)}function _(w){let m=w.split(":"),O=+m[0],$=+m[1];return+m[2]+60*$+3600*O}function B(w,m){const O=nt();let $=O.currentDelimiters(),M=O.currentCurrency().symbol,E=O.currentOrdinal(),V=O.getZeroFormat(),L=O.currentAbbreviations(),D;if(typeof w=="string")y(w,$)?D=_(w):D=v(w,$,M,E,V,L);else if(typeof w=="number")D=w;else return;if(D!==void 0)return D}return Je={unformat:B},Je}/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/var Qe,pt;function rt(){if(pt)return Qe;pt=1;let i=bt();const t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,f=["currency","percent","byte","time","ordinal","number"],g=["trillion","billion","million","thousand"],v=["prefix","infix","postfix"],y=["sign","parenthesis"],_={type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},m={output:{type:"string",validValues:f},base:{type:"string",validValues:["decimal","binary","general"],restriction:(D,U)=>U.output==="byte",message:"`base` must be provided only when the output is `byte`",mandatory:D=>D.output==="byte"},characteristic:{type:"number",restriction:D=>D>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:g},average:"boolean",lowPrecision:{type:"boolean",restriction:(D,U)=>U.average===!0,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:v},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:D=>D>=0,message:"value must be positive"},{restriction:(D,U)=>!U.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:D=>D>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:y},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(D,U)=>U.output==="percent",message:"`prefixSymbol` can be provided only when the output is `percent`"}},O={languageTag:{type:"string",mandatory:!0,restriction:D=>D.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:_,spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function $(D,U){let C=M(D),J=V(U);return C&&J}function M(D){return i.unformat(D)!==void 0}function E(D,U,C,J=!1){let ee=Object.keys(D).map(P=>{if(!U[P])return console.error(`${C} Invalid key: ${P}`),!1;let x=D[P],S=U[P];if(typeof S=="string"&&(S={type:S}),S.type==="format"){if(!E(x,m,`[Validate ${P}]`,!0))return!1}else if(typeof x!==S.type)return console.error(`${C} ${P} type mismatched: "${S.type}" expected, "${typeof x}" provided`),!1;if(S.restrictions&&S.restrictions.length){let T=S.restrictions.length;for(let I=0;I<T;I++){let{restriction:N,message:z}=S.restrictions[I];if(!N(x,D))return console.error(`${C} ${P} invalid value: ${z}`),!1}}return S.restriction&&!S.restriction(x,D)?(console.error(`${C} ${P} invalid value: ${S.message}`),!1):S.validValues&&S.validValues.indexOf(x)===-1?(console.error(`${C} ${P} invalid value: must be among ${JSON.stringify(S.validValues)}, "${x}" provided`),!1):!(S.children&&!E(x,S.children,`[Validate ${P}]`))});return J||ee.push(...Object.keys(U).map(P=>{let x=U[P];if(typeof x=="string"&&(x={type:x}),x.mandatory){let S=x.mandatory;if(typeof S=="function"&&(S=S(D)),S&&D[P]===void 0)return console.error(`${C} Missing mandatory key "${P}"`),!1}return!0})),ee.reduce((P,x)=>P&&x,!0)}function V(D){return E(D,m,"[Validate format]")}function L(D){return E(D,O,"[Validate language]")}return Qe={validate:$,validateFormat:V,validateInput:M,validateLanguage:L},Qe}/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/function Qt(i,t){let f=i.match(/^{([^}]*)}/);return f?(t.prefix=f[1],i.slice(f[0].length)):i}function er(i,t){let f=i.match(/{([^}]*)}$/);return f?(t.postfix=f[1],i.slice(0,-f[0].length)):i}function tr(i,t){if(i.indexOf("$")!==-1){t.output="currency";return}if(i.indexOf("%")!==-1){t.output="percent";return}if(i.indexOf("bd")!==-1){t.output="byte",t.base="general";return}if(i.indexOf("b")!==-1){t.output="byte",t.base="binary";return}if(i.indexOf("d")!==-1){t.output="byte",t.base="decimal";return}if(i.indexOf(":")!==-1){t.output="time";return}i.indexOf("o")!==-1&&(t.output="ordinal")}function rr(i,t){i.indexOf(",")!==-1&&(t.thousandSeparated=!0)}function ir(i,t){i.indexOf(" ")!==-1&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0))}function nr(i,t){let f=i.match(/[1-9]+[0-9]*/);f&&(t.totalLength=+f[0])}function ar(i,t){let g=i.split(".")[0].match(/0+/);g&&(t.characteristic=g[0].length)}function sr(i,t){let f=i.split(".")[1];if(f){let g=f.match(/0+/);g&&(t.mantissa=g[0].length)}}function lr(i,t){const f=i.split(".")[1];f&&(t.trimMantissa=f.indexOf("[")!==-1)}function or(i,t){i.indexOf("a")!==-1&&(t.average=!0)}function ur(i,t){i.indexOf("K")!==-1?t.forceAverage="thousand":i.indexOf("M")!==-1?t.forceAverage="million":i.indexOf("B")!==-1?t.forceAverage="billion":i.indexOf("T")!==-1&&(t.forceAverage="trillion")}function cr(i,t){i.match(/\[\.]/)?t.optionalMantissa=!0:i.match(/\./)&&(t.optionalMantissa=!1)}function fr(i,t){if(i.indexOf(".")!==-1){let f=i.split(".")[0];t.optionalCharacteristic=f.indexOf("0")===-1}}function dr(i,t){i.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),i.match(/^\+?-/)&&(t.negative="sign")}function hr(i,t){i.match(/^\+/)&&(t.forceSign=!0)}function pr(i,t={}){return typeof i!="string"?i:(i=Qt(i,t),i=er(i,t),tr(i,t),nr(i,t),ar(i,t),fr(i,t),or(i,t),ur(i,t),sr(i,t),cr(i,t),lr(i,t),rr(i,t),ir(i,t),dr(i,t),hr(i,t),t)}var it={parseFormat:pr};/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/var et,gt;function nt(){if(gt)return et;gt=1;const i=Jt(),t=rt(),f=it;let g={},v,y={},_=null,B={};function w(O){v=O}function m(){return y[v]}return g.languages=()=>Object.assign({},y),g.currentLanguage=()=>v,g.currentBytes=()=>m().bytes||{},g.currentCurrency=()=>m().currency,g.currentAbbreviations=()=>m().abbreviations,g.currentDelimiters=()=>m().delimiters,g.currentOrdinal=()=>m().ordinal,g.currentDefaults=()=>Object.assign({},m().defaults,B),g.currentOrdinalDefaultFormat=()=>Object.assign({},g.currentDefaults(),m().ordinalFormat),g.currentByteDefaultFormat=()=>Object.assign({},g.currentDefaults(),m().byteFormat),g.currentPercentageDefaultFormat=()=>Object.assign({},g.currentDefaults(),m().percentageFormat),g.currentCurrencyDefaultFormat=()=>Object.assign({},g.currentDefaults(),m().currencyFormat),g.currentTimeDefaultFormat=()=>Object.assign({},g.currentDefaults(),m().timeFormat),g.setDefaults=O=>{O=f.parseFormat(O),t.validateFormat(O)&&(B=O)},g.getZeroFormat=()=>_,g.setZeroFormat=O=>_=typeof O=="string"?O:null,g.hasZeroFormat=()=>_!==null,g.languageData=O=>{if(O){if(y[O])return y[O];throw new Error(`Unknown tag "${O}"`)}return m()},g.registerLanguage=(O,$=!1)=>{if(!t.validateLanguage(O))throw new Error("Invalid language data");y[O.languageTag]=O,$&&w(O.languageTag)},g.setLanguage=(O,$=i.languageTag)=>{if(!y[O]){let M=O.split("-")[0],E=Object.keys(y).find(V=>V.split("-")[0]===M);if(!y[E]){w($);return}w(E);return}w(O)},g.registerLanguage(i),v=i.languageTag,et=g,et}function gr(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/function mr(i,t){i.forEach(f=>{let g;try{g=gr(`../languages/${f}`)}catch{console.error(`Unable to load "${f}". No matching language file found.`)}g&&t.registerLanguage(g)})}var vr=i=>({loadLanguagesInNode:t=>mr(t,i)}),xt={exports:{}};(function(i){(function(t){var f,g=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,v=Math.ceil,y=Math.floor,_="[BigNumber Error] ",B=_+"Number primitive has more than 15 significant digits: ",w=1e14,m=14,O=9007199254740991,$=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],M=1e7,E=1e9;function V(x){var S,T,I,N=p.prototype={constructor:p,toString:null,valueOf:null},z=new p(1),H=20,G=4,se=-7,ue=21,me=-1e7,fe=1e7,ve=!1,Oe=1,ye=0,Me={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},xe="0123456789abcdefghijklmnopqrstuvwxyz",ke=!0;function p(e,r){var n,c,s,o,h,a,l,d,u=this;if(!(u instanceof p))return new p(e,r);if(r==null){if(e&&e._isBigNumber===!0){u.s=e.s,!e.c||e.e>fe?u.c=u.e=null:e.e<me?u.c=[u.e=0]:(u.e=e.e,u.c=e.c.slice());return}if((a=typeof e=="number")&&e*0==0){if(u.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,h=e;h>=10;h/=10,o++);o>fe?u.c=u.e=null:(u.e=o,u.c=[e]);return}d=String(e)}else{if(!g.test(d=String(e)))return I(u,d,a);u.s=d.charCodeAt(0)==45?(d=d.slice(1),-1):1}(o=d.indexOf("."))>-1&&(d=d.replace(".","")),(h=d.search(/e/i))>0?(o<0&&(o=h),o+=+d.slice(h+1),d=d.substring(0,h)):o<0&&(o=d.length)}else{if(C(r,2,xe.length,"Base"),r==10&&ke)return u=new p(e),te(u,H+u.e+1,G);if(d=String(e),a=typeof e=="number"){if(e*0!=0)return I(u,d,a,r);if(u.s=1/e<0?(d=d.slice(1),-1):1,p.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(B+e)}else u.s=d.charCodeAt(0)===45?(d=d.slice(1),-1):1;for(n=xe.slice(0,r),o=h=0,l=d.length;h<l;h++)if(n.indexOf(c=d.charAt(h))<0){if(c=="."){if(h>o){o=l;continue}}else if(!s&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){s=!0,h=-1,o=0;continue}return I(u,String(e),a,r)}a=!1,d=T(d,r,10,u.s),(o=d.indexOf("."))>-1?d=d.replace(".",""):o=d.length}for(h=0;d.charCodeAt(h)===48;h++);for(l=d.length;d.charCodeAt(--l)===48;);if(d=d.slice(h,++l)){if(l-=h,a&&p.DEBUG&&l>15&&(e>O||e!==y(e)))throw Error(B+u.s*e);if((o=o-h-1)>fe)u.c=u.e=null;else if(o<me)u.c=[u.e=0];else{if(u.e=o,u.c=[],h=(o+1)%m,o<0&&(h+=m),h<l){for(h&&u.c.push(+d.slice(0,h)),l-=m;h<l;)u.c.push(+d.slice(h,h+=m));h=m-(d=d.slice(h)).length}else h-=l;for(;h--;d+="0");u.c.push(+d)}}else u.c=[u.e=0]}p.clone=V,p.ROUND_UP=0,p.ROUND_DOWN=1,p.ROUND_CEIL=2,p.ROUND_FLOOR=3,p.ROUND_HALF_UP=4,p.ROUND_HALF_DOWN=5,p.ROUND_HALF_EVEN=6,p.ROUND_HALF_CEIL=7,p.ROUND_HALF_FLOOR=8,p.EUCLID=9,p.config=p.set=function(e){var r,n;if(e!=null)if(typeof e=="object"){if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(n=e[r],C(n,0,E,r),H=n),e.hasOwnProperty(r="ROUNDING_MODE")&&(n=e[r],C(n,0,8,r),G=n),e.hasOwnProperty(r="EXPONENTIAL_AT")&&(n=e[r],n&&n.pop?(C(n[0],-E,0,r),C(n[1],0,E,r),se=n[0],ue=n[1]):(C(n,-E,E,r),se=-(ue=n<0?-n:n))),e.hasOwnProperty(r="RANGE"))if(n=e[r],n&&n.pop)C(n[0],-E,-1,r),C(n[1],1,E,r),me=n[0],fe=n[1];else if(C(n,-E,E,r),n)me=-(fe=n<0?-n:n);else throw Error(_+r+" cannot be zero: "+n);if(e.hasOwnProperty(r="CRYPTO"))if(n=e[r],n===!!n)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))ve=n;else throw ve=!n,Error(_+"crypto unavailable");else ve=n;else throw Error(_+r+" not true or false: "+n);if(e.hasOwnProperty(r="MODULO_MODE")&&(n=e[r],C(n,0,9,r),Oe=n),e.hasOwnProperty(r="POW_PRECISION")&&(n=e[r],C(n,0,E,r),ye=n),e.hasOwnProperty(r="FORMAT"))if(n=e[r],typeof n=="object")Me=n;else throw Error(_+r+" not an object: "+n);if(e.hasOwnProperty(r="ALPHABET"))if(n=e[r],typeof n=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))ke=n.slice(0,10)=="0123456789",xe=n;else throw Error(_+r+" invalid: "+n)}else throw Error(_+"Object expected: "+e);return{DECIMAL_PLACES:H,ROUNDING_MODE:G,EXPONENTIAL_AT:[se,ue],RANGE:[me,fe],CRYPTO:ve,MODULO_MODE:Oe,POW_PRECISION:ye,FORMAT:Me,ALPHABET:xe}},p.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!p.DEBUG)return!0;var r,n,c=e.c,s=e.e,o=e.s;e:if({}.toString.call(c)=="[object Array]"){if((o===1||o===-1)&&s>=-E&&s<=E&&s===y(s)){if(c[0]===0){if(s===0&&c.length===1)return!0;break e}if(r=(s+1)%m,r<1&&(r+=m),String(c[0]).length==r){for(r=0;r<c.length;r++)if(n=c[r],n<0||n>=w||n!==y(n))break e;if(n!==0)return!0}}}else if(c===null&&s===null&&(o===null||o===1||o===-1))return!0;throw Error(_+"Invalid BigNumber: "+e)},p.maximum=p.max=function(){return ne(arguments,-1)},p.minimum=p.min=function(){return ne(arguments,1)},p.random=(function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return y(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(n){var c,s,o,h,a,l=0,d=[],u=new p(z);if(n==null?n=H:C(n,0,E),h=v(n/m),ve)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(h*=2));l<h;)a=c[l]*131072+(c[l+1]>>>11),a>=9e15?(s=crypto.getRandomValues(new Uint32Array(2)),c[l]=s[0],c[l+1]=s[1]):(d.push(a%1e14),l+=2);l=h/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(h*=7);l<h;)a=(c[l]&31)*281474976710656+c[l+1]*1099511627776+c[l+2]*4294967296+c[l+3]*16777216+(c[l+4]<<16)+(c[l+5]<<8)+c[l+6],a>=9e15?crypto.randomBytes(7).copy(c,l):(d.push(a%1e14),l+=7);l=h/7}else throw ve=!1,Error(_+"crypto unavailable");if(!ve)for(;l<h;)a=r(),a<9e15&&(d[l++]=a%1e14);for(h=d[--l],n%=m,h&&n&&(a=$[m-n],d[l]=y(h/a)*a);d[l]===0;d.pop(),l--);if(l<0)d=[o=0];else{for(o=-1;d[0]===0;d.splice(0,1),o-=m);for(l=1,a=d[0];a>=10;a/=10,l++);l<m&&(o-=m-l)}return u.e=o,u.c=d,u}})(),p.sum=function(){for(var e=1,r=arguments,n=new p(r[0]);e<r.length;)n=n.plus(r[e++]);return n},T=(function(){var e="0123456789";function r(n,c,s,o){for(var h,a=[0],l,d=0,u=n.length;d<u;){for(l=a.length;l--;a[l]*=c);for(a[0]+=o.indexOf(n.charAt(d++)),h=0;h<a.length;h++)a[h]>s-1&&(a[h+1]==null&&(a[h+1]=0),a[h+1]+=a[h]/s|0,a[h]%=s)}return a.reverse()}return function(n,c,s,o,h){var a,l,d,u,b,A,k,F,X=n.indexOf("."),re=H,R=G;for(X>=0&&(u=ye,ye=0,n=n.replace(".",""),F=new p(c),A=F.pow(n.length-X),ye=u,F.c=r(P(D(A.c),A.e,"0"),10,s,e),F.e=F.c.length),k=r(n,c,s,h?(a=xe,e):(a=e,xe)),d=u=k.length;k[--u]==0;k.pop());if(!k[0])return a.charAt(0);if(X<0?--d:(A.c=k,A.e=d,A.s=o,A=S(A,F,re,R,s),k=A.c,b=A.r,d=A.e),l=d+re+1,X=k[l],u=s/2,b=b||l<0||k[l+1]!=null,b=R<4?(X!=null||b)&&(R==0||R==(A.s<0?3:2)):X>u||X==u&&(R==4||b||R==6&&k[l-1]&1||R==(A.s<0?8:7)),l<1||!k[0])n=b?P(a.charAt(1),-re,a.charAt(0)):a.charAt(0);else{if(k.length=l,b)for(--s;++k[--l]>s;)k[l]=0,l||(++d,k=[1].concat(k));for(u=k.length;!k[--u];);for(X=0,n="";X<=u;n+=a.charAt(k[X++]));n=P(n,d,a.charAt(0))}return n}})(),S=(function(){function e(c,s,o){var h,a,l,d,u=0,b=c.length,A=s%M,k=s/M|0;for(c=c.slice();b--;)l=c[b]%M,d=c[b]/M|0,h=k*l+d*A,a=A*l+h%M*M+u,u=(a/o|0)+(h/M|0)+k*d,c[b]=a%o;return u&&(c=[u].concat(c)),c}function r(c,s,o,h){var a,l;if(o!=h)l=o>h?1:-1;else for(a=l=0;a<o;a++)if(c[a]!=s[a]){l=c[a]>s[a]?1:-1;break}return l}function n(c,s,o,h){for(var a=0;o--;)c[o]-=a,a=c[o]<s[o]?1:0,c[o]=a*h+c[o]-s[o];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,s,o,h,a){var l,d,u,b,A,k,F,X,re,R,q,le,Pe,Ze,Ye,we,Ce,he=c.s==s.s?1:-1,ce=c.c,Z=s.c;if(!ce||!ce[0]||!Z||!Z[0])return new p(!c.s||!s.s||(ce?Z&&ce[0]==Z[0]:!Z)?NaN:ce&&ce[0]==0||!Z?he*0:he/0);for(X=new p(he),re=X.c=[],d=c.e-s.e,he=o+d+1,a||(a=w,d=L(c.e/m)-L(s.e/m),he=he/m|0),u=0;Z[u]==(ce[u]||0);u++);if(Z[u]>(ce[u]||0)&&d--,he<0)re.push(1),b=!0;else{for(Ze=ce.length,we=Z.length,u=0,he+=2,A=y(a/(Z[0]+1)),A>1&&(Z=e(Z,A,a),ce=e(ce,A,a),we=Z.length,Ze=ce.length),Pe=we,R=ce.slice(0,we),q=R.length;q<we;R[q++]=0);Ce=Z.slice(),Ce=[0].concat(Ce),Ye=Z[0],Z[1]>=a/2&&Ye++;do{if(A=0,l=r(Z,R,we,q),l<0){if(le=R[0],we!=q&&(le=le*a+(R[1]||0)),A=y(le/Ye),A>1)for(A>=a&&(A=a-1),k=e(Z,A,a),F=k.length,q=R.length;r(k,R,F,q)==1;)A--,n(k,we<F?Ce:Z,F,a),F=k.length,l=1;else A==0&&(l=A=1),k=Z.slice(),F=k.length;if(F<q&&(k=[0].concat(k)),n(R,k,q,a),q=R.length,l==-1)for(;r(Z,R,we,q)<1;)A++,n(R,we<q?Ce:Z,q,a),q=R.length}else l===0&&(A++,R=[0]);re[u++]=A,R[0]?R[q++]=ce[Pe]||0:(R=[ce[Pe]],q=1)}while((Pe++<Ze||R[0]!=null)&&he--);b=R[0]!=null,re[0]||re.splice(0,1)}if(a==w){for(u=1,he=re[0];he>=10;he/=10,u++);te(X,o+(X.e=u+d*m-1)+1,h,b)}else X.e=d,X.r=+b;return X}})();function ie(e,r,n,c){var s,o,h,a,l;if(n==null?n=G:C(n,0,8),!e.c)return e.toString();if(s=e.c[0],h=e.e,r==null)l=D(e.c),l=c==1||c==2&&(h<=se||h>=ue)?ee(l,h):P(l,h,"0");else if(e=te(new p(e),r,n),o=e.e,l=D(e.c),a=l.length,c==1||c==2&&(r<=o||o<=se)){for(;a<r;l+="0",a++);l=ee(l,o)}else if(r-=h,l=P(l,o,"0"),o+1>a){if(--r>0)for(l+=".";r--;l+="0");}else if(r+=o-a,r>0)for(o+1==a&&(l+=".");r--;l+="0");return e.s<0&&s?"-"+l:l}function ne(e,r){for(var n,c,s=1,o=new p(e[0]);s<e.length;s++)c=new p(e[s]),(!c.s||(n=U(o,c))===r||n===0&&o.s===r)&&(o=c);return o}function pe(e,r,n){for(var c=1,s=r.length;!r[--s];r.pop());for(s=r[0];s>=10;s/=10,c++);return(n=c+n*m-1)>fe?e.c=e.e=null:n<me?e.c=[e.e=0]:(e.e=n,e.c=r),e}I=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,n=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,s=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,h,a,l){var d,u=a?h:h.replace(s,"");if(c.test(u))o.s=isNaN(u)?null:u<0?-1:1;else{if(!a&&(u=u.replace(e,function(b,A,k){return d=(k=k.toLowerCase())=="x"?16:k=="b"?2:8,!l||l==d?A:b}),l&&(d=l,u=u.replace(r,"$1").replace(n,"0.$1")),h!=u))return new p(u,d);if(p.DEBUG)throw Error(_+"Not a"+(l?" base "+l:"")+" number: "+h);o.s=null}o.c=o.e=null}})();function te(e,r,n,c){var s,o,h,a,l,d,u,b=e.c,A=$;if(b){e:{for(s=1,a=b[0];a>=10;a/=10,s++);if(o=r-s,o<0)o+=m,h=r,l=b[d=0],u=y(l/A[s-h-1]%10);else if(d=v((o+1)/m),d>=b.length)if(c){for(;b.length<=d;b.push(0));l=u=0,s=1,o%=m,h=o-m+1}else break e;else{for(l=a=b[d],s=1;a>=10;a/=10,s++);o%=m,h=o-m+s,u=h<0?0:y(l/A[s-h-1]%10)}if(c=c||r<0||b[d+1]!=null||(h<0?l:l%A[s-h-1]),c=n<4?(u||c)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||c||n==6&&(o>0?h>0?l/A[s-h]:0:b[d-1])%10&1||n==(e.s<0?8:7)),r<1||!b[0])return b.length=0,c?(r-=e.e+1,b[0]=A[(m-r%m)%m],e.e=-r||0):b[0]=e.e=0,e;if(o==0?(b.length=d,a=1,d--):(b.length=d+1,a=A[m-o],b[d]=h>0?y(l/A[s-h]%A[h])*a:0),c)for(;;)if(d==0){for(o=1,h=b[0];h>=10;h/=10,o++);for(h=b[0]+=a,a=1;h>=10;h/=10,a++);o!=a&&(e.e++,b[0]==w&&(b[0]=1));break}else{if(b[d]+=a,b[d]!=w)break;b[d--]=0,a=1}for(o=b.length;b[--o]===0;b.pop());}e.e>fe?e.c=e.e=null:e.e<me&&(e.c=[e.e=0])}return e}function de(e){var r,n=e.e;return n===null?e.toString():(r=D(e.c),r=n<=se||n>=ue?ee(r,n):P(r,n,"0"),e.s<0?"-"+r:r)}return N.absoluteValue=N.abs=function(){var e=new p(this);return e.s<0&&(e.s=1),e},N.comparedTo=function(e,r){return U(this,new p(e,r))},N.decimalPlaces=N.dp=function(e,r){var n,c,s,o=this;if(e!=null)return C(e,0,E),r==null?r=G:C(r,0,8),te(new p(o),e+o.e+1,r);if(!(n=o.c))return null;if(c=((s=n.length-1)-L(this.e/m))*m,s=n[s])for(;s%10==0;s/=10,c--);return c<0&&(c=0),c},N.dividedBy=N.div=function(e,r){return S(this,new p(e,r),H,G)},N.dividedToIntegerBy=N.idiv=function(e,r){return S(this,new p(e,r),0,1)},N.exponentiatedBy=N.pow=function(e,r){var n,c,s,o,h,a,l,d,u,b=this;if(e=new p(e),e.c&&!e.isInteger())throw Error(_+"Exponent not an integer: "+de(e));if(r!=null&&(r=new p(r)),a=e.e>14,!b.c||!b.c[0]||b.c[0]==1&&!b.e&&b.c.length==1||!e.c||!e.c[0])return u=new p(Math.pow(+de(b),a?e.s*(2-J(e)):+de(e))),r?u.mod(r):u;if(l=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new p(NaN);c=!l&&b.isInteger()&&r.isInteger(),c&&(b=b.mod(r))}else{if(e.e>9&&(b.e>0||b.e<-1||(b.e==0?b.c[0]>1||a&&b.c[1]>=24e7:b.c[0]<8e13||a&&b.c[0]<=9999975e7)))return o=b.s<0&&J(e)?-0:0,b.e>-1&&(o=1/o),new p(l?1/o:o);ye&&(o=v(ye/m+2))}for(a?(n=new p(.5),l&&(e.s=1),d=J(e)):(s=Math.abs(+de(e)),d=s%2),u=new p(z);;){if(d){if(u=u.times(b),!u.c)break;o?u.c.length>o&&(u.c.length=o):c&&(u=u.mod(r))}if(s){if(s=y(s/2),s===0)break;d=s%2}else if(e=e.times(n),te(e,e.e+1,1),e.e>14)d=J(e);else{if(s=+de(e),s===0)break;d=s%2}b=b.times(b),o?b.c&&b.c.length>o&&(b.c.length=o):c&&(b=b.mod(r))}return c?u:(l&&(u=z.div(u)),r?u.mod(r):o?te(u,ye,G,h):u)},N.integerValue=function(e){var r=new p(this);return e==null?e=G:C(e,0,8),te(r,r.e+1,e)},N.isEqualTo=N.eq=function(e,r){return U(this,new p(e,r))===0},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(e,r){return U(this,new p(e,r))>0},N.isGreaterThanOrEqualTo=N.gte=function(e,r){return(r=U(this,new p(e,r)))===1||r===0},N.isInteger=function(){return!!this.c&&L(this.e/m)>this.c.length-2},N.isLessThan=N.lt=function(e,r){return U(this,new p(e,r))<0},N.isLessThanOrEqualTo=N.lte=function(e,r){return(r=U(this,new p(e,r)))===-1||r===0},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&this.c[0]==0},N.minus=function(e,r){var n,c,s,o,h=this,a=h.s;if(e=new p(e,r),r=e.s,!a||!r)return new p(NaN);if(a!=r)return e.s=-r,h.plus(e);var l=h.e/m,d=e.e/m,u=h.c,b=e.c;if(!l||!d){if(!u||!b)return u?(e.s=-r,e):new p(b?h:NaN);if(!u[0]||!b[0])return b[0]?(e.s=-r,e):new p(u[0]?h:G==3?-0:0)}if(l=L(l),d=L(d),u=u.slice(),a=l-d){for((o=a<0)?(a=-a,s=u):(d=l,s=b),s.reverse(),r=a;r--;s.push(0));s.reverse()}else for(c=(o=(a=u.length)<(r=b.length))?a:r,a=r=0;r<c;r++)if(u[r]!=b[r]){o=u[r]<b[r];break}if(o&&(s=u,u=b,b=s,e.s=-e.s),r=(c=b.length)-(n=u.length),r>0)for(;r--;u[n++]=0);for(r=w-1;c>a;){if(u[--c]<b[c]){for(n=c;n&&!u[--n];u[n]=r);--u[n],u[c]+=w}u[c]-=b[c]}for(;u[0]==0;u.splice(0,1),--d);return u[0]?pe(e,u,d):(e.s=G==3?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,r){var n,c,s=this;return e=new p(e,r),!s.c||!e.s||e.c&&!e.c[0]?new p(NaN):!e.c||s.c&&!s.c[0]?new p(s):(Oe==9?(c=e.s,e.s=1,n=S(s,e,0,3),e.s=c,n.s*=c):n=S(s,e,0,Oe),e=s.minus(n.times(e)),!e.c[0]&&Oe==1&&(e.s=s.s),e)},N.multipliedBy=N.times=function(e,r){var n,c,s,o,h,a,l,d,u,b,A,k,F,X,re,R=this,q=R.c,le=(e=new p(e,r)).c;if(!q||!le||!q[0]||!le[0])return!R.s||!e.s||q&&!q[0]&&!le||le&&!le[0]&&!q?e.c=e.e=e.s=null:(e.s*=R.s,!q||!le?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(c=L(R.e/m)+L(e.e/m),e.s*=R.s,l=q.length,b=le.length,l<b&&(F=q,q=le,le=F,s=l,l=b,b=s),s=l+b,F=[];s--;F.push(0));for(X=w,re=M,s=b;--s>=0;){for(n=0,A=le[s]%re,k=le[s]/re|0,h=l,o=s+h;o>s;)d=q[--h]%re,u=q[h]/re|0,a=k*d+u*A,d=A*d+a%re*re+F[o]+n,n=(d/X|0)+(a/re|0)+k*u,F[o--]=d%X;F[o]=n}return n?++c:F.splice(0,1),pe(e,F,c)},N.negated=function(){var e=new p(this);return e.s=-e.s||null,e},N.plus=function(e,r){var n,c=this,s=c.s;if(e=new p(e,r),r=e.s,!s||!r)return new p(NaN);if(s!=r)return e.s=-r,c.minus(e);var o=c.e/m,h=e.e/m,a=c.c,l=e.c;if(!o||!h){if(!a||!l)return new p(s/0);if(!a[0]||!l[0])return l[0]?e:new p(a[0]?c:s*0)}if(o=L(o),h=L(h),a=a.slice(),s=o-h){for(s>0?(h=o,n=l):(s=-s,n=a),n.reverse();s--;n.push(0));n.reverse()}for(s=a.length,r=l.length,s-r<0&&(n=l,l=a,a=n,r=s),s=0;r;)s=(a[--r]=a[r]+l[r]+s)/w|0,a[r]=w===a[r]?0:a[r]%w;return s&&(a=[s].concat(a),++h),pe(e,a,h)},N.precision=N.sd=function(e,r){var n,c,s,o=this;if(e!=null&&e!==!!e)return C(e,1,E),r==null?r=G:C(r,0,8),te(new p(o),e,r);if(!(n=o.c))return null;if(s=n.length-1,c=s*m+1,s=n[s]){for(;s%10==0;s/=10,c--);for(s=n[0];s>=10;s/=10,c++);}return e&&o.e+1>c&&(c=o.e+1),c},N.shiftedBy=function(e){return C(e,-O,O),this.times("1e"+e)},N.squareRoot=N.sqrt=function(){var e,r,n,c,s,o=this,h=o.c,a=o.s,l=o.e,d=H+4,u=new p("0.5");if(a!==1||!h||!h[0])return new p(!a||a<0&&(!h||h[0])?NaN:h?o:1/0);if(a=Math.sqrt(+de(o)),a==0||a==1/0?(r=D(h),(r.length+l)%2==0&&(r+="0"),a=Math.sqrt(+r),l=L((l+1)/2)-(l<0||l%2),a==1/0?r="5e"+l:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new p(r)):n=new p(a+""),n.c[0]){for(l=n.e,a=l+d,a<3&&(a=0);;)if(s=n,n=u.times(s.plus(S(o,s,d,1))),D(s.c).slice(0,a)===(r=D(n.c)).slice(0,a))if(n.e<l&&--a,r=r.slice(a-3,a+1),r=="9999"||!c&&r=="4999"){if(!c&&(te(s,s.e+H+2,0),s.times(s).eq(o))){n=s;break}d+=4,a+=4,c=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(te(n,n.e+H+2,1),e=!n.times(n).eq(o));break}}return te(n,n.e+H+1,G,e)},N.toExponential=function(e,r){return e!=null&&(C(e,0,E),e++),ie(this,e,r,1)},N.toFixed=function(e,r){return e!=null&&(C(e,0,E),e=e+this.e+1),ie(this,e,r)},N.toFormat=function(e,r,n){var c,s=this;if(n==null)e!=null&&r&&typeof r=="object"?(n=r,r=null):e&&typeof e=="object"?(n=e,e=r=null):n=Me;else if(typeof n!="object")throw Error(_+"Argument not an object: "+n);if(c=s.toFixed(e,r),s.c){var o,h=c.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,d=n.groupSeparator||"",u=h[0],b=h[1],A=s.s<0,k=A?u.slice(1):u,F=k.length;if(l&&(o=a,a=l,l=o,F-=o),a>0&&F>0){for(o=F%a||a,u=k.substr(0,o);o<F;o+=a)u+=d+k.substr(o,a);l>0&&(u+=d+k.slice(o)),A&&(u="-"+u)}c=b?u+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?b.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):b):u}return(n.prefix||"")+c+(n.suffix||"")},N.toFraction=function(e){var r,n,c,s,o,h,a,l,d,u,b,A,k=this,F=k.c;if(e!=null&&(a=new p(e),!a.isInteger()&&(a.c||a.s!==1)||a.lt(z)))throw Error(_+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+de(a));if(!F)return new p(k);for(r=new p(z),d=n=new p(z),c=l=new p(z),A=D(F),o=r.e=A.length-k.e-1,r.c[0]=$[(h=o%m)<0?m+h:h],e=!e||a.comparedTo(r)>0?o>0?r:d:a,h=fe,fe=1/0,a=new p(A),l.c[0]=0;u=S(a,r,0,1),s=n.plus(u.times(c)),s.comparedTo(e)!=1;)n=c,c=s,d=l.plus(u.times(s=d)),l=s,r=a.minus(u.times(s=r)),a=s;return s=S(e.minus(n),c,0,1),l=l.plus(s.times(d)),n=n.plus(s.times(c)),l.s=d.s=k.s,o=o*2,b=S(d,c,o,G).minus(k).abs().comparedTo(S(l,n,o,G).minus(k).abs())<1?[d,c]:[l,n],fe=h,b},N.toNumber=function(){return+de(this)},N.toPrecision=function(e,r){return e!=null&&C(e,1,E),ie(this,e,r,2)},N.toString=function(e){var r,n=this,c=n.s,s=n.e;return s===null?c?(r="Infinity",c<0&&(r="-"+r)):r="NaN":(e==null?r=s<=se||s>=ue?ee(D(n.c),s):P(D(n.c),s,"0"):e===10&&ke?(n=te(new p(n),H+s+1,G),r=P(D(n.c),n.e,"0")):(C(e,2,xe.length,"Base"),r=T(P(D(n.c),s,"0"),10,e,c,!0)),c<0&&n.c[0]&&(r="-"+r)),r},N.valueOf=N.toJSON=function(){return de(this)},N._isBigNumber=!0,x!=null&&p.set(x),p}function L(x){var S=x|0;return x>0||x===S?S:S-1}function D(x){for(var S,T,I=1,N=x.length,z=x[0]+"";I<N;){for(S=x[I++]+"",T=m-S.length;T--;S="0"+S);z+=S}for(N=z.length;z.charCodeAt(--N)===48;);return z.slice(0,N+1||1)}function U(x,S){var T,I,N=x.c,z=S.c,H=x.s,G=S.s,se=x.e,ue=S.e;if(!H||!G)return null;if(T=N&&!N[0],I=z&&!z[0],T||I)return T?I?0:-G:H;if(H!=G)return H;if(T=H<0,I=se==ue,!N||!z)return I?0:!N^T?1:-1;if(!I)return se>ue^T?1:-1;for(G=(se=N.length)<(ue=z.length)?se:ue,H=0;H<G;H++)if(N[H]!=z[H])return N[H]>z[H]^T?1:-1;return se==ue?0:se>ue^T?1:-1}function C(x,S,T,I){if(x<S||x>T||x!==y(x))throw Error(_+(I||"Argument")+(typeof x=="number"?x<S||x>T?" out of range: ":" not an integer: ":" not a primitive number: ")+String(x))}function J(x){var S=x.c.length-1;return L(x.e/m)==S&&x.c[S]%2!=0}function ee(x,S){return(x.length>1?x.charAt(0)+"."+x.slice(1):x)+(S<0?"e":"e+")+S}function P(x,S,T){var I,N;if(S<0){for(N=T+".";++S;N+=T);x=N+x}else if(I=x.length,++S>I){for(N=T,S-=I;--S;N+=T);x+=N}else S<I&&(x=x.slice(0,S)+"."+x.slice(S));return x}f=V(),f.default=f.BigNumber=f,i.exports?i.exports=f:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=f)})(Yt)})(xt);var St=xt.exports;/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/const ge=nt(),yr=rt(),wr=it,br=St,ae={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},Ie={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:_t,decimalSuffixes:Ge}=ge.currentBytes(),at={general:{scale:1024,suffixes:Ge},binary:{scale:1024,suffixes:_t},decimal:{scale:1e3,suffixes:Ge}};function xr(i,t={},f){if(typeof t=="string"&&(t=wr.parseFormat(t)),!yr.validateFormat(t))return"ERROR: invalid format";let v=t.prefix||"",y=t.postfix||"",_=Sr(i,t,f);return _=Vr(_,v),_=qr(_,y),_}function Sr(i,t,f){switch(t.output){case"currency":return t=De(t,ge.currentCurrencyDefaultFormat()),Dr(i,t,ge);case"percent":return t=De(t,ge.currentPercentageDefaultFormat()),Mr(i,t,ge,f);case"byte":return t=De(t,ge.currentByteDefaultFormat()),Br(i,t,ge,f);case"time":return t=De(t,ge.currentTimeDefaultFormat()),Er(i);case"ordinal":return t=De(t,ge.currentOrdinalDefaultFormat()),$r(i,t,ge);case"number":default:return Ue({instance:i,providedFormat:t})}}function _r(i){let t=at.decimal;return Xe(i._value,t.suffixes,t.scale).suffix}function Or(i){let t=at.binary;return Xe(i._value,t.suffixes,t.scale).suffix}function Nr(i){let t=at.general;return Xe(i._value,t.suffixes,t.scale).suffix}function Xe(i,t,f){let g=t[0],v=Math.abs(i);if(v>=f){for(let y=1;y<t.length;++y){let _=Math.pow(f,y),B=Math.pow(f,y+1);if(v>=_&&v<B){g=t[y],i=i/_;break}}g===t[0]&&(i=i/Math.pow(f,t.length-1),g=t[t.length-1])}return{value:i,suffix:g}}function Br(i,t,f,g){let v=t.base||"binary",y=Object.assign({},Ie,t);const{binarySuffixes:_,decimalSuffixes:B}=f.currentBytes();let m={general:{scale:1024,suffixes:B||Ge,marker:"bd"},binary:{scale:1024,suffixes:_||_t,marker:"b"},decimal:{scale:1e3,suffixes:B||Ge,marker:"d"}}[v],{value:O,suffix:$}=Xe(i._value,m.suffixes,m.scale);return`${Ue({instance:g(O),providedFormat:t,state:f,defaults:f.currentByteDefaultFormat()})}${y.spaceSeparated?" ":""}${$}`}function $r(i,t,f){let g=f.currentOrdinal(),v=Object.assign({},Ie,t),y=Ue({instance:i,providedFormat:t,state:f}),_=g(i._value);return`${y}${v.spaceSeparated?" ":""}${_}`}function Er(i){let t=Math.floor(i._value/60/60),f=Math.floor((i._value-t*60*60)/60),g=Math.round(i._value-t*60*60-f*60);return`${t}:${f<10?"0":""}${f}:${g<10?"0":""}${g}`}function Mr(i,t,f,g){let v=t.prefixSymbol,y=Ue({instance:g(i._value*100),providedFormat:t,state:f}),_=Object.assign({},Ie,t);return v?`%${_.spaceSeparated?" ":""}${y}`:`${y}${_.spaceSeparated?" ":""}%`}function Dr(i,t,f){const g=f.currentCurrency();let v=Object.assign({},t),y=Object.assign({},Ie,v),_,B="",w=!!y.totalLength||!!y.forceAverage||y.average,m=v.currencyPosition||g.position,O=v.currencySymbol||g.symbol;const $=y.spaceSeparatedCurrency!==void 0?y.spaceSeparatedCurrency:y.spaceSeparated;v.lowPrecision===void 0&&(v.lowPrecision=!1),$&&(B=" "),m==="infix"&&(_=B+O+B);let M=Ue({instance:i,providedFormat:v,state:f,decimalSeparator:_});return m==="prefix"&&(i._value<0&&y.negative==="sign"?M=`-${B}${O}${M.slice(1)}`:i._value>0&&y.forceSign?M=`+${B}${O}${M.slice(1)}`:M=O+B+M),(!m||m==="postfix")&&(B=!y.spaceSeparatedAbbreviation&&w?"":B,M=M+B+O),M}function Ar({value:i,forceAverage:t,lowPrecision:f=!0,abbreviations:g,spaceSeparated:v=!1,totalLength:y=0,roundingFunction:_=Math.round}){let B="",w=Math.abs(i),m=-1;if(t&&g[t]&&ae[t]?(B=g[t],i=i/ae[t]):w>=ae.trillion||f&&_(w/ae.trillion)===1?(B=g.trillion,i=i/ae.trillion):w<ae.trillion&&w>=ae.billion||f&&_(w/ae.billion)===1?(B=g.billion,i=i/ae.billion):w<ae.billion&&w>=ae.million||f&&_(w/ae.million)===1?(B=g.million,i=i/ae.million):(w<ae.million&&w>=ae.thousand||f&&_(w/ae.thousand)===1)&&(B=g.thousand,i=i/ae.thousand),B&&(B=(v?" ":"")+B),y){let $=i<0,M=i.toString().split(".")[0],E=$?M.length-1:M.length;m=Math.max(y-E,0)}return{value:i,abbreviation:B,mantissaPrecision:m}}function kr({value:i,characteristicPrecision:t}){let[f,g]=i.toExponential().split("e"),v=+f;if(!t)return{value:v,abbreviation:`e${g}`};let y=1;return y<t&&(v=v*Math.pow(10,t-y),g=+g-(t-y),g=g>=0?`+${g}`:g),{value:v,abbreviation:`e${g}`}}function Re(i){let t="";for(let f=0;f<i;f++)t+="0";return t}function Cr(i,t){let f=i.toString(),[g,v]=f.split("e"),[y,_=""]=g.split(".");if(+v>0)f=y+_+Re(v-_.length);else{let B=".";+y<0?B=`-0${B}`:B=`0${B}`;let w=(Re(-v-1)+Math.abs(y)+_).substr(0,t);w.length<t&&(w+=Re(t-w.length)),f=B+w}return+v>0&&t>0&&(f+=`.${Re(t)}`),f}function Tr(i,t,f=Math.round){return i.toString().indexOf("e")!==-1?Cr(i,t):new br(f(+`${i}e+${t}`)/Math.pow(10,t)).toFixed(t)}function Lr(i,t,f,g,v,y){if(g===-1)return i;let _=Tr(t,g,y),[B,w=""]=_.toString().split(".");if(w.match(/^0+$/)&&(f||v))return B;let m=w.match(/0+$/);return v&&m?`${B}.${w.toString().slice(0,m.index)}`:_.toString()}function Ir(i,t,f,g){let v=i,[y,_]=v.toString().split(".");if(y.match(/^-?0$/)&&f)return _?`${y.replace("0","")}.${_}`:y.replace("0","");const B=t<0&&y.indexOf("-")===0;if(B&&(y=y.slice(1),v=v.slice(1)),y.length<g){let w=g-y.length;for(let m=0;m<w;m++)v=`0${v}`}return B&&(v=`-${v}`),v.toString()}function Ur(i,t){let f=[],g=0;for(let v=i;v>0;v--)g===t&&(f.unshift(v),g=0),g++;return f}function Pr(i,t,f,g,v){let y=g.currentDelimiters(),_=y.thousands;v=v||y.decimal;let B=y.thousandsSize||3,w=i.toString(),m=w.split(".")[0],O=w.split(".")[1];const $=t<0&&m.indexOf("-")===0;return f&&($&&(m=m.slice(1)),Ur(m.length,B).forEach((E,V)=>{m=m.slice(0,E+V)+_+m.slice(E+V)}),$&&(m=`-${m}`)),O?w=m+v+O:w=m,w}function Rr(i,t){return i+t}function Fr(i,t,f){return t===0?i:+i==0?i.replace("-",""):t>0?`+${i}`:f==="sign"?i:`(${i.replace("-","")})`}function Vr(i,t){return t+i}function qr(i,t){return i+t}function Ue({instance:i,providedFormat:t,state:f=ge,decimalSeparator:g,defaults:v=f.currentDefaults()}){let y=i._value;if(y===0&&f.hasZeroFormat())return f.getZeroFormat();if(!isFinite(y))return y.toString();let _=Object.assign({},Ie,v,t),B=_.totalLength,w=B?0:_.characteristic,m=_.optionalCharacteristic,O=_.forceAverage,$=_.lowPrecision,M=!!B||!!O||_.average,E=B?-1:M&&t.mantissa===void 0?0:_.mantissa,V=B?!1:t.optionalMantissa===void 0?E===-1:_.optionalMantissa,L=_.trimMantissa,D=_.thousandSeparated,U=_.spaceSeparated,C=_.negative,J=_.forceSign,ee=_.exponential,P=_.roundingFunction,x="";if(M){let T=Ar({value:y,forceAverage:O,lowPrecision:$,abbreviations:f.currentAbbreviations(),spaceSeparated:U,roundingFunction:P,totalLength:B});y=T.value,x+=T.abbreviation,B&&(E=T.mantissaPrecision)}if(ee){let T=kr({value:y,characteristicPrecision:w});y=T.value,x=T.abbreviation+x}let S=Lr(y.toString(),y,V,E,L,P);return S=Ir(S,y,m,w),S=Pr(S,y,D,f,g),(M||ee)&&(S=Rr(S,x)),(J||y<0)&&(S=Fr(S,y,C)),S}function De(i,t){if(!i)return t;let f=Object.keys(i);return f.length===1&&f[0]==="output"?t:i}var jr=i=>({format:(...t)=>xr(...t,i),getByteUnit:(...t)=>Nr(...t,i),getBinaryByteUnit:(...t)=>Or(...t,i),getDecimalByteUnit:(...t)=>_r(...t,i),formatOrDefault:De});/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/const Se=St;function Hr(i,t,f){let g=new Se(i._value),v=t;return f.isNumbro(t)&&(v=t._value),v=new Se(v),i._value=g.plus(v).toNumber(),i}function Ot(i,t,f){let g=new Se(i._value),v=t;return f.isNumbro(t)&&(v=t._value),v=new Se(v),i._value=g.minus(v).toNumber(),i}function Gr(i,t,f){let g=new Se(i._value),v=t;return f.isNumbro(t)&&(v=t._value),v=new Se(v),i._value=g.times(v).toNumber(),i}function zr(i,t,f){let g=new Se(i._value),v=t;return f.isNumbro(t)&&(v=t._value),v=new Se(v),i._value=g.dividedBy(v).toNumber(),i}function Wr(i,t,f){let g=t;return f.isNumbro(t)&&(g=t._value),i._value=g,i}function Xr(i,t,f){let g=f(i._value);return Ot(g,t,f),Math.abs(g._value)}var Zr=i=>({add:(t,f)=>Hr(t,f,i),subtract:(t,f)=>Ot(t,f,i),multiply:(t,f)=>Gr(t,f,i),divide:(t,f)=>zr(t,f,i),set:(t,f)=>Wr(t,f,i),difference:(t,f)=>Xr(t,f,i),BigNumber:Se});/*!
|
||
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/const Yr="2.5.0",be=nt(),Kr=rt(),Jr=vr(K),Qr=bt();let Ne=jr(K),Be=Zr(K);const ei=it;class Nt{constructor(t){this._value=t}clone(){return K(this._value)}format(t={}){return Ne.format(this,t)}formatCurrency(t){return typeof t=="string"&&(t=ei.parseFormat(t)),t=Ne.formatOrDefault(t,be.currentCurrencyDefaultFormat()),t.output="currency",Ne.format(this,t)}formatTime(t={}){return t.output="time",Ne.format(this,t)}binaryByteUnits(){return Ne.getBinaryByteUnit(this)}decimalByteUnits(){return Ne.getDecimalByteUnit(this)}byteUnits(){return Ne.getByteUnit(this)}difference(t){return Be.difference(this,t)}add(t){return Be.add(this,t)}subtract(t){return Be.subtract(this,t)}multiply(t){return Be.multiply(this,t)}divide(t){return Be.divide(this,t)}set(t){return Be.set(this,Bt(t))}value(){return this._value}valueOf(){return this._value}}function Bt(i){let t=i;return K.isNumbro(i)?t=i._value:typeof i=="string"?t=K.unformat(i):isNaN(i)&&(t=NaN),t}function K(i){return new Nt(Bt(i))}K.version=Yr;K.isNumbro=function(i){return i instanceof Nt};K.language=be.currentLanguage;K.registerLanguage=be.registerLanguage;K.setLanguage=be.setLanguage;K.languages=be.languages;K.languageData=be.languageData;K.zeroFormat=be.setZeroFormat;K.defaultFormat=be.currentDefaults;K.setDefaults=be.setDefaults;K.defaultCurrencyFormat=be.currentCurrencyDefaultFormat;K.validate=Kr.validate;K.loadLanguagesInNode=Jr.loadLanguagesInNode;K.unformat=Qr.unformat;K.BigNumber=Be.BigNumber;var ti=K,zi=Kt(ti);const ri={class:"w-full md:w-426px bg-black pb-5rem"},ii={class:"flex p-4 gap-8 justify-between items-center"},ni={class:"flex gap-4 items-center"},ai={class:"font-semibold text-white text-lg"},si=["disabled"],li={class:"w-full grid grid-cols-3 mt-2 gap-2px pb-5vh"},oi=ze({__name:"AddStoryToHighlightModal",props:{modelValue:{type:Boolean,required:!0},highlightId:{type:String,required:!1}},emits:["update:modelValue","close","success"],setup(i,{emit:t}){const f=i,g=t,v=We(),{user:y}=tt(),_=j(null),B=j([]),w=j(!1),m=M=>{g("update:modelValue",!1)};Ve(()=>f.modelValue,M=>{M||m()});const O=async()=>{try{w.value=!0;const M=await Ut(y?.user_id);B.value=M?.flatMap(E=>E?.mediaitems)}catch{st.error("error in fetching stories")}finally{w.value=!1}},$=async()=>{if(f.highlightId&&_.value)try{w.value=!0,await Pt(_.value?.id,f.highlightId),g("success"),g("update:modelValue",!1)}catch(M){console.log(M,"ee"),st.error("error in fetching stories")}finally{w.value=!1}};return O(),(M,E)=>i.modelValue?(Y(),oe("div",{key:0,class:"flex full_story z-400 justify-center fixed inset-0 bg-opacity-0",onClick:Fe(m,["self"])},[W("div",ri,[W("div",ii,[W("div",ni,[$e(He,{icon:Q(v).isRTL?"vuesax-linear:arrow-right":"vuesax-linear:arrow-left",color:"white",onClick:m},null,8,["icon"]),W("div",ai,Ee(Q(v).useString("selectsStory")),1)]),W("div",{class:Et(["text-primary text-sm fw-bold",!_.value&&"cursor-not-allowed !text-gray"]),disabled:!_.value,onClick:$},Ee(Q(v).useString("done")),11,si)]),W("div",li,[(Y(!0),oe(Te,null,qe(B.value,V=>(Y(),Ae(zt,{key:V.id,story:V,selectedStory:_.value,"onUpdate:selectedStory":E[0]||(E[0]=L=>_.value=L)},null,8,["story","selectedStory"]))),128))])])])):_e("",!0)}});Object.assign(oi,{__name:"AddStoryToHighlightModal"});const ui={class:"min-h-10vh overflow-y-auto px-2 mt3 pb-10"},ci=ze({__name:"ActionsHighlightBottomSheet",props:{open:{type:Boolean,default:!1},isEdit:{type:Boolean},data:{}},emits:["update:open","update:isEdit","success"],setup(i,{emit:t}){We();const f=j(null);mt(()=>v.value.id?"ویرایش آدرس":"ثبت آدرس جدید");const g=t,v=j({default_address:!1,city:"",province:"",phone:"",address:"",zip:""}),y=i;j();const _=lt(v.value);function B(){v.value=lt(_)}const w=()=>{B()},m=()=>{Object.assign(v.value,y.data?.payload),console.log(v.value)};Ve(y,M=>{M.open?O():$(),y.isEdit?m():w()});async function O(){await je(),await f.value?.setOpen()}async function $(){await je(),await f.value?.setClose(),g("update:open",!1)}return(M,E)=>(Y(),Ae(Wt,{title:"",ref_key:"sheetRef",ref:f,headerCls:"",closeOnClickOutside:"",onOnClickOutside:E[0]||(E[0]=V=>g("update:open",!1)),onOnClose:E[1]||(E[1]=V=>g("update:open",!1))},{default:Le(()=>[W("div",ui,[Mt(M.$slots,"default")])]),_:3},512))}});Object.assign(ci,{__name:"ActionsHighlightBottomSheet"});const fi={class:"flex full_story z-400 justify-center",dir:"ltr"},di={key:0,class:"absolute w-full top-0 right-0 left-0 z-1000 blurred-gradient-bg"},hi={class:"relative"},pi={class:"w-2.5rem h-2.5rem rounded-full",alt:""},gi={key:0,src:Ft,alt:"",class:"w-15px absolute right-0 bottom-0 bg-white rounded-full"},mi={class:"text-white"},vi={class:"w-full"},yi={key:0,class:"absolute w-full bottom-0 right-0 left-0 z-1000 flex items-center gap8 px5 functions_area"},wi={class:"flex flex-col items-center gap-2 text-white functions-area basic-icon-old"},bi={class:"text-xs text-red-6"},xi={class:"flex flex-col items-center gap-2 text-white functions-area basic-icon-old"},Si={class:"text-xs"},_i=ze({__name:"HighlightStories",props:{id:{},specifyId:{type:Boolean,default:!1},stories:{},highlightId:{},cover:{},title:{}},emits:["update:id","refresh"],setup(i,{emit:t}){const f=Dt();j();const g=j(null),v=j(0),y=j(0),_=j(0);j("");const B=We(),w=i,m=t,O=j([]),$=j(null),{direction:M,isSwiping:E}=At($);j(!1),j(!1),j(!1);const V=mt(()=>{if(w.stories?.length)return w.stories[v.value]});let L;const D=Ht();tt();const U=j(!1),C=j(!1);j(!1);let J,ee=!1,P=0,x=!1;function S(p){B.isSeller?f.push({name:"add-story"}):f.push({name:"user_detail-id",params:{id:V.value?.id}})}function T(p){P=p.touches[0].clientX,x=!1,ee=!1,J=setTimeout(()=>{ee=!0,x||z(p)},300)}function I(p){x||setTimeout(()=>{x=!0,clearTimeout(J)},50)}function N(p){clearTimeout(J);const ie=$.value?.querySelector(".account-detail-area"),ne=$.value?.querySelector(".functions_area");ie&&ie.contains(p.target)||ne&&ne.contains(p.target)||(p.preventDefault(),!ee&&!x?Me(p):H(p))}function z(p){const ie=$.value?.querySelector(".account-detail-area"),ne=$.value?.querySelector(".functions_area");ie&&ie.contains(p.target)||ne&&ne.contains(p.target)||(p.preventDefault(),p.stopPropagation(),U.value=!0,fe())}function H(p){p.preventDefault(),p.stopPropagation(),U.value&&me(),U.value=!1}vt(()=>{v.value=w.stories?.findIndex(p=>p?.media?.id===w.id),g.value.activeIndex=v.value,v.value===0&&G(),$.value?.addEventListener("touchstart",T),$.value?.addEventListener("touchend",N),$.value?.addEventListener("touchmove",I),$.value?.addEventListener("touchcancel",N)}),yt(()=>{$.value?.removeEventListener("touchstart",T),$.value?.removeEventListener("touchend",N),$.value?.addEventListener("touchmove",I),$.value?.removeEventListener("touchcancel",N)}),kt(()=>{E.value&&M.value==="down"&&m("update:id",void 0)}),Ve(v,async p=>{await G()});async function G(){_.value=w.stories?.length,O.value=[],await je(),g.value&&(g.value.activeIndex=v.value);for(let p=0;p<_.value;p++)O.value.push(0);me()}const se=p=>{g.value=p,C.value=!0},ue=p=>{if(!C.value)return;const ie=p?.activeIndex;y.value!==ie&&(y.value=ie)};function me(){L=Xt(()=>{y.value<O.value.length&&(O.value[y.value]+=10,O.value[y.value]>100&&ve())},1e3)}function fe(){clearInterval(L),L=void 0}function ve(){_.value>y.value+1?y.value++:(fe(),y.value=0,ye())}function Oe(){y.value!==0?y.value--:xe()}function ye(){w.specifyId?m("update:id",void 0):D.users.length>v.value+1?v.value++:m("update:id",void 0)}function Me(p){if(p.target.closest(".basic-icon-old"))return;const ne=$.value?.querySelector(".account-detail-area"),pe=$.value?.querySelector(".functions_area");if(ne&&ne.contains(p.target)||pe&&pe.contains(p.target))return;const te=p.currentTarget?.clientWidth;let de=0;"touches"in p?de=P:p instanceof MouseEvent&&(de=p.offsetX),de>te/2?(O.value[y.value]=100,ve()):(O.value[y.value]=0,O.value[y.value-1]=0,Oe())}function xe(){v.value!==0&&!w.specifyId&&v.value--}async function ke(){console.log("salfesgsfam"),await Tt(B.useString("areYouSureToDeleteThisHighlight"),w.highlightId??"",Gt,()=>m("refresh"))}return Ve([y,C],([p,ie])=>{if(!ie||!g.value||!w.stories?.length)return;const ne=Math.max(0,Math.min(p,w.stories.length-1));g.value.activeIndex!==ne&&setTimeout(()=>{try{g.value?.slideTo(ne)}catch{C.value=!1,je(()=>C.value=!0)}},50)},{immediate:!0}),(p,ie)=>{const ne=Ct("lazy");return Y(),oe(Te,null,[W("div",fi,[W("div",{ref_key:"target",ref:$,class:"relative w-full md:w-426px bg-black flex items-center pb-5rem",onClick:Me},[$e(wt,{name:"fade"},{default:Le(()=>[U.value?_e("",!0):(Y(),oe("div",di,[(Y(),oe("div",{class:"flex gap-2px shadow-xl",key:v.value},[(Y(!0),oe(Te,null,qe(p.stories,(pe,te)=>(Y(),Ae(Vt,{key:te,percent:O.value[te]},null,8,["percent"]))),128))])),W("div",{class:"p-2 flex items-center gap-2 account-detail-area",onClick:Fe(S,["prevent"])},[W("div",hi,[ot(W("img",pi,null,512),[[ne,{src:Q(ut)(p.cover),loading:Q(ft),error:Q(ft)}]]),Q(B).isSeller?(Y(),oe("img",gi)):_e("",!0)]),W("p",mi,Ee(p.title),1)])]))]),_:1}),W("div",vi,[(Y(),Ae(Q(qt),{key:v.value,ref_key:"swiperRef",ref:g,onSwiper:se,onSlideChange:ue,initialSlide:v.value,grabCursor:!0,modules:[],speed:0,noSwiping:!0,class:"mySwiper6"},{default:Le(()=>[(Y(!0),oe(Te,null,qe(p.stories,(pe,te)=>(Y(),Ae(Q(jt),{key:te,class:"self-center"},{default:Le(()=>[ot((Y(),oe("img",{alt:"instagram",class:"w-full bg-black",key:v.value})),[[ne,{src:Q(ut)(pe?.media?.media_url),loading:Q(ct),error:Q(ct)}]])]),_:2},1024))),128))]),_:1},8,["initialSlide"]))])],512)]),U.value?_e("",!0):(Y(),oe("div",yi,[Q(B).isSeller?(Y(),oe("div",{key:0,class:"flex gap-5 items-center",dir:"rtl",onClick:Fe(ke,["stop"])},[W("div",wi,[$e(He,{icon:"vuesax-linear:trash",color:"red",size:"22",class:"h7"}),W("div",bi,Ee(Q(B).useString("delete")),1)])])):_e("",!0),Q(B).isSeller?(Y(),oe("div",{key:1,class:"flex gap-5 items-center",dir:"rtl",onClick:ie[0]||(ie[0]=Fe(pe=>Q(f).push({name:"highlight-edit-id",params:{id:p.highlightId}}),["stop"]))},[W("div",xi,[$e(He,{icon:"vuesax-linear:edit-2",size:"22",class:"h6"}),W("div",Si,Ee(Q(B).useString("edit")),1)])])):_e("",!0)]))],64)}}}),Oi=Object.assign(_i,{__name:"HighlightStories"}),Ni={class:"stories-container -ms4"},Bi={class:"border-gray-600 border-1 border-solid w-70px h-70px rounded-full flex items-center justify-center"},$i={class:"text-center text-xs mt-7px"},Ei=["onClick"],Mi={class:"text-center"},Di={class:"w-full text-center text-xs truncate"},Ai=ze({__name:"Highlights",props:{currentUser:{}},setup(i){const t=j([]),f=Lt(),g=It(),v=j(null),y=j(null),_=j(null),B=j(null),w=j(null),m=j([]),O=j(!1),$=We(),{user:M}=tt();let E,V;const L=i,D=x=>{window.innerWidth<426||(O.value=!0,E=x.clientX,V=w.value.scrollLeft)},U=()=>{O.value=!1},C=x=>{if(!O.value)return;const T=(x.clientX-E)*2;w.value.scrollLeft=V-T},J=async()=>{try{const x=await Rt(g?.params?.id||$?.sellerConfig?.store.id,{page:1,limit:40});t.value=x}catch(x){console.log(x)}},ee=x=>{v.value=x?.cover_media_url,y.value=x?.id,B.value=x?.cover_media_url,_.value=x?.title,m.value=x?.stories};function P(){J(),v.value=null}return vt(async()=>{document.addEventListener("mouseup",U),document.addEventListener("mousemove",C),await J()}),yt(()=>{document.removeEventListener("mouseup",U),document.removeEventListener("mousemove",C)}),(x,S)=>{const T=$t;return Y(),oe("div",Ni,[W("div",{ref_key:"scrollContainer",ref:w,class:"scroll-wrapper ps-3",onMousedown:D},[Q(M)?.id===L.currentUser?.id?(Y(),oe("div",{key:0,class:"me-2",onClick:S[0]||(S[0]=()=>Q(f).push({name:"highlight-create"}))},[W("div",Bi,[$e(He,{icon:"vuesax-linear:add"})]),W("div",$i,Ee(Q($).useString("new")),1)])):_e("",!0),(Y(!0),oe(Te,null,qe(t.value,I=>(Y(),oe("div",{key:I?.id,onClick:N=>ee(I),class:"story"},[W("div",Mi,[$e(T,{src:I?.cover_media_url,"seen-story":!0,width:"75"},null,8,["src"])]),W("div",Di,Ee(I?.title),1)],8,Ei))),128))],544),$e(wt,{name:"slide-up",mode:"out-in"},{default:Le(()=>[v.value?(Y(),Ae(Oi,{key:0,id:v.value,"onUpdate:id":S[1]||(S[1]=I=>v.value=I),highlightId:y.value,title:_.value,cover:B.value,stories:m.value,onRefresh:P},null,8,["id","highlightId","title","cover","stories"])):_e("",!0)]),_:1})])}}}),Wi=Object.assign(Zt(Ai,[["__scopeId","data-v-6e51f42f"]]),{__name:"Highlights"});export{Wi as H,zi as n};
|