From dbea61a850e79454f335920738459b89c9dd85ec Mon Sep 17 00:00:00 2001 From: Brent McSharry <2456704+mcshaz@users.noreply.github.com> Date: Thu, 16 Apr 2020 16:23:26 +1200 Subject: [PATCH] add title=placeholder if no title --- .npmignore | 2 ++ README.md | 2 +- dist/{add-pickers-dd4f5f85.mjs => add-pickers-d77e4620.mjs} | 4 ++-- ...pickers-dd4f5f85.mjs.map => add-pickers-d77e4620.mjs.map} | 2 +- ...pickers-ba507d00.cjs.mjs => add-pickers-59466f4f.cjs.mjs} | 2 +- ...dfd5f3d.cjs.mjs => polyfill-if-required-d8ecbf95.cjs.mjs} | 2 +- dist/cjs/polyfill-if-required.cjs.js | 2 +- dist/iife/esm-date-input-polyfill.js | 2 +- dist/iife/esm-date-input-polyfill.js.map | 2 +- ...quired-d890f842.mjs => polyfill-if-required-00d9150b.mjs} | 4 ++-- ...890f842.mjs.map => polyfill-if-required-00d9150b.mjs.map} | 2 +- dist/polyfill-if-required.mjs | 2 +- examples/dist/add-pickers-d77e4620-116076a8.js | 3 +++ ...-dfbf435a.js.map => add-pickers-d77e4620-116076a8.js.map} | 2 +- examples/dist/add-pickers-d77e4620-a5ce75a2.js | 3 +++ ...-f659d4be.js.map => add-pickers-d77e4620-a5ce75a2.js.map} | 2 +- examples/dist/add-pickers-dd4f5f85-dfbf435a.js | 3 --- examples/dist/add-pickers-dd4f5f85-f659d4be.js | 3 --- .../dist/{esm.module-3ffa9b56.js => esm.module-42da03d1.js} | 4 ++-- ...esm.module-3ffa9b56.js.map => esm.module-42da03d1.js.map} | 2 +- examples/dist/esm.module.js | 2 +- examples/dist/esm.nomodule.js | 2 +- examples/dist/esm.nomodule.js.map | 2 +- ...st-age.module-e92bafcd.js => gest-age.module-590e7296.js} | 4 ++-- ...odule-e92bafcd.js.map => gest-age.module-590e7296.js.map} | 2 +- examples/dist/gest-age.module.js | 2 +- examples/dist/gest-age.nomodule.js | 2 +- examples/dist/gest-age.nomodule.js.map | 2 +- index.mjs | 1 + package.json | 5 +---- rollup.config.js | 2 +- src/Input.js | 3 +++ 32 files changed, 41 insertions(+), 38 deletions(-) rename dist/{add-pickers-dd4f5f85.mjs => add-pickers-d77e4620.mjs} (91%) rename dist/{add-pickers-dd4f5f85.mjs.map => add-pickers-d77e4620.mjs.map} (72%) rename dist/cjs/{add-pickers-ba507d00.cjs.mjs => add-pickers-59466f4f.cjs.mjs} (91%) rename dist/cjs/{polyfill-if-required-6dfd5f3d.cjs.mjs => polyfill-if-required-d8ecbf95.cjs.mjs} (80%) rename dist/{polyfill-if-required-d890f842.mjs => polyfill-if-required-00d9150b.mjs} (90%) rename dist/{polyfill-if-required-d890f842.mjs.map => polyfill-if-required-00d9150b.mjs.map} (98%) create mode 100644 examples/dist/add-pickers-d77e4620-116076a8.js rename examples/dist/{add-pickers-dd4f5f85-dfbf435a.js.map => add-pickers-d77e4620-116076a8.js.map} (79%) create mode 100644 examples/dist/add-pickers-d77e4620-a5ce75a2.js rename examples/dist/{add-pickers-dd4f5f85-f659d4be.js.map => add-pickers-d77e4620-a5ce75a2.js.map} (79%) delete mode 100644 examples/dist/add-pickers-dd4f5f85-dfbf435a.js delete mode 100644 examples/dist/add-pickers-dd4f5f85-f659d4be.js rename examples/dist/{esm.module-3ffa9b56.js => esm.module-42da03d1.js} (99%) rename examples/dist/{esm.module-3ffa9b56.js.map => esm.module-42da03d1.js.map} (99%) rename examples/dist/{gest-age.module-e92bafcd.js => gest-age.module-590e7296.js} (99%) rename examples/dist/{gest-age.module-e92bafcd.js.map => gest-age.module-590e7296.js.map} (99%) create mode 100644 index.mjs diff --git a/.npmignore b/.npmignore index 6796423..a10dc22 100644 --- a/.npmignore +++ b/.npmignore @@ -2,3 +2,5 @@ node_modules src examples +index.html +rollup.config.js diff --git a/README.md b/README.md index b5e60e2..fc5c01a 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Execute `dateInputPolyfill.polyfillIfRequired()` with any options described abov ## Features -* **Easily Stylable:** [These are the default styles](https://github.com/brianblakely/esm-date-input-polyfill/blob/master/esm-date-input-polyfill.scss), which you may override with your own. +* **Easily Stylable:** [These are the default styles](https://github.com/mcshaz/esm-date-input-polyfill/blob/master/esm-date-input-polyfill.scss), which you may override with your own. * **Polyfills `valueAsDate` and `valueAsNumber`:** [Learn more about these properties.](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#property-valueasdate). They behave as getters and setters. diff --git a/dist/add-pickers-dd4f5f85.mjs b/dist/add-pickers-d77e4620.mjs similarity index 91% rename from dist/add-pickers-dd4f5f85.mjs rename to dist/add-pickers-d77e4620.mjs index 9229d17..6291e4d 100644 --- a/dist/add-pickers-dd4f5f85.mjs +++ b/dist/add-pickers-d77e4620.mjs @@ -1,3 +1,3 @@ // @license MIT - https://github.com/brianblakely/esm-date-input-polyfill -import{a as e,d as t,F as a}from"./polyfill-if-required-d890f842.mjs";!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===a&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('date-input-polyfill {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n position: absolute !important;\n text-align: center;\n box-shadow: 0 7px 8px -4px rgba(0, 0, 0, 0.2), 0 12px 17px 2px rgba(0, 0, 0, 0.14), 0 5px 22px 4px rgba(0, 0, 0, 0.12);\n cursor: default;\n z-index: 1; }\n date-input-polyfill[data-open="false"] {\n display: none; }\n date-input-polyfill[data-open="true"] {\n display: block; }\n date-input-polyfill select, date-input-polyfill table, date-input-polyfill th, date-input-polyfill td {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n box-shadow: none; }\n date-input-polyfill select, date-input-polyfill button {\n border: 0;\n border-bottom: 1px solid #E0E0E0;\n height: 24px;\n vertical-align: top; }\n date-input-polyfill select {\n width: 50%; }\n date-input-polyfill select:first-of-type {\n border-right: 1px solid #E0E0E0;\n width: 30%; }\n date-input-polyfill button {\n padding: 0;\n width: 20%;\n background: #E0E0E0; }\n date-input-polyfill table {\n border-collapse: collapse; }\n date-input-polyfill th, date-input-polyfill td {\n width: 32px;\n padding: 4px;\n text-align: center; }\n date-input-polyfill td {\n cursor: pointer; }\n date-input-polyfill td:hover {\n background: #E0E0FF; }\n date-input-polyfill .esm-polyfill-invalid-day {\n background: #eee;\n color: #422;\n cursor: not-allowed; }\n date-input-polyfill .esm-polyfill-day-selected {\n font-weight: bold;\n background: #d8eaf6; }\n date-input-polyfill .esm-polyfill-current-day {\n border: 1px #777 solid; }\n\ninput[data-has-picker]::-ms-clear {\n display: none; }\n');class n{constructor({yrsBack:e=80,yrsFwd:t=20}={yrsBack:80,yrsFwd:20}){if(n.instance)return n.instance;const a={passive:!0};this.date=new Date,this.input=null,this.isOpen=!1,this._onBeforeOpen=[],this.container=document.createElement("date-input-polyfill"),this.year=document.createElement("select"),n.createRangeSelect(this.year,this.date.getFullYear()-e,this.date.getFullYear()+t),this.year.className="yearSelect",this.year.addEventListener("change",()=>{this.date.setYear(this.year.value),this.refreshDaysMatrix()},a),this.container.appendChild(this.year),this.month=document.createElement("select"),this.month.className="monthSelect",this.month.addEventListener("change",()=>{this.date.setMonth(this.month.value),this.refreshDaysMatrix()},a),this.container.appendChild(this.month),this.today=document.createElement("button"),this.today.textContent="Today",this.today.addEventListener("click",()=>{this.date=new Date,this.setInput()},a),this.container.appendChild(this.today);const s=document.createElement("table");this.daysHead=document.createElement("thead"),this.days=document.createElement("tbody"),this.days.addEventListener("click",e=>{const t=e.target;if(!t.classList.contains("esm-polyfill-day")||t.classList.contains("esm-polyfill-invalid-day"))return!1;const a=this.days.querySelector(".esm-polyfill-day-selected");a&&a.classList.remove("esm-polyfill-day-selected"),t.classList.add("esm-polyfill-day-selected"),this.date.setDate(parseInt(t.textContent,10)),this.setInput()},a),s.appendChild(this.daysHead),s.appendChild(this.days),this.container.appendChild(s),this.hide(),document.body.appendChild(this.container),document.addEventListener("click",e=>{let t=e.target,a=t===this.container;for(;!a&&(t=t.parentNode);)a=t===this.container;const n=e.target.getAttribute("type");"date"===n||"date-polyfill"===n||a||this.hide()},a)}hide(){this.container.setAttribute("data-open",this.isOpen=!1)}show(){this._onBeforeOpen.forEach(e=>e()),this.container.setAttribute("data-open",this.isOpen=!0)}onBeforeOpen(e){this._onBeforeOpen.push(e)}goto(e){const t=e.getBoundingClientRect();this.container.style.top=`${t.top+t.height+(document.documentElement.scrollTop||document.body.scrollTop)}px`,this.container.style.left=`${t.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}px`,this.show()}attachTo(e){if(e===this.input&&this.isOpen)return!1;this.input=e,this.sync(),this.goto(this.input.element)}sync(){this.input.element.valueAsDate?this.date=n.utcDateToLocal(this.input.element.valueAsDate):this.date=new Date,this.year.value=this.date.getFullYear(),this.month.value=this.date.getMonth(),this.refreshDaysMatrix()}setInput(){this.input.element.value=`${this.date.getFullYear()}-${String(this.date.getMonth()+1).padStart(2,"0")}-${String(this.date.getDate()).padStart(2,"0")}`,this.input.element.focus(),setTimeout(()=>{this.hide()},100),this.pingInput()}refreshLocale(){if(this.locale===this.input.locale)return!1;this.locale=this.input.locale;const e=[""];for(let t=0,a=this.input.localeText.days.length;t${this.input.localeText.days[t]}`);this.daysHead.innerHTML=e.join(""),n.createRangeSelect(this.month,0,11,this.input.localeText.months,this.date.getMonth()),this.today.textContent=this.input.localeText.today}refreshDaysMatrix(){this.refreshLocale();const e=this.date.getFullYear(),t=this.date.getMonth();let a=new Date(e,t,1);const s=a.getDay(),i=new Date(this.date.getFullYear(),t+1,0).getDate(),o=n.utcDateToLocal(this.input.element.valueAsDate)||!1,r=o&&e===o.getFullYear()&&t===o.getMonth(),l=this.input.element.min,u=l?n.utcDateToLocal(new Date(l)).getTime():-30610224e6,m=this.input.element.max,d=m?n.utcDateToLocal(new Date(m)).getTime():3250368e7,h=new Date;h.setHours(0,0,0,0);const y=h.getTime(),b=[];for(let e=0;e":""}\n \n `),e+1<=s){b.push("");continue}const t=e+1-s,n=["esm-polyfill-day"];r&&o.getDate()===t&&n.push("esm-polyfill-day-selected");let i=a.setDate(t);(id)&&n.push("esm-polyfill-invalid-day"),i===y&&n.push("esm-polyfill-current-day"),b.push(`\n ${t}\n `)}this.days.innerHTML=b.join("")}pingInput(){let e,t;try{e=new Event("input"),t=new Event("change")}catch(a){e=document.createEvent("KeyboardEvent"),e.initEvent("input",!0,!1),t=document.createEvent("KeyboardEvent"),t.initEvent("change",!0,!1)}this.input.element.dispatchEvent(e),this.input.element.dispatchEvent(t)}static createRangeSelect(e,t,a,n,s){e.innerHTML="";for(let i=t;i<=a;++i){const a=document.createElement("option");e.appendChild(a);const o=n?n[i-t]:i;a.text=o,a.value=i,i===s&&(a.selected="selected")}return e}static utcDateToLocal(e){return e&&new Date(e.getTime()+6e4*e.getTimezoneOffset())}}function s(e){const t=e.replace(/-[a-z0-9]+$/,"");return t&&t!==e?t:null}function i(e){let t,a=e.indexOf("Y"),n=e.indexOf("M");ae[1].includes(n));if(o)return{locale:e[a],format:o[0],parser:i(o[0])};const r=s(e[a]);r&&e.push(r)}return{locale:"en",format:"Y-M-D",parseLocale:i("Y-M-D")}}(e);let n,o=a.locale;for(;!(n=t[o]);)o=s(o);return n||(n=t.en),Object.assign(a,n)}n.instance=null;class r{constructor(e){this._dict={},this._keySelector=e}add(e){const t=this._keySelector(e);Object.prototype.hasOwnProperty.call(this._dict,t)?this._dict[t].push(e):this._dict[t]=[e]}get(e){return this._dict[e]||[]}}const l=/^\d{4}-\d{2}-\d{2}$/;class u{constructor(a){this.element=a,this.element.setAttribute(e,""),this.element.setAttribute("autocomplete","off"),t&&(this.element.type="date-polyfill"),this.setLocaleText(function(e,t){do{if(t in e)return e[t];e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(this.element,"lang")),this.element.placeholder||(this.element.placeholder=this.localeText.format.replace("M","mm").replace("D","dd").replace("Y","yyyy")),this.element.pattern=this.localeText.parser.pattern;let s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.element),"value");null===s&&(s={get:()=>this.element.getAttribute("value")||"",set:e=>this.element.setAttribute("value",e)},console.log("esm-date-input-polyfill: unable to obtain native input[type=date] .value propertyDescriptor")),Object.defineProperties(this.element,{textValue:{get:s.get,set:s.set},value:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal).toISOString().slice(0,10):"",set:e=>this.element.valueAsDate=e&&l.test(e)?new Date(e):null},valueAsDate:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal):null,set:e=>{e&&e.getTime&&!Number.isNaN(this.element._datePolyfillVal=e.getTime())?this.element.textValue=this.toLocaleDateString(e):(this.element.textValue="",this.element._datePolyfillVal=void 0),this.validate()}},valueAsNumber:{get:()=>void 0===this.element._datePolyfillVal?NaN:this.element._datePolyfillVal,set:e=>this.element.valueAsDate=new Date(e)},min:{get:()=>this.element.getAttribute("min"),set:e=>l.test(e)?this.element.setAttribute("min",e):this.element.removeAttribute("min")},max:{get:()=>this.element.getAttribute("max"),set:e=>l.test(e)?this.element.setAttribute("max",e):this.element.removeAttribute("max")}}),this.element.setCustomValidity||(console.log("HTMLElement.setCustomValidity not supported"),this.element.setCustomValidity=()=>{}),this.element.value=this.element.getAttribute("value");const i=()=>n.instance.attachTo(this),o={passive:!0};this.element.addEventListener("focus",i,o),this.element.addEventListener("mousedown",i,o),this.element.addEventListener("mouseup",i,o),this.element.addEventListener("keydown",e=>{let t=this.element.valueAsDate,a=!0,s=!1;switch(e.keyCode){case 9:case 13:case 27:n.instance.hide(),a=!1;break;case 38:null===t&&(t=new Date),t.setDate(t.getDate()+1),this.element.valueAsDate=t;break;case 40:null===t&&(t=new Date),t.setDate(t.getDate()-1),this.element.valueAsDate=t;break;default:s=!0}if(a)if(s){const e=this;setTimeout(()=>{const t=e.localeText.parser.parse(e.element.textValue);t&&t.setTime(t.getTime()-6e4*t.getTimezoneOffset()),+t!=+e.element.valueAsDate&&(e.element.valueAsDate=t,n.instance.pingInput(),n.instance.sync())},1)}else n.instance.pingInput(),n.instance.sync()},o)}validate(){if(this.element._datePolyfillVal){let e=new Date(this.element.min||NaN),t=new Date(this.element.max||NaN);if(this.element._datePolyfillValt.getTime())return this.element.setCustomValidity("≤ "+this.toLocaleDateString(t)),!1}return this.element.setCustomValidity(""),!0}setLocaleText(e){let t=(window.navigator.languages?window.navigator.languages:[window.navigator.userLanguage||window.navigator.language]).map(e=>e.toLowerCase());if(e){e=e.match(/^[a-z]+/)[0].toLowerCase();const a=new r(t=>t.startsWith(e));t.forEach(e=>a.add(e)),t=a.get(!0).concat(a.get(!1))}const a=o(t);this.locale=a.locale,this.localeText=a}toLocaleDateString(e){const t=e.toISOString().slice(0,10).split("-");return this.localeText.format.replace("Y",t[0]).replace("M",t[1]).replace("D",t[2])}}function m({watchForInsert:e=!1,allowForcePicker:t=!1,yrsBack:s=80,yrsFwd:i=20}={}){n.instance=new n({yrsBack:s,yrsFwd:i});const o=new a({allowForcePicker:t});if(o.getAllInputsForPolyfilling().forEach(e=>new u(e)),e){const e=new MutationObserver(e=>e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){const t=Array.from(e.querySelectorAll("input[type=date]"));t.push(e),t.forEach(e=>{o.requiresPolyfilling(e)&&new u(e)})}})})),t=()=>e.observe(document.body,{childList:!0,attributes:!1,subtree:!0});n.instance.onBeforeOpen(()=>{e.disconnect(),setTimeout(t,100)}),t()}}export{m as addPickers}; -//# sourceMappingURL=add-pickers-dd4f5f85.mjs.map +import{a as e,d as t,F as a}from"./polyfill-if-required-00d9150b.mjs";!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===a&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('date-input-polyfill {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n position: absolute !important;\n text-align: center;\n box-shadow: 0 7px 8px -4px rgba(0, 0, 0, 0.2), 0 12px 17px 2px rgba(0, 0, 0, 0.14), 0 5px 22px 4px rgba(0, 0, 0, 0.12);\n cursor: default;\n z-index: 1; }\n date-input-polyfill[data-open="false"] {\n display: none; }\n date-input-polyfill[data-open="true"] {\n display: block; }\n date-input-polyfill select, date-input-polyfill table, date-input-polyfill th, date-input-polyfill td {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n box-shadow: none; }\n date-input-polyfill select, date-input-polyfill button {\n border: 0;\n border-bottom: 1px solid #E0E0E0;\n height: 24px;\n vertical-align: top; }\n date-input-polyfill select {\n width: 50%; }\n date-input-polyfill select:first-of-type {\n border-right: 1px solid #E0E0E0;\n width: 30%; }\n date-input-polyfill button {\n padding: 0;\n width: 20%;\n background: #E0E0E0; }\n date-input-polyfill table {\n border-collapse: collapse; }\n date-input-polyfill th, date-input-polyfill td {\n width: 32px;\n padding: 4px;\n text-align: center; }\n date-input-polyfill td {\n cursor: pointer; }\n date-input-polyfill td:hover {\n background: #E0E0FF; }\n date-input-polyfill .esm-polyfill-invalid-day {\n background: #eee;\n color: #422;\n cursor: not-allowed; }\n date-input-polyfill .esm-polyfill-day-selected {\n font-weight: bold;\n background: #d8eaf6; }\n date-input-polyfill .esm-polyfill-current-day {\n border: 1px #777 solid; }\n\ninput[data-has-picker]::-ms-clear {\n display: none; }\n');class n{constructor({yrsBack:e=80,yrsFwd:t=20}={yrsBack:80,yrsFwd:20}){if(n.instance)return n.instance;const a={passive:!0};this.date=new Date,this.input=null,this.isOpen=!1,this._onBeforeOpen=[],this.container=document.createElement("date-input-polyfill"),this.year=document.createElement("select"),n.createRangeSelect(this.year,this.date.getFullYear()-e,this.date.getFullYear()+t),this.year.className="yearSelect",this.year.addEventListener("change",()=>{this.date.setYear(this.year.value),this.refreshDaysMatrix()},a),this.container.appendChild(this.year),this.month=document.createElement("select"),this.month.className="monthSelect",this.month.addEventListener("change",()=>{this.date.setMonth(this.month.value),this.refreshDaysMatrix()},a),this.container.appendChild(this.month),this.today=document.createElement("button"),this.today.textContent="Today",this.today.addEventListener("click",()=>{this.date=new Date,this.setInput()},a),this.container.appendChild(this.today);const s=document.createElement("table");this.daysHead=document.createElement("thead"),this.days=document.createElement("tbody"),this.days.addEventListener("click",e=>{const t=e.target;if(!t.classList.contains("esm-polyfill-day")||t.classList.contains("esm-polyfill-invalid-day"))return!1;const a=this.days.querySelector(".esm-polyfill-day-selected");a&&a.classList.remove("esm-polyfill-day-selected"),t.classList.add("esm-polyfill-day-selected"),this.date.setDate(parseInt(t.textContent,10)),this.setInput()},a),s.appendChild(this.daysHead),s.appendChild(this.days),this.container.appendChild(s),this.hide(),document.body.appendChild(this.container),document.addEventListener("click",e=>{let t=e.target,a=t===this.container;for(;!a&&(t=t.parentNode);)a=t===this.container;const n=e.target.getAttribute("type");"date"===n||"date-polyfill"===n||a||this.hide()},a)}hide(){this.container.setAttribute("data-open",this.isOpen=!1)}show(){this._onBeforeOpen.forEach(e=>e()),this.container.setAttribute("data-open",this.isOpen=!0)}onBeforeOpen(e){this._onBeforeOpen.push(e)}goto(e){const t=e.getBoundingClientRect();this.container.style.top=`${t.top+t.height+(document.documentElement.scrollTop||document.body.scrollTop)}px`,this.container.style.left=`${t.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}px`,this.show()}attachTo(e){if(e===this.input&&this.isOpen)return!1;this.input=e,this.sync(),this.goto(this.input.element)}sync(){this.input.element.valueAsDate?this.date=n.utcDateToLocal(this.input.element.valueAsDate):this.date=new Date,this.year.value=this.date.getFullYear(),this.month.value=this.date.getMonth(),this.refreshDaysMatrix()}setInput(){this.input.element.value=`${this.date.getFullYear()}-${String(this.date.getMonth()+1).padStart(2,"0")}-${String(this.date.getDate()).padStart(2,"0")}`,this.input.element.focus(),setTimeout(()=>{this.hide()},100),this.pingInput()}refreshLocale(){if(this.locale===this.input.locale)return!1;this.locale=this.input.locale;const e=[""];for(let t=0,a=this.input.localeText.days.length;t${this.input.localeText.days[t]}`);this.daysHead.innerHTML=e.join(""),n.createRangeSelect(this.month,0,11,this.input.localeText.months,this.date.getMonth()),this.today.textContent=this.input.localeText.today}refreshDaysMatrix(){this.refreshLocale();const e=this.date.getFullYear(),t=this.date.getMonth();let a=new Date(e,t,1);const s=a.getDay(),i=new Date(this.date.getFullYear(),t+1,0).getDate(),o=n.utcDateToLocal(this.input.element.valueAsDate)||!1,r=o&&e===o.getFullYear()&&t===o.getMonth(),l=this.input.element.min,u=l?n.utcDateToLocal(new Date(l)).getTime():-30610224e6,m=this.input.element.max,d=m?n.utcDateToLocal(new Date(m)).getTime():3250368e7,h=new Date;h.setHours(0,0,0,0);const y=h.getTime(),b=[];for(let e=0;e":""}\n \n `),e+1<=s){b.push("");continue}const t=e+1-s,n=["esm-polyfill-day"];r&&o.getDate()===t&&n.push("esm-polyfill-day-selected");let i=a.setDate(t);(id)&&n.push("esm-polyfill-invalid-day"),i===y&&n.push("esm-polyfill-current-day"),b.push(`\n ${t}\n `)}this.days.innerHTML=b.join("")}pingInput(){let e,t;try{e=new Event("input"),t=new Event("change")}catch(a){e=document.createEvent("KeyboardEvent"),e.initEvent("input",!0,!1),t=document.createEvent("KeyboardEvent"),t.initEvent("change",!0,!1)}this.input.element.dispatchEvent(e),this.input.element.dispatchEvent(t)}static createRangeSelect(e,t,a,n,s){e.innerHTML="";for(let i=t;i<=a;++i){const a=document.createElement("option");e.appendChild(a);const o=n?n[i-t]:i;a.text=o,a.value=i,i===s&&(a.selected="selected")}return e}static utcDateToLocal(e){return e&&new Date(e.getTime()+6e4*e.getTimezoneOffset())}}function s(e){const t=e.replace(/-[a-z0-9]+$/,"");return t&&t!==e?t:null}function i(e){let t,a=e.indexOf("Y"),n=e.indexOf("M");ae[1].includes(n));if(o)return{locale:e[a],format:o[0],parser:i(o[0])};const r=s(e[a]);r&&e.push(r)}return{locale:"en",format:"Y-M-D",parseLocale:i("Y-M-D")}}(e);let n,o=a.locale;for(;!(n=t[o]);)o=s(o);return n||(n=t.en),Object.assign(a,n)}n.instance=null;class r{constructor(e){this._dict={},this._keySelector=e}add(e){const t=this._keySelector(e);Object.prototype.hasOwnProperty.call(this._dict,t)?this._dict[t].push(e):this._dict[t]=[e]}get(e){return this._dict[e]||[]}}const l=/^\d{4}-\d{2}-\d{2}$/;class u{constructor(a){this.element=a,this.element.setAttribute(e,""),this.element.setAttribute("autocomplete","off"),t&&(this.element.type="date-polyfill"),this.setLocaleText(function(e,t){do{if(t in e)return e[t];e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(this.element,"lang")),this.element.placeholder||(this.element.placeholder=this.localeText.format.replace("M","mm").replace("D","dd").replace("Y","yyyy")),this.element.title||(this.element.title=this.element.placeholder),this.element.pattern=this.localeText.parser.pattern;let s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.element),"value");null===s&&(s={get:()=>this.element.getAttribute("value")||"",set:e=>this.element.setAttribute("value",e)},console.log("esm-date-input-polyfill: unable to obtain native input[type=date] .value propertyDescriptor")),Object.defineProperties(this.element,{textValue:{get:s.get,set:s.set},value:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal).toISOString().slice(0,10):"",set:e=>this.element.valueAsDate=e&&l.test(e)?new Date(e):null},valueAsDate:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal):null,set:e=>{e&&e.getTime&&!Number.isNaN(this.element._datePolyfillVal=e.getTime())?this.element.textValue=this.toLocaleDateString(e):(this.element.textValue="",this.element._datePolyfillVal=void 0),this.validate()}},valueAsNumber:{get:()=>void 0===this.element._datePolyfillVal?NaN:this.element._datePolyfillVal,set:e=>this.element.valueAsDate=new Date(e)},min:{get:()=>this.element.getAttribute("min"),set:e=>l.test(e)?this.element.setAttribute("min",e):this.element.removeAttribute("min")},max:{get:()=>this.element.getAttribute("max"),set:e=>l.test(e)?this.element.setAttribute("max",e):this.element.removeAttribute("max")}}),this.element.setCustomValidity||(console.log("HTMLElement.setCustomValidity not supported"),this.element.setCustomValidity=()=>{}),this.element.value=this.element.getAttribute("value");const i=()=>n.instance.attachTo(this),o={passive:!0};this.element.addEventListener("focus",i,o),this.element.addEventListener("mousedown",i,o),this.element.addEventListener("mouseup",i,o),this.element.addEventListener("keydown",e=>{let t=this.element.valueAsDate,a=!0,s=!1;switch(e.keyCode){case 9:case 13:case 27:n.instance.hide(),a=!1;break;case 38:null===t&&(t=new Date),t.setDate(t.getDate()+1),this.element.valueAsDate=t;break;case 40:null===t&&(t=new Date),t.setDate(t.getDate()-1),this.element.valueAsDate=t;break;default:s=!0}if(a)if(s){const e=this;setTimeout(()=>{const t=e.localeText.parser.parse(e.element.textValue);t&&t.setTime(t.getTime()-6e4*t.getTimezoneOffset()),+t!=+e.element.valueAsDate&&(e.element.valueAsDate=t,n.instance.pingInput(),n.instance.sync())},1)}else n.instance.pingInput(),n.instance.sync()},o)}validate(){if(this.element._datePolyfillVal){let e=new Date(this.element.min||NaN),t=new Date(this.element.max||NaN);if(this.element._datePolyfillValt.getTime())return this.element.setCustomValidity("≤ "+this.toLocaleDateString(t)),!1}return this.element.setCustomValidity(""),!0}setLocaleText(e){let t=(window.navigator.languages?window.navigator.languages:[window.navigator.userLanguage||window.navigator.language]).map(e=>e.toLowerCase());if(e){e=e.match(/^[a-z]+/)[0].toLowerCase();const a=new r(t=>t.startsWith(e));t.forEach(e=>a.add(e)),t=a.get(!0).concat(a.get(!1))}const a=o(t);this.locale=a.locale,this.localeText=a}toLocaleDateString(e){const t=e.toISOString().slice(0,10).split("-");return this.localeText.format.replace("Y",t[0]).replace("M",t[1]).replace("D",t[2])}}function m({watchForInsert:e=!1,allowForcePicker:t=!1,yrsBack:s=80,yrsFwd:i=20}={}){n.instance=new n({yrsBack:s,yrsFwd:i});const o=new a({allowForcePicker:t});if(o.getAllInputsForPolyfilling().forEach(e=>new u(e)),e){const e=new MutationObserver(e=>e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){const t=Array.from(e.querySelectorAll("input[type=date]"));t.push(e),t.forEach(e=>{o.requiresPolyfilling(e)&&new u(e)})}})})),t=()=>e.observe(document.body,{childList:!0,attributes:!1,subtree:!0});n.instance.onBeforeOpen(()=>{e.disconnect(),setTimeout(t,100)}),t()}}export{m as addPickers}; +//# sourceMappingURL=add-pickers-d77e4620.mjs.map diff --git a/dist/add-pickers-dd4f5f85.mjs.map b/dist/add-pickers-d77e4620.mjs.map similarity index 72% rename from dist/add-pickers-dd4f5f85.mjs.map rename to dist/add-pickers-d77e4620.mjs.map index b533392..7ee883a 100644 --- a/dist/add-pickers-dd4f5f85.mjs.map +++ b/dist/add-pickers-d77e4620.mjs.map @@ -1 +1 @@ -{"version":3,"file":"add-pickers-dd4f5f85.mjs","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/picker.js","../src/locales.js","../src/languages.js","../src/lookup-result.js","../src/input.js","../src/closest-with-prop.js","../src/add-pickers.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import './esm-date-input-polyfill.scss';\r\n\r\nclass Picker {\r\n constructor({yrsBack = 80, yrsFwd = 20} = {yrsBack: 80, yrsFwd: 20}) {\r\n // This is a singleton.\r\n if(Picker.instance) {\r\n return Picker.instance;\r\n }\r\n\r\n const passiveOpt = { passive: true };\r\n\r\n this.date = new Date();\r\n this.input = null;\r\n this.isOpen = false;\r\n this._onBeforeOpen = [];\r\n\r\n // The picker element. Unique tag name attempts to protect against\r\n // generic selectors.\r\n this.container = document.createElement('date-input-polyfill');\r\n\r\n // Add controls.\r\n // Year picker.\r\n this.year = document.createElement('select');\r\n Picker.createRangeSelect(\r\n this.year,\r\n this.date.getFullYear() - yrsBack,\r\n this.date.getFullYear() + yrsFwd,\r\n );\r\n this.year.className = 'yearSelect';\r\n this.year.addEventListener('change', ()=> {\r\n this.date.setYear(this.year.value);\r\n this.refreshDaysMatrix();\r\n }, passiveOpt);\r\n this.container.appendChild(this.year);\r\n\r\n // Month picker.\r\n this.month = document.createElement('select');\r\n this.month.className = 'monthSelect';\r\n this.month.addEventListener('change', ()=> {\r\n this.date.setMonth(this.month.value);\r\n this.refreshDaysMatrix();\r\n }, passiveOpt);\r\n this.container.appendChild(this.month);\r\n\r\n // Today button.\r\n this.today = document.createElement('button');\r\n this.today.textContent = 'Today';\r\n this.today.addEventListener('click', ()=> {\r\n this.date = new Date();\r\n this.setInput();\r\n }, passiveOpt);\r\n this.container.appendChild(this.today);\r\n\r\n // Setup unchanging DOM for days matrix.\r\n const daysMatrix = document.createElement('table');\r\n this.daysHead = document.createElement('thead');\r\n this.days = document.createElement('tbody');\r\n\r\n // THIS IS THE BIG PART.\r\n // When the user clicks a day, set that day as the date.\r\n // Uses event delegation.\r\n this.days.addEventListener('click', (e) => {\r\n const tgt = e.target;\r\n\r\n if(!tgt.classList.contains('esm-polyfill-day') || tgt.classList.contains('esm-polyfill-invalid-day')) {\r\n return false;\r\n }\r\n\r\n const curSel = this.days.querySelector('.esm-polyfill-day-selected');\r\n if(curSel) {\r\n curSel.classList.remove('esm-polyfill-day-selected');\r\n }\r\n tgt.classList.add('esm-polyfill-day-selected');\r\n\r\n this.date.setDate(parseInt(tgt.textContent, 10));\r\n this.setInput();\r\n }, passiveOpt);\r\n\r\n daysMatrix.appendChild(this.daysHead);\r\n daysMatrix.appendChild(this.days);\r\n this.container.appendChild(daysMatrix);\r\n\r\n this.hide();\r\n document.body.appendChild(this.container);\r\n\r\n // Close the picker when clicking outside of a date input or picker.\r\n document.addEventListener('click', e=> {\r\n let el = e.target;\r\n let isPicker = el === this.container;\r\n\r\n while(!isPicker && (el = el.parentNode)) {\r\n isPicker = el === this.container;\r\n }\r\n\r\n const attr = e.target.getAttribute('type');\r\n if (attr !== 'date' && attr !== 'date-polyfill' && !isPicker) {\r\n this.hide();\r\n }\r\n }, passiveOpt);\r\n }\r\n\r\n // Hide.\r\n hide() {\r\n this.container.setAttribute('data-open', this.isOpen = false);\r\n }\r\n\r\n // Show.\r\n show() {\r\n this._onBeforeOpen.forEach((fn) => fn());\r\n this.container.setAttribute('data-open', this.isOpen = true);\r\n }\r\n\r\n onBeforeOpen(fn) {\r\n this._onBeforeOpen.push(fn);\r\n }\r\n\r\n // Position picker below element. Align to element's left edge.\r\n goto(element) {\r\n const rekt = element.getBoundingClientRect();\r\n this.container.style.top = `${\r\n rekt.top + rekt.height\r\n + (document.documentElement.scrollTop || document.body.scrollTop)\r\n }px`;\r\n this.container.style.left = `${\r\n rekt.left\r\n + (document.documentElement.scrollLeft || document.body.scrollLeft)\r\n }px`;\r\n\r\n this.show();\r\n }\r\n\r\n // Initiate I/O with given date input.\r\n attachTo(input) {\r\n if(\r\n input === this.input\r\n && this.isOpen\r\n ) {\r\n return false;\r\n }\r\n\r\n this.input = input;\r\n this.sync();\r\n this.goto(this.input.element);\r\n }\r\n\r\n // Match picker date with input date.\r\n sync() {\r\n if(this.input.element.valueAsDate) {\r\n this.date = Picker.utcDateToLocal(this.input.element.valueAsDate);\r\n } else {\r\n this.date = new Date();\r\n }\r\n\r\n this.year.value = this.date.getFullYear();\r\n this.month.value = this.date.getMonth();\r\n this.refreshDaysMatrix();\r\n }\r\n\r\n // Match input date with picker date.\r\n setInput() {\r\n this.input.element.value =\r\n `${\r\n this.date.getFullYear()\r\n }-${\r\n String(this.date.getMonth() + 1).padStart(2,'0')\r\n }-${\r\n String(this.date.getDate()).padStart(2,'0')\r\n }`;\r\n\r\n this.input.element.focus();\r\n setTimeout(()=> { // IE wouldn't hide, so in a timeout you go.\r\n this.hide();\r\n }, 100);\r\n\r\n this.pingInput();\r\n }\r\n\r\n refreshLocale() {\r\n if(this.locale === this.input.locale) {\r\n return false;\r\n }\r\n\r\n this.locale = this.input.locale;\r\n\r\n const daysHeadHTML = [''];\r\n for(let i = 0, len = this.input.localeText.days.length; i < len; ++i) {\r\n daysHeadHTML.push(`${this.input.localeText.days[i]}`);\r\n }\r\n this.daysHead.innerHTML = daysHeadHTML.join('');\r\n\r\n Picker.createRangeSelect(\r\n this.month,\r\n 0,\r\n 11,\r\n this.input.localeText.months,\r\n this.date.getMonth()\r\n );\r\n\r\n this.today.textContent = this.input.localeText.today;\r\n }\r\n\r\n refreshDaysMatrix() {\r\n this.refreshLocale();\r\n\r\n // Determine days for this month and year,\r\n // as well as on which weekdays they lie.\r\n const year = this.date.getFullYear(); // Get the year (2016).\r\n const month = this.date.getMonth(); // Get the month number (0-11).\r\n let startDate = new Date(year, month, 1);\r\n const startDay = startDate.getDay(); // First weekday of month (0-6).\r\n const daysInMonth = new Date(\r\n this.date.getFullYear(),\r\n month + 1,\r\n 0\r\n ).getDate(); // Get days in month (1-31).\r\n\r\n // The input's current date.\r\n const selDate = Picker.utcDateToLocal(this.input.element.valueAsDate) || false;\r\n\r\n // Are we in the input's currently-selected month and year?\r\n const selMatrix =\r\n selDate\r\n && year === selDate.getFullYear()\r\n && month === selDate.getMonth();\r\n\r\n const minStr = this.input.element.min;\r\n const minTime = minStr\r\n ? Picker.utcDateToLocal(new Date(minStr)).getTime()\r\n : -30610224000000; // 1000-01-01\r\n const maxStr = this.input.element.max;\r\n const maxTime = maxStr\r\n ? Picker.utcDateToLocal(new Date(maxStr)).getTime()\r\n : 32503680000000; // 3000-01-01\r\n\r\n const currentDate = new Date();\r\n currentDate.setHours(0,0,0,0);\r\n const currentTime= currentDate.getTime();\r\n\r\n // Populate days matrix.\r\n const matrixHTML = [];\r\n for(let i = 0; i < daysInMonth + startDay; ++i) {\r\n // Add a row every 7 days.\r\n if(i % 7 === 0) {\r\n matrixHTML.push(`\r\n ${i !== 0 ? '' : ''}\r\n \r\n `);\r\n }\r\n\r\n // Add new column.\r\n // If no days from this month in this column, it will be empty.\r\n if(i + 1 <= startDay) {\r\n matrixHTML.push('');\r\n continue;\r\n }\r\n\r\n // Populate day number.\r\n const dayNum = i + 1 - startDay;\r\n const classList = ['esm-polyfill-day'];\r\n if (selMatrix && selDate.getDate() === dayNum){\r\n classList.push('esm-polyfill-day-selected');\r\n }\r\n let thisTime = startDate.setDate(dayNum);\r\n if (thisTime < minTime || thisTime > maxTime) {\r\n classList.push('esm-polyfill-invalid-day');\r\n }\r\n if (thisTime === currentTime) {\r\n classList.push('esm-polyfill-current-day');\r\n }\r\n\r\n matrixHTML.push(\r\n `\r\n ${dayNum}\r\n `\r\n );\r\n }\r\n\r\n this.days.innerHTML = matrixHTML.join('');\r\n }\r\n\r\n pingInput() {\r\n // Dispatch DOM events to the input.\r\n let inputEvent;\r\n let changeEvent;\r\n\r\n // Modern event creation.\r\n try {\r\n inputEvent = new Event('input');\r\n changeEvent = new Event('change');\r\n }\r\n // Old-fashioned way.\r\n catch(e) {\r\n inputEvent = document.createEvent('KeyboardEvent');\r\n inputEvent.initEvent('input', true, false);\r\n changeEvent = document.createEvent('KeyboardEvent');\r\n changeEvent.initEvent('change', true, false);\r\n }\r\n\r\n this.input.element.dispatchEvent(inputEvent);\r\n this.input.element.dispatchEvent(changeEvent);\r\n }\r\n\r\n static createRangeSelect(theSelect, min, max, namesArray, selectedValue) {\r\n theSelect.innerHTML = '';\r\n\r\n for(let i = min; i <= max; ++i) {\r\n const aOption = document.createElement('option');\r\n theSelect.appendChild(aOption);\r\n\r\n const theText = namesArray ? namesArray[i - min] : i;\r\n\r\n aOption.text = theText;\r\n aOption.value = i;\r\n\r\n if(i === selectedValue) {\r\n aOption.selected = 'selected';\r\n }\r\n }\r\n\r\n return theSelect;\r\n }\r\n\r\n static utcDateToLocal(date) {\r\n return date && new Date(date.getTime() + date.getTimezoneOffset()*60000);\r\n }\r\n}\r\n\r\nPicker.instance = null;\r\n\r\nexport default Picker;\r\n","// Localizations for UI text.\r\n// localeNames array is assumed to be already converted to lower case\r\nexport function getLocaleFormat(localeNames) {\r\n const locales = [\r\n ['D. M. Y',\r\n '_dsb_dsb-de_hsb_hsb-de_sk_sk-sk_'],\r\n ['D.M.Y',\r\n '_az_az-cyrl_az-cyrl-az_az-latn_az-latn-az_ba_ba-ru_be_be-by_bs_bs-cyrl_bs-cyrl-ba_bs-latn_bs-latn-ba_cs_cs-cz_de_de-at_de-ch_de-de_de-li_de-lu_et_et-ee_fi_fi-fi_fr-ch_hy_hy-am_is_is-is_it-ch_ka_ka-ge_kk_kk-kz_ky_ky-kg_mk_mk-mk_nb_nb-no_nn_nn-no_no_ro_ro-ro_ru_ru-ru_se_se-fi_se-no_sl_sl-si_sma-no_smj-no_smn_smn-fi_sms_sms-fi_sr_sr-cyrl_sr-cyrl-ba_sr-cyrl-cs_sr-cyrl-me_sr-cyrl-rs_sr-latn_sr-latn-ba_sr-latn-cs_sr-latn-me_sr-latn-rs_sv-fi_tg_tg-cyrl_tg-cyrl-tj_tk_tk-tm_tr_tr-tr_tt_tt-ru_uk_uk-ua_uz-cyrl_uz-cyrl-uz_'],\r\n ['D.M.Y \\'г.\\'',\r\n '_bg_bg-bg_'],\r\n ['D.M.Y.',\r\n '_hr_hr-ba_hr-hr_'],\r\n ['D/M Y',\r\n '_uz_uz-latn_uz-latn-uz_'],\r\n ['D/M/Y',\r\n '_am_am-et_ar_ar-ae_ar-bh_ar-eg_ar-iq_ar-jo_ar-kw_ar-lb_ar-ly_ar-om_ar-qa_ar-sa_ar-sy_ar-ye_br_br-fr_ca_ca-es_co_co-fr_cy_cy-gb_dv_dv-mv_el_el-gr_en-au_en-bz_en-ca_en-gb_en-ie_en-jm_en-my_en-nz_en-sg_en-tt_es_es-ar_es-bo_es-co_es-cr_es-do_es-ec_es-es_es-gt_es-hn_es-mx_es-ni_es-pe_es-pr_es-py_es-sv_es-uy_es-ve_fr_fr-be_fr-fr_fr-lu_fr-mc_ga_ga-ie_gd_gd-gb_gl_gl-es_gsw_gsw-fr_ha_ha-latn_ha-latn-ng_he_he-il_id_id-id_ig_ig-ng_it_it-it_iu_iu-cans_iu-cans-ca_iu-latn_iu-latn-ca_lb_lb-lu_lo_lo-la_mi_mi-nz_ms_ms-bn_ms-my_mt_mt-mt_nl-be_oc_oc-fr_prs_prs-af_ps_ps-af_pt_pt-br_qut_qut-gt_quz_quz-bo_quz-ec_quz-pe_rm_rm-ch_syr_syr-sy_th_th-th_ur_ur-pk_vi_vi-vn_wo_wo-sn_yo_yo-ng_zh-cht_zh-hant_zh-hk_zh-mo_zh-sg_'],\r\n ['D-M-Y',\r\n '_ar-dz_ar-ma_arn_arn-cl_ar-tn_as_as-in_bn_bn-bd_bn-in_da_da-dk_en-in_es-cl_fo_fo-fo_fy_fy-nl_gu_gu-in_hi_hi-in_kl_kl-gl_kn_kn-in_kok_kok-in_ml_ml-in_mr_mr-in_nl_nl-nl_or_or-in_pa_pa-in_pt-pt_sa_sa-in_ta_ta-in_te_te-in_tzm_tzm-latn_tzm-latn-dz_'],\r\n ['M.D.Y',\r\n '_sah_sah-ru_'],\r\n ['M/D/Y',\r\n '_en_en-029_en-ph_en-us_en-zw_es-pa_es-us_fa_fa-ir_fil_fil-ph_moh_moh-ca_ne_ne-np_rw_rw-rw_sw_sw-ke_'],\r\n ['Y.M.D',\r\n '_lt_lt-lt_mn_mn-cyrl_mn-mn_'],\r\n ['Y.M.D.',\r\n '_hu_hu-hu_lv_lv-lv_'],\r\n ['Y/M/D',\r\n '_af_af-za_bo_bo-cn_en-za_eu_eu-es_ii_ii-cn_ja_ja-jp_mn-mong_mn-mong-cn_nso_nso-za_tn_tn-za_xh_xh-za_zh_zh-chs_zh-cn_zh-hans_zh-tw_zu_zu-za_'],\r\n ['Y-M-D',\r\n '_fr-ca_km_km-kh_ko_ko-kr_pl_pl-pl_se-se_si_si-lk_sma_sma-se_smj_smj-se_sq_sq-al_sv_sv-se_ug_ug-cn_'],\r\n ];\r\n for (let i = 0; i < localeNames.length; ++i) {\r\n const srchStr = '_' + localeNames[i] + '_';\r\n const found = locales.find((l) => l[1].includes(srchStr));\r\n if (found) {\r\n return { locale: localeNames[i], format: found[0], parser: dmyFormatToParser(found[0]) } ;\r\n }\r\n const decrSpec = decreaseLocaleSpecificity(localeNames[i]);\r\n if (decrSpec) {\r\n localeNames.push(decrSpec);\r\n }\r\n }\r\n const format = 'Y-M-D';\r\n return { locale: 'en', format, parseLocale: dmyFormatToParser(format) };\r\n}\r\n\r\nexport function decreaseLocaleSpecificity(localeName) {\r\n const returnVar = localeName.replace(/-[a-z0-9]+$/, '');\r\n if (!returnVar || returnVar === localeName) {\r\n return null;\r\n }\r\n return returnVar;\r\n}\r\n\r\nexport function dmyFormatToParser(format) {\r\n let yPos = format.indexOf('Y');\r\n let mPos = format.indexOf('M');\r\n let dPos;\r\n // only 3 permutaions in use: DMY, YMD & MDY\r\n if (yPos < mPos) {\r\n yPos = 1;\r\n mPos = 2;\r\n dPos = 3;\r\n } else {\r\n yPos = 3;\r\n dPos = format.indexOf('D');\r\n if (dPos < mPos) {\r\n dPos = 1;\r\n mPos = 2;\r\n } else {\r\n mPos = 1;\r\n dPos = 2;\r\n }\r\n }\r\n format = format.replace(/\\./g, '\\\\.') // note period is the only charachter requiring escaping in the formats above\r\n .replace('Y', '([12]\\\\d{3})')\r\n .replace('M', '([01]?\\\\d)')\r\n .replace('D', '([0-3]?\\\\d)');\r\n const localeDateRegExp = new RegExp(format);\r\n return {\r\n pattern: format.replace(/[)()]/g,''),\r\n parse(dtStr) {\r\n const dateMatch = localeDateRegExp.exec(dtStr);\r\n if (!dateMatch) { return null; }\r\n const yr = parseInt(dateMatch[yPos], 10);\r\n const mth = parseInt(dateMatch[mPos], 10) - 1;\r\n const dt = parseInt(dateMatch[dPos], 10);\r\n const returnVar = new Date(yr, mth, dt);\r\n if (returnVar.getFullYear() !== yr || returnVar.getMonth() !== mth || returnVar.getDate() !== dt) {\r\n return null;\r\n }\r\n return returnVar;\r\n }\r\n };\r\n}\r\n","import { getLocaleFormat, decreaseLocaleSpecificity } from './locales.js';\r\n\r\n// localeNames array is assumed to be already converted to lower case\r\nexport function getLanguageInfo(localeNames) {\r\n const languages = getLanguages();\r\n const fmt = getLocaleFormat(localeNames);\r\n let language;\r\n let l = fmt.locale;\r\n while (!(language = languages[l])) {\r\n l = decreaseLocaleSpecificity(l);\r\n }\r\n if (!language) {\r\n language = languages['en']; // shouldn't get to here - possibly throw an error?\r\n }\r\n return Object.assign(fmt, language);\r\n}\r\n\r\nfunction getLanguages() {\r\n return {\r\n ar: { // Arabic\r\n today: 'اليوم',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'محرم',\r\n 'صفر',\r\n 'ربيع الأول',\r\n 'ربيع الثاني',\r\n 'جمادى الأولى',\r\n 'جمادى الثانية',\r\n 'رجب',\r\n 'شعبان',\r\n 'رمضان',\r\n 'شوال',\r\n 'ذو القعدة',\r\n 'ذو الحجة'\r\n ]\r\n },\r\n bg: { // Bulgarian\r\n today: 'днес',\r\n days: [\r\n 'нед',\r\n 'пон',\r\n 'вт',\r\n 'ср',\r\n 'четв',\r\n 'пет',\r\n 'съб'\r\n ],\r\n months: [\r\n 'януари',\r\n 'февруари',\r\n 'март',\r\n 'април',\r\n 'май',\r\n 'юни',\r\n 'юли',\r\n 'август',\r\n 'септември',\r\n 'октомври',\r\n 'ноември',\r\n 'декември'\r\n ]\r\n },\r\n ca: { // Catalan\r\n today: 'avui',\r\n days: [\r\n 'dg.',\r\n 'dl.',\r\n 'dt.',\r\n 'dc.',\r\n 'dj.',\r\n 'dv.',\r\n 'ds.'\r\n ],\r\n months: [\r\n 'gener',\r\n 'febrer',\r\n 'març',\r\n 'abril',\r\n 'maig',\r\n 'juny',\r\n 'juliol',\r\n 'agost',\r\n 'setembre',\r\n 'octubre',\r\n 'novembre',\r\n 'desembre'\r\n ]\r\n },\r\n cs: { // Czech\r\n today: 'dnes',\r\n days: [\r\n 'ne',\r\n 'po',\r\n 'út',\r\n 'st',\r\n 'čt',\r\n 'pá',\r\n 'so'\r\n ],\r\n months: [\r\n 'leden',\r\n 'únor',\r\n 'březen',\r\n 'duben',\r\n 'květen',\r\n 'červen',\r\n 'červenec',\r\n 'srpen',\r\n 'září',\r\n 'říjen',\r\n 'listopad',\r\n 'prosinec'\r\n ]\r\n },\r\n da: { // Danish\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'ma',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lø'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'marts',\r\n 'april',\r\n 'maj',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n de: { // German\r\n today: 'heute',\r\n days: [\r\n 'So',\r\n 'Mo',\r\n 'Di',\r\n 'Mi',\r\n 'Do',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n months: [\r\n 'Januar',\r\n 'Februar',\r\n 'März',\r\n 'April',\r\n 'Mai',\r\n 'Juni',\r\n 'Juli',\r\n 'August',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Dezember'\r\n ]\r\n },\r\n el: { // Greek\r\n today: 'σήμερα',\r\n days: [\r\n 'Κυρ',\r\n 'Δευ',\r\n 'Τρι',\r\n 'Τετ',\r\n 'Πεμ',\r\n 'Παρ',\r\n 'Σαβ'\r\n ],\r\n months: [\r\n 'Ιανουάριος',\r\n 'Φεβρουάριος',\r\n 'Μάρτιος',\r\n 'Απρίλιος',\r\n 'Μάιος',\r\n 'Ιούνιος',\r\n 'Ιούλιος',\r\n 'Αύγουστος',\r\n 'Σεπτέμβριος',\r\n 'Οκτώβριος',\r\n 'Νοέμβριος',\r\n 'Δεκέμβριος'\r\n ]\r\n },\r\n en: { // English\r\n today: 'today',\r\n days: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December'\r\n ]\r\n },\r\n es: { // Spanish\r\n today: 'hoy',\r\n days: [\r\n 'dom',\r\n 'lun',\r\n 'mar',\r\n 'mié',\r\n 'jue',\r\n 'vie',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'enero',\r\n 'febrero',\r\n 'marzo',\r\n 'abril',\r\n 'mayo',\r\n 'junio',\r\n 'julio',\r\n 'agosto',\r\n 'septiembre',\r\n 'octubre',\r\n 'noviembre',\r\n 'diciembre'\r\n ]\r\n },\r\n fi: { // Finnish\r\n today: 'tänään',\r\n days: [\r\n 'su',\r\n 'ma',\r\n 'ti',\r\n 'ke',\r\n 'to',\r\n 'pe',\r\n 'la'\r\n ],\r\n months: [\r\n 'tammikuu',\r\n 'helmikuu',\r\n 'maaliskuu',\r\n 'huhtikuu',\r\n 'toukokuu',\r\n 'kesäkuu',\r\n 'heinäkuu',\r\n 'elokuu',\r\n 'syyskuu',\r\n 'lokakuu',\r\n 'marraskuu',\r\n 'joulukuu'\r\n ]\r\n },\r\n fr: { // French\r\n today: 'aujourd\\'hui',\r\n days: [\r\n 'dim.',\r\n 'lun.',\r\n 'mar.',\r\n 'mer.',\r\n 'jeu.',\r\n 'ven.',\r\n 'sam.'\r\n ],\r\n months: [\r\n 'janvier',\r\n 'février',\r\n 'mars',\r\n 'avril',\r\n 'mai',\r\n 'juin',\r\n 'juillet',\r\n 'août',\r\n 'septembre',\r\n 'octobre',\r\n 'novembre',\r\n 'décembre'\r\n ]\r\n },\r\n he: { // Hebrew\r\n today: 'היום',\r\n days: [\r\n 'יום א',\r\n 'יום ב',\r\n 'יום ג',\r\n 'יום ד',\r\n 'יום ה',\r\n 'יום ו',\r\n 'שבת'\r\n ],\r\n months: [\r\n 'ינואר',\r\n 'פברואר',\r\n 'מרץ',\r\n 'אפריל',\r\n 'מאי',\r\n 'יוני',\r\n 'יולי',\r\n 'אוגוסט',\r\n 'ספטמבר',\r\n 'אוקטובר',\r\n 'נובמבר',\r\n 'דצמבר'\r\n ]\r\n },\r\n hu: { // Hungarian\r\n today: 'Ma',\r\n days: [\r\n 'V',\r\n 'H',\r\n 'K',\r\n 'Sze',\r\n 'Cs',\r\n 'P',\r\n 'Szo'\r\n ],\r\n months: [\r\n 'január',\r\n 'február',\r\n 'március',\r\n 'április',\r\n 'május',\r\n 'június',\r\n 'július',\r\n 'augusztus',\r\n 'szeptember',\r\n 'október',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n is: { // Icelandic\r\n today: 'Í dag',\r\n days: [\r\n 'sun.',\r\n 'mán.',\r\n 'þri.',\r\n 'mið.',\r\n 'fim.',\r\n 'fös.',\r\n 'lau.'\r\n ],\r\n months: [\r\n 'janúar',\r\n 'febrúar',\r\n 'mars',\r\n 'apríl',\r\n 'maí',\r\n 'júní',\r\n 'júlí',\r\n 'ágúst',\r\n 'september',\r\n 'október',\r\n 'nóvember',\r\n 'desember'\r\n ]\r\n },\r\n it: { // Italian\r\n today: 'oggi',\r\n days: [\r\n 'dom',\r\n 'lun',\r\n 'mar',\r\n 'mer',\r\n 'gio',\r\n 'ven',\r\n 'sab'\r\n ],\r\n months: [\r\n 'gennaio',\r\n 'febbraio',\r\n 'marzo',\r\n 'aprile',\r\n 'maggio',\r\n 'giugno',\r\n 'luglio',\r\n 'agosto',\r\n 'settembre',\r\n 'ottobre',\r\n 'novembre',\r\n 'dicembre'\r\n ]\r\n },\r\n ja: { // Japanese\r\n today: '今日',\r\n days: [\r\n '日',\r\n '月',\r\n '火',\r\n '水',\r\n '木',\r\n '金',\r\n '土'\r\n ],\r\n months: [\r\n '1月',\r\n '2月',\r\n '3月',\r\n '4月',\r\n '5月',\r\n '6月',\r\n '7月',\r\n '8月',\r\n '9月',\r\n '10月',\r\n '11月',\r\n '12月'\r\n ]\r\n },\r\n ko: { // Korean\r\n today: '오늘',\r\n days: [\r\n '일',\r\n '월',\r\n '화',\r\n '수',\r\n '목',\r\n '금',\r\n '토'\r\n ],\r\n months: [\r\n '1월',\r\n '2월',\r\n '3월',\r\n '4월',\r\n '5월',\r\n '6월',\r\n '7월',\r\n '8월',\r\n '9월',\r\n '10월',\r\n '11월',\r\n '12월'\r\n ]\r\n },\r\n nl: { // Dutch\r\n today: 'vandaag',\r\n days: [\r\n 'zo',\r\n 'ma',\r\n 'di',\r\n 'wo',\r\n 'do',\r\n 'vr',\r\n 'za'\r\n ],\r\n months: [\r\n 'januari',\r\n 'februari',\r\n 'maart',\r\n 'april',\r\n 'mei',\r\n 'juni',\r\n 'juli',\r\n 'augustus',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n no: { // Norwegian\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'ma',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lø'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'april',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n pl: { // Polish\r\n today: 'dzisiaj',\r\n days: [\r\n 'N',\r\n 'Pn',\r\n 'Wt',\r\n 'Śr',\r\n 'Cz',\r\n 'Pt',\r\n 'So'\r\n ],\r\n months: [\r\n 'styczeń',\r\n 'luty',\r\n 'marzec',\r\n 'kwiecień',\r\n 'maj',\r\n 'czerwiec',\r\n 'lipiec',\r\n 'sierpień',\r\n 'wrzesień',\r\n 'październik',\r\n 'listopad',\r\n 'grudzień'\r\n ]\r\n },\r\n pt: { // Portuguese\r\n today: 'hoje',\r\n days: [\r\n 'dom',\r\n 'seg',\r\n 'ter',\r\n 'qua',\r\n 'qui',\r\n 'sex',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'janeiro',\r\n 'fevereiro',\r\n 'março',\r\n 'abril',\r\n 'maio',\r\n 'junho',\r\n 'julho',\r\n 'agosto',\r\n 'setembro',\r\n 'outubro',\r\n 'novembro',\r\n 'dezembro'\r\n ]\r\n },\r\n rm: { // Romansh\r\n today: 'oz',\r\n days: [\r\n 'du',\r\n 'gli',\r\n 'ma',\r\n 'me',\r\n 'gie',\r\n 've',\r\n 'so'\r\n ],\r\n months: [\r\n 'schaner',\r\n 'favrer',\r\n 'mars',\r\n 'avrigl',\r\n 'matg',\r\n 'zercladur',\r\n 'fanadur',\r\n 'avust',\r\n 'settember',\r\n 'october',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n ro: { // Romanian\r\n today: 'astăzi',\r\n days: [\r\n 'D',\r\n 'L',\r\n 'Ma',\r\n 'Mi',\r\n 'J',\r\n 'V',\r\n 'S'\r\n ],\r\n months: [\r\n 'ianuarie',\r\n 'februarie',\r\n 'martie',\r\n 'aprilie',\r\n 'mai',\r\n 'iunie',\r\n 'iulie',\r\n 'august',\r\n 'septembrie',\r\n 'octombrie',\r\n 'noiembrie',\r\n 'decembrie'\r\n ]\r\n },\r\n ru: { // Russian\r\n today: 'Cегодня',\r\n days: [\r\n 'Вс',\r\n 'Пн',\r\n 'Вт',\r\n 'Ср',\r\n 'Чт',\r\n 'Пт',\r\n 'Сб'\r\n ],\r\n months: [\r\n 'Январь',\r\n 'Февраль',\r\n 'Март',\r\n 'Апрель',\r\n 'Май',\r\n 'Июнь',\r\n 'Июль',\r\n 'Август',\r\n 'Сентябрь',\r\n 'Октябрь',\r\n 'Ноябрь',\r\n 'Декабрь'\r\n ]\r\n },\r\n hr: { // Croatian\r\n today: 'danas',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'uto',\r\n 'sri',\r\n 'čet',\r\n 'pet',\r\n 'sub'\r\n ],\r\n months: [\r\n 'siječanj',\r\n 'veljača',\r\n 'ožujak',\r\n 'travanj',\r\n 'svibanj',\r\n 'lipanj',\r\n 'srpanj',\r\n 'kolovoz',\r\n 'rujan',\r\n 'listopad',\r\n 'studeni',\r\n 'prosinac'\r\n ]\r\n },\r\n sk: { // Slovak\r\n today: 'dnes',\r\n days: [\r\n 'ne',\r\n 'po',\r\n 'ut',\r\n 'st',\r\n 'št',\r\n 'pi',\r\n 'so'\r\n ],\r\n months: [\r\n 'január',\r\n 'február',\r\n 'marec',\r\n 'apríl',\r\n 'máj',\r\n 'jún',\r\n 'júl',\r\n 'august',\r\n 'september',\r\n 'október',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n sq: { // Albanian\r\n today: 'sot',\r\n days: [\r\n 'Die',\r\n 'Hën',\r\n 'Mar',\r\n 'Mër',\r\n 'Enj',\r\n 'Pre',\r\n 'Sht'\r\n ],\r\n months: [\r\n 'janar',\r\n 'shkurt',\r\n 'mars',\r\n 'prill',\r\n 'maj',\r\n 'qershor',\r\n 'korrik',\r\n 'gusht',\r\n 'shtator',\r\n 'tetor',\r\n 'nëntor',\r\n 'dhjetor'\r\n ]\r\n },\r\n sv: { // Swedish\r\n today: 'i dag',\r\n days: [\r\n 'sö',\r\n 'må',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lö'\r\n ],\r\n months: [\r\n 'januari',\r\n 'februari',\r\n 'mars',\r\n 'april',\r\n 'maj',\r\n 'juni',\r\n 'juli',\r\n 'augusti',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n th: { // Thai\r\n today: 'ในวันนี้',\r\n days: [\r\n 'อา.',\r\n 'จ.',\r\n 'อ.',\r\n 'พ.',\r\n 'พฤ.',\r\n 'ศ.',\r\n 'ส.'\r\n ],\r\n months: [\r\n 'มกราคม',\r\n 'กุมภาพันธ์',\r\n 'มีนาคม',\r\n 'เมษายน',\r\n 'พฤษภาคม',\r\n 'มิถุนายน',\r\n 'กรกฎาคม',\r\n 'สิงหาคม',\r\n 'กันยายน',\r\n 'ตุลาคม',\r\n 'พฤศจิกายน',\r\n 'ธันวาคม'\r\n ]\r\n },\r\n tr: { // Turkish\r\n today: 'bugün',\r\n days: [\r\n 'Paz',\r\n 'Pzt',\r\n 'Sal',\r\n 'Çar',\r\n 'Per',\r\n 'Cum',\r\n 'Cmt'\r\n ],\r\n months: [\r\n 'Ocak',\r\n 'Şubat',\r\n 'Mart',\r\n 'Nisan',\r\n 'Mayıs',\r\n 'Haziran',\r\n 'Temmuz',\r\n 'Ağustos',\r\n 'Eylül',\r\n 'Ekim',\r\n 'Kasım',\r\n 'Aralık'\r\n ]\r\n },\r\n ur: { // Urdu\r\n today: 'آج',\r\n days: [\r\n 'اتوار',\r\n 'پير',\r\n 'منگل',\r\n 'بدھ',\r\n 'جمعرات',\r\n 'جمعه',\r\n 'هفته'\r\n ],\r\n months: [\r\n 'جنوری',\r\n 'فروری',\r\n 'مارچ',\r\n 'اپریل',\r\n 'مئی',\r\n 'جون',\r\n 'جولائی',\r\n 'اگست',\r\n 'ستمبر',\r\n 'اکتوبر',\r\n 'نومبر',\r\n 'دسمبر'\r\n ]\r\n },\r\n id: { // Indonesian\r\n today: 'hari ini',\r\n days: [\r\n 'Minggu',\r\n 'Sen',\r\n 'Sel',\r\n 'Rabu',\r\n 'Kamis',\r\n 'Jumat',\r\n 'Sabtu'\r\n ],\r\n months: [\r\n 'Januari',\r\n 'Februari',\r\n 'Maret',\r\n 'April',\r\n 'Mei',\r\n 'Juni',\r\n 'Juli',\r\n 'Agustus',\r\n 'September',\r\n 'Oktober',\r\n 'Nopember',\r\n 'Desember'\r\n ]\r\n },\r\n uk: { // Ukrainian\r\n today: 'сьогодні',\r\n days: [\r\n 'Нд',\r\n 'Пн',\r\n 'Вт',\r\n 'Ср',\r\n 'Чт',\r\n 'Пт',\r\n 'Сб'\r\n ],\r\n months: [\r\n 'Січень',\r\n 'Лютий',\r\n 'Березень',\r\n 'Квітень',\r\n 'Травень',\r\n 'Червень',\r\n 'Липень',\r\n 'Серпень',\r\n 'Вересень',\r\n 'Жовтень',\r\n 'Листопад',\r\n 'Грудень'\r\n ]\r\n },\r\n be: { // Belarusian\r\n today: 'сёння',\r\n days: [\r\n 'нд',\r\n 'пн',\r\n 'аў',\r\n 'ср',\r\n 'чц',\r\n 'пт',\r\n 'сб'\r\n ],\r\n months: [\r\n 'Студзень',\r\n 'Люты',\r\n 'Сакавік',\r\n 'Красавік',\r\n 'Май',\r\n 'Чэрвень',\r\n 'Ліпень',\r\n 'Жнівень',\r\n 'Верасень',\r\n 'Кастрычнік',\r\n 'Лістапад',\r\n 'Снежань'\r\n ]\r\n },\r\n sl: { // Slovenian\r\n today: 'danes',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'tor',\r\n 'sre',\r\n 'čet',\r\n 'pet',\r\n 'sob'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'marec',\r\n 'april',\r\n 'maj',\r\n 'junij',\r\n 'julij',\r\n 'avgust',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n et: { // Estonian\r\n today: 'täna',\r\n days: [\r\n 'P',\r\n 'E',\r\n 'T',\r\n 'K',\r\n 'N',\r\n 'R',\r\n 'L'\r\n ],\r\n months: [\r\n 'jaanuar',\r\n 'veebruar',\r\n 'märts',\r\n 'aprill',\r\n 'mai',\r\n 'juuni',\r\n 'juuli',\r\n 'august',\r\n 'september',\r\n 'oktoober',\r\n 'november',\r\n 'detsember'\r\n ]\r\n },\r\n lv: { // Latvian\r\n today: 'šodien',\r\n days: [\r\n 'sv',\r\n 'pr',\r\n 'ot',\r\n 'tr',\r\n 'ce',\r\n 'pk',\r\n 'se'\r\n ],\r\n months: [\r\n 'janvāris',\r\n 'februāris',\r\n 'marts',\r\n 'aprīlis',\r\n 'maijs',\r\n 'jūnijs',\r\n 'jūlijs',\r\n 'augusts',\r\n 'septembris',\r\n 'oktobris',\r\n 'novembris',\r\n 'decembris'\r\n ]\r\n },\r\n lt: { // Lithuanian\r\n today: 'šiandien',\r\n days: [\r\n 'Sk',\r\n 'Pr',\r\n 'An',\r\n 'Tr',\r\n 'Kt',\r\n 'Pn',\r\n 'Št'\r\n ],\r\n months: [\r\n 'sausis',\r\n 'vasaris',\r\n 'kovas',\r\n 'balandis',\r\n 'gegužė',\r\n 'birželis',\r\n 'liepa',\r\n 'rugpjūtis',\r\n 'rugsėjis',\r\n 'spalis',\r\n 'lapkritis',\r\n 'gruodis'\r\n ]\r\n },\r\n tg: { // Tajik\r\n today: 'имрӯз',\r\n days: [\r\n 'Яш',\r\n 'Дш',\r\n 'Сш',\r\n 'Чш',\r\n 'Пш',\r\n 'Ҷм',\r\n 'Шн'\r\n ],\r\n months: [\r\n 'Январ',\r\n 'Феврал',\r\n 'Март',\r\n 'Апрел',\r\n 'Май',\r\n 'Июн',\r\n 'Июл',\r\n 'Август',\r\n 'Сентябр',\r\n 'Октябр',\r\n 'Ноябр',\r\n 'Декабр'\r\n ]\r\n },\r\n fa: { // Persian\r\n today: 'امروز',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'جانفييه',\r\n 'فيفرييه',\r\n 'مارس',\r\n 'أفريل',\r\n 'مي',\r\n 'جوان',\r\n 'جوييه',\r\n 'أوت',\r\n 'سبتمبر',\r\n 'اكتوبر',\r\n 'نوفمبر',\r\n 'ديسمبر'\r\n ]\r\n },\r\n vi: { // Vietnamese\r\n today: 'hôm nay',\r\n days: [\r\n 'CN',\r\n 'Hai',\r\n 'Ba',\r\n 'Tư',\r\n 'Năm',\r\n 'Sáu',\r\n 'Bảy'\r\n ],\r\n months: [\r\n 'Tháng Giêng',\r\n 'Tháng Hai',\r\n 'Tháng Ba',\r\n 'Tháng Tư',\r\n 'Tháng Năm',\r\n 'Tháng Sáu',\r\n 'Tháng Bảy',\r\n 'Tháng Tám',\r\n 'Tháng Chín',\r\n 'Tháng Mười',\r\n 'Tháng Mười Một',\r\n 'Tháng Mười Hai'\r\n ]\r\n },\r\n hy: { // Armenian\r\n today: 'այսօր',\r\n days: [\r\n 'Կիր',\r\n 'Երկ',\r\n 'Երք',\r\n 'Չրք',\r\n 'Հնգ',\r\n 'ՈՒր',\r\n 'Շբթ'\r\n ],\r\n months: [\r\n 'Հունվար',\r\n 'Փետրվար',\r\n 'Մարտ',\r\n 'Ապրիլ',\r\n 'Մայիս',\r\n 'Հունիս',\r\n 'Հուլիս',\r\n 'Օգոստոս',\r\n 'Սեպտեմբեր',\r\n 'Հոկտեմբեր',\r\n 'Նոյեմբեր',\r\n 'Դեկտեմբեր'\r\n ]\r\n },\r\n az: { // Azeri\r\n today: 'bugün',\r\n days: [\r\n 'B',\r\n 'Be',\r\n 'Ça',\r\n 'Ç',\r\n 'Ca',\r\n 'C',\r\n 'Ş'\r\n ],\r\n months: [\r\n 'Yanvar',\r\n 'Fevral',\r\n 'Mart',\r\n 'Aprel',\r\n 'May',\r\n 'İyun',\r\n 'İyul',\r\n 'Avgust',\r\n 'Sentyabr',\r\n 'Oktyabr',\r\n 'Noyabr',\r\n 'Dekabr'\r\n ]\r\n },\r\n eu: { // Basque\r\n today: 'gaur',\r\n days: [\r\n 'ig.',\r\n 'al.',\r\n 'as.',\r\n 'az.',\r\n 'og.',\r\n 'or.',\r\n 'lr.'\r\n ],\r\n months: [\r\n 'urtarrila',\r\n 'otsaila',\r\n 'martxoa',\r\n 'apirila',\r\n 'maiatza',\r\n 'ekaina',\r\n 'uztaila',\r\n 'abuztua',\r\n 'iraila',\r\n 'urria',\r\n 'azaroa',\r\n 'abendua'\r\n ]\r\n },\r\n hsb: { // Upper Sorbian\r\n today: 'dźensa',\r\n days: [\r\n 'nje',\r\n 'pón',\r\n 'wut',\r\n 'srj',\r\n 'štw',\r\n 'pja',\r\n 'sob'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'měrc',\r\n 'apryl',\r\n 'meja',\r\n 'junij',\r\n 'julij',\r\n 'awgust',\r\n 'september',\r\n 'oktober',\r\n 'nowember',\r\n 'december'\r\n ]\r\n },\r\n mk: { // Macedonian (FYROM)\r\n today: 'денес',\r\n days: [\r\n 'нед',\r\n 'пон',\r\n 'втр',\r\n 'срд',\r\n 'чет',\r\n 'пет',\r\n 'саб'\r\n ],\r\n months: [\r\n 'јануари',\r\n 'февруари',\r\n 'март',\r\n 'април',\r\n 'мај',\r\n 'јуни',\r\n 'јули',\r\n 'август',\r\n 'септември',\r\n 'октомври',\r\n 'ноември',\r\n 'декември'\r\n ]\r\n },\r\n tn: { // Setswana\r\n today: 'Gompieno',\r\n days: [\r\n 'Ltp.',\r\n 'Mos.',\r\n 'Lbd.',\r\n 'Lbr.',\r\n 'Lbn.',\r\n 'Lbt.',\r\n 'Lmt.'\r\n ],\r\n months: [\r\n 'Ferikgong',\r\n 'Tlhakole',\r\n 'Mopitloe',\r\n 'Moranang',\r\n 'Motsheganong',\r\n 'Seetebosigo',\r\n 'Phukwi',\r\n 'Phatwe',\r\n 'Lwetse',\r\n 'Diphalane',\r\n 'Ngwanatsele',\r\n 'Sedimothole'\r\n ]\r\n },\r\n xh: { // isiXhosa\r\n today: 'namhlanje',\r\n days: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Mqungu',\r\n 'Mdumba',\r\n 'Kwindla',\r\n 'Tshazimpuzi',\r\n 'Canzibe',\r\n 'Silimela',\r\n 'Khala',\r\n 'Thupha',\r\n 'Msintsi',\r\n 'Dwarha',\r\n 'Nkanga',\r\n 'Mnga'\r\n ]\r\n },\r\n zu: { // isiZulu\r\n today: 'namhlanje',\r\n days: [\r\n 'Son.',\r\n 'Mso.',\r\n 'Bi.',\r\n 'Tha.',\r\n 'Ne.',\r\n 'Hla.',\r\n 'Mgq.'\r\n ],\r\n months: [\r\n 'uMasingana',\r\n 'uNhlolanja',\r\n 'uNdasa',\r\n 'uMbaso',\r\n 'uNhlaba',\r\n 'uNhlangulana',\r\n 'uNtulikazi',\r\n 'uNcwaba',\r\n 'uMandulo',\r\n 'uMfumfu',\r\n 'uLwezi',\r\n 'uZibandlela'\r\n ]\r\n },\r\n af: { // Afrikaans\r\n today: 'vandag',\r\n days: [\r\n 'Son',\r\n 'Maan',\r\n 'Dins',\r\n 'Woen',\r\n 'Dond',\r\n 'Vry',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Januarie',\r\n 'Februarie',\r\n 'Maart',\r\n 'April',\r\n 'Mei',\r\n 'Junie',\r\n 'Julie',\r\n 'Augustus',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Desember'\r\n ]\r\n },\r\n ka: { // Georgian\r\n today: 'დღეს',\r\n days: [\r\n 'კვირა',\r\n 'ორშაბათი',\r\n 'სამშაბათი',\r\n 'ოთხშაბათი',\r\n 'ხუთშაბათი',\r\n 'პარასკევი',\r\n 'შაბათი'\r\n ],\r\n months: [\r\n 'იანვარი',\r\n 'თებერვალი',\r\n 'მარტი',\r\n 'აპრილი',\r\n 'მაისი',\r\n 'ივნისი',\r\n 'ივლისი',\r\n 'აგვისტო',\r\n 'სექტემბერი',\r\n 'ოქტომბერი',\r\n 'ნოემბერი',\r\n 'დეკემბერი'\r\n ]\r\n },\r\n fo: { // Faroese\r\n today: 'í dag',\r\n days: [\r\n 'sun',\r\n 'mán',\r\n 'týs',\r\n 'mik',\r\n 'hós',\r\n 'frí',\r\n 'leyg'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'apríl',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n hi: { // Hindi\r\n today: 'आज',\r\n days: [\r\n 'रवि.',\r\n 'सोम.',\r\n 'मंगल.',\r\n 'बुध.',\r\n 'गुरु.',\r\n 'शुक्र.',\r\n 'शनि.'\r\n ],\r\n months: [\r\n 'जनवरी',\r\n 'फरवरी',\r\n 'मार्च',\r\n 'अप्रैल',\r\n 'मई',\r\n 'जून',\r\n 'जुलाई',\r\n 'अगस्त',\r\n 'सितम्बर',\r\n 'अक्तूबर',\r\n 'नवम्बर',\r\n 'दिसम्बर'\r\n ]\r\n },\r\n mt: { // Maltese\r\n today: 'illum',\r\n days: [\r\n 'Ħad',\r\n 'Tne',\r\n 'Tli',\r\n 'Erb',\r\n 'Ħam',\r\n 'Ġim',\r\n 'Sib'\r\n ],\r\n months: [\r\n 'Jannar',\r\n 'Frar',\r\n 'Marzu',\r\n 'April',\r\n 'Mejju',\r\n 'Ġunju',\r\n 'Lulju',\r\n 'Awissu',\r\n 'Settembru',\r\n 'Ottubru',\r\n 'Novembru',\r\n 'Diċembru'\r\n ]\r\n },\r\n se: { // Sami (Northern)\r\n today: 'odne',\r\n days: [\r\n 'sotn',\r\n 'vuos',\r\n 'maŋ',\r\n 'gask',\r\n 'duor',\r\n 'bear',\r\n 'láv'\r\n ],\r\n months: [\r\n 'ođđajagemánnu',\r\n 'guovvamánnu',\r\n 'njukčamánnu',\r\n 'cuoŋománnu',\r\n 'miessemánnu',\r\n 'geassemánnu',\r\n 'suoidnemánnu',\r\n 'borgemánnu',\r\n 'čakčamánnu',\r\n 'golggotmánnu',\r\n 'skábmamánnu',\r\n 'juovlamánnu'\r\n ]\r\n },\r\n ga: { // Irish\r\n today: 'inniu',\r\n days: [\r\n 'Domh',\r\n 'Luan',\r\n 'Máir',\r\n 'Céad',\r\n 'Déar',\r\n 'Aoi',\r\n 'Sath'\r\n ],\r\n months: [\r\n 'Eanáir',\r\n 'Feabhra',\r\n 'Márta',\r\n 'Aibreán',\r\n 'Bealtaine',\r\n 'Meitheamh',\r\n 'Iúil',\r\n 'Lúnasa',\r\n 'Meán Fómhair',\r\n 'Deireadh Fómhair',\r\n 'Samhain',\r\n 'Nollaig'\r\n ]\r\n },\r\n ms: { // Malay\r\n today: 'hari ini',\r\n days: [\r\n 'Ahad',\r\n 'Isnin',\r\n 'Sel',\r\n 'Rabu',\r\n 'Khamis',\r\n 'Jumaat',\r\n 'Sabtu'\r\n ],\r\n months: [\r\n 'Januari',\r\n 'Februari',\r\n 'Mac',\r\n 'April',\r\n 'Mei',\r\n 'Jun',\r\n 'Julai',\r\n 'Ogos',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Disember'\r\n ]\r\n },\r\n kk: { // Kazakh\r\n today: 'бүгін',\r\n days: [\r\n 'Жк',\r\n 'Дс',\r\n 'Сс',\r\n 'Ср',\r\n 'Бс',\r\n 'Жм',\r\n 'Сн'\r\n ],\r\n months: [\r\n 'қаңтар',\r\n 'ақпан',\r\n 'наурыз',\r\n 'сәуір',\r\n 'мамыр',\r\n 'маусым',\r\n 'шілде',\r\n 'тамыз',\r\n 'қыркүйек',\r\n 'қазан',\r\n 'қараша',\r\n 'желтоқсан'\r\n ]\r\n },\r\n ky: { // Kyrgyz\r\n today: 'бүгүн',\r\n days: [\r\n 'Жш',\r\n 'Дш',\r\n 'Шш',\r\n 'Шр',\r\n 'Бш',\r\n 'Жм',\r\n 'Иш'\r\n ],\r\n months: [\r\n 'Январь',\r\n 'Февраль',\r\n 'Март',\r\n 'Апрель',\r\n 'Май',\r\n 'Июнь',\r\n 'Июль',\r\n 'Август',\r\n 'Сентябрь',\r\n 'Октябрь',\r\n 'Ноябрь',\r\n 'Декабрь'\r\n ]\r\n },\r\n sw: { // Kiswahili\r\n today: 'leo',\r\n days: [\r\n 'Jumap.',\r\n 'Jumat.',\r\n 'Juman.',\r\n 'Jumat.',\r\n 'Alh.',\r\n 'Iju.',\r\n 'Jumam.'\r\n ],\r\n months: [\r\n 'Januari',\r\n 'Februari',\r\n 'Machi',\r\n 'Aprili',\r\n 'Mei',\r\n 'Juni',\r\n 'Julai',\r\n 'Agosti',\r\n 'Septemba',\r\n 'Oktoba',\r\n 'Novemba',\r\n 'Decemba'\r\n ]\r\n },\r\n tk: { // Turkmen\r\n today: 'bugün',\r\n days: [\r\n 'Db',\r\n 'Sb',\r\n 'Çb',\r\n 'Pb',\r\n 'An',\r\n 'Şb',\r\n 'Ýb'\r\n ],\r\n months: [\r\n 'Ýanwar',\r\n 'Fewral',\r\n 'Mart',\r\n 'Aprel',\r\n 'Maý',\r\n 'lýun',\r\n 'lýul',\r\n 'Awgust',\r\n 'Sentýabr',\r\n 'Oktýabr',\r\n 'Noýabr',\r\n 'Dekabr'\r\n ]\r\n },\r\n uz: { // Uzbek\r\n today: 'Bugun',\r\n days: [\r\n 'yak.',\r\n 'dsh.',\r\n 'sesh.',\r\n 'chr.',\r\n 'psh.',\r\n 'jm.',\r\n 'sh.'\r\n ],\r\n months: [\r\n 'yanvar',\r\n 'fevral',\r\n 'mart',\r\n 'aprel',\r\n 'may',\r\n 'iyun',\r\n 'iyul',\r\n 'avgust',\r\n 'sentyabr',\r\n 'oktyabr',\r\n 'noyabr',\r\n 'dekabr'\r\n ]\r\n },\r\n tt: { // Tatar\r\n today: 'бүген',\r\n days: [\r\n 'Якш',\r\n 'Дүш',\r\n 'Сиш',\r\n 'Чәрш',\r\n 'Пәнҗ',\r\n 'Җом',\r\n 'Шим'\r\n ],\r\n months: [\r\n 'Гыйнвар',\r\n 'Февраль',\r\n 'Март',\r\n 'Апрель',\r\n 'Май',\r\n 'Июнь',\r\n 'Июль',\r\n 'Август',\r\n 'Сентябрь',\r\n 'Октябрь',\r\n 'Ноябрь',\r\n 'Декабрь'\r\n ]\r\n },\r\n bn: { // Bengali\r\n today: 'আজ',\r\n days: [\r\n 'রবি.',\r\n 'সোম.',\r\n 'মঙ্গল.',\r\n 'বুধ.',\r\n 'বৃহস্পতি.',\r\n 'শুক্র.',\r\n 'শনি.'\r\n ],\r\n months: [\r\n 'জানুয়ারী',\r\n 'ফেব্রুয়ারী',\r\n 'মার্চ',\r\n 'এপ্রিল',\r\n 'মে',\r\n 'জুন',\r\n 'জুলাই',\r\n 'আগস্ট',\r\n 'সেপ্টেম্বর',\r\n 'অক্টোবর',\r\n 'নভেম্বর',\r\n 'ডিসেম্বর'\r\n ]\r\n },\r\n pa: { // Punjabi\r\n today: 'ਅੱਜ',\r\n days: [\r\n 'ਐਤ.',\r\n 'ਸੋਮ.',\r\n 'ਮੰਗਲ.',\r\n 'ਬੁੱਧ.',\r\n 'ਵੀਰ.',\r\n 'ਸ਼ੁਕਰ.',\r\n 'ਸ਼ਨਿੱਚਰ.'\r\n ],\r\n months: [\r\n 'ਜਨਵਰੀ',\r\n 'ਫ਼ਰਵਰੀ',\r\n 'ਮਾਰਚ',\r\n 'ਅਪ੍ਰੈਲ',\r\n 'ਮਈ',\r\n 'ਜੂਨ',\r\n 'ਜੁਲਾਈ',\r\n 'ਅਗਸਤ',\r\n 'ਸਤੰਬਰ',\r\n 'ਅਕਤੂਬਰ',\r\n 'ਨਵੰਬਰ',\r\n 'ਦਸੰਬਰ'\r\n ]\r\n },\r\n gu: { // Gujarati\r\n today: 'આજે',\r\n days: [\r\n 'રવિ',\r\n 'સોમ',\r\n 'મંગળ',\r\n 'બુધ',\r\n 'ગુરુ',\r\n 'શુક્ર',\r\n 'શનિ'\r\n ],\r\n months: [\r\n 'જાન્યુઆરી',\r\n 'ફેબ્રુઆરી',\r\n 'માર્ચ',\r\n 'એપ્રિલ',\r\n 'મે',\r\n 'જૂન',\r\n 'જુલાઈ',\r\n 'ઑગસ્ટ',\r\n 'સપ્ટેમ્બર',\r\n 'ઑક્ટ્બર',\r\n 'નવેમ્બર',\r\n 'ડિસેમ્બર'\r\n ]\r\n },\r\n or: { // Oriya\r\n today: 'ଆଜି',\r\n days: [\r\n 'ରବି.',\r\n 'ସୋମ.',\r\n 'ମଙ୍ଗଳ.',\r\n 'ବୁଧ.',\r\n 'ଗୁରୁ.',\r\n 'ଶୁକ୍ର.',\r\n 'ଶନି.'\r\n ],\r\n months: [\r\n 'ଜାନୁୟାରୀ',\r\n 'ଫ୍ରେବୃୟାରୀ',\r\n 'ମାର୍ଚ୍ଚ',\r\n 'ଏପ୍ରିଲ୍‌',\r\n 'ମେ',\r\n 'ଜୁନ୍‌',\r\n 'ଜୁଲାଇ',\r\n 'ଅଗଷ୍ଟ',\r\n 'ସେପ୍ଟେମ୍ବର',\r\n 'ଅକ୍ଟୋବର',\r\n 'ନଭେମ୍ବର',\r\n '(ଡିସେମ୍ବର'\r\n ]\r\n },\r\n ta: { // Tamil\r\n today: 'இன்று',\r\n days: [\r\n 'ஞாயிறு',\r\n 'திங்கள்',\r\n 'செவ்வாய்',\r\n 'புதன்',\r\n 'வியாழன்',\r\n 'வெள்ளி',\r\n 'சனி'\r\n ],\r\n months: [\r\n 'ஜனவரி',\r\n 'பிப்ரவரி',\r\n 'மார்ச்',\r\n 'ஏப்ரல்',\r\n 'மே',\r\n 'ஜூன்',\r\n 'ஜூலை',\r\n 'ஆகஸ்ட்',\r\n 'செப்டம்பர்',\r\n 'அக்டோபர்',\r\n 'நவம்பர்',\r\n 'டிசம்பர்'\r\n ]\r\n },\r\n te: { // Telugu\r\n today: 'నేడు',\r\n days: [\r\n 'ఆది.',\r\n 'సోమ.',\r\n 'మంగళ.',\r\n 'బుధ.',\r\n 'గురు.',\r\n 'శుక్ర.',\r\n 'శని.'\r\n ],\r\n months: [\r\n 'జనవరి',\r\n 'ఫిబ్రవరి',\r\n 'మార్చి',\r\n 'ఏప్రిల్',\r\n 'మే',\r\n 'జూన్',\r\n 'జూలై',\r\n 'ఆగస్టు',\r\n 'సెప్టెంబర్',\r\n 'అక్టోబర్',\r\n 'నవంబర్',\r\n 'డిసెంబర్'\r\n ]\r\n },\r\n kn: { // Kannada\r\n today: 'ಇಂದು',\r\n days: [\r\n 'ಭಾನು.',\r\n 'ಸೋಮ.',\r\n 'ಮಂಗಳ.',\r\n 'ಬುಧ.',\r\n 'ಗುರು.',\r\n 'ಶುಕ್ರ.',\r\n 'ಶನಿ.'\r\n ],\r\n months: [\r\n 'ಜನವರಿ',\r\n 'ಫೆಬ್ರವರಿ',\r\n 'ಮಾರ್ಚ್',\r\n 'ಎಪ್ರಿಲ್',\r\n 'ಮೇ',\r\n 'ಜೂನ್',\r\n 'ಜುಲೈ',\r\n 'ಆಗಸ್ಟ್',\r\n 'ಸೆಪ್ಟಂಬರ್',\r\n 'ಅಕ್ಟೋಬರ್',\r\n 'ನವೆಂಬರ್',\r\n 'ಡಿಸೆಂಬರ್'\r\n ]\r\n },\r\n ml: { // Malayalam\r\n today: 'ഇന്ന്',\r\n days: [\r\n 'ഞായർ.',\r\n 'തിങ്കൾ.',\r\n 'ചൊവ്വ.',\r\n 'ബുധൻ.',\r\n 'വ്യാഴം.',\r\n 'വെള്ളി.',\r\n 'ശനി.'\r\n ],\r\n months: [\r\n 'ജനുവരി',\r\n 'ഫെബ്റുവരി',\r\n 'മാറ്ച്ച്',\r\n 'ഏപ്റില്',\r\n 'മെയ്',\r\n 'ജൂണ്',\r\n 'ജൂലൈ',\r\n 'ഓഗസ്ററ്',\r\n 'സെപ്ററംബറ്',\r\n 'ഒക്ടോബറ്',\r\n 'നവംബറ്',\r\n 'ഡിസംബറ്'\r\n ]\r\n },\r\n as: { // Assamese\r\n today: 'আজি',\r\n days: [\r\n 'সোম.',\r\n 'মঙ্গল.',\r\n 'বুধ.',\r\n 'বৃহ.',\r\n 'শুক্র.',\r\n 'শনি.',\r\n 'ৰবি.'\r\n ],\r\n months: [\r\n 'জানুৱাৰী',\r\n 'ফেব্রুৱাৰী',\r\n 'মার্চ',\r\n 'এপ্রিল',\r\n 'মে',\r\n 'জুন',\r\n 'জুলাই',\r\n 'আগষ্ট',\r\n 'চেপ্টেম্বর',\r\n 'অক্টোবর',\r\n 'নবেম্বর',\r\n 'ডিচেম্বর'\r\n ]\r\n },\r\n mr: { // Marathi\r\n today: 'आज',\r\n days: [\r\n 'रवि.',\r\n 'सोम.',\r\n 'मंगळ.',\r\n 'बुध.',\r\n 'गुरु.',\r\n 'शुक्र.',\r\n 'शनि.'\r\n ],\r\n months: [\r\n 'जानेवारी',\r\n 'फेब्रुवारी',\r\n 'मार्च',\r\n 'एप्रिल',\r\n 'मे',\r\n 'जून',\r\n 'जुलै',\r\n 'ऑगस्ट',\r\n 'सप्टेंबर',\r\n 'ऑक्टोबर',\r\n 'नोव्हेंबर',\r\n 'डिसेंबर'\r\n ]\r\n },\r\n sa: { // Sanskrit\r\n today: 'अद्य',\r\n days: [\r\n 'रविवासरः',\r\n 'सोमवासरः',\r\n 'मङ्गलवासरः',\r\n 'बुधवासरः',\r\n 'गुरुवासरः',\r\n 'शुक्रवासरः',\r\n 'शनिवासरः'\r\n ],\r\n months: [\r\n 'जनवरी',\r\n 'फरवरी',\r\n 'मार्च',\r\n 'अप्रैल',\r\n 'मई',\r\n 'जून',\r\n 'जुलाई',\r\n 'अगस्त',\r\n 'सितम्बर',\r\n 'अक्तूबर',\r\n 'नवम्बर',\r\n 'दिसम्बर'\r\n ]\r\n },\r\n mn: { // Mongolian\r\n today: 'өнөөдөр',\r\n days: [\r\n 'Ня',\r\n 'Да',\r\n 'Мя',\r\n 'Лх',\r\n 'Пү',\r\n 'Ба',\r\n 'Бя'\r\n ],\r\n months: [\r\n '1 дүгээр сар',\r\n '2 дугаар сар',\r\n '3 дугаар сар',\r\n '4 дүгээр сар',\r\n '5 дугаар сар',\r\n '6 дугаар сар',\r\n '7 дугаар сар',\r\n '8 дугаар сар',\r\n '9 дүгээр сар',\r\n '10 дугаар сар',\r\n '11 дүгээр сар',\r\n '12 дугаар сар'\r\n ]\r\n },\r\n bo: { // Tibetan\r\n today: 'ད་རིང',\r\n days: [\r\n 'ཉི་མ།',\r\n 'ཟླ་བ།',\r\n 'མིག་དམར།',\r\n 'ལྷག་པ།',\r\n 'ཕུར་བུ།',\r\n 'པ་སངས།',\r\n 'སྤེན་པ།'\r\n ],\r\n months: [\r\n 'སྤྱི་ཟླ་དང་པོ།',\r\n 'སྤྱི་ཟླ་གཉིས་པ།',\r\n 'སྤྱི་ཟླ་གསུམ་པ།',\r\n 'སྤྱི་ཟླ་བཞི་པ།',\r\n 'སྤྱི་ཟླ་ལྔ་པ།',\r\n 'སྤྱི་ཟླ་དྲུག་པ།',\r\n 'སྤྱི་ཟླ་བདུན་པ།',\r\n 'སྤྱི་ཟླ་བརྒྱད་པ།',\r\n 'སྤྱི་ཟླ་དགུ་པ།',\r\n 'སྤྱི་ཟླ་བཅུ་པོ།',\r\n 'སྤྱི་ཟླ་བཅུ་གཅིག་པ།',\r\n 'སྤྱི་ཟླ་བཅུ་གཉིས་པ།'\r\n ]\r\n },\r\n cy: { // Welsh\r\n today: 'heddiw',\r\n days: [\r\n 'Sul',\r\n 'Llun',\r\n 'Maw',\r\n 'Mer',\r\n 'Iau',\r\n 'Gwe',\r\n 'Sad'\r\n ],\r\n months: [\r\n 'Ionawr',\r\n 'Chwefror',\r\n 'Mawrth',\r\n 'Ebrill',\r\n 'Mai',\r\n 'Mehefin',\r\n 'Gorffennaf',\r\n 'Awst',\r\n 'Medi',\r\n 'Hydref',\r\n 'Tachwedd',\r\n 'Rhagfyr'\r\n ]\r\n },\r\n km: { // Khmer\r\n today: 'ថ្ងៃនេះ',\r\n days: [\r\n 'អាទិ.',\r\n 'ច.',\r\n 'អ.',\r\n 'ពុ',\r\n 'ព្រហ.',\r\n 'សុ.',\r\n 'ស.'\r\n ],\r\n months: [\r\n 'មករា',\r\n 'កុម្ភៈ',\r\n 'មិនា',\r\n 'មេសា',\r\n 'ឧសភា',\r\n 'មិថុនា',\r\n 'កក្កដា',\r\n 'សីហា',\r\n 'កញ្ញា',\r\n 'តុលា',\r\n 'វិច្ឆិកា',\r\n 'ធ្នូ'\r\n ]\r\n },\r\n lo: { // Lao\r\n today: 'ໃນມື້ນີ້',\r\n days: [\r\n 'ອາທິດ',\r\n 'ຈັນ',\r\n 'ອັງຄານ',\r\n 'ພຸດ',\r\n 'ພະຫັດ',\r\n 'ສຸກ',\r\n 'ເສົາ'\r\n ],\r\n months: [\r\n 'ມັງກອນ',\r\n 'ກຸມພາ',\r\n 'ມີນາ',\r\n 'ເມສາ',\r\n 'ພຶດສະພາ',\r\n 'ມິຖຸນາ',\r\n 'ກໍລະກົດ',\r\n 'ສິງຫາ',\r\n 'ກັນຍາ',\r\n 'ຕຸລາ',\r\n 'ພະຈິກ',\r\n 'ທັນວາ'\r\n ]\r\n },\r\n gl: { // Galician\r\n today: 'hoxe',\r\n days: [\r\n 'dom',\r\n 'luns',\r\n 'mar',\r\n 'mér',\r\n 'xov',\r\n 'ven',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'xaneiro',\r\n 'febreiro',\r\n 'marzo',\r\n 'abril',\r\n 'maio',\r\n 'xuño',\r\n 'xullo',\r\n 'agosto',\r\n 'setembro',\r\n 'outubro',\r\n 'novembro',\r\n 'decembro'\r\n ]\r\n },\r\n kok: { // Konkani\r\n today: 'आजि',\r\n days: [\r\n 'आय.',\r\n 'सोम.',\r\n 'मंगळ.',\r\n 'बुध.',\r\n 'बिरे.',\r\n 'सुक्र.',\r\n 'शेन.'\r\n ],\r\n months: [\r\n 'जानेवारी',\r\n 'फेब्रुवारी',\r\n 'मार्च',\r\n 'एप्रिल',\r\n 'मे',\r\n 'जून',\r\n 'जुलै',\r\n 'ऑगस्ट',\r\n 'सप्टेंबर',\r\n 'ऑक्टोबर',\r\n 'नोवेम्बर',\r\n 'डिसेंबर'\r\n ]\r\n },\r\n syr: { // Syriac\r\n today: 'ܝܘܡܐ',\r\n days: [\r\n '܏ܐ ܏ܒܫ',\r\n '܏ܒ ܏ܒܫ',\r\n '܏ܓ ܏ܒܫ',\r\n '܏ܕ ܏ܒܫ',\r\n '܏ܗ ܏ܒܫ',\r\n '܏ܥܪܘܒ',\r\n '܏ܫܒ'\r\n ],\r\n months: [\r\n 'ܟܢܘܢ ܐܚܪܝ',\r\n 'ܫܒܛ',\r\n 'ܐܕܪ',\r\n 'ܢܝܣܢ',\r\n 'ܐܝܪ',\r\n 'ܚܙܝܪܢ',\r\n 'ܬܡܘܙ',\r\n 'ܐܒ',\r\n 'ܐܝܠܘܠ',\r\n 'ܬܫܪܝ ܩܕܝܡ',\r\n 'ܬܫܪܝ ܐܚܪܝ',\r\n 'ܟܢܘܢ ܩܕܝܡ'\r\n ]\r\n },\r\n si: { // Sinhala\r\n today: 'අද',\r\n days: [\r\n 'ඉරිදා',\r\n 'සඳුදා',\r\n 'කුජදා',\r\n 'බුදදා',\r\n 'ගුරුදා',\r\n 'කිවිදා',\r\n 'ශනිදා'\r\n ],\r\n months: [\r\n 'ජනවාරි',\r\n 'පෙබරවාරි',\r\n 'මාර්තු',\r\n 'අ‌ප්‍රේල්',\r\n 'මැයි',\r\n 'ජූනි',\r\n 'ජූලි',\r\n 'අ‌ගෝස්තු',\r\n 'සැප්තැම්බර්',\r\n 'ඔක්තෝබර්',\r\n 'නොවැම්බර්',\r\n 'දෙසැම්බර්'\r\n ]\r\n },\r\n iu: { // Inuktitut\r\n today: 'ullumi',\r\n days: [\r\n 'Nat',\r\n 'Nag',\r\n 'Aip',\r\n 'Pi',\r\n 'Sit',\r\n 'Tal',\r\n 'Siv'\r\n ],\r\n months: [\r\n 'Jaannuari',\r\n 'Viivvuari',\r\n 'Maatsi',\r\n 'Iipuri',\r\n 'Mai',\r\n 'Juuni',\r\n 'Julai',\r\n 'Aaggiisi',\r\n 'Sitipiri',\r\n 'Utupiri',\r\n 'Nuvipiri',\r\n 'Tisipiri'\r\n ]\r\n },\r\n am: { // Amharic\r\n today: 'ዛሬ',\r\n days: [\r\n 'እሑድ',\r\n 'ሰኞ',\r\n 'ማክሰ',\r\n 'ረቡዕ',\r\n 'ሐሙስ',\r\n 'ዓርብ',\r\n 'ቅዳሜ'\r\n ],\r\n months: [\r\n 'ጃንዩወሪ',\r\n 'ፌብሩወሪ',\r\n 'ማርች',\r\n 'ኤፕረል',\r\n 'ሜይ',\r\n 'ጁን',\r\n 'ጁላይ',\r\n 'ኦገስት',\r\n 'ሴፕቴምበር',\r\n 'ኦክተውበር',\r\n 'ኖቬምበር',\r\n 'ዲሴምበር'\r\n ]\r\n },\r\n tzm: { // Tamazight\r\n today: 'assa',\r\n days: [\r\n 'Ace',\r\n 'Ari',\r\n 'Ara',\r\n 'Aha',\r\n 'Amh',\r\n 'Sem',\r\n 'Sed'\r\n ],\r\n months: [\r\n 'Yenayer',\r\n 'Furar',\r\n 'Maghres',\r\n 'Yebrir',\r\n 'Mayu',\r\n 'Yunyu',\r\n 'Yulyu',\r\n 'Ghuct',\r\n 'Cutenber',\r\n 'Ktuber',\r\n 'Wambir',\r\n 'Dujanbir'\r\n ]\r\n },\r\n ne: { // Nepali\r\n today: 'आज',\r\n days: [\r\n 'आइत',\r\n 'सोम',\r\n 'मङ्गल',\r\n 'बुध',\r\n 'बिही',\r\n 'शुक्र',\r\n 'शनि'\r\n ],\r\n months: [\r\n 'जनवरी',\r\n 'फेब्रुअरी',\r\n 'मार्च',\r\n 'अप्रिल',\r\n 'मे',\r\n 'जून',\r\n 'जुलाई',\r\n 'अगस्त',\r\n 'सेप्टेम्बर',\r\n 'अक्टोबर',\r\n 'नोभेम्बर',\r\n 'डिसेम्बर'\r\n ]\r\n },\r\n fy: { // Frisian\r\n today: 'hjoed',\r\n days: [\r\n 'Sn',\r\n 'Mo',\r\n 'Ti',\r\n 'Wo',\r\n 'To',\r\n 'Fr',\r\n 'Sn'\r\n ],\r\n months: [\r\n 'jannewaris',\r\n 'febrewaris',\r\n 'maart',\r\n 'april',\r\n 'maaie',\r\n 'juny',\r\n 'july',\r\n 'augustus',\r\n 'septimber',\r\n 'oktober',\r\n 'novimber',\r\n 'desimber'\r\n ]\r\n },\r\n ps: { // Pashto\r\n today: 'نن ورځ',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'محرم',\r\n 'صفر',\r\n 'ربيع الأول',\r\n 'ربيع الثاني',\r\n 'جمادى الأولى',\r\n 'جمادى الثانية',\r\n 'رجب',\r\n 'شعبان',\r\n 'رمضان',\r\n 'شوال',\r\n 'ذو القعدة',\r\n 'ذو الحجة'\r\n ]\r\n },\r\n fil: { // Filipino\r\n today: 'ngayon',\r\n days: [\r\n 'Lin',\r\n 'Lun',\r\n 'Mar',\r\n 'Mier',\r\n 'Hueb',\r\n 'Bier',\r\n 'Saba'\r\n ],\r\n months: [\r\n 'Enero',\r\n 'Pebrero',\r\n 'Marso',\r\n 'Abril',\r\n 'Mayo',\r\n 'Hunyo',\r\n 'Hulyo',\r\n 'Agosto',\r\n 'Septyembre',\r\n 'Oktubre',\r\n 'Nobyembre',\r\n 'Disyembre'\r\n ]\r\n },\r\n dv: { // Divehi\r\n today: 'މިއަދު',\r\n days: [\r\n 'އާދީއްތަ',\r\n 'ހޯމަ',\r\n 'އަންގާރަ',\r\n 'ބުދަ',\r\n 'ބުރާސްފަތި',\r\n 'ހުކުރު',\r\n 'ހޮނިހިރު'\r\n ],\r\n months: [\r\n 'މުޙައްރަމް',\r\n 'ޞަފަރު',\r\n 'ރަބީޢުލްއައްވަލް',\r\n 'ރަބީޢުލްއާޚިރު',\r\n 'ޖުމާދަލްއޫލާ',\r\n 'ޖުމާދަލްއާޚިރާ',\r\n 'ރަޖަބް',\r\n 'ޝަޢްބާން',\r\n 'ރަމަޟާން',\r\n 'ޝައްވާލް',\r\n 'ޛުލްޤަޢިދާ',\r\n 'ޛުލްޙިއްޖާ'\r\n ]\r\n },\r\n ha: { // Hausa\r\n today: 'yau',\r\n days: [\r\n 'Lah',\r\n 'Lit',\r\n 'Tal',\r\n 'Lar',\r\n 'Alh',\r\n 'Jum',\r\n 'Asa'\r\n ],\r\n months: [\r\n 'Januwaru',\r\n 'Febreru',\r\n 'Maris',\r\n 'Afrilu',\r\n 'Mayu',\r\n 'Yuni',\r\n 'Yuli',\r\n 'Agusta',\r\n 'Satumba',\r\n 'Oktocba',\r\n 'Nuwamba',\r\n 'Disamba'\r\n ]\r\n },\r\n yo: { // Yoruba\r\n today: 'loni',\r\n days: [\r\n 'Aik',\r\n 'Aje',\r\n 'Ise',\r\n 'Ojo',\r\n 'Ojo',\r\n 'Eti',\r\n 'Aba'\r\n ],\r\n months: [\r\n 'Osu kinni',\r\n 'Osu keji',\r\n 'Osu keta',\r\n 'Osu kerin',\r\n 'Osu karun',\r\n 'Osu kefa',\r\n 'Osu keje',\r\n 'Osu kejo',\r\n 'Osu kesan',\r\n 'Osu kewa',\r\n 'Osu kokanla',\r\n 'Osu keresi'\r\n ]\r\n },\r\n quz: { // Quechua\r\n today: 'kunan',\r\n days: [\r\n 'int',\r\n 'kil',\r\n 'ati',\r\n 'quy',\r\n 'Ch\\'',\r\n 'Ill',\r\n 'k\\'u'\r\n ],\r\n months: [\r\n 'Qulla puquy',\r\n 'Hatun puquy',\r\n 'Pauqar waray',\r\n 'ayriwa',\r\n 'Aymuray',\r\n 'Inti raymi',\r\n 'Anta Sitwa',\r\n 'Qhapaq Sitwa',\r\n 'Uma raymi',\r\n 'Kantaray',\r\n 'Ayamarq\\'a',\r\n 'Kapaq Raymi'\r\n ]\r\n },\r\n nso: { // Sesotho sa Leboa\r\n today: 'Lehono',\r\n days: [\r\n 'Lam',\r\n 'Moš',\r\n 'Lbb',\r\n 'Lbr',\r\n 'Lbn',\r\n 'Lbh',\r\n 'Mok'\r\n ],\r\n months: [\r\n 'Pherekgong',\r\n 'Hlakola',\r\n 'Mopitlo',\r\n 'Moranang',\r\n 'Mosegamanye',\r\n 'Ngoatobošego',\r\n 'Phuphu',\r\n 'Phato',\r\n 'Lewedi',\r\n 'Diphalana',\r\n 'Dibatsela',\r\n 'Manthole'\r\n ]\r\n },\r\n ba: { // Bashkir\r\n today: 'бөгөн',\r\n days: [\r\n 'Йш',\r\n 'Дш',\r\n 'Шш',\r\n 'Шр',\r\n 'Кс',\r\n 'Йм',\r\n 'Шб'\r\n ],\r\n months: [\r\n 'ғинуар',\r\n 'февраль',\r\n 'март',\r\n 'апрель',\r\n 'май',\r\n 'июнь',\r\n 'июль',\r\n 'август',\r\n 'сентябрь',\r\n 'октябрь',\r\n 'ноябрь',\r\n 'декабрь'\r\n ]\r\n },\r\n lb: { // Luxembourgish\r\n today: 'haut',\r\n days: [\r\n 'Son',\r\n 'Méi',\r\n 'Dën',\r\n 'Mët',\r\n 'Don',\r\n 'Fre',\r\n 'Sam'\r\n ],\r\n months: [\r\n 'Januar',\r\n 'Februar',\r\n 'Mäerz',\r\n 'Abrëll',\r\n 'Mee',\r\n 'Juni',\r\n 'Juli',\r\n 'August',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Dezember'\r\n ]\r\n },\r\n kl: { // Greenlandic\r\n today: 'ullumi',\r\n days: [\r\n 'sap',\r\n 'ata',\r\n 'mar',\r\n 'ping',\r\n 'sis',\r\n 'tal',\r\n 'arf'\r\n ],\r\n months: [\r\n 'januari',\r\n 'februari',\r\n 'martsi',\r\n 'apriili',\r\n 'maaji',\r\n 'juni',\r\n 'juli',\r\n 'aggusti',\r\n 'septembari',\r\n 'oktobari',\r\n 'novembari',\r\n 'decembari'\r\n ]\r\n },\r\n ig: { // Igbo\r\n today: 'taa',\r\n days: [\r\n 'Aik',\r\n 'Aje',\r\n 'Ise',\r\n 'Ojo',\r\n 'Ojo',\r\n 'Eti',\r\n 'Aba'\r\n ],\r\n months: [\r\n 'Onwa mbu',\r\n 'Onwa ibua',\r\n 'Onwa ato',\r\n 'Onwa ano',\r\n 'Onwa ise',\r\n 'Onwa isi',\r\n 'Onwa asa',\r\n 'Onwa asato',\r\n 'Onwa itolu',\r\n 'Onwa iri',\r\n 'Onwa iri n\\'ofu',\r\n 'Onwa iri n\\'ibua'\r\n ]\r\n },\r\n ii: { // Yi\r\n today: 'ꀃꑍ',\r\n days: [\r\n 'ꑭꆏ',\r\n 'ꆏ꒔',\r\n 'ꆏꑍ',\r\n 'ꆏꌕ',\r\n 'ꆏꇖ',\r\n 'ꆏꉬ',\r\n 'ꆏꃘ'\r\n ],\r\n months: [\r\n 'ꋍꆪ',\r\n 'ꑍꆪ',\r\n 'ꌕꆪ',\r\n 'ꇖꆪ',\r\n 'ꉬꆪ',\r\n 'ꃘꆪ',\r\n 'ꏃꆪ',\r\n 'ꉆꆪ',\r\n 'ꈬꆪ',\r\n 'ꊰꆪ',\r\n 'ꊯꊪꆪ',\r\n 'ꊰꑋꆪ'\r\n ]\r\n },\r\n arn: { // Mapudungun\r\n today: 'fachantü',\r\n days: [\r\n 'dom',\r\n 'lun',\r\n 'mar',\r\n 'mié',\r\n 'jue',\r\n 'vie',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'enero',\r\n 'febrero',\r\n 'marzo',\r\n 'abril',\r\n 'mayo',\r\n 'junio',\r\n 'julio',\r\n 'agosto',\r\n 'septiembre',\r\n 'octubre',\r\n 'noviembre',\r\n 'diciembre'\r\n ]\r\n },\r\n moh: { // Mohawk\r\n today: 'okàra',\r\n days: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Tsothohrkó:Wa',\r\n 'Enniska',\r\n 'Enniskó:Wa',\r\n 'Onerahtókha',\r\n 'Onerahtohkó:Wa',\r\n 'Ohiari:Ha',\r\n 'Ohiarihkó:Wa',\r\n 'Seskéha',\r\n 'Seskehkó:Wa',\r\n 'Kenténha',\r\n 'Kentenhkó:Wa',\r\n 'Tsothóhrha'\r\n ]\r\n },\r\n br: { // Breton\r\n today: 'hiziv',\r\n days: [\r\n 'Sul',\r\n 'Lun',\r\n 'Meu.',\r\n 'Mer.',\r\n 'Yaou',\r\n 'Gwe.',\r\n 'Sad.'\r\n ],\r\n months: [\r\n 'Genver',\r\n 'C\\'hwevrer',\r\n 'Meurzh',\r\n 'Ebrel',\r\n 'Mae',\r\n 'Mezheven',\r\n 'Gouere',\r\n 'Eost',\r\n 'Gwengolo',\r\n 'Here',\r\n 'Du',\r\n 'Kerzu'\r\n ]\r\n },\r\n ug: { // Uyghur\r\n today: 'bügün',\r\n days: [\r\n 'يە',\r\n 'دۈ',\r\n 'سە',\r\n 'چا',\r\n 'پە',\r\n 'جۈ',\r\n 'شە'\r\n ],\r\n months: [\r\n '1-ئاي',\r\n '2-ئاي',\r\n '3-ئاي',\r\n '4-ئاي',\r\n '5-ئاي',\r\n '6-ئاي',\r\n '7-ئاي',\r\n '8-ئاي',\r\n '9-ئاي',\r\n '10-ئاي',\r\n '11-ئاي',\r\n '12-ئاي'\r\n ]\r\n },\r\n mi: { // Maori\r\n today: 'i tenei ra',\r\n days: [\r\n 'Ta',\r\n 'Hi',\r\n 'Tū',\r\n 'Apa',\r\n 'Pa',\r\n 'Me',\r\n 'Ho'\r\n ],\r\n months: [\r\n 'Kohi-tātea',\r\n 'Hui-tanguru',\r\n 'Poutū-te-rangi',\r\n 'Paenga-whāwhā',\r\n 'Haratua',\r\n 'Pipiri',\r\n 'Hōngongoi',\r\n 'Here-turi-kōkā',\r\n 'Mahuru',\r\n 'Whiringa-ā-nuku',\r\n 'Whiringa-ā-rangi',\r\n 'Hakihea'\r\n ]\r\n },\r\n oc: { // Occitan\r\n today: 'uèi',\r\n days: [\r\n 'dim.',\r\n 'lun.',\r\n 'mar.',\r\n 'mèc.',\r\n 'jòu.',\r\n 'ven.',\r\n 'sab.'\r\n ],\r\n months: [\r\n 'genier',\r\n 'febrier',\r\n 'març',\r\n 'abril',\r\n 'mai',\r\n 'junh',\r\n 'julh',\r\n 'agost',\r\n 'setembre',\r\n 'octobre',\r\n 'novembre',\r\n 'desembre'\r\n ]\r\n },\r\n co: { // Corsican\r\n today: 'oghje',\r\n days: [\r\n 'dum.',\r\n 'lun.',\r\n 'mar.',\r\n 'mer.',\r\n 'ghj.',\r\n 'ven.',\r\n 'sab.'\r\n ],\r\n months: [\r\n 'ghjennaghju',\r\n 'ferraghju',\r\n 'marzu',\r\n 'aprile',\r\n 'maghju',\r\n 'ghjunghju',\r\n 'lugliu',\r\n 'aostu',\r\n 'settembre',\r\n 'ottobre',\r\n 'nuvembre',\r\n 'dicembre'\r\n ]\r\n },\r\n gsw: { // Alsatian\r\n today: 'heit',\r\n days: [\r\n 'Su.',\r\n 'Mo.',\r\n 'Di.',\r\n 'Mi.',\r\n 'Du.',\r\n 'Fr.',\r\n 'Sà.'\r\n ],\r\n months: [\r\n 'Jänner',\r\n 'Feverje',\r\n 'März',\r\n 'Àpril',\r\n 'Mai',\r\n 'Jüni',\r\n 'Jüli',\r\n 'Augscht',\r\n 'September',\r\n 'Oktower',\r\n 'Nowember',\r\n 'Dezember'\r\n ]\r\n },\r\n sah: { // Yakut\r\n today: 'bügün',\r\n days: [\r\n 'Бс',\r\n 'Бн',\r\n 'Оп',\r\n 'Ср',\r\n 'Чп',\r\n 'Бт',\r\n 'Сб'\r\n ],\r\n months: [\r\n 'Тохсунньу',\r\n 'Олунньу',\r\n 'Кулун тутар',\r\n 'Муус устар',\r\n 'Ыам ыйа',\r\n 'Бэс ыйа',\r\n 'От ыйа',\r\n 'Атырдьах ыйа',\r\n 'Балаҕан ыйа',\r\n 'Алтынньы',\r\n 'Сэтинньи',\r\n 'Ахсынньы'\r\n ]\r\n },\r\n qut: { // K'iche\r\n today: '[kamik]',\r\n days: [\r\n 'juq',\r\n 'kaq',\r\n 'oxq',\r\n 'kajq',\r\n 'joq',\r\n 'waqq',\r\n 'wuqq'\r\n ],\r\n months: [\r\n 'nab\\'e ik\\'',\r\n 'ukab\\' ik\\'',\r\n 'rox ik\\'',\r\n 'ukaj ik\\'',\r\n 'uro\\' ik\\'',\r\n 'uwaq ik\\'',\r\n 'uwuq ik\\'',\r\n 'uwajxaq ik\\'',\r\n 'ub\\'elej ik\\'',\r\n 'ulaj ik\\'',\r\n 'ujulaj ik\\'',\r\n 'ukab\\'laj ik\\''\r\n ]\r\n },\r\n rw: { // Kinyarwanda\r\n today: 'uyu munsi',\r\n days: [\r\n 'mbe.',\r\n 'kab.',\r\n 'gat.',\r\n 'kan.',\r\n 'gat.',\r\n 'gat.',\r\n 'cyu.'\r\n ],\r\n months: [\r\n 'Mutarama',\r\n 'Gashyantare',\r\n 'Werurwe',\r\n 'Mata',\r\n 'Gicurasi',\r\n 'Kamena',\r\n 'Nyakanga',\r\n 'Kanama',\r\n 'Nzeli',\r\n 'Ukwakira',\r\n 'Ugushyingo',\r\n 'Ukuboza'\r\n ]\r\n },\r\n wo: { // Wolof\r\n today: 'tey',\r\n days: [\r\n 'dim.',\r\n 'lun.',\r\n 'mar.',\r\n 'mer.',\r\n 'jeu.',\r\n 'ven.',\r\n 'sam.'\r\n ],\r\n months: [\r\n 'janvier',\r\n 'février',\r\n 'mars',\r\n 'avril',\r\n 'mai',\r\n 'juin',\r\n 'juillet',\r\n 'août',\r\n 'septembre',\r\n 'octobre',\r\n 'novembre',\r\n 'décembre'\r\n ]\r\n },\r\n prs: { // Dari\r\n today: 'امروز',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'محرم',\r\n 'صفر',\r\n 'ربيع الأول',\r\n 'ربيع الثاني',\r\n 'جمادى الأولى',\r\n 'جمادى الثانية',\r\n 'رجب',\r\n 'شعبان',\r\n 'رمضان',\r\n 'شوال',\r\n 'ذو القعدة',\r\n 'ذو الحجة'\r\n ]\r\n },\r\n gd: { // Scottish Gaelic\r\n today: 'an-diugh',\r\n days: [\r\n 'Dòm',\r\n 'Lua',\r\n 'Mài',\r\n 'Cia',\r\n 'Ard',\r\n 'Hao',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Am Faoilleach',\r\n 'An Gearran',\r\n 'Am Màrt',\r\n 'An Giblean',\r\n 'An Cèitean',\r\n 'An t-Ògmhios',\r\n 'An t-Iuchar',\r\n 'An Lùnastal',\r\n 'An t-Sultain',\r\n 'An Dàmhair',\r\n 'An t-Samhain',\r\n 'An Dùbhlachd'\r\n ]\r\n },\r\n smn: { // Sami (Inari)\r\n today: 'onne',\r\n days: [\r\n 'pa',\r\n 'vu',\r\n 'ma',\r\n 'ko',\r\n 'tu',\r\n 'vá',\r\n 'lá'\r\n ],\r\n months: [\r\n 'uđđâivemáánu',\r\n 'kuovâmáánu',\r\n 'njuhčâmáánu',\r\n 'cuáŋuimáánu',\r\n 'vyesimáánu',\r\n 'kesimáánu',\r\n 'syeinimáánu',\r\n 'porgemáánu',\r\n 'čohčâmáánu',\r\n 'roovvâdmáánu',\r\n 'skammâmáánu',\r\n 'juovlâmáánu'\r\n ]\r\n },\r\n sms: { // Sami (Skolt)\r\n today: 'pei ́vv',\r\n days: [\r\n 'pâ',\r\n 'vu',\r\n 'mâ',\r\n 'se',\r\n 'ne',\r\n 'pi',\r\n 'su'\r\n ],\r\n months: [\r\n 'ođđee´jjmään',\r\n 'tä´lvvmään',\r\n 'pâ´zzlâšttammään',\r\n 'njuhččmään',\r\n 'vue´ssmään',\r\n 'ǩie´ssmään',\r\n 'suei´nnmään',\r\n 'på´rǧǧmään',\r\n 'čõhččmään',\r\n 'kålggmään',\r\n 'skamm´mään',\r\n 'rosttovmään'\r\n ]\r\n },\r\n zh: { // Simplified Chinese \r\n days: [\r\n '星期天',\r\n '星期一',\r\n '星期二',\r\n '星期三',\r\n '星期四',\r\n '星期五',\r\n '星期六'\r\n ],\r\n months: [\r\n '一月',\r\n '二月',\r\n '三月',\r\n '四月',\r\n '五月',\r\n '六月',\r\n '七月',\r\n '八月',\r\n '九月',\r\n '十月',\r\n '十一月',\r\n '十二月'\r\n ],\r\n today: '今天',\r\n },\r\n 'zh-hans': { //Simplified Chinese, informal\r\n days: [\r\n '周日',\r\n '周一',\r\n '周二',\r\n '周三',\r\n '周四',\r\n '周五',\r\n '周六'\r\n ],\r\n months: [\r\n '一月',\r\n '二月',\r\n '三月',\r\n '四月',\r\n '五月',\r\n '六月',\r\n '七月',\r\n '八月',\r\n '九月',\r\n '十月',\r\n '十一月',\r\n '十二月'\r\n ],\r\n today: '今天',\r\n },\r\n 'zh-hant': { // Traditional Chinese\r\n days: [\r\n '週日',\r\n '週一',\r\n '週二',\r\n '週三',\r\n '週四',\r\n '週五',\r\n '週六'\r\n ],\r\n months: [\r\n '一月',\r\n '二月',\r\n '三月',\r\n '四月',\r\n '五月',\r\n '六月',\r\n '七月',\r\n '八月',\r\n '九月',\r\n '十月',\r\n '十一月',\r\n '十二月'\r\n ],\r\n today: '今天',\r\n },\r\n nn: { // Norwegian (Nynorsk)\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'må',\r\n 'ty',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'la'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'april',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n bs: { // Bosnian\r\n today: 'danas',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'uto',\r\n 'sri',\r\n 'čet',\r\n 'pet',\r\n 'sub'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mart',\r\n 'april',\r\n 'maj',\r\n 'juni',\r\n 'juli',\r\n 'avgust',\r\n 'septembar',\r\n 'oktobar',\r\n 'novembar',\r\n 'decembar'\r\n ]\r\n },\r\n sma: { // Sami (Southern)\r\n today: 'daenbiejjien',\r\n days: [\r\n 'aej',\r\n 'måa',\r\n 'dæj',\r\n 'gask',\r\n 'duar',\r\n 'bearj',\r\n 'laav'\r\n ],\r\n months: [\r\n 'tsïengele',\r\n 'goevte',\r\n 'njoktje',\r\n 'voerhtje',\r\n 'suehpede',\r\n 'ruffie',\r\n 'snjaltje',\r\n 'mïetske',\r\n 'skïerede',\r\n 'golke',\r\n 'rahka',\r\n 'goeve'\r\n ]\r\n },\r\n nb: { // Norwegian (Bokmål)\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'ma',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lø'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'april',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n sr: { // Serbian\r\n today: 'данас',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'uto',\r\n 'sre',\r\n 'čet',\r\n 'pet',\r\n 'sub'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mart',\r\n 'april',\r\n 'maj',\r\n 'jun',\r\n 'jul',\r\n 'avgust',\r\n 'septembar',\r\n 'oktobar',\r\n 'novembar',\r\n 'decembar'\r\n ]\r\n },\r\n dsb: { // Lower Sorbian\r\n today: 'źinsa',\r\n days: [\r\n 'nje',\r\n 'pon',\r\n 'wał',\r\n 'srj',\r\n 'stw',\r\n 'pět',\r\n 'sob'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'měrc',\r\n 'apryl',\r\n 'maj',\r\n 'junij',\r\n 'julij',\r\n 'awgust',\r\n 'september',\r\n 'oktober',\r\n 'nowember',\r\n 'december'\r\n ]\r\n },\r\n smj: { // Sami (Lule)\r\n today: 'uddni',\r\n days: [\r\n 'ájl',\r\n 'mán',\r\n 'dis',\r\n 'gas',\r\n 'duor',\r\n 'bier',\r\n 'láv'\r\n ],\r\n months: [\r\n 'ådåjakmánno',\r\n 'guovvamánno',\r\n 'sjnjuktjamánno',\r\n 'vuoratjismánno',\r\n 'moarmesmánno',\r\n 'biehtsemánno',\r\n 'sjnjilltjamánno',\r\n 'bårggemánno',\r\n 'ragátmánno',\r\n 'gålgådismánno',\r\n 'basádismánno',\r\n 'javllamánno'\r\n ]\r\n }\r\n };\r\n}","export class LookupResult {\r\n constructor(keySelector) {\r\n this._dict = {};\r\n this._keySelector = keySelector;\r\n }\r\n\r\n add(el) {\r\n const res = this._keySelector(el); // should potentially wrap in String()\r\n if (Object.prototype.hasOwnProperty.call(this._dict, res)) {\r\n this._dict[res].push(el);\r\n } else {\r\n this._dict[res] = [el];\r\n }\r\n }\r\n\r\n get(key) {\r\n return this._dict[key] || []; // should potentially slice to create new array\r\n }\r\n}","import Picker from './picker.js';\r\nimport { getLanguageInfo } from './languages.js';\r\nimport { pickerAppliedAttr } from './find-inputs-helper.js';\r\nimport { dateInputIsSupported } from './date-input-is-supported.js';\r\nimport { LookupResult } from './lookup-result.js';\r\nimport {closestWithProp} from './closest-with-prop.js';\r\n\r\nconst validIsoDateRx = /^\\d{4}-\\d{2}-\\d{2}$/;\r\n\r\nexport default class Input {\r\n constructor(input) {\r\n this.element = input;\r\n this.element.setAttribute(pickerAppliedAttr, '');\r\n this.element.setAttribute('autocomplete', 'off'); // otherwise autocomplete suggestion hides date picker\r\n if (dateInputIsSupported) {\r\n // this wil both prevent the native datepicker displaying AND allow asigning a value attribute which is not ISO8601 compliant\r\n this.element.type = 'date-polyfill';\r\n // this.element.addEventListener('click', preventDefault);\r\n }\r\n\r\n this.setLocaleText(closestWithProp(this.element, 'lang'));\r\n if (!this.element.placeholder) {\r\n this.element.placeholder = this.localeText.format.replace('M', 'mm').replace('D', 'dd').replace('Y', 'yyyy');\r\n }\r\n this.element.pattern = this.localeText.parser.pattern;\r\n let valuePropDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.element), 'value');\r\n if (valuePropDescriptor === null) {\r\n valuePropDescriptor = { get:() => this.element.getAttribute('value') || '', set:(value) => this.element.setAttribute('value', value) };\r\n console.log('esm-date-input-polyfill: unable to obtain native input[type=date] .value propertyDescriptor');\r\n }\r\n Object.defineProperties(\r\n this.element,\r\n {\r\n 'textValue': {\r\n get: valuePropDescriptor.get,\r\n set: valuePropDescriptor.set\r\n },\r\n 'value': {\r\n get: ()=> this.element._datePolyfillVal\r\n ? new Date(this.element._datePolyfillVal).toISOString().slice(0,10)\r\n : '',\r\n set: val=> this.element.valueAsDate = (val && validIsoDateRx.test(val))\r\n ? new Date(val)\r\n : null,\r\n },\r\n 'valueAsDate': {\r\n get:() => this.element._datePolyfillVal\r\n ? new Date(this.element._datePolyfillVal)\r\n : null,\r\n set:(val) => {\r\n if (val && val.getTime && !Number.isNaN(this.element._datePolyfillVal = val.getTime())) {\r\n this.element.textValue = this.toLocaleDateString(val);\r\n } else {\r\n this.element.textValue = '';\r\n this.element._datePolyfillVal = void 0;\r\n }\r\n this.validate();\r\n }\r\n },\r\n 'valueAsNumber': {\r\n get: ()=> this.element._datePolyfillVal === void 0\r\n ? NaN\r\n : this.element._datePolyfillVal,\r\n set: val=> this.element.valueAsDate = new Date(val),\r\n },\r\n 'min': {\r\n get: ()=> this.element.getAttribute('min'),\r\n set: val=> validIsoDateRx.test(val)\r\n ? this.element.setAttribute('min', val)\r\n : this.element.removeAttribute('min'),\r\n },\r\n 'max': {\r\n get: ()=> this.element.getAttribute('max'),\r\n set: val=> validIsoDateRx.test(val)\r\n ? this.element.setAttribute('max', val)\r\n : this.element.removeAttribute('max'),\r\n }\r\n }\r\n );\r\n\r\n // Initialize value for display.\r\n if (!this.element.setCustomValidity) {\r\n console.log('HTMLElement.setCustomValidity not supported');\r\n this.element.setCustomValidity = () => void 0;\r\n }\r\n this.element.value = this.element.getAttribute('value');\r\n\r\n\r\n // Open the picker when the input get focus,\r\n // also on various click events to capture it in all corner cases.\r\n const showPicker = ()=> Picker.instance.attachTo(this);\r\n const passiveOpt = { passive: true };\r\n this.element.addEventListener('focus', showPicker, passiveOpt);\r\n this.element.addEventListener('mousedown', showPicker, passiveOpt);\r\n this.element.addEventListener('mouseup', showPicker, passiveOpt);\r\n\r\n // Update the picker if the date changed manually in the input.\r\n this.element.addEventListener('keydown', e=> {\r\n let beginValue = this.element.valueAsDate;\r\n let requirePing = true;\r\n let requireParse = false;\r\n switch(e.keyCode) {\r\n case 9:\r\n case 13:\r\n case 27:\r\n Picker.instance.hide();\r\n requirePing = false;\r\n break;\r\n case 38:\r\n if (beginValue === null) { beginValue = new Date(); }\r\n beginValue.setDate(beginValue.getDate() + 1);\r\n this.element.valueAsDate = beginValue;\r\n break;\r\n case 40:\r\n if (beginValue === null) { beginValue = new Date(); }\r\n beginValue.setDate(beginValue.getDate() - 1);\r\n this.element.valueAsDate = beginValue;\r\n break;\r\n default:\r\n requireParse = true;\r\n }\r\n if (requirePing) {\r\n if (requireParse) {\r\n const self = this;\r\n setTimeout(() => {\r\n const parseDt = self.localeText.parser.parse(self.element.textValue);\r\n if (parseDt) {\r\n parseDt.setTime(parseDt.getTime() - parseDt.getTimezoneOffset() * 60000);\r\n }\r\n if (+parseDt !== +self.element.valueAsDate) {\r\n self.element.valueAsDate = parseDt;\r\n Picker.instance.pingInput();\r\n Picker.instance.sync();\r\n }\r\n }, 1);\r\n } else {\r\n Picker.instance.pingInput();\r\n Picker.instance.sync();\r\n }\r\n }\r\n }, passiveOpt);\r\n }\r\n\r\n validate() {\r\n if (this.element._datePolyfillVal) {\r\n let minDate = new Date(this.element.min || NaN);\r\n let maxDate = new Date(this.element.max || NaN);\r\n if (this.element._datePolyfillVal < minDate.getTime()) {\r\n this.element.setCustomValidity('≥ ' + this.toLocaleDateString(minDate));\r\n return false;\r\n } else if (this.element._datePolyfillVal > maxDate.getTime()) {\r\n this.element.setCustomValidity('≤ ' + this.toLocaleDateString(maxDate));\r\n return false;\r\n }\r\n }\r\n this.element.setCustomValidity('');\r\n return true;\r\n }\r\n\r\n setLocaleText(elementLang) {\r\n let preferredLocales = (window.navigator.languages\r\n ? window.navigator.languages\r\n : [ window.navigator.userLanguage || window.navigator.language ]).map((l) => l.toLowerCase());\r\n \r\n if (elementLang) {\r\n // trying to emmulate what a native browser might/should do - 1 thing for certain is if the language is not installed on the browser it will not be used\r\n elementLang = elementLang.match(/^[a-z]+/)[0].toLowerCase();\r\n const matchesElLang = new LookupResult((l) => l.startsWith(elementLang));\r\n preferredLocales.forEach((l) => matchesElLang.add(l));\r\n preferredLocales = matchesElLang.get(true).concat(matchesElLang.get(false));\r\n }\r\n\r\n const li = getLanguageInfo(preferredLocales);\r\n\r\n this.locale = li.locale;\r\n this.localeText = li;\r\n }\r\n\r\n toLocaleDateString(dt) {\r\n const ymd = dt.toISOString().slice(0,10).split('-');\r\n return this.localeText.format\r\n .replace('Y', ymd[0])\r\n .replace('M', ymd[1])\r\n .replace('D', ymd[2]);\r\n }\r\n}\r\n","// IE11 does not support HTMLElement.closest property. Using this instead.\r\nexport function closestWithProp(el, propName) {\r\n do {\r\n if (propName in el) {\r\n return el[propName];\r\n }\r\n el = el.parentElement || el.parentNode;\r\n } while (el !== null && el.nodeType === 1);\r\n return null;\r\n}\r\n\r\n","import Picker from './picker.js';\r\nimport Input from './input.js';\r\nimport { FindInputsHelper } from './find-inputs-helper.js';\r\n\r\nexport function addPickers({ watchForInsert = false, allowForcePicker = false, yrsBack = 80, yrsFwd = 20 } = {}) {\r\n Picker.instance = new Picker({yrsBack, yrsFwd});\r\n const findHelper = new FindInputsHelper({ allowForcePicker });\r\n // Get and loop all the input[type=\"date\"]s in the page that do not have `[data-has-picker]` yet.\r\n findHelper.getAllInputsForPolyfilling().forEach((di) => new Input(di));\r\n if (watchForInsert) {\r\n const observer = new MutationObserver((mutations) => \r\n mutations.forEach((m) => {\r\n if(m.type === 'childList') {\r\n m.addedNodes.forEach((el) => {\r\n if (el.nodeType === Node.ELEMENT_NODE) {\r\n // [el, ...el.querySelectorAll('input[type=date]')] should do, but some problem with transpilling\r\n // firefox fine with same transpile, but IE somehow tries to implement es.string.iterator rather than nodelist!\r\n const nodes = Array.from(el.querySelectorAll('input[type=date]'));\r\n nodes.push(el);\r\n nodes.forEach((inpt) => {\r\n if (findHelper.requiresPolyfilling(inpt)) {\r\n new Input(inpt);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n })\r\n );\r\n const observe = () => observer.observe(document.body, {\r\n childList: true,\r\n attributes: false,\r\n subtree: true,\r\n });\r\n Picker.instance.onBeforeOpen(() => {\r\n observer.disconnect();\r\n setTimeout(observe, 100);\r\n });\r\n observe();\r\n // call `observe` on that MutationObserver instance, \r\n // passing it the element to observe, and the options object\r\n\r\n\r\n // this might not be the best way to handle this as it will not add placeholder until clicked\r\n /*\r\n document.body.addEventListener('mousedown', (evt)=> {\r\n if (findHelper.requiresPolyfilling(evt.target)) {\r\n return new Input(evt.target);\r\n }\r\n }, { passive: true });\r\n */\r\n }\r\n}"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Picker","[object Object]","yrsBack","yrsFwd","instance","passiveOpt","passive","this","date","Date","input","isOpen","_onBeforeOpen","container","year","createRangeSelect","getFullYear","className","addEventListener","setYear","value","refreshDaysMatrix","month","setMonth","today","textContent","setInput","daysMatrix","daysHead","days","e","tgt","target","classList","contains","curSel","querySelector","remove","add","setDate","parseInt","hide","body","el","isPicker","parentNode","attr","getAttribute","setAttribute","forEach","fn","push","element","rekt","getBoundingClientRect","top","height","documentElement","scrollTop","left","scrollLeft","show","sync","goto","valueAsDate","utcDateToLocal","getMonth","String","padStart","getDate","focus","setTimeout","pingInput","locale","daysHeadHTML","i","len","localeText","length","innerHTML","join","months","refreshLocale","startDate","startDay","getDay","daysInMonth","selDate","selMatrix","minStr","min","minTime","getTime","maxStr","max","maxTime","currentDate","setHours","currentTime","matrixHTML","dayNum","thisTime","inputEvent","changeEvent","Event","createEvent","initEvent","dispatchEvent","theSelect","namesArray","selectedValue","aOption","theText","text","selected","getTimezoneOffset","decreaseLocaleSpecificity","localeName","returnVar","replace","dmyFormatToParser","format","dPos","yPos","indexOf","mPos","localeDateRegExp","RegExp","pattern","dtStr","dateMatch","exec","yr","mth","dt","getLanguageInfo","localeNames","languages","ar","bg","ca","cs","da","de","en","es","fi","fr","he","hu","is","it","ja","ko","nl","no","pl","pt","rm","ro","ru","hr","sk","sq","sv","th","tr","ur","id","uk","be","sl","et","lv","lt","tg","fa","vi","hy","az","eu","hsb","mk","tn","xh","zu","af","ka","fo","hi","mt","se","ga","ms","kk","ky","sw","tk","uz","tt","bn","pa","gu","or","ta","te","kn","ml","as","mr","sa","mn","bo","cy","km","lo","gl","kok","syr","si","iu","am","tzm","ne","fy","ps","fil","dv","ha","yo","quz","nso","ba","lb","kl","ig","ii","arn","moh","br","ug","mi","oc","co","gsw","sah","qut","rw","wo","prs","gd","smn","sms","zh","zh-hans","zh-hant","nn","bs","sma","nb","sr","dsb","smj","fmt","locales","srchStr","found","find","l","includes","parser","decrSpec","parseLocale","getLocaleFormat","language","Object","assign","LookupResult","keySelector","_dict","_keySelector","res","prototype","hasOwnProperty","call","key","validIsoDateRx","Input","pickerAppliedAttr","dateInputIsSupported","setLocaleText","propName","parentElement","nodeType","closestWithProp","placeholder","valuePropDescriptor","getOwnPropertyDescriptor","getPrototypeOf","get","set","console","log","defineProperties","textValue","_datePolyfillVal","toISOString","slice","val","test","Number","isNaN","toLocaleDateString","validate","valueAsNumber","NaN","removeAttribute","setCustomValidity","showPicker","attachTo","beginValue","requirePing","requireParse","keyCode","self","parseDt","parse","setTime","minDate","maxDate","elementLang","preferredLocales","window","navigator","userLanguage","map","toLowerCase","match","matchesElLang","startsWith","concat","li","ymd","split","addPickers","watchForInsert","allowForcePicker","findHelper","FindInputsHelper","getAllInputsForPolyfilling","di","observer","MutationObserver","mutations","m","addedNodes","Node","ELEMENT_NODE","nodes","Array","from","querySelectorAll","inpt","requiresPolyfilling","observe","childList","attributes","subtree","onBeforeOpen","disconnect"],"mappings":";uEAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,4/DCrB9C,MAAMe,EACFC,aAAYC,QAACA,EAAU,GAAEC,OAAEA,EAAS,IAAM,CAACD,QAAS,GAAIC,OAAQ,KAE5D,GAAGH,EAAOI,SACN,OAAOJ,EAAOI,SAGlB,MAAMC,EAAa,CAAEC,SAAS,GAE9BC,KAAKC,KAAO,IAAIC,KAChBF,KAAKG,MAAQ,KACbH,KAAKI,QAAS,EACdJ,KAAKK,cAAgB,GAIrBL,KAAKM,UAAYzB,SAASI,cAAc,uBAIxCe,KAAKO,KAAO1B,SAASI,cAAc,UACnCQ,EAAOe,kBACHR,KAAKO,KACLP,KAAKC,KAAKQ,cAAgBd,EAC1BK,KAAKC,KAAKQ,cAAgBb,GAE9BI,KAAKO,KAAKG,UAAY,aACtBV,KAAKO,KAAKI,iBAAiB,SAAU,KACjCX,KAAKC,KAAKW,QAAQZ,KAAKO,KAAKM,OAC5Bb,KAAKc,qBACNhB,GACHE,KAAKM,UAAUjB,YAAYW,KAAKO,MAGhCP,KAAKe,MAAQlC,SAASI,cAAc,UACpCe,KAAKe,MAAML,UAAY,cACvBV,KAAKe,MAAMJ,iBAAiB,SAAU,KAClCX,KAAKC,KAAKe,SAAShB,KA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QACA,SACA,SACA,WACA,QACA,OACA,QACA,WACA,aAGR6D,GAAI,CACAtH,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGR8D,GAAI,CACAvH,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRtC,GAAI,CACAnB,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,aACA,cACA,UACA,WACA,QACA,UACA,UACA,YACA,cACA,YACA,YACA,eAGR+D,GAAI,CACAxH,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRgE,GAAI,CACAzH,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,cAGRiE,GAAI,CACA1H,MAAO,SACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,WACA,WACA,YACA,WACA,WACA,UACA,WACA,SACA,UACA,UACA,YACA,aAGRkE,GAAI,CACA3H,MAAO,cACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,MACA,OACA,UACA,OACA,YACA,UACA,WACA,aAGRmE,GAAI,CACA5H,MAAO,OACPK,KAAM,CACF,QACA,QACA,QACA,QACA,QACA,QACA,OAEJoD,OAAQ,CACJ,QACA,SACA,MACA,QACA,MACA,OACA,OACA,SACA,SACA,UACA,SACA,UAGRoE,GAAI,CACA7H,MAAO,KACPK,KAAM,CACF,IACA,IACA,IACA,MACA,KACA,IACA,OAEJoD,OAAQ,CACJ,SACA,UACA,UACA,UACA,QACA,SACA,SACA,YACA,aACA,UACA,WACA,aAGRqE,GAAI,CACA9H,MAAO,QACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,QACA,YACA,UACA,WACA,aAGRsE,GAAI,CACA/H,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,QACA,SACA,SACA,SACA,SACA,SACA,YACA,UACA,WACA,aAGRuE,GAAI,CACAhI,MAAO,KACPK,KAAM,CACF,IACA,IACA,IACA,IACA,IACA,IACA,KAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGRwE,GAAI,CACAjI,MAAO,KACPK,KAAM,CACF,IACA,IACA,IACA,IACA,IACA,IACA,KAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGRyE,GAAI,CACAlI,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,WACA,YACA,UACA,WACA,aAGR0E,GAAI,CACAnI,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGR2E,GAAI,CACApI,MAAO,UACPK,KAAM,CACF,IACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,UACA,OACA,SACA,WACA,MACA,WACA,SACA,WACA,WACA,cACA,WACA,aAGR4E,GAAI,CACArI,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,YACA,QACA,QACA,OACA,QACA,QACA,SACA,WACA,UACA,WACA,aAGR6E,GAAI,CACAtI,MAAO,KACPK,KAAM,CACF,KACA,MACA,KACA,KACA,MACA,KACA,MAEJoD,OAAQ,CACJ,UACA,SACA,OACA,SACA,OACA,YACA,UACA,QACA,YACA,UACA,WACA,aAGR8E,GAAI,CACAvI,MAAO,SACPK,KAAM,CACF,IACA,IACA,KACA,KACA,IACA,IACA,KAEJoD,OAAQ,CACJ,WACA,YACA,SACA,UACA,MACA,QACA,QACA,SACA,aACA,YACA,YACA,cAGR+E,GAAI,CACAxI,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRgF,GAAI,CACAzI,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,WACA,UACA,SACA,UACA,UACA,SACA,SACA,UACA,QACA,WACA,UACA,aAGRiF,GAAI,CACA1I,MAAO,OACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,QACA,QACA,MACA,MACA,MACA,SACA,YACA,UACA,WACA,aAGRkF,GAAI,CACA3I,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,SACA,OACA,QACA,MACA,UACA,SACA,QACA,UACA,QACA,SACA,YAGRmF,GAAI,CACA5I,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,UACA,WACA,OACA,QACA,MACA,OACA,OACA,UACA,YACA,UACA,WACA,aAGRoF,GAAI,CACA7I,MAAO,WACPK,KAAM,CACF,MACA,KACA,KACA,KACA,MACA,KACA,MAEJoD,OAAQ,CACJ,SACA,aACA,SACA,SACA,UACA,WACA,UACA,UACA,UACA,SACA,YACA,YAGRqF,GAAI,CACA9I,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,OACA,QACA,OACA,QACA,QACA,UACA,SACA,UACA,QACA,OACA,QACA,WAGRsF,GAAI,CACA/I,MAAO,KACPK,KAAM,CACF,QACA,MACA,OACA,MACA,SACA,OACA,QAEJoD,OAAQ,CACJ,QACA,QACA,OACA,QACA,MACA,MACA,SACA,OACA,QACA,SACA,QACA,UAGRuF,GAAI,CACAhJ,MAAO,WACPK,KAAM,CACF,SACA,MACA,MACA,OACA,QACA,QACA,SAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,UACA,YACA,UACA,WACA,aAGRwF,GAAI,CACAjJ,MAAO,WACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,QACA,WACA,UACA,UACA,UACA,SACA,UACA,WACA,UACA,WACA,YAGRyF,GAAI,CACAlJ,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,WACA,OACA,UACA,WACA,MACA,UACA,SACA,UACA,WACA,aACA,WACA,YAGR0F,GAAI,CACAnJ,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,QACA,QACA,MACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGR2F,GAAI,CACApJ,MAAO,OACPK,KAAM,CACF,IACA,IACA,IACA,IACA,IACA,IACA,KAEJoD,OAAQ,CACJ,UACA,WACA,QACA,SACA,MACA,QACA,QACA,SACA,YACA,WACA,WACA,cAGR4F,GAAI,CACArJ,MAAO,SACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,WACA,YACA,QACA,UACA,QACA,SACA,SACA,UACA,aACA,WACA,YACA,cAGR6F,GAAI,CACAtJ,MAAO,WACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,QACA,WACA,SACA,WACA,QACA,YACA,WACA,SACA,YACA,YAGR8F,GAAI,CACAvJ,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,QACA,SACA,OACA,QACA,MACA,MACA,MACA,SACA,UACA,SACA,QACA,WAGR+F,GAAI,CACAxJ,MAAO,QACPK,KAAM,CACF,QACA,UACA,WACA,WACA,SACA,SACA,SAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,KACA,OACA,QACA,MACA,SACA,SACA,SACA,WAGRgG,GAAI,CACAzJ,MAAO,UACPK,KAAM,CACF,KACA,MACA,KACA,KACA,MACA,OACA,QAEJoD,OAAQ,CACJ,eACA,aACA,YACA,YACA,aACA,cACA,cACA,cACA,eACA,eACA,oBACA,qBAGRiG,GAAI,CACA1J,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,QACA,SACA,SACA,UACA,YACA,YACA,WACA,cAGRkG,GAAI,CACA3J,MAAO,QACPK,KAAM,CACF,IACA,KACA,KACA,IACA,KACA,IACA,KAEJoD,OAAQ,CACJ,SACA,SACA,OACA,QACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAGRmG,GAAI,CACA5J,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,YACA,UACA,UACA,UACA,UACA,SACA,UACA,UACA,SACA,QACA,SACA,YAGRoG,IAAK,CACD7J,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,OACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGRqG,GAAI,CACA9J,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,WACA,UACA,aAGRsG,GAAI,CACA/J,MAAO,WACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,YACA,WACA,WACA,WACA,eACA,cACA,SACA,SACA,SACA,YACA,cACA,gBAGRuG,GAAI,CACAhK,MAAO,YACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,SACA,UACA,cACA,UACA,WACA,QACA,SACA,UACA,SACA,SACA,SAGRwG,GAAI,CACAjK,MAAO,YACPK,KAAM,CACF,OACA,OACA,MACA,OACA,MACA,OACA,QAEJoD,OAAQ,CACJ,aACA,aACA,SACA,SACA,UACA,eACA,aACA,UACA,WACA,UACA,SACA,gBAGRyG,GAAI,CACAlK,MAAO,SACPK,KAAM,CACF,MACA,OACA,OACA,OACA,OACA,MACA,OAEJoD,OAAQ,CACJ,WACA,YACA,QACA,QACA,MACA,QACA,QACA,WACA,YACA,UACA,WACA,aAGR0G,GAAI,CACAnK,MAAO,OACPK,KAAM,CACF,QACA,WACA,YACA,YACA,YACA,YACA,UAEJoD,OAAQ,CACJ,UACA,YACA,QACA,SACA,QACA,SACA,SACA,UACA,aACA,YACA,WACA,cAGR2G,GAAI,CACApK,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,QAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGR4G,GAAI,CACArK,MAAO,KACPK,KAAM,CACF,OACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,QACA,QACA,QACA,SACA,KACA,MACA,QACA,QACA,UACA,UACA,SACA,YAGR6G,GAAI,CACAtK,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,OACA,QACA,QACA,QACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGR8G,GAAI,CACAvK,MAAO,OACPK,KAAM,CACF,OACA,OACA,MACA,OACA,OACA,OACA,OAEJoD,OAAQ,CACJ,gBACA,cACA,cACA,aACA,cACA,cACA,eACA,aACA,aACA,eACA,cACA,gBAGR+G,GAAI,CACAxK,MAAO,QACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,MACA,QAEJoD,OAAQ,CACJ,SACA,UACA,QACA,UACA,YACA,YACA,OACA,SACA,eACA,mBACA,UACA,YAGRgH,GAAI,CACAzK,MAAO,WACPK,KAAM,CACF,OACA,QACA,MACA,OACA,SACA,SACA,SAEJoD,OAAQ,CACJ,UACA,WACA,MACA,QACA,MACA,MACA,QACA,OACA,YACA,UACA,WACA,aAGRiH,GAAI,CACA1K,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,QACA,SACA,QACA,QACA,SACA,QACA,QACA,WACA,QACA,SACA,cAGRkH,GAAI,CACA3K,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRmH,GAAI,CACA5K,MAAO,MACPK,KAAM,CACF,SACA,SACA,SACA,SACA,OACA,OACA,UAEJoD,OAAQ,CACJ,UACA,WACA,QACA,SACA,MACA,OACA,QACA,SACA,WACA,SACA,UACA,YAGRoH,GAAI,CACA7K,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,SACA,OACA,QACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAGRqH,GAAI,CACA9K,MAAO,QACPK,KAAM,CACF,OACA,OACA,QACA,OACA,OACA,MACA,OAEJoD,OAAQ,CACJ,SACA,SACA,OACA,QACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAGRsH,GAAI,CACA/K,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,OACA,OACA,MACA,OAEJoD,OAAQ,CACJ,UACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRuH,GAAI,CACAhL,MAAO,KACPK,KAAM,CACF,OACA,OACA,SACA,OACA,YACA,SACA,QAEJoD,OAAQ,CACJ,YACA,cACA,QACA,SACA,KACA,MACA,QACA,QACA,aACA,UACA,UACA,aAGRwH,GAAI,CACAjL,MAAO,MACPK,KAAM,CACF,MACA,OACA,QACA,QACA,OACA,QACA,WAEJoD,OAAQ,CACJ,QACA,QACA,OACA,SACA,KACA,MACA,QACA,OACA,QACA,SACA,QACA,UAGRyH,GAAI,CACAlL,MAAO,MACPK,KAAM,CACF,MACA,MACA,OACA,MACA,OACA,QACA,OAEJoD,OAAQ,CACJ,YACA,YACA,QACA,SACA,KACA,MACA,QACA,QACA,YACA,UACA,UACA,aAGR0H,GAAI,CACAnL,MAAO,MACPK,KAAM,CACF,OACA,QACA,SACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,WACA,aACA,UACA,WACA,KACA,QACA,QACA,QACA,aACA,UACA,UACA,cAGR2H,GAAI,CACApL,MAAO,QACPK,KAAM,CACF,SACA,UACA,WACA,QACA,UACA,SACA,OAEJoD,OAAQ,CACJ,QACA,WACA,SACA,SACA,KACA,OACA,OACA,SACA,aACA,WACA,UACA,aAGR4H,GAAI,CACArL,MAAO,OACPK,KAAM,CACF,OACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,QACA,WACA,SACA,UACA,KACA,OACA,OACA,SACA,aACA,WACA,SACA,aAGR6H,GAAI,CACAtL,MAAO,OACPK,KAAM,CACF,QACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,QACA,WACA,SACA,UACA,KACA,OACA,OACA,SACA,YACA,WACA,UACA,aAGR8H,GAAI,CACAvL,MAAO,QACPK,KAAM,CACF,QACA,UACA,SACA,QACA,UACA,UACA,QAEJoD,OAAQ,CACJ,SACA,YACA,WACA,UACA,OACA,OACA,OACA,UACA,aACA,WACA,SACA,YAGR+H,GAAI,CACAxL,MAAO,MACPK,KAAM,CACF,OACA,SACA,OACA,OACA,SACA,OACA,QAEJoD,OAAQ,CACJ,WACA,aACA,QACA,SACA,KACA,MACA,QACA,QACA,aACA,UACA,UACA,aAGRgI,GAAI,CACAzL,MAAO,KACPK,KAAM,CACF,OACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,WACA,aACA,QACA,SACA,KACA,MACA,OACA,QACA,WACA,UACA,YACA,YAGRiI,GAAI,CACA1L,MAAO,OACPK,KAAM,CACF,WACA,WACA,aACA,WACA,YACA,aACA,YAEJoD,OAAQ,CACJ,QACA,QACA,QACA,SACA,KACA,MACA,QACA,QACA,UACA,UACA,SACA,YAGRkI,GAAI,CACA3L,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,eACA,eACA,eACA,eACA,eACA,eACA,eACA,eACA,eACA,gBACA,gBACA,kBAGRmI,GAAI,CACA5L,MAAO,QACPK,KAAM,CACF,QACA,QACA,WACA,SACA,UACA,SACA,WAEJoD,OAAQ,CACJ,iBACA,kBACA,kBACA,iBACA,gBACA,kBACA,kBACA,mBACA,iBACA,kBACA,sBACA,wBAGRoI,GAAI,CACA7L,MAAO,SACPK,KAAM,CACF,MACA,OACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,WACA,SACA,SACA,MACA,UACA,aACA,OACA,OACA,SACA,WACA,YAGRqI,GAAI,CACA9L,MAAO,UACPK,KAAM,CACF,QACA,KACA,KACA,KACA,QACA,MACA,MAEJoD,OAAQ,CACJ,OACA,SACA,OACA,OACA,OACA,SACA,SACA,OACA,QACA,OACA,WACA,SAGRsI,GAAI,CACA/L,MAAO,WACPK,KAAM,CACF,QACA,MACA,SACA,MACA,QACA,MACA,QAEJoD,OAAQ,CACJ,SACA,QACA,OACA,OACA,UACA,SACA,UACA,QACA,QACA,OACA,QACA,UAGRuI,GAAI,CACAhM,MAAO,OACPK,KAAM,CACF,MACA,OACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,OACA,OACA,QACA,SACA,WACA,UACA,WACA,aAGRwI,IAAK,CACDjM,MAAO,MACPK,KAAM,CACF,MACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,WACA,aACA,QACA,SACA,KACA,MACA,OACA,QACA,WACA,UACA,WACA,YAGRyI,IAAK,CACDlM,MAAO,OACPK,KAAM,CACF,SACA,SACA,SACA,SACA,SACA,QACA,OAEJoD,OAAQ,CACJ,YACA,MACA,MACA,OACA,MACA,QACA,OACA,KACA,QACA,YACA,YACA,cAGR0I,GAAI,CACAnM,MAAO,KACPK,KAAM,CACF,QACA,QACA,QACA,QACA,SACA,SACA,SAEJoD,OAAQ,CACJ,SACA,WACA,SACA,YACA,OACA,OACA,OACA,WACA,cACA,WACA,YACA,cAGR2I,GAAI,CACApM,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,KACA,MACA,MACA,OAEJoD,OAAQ,CACJ,YACA,YACA,SACA,SACA,MACA,QACA,QACA,WACA,WACA,UACA,WACA,aAGR4I,GAAI,CACArM,MAAO,KACPK,KAAM,CACF,MACA,KACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,QACA,MACA,OACA,KACA,KACA,MACA,OACA,SACA,SACA,QACA,UAGR6I,IAAK,CACDtM,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,QACA,UACA,SACA,OACA,QACA,QACA,QACA,WACA,SACA,SACA,aAGR8I,GAAI,CACAvM,MAAO,KACPK,KAAM,CACF,MACA,MACA,QACA,MACA,OACA,QACA,OAEJoD,OAAQ,CACJ,QACA,YACA,QACA,SACA,KACA,MACA,QACA,QACA,aACA,UACA,WACA,aAGR+I,GAAI,CACAxM,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,aACA,aACA,QACA,QACA,QACA,OACA,OACA,WACA,YACA,UACA,WACA,aAGRgJ,GAAI,CACAzM,MAAO,SACPK,KAAM,CACF,QACA,UACA,WACA,WACA,SACA,SACA,SAEJoD,OAAQ,CACJ,OACA,MACA,aACA,cACA,eACA,gBACA,MACA,QACA,QACA,OACA,YACA,aAGRiJ,IAAK,CACD1M,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,cAGRkJ,GAAI,CACA3M,MAAO,SACPK,KAAM,CACF,WACA,OACA,WACA,OACA,aACA,SACA,YAEJoD,OAAQ,CACJ,aACA,SACA,mBACA,iBACA,eACA,iBACA,SACA,WACA,WACA,WACA,aACA,eAGRmJ,GAAI,CACA5M,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,WACA,UACA,QACA,SACA,OACA,OACA,OACA,SACA,UACA,UACA,UACA,YAGRoJ,GAAI,CACA7M,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,YACA,WACA,WACA,YACA,YACA,WACA,WACA,WACA,YACA,WACA,cACA,eAGRqJ,IAAK,CACD9M,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,cACA,cACA,eACA,SACA,UACA,aACA,aACA,eACA,YACA,WACA,YACA,gBAGRsJ,IAAK,CACD/M,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,aACA,UACA,UACA,WACA,cACA,eACA,SACA,QACA,SACA,YACA,YACA,aAGRuJ,GAAI,CACAhN,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRwJ,GAAI,CACAjN,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,QACA,SACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRyJ,GAAI,CACAlN,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,OACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,SACA,UACA,QACA,OACA,OACA,UACA,aACA,WACA,YACA,cAGR0J,GAAI,CACAnN,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,WACA,YACA,WACA,WACA,WACA,WACA,WACA,aACA,aACA,WACA,iBACA,oBAGR2J,GAAI,CACApN,MAAO,KACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,QAGR4J,IAAK,CACDrN,MAAO,WACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,cAGR6J,IAAK,CACDtN,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,gBACA,UACA,aACA,cACA,iBACA,YACA,eACA,UACA,cACA,WACA,eACA,eAGR8J,GAAI,CACAvN,MAAO,QACPK,KAAM,CACF,MACA,MACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,SACA,YACA,SACA,QACA,MACA,WACA,SACA,OACA,WACA,OACA,KACA,UAGR+J,GAAI,CACAxN,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,WAGRgK,GAAI,CACAzN,MAAO,aACPK,KAAM,CACF,KACA,KACA,KACA,MACA,KACA,KACA,MAEJoD,OAAQ,CACJ,aACA,cACA,iBACA,gBACA,UACA,SACA,YACA,iBACA,SACA,kBACA,mBACA,YAGRiK,GAAI,CACA1N,MAAO,MACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,QACA,WACA,UACA,WACA,aAGRkK,GAAI,CACA3N,MAAO,QACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,cACA,YACA,QACA,SACA,SACA,YACA,SACA,QACA,YACA,UACA,WACA,aAGRmK,IAAK,CACD5N,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,UACA,YACA,UACA,WACA,aAGRoK,IAAK,CACD7N,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,YACA,UACA,cACA,aACA,UACA,UACA,SACA,eACA,cACA,WACA,WACA,aAGRqK,IAAK,CACD9N,MAAO,UACPK,KAAM,CACF,MACA,MACA,MACA,OACA,MACA,OACA,QAEJoD,OAAQ,CACJ,YACA,YACA,UACA,WACA,WACA,WACA,WACA,cACA,cACA,WACA,aACA,iBAGRsK,GAAI,CACA/N,MAAO,YACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,WACA,cACA,UACA,OACA,WACA,SACA,WACA,SACA,QACA,WACA,aACA,YAGRuK,GAAI,CACAhO,MAAO,MACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,MACA,OACA,UACA,OACA,YACA,UACA,WACA,aAGRwK,IAAK,CACDjO,MAAO,QACPK,KAAM,CACF,QACA,UACA,WACA,WACA,SACA,SACA,SAEJoD,OAAQ,CACJ,OACA,MACA,aACA,cACA,eACA,gBACA,MACA,QACA,QACA,OACA,YACA,aAGRyK,GAAI,CACAlO,MAAO,WACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,gBACA,aACA,UACA,aACA,aACA,eACA,cACA,cACA,eACA,aACA,eACA,iBAGR0K,IAAK,CACDnO,MAAO,OACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,eACA,aACA,cACA,cACA,aACA,YACA,cACA,aACA,aACA,eACA,cACA,gBAGR2K,IAAK,CACDpO,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,eACA,aACA,mBACA,aACA,aACA,aACA,cACA,aACA,YACA,YACA,aACA,gBAGR4K,GAAI,CACAhO,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,OAEJzD,MAAO,MAEXsO,UAAW,CACPjO,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,OAEJzD,MAAO,MAEXuO,UAAW,CACPlO,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,OAEJzD,MAAO,MAEXwO,GAAI,CACAxO,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRgL,GAAI,CACAzO,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRiL,IAAK,CACD1O,MAAO,eACPK,KAAM,CACF,MACA,MACA,MACA,OACA,OACA,QACA,QAEJoD,OAAQ,CACJ,YACA,SACA,UACA,WACA,WACA,SACA,WACA,UACA,WACA,QACA,QACA,UAGRkL,GAAI,CACA3O,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRmL,GAAI,CACA5O,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,MACA,MACA,SACA,YACA,UACA,WACA,aAGRoL,IAAK,CACD7O,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGRqL,IAAK,CACD9O,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,OACA,OACA,OAEJoD,OAAQ,CACJ,cACA,cACA,iBACA,iBACA,eACA,eACA,kBACA,cACA,aACA,gBACA,eACA,iBAvtGNsL,EDHH,SAAyB/H,GAC5B,MAAMgI,EAAU,CACZ,CAAC,UACG,oCACJ,CAAC,QACG,wgBACJ,CAAC,aACG,cACJ,CAAC,SACG,oBACJ,CAAC,QACG,2BACJ,CAAC,QACG,msBACJ,CAAC,QACG,uPACJ,CAAC,QACG,gBACJ,CAAC,QACG,uGACJ,CAAC,QACG,+BACJ,CAAC,SACG,uBACJ,CAAC,QACG,+IACJ,CAAC,QACG,uGAER,IAAK,IAAI7L,EAAI,EAA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QAAS2N,GAAMsE,EAAc5S,IAAIsO,IAClD+D,EAAmBO,EAAcvC,KAAI,GAAMyC,OAAOF,EAAcvC,KAAI,IAGxE,MAAM0C,EAAK9M,EAAgBoM,GAE3BpU,KAAKkE,OAAS4Q,EAAG5Q,OACjBlE,KAAKsE,WAAawQ,EAGtBpV,mBAAmBqI,GACf,MAAMgN,EAAMhN,EAAG4K,cAAcC,MAAM,EAAE,IAAIoC,MAAM,KAC/C,OAAOhV,KAAKsE,WAAW4C,OAClBF,QAAQ,IAAK+N,EAAI,IACjB/N,QAAQ,IAAK+N,EAAI,IACjB/N,QAAQ,IAAK+N,EAAI,KEnLvB,SAASE,GAAWC,eAAEA,GAAiB,EAAKC,iBAAEA,GAAmB,EAAKxV,QAAEA,EAAU,GAAEC,OAAEA,EAAS,IAAO,IACzGH,EAAOI,SAAW,IAAIJ,EAAO,CAACE,QAAAA,EAASC,OAAAA,IACvC,MAAMwV,EAAa,IAAIC,EAAiB,CAAEF,iBAAAA,IAG1C,GADAC,EAAWE,6BAA6B5S,QAAS6S,GAAO,IAAI/D,EAAM+D,IAC9DL,EAAgB,CAChB,MAAMM,EAAW,IAAIC,iBAAkBC,GACnCA,EAAUhT,QAASiT,IACD,cAAXA,EAAEzW,MACDyW,EAAEC,WAAWlT,QAASN,IAClB,GAAIA,EAAG0P,WAAa+D,KAAKC,aAAc,CAGnC,MAAMC,EAAQC,MAAMC,KAAK7T,EAAG8T,iBAAiB,qBAC7CH,EAAMnT,KAAKR,GACX2T,EAAMrT,QAASyT,IACPf,EAAWgB,oBAAoBD,IAC/B,IAAI3E,EAAM2E,WAQhCE,EAAU,IAAMb,EAASa,QAAQxX,SAASsD,KAAM,CAClDmU,WAAW,EACXC,YAAY,EACZC,SAAS,IAEb/W,EAAOI,SAAS4W,aAAa,KACzBjB,EAASkB,aACT1S,WAAWqS,EAAS,OAExBA"} \ No newline at end of file +{"version":3,"file":"add-pickers-d77e4620.mjs","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/picker.js","../src/locales.js","../src/languages.js","../src/lookup-result.js","../src/input.js","../src/closest-with-prop.js","../src/add-pickers.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import './esm-date-input-polyfill.scss';\r\n\r\nclass Picker {\r\n constructor({yrsBack = 80, yrsFwd = 20} = {yrsBack: 80, yrsFwd: 20}) {\r\n // This is a singleton.\r\n if(Picker.instance) {\r\n return Picker.instance;\r\n }\r\n\r\n const passiveOpt = { passive: true };\r\n\r\n this.date = new Date();\r\n this.input = null;\r\n this.isOpen = false;\r\n this._onBeforeOpen = [];\r\n\r\n // The picker element. Unique tag name attempts to protect against\r\n // generic selectors.\r\n this.container = document.createElement('date-input-polyfill');\r\n\r\n // Add controls.\r\n // Year picker.\r\n this.year = document.createElement('select');\r\n Picker.createRangeSelect(\r\n this.year,\r\n this.date.getFullYear() - yrsBack,\r\n this.date.getFullYear() + yrsFwd,\r\n );\r\n this.year.className = 'yearSelect';\r\n this.year.addEventListener('change', ()=> {\r\n this.date.setYear(this.year.value);\r\n this.refreshDaysMatrix();\r\n }, passiveOpt);\r\n this.container.appendChild(this.year);\r\n\r\n // Month picker.\r\n this.month = document.createElement('select');\r\n this.month.className = 'monthSelect';\r\n this.month.addEventListener('change', ()=> {\r\n this.date.setMonth(this.month.value);\r\n this.refreshDaysMatrix();\r\n }, passiveOpt);\r\n this.container.appendChild(this.month);\r\n\r\n // Today button.\r\n this.today = document.createElement('button');\r\n this.today.textContent = 'Today';\r\n this.today.addEventListener('click', ()=> {\r\n this.date = new Date();\r\n this.setInput();\r\n }, passiveOpt);\r\n this.container.appendChild(this.today);\r\n\r\n // Setup unchanging DOM for days matrix.\r\n const daysMatrix = document.createElement('table');\r\n this.daysHead = document.createElement('thead');\r\n this.days = document.createElement('tbody');\r\n\r\n // THIS IS THE BIG PART.\r\n // When the user clicks a day, set that day as the date.\r\n // Uses event delegation.\r\n this.days.addEventListener('click', (e) => {\r\n const tgt = e.target;\r\n\r\n if(!tgt.classList.contains('esm-polyfill-day') || tgt.classList.contains('esm-polyfill-invalid-day')) {\r\n return false;\r\n }\r\n\r\n const curSel = this.days.querySelector('.esm-polyfill-day-selected');\r\n if(curSel) {\r\n curSel.classList.remove('esm-polyfill-day-selected');\r\n }\r\n tgt.classList.add('esm-polyfill-day-selected');\r\n\r\n this.date.setDate(parseInt(tgt.textContent, 10));\r\n this.setInput();\r\n }, passiveOpt);\r\n\r\n daysMatrix.appendChild(this.daysHead);\r\n daysMatrix.appendChild(this.days);\r\n this.container.appendChild(daysMatrix);\r\n\r\n this.hide();\r\n document.body.appendChild(this.container);\r\n\r\n // Close the picker when clicking outside of a date input or picker.\r\n document.addEventListener('click', e=> {\r\n let el = e.target;\r\n let isPicker = el === this.container;\r\n\r\n while(!isPicker && (el = el.parentNode)) {\r\n isPicker = el === this.container;\r\n }\r\n\r\n const attr = e.target.getAttribute('type');\r\n if (attr !== 'date' && attr !== 'date-polyfill' && !isPicker) {\r\n this.hide();\r\n }\r\n }, passiveOpt);\r\n }\r\n\r\n // Hide.\r\n hide() {\r\n this.container.setAttribute('data-open', this.isOpen = false);\r\n }\r\n\r\n // Show.\r\n show() {\r\n this._onBeforeOpen.forEach((fn) => fn());\r\n this.container.setAttribute('data-open', this.isOpen = true);\r\n }\r\n\r\n onBeforeOpen(fn) {\r\n this._onBeforeOpen.push(fn);\r\n }\r\n\r\n // Position picker below element. Align to element's left edge.\r\n goto(element) {\r\n const rekt = element.getBoundingClientRect();\r\n this.container.style.top = `${\r\n rekt.top + rekt.height\r\n + (document.documentElement.scrollTop || document.body.scrollTop)\r\n }px`;\r\n this.container.style.left = `${\r\n rekt.left\r\n + (document.documentElement.scrollLeft || document.body.scrollLeft)\r\n }px`;\r\n\r\n this.show();\r\n }\r\n\r\n // Initiate I/O with given date input.\r\n attachTo(input) {\r\n if(\r\n input === this.input\r\n && this.isOpen\r\n ) {\r\n return false;\r\n }\r\n\r\n this.input = input;\r\n this.sync();\r\n this.goto(this.input.element);\r\n }\r\n\r\n // Match picker date with input date.\r\n sync() {\r\n if(this.input.element.valueAsDate) {\r\n this.date = Picker.utcDateToLocal(this.input.element.valueAsDate);\r\n } else {\r\n this.date = new Date();\r\n }\r\n\r\n this.year.value = this.date.getFullYear();\r\n this.month.value = this.date.getMonth();\r\n this.refreshDaysMatrix();\r\n }\r\n\r\n // Match input date with picker date.\r\n setInput() {\r\n this.input.element.value =\r\n `${\r\n this.date.getFullYear()\r\n }-${\r\n String(this.date.getMonth() + 1).padStart(2,'0')\r\n }-${\r\n String(this.date.getDate()).padStart(2,'0')\r\n }`;\r\n\r\n this.input.element.focus();\r\n setTimeout(()=> { // IE wouldn't hide, so in a timeout you go.\r\n this.hide();\r\n }, 100);\r\n\r\n this.pingInput();\r\n }\r\n\r\n refreshLocale() {\r\n if(this.locale === this.input.locale) {\r\n return false;\r\n }\r\n\r\n this.locale = this.input.locale;\r\n\r\n const daysHeadHTML = [''];\r\n for(let i = 0, len = this.input.localeText.days.length; i < len; ++i) {\r\n daysHeadHTML.push(`${this.input.localeText.days[i]}`);\r\n }\r\n this.daysHead.innerHTML = daysHeadHTML.join('');\r\n\r\n Picker.createRangeSelect(\r\n this.month,\r\n 0,\r\n 11,\r\n this.input.localeText.months,\r\n this.date.getMonth()\r\n );\r\n\r\n this.today.textContent = this.input.localeText.today;\r\n }\r\n\r\n refreshDaysMatrix() {\r\n this.refreshLocale();\r\n\r\n // Determine days for this month and year,\r\n // as well as on which weekdays they lie.\r\n const year = this.date.getFullYear(); // Get the year (2016).\r\n const month = this.date.getMonth(); // Get the month number (0-11).\r\n let startDate = new Date(year, month, 1);\r\n const startDay = startDate.getDay(); // First weekday of month (0-6).\r\n const daysInMonth = new Date(\r\n this.date.getFullYear(),\r\n month + 1,\r\n 0\r\n ).getDate(); // Get days in month (1-31).\r\n\r\n // The input's current date.\r\n const selDate = Picker.utcDateToLocal(this.input.element.valueAsDate) || false;\r\n\r\n // Are we in the input's currently-selected month and year?\r\n const selMatrix =\r\n selDate\r\n && year === selDate.getFullYear()\r\n && month === selDate.getMonth();\r\n\r\n const minStr = this.input.element.min;\r\n const minTime = minStr\r\n ? Picker.utcDateToLocal(new Date(minStr)).getTime()\r\n : -30610224000000; // 1000-01-01\r\n const maxStr = this.input.element.max;\r\n const maxTime = maxStr\r\n ? Picker.utcDateToLocal(new Date(maxStr)).getTime()\r\n : 32503680000000; // 3000-01-01\r\n\r\n const currentDate = new Date();\r\n currentDate.setHours(0,0,0,0);\r\n const currentTime= currentDate.getTime();\r\n\r\n // Populate days matrix.\r\n const matrixHTML = [];\r\n for(let i = 0; i < daysInMonth + startDay; ++i) {\r\n // Add a row every 7 days.\r\n if(i % 7 === 0) {\r\n matrixHTML.push(`\r\n ${i !== 0 ? '' : ''}\r\n \r\n `);\r\n }\r\n\r\n // Add new column.\r\n // If no days from this month in this column, it will be empty.\r\n if(i + 1 <= startDay) {\r\n matrixHTML.push('');\r\n continue;\r\n }\r\n\r\n // Populate day number.\r\n const dayNum = i + 1 - startDay;\r\n const classList = ['esm-polyfill-day'];\r\n if (selMatrix && selDate.getDate() === dayNum){\r\n classList.push('esm-polyfill-day-selected');\r\n }\r\n let thisTime = startDate.setDate(dayNum);\r\n if (thisTime < minTime || thisTime > maxTime) {\r\n classList.push('esm-polyfill-invalid-day');\r\n }\r\n if (thisTime === currentTime) {\r\n classList.push('esm-polyfill-current-day');\r\n }\r\n\r\n matrixHTML.push(\r\n `\r\n ${dayNum}\r\n `\r\n );\r\n }\r\n\r\n this.days.innerHTML = matrixHTML.join('');\r\n }\r\n\r\n pingInput() {\r\n // Dispatch DOM events to the input.\r\n let inputEvent;\r\n let changeEvent;\r\n\r\n // Modern event creation.\r\n try {\r\n inputEvent = new Event('input');\r\n changeEvent = new Event('change');\r\n }\r\n // Old-fashioned way.\r\n catch(e) {\r\n inputEvent = document.createEvent('KeyboardEvent');\r\n inputEvent.initEvent('input', true, false);\r\n changeEvent = document.createEvent('KeyboardEvent');\r\n changeEvent.initEvent('change', true, false);\r\n }\r\n\r\n this.input.element.dispatchEvent(inputEvent);\r\n this.input.element.dispatchEvent(changeEvent);\r\n }\r\n\r\n static createRangeSelect(theSelect, min, max, namesArray, selectedValue) {\r\n theSelect.innerHTML = '';\r\n\r\n for(let i = min; i <= max; ++i) {\r\n const aOption = document.createElement('option');\r\n theSelect.appendChild(aOption);\r\n\r\n const theText = namesArray ? namesArray[i - min] : i;\r\n\r\n aOption.text = theText;\r\n aOption.value = i;\r\n\r\n if(i === selectedValue) {\r\n aOption.selected = 'selected';\r\n }\r\n }\r\n\r\n return theSelect;\r\n }\r\n\r\n static utcDateToLocal(date) {\r\n return date && new Date(date.getTime() + date.getTimezoneOffset()*60000);\r\n }\r\n}\r\n\r\nPicker.instance = null;\r\n\r\nexport default Picker;\r\n","// Localizations for UI text.\r\n// localeNames array is assumed to be already converted to lower case\r\nexport function getLocaleFormat(localeNames) {\r\n const locales = [\r\n ['D. M. Y',\r\n '_dsb_dsb-de_hsb_hsb-de_sk_sk-sk_'],\r\n ['D.M.Y',\r\n '_az_az-cyrl_az-cyrl-az_az-latn_az-latn-az_ba_ba-ru_be_be-by_bs_bs-cyrl_bs-cyrl-ba_bs-latn_bs-latn-ba_cs_cs-cz_de_de-at_de-ch_de-de_de-li_de-lu_et_et-ee_fi_fi-fi_fr-ch_hy_hy-am_is_is-is_it-ch_ka_ka-ge_kk_kk-kz_ky_ky-kg_mk_mk-mk_nb_nb-no_nn_nn-no_no_ro_ro-ro_ru_ru-ru_se_se-fi_se-no_sl_sl-si_sma-no_smj-no_smn_smn-fi_sms_sms-fi_sr_sr-cyrl_sr-cyrl-ba_sr-cyrl-cs_sr-cyrl-me_sr-cyrl-rs_sr-latn_sr-latn-ba_sr-latn-cs_sr-latn-me_sr-latn-rs_sv-fi_tg_tg-cyrl_tg-cyrl-tj_tk_tk-tm_tr_tr-tr_tt_tt-ru_uk_uk-ua_uz-cyrl_uz-cyrl-uz_'],\r\n ['D.M.Y \\'г.\\'',\r\n '_bg_bg-bg_'],\r\n ['D.M.Y.',\r\n '_hr_hr-ba_hr-hr_'],\r\n ['D/M Y',\r\n '_uz_uz-latn_uz-latn-uz_'],\r\n ['D/M/Y',\r\n '_am_am-et_ar_ar-ae_ar-bh_ar-eg_ar-iq_ar-jo_ar-kw_ar-lb_ar-ly_ar-om_ar-qa_ar-sa_ar-sy_ar-ye_br_br-fr_ca_ca-es_co_co-fr_cy_cy-gb_dv_dv-mv_el_el-gr_en-au_en-bz_en-ca_en-gb_en-ie_en-jm_en-my_en-nz_en-sg_en-tt_es_es-ar_es-bo_es-co_es-cr_es-do_es-ec_es-es_es-gt_es-hn_es-mx_es-ni_es-pe_es-pr_es-py_es-sv_es-uy_es-ve_fr_fr-be_fr-fr_fr-lu_fr-mc_ga_ga-ie_gd_gd-gb_gl_gl-es_gsw_gsw-fr_ha_ha-latn_ha-latn-ng_he_he-il_id_id-id_ig_ig-ng_it_it-it_iu_iu-cans_iu-cans-ca_iu-latn_iu-latn-ca_lb_lb-lu_lo_lo-la_mi_mi-nz_ms_ms-bn_ms-my_mt_mt-mt_nl-be_oc_oc-fr_prs_prs-af_ps_ps-af_pt_pt-br_qut_qut-gt_quz_quz-bo_quz-ec_quz-pe_rm_rm-ch_syr_syr-sy_th_th-th_ur_ur-pk_vi_vi-vn_wo_wo-sn_yo_yo-ng_zh-cht_zh-hant_zh-hk_zh-mo_zh-sg_'],\r\n ['D-M-Y',\r\n '_ar-dz_ar-ma_arn_arn-cl_ar-tn_as_as-in_bn_bn-bd_bn-in_da_da-dk_en-in_es-cl_fo_fo-fo_fy_fy-nl_gu_gu-in_hi_hi-in_kl_kl-gl_kn_kn-in_kok_kok-in_ml_ml-in_mr_mr-in_nl_nl-nl_or_or-in_pa_pa-in_pt-pt_sa_sa-in_ta_ta-in_te_te-in_tzm_tzm-latn_tzm-latn-dz_'],\r\n ['M.D.Y',\r\n '_sah_sah-ru_'],\r\n ['M/D/Y',\r\n '_en_en-029_en-ph_en-us_en-zw_es-pa_es-us_fa_fa-ir_fil_fil-ph_moh_moh-ca_ne_ne-np_rw_rw-rw_sw_sw-ke_'],\r\n ['Y.M.D',\r\n '_lt_lt-lt_mn_mn-cyrl_mn-mn_'],\r\n ['Y.M.D.',\r\n '_hu_hu-hu_lv_lv-lv_'],\r\n ['Y/M/D',\r\n '_af_af-za_bo_bo-cn_en-za_eu_eu-es_ii_ii-cn_ja_ja-jp_mn-mong_mn-mong-cn_nso_nso-za_tn_tn-za_xh_xh-za_zh_zh-chs_zh-cn_zh-hans_zh-tw_zu_zu-za_'],\r\n ['Y-M-D',\r\n '_fr-ca_km_km-kh_ko_ko-kr_pl_pl-pl_se-se_si_si-lk_sma_sma-se_smj_smj-se_sq_sq-al_sv_sv-se_ug_ug-cn_'],\r\n ];\r\n for (let i = 0; i < localeNames.length; ++i) {\r\n const srchStr = '_' + localeNames[i] + '_';\r\n const found = locales.find((l) => l[1].includes(srchStr));\r\n if (found) {\r\n return { locale: localeNames[i], format: found[0], parser: dmyFormatToParser(found[0]) } ;\r\n }\r\n const decrSpec = decreaseLocaleSpecificity(localeNames[i]);\r\n if (decrSpec) {\r\n localeNames.push(decrSpec);\r\n }\r\n }\r\n const format = 'Y-M-D';\r\n return { locale: 'en', format, parseLocale: dmyFormatToParser(format) };\r\n}\r\n\r\nexport function decreaseLocaleSpecificity(localeName) {\r\n const returnVar = localeName.replace(/-[a-z0-9]+$/, '');\r\n if (!returnVar || returnVar === localeName) {\r\n return null;\r\n }\r\n return returnVar;\r\n}\r\n\r\nexport function dmyFormatToParser(format) {\r\n let yPos = format.indexOf('Y');\r\n let mPos = format.indexOf('M');\r\n let dPos;\r\n // only 3 permutaions in use: DMY, YMD & MDY\r\n if (yPos < mPos) {\r\n yPos = 1;\r\n mPos = 2;\r\n dPos = 3;\r\n } else {\r\n yPos = 3;\r\n dPos = format.indexOf('D');\r\n if (dPos < mPos) {\r\n dPos = 1;\r\n mPos = 2;\r\n } else {\r\n mPos = 1;\r\n dPos = 2;\r\n }\r\n }\r\n format = format.replace(/\\./g, '\\\\.') // note period is the only charachter requiring escaping in the formats above\r\n .replace('Y', '([12]\\\\d{3})')\r\n .replace('M', '([01]?\\\\d)')\r\n .replace('D', '([0-3]?\\\\d)');\r\n const localeDateRegExp = new RegExp(format);\r\n return {\r\n pattern: format.replace(/[)()]/g,''),\r\n parse(dtStr) {\r\n const dateMatch = localeDateRegExp.exec(dtStr);\r\n if (!dateMatch) { return null; }\r\n const yr = parseInt(dateMatch[yPos], 10);\r\n const mth = parseInt(dateMatch[mPos], 10) - 1;\r\n const dt = parseInt(dateMatch[dPos], 10);\r\n const returnVar = new Date(yr, mth, dt);\r\n if (returnVar.getFullYear() !== yr || returnVar.getMonth() !== mth || returnVar.getDate() !== dt) {\r\n return null;\r\n }\r\n return returnVar;\r\n }\r\n };\r\n}\r\n","import { getLocaleFormat, decreaseLocaleSpecificity } from './locales.js';\r\n\r\n// localeNames array is assumed to be already converted to lower case\r\nexport function getLanguageInfo(localeNames) {\r\n const languages = getLanguages();\r\n const fmt = getLocaleFormat(localeNames);\r\n let language;\r\n let l = fmt.locale;\r\n while (!(language = languages[l])) {\r\n l = decreaseLocaleSpecificity(l);\r\n }\r\n if (!language) {\r\n language = languages['en']; // shouldn't get to here - possibly throw an error?\r\n }\r\n return Object.assign(fmt, language);\r\n}\r\n\r\nfunction getLanguages() {\r\n return {\r\n ar: { // Arabic\r\n today: 'اليوم',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'محرم',\r\n 'صفر',\r\n 'ربيع الأول',\r\n 'ربيع الثاني',\r\n 'جمادى الأولى',\r\n 'جمادى الثانية',\r\n 'رجب',\r\n 'شعبان',\r\n 'رمضان',\r\n 'شوال',\r\n 'ذو القعدة',\r\n 'ذو الحجة'\r\n ]\r\n },\r\n bg: { // Bulgarian\r\n today: 'днес',\r\n days: [\r\n 'нед',\r\n 'пон',\r\n 'вт',\r\n 'ср',\r\n 'четв',\r\n 'пет',\r\n 'съб'\r\n ],\r\n months: [\r\n 'януари',\r\n 'февруари',\r\n 'март',\r\n 'април',\r\n 'май',\r\n 'юни',\r\n 'юли',\r\n 'август',\r\n 'септември',\r\n 'октомври',\r\n 'ноември',\r\n 'декември'\r\n ]\r\n },\r\n ca: { // Catalan\r\n today: 'avui',\r\n days: [\r\n 'dg.',\r\n 'dl.',\r\n 'dt.',\r\n 'dc.',\r\n 'dj.',\r\n 'dv.',\r\n 'ds.'\r\n ],\r\n months: [\r\n 'gener',\r\n 'febrer',\r\n 'març',\r\n 'abril',\r\n 'maig',\r\n 'juny',\r\n 'juliol',\r\n 'agost',\r\n 'setembre',\r\n 'octubre',\r\n 'novembre',\r\n 'desembre'\r\n ]\r\n },\r\n cs: { // Czech\r\n today: 'dnes',\r\n days: [\r\n 'ne',\r\n 'po',\r\n 'út',\r\n 'st',\r\n 'čt',\r\n 'pá',\r\n 'so'\r\n ],\r\n months: [\r\n 'leden',\r\n 'únor',\r\n 'březen',\r\n 'duben',\r\n 'květen',\r\n 'červen',\r\n 'červenec',\r\n 'srpen',\r\n 'září',\r\n 'říjen',\r\n 'listopad',\r\n 'prosinec'\r\n ]\r\n },\r\n da: { // Danish\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'ma',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lø'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'marts',\r\n 'april',\r\n 'maj',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n de: { // German\r\n today: 'heute',\r\n days: [\r\n 'So',\r\n 'Mo',\r\n 'Di',\r\n 'Mi',\r\n 'Do',\r\n 'Fr',\r\n 'Sa'\r\n ],\r\n months: [\r\n 'Januar',\r\n 'Februar',\r\n 'März',\r\n 'April',\r\n 'Mai',\r\n 'Juni',\r\n 'Juli',\r\n 'August',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Dezember'\r\n ]\r\n },\r\n el: { // Greek\r\n today: 'σήμερα',\r\n days: [\r\n 'Κυρ',\r\n 'Δευ',\r\n 'Τρι',\r\n 'Τετ',\r\n 'Πεμ',\r\n 'Παρ',\r\n 'Σαβ'\r\n ],\r\n months: [\r\n 'Ιανουάριος',\r\n 'Φεβρουάριος',\r\n 'Μάρτιος',\r\n 'Απρίλιος',\r\n 'Μάιος',\r\n 'Ιούνιος',\r\n 'Ιούλιος',\r\n 'Αύγουστος',\r\n 'Σεπτέμβριος',\r\n 'Οκτώβριος',\r\n 'Νοέμβριος',\r\n 'Δεκέμβριος'\r\n ]\r\n },\r\n en: { // English\r\n today: 'today',\r\n days: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December'\r\n ]\r\n },\r\n es: { // Spanish\r\n today: 'hoy',\r\n days: [\r\n 'dom',\r\n 'lun',\r\n 'mar',\r\n 'mié',\r\n 'jue',\r\n 'vie',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'enero',\r\n 'febrero',\r\n 'marzo',\r\n 'abril',\r\n 'mayo',\r\n 'junio',\r\n 'julio',\r\n 'agosto',\r\n 'septiembre',\r\n 'octubre',\r\n 'noviembre',\r\n 'diciembre'\r\n ]\r\n },\r\n fi: { // Finnish\r\n today: 'tänään',\r\n days: [\r\n 'su',\r\n 'ma',\r\n 'ti',\r\n 'ke',\r\n 'to',\r\n 'pe',\r\n 'la'\r\n ],\r\n months: [\r\n 'tammikuu',\r\n 'helmikuu',\r\n 'maaliskuu',\r\n 'huhtikuu',\r\n 'toukokuu',\r\n 'kesäkuu',\r\n 'heinäkuu',\r\n 'elokuu',\r\n 'syyskuu',\r\n 'lokakuu',\r\n 'marraskuu',\r\n 'joulukuu'\r\n ]\r\n },\r\n fr: { // French\r\n today: 'aujourd\\'hui',\r\n days: [\r\n 'dim.',\r\n 'lun.',\r\n 'mar.',\r\n 'mer.',\r\n 'jeu.',\r\n 'ven.',\r\n 'sam.'\r\n ],\r\n months: [\r\n 'janvier',\r\n 'février',\r\n 'mars',\r\n 'avril',\r\n 'mai',\r\n 'juin',\r\n 'juillet',\r\n 'août',\r\n 'septembre',\r\n 'octobre',\r\n 'novembre',\r\n 'décembre'\r\n ]\r\n },\r\n he: { // Hebrew\r\n today: 'היום',\r\n days: [\r\n 'יום א',\r\n 'יום ב',\r\n 'יום ג',\r\n 'יום ד',\r\n 'יום ה',\r\n 'יום ו',\r\n 'שבת'\r\n ],\r\n months: [\r\n 'ינואר',\r\n 'פברואר',\r\n 'מרץ',\r\n 'אפריל',\r\n 'מאי',\r\n 'יוני',\r\n 'יולי',\r\n 'אוגוסט',\r\n 'ספטמבר',\r\n 'אוקטובר',\r\n 'נובמבר',\r\n 'דצמבר'\r\n ]\r\n },\r\n hu: { // Hungarian\r\n today: 'Ma',\r\n days: [\r\n 'V',\r\n 'H',\r\n 'K',\r\n 'Sze',\r\n 'Cs',\r\n 'P',\r\n 'Szo'\r\n ],\r\n months: [\r\n 'január',\r\n 'február',\r\n 'március',\r\n 'április',\r\n 'május',\r\n 'június',\r\n 'július',\r\n 'augusztus',\r\n 'szeptember',\r\n 'október',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n is: { // Icelandic\r\n today: 'Í dag',\r\n days: [\r\n 'sun.',\r\n 'mán.',\r\n 'þri.',\r\n 'mið.',\r\n 'fim.',\r\n 'fös.',\r\n 'lau.'\r\n ],\r\n months: [\r\n 'janúar',\r\n 'febrúar',\r\n 'mars',\r\n 'apríl',\r\n 'maí',\r\n 'júní',\r\n 'júlí',\r\n 'ágúst',\r\n 'september',\r\n 'október',\r\n 'nóvember',\r\n 'desember'\r\n ]\r\n },\r\n it: { // Italian\r\n today: 'oggi',\r\n days: [\r\n 'dom',\r\n 'lun',\r\n 'mar',\r\n 'mer',\r\n 'gio',\r\n 'ven',\r\n 'sab'\r\n ],\r\n months: [\r\n 'gennaio',\r\n 'febbraio',\r\n 'marzo',\r\n 'aprile',\r\n 'maggio',\r\n 'giugno',\r\n 'luglio',\r\n 'agosto',\r\n 'settembre',\r\n 'ottobre',\r\n 'novembre',\r\n 'dicembre'\r\n ]\r\n },\r\n ja: { // Japanese\r\n today: '今日',\r\n days: [\r\n '日',\r\n '月',\r\n '火',\r\n '水',\r\n '木',\r\n '金',\r\n '土'\r\n ],\r\n months: [\r\n '1月',\r\n '2月',\r\n '3月',\r\n '4月',\r\n '5月',\r\n '6月',\r\n '7月',\r\n '8月',\r\n '9月',\r\n '10月',\r\n '11月',\r\n '12月'\r\n ]\r\n },\r\n ko: { // Korean\r\n today: '오늘',\r\n days: [\r\n '일',\r\n '월',\r\n '화',\r\n '수',\r\n '목',\r\n '금',\r\n '토'\r\n ],\r\n months: [\r\n '1월',\r\n '2월',\r\n '3월',\r\n '4월',\r\n '5월',\r\n '6월',\r\n '7월',\r\n '8월',\r\n '9월',\r\n '10월',\r\n '11월',\r\n '12월'\r\n ]\r\n },\r\n nl: { // Dutch\r\n today: 'vandaag',\r\n days: [\r\n 'zo',\r\n 'ma',\r\n 'di',\r\n 'wo',\r\n 'do',\r\n 'vr',\r\n 'za'\r\n ],\r\n months: [\r\n 'januari',\r\n 'februari',\r\n 'maart',\r\n 'april',\r\n 'mei',\r\n 'juni',\r\n 'juli',\r\n 'augustus',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n no: { // Norwegian\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'ma',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lø'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'april',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n pl: { // Polish\r\n today: 'dzisiaj',\r\n days: [\r\n 'N',\r\n 'Pn',\r\n 'Wt',\r\n 'Śr',\r\n 'Cz',\r\n 'Pt',\r\n 'So'\r\n ],\r\n months: [\r\n 'styczeń',\r\n 'luty',\r\n 'marzec',\r\n 'kwiecień',\r\n 'maj',\r\n 'czerwiec',\r\n 'lipiec',\r\n 'sierpień',\r\n 'wrzesień',\r\n 'październik',\r\n 'listopad',\r\n 'grudzień'\r\n ]\r\n },\r\n pt: { // Portuguese\r\n today: 'hoje',\r\n days: [\r\n 'dom',\r\n 'seg',\r\n 'ter',\r\n 'qua',\r\n 'qui',\r\n 'sex',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'janeiro',\r\n 'fevereiro',\r\n 'março',\r\n 'abril',\r\n 'maio',\r\n 'junho',\r\n 'julho',\r\n 'agosto',\r\n 'setembro',\r\n 'outubro',\r\n 'novembro',\r\n 'dezembro'\r\n ]\r\n },\r\n rm: { // Romansh\r\n today: 'oz',\r\n days: [\r\n 'du',\r\n 'gli',\r\n 'ma',\r\n 'me',\r\n 'gie',\r\n 've',\r\n 'so'\r\n ],\r\n months: [\r\n 'schaner',\r\n 'favrer',\r\n 'mars',\r\n 'avrigl',\r\n 'matg',\r\n 'zercladur',\r\n 'fanadur',\r\n 'avust',\r\n 'settember',\r\n 'october',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n ro: { // Romanian\r\n today: 'astăzi',\r\n days: [\r\n 'D',\r\n 'L',\r\n 'Ma',\r\n 'Mi',\r\n 'J',\r\n 'V',\r\n 'S'\r\n ],\r\n months: [\r\n 'ianuarie',\r\n 'februarie',\r\n 'martie',\r\n 'aprilie',\r\n 'mai',\r\n 'iunie',\r\n 'iulie',\r\n 'august',\r\n 'septembrie',\r\n 'octombrie',\r\n 'noiembrie',\r\n 'decembrie'\r\n ]\r\n },\r\n ru: { // Russian\r\n today: 'Cегодня',\r\n days: [\r\n 'Вс',\r\n 'Пн',\r\n 'Вт',\r\n 'Ср',\r\n 'Чт',\r\n 'Пт',\r\n 'Сб'\r\n ],\r\n months: [\r\n 'Январь',\r\n 'Февраль',\r\n 'Март',\r\n 'Апрель',\r\n 'Май',\r\n 'Июнь',\r\n 'Июль',\r\n 'Август',\r\n 'Сентябрь',\r\n 'Октябрь',\r\n 'Ноябрь',\r\n 'Декабрь'\r\n ]\r\n },\r\n hr: { // Croatian\r\n today: 'danas',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'uto',\r\n 'sri',\r\n 'čet',\r\n 'pet',\r\n 'sub'\r\n ],\r\n months: [\r\n 'siječanj',\r\n 'veljača',\r\n 'ožujak',\r\n 'travanj',\r\n 'svibanj',\r\n 'lipanj',\r\n 'srpanj',\r\n 'kolovoz',\r\n 'rujan',\r\n 'listopad',\r\n 'studeni',\r\n 'prosinac'\r\n ]\r\n },\r\n sk: { // Slovak\r\n today: 'dnes',\r\n days: [\r\n 'ne',\r\n 'po',\r\n 'ut',\r\n 'st',\r\n 'št',\r\n 'pi',\r\n 'so'\r\n ],\r\n months: [\r\n 'január',\r\n 'február',\r\n 'marec',\r\n 'apríl',\r\n 'máj',\r\n 'jún',\r\n 'júl',\r\n 'august',\r\n 'september',\r\n 'október',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n sq: { // Albanian\r\n today: 'sot',\r\n days: [\r\n 'Die',\r\n 'Hën',\r\n 'Mar',\r\n 'Mër',\r\n 'Enj',\r\n 'Pre',\r\n 'Sht'\r\n ],\r\n months: [\r\n 'janar',\r\n 'shkurt',\r\n 'mars',\r\n 'prill',\r\n 'maj',\r\n 'qershor',\r\n 'korrik',\r\n 'gusht',\r\n 'shtator',\r\n 'tetor',\r\n 'nëntor',\r\n 'dhjetor'\r\n ]\r\n },\r\n sv: { // Swedish\r\n today: 'i dag',\r\n days: [\r\n 'sö',\r\n 'må',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lö'\r\n ],\r\n months: [\r\n 'januari',\r\n 'februari',\r\n 'mars',\r\n 'april',\r\n 'maj',\r\n 'juni',\r\n 'juli',\r\n 'augusti',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n th: { // Thai\r\n today: 'ในวันนี้',\r\n days: [\r\n 'อา.',\r\n 'จ.',\r\n 'อ.',\r\n 'พ.',\r\n 'พฤ.',\r\n 'ศ.',\r\n 'ส.'\r\n ],\r\n months: [\r\n 'มกราคม',\r\n 'กุมภาพันธ์',\r\n 'มีนาคม',\r\n 'เมษายน',\r\n 'พฤษภาคม',\r\n 'มิถุนายน',\r\n 'กรกฎาคม',\r\n 'สิงหาคม',\r\n 'กันยายน',\r\n 'ตุลาคม',\r\n 'พฤศจิกายน',\r\n 'ธันวาคม'\r\n ]\r\n },\r\n tr: { // Turkish\r\n today: 'bugün',\r\n days: [\r\n 'Paz',\r\n 'Pzt',\r\n 'Sal',\r\n 'Çar',\r\n 'Per',\r\n 'Cum',\r\n 'Cmt'\r\n ],\r\n months: [\r\n 'Ocak',\r\n 'Şubat',\r\n 'Mart',\r\n 'Nisan',\r\n 'Mayıs',\r\n 'Haziran',\r\n 'Temmuz',\r\n 'Ağustos',\r\n 'Eylül',\r\n 'Ekim',\r\n 'Kasım',\r\n 'Aralık'\r\n ]\r\n },\r\n ur: { // Urdu\r\n today: 'آج',\r\n days: [\r\n 'اتوار',\r\n 'پير',\r\n 'منگل',\r\n 'بدھ',\r\n 'جمعرات',\r\n 'جمعه',\r\n 'هفته'\r\n ],\r\n months: [\r\n 'جنوری',\r\n 'فروری',\r\n 'مارچ',\r\n 'اپریل',\r\n 'مئی',\r\n 'جون',\r\n 'جولائی',\r\n 'اگست',\r\n 'ستمبر',\r\n 'اکتوبر',\r\n 'نومبر',\r\n 'دسمبر'\r\n ]\r\n },\r\n id: { // Indonesian\r\n today: 'hari ini',\r\n days: [\r\n 'Minggu',\r\n 'Sen',\r\n 'Sel',\r\n 'Rabu',\r\n 'Kamis',\r\n 'Jumat',\r\n 'Sabtu'\r\n ],\r\n months: [\r\n 'Januari',\r\n 'Februari',\r\n 'Maret',\r\n 'April',\r\n 'Mei',\r\n 'Juni',\r\n 'Juli',\r\n 'Agustus',\r\n 'September',\r\n 'Oktober',\r\n 'Nopember',\r\n 'Desember'\r\n ]\r\n },\r\n uk: { // Ukrainian\r\n today: 'сьогодні',\r\n days: [\r\n 'Нд',\r\n 'Пн',\r\n 'Вт',\r\n 'Ср',\r\n 'Чт',\r\n 'Пт',\r\n 'Сб'\r\n ],\r\n months: [\r\n 'Січень',\r\n 'Лютий',\r\n 'Березень',\r\n 'Квітень',\r\n 'Травень',\r\n 'Червень',\r\n 'Липень',\r\n 'Серпень',\r\n 'Вересень',\r\n 'Жовтень',\r\n 'Листопад',\r\n 'Грудень'\r\n ]\r\n },\r\n be: { // Belarusian\r\n today: 'сёння',\r\n days: [\r\n 'нд',\r\n 'пн',\r\n 'аў',\r\n 'ср',\r\n 'чц',\r\n 'пт',\r\n 'сб'\r\n ],\r\n months: [\r\n 'Студзень',\r\n 'Люты',\r\n 'Сакавік',\r\n 'Красавік',\r\n 'Май',\r\n 'Чэрвень',\r\n 'Ліпень',\r\n 'Жнівень',\r\n 'Верасень',\r\n 'Кастрычнік',\r\n 'Лістапад',\r\n 'Снежань'\r\n ]\r\n },\r\n sl: { // Slovenian\r\n today: 'danes',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'tor',\r\n 'sre',\r\n 'čet',\r\n 'pet',\r\n 'sob'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'marec',\r\n 'april',\r\n 'maj',\r\n 'junij',\r\n 'julij',\r\n 'avgust',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'december'\r\n ]\r\n },\r\n et: { // Estonian\r\n today: 'täna',\r\n days: [\r\n 'P',\r\n 'E',\r\n 'T',\r\n 'K',\r\n 'N',\r\n 'R',\r\n 'L'\r\n ],\r\n months: [\r\n 'jaanuar',\r\n 'veebruar',\r\n 'märts',\r\n 'aprill',\r\n 'mai',\r\n 'juuni',\r\n 'juuli',\r\n 'august',\r\n 'september',\r\n 'oktoober',\r\n 'november',\r\n 'detsember'\r\n ]\r\n },\r\n lv: { // Latvian\r\n today: 'šodien',\r\n days: [\r\n 'sv',\r\n 'pr',\r\n 'ot',\r\n 'tr',\r\n 'ce',\r\n 'pk',\r\n 'se'\r\n ],\r\n months: [\r\n 'janvāris',\r\n 'februāris',\r\n 'marts',\r\n 'aprīlis',\r\n 'maijs',\r\n 'jūnijs',\r\n 'jūlijs',\r\n 'augusts',\r\n 'septembris',\r\n 'oktobris',\r\n 'novembris',\r\n 'decembris'\r\n ]\r\n },\r\n lt: { // Lithuanian\r\n today: 'šiandien',\r\n days: [\r\n 'Sk',\r\n 'Pr',\r\n 'An',\r\n 'Tr',\r\n 'Kt',\r\n 'Pn',\r\n 'Št'\r\n ],\r\n months: [\r\n 'sausis',\r\n 'vasaris',\r\n 'kovas',\r\n 'balandis',\r\n 'gegužė',\r\n 'birželis',\r\n 'liepa',\r\n 'rugpjūtis',\r\n 'rugsėjis',\r\n 'spalis',\r\n 'lapkritis',\r\n 'gruodis'\r\n ]\r\n },\r\n tg: { // Tajik\r\n today: 'имрӯз',\r\n days: [\r\n 'Яш',\r\n 'Дш',\r\n 'Сш',\r\n 'Чш',\r\n 'Пш',\r\n 'Ҷм',\r\n 'Шн'\r\n ],\r\n months: [\r\n 'Январ',\r\n 'Феврал',\r\n 'Март',\r\n 'Апрел',\r\n 'Май',\r\n 'Июн',\r\n 'Июл',\r\n 'Август',\r\n 'Сентябр',\r\n 'Октябр',\r\n 'Ноябр',\r\n 'Декабр'\r\n ]\r\n },\r\n fa: { // Persian\r\n today: 'امروز',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'جانفييه',\r\n 'فيفرييه',\r\n 'مارس',\r\n 'أفريل',\r\n 'مي',\r\n 'جوان',\r\n 'جوييه',\r\n 'أوت',\r\n 'سبتمبر',\r\n 'اكتوبر',\r\n 'نوفمبر',\r\n 'ديسمبر'\r\n ]\r\n },\r\n vi: { // Vietnamese\r\n today: 'hôm nay',\r\n days: [\r\n 'CN',\r\n 'Hai',\r\n 'Ba',\r\n 'Tư',\r\n 'Năm',\r\n 'Sáu',\r\n 'Bảy'\r\n ],\r\n months: [\r\n 'Tháng Giêng',\r\n 'Tháng Hai',\r\n 'Tháng Ba',\r\n 'Tháng Tư',\r\n 'Tháng Năm',\r\n 'Tháng Sáu',\r\n 'Tháng Bảy',\r\n 'Tháng Tám',\r\n 'Tháng Chín',\r\n 'Tháng Mười',\r\n 'Tháng Mười Một',\r\n 'Tháng Mười Hai'\r\n ]\r\n },\r\n hy: { // Armenian\r\n today: 'այսօր',\r\n days: [\r\n 'Կիր',\r\n 'Երկ',\r\n 'Երք',\r\n 'Չրք',\r\n 'Հնգ',\r\n 'ՈՒր',\r\n 'Շբթ'\r\n ],\r\n months: [\r\n 'Հունվար',\r\n 'Փետրվար',\r\n 'Մարտ',\r\n 'Ապրիլ',\r\n 'Մայիս',\r\n 'Հունիս',\r\n 'Հուլիս',\r\n 'Օգոստոս',\r\n 'Սեպտեմբեր',\r\n 'Հոկտեմբեր',\r\n 'Նոյեմբեր',\r\n 'Դեկտեմբեր'\r\n ]\r\n },\r\n az: { // Azeri\r\n today: 'bugün',\r\n days: [\r\n 'B',\r\n 'Be',\r\n 'Ça',\r\n 'Ç',\r\n 'Ca',\r\n 'C',\r\n 'Ş'\r\n ],\r\n months: [\r\n 'Yanvar',\r\n 'Fevral',\r\n 'Mart',\r\n 'Aprel',\r\n 'May',\r\n 'İyun',\r\n 'İyul',\r\n 'Avgust',\r\n 'Sentyabr',\r\n 'Oktyabr',\r\n 'Noyabr',\r\n 'Dekabr'\r\n ]\r\n },\r\n eu: { // Basque\r\n today: 'gaur',\r\n days: [\r\n 'ig.',\r\n 'al.',\r\n 'as.',\r\n 'az.',\r\n 'og.',\r\n 'or.',\r\n 'lr.'\r\n ],\r\n months: [\r\n 'urtarrila',\r\n 'otsaila',\r\n 'martxoa',\r\n 'apirila',\r\n 'maiatza',\r\n 'ekaina',\r\n 'uztaila',\r\n 'abuztua',\r\n 'iraila',\r\n 'urria',\r\n 'azaroa',\r\n 'abendua'\r\n ]\r\n },\r\n hsb: { // Upper Sorbian\r\n today: 'dźensa',\r\n days: [\r\n 'nje',\r\n 'pón',\r\n 'wut',\r\n 'srj',\r\n 'štw',\r\n 'pja',\r\n 'sob'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'měrc',\r\n 'apryl',\r\n 'meja',\r\n 'junij',\r\n 'julij',\r\n 'awgust',\r\n 'september',\r\n 'oktober',\r\n 'nowember',\r\n 'december'\r\n ]\r\n },\r\n mk: { // Macedonian (FYROM)\r\n today: 'денес',\r\n days: [\r\n 'нед',\r\n 'пон',\r\n 'втр',\r\n 'срд',\r\n 'чет',\r\n 'пет',\r\n 'саб'\r\n ],\r\n months: [\r\n 'јануари',\r\n 'февруари',\r\n 'март',\r\n 'април',\r\n 'мај',\r\n 'јуни',\r\n 'јули',\r\n 'август',\r\n 'септември',\r\n 'октомври',\r\n 'ноември',\r\n 'декември'\r\n ]\r\n },\r\n tn: { // Setswana\r\n today: 'Gompieno',\r\n days: [\r\n 'Ltp.',\r\n 'Mos.',\r\n 'Lbd.',\r\n 'Lbr.',\r\n 'Lbn.',\r\n 'Lbt.',\r\n 'Lmt.'\r\n ],\r\n months: [\r\n 'Ferikgong',\r\n 'Tlhakole',\r\n 'Mopitloe',\r\n 'Moranang',\r\n 'Motsheganong',\r\n 'Seetebosigo',\r\n 'Phukwi',\r\n 'Phatwe',\r\n 'Lwetse',\r\n 'Diphalane',\r\n 'Ngwanatsele',\r\n 'Sedimothole'\r\n ]\r\n },\r\n xh: { // isiXhosa\r\n today: 'namhlanje',\r\n days: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Mqungu',\r\n 'Mdumba',\r\n 'Kwindla',\r\n 'Tshazimpuzi',\r\n 'Canzibe',\r\n 'Silimela',\r\n 'Khala',\r\n 'Thupha',\r\n 'Msintsi',\r\n 'Dwarha',\r\n 'Nkanga',\r\n 'Mnga'\r\n ]\r\n },\r\n zu: { // isiZulu\r\n today: 'namhlanje',\r\n days: [\r\n 'Son.',\r\n 'Mso.',\r\n 'Bi.',\r\n 'Tha.',\r\n 'Ne.',\r\n 'Hla.',\r\n 'Mgq.'\r\n ],\r\n months: [\r\n 'uMasingana',\r\n 'uNhlolanja',\r\n 'uNdasa',\r\n 'uMbaso',\r\n 'uNhlaba',\r\n 'uNhlangulana',\r\n 'uNtulikazi',\r\n 'uNcwaba',\r\n 'uMandulo',\r\n 'uMfumfu',\r\n 'uLwezi',\r\n 'uZibandlela'\r\n ]\r\n },\r\n af: { // Afrikaans\r\n today: 'vandag',\r\n days: [\r\n 'Son',\r\n 'Maan',\r\n 'Dins',\r\n 'Woen',\r\n 'Dond',\r\n 'Vry',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Januarie',\r\n 'Februarie',\r\n 'Maart',\r\n 'April',\r\n 'Mei',\r\n 'Junie',\r\n 'Julie',\r\n 'Augustus',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Desember'\r\n ]\r\n },\r\n ka: { // Georgian\r\n today: 'დღეს',\r\n days: [\r\n 'კვირა',\r\n 'ორშაბათი',\r\n 'სამშაბათი',\r\n 'ოთხშაბათი',\r\n 'ხუთშაბათი',\r\n 'პარასკევი',\r\n 'შაბათი'\r\n ],\r\n months: [\r\n 'იანვარი',\r\n 'თებერვალი',\r\n 'მარტი',\r\n 'აპრილი',\r\n 'მაისი',\r\n 'ივნისი',\r\n 'ივლისი',\r\n 'აგვისტო',\r\n 'სექტემბერი',\r\n 'ოქტომბერი',\r\n 'ნოემბერი',\r\n 'დეკემბერი'\r\n ]\r\n },\r\n fo: { // Faroese\r\n today: 'í dag',\r\n days: [\r\n 'sun',\r\n 'mán',\r\n 'týs',\r\n 'mik',\r\n 'hós',\r\n 'frí',\r\n 'leyg'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'apríl',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n hi: { // Hindi\r\n today: 'आज',\r\n days: [\r\n 'रवि.',\r\n 'सोम.',\r\n 'मंगल.',\r\n 'बुध.',\r\n 'गुरु.',\r\n 'शुक्र.',\r\n 'शनि.'\r\n ],\r\n months: [\r\n 'जनवरी',\r\n 'फरवरी',\r\n 'मार्च',\r\n 'अप्रैल',\r\n 'मई',\r\n 'जून',\r\n 'जुलाई',\r\n 'अगस्त',\r\n 'सितम्बर',\r\n 'अक्तूबर',\r\n 'नवम्बर',\r\n 'दिसम्बर'\r\n ]\r\n },\r\n mt: { // Maltese\r\n today: 'illum',\r\n days: [\r\n 'Ħad',\r\n 'Tne',\r\n 'Tli',\r\n 'Erb',\r\n 'Ħam',\r\n 'Ġim',\r\n 'Sib'\r\n ],\r\n months: [\r\n 'Jannar',\r\n 'Frar',\r\n 'Marzu',\r\n 'April',\r\n 'Mejju',\r\n 'Ġunju',\r\n 'Lulju',\r\n 'Awissu',\r\n 'Settembru',\r\n 'Ottubru',\r\n 'Novembru',\r\n 'Diċembru'\r\n ]\r\n },\r\n se: { // Sami (Northern)\r\n today: 'odne',\r\n days: [\r\n 'sotn',\r\n 'vuos',\r\n 'maŋ',\r\n 'gask',\r\n 'duor',\r\n 'bear',\r\n 'láv'\r\n ],\r\n months: [\r\n 'ođđajagemánnu',\r\n 'guovvamánnu',\r\n 'njukčamánnu',\r\n 'cuoŋománnu',\r\n 'miessemánnu',\r\n 'geassemánnu',\r\n 'suoidnemánnu',\r\n 'borgemánnu',\r\n 'čakčamánnu',\r\n 'golggotmánnu',\r\n 'skábmamánnu',\r\n 'juovlamánnu'\r\n ]\r\n },\r\n ga: { // Irish\r\n today: 'inniu',\r\n days: [\r\n 'Domh',\r\n 'Luan',\r\n 'Máir',\r\n 'Céad',\r\n 'Déar',\r\n 'Aoi',\r\n 'Sath'\r\n ],\r\n months: [\r\n 'Eanáir',\r\n 'Feabhra',\r\n 'Márta',\r\n 'Aibreán',\r\n 'Bealtaine',\r\n 'Meitheamh',\r\n 'Iúil',\r\n 'Lúnasa',\r\n 'Meán Fómhair',\r\n 'Deireadh Fómhair',\r\n 'Samhain',\r\n 'Nollaig'\r\n ]\r\n },\r\n ms: { // Malay\r\n today: 'hari ini',\r\n days: [\r\n 'Ahad',\r\n 'Isnin',\r\n 'Sel',\r\n 'Rabu',\r\n 'Khamis',\r\n 'Jumaat',\r\n 'Sabtu'\r\n ],\r\n months: [\r\n 'Januari',\r\n 'Februari',\r\n 'Mac',\r\n 'April',\r\n 'Mei',\r\n 'Jun',\r\n 'Julai',\r\n 'Ogos',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Disember'\r\n ]\r\n },\r\n kk: { // Kazakh\r\n today: 'бүгін',\r\n days: [\r\n 'Жк',\r\n 'Дс',\r\n 'Сс',\r\n 'Ср',\r\n 'Бс',\r\n 'Жм',\r\n 'Сн'\r\n ],\r\n months: [\r\n 'қаңтар',\r\n 'ақпан',\r\n 'наурыз',\r\n 'сәуір',\r\n 'мамыр',\r\n 'маусым',\r\n 'шілде',\r\n 'тамыз',\r\n 'қыркүйек',\r\n 'қазан',\r\n 'қараша',\r\n 'желтоқсан'\r\n ]\r\n },\r\n ky: { // Kyrgyz\r\n today: 'бүгүн',\r\n days: [\r\n 'Жш',\r\n 'Дш',\r\n 'Шш',\r\n 'Шр',\r\n 'Бш',\r\n 'Жм',\r\n 'Иш'\r\n ],\r\n months: [\r\n 'Январь',\r\n 'Февраль',\r\n 'Март',\r\n 'Апрель',\r\n 'Май',\r\n 'Июнь',\r\n 'Июль',\r\n 'Август',\r\n 'Сентябрь',\r\n 'Октябрь',\r\n 'Ноябрь',\r\n 'Декабрь'\r\n ]\r\n },\r\n sw: { // Kiswahili\r\n today: 'leo',\r\n days: [\r\n 'Jumap.',\r\n 'Jumat.',\r\n 'Juman.',\r\n 'Jumat.',\r\n 'Alh.',\r\n 'Iju.',\r\n 'Jumam.'\r\n ],\r\n months: [\r\n 'Januari',\r\n 'Februari',\r\n 'Machi',\r\n 'Aprili',\r\n 'Mei',\r\n 'Juni',\r\n 'Julai',\r\n 'Agosti',\r\n 'Septemba',\r\n 'Oktoba',\r\n 'Novemba',\r\n 'Decemba'\r\n ]\r\n },\r\n tk: { // Turkmen\r\n today: 'bugün',\r\n days: [\r\n 'Db',\r\n 'Sb',\r\n 'Çb',\r\n 'Pb',\r\n 'An',\r\n 'Şb',\r\n 'Ýb'\r\n ],\r\n months: [\r\n 'Ýanwar',\r\n 'Fewral',\r\n 'Mart',\r\n 'Aprel',\r\n 'Maý',\r\n 'lýun',\r\n 'lýul',\r\n 'Awgust',\r\n 'Sentýabr',\r\n 'Oktýabr',\r\n 'Noýabr',\r\n 'Dekabr'\r\n ]\r\n },\r\n uz: { // Uzbek\r\n today: 'Bugun',\r\n days: [\r\n 'yak.',\r\n 'dsh.',\r\n 'sesh.',\r\n 'chr.',\r\n 'psh.',\r\n 'jm.',\r\n 'sh.'\r\n ],\r\n months: [\r\n 'yanvar',\r\n 'fevral',\r\n 'mart',\r\n 'aprel',\r\n 'may',\r\n 'iyun',\r\n 'iyul',\r\n 'avgust',\r\n 'sentyabr',\r\n 'oktyabr',\r\n 'noyabr',\r\n 'dekabr'\r\n ]\r\n },\r\n tt: { // Tatar\r\n today: 'бүген',\r\n days: [\r\n 'Якш',\r\n 'Дүш',\r\n 'Сиш',\r\n 'Чәрш',\r\n 'Пәнҗ',\r\n 'Җом',\r\n 'Шим'\r\n ],\r\n months: [\r\n 'Гыйнвар',\r\n 'Февраль',\r\n 'Март',\r\n 'Апрель',\r\n 'Май',\r\n 'Июнь',\r\n 'Июль',\r\n 'Август',\r\n 'Сентябрь',\r\n 'Октябрь',\r\n 'Ноябрь',\r\n 'Декабрь'\r\n ]\r\n },\r\n bn: { // Bengali\r\n today: 'আজ',\r\n days: [\r\n 'রবি.',\r\n 'সোম.',\r\n 'মঙ্গল.',\r\n 'বুধ.',\r\n 'বৃহস্পতি.',\r\n 'শুক্র.',\r\n 'শনি.'\r\n ],\r\n months: [\r\n 'জানুয়ারী',\r\n 'ফেব্রুয়ারী',\r\n 'মার্চ',\r\n 'এপ্রিল',\r\n 'মে',\r\n 'জুন',\r\n 'জুলাই',\r\n 'আগস্ট',\r\n 'সেপ্টেম্বর',\r\n 'অক্টোবর',\r\n 'নভেম্বর',\r\n 'ডিসেম্বর'\r\n ]\r\n },\r\n pa: { // Punjabi\r\n today: 'ਅੱਜ',\r\n days: [\r\n 'ਐਤ.',\r\n 'ਸੋਮ.',\r\n 'ਮੰਗਲ.',\r\n 'ਬੁੱਧ.',\r\n 'ਵੀਰ.',\r\n 'ਸ਼ੁਕਰ.',\r\n 'ਸ਼ਨਿੱਚਰ.'\r\n ],\r\n months: [\r\n 'ਜਨਵਰੀ',\r\n 'ਫ਼ਰਵਰੀ',\r\n 'ਮਾਰਚ',\r\n 'ਅਪ੍ਰੈਲ',\r\n 'ਮਈ',\r\n 'ਜੂਨ',\r\n 'ਜੁਲਾਈ',\r\n 'ਅਗਸਤ',\r\n 'ਸਤੰਬਰ',\r\n 'ਅਕਤੂਬਰ',\r\n 'ਨਵੰਬਰ',\r\n 'ਦਸੰਬਰ'\r\n ]\r\n },\r\n gu: { // Gujarati\r\n today: 'આજે',\r\n days: [\r\n 'રવિ',\r\n 'સોમ',\r\n 'મંગળ',\r\n 'બુધ',\r\n 'ગુરુ',\r\n 'શુક્ર',\r\n 'શનિ'\r\n ],\r\n months: [\r\n 'જાન્યુઆરી',\r\n 'ફેબ્રુઆરી',\r\n 'માર્ચ',\r\n 'એપ્રિલ',\r\n 'મે',\r\n 'જૂન',\r\n 'જુલાઈ',\r\n 'ઑગસ્ટ',\r\n 'સપ્ટેમ્બર',\r\n 'ઑક્ટ્બર',\r\n 'નવેમ્બર',\r\n 'ડિસેમ્બર'\r\n ]\r\n },\r\n or: { // Oriya\r\n today: 'ଆଜି',\r\n days: [\r\n 'ରବି.',\r\n 'ସୋମ.',\r\n 'ମଙ୍ଗଳ.',\r\n 'ବୁଧ.',\r\n 'ଗୁରୁ.',\r\n 'ଶୁକ୍ର.',\r\n 'ଶନି.'\r\n ],\r\n months: [\r\n 'ଜାନୁୟାରୀ',\r\n 'ଫ୍ରେବୃୟାରୀ',\r\n 'ମାର୍ଚ୍ଚ',\r\n 'ଏପ୍ରିଲ୍‌',\r\n 'ମେ',\r\n 'ଜୁନ୍‌',\r\n 'ଜୁଲାଇ',\r\n 'ଅଗଷ୍ଟ',\r\n 'ସେପ୍ଟେମ୍ବର',\r\n 'ଅକ୍ଟୋବର',\r\n 'ନଭେମ୍ବର',\r\n '(ଡିସେମ୍ବର'\r\n ]\r\n },\r\n ta: { // Tamil\r\n today: 'இன்று',\r\n days: [\r\n 'ஞாயிறு',\r\n 'திங்கள்',\r\n 'செவ்வாய்',\r\n 'புதன்',\r\n 'வியாழன்',\r\n 'வெள்ளி',\r\n 'சனி'\r\n ],\r\n months: [\r\n 'ஜனவரி',\r\n 'பிப்ரவரி',\r\n 'மார்ச்',\r\n 'ஏப்ரல்',\r\n 'மே',\r\n 'ஜூன்',\r\n 'ஜூலை',\r\n 'ஆகஸ்ட்',\r\n 'செப்டம்பர்',\r\n 'அக்டோபர்',\r\n 'நவம்பர்',\r\n 'டிசம்பர்'\r\n ]\r\n },\r\n te: { // Telugu\r\n today: 'నేడు',\r\n days: [\r\n 'ఆది.',\r\n 'సోమ.',\r\n 'మంగళ.',\r\n 'బుధ.',\r\n 'గురు.',\r\n 'శుక్ర.',\r\n 'శని.'\r\n ],\r\n months: [\r\n 'జనవరి',\r\n 'ఫిబ్రవరి',\r\n 'మార్చి',\r\n 'ఏప్రిల్',\r\n 'మే',\r\n 'జూన్',\r\n 'జూలై',\r\n 'ఆగస్టు',\r\n 'సెప్టెంబర్',\r\n 'అక్టోబర్',\r\n 'నవంబర్',\r\n 'డిసెంబర్'\r\n ]\r\n },\r\n kn: { // Kannada\r\n today: 'ಇಂದು',\r\n days: [\r\n 'ಭಾನು.',\r\n 'ಸೋಮ.',\r\n 'ಮಂಗಳ.',\r\n 'ಬುಧ.',\r\n 'ಗುರು.',\r\n 'ಶುಕ್ರ.',\r\n 'ಶನಿ.'\r\n ],\r\n months: [\r\n 'ಜನವರಿ',\r\n 'ಫೆಬ್ರವರಿ',\r\n 'ಮಾರ್ಚ್',\r\n 'ಎಪ್ರಿಲ್',\r\n 'ಮೇ',\r\n 'ಜೂನ್',\r\n 'ಜುಲೈ',\r\n 'ಆಗಸ್ಟ್',\r\n 'ಸೆಪ್ಟಂಬರ್',\r\n 'ಅಕ್ಟೋಬರ್',\r\n 'ನವೆಂಬರ್',\r\n 'ಡಿಸೆಂಬರ್'\r\n ]\r\n },\r\n ml: { // Malayalam\r\n today: 'ഇന്ന്',\r\n days: [\r\n 'ഞായർ.',\r\n 'തിങ്കൾ.',\r\n 'ചൊവ്വ.',\r\n 'ബുധൻ.',\r\n 'വ്യാഴം.',\r\n 'വെള്ളി.',\r\n 'ശനി.'\r\n ],\r\n months: [\r\n 'ജനുവരി',\r\n 'ഫെബ്റുവരി',\r\n 'മാറ്ച്ച്',\r\n 'ഏപ്റില്',\r\n 'മെയ്',\r\n 'ജൂണ്',\r\n 'ജൂലൈ',\r\n 'ഓഗസ്ററ്',\r\n 'സെപ്ററംബറ്',\r\n 'ഒക്ടോബറ്',\r\n 'നവംബറ്',\r\n 'ഡിസംബറ്'\r\n ]\r\n },\r\n as: { // Assamese\r\n today: 'আজি',\r\n days: [\r\n 'সোম.',\r\n 'মঙ্গল.',\r\n 'বুধ.',\r\n 'বৃহ.',\r\n 'শুক্র.',\r\n 'শনি.',\r\n 'ৰবি.'\r\n ],\r\n months: [\r\n 'জানুৱাৰী',\r\n 'ফেব্রুৱাৰী',\r\n 'মার্চ',\r\n 'এপ্রিল',\r\n 'মে',\r\n 'জুন',\r\n 'জুলাই',\r\n 'আগষ্ট',\r\n 'চেপ্টেম্বর',\r\n 'অক্টোবর',\r\n 'নবেম্বর',\r\n 'ডিচেম্বর'\r\n ]\r\n },\r\n mr: { // Marathi\r\n today: 'आज',\r\n days: [\r\n 'रवि.',\r\n 'सोम.',\r\n 'मंगळ.',\r\n 'बुध.',\r\n 'गुरु.',\r\n 'शुक्र.',\r\n 'शनि.'\r\n ],\r\n months: [\r\n 'जानेवारी',\r\n 'फेब्रुवारी',\r\n 'मार्च',\r\n 'एप्रिल',\r\n 'मे',\r\n 'जून',\r\n 'जुलै',\r\n 'ऑगस्ट',\r\n 'सप्टेंबर',\r\n 'ऑक्टोबर',\r\n 'नोव्हेंबर',\r\n 'डिसेंबर'\r\n ]\r\n },\r\n sa: { // Sanskrit\r\n today: 'अद्य',\r\n days: [\r\n 'रविवासरः',\r\n 'सोमवासरः',\r\n 'मङ्गलवासरः',\r\n 'बुधवासरः',\r\n 'गुरुवासरः',\r\n 'शुक्रवासरः',\r\n 'शनिवासरः'\r\n ],\r\n months: [\r\n 'जनवरी',\r\n 'फरवरी',\r\n 'मार्च',\r\n 'अप्रैल',\r\n 'मई',\r\n 'जून',\r\n 'जुलाई',\r\n 'अगस्त',\r\n 'सितम्बर',\r\n 'अक्तूबर',\r\n 'नवम्बर',\r\n 'दिसम्बर'\r\n ]\r\n },\r\n mn: { // Mongolian\r\n today: 'өнөөдөр',\r\n days: [\r\n 'Ня',\r\n 'Да',\r\n 'Мя',\r\n 'Лх',\r\n 'Пү',\r\n 'Ба',\r\n 'Бя'\r\n ],\r\n months: [\r\n '1 дүгээр сар',\r\n '2 дугаар сар',\r\n '3 дугаар сар',\r\n '4 дүгээр сар',\r\n '5 дугаар сар',\r\n '6 дугаар сар',\r\n '7 дугаар сар',\r\n '8 дугаар сар',\r\n '9 дүгээр сар',\r\n '10 дугаар сар',\r\n '11 дүгээр сар',\r\n '12 дугаар сар'\r\n ]\r\n },\r\n bo: { // Tibetan\r\n today: 'ད་རིང',\r\n days: [\r\n 'ཉི་མ།',\r\n 'ཟླ་བ།',\r\n 'མིག་དམར།',\r\n 'ལྷག་པ།',\r\n 'ཕུར་བུ།',\r\n 'པ་སངས།',\r\n 'སྤེན་པ།'\r\n ],\r\n months: [\r\n 'སྤྱི་ཟླ་དང་པོ།',\r\n 'སྤྱི་ཟླ་གཉིས་པ།',\r\n 'སྤྱི་ཟླ་གསུམ་པ།',\r\n 'སྤྱི་ཟླ་བཞི་པ།',\r\n 'སྤྱི་ཟླ་ལྔ་པ།',\r\n 'སྤྱི་ཟླ་དྲུག་པ།',\r\n 'སྤྱི་ཟླ་བདུན་པ།',\r\n 'སྤྱི་ཟླ་བརྒྱད་པ།',\r\n 'སྤྱི་ཟླ་དགུ་པ།',\r\n 'སྤྱི་ཟླ་བཅུ་པོ།',\r\n 'སྤྱི་ཟླ་བཅུ་གཅིག་པ།',\r\n 'སྤྱི་ཟླ་བཅུ་གཉིས་པ།'\r\n ]\r\n },\r\n cy: { // Welsh\r\n today: 'heddiw',\r\n days: [\r\n 'Sul',\r\n 'Llun',\r\n 'Maw',\r\n 'Mer',\r\n 'Iau',\r\n 'Gwe',\r\n 'Sad'\r\n ],\r\n months: [\r\n 'Ionawr',\r\n 'Chwefror',\r\n 'Mawrth',\r\n 'Ebrill',\r\n 'Mai',\r\n 'Mehefin',\r\n 'Gorffennaf',\r\n 'Awst',\r\n 'Medi',\r\n 'Hydref',\r\n 'Tachwedd',\r\n 'Rhagfyr'\r\n ]\r\n },\r\n km: { // Khmer\r\n today: 'ថ្ងៃនេះ',\r\n days: [\r\n 'អាទិ.',\r\n 'ច.',\r\n 'អ.',\r\n 'ពុ',\r\n 'ព្រហ.',\r\n 'សុ.',\r\n 'ស.'\r\n ],\r\n months: [\r\n 'មករា',\r\n 'កុម្ភៈ',\r\n 'មិនា',\r\n 'មេសា',\r\n 'ឧសភា',\r\n 'មិថុនា',\r\n 'កក្កដា',\r\n 'សីហា',\r\n 'កញ្ញា',\r\n 'តុលា',\r\n 'វិច្ឆិកា',\r\n 'ធ្នូ'\r\n ]\r\n },\r\n lo: { // Lao\r\n today: 'ໃນມື້ນີ້',\r\n days: [\r\n 'ອາທິດ',\r\n 'ຈັນ',\r\n 'ອັງຄານ',\r\n 'ພຸດ',\r\n 'ພະຫັດ',\r\n 'ສຸກ',\r\n 'ເສົາ'\r\n ],\r\n months: [\r\n 'ມັງກອນ',\r\n 'ກຸມພາ',\r\n 'ມີນາ',\r\n 'ເມສາ',\r\n 'ພຶດສະພາ',\r\n 'ມິຖຸນາ',\r\n 'ກໍລະກົດ',\r\n 'ສິງຫາ',\r\n 'ກັນຍາ',\r\n 'ຕຸລາ',\r\n 'ພະຈິກ',\r\n 'ທັນວາ'\r\n ]\r\n },\r\n gl: { // Galician\r\n today: 'hoxe',\r\n days: [\r\n 'dom',\r\n 'luns',\r\n 'mar',\r\n 'mér',\r\n 'xov',\r\n 'ven',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'xaneiro',\r\n 'febreiro',\r\n 'marzo',\r\n 'abril',\r\n 'maio',\r\n 'xuño',\r\n 'xullo',\r\n 'agosto',\r\n 'setembro',\r\n 'outubro',\r\n 'novembro',\r\n 'decembro'\r\n ]\r\n },\r\n kok: { // Konkani\r\n today: 'आजि',\r\n days: [\r\n 'आय.',\r\n 'सोम.',\r\n 'मंगळ.',\r\n 'बुध.',\r\n 'बिरे.',\r\n 'सुक्र.',\r\n 'शेन.'\r\n ],\r\n months: [\r\n 'जानेवारी',\r\n 'फेब्रुवारी',\r\n 'मार्च',\r\n 'एप्रिल',\r\n 'मे',\r\n 'जून',\r\n 'जुलै',\r\n 'ऑगस्ट',\r\n 'सप्टेंबर',\r\n 'ऑक्टोबर',\r\n 'नोवेम्बर',\r\n 'डिसेंबर'\r\n ]\r\n },\r\n syr: { // Syriac\r\n today: 'ܝܘܡܐ',\r\n days: [\r\n '܏ܐ ܏ܒܫ',\r\n '܏ܒ ܏ܒܫ',\r\n '܏ܓ ܏ܒܫ',\r\n '܏ܕ ܏ܒܫ',\r\n '܏ܗ ܏ܒܫ',\r\n '܏ܥܪܘܒ',\r\n '܏ܫܒ'\r\n ],\r\n months: [\r\n 'ܟܢܘܢ ܐܚܪܝ',\r\n 'ܫܒܛ',\r\n 'ܐܕܪ',\r\n 'ܢܝܣܢ',\r\n 'ܐܝܪ',\r\n 'ܚܙܝܪܢ',\r\n 'ܬܡܘܙ',\r\n 'ܐܒ',\r\n 'ܐܝܠܘܠ',\r\n 'ܬܫܪܝ ܩܕܝܡ',\r\n 'ܬܫܪܝ ܐܚܪܝ',\r\n 'ܟܢܘܢ ܩܕܝܡ'\r\n ]\r\n },\r\n si: { // Sinhala\r\n today: 'අද',\r\n days: [\r\n 'ඉරිදා',\r\n 'සඳුදා',\r\n 'කුජදා',\r\n 'බුදදා',\r\n 'ගුරුදා',\r\n 'කිවිදා',\r\n 'ශනිදා'\r\n ],\r\n months: [\r\n 'ජනවාරි',\r\n 'පෙබරවාරි',\r\n 'මාර්තු',\r\n 'අ‌ප්‍රේල්',\r\n 'මැයි',\r\n 'ජූනි',\r\n 'ජූලි',\r\n 'අ‌ගෝස්තු',\r\n 'සැප්තැම්බර්',\r\n 'ඔක්තෝබර්',\r\n 'නොවැම්බර්',\r\n 'දෙසැම්බර්'\r\n ]\r\n },\r\n iu: { // Inuktitut\r\n today: 'ullumi',\r\n days: [\r\n 'Nat',\r\n 'Nag',\r\n 'Aip',\r\n 'Pi',\r\n 'Sit',\r\n 'Tal',\r\n 'Siv'\r\n ],\r\n months: [\r\n 'Jaannuari',\r\n 'Viivvuari',\r\n 'Maatsi',\r\n 'Iipuri',\r\n 'Mai',\r\n 'Juuni',\r\n 'Julai',\r\n 'Aaggiisi',\r\n 'Sitipiri',\r\n 'Utupiri',\r\n 'Nuvipiri',\r\n 'Tisipiri'\r\n ]\r\n },\r\n am: { // Amharic\r\n today: 'ዛሬ',\r\n days: [\r\n 'እሑድ',\r\n 'ሰኞ',\r\n 'ማክሰ',\r\n 'ረቡዕ',\r\n 'ሐሙስ',\r\n 'ዓርብ',\r\n 'ቅዳሜ'\r\n ],\r\n months: [\r\n 'ጃንዩወሪ',\r\n 'ፌብሩወሪ',\r\n 'ማርች',\r\n 'ኤፕረል',\r\n 'ሜይ',\r\n 'ጁን',\r\n 'ጁላይ',\r\n 'ኦገስት',\r\n 'ሴፕቴምበር',\r\n 'ኦክተውበር',\r\n 'ኖቬምበር',\r\n 'ዲሴምበር'\r\n ]\r\n },\r\n tzm: { // Tamazight\r\n today: 'assa',\r\n days: [\r\n 'Ace',\r\n 'Ari',\r\n 'Ara',\r\n 'Aha',\r\n 'Amh',\r\n 'Sem',\r\n 'Sed'\r\n ],\r\n months: [\r\n 'Yenayer',\r\n 'Furar',\r\n 'Maghres',\r\n 'Yebrir',\r\n 'Mayu',\r\n 'Yunyu',\r\n 'Yulyu',\r\n 'Ghuct',\r\n 'Cutenber',\r\n 'Ktuber',\r\n 'Wambir',\r\n 'Dujanbir'\r\n ]\r\n },\r\n ne: { // Nepali\r\n today: 'आज',\r\n days: [\r\n 'आइत',\r\n 'सोम',\r\n 'मङ्गल',\r\n 'बुध',\r\n 'बिही',\r\n 'शुक्र',\r\n 'शनि'\r\n ],\r\n months: [\r\n 'जनवरी',\r\n 'फेब्रुअरी',\r\n 'मार्च',\r\n 'अप्रिल',\r\n 'मे',\r\n 'जून',\r\n 'जुलाई',\r\n 'अगस्त',\r\n 'सेप्टेम्बर',\r\n 'अक्टोबर',\r\n 'नोभेम्बर',\r\n 'डिसेम्बर'\r\n ]\r\n },\r\n fy: { // Frisian\r\n today: 'hjoed',\r\n days: [\r\n 'Sn',\r\n 'Mo',\r\n 'Ti',\r\n 'Wo',\r\n 'To',\r\n 'Fr',\r\n 'Sn'\r\n ],\r\n months: [\r\n 'jannewaris',\r\n 'febrewaris',\r\n 'maart',\r\n 'april',\r\n 'maaie',\r\n 'juny',\r\n 'july',\r\n 'augustus',\r\n 'septimber',\r\n 'oktober',\r\n 'novimber',\r\n 'desimber'\r\n ]\r\n },\r\n ps: { // Pashto\r\n today: 'نن ورځ',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'محرم',\r\n 'صفر',\r\n 'ربيع الأول',\r\n 'ربيع الثاني',\r\n 'جمادى الأولى',\r\n 'جمادى الثانية',\r\n 'رجب',\r\n 'شعبان',\r\n 'رمضان',\r\n 'شوال',\r\n 'ذو القعدة',\r\n 'ذو الحجة'\r\n ]\r\n },\r\n fil: { // Filipino\r\n today: 'ngayon',\r\n days: [\r\n 'Lin',\r\n 'Lun',\r\n 'Mar',\r\n 'Mier',\r\n 'Hueb',\r\n 'Bier',\r\n 'Saba'\r\n ],\r\n months: [\r\n 'Enero',\r\n 'Pebrero',\r\n 'Marso',\r\n 'Abril',\r\n 'Mayo',\r\n 'Hunyo',\r\n 'Hulyo',\r\n 'Agosto',\r\n 'Septyembre',\r\n 'Oktubre',\r\n 'Nobyembre',\r\n 'Disyembre'\r\n ]\r\n },\r\n dv: { // Divehi\r\n today: 'މިއަދު',\r\n days: [\r\n 'އާދީއްތަ',\r\n 'ހޯމަ',\r\n 'އަންގާރަ',\r\n 'ބުދަ',\r\n 'ބުރާސްފަތި',\r\n 'ހުކުރު',\r\n 'ހޮނިހިރު'\r\n ],\r\n months: [\r\n 'މުޙައްރަމް',\r\n 'ޞަފަރު',\r\n 'ރަބީޢުލްއައްވަލް',\r\n 'ރަބީޢުލްއާޚިރު',\r\n 'ޖުމާދަލްއޫލާ',\r\n 'ޖުމާދަލްއާޚިރާ',\r\n 'ރަޖަބް',\r\n 'ޝަޢްބާން',\r\n 'ރަމަޟާން',\r\n 'ޝައްވާލް',\r\n 'ޛުލްޤަޢިދާ',\r\n 'ޛުލްޙިއްޖާ'\r\n ]\r\n },\r\n ha: { // Hausa\r\n today: 'yau',\r\n days: [\r\n 'Lah',\r\n 'Lit',\r\n 'Tal',\r\n 'Lar',\r\n 'Alh',\r\n 'Jum',\r\n 'Asa'\r\n ],\r\n months: [\r\n 'Januwaru',\r\n 'Febreru',\r\n 'Maris',\r\n 'Afrilu',\r\n 'Mayu',\r\n 'Yuni',\r\n 'Yuli',\r\n 'Agusta',\r\n 'Satumba',\r\n 'Oktocba',\r\n 'Nuwamba',\r\n 'Disamba'\r\n ]\r\n },\r\n yo: { // Yoruba\r\n today: 'loni',\r\n days: [\r\n 'Aik',\r\n 'Aje',\r\n 'Ise',\r\n 'Ojo',\r\n 'Ojo',\r\n 'Eti',\r\n 'Aba'\r\n ],\r\n months: [\r\n 'Osu kinni',\r\n 'Osu keji',\r\n 'Osu keta',\r\n 'Osu kerin',\r\n 'Osu karun',\r\n 'Osu kefa',\r\n 'Osu keje',\r\n 'Osu kejo',\r\n 'Osu kesan',\r\n 'Osu kewa',\r\n 'Osu kokanla',\r\n 'Osu keresi'\r\n ]\r\n },\r\n quz: { // Quechua\r\n today: 'kunan',\r\n days: [\r\n 'int',\r\n 'kil',\r\n 'ati',\r\n 'quy',\r\n 'Ch\\'',\r\n 'Ill',\r\n 'k\\'u'\r\n ],\r\n months: [\r\n 'Qulla puquy',\r\n 'Hatun puquy',\r\n 'Pauqar waray',\r\n 'ayriwa',\r\n 'Aymuray',\r\n 'Inti raymi',\r\n 'Anta Sitwa',\r\n 'Qhapaq Sitwa',\r\n 'Uma raymi',\r\n 'Kantaray',\r\n 'Ayamarq\\'a',\r\n 'Kapaq Raymi'\r\n ]\r\n },\r\n nso: { // Sesotho sa Leboa\r\n today: 'Lehono',\r\n days: [\r\n 'Lam',\r\n 'Moš',\r\n 'Lbb',\r\n 'Lbr',\r\n 'Lbn',\r\n 'Lbh',\r\n 'Mok'\r\n ],\r\n months: [\r\n 'Pherekgong',\r\n 'Hlakola',\r\n 'Mopitlo',\r\n 'Moranang',\r\n 'Mosegamanye',\r\n 'Ngoatobošego',\r\n 'Phuphu',\r\n 'Phato',\r\n 'Lewedi',\r\n 'Diphalana',\r\n 'Dibatsela',\r\n 'Manthole'\r\n ]\r\n },\r\n ba: { // Bashkir\r\n today: 'бөгөн',\r\n days: [\r\n 'Йш',\r\n 'Дш',\r\n 'Шш',\r\n 'Шр',\r\n 'Кс',\r\n 'Йм',\r\n 'Шб'\r\n ],\r\n months: [\r\n 'ғинуар',\r\n 'февраль',\r\n 'март',\r\n 'апрель',\r\n 'май',\r\n 'июнь',\r\n 'июль',\r\n 'август',\r\n 'сентябрь',\r\n 'октябрь',\r\n 'ноябрь',\r\n 'декабрь'\r\n ]\r\n },\r\n lb: { // Luxembourgish\r\n today: 'haut',\r\n days: [\r\n 'Son',\r\n 'Méi',\r\n 'Dën',\r\n 'Mët',\r\n 'Don',\r\n 'Fre',\r\n 'Sam'\r\n ],\r\n months: [\r\n 'Januar',\r\n 'Februar',\r\n 'Mäerz',\r\n 'Abrëll',\r\n 'Mee',\r\n 'Juni',\r\n 'Juli',\r\n 'August',\r\n 'September',\r\n 'Oktober',\r\n 'November',\r\n 'Dezember'\r\n ]\r\n },\r\n kl: { // Greenlandic\r\n today: 'ullumi',\r\n days: [\r\n 'sap',\r\n 'ata',\r\n 'mar',\r\n 'ping',\r\n 'sis',\r\n 'tal',\r\n 'arf'\r\n ],\r\n months: [\r\n 'januari',\r\n 'februari',\r\n 'martsi',\r\n 'apriili',\r\n 'maaji',\r\n 'juni',\r\n 'juli',\r\n 'aggusti',\r\n 'septembari',\r\n 'oktobari',\r\n 'novembari',\r\n 'decembari'\r\n ]\r\n },\r\n ig: { // Igbo\r\n today: 'taa',\r\n days: [\r\n 'Aik',\r\n 'Aje',\r\n 'Ise',\r\n 'Ojo',\r\n 'Ojo',\r\n 'Eti',\r\n 'Aba'\r\n ],\r\n months: [\r\n 'Onwa mbu',\r\n 'Onwa ibua',\r\n 'Onwa ato',\r\n 'Onwa ano',\r\n 'Onwa ise',\r\n 'Onwa isi',\r\n 'Onwa asa',\r\n 'Onwa asato',\r\n 'Onwa itolu',\r\n 'Onwa iri',\r\n 'Onwa iri n\\'ofu',\r\n 'Onwa iri n\\'ibua'\r\n ]\r\n },\r\n ii: { // Yi\r\n today: 'ꀃꑍ',\r\n days: [\r\n 'ꑭꆏ',\r\n 'ꆏ꒔',\r\n 'ꆏꑍ',\r\n 'ꆏꌕ',\r\n 'ꆏꇖ',\r\n 'ꆏꉬ',\r\n 'ꆏꃘ'\r\n ],\r\n months: [\r\n 'ꋍꆪ',\r\n 'ꑍꆪ',\r\n 'ꌕꆪ',\r\n 'ꇖꆪ',\r\n 'ꉬꆪ',\r\n 'ꃘꆪ',\r\n 'ꏃꆪ',\r\n 'ꉆꆪ',\r\n 'ꈬꆪ',\r\n 'ꊰꆪ',\r\n 'ꊯꊪꆪ',\r\n 'ꊰꑋꆪ'\r\n ]\r\n },\r\n arn: { // Mapudungun\r\n today: 'fachantü',\r\n days: [\r\n 'dom',\r\n 'lun',\r\n 'mar',\r\n 'mié',\r\n 'jue',\r\n 'vie',\r\n 'sáb'\r\n ],\r\n months: [\r\n 'enero',\r\n 'febrero',\r\n 'marzo',\r\n 'abril',\r\n 'mayo',\r\n 'junio',\r\n 'julio',\r\n 'agosto',\r\n 'septiembre',\r\n 'octubre',\r\n 'noviembre',\r\n 'diciembre'\r\n ]\r\n },\r\n moh: { // Mohawk\r\n today: 'okàra',\r\n days: [\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Tsothohrkó:Wa',\r\n 'Enniska',\r\n 'Enniskó:Wa',\r\n 'Onerahtókha',\r\n 'Onerahtohkó:Wa',\r\n 'Ohiari:Ha',\r\n 'Ohiarihkó:Wa',\r\n 'Seskéha',\r\n 'Seskehkó:Wa',\r\n 'Kenténha',\r\n 'Kentenhkó:Wa',\r\n 'Tsothóhrha'\r\n ]\r\n },\r\n br: { // Breton\r\n today: 'hiziv',\r\n days: [\r\n 'Sul',\r\n 'Lun',\r\n 'Meu.',\r\n 'Mer.',\r\n 'Yaou',\r\n 'Gwe.',\r\n 'Sad.'\r\n ],\r\n months: [\r\n 'Genver',\r\n 'C\\'hwevrer',\r\n 'Meurzh',\r\n 'Ebrel',\r\n 'Mae',\r\n 'Mezheven',\r\n 'Gouere',\r\n 'Eost',\r\n 'Gwengolo',\r\n 'Here',\r\n 'Du',\r\n 'Kerzu'\r\n ]\r\n },\r\n ug: { // Uyghur\r\n today: 'bügün',\r\n days: [\r\n 'يە',\r\n 'دۈ',\r\n 'سە',\r\n 'چا',\r\n 'پە',\r\n 'جۈ',\r\n 'شە'\r\n ],\r\n months: [\r\n '1-ئاي',\r\n '2-ئاي',\r\n '3-ئاي',\r\n '4-ئاي',\r\n '5-ئاي',\r\n '6-ئاي',\r\n '7-ئاي',\r\n '8-ئاي',\r\n '9-ئاي',\r\n '10-ئاي',\r\n '11-ئاي',\r\n '12-ئاي'\r\n ]\r\n },\r\n mi: { // Maori\r\n today: 'i tenei ra',\r\n days: [\r\n 'Ta',\r\n 'Hi',\r\n 'Tū',\r\n 'Apa',\r\n 'Pa',\r\n 'Me',\r\n 'Ho'\r\n ],\r\n months: [\r\n 'Kohi-tātea',\r\n 'Hui-tanguru',\r\n 'Poutū-te-rangi',\r\n 'Paenga-whāwhā',\r\n 'Haratua',\r\n 'Pipiri',\r\n 'Hōngongoi',\r\n 'Here-turi-kōkā',\r\n 'Mahuru',\r\n 'Whiringa-ā-nuku',\r\n 'Whiringa-ā-rangi',\r\n 'Hakihea'\r\n ]\r\n },\r\n oc: { // Occitan\r\n today: 'uèi',\r\n days: [\r\n 'dim.',\r\n 'lun.',\r\n 'mar.',\r\n 'mèc.',\r\n 'jòu.',\r\n 'ven.',\r\n 'sab.'\r\n ],\r\n months: [\r\n 'genier',\r\n 'febrier',\r\n 'març',\r\n 'abril',\r\n 'mai',\r\n 'junh',\r\n 'julh',\r\n 'agost',\r\n 'setembre',\r\n 'octobre',\r\n 'novembre',\r\n 'desembre'\r\n ]\r\n },\r\n co: { // Corsican\r\n today: 'oghje',\r\n days: [\r\n 'dum.',\r\n 'lun.',\r\n 'mar.',\r\n 'mer.',\r\n 'ghj.',\r\n 'ven.',\r\n 'sab.'\r\n ],\r\n months: [\r\n 'ghjennaghju',\r\n 'ferraghju',\r\n 'marzu',\r\n 'aprile',\r\n 'maghju',\r\n 'ghjunghju',\r\n 'lugliu',\r\n 'aostu',\r\n 'settembre',\r\n 'ottobre',\r\n 'nuvembre',\r\n 'dicembre'\r\n ]\r\n },\r\n gsw: { // Alsatian\r\n today: 'heit',\r\n days: [\r\n 'Su.',\r\n 'Mo.',\r\n 'Di.',\r\n 'Mi.',\r\n 'Du.',\r\n 'Fr.',\r\n 'Sà.'\r\n ],\r\n months: [\r\n 'Jänner',\r\n 'Feverje',\r\n 'März',\r\n 'Àpril',\r\n 'Mai',\r\n 'Jüni',\r\n 'Jüli',\r\n 'Augscht',\r\n 'September',\r\n 'Oktower',\r\n 'Nowember',\r\n 'Dezember'\r\n ]\r\n },\r\n sah: { // Yakut\r\n today: 'bügün',\r\n days: [\r\n 'Бс',\r\n 'Бн',\r\n 'Оп',\r\n 'Ср',\r\n 'Чп',\r\n 'Бт',\r\n 'Сб'\r\n ],\r\n months: [\r\n 'Тохсунньу',\r\n 'Олунньу',\r\n 'Кулун тутар',\r\n 'Муус устар',\r\n 'Ыам ыйа',\r\n 'Бэс ыйа',\r\n 'От ыйа',\r\n 'Атырдьах ыйа',\r\n 'Балаҕан ыйа',\r\n 'Алтынньы',\r\n 'Сэтинньи',\r\n 'Ахсынньы'\r\n ]\r\n },\r\n qut: { // K'iche\r\n today: '[kamik]',\r\n days: [\r\n 'juq',\r\n 'kaq',\r\n 'oxq',\r\n 'kajq',\r\n 'joq',\r\n 'waqq',\r\n 'wuqq'\r\n ],\r\n months: [\r\n 'nab\\'e ik\\'',\r\n 'ukab\\' ik\\'',\r\n 'rox ik\\'',\r\n 'ukaj ik\\'',\r\n 'uro\\' ik\\'',\r\n 'uwaq ik\\'',\r\n 'uwuq ik\\'',\r\n 'uwajxaq ik\\'',\r\n 'ub\\'elej ik\\'',\r\n 'ulaj ik\\'',\r\n 'ujulaj ik\\'',\r\n 'ukab\\'laj ik\\''\r\n ]\r\n },\r\n rw: { // Kinyarwanda\r\n today: 'uyu munsi',\r\n days: [\r\n 'mbe.',\r\n 'kab.',\r\n 'gat.',\r\n 'kan.',\r\n 'gat.',\r\n 'gat.',\r\n 'cyu.'\r\n ],\r\n months: [\r\n 'Mutarama',\r\n 'Gashyantare',\r\n 'Werurwe',\r\n 'Mata',\r\n 'Gicurasi',\r\n 'Kamena',\r\n 'Nyakanga',\r\n 'Kanama',\r\n 'Nzeli',\r\n 'Ukwakira',\r\n 'Ugushyingo',\r\n 'Ukuboza'\r\n ]\r\n },\r\n wo: { // Wolof\r\n today: 'tey',\r\n days: [\r\n 'dim.',\r\n 'lun.',\r\n 'mar.',\r\n 'mer.',\r\n 'jeu.',\r\n 'ven.',\r\n 'sam.'\r\n ],\r\n months: [\r\n 'janvier',\r\n 'février',\r\n 'mars',\r\n 'avril',\r\n 'mai',\r\n 'juin',\r\n 'juillet',\r\n 'août',\r\n 'septembre',\r\n 'octobre',\r\n 'novembre',\r\n 'décembre'\r\n ]\r\n },\r\n prs: { // Dari\r\n today: 'امروز',\r\n days: [\r\n 'الأحد',\r\n 'الإثنين',\r\n 'الثلاثاء',\r\n 'الأربعاء',\r\n 'الخميس',\r\n 'الجمعة',\r\n 'السبت'\r\n ],\r\n months: [\r\n 'محرم',\r\n 'صفر',\r\n 'ربيع الأول',\r\n 'ربيع الثاني',\r\n 'جمادى الأولى',\r\n 'جمادى الثانية',\r\n 'رجب',\r\n 'شعبان',\r\n 'رمضان',\r\n 'شوال',\r\n 'ذو القعدة',\r\n 'ذو الحجة'\r\n ]\r\n },\r\n gd: { // Scottish Gaelic\r\n today: 'an-diugh',\r\n days: [\r\n 'Dòm',\r\n 'Lua',\r\n 'Mài',\r\n 'Cia',\r\n 'Ard',\r\n 'Hao',\r\n 'Sat'\r\n ],\r\n months: [\r\n 'Am Faoilleach',\r\n 'An Gearran',\r\n 'Am Màrt',\r\n 'An Giblean',\r\n 'An Cèitean',\r\n 'An t-Ògmhios',\r\n 'An t-Iuchar',\r\n 'An Lùnastal',\r\n 'An t-Sultain',\r\n 'An Dàmhair',\r\n 'An t-Samhain',\r\n 'An Dùbhlachd'\r\n ]\r\n },\r\n smn: { // Sami (Inari)\r\n today: 'onne',\r\n days: [\r\n 'pa',\r\n 'vu',\r\n 'ma',\r\n 'ko',\r\n 'tu',\r\n 'vá',\r\n 'lá'\r\n ],\r\n months: [\r\n 'uđđâivemáánu',\r\n 'kuovâmáánu',\r\n 'njuhčâmáánu',\r\n 'cuáŋuimáánu',\r\n 'vyesimáánu',\r\n 'kesimáánu',\r\n 'syeinimáánu',\r\n 'porgemáánu',\r\n 'čohčâmáánu',\r\n 'roovvâdmáánu',\r\n 'skammâmáánu',\r\n 'juovlâmáánu'\r\n ]\r\n },\r\n sms: { // Sami (Skolt)\r\n today: 'pei ́vv',\r\n days: [\r\n 'pâ',\r\n 'vu',\r\n 'mâ',\r\n 'se',\r\n 'ne',\r\n 'pi',\r\n 'su'\r\n ],\r\n months: [\r\n 'ođđee´jjmään',\r\n 'tä´lvvmään',\r\n 'pâ´zzlâšttammään',\r\n 'njuhččmään',\r\n 'vue´ssmään',\r\n 'ǩie´ssmään',\r\n 'suei´nnmään',\r\n 'på´rǧǧmään',\r\n 'čõhččmään',\r\n 'kålggmään',\r\n 'skamm´mään',\r\n 'rosttovmään'\r\n ]\r\n },\r\n zh: { // Simplified Chinese \r\n days: [\r\n '星期天',\r\n '星期一',\r\n '星期二',\r\n '星期三',\r\n '星期四',\r\n '星期五',\r\n '星期六'\r\n ],\r\n months: [\r\n '一月',\r\n '二月',\r\n '三月',\r\n '四月',\r\n '五月',\r\n '六月',\r\n '七月',\r\n '八月',\r\n '九月',\r\n '十月',\r\n '十一月',\r\n '十二月'\r\n ],\r\n today: '今天',\r\n },\r\n 'zh-hans': { //Simplified Chinese, informal\r\n days: [\r\n '周日',\r\n '周一',\r\n '周二',\r\n '周三',\r\n '周四',\r\n '周五',\r\n '周六'\r\n ],\r\n months: [\r\n '一月',\r\n '二月',\r\n '三月',\r\n '四月',\r\n '五月',\r\n '六月',\r\n '七月',\r\n '八月',\r\n '九月',\r\n '十月',\r\n '十一月',\r\n '十二月'\r\n ],\r\n today: '今天',\r\n },\r\n 'zh-hant': { // Traditional Chinese\r\n days: [\r\n '週日',\r\n '週一',\r\n '週二',\r\n '週三',\r\n '週四',\r\n '週五',\r\n '週六'\r\n ],\r\n months: [\r\n '一月',\r\n '二月',\r\n '三月',\r\n '四月',\r\n '五月',\r\n '六月',\r\n '七月',\r\n '八月',\r\n '九月',\r\n '十月',\r\n '十一月',\r\n '十二月'\r\n ],\r\n today: '今天',\r\n },\r\n nn: { // Norwegian (Nynorsk)\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'må',\r\n 'ty',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'la'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'april',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n bs: { // Bosnian\r\n today: 'danas',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'uto',\r\n 'sri',\r\n 'čet',\r\n 'pet',\r\n 'sub'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mart',\r\n 'april',\r\n 'maj',\r\n 'juni',\r\n 'juli',\r\n 'avgust',\r\n 'septembar',\r\n 'oktobar',\r\n 'novembar',\r\n 'decembar'\r\n ]\r\n },\r\n sma: { // Sami (Southern)\r\n today: 'daenbiejjien',\r\n days: [\r\n 'aej',\r\n 'måa',\r\n 'dæj',\r\n 'gask',\r\n 'duar',\r\n 'bearj',\r\n 'laav'\r\n ],\r\n months: [\r\n 'tsïengele',\r\n 'goevte',\r\n 'njoktje',\r\n 'voerhtje',\r\n 'suehpede',\r\n 'ruffie',\r\n 'snjaltje',\r\n 'mïetske',\r\n 'skïerede',\r\n 'golke',\r\n 'rahka',\r\n 'goeve'\r\n ]\r\n },\r\n nb: { // Norwegian (Bokmål)\r\n today: 'i dag',\r\n days: [\r\n 'sø',\r\n 'ma',\r\n 'ti',\r\n 'on',\r\n 'to',\r\n 'fr',\r\n 'lø'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mars',\r\n 'april',\r\n 'mai',\r\n 'juni',\r\n 'juli',\r\n 'august',\r\n 'september',\r\n 'oktober',\r\n 'november',\r\n 'desember'\r\n ]\r\n },\r\n sr: { // Serbian\r\n today: 'данас',\r\n days: [\r\n 'ned',\r\n 'pon',\r\n 'uto',\r\n 'sre',\r\n 'čet',\r\n 'pet',\r\n 'sub'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'mart',\r\n 'april',\r\n 'maj',\r\n 'jun',\r\n 'jul',\r\n 'avgust',\r\n 'septembar',\r\n 'oktobar',\r\n 'novembar',\r\n 'decembar'\r\n ]\r\n },\r\n dsb: { // Lower Sorbian\r\n today: 'źinsa',\r\n days: [\r\n 'nje',\r\n 'pon',\r\n 'wał',\r\n 'srj',\r\n 'stw',\r\n 'pět',\r\n 'sob'\r\n ],\r\n months: [\r\n 'januar',\r\n 'februar',\r\n 'měrc',\r\n 'apryl',\r\n 'maj',\r\n 'junij',\r\n 'julij',\r\n 'awgust',\r\n 'september',\r\n 'oktober',\r\n 'nowember',\r\n 'december'\r\n ]\r\n },\r\n smj: { // Sami (Lule)\r\n today: 'uddni',\r\n days: [\r\n 'ájl',\r\n 'mán',\r\n 'dis',\r\n 'gas',\r\n 'duor',\r\n 'bier',\r\n 'láv'\r\n ],\r\n months: [\r\n 'ådåjakmánno',\r\n 'guovvamánno',\r\n 'sjnjuktjamánno',\r\n 'vuoratjismánno',\r\n 'moarmesmánno',\r\n 'biehtsemánno',\r\n 'sjnjilltjamánno',\r\n 'bårggemánno',\r\n 'ragátmánno',\r\n 'gålgådismánno',\r\n 'basádismánno',\r\n 'javllamánno'\r\n ]\r\n }\r\n };\r\n}","export class LookupResult {\r\n constructor(keySelector) {\r\n this._dict = {};\r\n this._keySelector = keySelector;\r\n }\r\n\r\n add(el) {\r\n const res = this._keySelector(el); // should potentially wrap in String()\r\n if (Object.prototype.hasOwnProperty.call(this._dict, res)) {\r\n this._dict[res].push(el);\r\n } else {\r\n this._dict[res] = [el];\r\n }\r\n }\r\n\r\n get(key) {\r\n return this._dict[key] || []; // should potentially slice to create new array\r\n }\r\n}","import Picker from './picker.js';\r\nimport { getLanguageInfo } from './languages.js';\r\nimport { pickerAppliedAttr } from './find-inputs-helper.js';\r\nimport { dateInputIsSupported } from './date-input-is-supported.js';\r\nimport { LookupResult } from './lookup-result.js';\r\nimport {closestWithProp} from './closest-with-prop.js';\r\n\r\nconst validIsoDateRx = /^\\d{4}-\\d{2}-\\d{2}$/;\r\n\r\nexport default class Input {\r\n constructor(input) {\r\n this.element = input;\r\n this.element.setAttribute(pickerAppliedAttr, '');\r\n this.element.setAttribute('autocomplete', 'off'); // otherwise autocomplete suggestion hides date picker\r\n if (dateInputIsSupported) {\r\n // this wil both prevent the native datepicker displaying AND allow asigning a value attribute which is not ISO8601 compliant\r\n this.element.type = 'date-polyfill';\r\n // this.element.addEventListener('click', preventDefault);\r\n }\r\n\r\n this.setLocaleText(closestWithProp(this.element, 'lang'));\r\n if (!this.element.placeholder) {\r\n this.element.placeholder = this.localeText.format.replace('M', 'mm').replace('D', 'dd').replace('Y', 'yyyy');\r\n }\r\n if (!this.element.title) {\r\n this.element.title = this.element.placeholder;\r\n }\r\n this.element.pattern = this.localeText.parser.pattern;\r\n let valuePropDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.element), 'value');\r\n if (valuePropDescriptor === null) {\r\n valuePropDescriptor = { get:() => this.element.getAttribute('value') || '', set:(value) => this.element.setAttribute('value', value) };\r\n console.log('esm-date-input-polyfill: unable to obtain native input[type=date] .value propertyDescriptor');\r\n }\r\n Object.defineProperties(\r\n this.element,\r\n {\r\n 'textValue': {\r\n get: valuePropDescriptor.get,\r\n set: valuePropDescriptor.set\r\n },\r\n 'value': {\r\n get: ()=> this.element._datePolyfillVal\r\n ? new Date(this.element._datePolyfillVal).toISOString().slice(0,10)\r\n : '',\r\n set: val=> this.element.valueAsDate = (val && validIsoDateRx.test(val))\r\n ? new Date(val)\r\n : null,\r\n },\r\n 'valueAsDate': {\r\n get:() => this.element._datePolyfillVal\r\n ? new Date(this.element._datePolyfillVal)\r\n : null,\r\n set:(val) => {\r\n if (val && val.getTime && !Number.isNaN(this.element._datePolyfillVal = val.getTime())) {\r\n this.element.textValue = this.toLocaleDateString(val);\r\n } else {\r\n this.element.textValue = '';\r\n this.element._datePolyfillVal = void 0;\r\n }\r\n this.validate();\r\n }\r\n },\r\n 'valueAsNumber': {\r\n get: ()=> this.element._datePolyfillVal === void 0\r\n ? NaN\r\n : this.element._datePolyfillVal,\r\n set: val=> this.element.valueAsDate = new Date(val),\r\n },\r\n 'min': {\r\n get: ()=> this.element.getAttribute('min'),\r\n set: val=> validIsoDateRx.test(val)\r\n ? this.element.setAttribute('min', val)\r\n : this.element.removeAttribute('min'),\r\n },\r\n 'max': {\r\n get: ()=> this.element.getAttribute('max'),\r\n set: val=> validIsoDateRx.test(val)\r\n ? this.element.setAttribute('max', val)\r\n : this.element.removeAttribute('max'),\r\n }\r\n }\r\n );\r\n\r\n // Initialize value for display.\r\n if (!this.element.setCustomValidity) {\r\n console.log('HTMLElement.setCustomValidity not supported');\r\n this.element.setCustomValidity = () => void 0;\r\n }\r\n this.element.value = this.element.getAttribute('value');\r\n\r\n\r\n // Open the picker when the input get focus,\r\n // also on various click events to capture it in all corner cases.\r\n const showPicker = ()=> Picker.instance.attachTo(this);\r\n const passiveOpt = { passive: true };\r\n this.element.addEventListener('focus', showPicker, passiveOpt);\r\n this.element.addEventListener('mousedown', showPicker, passiveOpt);\r\n this.element.addEventListener('mouseup', showPicker, passiveOpt);\r\n\r\n // Update the picker if the date changed manually in the input.\r\n this.element.addEventListener('keydown', e=> {\r\n let beginValue = this.element.valueAsDate;\r\n let requirePing = true;\r\n let requireParse = false;\r\n switch(e.keyCode) {\r\n case 9:\r\n case 13:\r\n case 27:\r\n Picker.instance.hide();\r\n requirePing = false;\r\n break;\r\n case 38:\r\n if (beginValue === null) { beginValue = new Date(); }\r\n beginValue.setDate(beginValue.getDate() + 1);\r\n this.element.valueAsDate = beginValue;\r\n break;\r\n case 40:\r\n if (beginValue === null) { beginValue = new Date(); }\r\n beginValue.setDate(beginValue.getDate() - 1);\r\n this.element.valueAsDate = beginValue;\r\n break;\r\n default:\r\n requireParse = true;\r\n }\r\n if (requirePing) {\r\n if (requireParse) {\r\n const self = this;\r\n setTimeout(() => {\r\n const parseDt = self.localeText.parser.parse(self.element.textValue);\r\n if (parseDt) {\r\n parseDt.setTime(parseDt.getTime() - parseDt.getTimezoneOffset() * 60000);\r\n }\r\n if (+parseDt !== +self.element.valueAsDate) {\r\n self.element.valueAsDate = parseDt;\r\n Picker.instance.pingInput();\r\n Picker.instance.sync();\r\n }\r\n }, 1);\r\n } else {\r\n Picker.instance.pingInput();\r\n Picker.instance.sync();\r\n }\r\n }\r\n }, passiveOpt);\r\n }\r\n\r\n validate() {\r\n if (this.element._datePolyfillVal) {\r\n let minDate = new Date(this.element.min || NaN);\r\n let maxDate = new Date(this.element.max || NaN);\r\n if (this.element._datePolyfillVal < minDate.getTime()) {\r\n this.element.setCustomValidity('≥ ' + this.toLocaleDateString(minDate));\r\n return false;\r\n } else if (this.element._datePolyfillVal > maxDate.getTime()) {\r\n this.element.setCustomValidity('≤ ' + this.toLocaleDateString(maxDate));\r\n return false;\r\n }\r\n }\r\n this.element.setCustomValidity('');\r\n return true;\r\n }\r\n\r\n setLocaleText(elementLang) {\r\n let preferredLocales = (window.navigator.languages\r\n ? window.navigator.languages\r\n : [ window.navigator.userLanguage || window.navigator.language ]).map((l) => l.toLowerCase());\r\n \r\n if (elementLang) {\r\n // trying to emmulate what a native browser might/should do - 1 thing for certain is if the language is not installed on the browser it will not be used\r\n elementLang = elementLang.match(/^[a-z]+/)[0].toLowerCase();\r\n const matchesElLang = new LookupResult((l) => l.startsWith(elementLang));\r\n preferredLocales.forEach((l) => matchesElLang.add(l));\r\n preferredLocales = matchesElLang.get(true).concat(matchesElLang.get(false));\r\n }\r\n\r\n const li = getLanguageInfo(preferredLocales);\r\n\r\n this.locale = li.locale;\r\n this.localeText = li;\r\n }\r\n\r\n toLocaleDateString(dt) {\r\n const ymd = dt.toISOString().slice(0,10).split('-');\r\n return this.localeText.format\r\n .replace('Y', ymd[0])\r\n .replace('M', ymd[1])\r\n .replace('D', ymd[2]);\r\n }\r\n}\r\n","// IE11 does not support HTMLElement.closest property. Using this instead.\r\nexport function closestWithProp(el, propName) {\r\n do {\r\n if (propName in el) {\r\n return el[propName];\r\n }\r\n el = el.parentElement || el.parentNode;\r\n } while (el !== null && el.nodeType === 1);\r\n return null;\r\n}\r\n\r\n","import Picker from './picker.js';\r\nimport Input from './input.js';\r\nimport { FindInputsHelper } from './find-inputs-helper.js';\r\n\r\nexport function addPickers({ watchForInsert = false, allowForcePicker = false, yrsBack = 80, yrsFwd = 20 } = {}) {\r\n Picker.instance = new Picker({yrsBack, yrsFwd});\r\n const findHelper = new FindInputsHelper({ allowForcePicker });\r\n // Get and loop all the input[type=\"date\"]s in the page that do not have `[data-has-picker]` yet.\r\n findHelper.getAllInputsForPolyfilling().forEach((di) => new Input(di));\r\n if (watchForInsert) {\r\n const observer = new MutationObserver((mutations) => \r\n mutations.forEach((m) => {\r\n if(m.type === 'childList') {\r\n m.addedNodes.forEach((el) => {\r\n if (el.nodeType === Node.ELEMENT_NODE) {\r\n // [el, ...el.querySelectorAll('input[type=date]')] should do, but some problem with transpilling\r\n // firefox fine with same transpile, but IE somehow tries to implement es.string.iterator rather than nodelist!\r\n const nodes = Array.from(el.querySelectorAll('input[type=date]'));\r\n nodes.push(el);\r\n nodes.forEach((inpt) => {\r\n if (findHelper.requiresPolyfilling(inpt)) {\r\n new Input(inpt);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n })\r\n );\r\n const observe = () => observer.observe(document.body, {\r\n childList: true,\r\n attributes: false,\r\n subtree: true,\r\n });\r\n Picker.instance.onBeforeOpen(() => {\r\n observer.disconnect();\r\n setTimeout(observe, 100);\r\n });\r\n observe();\r\n // call `observe` on that MutationObserver instance, \r\n // passing it the element to observe, and the options object\r\n\r\n\r\n // this might not be the best way to handle this as it will not add placeholder until clicked\r\n /*\r\n document.body.addEventListener('mousedown', (evt)=> {\r\n if (findHelper.requiresPolyfilling(evt.target)) {\r\n return new Input(evt.target);\r\n }\r\n }, { passive: true });\r\n */\r\n }\r\n}"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Picker","[object Object]","yrsBack","yrsFwd","instance","passiveOpt","passive","this","date","Date","input","isOpen","_onBeforeOpen","container","year","createRangeSelect","getFullYear","className","addEventListener","setYear","value","refreshDaysMatrix","month","setMonth","today","textContent","setInput","daysMatrix","daysHead","days","e","tgt","target","classList","contains","curSel","querySelector","remove","add","setDate","parseInt","hide","body","el","isPicker","parentNode","attr","getAttribute","setAttribute","forEach","fn","push","element","rekt","getBoundingClientRect","top","height","documentElement","scrollTop","left","scrollLeft","show","sync","goto","valueAsDate","utcDateToLocal","getMonth","String","padStart","getDate","focus","setTimeout","pingInput","locale","daysHeadHTML","i","len","localeText","length","innerHTML","join","months","refreshLocale","startDate","startDay","getDay","daysInMonth","selDate","selMatrix","minStr","min","minTime","getTime","maxStr","max","maxTime","currentDate","setHours","currentTime","matrixHTML","dayNum","thisTime","inputEvent","changeEvent","Event","createEvent","initEvent","dispatchEvent","theSelect","namesArray","selectedValue","aOption","theText","text","selected","getTimezoneOffset","decreaseLocaleSpecificity","localeName","returnVar","replace","dmyFormatToParser","format","dPos","yPos","indexOf","mPos","localeDateRegExp","RegExp","pattern","dtStr","dateMatch","exec","yr","mth","dt","getLanguageInfo","localeNames","languages","ar","bg","ca","cs","da","de","en","es","fi","fr","he","hu","is","it","ja","ko","nl","no","pl","pt","rm","ro","ru","hr","sk","sq","sv","th","tr","ur","id","uk","be","sl","et","lv","lt","tg","fa","vi","hy","az","eu","hsb","mk","tn","xh","zu","af","ka","fo","hi","mt","se","ga","ms","kk","ky","sw","tk","uz","tt","bn","pa","gu","or","ta","te","kn","ml","as","mr","sa","mn","bo","cy","km","lo","gl","kok","syr","si","iu","am","tzm","ne","fy","ps","fil","dv","ha","yo","quz","nso","ba","lb","kl","ig","ii","arn","moh","br","ug","mi","oc","co","gsw","sah","qut","rw","wo","prs","gd","smn","sms","zh","zh-hans","zh-hant","nn","bs","sma","nb","sr","dsb","smj","fmt","locales","srchStr","found","find","l","includes","parser","decrSpec","parseLocale","getLocaleFormat","language","Object","assign","LookupResult","keySelector","_dict","_keySelector","res","prototype","hasOwnProperty","call","key","validIsoDateRx","Input","pickerAppliedAttr","dateInputIsSupported","setLocaleText","propName","parentElement","nodeType","closestWithProp","placeholder","title","valuePropDescriptor","getOwnPropertyDescriptor","getPrototypeOf","get","set","console","log","defineProperties","textValue","_datePolyfillVal","toISOString","slice","val","test","Number","isNaN","toLocaleDateString","validate","valueAsNumber","NaN","removeAttribute","setCustomValidity","showPicker","attachTo","beginValue","requirePing","requireParse","keyCode","self","parseDt","parse","setTime","minDate","maxDate","elementLang","preferredLocales","window","navigator","userLanguage","map","toLowerCase","match","matchesElLang","startsWith","concat","li","ymd","split","addPickers","watchForInsert","allowForcePicker","findHelper","FindInputsHelper","getAllInputsForPolyfilling","di","observer","MutationObserver","mutations","m","addedNodes","Node","ELEMENT_NODE","nodes","Array","from","querySelectorAll","inpt","requiresPolyfilling","observe","childList","attributes","subtree","onBeforeOpen","disconnect"],"mappings":";uEAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,4/DCrB9C,MAAMe,EACFC,aAAYC,QAACA,EAAU,GAAEC,OAAEA,EAAS,IAAM,CAACD,QAAS,GAAIC,OAAQ,KAE5D,GAAGH,EAAOI,SACN,OAAOJ,EAAOI,SAGlB,MAAMC,EAAa,CAAEC,SAAS,GAE9BC,KAAKC,KAAO,IAAIC,KAChBF,KAAKG,MAAQ,KACbH,KAAKI,QAAS,EACdJ,KAAKK,cAAgB,GAIrBL,KAAKM,UAAYzB,SAASI,cAAc,uBAIxCe,KAAKO,KAAO1B,SAASI,cAAc,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GAAI,CACAnH,MAAO,OACPK,KAAM,CACF,MACA,MACA,KACA,KACA,OACA,MACA,OAEJoD,OAAQ,CACJ,SACA,WACA,OACA,QACA,MACA,MACA,MACA,SACA,YACA,WACA,UACA,aAGR2D,GAAI,CACApH,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,SACA,OACA,QACA,OACA,OACA,SACA,QACA,WACA,UACA,WACA,aAGR4D,GAAI,CACArH,MAAO,OACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,QACA,OACA,SACA,QACA,SACA,SACA,WACA,QACA,OACA,QACA,WACA,aAGR6D,GAAI,CACAtH,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGR8D,GAAI,CACAvH,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRtC,GAAI,CACAnB,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,aACA,cACA,UACA,WACA,QACA,UACA,UACA,YACA,cACA,YACA,YACA,eAGR+D,GAAI,CACAxH,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRgE,GAAI,CACAzH,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,cAGRiE,GAAI,CACA1H,MAAO,SACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,WACA,WACA,YACA,WACA,WACA,UACA,WACA,SACA,UACA,UACA,YACA,aAGRkE,GAAI,CACA3H,MAAO,cACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,MACA,OACA,UACA,OACA,YACA,UACA,WACA,aAGRmE,GAAI,CACA5H,MAAO,OACPK,KAAM,CACF,QACA,QACA,QACA,QACA,QACA,QACA,OAEJoD,OAAQ,CACJ,QACA,SACA,MACA,QACA,MACA,OACA,OACA,SACA,SACA,UACA,SACA,UAGRoE,GAAI,CACA7H,MAAO,KACPK,KAAM,CACF,IACA,IACA,IACA,MACA,KACA,IACA,OAEJoD,OAAQ,CACJ,SACA,UACA,UACA,UACA,QACA,SACA,SACA,YACA,aACA,UACA,WACA,aAGRqE,GAAI,CACA9H,MAAO,QACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,QACA,YACA,UACA,WACA,aAGRsE,GAAI,CACA/H,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,QACA,SACA,SACA,SACA,SACA,SACA,YACA,UACA,WACA,aAGRuE,GAAI,CACAhI,MAAO,KACPK,KAAM,CACF,IACA,IACA,IACA,IACA,IACA,IACA,KAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGRwE,GAAI,CACAjI,MAAO,KACPK,KAAM,CACF,IACA,IACA,IACA,IACA,IACA,IACA,KAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGRyE,GAAI,CACAlI,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,WACA,YACA,UACA,WACA,aAGR0E,GAAI,CACAnI,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGR2E,GAAI,CACApI,MAAO,UACPK,KAAM,CACF,IACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,UACA,OACA,SACA,WACA,MACA,WACA,SACA,WACA,WACA,cACA,WACA,aAGR4E,GAAI,CACArI,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,YACA,QACA,QACA,OACA,QACA,QACA,SACA,WACA,UACA,WACA,aAGR6E,GAAI,CACAtI,MAAO,KACPK,KAAM,CACF,KACA,MACA,KACA,KACA,MACA,KACA,MAEJoD,OAAQ,CACJ,UACA,SACA,OACA,SACA,OACA,YACA,UACA,QACA,YACA,UACA,WACA,aAGR8E,GAAI,CACAvI,MAAO,SACPK,KAAM,CACF,IACA,IACA,KACA,KACA,IACA,IACA,KAEJoD,OAAQ,CACJ,WACA,YACA,SACA,UACA,MACA,QACA,QACA,SACA,aACA,YACA,YACA,cAGR+E,GAAI,CACAxI,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRgF,GAAI,CACAzI,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,WACA,UACA,SACA,UACA,UACA,SACA,SACA,UACA,QACA,WACA,UACA,aAGRiF,GAAI,CACA1I,MAAO,OACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,QACA,QACA,MACA,MACA,MACA,SACA,YACA,UACA,WACA,aAGRkF,GAAI,CACA3I,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,SACA,OACA,QACA,MACA,UACA,SACA,QACA,UACA,QACA,SACA,YAGRmF,GAAI,CACA5I,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,UACA,WACA,OACA,QACA,MACA,OACA,OACA,UACA,YACA,UACA,WACA,aAGRoF,GAAI,CACA7I,MAAO,WACPK,KAAM,CACF,MACA,KACA,KACA,KACA,MACA,KACA,MAEJoD,OAAQ,CACJ,SACA,aACA,SACA,SACA,UACA,WACA,UACA,UACA,UACA,SACA,YACA,YAGRqF,GAAI,CACA9I,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,OACA,QACA,OACA,QACA,QACA,UACA,SACA,UACA,QACA,OACA,QACA,WAGRsF,GAAI,CACA/I,MAAO,KACPK,KAAM,CACF,QACA,MACA,OACA,MACA,SACA,OACA,QAEJoD,OAAQ,CACJ,QACA,QACA,OACA,QACA,MACA,MACA,SACA,OACA,QACA,SACA,QACA,UAGRuF,GAAI,CACAhJ,MAAO,WACPK,KAAM,CACF,SACA,MACA,MACA,OACA,QACA,QACA,SAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,UACA,YACA,UACA,WACA,aAGRwF,GAAI,CACAjJ,MAAO,WACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,QACA,WACA,UACA,UACA,UACA,SACA,UACA,WACA,UACA,WACA,YAGRyF,GAAI,CACAlJ,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,WACA,OACA,UACA,WACA,MACA,UACA,SACA,UACA,WACA,aACA,WACA,YAGR0F,GAAI,CACAnJ,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,QACA,QACA,MACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGR2F,GAAI,CACApJ,MAAO,OACPK,KAAM,CACF,IACA,IACA,IACA,IACA,IACA,IACA,KAEJoD,OAAQ,CACJ,UACA,WACA,QACA,SACA,MACA,QACA,QACA,SACA,YACA,WACA,WACA,cAGR4F,GAAI,CACArJ,MAAO,SACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,WACA,YACA,QACA,UACA,QACA,SACA,SACA,UACA,aACA,WACA,YACA,cAGR6F,GAAI,CACAtJ,MAAO,WACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,QACA,WACA,SACA,WACA,QACA,YACA,WACA,SACA,YACA,YAGR8F,GAAI,CACAvJ,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,QACA,SACA,OACA,QACA,MACA,MACA,MACA,SACA,UACA,SACA,QACA,WAGR+F,GAAI,CACAxJ,MAAO,QACPK,KAAM,CACF,QACA,UACA,WACA,WACA,SACA,SACA,SAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,KACA,OACA,QACA,MACA,SACA,SACA,SACA,WAGRgG,GAAI,CACAzJ,MAAO,UACPK,KAAM,CACF,KACA,MACA,KACA,KACA,MACA,OACA,QAEJoD,OAAQ,CACJ,eACA,aACA,YACA,YACA,aACA,cACA,cACA,cACA,eACA,eACA,oBACA,qBAGRiG,GAAI,CACA1J,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,QACA,SACA,SACA,UACA,YACA,YACA,WACA,cAGRkG,GAAI,CACA3J,MAAO,QACPK,KAAM,CACF,IACA,KACA,KACA,IACA,KACA,IACA,KAEJoD,OAAQ,CACJ,SACA,SACA,OACA,QACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAGRmG,GAAI,CACA5J,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,YACA,UACA,UACA,UACA,UACA,SACA,UACA,UACA,SACA,QACA,SACA,YAGRoG,IAAK,CACD7J,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,OACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGRqG,GAAI,CACA9J,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,WACA,UACA,aAGRsG,GAAI,CACA/J,MAAO,WACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,YACA,WACA,WACA,WACA,eACA,cACA,SACA,SACA,SACA,YACA,cACA,gBAGRuG,GAAI,CACAhK,MAAO,YACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,SACA,UACA,cACA,UACA,WACA,QACA,SACA,UACA,SACA,SACA,SAGRwG,GAAI,CACAjK,MAAO,YACPK,KAAM,CACF,OACA,OACA,MACA,OACA,MACA,OACA,QAEJoD,OAAQ,CACJ,aACA,aACA,SACA,SACA,UACA,eACA,aACA,UACA,WACA,UACA,SACA,gBAGRyG,GAAI,CACAlK,MAAO,SACPK,KAAM,CACF,MACA,OACA,OACA,OACA,OACA,MACA,OAEJoD,OAAQ,CACJ,WACA,YACA,QACA,QACA,MACA,QACA,QACA,WACA,YACA,UACA,WACA,aAGR0G,GAAI,CACAnK,MAAO,OACPK,KAAM,CACF,QACA,WACA,YACA,YACA,YACA,YACA,UAEJoD,OAAQ,CACJ,UACA,YACA,QACA,SACA,QACA,SACA,SACA,UACA,aACA,YACA,WACA,cAGR2G,GAAI,CACApK,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,QAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGR4G,GAAI,CACArK,MAAO,KACPK,KAAM,CACF,OACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,QACA,QACA,QACA,SACA,KACA,MACA,QACA,QACA,UACA,UACA,SACA,YAGR6G,GAAI,CACAtK,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,OACA,QACA,QACA,QACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGR8G,GAAI,CACAvK,MAAO,OACPK,KAAM,CACF,OACA,OACA,MACA,OACA,OACA,OACA,OAEJoD,OAAQ,CACJ,gBACA,cACA,cACA,aACA,cACA,cACA,eACA,aACA,aACA,eACA,cACA,gBAGR+G,GAAI,CACAxK,MAAO,QACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,MACA,QAEJoD,OAAQ,CACJ,SACA,UACA,QACA,UACA,YACA,YACA,OACA,SACA,eACA,mBACA,UACA,YAGRgH,GAAI,CACAzK,MAAO,WACPK,KAAM,CACF,OACA,QACA,MACA,OACA,SACA,SACA,SAEJoD,OAAQ,CACJ,UACA,WACA,MACA,QACA,MACA,MACA,QACA,OACA,YACA,UACA,WACA,aAGRiH,GAAI,CACA1K,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,QACA,SACA,QACA,QACA,SACA,QACA,QACA,WACA,QACA,SACA,cAGRkH,GAAI,CACA3K,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRmH,GAAI,CACA5K,MAAO,MACPK,KAAM,CACF,SACA,SACA,SACA,SACA,OACA,OACA,UAEJoD,OAAQ,CACJ,UACA,WACA,QACA,SACA,MACA,OACA,QACA,SACA,WACA,SACA,UACA,YAGRoH,GAAI,CACA7K,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,SACA,OACA,QACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAGRqH,GAAI,CACA9K,MAAO,QACPK,KAAM,CACF,OACA,OACA,QACA,OACA,OACA,MACA,OAEJoD,OAAQ,CACJ,SACA,SACA,OACA,QACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAGRsH,GAAI,CACA/K,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,OACA,OACA,MACA,OAEJoD,OAAQ,CACJ,UACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRuH,GAAI,CACAhL,MAAO,KACPK,KAAM,CACF,OACA,OACA,SACA,OACA,YACA,SACA,QAEJoD,OAAQ,CACJ,YACA,cACA,QACA,SACA,KACA,MACA,QACA,QACA,aACA,UACA,UACA,aAGRwH,GAAI,CACAjL,MAAO,MACPK,KAAM,CACF,MACA,OACA,QACA,QACA,OACA,QACA,WAEJoD,OAAQ,CACJ,QACA,QACA,OACA,SACA,KACA,MACA,QACA,OACA,QACA,SACA,QACA,UAGRyH,GAAI,CACAlL,MAAO,MACPK,KAAM,CACF,MACA,MACA,OACA,MACA,OACA,QACA,OAEJoD,OAAQ,CACJ,YACA,YACA,QACA,SACA,KACA,MACA,QACA,QACA,YACA,UACA,UACA,aAGR0H,GAAI,CACAnL,MAAO,MACPK,KAAM,CACF,OACA,QACA,SACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,WACA,aACA,UACA,WACA,KACA,QACA,QACA,QACA,aACA,UACA,UACA,cAGR2H,GAAI,CACApL,MAAO,QACPK,KAAM,CACF,SACA,UACA,WACA,QACA,UACA,SACA,OAEJoD,OAAQ,CACJ,QACA,WACA,SACA,SACA,KACA,OACA,OACA,SACA,aACA,WACA,UACA,aAGR4H,GAAI,CACArL,MAAO,OACPK,KAAM,CACF,OACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,QACA,WACA,SACA,UACA,KACA,OACA,OACA,SACA,aACA,WACA,SACA,aAGR6H,GAAI,CACAtL,MAAO,OACPK,KAAM,CACF,QACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,QACA,WACA,SACA,UACA,KACA,OACA,OACA,SACA,YACA,WACA,UACA,aAGR8H,GAAI,CACAvL,MAAO,QACPK,KAAM,CACF,QACA,UACA,SACA,QACA,UACA,UACA,QAEJoD,OAAQ,CACJ,SACA,YACA,WACA,UACA,OACA,OACA,OACA,UACA,aACA,WACA,SACA,YAGR+H,GAAI,CACAxL,MAAO,MACPK,KAAM,CACF,OACA,SACA,OACA,OACA,SACA,OACA,QAEJoD,OAAQ,CACJ,WACA,aACA,QACA,SACA,KACA,MACA,QACA,QACA,aACA,UACA,UACA,aAGRgI,GAAI,CACAzL,MAAO,KACPK,KAAM,CACF,OACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,WACA,aACA,QACA,SACA,KACA,MACA,OACA,QACA,WACA,UACA,YACA,YAGRiI,GAAI,CACA1L,MAAO,OACPK,KAAM,CACF,WACA,WACA,aACA,WACA,YACA,aACA,YAEJoD,OAAQ,CACJ,QACA,QACA,QACA,SACA,KACA,MACA,QACA,QACA,UACA,UACA,SACA,YAGRkI,GAAI,CACA3L,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,eACA,eACA,eACA,eACA,eACA,eACA,eACA,eACA,eACA,gBACA,gBACA,kBAGRmI,GAAI,CACA5L,MAAO,QACPK,KAAM,CACF,QACA,QACA,WACA,SACA,UACA,SACA,WAEJoD,OAAQ,CACJ,iBACA,kBACA,kBACA,iBACA,gBACA,kBACA,kBACA,mBACA,iBACA,kBACA,sBACA,wBAGRoI,GAAI,CACA7L,MAAO,SACPK,KAAM,CACF,MACA,OACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,WACA,SACA,SACA,MACA,UACA,aACA,OACA,OACA,SACA,WACA,YAGRqI,GAAI,CACA9L,MAAO,UACPK,KAAM,CACF,QACA,KACA,KACA,KACA,QACA,MACA,MAEJoD,OAAQ,CACJ,OACA,SACA,OACA,OACA,OACA,SACA,SACA,OACA,QACA,OACA,WACA,SAGRsI,GAAI,CACA/L,MAAO,WACPK,KAAM,CACF,QACA,MACA,SACA,MACA,QACA,MACA,QAEJoD,OAAQ,CACJ,SACA,QACA,OACA,OACA,UACA,SACA,UACA,QACA,QACA,OACA,QACA,UAGRuI,GAAI,CACAhM,MAAO,OACPK,KAAM,CACF,MACA,OACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,QACA,QACA,OACA,OACA,QACA,SACA,WACA,UACA,WACA,aAGRwI,IAAK,CACDjM,MAAO,MACPK,KAAM,CACF,MACA,OACA,QACA,OACA,QACA,SACA,QAEJoD,OAAQ,CACJ,WACA,aACA,QACA,SACA,KACA,MACA,OACA,QACA,WACA,UACA,WACA,YAGRyI,IAAK,CACDlM,MAAO,OACPK,KAAM,CACF,SACA,SACA,SACA,SACA,SACA,QACA,OAEJoD,OAAQ,CACJ,YACA,MACA,MACA,OACA,MACA,QACA,OACA,KACA,QACA,YACA,YACA,cAGR0I,GAAI,CACAnM,MAAO,KACPK,KAAM,CACF,QACA,QACA,QACA,QACA,SACA,SACA,SAEJoD,OAAQ,CACJ,SACA,WACA,SACA,YACA,OACA,OACA,OACA,WACA,cACA,WACA,YACA,cAGR2I,GAAI,CACApM,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,KACA,MACA,MACA,OAEJoD,OAAQ,CACJ,YACA,YACA,SACA,SACA,MACA,QACA,QACA,WACA,WACA,UACA,WACA,aAGR4I,GAAI,CACArM,MAAO,KACPK,KAAM,CACF,MACA,KACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,QACA,MACA,OACA,KACA,KACA,MACA,OACA,SACA,SACA,QACA,UAGR6I,IAAK,CACDtM,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,QACA,UACA,SACA,OACA,QACA,QACA,QACA,WACA,SACA,SACA,aAGR8I,GAAI,CACAvM,MAAO,KACPK,KAAM,CACF,MACA,MACA,QACA,MACA,OACA,QACA,OAEJoD,OAAQ,CACJ,QACA,YACA,QACA,SACA,KACA,MACA,QACA,QACA,aACA,UACA,WACA,aAGR+I,GAAI,CACAxM,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,aACA,aACA,QACA,QACA,QACA,OACA,OACA,WACA,YACA,UACA,WACA,aAGRgJ,GAAI,CACAzM,MAAO,SACPK,KAAM,CACF,QACA,UACA,WACA,WACA,SACA,SACA,SAEJoD,OAAQ,CACJ,OACA,MACA,aACA,cACA,eACA,gBACA,MACA,QACA,QACA,OACA,YACA,aAGRiJ,IAAK,CACD1M,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,cAGRkJ,GAAI,CACA3M,MAAO,SACPK,KAAM,CACF,WACA,OACA,WACA,OACA,aACA,SACA,YAEJoD,OAAQ,CACJ,aACA,SACA,mBACA,iBACA,eACA,iBACA,SACA,WACA,WACA,WACA,aACA,eAGRmJ,GAAI,CACA5M,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,WACA,UACA,QACA,SACA,OACA,OACA,OACA,SACA,UACA,UACA,UACA,YAGRoJ,GAAI,CACA7M,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,YACA,WACA,WACA,YACA,YACA,WACA,WACA,WACA,YACA,WACA,cACA,eAGRqJ,IAAK,CACD9M,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,cACA,cACA,eACA,SACA,UACA,aACA,aACA,eACA,YACA,WACA,YACA,gBAGRsJ,IAAK,CACD/M,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,aACA,UACA,UACA,WACA,cACA,eACA,SACA,QACA,SACA,YACA,YACA,aAGRuJ,GAAI,CACAhN,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,YAGRwJ,GAAI,CACAjN,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,QACA,SACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRyJ,GAAI,CACAlN,MAAO,SACPK,KAAM,CACF,MACA,MACA,MACA,OACA,MACA,MACA,OAEJoD,OAAQ,CACJ,UACA,WACA,SACA,UACA,QACA,OACA,OACA,UACA,aACA,WACA,YACA,cAGR0J,GAAI,CACAnN,MAAO,MACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,WACA,YACA,WACA,WACA,WACA,WACA,WACA,aACA,aACA,WACA,iBACA,oBAGR2J,GAAI,CACApN,MAAO,KACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,QAGR4J,IAAK,CACDrN,MAAO,WACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,cAGR6J,IAAK,CACDtN,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,gBACA,UACA,aACA,cACA,iBACA,YACA,eACA,UACA,cACA,WACA,eACA,eAGR8J,GAAI,CACAvN,MAAO,QACPK,KAAM,CACF,MACA,MACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,SACA,YACA,SACA,QACA,MACA,WACA,SACA,OACA,WACA,OACA,KACA,UAGR+J,GAAI,CACAxN,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,WAGRgK,GAAI,CACAzN,MAAO,aACPK,KAAM,CACF,KACA,KACA,KACA,MACA,KACA,KACA,MAEJoD,OAAQ,CACJ,aACA,cACA,iBACA,gBACA,UACA,SACA,YACA,iBACA,SACA,kBACA,mBACA,YAGRiK,GAAI,CACA1N,MAAO,MACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,QACA,WACA,UACA,WACA,aAGRkK,GAAI,CACA3N,MAAO,QACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,cACA,YACA,QACA,SACA,SACA,YACA,SACA,QACA,YACA,UACA,WACA,aAGRmK,IAAK,CACD5N,MAAO,OACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,UACA,YACA,UACA,WACA,aAGRoK,IAAK,CACD7N,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,YACA,UACA,cACA,aACA,UACA,UACA,SACA,eACA,cACA,WACA,WACA,aAGRqK,IAAK,CACD9N,MAAO,UACPK,KAAM,CACF,MACA,MACA,MACA,OACA,MACA,OACA,QAEJoD,OAAQ,CACJ,YACA,YACA,UACA,WACA,WACA,WACA,WACA,cACA,cACA,WACA,aACA,iBAGRsK,GAAI,CACA/N,MAAO,YACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,WACA,cACA,UACA,OACA,WACA,SACA,WACA,SACA,QACA,WACA,aACA,YAGRuK,GAAI,CACAhO,MAAO,MACPK,KAAM,CACF,OACA,OACA,OACA,OACA,OACA,OACA,QAEJoD,OAAQ,CACJ,UACA,UACA,OACA,QACA,MACA,OACA,UACA,OACA,YACA,UACA,WACA,aAGRwK,IAAK,CACDjO,MAAO,QACPK,KAAM,CACF,QACA,UACA,WACA,WACA,SACA,SACA,SAEJoD,OAAQ,CACJ,OACA,MACA,aACA,cACA,eACA,gBACA,MACA,QACA,QACA,OACA,YACA,aAGRyK,GAAI,CACAlO,MAAO,WACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,gBACA,aACA,UACA,aACA,aACA,eACA,cACA,cACA,eACA,aACA,eACA,iBAGR0K,IAAK,CACDnO,MAAO,OACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,eACA,aACA,cACA,cACA,aACA,YACA,cACA,aACA,aACA,eACA,cACA,gBAGR2K,IAAK,CACDpO,MAAO,UACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,eACA,aACA,mBACA,aACA,aACA,aACA,cACA,aACA,YACA,YACA,aACA,gBAGR4K,GAAI,CACAhO,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,OAEJzD,MAAO,MAEXsO,UAAW,CACPjO,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,OAEJzD,MAAO,MAEXuO,UAAW,CACPlO,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,OAEJzD,MAAO,MAEXwO,GAAI,CACAxO,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRgL,GAAI,CACAzO,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRiL,IAAK,CACD1O,MAAO,eACPK,KAAM,CACF,MACA,MACA,MACA,OACA,OACA,QACA,QAEJoD,OAAQ,CACJ,YACA,SACA,UACA,WACA,WACA,SACA,WACA,UACA,WACA,QACA,QACA,UAGRkL,GAAI,CACA3O,MAAO,QACPK,KAAM,CACF,KACA,KACA,KACA,KACA,KACA,KACA,MAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,aAGRmL,GAAI,CACA5O,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,MACA,MACA,SACA,YACA,UACA,WACA,aAGRoL,IAAK,CACD7O,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,MACA,MACA,OAEJoD,OAAQ,CACJ,SACA,UACA,OACA,QACA,MACA,QACA,QACA,SACA,YACA,UACA,WACA,aAGRqL,IAAK,CACD9O,MAAO,QACPK,KAAM,CACF,MACA,MACA,MACA,MACA,OACA,OAC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XA,EAAE1W,MACD0W,EAAEC,WAAWnT,QAASN,IAClB,GAAIA,EAAG0P,WAAagE,KAAKC,aAAc,CAGnC,MAAMC,EAAQC,MAAMC,KAAK9T,EAAG+T,iBAAiB,qBAC7CH,EAAMpT,KAAKR,GACX4T,EAAMtT,QAAS0T,IACPf,EAAWgB,oBAAoBD,IAC/B,IAAI5E,EAAM4E,WAQhCE,EAAU,IAAMb,EAASa,QAAQzX,SAASsD,KAAM,CAClDoU,WAAW,EACXC,YAAY,EACZC,SAAS,IAEbhX,EAAOI,SAAS6W,aAAa,KACzBjB,EAASkB,aACT3S,WAAWsS,EAAS,OAExBA"} \ No newline at end of file diff --git a/dist/cjs/add-pickers-ba507d00.cjs.mjs b/dist/cjs/add-pickers-59466f4f.cjs.mjs similarity index 91% rename from dist/cjs/add-pickers-ba507d00.cjs.mjs rename to dist/cjs/add-pickers-59466f4f.cjs.mjs index e5f4ac7..c374827 100644 --- a/dist/cjs/add-pickers-ba507d00.cjs.mjs +++ b/dist/cjs/add-pickers-59466f4f.cjs.mjs @@ -1,2 +1,2 @@ // @license MIT - https://github.com/brianblakely/esm-date-input-polyfill -"use strict";var e=require("./polyfill-if-required-6dfd5f3d.cjs.mjs");!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===a&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('date-input-polyfill {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n position: absolute !important;\n text-align: center;\n box-shadow: 0 7px 8px -4px rgba(0, 0, 0, 0.2), 0 12px 17px 2px rgba(0, 0, 0, 0.14), 0 5px 22px 4px rgba(0, 0, 0, 0.12);\n cursor: default;\n z-index: 1; }\n date-input-polyfill[data-open="false"] {\n display: none; }\n date-input-polyfill[data-open="true"] {\n display: block; }\n date-input-polyfill select, date-input-polyfill table, date-input-polyfill th, date-input-polyfill td {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n box-shadow: none; }\n date-input-polyfill select, date-input-polyfill button {\n border: 0;\n border-bottom: 1px solid #E0E0E0;\n height: 24px;\n vertical-align: top; }\n date-input-polyfill select {\n width: 50%; }\n date-input-polyfill select:first-of-type {\n border-right: 1px solid #E0E0E0;\n width: 30%; }\n date-input-polyfill button {\n padding: 0;\n width: 20%;\n background: #E0E0E0; }\n date-input-polyfill table {\n border-collapse: collapse; }\n date-input-polyfill th, date-input-polyfill td {\n width: 32px;\n padding: 4px;\n text-align: center; }\n date-input-polyfill td {\n cursor: pointer; }\n date-input-polyfill td:hover {\n background: #E0E0FF; }\n date-input-polyfill .esm-polyfill-invalid-day {\n background: #eee;\n color: #422;\n cursor: not-allowed; }\n date-input-polyfill .esm-polyfill-day-selected {\n font-weight: bold;\n background: #d8eaf6; }\n date-input-polyfill .esm-polyfill-current-day {\n border: 1px #777 solid; }\n\ninput[data-has-picker]::-ms-clear {\n display: none; }\n');class t{constructor({yrsBack:e=80,yrsFwd:a=20}={yrsBack:80,yrsFwd:20}){if(t.instance)return t.instance;const n={passive:!0};this.date=new Date,this.input=null,this.isOpen=!1,this._onBeforeOpen=[],this.container=document.createElement("date-input-polyfill"),this.year=document.createElement("select"),t.createRangeSelect(this.year,this.date.getFullYear()-e,this.date.getFullYear()+a),this.year.className="yearSelect",this.year.addEventListener("change",()=>{this.date.setYear(this.year.value),this.refreshDaysMatrix()},n),this.container.appendChild(this.year),this.month=document.createElement("select"),this.month.className="monthSelect",this.month.addEventListener("change",()=>{this.date.setMonth(this.month.value),this.refreshDaysMatrix()},n),this.container.appendChild(this.month),this.today=document.createElement("button"),this.today.textContent="Today",this.today.addEventListener("click",()=>{this.date=new Date,this.setInput()},n),this.container.appendChild(this.today);const s=document.createElement("table");this.daysHead=document.createElement("thead"),this.days=document.createElement("tbody"),this.days.addEventListener("click",e=>{const t=e.target;if(!t.classList.contains("esm-polyfill-day")||t.classList.contains("esm-polyfill-invalid-day"))return!1;const a=this.days.querySelector(".esm-polyfill-day-selected");a&&a.classList.remove("esm-polyfill-day-selected"),t.classList.add("esm-polyfill-day-selected"),this.date.setDate(parseInt(t.textContent,10)),this.setInput()},n),s.appendChild(this.daysHead),s.appendChild(this.days),this.container.appendChild(s),this.hide(),document.body.appendChild(this.container),document.addEventListener("click",e=>{let t=e.target,a=t===this.container;for(;!a&&(t=t.parentNode);)a=t===this.container;const n=e.target.getAttribute("type");"date"===n||"date-polyfill"===n||a||this.hide()},n)}hide(){this.container.setAttribute("data-open",this.isOpen=!1)}show(){this._onBeforeOpen.forEach(e=>e()),this.container.setAttribute("data-open",this.isOpen=!0)}onBeforeOpen(e){this._onBeforeOpen.push(e)}goto(e){const t=e.getBoundingClientRect();this.container.style.top=`${t.top+t.height+(document.documentElement.scrollTop||document.body.scrollTop)}px`,this.container.style.left=`${t.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}px`,this.show()}attachTo(e){if(e===this.input&&this.isOpen)return!1;this.input=e,this.sync(),this.goto(this.input.element)}sync(){this.input.element.valueAsDate?this.date=t.utcDateToLocal(this.input.element.valueAsDate):this.date=new Date,this.year.value=this.date.getFullYear(),this.month.value=this.date.getMonth(),this.refreshDaysMatrix()}setInput(){this.input.element.value=`${this.date.getFullYear()}-${String(this.date.getMonth()+1).padStart(2,"0")}-${String(this.date.getDate()).padStart(2,"0")}`,this.input.element.focus(),setTimeout(()=>{this.hide()},100),this.pingInput()}refreshLocale(){if(this.locale===this.input.locale)return!1;this.locale=this.input.locale;const e=[""];for(let t=0,a=this.input.localeText.days.length;t${this.input.localeText.days[t]}`);this.daysHead.innerHTML=e.join(""),t.createRangeSelect(this.month,0,11,this.input.localeText.months,this.date.getMonth()),this.today.textContent=this.input.localeText.today}refreshDaysMatrix(){this.refreshLocale();const e=this.date.getFullYear(),a=this.date.getMonth();let n=new Date(e,a,1);const s=n.getDay(),i=new Date(this.date.getFullYear(),a+1,0).getDate(),o=t.utcDateToLocal(this.input.element.valueAsDate)||!1,r=o&&e===o.getFullYear()&&a===o.getMonth(),l=this.input.element.min,u=l?t.utcDateToLocal(new Date(l)).getTime():-30610224e6,m=this.input.element.max,d=m?t.utcDateToLocal(new Date(m)).getTime():3250368e7,h=new Date;h.setHours(0,0,0,0);const y=h.getTime(),b=[];for(let e=0;e":""}\n \n `),e+1<=s){b.push("");continue}const t=e+1-s,a=["esm-polyfill-day"];r&&o.getDate()===t&&a.push("esm-polyfill-day-selected");let i=n.setDate(t);(id)&&a.push("esm-polyfill-invalid-day"),i===y&&a.push("esm-polyfill-current-day"),b.push(`\n ${t}\n `)}this.days.innerHTML=b.join("")}pingInput(){let e,t;try{e=new Event("input"),t=new Event("change")}catch(a){e=document.createEvent("KeyboardEvent"),e.initEvent("input",!0,!1),t=document.createEvent("KeyboardEvent"),t.initEvent("change",!0,!1)}this.input.element.dispatchEvent(e),this.input.element.dispatchEvent(t)}static createRangeSelect(e,t,a,n,s){e.innerHTML="";for(let i=t;i<=a;++i){const a=document.createElement("option");e.appendChild(a);const o=n?n[i-t]:i;a.text=o,a.value=i,i===s&&(a.selected="selected")}return e}static utcDateToLocal(e){return e&&new Date(e.getTime()+6e4*e.getTimezoneOffset())}}function a(e){const t=e.replace(/-[a-z0-9]+$/,"");return t&&t!==e?t:null}function n(e){let t,a=e.indexOf("Y"),n=e.indexOf("M");ae[1].includes(i));if(o)return{locale:e[s],format:o[0],parser:n(o[0])};const r=a(e[s]);r&&e.push(r)}return{locale:"en",format:"Y-M-D",parseLocale:n("Y-M-D")}}(e);let i,o=s.locale;for(;!(i=t[o]);)o=a(o);return i||(i=t.en),Object.assign(s,i)}t.instance=null;class i{constructor(e){this._dict={},this._keySelector=e}add(e){const t=this._keySelector(e);Object.prototype.hasOwnProperty.call(this._dict,t)?this._dict[t].push(e):this._dict[t]=[e]}get(e){return this._dict[e]||[]}}const o=/^\d{4}-\d{2}-\d{2}$/;class r{constructor(a){this.element=a,this.element.setAttribute(e.pickerAppliedAttr,""),this.element.setAttribute("autocomplete","off"),e.dateInputIsSupported&&(this.element.type="date-polyfill"),this.setLocaleText(function(e,t){do{if(t in e)return e[t];e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(this.element,"lang")),this.element.placeholder||(this.element.placeholder=this.localeText.format.replace("M","mm").replace("D","dd").replace("Y","yyyy")),this.element.pattern=this.localeText.parser.pattern;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.element),"value");null===n&&(n={get:()=>this.element.getAttribute("value")||"",set:e=>this.element.setAttribute("value",e)},console.log("esm-date-input-polyfill: unable to obtain native input[type=date] .value propertyDescriptor")),Object.defineProperties(this.element,{textValue:{get:n.get,set:n.set},value:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal).toISOString().slice(0,10):"",set:e=>this.element.valueAsDate=e&&o.test(e)?new Date(e):null},valueAsDate:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal):null,set:e=>{e&&e.getTime&&!Number.isNaN(this.element._datePolyfillVal=e.getTime())?this.element.textValue=this.toLocaleDateString(e):(this.element.textValue="",this.element._datePolyfillVal=void 0),this.validate()}},valueAsNumber:{get:()=>void 0===this.element._datePolyfillVal?NaN:this.element._datePolyfillVal,set:e=>this.element.valueAsDate=new Date(e)},min:{get:()=>this.element.getAttribute("min"),set:e=>o.test(e)?this.element.setAttribute("min",e):this.element.removeAttribute("min")},max:{get:()=>this.element.getAttribute("max"),set:e=>o.test(e)?this.element.setAttribute("max",e):this.element.removeAttribute("max")}}),this.element.setCustomValidity||(console.log("HTMLElement.setCustomValidity not supported"),this.element.setCustomValidity=()=>{}),this.element.value=this.element.getAttribute("value");const s=()=>t.instance.attachTo(this),i={passive:!0};this.element.addEventListener("focus",s,i),this.element.addEventListener("mousedown",s,i),this.element.addEventListener("mouseup",s,i),this.element.addEventListener("keydown",e=>{let a=this.element.valueAsDate,n=!0,s=!1;switch(e.keyCode){case 9:case 13:case 27:t.instance.hide(),n=!1;break;case 38:null===a&&(a=new Date),a.setDate(a.getDate()+1),this.element.valueAsDate=a;break;case 40:null===a&&(a=new Date),a.setDate(a.getDate()-1),this.element.valueAsDate=a;break;default:s=!0}if(n)if(s){const e=this;setTimeout(()=>{const a=e.localeText.parser.parse(e.element.textValue);a&&a.setTime(a.getTime()-6e4*a.getTimezoneOffset()),+a!=+e.element.valueAsDate&&(e.element.valueAsDate=a,t.instance.pingInput(),t.instance.sync())},1)}else t.instance.pingInput(),t.instance.sync()},i)}validate(){if(this.element._datePolyfillVal){let e=new Date(this.element.min||NaN),t=new Date(this.element.max||NaN);if(this.element._datePolyfillValt.getTime())return this.element.setCustomValidity("≤ "+this.toLocaleDateString(t)),!1}return this.element.setCustomValidity(""),!0}setLocaleText(e){let t=(window.navigator.languages?window.navigator.languages:[window.navigator.userLanguage||window.navigator.language]).map(e=>e.toLowerCase());if(e){e=e.match(/^[a-z]+/)[0].toLowerCase();const a=new i(t=>t.startsWith(e));t.forEach(e=>a.add(e)),t=a.get(!0).concat(a.get(!1))}const a=s(t);this.locale=a.locale,this.localeText=a}toLocaleDateString(e){const t=e.toISOString().slice(0,10).split("-");return this.localeText.format.replace("Y",t[0]).replace("M",t[1]).replace("D",t[2])}}exports.addPickers=function({watchForInsert:a=!1,allowForcePicker:n=!1,yrsBack:s=80,yrsFwd:i=20}={}){t.instance=new t({yrsBack:s,yrsFwd:i});const o=new e.FindInputsHelper({allowForcePicker:n});if(o.getAllInputsForPolyfilling().forEach(e=>new r(e)),a){const e=new MutationObserver(e=>e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){const t=Array.from(e.querySelectorAll("input[type=date]"));t.push(e),t.forEach(e=>{o.requiresPolyfilling(e)&&new r(e)})}})})),a=()=>e.observe(document.body,{childList:!0,attributes:!1,subtree:!0});t.instance.onBeforeOpen(()=>{e.disconnect(),setTimeout(a,100)}),a()}}; +"use strict";var e=require("./polyfill-if-required-d8ecbf95.cjs.mjs");!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===a&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}('date-input-polyfill {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n position: absolute !important;\n text-align: center;\n box-shadow: 0 7px 8px -4px rgba(0, 0, 0, 0.2), 0 12px 17px 2px rgba(0, 0, 0, 0.14), 0 5px 22px 4px rgba(0, 0, 0, 0.12);\n cursor: default;\n z-index: 1; }\n date-input-polyfill[data-open="false"] {\n display: none; }\n date-input-polyfill[data-open="true"] {\n display: block; }\n date-input-polyfill select, date-input-polyfill table, date-input-polyfill th, date-input-polyfill td {\n background: #fff;\n color: #000;\n text-shadow: none;\n border: 0;\n padding: 0;\n height: auto;\n width: auto;\n line-height: normal;\n border-radius: 0;\n font-family: sans-serif;\n font-size: 14px;\n box-shadow: none; }\n date-input-polyfill select, date-input-polyfill button {\n border: 0;\n border-bottom: 1px solid #E0E0E0;\n height: 24px;\n vertical-align: top; }\n date-input-polyfill select {\n width: 50%; }\n date-input-polyfill select:first-of-type {\n border-right: 1px solid #E0E0E0;\n width: 30%; }\n date-input-polyfill button {\n padding: 0;\n width: 20%;\n background: #E0E0E0; }\n date-input-polyfill table {\n border-collapse: collapse; }\n date-input-polyfill th, date-input-polyfill td {\n width: 32px;\n padding: 4px;\n text-align: center; }\n date-input-polyfill td {\n cursor: pointer; }\n date-input-polyfill td:hover {\n background: #E0E0FF; }\n date-input-polyfill .esm-polyfill-invalid-day {\n background: #eee;\n color: #422;\n cursor: not-allowed; }\n date-input-polyfill .esm-polyfill-day-selected {\n font-weight: bold;\n background: #d8eaf6; }\n date-input-polyfill .esm-polyfill-current-day {\n border: 1px #777 solid; }\n\ninput[data-has-picker]::-ms-clear {\n display: none; }\n');class t{constructor({yrsBack:e=80,yrsFwd:a=20}={yrsBack:80,yrsFwd:20}){if(t.instance)return t.instance;const n={passive:!0};this.date=new Date,this.input=null,this.isOpen=!1,this._onBeforeOpen=[],this.container=document.createElement("date-input-polyfill"),this.year=document.createElement("select"),t.createRangeSelect(this.year,this.date.getFullYear()-e,this.date.getFullYear()+a),this.year.className="yearSelect",this.year.addEventListener("change",()=>{this.date.setYear(this.year.value),this.refreshDaysMatrix()},n),this.container.appendChild(this.year),this.month=document.createElement("select"),this.month.className="monthSelect",this.month.addEventListener("change",()=>{this.date.setMonth(this.month.value),this.refreshDaysMatrix()},n),this.container.appendChild(this.month),this.today=document.createElement("button"),this.today.textContent="Today",this.today.addEventListener("click",()=>{this.date=new Date,this.setInput()},n),this.container.appendChild(this.today);const s=document.createElement("table");this.daysHead=document.createElement("thead"),this.days=document.createElement("tbody"),this.days.addEventListener("click",e=>{const t=e.target;if(!t.classList.contains("esm-polyfill-day")||t.classList.contains("esm-polyfill-invalid-day"))return!1;const a=this.days.querySelector(".esm-polyfill-day-selected");a&&a.classList.remove("esm-polyfill-day-selected"),t.classList.add("esm-polyfill-day-selected"),this.date.setDate(parseInt(t.textContent,10)),this.setInput()},n),s.appendChild(this.daysHead),s.appendChild(this.days),this.container.appendChild(s),this.hide(),document.body.appendChild(this.container),document.addEventListener("click",e=>{let t=e.target,a=t===this.container;for(;!a&&(t=t.parentNode);)a=t===this.container;const n=e.target.getAttribute("type");"date"===n||"date-polyfill"===n||a||this.hide()},n)}hide(){this.container.setAttribute("data-open",this.isOpen=!1)}show(){this._onBeforeOpen.forEach(e=>e()),this.container.setAttribute("data-open",this.isOpen=!0)}onBeforeOpen(e){this._onBeforeOpen.push(e)}goto(e){const t=e.getBoundingClientRect();this.container.style.top=`${t.top+t.height+(document.documentElement.scrollTop||document.body.scrollTop)}px`,this.container.style.left=`${t.left+(document.documentElement.scrollLeft||document.body.scrollLeft)}px`,this.show()}attachTo(e){if(e===this.input&&this.isOpen)return!1;this.input=e,this.sync(),this.goto(this.input.element)}sync(){this.input.element.valueAsDate?this.date=t.utcDateToLocal(this.input.element.valueAsDate):this.date=new Date,this.year.value=this.date.getFullYear(),this.month.value=this.date.getMonth(),this.refreshDaysMatrix()}setInput(){this.input.element.value=`${this.date.getFullYear()}-${String(this.date.getMonth()+1).padStart(2,"0")}-${String(this.date.getDate()).padStart(2,"0")}`,this.input.element.focus(),setTimeout(()=>{this.hide()},100),this.pingInput()}refreshLocale(){if(this.locale===this.input.locale)return!1;this.locale=this.input.locale;const e=[""];for(let t=0,a=this.input.localeText.days.length;t${this.input.localeText.days[t]}`);this.daysHead.innerHTML=e.join(""),t.createRangeSelect(this.month,0,11,this.input.localeText.months,this.date.getMonth()),this.today.textContent=this.input.localeText.today}refreshDaysMatrix(){this.refreshLocale();const e=this.date.getFullYear(),a=this.date.getMonth();let n=new Date(e,a,1);const s=n.getDay(),i=new Date(this.date.getFullYear(),a+1,0).getDate(),o=t.utcDateToLocal(this.input.element.valueAsDate)||!1,r=o&&e===o.getFullYear()&&a===o.getMonth(),l=this.input.element.min,u=l?t.utcDateToLocal(new Date(l)).getTime():-30610224e6,m=this.input.element.max,d=m?t.utcDateToLocal(new Date(m)).getTime():3250368e7,h=new Date;h.setHours(0,0,0,0);const y=h.getTime(),b=[];for(let e=0;e":""}\n \n `),e+1<=s){b.push("");continue}const t=e+1-s,a=["esm-polyfill-day"];r&&o.getDate()===t&&a.push("esm-polyfill-day-selected");let i=n.setDate(t);(id)&&a.push("esm-polyfill-invalid-day"),i===y&&a.push("esm-polyfill-current-day"),b.push(`\n ${t}\n `)}this.days.innerHTML=b.join("")}pingInput(){let e,t;try{e=new Event("input"),t=new Event("change")}catch(a){e=document.createEvent("KeyboardEvent"),e.initEvent("input",!0,!1),t=document.createEvent("KeyboardEvent"),t.initEvent("change",!0,!1)}this.input.element.dispatchEvent(e),this.input.element.dispatchEvent(t)}static createRangeSelect(e,t,a,n,s){e.innerHTML="";for(let i=t;i<=a;++i){const a=document.createElement("option");e.appendChild(a);const o=n?n[i-t]:i;a.text=o,a.value=i,i===s&&(a.selected="selected")}return e}static utcDateToLocal(e){return e&&new Date(e.getTime()+6e4*e.getTimezoneOffset())}}function a(e){const t=e.replace(/-[a-z0-9]+$/,"");return t&&t!==e?t:null}function n(e){let t,a=e.indexOf("Y"),n=e.indexOf("M");ae[1].includes(i));if(o)return{locale:e[s],format:o[0],parser:n(o[0])};const r=a(e[s]);r&&e.push(r)}return{locale:"en",format:"Y-M-D",parseLocale:n("Y-M-D")}}(e);let i,o=s.locale;for(;!(i=t[o]);)o=a(o);return i||(i=t.en),Object.assign(s,i)}t.instance=null;class i{constructor(e){this._dict={},this._keySelector=e}add(e){const t=this._keySelector(e);Object.prototype.hasOwnProperty.call(this._dict,t)?this._dict[t].push(e):this._dict[t]=[e]}get(e){return this._dict[e]||[]}}const o=/^\d{4}-\d{2}-\d{2}$/;class r{constructor(a){this.element=a,this.element.setAttribute(e.pickerAppliedAttr,""),this.element.setAttribute("autocomplete","off"),e.dateInputIsSupported&&(this.element.type="date-polyfill"),this.setLocaleText(function(e,t){do{if(t in e)return e[t];e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(this.element,"lang")),this.element.placeholder||(this.element.placeholder=this.localeText.format.replace("M","mm").replace("D","dd").replace("Y","yyyy")),this.element.title||(this.element.title=this.element.placeholder),this.element.pattern=this.localeText.parser.pattern;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.element),"value");null===n&&(n={get:()=>this.element.getAttribute("value")||"",set:e=>this.element.setAttribute("value",e)},console.log("esm-date-input-polyfill: unable to obtain native input[type=date] .value propertyDescriptor")),Object.defineProperties(this.element,{textValue:{get:n.get,set:n.set},value:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal).toISOString().slice(0,10):"",set:e=>this.element.valueAsDate=e&&o.test(e)?new Date(e):null},valueAsDate:{get:()=>this.element._datePolyfillVal?new Date(this.element._datePolyfillVal):null,set:e=>{e&&e.getTime&&!Number.isNaN(this.element._datePolyfillVal=e.getTime())?this.element.textValue=this.toLocaleDateString(e):(this.element.textValue="",this.element._datePolyfillVal=void 0),this.validate()}},valueAsNumber:{get:()=>void 0===this.element._datePolyfillVal?NaN:this.element._datePolyfillVal,set:e=>this.element.valueAsDate=new Date(e)},min:{get:()=>this.element.getAttribute("min"),set:e=>o.test(e)?this.element.setAttribute("min",e):this.element.removeAttribute("min")},max:{get:()=>this.element.getAttribute("max"),set:e=>o.test(e)?this.element.setAttribute("max",e):this.element.removeAttribute("max")}}),this.element.setCustomValidity||(console.log("HTMLElement.setCustomValidity not supported"),this.element.setCustomValidity=()=>{}),this.element.value=this.element.getAttribute("value");const s=()=>t.instance.attachTo(this),i={passive:!0};this.element.addEventListener("focus",s,i),this.element.addEventListener("mousedown",s,i),this.element.addEventListener("mouseup",s,i),this.element.addEventListener("keydown",e=>{let a=this.element.valueAsDate,n=!0,s=!1;switch(e.keyCode){case 9:case 13:case 27:t.instance.hide(),n=!1;break;case 38:null===a&&(a=new Date),a.setDate(a.getDate()+1),this.element.valueAsDate=a;break;case 40:null===a&&(a=new Date),a.setDate(a.getDate()-1),this.element.valueAsDate=a;break;default:s=!0}if(n)if(s){const e=this;setTimeout(()=>{const a=e.localeText.parser.parse(e.element.textValue);a&&a.setTime(a.getTime()-6e4*a.getTimezoneOffset()),+a!=+e.element.valueAsDate&&(e.element.valueAsDate=a,t.instance.pingInput(),t.instance.sync())},1)}else t.instance.pingInput(),t.instance.sync()},i)}validate(){if(this.element._datePolyfillVal){let e=new Date(this.element.min||NaN),t=new Date(this.element.max||NaN);if(this.element._datePolyfillValt.getTime())return this.element.setCustomValidity("≤ "+this.toLocaleDateString(t)),!1}return this.element.setCustomValidity(""),!0}setLocaleText(e){let t=(window.navigator.languages?window.navigator.languages:[window.navigator.userLanguage||window.navigator.language]).map(e=>e.toLowerCase());if(e){e=e.match(/^[a-z]+/)[0].toLowerCase();const a=new i(t=>t.startsWith(e));t.forEach(e=>a.add(e)),t=a.get(!0).concat(a.get(!1))}const a=s(t);this.locale=a.locale,this.localeText=a}toLocaleDateString(e){const t=e.toISOString().slice(0,10).split("-");return this.localeText.format.replace("Y",t[0]).replace("M",t[1]).replace("D",t[2])}}exports.addPickers=function({watchForInsert:a=!1,allowForcePicker:n=!1,yrsBack:s=80,yrsFwd:i=20}={}){t.instance=new t({yrsBack:s,yrsFwd:i});const o=new e.FindInputsHelper({allowForcePicker:n});if(o.getAllInputsForPolyfilling().forEach(e=>new r(e)),a){const e=new MutationObserver(e=>e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){const t=Array.from(e.querySelectorAll("input[type=date]"));t.push(e),t.forEach(e=>{o.requiresPolyfilling(e)&&new r(e)})}})})),a=()=>e.observe(document.body,{childList:!0,attributes:!1,subtree:!0});t.instance.onBeforeOpen(()=>{e.disconnect(),setTimeout(a,100)}),a()}}; diff --git a/dist/cjs/polyfill-if-required-6dfd5f3d.cjs.mjs b/dist/cjs/polyfill-if-required-d8ecbf95.cjs.mjs similarity index 80% rename from dist/cjs/polyfill-if-required-6dfd5f3d.cjs.mjs rename to dist/cjs/polyfill-if-required-d8ecbf95.cjs.mjs index fa821ed..1e107e0 100644 --- a/dist/cjs/polyfill-if-required-6dfd5f3d.cjs.mjs +++ b/dist/cjs/polyfill-if-required-d8ecbf95.cjs.mjs @@ -1,2 +1,2 @@ // @license MIT - https://github.com/brianblakely/esm-date-input-polyfill -"use strict";const e=function(){const e=document.createElement("input");e.setAttribute("type","date");return e.setAttribute("value","not-a-date"),"not-a-date"!==e.value}();exports.FindInputsHelper=class{constructor({allowForcePicker:e=!1}={}){this.allowForcePicker=e}requiresPolyfilling(t){return t&&"INPUT"===t.tagName&&"date"===t.getAttribute("type")&&!t.hasAttribute("data-has-picker")&&(!e||this.allowForcePicker&&null!==t.closest("[data-force-date-input-polyfill]"))}getAllInputsForPolyfilling(){return Array.from(document.getElementsByTagName("input")).filter(e=>this.requiresPolyfilling(e))||[]}},exports.dateInputIsSupported=e,exports.pickerAppliedAttr="data-has-picker",exports.polyfillIfRequired=function({watchForInsert:t=!1,allowForcePicker:r=!1,yrsBack:o=80,yrsFwd:a=20}={}){return!e||r&&document.querySelector("[data-force-date-input-polyfill]")?new Promise((function(e){e(require("./add-pickers-ba507d00.cjs.mjs"))})).then(e=>new Promise(i=>{let n=!1;const l=()=>{n||(e.addPickers({watchForInsert:t,allowForcePicker:r,yrsBack:o,yrsFwd:a}),i(),n=!0)};"complete"===document.readyState?l():(document.addEventListener("DOMContentLoaded",l),window.addEventListener("load",l))})):Promise.resolve()}; +"use strict";const e=function(){const e=document.createElement("input");e.setAttribute("type","date");return e.setAttribute("value","not-a-date"),"not-a-date"!==e.value}();exports.FindInputsHelper=class{constructor({allowForcePicker:e=!1}={}){this.allowForcePicker=e}requiresPolyfilling(t){return t&&"INPUT"===t.tagName&&"date"===t.getAttribute("type")&&!t.hasAttribute("data-has-picker")&&(!e||this.allowForcePicker&&null!==t.closest("[data-force-date-input-polyfill]"))}getAllInputsForPolyfilling(){return Array.from(document.getElementsByTagName("input")).filter(e=>this.requiresPolyfilling(e))||[]}},exports.dateInputIsSupported=e,exports.pickerAppliedAttr="data-has-picker",exports.polyfillIfRequired=function({watchForInsert:t=!1,allowForcePicker:r=!1,yrsBack:o=80,yrsFwd:i=20}={}){return!e||r&&document.querySelector("[data-force-date-input-polyfill]")?new Promise((function(e){e(require("./add-pickers-59466f4f.cjs.mjs"))})).then(e=>new Promise(n=>{let a=!1;const l=()=>{a||(e.addPickers({watchForInsert:t,allowForcePicker:r,yrsBack:o,yrsFwd:i}),n(),a=!0)};"complete"===document.readyState?l():(document.addEventListener("DOMContentLoaded",l),window.addEventListener("load",l))})):Promise.resolve()}; diff --git a/dist/cjs/polyfill-if-required.cjs.js b/dist/cjs/polyfill-if-required.cjs.js index 0d76b86..b741e69 100644 --- a/dist/cjs/polyfill-if-required.cjs.js +++ b/dist/cjs/polyfill-if-required.cjs.js @@ -1,2 +1,2 @@ // @license MIT - https://github.com/brianblakely/esm-date-input-polyfill -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./polyfill-if-required-6dfd5f3d.cjs.mjs");exports.polyfillIfRequired=e.polyfillIfRequired; +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./polyfill-if-required-d8ecbf95.cjs.mjs");exports.polyfillIfRequired=e.polyfillIfRequired; diff --git a/dist/iife/esm-date-input-polyfill.js b/dist/iife/esm-date-input-polyfill.js index fbcbd9c..3d3f4b6 100644 --- a/dist/iife/esm-date-input-polyfill.js +++ b/dist/iife/esm-date-input-polyfill.js @@ -1,3 +1,3 @@ // @license MIT - https://github.com/brianblakely/esm-date-input-polyfill -var dateInputPolyfill=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},a=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=function(e){return"object"==typeof e?null!==e:"function"==typeof e},s=a.document,l=u(s)&&u(s.createElement),c=function(e){return l?s.createElement(e):{}},d=!i&&!o((function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a})),f=function(e){if(!u(e))throw TypeError(String(e)+" is not an object");return e},h=function(e,t){if(!u(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!u(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!u(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!u(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},m=Object.defineProperty,p={f:i?m:function(e,t,n){if(f(e),t=h(t,!0),f(n),d)try{return m(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g=i?function(e,t,n){return p.f(e,t,y(1,n))}:function(e,t,n){return e[t]=n,e},v=function(e,t){try{g(a,e,t)}catch(n){a[e]=t}return t},b=a["__core-js_shared__"]||v("__core-js_shared__",{}),_=n((function(e){(e.exports=function(e,t){return b[e]||(b[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),j={}.hasOwnProperty,k=function(e,t){return j.call(e,t)},w=0,S=Math.random(),E=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++w+S).toString(36)},x=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),A=x&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,M=_("wks"),O=a.Symbol,T=A?O:O&&O.withoutSetter||E,D=function(e){return k(M,e)||(x&&k(O,e)?M[e]=O[e]:M[e]=T("Symbol."+e)),M[e]},z={};z[D("toStringTag")]="z";var P="[object z]"===String(z),L=Function.toString;"function"!=typeof b.inspectSource&&(b.inspectSource=function(e){return L.call(e)});var N,I,C,F=b.inspectSource,R=a.WeakMap,q="function"==typeof R&&/native code/.test(F(R)),Y=_("keys"),J=function(e){return Y[e]||(Y[e]=E(e))},V={},H=a.WeakMap;if(q){var B=new H,G=B.get,W=B.has,U=B.set;N=function(e,t){return U.call(B,e,t),t},I=function(e){return G.call(B,e)||{}},C=function(e){return W.call(B,e)}}else{var K=J("state");V[K]=!0,N=function(e,t){return g(e,K,t),t},I=function(e){return k(e,K)?e[K]:{}},C=function(e){return k(e,K)}}var $={set:N,get:I,has:C,enforce:function(e){return C(e)?I(e):N(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=I(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},X=n((function(e){var t=$.get,n=$.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var u=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||k(o,"name")||g(o,"name",t),n(o).source=r.join("string"==typeof t?t:"")),e!==a?(u?!l&&e[t]&&(s=!0):delete e[t],s?e[t]=o:g(e,t,o)):s?e[t]=o:v(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||F(this)}))})),Q={}.toString,Z=function(e){return Q.call(e).slice(8,-1)},ee=D("toStringTag"),te="Arguments"==Z(function(){return arguments}()),ne=P?Z:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),ee))?n:te?Z(t):"Object"==(r=Z(t))&&"function"==typeof t.callee?"Arguments":r},re=P?{}.toString:function(){return"[object "+ne(this)+"]"};P||X(Object.prototype,"toString",re,{unsafe:!0});var ae={}.propertyIsEnumerable,oe=Object.getOwnPropertyDescriptor,ie={f:oe&&!ae.call({1:2},1)?function(e){var t=oe(this,e);return!!t&&t.enumerable}:ae},ue="".split,se=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==Z(e)?ue.call(e,""):Object(e)}:Object,le=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},ce=function(e){return se(le(e))},de=Object.getOwnPropertyDescriptor,fe={f:i?de:function(e,t){if(e=ce(e),t=h(t,!0),d)try{return de(e,t)}catch(e){}if(k(e,t))return y(!ie.f.call(e,t),e[t])}},he=a,me=function(e){return"function"==typeof e?e:void 0},pe=function(e,t){return arguments.length<2?me(he[e])||me(a[e]):he[e]&&he[e][t]||a[e]&&a[e][t]},ye=Math.ceil,ge=Math.floor,ve=function(e){return isNaN(e=+e)?0:(e>0?ge:ye)(e)},be=Math.min,_e=function(e){return e>0?be(ve(e),9007199254740991):0},je=Math.max,ke=Math.min,we=function(e,t){var n=ve(e);return n<0?je(n+t,0):ke(n,t)},Se=function(e){return function(t,n,r){var a,o=ce(t),i=_e(o.length),u=we(r,i);if(e&&n!=n){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}},Ee={includes:Se(!0),indexOf:Se(!1)},xe=Ee.indexOf,Ae=function(e,t){var n,r=ce(e),a=0,o=[];for(n in r)!k(V,n)&&k(r,n)&&o.push(n);for(;t.length>a;)k(r,n=t[a++])&&(~xe(o,n)||o.push(n));return o},Me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Oe=Me.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(e){return Ae(e,Oe)}},De={f:Object.getOwnPropertySymbols},ze=pe("Reflect","ownKeys")||function(e){var t=Te.f(f(e)),n=De.f;return n?t.concat(n(e)):t},Pe=function(e,t){for(var n=ze(t),r=p.f,a=fe.f,o=0;os;s++)if((c=a?m(f(h=e[s])[0],h[1]):m(e[s]))&&c instanceof t)return c;return new t(!1)}i=u.call(e)}for(d=i.next;!(h=d.call(i)).done;)if("object"==typeof(c=rt(i,m,h.value,a))&&c&&c instanceof t)return c;return new t(!1)}).stop=function(e){return new t(!0,e)}})),ot=D("iterator"),it=!1;try{var ut=0,st={next:function(){return{done:!!ut++}},return:function(){it=!0}};st[ot]=function(){return this},Array.from(st,(function(){throw 2}))}catch(e){}var lt,ct,dt,ft=function(e,t){if(!t&&!it)return!1;var n=!1;try{var r={};r[ot]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},ht=D("species"),mt=function(e,t){var n,r=f(e).constructor;return void 0===r||null==(n=f(r)[ht])?t:Ke(n)},pt=pe("document","documentElement"),yt=pe("navigator","userAgent")||"",gt=/(iphone|ipod|ipad).*applewebkit/i.test(yt),vt=a.location,bt=a.setImmediate,_t=a.clearImmediate,jt=a.process,kt=a.MessageChannel,wt=a.Dispatch,St=0,Et={},xt=function(e){if(Et.hasOwnProperty(e)){var t=Et[e];delete Et[e],t()}},At=function(e){return function(){xt(e)}},Mt=function(e){xt(e.data)},Ot=function(e){a.postMessage(e+"",vt.protocol+"//"+vt.host)};bt&&_t||(bt=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Et[++St]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},lt(St),St},_t=function(e){delete Et[e]},"process"==Z(jt)?lt=function(e){jt.nextTick(At(e))}:wt&&wt.now?lt=function(e){wt.now(At(e))}:kt&&!gt?(dt=(ct=new kt).port2,ct.port1.onmessage=Mt,lt=et(dt.postMessage,dt,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||o(Ot)||"file:"===vt.protocol?lt="onreadystatechange"in c("script")?function(e){pt.appendChild(c("script")).onreadystatechange=function(){pt.removeChild(this),xt(e)}}:function(e){setTimeout(At(e),0)}:(lt=Ot,a.addEventListener("message",Mt,!1)));var Tt,Dt,zt,Pt,Lt,Nt,It,Ct,Ft={set:bt,clear:_t},Rt=fe.f,qt=Ft.set,Yt=a.MutationObserver||a.WebKitMutationObserver,Jt=a.process,Vt=a.Promise,Ht="process"==Z(Jt),Bt=Rt(a,"queueMicrotask"),Gt=Bt&&Bt.value;Gt||(Tt=function(){var e,t;for(Ht&&(e=Jt.domain)&&e.exit();Dt;){t=Dt.fn,Dt=Dt.next;try{t()}catch(e){throw Dt?Pt():zt=void 0,e}}zt=void 0,e&&e.enter()},Ht?Pt=function(){Jt.nextTick(Tt)}:Yt&&!gt?(Lt=!0,Nt=document.createTextNode(""),new Yt(Tt).observe(Nt,{characterData:!0}),Pt=function(){Nt.data=Lt=!Lt}):Vt&&Vt.resolve?(It=Vt.resolve(void 0),Ct=It.then,Pt=function(){Ct.call(It,Tt)}):Pt=function(){qt.call(a,Tt)});var Wt,Ut,Kt=Gt||function(e){var t={fn:e,next:void 0};zt&&(zt.next=t),Dt||(Dt=t,Pt()),zt=t},$t=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Ke(t),this.reject=Ke(n)},Xt={f:function(e){return new $t(e)}},Qt=function(e,t){if(f(e),u(t)&&t.constructor===e)return t;var n=Xt.f(e);return(0,n.resolve)(t),n.promise},Zt=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},en=a.process,tn=en&&en.versions,nn=tn&&tn.v8;nn?Ut=(Wt=nn.split("."))[0]+Wt[1]:yt&&(!(Wt=yt.match(/Edge\/(\d+)/))||Wt[1]>=74)&&(Wt=yt.match(/Chrome\/(\d+)/))&&(Ut=Wt[1]);var rn,an,on,un,sn=Ut&&+Ut,ln=Ft.set,cn=D("species"),dn="Promise",fn=$.get,hn=$.set,mn=$.getterFor(dn),pn=Ve,yn=a.TypeError,gn=a.document,vn=a.process,bn=pe("fetch"),_n=Xt.f,jn=_n,kn="process"==Z(vn),wn=!!(gn&&gn.createEvent&&a.dispatchEvent),Sn=qe(dn,(function(){if(!(F(pn)!==String(pn))){if(66===sn)return!0;if(!kn&&"function"!=typeof PromiseRejectionEvent)return!0}if(sn>=51&&/native code/.test(pn))return!1;var e=pn.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[cn]=t,!(e.then((function(){}))instanceof t)})),En=Sn||!ft((function(e){pn.all(e).catch((function(){}))})),xn=function(e){var t;return!(!u(e)||"function"!=typeof(t=e.then))&&t},An=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;Kt((function(){for(var a=t.value,o=1==t.state,i=0;r.length>i;){var u,s,l,c=r[i++],d=o?c.ok:c.fail,f=c.resolve,h=c.reject,m=c.domain;try{d?(o||(2===t.rejection&&Dn(e,t),t.rejection=1),!0===d?u=a:(m&&m.enter(),u=d(a),m&&(m.exit(),l=!0)),u===c.promise?h(yn("Promise-chain cycle")):(s=xn(u))?s.call(u,f,h):f(u)):h(a)}catch(e){m&&!l&&m.exit(),h(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&On(e,t)}))}},Mn=function(e,t,n){var r,o;wn?((r=gn.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),a.dispatchEvent(r)):r={promise:t,reason:n},(o=a["on"+e])?o(r):"unhandledrejection"===e&&function(e,t){var n=a.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},On=function(e,t){ln.call(a,(function(){var n,r=t.value;if(Tn(t)&&(n=Zt((function(){kn?vn.emit("unhandledRejection",r,e):Mn("unhandledrejection",e,r)})),t.rejection=kn||Tn(t)?2:1,n.error))throw n.value}))},Tn=function(e){return 1!==e.rejection&&!e.parent},Dn=function(e,t){ln.call(a,(function(){kn?vn.emit("rejectionHandled",e):Mn("rejectionhandled",e,t.value)}))},zn=function(e,t,n,r){return function(a){e(t,n,a,r)}},Pn=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,An(e,t,!0))},Ln=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw yn("Promise can't be resolved itself");var a=xn(n);a?Kt((function(){var r={done:!1};try{a.call(n,zn(Ln,e,r,t),zn(Pn,e,r,t))}catch(n){Pn(e,r,n,t)}})):(t.value=n,t.state=1,An(e,t,!1))}catch(n){Pn(e,{done:!1},n,t)}}};Sn&&(pn=function(e){!function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,pn,dn),Ke(e),rn.call(this);var t=fn(this);try{e(zn(Ln,this,t),zn(Pn,this,t))}catch(e){Pn(this,t,e)}},(rn=function(e){hn(this,{type:dn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,n){for(var r in t)X(e,r,t[r],n);return e}(pn.prototype,{then:function(e,t){var n=mn(this),r=_n(mt(this,pn));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=kn?vn.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&An(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),an=function(){var e=new rn,t=fn(e);this.promise=e,this.resolve=zn(Ln,e,t),this.reject=zn(Pn,e,t)},Xt.f=_n=function(e){return e===pn||e===on?new an(e):jn(e)},"function"==typeof Ve&&(un=Ve.prototype.then,X(Ve.prototype,"then",(function(e,t){var n=this;return new pn((function(e,t){un.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof bn&&Je({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Qt(pn,bn.apply(a,arguments))}}))),Je({global:!0,wrap:!0,forced:Sn},{Promise:pn}),Ge(pn,dn,!1),Ue(dn),on=pe(dn),Je({target:dn,stat:!0,forced:Sn},{reject:function(e){var t=_n(this);return t.reject.call(void 0,e),t.promise}}),Je({target:dn,stat:!0,forced:Sn},{resolve:function(e){return Qt(this,e)}}),Je({target:dn,stat:!0,forced:En},{all:function(e){var t=this,n=_n(t),r=n.resolve,a=n.reject,o=Zt((function(){var n=Ke(t.resolve),o=[],i=0,u=1;at(e,(function(e){var s=i++,l=!1;o.push(void 0),u++,n.call(t,e).then((function(e){l||(l=!0,o[s]=e,--u||r(o))}),a)})),--u||r(o)}));return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=_n(t),r=n.reject,a=Zt((function(){var a=Ke(t.resolve);at(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var Nn=function(){var e=document.createElement("input");e.setAttribute("type","date");return e.setAttribute("value","not-a-date"),"not-a-date"!==e.value}();var In=function(e){return Object(le(e))},Cn=Array.isArray||function(e){return"Array"==Z(e)},Fn=D("species"),Rn=function(e,t){var n;return Cn(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Cn(n.prototype)?u(n)&&null===(n=n[Fn])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},qn=[].push,Yn=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,o=6==e,i=5==e||o;return function(u,s,l,c){for(var d,f,h=In(u),m=se(h),p=et(s,l,3),y=_e(m.length),g=0,v=c||Rn,b=t?v(u,y):n?v(u,0):void 0;y>g;g++)if((i||g in m)&&(f=p(d=m[g],g,h),e))if(t)b[g]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return g;case 2:qn.call(b,d)}else if(a)return!1;return o?-1:r||a?a:b}},Jn={forEach:Yn(0),map:Yn(1),filter:Yn(2),some:Yn(3),every:Yn(4),find:Yn(5),findIndex:Yn(6)},Vn=D("species"),Hn=function(e){return sn>=51||!o((function(){var t=[];return(t.constructor={})[Vn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Bn=Object.defineProperty,Gn={},Wn=function(e){throw e},Un=function(e,t){if(k(Gn,e))return Gn[e];t||(t={});var n=[][e],r=!!k(t,"ACCESSORS")&&t.ACCESSORS,a=k(t,0)?t[0]:Wn,u=k(t,1)?t[1]:void 0;return Gn[e]=!!n&&!o((function(){if(r&&!i)return!0;var e={length:-1};r?Bn(e,1,{enumerable:!0,get:Wn}):e[1]=1,n.call(e,a,u)}))},Kn=Jn.filter,$n=Hn("filter"),Xn=Un("filter");Je({target:"Array",proto:!0,forced:!$n||!Xn},{filter:function(e){return Kn(this,e,arguments.length>1?arguments[1]:void 0)}});var Qn=function(e,t,n){var r=h(t);r in e?p.f(e,r,y(0,n)):e[r]=n},Zn=!ft((function(e){Array.from(e)}));Je({target:"Array",stat:!0,forced:Zn},{from:function(e){var t,n,r,a,o,i,u=In(e),s="function"==typeof this?this:Array,l=arguments.length,c=l>1?arguments[1]:void 0,d=void 0!==c,f=nt(u),h=0;if(d&&(c=et(c,l>2?arguments[2]:void 0,2)),null==f||s==Array&&Ze(f))for(n=new s(t=_e(u.length));t>h;h++)i=d?c(u[h],h):u[h],Qn(n,h,i);else for(o=(a=f.call(u)).next,n=new s;!(r=o.call(a)).done;h++)i=d?rt(a,c,[r.value,h],!0):r.value,Qn(n,h,i);return n.length=h,n}});var er,tr,nr,rr=function(e){return function(t,n){var r,a,o=String(le(t)),i=ve(n),u=o.length;return i<0||i>=u?e?"":void 0:(r=o.charCodeAt(i))<55296||r>56319||i+1===u||(a=o.charCodeAt(i+1))<56320||a>57343?e?o.charAt(i):r:e?o.slice(i,i+2):a-56320+(r-55296<<10)+65536}},ar={codeAt:rr(!1),charAt:rr(!0)},or=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ir=J("IE_PROTO"),ur=Object.prototype,sr=or?Object.getPrototypeOf:function(e){return e=In(e),k(e,ir)?e[ir]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ur:null},lr=D("iterator"),cr=!1;[].keys&&("next"in(nr=[].keys())?(tr=sr(sr(nr)))!==Object.prototype&&(er=tr):cr=!0),null==er&&(er={}),k(er,lr)||g(er,lr,(function(){return this}));var dr,fr={IteratorPrototype:er,BUGGY_SAFARI_ITERATORS:cr},hr=Object.keys||function(e){return Ae(e,Me)},mr=i?Object.defineProperties:function(e,t){f(e);for(var n,r=hr(t),a=r.length,o=0;a>o;)p.f(e,n=r[o++],t[n]);return e},pr=J("IE_PROTO"),yr=function(){},gr=function(e){return"