@bicharts/shape-core 0.6.47 → 0.6.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-555PKUBU.mjs +2 -0
- package/dist/chunk-5HI6TVMM.mjs +2 -0
- package/dist/chunk-GKXYRUK5.mjs +2 -0
- package/dist/chunk-INMDBTAR.mjs +2 -0
- package/dist/chunk-KQOVPOVU.mjs +2 -0
- package/dist/{chunk-JNKMTRKG.mjs → chunk-QQQBZHY5.mjs} +1 -1
- package/dist/{chunk-FUHYYIXD.mjs → chunk-QVV3ACEI.mjs} +1 -1
- package/dist/geoDetector.mjs +1 -1
- package/dist/geoPoint.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/indexedText.mjs +1 -1
- package/dist/ingest.mjs +1 -1
- package/dist/monthNames.mjs +1 -1
- package/dist/ordinalDetector.mjs +1 -1
- package/dist/types/columnRefScan.d.ts +1 -0
- package/dist/types/geoCountryNames.d.ts +41 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/knownNameKey.d.ts +66 -0
- package/dist/types/matchQuality.d.ts +2 -1
- package/dist/types/models.d.ts +12 -0
- package/dist/types/monthNames.d.ts +10 -2
- package/package.json +1 -1
- package/dist/chunk-2LR73DNS.mjs +0 -2
- package/dist/chunk-GXQQHMEY.mjs +0 -2
- package/dist/chunk-TPVDJHU6.mjs +0 -2
- package/dist/chunk-VIWJJUDA.mjs +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
+
import{a}from"./chunk-5HI6TVMM.mjs";var i={};function m(r){return a(r.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()).replace(/[.\s]/g,"")}function h(r){let o=r||"en",e=i[o];if(e)return e;let n={};try{let s=new Intl.DateTimeFormat(o,{month:"long"}),g=new Intl.DateTimeFormat(o,{month:"short"});for(let t=0;t<12;++t){let c=new Date(Date.UTC(2020,t,15));n[m(s.format(c))]=t,n[m(g.format(c))]=t}}catch{}return i[o]=n,n}export{m as a,h as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
+
var s=Object.freeze({\u00F8:"o",\u0153:"oe",\u00E6:"ae",\u00DF:"ss",\u0142:"l",\u0111:"d",\u00F0:"d",\u00FE:"th",\u0131:"i",\u0127:"h",\u0167:"t",\u014B:"n",\u0138:"k",\u0259:"e",\u01DD:"e",\u0133:"ij",\u0140:"l",\u017F:"s"}),u=new RegExp(`[${Object.keys(s).join("")}]`,"gu");function g(t){return t.replace(u,e=>s[e]??e)}function l(t){return t==null?"":g(String(t).replace(/\p{No}/gu," ").normalize("NFKD").replace(/\p{Diacritic}/gu,"").toLowerCase()).replace(/&/g,"and").replace(/[^\p{L}\p{Nd}]/gu,"")}var p=4;function o(t){return t.length>=p}var a=class{constructor(e=(n,r)=>n===r){this.same=e}same;map=new Map;add(e,n){let r=l(e);if(!o(r))return;let i=this.map.get(r);if(!i){this.map.set(r,{value:n,ambiguous:!1});return}!i.ambiguous&&!this.same(i.value,n)&&(i.ambiguous=!0)}get(e){if(!o(e))return;let n=this.map.get(e);return n&&!n.ambiguous?n.value:void 0}isAmbiguous(e){return this.map.get(e)?.ambiguous===!0}entries(){return Array.from(this.map.entries())}};export{g as a,l as b,p as c,o as d,a as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
+
import{f as p,h as _,i as M,k as x,n as R,o as D,u as j}from"./chunk-4VN252CK.mjs";import{a as S}from"./chunk-5HI6TVMM.mjs";var Pe=Object.freeze({hour:24,weekday:7,month:12,quarter:4,week:53,season:4}),J={nl:["jaar"],de:["jahr"],fr:["ann\xE9e"],es:["a\xF1o"],pt:["ano"],it:["anno"],pl:["rok"],cs:["rok"],sk:["rok"],sv:["\xE5r"],da:["\xE5r"],nb:["\xE5r"],fi:["vuosi"],hu:["\xE9v"],tr:["y\u0131l"],ro:["anul"],hr:["godina"],id:["tahun"],vi:["n\u0103m"],ru:["\u0433\u043E\u0434"],uk:["\u0440\u0456\u043A"],el:["\u03AD\u03C4\u03BF\u03C2"],zh:["\u5E74\u4EFD","\u5E74\u5EA6"],ja:["\u5E74\u5EA6"],ko:["\uC5F0\uB3C4","\uB144\uB3C4"],ar:["\u0633\u0646\u0629"],he:["\u05E9\u05E0\u05D4"],hi:["\u0935\u0930\u094D\u0937","\u0938\u093E\u0932"],th:["\u0E1B\u0E35\u0E07\u0E1A\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13"],fa:["\u0633\u0627\u0644"]},q={hour:{de:["stunde"],fr:["heure"],es:["hora"],pt:["hora"],it:["ora"],pl:["godzina"],cs:["hodina"],sk:["hodina"],sv:["timme"],fi:["tunti"],hu:["\xF3ra"],ro:["ora"],vi:["gi\u1EDD"],ru:["\u0447\u0430\u0441"],uk:["\u0433\u043E\u0434\u0438\u043D\u0430"],el:["\u03CE\u03C1\u03B1"],zh:["\u5C0F\u65F6"],ar:["\u0633\u0627\u0639\u0629"],he:["\u05E9\u05E2\u05D4"],hi:["\u0918\u0902\u091F\u093E"],th:["\u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"],fa:["\u0633\u0627\u0639\u062A"]},weekday:{nl:["weekdag"],de:["wochentag"],sv:["veckodag"],da:["ugedag"],nb:["ukedag"],fi:["viikonp\xE4iv\xE4"],zh:["\u661F\u671F"],ja:["\u66DC\u65E5"],ko:["\uC694\uC77C"]},month:{nl:["maand"],de:["monat"],fr:["mois"],es:["mes"],pt:["m\xEAs"],it:["mese"],pl:["miesi\u0105c"],cs:["m\u011Bs\xEDc"],sk:["mesiac"],sv:["m\xE5nad"],da:["m\xE5ned"],nb:["m\xE5ned"],fi:["kuukausi"],hu:["h\xF3nap"],hr:["mjesec"],id:["bulan"],vi:["th\xE1ng"],ru:["\u043C\u0435\u0441\u044F\u0446"],uk:["\u043C\u0456\u0441\u044F\u0446\u044C"],el:["\u03BC\u03AE\u03BD\u03B1\u03C2"],zh:["\u6708\u4EFD"],ar:["\u0634\u0647\u0631"],he:["\u05D7\u05D5\u05D3\u05E9"],hi:["\u092E\u0939\u0940\u0928\u093E","\u092E\u093E\u0939"],th:["\u0E40\u0E14\u0E37\u0E2D\u0E19"],fa:["\u0645\u0627\u0647"]},quarter:{nl:["kwartaal"],de:["quartal"],fr:["trimestre"],es:["trimestre"],pt:["trimestre"],it:["trimestre"],pl:["kwarta\u0142"],cs:["\u010Dtvrtlet\xED"],sk:["\u0161tvr\u0165rok"],sv:["kvartal"],da:["kvartal"],nb:["kvartal"],fi:["vuosinelj\xE4nnes"],hu:["negyed\xE9v"],tr:["\xE7eyrek"],ro:["trimestru"],hr:["tromjese\u010Dje"],id:["kuartal","triwulan"],vi:["qu\xFD"],ru:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],uk:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],el:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"],zh:["\u5B63\u5EA6"],ja:["\u56DB\u534A\u671F"],ko:["\uBD84\uAE30"],ar:["\u0631\u0628\u0639"],he:["\u05E8\u05D1\u05E2\u05D5\u05DF"],hi:["\u0924\u093F\u092E\u093E\u0939\u0940"],th:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A"]},week:{de:["woche"],fr:["semaine"],es:["semana"],pt:["semana"],it:["settimana"],pl:["tydzie\u0144"],cs:["t\xFDden"],sk:["t\xFD\u017Ede\u0148"],sv:["vecka"],da:["uge"],nb:["uke"],fi:["viikko"],hu:["h\xE9t"],tr:["hafta"],ro:["s\u0103pt\u0103m\xE2n\u0103"],hr:["tjedan"],id:["minggu"],vi:["tu\u1EA7n"],ru:["\u043D\u0435\u0434\u0435\u043B\u044F"],uk:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C"],el:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"],ar:["\u0623\u0633\u0628\u0648\u0639"],he:["\u05E9\u05D1\u05D5\u05E2"],hi:["\u0938\u092A\u094D\u0924\u093E\u0939"],th:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C"],fa:["\u0647\u0641\u062A\u0647"]},season:{nl:["seizoen"],de:["jahreszeit"],fr:["saison"],es:["temporada"],it:["stagione"],pl:["sezon"],cs:["sez\xF3na"],sk:["sez\xF3na"],sv:["s\xE4song","\xE5rstid"],da:["s\xE6son","\xE5rstid"],nb:["sesong","\xE5rstid"],fi:["vuodenaika"],hu:["\xE9vszak"],tr:["mevsim"],ro:["anotimp"],vi:["m\xF9a"],ru:["\u0441\u0435\u0437\u043E\u043D"],uk:["\u0441\u0435\u0437\u043E\u043D"],el:["\u03B5\u03C0\u03BF\u03C7\u03AE"],zh:["\u5B63\u8282"],ja:["\u5B63\u7BC0"],ko:["\uACC4\uC808"],ar:["\u0645\u0648\u0633\u0645"],he:["\u05E2\u05D5\u05E0\u05D4"],hi:["\u092E\u094C\u0938\u092E"],th:["\u0E24\u0E14\u0E39"],fa:["\u0641\u0635\u0644"]}},ee=["\xE5r","\xE9v","h\xE9t","\xF3ra"];function re(e,r,t){let n=p(t);if(!n)return null;let o=r.normalize("NFC").toLowerCase(),s=x(e).words;return s.includes(o)?"word":n.compounds&&s.some(i=>D(i,o,R))?"suffix":null}function O(e,r){let t=String(e??"");if(!t.trim())return null;for(let[n,o]of Object.entries(r))for(let s of o){let i=ee.includes(s)?re(t,s,n):j(t,s,n);if(i)return{lang:n,word:s,view:i}}return null}function z(e){return O(e,J)}function N(e){let r=null;for(let t of Object.keys(q)){let n=O(e,q[t]);if(n){if(r&&r.concept!==t)return null;r={concept:t,hit:n}}}return r}var ne=Object.freeze({quarter:4,half:2,week:53}),h={quarter:{en:{words:["quarter #","qtr #"],codes:["q #"]},nl:{words:["kwartaal #","# kwartaal","#e kwartaal","@ kwartaal"],codes:["k #"]},de:{words:["quartal #","# quartal","@ quartal"]},fr:{words:["trimestre #","# trimestre","#er trimestre","#e trimestre","#eme trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},es:{words:["trimestre #","# trimestre","#er trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},pt:{words:["trimestre #","# trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","#\xBA t","trim. #"]},it:{words:["trimestre #","# trimestre","#\xBA trimestre","#\xB0 trimestre","% trimestre","@ trimestre"],codes:["t #","trim. #"]},pl:{words:["kwarta\u0142 #","# kwarta\u0142","% kwarta\u0142","@ kwarta\u0142","# kw.","% kw."]},cs:{words:["\u010Dtvrtlet\xED #","# \u010Dtvrtlet\xED","% \u010Dtvrtlet\xED","@ \u010Dtvrtlet\xED"]},sk:{words:["\u0161tvr\u0165rok #","# \u0161tvr\u0165rok","% \u0161tvr\u0165rok","@ \u0161tvr\u0165rok"]},sv:{words:["kvartal #","# kvartalet","#:a kvartalet","#:e kvartalet","@ kvartalet"],codes:["k #"]},da:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},nb:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},fi:{words:["nelj\xE4nnes #","# nelj\xE4nnes","# vuosinelj\xE4nnes","vuosinelj\xE4nnes #"]},hu:{words:["negyed\xE9v #","# negyed\xE9v","% negyed\xE9v"]},tr:{words:["\xE7eyrek #","# \xE7eyrek","@ \xE7eyrek"],codes:["\xE7 #"]},ro:{words:["trimestrul #","trimestrul %","trimestru #"],codes:["t #"]},hr:{words:["tromjese\u010Dje #","# tromjese\u010Dje","% tromjese\u010Dje","kvartal #","# kvartal"]},id:{words:["kuartal #","kuartal %","kuartal ke #","triwulan #","triwulan %","triwulan ke #"],codes:["tw #","tw %"]},vi:{words:["qu\xFD #","qu\xFD %"]},ru:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},uk:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},el:{words:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF #","# \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","@ \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u7B2C#\u5B63\u5EA6","\u7B2C@\u5B63\u5EA6","@\u5B63\u5EA6","#\u5B63\u5EA6"]},ja:{words:["\u7B2C#\u56DB\u534A\u671F","\u7B2C@\u56DB\u534A\u671F","#\u56DB\u534A\u671F"],codes:["# q"]},ko:{words:["#\uBD84\uAE30","#/4\uBD84\uAE30"]},ar:{words:["\u0627\u0644\u0631\u0628\u0639 #","\u0627\u0644\u0631\u0628\u0639 @","\u0631\u0628\u0639 #"]},he:{words:["\u05E8\u05D1\u05E2\u05D5\u05DF #","\u05E8\u05D1\u05E2\u05D5\u05DF @"]},hi:{words:["\u0924\u093F\u092E\u093E\u0939\u0940 #","# \u0924\u093F\u092E\u093E\u0939\u0940","@ \u0924\u093F\u092E\u093E\u0939\u0940"]},th:{words:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A #","\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48 #"]}},half:{en:{words:["half #"],codes:["h #"]},nl:{words:["halfjaar #","# halfjaar","@ halfjaar"]},de:{words:["halbjahr #","# halbjahr","@ halbjahr"],codes:["hj #"]},fr:{words:["semestre #","# semestre","#er semestre","#e semestre","#eme semestre","@ semestre"],codes:["s #"]},es:{words:["semestre #","# semestre","#er semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},pt:{words:["semestre #","# semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},it:{words:["semestre #","# semestre","#\xBA semestre","#\xB0 semestre","% semestre","@ semestre"],codes:["s #"]},pl:{words:["p\xF3\u0142rocze #","# p\xF3\u0142rocze","% p\xF3\u0142rocze","@ p\xF3\u0142rocze"]},cs:{words:["pololet\xED #","# pololet\xED","% pololet\xED","@ pololet\xED"]},sk:{words:["polrok #","# polrok","% polrok"]},sv:{words:["halv\xE5r #","# halv\xE5ret","@ halv\xE5ret"]},da:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},nb:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},fi:{words:["vuosipuolisko #","# vuosipuolisko"]},hu:{words:["f\xE9l\xE9v #","# f\xE9l\xE9v","% f\xE9l\xE9v"]},tr:{words:["yar\u0131y\u0131l #","# yar\u0131y\u0131l","@ yar\u0131y\u0131l"]},ro:{words:["semestrul #","semestrul %"],codes:["s #"]},hr:{words:["polugodi\u0161te #","# polugodi\u0161te","% polugodi\u0161te"]},id:{words:["semester #","semester %"]},ru:{words:["\u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435 #","# \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","% \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","@ \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435"]},uk:{words:["\u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F #","# \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","% \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","@ \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F"]},el:{words:["\u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF #","# \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","@ \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u4E0A\u534A\u5E74=1","\u4E0B\u534A\u5E74=2"]},ja:{words:["\u4E0A\u671F=1","\u4E0B\u671F=2","\u4E0A\u534A\u671F=1","\u4E0B\u534A\u671F=2"]},ko:{words:["\uC0C1\uBC18\uAE30=1","\uD558\uBC18\uAE30=2"]},ar:{words:["\u0627\u0644\u0646\u0635\u0641 @"]},he:{words:["\u05D7\u05E6\u05D9\u05D5\u05DF #"]},hi:{words:["\u091B\u092E\u093E\u0939\u0940 #","@ \u091B\u092E\u093E\u0939\u0940"]},th:{words:["\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E41\u0E23\u0E01=1","\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E2B\u0E25\u0E31\u0E07=2"]}},week:{en:{words:["week #","wk #"],codes:["w #"]},de:{words:["woche #","# woche","kw #"]},fr:{words:["semaine #","sem. #"],codes:["s #"]},es:{words:["semana #","sem. #"],codes:["s #"]},pt:{words:["semana #","sem. #"],codes:["s #"]},it:{words:["settimana #","sett. #"]},pl:{words:["tydzie\u0144 #","# tydzie\u0144","tydz. #"]},cs:{words:["t\xFDden #","# t\xFDden"]},sk:{words:["t\xFD\u017Ede\u0148 #","# t\xFD\u017Ede\u0148"]},sv:{words:["vecka #"],codes:["v #"]},da:{words:["uge #"]},nb:{words:["uke #"]},fi:{words:["viikko #","vko #","vk #"]},hu:{words:["h\xE9t #","# h\xE9t"]},tr:{words:["hafta #","# hafta"]},ro:{words:["s\u0103pt\u0103m\xE2na #"]},hr:{words:["tjedan #","# tjedan"]},id:{words:["minggu #","minggu ke #"]},vi:{words:["tu\u1EA7n #"]},ru:{words:["\u043D\u0435\u0434\u0435\u043B\u044F #","# \u043D\u0435\u0434\u0435\u043B\u044F","\u043D\u0435\u0434. #"]},uk:{words:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C #","# \u0442\u0438\u0436\u0434\u0435\u043D\u044C","\u0442\u0438\u0436. #"]},el:{words:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1 #","# \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"]},zh:{words:["\u7B2C#\u5468"]},ja:{words:["\u7B2C#\u9031"]},ko:{words:["#\uC8FC","#\uC8FC\uCC28"]},ar:{words:["\u0627\u0644\u0623\u0633\u0628\u0648\u0639 #","\u0623\u0633\u0628\u0648\u0639 #"]},he:{words:["\u05E9\u05D1\u05D5\u05E2 #"]},hi:{words:["\u0938\u092A\u094D\u0924\u093E\u0939 #"]},th:{words:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C #","\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C\u0E17\u0E35\u0E48 #"]}}},G={nl:[["eerste"],["tweede"],["derde"],["vierde"]],de:[["erstes","erste"],["zweites","zweite"],["drittes","dritte"],["viertes","vierte"]],fr:[["premier"],["deuxi\xE8me","second"],["troisi\xE8me"],["quatri\xE8me"]],es:[["primer","primero"],["segundo"],["tercer","tercero"],["cuarto"]],pt:[["primeiro"],["segundo"],["terceiro"],["quarto"]],it:[["primo"],["secondo"],["terzo"],["quarto"]],pl:[["pierwszy","pierwsze"],["drugi","drugie"],["trzeci","trzecie"],["czwarty","czwarte"]],cs:[["prvn\xED"],["druh\xE9","druh\xFD"],["t\u0159et\xED"],["\u010Dtvrt\xE9","\u010Dtvrt\xFD"]],sk:[["prv\xFD"],["druh\xFD"],["tret\xED"],["\u0161tvrt\xFD"]],sv:[["f\xF6rsta"],["andra"],["tredje"],["fj\xE4rde"]],da:[["f\xF8rste"],["andet","anden"],["tredje"],["fjerde"]],nb:[["f\xF8rste"],["andre"],["tredje"],["fjerde"]],tr:[["birinci","ilk"],["ikinci"],["\xFC\xE7\xFCnc\xFC"],["d\xF6rd\xFCnc\xFC"]],ru:[["\u043F\u0435\u0440\u0432\u044B\u0439","\u043F\u0435\u0440\u0432\u043E\u0435"],["\u0432\u0442\u043E\u0440\u043E\u0439","\u0432\u0442\u043E\u0440\u043E\u0435"],["\u0442\u0440\u0435\u0442\u0438\u0439","\u0442\u0440\u0435\u0442\u044C\u0435"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044B\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435"]],uk:[["\u043F\u0435\u0440\u0448\u0438\u0439","\u043F\u0435\u0440\u0448\u0435"],["\u0434\u0440\u0443\u0433\u0438\u0439","\u0434\u0440\u0443\u0433\u0435"],["\u0442\u0440\u0435\u0442\u0456\u0439","\u0442\u0440\u0435\u0442\u0454"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435"]],el:[["\u03C0\u03C1\u03CE\u03C4\u03BF"],["\u03B4\u03B5\u03CD\u03C4\u03B5\u03C1\u03BF"],["\u03C4\u03C1\u03AF\u03C4\u03BF"],["\u03C4\u03AD\u03C4\u03B1\u03C1\u03C4\u03BF"]],zh:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ja:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ar:[["\u0627\u0644\u0623\u0648\u0644"],["\u0627\u0644\u062B\u0627\u0646\u064A"],["\u0627\u0644\u062B\u0627\u0644\u062B"],["\u0627\u0644\u0631\u0627\u0628\u0639"]],he:[["\u05E8\u05D0\u05E9\u05D5\u05DF"],["\u05E9\u05E0\u05D9"],["\u05E9\u05DC\u05D9\u05E9\u05D9"],["\u05E8\u05D1\u05D9\u05E2\u05D9"]],hi:[["\u092A\u0939\u0932\u0940","\u092A\u0939\u0932\u093E"],["\u0926\u0942\u0938\u0930\u0940","\u0926\u0942\u0938\u0930\u093E"],["\u0924\u0940\u0938\u0930\u0940","\u0924\u0940\u0938\u0930\u093E"],["\u091A\u094C\u0925\u0940","\u091A\u094C\u0925\u093E"]]},te=["\xE7 #"],oe=String.raw`[\s\-_./]*`,se={i:1,ii:2,iii:3,iv:4};function g(e,r){let t=String(e??"").normalize("NFC").toLowerCase();return r||(t=_(t)),t.replace(/[\s_]+/g," ").trim().replace(/\.+$/,"").trim()}function L(e){return/[.*+?^${}()|[\]\\]/.test(e)?"\\"+e:e}function E(e,r,t,n){let s=!!p(r)?.foldSensitive||te.includes(e),i=e,a=null,d=/=(\d+)$/.exec(i);d&&(a=Number(d[1]),i=i.slice(0,d.index));let u=(G[r]??[]).map(m=>m.map(w=>g(w,s))),c=a!==null?{kind:"fixed",n:a}:{kind:"digits"},l="";for(let m of g(i,s))if(m==="#")l+="([0-9]{1,2})",c={kind:"digits"};else if(m==="%")l+="(iv|iii|ii|i)",c={kind:"roman"};else if(m==="@"){let w=u.flat().sort((k,Z)=>Z.length-k.length).map(k=>[...k].map(L).join(""));l+="("+w.join("|")+")",c={kind:"ordinal",words:u}}else m===" "?l+=oe:m==="."?l+="\\.?":l+=L(m);return{lang:r,grain:t,form:n,unfold:s,re:new RegExp("^"+l+"$","u"),number:c}}var b=null;function ae(){if(b)return b;let e=[];for(let r of Object.keys(h))for(let[t,n]of Object.entries(h[r])){for(let o of n.words??[])e.push(E(o,t,r,"word"));for(let o of n.codes??[])e.push(E(o,t,r,"code"))}return b=e,e}var I=/^[0-9]+$/,P=/^[0-9]/,A=/[0-9]$/,ie=/^[\s\-_./,']*/,le=/[\s\-_./,']*$/,de=/^(年|년)/u;function T(e){if(e.length===4){let r=Number(e);return r>=1900&&r<=2099?r:null}return 2e3+Number(e)}function F(e){let r=[{body:e,year:null,yearDigits:0}];for(let t of[4,2]){if(e.length<=t)continue;let n=e.slice(0,t);if(I.test(n)&&!P.test(e.slice(t))){let i=e.slice(t),a=de.exec(i),d=a?i.slice(a[0].length):i,u=ie.exec(d)[0],c=d.slice(u.length),l=T(n);c&&l!==null&&(a||u||!P.test(c))&&r.push({body:c,year:l,yearDigits:t})}let o=e.slice(e.length-t),s=e.slice(0,e.length-t);if(I.test(o)&&!A.test(s)){let i=le.exec(s)[0],a=s.slice(0,s.length-i.length),d=T(o);a&&d!==null&&(i||!A.test(a))&&r.push({body:a,year:d,yearDigits:t})}}return r}var y=null;function ce(){if(y)return y;let e=new Set;for(let[r,t]of Object.entries(G)){let n=!!p(r)?.foldSensitive;for(let o of t)for(let s of o)e.add(g(s,!1)),n&&e.add(g(s,!0))}for(let r of Object.keys(h))for(let t of Object.values(h[r]))for(let n of t?.words??[]){let o=/=[0-9]+$/.exec(n);o&&e.add(g(n.slice(0,o.index),!1))}return y=[...e],y}var ue=/[0-9]/,me=/(^|[^\p{L}])(iv|iii|ii|i)([^\p{L}]|$)/u;function V(e){return ue.test(e)||me.test(e)?!0:ce().some(r=>e.includes(r))}function fe(e,r){switch(e.number.kind){case"fixed":return e.number.n;case"digits":return r[1]===void 0?null:Number(r[1]);case"roman":return r[1]===void 0?null:se[r[1]]??null;case"ordinal":{let t=r[1],n=e.number.words.findIndex(o=>o.includes(t));return n<0?null:n+1}}}function ge(e){let r=String(e??"");if(!r.trim()||r.length>40)return[];let t=g(r,!1),n=g(r,!0);if(!V(t)&&!V(n))return[];let o=F(t),s=F(n),i=[],a=new Set;for(let d of ae()){let u=d.lang+"|"+d.grain;if(!a.has(u))for(let c of d.unfold?s:o){let l=d.re.exec(c.body);if(!l)continue;let m=fe(d,l);if(!(m===null||m<1||m>ne[d.grain])){i.push({lang:d.lang,grain:d.grain,n:m,year:c.year,yearDigits:c.yearDigits,form:d.form}),a.add(u);break}}}return i}function W(e,r=()=>!0){if(e.length===0)return null;let t=e.map(n=>ge(n).filter(r));if(t.some(n=>n.length===0))return null;for(let n of Object.keys(h))for(let o of Object.keys(h[n])){let s=[],i=0;for(let a of t){let d=a.find(l=>l.grain===n&&l.lang===o),c=a.find(l=>l.grain===n&&l.lang==="en")??d;if(!c)break;c.lang===o&&i++,s.push(c)}if(s.length===e.length&&(o==="en"||i>0))return{lang:o,grain:n,readings:s}}return null}var K=[{name:"likert7_agreement",minMatches:5,canonical:["strongly disagree","disagree","slightly disagree","neutral","slightly agree","agree","strongly agree"]},{name:"likert5_agreement",minMatches:3,canonical:["strongly disagree","disagree","neutral","agree","strongly agree"]},{name:"likert3_agreement",minMatches:2,canonical:["disagree","neutral","agree"]},{name:"likert5_satisfaction",minMatches:3,canonical:["very dissatisfied","dissatisfied","neutral","satisfied","very satisfied"]},{name:"likert3_satisfaction",minMatches:2,canonical:["dissatisfied","neutral","satisfied"]},{name:"likert5_quality",minMatches:3,canonical:["poor","fair","good","very good","excellent"]},{name:"likert3_quality",minMatches:2,canonical:["poor","fair","good"]},{name:"frequency5",minMatches:3,canonical:["never","rarely","sometimes","often","always"]},{name:"intensity5",minMatches:3,canonical:["not at all","slightly","moderately","very","extremely"]},{name:"importance5",minMatches:3,canonical:["not important","slightly important","moderately important","very important","extremely important"]},{name:"severity_low_critical",minMatches:3,canonical:["low","medium","high","critical"]},{name:"severity_low_urgent",minMatches:3,canonical:["low","medium","high","urgent"]},{name:"severity_none_critical",minMatches:3,canonical:["none","mild","moderate","severe","critical"]},{name:"priority_p4_p1",minMatches:3,canonical:["p4","p3","p2","p1","p0"]},{name:"severity_trivial_blocker",minMatches:3,canonical:["trivial","minor","major","critical","blocker"]},{name:"severity_minor_severe",minMatches:3,canonical:["minor","moderate","major","severe"]},{name:"magnitude5_medium",minMatches:3,canonical:["very low","low","medium","high","very high"]},{name:"magnitude5_moderate",minMatches:3,canonical:["very low","low","moderate","high","very high"]},{name:"speed5",minMatches:3,canonical:["very slow","slow","moderate","fast","very fast"]},{name:"temperature6",minMatches:3,canonical:["freezing","cold","cool","mild","warm","hot"]},{name:"experience6",minMatches:3,canonical:["novice","beginner","intermediate","advanced","expert","master"]},{name:"tier_metal",minMatches:3,canonical:["bronze","silver","gold","platinum","diamond"]},{name:"tshirt_letter_sizes",minMatches:4,canonical:["xxs","xs","s","m","l","xl","xxl","xxxl"]},{name:"tshirt_word_sizes",minMatches:3,canonical:["extra small","small","medium","large","extra large"]},{name:"nps_bands",minMatches:2,canonical:["detractor","passive","promoter"]},{name:"likelihood5",minMatches:3,canonical:["very unlikely","unlikely","neutral","likely","very likely"]},{name:"education",minMatches:3,canonical:["none","primary","secondary","bachelors","masters","doctoral"]},{name:"grades_a_to_f",minMatches:3,canonical:["a","b","c","d","f"]},{name:"grades_a_to_f_plusminus",minMatches:4,canonical:["a+","a","a-","b+","b","b-","c+","c","c-","d+","d","d-","f"]}],he={seldom:"rarely",infrequently:"rarely","hardly ever":"rarely",occasionally:"sometimes",periodically:"sometimes","now and then":"sometimes",frequently:"often",frequent:"often",regularly:"often",commonly:"often",usually:"often",constantly:"always","every time":"always","all the time":"always",consistently:"always",continually:"always",bad:"poor",weak:"poor",subpar:"poor",mediocre:"fair",passable:"fair","so so":"fair",decent:"good",solid:"good",outstanding:"excellent",superb:"excellent",exceptional:"excellent",stellar:"excellent",unsatisfied:"dissatisfied",unhappy:"dissatisfied",displeased:"dissatisfied",happy:"satisfied",content:"satisfied",pleased:"satisfied",delighted:"very satisfied","highly satisfied":"very satisfied","extremely satisfied":"very satisfied","highly dissatisfied":"very dissatisfied","extremely dissatisfied":"very dissatisfied",neither:"neutral",undecided:"neutral","no opinion":"neutral","neither agree nor disagree":"neutral","completely agree":"strongly agree","totally agree":"strongly agree","completely disagree":"strongly disagree","totally disagree":"strongly disagree","highly unlikely":"very unlikely","extremely unlikely":"very unlikely","highly likely":"very likely","extremely likely":"very likely","almost certain":"very likely",bachelor:"bachelors","bachelor's":"bachelors",undergraduate:"bachelors","bachelor degree":"bachelors","master's":"masters",graduate:"masters","master degree":"masters",doctorate:"doctoral",phd:"doctoral"},pe=(()=>{let e=new Set;for(let r of K)for(let t of r.canonical)e.add(f(t));return e})(),ye=(()=>{let e=new Map;for(let[r,t]of Object.entries(he)){let n=f(r);pe.has(n)||e.has(n)||e.set(n,f(t))}return e})();function U(e){return ye.get(e)??e}var we=new Set(["hour","hr","day","dow","dom","weekday","week","wk","woy","month","mth","quarter","qtr","year","yr","semester","trimester","decade","period","fiscal","fy","rank","level","lvl","tier","grade","band","decile","percentile","quartile","quintile","score","rating","stars","step","stage","phase","round","wave","episode","chapter","age","cohort","generation","seniority","position","sequence","seq","priority"]);function $e(e){if(!e)return!1;for(let r of M(e))if(we.has(r))return!0;return N(e)!==null||z(e)!==null}function f(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}function X(e){return S(e.normalize("NFD").replace(/\p{Diacritic}/gu,""))}function ke(e){let r=new Map;for(let[t,n]of e){let o=X(t);if(!o)continue;let s=r.get(o);r.set(o,s===void 0||s===n?n:-1)}return r}function v(e){let r=new Map;for(let[t,n]of e)for(let o of t)r.set(f(o),n);return r}var C=[{name:"weekday_mon_sun",minMatches:4,dict:v([[["monday","mon"],0],[["tuesday","tue","tues"],1],[["wednesday","wed","weds"],2],[["thursday","thu","thur","thurs","thr"],3],[["friday","fri"],4],[["saturday","sat"],5],[["sunday","sun"],6]])},{name:"month_jan_dec",minMatches:4,dict:v([[["january","jan"],0],[["february","feb"],1],[["march","mar"],2],[["april","apr"],3],[["may"],4],[["june","jun"],5],[["july","jul"],6],[["august","aug"],7],[["september","sep","sept"],8],[["october","oct"],9],[["november","nov"],10],[["december","dec"],11]])},{name:"quarter_q1_q4",minMatches:3,dict:v([[["q1","qtr 1","qtr1","quarter 1","q 1"],0],[["q2","qtr 2","qtr2","quarter 2","q 2"],1],[["q3","qtr 3","qtr3","quarter 3","q 3"],2],[["q4","qtr 4","qtr4","quarter 4","q 4"],3]])}],Y={};function be(e){let r=e||"";if(!r)return{weekday:new Map,month:new Map};let t=Y[r];if(t)return t;let n=new Map,o=new Map,s=(a,d,u)=>{let c=f(d);c&&a.set(c,u);let l=f(d.replace(/\./g,""));l&&l!==c&&a.set(l,u)};try{let a=new Intl.DateTimeFormat(r,{weekday:"long",timeZone:"UTC"}),d=new Intl.DateTimeFormat(r,{weekday:"short",timeZone:"UTC"});for(let l=0;l<7;++l){let m=new Date(Date.UTC(2024,0,1+l));s(n,a.format(m),l),s(n,d.format(m),l)}let u=new Intl.DateTimeFormat(r,{month:"long"}),c=new Intl.DateTimeFormat(r,{month:"short"});for(let l=0;l<12;++l){let m=new Date(Date.UTC(2020,l,15));s(o,u.format(m),l),s(o,c.format(m),l)}}catch{}let i={weekday:n,month:o};return Y[r]=i,i}function $(e,r){if(r.size===0)return e;let t=new Map(e);for(let[n,o]of r)t.has(n)||t.set(n,o);return t}function ve(e,r){let t=be(r);for(let n of C){let o=n.name==="weekday_mon_sun"?$(n.dict,t.weekday):n.name==="month_jan_dec"?$(n.dict,t.month):n.dict,s=!0,i=null,a=new Map;for(let[u,c]of e){let l=o.get(u);if(l===void 0){i=i??ke(o);let m=i.get(X(u));l=m===void 0||m<0?void 0:m}if(l===void 0){s=!1;break}a.has(l)||a.set(l,c)}if(!s||a.size<n.minMatches)continue;let d=[...a.entries()].sort((u,c)=>u[0]-c[0]).map(u=>u[1]);return{pattern:n.name,orderedDomain:d}}return Ce(e)}var H=C.find(e=>e.name==="quarter_q1_q4");function Ce(e){let r=[...e.values()],t=W(r,s=>s.grain==="quarter"&&s.year===null&&(s.lang==="en"||s.form==="word"));if(!t||t.lang==="en")return null;let n=new Map;if(t.readings.forEach((s,i)=>{n.has(s.n)||n.set(s.n,r[i])}),n.size<H.minMatches)return null;let o=[...n.entries()].sort((s,i)=>s[0]-i[0]).map(s=>s[1]);return{pattern:H.name,orderedDomain:o}}function B(e){let r=new Map;for(let t of e){if(t==null)continue;let n=String(t);if(n.length===0)continue;let o=f(n);r.has(o)||r.set(o,n)}return r}var _e=15,Me=10,xe=(()=>{let e=["xxs","xs","s","sm","small","m","med","medium","l","lg","large","xl","xlarge","xxl","xxxl","2xl","3xl","4xl","y","n","yes","no","t","f","true","false","na","n/a","n a","none","null","unknown","other","all","both","low","medium","med","high","very low","very high","minimal","critical","urgent"],r=new Set(e.map(f));for(let t of C)for(let n of t.dict.keys())r.add(n);return r})();function Re(e){let r=e.trim();return r.length===0||r.length>Me||(r.match(/\p{L}/gu)||[]).length>1?!1:/\p{Nd}/u.test(r)}function De(e){let r=e.trim();return r.length===1&&/[\p{L}\p{Nd}]/u.test(r)}function He(e){if(!e||e.length===0)return null;let r=new Set,t=[];for(let n of e){if(n==null)continue;let o=String(n);if(r.has(o))continue;let s=f(o);if(!(s===""||xe.has(s)||Re(o)||De(o))||(r.add(o),t.push(o),t.length>_e))return null}return t.length>0?t:null}var je=/^(\p{L}{0,3}) ?([0-9]+)\s*[-–—:.)]\s*(.+)$/u;function Se(e){let r=null,t=new Set,n=[];for(let o of e.values()){let s=je.exec(o.trim());if(!s)return null;let i=s[1].toLowerCase();if(r===null)r=i;else if(i!==r)return null;let a=Number(s[2]);if(t.has(a)||f(s[3])==="")return null;t.add(a),n.push({code:a,original:o,label:s[3]})}return n}function qe(e,r){let t=Q(B(e.map(a=>a.label)),r);if(t===null)return;if(t.orderedDomain.length!==e.length)return null;let n=new Map;for(let a of e)n.set(a.label,a);let o=t.orderedDomain.map(a=>n.get(a));if(o.some(a=>a===void 0))return null;let s=!0,i=!0;for(let a=1;a<o.length;++a)o[a].code<=o[a-1].code&&(s=!1),o[a].code>=o[a-1].code&&(i=!1);return!s&&!i?null:{pattern:t.pattern,orderedDomain:o.map(a=>a.original)}}function Ke(e,r){if(!e||e.length<2)return null;let t=B(e);if(t.size<2)return null;let n=Se(t);if(n!==null){let s=qe(n,r);if(s!==void 0)return s}let o=Q(t,r);return o!==null?o:n!==null?Le(t):null}var Oe=/^([0-9]+)\s*(?:\.|\)|-)\s*([^\s\d].*)$/u,ze=3,Ne=20;function Le(e){if(e.size<ze||e.size>Ne)return null;let r=new Set,t=[];for(let n of e.values()){let o=Oe.exec(n.trim());if(!o||f(o[2])==="")return null;let s=Number(o[1]);if(r.has(s))return null;r.add(s),t.push({n:s,original:n})}return t.sort((n,o)=>n.n-o.n),{pattern:"numeric_rank_prefix",orderedDomain:t.map(n=>n.original)}}function Q(e,r){let t=new Map;for(let[o,s]of e){let i=U(o);t.has(i)||t.set(i,s)}let n=null;for(let o of K){let s=[];for(let u of o.canonical){let c=t.get(u);c!==void 0&&s.push(c)}if(s.length<o.minMatches)continue;let i=new Set(o.canonical),a=!0;for(let u of e.keys())if(!i.has(U(u))){a=!1;break}if(!a)continue;let d;n===null||s.length>n.matched||s.length===n.matched&&o.canonical.length<n.pattern.canonical.length?d=!0:d=!1,d&&(n={pattern:o,matched:s.length,orderedDomain:s})}return n?{pattern:n.pattern.name,orderedDomain:n.orderedDomain}:ve(e,r)}export{Pe as a,J as b,q as c,O as d,z as e,N as f,ne as g,h,G as i,te as j,ge as k,W as l,$e as m,He as n,Ke as o};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
+
import{a as v}from"./chunk-5MRZID36.mjs";import{a as z,b as g,d as H,e as I}from"./chunk-5HI6TVMM.mjs";var J="AB|CA|Alberta|-113.75|52.18,AK|US|Alaska|-148.32|61.29,AL|US|Alabama|-86.73|33.08,AR|US|Arkansas|-92.85|35.29,AZ|US|Arizona|-111.99|33.32,BC|CA|British Columbia|-122.73|49.27,CA|US|California|-119.21|35.2,CO|US|Colorado|-105|39.63,CT|US|Connecticut|-73.01|41.42,DC|US|District of Columbia|-77.04|38.9,DE|US|Delaware|-75.59|39.57,FL|US|Florida|-81.29|27.53,GA|US|Georgia|-84.02|33.43,HI|US|Hawaii|-157.73|21.26,IA|US|Iowa|-92.79|41.88,ID|US|Idaho|-115.65|44.2,IL|US|Illinois|-88.05|41.67,IN|US|Indiana|-86.27|40.23,KS|US|Kansas|-96|38.59,KY|US|Kentucky|-84.91|38.13,LA|US|Louisiana|-91.28|30.57,MA|US|Massachusetts|-71.28|42.32,MB|CA|Manitoba|-97.3|49.88,MD|US|Maryland|-76.79|39.18,ME|US|Maine|-70.01|43.92,MI|US|Michigan|-83.69|42.56,MN|US|Minnesota|-93.26|44.98,MO|US|Missouri|-92.66|38.73,MS|US|Mississippi|-89.62|32.36,MT|US|Montana|-111.07|46.37,MX01|MX|Aguascalientes|-102.29|21.91,MX02|MX|Baja California|-116.5|32.46,MX03|MX|Baja California Sur|-110.12|23.52,MX04|MX|Campeche|-91.08|19.25,MX05|MX|Chiapas|-92.77|16.28,MX06|MX|Chihuahua|-106.27|30.1,MX07|MX|Coahuila|-101.88|26.32,MX08|MX|Colima|-103.94|19.15,MX09|MX|Mexico City|-99.13|19.41,MX10|MX|Durango|-104.24|24.64,MX11|MX|Guanajuato|-101.37|20.87,MX12|MX|Guerrero|-99.83|17.31,MX13|MX|Hidalgo|-98.81|20.13,MX14|MX|Jalisco|-103.39|20.64,MX15|MX|M\xE9xico|-99.14|19.51,MX16|MX|Michoac\xE1n|-101.68|19.49,MX17|MX|Morelos|-99.15|18.88,MX18|MX|Nayarit|-104.89|21.5,MX19|MX|Nuevo Le\xF3n|-100.26|25.69,MX20|MX|Oaxaca|-96.23|17.05,MX21|MX|Puebla|-98.12|19.07,MX22|MX|Quer\xE9taro|-100.35|20.57,MX23|MX|Quintana Roo|-87.09|20.7,MX24|MX|San Luis Potos\xED|-100.7|22.22,MX25|MX|Sinaloa|-107.49|24.63,MX26|MX|Sonora|-111.05|29.37,MX27|MX|Tabasco|-92.98|17.99,MX28|MX|Tamaulipas|-98.33|24.92,MX29|MX|Tlaxcala|-98.19|19.31,MX30|MX|Veracruz|-96.31|19.2,MX31|MX|Yucat\xE1n|-89.52|20.94,MX32|MX|Zacatecas|-102.7|22.93,NB|CA|New Brunswick|-65.73|45.83,NC|US|North Carolina|-79.61|35.57,ND|US|North Dakota|-98.8|47.31,NE|US|Nebraska|-96.42|41.07,NH|US|New Hampshire|-71.37|43,NJ|US|New Jersey|-74.34|40.51,NL|CA|Newfoundland and Labrador|-52.77|47.55,NM|US|New Mexico|-106.28|34.69,NS|CA|Nova Scotia|-63.11|44.86,NV|US|Nevada|-115.95|36.72,NY|US|New York|-74.13|40.89,OH|US|Ohio|-82.75|40.53,OK|US|Oklahoma|-97.01|35.66,ON|CA|Ontario|-79.27|43.94,OR|US|Oregon|-122.75|44.96,PA|US|Pennsylvania|-76.12|40.23,PE|CA|Prince Edward Island|-63.13|46.23,QC|CA|Quebec|-73.14|45.89,RI|US|Rhode Island|-71.45|41.79,SC|US|South Carolina|-80.69|33.6,SD|US|South Dakota|-98.66|43.89,SK|CA|Saskatchewan|-105.99|51.63,TN|US|Tennessee|-87.53|35.63,TX|US|Texas|-97.51|31.01,UT|US|Utah|-111.96|40.5,VA|US|Virginia|-77.08|37.61,VT|US|Vermont|-73.21|44.48,WA|US|Washington|-121.46|47.29,WI|US|Wisconsin|-88.6|43.36,WV|US|West Virginia|-81.42|38.99,WY|US|Wyoming|-105.54|42.26,YT|CA|Yukon|-135.05|60.72",Q="006|-66.84|18.26,007|-66.15|18.15,008|-64.74|17.74,009|-66.12|18.37,010|-72.6|42.26,011|-72.53|42.07,012|-73.21|42.37,013|-72.51|42.58,014|-71.81|42.59,015|-71.85|42.23,016|-71.84|42.28,017|-71.44|42.33,018|-71.21|42.64,019|-70.89|42.66,020|-71.28|42.12,021|-71.05|42.31,022|-71.04|42.35,023|-70.86|41.98,024|-71.22|42.37,025|-70.6|41.71,026|-70.2|41.73,027|-71.07|41.77,028|-71.62|41.69,029|-71.47|41.82,030|-71.51|42.9,031|-71.48|43,032|-71.65|43.57,033|-71.58|43.26,034|-72.19|42.91,035|-71.31|44.69,036|-72.32|43.17,037|-72.13|43.69,038|-71.1|43.56,039|-70.76|43.24,040|-70.6|43.78,041|-70.27|43.7,042|-70.49|44.38,043|-69.75|44.3,044|-68.83|45.45,045|-69.57|43.99,046|-67.8|44.79,047|-68.34|46.55,048|-69.17|44.2,049|-69.97|44.99,050|-72.43|43.85,051|-72.65|43.28,052|-73.14|43.03,053|-72.77|42.94,054|-72.98|44.58,056|-72.6|44.35,057|-73.04|43.69,058|-72.12|44.68,059|-71.7|44.79,060|-72.81|41.88,061|-72.69|41.74,062|-72.12|41.81,063|-72.03|41.5,064|-72.61|41.46,065|-72.94|41.36,066|-73.22|41.24,067|-73.24|41.68,068|-73.42|41.28,069|-73.57|41.14,070|-74.28|40.76,071|-74.2|40.74,072|-74.2|40.68,073|-74.08|40.71,074|-74.4|41.09,075|-74.17|40.92,076|-74.01|40.94,077|-74.17|40.28,078|-74.81|40.97,079|-74.55|40.74,080|-74.98|39.78,081|-75.07|39.94,082|-74.68|39.32,083|-75.04|39.45,084|-74.48|39.35,085|-74.62|40.25,086|-74.68|40.23,087|-74.22|39.96,088|-74.72|40.54,089|-74.48|40.45,100|-73.96|40.77,101|-73.95|40.78,102|-74.02|40.72,103|-74.15|40.58,104|-73.85|40.9,105|-73.75|41.27,106|-73.74|41.02,107|-73.84|40.96,108|-73.8|40.95,109|-74.27|41.3,110|-73.69|40.74,111|-73.93|40.76,112|-73.94|40.66,113|-73.84|40.73,114|-73.77|40.69,115|-73.62|40.71,116|-73.88|40.57,117|-73.23|40.82,118|-73.5|40.77,119|-72.53|40.95,120|-74.22|42.92,121|-74.4|43.46,122|-73.81|42.7,123|-73.96|42.82,124|-74.27|42.09,125|-73.7|41.89,126|-73.88|41.69,127|-74.75|41.74,128|-73.91|43.61,129|-74.03|44.53,130|-76.16|43.08,131|-76.46|43.27,132|-76.2|43.03,133|-75.07|43.45,134|-75.35|43.03,135|-75.15|43.14,136|-75.39|44.33,137|-75.2|42.21,138|-75.46|42.43,139|-75.88|42.12,140|-78.48|43.01,141|-78.7|42.49,142|-78.8|42.91,143|-78.96|43.12,144|-77.71|42.96,145|-77.17|43.14,146|-77.65|43.17,147|-78.84|42.21,148|-77.18|42.29,149|-76.78|42.09,150|-80.23|40.56,151|-80.18|40.53,152|-79.97|40.46,153|-80.24|40.01,154|-79.65|39.92,155|-78.8|39.95,156|-79.47|40.33,157|-79.02|40.71,158|-78.66|41.32,159|-78.84|40.35,160|-79.88|40.93,161|-80.3|41.19,162|-79.35|41.08,163|-79.58|41.59,164|-80|41.87,165|-80.04|42.1,166|-78.28|40.48,167|-78.47|41.76,168|-78|40.97,169|-77.37|41.8,170|-77.29|40.44,171|-76.78|40.33,172|-77.81|39.98,173|-76.93|39.89,174|-76.72|39.97,175|-76.24|40.05,176|-76.34|40.05,177|-77.22|41.34,178|-76.77|40.93,179|-76.27|40.69,180|-75.45|40.67,181|-75.47|40.6,182|-75.88|40.9,183|-75.19|41.12,184|-75.38|41.53,185|-75.68|41.37,186|-76.17|41.4,187|-75.86|41.22,188|-76.12|41.82,189|-75.14|40.36,190|-75.37|39.97,191|-75.15|40.01,193|-75.78|39.92,194|-75.46|40.19,195|-75.9|40.42,196|-75.95|40.34,197|-75.68|39.53,198|-75.58|39.77,199|-75.46|38.83,200|-77.02|38.9,201|-77.68|38.9,202|-77.03|38.89,203|-77.01|38.86,204|-77.05|38.89,205|-77.01|38.87,206|-76.76|38.45,207|-76.78|38.88,208|-77.23|39.15,209|-76.99|39.05,210|-76.32|39.53,211|-76.73|39.58,212|-76.58|39.31,214|-76.55|39,215|-79.08|39.56,216|-76.02|38.86,217|-77.5|39.52,218|-75.57|38.27,219|-75.94|39.57,220|-77.25|38.78,221|-77.25|38.92,222|-77.11|38.88,223|-77.13|38.79,224|-77.25|38.22,225|-77.51|38.09,226|-78.25|39.03,227|-78.05|38.49,228|-78.79|38.57,229|-78.55|38.02,230|-78.09|37.66,231|-76.96|37.55,232|-77.46|37.51,233|-76.3|36.68,234|-76.66|36.77,235|-76.26|36.87,236|-76.44|37.12,237|-76.38|36.85,238|-77.41|36.94,239|-78.39|37.03,240|-80.1|37.23,241|-79.89|36.9,242|-82.49|36.83,243|-81.13|36.86,244|-79.51|38.05,245|-79.11|37.15,246|-81.8|37.19,247|-81.14|37.39,248|-81.64|37.47,249|-80.32|37.95,250|-81.45|38.27,251|-81.89|38.64,252|-81.45|38.77,253|-81.64|38.42,254|-78.11|39.45,255|-82.19|38.25,256|-82.08|37.76,257|-82.41|38.4,258|-81.21|37.72,259|-80.89|37.83,260|-80.63|40.05,261|-81.27|39.2,262|-80.02|38.75,263|-80.23|39.27,264|-80.65|39.21,265|-80.05|39.59,266|-80.8|38.48,267|-78.98|39.33,268|-79.12|38.88,270|-80.45|36.24,271|-80.24|36.06,272|-79.82|35.86,273|-79.52|35.55,274|-79.81|36.09,275|-78.54|35.93,276|-78.65|35.81,277|-78.9|35.99,278|-77.32|35.88,279|-76.5|36.19,280|-81.2|35.4,281|-80.41|35.21,282|-80.83|35.22,283|-78.94|34.96,284|-78.23|34.39,285|-77.23|35.06,286|-81.36|36.06,287|-82.78|35.51,288|-82.55|35.6,289|-83.97|35.11,290|-80.88|34.19,291|-80.62|33.71,292|-80.96|34.04,293|-81.86|34.78,294|-80.08|33.05,295|-79.49|34.07,296|-82.57|34.61,297|-80.92|34.83,298|-81.74|33.51,299|-80.96|32.55,300|-84.08|33.85,301|-84.91|34.04,302|-84.55|33.25,303|-84.42|33.77,304|-82.11|32.48,305|-83.81|34.58,306|-83.14|33.86,307|-85.1|34.71,308|-82.34|33.35,309|-82.01|33.4,310|-83.42|32.64,312|-83.64|32.83,313|-81.49|31.68,314|-81.15|32.03,315|-82.21|31.4,316|-83.21|31.02,317|-83.87|31.48,318|-84.69|32.45,319|-84.95|32.47,320|-82.58|30.27,321|-81.48|29.39,322|-81.69|30.3,323|-84.25|30.29,324|-85.58|30.55,325|-87.03|30.76,326|-82.6|29.58,327|-81.28|28.79,328|-81.32|28.47,329|-80.67|27.96,330|-80.58|25.31,331|-80.38|25.74,333|-80.25|26.13,334|-81.01|26.64,335|-82.22|28.19,336|-82.47|28.01,337|-82.73|27.85,338|-81.64|27.72,339|-81.71|26.77,341|-81.32|26.11,342|-82.16|27.29,344|-82.35|29.01,346|-82.52|28.41,347|-81.4|28.29,349|-80.72|27.34,350|-86.8|34.05,351|-86.38|33.43,352|-86.77|33.5,354|-87.86|33.07,355|-87.71|33.96,356|-87.4|34.67,357|-86.26|34.75,358|-86.59|34.69,359|-85.94|34.27,360|-86.09|32.09,361|-86.27|32.31,362|-85.65|33.53,363|-85.56|31.34,364|-86.97|31.38,365|-88.14|31.32,366|-88.19|30.68,367|-87.34|32.33,368|-85.41|32.61,369|-88.25|32.12,370|-87.02|36.12,371|-86.23|35.75,372|-86.83|36.15,373|-85.36|35.32,374|-85.33|35.06,376|-82.3|36.36,377|-84.31|36.27,378|-83.35|36.3,379|-83.97|35.97,380|-89.43|35.55,381|-89.96|35.1,382|-88.68|36.29,383|-88.5|35.61,384|-87.36|35.34,385|-85.34|36.18,386|-89.76|34.57,387|-90.81|33.54,388|-88.63|34.36,389|-89.9|33.77,390|-90|32.53,391|-90.67|32.51,392|-90.22|32.32,393|-88.8|32.42,394|-89.26|31.23,395|-89|30.59,396|-90.67|31.32,397|-88.87|33.53,398|-84.67|31.32,400|-85.29|38.07,401|-86.2|37.85,402|-85.66|38.19,403|-84.2|38.06,404|-84.42|37.53,405|-84.45|38.04,406|-84.87|38.22,407|-84.12|36.95,408|-83.26|36.9,409|-83.74|36.95,410|-84.32|38.64,411|-83.06|38.38,412|-82.67|37.89,413|-83.48|37.58,414|-83.15|37.84,415|-82.39|37.46,416|-82.78|37.54,417|-83.25|37.23,418|-82.88|37.21,420|-88.57|36.9,421|-86.09|36.89,422|-87.11|36.95,423|-87.02|37.52,424|-87.7|37.47,425|-84.71|37.15,426|-84.82|36.81,427|-85.73|37.32,430|-82.9|40.21,431|-82.99|39.69,432|-82.97|39.98,433|-83.38|40.55,434|-83.3|41.42,435|-84.22|41.46,436|-83.54|41.67,437|-81.66|39.85,438|-81.88|40.27,439|-80.9|40.25,440|-80.97|41.64,441|-81.66|41.42,442|-81.6|41.13,443|-81.54|41.07,444|-80.77|41.09,445|-80.64|41.05,446|-81.53|40.65,447|-81.39|40.83,448|-82.77|41.02,449|-82.55|40.74,450|-84.48|39.43,451|-83.84|39.16,452|-84.48|39.18,453|-84.3|39.97,454|-84.18|39.74,455|-83.81|39.94,456|-82.86|38.99,457|-81.78|39.35,458|-84.23|40.83,460|-86.13|40.17,461|-86.18|39.62,462|-86.14|39.79,463|-87.05|41.41,464|-87.34|41.55,465|-86.08|41.44,466|-86.28|41.66,467|-85.21|41.17,468|-85.17|41.09,469|-86.14|40.76,470|-85.08|39.16,471|-86.02|38.43,472|-85.74|39.05,473|-85.15|40.09,474|-86.63|38.99,475|-87.03|38.46,476|-87.53|38.13,477|-87.58|38.03,478|-87.29|39.45,479|-87.11|40.5,480|-82.79|42.83,481|-83.62|42.2,482|-83.1|42.38,483|-83.35|42.66,484|-83.22|43.29,485|-83.69|43.03,486|-84.36|43.99,487|-83.67|44.45,488|-84.67|43.02,489|-84.59|42.74,490|-85.54|42.2,491|-86.36|41.87,492|-84.36|42.06,493|-85.57|43.33,494|-86.14|43.39,495|-85.66|42.96,496|-85.52|44.44,497|-84.37|45.17,498|-86.94|46.17,499|-88.93|46.6,500|-94.77|41.63,501|-92.79|41.84,502|-93.67|42.12,503|-93.63|41.59,504|-93.37|43.17,505|-94.45|42.77,506|-92.45|42.65,507|-92.31|42.49,508|-94.56|40.96,510|-95.91|42.6,511|-96.39|42.52,512|-96.06|43.28,513|-95.16|43.27,514|-95.08|42.11,515|-95.55|41.44,516|-95.37|40.74,520|-90.98|42.46,521|-91.73|43.2,522|-92.31|41.9,523|-91.66|41.87,524|-91.69|41.96,525|-92.46|40.95,526|-91.44|40.88,527|-90.88|41.64,528|-90.61|41.56,530|-88.24|43.51,531|-88.33|42.75,532|-87.98|43.06,534|-87.86|42.74,535|-89.66|42.95,537|-89.38|43.08,538|-90.73|42.88,539|-89.55|43.64,540|-92.46|45.08,541|-88.23|45.09,542|-87.6|44.52,543|-88.01|44.53,544|-89.85|44.93,545|-89.86|45.89,546|-90.87|43.93,547|-91.52|44.85,548|-91.63|46.04,549|-88.96|44.19,550|-92.98|45.17,551|-93.08|44.96,553|-94.06|44.99,554|-93.31|45.01,556|-91.03|47.67,557|-92.68|47.39,558|-92.08|46.96,559|-92.28|43.89,560|-94.04|44.02,561|-95.65|43.92,562|-95.75|45.08,563|-94.59|45.83,564|-94.5|46.63,565|-96.08|46.86,566|-94.31|47.88,567|-96.22|48.39,570|-97.07|43.48,571|-96.76|43.54,572|-97.18|45.04,573|-98.53|43.91,574|-98.93|45.36,575|-100.61|43.86,576|-101.59|45.43,577|-103.11|44.26,580|-97.39|46.66,581|-96.83|46.86,582|-97.72|48.25,583|-99.34|48.32,584|-99.12|46.88,585|-100.98|46.76,586|-102.99|46.75,587|-101.7|48.34,588|-103.48|48.2,590|-108.62|45.98,591|-108.45|45.69,592|-105.6|48.2,593|-105.58|46.4,594|-111.24|47.79,595|-109.12|48.38,596|-111.74|46.65,597|-112.31|45.48,598|-114.25|46.97,599|-114.57|48.37,600|-88.15|42.29,601|-88.47|42.01,602|-87.69|42.04,603|-87.79|41.89,604|-88.09|41.39,605|-88.55|41.69,606|-87.69|41.83,607|-87.82|42.03,608|-87.76|41.84,609|-87.92|40.8,610|-89.56|42.18,611|-89.08|42.28,612|-90.29|41.5,613|-89.16|41.34,614|-90.43|40.82,615|-89.68|40.71,616|-89.61|40.72,617|-88.89|40.52,618|-88.15|40.11,619|-88.19|39.66,620|-90.01|39.13,622|-89.72|38.41,623|-91.02|39.99,624|-88.19|39.04,625|-89.21|39.63,626|-90|39.86,627|-89.66|39.8,628|-88.65|38.35,629|-88.89|37.55,630|-90.83|38.35,631|-90.32|38.64,633|-91.11|39.02,634|-91.78|39.93,635|-92.61|40.2,636|-90.64|37.61,637|-89.81|37.37,638|-89.73|36.55,639|-90.62|36.84,640|-94.1|39.07,641|-94.58|39.14,644|-94.69|40.13,645|-94.83|39.75,646|-93.55|39.89,647|-94.15|38.06,648|-94.35|36.93,650|-92.23|38.45,651|-92.19|38.51,652|-92.38|39.21,653|-93.26|38.71,654|-92.03|37.93,655|-91.92|37.67,656|-93.08|36.76,657|-92.43|37.03,658|-93.3|37.22,660|-95.12|38.84,661|-94.73|39.11,662|-94.72|38.95,664|-96.15|39.64,665|-96.34|39.4,666|-95.76|39.06,667|-95.23|37.64,668|-96.39|38.36,669|-97.86|39.77,670|-98.49|37.33,671|-98.4|37.44,672|-97.33|37.7,673|-95.81|37.23,674|-97.79|38.98,675|-98.99|38.25,676|-99.47|39.34,677|-101.15|39.35,678|-100.82|37.91,679|-101.43|37.18,680|-96.46|41.55,681|-96.05|41.24,683|-96.93|40.39,684|-97.26|40.89,685|-96.69|40.82,686|-97.68|41.55,687|-98.16|42.43,688|-99.15|41.34,689|-98.9|40.34,690|-100.99|40.37,691|-101.59|41.42,692|-100.64|42.67,693|-102.84|42.29,700|-89.93|29.63,701|-89.93|30.02,703|-90.65|29.62,704|-90.27|30.66,705|-92.25|30.2,706|-93.21|30.34,707|-91.2|30.57,708|-91.1|30.45,710|-93.4|32.45,711|-93.75|32.47,712|-91.95|32.56,713|-91.86|31.43,714|-92.84|31.57,716|-91.75|33.61,717|-92.79|33.48,718|-93.84|33.66,719|-93.61|34.4,720|-91.9|34.92,721|-92.56|34.93,722|-92.37|34.7,723|-90.59|35.07,724|-90.76|36.04,725|-91.81|36.01,726|-92.93|36.15,727|-94.05|36.11,728|-93.33|35.3,729|-94.08|35.29,730|-97.83|35.31,731|-97.5|35.43,734|-97.14|34.21,735|-98.81|34.53,736|-99.33|35.52,737|-98.2|36.42,738|-99.54|36.5,739|-101.67|36.74,740|-96.19|36.34,741|-95.96|36.15,743|-95.02|36.55,744|-95.44|35.64,745|-95.65|34.66,746|-97.05|36.71,747|-95.41|34.02,748|-96.66|35.17,749|-94.69|35.23,750|-96.76|33.06,751|-96.32|32.48,752|-96.78|32.79,753|-96.84|32.81,754|-95.67|33.37,755|-94.45|33.3,756|-94.58|32.49,757|-95.37|32.24,758|-95.68|31.44,759|-94.29|31.29,760|-97.54|32.59,761|-97.38|32.77,762|-97.44|33.52,763|-98.87|33.73,764|-98.59|32.61,765|-97.62|31.11,766|-97.06|31.7,767|-97.15|31.57,768|-99.37|31.23,769|-100.88|31.03,770|-95.39|29.79,772|-95.37|29.77,773|-95.24|30.48,774|-96.02|29.38,775|-94.98|29.68,776|-94.16|30.27,777|-94.19|29.96,778|-96.32|30.67,779|-96.95|28.92,780|-99.01|28.67,781|-97.93|29.08,782|-98.53|29.47,783|-98.14|27.63,784|-97.44|27.73,785|-98.19|26.39,786|-98.1|30.27,787|-97.78|30.3,788|-100.26|29.44,789|-96.87|29.92,790|-101.63|35.48,791|-101.85|35.21,792|-100.57|34.25,793|-102.15|33.37,794|-101.88|33.58,795|-100.31|32.7,796|-99.72|32.46,797|-102.22|31.57,798|-104.17|30.53,799|-106.16|31.8,800|-105.11|39.91,801|-104.47|39.51,802|-104.93|39.78,803|-105.31|40.04,804|-106.16|39.98,805|-105.35|40.57,806|-104.49|40.38,807|-103.09|40.4,808|-103.16|39.12,809|-104.67|38.79,810|-103.58|37.77,811|-106.39|37.54,812|-106.39|38.46,813|-108.42|37.49,814|-108.02|38.43,815|-108.7|38.92,816|-107.86|39.99,820|-105.27|41.31,821|-110.51|44.57,822|-104.67|42.39,823|-107.03|41.75,824|-108.65|44.32,825|-108.91|43.14,826|-106.43|43.1,827|-105|44.2,828|-106.71|44.55,829|-109.71|42.82,830|-110.51|43.7,831|-110.53|42.6,832|-112.17|42.66,833|-114.23|42.81,834|-111.63|43.86,835|-115.77|46.07,836|-115.99|44,837|-116.04|43.58,838|-116.47|47.77,840|-110.86|40.53,841|-111.81|40.71,843|-112.18|41.67,844|-112.01|41.23,845|-109.72|38.09,846|-111.68|39.63,847|-112.82|37.61,850|-112.09|33.63,851|-111.41|33,852|-111.69|33.6,853|-113.44|33.49,855|-110.3|33.43,856|-110.59|32,857|-111.09|32.18,859|-109.81|34.23,860|-111.15|35.89,863|-112.57|34.85,864|-113.79|35.66,865|-109.55|36.03,870|-106.9|35.22,871|-106.72|35.12,873|-108.56|35.44,874|-108.23|36.59,875|-106.04|36.27,877|-104.68|36.06,878|-107.94|34,879|-107.48|33.2,880|-108.03|32.37,881|-103.81|34.26,882|-104.07|32.87,883|-105.48|33.62,884|-103.79|35.74,890|-114.84|37,891|-115.42|36.33,893|-116.96|39.5,894|-118.06|41.29,895|-119.72|39.9,897|-119.8|39.18,898|-115.71|40.95,900|-118.32|34.04,902|-118.76|34.07,903|-118.34|33.95,904|-118.48|34.02,905|-118.33|33.83,906|-118.03|33.93,907|-118.45|33.39,908|-118.18|33.8,910|-118.25|34.28,911|-118.13|34.15,912|-118.25|34.19,913|-118.55|34.36,914|-118.47|34.18,915|-118.33|34.19,916|-118.38|34.18,917|-117.78|34.14,918|-118.13|34.09,919|-116.62|32.73,920|-116.7|33.16,921|-117.14|32.85,922|-115.5|33.59,923|-117.14|34.66,924|-117.33|34.17,925|-117.06|33.68,926|-117.73|33.63,927|-117.85|33.74,928|-117.71|33.85,930|-119.12|34.39,931|-119.97|34.48,932|-119.07|35.98,933|-119.01|35.35,934|-120.5|35.38,935|-118.36|37.37,936|-119.72|36.95,937|-119.85|36.71,939|-121.42|36.34,940|-122.31|37.41,941|-122.44|37.77,943|-122.13|37.44,944|-122.32|37.53,945|-122.05|38.09,946|-122.19|37.78,947|-122.26|37.89,948|-122.3|37.97,949|-122.74|38.14,950|-121.42|36.85,951|-121.76|37.33,952|-120.79|38.14,953|-120.56|37.62,954|-123.15|39.08,955|-123.75|40.5,956|-121.34|38.62,957|-120.86|39.13,958|-121.44|38.58,959|-121.73|39.47,960|-122.42|41.06,961|-120.33|40.52,967|-155.53|19.6,968|-157.83|21.34,969|144.77|13.45,970|-121.45|45.3,971|-123.79|45.64,972|-122.74|45.57,973|-123.26|44.68,974|-123.46|43.61,975|-123.06|42.34,976|-120.4|42.67,977|-120.77|44.32,978|-118.59|45.21,979|-117.63|43.34,980|-121.78|47.42,981|-122.32|47.6,982|-121.79|48.39,983|-123.87|47.96,984|-122.46|47.18,985|-123.27|46.94,986|-122.15|45.99,988|-119.91|48,989|-120.57|46.71,990|-117.56|47.62,991|-118.13|47.91,992|-117.4|47.67,993|-118.82|46.4,994|-117.21|46.2,995|-156.93|60.89,996|-151.66|60.82,997|-146.69|65.19,998|-136.2|58.94,999|-131.24|55.86",j="ABW|-70.02|12.54,AFG|68|34.63,AGO|14.24|-9.84,AIA|-63.06|18.22,ALA|19.93|60.1,ALB|19.81|41.14,AND|1.53|42.51,ARE|55.24|24.99,ARG|-61.28|-32.95,ARM|44.52|40.23,ASM|-170.7|-14.28,ATA|21.28|-80.52,ATF|70.22|-49.35,ATG|-61.84|17.12,AUS|144.91|-33.49,AUT|15.51|47.93,AZE|49.02|40.37,BDI|29.49|-3.34,BEL|4.37|50.89,BEN|2.33|7.65,BES|-68.27|12.15,BFA|-2.08|12.15,BGD|90.42|23.65,BGR|24.92|42.71,BHR|50.57|26.18,BHS|-77.34|25.06,BIH|17.97|44.18,BLM|-62.85|17.9,BLR|27.81|53.57,BLZ|-88.41|17.54,BMU|-64.78|32.29,BOL|-65.79|-17.39,BRA|-45.89|-17.51,BRB|-59.62|13.11,BRN|114.74|4.82,BTN|89.69|27.32,BWA|25.99|-23.43,CAF|18.32|4.94,CAN|-79.4|43.71,CCK|96.82|-12.16,CHE|7.96|47.07,CHL|-71.21|-33.72,CHN|114.44|32,CIV|-4.89|6.16,CMR|11.19|5.41,COD|20.23|-4.72,COG|14.18|-4.04,COK|-159.78|-21.21,COL|-74.85|5.93,COM|43.58|-11.89,CPV|-23.87|15.66,CRI|-84.14|9.99,CUB|-80.25|22.21,CUW|-68.88|12.12,CXR|105.68|-10.42,CYM|-81.38|19.32,CYP|33.31|35,CZE|15.44|49.89,DEU|9.65|51.24,DJI|43.15|11.59,DMA|-61.39|15.3,DNK|11.42|55.79,DOM|-70.07|18.75,DZA|3.55|35.62,ECU|-79.29|-1.4,EGY|31.22|29.84,ERI|38.84|15.25,ESH|-13.19|27.14,ESP|-2.91|39.69,EST|25.17|59.29,ETH|39.02|9.26,FIN|24.87|61.26,FJI|178.2|-17.85,FLK|-57.86|-51.69,FRA|2.87|47.28,FRO|-6.77|62.01,FSM|158.16|6.92,GAB|10.22|-0.06,GBR|-1.37|52.49,GEO|43.92|41.84,GGY|-2.54|49.46,GHA|-0.98|6.4,GIB|-5.35|36.14,GIN|-12.8|9.75,GLP|-61.53|16.23,GMB|-16.59|13.41,GNB|-15.48|11.9,GNQ|9.77|1.86,GRC|23.73|37.98,GRD|-61.75|12.05,GRL|-51.72|64.18,GTM|-90.71|14.73,GUF|-52.64|5.04,GUM|144.82|13.5,GUY|-58.11|6.63,HKG|114.15|22.33,HMD|73.5|-53.1,HND|-87.41|14.94,HRV|16.21|45.31,HTI|-72.34|18.54,HUN|19.21|47.39,IDN|106.85|-6.21,IMN|-4.48|54.15,IND|78.36|21,IOT|71.35|-6.19,IRL|-6.87|53.12,IRN|51.6|34.4,IRQ|44.78|33.65,ISL|-21.7|64.22,ISR|34.97|32.07,ITA|12|42.73,JAM|-76.91|18.03,JEY|-2.1|49.19,JOR|35.96|32.03,JPN|137.27|35.53,KAZ|70.17|47.24,KEN|36.81|-0.97,KGZ|73.96|41.94,KHM|104.7|11.75,KIR|172.98|1.33,KNA|-62.72|17.3,KOR|127.51|36.58,KWT|48.06|29.2,Kosovo|20.9|42.58,LAO|102.6|17.97,LBN|35.53|33.87,LBR|-10.39|6.36,LBY|13.19|32.89,LCA|-60.97|14.04,LIE|9.52|47.14,LKA|80.25|7.25,LSO|27.67|-29.38,LTU|24.18|55.04,LUX|6.08|49.56,LVA|24.13|56.85,MAC|113.55|22.19,MAF|-63.08|18.07,MAR|-6.65|33.43,MCO|7.42|43.74,MDA|28.82|47.09,MDG|47.46|-18.89,MDV|73.51|4.18,MEX|-100.65|21.59,MHL|171.38|7.09,MKD|21.47|41.8,MLI|-7.15|12.95,MLT|14.46|35.91,MMR|96.18|18.74,MNE|19.17|42.53,MNG|105.33|47.94,MNP|145.75|15.21,MOZ|32.58|-25.97,MRT|-14.58|18.01,MSR|-62.21|16.79,MTQ|-61.01|14.64,MUS|57.51|-20.23,MWI|34.34|-14.24,MYS|103.35|3.45,MYT|45.23|-12.77,N. Cyprus|33.56|35.27,NAM|17.19|-21.34,NCL|166.47|-22.26,NER|5.05|14.04,NFK|167.97|-29.05,NGA|5.91|7.87,NIC|-86.17|12.33,NIU|-169.92|-19.05,NLD|5.21|52.09,NOR|9.62|60.46,NPL|84.7|27.64,NRU|166.93|-0.55,NZL|174.54|-38.9,OMN|57.69|23.27,PAK|71.47|30.24,PAN|-79.83|8.98,PCN|-130.1|-25.07,PER|-76.4|-11.18,PHL|121.05|14.65,PLW|134.58|7.52,PNG|147.4|-7.71,POL|19.26|51.79,PRI|-66.24|18.35,PRK|126.54|39.52,PRT|-9.08|39.42,PRY|-57.15|-25.27,PSE|35.23|31.78,PYF|-149.59|-17.57,QAT|51.49|25.32,REU|55.45|-21.08,ROU|25.47|45.38,RUS|51.84|54.52,RWA|29.78|-1.98,SAU|43.01|23.76,SDN|31.67|14.67,SEN|-16.73|14.66,SGP|103.85|1.33,SGS|-36.51|-54.28,SHN|-5.72|-15.92,SJM|15.65|78.22,SLB|159.97|-9.44,SLE|-12.4|8.36,SLV|-89.08|13.7,SMR|12.45|43.94,SOM|44.96|4.91,SPM|-56.18|46.78,SRB|20.62|44.5,SSD|29.91|6.61,STP|6.73|0.34,SUR|-55.18|5.84,SVK|18.69|48.55,SVN|14.83|46.16,SWE|16.03|58.86,SWZ|31.28|-26.43,SXM|-63.05|18.03,SYC|55.46|-4.62,SYR|37.18|35.12,Somaliland|46.23|9.76,TCA|-72.1|21.74,TCD|16.57|11.53,TGO|1.16|6.8,THA|100.71|13.71,TJK|69.39|39.08,TKM|59.4|38.74,TLS|125.65|-8.67,TON|-175.2|-21.14,TTO|-61.4|10.5,TUN|10.23|35.87,TUR|32.1|39.5,TUV|179.19|-8.52,TWN|121.06|24.37,TZA|36.11|-5.88,UGA|32.23|0.59,UKR|32.8|48.99,URY|-56.28|-34.1,USA|-93.51|37.4,UZB|69.22|41.26,VAT|12.45|41.9,VCT|-61.21|13.14,VEN|-67.82|9.83,VGB|-64.62|18.43,VIR|-64.8|17.9,VNM|106.63|10.82,VUT|168.31|-17.74,WLF|-176.17|-13.28,WSM|-171.77|-13.83,YEM|44.62|14.36,ZAF|26.96|-28.33,ZMB|28.41|-13.86,ZWE|30.49|-18.56";var O3=95,$=new Set(["n a","none","null","nil","unknown","not applicable","not available","not specified","unspecified","missing","blank","empty","tbd","to be determined"]),s3=new Set(Array.from($).filter(n=>n.includes(" ")&&n!=="n a").map(n=>n.replace(/ /g,"")));function m(n){return n?$.has(n)||s3.has(n.replace(/ /g,"")):!0}var D3=80;function u(n){return z(n.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()).replace(/[^\p{L}\p{Nd}\s]/gu," ").replace(/\s+/g," ").trim()}function R(n){return g(n)}var l3="AD AND,AE ARE,AF AFG,AG ATG,AI AIA,AL ALB,AM ARM,AO AGO,AQ ATA,AR ARG,AS ASM,AT AUT,AU AUS,AW ABW,AX ALA,AZ AZE,BA BIH,BB BRB,BD BGD,BE BEL,BF BFA,BG BGR,BH BHR,BI BDI,BJ BEN,BL BLM,BM BMU,BN BRN,BO BOL,BQ BES,BR BRA,BS BHS,BT BTN,BV BVT,BW BWA,BY BLR,BZ BLZ,CA CAN,CC CCK,CD COD,CF CAF,CG COG,CH CHE,CI CIV,CK COK,CL CHL,CM CMR,CN CHN,CO COL,CR CRI,CU CUB,CV CPV,CW CUW,CX CXR,CY CYP,CZ CZE,DE DEU,DJ DJI,DK DNK,DM DMA,DO DOM,DZ DZA,EC ECU,EE EST,EG EGY,EH ESH,ER ERI,ES ESP,ET ETH,FI FIN,FJ FJI,FK FLK,FM FSM,FO FRO,FR FRA,GA GAB,GB GBR,GD GRD,GE GEO,GF GUF,GG GGY,GH GHA,GI GIB,GL GRL,GM GMB,GN GIN,GP GLP,GQ GNQ,GR GRC,GS SGS,GT GTM,GU GUM,GW GNB,GY GUY,HK HKG,HM HMD,HN HND,HR HRV,HT HTI,HU HUN,ID IDN,IE IRL,IL ISR,IM IMN,IN IND,IO IOT,IQ IRQ,IR IRN,IS ISL,IT ITA,JE JEY,JM JAM,JO JOR,JP JPN,KE KEN,KG KGZ,KH KHM,KI KIR,KM COM,KN KNA,KP PRK,KR KOR,KW KWT,KY CYM,KZ KAZ,LA LAO,LB LBN,LC LCA,LI LIE,LK LKA,LR LBR,LS LSO,LT LTU,LU LUX,LV LVA,LY LBY,MA MAR,MC MCO,MD MDA,ME MNE,MF MAF,MG MDG,MH MHL,MK MKD,ML MLI,MM MMR,MN MNG,MO MAC,MP MNP,MQ MTQ,MR MRT,MS MSR,MT MLT,MU MUS,MV MDV,MW MWI,MX MEX,MY MYS,MZ MOZ,NA NAM,NC NCL,NE NER,NF NFK,NG NGA,NI NIC,NL NLD,NO NOR,NP NPL,NR NRU,NU NIU,NZ NZL,OM OMN,PA PAN,PE PER,PF PYF,PG PNG,PH PHL,PK PAK,PL POL,PM SPM,PN PCN,PR PRI,PS PSE,PT PRT,PW PLW,PY PRY,QA QAT,RE REU,RO ROU,RS SRB,RU RUS,RW RWA,SA SAU,SB SLB,SC SYC,SD SDN,SE SWE,SG SGP,SH SHN,SI SVN,SJ SJM,SK SVK,SL SLE,SM SMR,SN SEN,SO SOM,SR SUR,SS SSD,ST STP,SV SLV,SX SXM,SY SYR,SZ SWZ,TC TCA,TD TCD,TF ATF,TG TGO,TH THA,TJ TJK,TK TKL,TL TLS,TM TKM,TN TUN,TO TON,TR TUR,TT TTO,TV TUV,TW TWN,TZ TZA,UA UKR,UG UGA,UM UMI,US USA,UY URY,UZ UZB,VA VAT,VC VCT,VE VEN,VG VGB,VI VIR,VN VNM,VU VUT,WF WLF,WS WSM,YE YEM,YT MYT,ZA ZAF,ZM ZMB,ZW ZWE",L=(()=>{let n=new Map;for(let e of l3.split(",")){let[t,o]=e.split(" ");t&&o&&n.set(t,o)}return n})(),u3=new Set(L.keys()),c3=new Set(L.values()),M3=["en","fr","es","de","it","pt","ru","ja","zh","ko","ar","hi","tr","pl","he","nl","sv","fi","nb","da","cs","el","uk","ro","id","vi","th","sk","hu","hr"],S3={usa:"USA","u.s.":"USA","u.s.a.":"USA",us:"USA",america:"USA","united states of america":"USA","the united states":"USA",uk:"GBR","u.k.":"GBR","great britain":"GBR",britain:"GBR",england:"GBR","south korea":"KOR","north korea":"PRK",korea:"KOR","ivory coast":"CIV","cote d ivoire":"CIV",vietnam:"VNM",laos:"LAO",syria:"SYR",iran:"IRN",russia:"RUS",moldova:"MDA",tanzania:"TZA",bolivia:"BOL",venezuela:"VEN",brunei:"BRN","czech republic":"CZE",czechia:"CZE",slovakia:"SVK",uae:"ARE","united arab emirates":"ARE",drc:"COD","dr congo":"COD","democratic republic of the congo":"COD","republic of the congo":"COG",congo:"COG",swaziland:"SWZ",eswatini:"SWZ","cape verde":"CPV","cabo verde":"CPV",burma:"MMR",myanmar:"MMR",holland:"NLD","the netherlands":"NLD",netherlands:"NLD",vatican:"VAT","vatican city":"VAT",palestine:"PSE",macau:"MAC",macao:"MAC","hong kong":"HKG",taiwan:"TWN",turkey:"TUR",turkiye:"TUR",macedonia:"MKD","north macedonia":"MKD",gambia:"GMB","the gambia":"GMB",bahamas:"BHS","the bahamas":"BHS","east timor":"TLS","timor leste":"TLS"},d3=Object.freeze({"Antigua and Barbuda":"ATG","Bosnia and Herzegovina":"BIH","Heard Island and McDonald Islands":"HMD","Saint Kitts and Nevis":"KNA","St Kitts and Nevis":"KNA","Saint Pierre and Miquelon":"SPM","St Pierre and Miquelon":"SPM","Saint Vincent and the Grenadines":"VCT","St Vincent and the Grenadines":"VCT","Sao Tome and Principe":"STP","South Georgia and the South Sandwich Islands":"SGS","Svalbard and Jan Mayen":"SJM","Trinidad and Tobago":"TTO","Turks and Caicos Islands":"TCA","Turks and Caicos":"TCA","Wallis and Futuna":"WLF","Saint Helena, Ascension and Tristan da Cunha":"SHN","Bonaire, Sint Eustatius and Saba":"BES","United Kingdom of Great Britain and Northern Ireland":"GBR","Bolivia, Plurinational State of":"BOL","Bolivia (Plurinational State of)":"BOL","Brunei Darussalam":"BRN","Congo, The Democratic Republic of the":"COD","Congo, Democratic Republic of the":"COD","Democratic Republic of Congo":"COD","Falkland Islands (Malvinas)":"FLK","Holy See (Vatican City State)":"VAT","Holy See":"VAT","Iran, Islamic Republic of":"IRN","Iran (Islamic Republic of)":"IRN","Islamic Republic of Iran":"IRN","Korea, Republic of":"KOR","Republic of Korea":"KOR","Korea (the Republic of)":"KOR","Korea, Democratic People's Republic of":"PRK","Democratic People's Republic of Korea":"PRK","Korea (the Democratic People's Republic of)":"PRK","Lao People's Democratic Republic":"LAO","Micronesia, Federated States of":"FSM","Micronesia (Federated States of)":"FSM","Moldova, Republic of":"MDA","Republic of Moldova":"MDA","Palestine, State of":"PSE","State of Palestine":"PSE","Russian Federation":"RUS","Syrian Arab Republic":"SYR","Taiwan, Province of China":"TWN","Tanzania, United Republic of":"TZA","United Republic of Tanzania":"TZA","Venezuela, Bolivarian Republic of":"VEN","Venezuela (Bolivarian Republic of)":"VEN","Viet Nam":"VNM","Virgin Islands, British":"VGB","Virgin Islands, U.S.":"VIR","Saint Martin (French part)":"MAF","Sint Maarten (Dutch part)":"SXM","Netherlands (Kingdom of the)":"NLD","Macedonia, the former Yugoslav Republic of":"MKD"}),X=null,x=null;function q(){if(X)return X;let n=new Map,e=[],t=["en",...M3.filter(i=>i!=="en")];for(let i of t){let a=null;try{a=new Intl.DisplayNames([i],{type:"region"})}catch{continue}for(let[r,s]of L){let c;try{c=a.of(r)}catch{c=void 0}if(!c||c===r)continue;let d=u(c);d&&!n.has(d)&&n.set(d,s),e.push([c,s])}}for(let[i,a]of Object.entries(d3)){let r=u(i);r&&!n.has(r)&&n.set(r,a),e.push([i,a])}for(let[i,a]of Object.entries(S3)){let r=u(i);r&&n.set(r,a),e.push([i,a])}let o=new I;for(let[i,a]of e){let r=u(i);n.get(r)===a&&(o.add(i,a),o.add(r,a))}return X=n,x=o,n}function f3(){return x||q(),x}function p3(n){if(n==null)return null;let e=String(n).trim();if(!e)return null;let t=u(e),o=q().get(t);return o||(m(t)?null:f3().get(R(e))??null)}function G(n){return L.get(String(n||"").trim().toUpperCase())??null}function k(n){if(n==null)return null;let e=String(n).trim();if(!e)return null;let t=e.toUpperCase();return t.length===3&&c3.has(t)?t:t.length===2&&u3.has(t)?L.get(t)??null:p3(e)}var A3={"north-america":"N",world:"W"};function _(n,e){let t=n.filter(o=>o.row.kinds.includes(A3[e||"north-america"]));return t.length?t:(e||"north-america")==="world"?n:t}var O=v;function _3(n){n!==O&&(O=n||"",P=null,h=null,B=null,E=null,K=null)}function C3(){return O.length>0}var g3={US:"washington",CA:"ottawa",MX:"mexico city",GB:"london",FR:"paris",DE:"berlin",IT:"rome",ES:"madrid",PT:"lisbon",NL:"amsterdam",BE:"brussels",CH:"bern",AT:"vienna",IE:"dublin",PL:"warsaw",SE:"stockholm",NO:"oslo",DK:"copenhagen",FI:"helsinki",IS:"reykjavik",CZ:"prague",SK:"bratislava",HU:"budapest",RO:"bucharest",BG:"sofia",GR:"athens",TR:"ankara",UA:"kyiv",RU:"moscow",RS:"belgrade",HR:"zagreb",SI:"ljubljana",EE:"tallinn",LV:"riga",LT:"vilnius",JP:"tokyo",CN:"beijing",KR:"seoul",KP:"pyongyang",IN:"new delhi",PK:"islamabad",BD:"dhaka",LK:"colombo",TH:"bangkok",VN:"hanoi",PH:"manila",ID:"jakarta",MY:"kuala lumpur",SG:"singapore",MM:"naypyidaw",KH:"phnom penh",LA:"vientiane",NP:"kathmandu",AF:"kabul",IR:"tehran",IQ:"baghdad",SA:"riyadh",AE:"abu dhabi",QA:"doha",KW:"kuwait city",BH:"manama",OM:"muscat",JO:"amman",LB:"beirut",SY:"damascus",IL:"jerusalem",YE:"sanaa",EG:"cairo",LY:"tripoli",TN:"tunis",DZ:"algiers",MA:"rabat",SD:"khartoum",ET:"addis ababa",KE:"nairobi",TZ:"dodoma",UG:"kampala",NG:"abuja",GH:"accra",CI:"yamoussoukro",SN:"dakar",ML:"bamako",CM:"yaounde",CD:"kinshasa",CG:"brazzaville",AO:"luanda",ZM:"lusaka",ZW:"harare",MZ:"maputo",BW:"gaborone",NA:"windhoek",ZA:"pretoria",AU:"canberra",NZ:"wellington",PG:"port moresby",FJ:"suva",BR:"brasilia",AR:"buenos aires",CL:"santiago",PE:"lima",CO:"bogota",VE:"caracas",EC:"quito",BO:"la paz",PY:"asuncion",UY:"montevideo",GY:"georgetown",SR:"paramaribo",CU:"havana",DO:"santo domingo",HT:"port au prince",JM:"kingston",TT:"port of spain",PA:"panama city",CR:"san jose",NI:"managua",HN:"tegucigalpa",SV:"san salvador",GT:"guatemala city",BZ:"belmopan",AZ:"baku",AM:"yerevan",GE:"tbilisi",KZ:"astana",UZ:"tashkent",TM:"ashgabat",KG:"bishkek",TJ:"dushanbe",MN:"ulaanbaatar",BY:"minsk",MD:"chisinau",AL:"tirana",MK:"skopje",BA:"sarajevo",ME:"podgorica",XK:"pristina",CY:"nicosia",MT:"valletta",LU:"luxembourg"},P=null;function U(){if(P)return P;let n=new Map,e=O,t=(o,i,a)=>{if(!o)return;let r=n.get(o);r?r.some(s=>s.row===i)||r.push({row:i,primary:a}):n.set(o,[{row:i,primary:a}])};for(let o of e.split(",")){let i=o.split("|");if(i.length<7)continue;let a={a1:i[1],cc:i[2],lon:+i[3],lat:+i[4],pop:+i[5],kinds:i[6]||"N"};i.length>8&&i[8]&&(a.tags=i[8].split(";").filter(Boolean));let r=g3[a.cc];if(r&&g(i[0])===g(r)&&(a.tags||(a.tags=[]),a.tags.includes("capital")||a.tags.push("capital")),t(u(i[0]),a,!0),i.length>7&&i[7])for(let s of i[7].split(";"))t(u(s),a,!1)}for(let o of n.values())o.sort((i,a)=>a.row.pop-i.row.pop);return P=n,n}var m3=200,h=null;function i3(){if(h)return h;let n=new Map;for(let[e,t]of U()){if(!e.endsWith(" city"))continue;let o=e.slice(0,-5);!o||U().get(o)?.some(i=>i.primary)||t[0].row.pop<m3||n.set(o,t)}return h=n,n}function D(n,e){if(!n)return;let t=n3(U(),i3(),n);if(t)return t;if(m(n))return;let o=e??g(n);if(H(o))return n3(R3(),N3(),o)}function n3(n,e,t){let o=n.get(t);if(o?.some(r=>r.primary))return o;let i=e.get(t);if(!i)return o;let a=i.map(r=>({row:r.row,primary:!0}));return o?[...a,...o]:a}var B=null;function R3(){return B||(B=o3(U())),B}var E=null;function N3(){return E||(E=o3(i3())),E}function o3(n){let e=new Map;for(let[t,o]of n){let i=g(t);if(!H(i))continue;let a=e.get(i);if(!a){e.set(i,o.slice());continue}for(let r of o){let s=a.findIndex(c=>c.row===r.row);s<0?a.push(r):r.primary&&!a[s].primary&&(a[s]=r)}}for(let t of e.values())t.sort((o,i)=>i.row.pop-o.row.pop);return e}var K=null;function T3(){if(K)return K;let n=new Map;for(let t of j.split(",")){let o=t.split("|");o.length<3||n.set(o[0],{lon:+o[1],lat:+o[2]})}let e=new Map;for(let t of U().values())for(let o of t){let i=G(o.row.cc);if(!i)continue;let a=e.get(i);(a===void 0||o.row.pop>a)&&(e.set(i,o.row.pop),n.set(i,{lon:o.row.lon,lat:o.row.lat}))}return K=n,n}var V=null;function w(){if(V)return V;let n=new Map;for(let e of J.split(",")){let t=e.split("|");if(t.length<5)continue;let o={key:t[0],cc:t[1],name:t[2],lon:+t[3],lat:+t[4]};n.set(u(o.key),o);let i=u(o.name);i==="mexico"&&o.cc==="MX"?(n.set("estado de mexico",o),n.set("edomex",o)):n.set(i,o)}return V=n,n}var F=null;function y3(){if(F)return F;let n=new I;for(let[e,t]of w())n.add(e,t);return F=n,n}var Y=null;function I3(){if(Y)return Y;let n=new Map;for(let e of Q.split(",")){let t=e.split("|");t.length<3||n.set(t[0],{lon:+t[1],lat:+t[2]})}return Y=n,n}var L3=new Set(["USA","PRI","VIR","GUM","ASM","MNP"]),G3=new Set(["USA","CAN","MEX"]);function t3(n){if(n==null)return null;let e=u(String(n));if(!e)return null;let t=w().get(e);return t?t.key:m(e)?null:y3().get(R(String(n)))?.key??null}var a3={us:"US",usa:"US","u s":"US","u s a":"US",america:"US","united states":"US","united states of america":"US",ca:"CA",can:"CA",canada:"CA",mx:"MX",mex:"MX",mexico:"MX","estados unidos mexicanos":"MX"};function z3(n){if(n==null)return null;let e=u(String(n));if(!e)return null;let t=a3[e];return t||(m(e)?null:U3().get(R(String(n)))??null)}var Z=null;function U3(){if(Z)return Z;let n=new I;for(let[e,t]of Object.entries(a3))n.add(e,t);return Z=n,n}function b3(n){return w().get(u(n))?.cc??null}function P3(n){let e=b3(n);return e?G(e):null}function v3(n){return r3(n)[0]??null}function h3(n){if(n==null)return null;let e=String(n).trim().replace(/\.0+$/,"");if(!e)return null;let t=/^(\d{5})(-\d{4})?$/.exec(e);return t?t[1]:/^\d{3,4}$/.test(e)?e.padStart(5,"0"):null}function r3(n){if(n==null)return[];let e=String(n).trim().replace(/\.0+$/,"");if(!e)return[];if(/^\d{3}$/.test(e)){let o=e.padStart(5,"0").slice(0,3);return o===e?[e]:[e,o]}let t=h3(e);return t?[t.slice(0,3)]:[]}function B3(n){return!!n&&n.ambiguous===!0&&!("precision"in n)}function E3(n){let e=null,t=typeof n.lat=="string"?n.lat.trim():n.lat,o=typeof n.lon=="string"?n.lon.trim():n.lon;if(t!=null&&t!==""&&o!==void 0&&o!==null&&o!==""){let r=+t,s=+o;if(isFinite(r)&&isFinite(s)&&r>=-90&&r<=90&&s>=-180&&s<=180)if(r===0&&s===0)e={lat:0,lon:0,precision:"latlon"};else return{lat:r,lon:s,precision:"latlon"}}let i=k(n.country),a=t3(n.state);if(a&&i&&P3(a)!==i&&(a=null),n.city!==void 0&&n.city!==null){let r=u(String(n.city)),s=D(r,R(String(n.city))),c=s?_(s,n.mapKind):null;if(c&&c.length){let d=n.state===void 0||n.state===null?"":String(n.state).trim(),T=d?u(d):"",y=d?t3(d):null,f=[],N=-1;for(let M of c){let l=M.row,p=0;if(d&&l.a1!=="")if(y&&l.a1===y||u(l.a1)===T)p++;else continue;if(i)if(G(l.cc)===i)p++;else continue;p>N?(N=p,f=[M]):p===N&&f.push(M)}f.some(M=>M.primary)&&(f=f.filter(M=>M.primary));let A=new Map;for(let M of f)A.set(M.row.lon.toFixed(2)+","+M.row.lat.toFixed(2),M.row);if(A.size===1){let M=f[0].row;return{lat:M.lat,lon:M.lon,precision:"city"}}if(A.size>1)return{ambiguous:!0,matches:A.size}}}if(!i||L3.has(i))for(let r of r3(n.zip)){let s=I3().get(r);if(s)return{lat:s.lat,lon:s.lon,precision:"zip3"}}if(a){let r=w().get(u(a));if(r)return{lat:r.lat,lon:r.lon,precision:"state"}}if(i&&(n.mapKind!=="north-america"||G3.has(i))){let r=T3().get(i);if(r)return{lat:r.lat,lon:r.lon,precision:"country"}}return e}var b={latlon:0,city:1,zip3:2,state:3,country:4},e3=8;function J3(n,e){let t=new Array(n.length),o=new Array(n.length),i=new Array(n.length),a=new Set,r=[],s=new Set,c=[],d=new Set,T=[],y={latlon:0,city:0,zip3:0,state:0,country:0},f=0,N=0,A=null;for(let l=0;l<n.length;++l){let p=n[l],C=E3({...p,mapKind:e});if(B3(C)){t[l]=null,o[l]=null,i[l]=null,N++;let S=W(p);S&&!d.has(S.toLowerCase())&&(d.add(S.toLowerCase()),T.length<e3&&T.push(S))}else if(C){if(t[l]=C.lat,o[l]=C.lon,i[l]=C.precision,f++,y[C.precision]++,(A===null||b[C.precision]>b[A])&&(A=C.precision),b[C.precision]>b.city){let S=W(p);S&&!s.has(S.toLowerCase())&&(s.add(S.toLowerCase()),c.length<e3&&c.push(S))}}else{t[l]=null,o[l]=null,i[l]=null;let S=W(p);S&&!a.has(S.toLowerCase())&&(a.add(S.toLowerCase()),r.push(S))}}let M=!C3()&&n.some(l=>l.city!==null&&l.city!==void 0&&String(l.city).trim()!=="");return{lat:t,lon:o,precisions:i,precision:A,precisionCounts:y,coarseExamples:c,unmatched:r,ambiguousRows:N,ambiguousExamples:T,matchedRows:f,totalRows:n.length,...M?{cityTableMissing:!0}:{}}}function W(n){let e=[n.city,n.state,n.zip,n.country].filter(t=>t!=null&&String(t).trim()!=="").map(t=>String(t).trim()).join(", ");return e||(n.label===null||n.label===void 0?"":String(n.label).trim())}function Q3(n,e){let t=u(String(n??""));if(!t)return[];let o=D(t,R(String(n??"")));if(!o)return[];let i=k(e??null),a=new Set;for(let r of o)if(!(i&&G(r.row.cc)!==i))for(let s of r.row.tags??[])a.add(s);return Array.from(a)}function j3(n,e){if(!n)return!1;let t=D(n);return t?_(t,e).length>0:!1}function $3(n,e){let t=new Set,o=0;for(let i of n){if(i==null)continue;let a=u(String(i));if(m(a)||t.has(a))continue;t.add(a);let r=D(a,R(String(i)));r&&_(r,e).length>0&&o++}return t.size===0?0:Math.round(o/t.size*1e3)/10}export{O3 as a,m as b,D3 as c,u as d,R as e,L as f,u3 as g,c3 as h,q as i,p3 as j,k,_3 as l,C3 as m,G3 as n,t3 as o,z3 as p,v3 as q,h3 as r,r3 as s,B3 as t,E3 as u,J3 as v,Q3 as w,j3 as x,$3 as y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
+
import{a as en,b as L,c as sn,d as on,e as rn,g as an,h as cn,i as un,j as ln,k as W,r as V,x}from"./chunk-INMDBTAR.mjs";import{i as nn}from"./chunk-4VN252CK.mjs";import{e as tn}from"./chunk-5HI6TVMM.mjs";var An="006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191193194195196197198199200201202203204205206207208209210211212214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310312313314315316317318319320321322323324325326327328329330331333334335336337338339341342344346347349350351352354355356357358359360361362363364365366367368369370371372373374376377378379380381382383384385386387388389390391392393394395396397398400401402403404405406407408409410411412413414415416417418420421422423424425426427430431432433434435436437438439440441442443444445446447448449450451452453454455456457458460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508510511512513514515516520521522523524525526527528530531532534535537538539540541542543544545546547548549550551553554556557558559560561562563564565566567570571572573574575576577580581582583584585586587588590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620622623624625626627628629630631633634635636637638639640641644645646647648650651652653654655656657658660661662664665666667668669670671672673674675676677678679680681683684685686687688689690691692693700701703704705706707708710711712713714716717718719720721722723724725726727728729730731734735736737738739740741743744745746747748749750751752753754755756757758759760761762763764765766767768769770772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816820821822823824825826827828829830831832833834835836837838840841843844845846847850851852853855856857859860863864865870871873874875877878879880881882883884890891893894895897898900902903904905906907908910911912913914915916917918919920921922923924925926927928930931932933934935936937939940941943944945946947948949950951952953954955956957958959960961967968969970971972973974975976977978979980981982983984985986988989990991992993994995996997998999",w=new Set(An.match(/.{3}/g)??[]);var dn=[["AL","Alabama"],["AK","Alaska"],["AZ","Arizona"],["AR","Arkansas"],["CA","California"],["CO","Colorado"],["CT","Connecticut"],["DE","Delaware"],["FL","Florida"],["GA","Georgia"],["HI","Hawaii"],["ID","Idaho"],["IL","Illinois"],["IN","Indiana"],["IA","Iowa"],["KS","Kansas"],["KY","Kentucky"],["LA","Louisiana"],["ME","Maine"],["MD","Maryland"],["MA","Massachusetts"],["MI","Michigan"],["MN","Minnesota"],["MS","Mississippi"],["MO","Missouri"],["MT","Montana"],["NE","Nebraska"],["NV","Nevada"],["NH","New Hampshire"],["NJ","New Jersey"],["NM","New Mexico"],["NY","New York"],["NC","North Carolina"],["ND","North Dakota"],["OH","Ohio"],["OK","Oklahoma"],["OR","Oregon"],["PA","Pennsylvania"],["RI","Rhode Island"],["SC","South Carolina"],["SD","South Dakota"],["TN","Tennessee"],["TX","Texas"],["UT","Utah"],["VT","Vermont"],["VA","Virginia"],["WA","Washington"],["WV","West Virginia"],["WI","Wisconsin"],["WY","Wyoming"],["DC","District of Columbia"],["PR","Puerto Rico"],["GU","Guam"],["VI","U.S. Virgin Islands"],["AS","American Samoa"],["MP","Northern Mariana Islands"]],pn=new Set(dn.map(n=>n[0])),Cn={"Ala.":"AL","Alab.":"AL","Ariz.":"AZ","Ark.":"AR","Calif.":"CA","Cal.":"CA","Colo.":"CO","Col.":"CO","Conn.":"CT","Del.":"DE","Fla.":"FL","Flor.":"FL","Ga.":"GA","Ill.":"IL","Ind.":"IN","Kan.":"KS","Kans.":"KS","Ky.":"KY","La.":"LA","Md.":"MD","Mass.":"MA","Mich.":"MI","Minn.":"MN","Miss.":"MS","Mo.":"MO","Mont.":"MT","Neb.":"NE","Nebr.":"NE","Nev.":"NV","N.H.":"NH","N.J.":"NJ","N.M.":"NM","N.Mex.":"NM","N. Mex.":"NM","N.Y.":"NY","N.C.":"NC","N.D.":"ND","N.Dak.":"ND","N. Dak.":"ND","Okla.":"OK","Ore.":"OR","Oreg.":"OR","Pa.":"PA","Penn.":"PA","Penna.":"PA","R.I.":"RI","S.C.":"SC","S.D.":"SD","S.Dak.":"SD","S. Dak.":"SD","Tenn.":"TN","Tex.":"TX","Vt.":"VT","Va.":"VA","Wash.":"WA","W.Va.":"WV","W. Va.":"WV","Wis.":"WI","Wisc.":"WI","Wyo.":"WY","D.C.":"DC","Wash. D.C.":"DC","Wash., D.C.":"DC","P.R.":"PR","V.I.":"VI"},Y=(()=>{let n=new Map;for(let[s,o]of dn)n.set(g(o),s);n.set(g("Washington DC"),"DC"),n.set(g("Washington D.C."),"DC"),n.set(g("US Virgin Islands"),"VI");for(let[s,o]of Object.entries(Cn)){let r=g(s);r&&!n.has(r)&&n.set(r,o)}return n})(),In=(()=>{let n=new tn;for(let[s,o]of Y)n.add(s,o);return n})();function mn(n){let s=g(n),o=Y.get(s);return o||(L(s)?null:In.get(rn(n))??null)}var Sn=new Set(["01","02","04","05","06","08","09","10","11","12","13","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","44","45","46","47","48","49","50","51","53","54","55","56","60","66","69","72","78"]);function yn(n){return n.trim().toUpperCase()}function g(n){return on(n)}var H=new Set(["country","countries","nation","nationality","iso","geo"]),U=new Set(["state","province","st"]),fn=new Set(["zip","zipcode","postal","postcode","plz"]),Mn=new Set(["county","fips","borough","parish"]),Tn=new Set(["city","cities","town","municipality","metro","location","place"]);function y(n,s){if(!n)return!1;for(let o of nn(n))if(s.has(o))return!0;return!1}var Dn=95,On=5,_n=6e4;function Un(n,s,o){if(!n||n.length===0)return null;let r=[],I=new Set;for(let t of n){if(t==null)continue;let e=String(t).trim();if(e.length===0||L(g(e)))continue;let i=e.toLowerCase();if(!I.has(i)&&(I.add(i),r.push(e),r.length>_n))return null}let N=r.length;if(N<2)return null;let h=r.map(yn),M=r.map(g),O=un(),d=0,p=0,m=0,T=0,D=0,l=0,_=0,F=0,Z=0,K=0,$=0,P=0,J=t=>(V(t)??"").slice(0,3),X=0,B=0,E=0,v=y(s,fn);for(let t=0;t<N;++t){let e=h[t],i=M[t],c=r[t],S=an.has(e),C=pn.has(e);cn.has(e)&&d++,S&&p++,C&&m++,S&&C&&X++;let G=O.has(i)||ln(c)!==null,R=Y.has(i)||mn(c)!==null;G&&T++,R&&D++,G&&R&&B++,W(c)&&K++,C&&R&&E++,/^\d{5}(-\d{4})?$/.test(c)||v&&/^\d{3,4}$/.test(c)?(l++,w.has(J(c))&&P++):/^\d{4}$/.test(c)&&$++,/^\d{5}$/.test(c)&&Sn.has(c.slice(0,2))&&_++,x(i)&&F++,x(i,"world")&&Z++}if(!v&&l>0){l+=$;for(let t of r)/^\d{4}$/.test(t)&&w.has(J(t))&&P++}let j=t=>t/N*100,A=[],u=(t,e,i,c=!1)=>{let S=j(e),C=t==="city-name"||t==="city-name-world";S<(C?sn:Dn)||e<2||c&&e<On&&!y(s,t==="country-name"?H:C?Tn:U)||A.push({kind:t,matched:e,spec:i,pct:S})};u("country-iso3",d,6),u("country-name",T,5,!0),u("us-state-name",D,5,!0),u("us-zip5",l,4),u("us-county-fips",_,4),u("country-iso2",p,3),u("us-state-code",m,3);let gn=A.length;u("city-name",F,2,!0),A.length===gn&&u("city-name-world",Z,2,!0);let Nn=m-E,hn=D-E;Nn>0&&hn>0&&u("us-state-name",m+D-E,5,!0);let b=Math.max(d,p,T);if(K>b){let t=d===b?"country-iso3":T===b?"country-name":"country-iso2";u(t,K,t==="country-iso3"?6:t==="country-name"?5:3,t==="country-name")}if(A.length===0)return null;A.sort((t,e)=>e.pct-t.pct||e.spec-t.spec);let a=A[0],k=!1,q={"country-iso2":"us-state-code","us-state-code":"country-iso2","us-zip5":"us-county-fips","us-county-fips":"us-zip5","country-name":"us-state-name","us-state-name":"country-name"}[a.kind],z=A[1],Q=q&&z&&z.kind===q&&Math.abs(a.pct-z.pct)<=15;if(a.kind==="country-iso2"||a.kind==="us-state-code"){let t=a.matched>0?X/a.matched:0,e=y(s,H),i=y(s,U);if(Q||t>=.5){if(e&&!i)return f("country-iso2",p,!1);if(i&&!e)return f("us-state-code",m,!1);k=!0}}else if(a.kind==="us-zip5"||a.kind==="us-county-fips"){let t=_===l&&l===N,e=y(s,fn),i=y(s,Mn);return i&&!e?f("us-county-fips",_,!1):e&&!i?f("us-zip5",l,!1):t?f("us-zip5",l,!0):f("us-zip5",l,!1)}else if(Q&&(a.kind==="country-name"||a.kind==="us-state-name")){let t=a.matched>0?B/a.matched:0,e=y(s,H),i=y(s,U);if(e&&!i)return f("country-name",T,!1);if(i&&!e)return f("us-state-name",D,!1);t>=.5&&(k=!0)}return f(a.kind,a.matched,k);function f(t,e,i){let S={geoKind:t,geoMatchPct:Math.round(j(t==="us-zip5"?P:e)*10)/10};return i&&(S.geoAmbiguous=!0),S}}function En(n,s){if(n==null)return null;let o=String(n).trim();if(o.length===0)return null;switch(s){case"country-iso3":case"country-iso2":case"country-name":return W(o);case"us-state-code":case"us-state-name":{let r=yn(o);return pn.has(r)?r:mn(o)}case"us-zip5":return V(o);case"us-county-fips":return/^\d{5}$/.test(o)&&Sn.has(o.slice(0,2))?o:null;default:return null}}function Yn(n){switch(n){case"country-iso3":case"country-iso2":case"country-name":case"us-state-code":case"us-state-name":case"us-zip5":case"us-county-fips":return!0;default:return!1}}function Rn(n,s){return s==="us-zip5"?w.has(n.slice(0,3)):!0}function Fn(n,s){let o=new Array(n.length),r=new Set,I=[],N=0;for(let h=0;h<n.length;++h){let M=En(n[h],s),O=M!==null&&Rn(M,s)?M:null;if(o[h]=O,O!==null)N++;else{let d=n[h];if(d!=null){let p=String(d).trim();if(p.length>0){let m=p.toLowerCase();r.has(m)||(r.add(m),I.push(p))}}}}return{iso:o,unmatched:I,matchedRows:N,totalRows:n.length}}export{fn as a,y as b,Un as c,En as d,Yn as e,Fn as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
-
import{L as D,S as E}from"./chunk-
|
|
2
|
+
import{L as D,S as E}from"./chunk-QVV3ACEI.mjs";import{B as S}from"./chunk-4VN252CK.mjs";import P from"papaparse";function L(e){if(!e)return".";try{return new Intl.NumberFormat(e).formatToParts(1.5).find(t=>t.type==="decimal")?.value===","?",":"."}catch{return"."}}var x="[ \\u00A0\\u202F]",p="(?:[eE][+-]?\\d+)?",O=new RegExp(`^[+-]?(?:\\d{1,3}(?:,\\d{3})+|\\d+)(?:\\.\\d+)?${p}$`),k=new RegExp(`^[+-]?(?:\\d{1,3}(?:\\.\\d{3})+|\\d{1,3}(?:${x}\\d{3})+|\\d+)(?:,\\d+)?${p}$`),N=/^[+-]?\d{1,3}[.,]\d{3}$/,_=[/^[+-]?\d{1,3}(?:,\d{3}){2,}$/,new RegExp(`^[+-]?(?:\\d{1,3}(?:,\\d{3})+|\\d+)\\.\\d+${p}$`)],j=[/^[+-]?\d{1,3}(?:\.\d{3}){2,}$/,new RegExp(`^[+-]?(?:\\d{1,3}(?:\\.\\d{3})+|\\d{1,3}(?:${x}\\d{3})+|\\d+),\\d+${p}$`)];function T(e,i){let t=0,n=0;for(let c of e){if(typeof c!="string")continue;let o=c.trim();o===""||N.test(o)||(_.some(s=>s.test(o))?t++:j.some(s=>s.test(o))&&n++)}return n>0&&t===0?",":t>0?".":L(i)}function y(e,i){let t=String(e??"").trim();return t===""?null:i===","?k.test(t)?parseFloat(t.replace(/[. ]/g,"").replace(",",".")):null:O.test(t)?parseFloat(t.replace(/,/g,"")):null}function R(e,i){return y(e,i)!==null}var C=500,M=/^[+-]?\d{1,15}$/,q=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/,F=/^\d{1,2}[\/\-.]\d{1,2}[\/\-.]\d{2,4}$/;function V(e,i="."){let t=0,n=0,c=0,o=0;for(let s of e){if(s==null)continue;if(typeof s=="number"){o++,n++,Number.isInteger(s)&&t++;continue}if(s instanceof Date){o++,c++;continue}if(typeof s=="boolean"){o++;continue}let l=String(s).trim();if(l!==""){if(o++,M.test(l)){t++,n++;continue}if(R(l,i)){n++;continue}if((q.test(l)||F.test(l))&&!isNaN(Date.parse(l))){c++;continue}}}return o===0?"String":c===o?"DateTime":t===o?"Integer":n===o?"Decimal":"String"}function v(e,i,t="."){if(e==null)return null;if(typeof e=="number")return i==="String"?String(e):e;if(e instanceof Date)return i==="DateTime"?e:e.toISOString();if(typeof e=="boolean")return String(e);let n=String(e).trim();if(n==="")return null;switch(i){case"Integer":return M.test(n)?parseInt(n,10):null;case"Decimal":return y(n,t);case"DateTime":return S(n);default:return n}}function B(e){let i=(e||"").toLowerCase().replace(/\(.*$/,"").trim();return/^(tinyint|smallint|int|integer|int2|int4|int8|bigint|serial|bigserial)$/.test(i)?"Integer":/^(decimal|numeric|money|smallmoney|float|real|double|double precision|number)$/.test(i)?"Decimal":/^(date|datetime|datetime2|smalldatetime|datetimeoffset|timestamp|timestamptz|time)$/.test(i)?"DateTime":(/^(bit|bool|boolean)$/.test(i),"String")}function f(e,i,t){if(e.length===0)throw new Error("ingest: no columns were resolved from the source. Supply column descriptors, or use a source shape that carries them (grid/table/objects/sql).");let n=e.length,c=e.map((r,a)=>i.slice(0,C).map(m=>m?.[a])),o=c.map(r=>T(r,t.locale)),s=e.map((r,a)=>r.dataType??V(c[a],o[a])),l=new Set((t.measures??[]).map(r=>r.toLowerCase())),A=new Set((t.dimensions??[]).map(r=>r.toLowerCase())),I=new Set((t.nonAdditive??[]).map(r=>r.toLowerCase())),$=e.map((r,a)=>{let m=r.name.toLowerCase(),u=r.isMeasure??((s[a]==="Integer"||s[a]==="Decimal")&&!D(r.name));l.has(m)&&(u=!0),A.has(m)&&(u=!1);let b={name:r.name,dataType:s[a],isMeasure:u};return u&&I.has(m)&&(b.discourageAggregationAcrossGroups=!0),b}),d=new E;d.dedupRows=t.dedup!==!1,d.setColumns($);for(let r=0;r<i.length;r++){let a=i[r];d.addRow(Array.from({length:n},(m,u)=>v(a?.[u],s[u],o[u])),r)}let w=d.getColumnsWithStats(t.privacyLevel??"20",t.locale??"en"),g=new Map(w.map(r=>[r.name,r]));e.forEach(r=>{let a=g.get(r.name);a&&(r.format&&(a.modelFormat=r.format),r.description&&(a.modelDesc=r.description))});for(let[r,a]of Object.entries(t.formats??{})){let m=g.get(r);m&&(m.modelFormat=a)}for(let[r,a]of Object.entries(t.descriptions??{})){let m=g.get(r);m&&(m.modelDesc=a)}for(let r of t.groupBy??[]){let a=g.get(r);a&&(a.isGrouping=!0)}return{columns:w,rows:d.toObjectArray(),totalRows:d.getRowCount(),index:d}}function h(e,i){return e.map(t=>Array.isArray(t)?t:i.map(n=>t[n]))}function U(e,i){let t=[],n=new Set,c=Math.min(e.length,Math.max(1,i));for(let o=0;o<c;o++){let s=e[o];if(!(!s||typeof s!="object"))for(let l of Object.keys(s))n.has(l)||(n.add(l),t.push(l))}return t}function Y(e,i={}){switch(e.kind){case"csv":{let t=P.parse(e.text,{skipEmptyLines:!0});if(t.errors?.length&&t.data.length===0)throw new Error(`ingest: CSV parse failed - ${t.errors[0].message}`);let n=t.data;if(n.length<2)throw new Error("ingest: CSV needs a header line plus at least one data row.");let c=n[0].map(o=>(o??"").trim());return f(c.map(o=>({name:o})),n.slice(1),i)}case"grid":{if(!e.header?.length)throw new Error("ingest: 'grid' needs a non-empty header.");return f(e.header.map(t=>({name:(t??"").trim()})),e.rows??[],i)}case"table":{if(!e.columns?.length)throw new Error("ingest: 'table' needs at least one column descriptor.");let t=e.columns.map(n=>n.name);return f(e.columns,h(e.rows??[],t),i)}case"objects":{let t=e.rows??[],n=e.columns?.length?e.columns:U(t,i.columnScanLimit??C).map(c=>({name:c}));if(!n.length)throw new Error("ingest: 'objects' produced no columns - the rows array is empty or holds no object keys.");return f(n,h(t,n.map(c=>c.name)),i)}case"sql":{if(!e.schema?.length)throw new Error("ingest: 'sql' needs at least one schema column.");let t=e.schema.map(n=>{let c=B(n.dataType);return{name:n.name,dataType:c,isMeasure:n.isMeasure,format:n.format,description:n.description}});return f(t,h(e.rows??[],t.map(n=>n.name)),i)}default:{let t=e;throw new Error(`ingest: unknown source kind '${t?.kind}'. Expected one of: csv, grid, table, objects, sql.`)}}}export{L as a,T as b,y as c,B as d,Y as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
-
import{a as ae}from"./chunk-U3H6UBOO.mjs";import{a as ue,b as le}from"./chunk-2LR73DNS.mjs";import{c as Ge}from"./chunk-VIWJJUDA.mjs";import{b as ke,f as Fe}from"./chunk-TPVDJHU6.mjs";import{e as De,k as se,m as Oe,n as Pe,o as oe}from"./chunk-GXQQHMEY.mjs";import{B as pe,D as Le,f as ge,h as re,i as j,j as Me,k as ie,n as xe,o as Re,q as Te,s as Ne,t as Ee,v as Ie,w as H,x as ve,y as we}from"./chunk-4VN252CK.mjs";var ht=[[24.4,49.4,-125,-66.9],[51.2,71.5,-168,-129.9],[18.9,22.3,-160.3,-154.8]],bt=[7,72,-172,-52];function We(t,e,n){return t>=n[0]&&t<=n[1]&&e>=n[2]&&e<=n[3]}var X=t=>Math.round(t*10)/10;function Be(t,e=3){let n=[],i=[],r=0,o=0;for(let l of t){let u=l?.lat,c=l?.lon;if(typeof u!="number"||typeof c!="number"||!isFinite(u)||!isFinite(c)||u<-90||u>90||c<-180||c>180)continue;n.push(u),i.push(c);let d=l?.country?String(l.country).trim().toUpperCase():"",f=d?ce(d):null;f?((d==="US"||d==="USA")&&r++,f==="north-america"&&o++):(ht.some(m=>We(u,c,m))&&r++,We(u,c,bt)&&o++)}let s=n.length;return s<e?null:(n.sort((l,u)=>l-u),i.sort((l,u)=>l-u),{pctUsa:X(r/s*100),pctNa:X(o/s*100),latP5:X(H(n,.05)),latP95:X(H(n,.95)),lonP5:X(H(i,.05)),lonP95:X(H(i,.95)),n:s})}var ze={"north-america":"AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI","south-america":"AR BO BR CL CO EC FK GF GY PE PY SR UY VE",europe:"AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA",africa:"AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW",asia:"AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE",oceania:"AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS",antarctica:"AQ BV GS HM TF"},J=(()=>{let t=new Map;for(let e of Object.keys(ze))for(let n of ze[e].split(/\s+/))n&&t.set(n,e);return t})();function yt(t){for(let[e,n]of t){let i=J.get(e);i&&!J.has(n)&&J.set(n,i)}}yt(ke);function ce(t){if(!t)return null;let e=String(t).trim().toUpperCase();if(!e)return null;let n=J.get(e);if(n)return n;let i=Fe(String(t));return i?J.get(i)??null:null}function Hn(t,e=2){return he(t.map(n=>[n,1]),e)}function he(t,e=2){let n=new Map,i=0;for(let[s,l]of t){let u=ce(s);if(!u)continue;let c=typeof l=="number"&&isFinite(l)&&l>0?l:1;n.set(u,(n.get(u)??0)+c),i+=c}if(i<e||!n.size)return null;let r="europe",o=-1;for(let s of Array.from(n.keys()).sort()){let l=n.get(s);l>o&&(r=s,o=l)}return{dominantGeoRegion:r,dominantGeoRegionPct:X(o/i*100),regionCount:n.size,n:i}}import mt from"papaparse";var St=["rate","ratio","pct","percent","percentage","rating","share","score","index","nps","csat","margin","yield","coverage","utilization","utilisation","z[_-]?score","average","avg","mean","median","stddev","variance","gpa","percentile","quantile","efficiency","accuracy","probability","multiplier","coefficient","correlation","occupancy","age","bmi","temperature","density","pressure","humidity","ph","velocity","speed","elevation","altitude","latency","throughput","bandwidth","iops","ppm","ppb","dpmo","bps","temperatuur","temperatur","temperatura","teplota","lampotila","homerseklet","sicaklik","pression","presion","pressao","pressione","druck","tryck","tlak","paine","nyomas","presiune","humidite","humedad","umidade","umidita","feuchtigkeit","vochtigheid","kosteus","vlhkost","vitesse","velocidad","velocidade","velocita","geschwindigkeit","snelheid","hastighet","hastighed","rychlost","nopeus","sebesseg","brzina","predkosc","densite","densidad","densidade","densita","dichte","dichtheid","hustota","tiheys","gustoca","moyenne","mediane","promedio","mediana","gemiddelde","durchschnitt","mittelwert","genomsnitt","gennemsnit","gjennomsnitt","keskiarvo","atlag","ortalama","prosjek","srednia","prumer","priemer","medie","taux","tasa","taxa","tasso","verhaltnis","verhouding","aandeel","anteil","andel","osuus","podil","udzial","udio","pourcentage","porcentaje","percentual","prozent","procent","prosentti","szazalek","yuzde","participacion","participacao","pondere","omjer","arany","oran","rata","leeftijd","edad","idade","wiek","eletkor","varsta","puntuacion","pontuacao","punteggio","betyg","ocena","indice","indeks","wskaznik","puan"],_t=["pct","percent","percentage","rate","ratio","rating","share","score","index","nps","csat","margin","yield","coverage","utilization","utilisation","gpa","percentile","quantile","bmi","density","pressure","humidity","velocity","efficiency","occupancy","latency","throughput","bandwidth","iops","ppm","ppb","dpmo","bps"],At=["latitude","longitude"],Ct=["latitude","longitude"];function Z(t){return re(t)}var be=["somme de","suma de","soma de","summe von","som van","somma di","summa av","sum av","sum af","soucet z","suma z","totaal van","total de","toplam","osszeg","nombre de","recuento de","contagem de","anzahl von","aantal van","conteggio di","antal av","lukumaara","pocet z"],Ue=["moyenne de","promedio de","media de","media di","durchschnitt von","gemiddelde van","medelvarde av","genomsnitt av","gennemsnit af","keskiarvo","atlag","ortalama","prumer z","srednia z","medie de","minimum de","minimo de","minimo di","minimum von","maximum de","maximo de","massimo di","maximum von"];function Mt(t){return[...t].sort((e,n)=>n.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")}var $e=new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:"+Mt(be)+")\\s+)","i"),xt=/(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g,Rt=new RegExp("\\b("+St.join("|")+")\\b|("+_t.join("|")+")$","i"),Tt=new RegExp("\\b("+At.join("|")+")\\b|("+Ct.join("|")+")$","i");function me(t){if(!t)return"";let e=String(t),n=$e.exec(Z(e));return(n?e.slice(n[0].length):e).trim()}function Nt(t){return!!t&&$e.test(Z(String(t)))}var Et=["count (distinct)","count distinct","distinct count","standard deviation","average","variance","median","product","stddev","std dev","count","sum","avg","min","minimum","max","maximum","var"],Ve=new RegExp("^\\s*("+[...Et].sort((t,e)=>e.length-t.length).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")+")\\s+of\\s+","i");function Ke(t){if(t==null)return"";let e=String(t),n=Ve.exec(e);if(!n)return e;let i=l=>l.toLowerCase().replace(/\s+/g," ").trim(),r=i(n[1]),o=e.slice(n[0].length),s=0;for(;s<8;){let l=Ve.exec(o);if(!l||i(l[1])!==r)break;let u=o.slice(l[0].length);if(u.trim()==="")break;o=u,s++}return s===0?e:e.slice(0,n[0].length)+o}function ye(t,e){if(!t||!e)return!1;let n=String(t);for(let i of e){let r=i?.hostName;if(r&&r!==i?.name&&n.includes(r))return!0}return!1}var He={Sum:["Sum of "],Avg:["Average of "],Average:["Average of "],Count:["Count of "],CountNonNull:["Count of "],Min:["Min of ","First ","Earliest "],Max:["Max of ","Last ","Latest "],Median:["Median of "],StandardDeviation:["Standard deviation of "],Variance:["Variance of "]},It=new RegExp("^("+Object.keys(He).join("|")+")\\((.+)\\)$");function Ye(t){if(!t)return[];let e=It.exec(String(t).trim());if(!e)return[];let n=He[e[1]],i=e[2],r=[];for(let o=i.indexOf(".");o>=0;o=i.indexOf(".",o+1)){if(o===0)continue;let s=i.slice(o+1);if(s.trim()!=="")for(let l of n){let u=l+s;r.includes(u)||r.push(u)}}return r}function vt(t){let e=me(t);return e.length===0?"":e.replace(xt," ")}function je(t,e){if(!e)return!1;let n=me(e);return t.test(Z(vt(e)))||t.test(Z(n))||t.test(Z(j(n).join(" ")))}function Xe(t){return je(Tt,t)}function wt(t){return je(Rt,t)||Xe(t)}var Ze=/int|double|decimal|single|float|number|currency|money/i;function Lt(t){let e=String(t?.valueNature??"").trim().toLowerCase();return e==="categorical"?"Categorical":e==="ordinal"?"Ordinal":e==="continuous"||t?.isMeasure===!0||Ze.test(String(t?.dataType??""))?"Continuous":"Categorical"}function Dt(t){return t?.isMeasure===!0||Ze.test(String(t?.dataType??""))}function qe(t){let e=t??{},n=Lt(e);if(n!=="Continuous")return{nature:n,additivity:"unknown",basis:"role",suppressed:!1};if(Xe(e.name))return{nature:n,additivity:"positional",basis:"name",suppressed:!0};let i=String(e.additivity??"").trim().toLowerCase();if(!(i==="additive"&&Nt(e.name))){if(i==="additive")return{nature:n,additivity:"additive",basis:"measured",suppressed:!1};if(i==="part_of_whole")return{nature:n,additivity:"part_of_whole",basis:"measured",suppressed:!1};if(i==="intensive_rate")return{nature:n,additivity:"intensive_rate",basis:"measured",suppressed:!1}}return e.discourageAggregationAcrossGroups===!0?{nature:n,additivity:"intensive_rate",basis:"host-flag",suppressed:!1}:wt(e.name)?{nature:n,additivity:"intensive_rate",basis:"name",suppressed:!1}:{nature:n,additivity:"additive",basis:"default",suppressed:!1}}function Qe(t){let e=qe(t),n=t??{};if(e.nature==="Categorical")return["first","distinctcount","count"];if(e.nature==="Ordinal")return Dt(n)?["median","average","min","max","first","distinctcount","count"]:["first","distinctcount","count"];switch(e.additivity){case"positional":return["min","max","count","distinctcount","first"];case"intensive_rate":return["average","median","min","max","count","distinctcount","first"];default:return["sum","average","median","min","max","count","distinctcount","first"]}}function Zn(t){return Qe(t)[0]}function qn(t,e){return Qe(t).indexOf(e)>=0}function Qn(t,e){if(e!=="sum"&&e!=="count")return!1;if(e==="count")return!0;let n=qe(t);return n.additivity==="additive"||n.additivity==="part_of_whole"||n.additivity==="unknown"}var Ot={de:["nr","nummer","kennung","kennziffer","plz","postleitzahl"],nl:["nr","nummer"],sv:["nr","nummer"],da:["nr","nummer"],nb:["nr","nummer"],fi:["tunnus","koodi","nro"],hu:["azonos\xEDt\xF3","k\xF3d"],tr:["kod","kodu","numaras\u0131","numarasi"],zh:["\u7F16\u53F7","\u4EE3\u7801","\u7F16\u7801","\u53F7\u7801","\u90AE\u7F16"],ja:["\u756A\u53F7","\u30B3\u30FC\u30C9"],ko:["\uBC88\uD638","\uCF54\uB4DC"],hi:["\u0915\u094B\u0921","\u0915\u094D\u0930\u092E\u093E\u0902\u0915"],fr:["num\xE9ro"],es:["c\xF3digo"],pt:["c\xF3digo","cep"],it:["codice"],pl:["kod","numer"],cs:["k\xF3d","\u010D\xEDslo"],sk:["k\xF3d","\u010D\xEDslo"],hr:["\u0161ifra","oznaka"],ru:["\u043A\u043E\u0434","\u043D\u043E\u043C\u0435\u0440"],uk:["\u043A\u043E\u0434","\u043D\u043E\u043C\u0435\u0440"],el:["\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2"],ar:["\u0631\u0645\u0632","\u0643\u0648\u062F","\u0631\u0642\u0645"],he:["\u05E7\u05D5\u05D3"],id:["kode","nomor"],vi:["m\xE3"],th:["\u0E23\u0E2B\u0E31\u0E2A"]},Pt=["fr","es","pt","it","pl","cs","sk","hr","ru","uk","el","ar","he","id","vi","th"],kt=["num\xE9ro"],Ft=t=>t.normalize("NFC").toLowerCase();function Gt(t,e,n,i){let r=ge(n);return!r||!t?null:t===e?"word":r.wordBreaks===!1?Array.from(e).length<Ee?null:(i?t.startsWith(e):t.endsWith(e))&&t.length>e.length?"suffix":null:i?Te(t,n).includes(e)?"word":null:r.script==="Hang"?Ne(t,e)?"suffix":null:r.compounds&&Re(t,e,xe)?"suffix":null}function Je(t){let e=String(t??"").trim();if(!e)return null;let n=ie(e),i=ie(me(e));for(let[r,o]of Object.entries(Ot)){let s=Pt.includes(r),l=s?i:n;for(let u of o){let c=kt.includes(u)||!!ge(r)?.foldSensitive,d=c?l.words:l.folded;if(d.length===0)continue;let f=c?Ft(u):ie(u).folded.join(" "),m=Gt(s?d[0]:d[d.length-1],f,r,s);if(m)return{lang:r,word:u,view:m}}}return null}var Wt=[["Lu",/^\p{Lu}$/u],["Ll",/^\p{Ll}$/u],["Lt",/^\p{Lt}$/u],["Lm",/^\p{Lm}$/u],["Lo",/^\p{Lo}$/u],["Mn",/^\p{Mn}$/u],["Mc",/^\p{Mc}$/u],["Nd",/^\p{Nd}$/u]];function de(t){for(let[e,n]of Wt)if(n.test(t))return e;return null}var zt=[{id:"ascii",test:/^[A-Za-z]$/,ranges:[[65,90],[97,122]]},{id:"latin",test:/^[\u00C0-\u017F]$/u,ranges:[[192,383]]},{id:"cyrillic",test:/^[\u0400-\u045F\u0490-\u0491]$/u,ranges:[[1024,1119],[1168,1169]]},{id:"greek",test:/^[\u0386-\u03CE]$/u,ranges:[[902,974]]},{id:"han",test:/^[\u4E00-\u9FFF]$/u,ranges:[[19968,40959]]},{id:"hiragana",test:/^\p{Script=Hiragana}$/u,ranges:[[12353,12447]]},{id:"katakana",test:/^\p{Script=Katakana}$/u,ranges:[[12448,12543]]},{id:"hangul",test:/^[\uAC00-\uD7A3]$/u,ranges:[[44032,55203]]},{id:"arabic",test:/^[\u0620-\u0652\u0671-\u06D3]$/u,ranges:[[1568,1618],[1649,1747]]},{id:"hebrew",test:/^[\u05B0-\u05EA]$/u,ranges:[[1456,1514]]},{id:"devanagari",test:/^\p{Script=Devanagari}$/u,ranges:[[2304,2431]]},{id:"thai",test:/^\p{Script=Thai}$/u,ranges:[[3585,3662]]}],fe=new Map;function et(t,e,n,i){let r=fe.get(t);if(r)return r;let o=[];for(let[s,l]of e)for(let u=s;u<=l;u++){let c=String.fromCodePoint(u);de(c)===n&&(i&&!i.test(c)||o.push(c))}return fe.set(t,o),o}function Bt(t){let n=t.codePointAt(0);for(let s=0;s<9&&de(String.fromCodePoint(n-1))==="Nd";s++)n--;let i="nd:"+n.toString(16),r=fe.get(i);if(r)return r;let o=[];for(let s=n;s<n+10;s++){let l=String.fromCodePoint(s);de(l)==="Nd"&&o.push(l)}return fe.set(i,o),o}function Vt(t,e){if(e==="Nd")return Bt(t);for(let r of zt)if(r.test.test(t))return et(r.id+":"+e,r.ranges,e,r.id==="ascii"?null:r.test);let i=t.codePointAt(0)&-128;return et("block:"+i.toString(16)+":"+e,[[i,i+127]],e,null)}function Ut(t,e,n,i){let r=t.filter(o=>!e.has(o));return r.length===0&&(r=t.filter(o=>o!==n)),r.length===0?n:r[Math.min(r.length-1,Math.floor(i()*r.length))]}var $t=/^[\p{L}\p{M}\p{Nd}]$/u,tt=/^[\p{L}\p{Nd}]$/u;function nt(t,e){if(!t)return t??"";let n=new Set(Array.from(t)),i=d=>{let f=de(d);return!f||!$t.test(d)?d:Ut(Vt(d,f),n,d,e)},r=d=>{let f=[];for(let m of d)f.push(i(m)),tt.test(m)&&e()<.2&&f.push(i(m));if(f.length>6){let m=Math.floor(e()*Math.min(3,f.length-6));for(let R=0;R<m;R++)for(let A=0;A<5;A++){let O=Math.floor(e()*f.length);if(tt.test(f[O])){f.splice(O,1);break}}}return f.join("")};if(!(t.includes("@")&&t.includes(".")))return r(t);let[s,l=""]=t.split("@"),u=l.endsWith(".com"),c=u?l.slice(0,-4):l;return`${r(s)}@${r(c)}${u?".com":""}`}var Kt=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Ht=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Yt=new RegExp([String.raw`\bisMeasure\b`,String.raw`\bdataType\b`,String.raw`\bcolumns\s*\[\s*-?\d`,String.raw`\.iloc\s*\[[^\]]*,`,String.raw`\.iat\s*\[`,String.raw`\bselect_dtypes\b`,String.raw`\b_get_numeric_data\b`,String.raw`\bis_numeric_dtype\b`,String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`,String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`,String.raw`\bdf\.dtypes\b`,String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`,String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));function ee(t,e){if(!t||!e)return!1;let n=Ht(e);return new RegExp("['\"`]"+n+"['\"`]").test(t)?!0:Kt.test(e)&&new RegExp("\\."+n+"(?![A-Za-z0-9_$])").test(t)}function jt(t){return!!t&&Yt.test(t)}function sr(t,e,n){return t?jt(t)?[...e]:[...n,...e].some(i=>ee(t,i))?e.filter(i=>ee(t,i)):[...e]:[]}var Xt=5,Zt=6,qt=3,q=864e5,Qt=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?Z?)?$/,Jt=/^(\d{4})[-/](\d{1,2})$/,en=/^(\d{4})[-\s]?Q([1-4])$/i,tn=/^Q([1-4])[-\s](\d{4})$/i,nn=/^(\d{4})$/,rn=/^(\d{4})(0[1-9]|1[0-2])$/,sn=/^(\d{4})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/,on=/^(\D+?)[\s\-/.,']*((?:19|20)\d{2})$/u,an=/^((?:19|20)\d{2})[\s\-/.,']+(\D+)$/u;function rt(t,e){let n=ue(t);if(!n)return 0;if(n==="sept")return 9;for(let i of e&&!/^en\b/i.test(e)?["en",e]:["en"]){let r=le(i)[n];if(r!==void 0)return r+1}return 0}function un(t){let e=se(t).filter(i=>i.yearDigits===4);if(e.length===0||e.some(i=>i.lang==="en"))return null;let n=e[0];return e.some(i=>i.grain!=="quarter"||i.n!==n.n||i.year!==n.year)?null:$(n.year,(n.n-1)*3+1,1)}function $(t,e,n,i=0,r=0,o=0){if(!(t>=1&&e>=1&&e<=12&&n>=1&&n<=31))return null;let s=Date.UTC(t,e-1,n,i,r,o);if(!Number.isFinite(s))return null;let l=u=>u<10?"0"+u:String(u);return{ms:s,y:t,m:e,d:n,iso:`${t}-${l(e)}-${l(n)}`}}function ln(t,e){let n=[],i="";for(let u=0;u<e.length;u++){if(e[u]!=="%"){i+=e[u].replace(/[.*+?^${}()|[\]\\]/g,"\\$&");continue}switch(e[++u]){case"Y":n.push("Y"),i+="(\\d{4})";break;case"m":n.push("m"),i+="(\\d{1,2})";break;case"d":n.push("d"),i+="(\\d{1,2})";break;case"H":case"M":case"S":i+="\\d{1,2}";break;case"%":i+="%";break;default:return null}}let r=new RegExp("^"+i+"$").exec(t);if(!r)return null;let o=0,s=1,l=1;return n.forEach((u,c)=>{let d=+r[c+1];u==="Y"?o=d:u==="m"?s=d:l=d}),o?$(o,s,l):null}function Se(t,e,n){let i=(t??"").trim();if(i==="")return null;if(e){let s=ln(i,e);return s||null}let r=Qt.exec(i);if(r)return $(+r[1],+r[2],+r[3],+(r[4]??0),+(r[5]??0),+(r[6]??0));if(r=en.exec(i),r)return $(+r[1],(+r[2]-1)*3+1,1);if(r=tn.exec(i),r)return $(+r[2],(+r[1]-1)*3+1,1);if(r=Jt.exec(i),r&&+r[2]>=1&&+r[2]<=12)return $(+r[1],+r[2],1);if(r=sn.exec(i),r)return $(+r[1],+r[2],+r[3]);if(r=rn.exec(i),r)return $(+r[1],+r[2],1);if(r=nn.exec(i),r){let s=+r[1];return s>=1900&&s<=2100?$(s,1,1):null}let o=un(i);if(o)return o;if(r=on.exec(i),r){let s=rt(r[1],n);return s?$(+r[2],s,1):null}if(r=an.exec(i),r){let s=rt(r[2],n);return s?$(+r[1],s,1):null}return null}function it(t){let e=new Date(t).getUTCDay();return e>=1&&e<=5}function st(t,e){if(e<=t)return 0;let n=Math.round((e-t)/q),i=Math.floor(n/7),r=i*5,o=t+i*7*q;for(;o<e;)it(o)&&r++,o+=q;return r}function cn(t){if(t.length===0)return 0;let e=[...t].sort((i,r)=>i-r),n=e.length>>1;return e.length%2?e[n]:(e[n-1]+e[n])/2}function mn(t){return t>0?t<.95?"hour":t<=1.05?"day":t>=6.5&&t<=7.5?"week":t>=27&&t<=31.5?"month":t>=88&&t<=93?"quarter":t>=362&&t<=368?"year":"irregular":"irregular"}function te(t,e,n,i){switch(n){case"year":return e.y-t.y;case"quarter":return e.y*4+Math.floor((e.m-1)/3)-(t.y*4+Math.floor((t.m-1)/3));case"month":return e.y*12+e.m-(t.y*12+t.m);case"week":return Math.round((e.ms-t.ms)/(7*q));case"weekday":return st(t.ms,e.ms);case"day":return Math.round((e.ms-t.ms)/q);default:return i>0?Math.round((e.ms-t.ms)/i):0}}function ot(t,e){return _e(t,e)?.cadence??null}function _e(t,e){let n=e?.gapFactor??Xt,i=0,r=0,o=new Map;for(let h of t){if(h==null||h==="")continue;i++;let W=Se(String(h),e?.pattern,e?.locale);W&&(r++,o.set(W.ms,W))}let s=[...o.values()].sort((h,W)=>h.ms-W.ms);if(s.length<qt||i>0&&r/i<.8)return null;let l=s[s.length-1].ms-s[0].ms;if(l<=0)return null;let u=[];for(let h=1;h<s.length;h++)u.push(s[h].ms-s[h-1].ms);let c=cn(u);if(!(c>0))return null;let d=mn(c/q);d==="day"&&l>=7*q&&s.every(h=>it(h.ms))&&st(s[0].ms,s[s.length-1].ms)+1>s.length*.5&&(d="weekday");let f=d==="irregular"?s.length:te(s[0],s[s.length-1],d,c)+1,m=1,R=1,A=[],O=s[0],S=1;for(let h=1;h<s.length;h++){let W=te(s[h-1],s[h],d,c);W>m&&(m=W),d!=="irregular"&&W>n?(R++,A.push({from:O.iso,to:s[h-1].iso,points:S}),O=s[h],S=1):S++}A.push({from:O.iso,to:s[s.length-1].iso,points:S});let w={grain:d,points:s.length,expectedPoints:Math.max(f,s.length),coveragePct:Math.round(s.length/Math.max(f,s.length)*1e3)/10,runs:R,largestGapUnits:m,gapFactor:n};return e?.includeBounds&&A.length<=Zt&&(w.runBounds=A),{cadence:w,points:s,stepMs:c}}var dn=8,fn=.5,gn=200,pn=new Set(["category","categories","subcategory","type","types","kind","class","classes","classification","segment","segments","tier","status","priority","severity","grade","level","band","bucket","group","channel","method","mode","stage","phase","period","shift","gender","sex","result","outcome","reason","flag","genre","sector","source"]),hn=["category","classification","segment","status","priority","severity","channel"],bn=new Set(["UUID","EMAIL_LIKE","URL_LIKE","PHONE_LIKE","NUMERIC_ID","HEX_ID","OPAQUE_ID_ALPHANUMERIC","DATE_STR","BOOLEAN"]);function yn(t){let e=j(t);if(e.length===0)return!1;let n=e[e.length-1];return pn.has(n)?!0:hn.some(i=>n.length>i.length&&n.endsWith(i))}function Sn(t){if(t.isMeasure)return"measure";if(t.isTemporal||t.isDatePart||t.isReassembledDate)return"temporal";let e=Array.from(t.values).filter(n=>n!==""&&n!==null&&n!==void 0);return e.length<2||e.length>gn?"cardinality":t.rows>0&&e.length>=t.rows?"row-identity":t.isBinaryFlag?"flag":oe(e,t.locale)!==null?"ordinal":t.identifierNamed||t.dataType==="String"&&bn.has(ae(e))?"identifier":!t.geoKind&&yn(t.name)?"attribute":"entity"}function lt(t){let e=-1,n=1/0,i=!1;return t.forEach((r,o)=>{if(Sn(r)!=="entity")return;let s=new Set(Array.from(r.values).filter(u=>u!=="")).size,l=!!r.geoKind;(s<n||s===n&&l&&!i)&&(e=o,n=s,i=l)}),e}var at=t=>t<10?"0"+t:String(t);function ut(t,e){switch(e){case"year":return`${t.y}-01-01`;case"quarter":return`${t.y}-${at(Math.floor((t.m-1)/3)*3+1)}-01`;case"month":return`${t.y}-${at(t.m)}-01`;case"hour":return new Date(t.ms).toISOString().replace(/\.\d{3}Z$/,"Z");default:return t.iso}}function ct(t){let{periods:e,series:n}=t,i=Math.min(e.length,n.length),r=new Set;for(let I=0;I<i;I++)e[I]&&r.add(e[I]);let o=_e(r,{pattern:t.pattern,locale:t.locale});if(!o)return null;let s=o.cadence.grain;if(s==="irregular")return null;let l=o.points[0],u=te(l,o.points[o.points.length-1],s,o.stepMs)+1;if(u!==o.cadence.expectedPoints)return null;let c=new Map;for(let I of r){let b=Se(I,t.pattern,t.locale);if(!b)continue;let P=te(l,b,s,o.stepMs);P>=0&&P<u&&c.set(I,{idx:P,stamp:b})}let d=new Map;for(let I=0;I<i;I++){let b=n[I];if(!b)continue;let P=c.get(e[I]);if(!P)continue;let z=d.get(b);z||(z={seen:new Set,lo:P.idx,hi:P.idx,loStamp:P.stamp,hiStamp:P.stamp,order:d.size},d.set(b,z)),z.seen.add(P.idx),P.idx<z.lo&&(z.lo=P.idx,z.loStamp=P.stamp),P.idx>z.hi&&(z.hi=P.idx,z.hiStamp=P.stamp)}if(d.size<2)return null;let f=0;for(let I of d.values())f+=I.seen.size;if(f/(d.size*u)<(t.minFill??fn))return null;let m=[],R=new Set,A=0,O=0,S=0,w=0,h=0,W=1;for(let[I,b]of d){for(let B of b.seen)R.add(B);if(b.seen.size>=u)continue;let P=[...b.seen].sort((B,a)=>B-a),z=1;for(let B=1;B<P.length;B++)z=Math.max(z,P[B]-P[B-1]);let Y={key:I,acc:b,coverage:b.seen.size/u,before:b.lo,after:u-1-b.hi,interior:b.hi-b.lo+1-b.seen.size,gap:z};m.push(Y),Y.before>0&&A++,Y.after>0&&O++,Y.interior>0&&S++,w=Math.max(w,Y.before),h=Math.max(h,Y.after),W=Math.max(W,z)}if(m.length===0)return null;m.sort((I,b)=>I.coverage-b.coverage||I.acc.order-b.acc.order);let U=m.slice(0,t.maxListed??dn);return{seriesColumn:t.seriesColumn,grain:s,periods:u,seriesCount:d.size,incompleteSeries:m.length,lateStarts:A,earlyEnds:O,withHoles:S,columnWideMissing:u-R.size,maxMissingBefore:w,maxMissingAfter:h,largestGap:W,series:U.map(I=>{let b={};return t.includeNames&&(b.name=I.key),t.includeDates&&(b.first=ut(I.acc.loStamp,s),b.last=ut(I.acc.hiStamp,s)),b.missingBefore=I.before,b.missingAfter=I.after,b.missingInterior=I.interior,b.largestGap=I.gap,b.coverage=Math.round(I.coverage*1e3)/1e3,b}),more:m.length-U.length}}var _n=12,An=100,Cn=.3,Mn=.9,xn=120,Rn=1900,Tn=2100,Nn=0,En=20,In=new Set(["id","ids","uuid","guid","key","zip","zipcode","postal","postalcode","ssn","code","codes","sku","isbn","msisdn","imei"]);function gt(t){if(!t)return!1;let e=j(t);return e.length===0?!1:In.has(e[e.length-1])?!0:Je(t)!==null}var vn=new Set(["year","yr","fy"]),wn=t=>j(t).some(e=>vn.has(e))||De(t)!==null,Ln=/^(?:(?:19|20)\d{2}(?:[-/ ]?(?:q[1-4]|w(?:0?[1-9]|[1-4]\d|5[0-3])|(?:0?[1-9]|1[0-2])))?|q[1-4][-/ ](?:19|20)\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*[-/ ]?(?:19|20)?\d{2})$/i;function Ae(t){if(!Number.isInteger(t)||t<190001||t>210012)return!1;let e=t%100;return e>=1&&e<=12}function Ce(t){if(!Number.isInteger(t)||t<19000101||t>21001231)return!1;let e=Math.floor(t/100)%100,n=t%100;return e>=1&&e<=12&&n>=1&&n<=31}var Dn=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?Z?)?$/,On=/^(\d{4})([\/.])(\d{1,2})\2(\d{1,2})$/,Pn=/^(\d{1,2})([\/.\-])(\d{1,2})\2(\d{4})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/;function kn(t){let e=(t||"").toLowerCase();return e==="en-us"||e==="en"||e.startsWith("en-us-")||e==="en-ph"||e==="en-bz"}function pt(t,e){let n=0,i=0,r=0,o=0,s=0,l="",u=0,c="",d=0,f=0,m=0,R=0,A=!1;for(let U of t){if(U==null)continue;let I=String(U).trim();if(I==="")continue;n++;let b;if(b=Dn.exec(I)){let P=+b[2],z=+b[3];P>=1&&P<=12&&z>=1&&z<=31&&(i++,b[4]!==void 0&&r++,b[6]!==void 0&&o++)}else if(b=On.exec(I)){let P=+b[3],z=+b[4];P>=1&&P<=12&&z>=1&&z<=31&&(l&&l!==b[2]&&(A=!0),l=b[2],s++)}else if(b=Pn.exec(I)){let P=+b[1],z=+b[3];P>=1&&P<=31&&z>=1&&z<=31&&(P<=12||z<=12)&&(c&&c!==b[2]&&(A=!0),c=b[2],u++,P>12&&m++,z>12&&R++,b[5]!==void 0&&d++,b[7]!==void 0&&f++)}if(n>=200)break}if(n<2||(i+s+u)/n<.8||(i>0?1:0)+(s>0?1:0)+(u>0?1:0)!==1||A)return null;if(i>0)return r===i?{pattern:o===i?"%Y-%m-%dT%H:%M:%S":"%Y-%m-%dT%H:%M",orderFrom:"iso"}:{pattern:"%Y-%m-%d",orderFrom:"iso"};if(s>0)return{pattern:`%Y${l}%m${l}%d`,orderFrom:"iso"};if(m>0&&R>0)return null;let w,h;m>0?(w=!0,h="values"):R>0?(w=!1,h="values"):(w=!kn(e),h="locale");let W=w?`%d${c}%m${c}%Y`:`%m${c}%d${c}%Y`;return d===u?{pattern:W+(f===u?" %H:%M:%S":" %H:%M"),orderFrom:h}:{pattern:W,orderFrom:h}}function Fn(t,e){if(!e||!/\b(?:19|20)\d{2}\b/.test(t))return!1;let n=t.replace(/\b(?:19|20)\d{2}\b/g,"").replace(/[-/.,]/g," ").trim();if(!n)return!1;let i=ue(n);return i.length>0&&e[i]!==void 0}var Gn=/(?:19|20)[0-9]{2}/;function Wn(t){let e=new Map,n=0;for(let r of t){if(!Gn.test(re(r)))continue;let o=new Set(se(r).filter(s=>s.yearDigits===4&&(s.grain==="quarter"||s.grain==="week")).map(s=>s.lang));if(o.size!==0){if(o.has("en")){n++;continue}for(let s of o)e.set(s,(e.get(s)??0)+1)}}let i=0;for(let r of e.values())i=Math.max(i,r);return i>0?i+n:0}function zn(t){let{dataType:e,name:n,isMeasure:i,distinctCount:r}=t;if(e==="DateTime")return!0;if(i)return!1;if(e==="Integer"||e==="Decimal"){let o=t.minNum,s=t.maxNum;if(!(o!=null&&s!=null&&Number.isFinite(o)&&Number.isFinite(s)&&Number.isInteger(o)&&Number.isInteger(s)&&s>=o))return!1;let u=o>=1900&&s<=2100;if(u&&r>=2&&wn(n)||u&&r>=3&&r===s-o+1)return!0;let c=Ae(o)&&Ae(s),d=Ce(o)&&Ce(s);if(c||d){if(!t.sampleValues)return!0;let f=0,m=0;for(let R of t.sampleValues){if(R==null||R==="")continue;f++;let A=Number(String(R).trim());if(Number.isFinite(A)&&(c?Ae(A):Ce(A))&&m++,f>=60)break}if(f>=2&&m===f)return!0}return!1}if(t.sampleValues){let o=t.locale?le(t.locale):null,s=0,l=0,u=[],c=[];for(let d of t.sampleValues){if(d==null||d==="")continue;s++;let f=String(d).trim();if(u.push(f),Ln.test(f)||Fn(f,o)?l++:c.push(f),s>=60)break}if(s>=2&&l/s>=.8||s>=2&&(l+Wn(c))/s>=.8||pt(u,t.locale)!==null)return!0}return!1}function Bn(t){let e=Z((t||"").trim().toLowerCase());return e.startsWith("sum ")||e.startsWith("total ")?"sum":e.startsWith("average ")||e.startsWith("avg. ")?"avg":e.startsWith("count ")||e.startsWith("distinct count ")||e.startsWith("count (distinct) ")?"count":e.startsWith("min ")||e.startsWith("minimum ")?"min":e.startsWith("max ")||e.startsWith("maximum ")?"max":Ue.some(n=>e.startsWith(n+" "))?/^(minimum|minimo)\b/.test(e)?"min":/^(maximum|maximo|massimo)\b/.test(e)?"max":"avg":be.some(n=>e.startsWith(n+" ")||e===n)?/^(nombre|recuento|contagem|anzahl|aantal|conteggio|antal|lukumaara|pocet)\b/.test(e)?"count":"sum":null}function Vn(t){let{rows:e,measureColIdx:n,measureName:i,candidateDims:r,minNum:o,maxNum:s,discourageAgg:l}=t,u=100,c=.01,d="";for(let m of r){if(m.distinct<2||m.distinct>u)continue;let R=r.filter(h=>h.idx!==m.idx).map(h=>h.idx),A=new Map;for(let h of e){let W=h[n];if(typeof W!="number"||!Number.isFinite(W))continue;let U=R.length?R.map(b=>String(h[b])).join(d):"",I=A.get(U);I||(I={sum:0,cset:new Set},A.set(U,I)),I.sum+=W,I.cset.add(String(h[m.idx]))}let O=0,S=0,w=0;for(let h of A.values())h.cset.size<2||(w++,Math.abs(h.sum-100)<=100*c?O++:Math.abs(h.sum-1)<=1*c&&S++);if(w>=2&&(O/w>=.9||S/w>=.9))return{additivity:"part_of_whole",partOfWholeDim:m.name}}if(l)return{additivity:"intensive_rate"};let f=Bn(i);return f==="avg"||f==="min"||f==="max"?{additivity:"intensive_rate"}:f==="count"?{additivity:"additive"}:f==="sum"?{additivity:"unknown"}:o!=null&&s!=null&&Number.isFinite(o)&&Number.isFinite(s)&&o>=0&&s<=1.0001&&s>0?{additivity:"intensive_rate"}:{additivity:"unknown"}}function dt(t){let{dataType:e,isMeasure:n,name:i,distinct:r,nonblank:o,prec:s,maxval:l,minval:u}=t,c=l-u+1,d=c>0?r/c:1,f=o>0?r/o:0,m=e==="Decimal"||s>0;return gt(i)?"Categorical":d>=Mn&&(Oe(i)&&r<=xn||u>=Rn&&l<=Tn||u>=Nn&&l<=En)?"Ordinal":n||r>_n&&(m||r>=An||f>=Cn)?"Continuous":"Categorical"}function Un(t){let e=null;for(let n=0;n<t.length;n++){let i=t[n];if(typeof i!="string"||i.length===0)continue;let r=i.trim();r.length!==i.length&&(e||(e=t.slice()),e[n]=r)}return e||t}var ft=class{_computedStatsForLevel=null;_cols=[];_rows=[];_origIndices=[];_rowHashes=new Set;_hostQueryNames=[];_englishAliases=new Map;dedupRows=!0;emitLegacyAggAliases=!1;STR(e){return e==null?"":e instanceof Date?this.wholeDayIso(e)??(isNaN(e.getTime())?"":e.toISOString()):e.toString()}getPrecision(e){if(!isFinite(e))return 0;let i=e.toString().split(".")[1];return i?i.length:0}getColumns(){return this._cols}wholeDayIso(e){return Le(e)}hasTimeComponent(e){return!(e instanceof Date)||isNaN(e.getTime())?!1:this.wholeDayIso(e)===null}getColumnsWithStats(e,n){if(this._computedStatsForLevel==e)return this._cols;let i=0,r=parseInt(e),o=[];for(let a of this._cols){let p=new Map,D=[],N=0,g=0,T=0,v=null,E=null,x=null,F=!1,k=!0,C=!0,M=null,G=!1;for(let _ of this._rows){let y=_[i],L=this.STR(y);if(L!=""){if(N+=L.length,p.set(L,(p.get(L)||0)+1),g++,a.dataType=="Integer"||a.dataType=="Decimal"||a.dataType=="DateTime")if((v===null||y<v)&&(v=y),(E===null||y>E)&&(E=y),a.dataType=="Integer"||a.dataType=="Decimal"){if(x===null?x=y:x+=y,a.dataType=="Decimal"){let V=this.getPrecision(y);V>T&&(T=V)}D.push(y)}else F=F||this.hasTimeComponent(y);G&&(y<M?k=!1:y>M&&(C=!1)),M=y,G=!0}}if(g>=3&&(k&&!C?a.sortedDirection="asc":C&&!k?a.sortedDirection="desc":a.sortedDirection="none"),g>0&&p.size>0&&!a.isMeasure){let _=0,y=Number.MAX_SAFE_INTEGER;for(let L of p.values())L>_&&(_=L),L<y&&(y=L);if(a.modalShare=_/g,a.minGroupCount=y===Number.MAX_SAFE_INTEGER?null:y,p.size===2){let L=[...p.keys()].map(ne=>Ie(ne).trim().toLowerCase()).sort(),K=[["false","true"],["no","yes"],["n","y"],["0","1"],["f","t"]].some(ne=>L[0]===ne[0]&&L[1]===ne[1]),Q=/^(is|has)[_\p{L}\p{N}]|(?:default|churn|fraud|approv|convert|active|cancel|delinquen|flag|paid|win|pass|fail)/iu.test(a.name);(K||Q)&&(a.isBinaryFlag=!0)}}if(a.dataType=="DateTime"&&(a.dateWithTime=F),a.isTemporal=zn({dataType:a.dataType,name:a.name,isMeasure:a.isMeasure,distinctCount:p.size,minNum:typeof v=="number"?v:null,maxNum:typeof E=="number"?E:null,sampleValues:p.keys(),locale:n}),a.isTemporal&&a.dataType==="String"&&!a.isMeasure){let _=pt(p.keys(),n);_&&(a.temporalTextPattern=_.pattern)}if(a.isTemporal&&!a.isMeasure){let _=ot(p.keys(),{includeBounds:r>=20,pattern:a.temporalTextPattern,locale:n});_&&(a.temporalCadence=_)}this.updateColumnStats10(r,a,g,p,T,E,v),this.updateColumnStats20(r,D,g,x,a,N,F,v,E,T,p,n),!a.isMeasure&&(a.dataType==="Integer"||a.dataType==="Decimal")&&dt({dataType:a.dataType,isMeasure:!1,name:a.name,distinct:p.size,nonblank:g,prec:T,maxval:typeof E=="number"?E:0,minval:typeof v=="number"?v:0})==="Continuous"&&(a.isMeasure=!0,a.geoKind=void 0,a.geoMatchPct=void 0,a.geoAmbiguous=void 0,a.dominantGeoRegion=void 0,a.dominantGeoRegionPct=void 0,a.geoRegionCount=void 0),o[i]=a.isMeasure||p.size>2e3?null:new Set(p.keys()),i++}let s=[];this._cols.forEach((a,p)=>{a.isMeasure||s.push({idx:p,distinct:a.distinctCount??0,name:a.name})}),this._cols.forEach((a,p)=>{if(!a.isMeasure)return;let D=typeof a.lowValue=="number"?a.lowValue:null,N=typeof a.highValue=="number"?a.highValue:null,g=Vn({rows:this._rows,measureColIdx:p,measureName:a.name,candidateDims:s,minNum:D,maxNum:N,discourageAgg:!!a.discourageAggregationAcrossGroups});a.additivity=g.additivity,g.partOfWholeDim&&(a.partOfWholeDim=g.partOfWholeDim)});let l=50,u=4,c=s.filter(a=>a.distinct>=2&&a.distinct<=l);this._cols.forEach((a,p)=>{if(!a.isMeasure)return;let D=[];for(let C of this._rows){let M=C[p];if(M==null||M==="")continue;let G=typeof M=="number"?M:parseFloat(M);isNaN(G)||D.push(G)}if(D.length===0)return;let N=[...D].sort((C,M)=>C-M);if(N[0]===N[N.length-1])a.relativeDispersion=0;else if(N.length>=u){let C=H(N,.5),M=H(N,.1),G=H(N,.9);a.relativeDispersion=Math.abs(C)>1e-9?Math.round((G-M)/Math.abs(C)*1e3)/1e3:void 0}else a.relativeDispersion=void 0;let g=[];for(let C of c){let M=new Set;for(let G of this._rows){let _=G[p];_==null||_===""||M.add(this.STR(G[C.idx])+"")}g.push({otherColumn:C.name,nonBlankGroupCount:M.size})}g.length>0&&(a.nonBlankGroups=g);let T=0;for(let C of D)T+=C;T/=D.length;let v=0;for(let C of D)v+=(C-T)*(C-T);if(v<=1e-12)return;let E=[],x=[],F=C=>{if(C.length<4)return NaN;let M=[...C].sort((_,y)=>_-y),G=_=>M[Math.min(M.length-1,Math.max(0,Math.floor(_*(M.length-1))))];return G(.75)-G(.25)},k=F(D);for(let C of c){let M=new Map;for(let y of this._rows){let L=y[p];if(L==null||L==="")continue;let V=typeof L=="number"?L:parseFloat(L);if(isNaN(V))continue;let K=this.STR(y[C.idx])+"",Q=M.get(K);Q?(Q.s+=V,Q.n++,Q.vals.push(V)):M.set(K,{s:V,n:1,vals:[V]})}let G=0;for(let y of M.values()){let L=y.s/y.n;G+=y.n*(L-T)*(L-T)}E.push({otherColumn:C.name,eta2:Math.round(G/v*1e4)/1e4});let _=[];for(let y of M.values()){let L=F(y.vals);isNaN(L)||_.push(L)}if(_.length>=2&&isFinite(k)&&k>1e-9){let y=(Math.max(..._)-Math.min(..._))/k;x.push({otherColumn:C.name,spreadRatio:Math.round(y*1e4)/1e4})}}E.length>0&&(a.groupDiscrimination=E),x.length>0&&(a.spreadDiscrimination=x)});let d=.97,f=.8,m=8,R=5,A=this._cols.map((a,p)=>({c:a,i:p})).filter(a=>a.c.isMeasure);for(let a=0;a<A.length;a++)for(let p=a+1;p<A.length;p++){let D=A[a].i,N=A[p].i,g=0,T=0,v=0,E=0,x=0,F=0;for(let _ of this._rows){let y=_[D],L=_[N];if(y==null||y===""||L===null||L===void 0||L==="")continue;let V=typeof y=="number"?y:parseFloat(y),K=typeof L=="number"?L:parseFloat(L);isNaN(V)||isNaN(K)||(g++,T+=V,v+=K,E+=V*V,x+=K*K,F+=V*K)}if(g<R)continue;let k=g*E-T*T,C=g*x-v*v;if(k<=1e-12||C<=1e-12)continue;let M=(g*F-T*v)/Math.sqrt(k*C),G=Math.min(1,Math.round(Math.abs(M)*1e3)/1e3);for(let _ of[A[a].c,A[p].c])(_.maxAbsMeasureCorrelation===void 0||G>_.maxAbsMeasureCorrelation)&&(_.maxAbsMeasureCorrelation=G);if(Math.abs(M)>=d){let _=A[a].c,y=A[p].c;_.collinearWithMeasures||(_.collinearWithMeasures=[]),y.collinearWithMeasures||(y.collinearWithMeasures=[]),_.collinearWithMeasures.push(y.name),y.collinearWithMeasures.push(_.name)}else if(Math.abs(M)>=f){let _=A[a].c,y=A[p].c,L=Math.round(M*1e3)/1e3;_.correlatedWithMeasures||(_.correlatedWithMeasures=[]),y.correlatedWithMeasures||(y.correlatedWithMeasures=[]),_.correlatedWithMeasures.push({otherColumn:y.name,r:L}),y.correlatedWithMeasures.push({otherColumn:_.name,r:L})}}for(let{c:a}of A)a.correlatedWithMeasures&&(a.correlatedWithMeasures.sort((p,D)=>Math.abs(D.r)-Math.abs(p.r)||(p.otherColumn<D.otherColumn?-1:1)),a.correlatedWithMeasures.length=Math.min(a.correlatedWithMeasures.length,m));for(let a=0;a<this._cols.length;a++){let p=o[a];if(!p||p.size===0)continue;let D=[];for(let N=0;N<this._cols.length;N++){if(N===a)continue;let g=o[N];if(!g||g.size===0)continue;let T=0;for(let E of p)g.has(E)&&T++;let v=Math.round(T/p.size*100);v>0&&D.push({otherColumn:this._cols[N].name,percentShared:v})}D.length>0&&(this._cols[a].sharedValueRatioWithOthers=D)}let O=50,S=[];for(let a=0;a<this._cols.length;a++){let p=o[a];p&&p.size>=2&&p.size<=O&&S.push(a)}if(S.length>=2){let a=new Map,p=(N,g)=>N+":"+g;for(let N=0;N<S.length;N++)for(let g=N+1;g<S.length;g++)a.set(p(S[N],S[g]),new Map);for(let N of this._rows)for(let g=0;g<S.length;g++){let T=this.STR(N[S[g]])+"";for(let v=g+1;v<S.length;v++){let E=""+this.STR(N[S[v]]),x=a.get(p(S[g],S[v])),F=T+""+E;x.set(F,(x.get(F)??0)+1)}}let D=new Map;for(let N=0;N<S.length;N++)for(let g=N+1;g<S.length;g++){let T=S[N],v=S[g],E=o[T].size,x=o[v].size,F=a.get(p(T,v)),k=F.size,C=0;for(let y of F.values())(C===0||y<C)&&(C=y);let M=Math.round(k/(E*x)*100),G=k===E,_=k===x;if((this._cols[T].categoricalPairStats||=[]).push({otherColumn:this._cols[v].name,fillPct:M,determinesOther:G,minCellCount:C,distinctCombinations:k}),(this._cols[v].categoricalPairStats||=[]).push({otherColumn:this._cols[T].name,fillPct:M,determinesOther:_,minCellCount:C,distinctCombinations:k}),G&&E>x){let y=D.get(T);(!y||x<y.card)&&D.set(T,{name:this._cols[v].name,card:x,ratio:x/E})}if(_&&x>E){let y=D.get(v);(!y||E<y.card)&&D.set(v,{name:this._cols[T].name,card:E,ratio:E/x})}}for(let[N,g]of D)this._cols[N].primaryParentColumn=g.name,this._cols[N].nestingRatio=Math.round(g.ratio*100)/100}let w=6,h=this._rows.length;for(let a=0;a<this._cols.length;a++){let p=this._cols[a];if(p.isMeasure||p.primaryParentColumn)continue;let D=p.distinctCount??0;if(D<=O||h>0&&D>=h)continue;let N=[];for(let g=0;g<this._cols.length;g++){if(g===a)continue;let T=this._cols[g];if(T.isMeasure)continue;let v=T.distinctCount??0;v<2||v>=D||N.push(g)}N.sort((g,T)=>(this._cols[g].distinctCount??0)-(this._cols[T].distinctCount??0));for(let g of N.slice(0,w)){let T=new Map,v=!0;for(let x of this._rows){let F=this.STR(x[a])+"",k=this.STR(x[g])+"",C=T.get(F);if(C===void 0)T.set(F,k);else if(C!==k){v=!1;break}}if(!v)continue;let E=this._cols[g].distinctCount??0;p.primaryParentColumn=this._cols[g].name,p.nestingRatio=Math.round(E/D*100)/100;break}}let W=.01,U=.05,I=.95,b=8,P=8,z=6,Y=500,B=[];for(let a=0;a<this._cols.length&&B.length<P;a++){let p=this._cols[a].dataType;(p==="Double"||p==="Integer"||p==="Decimal")&&B.push(a)}if(B.length>=3&&this._rows.length>=b){let a=Math.min(this._rows.length,Y),p=B.map(E=>{let x=[];for(let C=0;C<a;C++){let M=this._rows[C][E],G=typeof M=="number"?M:parseFloat(String(M).replace(/,/g,""));if(M==null||M===""||!isFinite(G))return null;x.push(G)}let F=x[0],k=!1;for(let C of x)if(C!==F){k=!0;break}return k?x:null}),D=B.map((E,x)=>x).filter(E=>p[E]!==null),N=E=>{let x=E.slice().sort((k,C)=>k-C),F=x.length>>1;return x.length%2?x[F]:(x[F-1]+x[F])/2},g=null,T=[],v=E=>{if(T.length>=3){let x=T.map(M=>p[M]),F=x[0].length,k=new Array(F);for(let M=0;M<F;M++){let G=0;for(let _ of x)G+=_[M];k[M]=G}let C=N(k);if(C>0){let M=0;for(let _ of k)Math.abs(_-C)<=C*W&&M++;let G=M/F;if(G>=I){let _=1;for(let y of x){let L=N(y)/C;L<_&&(_=L)}_>=U&&(!g||T.length>g.cols.length)&&(g={cols:T.slice(),total:C,matched:G})}}}if(!(T.length>=z))for(let x=E;x<D.length;x++)T.push(D[x]),v(x+1),T.pop()};if(v(0),g){let E=g,F={columns:E.cols.map(k=>this._cols[B[k]].name),total:Math.round(E.total*1e3)/1e3,matchedPct:Math.round(E.matched*100)/100};for(let k of E.cols)this._cols[B[k]].constantSumGroup=F}}return this.applySeriesCompleteness(r,n,o),this._computedStatsForLevel=e,this._cols}applySeriesCompleteness(e,n,i){for(let m of this._cols)m.seriesCompleteness!==void 0&&delete m.seriesCompleteness;let r=this._cols.map((m,R)=>({c:m,i:R})).filter(({c:m})=>m.isTemporal&&!m.isMeasure&&m.temporalCadence&&m.temporalCadence.grain!=="irregular");if(r.length===0)return;let o=[],s=[];this._cols.forEach((m,R)=>{let A=i[R];A&&(o.push(R),s.push({name:m.name,dataType:m.dataType,isMeasure:!!m.isMeasure,isTemporal:!!m.isTemporal,isDatePart:!!m.isDatePart,isReassembledDate:!!m.isReassembledDate,isBinaryFlag:!!m.isBinaryFlag,geoKind:m.geoKind,identifierNamed:gt(m.name),values:A,rows:this._rows.length,locale:n}))});let l=lt(s);if(l<0)return;let u=o[l],c=this._cols[u],d=this._rows.map(m=>this.STR(m[u])),f=e>=20&&(c.dataType!=="String"||Array.isArray(c.safeDistinctValues));for(let{c:m,i:R}of r){let A=ct({periods:this._rows.map(O=>this.STR(O[R])),series:d,seriesColumn:c.name,pattern:m.temporalTextPattern,locale:n,includeDates:e>=20,includeNames:f});A&&(m.seriesCompleteness=A)}}updateColumnStats20(e,n,i,r,o,s,l,u,c,d,f,m){if(e>=20){let R=[...n].sort((S,w)=>S-w),A=Math.floor(R.length/2);if(i>0&&r!=null?o.avgValue=o.dataType=="Integer"?Math.round(r/i):r/i:o.avgValue=null,i>0&&(o.avgLength=s/i),this._rows.length>0){let S=w=>{let h=w instanceof Date?w:typeof w=="string"?pe(w)??new Date(w):new Date(w),W=this.wholeDayIso(h);return W?W+"T00:00:00.000Z":isNaN(h.getTime())?w:h.toISOString().slice(0,10)+"T00:00:00.000Z"};o.dataType!="DateTime"||l||!u?o.lowValue=u:o.lowValue=S(u),o.dataType!="DateTime"||l||!c?o.highValue=c:o.highValue=S(c),o.medianValue=R.length===0?null:R.length%2===0?o.dataType=="Integer"?Math.round((R[A-1]+R[A])/2):(R[A-1]+R[A])/2:R[A],o.numericPrecision=d}if(R.length>0){let S=o.avgValue??0,w=R.length,h=0,W=0;for(let I of R){let b=I-S;h+=b*b,W+=b*b*b}let U=h/w;o.skewness=U===0?0:W/w/Math.pow(Math.sqrt(U),3),o.stdDev=Math.sqrt(U)}r!==null&&(o.sum=r);let O=Array.from(f.entries()).sort((S,w)=>w[1]-S[1]);if(o.topCategories=O.slice(0,10).map(S=>S[1]),!o.isMeasure&&O.length>0){if(o.dataType==="String"){let S=O.map(h=>h[0]);o.formatSignature=ae(S);let w=/^(UUID|EMAIL_LIKE|URL_LIKE|PHONE_LIKE|NUMERIC_ID|HEX_ID|OPAQUE_ID_ALPHANUMERIC|DATE_STR|BOOLEAN)$/;o.formatSignature&&!w.test(o.formatSignature)&&(o.avgLength===void 0||o.avgLength>=3)&&(o.isFreeText=!0)}else o.topCategoryValues=O.slice(0,5).map(S=>S[0]);if(e>=20){let S=O.map(h=>h[0]),w=oe(S,m);if(w!==null)o.ordinalPattern=w.pattern,o.orderedDomain=w.orderedDomain;else if(o.dataType==="String"){let h=Pe(S);h!==null&&(o.safeDistinctValues=h)}}}if(R.length>=8&&(o.dataType==="Integer"||o.dataType==="Decimal")){let S=w=>R[Math.floor((R.length-1)*w)];o.quantiles={p05:S(.05),p25:S(.25),p75:S(.75),p95:S(.95)}}}if(!o.isMeasure&&f.size>0){let R=Array.from(f.entries()).sort((O,S)=>S[1]-O[1]),A=Ge(R.map(O=>O[0]),o.name,m);if(A!==null&&(o.geoKind=A.geoKind,o.geoMatchPct=A.geoMatchPct,A.geoAmbiguous&&(o.geoAmbiguous=!0),A.geoKind.indexOf("country")===0)){let O=he(R);O&&(o.dominantGeoRegion=O.dominantGeoRegion,o.dominantGeoRegionPct=O.dominantGeoRegionPct,o.geoRegionCount=O.regionCount)}}}updateColumnStats10(e,n,i,r,o,s,l){e>=10&&(n.blankCount=this._rows.length-i,n.distinctCount=r.size+(n.blankCount!=0?1:0),n.valueNature="Categorical",i>0&&(n.dataType==="Integer"||n.dataType==="Decimal"?n.valueNature=dt({dataType:n.dataType,isMeasure:!!n.isMeasure,name:n.name,distinct:r.size,nonblank:i,prec:o,maxval:s,minval:l}):n.dataType==="DateTime"&&(n.valueNature=n.dateWithTime?"Continuous":"Ordinal")))}getRowCount(){return this._rows.length}getLeafCardinality(){if(this._leafCardinality!==null)return this._leafCardinality;let e=[];if(this._cols.forEach((i,r)=>{i.isMeasure||e.push(r)}),e.length===0)return this._leafCardinality=this._rows.length,this._leafCardinality;let n=new Set;for(let i of this._rows)n.add(JSON.stringify(e.map(r=>i[r])));return this._leafCardinality=n.size,this._leafCardinality}_leafCardinality=null;getGeoExtent(){if(this._geoExtentComputed)return this._geoExtent;this._geoExtentComputed=!0,this._geoExtent=null;let e=s=>Me(s,{camel:!0}),n=-1,i=-1,r=-1;if(this._cols.forEach((s,l)=>{let u=e(s.name),c=s.dataType==="Integer"||s.dataType==="Decimal";c&&n<0&&u.some(d=>d==="lat"||d==="latitude")?n=l:c&&i<0&&u.some(d=>d==="lon"||d==="lng"||d==="long"||d==="longitude")&&(i=l),r<0&&!s.isMeasure&&typeof s.geoKind=="string"&&s.geoKind.indexOf("country")===0&&(r=l)}),n<0||i<0)return null;let o=[];for(let s of this._rows){let l=s[n],u=s[i],c=l==null||l===""?null:Number(l),d=u==null||u===""?null:Number(u);o.push({lat:c,lon:d,country:r>=0&&ce(this.STR(s[r]))?this.STR(s[r]):null})}return this._geoExtent=Be(o),this._geoExtent}_geoExtent=null;_geoExtentComputed=!1;obfuscateString(e){return nt(e,we)}toObjectArray(){let e=this.liveEnglishAliases();return this._rows.map(n=>{let i={};this._cols.forEach((r,o)=>{i[r.name]=n[o],this.emitLegacyAggAliases&&r.hostName&&r.hostName!==r.name&&!Object.prototype.hasOwnProperty.call(i,r.hostName)&&(i[r.hostName]=n[o])});for(let[r,o]of e)Object.prototype.hasOwnProperty.call(i,o.alias)||(i[o.alias]=n[r]);return i})}async getCSVAsync(e){let n=[],i=e?25:1e7,r=e?4e3:1e7,o=new Map;for(let l of this._rows){let u={};for(let c=0;c<this._cols.length;c++){let d=this._cols[c],f=l[c];if(this.STR(f)!=""){if(e&&d.dataType=="String")if(o.has(f))f=o.get(f);else{let m=this.obfuscateString(f);o.set(f,m),f=m}else if(d.dataType=="DateTime"&&!d.dateWithTime){let m=f instanceof Date?f:typeof f=="string"?pe(f)??new Date(f):new Date(f);f=(this.wholeDayIso(m)??m.toISOString().slice(0,10))+"T00:00:00.000Z"}r-=this.STR(f).length}else f=null;u[c]=f,--r}if(n.push(u),--i,i<=0||r<=0)break}return await mt.unparse(n,{header:!1})}getCSVHeaderLine(){let e=this.liveEnglishAliases();return mt.unparse([this._cols.map((n,i)=>{if(this.emitLegacyAggAliases&&n.hostName)return this.STR(n.hostName);let r=e.get(i);return this.STR(r&&r.headerName?r.alias:n.name)})])}setHostQueryNames(e){this._hostQueryNames=(e??[]).map(n=>n==null?null:this.STR(n)),this._englishAliases=new Map}aliasesForCode(e){let n=ye(e,this._cols)?this.legacyAliases():[];for(let i of this.englishAliasesFor(e).values())n.push({name:i.name,alias:i.alias,reason:"english-implicit-agg"});return n}armAliasesForCode(e){return this.emitLegacyAggAliases=ye(e,this._cols),this._englishAliases=this.englishAliasesFor(e),this.getArmedAliases()}getArmedAliases(){let e=this.emitLegacyAggAliases?this.legacyAliases():[];for(let n of this.liveEnglishAliases().values())e.push({name:n.name,alias:n.alias,reason:"english-implicit-agg"});return e}legacyAliases(){let e=[];for(let n of this._cols)n&&n.hostName&&n.hostName!==n.name&&e.push({name:this.STR(n.name),alias:this.STR(n.hostName),reason:"doubled-agg-prefix"});return e}englishAliasesFor(e){let n=new Map;if(!e||this._hostQueryNames.length===0||!this._cols||this._cols.length===0)return n;let i=String(e),r=new Set;for(let s of this._cols)s&&(r.add(this.STR(s.name)),s.hostName&&r.add(this.STR(s.hostName)));let o=new Map;for(let s=0;s<this._cols.length;s++){if(!this._cols[s])continue;let l=Ye(this._hostQueryNames[s]).filter(u=>!r.has(u)&&ee(i,u));l.length===1&&o.set(l[0],[...o.get(l[0])??[],s])}for(let[s,l]of o){if(l.length!==1)continue;let u=this.STR(this._cols[l[0]].name);n.set(l[0],{name:u,alias:s,headerName:!ee(i,u)})}return n}liveEnglishAliases(){let e=new Map;for(let[n,i]of this._englishAliases){let r=this._cols?this._cols[n]:null;r&&this.STR(r.name)===i.name&&e.set(n,i)}return e}addRow(e,n){if(this.dedupRows){let i="";for(let o of e)i+=this.STR(o)+"~";let r=ve(i);if(this._rowHashes.has(r))return!1;this._rowHashes.add(r)}return this._rows.push(Un(e)),this._origIndices.push(n??-1),!0}getOriginalRowIndex(e){return e<0||e>=this._origIndices.length?-1:this._origIndices[e]}reset(){this._cols=[],this._rows=[],this._origIndices=[],this._rowHashes=new Set,this._leafCardinality=null,this._hostQueryNames=[],this._englishAliases=new Map}setColumns(e){if(this._cols=e,!e||e.length===0)return;let n=new Set(e.map(i=>this.STR(i?.name)));for(let i of e){if(!i)continue;let r=this.STR(i.name),o=Ke(r);!o||o===r||n.has(o)||(n.delete(r),n.add(o),i.hostName=r,i.name=o)}}};export{Be as a,yt as b,ce as c,Hn as d,St as e,_t as f,At as g,Ct as h,me as i,Nt as j,Ke as k,ye as l,Ye as m,Xe as n,wt as o,qe as p,Qe as q,Zn as r,qn as s,Qn as t,Ot as u,Pt as v,kt as w,Je as x,ee as y,jt as z,sr as A,Xt as B,Zt as C,Se as D,ot as E,dn as F,fn as G,gn as H,Sn as I,lt as J,ct as K,gt as L,pt as M,zn as N,Bn as O,Vn as P,dt as Q,Un as R,ft as S};
|
|
2
|
+
import{a as ae}from"./chunk-U3H6UBOO.mjs";import{a as ue,b as le}from"./chunk-555PKUBU.mjs";import{c as Ge}from"./chunk-KQOVPOVU.mjs";import{f as ke,k as Fe}from"./chunk-INMDBTAR.mjs";import{e as De,k as se,m as Oe,n as Pe,o as oe}from"./chunk-GKXYRUK5.mjs";import{B as pe,D as Le,f as ge,h as re,i as j,j as Me,k as ie,n as xe,o as Re,q as Te,s as Ne,t as Ee,v as Ie,w as H,x as ve,y as we}from"./chunk-4VN252CK.mjs";var ht=[[24.4,49.4,-125,-66.9],[51.2,71.5,-168,-129.9],[18.9,22.3,-160.3,-154.8]],bt=[7,72,-172,-52];function We(t,e,n){return t>=n[0]&&t<=n[1]&&e>=n[2]&&e<=n[3]}var X=t=>Math.round(t*10)/10;function Be(t,e=3){let n=[],i=[],r=0,o=0;for(let l of t){let u=l?.lat,c=l?.lon;if(typeof u!="number"||typeof c!="number"||!isFinite(u)||!isFinite(c)||u<-90||u>90||c<-180||c>180)continue;n.push(u),i.push(c);let d=l?.country?String(l.country).trim().toUpperCase():"",f=d?ce(d):null;f?((d==="US"||d==="USA")&&r++,f==="north-america"&&o++):(ht.some(m=>We(u,c,m))&&r++,We(u,c,bt)&&o++)}let s=n.length;return s<e?null:(n.sort((l,u)=>l-u),i.sort((l,u)=>l-u),{pctUsa:X(r/s*100),pctNa:X(o/s*100),latP5:X(H(n,.05)),latP95:X(H(n,.95)),lonP5:X(H(i,.05)),lonP95:X(H(i,.95)),n:s})}var ze={"north-america":"AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI","south-america":"AR BO BR CL CO EC FK GF GY PE PY SR UY VE",europe:"AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA",africa:"AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW",asia:"AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE",oceania:"AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS",antarctica:"AQ BV GS HM TF"},J=(()=>{let t=new Map;for(let e of Object.keys(ze))for(let n of ze[e].split(/\s+/))n&&t.set(n,e);return t})();function yt(t){for(let[e,n]of t){let i=J.get(e);i&&!J.has(n)&&J.set(n,i)}}yt(ke);function ce(t){if(!t)return null;let e=String(t).trim().toUpperCase();if(!e)return null;let n=J.get(e);if(n)return n;let i=Fe(String(t));return i?J.get(i)??null:null}function Hn(t,e=2){return he(t.map(n=>[n,1]),e)}function he(t,e=2){let n=new Map,i=0;for(let[s,l]of t){let u=ce(s);if(!u)continue;let c=typeof l=="number"&&isFinite(l)&&l>0?l:1;n.set(u,(n.get(u)??0)+c),i+=c}if(i<e||!n.size)return null;let r="europe",o=-1;for(let s of Array.from(n.keys()).sort()){let l=n.get(s);l>o&&(r=s,o=l)}return{dominantGeoRegion:r,dominantGeoRegionPct:X(o/i*100),regionCount:n.size,n:i}}import mt from"papaparse";var St=["rate","ratio","pct","percent","percentage","rating","share","score","index","nps","csat","margin","yield","coverage","utilization","utilisation","z[_-]?score","average","avg","mean","median","stddev","variance","gpa","percentile","quantile","efficiency","accuracy","probability","multiplier","coefficient","correlation","occupancy","age","bmi","temperature","density","pressure","humidity","ph","velocity","speed","elevation","altitude","latency","throughput","bandwidth","iops","ppm","ppb","dpmo","bps","temperatuur","temperatur","temperatura","teplota","lampotila","homerseklet","sicaklik","pression","presion","pressao","pressione","druck","tryck","tlak","paine","nyomas","presiune","humidite","humedad","umidade","umidita","feuchtigkeit","vochtigheid","kosteus","vlhkost","vitesse","velocidad","velocidade","velocita","geschwindigkeit","snelheid","hastighet","hastighed","rychlost","nopeus","sebesseg","brzina","predkosc","densite","densidad","densidade","densita","dichte","dichtheid","hustota","tiheys","gustoca","moyenne","mediane","promedio","mediana","gemiddelde","durchschnitt","mittelwert","genomsnitt","gennemsnit","gjennomsnitt","keskiarvo","atlag","ortalama","prosjek","srednia","prumer","priemer","medie","taux","tasa","taxa","tasso","verhaltnis","verhouding","aandeel","anteil","andel","osuus","podil","udzial","udio","pourcentage","porcentaje","percentual","prozent","procent","prosentti","szazalek","yuzde","participacion","participacao","pondere","omjer","arany","oran","rata","leeftijd","edad","idade","wiek","eletkor","varsta","puntuacion","pontuacao","punteggio","betyg","ocena","indice","indeks","wskaznik","puan"],_t=["pct","percent","percentage","rate","ratio","rating","share","score","index","nps","csat","margin","yield","coverage","utilization","utilisation","gpa","percentile","quantile","bmi","density","pressure","humidity","velocity","efficiency","occupancy","latency","throughput","bandwidth","iops","ppm","ppb","dpmo","bps"],At=["latitude","longitude"],Ct=["latitude","longitude"];function Z(t){return re(t)}var be=["somme de","suma de","soma de","summe von","som van","somma di","summa av","sum av","sum af","soucet z","suma z","totaal van","total de","toplam","osszeg","nombre de","recuento de","contagem de","anzahl von","aantal van","conteggio di","antal av","lukumaara","pocet z"],Ue=["moyenne de","promedio de","media de","media di","durchschnitt von","gemiddelde van","medelvarde av","genomsnitt av","gennemsnit af","keskiarvo","atlag","ortalama","prumer z","srednia z","medie de","minimum de","minimo de","minimo di","minimum von","maximum de","maximo de","massimo di","maximum von"];function Mt(t){return[...t].sort((e,n)=>n.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")}var $e=new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:"+Mt(be)+")\\s+)","i"),xt=/(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g,Rt=new RegExp("\\b("+St.join("|")+")\\b|("+_t.join("|")+")$","i"),Tt=new RegExp("\\b("+At.join("|")+")\\b|("+Ct.join("|")+")$","i");function me(t){if(!t)return"";let e=String(t),n=$e.exec(Z(e));return(n?e.slice(n[0].length):e).trim()}function Nt(t){return!!t&&$e.test(Z(String(t)))}var Et=["count (distinct)","count distinct","distinct count","standard deviation","average","variance","median","product","stddev","std dev","count","sum","avg","min","minimum","max","maximum","var"],Ve=new RegExp("^\\s*("+[...Et].sort((t,e)=>e.length-t.length).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+")).join("|")+")\\s+of\\s+","i");function Ke(t){if(t==null)return"";let e=String(t),n=Ve.exec(e);if(!n)return e;let i=l=>l.toLowerCase().replace(/\s+/g," ").trim(),r=i(n[1]),o=e.slice(n[0].length),s=0;for(;s<8;){let l=Ve.exec(o);if(!l||i(l[1])!==r)break;let u=o.slice(l[0].length);if(u.trim()==="")break;o=u,s++}return s===0?e:e.slice(0,n[0].length)+o}function ye(t,e){if(!t||!e)return!1;let n=String(t);for(let i of e){let r=i?.hostName;if(r&&r!==i?.name&&n.includes(r))return!0}return!1}var He={Sum:["Sum of "],Avg:["Average of "],Average:["Average of "],Count:["Count of "],CountNonNull:["Count of "],Min:["Min of ","First ","Earliest "],Max:["Max of ","Last ","Latest "],Median:["Median of "],StandardDeviation:["Standard deviation of "],Variance:["Variance of "]},It=new RegExp("^("+Object.keys(He).join("|")+")\\((.+)\\)$");function Ye(t){if(!t)return[];let e=It.exec(String(t).trim());if(!e)return[];let n=He[e[1]],i=e[2],r=[];for(let o=i.indexOf(".");o>=0;o=i.indexOf(".",o+1)){if(o===0)continue;let s=i.slice(o+1);if(s.trim()!=="")for(let l of n){let u=l+s;r.includes(u)||r.push(u)}}return r}function vt(t){let e=me(t);return e.length===0?"":e.replace(xt," ")}function je(t,e){if(!e)return!1;let n=me(e);return t.test(Z(vt(e)))||t.test(Z(n))||t.test(Z(j(n).join(" ")))}function Xe(t){return je(Tt,t)}function wt(t){return je(Rt,t)||Xe(t)}var Ze=/int|double|decimal|single|float|number|currency|money/i;function Lt(t){let e=String(t?.valueNature??"").trim().toLowerCase();return e==="categorical"?"Categorical":e==="ordinal"?"Ordinal":e==="continuous"||t?.isMeasure===!0||Ze.test(String(t?.dataType??""))?"Continuous":"Categorical"}function Dt(t){return t?.isMeasure===!0||Ze.test(String(t?.dataType??""))}function qe(t){let e=t??{},n=Lt(e);if(n!=="Continuous")return{nature:n,additivity:"unknown",basis:"role",suppressed:!1};if(Xe(e.name))return{nature:n,additivity:"positional",basis:"name",suppressed:!0};let i=String(e.additivity??"").trim().toLowerCase();if(!(i==="additive"&&Nt(e.name))){if(i==="additive")return{nature:n,additivity:"additive",basis:"measured",suppressed:!1};if(i==="part_of_whole")return{nature:n,additivity:"part_of_whole",basis:"measured",suppressed:!1};if(i==="intensive_rate")return{nature:n,additivity:"intensive_rate",basis:"measured",suppressed:!1}}return e.discourageAggregationAcrossGroups===!0?{nature:n,additivity:"intensive_rate",basis:"host-flag",suppressed:!1}:wt(e.name)?{nature:n,additivity:"intensive_rate",basis:"name",suppressed:!1}:{nature:n,additivity:"additive",basis:"default",suppressed:!1}}function Qe(t){let e=qe(t),n=t??{};if(e.nature==="Categorical")return["first","distinctcount","count"];if(e.nature==="Ordinal")return Dt(n)?["median","average","min","max","first","distinctcount","count"]:["first","distinctcount","count"];switch(e.additivity){case"positional":return["min","max","count","distinctcount","first"];case"intensive_rate":return["average","median","min","max","count","distinctcount","first"];default:return["sum","average","median","min","max","count","distinctcount","first"]}}function Zn(t){return Qe(t)[0]}function qn(t,e){return Qe(t).indexOf(e)>=0}function Qn(t,e){if(e!=="sum"&&e!=="count")return!1;if(e==="count")return!0;let n=qe(t);return n.additivity==="additive"||n.additivity==="part_of_whole"||n.additivity==="unknown"}var Ot={de:["nr","nummer","kennung","kennziffer","plz","postleitzahl"],nl:["nr","nummer"],sv:["nr","nummer"],da:["nr","nummer"],nb:["nr","nummer"],fi:["tunnus","koodi","nro"],hu:["azonos\xEDt\xF3","k\xF3d"],tr:["kod","kodu","numaras\u0131","numarasi"],zh:["\u7F16\u53F7","\u4EE3\u7801","\u7F16\u7801","\u53F7\u7801","\u90AE\u7F16"],ja:["\u756A\u53F7","\u30B3\u30FC\u30C9"],ko:["\uBC88\uD638","\uCF54\uB4DC"],hi:["\u0915\u094B\u0921","\u0915\u094D\u0930\u092E\u093E\u0902\u0915"],fr:["num\xE9ro"],es:["c\xF3digo"],pt:["c\xF3digo","cep"],it:["codice"],pl:["kod","numer"],cs:["k\xF3d","\u010D\xEDslo"],sk:["k\xF3d","\u010D\xEDslo"],hr:["\u0161ifra","oznaka"],ru:["\u043A\u043E\u0434","\u043D\u043E\u043C\u0435\u0440"],uk:["\u043A\u043E\u0434","\u043D\u043E\u043C\u0435\u0440"],el:["\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2"],ar:["\u0631\u0645\u0632","\u0643\u0648\u062F","\u0631\u0642\u0645"],he:["\u05E7\u05D5\u05D3"],id:["kode","nomor"],vi:["m\xE3"],th:["\u0E23\u0E2B\u0E31\u0E2A"]},Pt=["fr","es","pt","it","pl","cs","sk","hr","ru","uk","el","ar","he","id","vi","th"],kt=["num\xE9ro"],Ft=t=>t.normalize("NFC").toLowerCase();function Gt(t,e,n,i){let r=ge(n);return!r||!t?null:t===e?"word":r.wordBreaks===!1?Array.from(e).length<Ee?null:(i?t.startsWith(e):t.endsWith(e))&&t.length>e.length?"suffix":null:i?Te(t,n).includes(e)?"word":null:r.script==="Hang"?Ne(t,e)?"suffix":null:r.compounds&&Re(t,e,xe)?"suffix":null}function Je(t){let e=String(t??"").trim();if(!e)return null;let n=ie(e),i=ie(me(e));for(let[r,o]of Object.entries(Ot)){let s=Pt.includes(r),l=s?i:n;for(let u of o){let c=kt.includes(u)||!!ge(r)?.foldSensitive,d=c?l.words:l.folded;if(d.length===0)continue;let f=c?Ft(u):ie(u).folded.join(" "),m=Gt(s?d[0]:d[d.length-1],f,r,s);if(m)return{lang:r,word:u,view:m}}}return null}var Wt=[["Lu",/^\p{Lu}$/u],["Ll",/^\p{Ll}$/u],["Lt",/^\p{Lt}$/u],["Lm",/^\p{Lm}$/u],["Lo",/^\p{Lo}$/u],["Mn",/^\p{Mn}$/u],["Mc",/^\p{Mc}$/u],["Nd",/^\p{Nd}$/u]];function de(t){for(let[e,n]of Wt)if(n.test(t))return e;return null}var zt=[{id:"ascii",test:/^[A-Za-z]$/,ranges:[[65,90],[97,122]]},{id:"latin",test:/^[\u00C0-\u017F]$/u,ranges:[[192,383]]},{id:"cyrillic",test:/^[\u0400-\u045F\u0490-\u0491]$/u,ranges:[[1024,1119],[1168,1169]]},{id:"greek",test:/^[\u0386-\u03CE]$/u,ranges:[[902,974]]},{id:"han",test:/^[\u4E00-\u9FFF]$/u,ranges:[[19968,40959]]},{id:"hiragana",test:/^\p{Script=Hiragana}$/u,ranges:[[12353,12447]]},{id:"katakana",test:/^\p{Script=Katakana}$/u,ranges:[[12448,12543]]},{id:"hangul",test:/^[\uAC00-\uD7A3]$/u,ranges:[[44032,55203]]},{id:"arabic",test:/^[\u0620-\u0652\u0671-\u06D3]$/u,ranges:[[1568,1618],[1649,1747]]},{id:"hebrew",test:/^[\u05B0-\u05EA]$/u,ranges:[[1456,1514]]},{id:"devanagari",test:/^\p{Script=Devanagari}$/u,ranges:[[2304,2431]]},{id:"thai",test:/^\p{Script=Thai}$/u,ranges:[[3585,3662]]}],fe=new Map;function et(t,e,n,i){let r=fe.get(t);if(r)return r;let o=[];for(let[s,l]of e)for(let u=s;u<=l;u++){let c=String.fromCodePoint(u);de(c)===n&&(i&&!i.test(c)||o.push(c))}return fe.set(t,o),o}function Bt(t){let n=t.codePointAt(0);for(let s=0;s<9&&de(String.fromCodePoint(n-1))==="Nd";s++)n--;let i="nd:"+n.toString(16),r=fe.get(i);if(r)return r;let o=[];for(let s=n;s<n+10;s++){let l=String.fromCodePoint(s);de(l)==="Nd"&&o.push(l)}return fe.set(i,o),o}function Vt(t,e){if(e==="Nd")return Bt(t);for(let r of zt)if(r.test.test(t))return et(r.id+":"+e,r.ranges,e,r.id==="ascii"?null:r.test);let i=t.codePointAt(0)&-128;return et("block:"+i.toString(16)+":"+e,[[i,i+127]],e,null)}function Ut(t,e,n,i){let r=t.filter(o=>!e.has(o));return r.length===0&&(r=t.filter(o=>o!==n)),r.length===0?n:r[Math.min(r.length-1,Math.floor(i()*r.length))]}var $t=/^[\p{L}\p{M}\p{Nd}]$/u,tt=/^[\p{L}\p{Nd}]$/u;function nt(t,e){if(!t)return t??"";let n=new Set(Array.from(t)),i=d=>{let f=de(d);return!f||!$t.test(d)?d:Ut(Vt(d,f),n,d,e)},r=d=>{let f=[];for(let m of d)f.push(i(m)),tt.test(m)&&e()<.2&&f.push(i(m));if(f.length>6){let m=Math.floor(e()*Math.min(3,f.length-6));for(let R=0;R<m;R++)for(let A=0;A<5;A++){let O=Math.floor(e()*f.length);if(tt.test(f[O])){f.splice(O,1);break}}}return f.join("")};if(!(t.includes("@")&&t.includes(".")))return r(t);let[s,l=""]=t.split("@"),u=l.endsWith(".com"),c=u?l.slice(0,-4):l;return`${r(s)}@${r(c)}${u?".com":""}`}var Kt=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Ht=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Yt=new RegExp([String.raw`\bisMeasure\b`,String.raw`\bdataType\b`,String.raw`\bcolumns\s*\[\s*-?\d`,String.raw`\.iloc\s*\[[^\]]*,`,String.raw`\.iat\s*\[`,String.raw`\bselect_dtypes\b`,String.raw`\b_get_numeric_data\b`,String.raw`\bis_numeric_dtype\b`,String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`,String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`,String.raw`\bdf\.dtypes\b`,String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`,String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));function ee(t,e){if(!t||!e)return!1;let n=Ht(e);return new RegExp("['\"`]"+n+"['\"`]").test(t)?!0:Kt.test(e)&&new RegExp("\\."+n+"(?![A-Za-z0-9_$])").test(t)}function jt(t){return!!t&&Yt.test(t)}function sr(t,e,n){return t?jt(t)?[...e]:[...n,...e].some(i=>ee(t,i))?e.filter(i=>ee(t,i)):[...e]:[]}var Xt=5,Zt=6,qt=3,q=864e5,Qt=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?Z?)?$/,Jt=/^(\d{4})[-/](\d{1,2})$/,en=/^(\d{4})[-\s]?Q([1-4])$/i,tn=/^Q([1-4])[-\s](\d{4})$/i,nn=/^(\d{4})$/,rn=/^(\d{4})(0[1-9]|1[0-2])$/,sn=/^(\d{4})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/,on=/^(\D+?)[\s\-/.,']*((?:19|20)\d{2})$/u,an=/^((?:19|20)\d{2})[\s\-/.,']+(\D+)$/u;function rt(t,e){let n=ue(t);if(!n)return 0;if(n==="sept")return 9;for(let i of e&&!/^en\b/i.test(e)?["en",e]:["en"]){let r=le(i)[n];if(r!==void 0)return r+1}return 0}function un(t){let e=se(t).filter(i=>i.yearDigits===4);if(e.length===0||e.some(i=>i.lang==="en"))return null;let n=e[0];return e.some(i=>i.grain!=="quarter"||i.n!==n.n||i.year!==n.year)?null:$(n.year,(n.n-1)*3+1,1)}function $(t,e,n,i=0,r=0,o=0){if(!(t>=1&&e>=1&&e<=12&&n>=1&&n<=31))return null;let s=Date.UTC(t,e-1,n,i,r,o);if(!Number.isFinite(s))return null;let l=u=>u<10?"0"+u:String(u);return{ms:s,y:t,m:e,d:n,iso:`${t}-${l(e)}-${l(n)}`}}function ln(t,e){let n=[],i="";for(let u=0;u<e.length;u++){if(e[u]!=="%"){i+=e[u].replace(/[.*+?^${}()|[\]\\]/g,"\\$&");continue}switch(e[++u]){case"Y":n.push("Y"),i+="(\\d{4})";break;case"m":n.push("m"),i+="(\\d{1,2})";break;case"d":n.push("d"),i+="(\\d{1,2})";break;case"H":case"M":case"S":i+="\\d{1,2}";break;case"%":i+="%";break;default:return null}}let r=new RegExp("^"+i+"$").exec(t);if(!r)return null;let o=0,s=1,l=1;return n.forEach((u,c)=>{let d=+r[c+1];u==="Y"?o=d:u==="m"?s=d:l=d}),o?$(o,s,l):null}function Se(t,e,n){let i=(t??"").trim();if(i==="")return null;if(e){let s=ln(i,e);return s||null}let r=Qt.exec(i);if(r)return $(+r[1],+r[2],+r[3],+(r[4]??0),+(r[5]??0),+(r[6]??0));if(r=en.exec(i),r)return $(+r[1],(+r[2]-1)*3+1,1);if(r=tn.exec(i),r)return $(+r[2],(+r[1]-1)*3+1,1);if(r=Jt.exec(i),r&&+r[2]>=1&&+r[2]<=12)return $(+r[1],+r[2],1);if(r=sn.exec(i),r)return $(+r[1],+r[2],+r[3]);if(r=rn.exec(i),r)return $(+r[1],+r[2],1);if(r=nn.exec(i),r){let s=+r[1];return s>=1900&&s<=2100?$(s,1,1):null}let o=un(i);if(o)return o;if(r=on.exec(i),r){let s=rt(r[1],n);return s?$(+r[2],s,1):null}if(r=an.exec(i),r){let s=rt(r[2],n);return s?$(+r[1],s,1):null}return null}function it(t){let e=new Date(t).getUTCDay();return e>=1&&e<=5}function st(t,e){if(e<=t)return 0;let n=Math.round((e-t)/q),i=Math.floor(n/7),r=i*5,o=t+i*7*q;for(;o<e;)it(o)&&r++,o+=q;return r}function cn(t){if(t.length===0)return 0;let e=[...t].sort((i,r)=>i-r),n=e.length>>1;return e.length%2?e[n]:(e[n-1]+e[n])/2}function mn(t){return t>0?t<.95?"hour":t<=1.05?"day":t>=6.5&&t<=7.5?"week":t>=27&&t<=31.5?"month":t>=88&&t<=93?"quarter":t>=362&&t<=368?"year":"irregular":"irregular"}function te(t,e,n,i){switch(n){case"year":return e.y-t.y;case"quarter":return e.y*4+Math.floor((e.m-1)/3)-(t.y*4+Math.floor((t.m-1)/3));case"month":return e.y*12+e.m-(t.y*12+t.m);case"week":return Math.round((e.ms-t.ms)/(7*q));case"weekday":return st(t.ms,e.ms);case"day":return Math.round((e.ms-t.ms)/q);default:return i>0?Math.round((e.ms-t.ms)/i):0}}function ot(t,e){return _e(t,e)?.cadence??null}function _e(t,e){let n=e?.gapFactor??Xt,i=0,r=0,o=new Map;for(let h of t){if(h==null||h==="")continue;i++;let W=Se(String(h),e?.pattern,e?.locale);W&&(r++,o.set(W.ms,W))}let s=[...o.values()].sort((h,W)=>h.ms-W.ms);if(s.length<qt||i>0&&r/i<.8)return null;let l=s[s.length-1].ms-s[0].ms;if(l<=0)return null;let u=[];for(let h=1;h<s.length;h++)u.push(s[h].ms-s[h-1].ms);let c=cn(u);if(!(c>0))return null;let d=mn(c/q);d==="day"&&l>=7*q&&s.every(h=>it(h.ms))&&st(s[0].ms,s[s.length-1].ms)+1>s.length*.5&&(d="weekday");let f=d==="irregular"?s.length:te(s[0],s[s.length-1],d,c)+1,m=1,R=1,A=[],O=s[0],S=1;for(let h=1;h<s.length;h++){let W=te(s[h-1],s[h],d,c);W>m&&(m=W),d!=="irregular"&&W>n?(R++,A.push({from:O.iso,to:s[h-1].iso,points:S}),O=s[h],S=1):S++}A.push({from:O.iso,to:s[s.length-1].iso,points:S});let w={grain:d,points:s.length,expectedPoints:Math.max(f,s.length),coveragePct:Math.round(s.length/Math.max(f,s.length)*1e3)/10,runs:R,largestGapUnits:m,gapFactor:n};return e?.includeBounds&&A.length<=Zt&&(w.runBounds=A),{cadence:w,points:s,stepMs:c}}var dn=8,fn=.5,gn=200,pn=new Set(["category","categories","subcategory","type","types","kind","class","classes","classification","segment","segments","tier","status","priority","severity","grade","level","band","bucket","group","channel","method","mode","stage","phase","period","shift","gender","sex","result","outcome","reason","flag","genre","sector","source"]),hn=["category","classification","segment","status","priority","severity","channel"],bn=new Set(["UUID","EMAIL_LIKE","URL_LIKE","PHONE_LIKE","NUMERIC_ID","HEX_ID","OPAQUE_ID_ALPHANUMERIC","DATE_STR","BOOLEAN"]);function yn(t){let e=j(t);if(e.length===0)return!1;let n=e[e.length-1];return pn.has(n)?!0:hn.some(i=>n.length>i.length&&n.endsWith(i))}function Sn(t){if(t.isMeasure)return"measure";if(t.isTemporal||t.isDatePart||t.isReassembledDate)return"temporal";let e=Array.from(t.values).filter(n=>n!==""&&n!==null&&n!==void 0);return e.length<2||e.length>gn?"cardinality":t.rows>0&&e.length>=t.rows?"row-identity":t.isBinaryFlag?"flag":oe(e,t.locale)!==null?"ordinal":t.identifierNamed||t.dataType==="String"&&bn.has(ae(e))?"identifier":!t.geoKind&&yn(t.name)?"attribute":"entity"}function lt(t){let e=-1,n=1/0,i=!1;return t.forEach((r,o)=>{if(Sn(r)!=="entity")return;let s=new Set(Array.from(r.values).filter(u=>u!=="")).size,l=!!r.geoKind;(s<n||s===n&&l&&!i)&&(e=o,n=s,i=l)}),e}var at=t=>t<10?"0"+t:String(t);function ut(t,e){switch(e){case"year":return`${t.y}-01-01`;case"quarter":return`${t.y}-${at(Math.floor((t.m-1)/3)*3+1)}-01`;case"month":return`${t.y}-${at(t.m)}-01`;case"hour":return new Date(t.ms).toISOString().replace(/\.\d{3}Z$/,"Z");default:return t.iso}}function ct(t){let{periods:e,series:n}=t,i=Math.min(e.length,n.length),r=new Set;for(let I=0;I<i;I++)e[I]&&r.add(e[I]);let o=_e(r,{pattern:t.pattern,locale:t.locale});if(!o)return null;let s=o.cadence.grain;if(s==="irregular")return null;let l=o.points[0],u=te(l,o.points[o.points.length-1],s,o.stepMs)+1;if(u!==o.cadence.expectedPoints)return null;let c=new Map;for(let I of r){let b=Se(I,t.pattern,t.locale);if(!b)continue;let P=te(l,b,s,o.stepMs);P>=0&&P<u&&c.set(I,{idx:P,stamp:b})}let d=new Map;for(let I=0;I<i;I++){let b=n[I];if(!b)continue;let P=c.get(e[I]);if(!P)continue;let z=d.get(b);z||(z={seen:new Set,lo:P.idx,hi:P.idx,loStamp:P.stamp,hiStamp:P.stamp,order:d.size},d.set(b,z)),z.seen.add(P.idx),P.idx<z.lo&&(z.lo=P.idx,z.loStamp=P.stamp),P.idx>z.hi&&(z.hi=P.idx,z.hiStamp=P.stamp)}if(d.size<2)return null;let f=0;for(let I of d.values())f+=I.seen.size;if(f/(d.size*u)<(t.minFill??fn))return null;let m=[],R=new Set,A=0,O=0,S=0,w=0,h=0,W=1;for(let[I,b]of d){for(let B of b.seen)R.add(B);if(b.seen.size>=u)continue;let P=[...b.seen].sort((B,a)=>B-a),z=1;for(let B=1;B<P.length;B++)z=Math.max(z,P[B]-P[B-1]);let Y={key:I,acc:b,coverage:b.seen.size/u,before:b.lo,after:u-1-b.hi,interior:b.hi-b.lo+1-b.seen.size,gap:z};m.push(Y),Y.before>0&&A++,Y.after>0&&O++,Y.interior>0&&S++,w=Math.max(w,Y.before),h=Math.max(h,Y.after),W=Math.max(W,z)}if(m.length===0)return null;m.sort((I,b)=>I.coverage-b.coverage||I.acc.order-b.acc.order);let U=m.slice(0,t.maxListed??dn);return{seriesColumn:t.seriesColumn,grain:s,periods:u,seriesCount:d.size,incompleteSeries:m.length,lateStarts:A,earlyEnds:O,withHoles:S,columnWideMissing:u-R.size,maxMissingBefore:w,maxMissingAfter:h,largestGap:W,series:U.map(I=>{let b={};return t.includeNames&&(b.name=I.key),t.includeDates&&(b.first=ut(I.acc.loStamp,s),b.last=ut(I.acc.hiStamp,s)),b.missingBefore=I.before,b.missingAfter=I.after,b.missingInterior=I.interior,b.largestGap=I.gap,b.coverage=Math.round(I.coverage*1e3)/1e3,b}),more:m.length-U.length}}var _n=12,An=100,Cn=.3,Mn=.9,xn=120,Rn=1900,Tn=2100,Nn=0,En=20,In=new Set(["id","ids","uuid","guid","key","zip","zipcode","postal","postalcode","ssn","code","codes","sku","isbn","msisdn","imei"]);function gt(t){if(!t)return!1;let e=j(t);return e.length===0?!1:In.has(e[e.length-1])?!0:Je(t)!==null}var vn=new Set(["year","yr","fy"]),wn=t=>j(t).some(e=>vn.has(e))||De(t)!==null,Ln=/^(?:(?:19|20)\d{2}(?:[-/ ]?(?:q[1-4]|w(?:0?[1-9]|[1-4]\d|5[0-3])|(?:0?[1-9]|1[0-2])))?|q[1-4][-/ ](?:19|20)\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*[-/ ]?(?:19|20)?\d{2})$/i;function Ae(t){if(!Number.isInteger(t)||t<190001||t>210012)return!1;let e=t%100;return e>=1&&e<=12}function Ce(t){if(!Number.isInteger(t)||t<19000101||t>21001231)return!1;let e=Math.floor(t/100)%100,n=t%100;return e>=1&&e<=12&&n>=1&&n<=31}var Dn=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?Z?)?$/,On=/^(\d{4})([\/.])(\d{1,2})\2(\d{1,2})$/,Pn=/^(\d{1,2})([\/.\-])(\d{1,2})\2(\d{4})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/;function kn(t){let e=(t||"").toLowerCase();return e==="en-us"||e==="en"||e.startsWith("en-us-")||e==="en-ph"||e==="en-bz"}function pt(t,e){let n=0,i=0,r=0,o=0,s=0,l="",u=0,c="",d=0,f=0,m=0,R=0,A=!1;for(let U of t){if(U==null)continue;let I=String(U).trim();if(I==="")continue;n++;let b;if(b=Dn.exec(I)){let P=+b[2],z=+b[3];P>=1&&P<=12&&z>=1&&z<=31&&(i++,b[4]!==void 0&&r++,b[6]!==void 0&&o++)}else if(b=On.exec(I)){let P=+b[3],z=+b[4];P>=1&&P<=12&&z>=1&&z<=31&&(l&&l!==b[2]&&(A=!0),l=b[2],s++)}else if(b=Pn.exec(I)){let P=+b[1],z=+b[3];P>=1&&P<=31&&z>=1&&z<=31&&(P<=12||z<=12)&&(c&&c!==b[2]&&(A=!0),c=b[2],u++,P>12&&m++,z>12&&R++,b[5]!==void 0&&d++,b[7]!==void 0&&f++)}if(n>=200)break}if(n<2||(i+s+u)/n<.8||(i>0?1:0)+(s>0?1:0)+(u>0?1:0)!==1||A)return null;if(i>0)return r===i?{pattern:o===i?"%Y-%m-%dT%H:%M:%S":"%Y-%m-%dT%H:%M",orderFrom:"iso"}:{pattern:"%Y-%m-%d",orderFrom:"iso"};if(s>0)return{pattern:`%Y${l}%m${l}%d`,orderFrom:"iso"};if(m>0&&R>0)return null;let w,h;m>0?(w=!0,h="values"):R>0?(w=!1,h="values"):(w=!kn(e),h="locale");let W=w?`%d${c}%m${c}%Y`:`%m${c}%d${c}%Y`;return d===u?{pattern:W+(f===u?" %H:%M:%S":" %H:%M"),orderFrom:h}:{pattern:W,orderFrom:h}}function Fn(t,e){if(!e||!/\b(?:19|20)\d{2}\b/.test(t))return!1;let n=t.replace(/\b(?:19|20)\d{2}\b/g,"").replace(/[-/.,]/g," ").trim();if(!n)return!1;let i=ue(n);return i.length>0&&e[i]!==void 0}var Gn=/(?:19|20)[0-9]{2}/;function Wn(t){let e=new Map,n=0;for(let r of t){if(!Gn.test(re(r)))continue;let o=new Set(se(r).filter(s=>s.yearDigits===4&&(s.grain==="quarter"||s.grain==="week")).map(s=>s.lang));if(o.size!==0){if(o.has("en")){n++;continue}for(let s of o)e.set(s,(e.get(s)??0)+1)}}let i=0;for(let r of e.values())i=Math.max(i,r);return i>0?i+n:0}function zn(t){let{dataType:e,name:n,isMeasure:i,distinctCount:r}=t;if(e==="DateTime")return!0;if(i)return!1;if(e==="Integer"||e==="Decimal"){let o=t.minNum,s=t.maxNum;if(!(o!=null&&s!=null&&Number.isFinite(o)&&Number.isFinite(s)&&Number.isInteger(o)&&Number.isInteger(s)&&s>=o))return!1;let u=o>=1900&&s<=2100;if(u&&r>=2&&wn(n)||u&&r>=3&&r===s-o+1)return!0;let c=Ae(o)&&Ae(s),d=Ce(o)&&Ce(s);if(c||d){if(!t.sampleValues)return!0;let f=0,m=0;for(let R of t.sampleValues){if(R==null||R==="")continue;f++;let A=Number(String(R).trim());if(Number.isFinite(A)&&(c?Ae(A):Ce(A))&&m++,f>=60)break}if(f>=2&&m===f)return!0}return!1}if(t.sampleValues){let o=t.locale?le(t.locale):null,s=0,l=0,u=[],c=[];for(let d of t.sampleValues){if(d==null||d==="")continue;s++;let f=String(d).trim();if(u.push(f),Ln.test(f)||Fn(f,o)?l++:c.push(f),s>=60)break}if(s>=2&&l/s>=.8||s>=2&&(l+Wn(c))/s>=.8||pt(u,t.locale)!==null)return!0}return!1}function Bn(t){let e=Z((t||"").trim().toLowerCase());return e.startsWith("sum ")||e.startsWith("total ")?"sum":e.startsWith("average ")||e.startsWith("avg. ")?"avg":e.startsWith("count ")||e.startsWith("distinct count ")||e.startsWith("count (distinct) ")?"count":e.startsWith("min ")||e.startsWith("minimum ")?"min":e.startsWith("max ")||e.startsWith("maximum ")?"max":Ue.some(n=>e.startsWith(n+" "))?/^(minimum|minimo)\b/.test(e)?"min":/^(maximum|maximo|massimo)\b/.test(e)?"max":"avg":be.some(n=>e.startsWith(n+" ")||e===n)?/^(nombre|recuento|contagem|anzahl|aantal|conteggio|antal|lukumaara|pocet)\b/.test(e)?"count":"sum":null}function Vn(t){let{rows:e,measureColIdx:n,measureName:i,candidateDims:r,minNum:o,maxNum:s,discourageAgg:l}=t,u=100,c=.01,d="";for(let m of r){if(m.distinct<2||m.distinct>u)continue;let R=r.filter(h=>h.idx!==m.idx).map(h=>h.idx),A=new Map;for(let h of e){let W=h[n];if(typeof W!="number"||!Number.isFinite(W))continue;let U=R.length?R.map(b=>String(h[b])).join(d):"",I=A.get(U);I||(I={sum:0,cset:new Set},A.set(U,I)),I.sum+=W,I.cset.add(String(h[m.idx]))}let O=0,S=0,w=0;for(let h of A.values())h.cset.size<2||(w++,Math.abs(h.sum-100)<=100*c?O++:Math.abs(h.sum-1)<=1*c&&S++);if(w>=2&&(O/w>=.9||S/w>=.9))return{additivity:"part_of_whole",partOfWholeDim:m.name}}if(l)return{additivity:"intensive_rate"};let f=Bn(i);return f==="avg"||f==="min"||f==="max"?{additivity:"intensive_rate"}:f==="count"?{additivity:"additive"}:f==="sum"?{additivity:"unknown"}:o!=null&&s!=null&&Number.isFinite(o)&&Number.isFinite(s)&&o>=0&&s<=1.0001&&s>0?{additivity:"intensive_rate"}:{additivity:"unknown"}}function dt(t){let{dataType:e,isMeasure:n,name:i,distinct:r,nonblank:o,prec:s,maxval:l,minval:u}=t,c=l-u+1,d=c>0?r/c:1,f=o>0?r/o:0,m=e==="Decimal"||s>0;return gt(i)?"Categorical":d>=Mn&&(Oe(i)&&r<=xn||u>=Rn&&l<=Tn||u>=Nn&&l<=En)?"Ordinal":n||r>_n&&(m||r>=An||f>=Cn)?"Continuous":"Categorical"}function Un(t){let e=null;for(let n=0;n<t.length;n++){let i=t[n];if(typeof i!="string"||i.length===0)continue;let r=i.trim();r.length!==i.length&&(e||(e=t.slice()),e[n]=r)}return e||t}var ft=class{_computedStatsForLevel=null;_cols=[];_rows=[];_origIndices=[];_rowHashes=new Set;_hostQueryNames=[];_englishAliases=new Map;dedupRows=!0;emitLegacyAggAliases=!1;STR(e){return e==null?"":e instanceof Date?this.wholeDayIso(e)??(isNaN(e.getTime())?"":e.toISOString()):e.toString()}getPrecision(e){if(!isFinite(e))return 0;let i=e.toString().split(".")[1];return i?i.length:0}getColumns(){return this._cols}wholeDayIso(e){return Le(e)}hasTimeComponent(e){return!(e instanceof Date)||isNaN(e.getTime())?!1:this.wholeDayIso(e)===null}getColumnsWithStats(e,n){if(this._computedStatsForLevel==e)return this._cols;let i=0,r=parseInt(e),o=[];for(let a of this._cols){let p=new Map,D=[],N=0,g=0,T=0,v=null,E=null,x=null,F=!1,k=!0,C=!0,M=null,G=!1;for(let _ of this._rows){let y=_[i],L=this.STR(y);if(L!=""){if(N+=L.length,p.set(L,(p.get(L)||0)+1),g++,a.dataType=="Integer"||a.dataType=="Decimal"||a.dataType=="DateTime")if((v===null||y<v)&&(v=y),(E===null||y>E)&&(E=y),a.dataType=="Integer"||a.dataType=="Decimal"){if(x===null?x=y:x+=y,a.dataType=="Decimal"){let V=this.getPrecision(y);V>T&&(T=V)}D.push(y)}else F=F||this.hasTimeComponent(y);G&&(y<M?k=!1:y>M&&(C=!1)),M=y,G=!0}}if(g>=3&&(k&&!C?a.sortedDirection="asc":C&&!k?a.sortedDirection="desc":a.sortedDirection="none"),g>0&&p.size>0&&!a.isMeasure){let _=0,y=Number.MAX_SAFE_INTEGER;for(let L of p.values())L>_&&(_=L),L<y&&(y=L);if(a.modalShare=_/g,a.minGroupCount=y===Number.MAX_SAFE_INTEGER?null:y,p.size===2){let L=[...p.keys()].map(ne=>Ie(ne).trim().toLowerCase()).sort(),K=[["false","true"],["no","yes"],["n","y"],["0","1"],["f","t"]].some(ne=>L[0]===ne[0]&&L[1]===ne[1]),Q=/^(is|has)[_\p{L}\p{N}]|(?:default|churn|fraud|approv|convert|active|cancel|delinquen|flag|paid|win|pass|fail)/iu.test(a.name);(K||Q)&&(a.isBinaryFlag=!0)}}if(a.dataType=="DateTime"&&(a.dateWithTime=F),a.isTemporal=zn({dataType:a.dataType,name:a.name,isMeasure:a.isMeasure,distinctCount:p.size,minNum:typeof v=="number"?v:null,maxNum:typeof E=="number"?E:null,sampleValues:p.keys(),locale:n}),a.isTemporal&&a.dataType==="String"&&!a.isMeasure){let _=pt(p.keys(),n);_&&(a.temporalTextPattern=_.pattern)}if(a.isTemporal&&!a.isMeasure){let _=ot(p.keys(),{includeBounds:r>=20,pattern:a.temporalTextPattern,locale:n});_&&(a.temporalCadence=_)}this.updateColumnStats10(r,a,g,p,T,E,v),this.updateColumnStats20(r,D,g,x,a,N,F,v,E,T,p,n),!a.isMeasure&&(a.dataType==="Integer"||a.dataType==="Decimal")&&dt({dataType:a.dataType,isMeasure:!1,name:a.name,distinct:p.size,nonblank:g,prec:T,maxval:typeof E=="number"?E:0,minval:typeof v=="number"?v:0})==="Continuous"&&(a.isMeasure=!0,a.geoKind=void 0,a.geoMatchPct=void 0,a.geoAmbiguous=void 0,a.dominantGeoRegion=void 0,a.dominantGeoRegionPct=void 0,a.geoRegionCount=void 0),o[i]=a.isMeasure||p.size>2e3?null:new Set(p.keys()),i++}let s=[];this._cols.forEach((a,p)=>{a.isMeasure||s.push({idx:p,distinct:a.distinctCount??0,name:a.name})}),this._cols.forEach((a,p)=>{if(!a.isMeasure)return;let D=typeof a.lowValue=="number"?a.lowValue:null,N=typeof a.highValue=="number"?a.highValue:null,g=Vn({rows:this._rows,measureColIdx:p,measureName:a.name,candidateDims:s,minNum:D,maxNum:N,discourageAgg:!!a.discourageAggregationAcrossGroups});a.additivity=g.additivity,g.partOfWholeDim&&(a.partOfWholeDim=g.partOfWholeDim)});let l=50,u=4,c=s.filter(a=>a.distinct>=2&&a.distinct<=l);this._cols.forEach((a,p)=>{if(!a.isMeasure)return;let D=[];for(let C of this._rows){let M=C[p];if(M==null||M==="")continue;let G=typeof M=="number"?M:parseFloat(M);isNaN(G)||D.push(G)}if(D.length===0)return;let N=[...D].sort((C,M)=>C-M);if(N[0]===N[N.length-1])a.relativeDispersion=0;else if(N.length>=u){let C=H(N,.5),M=H(N,.1),G=H(N,.9);a.relativeDispersion=Math.abs(C)>1e-9?Math.round((G-M)/Math.abs(C)*1e3)/1e3:void 0}else a.relativeDispersion=void 0;let g=[];for(let C of c){let M=new Set;for(let G of this._rows){let _=G[p];_==null||_===""||M.add(this.STR(G[C.idx])+"")}g.push({otherColumn:C.name,nonBlankGroupCount:M.size})}g.length>0&&(a.nonBlankGroups=g);let T=0;for(let C of D)T+=C;T/=D.length;let v=0;for(let C of D)v+=(C-T)*(C-T);if(v<=1e-12)return;let E=[],x=[],F=C=>{if(C.length<4)return NaN;let M=[...C].sort((_,y)=>_-y),G=_=>M[Math.min(M.length-1,Math.max(0,Math.floor(_*(M.length-1))))];return G(.75)-G(.25)},k=F(D);for(let C of c){let M=new Map;for(let y of this._rows){let L=y[p];if(L==null||L==="")continue;let V=typeof L=="number"?L:parseFloat(L);if(isNaN(V))continue;let K=this.STR(y[C.idx])+"",Q=M.get(K);Q?(Q.s+=V,Q.n++,Q.vals.push(V)):M.set(K,{s:V,n:1,vals:[V]})}let G=0;for(let y of M.values()){let L=y.s/y.n;G+=y.n*(L-T)*(L-T)}E.push({otherColumn:C.name,eta2:Math.round(G/v*1e4)/1e4});let _=[];for(let y of M.values()){let L=F(y.vals);isNaN(L)||_.push(L)}if(_.length>=2&&isFinite(k)&&k>1e-9){let y=(Math.max(..._)-Math.min(..._))/k;x.push({otherColumn:C.name,spreadRatio:Math.round(y*1e4)/1e4})}}E.length>0&&(a.groupDiscrimination=E),x.length>0&&(a.spreadDiscrimination=x)});let d=.97,f=.8,m=8,R=5,A=this._cols.map((a,p)=>({c:a,i:p})).filter(a=>a.c.isMeasure);for(let a=0;a<A.length;a++)for(let p=a+1;p<A.length;p++){let D=A[a].i,N=A[p].i,g=0,T=0,v=0,E=0,x=0,F=0;for(let _ of this._rows){let y=_[D],L=_[N];if(y==null||y===""||L===null||L===void 0||L==="")continue;let V=typeof y=="number"?y:parseFloat(y),K=typeof L=="number"?L:parseFloat(L);isNaN(V)||isNaN(K)||(g++,T+=V,v+=K,E+=V*V,x+=K*K,F+=V*K)}if(g<R)continue;let k=g*E-T*T,C=g*x-v*v;if(k<=1e-12||C<=1e-12)continue;let M=(g*F-T*v)/Math.sqrt(k*C),G=Math.min(1,Math.round(Math.abs(M)*1e3)/1e3);for(let _ of[A[a].c,A[p].c])(_.maxAbsMeasureCorrelation===void 0||G>_.maxAbsMeasureCorrelation)&&(_.maxAbsMeasureCorrelation=G);if(Math.abs(M)>=d){let _=A[a].c,y=A[p].c;_.collinearWithMeasures||(_.collinearWithMeasures=[]),y.collinearWithMeasures||(y.collinearWithMeasures=[]),_.collinearWithMeasures.push(y.name),y.collinearWithMeasures.push(_.name)}else if(Math.abs(M)>=f){let _=A[a].c,y=A[p].c,L=Math.round(M*1e3)/1e3;_.correlatedWithMeasures||(_.correlatedWithMeasures=[]),y.correlatedWithMeasures||(y.correlatedWithMeasures=[]),_.correlatedWithMeasures.push({otherColumn:y.name,r:L}),y.correlatedWithMeasures.push({otherColumn:_.name,r:L})}}for(let{c:a}of A)a.correlatedWithMeasures&&(a.correlatedWithMeasures.sort((p,D)=>Math.abs(D.r)-Math.abs(p.r)||(p.otherColumn<D.otherColumn?-1:1)),a.correlatedWithMeasures.length=Math.min(a.correlatedWithMeasures.length,m));for(let a=0;a<this._cols.length;a++){let p=o[a];if(!p||p.size===0)continue;let D=[];for(let N=0;N<this._cols.length;N++){if(N===a)continue;let g=o[N];if(!g||g.size===0)continue;let T=0;for(let E of p)g.has(E)&&T++;let v=Math.round(T/p.size*100);v>0&&D.push({otherColumn:this._cols[N].name,percentShared:v})}D.length>0&&(this._cols[a].sharedValueRatioWithOthers=D)}let O=50,S=[];for(let a=0;a<this._cols.length;a++){let p=o[a];p&&p.size>=2&&p.size<=O&&S.push(a)}if(S.length>=2){let a=new Map,p=(N,g)=>N+":"+g;for(let N=0;N<S.length;N++)for(let g=N+1;g<S.length;g++)a.set(p(S[N],S[g]),new Map);for(let N of this._rows)for(let g=0;g<S.length;g++){let T=this.STR(N[S[g]])+"";for(let v=g+1;v<S.length;v++){let E=""+this.STR(N[S[v]]),x=a.get(p(S[g],S[v])),F=T+""+E;x.set(F,(x.get(F)??0)+1)}}let D=new Map;for(let N=0;N<S.length;N++)for(let g=N+1;g<S.length;g++){let T=S[N],v=S[g],E=o[T].size,x=o[v].size,F=a.get(p(T,v)),k=F.size,C=0;for(let y of F.values())(C===0||y<C)&&(C=y);let M=Math.round(k/(E*x)*100),G=k===E,_=k===x;if((this._cols[T].categoricalPairStats||=[]).push({otherColumn:this._cols[v].name,fillPct:M,determinesOther:G,minCellCount:C,distinctCombinations:k}),(this._cols[v].categoricalPairStats||=[]).push({otherColumn:this._cols[T].name,fillPct:M,determinesOther:_,minCellCount:C,distinctCombinations:k}),G&&E>x){let y=D.get(T);(!y||x<y.card)&&D.set(T,{name:this._cols[v].name,card:x,ratio:x/E})}if(_&&x>E){let y=D.get(v);(!y||E<y.card)&&D.set(v,{name:this._cols[T].name,card:E,ratio:E/x})}}for(let[N,g]of D)this._cols[N].primaryParentColumn=g.name,this._cols[N].nestingRatio=Math.round(g.ratio*100)/100}let w=6,h=this._rows.length;for(let a=0;a<this._cols.length;a++){let p=this._cols[a];if(p.isMeasure||p.primaryParentColumn)continue;let D=p.distinctCount??0;if(D<=O||h>0&&D>=h)continue;let N=[];for(let g=0;g<this._cols.length;g++){if(g===a)continue;let T=this._cols[g];if(T.isMeasure)continue;let v=T.distinctCount??0;v<2||v>=D||N.push(g)}N.sort((g,T)=>(this._cols[g].distinctCount??0)-(this._cols[T].distinctCount??0));for(let g of N.slice(0,w)){let T=new Map,v=!0;for(let x of this._rows){let F=this.STR(x[a])+"",k=this.STR(x[g])+"",C=T.get(F);if(C===void 0)T.set(F,k);else if(C!==k){v=!1;break}}if(!v)continue;let E=this._cols[g].distinctCount??0;p.primaryParentColumn=this._cols[g].name,p.nestingRatio=Math.round(E/D*100)/100;break}}let W=.01,U=.05,I=.95,b=8,P=8,z=6,Y=500,B=[];for(let a=0;a<this._cols.length&&B.length<P;a++){let p=this._cols[a].dataType;(p==="Double"||p==="Integer"||p==="Decimal")&&B.push(a)}if(B.length>=3&&this._rows.length>=b){let a=Math.min(this._rows.length,Y),p=B.map(E=>{let x=[];for(let C=0;C<a;C++){let M=this._rows[C][E],G=typeof M=="number"?M:parseFloat(String(M).replace(/,/g,""));if(M==null||M===""||!isFinite(G))return null;x.push(G)}let F=x[0],k=!1;for(let C of x)if(C!==F){k=!0;break}return k?x:null}),D=B.map((E,x)=>x).filter(E=>p[E]!==null),N=E=>{let x=E.slice().sort((k,C)=>k-C),F=x.length>>1;return x.length%2?x[F]:(x[F-1]+x[F])/2},g=null,T=[],v=E=>{if(T.length>=3){let x=T.map(M=>p[M]),F=x[0].length,k=new Array(F);for(let M=0;M<F;M++){let G=0;for(let _ of x)G+=_[M];k[M]=G}let C=N(k);if(C>0){let M=0;for(let _ of k)Math.abs(_-C)<=C*W&&M++;let G=M/F;if(G>=I){let _=1;for(let y of x){let L=N(y)/C;L<_&&(_=L)}_>=U&&(!g||T.length>g.cols.length)&&(g={cols:T.slice(),total:C,matched:G})}}}if(!(T.length>=z))for(let x=E;x<D.length;x++)T.push(D[x]),v(x+1),T.pop()};if(v(0),g){let E=g,F={columns:E.cols.map(k=>this._cols[B[k]].name),total:Math.round(E.total*1e3)/1e3,matchedPct:Math.round(E.matched*100)/100};for(let k of E.cols)this._cols[B[k]].constantSumGroup=F}}return this.applySeriesCompleteness(r,n,o),this._computedStatsForLevel=e,this._cols}applySeriesCompleteness(e,n,i){for(let m of this._cols)m.seriesCompleteness!==void 0&&delete m.seriesCompleteness;let r=this._cols.map((m,R)=>({c:m,i:R})).filter(({c:m})=>m.isTemporal&&!m.isMeasure&&m.temporalCadence&&m.temporalCadence.grain!=="irregular");if(r.length===0)return;let o=[],s=[];this._cols.forEach((m,R)=>{let A=i[R];A&&(o.push(R),s.push({name:m.name,dataType:m.dataType,isMeasure:!!m.isMeasure,isTemporal:!!m.isTemporal,isDatePart:!!m.isDatePart,isReassembledDate:!!m.isReassembledDate,isBinaryFlag:!!m.isBinaryFlag,geoKind:m.geoKind,identifierNamed:gt(m.name),values:A,rows:this._rows.length,locale:n}))});let l=lt(s);if(l<0)return;let u=o[l],c=this._cols[u],d=this._rows.map(m=>this.STR(m[u])),f=e>=20&&(c.dataType!=="String"||Array.isArray(c.safeDistinctValues));for(let{c:m,i:R}of r){let A=ct({periods:this._rows.map(O=>this.STR(O[R])),series:d,seriesColumn:c.name,pattern:m.temporalTextPattern,locale:n,includeDates:e>=20,includeNames:f});A&&(m.seriesCompleteness=A)}}updateColumnStats20(e,n,i,r,o,s,l,u,c,d,f,m){if(e>=20){let R=[...n].sort((S,w)=>S-w),A=Math.floor(R.length/2);if(i>0&&r!=null?o.avgValue=o.dataType=="Integer"?Math.round(r/i):r/i:o.avgValue=null,i>0&&(o.avgLength=s/i),this._rows.length>0){let S=w=>{let h=w instanceof Date?w:typeof w=="string"?pe(w)??new Date(w):new Date(w),W=this.wholeDayIso(h);return W?W+"T00:00:00.000Z":isNaN(h.getTime())?w:h.toISOString().slice(0,10)+"T00:00:00.000Z"};o.dataType!="DateTime"||l||!u?o.lowValue=u:o.lowValue=S(u),o.dataType!="DateTime"||l||!c?o.highValue=c:o.highValue=S(c),o.medianValue=R.length===0?null:R.length%2===0?o.dataType=="Integer"?Math.round((R[A-1]+R[A])/2):(R[A-1]+R[A])/2:R[A],o.numericPrecision=d}if(R.length>0){let S=o.avgValue??0,w=R.length,h=0,W=0;for(let I of R){let b=I-S;h+=b*b,W+=b*b*b}let U=h/w;o.skewness=U===0?0:W/w/Math.pow(Math.sqrt(U),3),o.stdDev=Math.sqrt(U)}r!==null&&(o.sum=r);let O=Array.from(f.entries()).sort((S,w)=>w[1]-S[1]);if(o.topCategories=O.slice(0,10).map(S=>S[1]),!o.isMeasure&&O.length>0){if(o.dataType==="String"){let S=O.map(h=>h[0]);o.formatSignature=ae(S);let w=/^(UUID|EMAIL_LIKE|URL_LIKE|PHONE_LIKE|NUMERIC_ID|HEX_ID|OPAQUE_ID_ALPHANUMERIC|DATE_STR|BOOLEAN)$/;o.formatSignature&&!w.test(o.formatSignature)&&(o.avgLength===void 0||o.avgLength>=3)&&(o.isFreeText=!0)}else o.topCategoryValues=O.slice(0,5).map(S=>S[0]);if(e>=20){let S=O.map(h=>h[0]),w=oe(S,m);if(w!==null)o.ordinalPattern=w.pattern,o.orderedDomain=w.orderedDomain;else if(o.dataType==="String"){let h=Pe(S);h!==null&&(o.safeDistinctValues=h)}}}if(R.length>=8&&(o.dataType==="Integer"||o.dataType==="Decimal")){let S=w=>R[Math.floor((R.length-1)*w)];o.quantiles={p05:S(.05),p25:S(.25),p75:S(.75),p95:S(.95)}}}if(!o.isMeasure&&f.size>0){let R=Array.from(f.entries()).sort((O,S)=>S[1]-O[1]),A=Ge(R.map(O=>O[0]),o.name,m);if(A!==null&&(o.geoKind=A.geoKind,o.geoMatchPct=A.geoMatchPct,A.geoAmbiguous&&(o.geoAmbiguous=!0),A.geoKind.indexOf("country")===0)){let O=he(R);O&&(o.dominantGeoRegion=O.dominantGeoRegion,o.dominantGeoRegionPct=O.dominantGeoRegionPct,o.geoRegionCount=O.regionCount)}}}updateColumnStats10(e,n,i,r,o,s,l){e>=10&&(n.blankCount=this._rows.length-i,n.distinctCount=r.size+(n.blankCount!=0?1:0),n.valueNature="Categorical",i>0&&(n.dataType==="Integer"||n.dataType==="Decimal"?n.valueNature=dt({dataType:n.dataType,isMeasure:!!n.isMeasure,name:n.name,distinct:r.size,nonblank:i,prec:o,maxval:s,minval:l}):n.dataType==="DateTime"&&(n.valueNature=n.dateWithTime?"Continuous":"Ordinal")))}getRowCount(){return this._rows.length}getLeafCardinality(){if(this._leafCardinality!==null)return this._leafCardinality;let e=[];if(this._cols.forEach((i,r)=>{i.isMeasure||e.push(r)}),e.length===0)return this._leafCardinality=this._rows.length,this._leafCardinality;let n=new Set;for(let i of this._rows)n.add(JSON.stringify(e.map(r=>i[r])));return this._leafCardinality=n.size,this._leafCardinality}_leafCardinality=null;getGeoExtent(){if(this._geoExtentComputed)return this._geoExtent;this._geoExtentComputed=!0,this._geoExtent=null;let e=s=>Me(s,{camel:!0}),n=-1,i=-1,r=-1;if(this._cols.forEach((s,l)=>{let u=e(s.name),c=s.dataType==="Integer"||s.dataType==="Decimal";c&&n<0&&u.some(d=>d==="lat"||d==="latitude")?n=l:c&&i<0&&u.some(d=>d==="lon"||d==="lng"||d==="long"||d==="longitude")&&(i=l),r<0&&!s.isMeasure&&typeof s.geoKind=="string"&&s.geoKind.indexOf("country")===0&&(r=l)}),n<0||i<0)return null;let o=[];for(let s of this._rows){let l=s[n],u=s[i],c=l==null||l===""?null:Number(l),d=u==null||u===""?null:Number(u);o.push({lat:c,lon:d,country:r>=0&&ce(this.STR(s[r]))?this.STR(s[r]):null})}return this._geoExtent=Be(o),this._geoExtent}_geoExtent=null;_geoExtentComputed=!1;obfuscateString(e){return nt(e,we)}toObjectArray(){let e=this.liveEnglishAliases();return this._rows.map(n=>{let i={};this._cols.forEach((r,o)=>{i[r.name]=n[o],this.emitLegacyAggAliases&&r.hostName&&r.hostName!==r.name&&!Object.prototype.hasOwnProperty.call(i,r.hostName)&&(i[r.hostName]=n[o])});for(let[r,o]of e)Object.prototype.hasOwnProperty.call(i,o.alias)||(i[o.alias]=n[r]);return i})}async getCSVAsync(e){let n=[],i=e?25:1e7,r=e?4e3:1e7,o=new Map;for(let l of this._rows){let u={};for(let c=0;c<this._cols.length;c++){let d=this._cols[c],f=l[c];if(this.STR(f)!=""){if(e&&d.dataType=="String")if(o.has(f))f=o.get(f);else{let m=this.obfuscateString(f);o.set(f,m),f=m}else if(d.dataType=="DateTime"&&!d.dateWithTime){let m=f instanceof Date?f:typeof f=="string"?pe(f)??new Date(f):new Date(f);f=(this.wholeDayIso(m)??m.toISOString().slice(0,10))+"T00:00:00.000Z"}r-=this.STR(f).length}else f=null;u[c]=f,--r}if(n.push(u),--i,i<=0||r<=0)break}return await mt.unparse(n,{header:!1})}getCSVHeaderLine(){let e=this.liveEnglishAliases();return mt.unparse([this._cols.map((n,i)=>{if(this.emitLegacyAggAliases&&n.hostName)return this.STR(n.hostName);let r=e.get(i);return this.STR(r&&r.headerName?r.alias:n.name)})])}setHostQueryNames(e){this._hostQueryNames=(e??[]).map(n=>n==null?null:this.STR(n)),this._englishAliases=new Map}aliasesForCode(e){let n=ye(e,this._cols)?this.legacyAliases():[];for(let i of this.englishAliasesFor(e).values())n.push({name:i.name,alias:i.alias,reason:"english-implicit-agg"});return n}armAliasesForCode(e){return this.emitLegacyAggAliases=ye(e,this._cols),this._englishAliases=this.englishAliasesFor(e),this.getArmedAliases()}getArmedAliases(){let e=this.emitLegacyAggAliases?this.legacyAliases():[];for(let n of this.liveEnglishAliases().values())e.push({name:n.name,alias:n.alias,reason:"english-implicit-agg"});return e}legacyAliases(){let e=[];for(let n of this._cols)n&&n.hostName&&n.hostName!==n.name&&e.push({name:this.STR(n.name),alias:this.STR(n.hostName),reason:"doubled-agg-prefix"});return e}englishAliasesFor(e){let n=new Map;if(!e||this._hostQueryNames.length===0||!this._cols||this._cols.length===0)return n;let i=String(e),r=new Set;for(let s of this._cols)s&&(r.add(this.STR(s.name)),s.hostName&&r.add(this.STR(s.hostName)));let o=new Map;for(let s=0;s<this._cols.length;s++){if(!this._cols[s])continue;let l=Ye(this._hostQueryNames[s]).filter(u=>!r.has(u)&&ee(i,u));l.length===1&&o.set(l[0],[...o.get(l[0])??[],s])}for(let[s,l]of o){if(l.length!==1)continue;let u=this.STR(this._cols[l[0]].name);n.set(l[0],{name:u,alias:s,headerName:!ee(i,u)})}return n}liveEnglishAliases(){let e=new Map;for(let[n,i]of this._englishAliases){let r=this._cols?this._cols[n]:null;r&&this.STR(r.name)===i.name&&e.set(n,i)}return e}addRow(e,n){if(this.dedupRows){let i="";for(let o of e)i+=this.STR(o)+"~";let r=ve(i);if(this._rowHashes.has(r))return!1;this._rowHashes.add(r)}return this._rows.push(Un(e)),this._origIndices.push(n??-1),!0}getOriginalRowIndex(e){return e<0||e>=this._origIndices.length?-1:this._origIndices[e]}reset(){this._cols=[],this._rows=[],this._origIndices=[],this._rowHashes=new Set,this._leafCardinality=null,this._hostQueryNames=[],this._englishAliases=new Map}setColumns(e){if(this._cols=e,!e||e.length===0)return;let n=new Set(e.map(i=>this.STR(i?.name)));for(let i of e){if(!i)continue;let r=this.STR(i.name),o=Ke(r);!o||o===r||n.has(o)||(n.delete(r),n.add(o),i.hostName=r,i.name=o)}}};export{Be as a,yt as b,ce as c,Hn as d,St as e,_t as f,At as g,Ct as h,me as i,Nt as j,Ke as k,ye as l,Ye as m,Xe as n,wt as o,qe as p,Qe as q,Zn as r,qn as s,Qn as t,Ot as u,Pt as v,kt as w,Je as x,ee as y,jt as z,sr as A,Xt as B,Zt as C,Se as D,ot as E,dn as F,fn as G,gn as H,Sn as I,lt as J,ct as K,gt as L,pt as M,zn as N,Bn as O,Vn as P,dt as Q,Un as R,ft as S};
|
package/dist/geoDetector.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-KQOVPOVU.mjs";import"./chunk-INMDBTAR.mjs";import"./chunk-5MRZID36.mjs";import"./chunk-4VN252CK.mjs";import"./chunk-5HI6TVMM.mjs";export{a as ZIP_NAME_TOKENS,f as buildGeoIsoColumn,c as detectGeo,b as hasAnyToken,e as isJoinGeoKind,d as toGeoIso};
|
package/dist/geoPoint.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
|
-
import{a,
|
|
2
|
+
import{d as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i,t as j,u as k,v as l,w as m,x as n,y as o}from"./chunk-INMDBTAR.mjs";import"./chunk-5MRZID36.mjs";import"./chunk-5HI6TVMM.mjs";export{d as NORTH_AMERICA_COUNTRIES,l as buildGeoPointColumns,o as cityMatchPct,m as cityTagsFor,c as isCityTableLoaded,j as isGeoPointAmbiguity,n as isKnownCity,f as normalizeCountry,a as normalizePlaceName,h as normalizeZip5,b as registerCityTable,e as resolveAdmin1,k as resolveGeoPoint,i as zipPrefixCandidates,g as zipToPrefix3};
|