@7pmlabs/design-system 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-system101.js +1 -1
- package/dist/design-system101.mjs +3 -3
- package/dist/design-system103.js +1 -1
- package/dist/design-system103.js.map +1 -1
- package/dist/design-system103.mjs +2138 -1069
- package/dist/design-system103.mjs.map +1 -1
- package/dist/design-system104.js +1 -1
- package/dist/design-system104.js.map +1 -1
- package/dist/design-system104.mjs +1103 -25
- package/dist/design-system104.mjs.map +1 -1
- package/dist/design-system105.js +1 -1
- package/dist/design-system105.js.map +1 -1
- package/dist/design-system105.mjs +25 -67
- package/dist/design-system105.mjs.map +1 -1
- package/dist/design-system106.js +1 -1
- package/dist/design-system106.js.map +1 -1
- package/dist/design-system106.mjs +60 -2165
- package/dist/design-system106.mjs.map +1 -1
- package/dist/design-system113.js +1 -1
- package/dist/design-system113.mjs +6 -2
- package/dist/design-system113.mjs.map +1 -1
- package/dist/design-system114.js +1 -1
- package/dist/design-system114.mjs +3 -5
- package/dist/design-system114.mjs.map +1 -1
- package/dist/design-system115.js +1 -1
- package/dist/design-system115.mjs +2 -4
- package/dist/design-system115.mjs.map +1 -1
- package/dist/design-system116.js +1 -1
- package/dist/design-system116.mjs +2 -2
- package/dist/design-system118.js +1 -1
- package/dist/design-system118.mjs +13 -13
- package/dist/design-system13.js +1 -1
- package/dist/design-system13.mjs +2 -2
- package/dist/design-system148.js +1 -1
- package/dist/design-system148.js.map +1 -1
- package/dist/design-system148.mjs +7 -11
- package/dist/design-system148.mjs.map +1 -1
- package/dist/design-system149.js +1 -1
- package/dist/design-system149.js.map +1 -1
- package/dist/design-system149.mjs +9 -7
- package/dist/design-system149.mjs.map +1 -1
- package/dist/design-system15.js +1 -1
- package/dist/design-system15.mjs +2 -2
- package/dist/design-system150.js +1 -1
- package/dist/design-system150.js.map +1 -1
- package/dist/design-system150.mjs +11 -9
- package/dist/design-system150.mjs.map +1 -1
- package/dist/design-system153.js +1 -1
- package/dist/design-system153.js.map +1 -1
- package/dist/design-system153.mjs +16 -2
- package/dist/design-system153.mjs.map +1 -1
- package/dist/design-system154.js +1 -1
- package/dist/design-system154.js.map +1 -1
- package/dist/design-system154.mjs +5 -15
- package/dist/design-system154.mjs.map +1 -1
- package/dist/design-system155.js +1 -1
- package/dist/design-system155.js.map +1 -1
- package/dist/design-system155.mjs +5 -5
- package/dist/design-system155.mjs.map +1 -1
- package/dist/design-system156.js +1 -1
- package/dist/design-system156.js.map +1 -1
- package/dist/design-system156.mjs +8 -5
- package/dist/design-system156.mjs.map +1 -1
- package/dist/design-system157.js +1 -1
- package/dist/design-system157.js.map +1 -1
- package/dist/design-system157.mjs +6 -8
- package/dist/design-system157.mjs.map +1 -1
- package/dist/design-system158.js +1 -1
- package/dist/design-system158.js.map +1 -1
- package/dist/design-system158.mjs +5 -6
- package/dist/design-system158.mjs.map +1 -1
- package/dist/design-system159.js +1 -1
- package/dist/design-system159.js.map +1 -1
- package/dist/design-system159.mjs +4 -4
- package/dist/design-system159.mjs.map +1 -1
- package/dist/design-system160.js +1 -1
- package/dist/design-system160.js.map +1 -1
- package/dist/design-system160.mjs +6 -5
- package/dist/design-system160.mjs.map +1 -1
- package/dist/design-system161.js +1 -1
- package/dist/design-system161.js.map +1 -1
- package/dist/design-system161.mjs +4 -4
- package/dist/design-system161.mjs.map +1 -1
- package/dist/design-system162.js +1 -1
- package/dist/design-system162.js.map +1 -1
- package/dist/design-system162.mjs +5 -6
- package/dist/design-system162.mjs.map +1 -1
- package/dist/design-system163.js +1 -1
- package/dist/design-system163.js.map +1 -1
- package/dist/design-system163.mjs +39 -5
- package/dist/design-system163.mjs.map +1 -1
- package/dist/design-system164.js +1 -1
- package/dist/design-system164.js.map +1 -1
- package/dist/design-system164.mjs +6 -39
- package/dist/design-system164.mjs.map +1 -1
- package/dist/design-system165.js +1 -1
- package/dist/design-system165.js.map +1 -1
- package/dist/design-system165.mjs +5 -6
- package/dist/design-system165.mjs.map +1 -1
- package/dist/design-system166.js +1 -1
- package/dist/design-system166.js.map +1 -1
- package/dist/design-system166.mjs +16 -6
- package/dist/design-system166.mjs.map +1 -1
- package/dist/design-system167.js +1 -1
- package/dist/design-system167.js.map +1 -1
- package/dist/design-system167.mjs +2 -16
- package/dist/design-system167.mjs.map +1 -1
- package/dist/design-system168.js +1 -1
- package/dist/design-system168.js.map +1 -1
- package/dist/design-system168.mjs +2 -8
- package/dist/design-system168.mjs.map +1 -1
- package/dist/design-system169.js +1 -1
- package/dist/design-system169.js.map +1 -1
- package/dist/design-system169.mjs +8 -2
- package/dist/design-system169.mjs.map +1 -1
- package/dist/design-system18.js +1 -1
- package/dist/design-system18.mjs +1 -1
- package/dist/design-system194.js +1 -1
- package/dist/design-system194.mjs +1 -1
- package/dist/design-system195.js +1 -1
- package/dist/design-system195.mjs +1 -1
- package/dist/design-system203.js +1 -1
- package/dist/design-system203.mjs +1 -1
- package/dist/design-system26.js +1 -1
- package/dist/design-system26.js.map +1 -1
- package/dist/design-system26.mjs +53 -51
- package/dist/design-system26.mjs.map +1 -1
- package/dist/design-system89.js +1 -1
- package/dist/design-system89.mjs +1 -1
- package/dist/design-system92.js +1 -1
- package/dist/design-system92.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/design-system101.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const pn=require("./design-
|
|
1
|
+
"use strict";const pn=require("./design-system113.js"),Jn=require("./design-system114.js"),kn=require("./design-system115.js");(function(te,Kn){(function(ee,d){te.exports=d()})(pn.commonjsGlobal,function(){var ee;function d(){return ee.apply(null,arguments)}function F(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function ot(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ne(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;for(var e in t)if(k(t,e))return;return 1}function R(t){return t===void 0}function z(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Mt(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function Pe(t,e){for(var n=[],s=t.length,i=0;i<s;++i)n.push(e(t[i],i));return n}function et(t,e){for(var n in e)k(e,n)&&(t[n]=e[n]);return k(e,"toString")&&(t.toString=e.toString),k(e,"valueOf")&&(t.valueOf=e.valueOf),t}function A(t,e,n,s){return Ke(t,e,n,s,!0).utc()}function g(t){return t._pf==null&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function se(t){if(t._isValid==null){var e=g(t),n=vn.call(e.parsedDateParts,function(s){return s!=null}),n=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(n=n&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(t))return n;t._isValid=n}return t._isValid}function Ct(t){var e=A(NaN);return t!=null?et(g(e),t):g(e).userInvalidated=!0,e}var vn=Array.prototype.some||function(t){for(var e=Object(this),n=e.length>>>0,s=0;s<n;s++)if(s in e&&t.call(this,e[s],s,e))return!0;return!1},Re=d.momentProperties=[],ie=!1;function re(t,e){var n,s,i,r=Re.length;if(R(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),R(e._i)||(t._i=e._i),R(e._f)||(t._f=e._f),R(e._l)||(t._l=e._l),R(e._strict)||(t._strict=e._strict),R(e._tzm)||(t._tzm=e._tzm),R(e._isUTC)||(t._isUTC=e._isUTC),R(e._offset)||(t._offset=e._offset),R(e._pf)||(t._pf=g(e)),R(e._locale)||(t._locale=e._locale),0<r)for(n=0;n<r;n++)R(i=e[s=Re[n]])||(t[s]=i);return t}function Dt(t){re(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ie===!1&&(ie=!0,d.updateOffset(this),ie=!1)}function L(t){return t instanceof Dt||t!=null&&t._isAMomentObject!=null}function We(t){d.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return et(function(){if(d.deprecationHandler!=null&&d.deprecationHandler(null,t),n){for(var s,i,r=[],a=arguments.length,o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){for(i in s+=`
|
|
2
2
|
[`+o+"] ",arguments[0])k(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}We(t+`
|
|
3
3
|
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
4
4
|
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var Ce={};function He(t,e){d.deprecationHandler!=null&&d.deprecationHandler(t,e),Ce[t]||(We(e),Ce[t]=!0)}function j(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function ae(t,e){var n,s=et({},t);for(n in e)k(e,n)&&(ot(t[n])&&ot(e[n])?(s[n]={},et(s[n],t[n]),et(s[n],e[n])):e[n]!=null?s[n]=e[n]:delete s[n]);for(n in t)k(t,n)&&!k(e,n)&&ot(t[n])&&(s[n]=et({},s[n]));return s}function oe(t){t!=null&&this.set(t)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null;var Mn=Object.keys||function(t){var e,n=[];for(e in t)k(t,e)&&n.push(e);return n};function I(t,e,n){var s=""+Math.abs(t);return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,e-s.length)).toString().substr(1)+s}var ue=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ht=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,le={},ct={};function f(t,e,n,s){var i=typeof s=="string"?function(){return this[s]()}:s;t&&(ct[t]=i),e&&(ct[e[0]]=function(){return I(i.apply(this,arguments),e[1],e[2])}),n&&(ct[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function Ut(t,e){return t.isValid()?(e=Ue(e,t.localeData()),le[e]=le[e]||function(n){for(var s,i=n.match(ue),r=0,a=i.length;r<a;r++)ct[i[r]]?i[r]=ct[i[r]]:i[r]=(s=i[r]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(o){for(var h="",l=0;l<a;l++)h+=j(i[l])?i[l].call(o,n):i[l];return h}}(e),le[e](t)):t.localeData().invalidDate()}function Ue(t,e){var n=5;function s(i){return e.longDateFormat(i)||i}for(Ht.lastIndex=0;0<=n&&Ht.test(t);)t=t.replace(Ht,s),Ht.lastIndex=0,--n;return t}var St={};function T(t,e){var n=t.toLowerCase();St[n]=St[n+"s"]=St[e]=t}function H(t){return typeof t=="string"?St[t]||St[t.toLowerCase()]:void 0}function he(t){var e,n,s={};for(n in t)k(t,n)&&(e=H(n))&&(s[e]=t[n]);return s}var Fe={};function N(t,e){Fe[t]=e}function Ft(t){return t%4==0&&t%100!=0||t%400==0}function U(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(e){var e=+e,n=0;return n=e!=0&&isFinite(e)?U(e):n}function ft(t,e){return function(n){return n!=null?(Le(this,t,n),d.updateOffset(this,e),this):Lt(this,t)}}function Lt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Le(t,e,n){t.isValid()&&!isNaN(n)&&(e==="FullYear"&&Ft(t.year())&&t.month()===1&&t.date()===29?(n=w(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),At(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var u=/\d/,_=/\d\d/,Vt=/\d{3}/,ht=/\d{4}/,rt=/[+-]?\d{6}/,M=/\d\d?/,mt=/\d\d\d\d?/,_t=/\d\d\d\d\d\d?/,yt=/\d{1,3}/,at=/\d{1,4}/,it=/[+-]?\d{1,6}/,gt=/\d+/,Gt=/[+-]?\d+/,Dn=/Z|[+-]\d\d:?\d\d/gi,Et=/Z|[+-]\d\d(?::?\d\d)?/gi,$=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function c(t,e,n){de[t]=j(e)?e:function(s,i){return s&&n?n:e}}function Sn(t,e){return k(de,t)?de[t](e._strict,e._locale):new RegExp(W(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,s,i,r,a){return s||i||r||a})))}function W(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var de={},ce={};function v(t,e){var n,s,i=e;for(typeof t=="string"&&(t=[t]),z(e)&&(i=function(r,a){a[e]=w(r)}),s=t.length,n=0;n<s;n++)ce[t[n]]=i}function Yt(t,e){v(t,function(n,s,i,r){i._w=i._w||{},e(n,i._w,i,r)})}var O,P=0,q=1,Z=2,x=3,V=4,B=5,ut=6,Yn=7,On=8;function At(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%(n=12)+n)%n;return t+=(e-n)/12,n==1?Ft(t)?29:28:31-n%7%2}O=Array.prototype.indexOf||function(t){for(var e=0;e<this.length;++e)if(this[e]===t)return e;return-1},f("M",["MM",2],"Mo",function(){return this.month()+1}),f("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),f("MMMM",0,0,function(t){return this.localeData().months(this,t)}),T("month","M"),N("month",8),c("M",M),c("MM",M,_),c("MMM",function(t,e){return e.monthsShortRegex(t)}),c("MMMM",function(t,e){return e.monthsRegex(t)}),v(["M","MM"],function(t,e){e[q]=w(t)-1}),v(["MMM","MMMM"],function(t,e,n,s){s=n._locale.monthsParse(t,s,n._strict),s!=null?e[q]=s:g(n).invalidMonth=t});var Ot="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ve="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ge=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,bn=$,xn=$;function Ee(t,e){var n;if(t.isValid()){if(typeof e=="string"){if(/^\d+$/.test(e))e=w(e);else if(!z(e=t.localeData().monthsParse(e)))return}n=Math.min(t.date(),At(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n)}}function Ae(t){return t!=null?(Ee(this,t),d.updateOffset(this,!0),this):Lt(this,"Month")}function je(){function t(a,o){return o.length-a.length}for(var e,n=[],s=[],i=[],r=0;r<12;r++)e=A([2e3,r]),n.push(this.monthsShort(e,"")),s.push(this.months(e,"")),i.push(this.months(e,"")),i.push(this.monthsShort(e,""));for(n.sort(t),s.sort(t),i.sort(t),r=0;r<12;r++)n[r]=W(n[r]),s[r]=W(s[r]);for(r=0;r<24;r++)i[r]=W(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function bt(t){return Ft(t)?366:365}f("Y",0,0,function(){var t=this.year();return t<=9999?I(t,4):"+"+t}),f(0,["YY",2],0,function(){return this.year()%100}),f(0,["YYYY",4],0,"year"),f(0,["YYYYY",5],0,"year"),f(0,["YYYYYY",6,!0],0,"year"),T("year","y"),N("year",1),c("Y",Gt),c("YY",M,_),c("YYYY",at,ht),c("YYYYY",it,rt),c("YYYYYY",it,rt),v(["YYYYY","YYYYYY"],P),v("YYYY",function(t,e){e[P]=t.length===2?d.parseTwoDigitYear(t):w(t)}),v("YY",function(t,e){e[P]=d.parseTwoDigitYear(t)}),v("Y",function(t,e){e[P]=parseInt(t,10)}),d.parseTwoDigitYear=function(t){return w(t)+(68<w(t)?1900:2e3)};var Xt=ft("FullYear",!0);function Tn(t,e,n,s,i,r,a){var o;return t<100&&0<=t?(o=new Date(t+400,e,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(t)):o=new Date(t,e,n,s,i,r,a),o}function xt(t){var e;return t<100&&0<=t?((e=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,e)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function jt(t,e,n){return n=7+e-n,n-(7+xt(t,0,n).getUTCDay()-e)%7-1}function Ie(t,a,o,s,i){var r,a=1+7*(a-1)+(7+o-s)%7+jt(t,s,i),o=a<=0?bt(r=t-1)+a:a>bt(t)?(r=t+1,a-bt(t)):(r=t,a);return{year:r,dayOfYear:o}}function Tt(t,e,n){var s,i,r=jt(t.year(),e,n),r=Math.floor((t.dayOfYear()-r-1)/7)+1;return r<1?s=r+J(i=t.year()-1,e,n):r>J(t.year(),e,n)?(s=r-J(t.year(),e,n),i=t.year()+1):(i=t.year(),s=r),{week:s,year:i}}function J(t,i,n){var s=jt(t,i,n),i=jt(t+1,i,n);return(bt(t)-s+i)/7}f("w",["ww",2],"wo","week"),f("W",["WW",2],"Wo","isoWeek"),T("week","w"),T("isoWeek","W"),N("week",5),N("isoWeek",5),c("w",M),c("ww",M,_),c("W",M),c("WW",M,_),Yt(["w","ww","W","WW"],function(t,e,n,s){e[s.substr(0,1)]=w(t)});function fe(t,e){return t.slice(e,7).concat(t.slice(0,e))}f("d",0,"do","day"),f("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),f("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),f("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),f("e",0,0,"weekday"),f("E",0,0,"isoWeekday"),T("day","d"),T("weekday","e"),T("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),c("d",M),c("e",M),c("E",M),c("dd",function(t,e){return e.weekdaysMinRegex(t)}),c("ddd",function(t,e){return e.weekdaysShortRegex(t)}),c("dddd",function(t,e){return e.weekdaysRegex(t)}),Yt(["dd","ddd","dddd"],function(t,e,n,s){s=n._locale.weekdaysParse(t,s,n._strict),s!=null?e.d=s:g(n).invalidWeekday=t}),Yt(["d","e","E"],function(t,e,n,s){e[s]=w(t)});var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),It="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Nn=$,Pn=$,Rn=$;function me(){function t(l,y){return y.length-l.length}for(var e,n,s,i=[],r=[],a=[],o=[],h=0;h<7;h++)s=A([2e3,1]).day(h),e=W(this.weekdaysMin(s,"")),n=W(this.weekdaysShort(s,"")),s=W(this.weekdays(s,"")),i.push(e),r.push(n),a.push(s),o.push(e),o.push(n),o.push(s);i.sort(t),r.sort(t),a.sort(t),o.sort(t),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function _e(){return this.hours()%12||12}function ze(t,e){f(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function $e(t,e){return e._meridiemParse}f("H",["HH",2],0,"hour"),f("h",["hh",2],0,_e),f("k",["kk",2],0,function(){return this.hours()||24}),f("hmm",0,0,function(){return""+_e.apply(this)+I(this.minutes(),2)}),f("hmmss",0,0,function(){return""+_e.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)}),f("Hmm",0,0,function(){return""+this.hours()+I(this.minutes(),2)}),f("Hmmss",0,0,function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)}),ze("a",!0),ze("A",!1),T("hour","h"),N("hour",13),c("a",$e),c("A",$e),c("H",M),c("h",M),c("k",M),c("HH",M,_),c("hh",M,_),c("kk",M,_),c("hmm",mt),c("hmmss",_t),c("Hmm",mt),c("Hmmss",_t),v(["H","HH"],x),v(["k","kk"],function(t,e,n){t=w(t),e[x]=t===24?0:t}),v(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),v(["h","hh"],function(t,e,n){e[x]=w(t),g(n).bigHour=!0}),v("hmm",function(t,e,n){var s=t.length-2;e[x]=w(t.substr(0,s)),e[V]=w(t.substr(s)),g(n).bigHour=!0}),v("hmmss",function(t,e,n){var s=t.length-4,i=t.length-2;e[x]=w(t.substr(0,s)),e[V]=w(t.substr(s,2)),e[B]=w(t.substr(i)),g(n).bigHour=!0}),v("Hmm",function(t,e,n){var s=t.length-2;e[x]=w(t.substr(0,s)),e[V]=w(t.substr(s))}),v("Hmmss",function(t,e,n){var s=t.length-4,i=t.length-2;e[x]=w(t.substr(0,s)),e[V]=w(t.substr(s,2)),e[B]=w(t.substr(i))}),$=ft("Hours",!0);var Pt,qe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ot,monthsShort:Ve,week:{dow:0,doy:6},weekdays:Nt,weekdaysMin:It,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},S={},Rt={};function Be(t){return t&&t.toLowerCase().replace("_","-")}function Wn(t){for(var e,n,s,i,r=0;r<t.length;){for(e=(i=Be(t[r]).split("-")).length,n=(n=Be(t[r+1]))?n.split("-"):null;0<e;){if(s=Zt(i.slice(0,e).join("-")))return s;if(n&&n.length>=e&&function(a,o){for(var h=Math.min(a.length,o.length),l=0;l<h;l+=1)if(a[l]!==o[l])return l;return h}(i,n)>=e-1)break;e--}r++}return Pt}function Zt(t){var e;if(S[t]===void 0&&te&&te.exports&&t.match("^[^/\\\\]*$")!=null)try{e=Pt._abbr,Jn.commonjsRequire("./locale/"+t),nt(e)}catch{S[t]=null}return S[t]}function nt(t,e){return t&&((e=R(e)?Q(t):ye(t,e))?Pt=e:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Pt._abbr}function ye(t,e){if(e===null)return delete S[t],null;var n,s=qe;if(e.abbr=t,S[t]!=null)He("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=S[t]._config;else if(e.parentLocale!=null)if(S[e.parentLocale]!=null)s=S[e.parentLocale]._config;else{if((n=Zt(e.parentLocale))==null)return Rt[e.parentLocale]||(Rt[e.parentLocale]=[]),Rt[e.parentLocale].push({name:t,config:e}),null;s=n._config}return S[t]=new oe(ae(s,e)),Rt[t]&&Rt[t].forEach(function(i){ye(i.name,i.config)}),nt(t),S[t]}function Q(t){var e;if(!(t=t&&t._locale&&t._locale._abbr?t._locale._abbr:t))return Pt;if(!F(t)){if(e=Zt(t))return e;t=[t]}return Wn(t)}function ge(t){var e=t._a;return e&&g(t).overflow===-2&&(e=e[q]<0||11<e[q]?q:e[Z]<1||e[Z]>At(e[P],e[q])?Z:e[x]<0||24<e[x]||e[x]===24&&(e[V]!==0||e[B]!==0||e[ut]!==0)?x:e[V]<0||59<e[V]?V:e[B]<0||59<e[B]?B:e[ut]<0||999<e[ut]?ut:-1,g(t)._overflowDayOfYear&&(e<P||Z<e)&&(e=Z),g(t)._overflowWeeks&&e===-1&&(e=Yn),g(t)._overflowWeekday&&e===-1&&(e=On),g(t).overflow=e),t}var Cn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Hn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Un=/Z|[+-]\d\d(?::?\d\d)?/,zt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],we=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fn=/^\/?Date\((-?\d+)/i,Ln=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Vn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Je(t){var e,n,s,i,r,a,h=t._i,o=Cn.exec(h)||Hn.exec(h),h=zt.length,l=we.length;if(o){for(g(t).iso=!0,e=0,n=h;e<n;e++)if(zt[e][1].exec(o[1])){i=zt[e][0],s=zt[e][2]!==!1;break}if(i==null)t._isValid=!1;else{if(o[3]){for(e=0,n=l;e<n;e++)if(we[e][1].exec(o[3])){r=(o[2]||" ")+we[e][0];break}if(r==null)return void(t._isValid=!1)}if(s||r==null){if(o[4]){if(!Un.exec(o[4]))return void(t._isValid=!1);a="Z"}t._f=i+(r||"")+(a||""),ke(t)}else t._isValid=!1}}else t._isValid=!1}function Gn(t,e,n,s,i,r){return t=[function(a){a=parseInt(a,10);{if(a<=49)return 2e3+a;if(a<=999)return 1900+a}return a}(t),Ve.indexOf(e),parseInt(n,10),parseInt(s,10),parseInt(i,10)],r&&t.push(parseInt(r,10)),t}function Qe(t){var e,n,s,i,r=Ln.exec(t._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));r?(e=Gn(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=e,i=t,n&&Ze.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()?(g(i).weekdayMismatch=!0,i._isValid=!1):(t._a=e,t._tzm=(n=r[8],s=r[9],i=r[10],n?Vn[n]:s?0:60*(((n=parseInt(i,10))-(s=n%100))/100)+s),t._d=xt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),g(t).rfc2822=!0)):t._isValid=!1}function wt(t,e,n){return t??e??n}function pe(t){var e,n,s,i,r,a,o,h,l,y,m,Y=[];if(!t._d){for(s=t,i=new Date(d.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],t._w&&t._a[Z]==null&&t._a[q]==null&&((i=(s=t)._w).GG!=null||i.W!=null||i.E!=null?(h=1,l=4,r=wt(i.GG,s._a[P],Tt(D(),1,4).year),a=wt(i.W,1),((o=wt(i.E,1))<1||7<o)&&(y=!0)):(h=s._locale._week.dow,l=s._locale._week.doy,m=Tt(D(),h,l),r=wt(i.gg,s._a[P],m.year),a=wt(i.w,m.week),i.d!=null?((o=i.d)<0||6<o)&&(y=!0):i.e!=null?(o=i.e+h,(i.e<0||6<i.e)&&(y=!0)):o=h),a<1||a>J(r,h,l)?g(s)._overflowWeeks=!0:y!=null?g(s)._overflowWeekday=!0:(m=Ie(r,a,o,h,l),s._a[P]=m.year,s._dayOfYear=m.dayOfYear)),t._dayOfYear!=null&&(i=wt(t._a[P],n[P]),(t._dayOfYear>bt(i)||t._dayOfYear===0)&&(g(t)._overflowDayOfYear=!0),y=xt(i,0,t._dayOfYear),t._a[q]=y.getUTCMonth(),t._a[Z]=y.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=Y[e]=n[e];for(;e<7;e++)t._a[e]=Y[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[x]===24&&t._a[V]===0&&t._a[B]===0&&t._a[ut]===0&&(t._nextDay=!0,t._a[x]=0),t._d=(t._useUTC?xt:Tn).apply(null,Y),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[x]=24),t._w&&t._w.d!==void 0&&t._w.d!==r&&(g(t).weekdayMismatch=!0)}}function ke(t){if(t._f===d.ISO_8601)Je(t);else if(t._f===d.RFC_2822)Qe(t);else{t._a=[],g(t).empty=!0;for(var e,n,s,i,r,a=""+t._i,o=a.length,h=0,l=Ue(t._f,t._locale).match(ue)||[],y=l.length,m=0;m<y;m++)n=l[m],(e=(a.match(Sn(n,t))||[])[0])&&(0<(s=a.substr(0,a.indexOf(e))).length&&g(t).unusedInput.push(s),a=a.slice(a.indexOf(e)+e.length),h+=e.length),ct[n]?(e?g(t).empty=!1:g(t).unusedTokens.push(n),s=n,r=t,(i=e)!=null&&k(ce,s)&&ce[s](i,r._a,r,s)):t._strict&&!e&&g(t).unusedTokens.push(n);g(t).charsLeftOver=o-h,0<a.length&&g(t).unusedInput.push(a),t._a[x]<=12&&g(t).bigHour===!0&&0<t._a[x]&&(g(t).bigHour=void 0),g(t).parsedDateParts=t._a.slice(0),g(t).meridiem=t._meridiem,t._a[x]=function(Y,b,E){return E==null?b:Y.meridiemHour!=null?Y.meridiemHour(b,E):Y.isPM!=null?((Y=Y.isPM(E))&&b<12&&(b+=12),b=Y||b!==12?b:0):b}(t._locale,t._a[x],t._meridiem),(o=g(t).era)!==null&&(t._a[P]=t._locale.erasConvertYear(o,t._a[P])),pe(t),ge(t)}}function Xe(t){var e,n,s,i=t._i,r=t._f;return t._locale=t._locale||Q(t._l),i===null||r===void 0&&i===""?Ct({nullInput:!0}):(typeof i=="string"&&(t._i=i=t._locale.preparse(i)),L(i)?new Dt(ge(i)):(Mt(i)?t._d=i:F(r)?function(a){var o,h,l,y,m,Y,b=!1,E=a._f.length;if(E===0)return g(a).invalidFormat=!0,a._d=new Date(NaN);for(y=0;y<E;y++)m=0,Y=!1,o=re({},a),a._useUTC!=null&&(o._useUTC=a._useUTC),o._f=a._f[y],ke(o),se(o)&&(Y=!0),m=(m+=g(o).charsLeftOver)+10*g(o).unusedTokens.length,g(o).score=m,b?m<l&&(l=m,h=o):(l==null||m<l||Y)&&(l=m,h=o,Y&&(b=!0));et(a,h||o)}(t):r?ke(t):R(r=(i=t)._i)?i._d=new Date(d.now()):Mt(r)?i._d=new Date(r.valueOf()):typeof r=="string"?(n=i,(e=Fn.exec(n._i))!==null?n._d=new Date(+e[1]):(Je(n),n._isValid===!1&&(delete n._isValid,Qe(n),n._isValid===!1&&(delete n._isValid,n._strict?n._isValid=!1:d.createFromInputFallback(n))))):F(r)?(i._a=Pe(r.slice(0),function(a){return parseInt(a,10)}),pe(i)):ot(r)?(e=i)._d||(s=(n=he(e._i)).day===void 0?n.date:n.day,e._a=Pe([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(a){return a&&parseInt(a,10)}),pe(e)):z(r)?i._d=new Date(r):d.createFromInputFallback(i),se(t)||(t._d=null),t))}function Ke(t,e,n,s,i){var r={};return e!==!0&&e!==!1||(s=e,e=void 0),n!==!0&&n!==!1||(s=n,n=void 0),(ot(t)&&ne(t)||F(t)&&t.length===0)&&(t=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=t,r._f=e,r._strict=s,(i=new Dt(ge(Xe(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function D(t,e,n,s){return Ke(t,e,n,s,!1)}d.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),d.ISO_8601=function(){},d.RFC_2822=function(){},mt=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=D.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Ct()}),_t=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=D.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:Ct()});function tn(t,e){var n,s;if(!(e=e.length===1&&F(e[0])?e[0]:e).length)return D();for(n=e[0],s=1;s<e.length;++s)e[s].isValid()&&!e[s][t](n)||(n=e[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $t(e){var e=he(e),n=e.year||0,s=e.quarter||0,i=e.month||0,r=e.week||e.isoWeek||0,a=e.day||0,o=e.hour||0,h=e.minute||0,l=e.second||0,y=e.millisecond||0;this._isValid=function(m){var Y,b,E=!1,Ne=Wt.length;for(Y in m)if(k(m,Y)&&(O.call(Wt,Y)===-1||m[Y]!=null&&isNaN(m[Y])))return!1;for(b=0;b<Ne;++b)if(m[Wt[b]]){if(E)return!1;parseFloat(m[Wt[b]])!==w(m[Wt[b]])&&(E=!0)}return!0}(e),this._milliseconds=+y+1e3*l+6e4*h+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=Q(),this._bubble()}function qt(t){return t instanceof $t}function ve(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function en(t,e){f(t,0,0,function(){var n=this.utcOffset(),s="+";return n<0&&(n=-n,s="-"),s+I(~~(n/60),2)+e+I(~~n%60,2)})}en("Z",":"),en("ZZ",""),c("Z",Et),c("ZZ",Et),v(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Me(Et,t)});var En=/([\+\-]|\d\d)/gi;function Me(t,n){var n=(n||"").match(t);return n===null?null:(n=60*(t=((n[n.length-1]||[])+"").match(En)||["-",0,0])[1]+w(t[2]))===0?0:t[0]==="+"?n:-n}function De(t,e){var n;return e._isUTC?(e=e.clone(),n=(L(t)||Mt(t)?t:D(t)).valueOf()-e.valueOf(),e._d.setTime(e._d.valueOf()+n),d.updateOffset(e,!1),e):D(t).local()}function Se(t){return-Math.round(t._d.getTimezoneOffset())}function nn(){return!!this.isValid()&&this._isUTC&&this._offset===0}d.updateOffset=function(){};var An=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function G(t,e){var n,s=t,i=null;return qt(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:z(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(i=An.exec(t))?(n=i[1]==="-"?-1:1,s={y:0,d:w(i[Z])*n,h:w(i[x])*n,m:w(i[V])*n,s:w(i[B])*n,ms:w(ve(1e3*i[ut]))*n}):(i=jn.exec(t))?(n=i[1]==="-"?-1:1,s={y:lt(i[2],n),M:lt(i[3],n),w:lt(i[4],n),d:lt(i[5],n),h:lt(i[6],n),m:lt(i[7],n),s:lt(i[8],n)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(e=function(r,a){var o;return!r.isValid()||!a.isValid()?{milliseconds:0,months:0}:(a=De(a,r),r.isBefore(a)?o=sn(r,a):((o=sn(a,r)).milliseconds=-o.milliseconds,o.months=-o.months),o)}(D(s.from),D(s.to)),(s={}).ms=e.milliseconds,s.M=e.months),i=new $t(s),qt(t)&&k(t,"_locale")&&(i._locale=t._locale),qt(t)&&k(t,"_isValid")&&(i._isValid=t._isValid),i}function lt(t,e){return t=t&&parseFloat(t.replace(",",".")),(isNaN(t)?0:t)*e}function sn(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function rn(t,e){return function(n,s){var i;return s===null||isNaN(+s)||(He(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),an(this,G(n,s),t),this}}function an(t,a,n,s){var i=a._milliseconds,r=ve(a._days),a=ve(a._months);t.isValid()&&(s=s==null||s,a&&Ee(t,Lt(t,"Month")+a*n),r&&Le(t,"Date",Lt(t,"Date")+r*n),i&&t._d.setTime(t._d.valueOf()+i*n),s&&d.updateOffset(t,r||a))}G.fn=$t.prototype,G.invalid=function(){return G(NaN)},Ot=rn(1,"add"),Nt=rn(-1,"subtract");function on(t){return typeof t=="string"||t instanceof String}function In(t){return L(t)||Mt(t)||on(t)||z(t)||function(e){var n=F(e),s=!1;return n&&(s=e.filter(function(i){return!z(i)&&on(e)}).length===0),n&&s}(t)||function(e){var n,s,i=ot(e)&&!ne(e),r=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=a.length;for(n=0;n<o;n+=1)s=a[n],r=r||k(e,s);return i&&r}(t)||t==null}function Bt(t,i){if(t.date()<i.date())return-Bt(i,t);var n=12*(i.year()-t.year())+(i.month()-t.month()),s=t.clone().add(n,"months"),i=i-s<0?(i-s)/(s-t.clone().add(n-1,"months")):(i-s)/(t.clone().add(1+n,"months")-s);return-(n+i)||0}function un(t){return t===void 0?this._locale._abbr:((t=Q(t))!=null&&(this._locale=t),this)}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",It=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function ln(){return this._locale}var hn=126227808e5;function pt(t,e){return(t%e+e)%e}function dn(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-hn:new Date(t,e,n).valueOf()}function cn(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-hn:Date.UTC(t,e,n)}function Ye(t,e){return e.erasAbbrRegex(t)}function Oe(){for(var t=[],e=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)e.push(W(i[r].name)),t.push(W(i[r].abbr)),n.push(W(i[r].narrow)),s.push(W(i[r].name)),s.push(W(i[r].abbr)),s.push(W(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function Jt(t,e){f(0,[t,t.length],0,e)}function fn(t,e,n,s,i){var r;return t==null?Tt(this,s,i).year:(r=J(t,s,i),(function(a,o,h,l,y){return a=Ie(a,o,h,l,y),o=xt(a.year,0,a.dayOfYear),this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}).call(this,t,e=r<e?r:e,n,s,i))}f("N",0,0,"eraAbbr"),f("NN",0,0,"eraAbbr"),f("NNN",0,0,"eraAbbr"),f("NNNN",0,0,"eraName"),f("NNNNN",0,0,"eraNarrow"),f("y",["y",1],"yo","eraYear"),f("y",["yy",2],0,"eraYear"),f("y",["yyy",3],0,"eraYear"),f("y",["yyyy",4],0,"eraYear"),c("N",Ye),c("NN",Ye),c("NNN",Ye),c("NNNN",function(t,e){return e.erasNameRegex(t)}),c("NNNNN",function(t,e){return e.erasNarrowRegex(t)}),v(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,s){s=n._locale.erasParse(t,s,n._strict),s?g(n).era=s:g(n).invalidEra=t}),c("y",gt),c("yy",gt),c("yyy",gt),c("yyyy",gt),c("yo",function(t,e){return e._eraYearOrdinalRegex||gt}),v(["y","yy","yyy","yyyy"],P),v(["yo"],function(t,e,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[P]=n._locale.eraYearOrdinalParse(t,i):e[P]=parseInt(t,10)}),f(0,["gg",2],0,function(){return this.weekYear()%100}),f(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Jt("gggg","weekYear"),Jt("ggggg","weekYear"),Jt("GGGG","isoWeekYear"),Jt("GGGGG","isoWeekYear"),T("weekYear","gg"),T("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),c("G",Gt),c("g",Gt),c("GG",M,_),c("gg",M,_),c("GGGG",at,ht),c("gggg",at,ht),c("GGGGG",it,rt),c("ggggg",it,rt),Yt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,s){e[s.substr(0,2)]=w(t)}),Yt(["gg","GG"],function(t,e,n,s){e[s]=d.parseTwoDigitYear(t)}),f("Q",0,"Qo","quarter"),T("quarter","Q"),N("quarter",7),c("Q",u),v("Q",function(t,e){e[q]=3*(w(t)-1)}),f("D",["DD",2],"Do","date"),T("date","D"),N("date",9),c("D",M),c("DD",M,_),c("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),v(["D","DD"],Z),v("Do",function(t,e){e[Z]=w(t.match(M)[0])}),at=ft("Date",!0),f("DDD",["DDDD",3],"DDDo","dayOfYear"),T("dayOfYear","DDD"),N("dayOfYear",4),c("DDD",yt),c("DDDD",Vt),v(["DDD","DDDD"],function(t,e,n){n._dayOfYear=w(t)}),f("m",["mm",2],0,"minute"),T("minute","m"),N("minute",14),c("m",M),c("mm",M,_),v(["m","mm"],V);var st,ht=ft("Minutes",!1),it=(f("s",["ss",2],0,"second"),T("second","s"),N("second",15),c("s",M),c("ss",M,_),v(["s","ss"],B),ft("Seconds",!1));for(f("S",0,0,function(){return~~(this.millisecond()/100)}),f(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),f(0,["SSS",3],0,"millisecond"),f(0,["SSSS",4],0,function(){return 10*this.millisecond()}),f(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),f(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),f(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),f(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),f(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),T("millisecond","ms"),N("millisecond",16),c("S",yt,u),c("SS",yt,_),c("SSS",yt,Vt),st="SSSS";st.length<=9;st+="S")c(st,gt);function Zn(t,e){e[ut]=w(1e3*("0."+t))}for(st="S";st.length<=9;st+="S")v(st,Zn);rt=ft("Milliseconds",!1),f("z",0,0,"zoneAbbr"),f("zz",0,0,"zoneName"),u=Dt.prototype;function mn(t){return t}u.add=Ot,u.calendar=function(n,i){arguments.length===1&&(arguments[0]?In(arguments[0])?(n=arguments[0],i=void 0):function(r){for(var a=ot(r)&&!ne(r),o=!1,h=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l=0;l<h.length;l+=1)o=o||k(r,h[l]);return a&&o}(arguments[0])&&(i=arguments[0],n=void 0):i=n=void 0);var n=n||D(),s=De(n,this).startOf("day"),s=d.calendarFormat(this,s)||"sameElse",i=i&&(j(i[s])?i[s].call(this,n):i[s]);return this.format(i||this.localeData().calendar(s,this,D(n)))},u.clone=function(){return new Dt(this)},u.diff=function(t,e,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=De(t,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),e=H(e)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:U(r)},u.endOf=function(t){var e,n;if((t=H(t))===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?cn:dn,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-pt(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-pt(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-pt(e,1e3)-1;break}return this._d.setTime(e),d.updateOffset(this,!0),this},u.format=function(t){return t=t||(this.isUtc()?d.defaultFormatUtc:d.defaultFormat),t=Ut(this,t),this.localeData().postformat(t)},u.from=function(t,e){return this.isValid()&&(L(t)&&t.isValid()||D(t).isValid())?G({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},u.fromNow=function(t){return this.from(D(),t)},u.to=function(t,e){return this.isValid()&&(L(t)&&t.isValid()||D(t).isValid())?G({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},u.toNow=function(t){return this.to(D(),t)},u.get=function(t){return j(this[t=H(t)])?this[t]():this},u.invalidAt=function(){return g(this).overflow},u.isAfter=function(t,e){return t=L(t)?t:D(t),!(!this.isValid()||!t.isValid())&&((e=H(e)||"millisecond")==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf())},u.isBefore=function(t,e){return t=L(t)?t:D(t),!(!this.isValid()||!t.isValid())&&((e=H(e)||"millisecond")==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf())},u.isBetween=function(t,e,n,s){return t=L(t)?t:D(t),e=L(e)?e:D(e),!!(this.isValid()&&t.isValid()&&e.isValid())&&((s=s||"()")[0]==="("?this.isAfter(t,n):!this.isBefore(t,n))&&(s[1]===")"?this.isBefore(e,n):!this.isAfter(e,n))},u.isSame=function(n,e){var n=L(n)?n:D(n);return!(!this.isValid()||!n.isValid())&&((e=H(e)||"millisecond")==="millisecond"?this.valueOf()===n.valueOf():(n=n.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},u.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},u.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},u.isValid=function(){return se(this)},u.lang=It,u.locale=un,u.localeData=ln,u.max=_t,u.min=mt,u.parsingFlags=function(){return et({},g(this))},u.set=function(t,e){if(typeof t=="object")for(var n=function(r){var a,o=[];for(a in r)k(r,a)&&o.push({unit:a,priority:Fe[a]});return o.sort(function(h,l){return h.priority-l.priority}),o}(t=he(t)),s=n.length,i=0;i<s;i++)this[n[i].unit](t[n[i].unit]);else if(j(this[t=H(t)]))return this[t](e);return this},u.startOf=function(t){var e,n;if((t=H(t))===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?cn:dn,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=pt(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=pt(e,6e4);break;case"second":e=this._d.valueOf(),e-=pt(e,1e3);break}return this._d.setTime(e),d.updateOffset(this,!0),this},u.subtract=Nt,u.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},u.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(t){if(!this.isValid())return null;var e=(t=t!==!0)?this.clone().utc():this;return e.year()<0||9999<e.year()?Ut(e,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Ut(e,"Z")):Ut(e,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},u.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e="moment",n="";return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),e="["+e+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+(n+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(u[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var t,e=this.localeData().eras(),n=0,s=e.length;n<s;++n)if(t=this.clone().startOf("day").valueOf(),e[n].since<=t&&t<=e[n].until||e[n].until<=t&&t<=e[n].since)return e[n].name;return""},u.eraNarrow=function(){for(var t,e=this.localeData().eras(),n=0,s=e.length;n<s;++n)if(t=this.clone().startOf("day").valueOf(),e[n].since<=t&&t<=e[n].until||e[n].until<=t&&t<=e[n].since)return e[n].narrow;return""},u.eraAbbr=function(){for(var t,e=this.localeData().eras(),n=0,s=e.length;n<s;++n)if(t=this.clone().startOf("day").valueOf(),e[n].since<=t&&t<=e[n].until||e[n].until<=t&&t<=e[n].since)return e[n].abbr;return""},u.eraYear=function(){for(var t,e,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(t=n[s].since<=n[s].until?1:-1,e=this.clone().startOf("day").valueOf(),n[s].since<=e&&e<=n[s].until||n[s].until<=e&&e<=n[s].since)return(this.year()-d(n[s].since).year())*t+n[s].offset;return this.year()},u.year=Xt,u.isLeapYear=function(){return Ft(this.year())},u.weekYear=function(t){return fn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(t){return fn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(t){return t==null?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},u.month=Ae,u.daysInMonth=function(){return At(this.year(),this.month())},u.week=u.weeks=function(t){var e=this.localeData().week(this);return t==null?e:this.add(7*(t-e),"d")},u.isoWeek=u.isoWeeks=function(t){var e=Tt(this,1,4).week;return t==null?e:this.add(7*(t-e),"d")},u.weeksInYear=function(){var t=this.localeData()._week;return J(this.year(),t.dow,t.doy)},u.weeksInWeekYear=function(){var t=this.localeData()._week;return J(this.weekYear(),t.dow,t.doy)},u.isoWeeksInYear=function(){return J(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return J(this.isoWeekYear(),1,4)},u.date=at,u.day=u.days=function(t){if(!this.isValid())return t!=null?this:NaN;var e,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(e=t,n=this.localeData(),t=typeof e!="string"?e:isNaN(e)?typeof(e=n.weekdaysParse(e))=="number"?e:null:parseInt(e,10),this.add(t-s,"d")):s},u.weekday=function(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")},u.isoWeekday=function(t){return this.isValid()?t!=null?(e=t,n=this.localeData(),n=typeof e=="string"?n.weekdaysParse(e)%7||7:isNaN(e)?null:e,this.day(this.day()%7?n:n-7)):this.day()||7:t!=null?this:NaN;var e,n},u.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")},u.hour=u.hours=$,u.minute=u.minutes=ht,u.second=u.seconds=it,u.millisecond=u.milliseconds=rt,u.utcOffset=function(t,e,n){var s,i=this._offset||0;if(!this.isValid())return t!=null?this:NaN;if(t==null)return this._isUTC?i:Se(this);if(typeof t=="string"){if((t=Me(Et,t))===null)return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(s=Se(this)),this._offset=t,this._isUTC=!0,s!=null&&this.add(s,"m"),i!==t&&(!e||this._changeInProgress?an(this,G(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(t){return this.utcOffset(0,t)},u.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Se(this),"m")),this},u.parseZone=function(){var t;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((t=Me(Dn,this._i))!=null?this.utcOffset(t):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?D(t).utcOffset():0,(this.utcOffset()-t)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=nn,u.isUTC=nn,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=C("dates accessor is deprecated. Use date instead.",at),u.months=C("months accessor is deprecated. Use month instead",Ae),u.years=C("years accessor is deprecated. Use year instead",Xt),u.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return t!=null?(this.utcOffset(t=typeof t!="string"?-t:t,e),this):-this.utcOffset()}),u.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!R(this._isDSTShifted))return this._isDSTShifted;var t,e={};return re(e,this),(e=Xe(e))._a?(t=(e._isUTC?A:D)(e._a),this._isDSTShifted=this.isValid()&&0<function(n,s,i){for(var r=Math.min(n.length,s.length),a=Math.abs(n.length-s.length),o=0,h=0;h<r;h++)(i&&n[h]!==s[h]||!i&&w(n[h])!==w(s[h]))&&o++;return o+a}(e._a,t.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),_=oe.prototype;function Qt(t,e,n,r){var i=Q(),r=A().set(r,e);return i[n](r,t)}function _n(t,e,n){if(z(t)&&(e=t,t=void 0),t=t||"",e!=null)return Qt(t,e,n,"month");for(var s=[],i=0;i<12;i++)s[i]=Qt(t,i,n,"month");return s}function be(t,e,n,s){e=(typeof t=="boolean"?z(e)&&(n=e,e=void 0):(e=t,t=!1,z(n=e)&&(n=e,e=void 0)),e||"");var i,r=Q(),a=t?r._week.dow:0,o=[];if(n!=null)return Qt(e,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=Qt(e,(i+a)%7,s,"day");return o}_.calendar=function(t,e,n){return j(t=this._calendar[t]||this._calendar.sameElse)?t.call(e,n):t},_.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(ue).map(function(s){return s==="MMMM"||s==="MM"||s==="DD"||s==="dddd"?s.slice(1):s}).join(""),this._longDateFormat[t])},_.invalidDate=function(){return this._invalidDate},_.ordinal=function(t){return this._ordinal.replace("%d",t)},_.preparse=mn,_.postformat=mn,_.relativeTime=function(t,e,n,s){var i=this._relativeTime[n];return j(i)?i(t,e,n,s):i.replace(/%d/i,t)},_.pastFuture=function(t,e){return j(t=this._relativeTime[0<t?"future":"past"])?t(e):t.replace(/%s/i,e)},_.set=function(t){var e,n;for(n in t)k(t,n)&&(j(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},_.eras=function(t,e){for(var n,s=this._eras||Q("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=d(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=d(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},_.erasParse=function(t,e,n){var s,i,r,a,o,h=this.eras();for(t=t.toUpperCase(),s=0,i=h.length;s<i;++s)if(r=h[s].name.toUpperCase(),a=h[s].abbr.toUpperCase(),o=h[s].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return h[s];break;case"NNNN":if(r===t)return h[s];break;case"NNNNN":if(o===t)return h[s];break}else if(0<=[r,a,o].indexOf(t))return h[s]},_.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return e===void 0?d(t.since).year():d(t.since).year()+(e-t.offset)*n},_.erasAbbrRegex=function(t){return k(this,"_erasAbbrRegex")||Oe.call(this),t?this._erasAbbrRegex:this._erasRegex},_.erasNameRegex=function(t){return k(this,"_erasNameRegex")||Oe.call(this),t?this._erasNameRegex:this._erasRegex},_.erasNarrowRegex=function(t){return k(this,"_erasNarrowRegex")||Oe.call(this),t?this._erasNarrowRegex:this._erasRegex},_.months=function(t,e){return t?(F(this._months)?this._months:this._months[(this._months.isFormat||Ge).test(e)?"format":"standalone"])[t.month()]:F(this._months)?this._months:this._months.standalone},_.monthsShort=function(t,e){return t?(F(this._monthsShort)?this._monthsShort:this._monthsShort[Ge.test(e)?"format":"standalone"])[t.month()]:F(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},_.monthsParse=function(t,e,n){var s,i;if(this._monthsParseExact)return(function(m,a,o){var h,l,y,m=m.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],h=0;h<12;++h)y=A([2e3,h]),this._shortMonthsParse[h]=this.monthsShort(y,"").toLocaleLowerCase(),this._longMonthsParse[h]=this.months(y,"").toLocaleLowerCase();return o?a==="MMM"?(l=O.call(this._shortMonthsParse,m))!==-1?l:null:(l=O.call(this._longMonthsParse,m))!==-1?l:null:a==="MMM"?(l=O.call(this._shortMonthsParse,m))!==-1||(l=O.call(this._longMonthsParse,m))!==-1?l:null:(l=O.call(this._longMonthsParse,m))!==-1||(l=O.call(this._shortMonthsParse,m))!==-1?l:null}).call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++)if(i=A([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[s].test(t)||n&&e==="MMM"&&this._shortMonthsParse[s].test(t)||!n&&this._monthsParse[s].test(t))return s},_.monthsRegex=function(t){return this._monthsParseExact?(k(this,"_monthsRegex")||je.call(this),t?this._monthsStrictRegex:this._monthsRegex):(k(this,"_monthsRegex")||(this._monthsRegex=xn),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},_.monthsShortRegex=function(t){return this._monthsParseExact?(k(this,"_monthsRegex")||je.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(k(this,"_monthsShortRegex")||(this._monthsShortRegex=bn),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},_.week=function(t){return Tt(t,this._week.dow,this._week.doy).week},_.firstDayOfYear=function(){return this._week.doy},_.firstDayOfWeek=function(){return this._week.dow},_.weekdays=function(t,e){return e=F(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"],t===!0?fe(e,this._week.dow):t?e[t.day()]:e},_.weekdaysMin=function(t){return t===!0?fe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},_.weekdaysShort=function(t){return t===!0?fe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},_.weekdaysParse=function(t,e,n){var s,i;if(this._weekdaysParseExact)return(function(m,a,o){var h,l,y,m=m.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)y=A([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(y,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(y,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(y,"").toLocaleLowerCase();return o?a==="dddd"?(l=O.call(this._weekdaysParse,m))!==-1?l:null:a==="ddd"?(l=O.call(this._shortWeekdaysParse,m))!==-1?l:null:(l=O.call(this._minWeekdaysParse,m))!==-1?l:null:a==="dddd"?(l=O.call(this._weekdaysParse,m))!==-1||(l=O.call(this._shortWeekdaysParse,m))!==-1||(l=O.call(this._minWeekdaysParse,m))!==-1?l:null:a==="ddd"?(l=O.call(this._shortWeekdaysParse,m))!==-1||(l=O.call(this._weekdaysParse,m))!==-1||(l=O.call(this._minWeekdaysParse,m))!==-1?l:null:(l=O.call(this._minWeekdaysParse,m))!==-1||(l=O.call(this._weekdaysParse,m))!==-1||(l=O.call(this._shortWeekdaysParse,m))!==-1?l:null}).call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++)if(i=A([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[s].test(t)||n&&e==="ddd"&&this._shortWeekdaysParse[s].test(t)||n&&e==="dd"&&this._minWeekdaysParse[s].test(t)||!n&&this._weekdaysParse[s].test(t))return s},_.weekdaysRegex=function(t){return this._weekdaysParseExact?(k(this,"_weekdaysRegex")||me.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(k(this,"_weekdaysRegex")||(this._weekdaysRegex=Nn),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},_.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(k(this,"_weekdaysRegex")||me.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(k(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Pn),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},_.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(k(this,"_weekdaysRegex")||me.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(k(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Rn),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},_.isPM=function(t){return(t+"").toLowerCase().charAt(0)==="p"},_.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},nt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(w(t%100/10)===1?"th":e==1?"st":e==2?"nd":e==3?"rd":"th")}}),d.lang=C("moment.lang is deprecated. Use moment.locale instead.",nt),d.langData=C("moment.langData is deprecated. Use moment.localeData instead.",Q);var X=Math.abs;function yn(t,e,n,s){return e=G(e,n),t._milliseconds+=s*e._milliseconds,t._days+=s*e._days,t._months+=s*e._months,t._bubble()}function gn(t){return t<0?Math.floor(t):Math.ceil(t)}function wn(t){return 4800*t/146097}function xe(t){return 146097*t/4800}function K(t){return function(){return this.as(t)}}yt=K("ms"),Vt=K("s"),Ot=K("m"),_t=K("h"),mt=K("d"),Nt=K("w"),$=K("M"),ht=K("Q"),it=K("y");function dt(t){return function(){return this.isValid()?this._data[t]:NaN}}var rt=dt("milliseconds"),at=dt("seconds"),Xt=dt("minutes"),_=dt("hours"),zn=dt("days"),$n=dt("months"),qn=dt("years"),tt=Math.round,kt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Bn(t,e,n,s){var l=G(t).abs(),y=tt(l.as("s")),i=tt(l.as("m")),r=tt(l.as("h")),a=tt(l.as("d")),o=tt(l.as("M")),h=tt(l.as("w")),l=tt(l.as("y")),y=(y<=n.ss?["s",y]:y<n.s&&["ss",y])||i<=1&&["m"]||i<n.m&&["mm",i]||r<=1&&["h"]||r<n.h&&["hh",r]||a<=1&&["d"]||a<n.d&&["dd",a];return(y=(y=n.w!=null?y||h<=1&&["w"]||h<n.w&&["ww",h]:y)||o<=1&&["M"]||o<n.M&&["MM",o]||l<=1&&["y"]||["yy",l])[2]=e,y[3]=0<+t,y[4]=s,(function(m,Y,b,E,Ne){return Ne.relativeTime(Y||1,!!b,m,E)}).apply(null,y)}var Te=Math.abs;function vt(t){return(0<t)-(t<0)||+t}function Kt(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,s,i,r,a,o=Te(this._milliseconds)/1e3,h=Te(this._days),l=Te(this._months),y=this.asSeconds();return y?(t=U(o/60),e=U(t/60),o%=60,t%=60,n=U(l/12),l%=12,s=o?o.toFixed(3).replace(/\.?0+$/,""):"",i=vt(this._months)!==vt(y)?"-":"",r=vt(this._days)!==vt(y)?"-":"",a=vt(this._milliseconds)!==vt(y)?"-":"",(y<0?"-":"")+"P"+(n?i+n+"Y":"")+(l?i+l+"M":"")+(h?r+h+"D":"")+(e||t||o?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(o?a+s+"S":"")):"P0D"}var p=$t.prototype;return p.isValid=function(){return this._isValid},p.abs=function(){var t=this._data;return this._milliseconds=X(this._milliseconds),this._days=X(this._days),this._months=X(this._months),t.milliseconds=X(t.milliseconds),t.seconds=X(t.seconds),t.minutes=X(t.minutes),t.hours=X(t.hours),t.months=X(t.months),t.years=X(t.years),this},p.add=function(t,e){return yn(this,t,e,1)},p.subtract=function(t,e){return yn(this,t,e,-1)},p.as=function(t){if(!this.isValid())return NaN;var e,n,s=this._milliseconds;if((t=H(t))==="month"||t==="quarter"||t==="year")switch(e=this._days+s/864e5,n=this._months+wn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(xe(this._months)),t){case"week":return e/7+s/6048e5;case"day":return e+s/864e5;case"hour":return 24*e+s/36e5;case"minute":return 1440*e+s/6e4;case"second":return 86400*e+s/1e3;case"millisecond":return Math.floor(864e5*e)+s;default:throw new Error("Unknown unit "+t)}},p.asMilliseconds=yt,p.asSeconds=Vt,p.asMinutes=Ot,p.asHours=_t,p.asDays=mt,p.asWeeks=Nt,p.asMonths=$,p.asQuarters=ht,p.asYears=it,p.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},p._bubble=function(){var t=this._milliseconds,e=this._days,n=this._months,s=this._data;return 0<=t&&0<=e&&0<=n||t<=0&&e<=0&&n<=0||(t+=864e5*gn(xe(n)+e),n=e=0),s.milliseconds=t%1e3,t=U(t/1e3),s.seconds=t%60,t=U(t/60),s.minutes=t%60,t=U(t/60),s.hours=t%24,e+=U(t/24),n+=t=U(wn(e)),e-=gn(xe(t)),t=U(n/12),n%=12,s.days=e,s.months=n,s.years=t,this},p.clone=function(){return G(this)},p.get=function(t){return t=H(t),this.isValid()?this[t+"s"]():NaN},p.milliseconds=rt,p.seconds=at,p.minutes=Xt,p.hours=_,p.days=zn,p.weeks=function(){return U(this.days()/7)},p.months=$n,p.years=qn,p.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,s=kt;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(s=Object.assign({},kt,e),e.s!=null&&e.ss==null&&(s.ss=e.s-1)),t=this.localeData(),e=Bn(this,!n,s,t),n&&(e=t.pastFuture(+this,e)),t.postformat(e)},p.toISOString=Kt,p.toString=Kt,p.toJSON=Kt,p.locale=un,p.localeData=ln,p.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kt),p.lang=It,f("X",0,0,"unix"),f("x",0,0,"valueOf"),c("x",Gt),c("X",/[+-]?\d+(\.\d{1,3})?/),v("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t))}),v("x",function(t,e,n){n._d=new Date(w(t))}),d.version="2.29.4",ee=D,d.fn=u,d.min=function(){return tn("isBefore",[].slice.call(arguments,0))},d.max=function(){return tn("isAfter",[].slice.call(arguments,0))},d.now=function(){return Date.now?Date.now():+new Date},d.utc=A,d.unix=function(t){return D(1e3*t)},d.months=function(t,e){return _n(t,e,"months")},d.isDate=Mt,d.locale=nt,d.invalid=Ct,d.duration=G,d.isMoment=L,d.weekdays=function(t,e,n){return be(t,e,n,"weekdays")},d.parseZone=function(){return D.apply(null,arguments).parseZone()},d.localeData=Q,d.isDuration=qt,d.monthsShort=function(t,e){return _n(t,e,"monthsShort")},d.weekdaysMin=function(t,e,n){return be(t,e,n,"weekdaysMin")},d.defineLocale=ye,d.updateLocale=function(t,e){var n,s;return e!=null?(s=qe,S[t]!=null&&S[t].parentLocale!=null?S[t].set(ae(S[t]._config,e)):(e=ae(s=(n=Zt(t))!=null?n._config:s,e),n==null&&(e.abbr=t),(s=new oe(e)).parentLocale=S[t],S[t]=s),nt(t)):S[t]!=null&&(S[t].parentLocale!=null?(S[t]=S[t].parentLocale,t===nt()&&nt(t)):S[t]!=null&&delete S[t]),S[t]},d.locales=function(){return Mn(S)},d.weekdaysShort=function(t,e,n){return be(t,e,n,"weekdaysShort")},d.normalizeUnits=H,d.relativeTimeRounding=function(t){return t===void 0?tt:typeof t=="function"&&(tt=t,!0)},d.relativeTimeThreshold=function(t,e){return kt[t]!==void 0&&(e===void 0?kt[t]:(kt[t]=e,t==="s"&&(kt.ss=e-1),!0))},d.calendarFormat=function(t,e){return(t=t.diff(e,"days",!0))<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"},d.prototype=u,d.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},d})})(kn.__module);var Qn=kn.__module.exports;const Xn=pn.getDefaultExportFromCjs(Qn);module.exports=Xn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as Bn, commonjsGlobal as Jn } from "./design-
|
|
2
|
-
import { commonjsRequire as Qn } from "./design-
|
|
3
|
-
import { __module as pn } from "./design-
|
|
1
|
+
import { getDefaultExportFromCjs as Bn, commonjsGlobal as Jn } from "./design-system113.mjs";
|
|
2
|
+
import { commonjsRequire as Qn } from "./design-system114.mjs";
|
|
3
|
+
import { __module as pn } from "./design-system115.mjs";
|
|
4
4
|
(function(te, Kn) {
|
|
5
5
|
(function(ee, d) {
|
|
6
6
|
te.exports = d();
|
package/dist/design-system103.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const ne=require("./design-system114.js"),re=require("./design-system117.js");(function(he,fe){(function(U,j){he.exports=j()})(ne.commonjsGlobal,function(){return function(){var U={d:function(r,e){for(var t in e)U.o(e,t)&&!U.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},o:function(r,e){return Object.prototype.hasOwnProperty.call(r,e)}},j={};U.d(j,{default:function(){return T}});var l={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},Q={classes:"",inline:!1,locale:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:l.days,minView:l.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function y(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof r=="string"?e.querySelector(r):r}function b(){let{tagName:r="div",className:e="",innerHtml:t="",id:s="",attrs:a={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=document.createElement(r);return e&&n.classList.add(...e.split(" ")),s&&(n.id=s),t&&(n.innerHTML=t),a&&z(n,a),n}function z(r,e){for(let[t,s]of Object.entries(e))s!==void 0&&r.setAttribute(t,s);return r}function Z(r){return new Date(r.getFullYear(),r.getMonth()+1,0).getDate()}function D(r){let e=r.getHours(),t=e%12==0?12:e%12;return{year:r.getFullYear(),month:r.getMonth(),fullMonth:r.getMonth()+1<10?"0"+(r.getMonth()+1):r.getMonth()+1,date:r.getDate(),fullDate:r.getDate()<10?"0"+r.getDate():r.getDate(),day:r.getDay(),hours:e,fullHours:O(e),hours12:t,fullHours12:O(t),minutes:r.getMinutes(),fullMinutes:r.getMinutes()<10?"0"+r.getMinutes():r.getMinutes()}}function O(r){return r<10?"0"+r:r}function F(r){let e=10*Math.floor(r.getFullYear()/10);return[e,e+9]}function M(){let r=[];for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.forEach(a=>{if(typeof a=="object")for(let n in a)a[n]&&r.push(n);else a&&r.push(a)}),r.join(" ")}function v(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l.days;if(!r||!e)return!1;let s=D(r),a=D(e);return{[l.days]:s.date===a.date&&s.month===a.month&&s.year===a.year,[l.months]:s.month===a.month&&s.year===a.year,[l.years]:s.year===a.year}[t]}function $(r,e,t){let s=J(r,!1).getTime(),a=J(e,!1).getTime();return t?s>=a:s>a}function E(r,e){return!$(r,e,!0)}function J(r){let e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=new Date(r.getTime());return typeof e!="boolean"||e||oe(t),t}function oe(r){return r.setHours(0,0,0,0),r}function w(r,e,t){r.length?r.forEach(s=>{s.addEventListener(e,t)}):r.addEventListener(e,t)}function R(r,e){return!(!r||r===document||r instanceof DocumentFragment)&&(r.matches(e)?r:R(r.parentNode,e))}function A(r,e,t){return r>t?t:r<e?e:r}function Y(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),s=1;s<e;s++)t[s-1]=arguments[s];return t.filter(a=>a).forEach(a=>{for(let[n,i]of Object.entries(a))if(i!==void 0&&i.toString()==="[object Object]"){let h=r[n]!==void 0?r[n].toString():void 0,o=i.toString(),d=Array.isArray(i)?[]:{};r[n]=r[n]?h!==o?d:r[n]:d,Y(r[n],i)}else r[n]=i}),r}function C(r){let e=r;return r instanceof Date||(e=new Date(r)),isNaN(e.getTime())&&(console.log('Unable to convert value "'.concat(r,'" to Date object')),e=!1),e}function G(r){let e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+r+")($|<|"+e+")","g")}function V(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}class le{constructor(){let{type:e,date:t,dp:s,opts:a,body:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};V(this,"focus",()=>{this.$cell.classList.add("-focus-"),this.focused=!0}),V(this,"removeFocus",()=>{this.$cell.classList.remove("-focus-"),this.focused=!1}),V(this,"select",()=>{this.$cell.classList.add("-selected-"),this.selected=!0}),V(this,"removeSelect",()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1}),V(this,"onChangeSelectedDate",()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())}),V(this,"onChangeFocusDate",i=>{if(!i)return void(this.focused&&this.removeFocus());let h=v(i,this.date,this.type);h?this.focus():!h&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()}),V(this,"render",()=>(this.$cell.innerHTML=this._getHtml(),this.$cell.adpCell=this,this.$cell)),this.type=e,this.singleType=this.type.slice(0,-1),this.date=t,this.dp=s,this.opts=a,this.body=n,this.customData=!1,this.init()}init(){let{range:e,onRenderCell:t}=this.opts;t&&(this.customData=t({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),e&&this._handleRangeStatus())}_bindDatepickerEvents(){this.dp.on(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(l.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(l.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var e;let{year:t,month:s,date:a}=D(this.date),n=((e=this.customData)===null||e===void 0?void 0:e.attrs)||{};this.$cell=b({className:this._getClassName(),attrs:{"data-year":t,"data-month":s,"data-date":a,...n}})}_getClassName(){var e,t;let s=new Date,{selectOtherMonths:a,selectOtherYears:n}=this.opts,{minDate:i,maxDate:h}=this.dp,{day:o}=D(this.date),d=this._isOutOfMinMaxRange(),c=(e=this.customData)===null||e===void 0?void 0:e.disabled,u=M("air-datepicker-cell","-".concat(this.singleType,"-"),{"-current-":v(s,this.date,this.type),"-min-date-":i&&v(i,this.date,this.type),"-max-date-":h&&v(h,this.date,this.type)}),p="";switch(this.type){case l.days:p=M({"-weekend-":this.dp.isWeekend(o),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!a||d||c});break;case l.months:p=M({"-disabled-":d||c});break;case l.years:p=M({"-other-decade-":this.isOtherDecade,"-disabled-":d||this.isOtherDecade&&!n||c})}return M(u,p,(t=this.customData)===null||t===void 0?void 0:t.classes)}_getHtml(){var e;let{year:t,month:s,date:a}=D(this.date),{showOtherMonths:n,showOtherYears:i}=this.opts;if((e=this.customData)!==null&&e!==void 0&&e.html)return this.customData.html;switch(this.type){case l.days:return!n&&this.isOtherMonth?"":a;case l.months:return this.dp.locale[this.opts.monthsField][s];case l.years:return!i&&this.isOtherDecade?"":t}}_isOutOfMinMaxRange(){let{minDate:e,maxDate:t}=this.dp,{type:s,date:a}=this,{month:n,year:i,date:h}=D(a),o=s===l.days,d=s===l.years,c=!!e&&new Date(i,d?e.getMonth():n,o?h:e.getDate()),u=!!t&&new Date(i,d?t.getMonth():n,o?h:t.getDate());return e&&t?E(c,e)||$(u,t):e?E(c,e):t?$(u,t):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{rangeDateFrom:e,rangeDateTo:t}=this.dp,s=M({"-in-range-":e&&t&&(a=this.date,n=e,i=t,$(a,n)&&E(a,i)),"-range-from-":e&&v(this.date,e,this.type),"-range-to-":t&&v(this.date,t,this.type)});var a,n,i;this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),s&&this.$cell.classList.add(...s.split(" "))}_handleSelectedStatus(){let e=this.dp._checkIfDateIsSelected(this.date,this.type);e?this.select():!e&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){v(this.dp.focusDate,this.date,this.type)&&this.focus()}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function k(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}let de={[l.days]:'<div class="air-datepicker-body--day-names"></div>'+'<div class="air-datepicker-body--cells -'.concat(l.days,'-"></div>'),[l.months]:'<div class="air-datepicker-body--cells -'.concat(l.months,'-"></div>'),[l.years]:'<div class="air-datepicker-body--cells -'.concat(l.years,'-"></div>')};const P=".air-datepicker-cell";class ee{constructor(e){let{dp:t,type:s,opts:a}=e;k(this,"handleClick",n=>{let i=n.target.closest(P).adpCell;if(i.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let h=this.dp._checkIfDateIsSelected(i.date,i.type);h?this.dp._handleAlreadySelectedDates(h,i.date):this.dp.selectDate(i.date)}),k(this,"handleDayNameClick",n=>{let i=n.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(i),datepicker:this.dp})}),k(this,"onChangeCurrentView",n=>{n!==this.type?this.hide():(this.show(),this.render())}),k(this,"onMouseOverCell",n=>{let i=R(n.target,P);this.dp.setFocusDate(!!i&&i.adpCell.date)}),k(this,"onMouseOutCell",()=>{this.dp.setFocusDate(!1)}),k(this,"onClickBody",n=>{let{onClickDayName:i}=this.opts,h=n.target;h.closest(P)&&this.handleClick(n),i&&h.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(n)}),k(this,"onMouseDown",n=>{this.pressed=!0;let i=R(n.target,P),h=i&&i.adpCell;v(h.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),v(h.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)}),k(this,"onMouseMove",n=>{if(!this.pressed||!this.dp.isMinViewReached)return;n.preventDefault();let i=R(n.target,P),h=i&&i.adpCell,{selectedDates:o,rangeDateTo:d,rangeDateFrom:c}=this.dp;if(!h||h.isDisabled)return;let{date:u}=h;if(o.length===2){if(this.rangeFromFocused&&!$(u,d)){let{hours:p,minutes:g}=D(c);u.setHours(p),u.setMinutes(g),this.dp.rangeDateFrom=u,this.dp.replaceDate(c,u)}if(this.rangeToFocused&&!E(u,c)){let{hours:p,minutes:g}=D(d);u.setHours(p),u.setMinutes(g),this.dp.rangeDateTo=u,this.dp.replaceDate(d,u)}}}),k(this,"onMouseUp",()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1}),k(this,"onChangeViewDate",(n,i)=>{if(!this.isVisible)return;let h=F(n),o=F(i);switch(this.dp.currentView){case l.days:if(v(n,i,l.months))return;break;case l.months:if(v(n,i,l.years))return;break;case l.years:if(h[0]===o[0]&&h[1]===o[1])return}this.render()}),k(this,"render",()=>{this.destroyCells(),this._generateCells(),this.cells.forEach(n=>{this.$cells.appendChild(n.render())})}),this.dp=t,this.type=s,this.opts=a,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===l.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:e,dynamicRange:t}=this.opts;w(this.$el,"mouseover",this.onMouseOverCell),w(this.$el,"mouseout",this.onMouseOutCell),w(this.$el,"click",this.onClickBody),e&&t&&(w(this.$el,"mousedown",this.onMouseDown),w(this.$el,"mousemove",this.onMouseMove),w(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(l.eventChangeViewDate,this.onChangeViewDate),this.dp.on(l.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=b({className:"air-datepicker-body -".concat(this.type,"-"),innerHtml:de[this.type]}),this.$names=y(".air-datepicker-body--day-names",this.$el),this.$cells=y(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,t="",s=this.dp.isWeekend,{onClickDayName:a}=this.opts,n=e,i=0;for(;i<7;){let h=n%7,o=M("air-datepicker-body--day-name",{[l.cssClassWeekend]:s(h),"-clickable-":!!a}),d=this.dp.locale.daysMin[h];t+='<div class="'.concat(o,`" data-day-index='`).concat(h,"'>").concat(d,"</div>"),i++,n++}return t}_getDaysCells(){let{viewDate:e,locale:{firstDay:t}}=this.dp,s=Z(e),{year:a,month:n}=D(e),i=new Date(a,n,1),h=new Date(a,n,s),o=i.getDay()-t,d=6-h.getDay()+t;o=o<0?o+7:o,d=d>6?d-7:d;let c=function(N,B){let{year:K,month:I,date:q}=D(N);return new Date(K,I,q-B)}(i,o),u=s+o+d,p=c.getDate(),{year:g,month:f}=D(c),_=0;for(;_<u;){let N=new Date(g,f,p+_);this._generateCell(N),_++}}_generateCell(e){let{type:t,dp:s,opts:a}=this,n=new le({type:t,dp:s,opts:a,date:e,body:this});return this.cells.push(n),n}_generateDayCells(){this._getDaysCells()}_generateMonthCells(){let{year:e}=this.dp.parsedViewDate,t=0;for(;t<12;)this.cells.push(this._generateCell(new Date(e,t))),t++}_generateYearCells(){let e=F(this.dp.viewDate),t=e[0]-1,s=e[1]+1,a=t;for(;a<=s;)this.cells.push(this._generateCell(new Date(a,0))),a++}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCells(){switch(this.type){case l.days:this._generateDayCells();break;case l.months:this._generateMonthCells();break;case l.years:this._generateYearCells()}}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach(e=>e.destroy()),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(l.eventChangeViewDate,this.onChangeViewDate),this.dp.off(l.eventChangeCurrentView,this.onChangeCurrentView)}}function x(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}class ce{constructor(e){let{dp:t,opts:s}=e;x(this,"onClickNav",a=>{let n=R(a.target,".air-datepicker-nav--action");if(!n)return;let i=n.dataset.action;this.dp[i]()}),x(this,"onChangeViewDate",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),x(this,"onChangeCurrentView",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),x(this,"onClickNavTitle",()=>{this.dp.isFinalView||this.dp.up()}),x(this,"update",()=>{let{prevHtml:a,nextHtml:n}=this.opts;this.$prev.innerHTML=a,this.$next.innerHTML=n,this._resetNavStatus(),this.render(),this.handleNavStatus()}),x(this,"renderDelay",()=>{setTimeout(this.render)}),x(this,"render",()=>{this.$title.innerHTML=this._getTitle(),function(a,n){for(let i in n)n[i]?a.classList.add(i):a.classList.remove(i)}(this.$title,{"-disabled-":this.dp.isFinalView})}),this.dp=t,this.opts=s,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=y(".air-datepicker-nav--title",this.$el),this.$prev=y('[data-action="prev"]',this.$el),this.$next=y('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(l.eventChangeViewDate,this.onChangeViewDate),this.dp.on(l.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(l.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(l.eventChangeTime,this.render))}destroy(){this.dp.off(l.eventChangeViewDate,this.onChangeViewDate),this.dp.off(l.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(l.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(l.eventChangeTime,this.render))}_createElement(){this.$el=b({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:e,opts:t}=this,s=t.navTitles[e.currentView];return typeof s=="function"?s(e):e.formatDate(e.viewDate,s)}handleNavStatus(){let{disableNavWhenOutOfRange:e}=this.opts,{minDate:t,maxDate:s}=this.dp;if(!t&&!s||!e)return;let{year:a,month:n}=this.dp.parsedViewDate,i=!!t&&D(t),h=!!s&&D(s);switch(this.dp.currentView){case l.days:t&&i.month>=n&&i.year>=a&&this._disableNav("prev"),s&&h.month<=n&&h.year<=a&&this._disableNav("next");break;case l.months:t&&i.year>=a&&this._disableNav("prev"),s&&h.year<=a&&this._disableNav("next");break;case l.years:{let o=F(this.dp.viewDate);t&&i.year>=o[0]&&this._disableNav("prev"),s&&h.year<=o[1]&&this._disableNav("next");break}}}_disableNav(e){y('[data-action="'+e+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];e.length?e.forEach(n=>{n.classList.remove(...s)}):e.classList.remove(...s)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:e,nextHtml:t}=this.opts;this.$el.innerHTML='<div class="air-datepicker-nav--action" data-action="prev">'.concat(e,"</div>")+'<div class="air-datepicker-nav--title"></div>'+'<div class="air-datepicker-nav--action" data-action="next">'.concat(t,"</div>")}get isNavIsFunction(){let{navTitles:e}=this.opts;return Object.keys(e).find(t=>typeof e[t]=="function")}}var te={today:{content:r=>r.locale.today,onClick:r=>r.setViewDate(new Date)},clear:{content:r=>r.locale.clear,onClick:r=>r.clear()}};class ue{constructor(e){let{dp:t,opts:s}=e;this.dp=t,this.opts=s,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=b({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:e}=this.opts;Array.isArray(e)||(e=[e]),e.forEach(t=>{let s=t;typeof t=="string"&&te[t]&&(s=te[t]);let a=this.createButton(s);s.onClick&&this.attachEventToButton(a,s.onClick),this.$el.appendChild(a)})}attachEventToButton(e,t){e.addEventListener("click",()=>{t(this.dp)})}createButton(e){let{content:t,className:s,tagName:a="button",attrs:n={}}=e,i=typeof t=="function"?t(this.dp):t;return b({tagName:a,innerHtml:"<span tabindex='-1'>".concat(i,"</span>"),className:M("air-datepicker-button",s),attrs:n})}render(){this.generateButtons()}}function H(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}class pe{constructor(){let{opts:e,dp:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H(this,"toggleTimepickerIsActive",a=>{this.dp.timepickerIsActive=a}),H(this,"onChangeSelectedDate",a=>{let{date:n,updateTime:i=!1}=a;n&&(this.setMinMaxTime(n),this.setCurrentTime(!!i&&n),this.addTimeToDate(n))}),H(this,"onChangeLastSelectedDate",a=>{a&&(this.setTime(a),this.render())}),H(this,"onChangeInputRange",a=>{let n=a.target;this[n.getAttribute("name")]=n.value,this.updateText(),this.dp.trigger(l.eventChangeTime,{hours:this.hours,minutes:this.minutes})}),H(this,"onMouseEnterLeave",a=>{let n=a.target.getAttribute("name"),i=this.$minutesText;n==="hours"&&(i=this.$hoursText),i.classList.toggle("-focus-")}),H(this,"onFocus",()=>{this.toggleTimepickerIsActive(!0)}),H(this,"onBlur",()=>{this.toggleTimepickerIsActive(!1)}),this.opts=e,this.dp=t;let{timeFormat:s}=this.dp.locale;s&&(s.match(G("h"))||s.match(G("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(l.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let e="input";navigator.userAgent.match(/trident/gi)&&(e="change"),w(this.$ranges,e,this.onChangeInputRange),w(this.$ranges,"mouseenter",this.onMouseEnterLeave),w(this.$ranges,"mouseleave",this.onMouseEnterLeave),w(this.$ranges,"focus",this.onFocus),w(this.$ranges,"mousedown",this.onFocus),w(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=b({className:M("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(l.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:e,hours:t,displayHours:s,minutes:a,minHours:n,minMinutes:i,maxHours:h,maxMinutes:o,dayPeriod:d,opts:{hoursStep:c,minutesStep:u}}=this;this.$el.innerHTML='<div class="air-datepicker-time--current">'+' <span class="air-datepicker-time--current-hours">'.concat(O(s),"</span>")+' <span class="air-datepicker-time--current-colon">:</span>'+' <span class="air-datepicker-time--current-minutes">'.concat(O(a),"</span>")+" ".concat(e?"<span class='air-datepicker-time--current-ampm'>".concat(d,"</span>"):"")+'</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row">'+' <input type="range" name="hours" value="'.concat(t,'" min="').concat(n,'" max="').concat(h,'" step="').concat(c,'"/>')+' </div> <div class="air-datepicker-time--row">'+' <input type="range" name="minutes" value="'.concat(a,'" min="').concat(i,'" max="').concat(o,'" step="').concat(u,'"/>')+" </div></div>"}defineDOM(){let e=t=>y(t,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=e('[name="hours"]'),this.$minutes=e('[name="minutes"]'),this.$hoursText=e(".air-datepicker-time--current-hours"),this.$minutesText=e(".air-datepicker-time--current-minutes"),this.$ampm=e(".air-datepicker-time--current-ampm")}setTime(e){this.setMinMaxTime(e),this.setCurrentTime(e)}addTimeToDate(e){e&&(e.setHours(this.hours),e.setMinutes(this.minutes))}setMinMaxTime(e){if(this.setMinMaxTimeFromOptions(),e){let{minDate:t,maxDate:s}=this.dp;t&&v(e,t)&&this.setMinTimeFromMinDate(t),s&&v(e,s)&&this.setMaxTimeFromMaxDate(s)}}setCurrentTime(e){let{hours:t,minutes:s}=e?D(e):this;this.hours=A(t,this.minHours,this.maxHours),this.minutes=A(s,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:e,minMinutes:t,maxHours:s,maxMinutes:a}=this.opts;this.minHours=A(e,0,23),this.minMinutes=A(t,0,59),this.maxHours=A(s,0,23),this.maxMinutes=A(a,0,59)}setMinTimeFromMinDate(e){let{lastSelectedDate:t}=this.dp;this.minHours=e.getHours(),t&&t.getHours()>e.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=e.getMinutes()}setMaxTimeFromMaxDate(e){let{lastSelectedDate:t}=this.dp;this.maxHours=e.getHours(),t&&t.getHours()<e.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=e.getMinutes()}getDayPeriod(e,t){let s=e,a=Number(e);e instanceof Date&&(s=D(e),a=Number(s.hours));let n="am";if(t||this.ampm){switch(!0){case a===12:case a>11:n="pm"}a=a%12==0?12:a%12}return{hours:a,dayPeriod:n}}updateSliders(){z(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,z(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=O(this.displayHours),this.$minutesText.innerHTML=O(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(e){this._hours=e;let{hours:t,dayPeriod:s}=this.getDayPeriod(e);this.displayHours=t,this.dayPeriod=s}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function L(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}class me{constructor(e){let{dp:t,opts:s}=e;L(this,"pressedKeys",new Set),L(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],a=>a.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],a=>a.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],a=>a.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],a=>a.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],a=>a.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],a=>a.year-=10],[["Control","Shift","ArrowUp"],(a,n)=>n.up()]])),L(this,"handleHotKey",a=>{let n=this.hotKeys.get(a),i=D(this.getInitialFocusDate());n(i,this.dp);let{year:h,month:o,date:d}=i,c=Z(new Date(h,o));c<d&&(d=c);let u=this.dp.getClampedDate(new Date(h,o,d));this.dp.setFocusDate(u,{viewDateTransition:!0})}),L(this,"isHotKeyPressed",()=>{let a=!1,n=this.pressedKeys.size,i=h=>this.pressedKeys.has(h);for(let[h]of this.hotKeys){if(a)break;if(Array.isArray(h[0]))h.forEach(o=>{a||n!==o.length||(a=o.every(i)&&h)});else{if(n!==h.length)continue;a=h.every(i)&&h}}return a}),L(this,"isArrow",a=>a>=37&&a<=40),L(this,"onKeyDown",a=>{let{key:n,which:i}=a,{dp:h,dp:{focusDate:o},opts:d}=this;this.registerKey(n);let c=this.isHotKeyPressed();if(c)return a.preventDefault(),void this.handleHotKey(c);if(this.isArrow(i))return a.preventDefault(),void this.focusNextCell(n);if(n==="Enter"){if(h.currentView!==d.minView)return void h.down();if(o){let u=h._checkIfDateIsSelected(o);return void(u?h._handleAlreadySelectedDates(u,o):h.selectDate(o))}}n==="Escape"&&this.dp.hide()}),L(this,"onKeyUp",a=>{this.removeKey(a.key)}),this.dp=t,this.opts=s,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:e}=this.dp;e.addEventListener("keydown",this.onKeyDown),e.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:e}=this.dp;e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:e,currentView:t,selectedDates:s,parsedViewDate:{year:a,month:n}}=this.dp,i=e||s[s.length-1];if(!i)switch(t){case l.days:i=new Date(a,n,new Date().getDate());break;case l.months:i=new Date(a,n,1);break;case l.years:i=new Date(a,0,1)}return i}focusNextCell(e){let t=this.getInitialFocusDate(),{currentView:s}=this.dp,{days:a,months:n,years:i}=l,h=D(t),o=h.year,d=h.month,c=h.date;switch(e){case"ArrowLeft":s===a&&(c-=1),s===n&&(d-=1),s===i&&(o-=1);break;case"ArrowUp":s===a&&(c-=7),s===n&&(d-=3),s===i&&(o-=4);break;case"ArrowRight":s===a&&(c+=1),s===n&&(d+=1),s===i&&(o+=1);break;case"ArrowDown":s===a&&(c+=7),s===n&&(d+=3),s===i&&(o+=4)}let u=this.dp.getClampedDate(new Date(o,d,c));this.dp.setFocusDate(u,{viewDateTransition:!0})}registerKey(e){this.pressedKeys.add(e)}removeKey(e){this.pressedKeys.delete(e)}}let ge={on(r,e){this.__events||(this.__events={}),this.__events[r]?this.__events[r].push(e):this.__events[r]=[e]},off(r,e){this.__events&&this.__events[r]&&(this.__events[r]=this.__events[r].filter(t=>t!==e))},removeAllEvents(){this.__events={}},trigger(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),s=1;s<e;s++)t[s-1]=arguments[s];this.__events&&this.__events[r]&&this.__events[r].forEach(a=>{a(...t)})}};function m(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}let X="",W="",S="",se=!1;class T{constructor(e,t){var s=this;if(m(this,"viewIndexes",[l.days,l.months,l.years]),m(this,"next",()=>{let{year:i,month:h}=this.parsedViewDate;switch(this.currentView){case l.days:this.setViewDate(new Date(i,h+1,1));break;case l.months:this.setViewDate(new Date(i+1,h,1));break;case l.years:this.setViewDate(new Date(i+10,0,1))}}),m(this,"prev",()=>{let{year:i,month:h}=this.parsedViewDate;switch(this.currentView){case l.days:this.setViewDate(new Date(i,h-1,1));break;case l.months:this.setViewDate(new Date(i-1,h,1));break;case l.years:this.setViewDate(new Date(i-10,0,1))}}),m(this,"_finishHide",()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)}),m(this,"setPosition",function(i){let h=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(i=i||s.opts.position)=="function")return void(s.customHide=i({$datepicker:s.$datepicker,$target:s.$el,$pointer:s.$pointer,isViewChange:h,done:s._finishHide}));let o,d,{isMobile:c}=s.opts,u=s.$el.getBoundingClientRect(),p=s.$el.getBoundingClientRect(),g=s.$datepicker.offsetParent,f=s.$el.offsetParent,_=s.$datepicker.getBoundingClientRect(),N=i.split(" "),B=window.scrollY,K=window.scrollX,I=s.opts.offset,q=N[0],De=N[1];if(c)s.$datepicker.style.cssText="left: 50%; top: 50%";else{if(g===f&&g!==document.body&&(p={top:s.$el.offsetTop,left:s.$el.offsetLeft,width:u.width,height:s.$el.offsetHeight},B=0,K=0),g!==f&&g!==document.body){let ae=g.getBoundingClientRect();p={top:u.top-ae.top,left:u.left-ae.left,width:u.width,height:u.height},B=0,K=0}switch(q){case"top":o=p.top-_.height-I;break;case"right":d=p.left+p.width+I;break;case"bottom":o=p.top+p.height+I;break;case"left":d=p.left-_.width-I}switch(De){case"top":o=p.top;break;case"right":d=p.left+p.width-_.width;break;case"bottom":o=p.top+p.height-_.height;break;case"left":d=p.left;break;case"center":/left|right/.test(q)?o=p.top+p.height/2-_.height/2:d=p.left+p.width/2-_.width/2}s.$datepicker.style.cssText="left: ".concat(d+K,"px; top: ").concat(o+B,"px")}}),m(this,"_setInputValue",()=>{let{opts:i,$altField:h,locale:{dateFormat:o}}=this,{altFieldDateFormat:d,altField:c}=i;c&&h&&(h.value=this._getInputValue(d)),this.$el.value=this._getInputValue(o)}),m(this,"_getInputValue",i=>{let{selectedDates:h,opts:o}=this,{multipleDates:d,multipleDatesSeparator:c}=o;if(!h.length)return"";let u=typeof i=="function",p=u?i(d?h:h[0]):h.map(g=>this.formatDate(g,i));return p=u?p:p.join(c),p}),m(this,"_checkIfDateIsSelected",function(i){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.days,o=!1;return s.selectedDates.some(d=>{let c=v(i,d,h);return o=c&&d,c}),o}),m(this,"_scheduleCallAfterTransition",i=>{this._cancelScheduledCall(),i&&i(!1),this._onTransitionEnd=()=>{i&&i(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})}),m(this,"_cancelScheduledCall",()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)}),m(this,"setViewDate",i=>{if(!((i=C(i))instanceof Date)||v(i,this.viewDate))return;let h=this.viewDate;this.viewDate=i;let{onChangeViewDate:o}=this.opts;if(o){let{month:d,year:c}=this.parsedViewDate;o({month:d,year:c,decade:this.curDecade})}this.trigger(l.eventChangeViewDate,i,h)}),m(this,"setFocusDate",function(i){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!i||(i=C(i))instanceof Date)&&(s.focusDate=i,s.opts.range&&i&&s._handleRangeOnFocus(),s.trigger(l.eventChangeFocusDate,i,h))}),m(this,"setCurrentView",i=>{if(this.viewIndexes.includes(i)){if(this.currentView=i,this.elIsInput&&this.visible&&this.setPosition(void 0,!0),this.trigger(l.eventChangeCurrentView,i),!this.views[i]){let h=this.views[i]=new ee({dp:this,opts:this.opts,type:i});this.shouldUpdateDOM&&this.$content.appendChild(h.$el)}this.opts.onChangeView&&this.opts.onChangeView(i)}}),m(this,"_updateLastSelectedDate",i=>{this.lastSelectedDate=i,this.trigger(l.eventChangeLastSelectedDate,i)}),m(this,"destroy",()=>{let{showEvent:i,isMobile:h}=this.opts,o=this.$datepicker.parentNode;o&&o.removeChild(this.$datepicker),this.$el.removeEventListener(i,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),h&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts=null,this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=null,this.rangeDateFrom=null,this.rangeDateTo=null}),m(this,"update",i=>{let h=Y({},this.opts);Y(this.opts,i);let{timepicker:o,buttons:d,range:c,selectedDates:u,isMobile:p}=this.opts,g=this.visible||this.treatAsInline;this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this._handleLocale(),!h.selectedDates&&u&&this.selectDate(u),i.view&&this.setCurrentView(i.view),this._setInputValue(),h.range&&!c?(this.rangeDateTo=!1,this.rangeDateFrom=!1):!h.range&&c&&this.selectedDates.length&&(this.rangeDateFrom=this.selectedDates[0],this.rangeDateTo=this.selectedDates[1]),h.timepicker&&!o?(g&&this.timepicker.destroy(),this.timepicker=!1,this.$timepicker.parentNode.removeChild(this.$timepicker)):!h.timepicker&&o&&this._addTimepicker(),!h.buttons&&d?this._addButtons():h.buttons&&!d?(this.buttons.destroy(),this.$buttons.parentNode.removeChild(this.$buttons)):g&&h.buttons&&d&&this.buttons.clearHtml().render(),!h.isMobile&&p?(this.treatAsInline||S||this._createMobileOverlay(),this._addMobileAttributes(),this.visible&&this._showMobileOverlay()):h.isMobile&&!p&&(this._removeMobileAttributes(),this.visible&&(S.classList.remove("-active-"),typeof this.opts.position!="function"&&this.setPosition())),g&&(this.nav.update(),this.views[this.currentView].render(),this.currentView===l.days&&this.views[this.currentView].renderDayNames())}),m(this,"isOtherMonth",i=>{let{month:h}=D(i);return h!==this.parsedViewDate.month}),m(this,"isOtherYear",i=>{let{year:h}=D(i);return h!==this.parsedViewDate.year}),m(this,"isOtherDecade",i=>{let{year:h}=D(i),[o,d]=F(this.viewDate);return h<o||h>d}),m(this,"_onChangeSelectedDate",i=>{let{silent:h}=i;setTimeout(()=>{this._setInputValue(),this.opts.onSelect&&!h&&this._triggerOnSelect()})}),m(this,"_onChangeFocusedDate",function(i){let{viewDateTransition:h}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!i)return;let o=!1;h&&(o=s.isOtherMonth(i)||s.isOtherYear(i)||s.isOtherDecade(i)),o&&s.setViewDate(i)}),m(this,"_onChangeTime",i=>{let{hours:h,minutes:o}=i,d=new Date,{lastSelectedDate:c,opts:{onSelect:u}}=this,p=c;c||(p=d);let g=this.getCell(p,this.currentViewSingular),f=g&&g.adpCell;f&&f.isDisabled||(p.setHours(h),p.setMinutes(o),c?(this._setInputValue(),u&&this._triggerOnSelect()):this.selectDate(p))}),m(this,"_onFocus",i=>{this.visible||this.show()}),m(this,"_onBlur",i=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()}),m(this,"_onMouseDown",i=>{this.inFocus=!0}),m(this,"_onMouseUp",i=>{this.inFocus=!1,this.$el.focus()}),m(this,"_onResize",()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()}),m(this,"_onClickOverlay",()=>{this.visible&&this.hide()}),m(this,"isWeekend",i=>this.opts.weekends.includes(i)),m(this,"getClampedDate",i=>{let{minDate:h,maxDate:o}=this,d=i;return o&&$(i,o)?d=o:h&&E(i,h)&&(d=h),d}),this.$el=y(e),!this.$el)return;this.$datepicker=b({className:"air-datepicker"}),this.opts=Y({},Q,t),this.$customContainer=!!this.opts.container&&y(this.opts.container),this.$altField=y(this.opts.altField||!1),X||(X=y("body"));let{view:a,startDate:n}=this.opts;n||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=C(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=a,this.selectedDates=[],this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:e,treatAsInline:t,opts:{inline:s,isMobile:a,selectedDates:n,keyboardNav:i,onlyTimepicker:h}}=this;var o;se||s||!this.elIsInput||(se=!0,W=b({className:o=T.defaultContainerId,id:o}),X.appendChild(W)),!a||S||t||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(s||this._bindEvents(),i&&!h&&(this.keyboardNav=new me({dp:this,opts:e}))),n&&this.selectDate(n,{silent:!0}),this.opts.visible&&!t&&this.show(),a&&!t&&this.$el.setAttribute("readonly",!0),t&&this._createComponents()}_createMobileOverlay(){S=b({className:"air-datepicker-overlay"}),W.appendChild(S)}_createComponents(){let{opts:e,treatAsInline:t,opts:{inline:s,buttons:a,timepicker:n,position:i,classes:h,onlyTimepicker:o,isMobile:d}}=this;this._buildBaseHtml(),this.elIsInput&&(s||this._setPositionClasses(i)),!s&&this.elIsInput||this.$datepicker.classList.add("-inline-"),h&&this.$datepicker.classList.add(...h.split(" ")),o&&this.$datepicker.classList.add("-only-timepicker-"),d&&!t&&this._addMobileAttributes(),this.views[this.currentView]=new ee({dp:this,type:this.currentView,opts:e}),this.nav=new ce({dp:this,opts:e}),n&&this._addTimepicker(),a&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let e in this.views)this.views[e].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){S.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){S.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:e,maxDate:t}=this.opts;this.minDate=!!e&&C(e),this.maxDate=!!t&&C(t)}_addTimepicker(){this.$timepicker=b({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new pe({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=b({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new ue({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(l.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(l.eventChangeFocusDate,this._onChangeFocusedDate),this.on(l.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:e}=this.opts;var t,s;this.elIsInput?e?(t=this.$datepicker,(s=this.$el).parentNode.insertBefore(t,s.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=y(".air-datepicker--content",this.$datepicker),this.$pointer=y(".air-datepicker--pointer",this.$datepicker),this.$nav=y(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:e,dateFormat:t,firstDay:s,timepicker:a,onlyTimepicker:n,timeFormat:i,dateTimeSeparator:h}=this.opts;var o;this.locale=(o=e,JSON.parse(JSON.stringify(o))),t&&(this.locale.dateFormat=t),i!==void 0&&i!==""&&(this.locale.timeFormat=i);let{timeFormat:d}=this.locale;if(s!==""&&(this.locale.firstDay=s),a&&typeof t!="function"){let c=d?h:"";this.locale.dateFormat=[this.locale.dateFormat,d||""].join(c)}n&&typeof t!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(e){if(typeof e=="function")return void this.$datepicker.classList.add("-custom-position-");let t=(e=e.split(" "))[0],s=e[1],a="air-datepicker -".concat(t,"-").concat(s,"- -from-").concat(t,"-");this.$datepicker.classList.add(...a.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:e,minDate:t,maxDate:s}=this;s&&$(e,s)&&this.setViewDate(s),t&&E(e,t)&&this.setViewDate(t)}formatDate(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,t=arguments.length>1?arguments[1]:void 0;if(e=C(e),!(e instanceof Date))return;let s=t,a=this.locale,n=D(e),i=F(e),h=T.replacer,o="am";this.opts.timepicker&&this.timepicker&&(o=this.timepicker.getDayPeriod(e).dayPeriod);let d={T:e.getTime(),m:n.minutes,mm:n.fullMinutes,h:n.hours12,hh:n.fullHours12,H:n.hours,HH:n.fullHours,aa:o,AA:o.toUpperCase(),E:a.daysShort[n.day],EEEE:a.days[n.day],d:n.date,dd:n.fullDate,M:n.month+1,MM:n.fullMonth,MMM:a.monthsShort[n.month],MMMM:a.months[n.month],yy:n.year.toString().slice(-2),yyyy:n.year,yyyy1:i[0],yyyy2:i[1]};for(let[c,u]of Object.entries(d))s=h(s,G(c),u);return s}down(e){this._handleUpDownActions(e,"down")}up(e){this._handleUpDownActions(e,"up")}selectDate(e){let t,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:a,parsedViewDate:n,selectedDates:i}=this,{updateTime:h}=s,{moveToOtherMonthsOnSelect:o,moveToOtherYearsOnSelect:d,multipleDates:c,range:u,autoClose:p}=this.opts,g=i.length;if(Array.isArray(e))return e.forEach(f=>{this.selectDate(f,s)}),new Promise(f=>{setTimeout(f)});if((e=C(e))instanceof Date){if(a===l.days&&e.getMonth()!==n.month&&o&&(t=new Date(e.getFullYear(),e.getMonth(),1)),a===l.years&&e.getFullYear()!==n.year&&d&&(t=new Date(e.getFullYear(),0,1)),t&&this.setViewDate(t),c&&!u){if(g===c)return;this._checkIfDateIsSelected(e)||i.push(e)}else if(u)switch(g){case 1:i.push(e),this.rangeDateTo||(this.rangeDateTo=e),$(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=e),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[e],this.rangeDateFrom=e,this.rangeDateTo="";break;default:this.selectedDates=[e],this.rangeDateFrom=e}else this.selectedDates=[e];return this.trigger(l.eventChangeSelectedDate,{action:l.actionSelectDate,silent:s==null?void 0:s.silent,date:e,updateTime:h}),this._updateLastSelectedDate(e),p&&!this.timepickerIsActive&&this.visible&&(c||u?u&&g===1&&this.hide():this.hide()),new Promise(f=>{setTimeout(f)})}}unselectDate(e){let t=this.selectedDates,s=this;if((e=C(e))instanceof Date)return t.some((a,n)=>{if(v(a,e))return t.splice(n,1),s.selectedDates.length?s._updateLastSelectedDate(s.selectedDates[s.selectedDates.length-1]):(s.rangeDateFrom="",s.rangeDateTo="",s._updateLastSelectedDate(!1)),this.trigger(l.eventChangeSelectedDate,{action:l.actionUnselectDate,date:e}),!0})}replaceDate(e,t){let s=this.selectedDates.find(n=>v(n,e,this.currentView)),a=this.selectedDates.indexOf(s);a<0||v(this.selectedDates[a],t,this.currentView)||(this.selectedDates[a]=t,this.trigger(l.eventChangeSelectedDate,{action:l.actionSelectDate,date:t,updateTime:!0}),this._updateLastSelectedDate(t))}clear(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.trigger(l.eventChangeSelectedDate,{action:l.actionUnselectDate,silent:e.silent}),new Promise(t=>{setTimeout(t)})}show(){let{onShow:e,isMobile:t}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,e&&this._scheduleCallAfterTransition(e),t&&this._showMobileOverlay()}hide(){let{onHide:e,isMobile:t}=this.opts,s=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition(a=>{!this.customHide&&(a&&s||!a&&!s)&&this._finishHide(),e&&e(a)}),t&&S.classList.remove("-active-")}_triggerOnSelect(){let e=[],t=[],{selectedDates:s,locale:a,opts:{onSelect:n,multipleDates:i,range:h}}=this,o=i||h,d=typeof a.dateFormat=="function";s.length&&(e=s.map(J),t=d?i?a.dateFormat(e):e.map(c=>a.dateFormat(c)):e.map(c=>this.formatDate(c,a.dateFormat))),n({date:o?e:e[0],formattedDate:o?t:t[0],datepicker:this})}_handleAlreadySelectedDates(e,t){let{range:s,toggleSelected:a}=this.opts;s?a?this.unselectDate(t):this.selectedDates.length!==2&&this.selectDate(t):a&&this.unselectDate(t),a||this._updateLastSelectedDate(e)}_handleUpDownActions(e,t){if(!((e=C(e||this.focusDate||this.viewDate))instanceof Date))return;let s=t==="up"?this.viewIndex+1:this.viewIndex-1;s>2&&(s=2),s<0&&(s=0),this.setViewDate(new Date(e.getFullYear(),e.getMonth(),1)),this.setCurrentView(this.viewIndexes[s])}_handleRangeOnFocus(){this.selectedDates.length===1&&($(this.selectedDates[0],this.focusDate)?(this.rangeDateTo=this.selectedDates[0],this.rangeDateFrom=this.focusDate):(this.rangeDateTo=this.focusDate,this.rangeDateFrom=this.selectedDates[0]))}getCell(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.day;if(!((e=C(e))instanceof Date))return;let{year:s,month:a,date:n}=D(e),i='[data-year="'.concat(s,'"]'),h='[data-month="'.concat(a,'"]'),o='[data-date="'.concat(n,'"]'),d={[l.day]:"".concat(i).concat(h).concat(o),[l.month]:"".concat(i).concat(h),[l.year]:"".concat(i)};return this.views[this.currentView].$el.querySelector(d[t])}_showMobileOverlay(){S.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce((e,t)=>parseFloat(t)+e,0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return D(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return F(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===l.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===l.days}get $container(){return this.$customContainer||W}static replacer(e,t,s){return e.replace(t,function(a,n,i,h){return n+s+h})}}var ie;return m(T,"defaults",Q),m(T,"version","3.3.0"),m(T,"defaultContainerId","air-datepicker-global-container"),ie=T.prototype,Object.assign(ie,ge),j.default}()})})(re.__module);var ve=re.__module.exports;const ye=ne.getDefaultExportFromCjs(ve);module.exports=ye;
|
|
1
|
+
"use strict";(function(p,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(p=typeof globalThis<"u"?globalThis:p||self,m(p.IMask={}))})(globalThis,function(p){function m(n){return typeof n=="string"||n instanceof String}function P(n){var t;return typeof n=="object"&&n!=null&&(n==null||(t=n.constructor)==null?void 0:t.name)==="Object"}function U(n,t){return Array.isArray(t)?U(n,(e,s)=>t.includes(s)):Object.entries(n).reduce((e,s)=>{let[i,u]=s;return t(u,i)&&(e[i]=u),e},{})}const h={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function j(n){switch(n){case h.LEFT:return h.FORCE_LEFT;case h.RIGHT:return h.FORCE_RIGHT;default:return n}}function y(n){return n.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function b(n,t){if(t===n)return!0;const e=Array.isArray(t),s=Array.isArray(n);let i;if(e&&s){if(t.length!=n.length)return!1;for(i=0;i<t.length;i++)if(!b(t[i],n[i]))return!1;return!0}if(e!=s)return!1;if(t&&n&&typeof t=="object"&&typeof n=="object"){const u=t instanceof Date,a=n instanceof Date;if(u&&a)return t.getTime()==n.getTime();if(u!=a)return!1;const r=t instanceof RegExp,l=n instanceof RegExp;if(r&&l)return t.toString()==n.toString();if(r!=l)return!1;const d=Object.keys(t);for(i=0;i<d.length;i++)if(!Object.prototype.hasOwnProperty.call(n,d[i]))return!1;for(i=0;i<d.length;i++)if(!b(n[d[i]],t[d[i]]))return!1;return!0}else if(t&&n&&typeof t=="function"&&typeof n=="function")return t.toString()===n.toString();return!1}class Z{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?h.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?h.RIGHT:h.LEFT}}function o(n,t){return new o.InputMask(n,t)}function H(n){if(n==null)throw new Error("mask property should be defined");return n instanceof RegExp?o.MaskedRegExp:m(n)?o.MaskedPattern:n===Date?o.MaskedDate:n===Number?o.MaskedNumber:Array.isArray(n)||n===Array?o.MaskedDynamic:o.Masked&&n.prototype instanceof o.Masked?n:o.Masked&&n instanceof o.Masked?n.constructor:n instanceof Function?o.MaskedFunction:(console.warn("Mask not found for mask",n),o.Masked)}function M(n){if(!n)throw new Error("Options in not defined");if(o.Masked){if(n.prototype instanceof o.Masked)return{mask:n};const{mask:t=void 0,...e}=n instanceof o.Masked?{mask:n}:P(n)&&n.mask instanceof o.Masked?n:{};if(t){const s=t.mask;return{...U(t,(i,u)=>!u.startsWith("_")),mask:t.constructor,_mask:s,...e}}}return P(n)?{...n}:{mask:n}}function A(n){if(o.Masked&&n instanceof o.Masked)return n;const t=M(n),e=H(t.mask);if(!e)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return t.mask===e&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new e(t)}o.createMask=A;class I{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,e){if(!(t==null||e==null||t===this.selectionStart&&e===this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}o.MaskElement=I;class F extends I{constructor(t){super(),this.input=t,this._handlers={}}get rootElement(){var t,e,s;return(t=(e=(s=this.input).getRootNode)==null?void 0:e.call(s))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){Object.keys(t).forEach(e=>this._toggleEventHandler(F.EVENTS_MAP[e],t[e]))}unbindEvents(){Object.keys(this._handlers).forEach(t=>this._toggleEventHandler(t))}_toggleEventHandler(t,e){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),e&&(this.input.addEventListener(t,e),this._handlers[t]=e)}}F.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},o.HTMLMaskElement=F;class z extends F{constructor(t){super(t),this.input=t,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}o.HTMLMaskElement=F;class w extends F{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return i==null||s==null||s>i?s:i}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,t),s.setEnd(this.input.lastChild||this.input,e);const i=this.rootElement,u=i.getSelection&&i.getSelection();u&&(u.removeAllRanges(),u.addRange(s))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}o.HTMLContenteditableMaskElement=w;class G{constructor(t,e){this.el=t instanceof I?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new w(t):new z(t),this.masked=A(e),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var e;return t==null||((e=this.masked)==null?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof o.Masked)&&this.masked.constructor===H(t)){this.masked.updateOptions({mask:t});return}const e=t instanceof o.Masked?t:A({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const s=this._listeners[t];s&&s.forEach(i=>i(e))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const t=this.masked.unmaskedValue,e=this.masked.value,s=this.displayValue,i=this.unmaskedValue!==t||this.value!==e;this._unmaskedValue=t,this._value=e,this.el.value!==s&&(this.el.value=s),i&&this._fireChangeEvents()}updateOptions(t){const{mask:e,...s}=t,i=!this.maskEquals(e),u=!b(this.masked,s);i&&(this.mask=e),u&&this.masked.updateOptions(s),(i||u)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,h.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const s=this._listeners[t].indexOf(e);return s>=0&&this._listeners[t].splice(s,1),this}_onInput(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();const e=new Z({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,u=s===this.masked.rawInputValue?e.removeDirection:h.NONE;let a=this.masked.nearestInputPos(e.startChangePos+i,u);u!==h.NONE&&(a=this.masked.nearestInputPos(a,h.NONE)),this.updateControl(),this.updateCursor(a),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}o.InputMask=G;class c{static normalize(t){return Array.isArray(t)?t:[t,new c]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}o.ChangeDetails=c;class E{constructor(t,e,s){t===void 0&&(t=""),e===void 0&&(e=0),this.value=t,this.from=e,this.stop=s}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class f{constructor(t){this._value="",this._update({...f.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){e===void 0&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),new E(this.extractInput(t,e),t)}appendTail(t){return m(t)&&(t=new E(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new c({inserted:t,rawInserted:t})):new c}_appendChar(t,e,s){e===void 0&&(e={});const i=this.state;let u;if([t,u]=this.doPrepareChar(t,e),u=u.aggregate(this._appendCharRaw(t,e)),u.inserted){let a,r=this.doValidate(e)!==!1;if(r&&s!=null){const l=this.state;this.overwrite===!0&&(a=s.state,s.unshift(this.displayValue.length-u.tailShift));let d=this.appendTail(s);r=d.rawInserted===s.toString(),!(r&&d.inserted)&&this.overwrite==="shift"&&(this.state=l,a=s.state,s.shift(),d=this.appendTail(s),r=d.rawInserted===s.toString()),r&&d.inserted&&(this.state=l)}r||(u=new c,this.state=i,s&&a&&(s.state=a))}return u}_appendPlaceholder(){return new c}_appendEager(){return new c}append(t,e,s){if(!m(t))throw new Error("value should be string");const i=m(s)?new E(String(s)):s;e!=null&&e.tail&&(e._beforeTailState=this.state);let u;[t,u]=this.doPrepare(t,e);for(let a=0;a<t.length;++a){const r=this._appendChar(t[a],e,i);if(!r.rawInserted&&!this.doSkipInvalid(t[a],e,i))break;u.aggregate(r)}return(this.eager===!0||this.eager==="append")&&e!=null&&e.input&&t&&u.aggregate(this._appendEager()),i!=null&&(u.tailShift+=this.appendTail(i).tailShift),u}remove(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new c}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,s=this.value,i=t();return this.rawInputValue=e,this.value&&this.value!==s&&s.indexOf(this.value)===0&&this.append(s.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,s=t(this);return this.state=e,delete this._isolated,s}doSkipInvalid(t,e,s){return!!this.skipInvalid}doPrepare(t,e){return e===void 0&&(e={}),c.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return e===void 0&&(e={}),c.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,s,i,u){i===void 0&&(i=h.NONE),u===void 0&&(u={input:!0});const a=t+e,r=this.extractTail(a),l=this.eager===!0||this.eager==="remove";let d;l&&(i=j(i),d=this.extractInput(0,a,{raw:!0}));let v=t;const _=new c;if(i!==h.NONE&&(v=this.nearestInputPos(t,e>1&&t!==0&&!l?h.NONE:i),_.tailShift=v-t),_.aggregate(this.remove(v)),l&&i!==h.NONE&&d===this.rawInputValue)if(i===h.FORCE_LEFT){let S;for(;d===this.rawInputValue&&(S=this.displayValue.length);)_.aggregate(new c({tailShift:-1})).aggregate(this.remove(S-1))}else i===h.FORCE_RIGHT&&r.unshift();return _.aggregate(this.append(s,u,r))}maskEquals(t){return this.mask===t}typedValueEquals(t){const e=this.typedValue;return t===e||f.EMPTY_VALUES.includes(t)&&f.EMPTY_VALUES.includes(e)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}}f.DEFAULTS={skipInvalid:!0},f.EMPTY_VALUES=[void 0,null,""],o.Masked=f;class C{constructor(t,e){t===void 0&&(t=[]),e===void 0&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=m(t)?new E(String(t)):t;const e=this.chunks[this.chunks.length-1],s=e&&(e.stop===t.stop||t.stop==null)&&t.from===e.from+e.toString().length;if(t instanceof E)s?e.extend(t.toString()):this.chunks.push(t);else if(t instanceof C){if(t.stop==null){let i;for(;t.chunks.length&&t.chunks[0].stop==null;)i=t.chunks.shift(),i.from+=t.from,this.extend(i)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof o.MaskedPattern))return new E(this.toString()).appendTo(t);const e=new c;for(let s=0;s<this.chunks.length&&!e.skip;++s){const i=this.chunks[s],u=t._mapPosToBlock(t.displayValue.length),a=i.stop;let r;if(a!=null&&(!u||u.index<=a)){if(i instanceof C||t._stops.indexOf(a)>=0){const l=t._appendPlaceholder(a);e.aggregate(l)}r=i instanceof C&&t._blocks[a]}if(r){const l=r.appendTail(i);l.skip=!1,e.aggregate(l),t._value+=l.inserted;const d=i.toString().slice(l.rawInserted.length);d&&e.aggregate(t.append(d,{tail:!0}))}else e.aggregate(t.append(i.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...s}=t;Object.assign(this,s),this.chunks=e.map(i=>{const u="chunks"in i?new C:new E;return u.state=i,u})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const e=t!=null?t-this.from:t;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],u=i.unshift(e);if(i.toString()){if(!u)break;++s}else this.chunks.splice(s,1);if(u)return u}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],s=e.shift();if(e.toString()){if(!s)break;--t}else this.chunks.splice(t,1);if(s)return s}return""}}class X{constructor(t,e){this.masked=t,this._log=[];const{offset:s,index:i}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((e=this.block)==null?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,h.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,h.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,h.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,h.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,h.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,h.NONE),!0})}}class R{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return t===void 0&&(t=0),e===void 0&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new c}nearestInputPos(t,e){e===void 0&&(e=h.NONE);const s=0,i=this._value.length;switch(e){case h.LEFT:case h.FORCE_LEFT:return s;case h.NONE:case h.RIGHT:case h.FORCE_RIGHT:default:return i}}totalInputPositions(t,e){return t===void 0&&(t=0),e===void 0&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,e){e===void 0&&(e={});const s=new c;if(this.isFilled)return s;const i=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!i)&&!e.tail;return a&&(s.rawInserted=this.char),this._value=s.inserted=this.char,this._isRawInput=a&&(e.raw||e.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new c;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new E("")}appendTail(t){return m(t)&&(t=new E(String(t))),t.appendTo(this)}append(t,e,s){const i=this._appendChar(t[0],e);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}}class x{constructor(t){const{parent:e,isOptional:s,placeholderChar:i,displayChar:u,lazy:a,eager:r,...l}=t;this.masked=A(l),Object.assign(this,{parent:e,isOptional:s,placeholderChar:i,displayChar:u,lazy:a,eager:r})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.value.length),t===0&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new c}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,e){if(e===void 0&&(e={}),this.isFilled)return new c;const s=this.masked.state,i=this.masked._appendChar(t,this.currentMaskFlags(e));return i.inserted&&this.doValidate(e)===!1&&(i.inserted=i.rawInserted="",this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!e.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(t,e,s){return this.masked.append(t,this.currentMaskFlags(e),s)}_appendPlaceholder(){const t=new c;return this.isFilled||this.isOptional||(this.isFilled=!0,t.inserted=this.placeholderChar),t}_appendEager(){return new c}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this.value.length),this.masked.extractInput(t,e,s)}nearestInputPos(t,e){e===void 0&&(e=h.NONE);const s=0,i=this.value.length,u=Math.min(Math.max(t,s),i);switch(e){case h.LEFT:case h.FORCE_LEFT:return this.isComplete?u:s;case h.RIGHT:case h.FORCE_RIGHT:return this.isComplete?u:i;case h.NONE:default:return u}}totalInputPositions(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(t==null||(e=t._beforeTailState)==null?void 0:e.masked)||(t==null?void 0:t._beforeTailState)}}}x.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class q extends f{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=s=>s.search(e)>=0),super._update(t)}}o.MaskedRegExp=q;class k extends f{constructor(t){super({...k.DEFAULTS,...t,definitions:Object.assign({},x.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let s=!1,i=!1;for(let u=0;u<e.length;++u){if(this.blocks){const d=e.slice(u),v=Object.keys(this.blocks).filter(S=>d.indexOf(S)===0);v.sort((S,L)=>L.length-S.length);const _=v[0];if(_){const{expose:S,...L}=M(this.blocks[_]),N=A({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...L,parent:this});N&&(this._blocks.push(N),S&&(this.exposeBlock=N),this._maskedBlocks[_]||(this._maskedBlocks[_]=[]),this._maskedBlocks[_].push(this._blocks.length-1)),u+=_.length-1;continue}}let a=e[u],r=a in t;if(a===k.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(a==="{"||a==="}"){s=!s;continue}if(a==="["||a==="]"){i=!i;continue}if(a===k.ESCAPE_CHAR){if(++u,a=e[u],!a)break;r=!1}const l=r?new x({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...M(t[a]),parent:this}):new R({char:a,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){const{_blocks:e,...s}=t;this._blocks.forEach((i,u)=>i.state=e[u]),super.state=s}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,e)=>t+=e.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,e)=>t+=e.value,"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,e)=>t+=e.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new c;let s=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(s==null)return e;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const u=this._blocks[i]._appendEager();if(!u.inserted)break;e.aggregate(u)}return e}_appendCharRaw(t,e){e===void 0&&(e={});const s=this._mapPosToBlock(this.displayValue.length),i=new c;if(!s)return i;for(let a=s.index;;++a){var u;const r=this._blocks[a];if(!r)break;const l=r._appendChar(t,{...e,_beforeTailState:(u=e._beforeTailState)==null||(u=u._blocks)==null?void 0:u[a]}),d=l.skip;if(i.aggregate(l),d||l.rawInserted)break}return i}extractTail(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);const s=new C;return t===e||this._forEachBlocksInRange(t,e,(i,u,a,r)=>{const l=i.extractTail(a,r);l.stop=this._findStopBefore(u),l.from=this._blockStartPos(u),l instanceof C&&(l.blockIndex=u),s.extend(l)}),s}extractInput(t,e,s){if(t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),s===void 0&&(s={}),t===e)return"";let i="";return this._forEachBlocksInRange(t,e,(u,a,r,l)=>{i+=u.extractInput(r,l,s)}),i}_findStopBefore(t){let e;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=t)e=i;else break}return e}_appendPlaceholder(t){const e=new c;if(this.lazy&&t==null)return e;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return e;const i=s.index,u=t??this._blocks.length;return this._blocks.slice(i,u).forEach(a=>{if(!a.lazy||t!=null){var r;const l=a._appendPlaceholder((r=a._blocks)==null?void 0:r.length);this._value+=l.inserted,e.aggregate(l)}}),e}_mapPosToBlock(t){let e="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],u=e.length;if(e+=i.displayValue,t<=e.length)return{index:s,offset:t-u}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((e,s)=>e+=s.displayValue.length,0)}_forEachBlocksInRange(t,e,s){e===void 0&&(e=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const u=this._mapPosToBlock(e),a=u&&i.index===u.index,r=i.offset,l=u&&a?u.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,l),u&&!a){for(let d=i.index+1;d<u.index;++d)s(this._blocks[d],d,0,this._blocks[d].displayValue.length);s(this._blocks[u.index],u.index,0,u.offset)}}}remove(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);const s=super.remove(t,e);return this._forEachBlocksInRange(t,e,(i,u,a,r)=>{s.aggregate(i.remove(a,r))}),s}nearestInputPos(t,e){if(e===void 0&&(e=h.NONE),!this._blocks.length)return 0;const s=new X(this,t);if(e===h.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(e===h.LEFT||e===h.FORCE_LEFT){if(e===h.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===t)return t;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),e===h.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=t||(s.popState(),s.ok&&s.pos<=t))return s.pos;s.popState()}return s.ok?s.pos:e===h.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return e===h.RIGHT||e===h.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:e===h.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(t,h.LEFT))):t}totalInputPositions(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length);let s=0;return this._forEachBlocksInRange(t,e,(i,u,a,r)=>{s+=i.totalInputPositions(a,r)}),s}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map(s=>this._blocks[s]):[]}}k.DEFAULTS={lazy:!0,placeholderChar:"_"},k.STOP_CHAR="`",k.ESCAPE_CHAR="\\",k.InputDefinition=x,k.FixedDefinition=R,o.MaskedPattern=k;class V extends k{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:u=this.autofix,...a}=t;this.to=e,this.from=s,this.maxLength=Math.max(String(e).length,i),this.autofix=u;const r=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<l.length&&l[d]===r[d];)++d;a.mask=l.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(a)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let e="",s="";const[,i,u]=t.match(/^(\D*)(\d*)(\D*)/)||[];return u&&(e="0".repeat(i.length)+u,s="9".repeat(i.length)+u),e=e.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[e,s]}doPrepareChar(t,e){e===void 0&&(e={});let s;if([t,s]=super.doPrepareChar(t.replace(/\D/g,""),e),!this.autofix||!t)return[t,s];const i=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0"),a=this.value+t;if(a.length>this.maxLength)return["",s];const[r,l]=this.boundaries(a);return Number(l)<this.from?[i[a.length-1],s]:Number(r)>this.to?this.autofix==="pad"&&a.length<this.maxLength?["",s.aggregate(this.append(i[a.length-1]+t,e))]:[u[a.length-1],s]:[t,s]}doValidate(t){const e=this.value;if(e.search(/[^0]/)===-1&&e.length<=this._matchFrom)return!0;const[i,u]=this.boundaries(e);return this.from<=Number(u)&&Number(i)<=this.to&&super.doValidate(t)}}o.MaskedRange=V;class B extends k{constructor(t){const{mask:e,pattern:s,...i}={...B.DEFAULTS,...t};super({...i,mask:m(e)?e:s})}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:s,blocks:i,...u}={...B.DEFAULTS,...t},a=Object.assign({},B.GET_DEFAULT_BLOCKS());t.min&&(a.Y.from=t.min.getFullYear()),t.max&&(a.Y.to=t.max.getFullYear()),t.min&&t.max&&a.Y.from===a.Y.to&&(a.m.from=t.min.getMonth()+1,a.m.to=t.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=t.min.getDate(),a.d.to=t.max.getDate())),Object.assign(a,this.blocks,i),Object.keys(a).forEach(r=>{const l=a[r];!("autofix"in l)&&"autofix"in t&&(l.autofix=t.autofix)}),super._update({...u,mask:m(e)?e:s,blocks:a})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&e!=null&&(this.min==null||this.min<=e)&&(this.max==null||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}}B.GET_DEFAULT_BLOCKS=()=>({d:{mask:V,from:1,to:31,maxLength:2},m:{mask:V,from:1,to:12,maxLength:2},Y:{mask:V,from:1900,to:9999}}),B.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(n,t)=>{if(!n)return"";const e=String(n.getDate()).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),i=n.getFullYear();return[e,s,i].join(".")},parse:(n,t)=>{const[e,s,i]=n.split(".").map(Number);return new Date(i,s-1,e)}},o.MaskedDate=B;class D extends f{constructor(t){super({...D.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(e=>{const{expose:s,...i}=M(e),u=A({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=u),u}):[])}_appendCharRaw(t,e){e===void 0&&(e={});const s=this._applyDispatch(t,e);return this.currentMask&&s.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),s}_applyDispatch(t,e,s){t===void 0&&(t=""),e===void 0&&(e={}),s===void 0&&(s="");const i=e.tail&&e._beforeTailState!=null?e._beforeTailState._value:this.value,u=this.rawInputValue,a=e.tail&&e._beforeTailState!=null?e._beforeTailState._rawInputValue:u,r=u.slice(a.length),l=this.currentMask,d=new c,v=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(t,{...e},s),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),a){const _=this.currentMask.append(a,{raw:!0});d.tailShift=_.inserted.length-i.length}r&&(d.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)}else v&&(this.currentMask.state=v);return d}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new c;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,s;return{...t,_beforeTailState:((e=t._beforeTailState)==null?void 0:e.currentMaskRef)===this.currentMask&&((s=t._beforeTailState)==null?void 0:s.currentMask)||t._beforeTailState}}doDispatch(t,e,s){return e===void 0&&(e={}),s===void 0&&(s=""),this.dispatch(t,this,e,s)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){e===void 0&&(e={});let[s,i]=super.doPrepare(t,e);if(this.currentMask){let u;[s,u]=super.doPrepare(s,this.currentMaskFlags(e)),i=i.aggregate(u)}return[s,i]}doPrepareChar(t,e){e===void 0&&(e={});let[s,i]=super.doPrepareChar(t,e);if(this.currentMask){let u;[s,u]=super.doPrepareChar(s,this.currentMaskFlags(e)),i=i.aggregate(u)}return[s,i]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,e){const s=new c;return this.currentMask&&s.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),s}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:s,currentMask:i,...u}=t;e&&this.compiledMasks.forEach((a,r)=>a.state=e[r]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=u}extractInput(t,e,s){return this.currentMask?this.currentMask.extractInput(t,e,s):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((e,s)=>{if(!t[s])return;const{mask:i,...u}=t[s];return b(e,u)&&e.maskEquals(i)}):super.maskEquals(t)}typedValueEquals(t){var e;return!!((e=this.currentMask)!=null&&e.typedValueEquals(t))}}D.DEFAULTS=void 0,D.DEFAULTS={dispatch:(n,t,e,s)=>{if(!t.compiledMasks.length)return;const i=t.rawInputValue,u=t.compiledMasks.map((a,r)=>{const l=t.currentMask===a,d=l?a.displayValue.length:a.nearestInputPos(a.displayValue.length,h.FORCE_LEFT);return a.rawInputValue!==i?(a.reset(),a.append(i,{raw:!0})):l||a.remove(d),a.append(n,t.currentMaskFlags(e)),a.appendTail(s),{index:r,weight:a.rawInputValue.length,totalInputPositions:a.totalInputPositions(0,Math.max(d,a.nearestInputPos(a.displayValue.length,h.FORCE_LEFT)))}});return u.sort((a,r)=>r.weight-a.weight||r.totalInputPositions-a.totalInputPositions),t.compiledMasks[u[0].index]}},o.MaskedDynamic=D;class Y extends k{constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...s}=t;if(e){const i=e.map(r=>r.length),u=Math.min(...i),a=Math.max(...i)-u;s.mask="*".repeat(u),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=e}super._update(s)}doValidate(t){return this.enum.some(e=>e.indexOf(this.unmaskedValue)===0)&&super.doValidate(t)}}o.MaskedEnum=Y;class $ extends f{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}o.MaskedFunction=$;class g extends f{constructor(t){super({...g.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e="\\d*",s=(this.scale?"("+y(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+e+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(y).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(y(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){e===void 0&&(e={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(t,e){e===void 0&&(e=!1);let s=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,e&&(t+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,s){return t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,s))}_appendCharRaw(t,e){if(e===void 0&&(e={}),!this.thousandsSeparator)return super._appendCharRaw(t,e);const s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const u=super._appendCharRaw(t,e);this._value=this._insertThousandsSeparators(this._value);const a=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(a);return u.tailShift+=(r-i)*this.thousandsSeparator.length,u.skip=!u.rawInserted&&t===this.thousandsSeparator,u}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,e);if(s<=t)return s}return-1}_adjustRangeWithSeparators(t,e){const s=this._findSeparatorAround(t);s>=0&&(t=s);const i=this._findSeparatorAround(e);return i>=0&&(e=i+this.thousandsSeparator.length),[t,e]}remove(t,e){t===void 0&&(t=0),e===void 0&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const s=this.value.slice(0,t),i=this.value.slice(e),u=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const a=this._separatorsCountFromSlice(s);return new c({tailShift:(a-u)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case h.NONE:case h.LEFT:case h.FORCE_LEFT:{const s=this._findSeparatorAround(t-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(t<i||this.value.length<=i||e===h.FORCE_LEFT)return s}break}case h.RIGHT:case h.FORCE_RIGHT:{const s=this._findSeparatorAround(t);if(s>=0)return s+this.thousandsSeparator.length}}return t}doValidate(t){let e=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(e){const s=this.number;e=e&&!isNaN(s)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return e&&super.doValidate(t)}doCommit(){if(this.value){const t=this.number;let e=t;this.min!=null&&(e=Math.max(e,this.min)),this.max!=null&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,(s,i,u,a)=>i+a),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,s){e===void 0&&(e={});const i=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===g.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,g.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(g.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||g.EMPTY_VALUES.includes(t)&&g.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}g.UNMASKED_RADIX=".",g.EMPTY_VALUES=[...f.EMPTY_VALUES,0],g.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[g.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:n=>n.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},o.MaskedNumber=g;const T={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function O(n,t,e){t===void 0&&(t=T.MASKED),e===void 0&&(e=T.MASKED);const s=A(n);return i=>s.runIsolated(u=>(u[t]=i,u[e]))}function K(n,t,e,s){return O(t,e,s)(n)}o.PIPE_TYPE=T,o.createPipe=O,o.pipe=K;try{globalThis.IMask=o}catch{}p.ChangeDetails=c,p.ChunksTailDetails=C,p.DIRECTION=h,p.HTMLContenteditableMaskElement=w,p.HTMLInputMaskElement=z,p.HTMLMaskElement=F,p.InputMask=G,p.MaskElement=I,p.Masked=f,p.MaskedDate=B,p.MaskedDynamic=D,p.MaskedEnum=Y,p.MaskedFunction=$,p.MaskedNumber=g,p.MaskedPattern=k,p.MaskedRange=V,p.MaskedRegExp=q,p.PIPE_TYPE=T,p.PatternFixedDefinition=R,p.PatternInputDefinition=x,p.createMask=A,p.createPipe=O,p.default=o,p.forceDirection=j,p.normalizeOpts=M,p.pipe=K,Object.defineProperty(p,"__esModule",{value:!0})});const W=IMask;module.exports=W;
|
|
2
2
|
//# sourceMappingURL=design-system103.js.map
|