Comparing version 2.5.0 to 2.5.1
@@ -44,1 +44,9 @@ export const u_YEAR = 2; | ||
]; | ||
export const currencySymbols = [ | ||
'¤', '$', '£', '¥', '֏', '؋', '৳', '฿', '៛', | ||
'₡', '₦', '₩', '₪', '₫', '€', '₭', '₮', '₱', | ||
'₲', '₴', '₸', '₹', '₺', '₼', '₽', '₾', '₿' | ||
]; | ||
export const reCurrencySymbols = new RegExp('[' + currencySymbols.join('') + ']'); |
@@ -1,2 +0,2 @@ | ||
import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC } from './constants.js'; | ||
import { u_YEAR, u_MONTH, u_DAY, u_HOUR, u_MIN, u_SEC, reCurrencySymbols } from './constants.js'; | ||
@@ -58,3 +58,2 @@ export function isPercent (partitions) { | ||
const reCurrencySymbols = /[¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿]/; | ||
export function info (partitions, currencyId = null) { | ||
@@ -61,0 +60,0 @@ const [ partPos, partNeg ] = partitions; |
@@ -0,1 +1,2 @@ | ||
import { currencySymbols, reCurrencySymbols } from './constants.js'; | ||
import { dateFromSerial } from './serialDate.js'; | ||
@@ -105,3 +106,3 @@ /* | ||
// we only need #,###.### and never #.###,### | ||
const parts = /^([\s+%$(-]*)(((?:(?:\d[\d,]*)(?:\.\d*)?|(?:\.\d+)))([eE][+-]?\d+)?)([\s%$)]*)$/.exec(str); | ||
const parts = new RegExp('^([\\s+%' + currencySymbols.join('') + '(-]*)(((?:(?:\\d[\\d,]*)(?:\\.\\d*)?|(?:\\.\\d+)))([eE][+-]?\\d+)?)([\\s%' + currencySymbols.join('') + ')]*)$').exec(str); | ||
if (parts) { | ||
@@ -115,4 +116,5 @@ const [ , prefix, number, numpart, exp, suffix ] = parts; | ||
let percent = false; | ||
let dollar = false; | ||
let dollarTailing = false; | ||
let currency = false; | ||
let currencySymbol = null; | ||
let currencyTrailing = false; | ||
let value = parseFloat(number.replace(/,/g, '')); | ||
@@ -132,5 +134,6 @@ // is number ok? | ||
} | ||
else if (char === '$') { | ||
if (dollar) { return null; } | ||
dollar = true; | ||
else if (reCurrencySymbols.test(char)) { | ||
if (currency) { return null; } | ||
currency = true; | ||
currencySymbol = char; | ||
} | ||
@@ -151,6 +154,7 @@ else if (char === '(') { | ||
// only 1 occurance of these is allowed | ||
if (char === '$') { | ||
if (dollar) { return null; } | ||
dollar = true; | ||
dollarTailing = true; | ||
if (reCurrencySymbols.test(char)) { | ||
if (currency) { return null; } | ||
currency = true; | ||
currencySymbol = char; | ||
currencyTrailing = true; | ||
} | ||
@@ -167,3 +171,3 @@ else if (char === ')') { | ||
if (exp) { | ||
if (percent || dollar) { | ||
if (percent || currency) { | ||
return null; | ||
@@ -175,3 +179,3 @@ } | ||
else if (percent) { | ||
if (dollar) { | ||
if (currency) { | ||
// Sheets allows this: $123% => $1.23 (Excel does not) | ||
@@ -184,9 +188,10 @@ return null; | ||
} | ||
else if (dollar) { | ||
else if (currency) { | ||
// numpart dictates how "deep" the format is: "0" vs "0.00" | ||
if (dollarTailing) { | ||
format = numpart.includes('.') ? '#,##0.00$' : '#,##0$'; | ||
const currencyFormat = numpart.includes('.') ? '#,##0.00' : '#,##0'; | ||
if (currencyTrailing) { | ||
format = currencyFormat + currencySymbol; | ||
} | ||
else { | ||
format = numpart.includes('.') ? '$#,##0.00' : '$#,##0'; | ||
format = currencySymbol + currencyFormat; | ||
} | ||
@@ -242,3 +247,3 @@ } | ||
} | ||
if (t === '$') { | ||
if (t === '$' || t === '€') { | ||
// if string is done, then we can return | ||
@@ -245,0 +250,0 @@ if (!str) { |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.numfmt=t():e.numfmt=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,n){for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return ge}});var n={1078:"af",1052:"sq",1118:"am",5121:"ar_DZ",15361:"ar_BH",3073:"ar_EG",2049:"ar_IQ",11265:"ar_JO",13313:"ar_KW",12289:"ar_LB",4097:"ar_LY",6145:"ar_MA",8193:"ar_OM",16385:"ar_QA",1025:"ar_SA",10241:"ar_SY",7169:"ar_TN",14337:"ar_AE",9217:"ar_YE",1067:"hy",1101:"as",2092:"az_AZ",1068:"az_AZ",1069:"eu",1059:"be",2117:"bn",1093:"bn_IN",5146:"bs",1026:"bg",1109:"my",1027:"ca",2052:"zh_CN",3076:"zh_HK",5124:"zh_MO",4100:"zh_SG",1028:"zh_TW",1050:"hr",1029:"cs",1030:"da",1125:"dv",2067:"nl_BE",1043:"nl_NL",1126:"bin",3081:"en_AU",10249:"en_BZ",4105:"en_CA",9225:"en_CB",2057:"en_GB",16393:"en_IN",6153:"en_IE",8201:"en_JM",5129:"en_NZ",13321:"en_PH",7177:"en_ZA",11273:"en_TT",1033:"en_US",12297:"en_ZW",1061:"et",1071:"mk",1080:"fo",1065:"fa",1124:"fil",1035:"fi",2060:"fr_BE",11276:"fr_CM",3084:"fr_CA",9228:"fr_CG",12300:"fr_CI",1036:"fr_FR",5132:"fr_LU",13324:"fr_ML",6156:"fr_MC",14348:"fr_MA",10252:"fr_SN",4108:"fr_CH",7180:"fr",1122:"fy_NL",2108:"gd_IE",1084:"gd",1110:"gl",1079:"ka",3079:"de_AT",1031:"de_DE",5127:"de_LI",4103:"de_LU",2055:"de_CH",1032:"el",1140:"gn",1095:"gu",1279:"en",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig_NG",1057:"id",1040:"it_IT",2064:"it_CH",1041:"ja",1099:"kn",1120:"ks",1087:"kk",1107:"km",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1142:"la",1062:"lv",1063:"lt",2110:"ms_BN",1086:"ms_MY",1100:"ml",1082:"mt",1112:"mni",1153:"mi",1102:"mr",1104:"mn",2128:"mn",1121:"ne",1044:"no_NO",2068:"no_NO",1096:"or",1045:"pl",1046:"pt_BR",2070:"pt_PT",1094:"pa",1047:"rm",2072:"ro_MO",1048:"ro_RO",1049:"ru",2073:"ru_MO",1083:"se",1103:"sa",3098:"sr_SP",2074:"sr_SP",1072:"st",1074:"tn",1113:"sd",1115:"si",1051:"sk",1060:"sl",1143:"so",1070:"sb",11274:"es_AR",16394:"es_BO",13322:"es_CL",9226:"es_CO",5130:"es_CR",7178:"es_DO",12298:"es_EC",17418:"es_SV",4106:"es_GT",18442:"es_HN",2058:"es_MX",19466:"es_NI",6154:"es_PA",15370:"es_PY",10250:"es_PE",20490:"es_PR",1034:"es_ES",14346:"es_UY",8202:"es_VE",1089:"sw",2077:"sv_FI",1053:"sv_SE",1114:"syc",1064:"tg",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1073:"ts",1055:"tr",1090:"tk",1058:"uk",1056:"ur",2115:"uz_UZ",1091:"uz_UZ",1075:"ve",1066:"vi",1106:"cy",1076:"xh",1085:"yi",1077:"zu"};const a=/^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i,r={},i={group:" ",decimal:".",positive:"+",negative:"-",percent:"%",exponent:"E",nan:"NaN",infinity:"∞",ampm:["AM","PM"],mmmm6:["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"],mmm6:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],mmmm:["January","February","March","April","May","June","July","August","September","October","November","December"],mmm:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]};function s(e){const t=a.exec(e);if(!t)throw new SyntaxError("Malformed locale: ".concat(e));return{lang:t[1]+(t[2]?"_"+t[2]:""),language:t[1],territory:t[2]||"",codeset:t[3]||"",modifier:t[4]||""}}function o(e){if("number"==typeof e)return n[65535&e]||null;const t=parseInt(e,16);return isFinite(t)&&n[65535&t]?n[65535&t]||null:a.test(e)?e:null}function l(e){const t=o(e);let n=null;if(t){const e=s(t);n=r[e.lang]||r[e.language]||null}return n}function d(e){return Object.assign({},i,e)}function m(e,t){const n="object"==typeof t?t:s(t);return r[n.lang]=d(e),n.language===n.lang||r[n.language]||(r[n.language]=d(e)),r[n.lang]}const u=d({group:","});function c(e,t){if("number"!=typeof e)return e;if(e<0)return-c(-e,t);if(t){const n=10**(t||0)||1;return c(e*n,0)/n}return Math.round(e)}u.isDefault=!0,m({group:",",ampm:["上午","下午"],mmmm:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],mmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["周日","周一","周二","周三","周四","周五","周六"]},"zh_CN"),m({group:",",nan:"非數值",ampm:["上午","下午"],mmmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],mmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["週日","週一","週二","週三","週四","週五","週六"]},"zh_TW"),m({group:",",ampm:["午前","午後"],mmmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],mmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],ddd:["日","月","火","水","木","金","土"]},"ja"),m({group:",",ampm:["오전","오후"],mmmm:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],mmm:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dddd:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],ddd:["일","월","화","수","목","금","토"]},"ko"),m({group:",",ampm:["ก่อนเที่ยง","หลังเที่ยง"],mmmm:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],mmm:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dddd:["วันอาทิตย์","วันจันทร์","วันอังคาร","วันพุธ","วันพฤหัสบดี","วันศุกร์","วันเสาร์"],ddd:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},"th"),m({decimal:",",ampm:["dop.","odp."],mmmm:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],mmm:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],dddd:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],ddd:["ne","po","út","st","čt","pá","so"]},"cs"),m({group:".",decimal:",",mmmm:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],mmm:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],dddd:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],ddd:["søn.","man.","tir.","ons.","tor.","fre.","lør."]},"da"),m({group:".",decimal:",",ampm:["a.m.","p.m."],mmmm:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],mmm:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],dddd:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],ddd:["zo","ma","di","wo","do","vr","za"]},"nl"),m({group:","},"en"),m({decimal:",",nan:"epäluku",ampm:["ap.","ip."],mmmm:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"],mmm:["tammik.","helmik.","maalisk.","huhtik.","toukok.","kesäk.","heinäk.","elok.","syysk.","lokak.","marrask.","jouluk."],dddd:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"],ddd:["su","ma","ti","ke","to","pe","la"]},"fi"),m({group:" ",decimal:",",mmmm:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],mmm:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dddd:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],ddd:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."]},"fr"),m({group:".",decimal:",",mmmm:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],mmm:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],dddd:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],ddd:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]},"de"),m({group:".",decimal:",",ampm:["π.μ.","μ.μ."],mmmm:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],mmm:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dddd:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],ddd:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"]},"el"),m({decimal:",",ampm:["de.","du."],mmmm:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],mmm:["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],dddd:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],ddd:["V","H","K","Sze","Cs","P","Szo"]},"hu"),m({group:".",decimal:",",ampm:["f.h.","e.h."],mmmm:["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember"],mmm:["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des."],dddd:["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],ddd:["sun.","mán.","þri.","mið.","fim.","fös.","lau."]},"is"),m({group:".",decimal:",",mmmm:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],mmm:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],dddd:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],ddd:["Min","Sen","Sel","Rab","Kam","Jum","Sab"]},"id"),m({group:".",decimal:",",mmmm:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],mmm:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],dddd:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],ddd:["dom","lun","mar","mer","gio","ven","sab"]},"it"),m({decimal:",",ampm:["a.m.","p.m."],mmmm:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],mmm:["jan.","feb.","mar.","apr.","mai","jun.","jul.","aug.","sep.","okt.","nov.","des."],dddd:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],ddd:["søn.","man.","tir.","ons.","tor.","fre.","lør."]},"nb"),m({decimal:",",mmmm:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"],mmm:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],dddd:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],ddd:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."]},"pl"),m({group:".",decimal:",",mmmm:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],mmm:["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],dddd:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],ddd:["dom.","seg.","ter.","qua.","qui.","sex.","sáb."]},"pt"),m({decimal:",",nan:"не число",mmmm:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],mmm:["янв.","февр.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],dddd:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],ddd:["вс","пн","вт","ср","чт","пт","сб"]},"ru"),m({decimal:",",mmmm:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"],mmm:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],dddd:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],ddd:["ne","po","ut","st","št","pi","so"]},"sk"),m({group:".",decimal:",",ampm:["a. m.","p. m."],mmmm:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],mmm:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sept.","oct.","nov.","dic."],dddd:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],ddd:["dom.","lun.","mar.","mié.","jue.","vie.","sáb."]},"es"),m({decimal:",",ampm:["fm","em"],mmmm:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],mmm:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],dddd:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],ddd:["sön","mån","tis","ons","tors","fre","lör"]},"sv"),m({group:".",decimal:",",ampm:["ÖÖ","ÖS"],mmmm:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],mmm:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dddd:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],ddd:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"]},"tr");function p(e,t,n){const a=e<0?-1:1,r=10**(t||2),i=10**(n||2);let s,o,l=Math.abs(e),d=0,m=0,u=0,c=1;if((e=l)%1==0)o=[e*a,1];else if(e<1e-19)o=[a,1e19];else if(e>1e19)o=[1e19*a,1];else{do{if(l=1/(l-Math.floor(l)),s=c,c=c*Math.floor(l)+d,d=s,m=u,u=Math.floor(e*c+.5),u>=r||c>=i)return[a*m,d]}while(Math.abs(e-u/c)>=1e-10&&l!==Math.floor(l));o=[a*u,c]}return o}const f={overflow:"######",dateErrorThrows:!1,dateErrorNumber:!0,dateSpanLarge:!0,leap1900:!0,nbsp:!0,throws:!0,invalid:"######",locale:"",ignoreTimezone:!1},g=Object.assign({},f);function h(e){if(null===e&&(e=f),e)for(const t in e)if(t in f){const n=e[t];g[t]=null==n?f[t]:n}return{...g}}const y=16,_=32,b=64,j={"#":"",0:"0","?":" "},v={"@":"text","-":"minus","+":"plus"},M=["#000","#FFF","#F00","#0F0","#00F","#FF0","#F0F","#0FF","#000","#FFF","#F00","#0F0","#00F","#FF0","#F0F","#0FF","#800","#080","#008","#880","#808","#088","#CCC","#888","#99F","#936","#FFC","#CFF","#606","#F88","#06C","#CCF","#008","#F0F","#FF0","#0FF","#808","#800","#088","#00F","#0CF","#CFF","#CFC","#FF9","#9CF","#F9C","#C9F","#FC9","#36F","#3CC","#9C0","#FC0"];function k(e,t,n){return t[n+"_max"]=e.length,t[n+"_min"]=e.replace(/#/g,"").length,t}const x={};function F(e){if(!(e in x)){const t=[],n=e.replace(/^[#,]+/,"").replace(/[1-9]\d*/g,(e=>"?".repeat(e.length)));for(let e=0;e<n.length;e++){const a=n.charAt(e);t[e]=a in j?j[a]:a}x[e]=t.join("")}return x[e]}function z(e,t){"string"==typeof e&&(e={type:"string",value:e=e.replace(/ /g,j["?"])}),t.push(e)}function w(e){const t=[],n={scale:1,percent:!1,text:!1,date:0,date_eval:!1,date_system:1,sec_decimals:0,general:!1,clock:24,int_pattern:[],frac_pattern:[],man_pattern:[],den_pattern:[],num_pattern:[],tokens:t};let a=e+"",r="int",i=!1,s=null;const l=[];let d,m,u=!1;for(;a&&!i;){if(d=/^General/i.exec(a))n.general=!0,z({type:"general"},t);else if("int"===r&&(d=/^[#?0]+(?:,[#?0]+)*/.exec(a))||"den"===r&&(d=/^[#?\d]+/.exec(a))||(d=/^[#?0]+/.exec(a)))n[r+"_pattern"].push(d[0]),s={type:r,num:d[0]},z(s,t);else if((d=/^\//.exec(a))&&n[r+"_pattern"].length){if(!s)throw new SyntaxError("Missing a numerator in pattern ".concat(e));n.fractions=!0,n.num_pattern.push(n[r+"_pattern"].pop()),s.type="num",r="den",z({type:"div"},t)}else if(d=/^,+/.exec(a)){const e=a.charAt(1)in j;m.slice(-1)in j&&(d[0].length>1||!e)?n.scale=.001**d[0].length:n.dec_fractions||z(d[0],t)}else{if(d=/^;/.exec(a)){i=!0;break}if(d=/^[@+-]/.exec(a))"@"===d[0]&&(n.text=!0),z({type:v[d[0]]},t);else if(d=/^(?:\[(h+|m+|s+)\])/i.exec(a)){const e=d[1].toLowerCase(),a=e[0],r={type:"",size:0,date:1,raw:d[0],pad:e.length};"h"===a?(r.size=y,r.type="hour-elap"):"m"===a?(r.size=_,r.type="min-elap"):(r.size=b,r.type="sec-elap"),n.date=n.date|r.size,l.push(r),z(r,t)}else if(d=/^(?:B2)/i.exec(a))u||(n.date_system=6);else if(d=/^(?:B1)/i.exec(a))u||(n.date_system=1);else if(d=/^(?:([hHmMsSyYbBdDegG])\1*)/.exec(a)){const e={type:"",size:0,date:1,raw:d[0]},a=d[0].toLowerCase(),r=a[0];if("y"===a||"yy"===a)e.size=2,e.type="year-short";else if("y"===r||"e"===r)e.size=2,e.type="year";else if("b"===a||"bb"===a)e.size=2,e.type="b-year-short";else if("b"===r)e.size=2,e.type="b-year";else if("d"===a||"dd"===a)e.size=8,e.type="day",e.pad=/dd/.test(a);else if("ddd"===a)e.size=8,e.type="weekday-short";else if("d"===r)e.size=8,e.type="weekday";else if("h"===r)e.size=y,e.type="hour",e.pad=/hh/i.test(a);else if("m"===r){3===a.length?(e.size=4,e.type="monthname-short"):5===a.length?(e.size=4,e.type="monthname-single"):a.length>=4&&(e.size=4,e.type="monthname");const t=l[l.length-1];!e.type&&t&&!t.used&&80&t.size&&(t.used=!0,e.size=_,e.type="min",e.pad=/mm/.test(a)),e.type||(e.size=4,e.type="month",e.pad=/mm/.test(a),e.indeterminate=!0)}else if("s"===r){e.size=b,e.type="sec",e.pad=/ss/.test(a);const t=l[l.length-1];t&&t.size&_?e.used=!0:t&&t.indeterminate&&(delete t.indeterminate,t.size=_,t.type="min",e.used=!0)}n.date=n.date|e.size,n.date_eval=!0,l.push(e),z(e,t)}else if(d=/^(?:AM\/PM|am\/pm|A\/P)/.exec(a))n.clock=12,n.date=n.date|y,n.date_eval=!0,z({type:"am",short:"A/P"===d[0]},t);else if(n.date&&(d=/^\.0{1,3}/i.exec(a))){const e=d[0].length-1,a=[b,128,256,512][e];n.date=n.date|a,n.date_eval=!0,n.sec_decimals=Math.max(n.sec_decimals,e),z({type:"subsec",size:a,decimals:e,date:1,raw:d[0]},t)}else if((d=/^\\(.)/.exec(a))||(d=/^"([^"]*?)"/.exec(a)))z(d[1],t);else if(d=/^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/.exec(a))n.condition=[d[1],parseFloat(d[2],10)];else if(d=/^\[\$([^\]]+)\]/.exec(a)){const e=d[1].split("-"),a=e.length<2?"":e[e.length-1],r=e[0];r&&z(r,t);const i=o(a);i&&(n.locale=i);const s=parseInt(a,16);if(isFinite(s)&&16711680&s){6===(s>>16&255)&&(n.date_system=6)}u=!0}else if(d=/^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*(\d+))\]/i.exec(a))n.color=d[2]?M[parseInt(d[2],10)]||"#000":d[1].toLowerCase();else if(d=/^\[(DBNum1|ENG|HIJ|JPN|TWN)\]/i.exec(a));else if(d=/^%/.exec(a))n.scale=100,n.percent=!0,z("%",t);else if(d=/^_(\\.|.)/.exec(a))z(" ",t);else if(d=/^\./.exec(a))z({type:"point",value:d[0]},t),n.dec_fractions=!0,r="frac";else if(d=/^[Ee]([+-]?|(?=[0#?]))/.exec(a))n.exponential=!0,n.exp_plus="+"===d[1],r="man",z({type:"exp",plus:"+"===d[1]},t);else if(d=/^\*(\\.|.)/.exec(a));else{if(d=/^[BENn[]/.exec(a))throw new SyntaxError("Unexpected char ".concat(a.charAt(0)," in pattern ").concat(e));"("===a[0]&&(n.parens=!0),d=[a[0]],z(d[0],t)}}m=d[0],a=a.slice(d?d[0].length:1)}if(n.pattern=e.slice(0,e.length-a.length),/^((?:\[[^\]]+\])+)(;|$)/.test(n.pattern)&&!/^\[(?:h+|m+|s+)\]/.test(n.pattern)&&z({type:"text"},t),n.fractions&&n.dec_fractions||n.fractions&&n.exponential)throw new SyntaxError("Invalid pattern: ".concat(n.pattern));const c=n.int_pattern.join("");if(n.grouping=c.indexOf(",")>=0,n.grouping){const e=c.split(","),t=e.length;2===t?(n.group_pri=e[1].length,n.group_sec=n.group_pri):t>2&&(n.group_pri=e[t-1].length,n.group_sec=e[t-2].length)}else n.group_pri=0,n.group_sec=0;k(c.replace(/[,]/g,""),n,"int"),k(n.frac_pattern.join(""),n,"frac"),k(n.man_pattern.join(""),n,"man");let p=n.num_pattern.join(""),f=n.den_pattern.join("");const g=/\?/.test(f)||/\?/.test(p);return f=f.replace(/\d/g,g?"?":"#"),g&&(f=f.replace(/#$/g,"?")),k(p,n,"num"),k(f,n,"den"),g&&(p=p.replace(/#$/g,"?")),n.int_padding=F(n.int_pattern.join("")),n.man_padding=F(n.man_pattern.join("")),n.num_padding=F(p),n.den_padding=F(f),n.den_pattern.length&&(n.denominator=parseInt(n.den_pattern.join("").replace(/\D/g,""),10)),n.integer=!!n.int_pattern.join("").length,n.fractions&&t.forEach(((e,n)=>{const a=t[n+1];"string"===e.type&&a&&("num"===a.type?e.rule="num+int":"div"===a.type?e.rule="num":"den"===a.type&&(e.rule="den"))})),n}const D=e=>{const t=e.condition;t&&t[1]<0&&("<"===t[0]||"<="===t[0]||"="===t[0])||e.tokens.unshift({type:"minus",volatile:!0})};function S(e){const t=[];let n,a=!1,r=null,i=e,s=0,l=!1,d=0,m=0;do{if(l=w(i),(l.date||l.general)&&(l.int_pattern.length||l.frac_pattern.length||1!==l.scale||l.text))throw new Error("Illegal format");if(l.condition&&(m++,a=!0),l.text){if(r)throw new Error("Unexpected partition");r=l}l.locale&&(n=o(l.locale)),t.push(l),s=";"===i.charAt(l.pattern.length)?1:0,i=i.slice(l.pattern.length+s),d++}while(s&&d<4&&m<3);if(s)throw new Error("Unexpected partition");if(m>2)throw new Error("Unexpected condition");const u=t[3];if(u&&(u.int_pattern.length||u.frac_pattern.length||u.date))throw new Error("Unexpected partition");if(a){const e=t.length;if(1===e&&(t[1]=w("General"),t[1].generated=!0),e<3){const e=t[0],n=t[1];if(D(e),n.condition)D(n);else{const t=e.condition;("="===t[0]||t[1]>=0&&(">"===t[0]||">="===t[0]))&&n.tokens.unshift({type:"minus",volatile:!0})}}else t.forEach(D)}else{if(t.length<4&&r)for(let e=0,n=t.length;e<n;e++)t[e]===r&&t.splice(e,1);if(t.length<1&&r&&(t[0]=w("General"),t[0].generated=!0),t.length<2){const e=w(t[0].pattern);e.tokens.unshift({type:"minus",volatile:!0}),e.generated=!0,t.push(e)}if(t.length<3){const e=w(t[0].pattern);e.generated=!0,t.push(e)}if(t.length<4)if(r)t.push(r);else{const e=w("@");e.generated=!0,t.push(e)}t[0].condition=[">",0],t[1].condition=["<",0],t[2].condition=null}return{pattern:e,partitions:t,locale:n}}const C=Math.floor;function A(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t&&e>=0){if(0===e)return[1900,1,0];if(60===e)return[1900,2,29];if(e<60)return[1900,e<32?1:2,(e-1)%31+1]}let n=e+68569+2415019;const a=C(4*n/146097);n-=C((146097*a+3)/4);const r=C(4e3*(n+1)/1461001);n=n-C(1461*r/4)+31;const i=C(80*n/2447),s=n-C(2447*i/80);n=C(i/11);const o=i+2-12*n,l=100*(a-49)+r+n;return[0|l,0|o,0|s]}function E(e){return A(e+1462)}function Y(e){if(60===e)throw new Error("#VALUE!");if(e<=1)return[1317,8,29];if(e<60)return[1317,e<32?9:10,1+(e-2)%30];const t=10631/30,n=.1335;let a=e+466935;const r=C(a/10631);a-=10631*r;const i=C((a-n)/t);a-=C(i*t+n);const s=C((a+28.5001)/29.5);return 13===s?[30*r+i,12,30]:[30*r+i,s,a-C(29.5001*s-29)]}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const a=C(e);return 6===t?Y(a):-1===t?E(a):A(a,n)}const N=Math.floor,P=86400;function I(e,t){let n=null;if(Array.isArray(e)){const[t,a,r,i,s,o]=e;n=Date.UTC(t,null==a?0:a-1,null!=r?r:1,i||0,s||0,o||0)}else if(e instanceof Date&&(n=1*e,!t||!t.ignoreTimezone)){const t=new Date;t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n=1*t}if(null!=n&&isFinite(n)){const e=n/864e5;return e-(e<=-25509?-25568:-25569)}return e}function O(e,t){let n=0|e;const a=P*(e-n);let r=N(a);a-r>.9999&&(r+=1,r===P&&(r=0,n+=1));const i=r<0?P+r:r,[s,o,l]=T(e,0,t&&t.leap1900),d=N(i/60/60)%60,m=N(i/60)%60,u=N(i)%60;if(t&&t.nativeDate){const e=new Date(0);return e.setUTCFullYear(s,o-1,l),e.setUTCHours(d,m,u),e}return[s,o,l,d,m,u]}function J(e){return!!(e[0]&&e[0].percent||e[1]&&e[1].percent||e[2]&&e[2].percent||e[3]&&e[3].percent)}function L(e){return!!(e[0]&&e[0].date||e[1]&&e[1].date||e[2]&&e[2].date||e[3]&&e[3].date)}function U(e){const[t,n,a,r]=e;return!(t&&!t.generated||n&&!n.generated||a&&!a.generated||!r||!r.text||r.generated)}const $={text:15,datetime:10.8,date:10.8,time:10.8,percent:10.6,currency:10.4,grouped:10.2,scientific:6,number:4,fraction:2,general:0,error:0},G=[["DMY",1],["DM",2],["MY",3],["MDY",4],["MD",5],["hmsa",6],["hma",7],["hms",8],["hm",9]],H=/[¤$£¥֏؋৳฿៛₡₦₩₪₫€₭₮₱₲₴₸₹₺₼₽₾₿]/;const R={total:1,sign:0,period:0,int:1,frac:0};const B=(e,t)=>e.replace(/\./,t.decimal);function W(e,t,n,a){const r=0|n;if("string"==typeof n)e.push(n);else if(n===r)e.push(Math.abs(r));else{let t=0;const r=Math.abs(n);r&&(t=Math.floor(Math.log10(r)));let i=t<0?r*10**-t:r/10**t;10===i&&(i=1,t++);const s=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=Math.abs(e);if(!n)return R;const a=t&&e<0?1:0,r=Math.floor(n),i=Math.floor(Math.log10(n)+1);let s=0,o=0;if(r!==n){s=1;const e=String(c(i<0?n*10**-i:n/10**i,15));let t=e.length,a=!0,r=0;for(;r<=e.length;){if("."===e[r]){t--;break}"0"===e[r]&&a?t--:a=!1,r++}o=t-i,o<0&&(o=0,s=0)}return{total:a+Math.max(i,1)+s+o,digits:Math.max(i,0)+o,sign:a,period:s,int:Math.max(i,1),frac:o}}(r),o=()=>{const n=Math.abs(t);let r;r=1===i?i:c(i,5),e.push(B(r+"",a),a.exponent,t<0?a.negative:a.positive,n<10?"0":"",n)};if(t>=-4&&t<=-1){const n=r.toPrecision(10+t).replace(/0+$/,"");e.push(B(n,a))}else if(10===t){const t=r.toFixed(10).slice(0,12).replace(/\.$/,"");e.push(B(t,a))}else if(Math.abs(t)<=9){const n=11;if(s.total<=n){const t=c(r,9).toFixed(s.frac);e.push(B(t,a))}else 9===t?e.push(Math.floor(r)):t>=0&&t<9?e.push(c(r,9-t)):o()}else s.total>=12?o():Math.floor(r)===r?e.push(Math.floor(r)):e.push(B(c(r,9).toFixed(s.frac),a))}return e}const Z=86400,K={int:"integer",frac:"fraction",man:"mantissa",num:"numerator",den:"denominator"},q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Math.floor(Math.log10(e));return t>1?Math.floor(n/t)*t:n};function V(e,t,n,a){let r="",i="",s="",o="",l="",d=0,m=0|e,f=0,g=0,h=1,v=0,M=0,k=0,x=0,F=0,z=0;const w=a||u;if(!t.text&&isFinite(t.scale)&&1!==t.scale&&(e=function(e){if(0===e)return e;const t=Math.ceil(Math.log10(e<0?-e:e)),n=10**(16-Math.floor(t));return Math.round(e*n)/n}(e*t.scale)),t.exponential){let n=Math.abs(e);if(n){const e=10**-q(n,t.int_max),a=c(n*e,t.frac_max)/e;d=q(a,t.int_max)}n/=10**d,e=e<0?-n:n,r+=Math.abs(d)}if(t.integer){const n=Math.abs(c(e,t.fractions?1:t.frac_max));l+=n<1?"":Math.floor(n)}if(t.grouping){let e="",n=l.length;for(n>t.group_pri&&(n-=t.group_pri,e=w.group+l.slice(n,n+t.group_pri)+e);n>t.group_sec;)n-=t.group_sec,e=w.group+l.slice(n,n+t.group_sec)+e;l=n?l.slice(0,n)+e:e}t.dec_fractions&&(o=String(c(e,t.frac_max)).split(".")[1]||"");let D=!1;if(t.fractions){const n=Math.abs(t.integer?e%1:e);if(n)if(D=!0,isFinite(t.denominator))s+=t.denominator,i+=c(n*t.denominator),"0"===i&&(i="",s="",D=!1,l||(l="0"));else{const e=p(n,t.integer?t.num_max:1/0,t.den_max);i+=e[0],s+=e[1],t.integer&&"0"===i&&(l||(l="0"),i="",s="",D=!1)}}if(t.date_eval&&((e,t)=>t?e<-694324||e>=35830291:e<0||e>=2958466)(e,n.dateSpanLarge)){if(n.dateErrorThrows)throw new Error("Date out of bounds");if(n.dateErrorNumber){return W(e<0?[w.negative]:[],0,e,w).join("")}return n.overflow}if(t.date){m=0|e;const a=Z*(e-m);if(f=Math.floor(a),z=a-f,Math.abs(z)<1e-6?z=0:z>.9999&&(z=0,f+=1,f===Z&&(f=0,m+=1)),m||t.date_system){const a=T(e,t.date_system,n.leap1900);g=a[0],h=a[1],v=a[2]}if(f||z){const e=512&t.date||256&t.date||128&t.date||t.date&b||t.date&_||t.date&y;(512===e&&z>.9995||256===e&&z>.995||128===e&&z>.95||e===b&&z>=.5||e===_&&z>=.5||e===y&&z>=.5)&&(f++,z=0);const n=f<0?Z+f:f;F=Math.floor(n)%60,x=Math.floor(n/60)%60,k=Math.floor(n/60/60)%60}M=(6+m)%7}if(t.int_padding&&(l=1===t.int_padding.length?l||t.int_padding:t.int_padding.substring(0,t.int_padding.length-l.length)+l),t.num_padding&&(i=1===t.num_padding.length?i||t.num_padding:t.num_padding.substring(0,t.num_padding.length-i.length)+i),t.den_padding&&(s=1===t.den_padding.length?s||t.den_padding:s+t.den_padding.slice(s.length)),t.man_padding){const e=t.exp_plus?"+":"";r=1===t.man_padding.length?(d<0?"-":e)+(r||t.man_padding):(d<0?"-":e)+t.man_padding.slice(0,t.man_padding.length-r.length)+r}const S=[];let C=0;const A={int:0,frac:0,man:0,num:0,den:0};for(let d=0,u=t.tokens.length;d<u;d++){const u=t.tokens[d],c=u.num?u.num.length:0;if("string"===u.type)u.rule?"num"===u.rule?D?S.push(u.value):(t.num_min>0||t.den_min>0)&&S.push(u.value.replace(/./g,j["?"])):"num+int"===u.rule?D&&l?S.push(u.value):t.den_min>0&&(l||t.num_min)&&S.push(u.value.replace(/./g,j["?"])):"den"===u.rule&&(D?S.push(u.value):(t.den_min>0||t.den_min>0)&&S.push(u.value.replace(/./g,j["?"]))):S.push(u.value);else if("error"===u.type)S.push(n.invalid);else if("point"===u.type)S.push(t.date?u.value:w.decimal);else if("general"===u.type)W(S,0,e,w);else if("exp"===u.type)S.push(w.exponent);else if("minus"===u.type)u.volatile&&t.date||u.volatile&&(e>=0||"number"!=typeof e)||(u.volatile&&!t.fractions&&(t.integer||t.dec_fractions)?(e<0&&l&&"0"!==l||o)&&S.push(w.negative):S.push(w.negative));else if("plus"===u.type)S.push(w.positive);else if("text"===u.type)S.push(e);else if("div"===u.type)D?S.push("/"):t.num_min>0||t.den_min>0?S.push(j["?"]):S.push(j["#"]);else if("int"===u.type)if(1===t.int_pattern.length)S.push(l);else{const e=C?t.int_pattern.join("").length-A.int:1/0,n=C===t.int_pattern.length-1?0:t.int_pattern.join("").length-(A.int+u.num.length);S.push(l.substring(l.length-e,l.length-n)),C++,A.int+=u.num.length}else if("frac"===u.type){const e=A.frac;for(let t=0;t<c;t++)S.push(o[t+e]||j[u.num[t]]);A.frac+=c}else if(u.type in K)1===t[u.type+"_pattern"].length?("int"===u.type&&S.push(l),"frac"===u.type&&S.push(o),"man"===u.type&&S.push(r),"num"===u.type&&S.push(i),"den"===u.type&&S.push(s)):(S.push(K[u.type].slice(A[u.type],A[u.type]+c)),A[u.type]+=c);else if("year"===u.type)g<0&&S.push(w.negative),S.push(String(Math.abs(g)).padStart(4,"0"));else if("year-short"===u.type){const e=g%100;S.push(e<10?"0":"",e)}else if("month"===u.type)S.push(u.pad&&h<10?"0":"",h);else if("monthname-single"===u.type)6===t.date_system?S.push(w.mmmm6[h-1].charAt(0)):S.push(w.mmmm[h-1].charAt(0));else if("monthname-short"===u.type)6===t.date_system?S.push(w.mmm6[h-1]):S.push(w.mmm[h-1]);else if("monthname"===u.type)6===t.date_system?S.push(w.mmmm6[h-1]):S.push(w.mmmm[h-1]);else if("weekday-short"===u.type)S.push(w.ddd[M]);else if("weekday"===u.type)S.push(w.dddd[M]);else if("day"===u.type)S.push(u.pad&&v<10?"0":"",v);else if("hour"===u.type){const e=k%t.clock||(t.clock<24?t.clock:0);S.push(u.pad&&e<10?"0":"",e)}else if("min"===u.type)S.push(u.pad&&x<10?"0":"",x);else if("sec"===u.type)S.push(u.pad&&F<10?"0":"",F);else if("subsec"===u.type){S.push(w.decimal);const e=z.toFixed(t.sec_decimals);S.push(e.slice(2,2+u.decimals))}else if("am"===u.type){const e=k<12?0:1;u.short&&!a?S.push("AP"[e]):S.push(w.ampm[e])}else if("hour-elap"===u.type){e<0&&S.push(w.negative);const t=24*m+Math.floor(Math.abs(f)/3600);S.push(String(Math.abs(t)).padStart(u.pad,"0"))}else if("min-elap"===u.type){e<0&&S.push(w.negative);const t=1440*m+Math.floor(Math.abs(f)/60);S.push(String(Math.abs(t)).padStart(u.pad,"0"))}else if("sec-elap"===u.type){e<0&&S.push(w.negative);const t=m*Z+Math.abs(f);S.push(String(Math.abs(t)).padStart(u.pad,"0"))}else if("b-year"===u.type)S.push(g+543);else if("b-year-short"===u.type){const e=(g+543)%100;S.push(e<10?"0":"",e)}}return n.nbsp?S.join(""):S.join("").replace(/\u00a0/g," ")}function Q(e,t){for(let n=0;n<3;n++){const a=t[n];if(a){let t;if(a.condition){const n=a.condition[0],r=a.condition[1];"="===n?t=e===r:">"===n?t=e>r:"<"===n?t=e<r:">="===n?t=e>=r:"<="===n?t=e<=r:"<>"===n&&(t=e!==r)}else t=!0;if(t)return a}}}const X=w("@"),ee="black";const te={};function ne(e,t){if(e){const n=e[0];t[n]=t[n]||{},ne(e.slice(1),t[n])}else t.$=!0}["d-F-y","d-F-Y","d-M-y","d-M-Y","F-d-y","F-d-Y","F-j-y","F-j-Y","j-F-y","j-F-Y","j-M-y","j-M-Y","M-d-y","M-d-Y","M-j-y","M-j-Y","m-d-y","m-d-Y","m-j-y","m-j-Y","n-d-y","n-d-Y","n-j-y","n-j-Y","y-F-d","y-F-j","y-M-d","y-M-j","Y-F-d","Y-F-j","Y-M-d","Y-m-d","Y-M-j","Y-m-j","Y-n-d","Y-n-j","j-F","j-M","d-F","d-M","n-d","n-j","n-Y","m-d","m-j","m-Y","M-Y","M-y","F-y","F-Y","Y-M","Y-n","Y-m","Y-F","Y-M"].forEach((e=>{ne(e,te),ne(e+" x",te),ne(e+" l",te),ne(e+" l x",te),ne("l "+e,te),ne("l "+e+" x",te),ne(e+" D",te),ne(e+" D x",te),ne("D "+e,te),ne("D "+e+" x",te)}));const ae={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},re={january:1,february:2,march:3,april:4,june:6,july:7,august:8,september:9,october:10,november:11,december:12},ie={sunday:"l",monday:"l",tuesday:"l",wednesday:"l",thursday:"l",friday:"l",saturday:"l",sun:"D",mon:"D",tue:"D",wed:"D",thu:"D",fri:"D",sat:"D"},se=(new Date).getUTCFullYear();function oe(e){const t=/^([\s+%$(-]*)(((?:(?:\d[\d,]*)(?:\.\d*)?|(?:\.\d+)))([eE][+-]?\d+)?)([\s%$)]*)$/.exec(e);if(t){const[,e,n,a,r,i]=t;let s=1,o="",l=!1,d=!1,m=!1,u=!1,c=!1,p=!1,f=parseFloat(n.replace(/,/g,""));if(!isFinite(f))return null;for(let t=0;t<e.length;t++){const n=e[t];if("-"===n){if(l||d)return null;l=!0,s=-1}else if("$"===n){if(c)return null;c=!0}else if("("===n){if(d||l)return null;d=!0,s=-1}else if("%"===n){if(u)return null;u=!0}}for(let e=0;e<i.length;e++){const t=i[e];if("$"===t){if(c)return null;c=!0,p=!0}else if(")"===t){if(m||!d)return null;m=!0}else if("%"===t){if(u)return null;u=!0}}if(r){if(u||c)return null;o="0.00E+00"}else if(u){if(c)return null;o=a.includes(".")?"0.00%":"0%",f*=.01}else c?o=p?a.includes(".")?"#,##0.00$":"#,##0$":a.includes(".")?"$#,##0.00":"$#,##0":a.includes(",")&&(o=a.includes(".")?"#,##0.00":"#,##0");const g={v:f*s};return o&&(g.z=o),g}}const le=(e,t,n)=>{const a=n.path||"",r=Object.keys(t);for(let i=0;i<r.length;i++){let s;const o=r[i];if(t[o]){if("$"===o)e||(s=n);else if("-"===o){const r=/^(\s*([./-]|,\s)\s*|\s+)/.exec(e);if(r){const i="-"===r[1]||"/"===r[1]||"."===r[1]?r[1]:" ";if(!n.sep||n.sep===i){const l=r[0].replace(/\s+/g," ");s=le(e.slice(r[0].length),t[o],{...n,sep:i,path:a+l})}}}else if(" "===o){const r=/^[,.]?\s+/.exec(e);if(r){const i=r[0].replace(/\s+/g," ");s=le(e.slice(r[0].length),t[o],{...n,path:a+i})}}else if("j"===o||"d"===o){const r=/^(0?[1-9]|1\d|2\d|3[01])\b/.exec(e);r&&(s=le(e.slice(r[0].length),t[o],{...n,day:r[0],path:a+o}))}else if("n"===o||"m"===o){const r=/^(0?[1-9]|1[012])\b/.exec(e);r&&(s=le(e.slice(r[0].length),t[o],{...n,month:+r[0],_mon:r[0],path:a+o}))}else if("F"===o||"M"===o){const r=/^([a-z]{3,9})\b/i.exec(e),i=r&&("F"===o?re:ae)[r[0].toLowerCase()];i&&(s=le(e.slice(r[0].length),t[o],{...n,month:i,_mon:r[0],path:a+o}))}else if("l"===o||"D"===o){const r=/^([a-z]{3,9})\b/i.exec(e);(r&&ie[r[0].toLowerCase()])===o&&(s=le(e.slice(r[0].length),t[o],{...n,path:a+o}))}else if("y"===o){const r=/^\d\d\b/.exec(e);if(r){const i=+r[0]>=30?+r[0]+1900:+r[0]+2e3;s=le(e.slice(r[0].length),t[o],{...n,year:i,path:a+o})}}else if("Y"===o){const r=/^\d\d\d\d\b/.exec(e);r&&(s=le(e.slice(r[0].length),t[o],{...n,year:+r[0],path:a+o}))}else{if("x"!==o)throw new Error('Unknown date token "'.concat(o,'"'));{const r=me(e);r&&(s=le("",t[o],{...n,time:r.v,tf:r.z,path:a+o}))}}if(s)return s}}};function de(e,t){const n=le(e.trim(),te,{path:""});if(n){var a;if("."===n.sep&&3===n.path.length)return null;const e=+(null!==(a=n.year)&&void 0!==a?a:se);if(n.day||(n.day=1),!function(e,t,n){if(n<1)return!1;if(t<1||t>12)return!1;if(2===t){if(n>(e%4==0&&e%100!=0||e%400==0||1900===e?29:28))return!1}else if((4===t||6===t||9===t||11===t)&&n>30||(1===t||3===t||5===t||7===t||8===t||10===t||12===t)&&n>31)return!1;return!0}(e,n.month,n.day))return null;let r=-1/0;if(e<1900)return null;e<=1900&&n.month<=2?r=25568:e<1e4&&(r=25569);const i=Date.UTC(e,n.month-1,n.day)/864e5+r+(n.time||0);if(i>=0&&i<=2958465){const e="0"===n._mon[0]||"0"===n.day[0]||2===n._mon.length&&2===n.day.length,a=n.path.replace(/[jdlDnmMFyYx-]/g,(t=>"j"===t||"d"===t?e?"dd":"d":"D"===t?"ddd":"l"===t?"dddd":"n"===t||"m"===t?e?"mm":"m":"M"===t?"mmm":"F"===t?"mmmm":"y"===t?"yy":"x"===t?n.tf||"":"Y"===t?"yyyy":t));return t&&t.nativeDate?{v:O(i,t),z:a}:{v:i,z:a}}}return null}function me(e){const t=/^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?:\s*([AP])M?)?\s*$/i.exec(e);if(t){const[,e,n,a,r,i]=t;if(r&&!a)return null;if(!i&&!n&&!a)return null;let s=1*(e||0);if(i){if(s>=13)return null;"p"!==i[0]&&"P"!==i[0]||(s+=12)}return{v:(60*s*60+60*(1*(n||0))+1*(a||0)+1*(r||0))/86400,z:(2===e.length?"hh":"h")+":mm"+(a?":ss":"")+(i?" AM/PM":"")}}return null}function ue(e){return/^\s*true\s*$/i.test(e)?{v:!0}:/^\s*false\s*$/i.test(e)?{v:!1}:null}const ce={};function pe(e,t){const{pattern:n,partitions:a,locale:r}=e,i=e=>{const n=Object.assign({},h(),t,e);return r&&(n.locale=r),n},s=(e,t)=>{const n=i(t);return function(e,t,n){const a=l(n.locale),r=t[3]?t[3]:X;if("boolean"==typeof e&&(e=e?"TRUE":"FALSE"),null==e)return"";if("number"!=typeof e)return V(e,r,n,a);if(!isFinite(e)){const t=a||u;return isNaN(e)?t.nan:(e<0?t.negative:"")+t.infinity}const i=Q(e,t);return i?V(e,i,n,a):n.overflow}(I(e,n),a,n)};s.color=(e,t)=>function(e,t){if("number"!=typeof e||!isFinite(e))return(t[3]?t[3].color:X.color)||ee;const n=Q(e,t);return n&&n.color||ee}(I(e,i(t)),a);const o=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const[a,r]=e,i=a.frac_max,s={type:"general",isDate:L(e),isText:U(e),isPercent:J(e),maxDecimals:a.general?9:i,scale:null!==(t=a.scale)&&void 0!==t?t:1,color:0,parentheses:0,grouped:a.grouping?1:0,_partitions:e},o=!s.isDate&&!s.isText&&!a.error&&a.tokens.some((e=>"string"===e.type&&(n?e.value===n:H.test(e.value))));let l="G",d=i>=0?Math.min(15,i):"",m="",u="";if(r&&r.color&&(u="-",s.color=1),a.parens&&(m="()",s.parentheses=1),o)l="C",s.type="currency";else if(a.error)s.type="error",s.maxDecimals=0;else if(s.isDate){let e=0,t=0,n="";a.tokens.forEach((a=>{const r=a.type;/^(b-)?year/.test(r)?(n+="Y",t++):r.startsWith("month")?(n+="M",t++):/^(week)?day/.test(r)?(n+="D",t++):"hour"!==r&&"min"!==r&&"sec"!==r&&"am"!==r||(n+=r[0],e++)})),s.type="date",t&&e?s.type="datetime":!t&&e&&(s.type="time");const r=G.find((e=>n.startsWith(e[0])));l=r?"D":"G",d=r?r[1]:""}else s.isText?(l="G",s.type="text",d="",s.maxDecimals=0):a.general?(l="G",s.type="general",d=""):a.fractions?(l="G",s.type="fraction",d=""):a.exponential?(l="S",s.type="scientific"):s.isPercent?(l="P",s.type="percent"):a.grouping?(l=",",s.type="grouped"):(a.int_max||i)&&(l="F",s.type="number");return s.code=l+d+u+m,s.level=$[s.type],Object.freeze(s)}(a,(t||{}).currency)||new SyntaxError;return s.info=o,s.dateInfo=function(e){const[t]=e;return{year:!!(2&t.date),month:!!(4&t.date),day:!!(8&t.date),hours:!!(t.date&y),minutes:!!(t.date&_),seconds:!!(t.date&b),clockType:12===t.clock?12:24}}(a),s.isPercent=()=>!!o.isPercent,s.isDate=()=>!!o.isDate,s.isText=()=>!!o.isText,s.pattern=n,e.error&&(s.error=e.error),s.options=i,s.locale=r||t&&t.locale||"",Object.freeze(s)}function fe(e,t){e||(e="General");let n=null;if(ce[e])n=ce[e];else{n=Object.assign({},h(),t).throws?S(e):function(e){try{return S(e)}catch(t){const n={tokens:[{type:"error"}],error:t.message};return{pattern:e,partitions:[n,n,n,n],error:t.message,locale:null}}}(e),n.error||(ce[e]=n)}return pe(n,t)}fe.isDate=e=>fe(e,{throws:!1}).isDate(),fe.isPercent=e=>fe(e,{throws:!1}).isPercent(),fe.isText=e=>fe(e,{throws:!1}).isText(),fe.getInfo=(e,t)=>fe(e,{...t,throws:!1}).info,fe.getDateInfo=(e,t)=>fe(e,{...t,throws:!1}).dateInfo,fe.dateToSerial=I,fe.dateFromSerial=O,fe.options=h,fe.dec2frac=p,fe.round=c,fe.codeToLocale=n,fe.parseLocale=s,fe.getLocale=l,fe.addLocale=(e,t)=>{const n=s(t);return delete ce[n.lang],delete ce[n.language],m(e,n)},fe.format=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=n&&"object"==typeof n?n:{locale:n,throws:!a};return fe(e,r)(I(t,r),r)},fe.is_date=fe.isDate,fe.parseNumber=oe,fe.parseDate=de,fe.parseTime=me,fe.parseBool=ue,fe.parseValue=function(e,t){var n,a,r;return null!==(n=null!==(a=null!==(r=oe(e))&&void 0!==r?r:de(e,t))&&void 0!==a?a:me(e))&&void 0!==n?n:ue(e)};var ge=fe;return t=t.default}()})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.numfmt=t():e.numfmt=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,n){for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return he}});var n={1078:"af",1052:"sq",1118:"am",5121:"ar_DZ",15361:"ar_BH",3073:"ar_EG",2049:"ar_IQ",11265:"ar_JO",13313:"ar_KW",12289:"ar_LB",4097:"ar_LY",6145:"ar_MA",8193:"ar_OM",16385:"ar_QA",1025:"ar_SA",10241:"ar_SY",7169:"ar_TN",14337:"ar_AE",9217:"ar_YE",1067:"hy",1101:"as",2092:"az_AZ",1068:"az_AZ",1069:"eu",1059:"be",2117:"bn",1093:"bn_IN",5146:"bs",1026:"bg",1109:"my",1027:"ca",2052:"zh_CN",3076:"zh_HK",5124:"zh_MO",4100:"zh_SG",1028:"zh_TW",1050:"hr",1029:"cs",1030:"da",1125:"dv",2067:"nl_BE",1043:"nl_NL",1126:"bin",3081:"en_AU",10249:"en_BZ",4105:"en_CA",9225:"en_CB",2057:"en_GB",16393:"en_IN",6153:"en_IE",8201:"en_JM",5129:"en_NZ",13321:"en_PH",7177:"en_ZA",11273:"en_TT",1033:"en_US",12297:"en_ZW",1061:"et",1071:"mk",1080:"fo",1065:"fa",1124:"fil",1035:"fi",2060:"fr_BE",11276:"fr_CM",3084:"fr_CA",9228:"fr_CG",12300:"fr_CI",1036:"fr_FR",5132:"fr_LU",13324:"fr_ML",6156:"fr_MC",14348:"fr_MA",10252:"fr_SN",4108:"fr_CH",7180:"fr",1122:"fy_NL",2108:"gd_IE",1084:"gd",1110:"gl",1079:"ka",3079:"de_AT",1031:"de_DE",5127:"de_LI",4103:"de_LU",2055:"de_CH",1032:"el",1140:"gn",1095:"gu",1279:"en",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig_NG",1057:"id",1040:"it_IT",2064:"it_CH",1041:"ja",1099:"kn",1120:"ks",1087:"kk",1107:"km",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1142:"la",1062:"lv",1063:"lt",2110:"ms_BN",1086:"ms_MY",1100:"ml",1082:"mt",1112:"mni",1153:"mi",1102:"mr",1104:"mn",2128:"mn",1121:"ne",1044:"no_NO",2068:"no_NO",1096:"or",1045:"pl",1046:"pt_BR",2070:"pt_PT",1094:"pa",1047:"rm",2072:"ro_MO",1048:"ro_RO",1049:"ru",2073:"ru_MO",1083:"se",1103:"sa",3098:"sr_SP",2074:"sr_SP",1072:"st",1074:"tn",1113:"sd",1115:"si",1051:"sk",1060:"sl",1143:"so",1070:"sb",11274:"es_AR",16394:"es_BO",13322:"es_CL",9226:"es_CO",5130:"es_CR",7178:"es_DO",12298:"es_EC",17418:"es_SV",4106:"es_GT",18442:"es_HN",2058:"es_MX",19466:"es_NI",6154:"es_PA",15370:"es_PY",10250:"es_PE",20490:"es_PR",1034:"es_ES",14346:"es_UY",8202:"es_VE",1089:"sw",2077:"sv_FI",1053:"sv_SE",1114:"syc",1064:"tg",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1073:"ts",1055:"tr",1090:"tk",1058:"uk",1056:"ur",2115:"uz_UZ",1091:"uz_UZ",1075:"ve",1066:"vi",1106:"cy",1076:"xh",1085:"yi",1077:"zu"};const a=/^([a-z\d]+)(?:[_-]([a-z\d]+))?(?:\.([a-z\d]+))?(?:@([a-z\d]+))?$/i,r={},i={group:" ",decimal:".",positive:"+",negative:"-",percent:"%",exponent:"E",nan:"NaN",infinity:"∞",ampm:["AM","PM"],mmmm6:["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"],mmm6:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],mmmm:["January","February","March","April","May","June","July","August","September","October","November","December"],mmm:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]};function s(e){const t=a.exec(e);if(!t)throw new SyntaxError("Malformed locale: ".concat(e));return{lang:t[1]+(t[2]?"_"+t[2]:""),language:t[1],territory:t[2]||"",codeset:t[3]||"",modifier:t[4]||""}}function o(e){if("number"==typeof e)return n[65535&e]||null;const t=parseInt(e,16);return isFinite(t)&&n[65535&t]?n[65535&t]||null:a.test(e)?e:null}function l(e){const t=o(e);let n=null;if(t){const e=s(t);n=r[e.lang]||r[e.language]||null}return n}function d(e){return Object.assign({},i,e)}function m(e,t){const n="object"==typeof t?t:s(t);return r[n.lang]=d(e),n.language===n.lang||r[n.language]||(r[n.language]=d(e)),r[n.lang]}const u=d({group:","});function c(e,t){if("number"!=typeof e)return e;if(e<0)return-c(-e,t);if(t){const n=10**(t||0)||1;return c(e*n,0)/n}return Math.round(e)}u.isDefault=!0,m({group:",",ampm:["上午","下午"],mmmm:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],mmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["周日","周一","周二","周三","周四","周五","周六"]},"zh_CN"),m({group:",",nan:"非數值",ampm:["上午","下午"],mmmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],mmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],ddd:["週日","週一","週二","週三","週四","週五","週六"]},"zh_TW"),m({group:",",ampm:["午前","午後"],mmmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],mmm:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dddd:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],ddd:["日","月","火","水","木","金","土"]},"ja"),m({group:",",ampm:["오전","오후"],mmmm:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],mmm:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dddd:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],ddd:["일","월","화","수","목","금","토"]},"ko"),m({group:",",ampm:["ก่อนเที่ยง","หลังเที่ยง"],mmmm:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],mmm:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dddd:["วันอาทิตย์","วันจันทร์","วันอังคาร","วันพุธ","วันพฤหัสบดี","วันศุกร์","วันเสาร์"],ddd:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},"th"),m({decimal:",",ampm:["dop.","odp."],mmmm:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"],mmm:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],dddd:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],ddd:["ne","po","út","st","čt","pá","so"]},"cs"),m({group:".",decimal:",",mmmm:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],mmm:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],dddd:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],ddd:["søn.","man.","tir.","ons.","tor.","fre.","lør."]},"da"),m({group:".",decimal:",",ampm:["a.m.","p.m."],mmmm:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],mmm:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],dddd:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],ddd:["zo","ma","di","wo","do","vr","za"]},"nl"),m({group:","},"en"),m({decimal:",",nan:"epäluku",ampm:["ap.","ip."],mmmm:["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kesäkuuta","heinäkuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"],mmm:["tammik.","helmik.","maalisk.","huhtik.","toukok.","kesäk.","heinäk.","elok.","syysk.","lokak.","marrask.","jouluk."],dddd:["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"],ddd:["su","ma","ti","ke","to","pe","la"]},"fi"),m({group:" ",decimal:",",mmmm:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],mmm:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dddd:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],ddd:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."]},"fr"),m({group:".",decimal:",",mmmm:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],mmm:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],dddd:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],ddd:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]},"de"),m({group:".",decimal:",",ampm:["π.μ.","μ.μ."],mmmm:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"],mmm:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dddd:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],ddd:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"]},"el"),m({decimal:",",ampm:["de.","du."],mmmm:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],mmm:["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec."],dddd:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],ddd:["V","H","K","Sze","Cs","P","Szo"]},"hu"),m({group:".",decimal:",",ampm:["f.h.","e.h."],mmmm:["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember"],mmm:["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des."],dddd:["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],ddd:["sun.","mán.","þri.","mið.","fim.","fös.","lau."]},"is"),m({group:".",decimal:",",mmmm:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],mmm:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],dddd:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],ddd:["Min","Sen","Sel","Rab","Kam","Jum","Sab"]},"id"),m({group:".",decimal:",",mmmm:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],mmm:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],dddd:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],ddd:["dom","lun","mar","mer","gio","ven","sab"]},"it"),m({decimal:",",ampm:["a.m.","p.m."],mmmm:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],mmm:["jan.","feb.","mar.","apr.","mai","jun.","jul.","aug.","sep.","okt.","nov.","des."],dddd:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],ddd:["søn.","man.","tir.","ons.","tor.","fre.","lør."]},"nb"),m({decimal:",",mmmm:["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia"],mmm:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],dddd:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],ddd:["niedz.","pon.","wt.","śr.","czw.","pt.","sob."]},"pl"),m({group:".",decimal:",",mmmm:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],mmm:["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],dddd:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],ddd:["dom.","seg.","ter.","qua.","qui.","sex.","sáb."]},"pt"),m({decimal:",",nan:"не число",mmmm:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],mmm:["янв.","февр.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],dddd:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],ddd:["вс","пн","вт","ср","чт","пт","сб"]},"ru"),m({decimal:",",mmmm:["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra"],mmm:["jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec"],dddd:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],ddd:["ne","po","ut","st","št","pi","so"]},"sk"),m({group:".",decimal:",",ampm:["a. m.","p. m."],mmmm:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],mmm:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sept.","oct.","nov.","dic."],dddd:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],ddd:["dom.","lun.","mar.","mié.","jue.","vie.","sáb."]},"es"),m({decimal:",",ampm:["fm","em"],mmmm:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],mmm:["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],dddd:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],ddd:["sön","mån","tis","ons","tors","fre","lör"]},"sv"),m({group:".",decimal:",",ampm:["ÖÖ","ÖS"],mmmm:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],mmm:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dddd:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],ddd:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"]},"tr");function p(e,t,n){const a=e<0?-1:1,r=10**(t||2),i=10**(n||2);let s,o,l=Math.abs(e),d=0,m=0,u=0,c=1;if((e=l)%1==0)o=[e*a,1];else if(e<1e-19)o=[a,1e19];else if(e>1e19)o=[1e19*a,1];else{do{if(l=1/(l-Math.floor(l)),s=c,c=c*Math.floor(l)+d,d=s,m=u,u=Math.floor(e*c+.5),u>=r||c>=i)return[a*m,d]}while(Math.abs(e-u/c)>=1e-10&&l!==Math.floor(l));o=[a*u,c]}return o}const f={overflow:"######",dateErrorThrows:!1,dateErrorNumber:!0,dateSpanLarge:!0,leap1900:!0,nbsp:!0,throws:!0,invalid:"######",locale:"",ignoreTimezone:!1},g=Object.assign({},f);function h(e){if(null===e&&(e=f),e)for(const t in e)if(t in f){const n=e[t];g[t]=null==n?f[t]:n}return{...g}}const y=16,_=32,b=64,j={"#":"",0:"0","?":" "},v={"@":"text","-":"minus","+":"plus"},M=["#000","#FFF","#F00","#0F0","#00F","#FF0","#F0F","#0FF","#000","#FFF","#F00","#0F0","#00F","#FF0","#F0F","#0FF","#800","#080","#008","#880","#808","#088","#CCC","#888","#99F","#936","#FFC","#CFF","#606","#F88","#06C","#CCF","#008","#F0F","#FF0","#0FF","#808","#800","#088","#00F","#0CF","#CFF","#CFC","#FF9","#9CF","#F9C","#C9F","#FC9","#36F","#3CC","#9C0","#FC0"],k=["¤","$","£","¥","֏","؋","৳","฿","៛","₡","₦","₩","₪","₫","€","₭","₮","₱","₲","₴","₸","₹","₺","₼","₽","₾","₿"],x=new RegExp("["+k.join("")+"]");function F(e,t,n){return t[n+"_max"]=e.length,t[n+"_min"]=e.replace(/#/g,"").length,t}const z={};function w(e){if(!(e in z)){const t=[],n=e.replace(/^[#,]+/,"").replace(/[1-9]\d*/g,(e=>"?".repeat(e.length)));for(let e=0;e<n.length;e++){const a=n.charAt(e);t[e]=a in j?j[a]:a}z[e]=t.join("")}return z[e]}function D(e,t){"string"==typeof e&&(e={type:"string",value:e=e.replace(/ /g,j["?"])}),t.push(e)}function S(e){const t=[],n={scale:1,percent:!1,text:!1,date:0,date_eval:!1,date_system:1,sec_decimals:0,general:!1,clock:24,int_pattern:[],frac_pattern:[],man_pattern:[],den_pattern:[],num_pattern:[],tokens:t};let a=e+"",r="int",i=!1,s=null;const l=[];let d,m,u=!1;for(;a&&!i;){if(d=/^General/i.exec(a))n.general=!0,D({type:"general"},t);else if("int"===r&&(d=/^[#?0]+(?:,[#?0]+)*/.exec(a))||"den"===r&&(d=/^[#?\d]+/.exec(a))||(d=/^[#?0]+/.exec(a)))n[r+"_pattern"].push(d[0]),s={type:r,num:d[0]},D(s,t);else if((d=/^\//.exec(a))&&n[r+"_pattern"].length){if(!s)throw new SyntaxError("Missing a numerator in pattern ".concat(e));n.fractions=!0,n.num_pattern.push(n[r+"_pattern"].pop()),s.type="num",r="den",D({type:"div"},t)}else if(d=/^,+/.exec(a)){const e=a.charAt(1)in j;m.slice(-1)in j&&(d[0].length>1||!e)?n.scale=.001**d[0].length:n.dec_fractions||D(d[0],t)}else{if(d=/^;/.exec(a)){i=!0;break}if(d=/^[@+-]/.exec(a))"@"===d[0]&&(n.text=!0),D({type:v[d[0]]},t);else if(d=/^(?:\[(h+|m+|s+)\])/i.exec(a)){const e=d[1].toLowerCase(),a=e[0],r={type:"",size:0,date:1,raw:d[0],pad:e.length};"h"===a?(r.size=y,r.type="hour-elap"):"m"===a?(r.size=_,r.type="min-elap"):(r.size=b,r.type="sec-elap"),n.date=n.date|r.size,l.push(r),D(r,t)}else if(d=/^(?:B2)/i.exec(a))u||(n.date_system=6);else if(d=/^(?:B1)/i.exec(a))u||(n.date_system=1);else if(d=/^(?:([hHmMsSyYbBdDegG])\1*)/.exec(a)){const e={type:"",size:0,date:1,raw:d[0]},a=d[0].toLowerCase(),r=a[0];if("y"===a||"yy"===a)e.size=2,e.type="year-short";else if("y"===r||"e"===r)e.size=2,e.type="year";else if("b"===a||"bb"===a)e.size=2,e.type="b-year-short";else if("b"===r)e.size=2,e.type="b-year";else if("d"===a||"dd"===a)e.size=8,e.type="day",e.pad=/dd/.test(a);else if("ddd"===a)e.size=8,e.type="weekday-short";else if("d"===r)e.size=8,e.type="weekday";else if("h"===r)e.size=y,e.type="hour",e.pad=/hh/i.test(a);else if("m"===r){3===a.length?(e.size=4,e.type="monthname-short"):5===a.length?(e.size=4,e.type="monthname-single"):a.length>=4&&(e.size=4,e.type="monthname");const t=l[l.length-1];!e.type&&t&&!t.used&&80&t.size&&(t.used=!0,e.size=_,e.type="min",e.pad=/mm/.test(a)),e.type||(e.size=4,e.type="month",e.pad=/mm/.test(a),e.indeterminate=!0)}else if("s"===r){e.size=b,e.type="sec",e.pad=/ss/.test(a);const t=l[l.length-1];t&&t.size&_?e.used=!0:t&&t.indeterminate&&(delete t.indeterminate,t.size=_,t.type="min",e.used=!0)}n.date=n.date|e.size,n.date_eval=!0,l.push(e),D(e,t)}else if(d=/^(?:AM\/PM|am\/pm|A\/P)/.exec(a))n.clock=12,n.date=n.date|y,n.date_eval=!0,D({type:"am",short:"A/P"===d[0]},t);else if(n.date&&(d=/^\.0{1,3}/i.exec(a))){const e=d[0].length-1,a=[b,128,256,512][e];n.date=n.date|a,n.date_eval=!0,n.sec_decimals=Math.max(n.sec_decimals,e),D({type:"subsec",size:a,decimals:e,date:1,raw:d[0]},t)}else if((d=/^\\(.)/.exec(a))||(d=/^"([^"]*?)"/.exec(a)))D(d[1],t);else if(d=/^\[(<[=>]?|>=?|=)\s*(-?[.\d]+)\]/.exec(a))n.condition=[d[1],parseFloat(d[2],10)];else if(d=/^\[\$([^\]]+)\]/.exec(a)){const e=d[1].split("-"),a=e.length<2?"":e[e.length-1],r=e[0];r&&D(r,t);const i=o(a);i&&(n.locale=i);const s=parseInt(a,16);if(isFinite(s)&&16711680&s){6===(s>>16&255)&&(n.date_system=6)}u=!0}else if(d=/^\[(black|blue|cyan|green|magenta|red|white|yellow|color\s*(\d+))\]/i.exec(a))n.color=d[2]?M[parseInt(d[2],10)]||"#000":d[1].toLowerCase();else if(d=/^\[(DBNum1|ENG|HIJ|JPN|TWN)\]/i.exec(a));else if(d=/^%/.exec(a))n.scale=100,n.percent=!0,D("%",t);else if(d=/^_(\\.|.)/.exec(a))D(" ",t);else if(d=/^\./.exec(a))D({type:"point",value:d[0]},t),n.dec_fractions=!0,r="frac";else if(d=/^[Ee]([+-]?|(?=[0#?]))/.exec(a))n.exponential=!0,n.exp_plus="+"===d[1],r="man",D({type:"exp",plus:"+"===d[1]},t);else if(d=/^\*(\\.|.)/.exec(a));else{if(d=/^[BENn[]/.exec(a))throw new SyntaxError("Unexpected char ".concat(a.charAt(0)," in pattern ").concat(e));"("===a[0]&&(n.parens=!0),d=[a[0]],D(d[0],t)}}m=d[0],a=a.slice(d?d[0].length:1)}if(n.pattern=e.slice(0,e.length-a.length),/^((?:\[[^\]]+\])+)(;|$)/.test(n.pattern)&&!/^\[(?:h+|m+|s+)\]/.test(n.pattern)&&D({type:"text"},t),n.fractions&&n.dec_fractions||n.fractions&&n.exponential)throw new SyntaxError("Invalid pattern: ".concat(n.pattern));const c=n.int_pattern.join("");if(n.grouping=c.indexOf(",")>=0,n.grouping){const e=c.split(","),t=e.length;2===t?(n.group_pri=e[1].length,n.group_sec=n.group_pri):t>2&&(n.group_pri=e[t-1].length,n.group_sec=e[t-2].length)}else n.group_pri=0,n.group_sec=0;F(c.replace(/[,]/g,""),n,"int"),F(n.frac_pattern.join(""),n,"frac"),F(n.man_pattern.join(""),n,"man");let p=n.num_pattern.join(""),f=n.den_pattern.join("");const g=/\?/.test(f)||/\?/.test(p);return f=f.replace(/\d/g,g?"?":"#"),g&&(f=f.replace(/#$/g,"?")),F(p,n,"num"),F(f,n,"den"),g&&(p=p.replace(/#$/g,"?")),n.int_padding=w(n.int_pattern.join("")),n.man_padding=w(n.man_pattern.join("")),n.num_padding=w(p),n.den_padding=w(f),n.den_pattern.length&&(n.denominator=parseInt(n.den_pattern.join("").replace(/\D/g,""),10)),n.integer=!!n.int_pattern.join("").length,n.fractions&&t.forEach(((e,n)=>{const a=t[n+1];"string"===e.type&&a&&("num"===a.type?e.rule="num+int":"div"===a.type?e.rule="num":"den"===a.type&&(e.rule="den"))})),n}const C=e=>{const t=e.condition;t&&t[1]<0&&("<"===t[0]||"<="===t[0]||"="===t[0])||e.tokens.unshift({type:"minus",volatile:!0})};function E(e){const t=[];let n,a=!1,r=null,i=e,s=0,l=!1,d=0,m=0;do{if(l=S(i),(l.date||l.general)&&(l.int_pattern.length||l.frac_pattern.length||1!==l.scale||l.text))throw new Error("Illegal format");if(l.condition&&(m++,a=!0),l.text){if(r)throw new Error("Unexpected partition");r=l}l.locale&&(n=o(l.locale)),t.push(l),s=";"===i.charAt(l.pattern.length)?1:0,i=i.slice(l.pattern.length+s),d++}while(s&&d<4&&m<3);if(s)throw new Error("Unexpected partition");if(m>2)throw new Error("Unexpected condition");const u=t[3];if(u&&(u.int_pattern.length||u.frac_pattern.length||u.date))throw new Error("Unexpected partition");if(a){const e=t.length;if(1===e&&(t[1]=S("General"),t[1].generated=!0),e<3){const e=t[0],n=t[1];if(C(e),n.condition)C(n);else{const t=e.condition;("="===t[0]||t[1]>=0&&(">"===t[0]||">="===t[0]))&&n.tokens.unshift({type:"minus",volatile:!0})}}else t.forEach(C)}else{if(t.length<4&&r)for(let e=0,n=t.length;e<n;e++)t[e]===r&&t.splice(e,1);if(t.length<1&&r&&(t[0]=S("General"),t[0].generated=!0),t.length<2){const e=S(t[0].pattern);e.tokens.unshift({type:"minus",volatile:!0}),e.generated=!0,t.push(e)}if(t.length<3){const e=S(t[0].pattern);e.generated=!0,t.push(e)}if(t.length<4)if(r)t.push(r);else{const e=S("@");e.generated=!0,t.push(e)}t[0].condition=[">",0],t[1].condition=["<",0],t[2].condition=null}return{pattern:e,partitions:t,locale:n}}const A=Math.floor;function Y(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t&&e>=0){if(0===e)return[1900,1,0];if(60===e)return[1900,2,29];if(e<60)return[1900,e<32?1:2,(e-1)%31+1]}let n=e+68569+2415019;const a=A(4*n/146097);n-=A((146097*a+3)/4);const r=A(4e3*(n+1)/1461001);n=n-A(1461*r/4)+31;const i=A(80*n/2447),s=n-A(2447*i/80);n=A(i/11);const o=i+2-12*n,l=100*(a-49)+r+n;return[0|l,0|o,0|s]}function T(e){return Y(e+1462)}function N(e){if(60===e)throw new Error("#VALUE!");if(e<=1)return[1317,8,29];if(e<60)return[1317,e<32?9:10,1+(e-2)%30];const t=10631/30,n=.1335;let a=e+466935;const r=A(a/10631);a-=10631*r;const i=A((a-n)/t);a-=A(i*t+n);const s=A((a+28.5001)/29.5);return 13===s?[30*r+i,12,30]:[30*r+i,s,a-A(29.5001*s-29)]}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const a=A(e);return 6===t?N(a):-1===t?T(a):Y(a,n)}const I=Math.floor,O=86400;function J(e,t){let n=null;if(Array.isArray(e)){const[t,a,r,i,s,o]=e;n=Date.UTC(t,null==a?0:a-1,null!=r?r:1,i||0,s||0,o||0)}else if(e instanceof Date&&(n=1*e,!t||!t.ignoreTimezone)){const t=new Date;t.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n=1*t}if(null!=n&&isFinite(n)){const e=n/864e5;return e-(e<=-25509?-25568:-25569)}return e}function L(e,t){let n=0|e;const a=O*(e-n);let r=I(a);a-r>.9999&&(r+=1,r===O&&(r=0,n+=1));const i=r<0?O+r:r,[s,o,l]=P(e,0,t&&t.leap1900),d=I(i/60/60)%60,m=I(i/60)%60,u=I(i)%60;if(t&&t.nativeDate){const e=new Date(0);return e.setUTCFullYear(s,o-1,l),e.setUTCHours(d,m,u),e}return[s,o,l,d,m,u]}function U(e){return!!(e[0]&&e[0].percent||e[1]&&e[1].percent||e[2]&&e[2].percent||e[3]&&e[3].percent)}function R(e){return!!(e[0]&&e[0].date||e[1]&&e[1].date||e[2]&&e[2].date||e[3]&&e[3].date)}function G(e){const[t,n,a,r]=e;return!(t&&!t.generated||n&&!n.generated||a&&!a.generated||!r||!r.text||r.generated)}const H={text:15,datetime:10.8,date:10.8,time:10.8,percent:10.6,currency:10.4,grouped:10.2,scientific:6,number:4,fraction:2,general:0,error:0},B=[["DMY",1],["DM",2],["MY",3],["MDY",4],["MD",5],["hmsa",6],["hma",7],["hms",8],["hm",9]];const $={total:1,sign:0,period:0,int:1,frac:0};const W=(e,t)=>e.replace(/\./,t.decimal);function Z(e,t,n,a){const r=0|n;if("string"==typeof n)e.push(n);else if(n===r)e.push(Math.abs(r));else{let t=0;const r=Math.abs(n);r&&(t=Math.floor(Math.log10(r)));let i=t<0?r*10**-t:r/10**t;10===i&&(i=1,t++);const s=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=Math.abs(e);if(!n)return $;const a=t&&e<0?1:0,r=Math.floor(n),i=Math.floor(Math.log10(n)+1);let s=0,o=0;if(r!==n){s=1;const e=String(c(i<0?n*10**-i:n/10**i,15));let t=e.length,a=!0,r=0;for(;r<=e.length;){if("."===e[r]){t--;break}"0"===e[r]&&a?t--:a=!1,r++}o=t-i,o<0&&(o=0,s=0)}return{total:a+Math.max(i,1)+s+o,digits:Math.max(i,0)+o,sign:a,period:s,int:Math.max(i,1),frac:o}}(r),o=()=>{const n=Math.abs(t);let r;r=1===i?i:c(i,5),e.push(W(r+"",a),a.exponent,t<0?a.negative:a.positive,n<10?"0":"",n)};if(t>=-4&&t<=-1){const n=r.toPrecision(10+t).replace(/0+$/,"");e.push(W(n,a))}else if(10===t){const t=r.toFixed(10).slice(0,12).replace(/\.$/,"");e.push(W(t,a))}else if(Math.abs(t)<=9){const n=11;if(s.total<=n){const t=c(r,9).toFixed(s.frac);e.push(W(t,a))}else 9===t?e.push(Math.floor(r)):t>=0&&t<9?e.push(c(r,9-t)):o()}else s.total>=12?o():Math.floor(r)===r?e.push(Math.floor(r)):e.push(W(c(r,9).toFixed(s.frac),a))}return e}const K=86400,q={int:"integer",frac:"fraction",man:"mantissa",num:"numerator",den:"denominator"},V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Math.floor(Math.log10(e));return t>1?Math.floor(n/t)*t:n};function Q(e,t,n,a){let r="",i="",s="",o="",l="",d=0,m=0|e,f=0,g=0,h=1,v=0,M=0,k=0,x=0,F=0,z=0;const w=a||u;if(!t.text&&isFinite(t.scale)&&1!==t.scale&&(e=function(e){if(0===e)return e;const t=Math.ceil(Math.log10(e<0?-e:e)),n=10**(16-Math.floor(t));return Math.round(e*n)/n}(e*t.scale)),t.exponential){let n=Math.abs(e);if(n){const e=10**-V(n,t.int_max),a=c(n*e,t.frac_max)/e;d=V(a,t.int_max)}n/=10**d,e=e<0?-n:n,r+=Math.abs(d)}if(t.integer){const n=Math.abs(c(e,t.fractions?1:t.frac_max));l+=n<1?"":Math.floor(n)}if(t.grouping){let e="",n=l.length;for(n>t.group_pri&&(n-=t.group_pri,e=w.group+l.slice(n,n+t.group_pri)+e);n>t.group_sec;)n-=t.group_sec,e=w.group+l.slice(n,n+t.group_sec)+e;l=n?l.slice(0,n)+e:e}t.dec_fractions&&(o=String(c(e,t.frac_max)).split(".")[1]||"");let D=!1;if(t.fractions){const n=Math.abs(t.integer?e%1:e);if(n)if(D=!0,isFinite(t.denominator))s+=t.denominator,i+=c(n*t.denominator),"0"===i&&(i="",s="",D=!1,l||(l="0"));else{const e=p(n,t.integer?t.num_max:1/0,t.den_max);i+=e[0],s+=e[1],t.integer&&"0"===i&&(l||(l="0"),i="",s="",D=!1)}}if(t.date_eval&&((e,t)=>t?e<-694324||e>=35830291:e<0||e>=2958466)(e,n.dateSpanLarge)){if(n.dateErrorThrows)throw new Error("Date out of bounds");if(n.dateErrorNumber){return Z(e<0?[w.negative]:[],0,e,w).join("")}return n.overflow}if(t.date){m=0|e;const a=K*(e-m);if(f=Math.floor(a),z=a-f,Math.abs(z)<1e-6?z=0:z>.9999&&(z=0,f+=1,f===K&&(f=0,m+=1)),m||t.date_system){const a=P(e,t.date_system,n.leap1900);g=a[0],h=a[1],v=a[2]}if(f||z){const e=512&t.date||256&t.date||128&t.date||t.date&b||t.date&_||t.date&y;(512===e&&z>.9995||256===e&&z>.995||128===e&&z>.95||e===b&&z>=.5||e===_&&z>=.5||e===y&&z>=.5)&&(f++,z=0);const n=f<0?K+f:f;F=Math.floor(n)%60,x=Math.floor(n/60)%60,k=Math.floor(n/60/60)%60}M=(6+m)%7}if(t.int_padding&&(l=1===t.int_padding.length?l||t.int_padding:t.int_padding.substring(0,t.int_padding.length-l.length)+l),t.num_padding&&(i=1===t.num_padding.length?i||t.num_padding:t.num_padding.substring(0,t.num_padding.length-i.length)+i),t.den_padding&&(s=1===t.den_padding.length?s||t.den_padding:s+t.den_padding.slice(s.length)),t.man_padding){const e=t.exp_plus?"+":"";r=1===t.man_padding.length?(d<0?"-":e)+(r||t.man_padding):(d<0?"-":e)+t.man_padding.slice(0,t.man_padding.length-r.length)+r}const S=[];let C=0;const E={int:0,frac:0,man:0,num:0,den:0};for(let d=0,u=t.tokens.length;d<u;d++){const u=t.tokens[d],c=u.num?u.num.length:0;if("string"===u.type)u.rule?"num"===u.rule?D?S.push(u.value):(t.num_min>0||t.den_min>0)&&S.push(u.value.replace(/./g,j["?"])):"num+int"===u.rule?D&&l?S.push(u.value):t.den_min>0&&(l||t.num_min)&&S.push(u.value.replace(/./g,j["?"])):"den"===u.rule&&(D?S.push(u.value):(t.den_min>0||t.den_min>0)&&S.push(u.value.replace(/./g,j["?"]))):S.push(u.value);else if("error"===u.type)S.push(n.invalid);else if("point"===u.type)S.push(t.date?u.value:w.decimal);else if("general"===u.type)Z(S,0,e,w);else if("exp"===u.type)S.push(w.exponent);else if("minus"===u.type)u.volatile&&t.date||u.volatile&&(e>=0||"number"!=typeof e)||(u.volatile&&!t.fractions&&(t.integer||t.dec_fractions)?(e<0&&l&&"0"!==l||o)&&S.push(w.negative):S.push(w.negative));else if("plus"===u.type)S.push(w.positive);else if("text"===u.type)S.push(e);else if("div"===u.type)D?S.push("/"):t.num_min>0||t.den_min>0?S.push(j["?"]):S.push(j["#"]);else if("int"===u.type)if(1===t.int_pattern.length)S.push(l);else{const e=C?t.int_pattern.join("").length-E.int:1/0,n=C===t.int_pattern.length-1?0:t.int_pattern.join("").length-(E.int+u.num.length);S.push(l.substring(l.length-e,l.length-n)),C++,E.int+=u.num.length}else if("frac"===u.type){const e=E.frac;for(let t=0;t<c;t++)S.push(o[t+e]||j[u.num[t]]);E.frac+=c}else if(u.type in q)1===t[u.type+"_pattern"].length?("int"===u.type&&S.push(l),"frac"===u.type&&S.push(o),"man"===u.type&&S.push(r),"num"===u.type&&S.push(i),"den"===u.type&&S.push(s)):(S.push(q[u.type].slice(E[u.type],E[u.type]+c)),E[u.type]+=c);else if("year"===u.type)g<0&&S.push(w.negative),S.push(String(Math.abs(g)).padStart(4,"0"));else if("year-short"===u.type){const e=g%100;S.push(e<10?"0":"",e)}else if("month"===u.type)S.push(u.pad&&h<10?"0":"",h);else if("monthname-single"===u.type)6===t.date_system?S.push(w.mmmm6[h-1].charAt(0)):S.push(w.mmmm[h-1].charAt(0));else if("monthname-short"===u.type)6===t.date_system?S.push(w.mmm6[h-1]):S.push(w.mmm[h-1]);else if("monthname"===u.type)6===t.date_system?S.push(w.mmmm6[h-1]):S.push(w.mmmm[h-1]);else if("weekday-short"===u.type)S.push(w.ddd[M]);else if("weekday"===u.type)S.push(w.dddd[M]);else if("day"===u.type)S.push(u.pad&&v<10?"0":"",v);else if("hour"===u.type){const e=k%t.clock||(t.clock<24?t.clock:0);S.push(u.pad&&e<10?"0":"",e)}else if("min"===u.type)S.push(u.pad&&x<10?"0":"",x);else if("sec"===u.type)S.push(u.pad&&F<10?"0":"",F);else if("subsec"===u.type){S.push(w.decimal);const e=z.toFixed(t.sec_decimals);S.push(e.slice(2,2+u.decimals))}else if("am"===u.type){const e=k<12?0:1;u.short&&!a?S.push("AP"[e]):S.push(w.ampm[e])}else if("hour-elap"===u.type){e<0&&S.push(w.negative);const t=24*m+Math.floor(Math.abs(f)/3600);S.push(String(Math.abs(t)).padStart(u.pad,"0"))}else if("min-elap"===u.type){e<0&&S.push(w.negative);const t=1440*m+Math.floor(Math.abs(f)/60);S.push(String(Math.abs(t)).padStart(u.pad,"0"))}else if("sec-elap"===u.type){e<0&&S.push(w.negative);const t=m*K+Math.abs(f);S.push(String(Math.abs(t)).padStart(u.pad,"0"))}else if("b-year"===u.type)S.push(g+543);else if("b-year-short"===u.type){const e=(g+543)%100;S.push(e<10?"0":"",e)}}return n.nbsp?S.join(""):S.join("").replace(/\u00a0/g," ")}function X(e,t){for(let n=0;n<3;n++){const a=t[n];if(a){let t;if(a.condition){const n=a.condition[0],r=a.condition[1];"="===n?t=e===r:">"===n?t=e>r:"<"===n?t=e<r:">="===n?t=e>=r:"<="===n?t=e<=r:"<>"===n&&(t=e!==r)}else t=!0;if(t)return a}}}const ee=S("@"),te="black";const ne={};function ae(e,t){if(e){const n=e[0];t[n]=t[n]||{},ae(e.slice(1),t[n])}else t.$=!0}["d-F-y","d-F-Y","d-M-y","d-M-Y","F-d-y","F-d-Y","F-j-y","F-j-Y","j-F-y","j-F-Y","j-M-y","j-M-Y","M-d-y","M-d-Y","M-j-y","M-j-Y","m-d-y","m-d-Y","m-j-y","m-j-Y","n-d-y","n-d-Y","n-j-y","n-j-Y","y-F-d","y-F-j","y-M-d","y-M-j","Y-F-d","Y-F-j","Y-M-d","Y-m-d","Y-M-j","Y-m-j","Y-n-d","Y-n-j","j-F","j-M","d-F","d-M","n-d","n-j","n-Y","m-d","m-j","m-Y","M-Y","M-y","F-y","F-Y","Y-M","Y-n","Y-m","Y-F","Y-M"].forEach((e=>{ae(e,ne),ae(e+" x",ne),ae(e+" l",ne),ae(e+" l x",ne),ae("l "+e,ne),ae("l "+e+" x",ne),ae(e+" D",ne),ae(e+" D x",ne),ae("D "+e,ne),ae("D "+e+" x",ne)}));const re={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},ie={january:1,february:2,march:3,april:4,june:6,july:7,august:8,september:9,october:10,november:11,december:12},se={sunday:"l",monday:"l",tuesday:"l",wednesday:"l",thursday:"l",friday:"l",saturday:"l",sun:"D",mon:"D",tue:"D",wed:"D",thu:"D",fri:"D",sat:"D"},oe=(new Date).getUTCFullYear();function le(e){const t=new RegExp("^([\\s+%"+k.join("")+"(-]*)(((?:(?:\\d[\\d,]*)(?:\\.\\d*)?|(?:\\.\\d+)))([eE][+-]?\\d+)?)([\\s%"+k.join("")+")]*)$").exec(e);if(t){const[,e,n,a,r,i]=t;let s=1,o="",l=!1,d=!1,m=!1,u=!1,c=!1,p=null,f=!1,g=parseFloat(n.replace(/,/g,""));if(!isFinite(g))return null;for(let t=0;t<e.length;t++){const n=e[t];if("-"===n){if(l||d)return null;l=!0,s=-1}else if(x.test(n)){if(c)return null;c=!0,p=n}else if("("===n){if(d||l)return null;d=!0,s=-1}else if("%"===n){if(u)return null;u=!0}}for(let e=0;e<i.length;e++){const t=i[e];if(x.test(t)){if(c)return null;c=!0,p=t,f=!0}else if(")"===t){if(m||!d)return null;m=!0}else if("%"===t){if(u)return null;u=!0}}if(r){if(u||c)return null;o="0.00E+00"}else if(u){if(c)return null;o=a.includes(".")?"0.00%":"0%",g*=.01}else if(c){const e=a.includes(".")?"#,##0.00":"#,##0";o=f?e+p:p+e}else a.includes(",")&&(o=a.includes(".")?"#,##0.00":"#,##0");const h={v:g*s};return o&&(h.z=o),h}}const de=(e,t,n)=>{const a=n.path||"",r=Object.keys(t);for(let i=0;i<r.length;i++){let s;const o=r[i];if(t[o]){if("$"===o||"€"===o)e||(s=n);else if("-"===o){const r=/^(\s*([./-]|,\s)\s*|\s+)/.exec(e);if(r){const i="-"===r[1]||"/"===r[1]||"."===r[1]?r[1]:" ";if(!n.sep||n.sep===i){const l=r[0].replace(/\s+/g," ");s=de(e.slice(r[0].length),t[o],{...n,sep:i,path:a+l})}}}else if(" "===o){const r=/^[,.]?\s+/.exec(e);if(r){const i=r[0].replace(/\s+/g," ");s=de(e.slice(r[0].length),t[o],{...n,path:a+i})}}else if("j"===o||"d"===o){const r=/^(0?[1-9]|1\d|2\d|3[01])\b/.exec(e);r&&(s=de(e.slice(r[0].length),t[o],{...n,day:r[0],path:a+o}))}else if("n"===o||"m"===o){const r=/^(0?[1-9]|1[012])\b/.exec(e);r&&(s=de(e.slice(r[0].length),t[o],{...n,month:+r[0],_mon:r[0],path:a+o}))}else if("F"===o||"M"===o){const r=/^([a-z]{3,9})\b/i.exec(e),i=r&&("F"===o?ie:re)[r[0].toLowerCase()];i&&(s=de(e.slice(r[0].length),t[o],{...n,month:i,_mon:r[0],path:a+o}))}else if("l"===o||"D"===o){const r=/^([a-z]{3,9})\b/i.exec(e);(r&&se[r[0].toLowerCase()])===o&&(s=de(e.slice(r[0].length),t[o],{...n,path:a+o}))}else if("y"===o){const r=/^\d\d\b/.exec(e);if(r){const i=+r[0]>=30?+r[0]+1900:+r[0]+2e3;s=de(e.slice(r[0].length),t[o],{...n,year:i,path:a+o})}}else if("Y"===o){const r=/^\d\d\d\d\b/.exec(e);r&&(s=de(e.slice(r[0].length),t[o],{...n,year:+r[0],path:a+o}))}else{if("x"!==o)throw new Error('Unknown date token "'.concat(o,'"'));{const r=ue(e);r&&(s=de("",t[o],{...n,time:r.v,tf:r.z,path:a+o}))}}if(s)return s}}};function me(e,t){const n=de(e.trim(),ne,{path:""});if(n){var a;if("."===n.sep&&3===n.path.length)return null;const e=+(null!==(a=n.year)&&void 0!==a?a:oe);if(n.day||(n.day=1),!function(e,t,n){if(n<1)return!1;if(t<1||t>12)return!1;if(2===t){if(n>(e%4==0&&e%100!=0||e%400==0||1900===e?29:28))return!1}else if((4===t||6===t||9===t||11===t)&&n>30||(1===t||3===t||5===t||7===t||8===t||10===t||12===t)&&n>31)return!1;return!0}(e,n.month,n.day))return null;let r=-1/0;if(e<1900)return null;e<=1900&&n.month<=2?r=25568:e<1e4&&(r=25569);const i=Date.UTC(e,n.month-1,n.day)/864e5+r+(n.time||0);if(i>=0&&i<=2958465){const e="0"===n._mon[0]||"0"===n.day[0]||2===n._mon.length&&2===n.day.length,a=n.path.replace(/[jdlDnmMFyYx-]/g,(t=>"j"===t||"d"===t?e?"dd":"d":"D"===t?"ddd":"l"===t?"dddd":"n"===t||"m"===t?e?"mm":"m":"M"===t?"mmm":"F"===t?"mmmm":"y"===t?"yy":"x"===t?n.tf||"":"Y"===t?"yyyy":t));return t&&t.nativeDate?{v:L(i,t),z:a}:{v:i,z:a}}}return null}function ue(e){const t=/^\s*([10]?\d|2[0-4])(?::([0-5]\d|\d))?(?::([0-5]\d|\d))?(\.\d{1,10})?(?:\s*([AP])M?)?\s*$/i.exec(e);if(t){const[,e,n,a,r,i]=t;if(r&&!a)return null;if(!i&&!n&&!a)return null;let s=1*(e||0);if(i){if(s>=13)return null;"p"!==i[0]&&"P"!==i[0]||(s+=12)}return{v:(60*s*60+60*(1*(n||0))+1*(a||0)+1*(r||0))/86400,z:(2===e.length?"hh":"h")+":mm"+(a?":ss":"")+(i?" AM/PM":"")}}return null}function ce(e){return/^\s*true\s*$/i.test(e)?{v:!0}:/^\s*false\s*$/i.test(e)?{v:!1}:null}const pe={};function fe(e,t){const{pattern:n,partitions:a,locale:r}=e,i=e=>{const n=Object.assign({},h(),t,e);return r&&(n.locale=r),n},s=(e,t)=>{const n=i(t);return function(e,t,n){const a=l(n.locale),r=t[3]?t[3]:ee;if("boolean"==typeof e&&(e=e?"TRUE":"FALSE"),null==e)return"";if("number"!=typeof e)return Q(e,r,n,a);if(!isFinite(e)){const t=a||u;return isNaN(e)?t.nan:(e<0?t.negative:"")+t.infinity}const i=X(e,t);return i?Q(e,i,n,a):n.overflow}(J(e,n),a,n)};s.color=(e,t)=>function(e,t){if("number"!=typeof e||!isFinite(e))return(t[3]?t[3].color:ee.color)||te;const n=X(e,t);return n&&n.color||te}(J(e,i(t)),a);const o=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const[a,r]=e,i=a.frac_max,s={type:"general",isDate:R(e),isText:G(e),isPercent:U(e),maxDecimals:a.general?9:i,scale:null!==(t=a.scale)&&void 0!==t?t:1,color:0,parentheses:0,grouped:a.grouping?1:0,_partitions:e},o=!s.isDate&&!s.isText&&!a.error&&a.tokens.some((e=>"string"===e.type&&(n?e.value===n:x.test(e.value))));let l="G",d=i>=0?Math.min(15,i):"",m="",u="";if(r&&r.color&&(u="-",s.color=1),a.parens&&(m="()",s.parentheses=1),o)l="C",s.type="currency";else if(a.error)s.type="error",s.maxDecimals=0;else if(s.isDate){let e=0,t=0,n="";a.tokens.forEach((a=>{const r=a.type;/^(b-)?year/.test(r)?(n+="Y",t++):r.startsWith("month")?(n+="M",t++):/^(week)?day/.test(r)?(n+="D",t++):"hour"!==r&&"min"!==r&&"sec"!==r&&"am"!==r||(n+=r[0],e++)})),s.type="date",t&&e?s.type="datetime":!t&&e&&(s.type="time");const r=B.find((e=>n.startsWith(e[0])));l=r?"D":"G",d=r?r[1]:""}else s.isText?(l="G",s.type="text",d="",s.maxDecimals=0):a.general?(l="G",s.type="general",d=""):a.fractions?(l="G",s.type="fraction",d=""):a.exponential?(l="S",s.type="scientific"):s.isPercent?(l="P",s.type="percent"):a.grouping?(l=",",s.type="grouped"):(a.int_max||i)&&(l="F",s.type="number");return s.code=l+d+u+m,s.level=H[s.type],Object.freeze(s)}(a,(t||{}).currency)||new SyntaxError;return s.info=o,s.dateInfo=function(e){const[t]=e;return{year:!!(2&t.date),month:!!(4&t.date),day:!!(8&t.date),hours:!!(t.date&y),minutes:!!(t.date&_),seconds:!!(t.date&b),clockType:12===t.clock?12:24}}(a),s.isPercent=()=>!!o.isPercent,s.isDate=()=>!!o.isDate,s.isText=()=>!!o.isText,s.pattern=n,e.error&&(s.error=e.error),s.options=i,s.locale=r||t&&t.locale||"",Object.freeze(s)}function ge(e,t){e||(e="General");let n=null;if(pe[e])n=pe[e];else{n=Object.assign({},h(),t).throws?E(e):function(e){try{return E(e)}catch(t){const n={tokens:[{type:"error"}],error:t.message};return{pattern:e,partitions:[n,n,n,n],error:t.message,locale:null}}}(e),n.error||(pe[e]=n)}return fe(n,t)}ge.isDate=e=>ge(e,{throws:!1}).isDate(),ge.isPercent=e=>ge(e,{throws:!1}).isPercent(),ge.isText=e=>ge(e,{throws:!1}).isText(),ge.getInfo=(e,t)=>ge(e,{...t,throws:!1}).info,ge.getDateInfo=(e,t)=>ge(e,{...t,throws:!1}).dateInfo,ge.dateToSerial=J,ge.dateFromSerial=L,ge.options=h,ge.dec2frac=p,ge.round=c,ge.codeToLocale=n,ge.parseLocale=s,ge.getLocale=l,ge.addLocale=(e,t)=>{const n=s(t);return delete pe[n.lang],delete pe[n.language],m(e,n)},ge.format=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=n&&"object"==typeof n?n:{locale:n,throws:!a};return ge(e,r)(J(t,r),r)},ge.is_date=ge.isDate,ge.parseNumber=le,ge.parseDate=me,ge.parseTime=ue,ge.parseBool=ce,ge.parseValue=function(e,t){var n,a,r;return null!==(n=null!==(a=null!==(r=le(e))&&void 0!==r?r:me(e,t))&&void 0!==a?a:ue(e))&&void 0!==n?n:ce(e)};var he=ge;return t=t.default}()})); |
@@ -5,3 +5,3 @@ { | ||
"author": "Borgar Þorsteinsson <borgar@borgar.net>", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"scripts": { | ||
@@ -32,3 +32,3 @@ "start": "webpack --mode development --watch", | ||
"devDependencies": { | ||
"@babel/core": "~7.20.7", | ||
"@babel/core": "~7.21.0", | ||
"@babel/plugin-proposal-class-properties": "~7.18.6", | ||
@@ -39,7 +39,7 @@ "@babel/plugin-proposal-export-default-from": "~7.18.10", | ||
"@borgar/eslint-config": "~3.0.0", | ||
"babel-loader": "~9.1.0", | ||
"eslint": "~8.31.0", | ||
"eslint-plugin-import": "~2.26.0", | ||
"babel-loader": "~9.1.2", | ||
"eslint": "~8.35.0", | ||
"eslint-plugin-import": "~2.27.5", | ||
"tap-min": "~2.0.0", | ||
"tape": "~5.6.1", | ||
"tape": "~5.6.3", | ||
"terser-webpack-plugin": "~5.3.6", | ||
@@ -46,0 +46,0 @@ "webpack": "~5.75.0", |
@@ -114,3 +114,9 @@ # numfmt – a spreadsheet number formatter | ||
The `<POSITIVE>` and `<NEGATIVE>` sections may optionally have conditionals. A condition is set by a comparison operator followed by a number, followed by the regular format symbols, surrounded by square brackets: `[>=-2.5]#,##0.0`. The supported set of operators is: `=` `>` `<` `>=` `<=` `<>` | ||
* There must not be more than 4 sections. | ||
* There must not be more than 2 conditional sections. | ||
* There must not be numerical or date emitting symbol in the (4th) text part. | ||
## API Reference | ||
@@ -117,0 +123,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157952
2788
473