*/varQe,pt;functionrt(){if(pt)returnQe;pt=1;leti=bt();constt=/^[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){letC=M(D),J=V(U);returnC&&J}functionM(D){returni.unformat(D)!==void0}functionE(D,U,C,J=!1){letee=Object.keys(D).map(P=>{if(!U[P])returnconsole.error(`${C} Invalid key: ${P}`),!1;letx=D[P],S=U[P];if(typeofS=="string"&&(S={type:S}),S.type==="format"){if(!E(x,m,`[Validate ${P}]`,!0))return!1}elseif(typeofx!==S.type)returnconsole.error(`${C}${P} type mismatched: "${S.type}" expected, "${typeofx}" provided`),!1;if(S.restrictions&&S.restrictions.length){letT=S.restrictions.length;for(letI=0;I<T;I++){let{restriction:N,message:z}=S.restrictions[I];if(!N(x,D))returnconsole.error(`${C}${P} invalid value: ${z}`),!1}}returnS.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}]`))});returnJ||ee.push(...Object.keys(U).map(P=>{letx=U[P];if(typeofx=="string"&&(x={type:x}),x.mandatory){letS=x.mandatory;if(typeofS=="function"&&(S=S(D)),S&&D[P]===void0)returnconsole.error(`${C} Missing mandatory key "${P}"`),!1}return!0})
* 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.
*/varet,gt;functionnt(){if(gt)returnet;gt=1;consti=Jt(),t=rt(),f=it;letg={},v,y={},_=null,B={};functionw(O){v=O}functionm(){returny[v]}returng.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=>_=typeofO=="string"?O:null,g.hasZeroFormat=()=>_!==null,g.languageData=O=>{if(O){if(y[O])returny[O];thrownewError(`Unknown tag "${O}"`)}returnm()},g.registerLanguage=(O,$=!1)=>{if(!t.validateLanguage(O))thrownewError("Invalid language data");y[O.languageTag]=O,$&&w(O.languageTag)},g.setLanguage=(O,$=i.languageTag)=>{if(!y[O]){letM=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}functiongr(i){thrownewError('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
*/functionmr(i,t){i.forEach(f=>{letg;try{g=gr(`../languages/${f}`)}catch{console.error(`Unable to load "${f}". No matching language file found.`)}g&&t.registerLanguage(g)})}varvr=i=>({loadLanguagesInNode:t=>mr(t,i)}),xt={exports:{}};(function(i){(function(t){varf,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;functionV(x){varS,T,I,N=p.prototype={constructor:p,toString:null,valueOf:null},z=newp(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;functionp(e,r){varn,c,s,o,h,a,l,d,u=this;if(!(uinstanceofp))returnnewp(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=typeofe=="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)))returnI(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)returnu=newp(e),te(u,H+u.e+1,G);if(d=String(e),a=typeofe=="number"){if(e*0!=0)returnI(u,d,a,r);if(u.s=1/e<0?(d=d.slice(1),-1):1,p.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throwError(B+e)}elseu.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}}elseif(!s&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){s=!0,h=-1,o=0;continue}returnI(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)))throwError(B+u.s*e);if((o=o-h-1)>fe)u.c=u.e=null;elseif(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}elseh-=l;for(;h--;d+="0");u.c.push(+d)}}elseu.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){varr,n;if(e!=null)if(typeofe=="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];elseif(C(n,-E,E,r),n)me=-(fe=n<0?-n:n);elsethrowError(_+r+" cannot be zero: "+n);if(e.hasOwnProperty(r="CRYPTO"))if(n=e[r],n===!!n)if(n)if(typeofcrypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))ve=n;elsethrowve=!n,Error(_+"crypto unavailable");elseve=n;elsethrowError(_+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],typeofn=="object")Me=n;elsethrowError(_+r+" not an object: "+n);if(e.hasOwnProperty(r="ALPHABET"))if(n=e[r],typeofn=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))ke=n.slice(0,10)=="0123456789",xe=n;elsethrowError(_+r+" invalid: "+n)}elsethrowError(_+"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;varr,n,c=e.c,s=e.e,o=e.s;e: