@progress/kendo-dateinputs-common 0.2.0-dev.202301101148 → 0.2.0-dev.202301131210

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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoDateinputsCommon=e():t.KendoDateinputsCommon=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(2),o=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},a=function(t){return t instanceof HTMLElement};e.isPresent=function(t){return null!=t},e.isDocumentAvailable=function(){return!!document},e.isNumber=function(t){return e.isPresent(t)&&"number"==typeof t&&!Number.isNaN(t)},e.parseToInt=function(t){return parseInt(t,10)},e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},e.deepExtend=function(t){for(var n,r,i=[],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(!i.length)return t;var u=i.shift();if(o(t)&&o(u))for(var l in u)a(u[l])?t[l]=u[l]:o(u[l])?(t[l]||e.extend(t,((n={})[l]={},n)),e.deepExtend(t[l],u[l])):e.extend(t,((r={})[l]=u[l],r));return e.deepExtend.apply(void 0,[t].concat(i))},e.noop=function(){},e.isFunction=function(t){return"function"==typeof t},e.cropTwoDigitYear=function(t){return!e.isPresent(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},e.setYears=(r="setFullYear",function(t,e){var n=i.cloneDate(t);return n[r](e),n}),e.millisecondDigitsInFormat=function(t){var e=t&&t.match(/S+(\1)/);return e?e[0].length:0},e.millisecondStepFor=function(t){return Math.pow(10,3-t)},e.areDatePartsEqualTo=function(t,e,n,r,i,o,a,s){return!(!t||t.getFullYear()!==e||t.getMonth()!==n||t.getDate()!==r||t.getHours()!==i||t.getMinutes()!==o||t.getSeconds()!==a||t.getMilliseconds()!==s)},e.isValidDate=function(t){return e.isPresent(t)&&t.getTime&&e.isNumber(t.getTime())}},function(t,e,n){"use strict";n.r(e),n.d(e,"addCenturies",(function(){return d})),n.d(e,"addDays",(function(){return a})),n.d(e,"addDecades",(function(){return f})),n.d(e,"addMonths",(function(){return l})),n.d(e,"addWeeks",(function(){return p})),n.d(e,"addYears",(function(){return h})),n.d(e,"adjustDST",(function(){return o})),n.d(e,"cloneDate",(function(){return i})),n.d(e,"MS_PER_MINUTE",(function(){return m})),n.d(e,"MS_PER_HOUR",(function(){return g})),n.d(e,"MS_PER_DAY",(function(){return v})),n.d(e,"createDate",(function(){return s})),n.d(e,"dayOfWeek",(function(){return D})),n.d(e,"Day",(function(){return y})),n.d(e,"Direction",(function(){return r})),n.d(e,"durationInCenturies",(function(){return M})),n.d(e,"durationInDecades",(function(){return w})),n.d(e,"durationInMonths",(function(){return P})),n.d(e,"durationInYears",(function(){return C})),n.d(e,"firstDayInWeek",(function(){return T})),n.d(e,"firstDayOfMonth",(function(){return O})),n.d(e,"firstDecadeOfCentury",(function(){return E})),n.d(e,"firstMonthOfYear",(function(){return x})),n.d(e,"firstYearOfDecade",(function(){return S})),n.d(e,"getDate",(function(){return I})),n.d(e,"isEqual",(function(){return F})),n.d(e,"isEqualDate",(function(){return k})),n.d(e,"lastDayOfMonth",(function(){return u})),n.d(e,"lastDecadeOfCentury",(function(){return j})),n.d(e,"lastMonthOfYear",(function(){return U})),n.d(e,"lastYearOfDecade",(function(){return V})),n.d(e,"nextDayOfWeek",(function(){return N})),n.d(e,"prevDayOfWeek",(function(){return A})),n.d(e,"abbrTimezone",(function(){return Q})),n.d(e,"loadTimezone",(function(){return X})),n.d(e,"offset",(function(){return $})),n.d(e,"timezoneGroupNames",(function(){return tt})),n.d(e,"timezoneNames",(function(){return et})),n.d(e,"timezoneTitle",(function(){return nt})),n.d(e,"toLocalDate",(function(){return rt})),n.d(e,"ZonedDate",(function(){return dt})),n.d(e,"zonesPerGroup",(function(){return ft})),n.d(e,"weekInYear",(function(){return mt}));var r,i=function(t){return t?new Date(t.getTime()):null},o=function(t,e){var n=i(t);return 0===e&&23===n.getHours()&&n.setHours(n.getHours()+2),n},a=function(t,e){var n=i(t);return n.setDate(n.getDate()+e),o(n,t.getHours())},s=function(t,e,n,r,i,a,s){void 0===r&&(r=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=0);var u=new Date(t,e,n,r,i,a,s);return t>-1&&t<100&&u.setFullYear(u.getFullYear()-1900),o(u,r)},u=function(t){var e=s(t.getFullYear(),t.getMonth()+1,1,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return a(e,-1)},l=function(t,e){var n=i(t),r=(12+(n.getMonth()+e)%12)%12;return n.setMonth(n.getMonth()+e),function(t,e){return t.getMonth()!==e?u(l(t,-1)):t}(o(n,t.getHours()),r)},c=function(t,e){var n=t.getMonth(),r=s(e,n,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return r.getMonth()===n?r:u(l(r,-1))},h=function(t,e){return o(c(t,t.getFullYear()+e),t.getHours())},d=function(t,e){return h(t,100*e)},f=function(t,e){return h(t,10*e)},p=function(t,e){return a(t,7*e)},m=6e4,g=36e5,v=864e5;!function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"}(r||(r={}));var y,D=function(t,e,n){void 0===n&&(n=r.Forward);var a=i(t),s=(e-a.getDay()+7*n)%7;return a.setDate(a.getDate()+s),o(a,t.getHours())};!function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(y||(y={}));var b=function(t,e){return c(t,e(t.getFullYear()))},E=function(t){return b(t,(function(t){return t-t%100}))},M=function(t,e){return(E(e).getFullYear()-E(t).getFullYear())/100},S=function(t){return b(t,(function(t){return t-t%10}))},w=function(t,e){return(S(e).getFullYear()-S(t).getFullYear())/10},P=function(t,e){return 12*(e.getFullYear()-t.getFullYear())+(e.getMonth()-t.getMonth())},C=function(t,e){return e.getFullYear()-t.getFullYear()},T=function(t,e){void 0===e&&(e=y.Sunday);for(var n=i(t);n.getDay()!==e;)n.setDate(n.getDate()-1);return n},O=function(t){return s(t.getFullYear(),t.getMonth(),1,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())},_=function(t,e){var n=t.getDate(),r=s(t.getFullYear(),e,n,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return r.getDate()===n?r:u(l(r,-1))},x=function(t){return _(t,0)},I=function(t){return s(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0)},F=function(t,e){return!t&&!e||t&&e&&t.getTime()===e.getTime()},k=function(t,e){return!t&&!e||t&&e&&F(I(t),I(e))},j=function(t){return b(t,(function(t){return t-t%100+90}))},U=function(t){return _(t,11)},V=function(t){return b(t,(function(t){return t-t%10+9}))},N=function(t,e){return D(t,e,r.Forward)},A=function(t,e){return D(t,e,r.Backward)},L={rules:{},titles:{},zones:{}},H={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Y={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},K=function(t,e,n){var r,i=e[3],o=e[4],a=e[5],s="u"===a[3]?6e4*-n:0;if(isNaN(o)){if(0===o.indexOf("last")){r=new Date(Date.UTC(t,H[i]+1,1,a[0]-24,a[1],a[2])+s);var u=Y[o.substr(4,3)],l=r.getUTCDay();r.setUTCDate(r.getUTCDate()+u-l-(u>l?7:0))}else if(o.indexOf(">=")>=0){r=new Date(Date.UTC(t,H[i],o.substr(5),a[0],a[1],a[2],0)+s);u=Y[o.substr(0,3)],l=r.getUTCDay();r.setUTCDate(r.getUTCDate()+u-l+(u<l?7:0))}}else r=new Date(Date.UTC(t,H[i],o,a[0],a[1],a[2])+s);return r},W=(new Date).getTime(),R=function(t,e,n){void 0===e&&(e=W),void 0===n&&(n=0);var r=L.rules[t];if(!r){var i=t.split(":"),o=0;return i.length>1&&(o=60*i[0]+Number(i[1])),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"]}var a=new Date(e).getUTCFullYear();(r=r.filter((function(t){var e=t[0],n=t[1];return e<=a&&(n>=a||e===a&&"only"===n||"max"===n)}))).push(e),r.sort((function(t,e){return"number"!=typeof t&&(t=Number(K(a,t,n))),"number"!=typeof e&&(e=Number(K(a,e,n))),t-e}));var s=r[r.indexOf(e)-1]||r[r.length-1];return isNaN(s)?s:null},z="The required {0} timezone information is not provided!",B=/\{(\d+)}?\}/g,Z=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},G=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Z(e);return t.replace(B,(function(t,e){return r[parseInt(e,10)]}))},J=function(t,e){if(void 0===e&&(e=(new Date).getTime()),"Etc/UTC"===t||"Etc/GMT"===t)return[0,"-","UTC",null];for(var n=function(t){var e=L.zones;if(!e)throw new Error(G(z,t));var n=e[t],r="string"==typeof n?e[n]:n;if(!r)throw new Error(G(z,t));return r}(t),r=n.length-1;r>=0;r--){var i=n[r][3];if(i&&e>i)break}var o=n[r+1];if(!o)throw new Error(G(z,t));return o},q=function(t,e){var n=e.getTime(),r=J(t,n);return{rule:R(r[1],n,r[0]),zone:r}},Q=function(t,e){if(void 0===e&&(e=new Date),"Etc/UTC"===t)return"UTC";if("Etc/GMT"===t)return"GMT";if(""===t)return"";var n=q(t,e),r=n.zone,i=n.rule,o=r[2];return o.indexOf("/")>=0?o.split("/")[i&&+i[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",i&&"-"!==i[7]?i[7]:""):o},X=function(t){if(!t)throw new Error(G(z,""));var e=t.rules,n=t.titles,r=t.zones;if(void 0===e||void 0===r)throw new Error("The provided timezone information has invalid stucture!");Object.assign(L.rules,e),Object.assign(L.titles,n||{}),Object.assign(L.zones,r)},$=function(t,e){if(void 0===e&&(e=new Date),"Etc/UTC"===t||"Etc/GMT"===t)return 0;if(""===t)return e.getTimezoneOffset();var n=q(t,e),r=n.rule,i=n.zone;return parseFloat(r?i[0]-r[6]:i[0])},tt=function(){var t=Object.keys(L.titles).reduce((function(t,e){var n=L.titles[e].group;return t[n]=n,t}),{});return Object.keys(t)},et=function(){return Object.keys(L.zones)},nt=function(t){return(L.titles[t]||{}).long||t};function rt(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())}var it=function(t,e){return new Date(t.getTime()+e*m)},ot=function(t,e){return new Date(t.getTime()+e*g)},at=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],st=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dev"],ut=function(t,e){return void 0===e&&(e=2),(t<0?"-":"")+new Array(e).concat([Math.abs(t)]).join("0").slice(-e)};function lt(t,e){var n=$(e,t),r=ot(t,-1);return n<$(e,r)}function ct(t,e){var n=lt(t,e)?1:0;return ot(t,n)}function ht(t,e,n){if(e===n)return t;var r=$(e,t),i=$(n,t),o=r-i,a=it(t,o),s=$(n,a);return it(t,o+(i-s))}var dt=function(){function t(t,e){this._utcDate=i(t),this.timezone=e;var n=$(e,t);this.timezoneOffset=n;var r=ct(t,e);this._localDate=ht(r,e,"Etc/UTC")}return Object.defineProperty(t.prototype,"cachedLocalDate",{get:function(){return this._localDate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cachedUTCDate",{get:function(){return this._utcDate},enumerable:!0,configurable:!0}),t.fromLocalDate=function(e,n){void 0===n&&(n="");var r=ht(e,"Etc/UTC",n),i=lt(r,n),o=$(n,r),a=0;i&&(a=o>0?-1:1);var s=ot(r,a);return t.fromUTCDate(s,n)},t.fromUTCDate=function(e,n){return void 0===n&&(n=""),new t(e,n)},t.prototype.toLocalDate=function(){return i(this._localDate)},t.prototype.toUTCDate=function(){return i(this._utcDate)},t.prototype.toTimezone=function(e){if(this.timezone===e)return this.clone();var n=$(this.timezone,this._utcDate),r=it(this._utcDate,n);return t.fromLocalDate(r,e)},t.prototype.clone=function(){return t.fromUTCDate(this._utcDate,this.timezone)},t.prototype.addDays=function(e){var n=new Date(this._utcDate.getTime());return n.setUTCDate(n.getUTCDate()+e),t.fromUTCDate(n,this.timezone)},t.prototype.addTime=function(e){var n=ct(new Date(this._utcDate.getTime()),this.timezone);n.setTime(n.getTime()+e);var r=ct(n,this.timezone);return t.fromUTCDate(r,this.timezone)},t.prototype.stripTime=function(){var e=this._utcDate,n=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0);return t.fromUTCDate(new Date(n),this.timezone)},t.prototype.getTime=function(){return this._localDate.getTime()},t.prototype.getTimezoneOffset=function(){return this.timezoneOffset},t.prototype.getFullYear=function(){return this._utcDate.getUTCFullYear()},t.prototype.getMonth=function(){return this._utcDate.getUTCMonth()},t.prototype.getDate=function(){return this._utcDate.getUTCDate()},t.prototype.getDay=function(){return this._utcDate.getUTCDay()},t.prototype.getHours=function(){return this._utcDate.getUTCHours()},t.prototype.getMinutes=function(){return this._utcDate.getUTCMinutes()},t.prototype.getSeconds=function(){return this._utcDate.getUTCSeconds()},t.prototype.getMilliseconds=function(){return this._utcDate.getUTCMilliseconds()},t.prototype.getUTCDate=function(){return this._localDate.getUTCDate()},t.prototype.getUTCDay=function(){return this._localDate.getUTCDay()},t.prototype.getUTCFullYear=function(){return this._localDate.getUTCFullYear()},t.prototype.getUTCHours=function(){return this._localDate.getUTCHours()},t.prototype.getUTCMilliseconds=function(){return this._localDate.getUTCMilliseconds()},t.prototype.getUTCMinutes=function(){return this._localDate.getUTCMinutes()},t.prototype.getUTCMonth=function(){return this._localDate.getUTCMonth()},t.prototype.getUTCSeconds=function(){return this._localDate.getUTCSeconds()},t.prototype.setTime=function(t){throw new Error("Method not implemented.")},t.prototype.setMilliseconds=function(t){throw new Error("Method not implemented.")},t.prototype.setUTCMilliseconds=function(t){throw new Error("Method not implemented.")},t.prototype.setSeconds=function(t,e){throw new Error("Method not implemented.")},t.prototype.setUTCSeconds=function(t,e){throw new Error("Method not implemented.")},t.prototype.setMinutes=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.setUTCMinutes=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.setHours=function(t,e,n,r){throw new Error("Method not implemented.")},t.prototype.setUTCHours=function(t,e,n,r){throw new Error("Method not implemented.")},t.prototype.setDate=function(t){throw new Error("Method not implemented.")},t.prototype.setUTCDate=function(t){throw new Error("Method not implemented.")},t.prototype.setMonth=function(t,e){throw new Error("Method not implemented.")},t.prototype.setUTCMonth=function(t,e){throw new Error("Method not implemented.")},t.prototype.setFullYear=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.setUTCFullYear=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.toISOString=function(){return this._localDate.toISOString()},t.prototype.toJSON=function(){return this._localDate.toJSON()},t.prototype.toString=function(){var t,e=(t=this._utcDate,at[t.getUTCDay()]+" "+st[t.getUTCMonth()]),n=this.toTimeString();return e+" "+this.getDate()+" "+this.getFullYear()+" "+n},t.prototype.toDateString=function(){return rt(this._utcDate).toDateString()},t.prototype.toTimeString=function(){var t=ut(this.getHours())+":"+ut(this.getMinutes())+":"+ut(this.getSeconds()),e=function(t){var e=t<=0?"+":"-",n=Math.abs(t);return"GMT"+e+ut(Math.floor(n/60))+ut(n%60)}(this.timezoneOffset),n=Q(this.timezone,this._utcDate);return n&&(n=" ("+n+")"),t+" "+e+n},t.prototype.toLocaleString=function(t,e){return this._localDate.toLocaleString(t,e)},t.prototype.toLocaleDateString=function(t,e){return this._localDate.toLocaleDateString(t,e)},t.prototype.toLocaleTimeString=function(t,e){return this._localDate.toLocaleTimeString(t,e)},t.prototype.toUTCString=function(){return this.toTimezone("Etc/UTC").toString()},t.prototype[Symbol.toPrimitive]=function(t){return"string"===t||"default"===t?this.toString():this._localDate.getTime()},t.prototype.valueOf=function(){return this.getTime()},t.prototype.getVarDate=function(){throw new Error("Not implemented.")},t.prototype.format=function(t){throw new Error("Not implemented.")},t.prototype.formatUTC=function(t){throw new Error("Not implemented.")},t}(),ft=function(t){var e=L.titles;return Object.keys(e).reduce((function(n,r){return(e[r]||{}).group===t?n.concat(r.split(" ")):n}),[])},pt=function(t,e){var n=s(t.getFullYear(),0,1,-6),r=function(t,e){return e!==y.Monday?a(A(t,e),4):a(t,4-(t.getDay()||7))}(t,e).getTime()-n.getTime(),i=Math.floor(r/v);return 1+Math.floor(i/7)},mt=function(t,e){void 0===e&&(e=y.Monday),t=I(t);var n=a(t,-7),r=a(t,7),i=pt(t,e);return 0===i?pt(n,e)+1:53===i&&pt(r,e)>1?1:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(4);e.padZero=function(t){return new Array(Math.max(t,0)).fill("0").join("")},e.unpadZero=function(t){return t.replace(/^0*/,"")},e.approximateStringMatching=function(t){var e=t.oldText,n=t.newText,o=t.formatPattern,a=t.selectionStart,s=t.isInCaretMode,u=t.keyEvent,l=e[a+e.length-n.length],c=e.substring(0,a+e.length-n.length),h=n.substring(0,a),d=[];if(c===h&&a>0)return d.push([o[a-1],h[a-1]]),d;if(0===c.indexOf(h)&&s&&(u.key===i.Key.DELETE||u.key===i.Key.BACKSPACE)||0===c.indexOf(h)&&!s&&(0===h.length||o[h.length-1]!==o[h.length])){var f="";s||1!==h.length||d.push([o[0],h[0]]);for(var p=h.length;p<c.length;p++)o[p]!==f&&o[p]!==r.Constants.formatSeparator&&(f=o[p],d.push([f,""]));return d}if(s&&(0===h.indexOf(c)||o[a-1]===r.Constants.formatSeparator)||!s&&(0===h.indexOf(c)||o[a-1]===r.Constants.formatSeparator)){var m=o[0];for(p=Math.max(0,c.length-1);p<o.length;p++)if(o[p]!==r.Constants.formatSeparator){m=o[p];break}return[[m,h[a-1]]]}return!s&&" "===h[h.length-1]||!s&&h[h.length-1]===l?[[o[a-1],r.Constants.formatSeparator]]:[[o[a-1],h[a-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,n){return null===t||!(e&&e>t||n&&n<t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Key={DELETE:"Delete",BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",SPACE:" ",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6);e.DateInput=r.DateInput},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(7),o=n(8),a=n(3),s=n(10),u=n(4),l=n(1),c=n(11),h=n(12),d=n(2),f=n(0),p={format:"d",allowNulls:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:(r={},r.valueChange=null,r.input=null,r.inputEnd=null,r.focus=null,r.focusEnd=null,r.blur=null,r.blurEnd=null,r.keydown=null,r.mousewheel=null,r.change=null,r),selectNearestSegmentOnFocus:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:f.Constants.twoDigitYearMax,autoCorrectParts:!0},m=function(t){function e(e,n){var r=t.call(this,n)||this;return r.dateObject=null,r.currentText="",r.currentFormat="",r.interactionMode=h.DateInputInteractionMode.None,r.previousElementSelection={start:0,end:0},r.init(e,n),r}return i.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),e.prototype.init=function(t,e){var n=l.isValidDate(this.options.value)?d.cloneDate(this.options.value):new Date(e.formattedValue);l.isValidDate(n)||(n=null),this.element=t,this.element._kendoWidget=this,this.options=l.extend({},p,e),this.intl=this.options.intlService,this.formatPlaceholder=this.options.formatPlaceholder?this.options.formatPlaceholder:"formatPattern",this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.forceUpdate()},e.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener("dragStart",this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener("drop",this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener("click",this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener("mousedown",this.onElementMouseDown),this.element.addEventListener("touchstart",this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener("mouseup",this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener("input",this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener("keydown",this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener("focus",this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener("blur",this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener("change",this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener("paste",this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.addEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.unbindEvents=function(){this.element.removeEventListener("dragStart",this.onElementDragStart),this.element.removeEventListener("drop",this.onElementDrop),this.element.removeEventListener("touchstart",this.onElementMouseDown),this.element.removeEventListener("mousedown",this.onElementMouseDown),this.element.removeEventListener("mouseup",this.onElementMouseUp),this.element.removeEventListener("click",this.onElementClick),this.element.removeEventListener("input",this.onElementInput),this.element.removeEventListener("keydown",this.onElementKeyDown),this.element.removeEventListener("focus",this.onElementFocus),this.element.removeEventListener("blur",this.onElementBlur),this.element.removeEventListener("change",this.onElementChange),this.element.removeEventListener("paste",this.onElementPaste),this.element.removeEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.removeEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=l.extend(this.options,t),e&&(this.destroy(),this.init(this.element,t))},e.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},e.prototype.isInCaretMode=function(){return this.interactionMode===h.DateInputInteractionMode.Caret},e.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},e.prototype.onElementDragStart=function(t){t.preventDefault()},e.prototype.onElementDrop=function(t){t.preventDefault()},e.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},e.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},e.prototype.onElementClick=function(t){this.mouseDownStarted=!1;var e=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),3===t.detail);else if(this.isActive&&this.options.selectNearestSegmentOnFocus){var n=this.element.selectionStart!==this.element.selectionEnd,r=l.isPresent(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,i=!n&&r?0:this.caret()[0];this.selectNearestSegment(i)}else this.setSelection(this.selectionByIndex(e.start))},e.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.keyDownEvent||{},n=e.keyCode===s.KeyCode.BACKSPACE||e.key===u.Key.BACKSPACE,r=e.keyCode===s.KeyCode.DELETE||e.key===u.Key.DELETE;if(this.element&&this.dateObject){if(this.isPasteInProgress)return this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),void(this.isPasteInProgress=!1);var i=this.interactionMode;!this.options.allowCaretMode||i===h.DateInputInteractionMode.Caret||r||n||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=h.DateInputInteractionMode.Caret:this.interactionMode=h.DateInputInteractionMode.Selection;var o=this.isInCaretMode();if(o&&this.keyDownEvent.key===u.Key.SPACE)this.restorePreviousInputEventState();else{var c=this.dateObject&&this.dateObject.getValue(),p=this.dateObject.getTextAndFormat(),m=p.text,g=p.format;this.currentFormat=g;var v="";v=o&&(n||r||i===h.DateInputInteractionMode.Caret)?this.previousElementValue:m;var y=this.elementValue,D=a.approximateStringMatching({oldText:v,newText:y,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:o,keyEvent:this.keyDownEvent});if(!o||D&&0!==D.length){if(o&&1===D.length){if(!D[0]||!D[0][0])return void this.restorePreviousInputEventState();if(o&&D[0]&&(D[0][0]===f.Constants.formatSeparator||D[0][1]===f.Constants.formatSeparator))return void this.restorePreviousInputEventState()}var b=1===D.length&&D[0][1]===f.Constants.formatSeparator,E=[],M=!1;if(!b)for(var S=0;S<D.length;S++){var w=this.dateObject.parsePart({symbol:D[S][0],currentChar:D[S][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:n||r,originalFormat:this.currentFormat});E.push(w),M=w.switchToNext}this.options.autoSwitchParts||(M=!1),this.resetSegmentValue=!1;var P,C=E[E.length-1],T=C&&!C.value,O=o&&(n||r)&&T,_=!!C&&C.resetPart,x=!d.isEqual(c,this.dateObject.value),I=this.selection;if((!o||O||_)&&(_&&(P=this.currentFormat[I.start]),this.forceUpdate()),D.length&&D[0][0]!==f.Constants.formatSeparator)if(!o||O||_)P?this.setSelection(this.selectionBySymbol(P)):(this.options.autoSwitchParts||D[0][1]!==f.Constants.formatSeparator)&&this.setSelection(this.selectionBySymbol(D[0][0]));else if(o)if(this.options.format.length!==this.currentFormat.length){if(x&&l.isPresent(this.dateObject.value)){var F=this.elementValue.length;this.forceUpdate();var k=this.elementValue.length-F;this.setSelection({start:I.start+k,end:I.start+k})}}else x?T&&this.restorePreviousInputEventState():this.restorePreviousInputEventState();M||!o||n||r||_||!T?this.options.autoSwitchParts&&(M||b)&&(o||this.switchDateSegment(1)):x?this.currentFormat.length===this.elementValue.length||o&&i!==h.DateInputInteractionMode.Caret&&x||(o&&i!==h.DateInputInteractionMode.Caret?(P=this.currentFormat[I.start],this.forceUpdate(),this.setSelection(this.selectionBySymbol(P))):this.restorePreviousInputEventState()):this.restorePreviousInputEventState(),this.tryTriggerValueChange({oldValue:c,event:t}),this.triggerInputEnd({event:t}),o&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}},e.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=h.DateInputInteractionMode.None,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},e.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.interactionMode=h.DateInputInteractionMode.None,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},e.prototype.onElementChange=function(t){this.triggerChange({event:t})},e.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){this.keyDownEvent=t,this.previousElementValue=this.element.value;var e=this.selection,n=e.start,r=e.end;this.previousElementSelection={start:n,end:r};var i=(this.options.autoSwitchKeys||[]).map((function(t){return t.toString().toLowerCase().trim()}));if(i.indexOf(t.keyCode.toString())>=0||i.indexOf(t.keyCode)>=0||i.indexOf(t.key.toLowerCase().trim())>=0){var o=i.indexOf(u.Key.TAB.toLowerCase().trim())>=0||i.indexOf(s.KeyCode.TAB)>=0||i.indexOf(s.KeyCode.TAB.toString())>=0;if(!o)return t.preventDefault(),void this.switchDateSegment(1);var a=this.selection,l=a.start,c=a.end;if(t.shiftKey&&o?this.switchDateSegment(-1):this.switchDateSegment(1),l!==this.selection.start||c!==this.selection.end)return void t.preventDefault()}var h=this.currentFormat[this.selection.start],d=this.getStepFromSymbol(h),f=!1;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===s.KeyCode.TAB)){switch(t.keyCode){case s.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),f=!0;break;case s.KeyCode.ARROW_UP:this.modifyDateSegmentValue(d,h,event),f=!0;break;case s.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),f=!0;break;case s.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-d,h,event),f=!0;break;case s.KeyCode.ENTER:break;case s.KeyCode.DELETE:case s.KeyCode.BACKSPACE:if(this.options.allowNulls){var p=this.dateObject.value;this.dateObject.setValue(null),this.forceUpdate(),this.tryTriggerValueChange({oldValue:p,event:t})}return f=!0,void(t.keyCode===s.KeyCode.BACKSPACE&&((this.options.autoSwitchKeys||[]).indexOf(s.KeyCode.BACKSPACE)>=0||(this.options.autoSwitchKeys||[]).indexOf(u.Key.BACKSPACE)>=0)&&this.switchDateSegment(-1));case u.Key.HOME:this.selectNearestSegment(0);break;case u.Key.END:this.selectNearestSegment(this.elementValue.length);break;default:return}f&&t.preventDefault()}}},e.prototype.onElementPaste=function(){this.isPasteInProgress=!0},e.prototype.onElementMouseWheel=function(t){if(this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive){var e=t;e.shiftKey?this.switchDateSegment((e.wheelDelta||-e.detail)>0?-1:1):this.modifyDateSegmentValue((e.wheelDelta||-e.detail)>0?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},e.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;l.isPresent(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e));var n=this.dateObject&&this.dateObject.getValue();this.writeValue(e),this.tryTriggerValueChange({oldValue:n,event:t})},Object.defineProperty(e.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:f.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:f.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t={start:0,end:0};return null!==this.element&&void 0!==this.element.selectionStart&&(t={start:this.element.selectionStart,end:this.element.selectionEnd}),t},enumerable:!0,configurable:!0}),e.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&this.element.setSelectionRange(t.start,t.end)},e.prototype.selectionBySymbol=function(t){for(var e=-1,n=0,r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===t&&(n=r+1,-1===e&&(e=r));return e<0&&(e=0),{start:e,end:n}},e.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},n=t,r=t-1;n<this.currentFormat.length||r>=0;n++,r--){if(n<this.currentFormat.length&&this.currentFormat[n]!==f.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}if(r>=0&&this.currentFormat[r]!==f.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[r]);break}}return e},e.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){for(var n=e.start,r=(this.currentFormat[n],n);r>=0;r--)if(this.currentFormat[r]!==f.Constants.formatSeparator){n=r;break}var i=void 0;for(r=n;r<this.currentFormat.length&&(i=this.currentFormat[r])===f.Constants.formatSeparator;r++);i&&(this.forceUpdate(),this.setSelection(this.selectionBySymbol(i)))}var o=this.selection,a=o.start,s=o.end;if(a<s&&this.currentFormat[a]!==this.currentFormat[s-1])return this.setSelection(this.selectionByIndex(t>0?a:s-1)),void(this.resetSegmentValue=!0);for(var u=this.currentFormat[a],l=a+t;l>0&&l<this.currentFormat.length&&(this.currentFormat[l]===u||this.currentFormat[l]===f.Constants.formatSeparator);)l+=t;if(this.currentFormat[l]!==f.Constants.formatSeparator){for(var c=l;c>=0&&c<this.currentFormat.length&&this.currentFormat[c]===this.currentFormat[l];)c+=t;l>c&&(c+1!==a||l+1!==s)?(this.setSelection({start:c+1,end:l+1}),this.resetSegmentValue=!0):l<c&&(l!==a||c!==s)&&(this.setSelection({start:l,end:c}),this.resetSegmentValue=!0)}},e.prototype.modifyDateSegmentValue=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n={}),this.dateObject){var r=this.value,i=1*t,o=this.caret();if("S"===(e=e||this.currentFormat[o[0]])&&!this.options.steps.millisecond){var a=l.millisecondDigitsInFormat(this.inputFormat);i=l.millisecondStepFor(a)}this.dateObject.modifyPart(e,i),this.tryTriggerValueChange({oldValue:r,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e))}},e.prototype.tryTriggerValueChange=function(t){if(void 0===t&&(t={oldValue:null,event:{}}),!d.isEqual(this.value,t.oldValue))return this.triggerValueChange(t)},e.prototype.triggerValueChange=function(t){return void 0===t&&(t={oldValue:null,event:{}}),this.trigger("valueChange",l.extend(t,{value:this.value}))},e.prototype.triggerInput=function(t){return void 0===t&&(t={event:{}}),this.trigger("input",l.extend(t,{value:this.value}))},e.prototype.triggerInputEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("inputEnd",l.extend(t,{value:this.value}))},e.prototype.triggerFocus=function(t){return void 0===t&&(t={event:{}}),this.trigger("focus",l.extend({},t))},e.prototype.triggerFocusEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("focusEnd",l.extend({},t))},e.prototype.triggerBlur=function(t){return void 0===t&&(t={event:{}}),this.trigger("blur",l.extend({},t))},e.prototype.triggerBlurEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("blurEnd",l.extend({},t))},e.prototype.triggerChange=function(t){return void 0===t&&(t={event:{}}),this.trigger("change",l.extend(t,{value:this.value}))},e.prototype.triggerKeyDown=function(t){return void 0===t&&(t={event:{}}),this.trigger("keydown",l.extend({},t))},e.prototype.triggerMouseWheel=function(t){return void 0===t&&(t={event:{}}),this.trigger("mousewheel",l.extend({},t))},e.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},e.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text,n=t.format;this.currentFormat=n,this.currentText=e},e.prototype.setElementValue=function(t){this.element.value=t},e.prototype.getStepFromSymbol=function(t){switch(t){case"S":return Number(this.options.steps.millisecond);case"s":return Number(this.options.steps.second);case"m":return Number(this.options.steps.minute);case"h":case"H":return Number(this.options.steps.hour);case"M":return Number(this.options.steps.month);case"d":case"E":return Number(this.options.steps.day);case"y":return Number(this.options.steps.year);default:return 1}},e.prototype.restorePreviousInputEventState=function(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()},e.prototype.restorePreviousElementValue=function(){this.setElementValue(this.previousElementValue||"")},e.prototype.restorePreviousElementSelection=function(){var t=this.previousElementSelection,e=t.start,n=t.end;this.setSelection({start:e||0,end:n||0})},e.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},e.prototype.verifyValue=function(t){if(t&&!l.isValidDate(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},e.prototype.refreshElementValue=function(){var t=this.caret()[0],e=this.element,n=this.isActive?this.inputFormat:this.displayFormat,r=this.dateObject.getTextAndFormat(n),i=r.text,o=r.format;this.currentFormat=o,this.currentText=i;var a=!this.isActive&&l.isPresent(this.options.placeholder)&&!this.dateObject.hasValue();l.isPresent(this.options.placeholder)&&(e.placeholder=this.options.placeholder);var s=a?"":i;this.previousElementValue=this.elementValue,this.setElementValue(s),this.isActive&&!this.options.allowCaretMode&&this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(t)},e.prototype.caret=function(t,e){void 0===e&&(e=t);var n=void 0!==t,r=[t,t],i=this.element;if(!n||!this.options.disabled&&!this.options.readonly){try{void 0!==i.selectionStart&&(n&&(l.isDocumentAvailable()&&document.activeElement!==i&&i.focus(),i.setSelectionRange(t,e)),r=[i.selectionStart,i.selectionEnd])}catch(t){r=[]}return r}},e.prototype.selectNearestSegment=function(t){for(var e=t,n=t-1;e<this.currentFormat.length||n>=0;e++,n--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(n>=0&&"_"!==this.currentFormat[n])return void this.selectDateSegment(this.currentFormat[n])}},e.prototype.selectDateSegment=function(t){for(var e=-1,n=0,r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===t&&(n=r+1,-1===e&&(e=r));e<0&&(e=0),this.caret(0,0),this.caret(e,n)},e.prototype.getDateObject=function(t){var e=(this.dateObject||{}||null).leadingZero,n=this.createDateObject({value:t});return n.setLeadingZero(this.isActive?e:null),n},e.prototype.createDateObject=function(t){return void 0===t&&(t={}),new o.DateObject(l.extend({intlService:this.intl,formatPlaceholder:this.formatPlaceholder,format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value},t))},e}(c.Observable);e.DateInput=m},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return l})),n.d(e,"__awaiter",(function(){return c})),n.d(e,"__generator",(function(){return h})),n.d(e,"__createBinding",(function(){return d})),n.d(e,"__exportStar",(function(){return f})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return m})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return v})),n.d(e,"__spreadArray",(function(){return y})),n.d(e,"__await",(function(){return D})),n.d(e,"__asyncGenerator",(function(){return b})),n.d(e,"__asyncDelegator",(function(){return E})),n.d(e,"__asyncValues",(function(){return M})),n.d(e,"__makeTemplateObject",(function(){return S})),n.d(e,"__importStar",(function(){return P})),n.d(e,"__importDefault",(function(){return C})),n.d(e,"__classPrivateFieldGet",(function(){return T})),n.d(e,"__classPrivateFieldSet",(function(){return O})),n.d(e,"__classPrivateFieldIn",(function(){return _}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var d=Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]};function f(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||d(e,t,n)}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function y(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function D(t){return this instanceof D?(this.v=t,this):new D(t)}function b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof D?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(t){c(o[0][3],t)}var n}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function E(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:D(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function M(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var w=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function P(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&d(e,t,n);return w(e,t),e}function C(t){return t&&t.__esModule?t:{default:t}}function T(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function O(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function _(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(9),o=n(3),a=n(1),s=n(0),u=/d|M|H|h|m|s/,l=function(){function t(t){var e=t.intlService,n=t.formatPlaceholder,i=t.format,o=t.cycleTime,a=void 0!==o&&o,u=t.twoDigitYearMax,l=void 0===u?s.Constants.twoDigitYearMax:u,c=t.value,h=void 0===c?null:c,d=t.autoCorrectParts,f=void 0===d||d;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEyS",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y",S:"S"},this._value=r.getDate(new Date),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.intl=e,this.formatPlaceholder=n||"wide",this.format=i,this.cycleTime=a,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=l,this.autoCorrectParts=f,h)this._value=r.cloneDate(h);else{this._value=r.getDate(new Date);for(var p=this.dateFormatString(this.value,this.format).symbols,m=0;m<p.length;m++)this.setExisting(p[m],!1)}}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){(!t||t instanceof Date)&&(this._value=t,this.resetInvalidDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localeId",{get:function(){for(var t=s.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),n=0;n<e.length;n++){var r=e[n],i=this.intl.cldr[r];if(i.name&&i.calendar&&i.numbers&&i.name!==s.Constants.defaultLocaleId){t=i.name;break}}return t},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){t?r.isEqual(t,this._value)||(this._value=r.cloneDate(t),this.modifyExisting(!0)):(this._value=r.getDate(new Date),this.modifyExisting(!1)),this.resetInvalidDate()},t.prototype.hasValue=function(){var t=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce((function(e,n){return e||"literal"!==n.type&&"dayperiod"!==n.type&&t.getExisting(n.pattern[0])}),!1)},t.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return r.cloneDate(this.value)},t.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},t.prototype.getTextAndFormat=function(t){void 0===t&&(t="");var e=t||this.format,n=this.intl.formatDate(this.value,e,this.localeId),r=this.dateFormatString(this.value,e);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var i="",s=this.intl.formatDate(this.value,e,this.localeId),u=this.getFormattedInvalidDates(e),l=0;l<s.length;l++){var c=r.symbols[l];if("literal"===r.partMap[l].type)i+=n[l];else if(this.getInvalidDatePartValue(c))if("M"===c)if(r.partMap[l].pattern.length>2)i+=u[c][l];else if(this.getInvalidDatePartValue(c)){var h=a.parseToInt(this.getInvalidDatePartValue(c)+1).toString(),d=o.padZero(Math.abs(r.partMap[l].pattern.length-h.length))+h;i+=d,l+=Math.max(0,d.length-1)}else i+=u[c][l];else this.getInvalidDatePartValue(c)?(i+=this.getInvalidDatePartValue(c),l+=Math.max(0,this.getInvalidDatePartValue(c).toString().length-1)):i+=u[c][l];else i+=n[l]}n=i}return this.merge(n,r)},t.prototype.getFormattedInvalidDates=function(t){var e=this;void 0===t&&(t="");var n=t||this.format,r={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){var i=e.getInvalidDatePart(t).date;if(i){var o=e.intl.formatDate(i,n,e.localeId);r[t]=o}})),r},t.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,n=0;n<e.length;n++)this.setExisting(e[n],t)},t.prototype.getExisting=function(t){switch(t){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},t.prototype.setExisting=function(t,e){switch(t){case"y":this.year=e,!1===e&&this._value.setFullYear(2e3);break;case"M":this.month=e,!1===e&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},t.prototype.modifyPart=function(t,e){var n,i=r.cloneDate(this.value),o=r.cloneDate(this.value),s=!1,u=0;if(this.autoCorrectParts)switch(t){case"y":i.setFullYear(i.getFullYear()+e);break;case"M":i=r.addMonths(this.value,e);break;case"d":case"E":i.setDate(i.getDate()+e);break;case"h":case"H":i.setHours(i.getHours()+e),s=!0;break;case"m":i.setMinutes(i.getMinutes()+e),s=!0;break;case"s":i.setSeconds(i.getSeconds()+e),s=!0;break;case"S":i.setMilliseconds(i.getMilliseconds()+e);break;case"a":i.setHours(i.getHours()+12*e),s=!0}else{var l="M"===t,c="d"===t||"E"===t,h=this._partiallyInvalidDate.invalidDateParts||{},d=h[t],f=h.y.value||i.getFullYear(),p=h.M.value||i.getMonth(),m=h.d.value||h.E.value||i.getDate(),g=h.h.value||h.H.value||i.getHours(),v=h.m.value||i.getMinutes(),y=h.s.value||i.getSeconds(),D=h.S.value||i.getMilliseconds();switch(t){case"y":f+=e;break;case"M":p+=e;break;case"d":case"E":m+=e;break;case"h":case"H":g+=e;break;case"m":v+=e;break;case"s":y+=e;break;case"S":D+=e}if("M"===t){if((p<0||p>11)&&this.getExisting(t))return void this.setExisting(t,!1);p=(12+p)%12}var b=r.createDate(f,p,m,g,v,y,D),E=l||c?this.modifyDateSymbolWithValue(i,t,l?p:m):null,M=a.areDatePartsEqualTo(b,f,p,m,g,v,y,D);if(this.getValue()&&a.areDatePartsEqualTo(b,f,p,m,g,v,y,D))i=r.cloneDate(b),this.markDatePartsAsExisting();else if(l&&E)E.getMonth()===p?this.getExisting("d")?M?(i=r.cloneDate(b),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:p,date:r.cloneDate(E),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)):M?(this.resetInvalidDateSymbol(t),i=r.cloneDate(b),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),i=r.cloneDate(E)):(n=!0,this.setInvalidDatePart(t,{value:p,date:r.cloneDate(E),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1));else if(c&&E)E.getDate()===m?this.getExisting("M")?M?(i=r.cloneDate(b),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:m,date:r.cloneDate(E),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)):M?(i=r.cloneDate(b),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),i=r.cloneDate(E)):(n=!0,this.setInvalidDatePart(t,{value:m,date:r.cloneDate(this.value),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1));else{switch(t){case"y":i.setFullYear(i.getFullYear()+e);break;case"M":i=r.addMonths(this.value,e);break;case"d":case"E":i.setDate(i.getDate()+e);break;case"h":case"H":i.setHours(i.getHours()+e),s=!0;break;case"m":i.setMinutes(i.getMinutes()+e),s=!0;break;case"s":i.setSeconds(i.getSeconds()+e),s=!0;break;case"S":i.setMilliseconds(i.getMilliseconds()+e);break;case"a":i.setHours(i.getHours()+12*e),s=!0}if(n=!0,d&&d.value)u=a.parseToInt(d.value);else if(!a.isPresent(d.value))switch(i=r.cloneDate(o),t){case"y":u=o.getFullYear();break;case"M":u=o.getMonth();break;case"d":case"E":u=o.getDate();break;case"h":case"H":u=o.getHours();break;case"m":u=o.getMinutes();break;case"s":u=o.getSeconds();break;case"S":u=o.getMilliseconds()}var S=Math.max(0,u+e);"y"!==t&&(S=a.clamp(u+e,0,99)),this.setInvalidDatePart(t,{value:S,date:r.cloneDate(i),startDateOffset:(this.getInvalidDatePart(t).startDateOffset||0)+e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)}}this.shouldNormalizeCentury()&&(i=this.normalizeCentury(i)),s&&!this.cycleTime&&(i.getDate(),this._value.getDate()),n||(this.setExisting(t,!0),this._value=i,this.getValue()&&this.resetInvalidDate())},t.prototype.parsePart=function(t){for(var e,n=t.symbol,i=t.currentChar,s=t.resetSegmentValue,u=t.cycleSegmentValue,l=t.rawTextValue,c=t.isDeleting,h=t.originalFormat,d=!u,f=this.dateFormatString(this.value,this.format),p=f.partMap.filter((function(t){return"literal"===t.type})).map((function(t,e){return{datePartIndex:e,type:t.type,pattern:t.pattern,literal:""}})),m=0;m<p.length;m++){for(var g=p[m],v=0;v<g.pattern.length;v++)p[m+v]&&(p[m+v].literal=g.pattern[v]);m+=g.pattern.length-1}var y={value:null,switchPart:!1,resetPart:d&&"M"===n&&f.partMap.filter((function(t){return"month"===t.type})).some((function(t){return t.pattern.length>2}))};if(!i){if(!d)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),{value:null,switchToNext:!1};for(m=0;m<p.length;m++){var D=p[m].literal,b=l.startsWith(D),E=l.endsWith(D),M=l.indexOf(D+D)>=0;if(b||E||M)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),a.extend(y,{value:null,switchToNext:!1})}}var S=this.intl.formatDate(this.value,this.format,this.localeId),w=f.symbols,P=!1,C="",T="",O="",_="",x="",I="",F=h.indexOf(n),k=h.lastIndexOf(n)-F+1,j=this.format===w||this.format===h||this.format.length===h.length;if(d){var U=0;for(m=0;m<S.length;m++){if(w[m]===n)T+=this.getExisting(n)?S[m]:"0",c?(U<k-1&&(O+=l[m]||""),U++):O+=l[m]||"",P=!0;else P?(I+=S[m],x+=S[m]):(C+=S[m],_+=S[m])}if(j){if(h.length<l.length&&(O+=i),O.length>k)return a.extend(y,{value:null,switchToNext:!1})}else{U=0,T="",O="",C="",I="",P=!1;for(m=0;m<h.length;m++){if(h[m]===n)T+=this.getExisting(n)?S[m]||"":"0",c?(U<k-1&&(O+=l[m]||""),U++):O+=l[m]||"",P=!0;else P?I+=l[m]||"":C+=l[m]||""}h.length<l.length&&(O+=i)}}else for(m=0;m<S.length;m++){if(w[m]===n)T+=this.getExisting(n)?S[m]:"0",P=!0;else P?I+=S[m]:C+=S[m]}var V=null,N=this.matchMonth(i),A=this.matchDayPeriod(i,n),L="0"===i,H=this.leadingZero||{};L&&!d?0!==parseInt(s?i:T+i,10)||this.isAbbrMonth(f.partMap,n)||this.incrementLeadingZero(n):this.resetLeadingZero();var Y=this.partPattern(f.partMap,n),K=Y?Y.pattern:null;if(d&&c&&!O)return this.setExisting(n,!1),a.extend(y,{value:null,switchToNext:!1});var W=T.length-3,R=!0;for(m=Math.max(0,W);m<=T.length&&R;m++){this.autoCorrectParts||(R=!1);var z=s?i:d?O:T.substring(m)+i;d&&(R=!1,z=o.unpadZero(z));var B=parseInt(z,10),Z=C+z+I;V=this.intl.parseDate(Z,this.format,this.localeId),!d||j||a.isValidDate(V)||(V=this.intl.parseDate(_+z+x,this.format,this.localeId));var G=!isNaN(parseInt(i,10))||d&&c&&""===i;if(!V&&!isNaN(B)&&G){if("M"===n&&!N){var J=B-1;J>-1&&J<12&&((V=r.cloneDate(this.value)).setMonth(J),V.getMonth()!==J&&(V=r.lastDayOfMonth(r.addMonths(V,-1))))}"y"===n&&(V=r.createDate(parseInt(z,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(d&&a.isValidDate(V)||!d&&V)&&this.date&&V.getDate()!==this.value.getDate()&&(V=r.lastDayOfMonth(r.addMonths(V,-1))))}if(d&&a.isValidDate(V)||!d&&V){var q=this.intl.parseDate(""+C+this.peek(z,K)+I,this.format,this.localeId),Q=this.patternLength(K)||K.length,X=((this.leadingZero||{})[n]||0)+(o.unpadZero(z)||i).length>=Q,$=null===q||H[n]&&K.length<=z.length||X;return this.shouldNormalizeCentury()&&(V=this.normalizeCentury(V)),this._value=V,this.setExisting(n,!0),a.extend(y,{value:this.value,switchToNext:$})}}if(N&&(V=this.intl.parseDate(C+N+I,this.format,this.localeId)))return this._value=V,this.setExisting(n,!0),a.extend(y,{value:this.value,switchToNext:!1});if(A&&(V=this.intl.parseDate(C+A+I,this.format)))return this._value=V,a.extend(y,{value:this.value,switchToNext:!0});if(L&&(this.leadingZero=this.isAbbrMonth(f.partMap,n)?null:((e={})[n]=!0,e),this.setExisting(n,!1)),d&&O.length>k)return a.extend(y,{value:null,switchToNext:!1});if(!this.autoCorrectParts){this.setExisting(n,!1);var tt=void 0,et=d?O:T,nt=a.parseToInt(et);if(a.isNumber(nt)&&(tt="M"===n?a.clamp(nt-1,0,11):nt),a.isNumber(tt)){var rt=this.modifyDateSymbolWithValue(this.value,n,tt);this.setExisting(n,!1),this.setInvalidDatePart(n,{value:tt,date:r.cloneDate(rt),startDate:this._partiallyInvalidDate.startDate||r.cloneDate(this.value)})}}return a.extend(y,{value:null,switchToNext:!1})},t.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(o.dateSymbolMap,{})[t]},t.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},t.prototype.setLeadingZero=function(t){this.leadingZero=t},t.prototype.normalizeCentury=function(t){if(!a.isPresent(t))return t;var e=a.cropTwoDigitYear(t),n=this.getNormalizedCenturyBase(e);return a.setYears(t,n+e)},t.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},t.prototype.isAbbrMonth=function(t,e){var n=this.partPattern(t,e);return"month"===n.type&&n.names},t.prototype.partPattern=function(t,e){return t.filter((function(t){return-1!==t.pattern.indexOf(e)}))[0]},t.prototype.peek=function(t,e){var n=t.replace(/^0*/,"")+"0";return o.padZero(e.length-n.length)+n},t.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var n=parseInt(this.typedMonthPart,10);if(n>=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},t.prototype.matchDayPeriod=function(t,e){var n=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return""},t.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),n=0;n<e.length;n++)if("month"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return[]},t.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),n=0;n<e.length;n++)if("dayperiod"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return null},t.prototype.patternLength=function(t){return"y"===t[0]?4:u.test(t)?2:0},t.prototype.dateFormatString=function(t,e){for(var n=this.intl.splitDateFormat(e,this.localeId),r=[],o=[],a=0;a<n.length;a++)for(var u=this.intl.formatDate(t,{pattern:n[a].pattern},this.localeId).length;u>0;)r.push(this.symbols[n[a].pattern[0]]||s.Constants.formatSeparator),o.push(n[a]),u--;var l=new i.Mask;return l.symbols=r.join(""),l.partMap=o,l},t.prototype.merge=function(t,e){for(var n,r="",i="",o=e.symbols,a=function(a){if(-1===s.knownParts.indexOf(o[a])||s.getExisting(o[a]))r=t[a]+r,i=o[a]+i;else{for(var u=o[a];a>=0&&u===o[a];)a--;if(a++,s.leadingZero&&s.leadingZero[u])r="0"+r;else if(!s.autoCorrectParts&&s.getInvalidDatePartValue(u)){var l=e.partMap[a],c=e.partMap.filter((function(t){return t.type===l.type&&t.pattern===l.pattern})),h=t.substr(a,c.length);r=h+r}else r=s.dateFieldName(e.partMap[a])+r;for(;i.length<r.length;)i=o[a]+i}n=a},s=this,u=o.length-1;u>=0;u--)a(u),u=n;return{text:r,format:i}},t.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]?e[t.type]:"formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e}))},t.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},t.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some((function(t){return"yy"===t.pattern}))},t.prototype.resetInvalidDate=function(){var t=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){t.resetInvalidDatePart(e)}))},t.prototype.resetInvalidDateSymbol=function(t){var e=this;this.resetInvalidDatePart(t);var n=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){e._partiallyInvalidDate.invalidDateParts[t]&&a.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(n=!1)})),n&&this.resetInvalidDate()},t.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},t.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},t.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},t.prototype.setInvalidDatePart=function(t,e){var n=e.value,r=void 0===n?null:n,i=e.date,o=void 0===i?null:i,a=e.startDateOffset,s=void 0===a?0:a,u=e.startDate,l=void 0===u?null:u;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=r,this._partiallyInvalidDate.invalidDateParts[t].date=o,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=s,this._partiallyInvalidDate.startDate=l)},t.prototype.modifyDateSymbolWithOffset=function(t,e,n){var i=r.cloneDate(t),o=!1;switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"M":i=r.addMonths(this.value,n);break;case"d":case"E":i.setDate(i.getDate()+n);break;case"h":case"H":i.setHours(i.getHours()+n),o=!0;break;case"m":i.setMinutes(i.getMinutes()+n),o=!0;break;case"s":i.setSeconds(i.getSeconds()+n),o=!0;break;case"S":i.setMilliseconds(i.getMilliseconds()+n);break;case"a":i.setHours(i.getHours()+12*n),o=!0}return{date:i,timeModified:o}},t.prototype.modifyDateSymbolWithValue=function(t,e,n){var i=r.cloneDate(t);switch(e){case"y":i.setFullYear(n);break;case"M":i=r.addMonths(t,n-t.getMonth());break;case"d":case"E":i.setDate(n);break;case"h":case"H":i.setHours(n);break;case"m":i.setMinutes(n);break;case"s":i.setSeconds(n);break;case"S":i.setMilliseconds(n);break;case"a":i.setHours(n)}return i},t.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},t}();e.DateObject=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){this.symbols="",this.partMap=[]};e.Mask=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i={events:{}},o=function(){function t(t){this.options=r.extend({},i,t)}return t.prototype.destroy=function(){},t.prototype.trigger=function(t,e){void 0===e&&(e={});var n={defaultPrevented:!1,preventDefault:function(){n.defaultPrevented=!0}};return!!r.isFunction(this.options.events[t])&&(this.options.events[t](r.extend(n,e,{sender:this})),n.defaultPrevented)},t}();e.Observable=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.None="none",t.Caret="caret",t.Selection="selection"}(e.DateInputInteractionMode||(e.DateInputInteractionMode={}))}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoDateinputsCommon=e():t.KendoDateinputsCommon=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(2),o=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},a=function(t){return t instanceof HTMLElement};e.isPresent=function(t){return null!=t},e.isDocumentAvailable=function(){return!!document},e.isNumber=function(t){return e.isPresent(t)&&"number"==typeof t&&!Number.isNaN(t)},e.parseToInt=function(t){return parseInt(t,10)},e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},e.deepExtend=function(t){for(var n,r,i=[],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(!i.length)return t;var u=i.shift();if(o(t)&&o(u))for(var l in u)a(u[l])?t[l]=u[l]:o(u[l])?(t[l]||e.extend(t,((n={})[l]={},n)),e.deepExtend(t[l],u[l])):e.extend(t,((r={})[l]=u[l],r));return e.deepExtend.apply(void 0,[t].concat(i))},e.noop=function(){},e.isFunction=function(t){return"function"==typeof t},e.cropTwoDigitYear=function(t){return!e.isPresent(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},e.setYears=(r="setFullYear",function(t,e){var n=i.cloneDate(t);return n[r](e),n}),e.millisecondDigitsInFormat=function(t){var e=t&&t.match(/S+(\1)/);return e?e[0].length:0},e.millisecondStepFor=function(t){return Math.pow(10,3-t)},e.areDatePartsEqualTo=function(t,e,n,r,i,o,a,s){return!(!t||t.getFullYear()!==e||t.getMonth()!==n||t.getDate()!==r||t.getHours()!==i||t.getMinutes()!==o||t.getSeconds()!==a||t.getMilliseconds()!==s)},e.isValidDate=function(t){return e.isPresent(t)&&t.getTime&&e.isNumber(t.getTime())}},function(t,e,n){"use strict";n.r(e),n.d(e,"addCenturies",(function(){return f})),n.d(e,"addDays",(function(){return a})),n.d(e,"addDecades",(function(){return d})),n.d(e,"addMonths",(function(){return l})),n.d(e,"addWeeks",(function(){return p})),n.d(e,"addYears",(function(){return c})),n.d(e,"adjustDST",(function(){return o})),n.d(e,"cloneDate",(function(){return i})),n.d(e,"MS_PER_MINUTE",(function(){return m})),n.d(e,"MS_PER_HOUR",(function(){return g})),n.d(e,"MS_PER_DAY",(function(){return v})),n.d(e,"createDate",(function(){return s})),n.d(e,"dayOfWeek",(function(){return D})),n.d(e,"Day",(function(){return y})),n.d(e,"Direction",(function(){return r})),n.d(e,"durationInCenturies",(function(){return M})),n.d(e,"durationInDecades",(function(){return w})),n.d(e,"durationInMonths",(function(){return P})),n.d(e,"durationInYears",(function(){return C})),n.d(e,"firstDayInWeek",(function(){return T})),n.d(e,"firstDayOfMonth",(function(){return O})),n.d(e,"firstDecadeOfCentury",(function(){return E})),n.d(e,"firstMonthOfYear",(function(){return I})),n.d(e,"firstYearOfDecade",(function(){return S})),n.d(e,"getDate",(function(){return x})),n.d(e,"isEqual",(function(){return F})),n.d(e,"isEqualDate",(function(){return j})),n.d(e,"lastDayOfMonth",(function(){return u})),n.d(e,"lastDecadeOfCentury",(function(){return k})),n.d(e,"lastMonthOfYear",(function(){return V})),n.d(e,"lastYearOfDecade",(function(){return U})),n.d(e,"nextDayOfWeek",(function(){return N})),n.d(e,"prevDayOfWeek",(function(){return A})),n.d(e,"abbrTimezone",(function(){return Q})),n.d(e,"loadTimezone",(function(){return X})),n.d(e,"offset",(function(){return $})),n.d(e,"timezoneGroupNames",(function(){return tt})),n.d(e,"timezoneNames",(function(){return et})),n.d(e,"timezoneTitle",(function(){return nt})),n.d(e,"toLocalDate",(function(){return rt})),n.d(e,"ZonedDate",(function(){return ft})),n.d(e,"zonesPerGroup",(function(){return dt})),n.d(e,"weekInYear",(function(){return mt}));var r,i=function(t){return t?new Date(t.getTime()):null},o=function(t,e){var n=i(t);return 0===e&&23===n.getHours()&&n.setHours(n.getHours()+2),n},a=function(t,e){var n=i(t);return n.setDate(n.getDate()+e),o(n,t.getHours())},s=function(t,e,n,r,i,a,s){void 0===r&&(r=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=0);var u=new Date(t,e,n,r,i,a,s);return t>-1&&t<100&&u.setFullYear(u.getFullYear()-1900),o(u,r)},u=function(t){var e=s(t.getFullYear(),t.getMonth()+1,1,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return a(e,-1)},l=function(t,e){var n=i(t),r=(12+(n.getMonth()+e)%12)%12;return n.setMonth(n.getMonth()+e),function(t,e){return t.getMonth()!==e?u(l(t,-1)):t}(o(n,t.getHours()),r)},h=function(t,e){var n=t.getMonth(),r=s(e,n,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return r.getMonth()===n?r:u(l(r,-1))},c=function(t,e){return o(h(t,t.getFullYear()+e),t.getHours())},f=function(t,e){return c(t,100*e)},d=function(t,e){return c(t,10*e)},p=function(t,e){return a(t,7*e)},m=6e4,g=36e5,v=864e5;!function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"}(r||(r={}));var y,D=function(t,e,n){void 0===n&&(n=r.Forward);var a=i(t),s=(e-a.getDay()+7*n)%7;return a.setDate(a.getDate()+s),o(a,t.getHours())};!function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(y||(y={}));var b=function(t,e){return h(t,e(t.getFullYear()))},E=function(t){return b(t,(function(t){return t-t%100}))},M=function(t,e){return(E(e).getFullYear()-E(t).getFullYear())/100},S=function(t){return b(t,(function(t){return t-t%10}))},w=function(t,e){return(S(e).getFullYear()-S(t).getFullYear())/10},P=function(t,e){return 12*(e.getFullYear()-t.getFullYear())+(e.getMonth()-t.getMonth())},C=function(t,e){return e.getFullYear()-t.getFullYear()},T=function(t,e){void 0===e&&(e=y.Sunday);for(var n=i(t);n.getDay()!==e;)n.setDate(n.getDate()-1);return n},O=function(t){return s(t.getFullYear(),t.getMonth(),1,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())},_=function(t,e){var n=t.getDate(),r=s(t.getFullYear(),e,n,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return r.getDate()===n?r:u(l(r,-1))},I=function(t){return _(t,0)},x=function(t){return s(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0)},F=function(t,e){return!t&&!e||t&&e&&t.getTime()===e.getTime()},j=function(t,e){return!t&&!e||t&&e&&F(x(t),x(e))},k=function(t){return b(t,(function(t){return t-t%100+90}))},V=function(t){return _(t,11)},U=function(t){return b(t,(function(t){return t-t%10+9}))},N=function(t,e){return D(t,e,r.Forward)},A=function(t,e){return D(t,e,r.Backward)},L={rules:{},titles:{},zones:{}},Y={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},H={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},K=function(t,e,n){var r,i=e[3],o=e[4],a=e[5],s="u"===a[3]?6e4*-n:0;if(isNaN(o)){if(0===o.indexOf("last")){r=new Date(Date.UTC(t,Y[i]+1,1,a[0]-24,a[1],a[2])+s);var u=H[o.substr(4,3)],l=r.getUTCDay();r.setUTCDate(r.getUTCDate()+u-l-(u>l?7:0))}else if(o.indexOf(">=")>=0){r=new Date(Date.UTC(t,Y[i],o.substr(5),a[0],a[1],a[2],0)+s);u=H[o.substr(0,3)],l=r.getUTCDay();r.setUTCDate(r.getUTCDate()+u-l+(u<l?7:0))}}else r=new Date(Date.UTC(t,Y[i],o,a[0],a[1],a[2])+s);return r},W=(new Date).getTime(),R=function(t,e,n){void 0===e&&(e=W),void 0===n&&(n=0);var r=L.rules[t];if(!r){var i=t.split(":"),o=0;return i.length>1&&(o=60*i[0]+Number(i[1])),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"]}var a=new Date(e).getUTCFullYear();(r=r.filter((function(t){var e=t[0],n=t[1];return e<=a&&(n>=a||e===a&&"only"===n||"max"===n)}))).push(e),r.sort((function(t,e){return"number"!=typeof t&&(t=Number(K(a,t,n))),"number"!=typeof e&&(e=Number(K(a,e,n))),t-e}));var s=r[r.indexOf(e)-1]||r[r.length-1];return isNaN(s)?s:null},z="The required {0} timezone information is not provided!",B=/\{(\d+)}?\}/g,Z=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},G=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Z(e);return t.replace(B,(function(t,e){return r[parseInt(e,10)]}))},J=function(t,e){if(void 0===e&&(e=(new Date).getTime()),"Etc/UTC"===t||"Etc/GMT"===t)return[0,"-","UTC",null];for(var n=function(t){var e=L.zones;if(!e)throw new Error(G(z,t));var n=e[t],r="string"==typeof n?e[n]:n;if(!r)throw new Error(G(z,t));return r}(t),r=n.length-1;r>=0;r--){var i=n[r][3];if(i&&e>i)break}var o=n[r+1];if(!o)throw new Error(G(z,t));return o},q=function(t,e){var n=e.getTime(),r=J(t,n);return{rule:R(r[1],n,r[0]),zone:r}},Q=function(t,e){if(void 0===e&&(e=new Date),"Etc/UTC"===t)return"UTC";if("Etc/GMT"===t)return"GMT";if(""===t)return"";var n=q(t,e),r=n.zone,i=n.rule,o=r[2];return o.indexOf("/")>=0?o.split("/")[i&&+i[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",i&&"-"!==i[7]?i[7]:""):o},X=function(t){if(!t)throw new Error(G(z,""));var e=t.rules,n=t.titles,r=t.zones;if(void 0===e||void 0===r)throw new Error("The provided timezone information has invalid stucture!");Object.assign(L.rules,e),Object.assign(L.titles,n||{}),Object.assign(L.zones,r)},$=function(t,e){if(void 0===e&&(e=new Date),"Etc/UTC"===t||"Etc/GMT"===t)return 0;if(""===t)return e.getTimezoneOffset();var n=q(t,e),r=n.rule,i=n.zone;return parseFloat(r?i[0]-r[6]:i[0])},tt=function(){var t=Object.keys(L.titles).reduce((function(t,e){var n=L.titles[e].group;return t[n]=n,t}),{});return Object.keys(t)},et=function(){return Object.keys(L.zones)},nt=function(t){return(L.titles[t]||{}).long||t};function rt(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())}var it=function(t,e){return new Date(t.getTime()+e*m)},ot=function(t,e){return new Date(t.getTime()+e*g)},at=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],st=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dev"],ut=function(t,e){return void 0===e&&(e=2),(t<0?"-":"")+new Array(e).concat([Math.abs(t)]).join("0").slice(-e)};function lt(t,e){var n=$(e,t),r=ot(t,-1);return n<$(e,r)}function ht(t,e){var n=lt(t,e)?1:0;return ot(t,n)}function ct(t,e,n){if(e===n)return t;var r=$(e,t),i=$(n,t),o=r-i,a=it(t,o),s=$(n,a);return it(t,o+(i-s))}var ft=function(){function t(t,e){this._utcDate=i(t),this.timezone=e;var n=$(e,t);this.timezoneOffset=n;var r=ht(t,e);this._localDate=ct(r,e,"Etc/UTC")}return Object.defineProperty(t.prototype,"cachedLocalDate",{get:function(){return this._localDate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cachedUTCDate",{get:function(){return this._utcDate},enumerable:!0,configurable:!0}),t.fromLocalDate=function(e,n){void 0===n&&(n="");var r=ct(e,"Etc/UTC",n),i=lt(r,n),o=$(n,r),a=0;i&&(a=o>0?-1:1);var s=ot(r,a);return t.fromUTCDate(s,n)},t.fromUTCDate=function(e,n){return void 0===n&&(n=""),new t(e,n)},t.prototype.toLocalDate=function(){return i(this._localDate)},t.prototype.toUTCDate=function(){return i(this._utcDate)},t.prototype.toTimezone=function(e){if(this.timezone===e)return this.clone();var n=$(this.timezone,this._utcDate),r=it(this._utcDate,n);return t.fromLocalDate(r,e)},t.prototype.clone=function(){return t.fromUTCDate(this._utcDate,this.timezone)},t.prototype.addDays=function(e){var n=new Date(this._utcDate.getTime());return n.setUTCDate(n.getUTCDate()+e),t.fromUTCDate(n,this.timezone)},t.prototype.addTime=function(e){var n=ht(new Date(this._utcDate.getTime()),this.timezone);n.setTime(n.getTime()+e);var r=ht(n,this.timezone);return t.fromUTCDate(r,this.timezone)},t.prototype.stripTime=function(){var e=this._utcDate,n=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0);return t.fromUTCDate(new Date(n),this.timezone)},t.prototype.getTime=function(){return this._localDate.getTime()},t.prototype.getTimezoneOffset=function(){return this.timezoneOffset},t.prototype.getFullYear=function(){return this._utcDate.getUTCFullYear()},t.prototype.getMonth=function(){return this._utcDate.getUTCMonth()},t.prototype.getDate=function(){return this._utcDate.getUTCDate()},t.prototype.getDay=function(){return this._utcDate.getUTCDay()},t.prototype.getHours=function(){return this._utcDate.getUTCHours()},t.prototype.getMinutes=function(){return this._utcDate.getUTCMinutes()},t.prototype.getSeconds=function(){return this._utcDate.getUTCSeconds()},t.prototype.getMilliseconds=function(){return this._utcDate.getUTCMilliseconds()},t.prototype.getUTCDate=function(){return this._localDate.getUTCDate()},t.prototype.getUTCDay=function(){return this._localDate.getUTCDay()},t.prototype.getUTCFullYear=function(){return this._localDate.getUTCFullYear()},t.prototype.getUTCHours=function(){return this._localDate.getUTCHours()},t.prototype.getUTCMilliseconds=function(){return this._localDate.getUTCMilliseconds()},t.prototype.getUTCMinutes=function(){return this._localDate.getUTCMinutes()},t.prototype.getUTCMonth=function(){return this._localDate.getUTCMonth()},t.prototype.getUTCSeconds=function(){return this._localDate.getUTCSeconds()},t.prototype.setTime=function(t){throw new Error("Method not implemented.")},t.prototype.setMilliseconds=function(t){throw new Error("Method not implemented.")},t.prototype.setUTCMilliseconds=function(t){throw new Error("Method not implemented.")},t.prototype.setSeconds=function(t,e){throw new Error("Method not implemented.")},t.prototype.setUTCSeconds=function(t,e){throw new Error("Method not implemented.")},t.prototype.setMinutes=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.setUTCMinutes=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.setHours=function(t,e,n,r){throw new Error("Method not implemented.")},t.prototype.setUTCHours=function(t,e,n,r){throw new Error("Method not implemented.")},t.prototype.setDate=function(t){throw new Error("Method not implemented.")},t.prototype.setUTCDate=function(t){throw new Error("Method not implemented.")},t.prototype.setMonth=function(t,e){throw new Error("Method not implemented.")},t.prototype.setUTCMonth=function(t,e){throw new Error("Method not implemented.")},t.prototype.setFullYear=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.setUTCFullYear=function(t,e,n){throw new Error("Method not implemented.")},t.prototype.toISOString=function(){return this._localDate.toISOString()},t.prototype.toJSON=function(){return this._localDate.toJSON()},t.prototype.toString=function(){var t,e=(t=this._utcDate,at[t.getUTCDay()]+" "+st[t.getUTCMonth()]),n=this.toTimeString();return e+" "+this.getDate()+" "+this.getFullYear()+" "+n},t.prototype.toDateString=function(){return rt(this._utcDate).toDateString()},t.prototype.toTimeString=function(){var t=ut(this.getHours())+":"+ut(this.getMinutes())+":"+ut(this.getSeconds()),e=function(t){var e=t<=0?"+":"-",n=Math.abs(t);return"GMT"+e+ut(Math.floor(n/60))+ut(n%60)}(this.timezoneOffset),n=Q(this.timezone,this._utcDate);return n&&(n=" ("+n+")"),t+" "+e+n},t.prototype.toLocaleString=function(t,e){return this._localDate.toLocaleString(t,e)},t.prototype.toLocaleDateString=function(t,e){return this._localDate.toLocaleDateString(t,e)},t.prototype.toLocaleTimeString=function(t,e){return this._localDate.toLocaleTimeString(t,e)},t.prototype.toUTCString=function(){return this.toTimezone("Etc/UTC").toString()},t.prototype[Symbol.toPrimitive]=function(t){return"string"===t||"default"===t?this.toString():this._localDate.getTime()},t.prototype.valueOf=function(){return this.getTime()},t.prototype.getVarDate=function(){throw new Error("Not implemented.")},t.prototype.format=function(t){throw new Error("Not implemented.")},t.prototype.formatUTC=function(t){throw new Error("Not implemented.")},t}(),dt=function(t){var e=L.titles;return Object.keys(e).reduce((function(n,r){return(e[r]||{}).group===t?n.concat(r.split(" ")):n}),[])},pt=function(t,e){var n=s(t.getFullYear(),0,1,-6),r=function(t,e){return e!==y.Monday?a(A(t,e),4):a(t,4-(t.getDay()||7))}(t,e).getTime()-n.getTime(),i=Math.floor(r/v);return 1+Math.floor(i/7)},mt=function(t,e){void 0===e&&(e=y.Monday),t=x(t);var n=a(t,-7),r=a(t,7),i=pt(t,e);return 0===i?pt(n,e)+1:53===i&&pt(r,e)>1?1:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(4);e.padZero=function(t){return new Array(Math.max(t,0)).fill("0").join("")},e.unpadZero=function(t){return t.replace(/^0*/,"")},e.approximateStringMatching=function(t){var e=t.oldText,n=t.newText,o=t.formatPattern,a=t.selectionStart,s=t.isInCaretMode,u=t.keyEvent,l=e[a+e.length-n.length],h=e.substring(0,a+e.length-n.length),c=n.substring(0,a),f=[];if(h===c&&a>0)return f.push([o[a-1],c[a-1]]),f;if(0===h.indexOf(c)&&s&&(u.key===i.Key.DELETE||u.key===i.Key.BACKSPACE)||0===h.indexOf(c)&&!s&&(0===c.length||o[c.length-1]!==o[c.length])){var d="";s||1!==c.length||f.push([o[0],c[0]]);for(var p=c.length;p<h.length;p++)o[p]!==d&&o[p]!==r.Constants.formatSeparator&&(d=o[p],f.push([d,""]));return f}if(s&&(0===c.indexOf(h)||o[a-1]===r.Constants.formatSeparator)||!s&&(0===c.indexOf(h)||o[a-1]===r.Constants.formatSeparator)){var m=o[0];for(p=Math.max(0,h.length-1);p<o.length;p++)if(o[p]!==r.Constants.formatSeparator){m=o[p];break}return[[m,c[a-1]]]}return!s&&" "===c[c.length-1]||!s&&c[c.length-1]===l?[[o[a-1],r.Constants.formatSeparator]]:[[o[a-1],c[a-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,n){return null===t||!(e&&e>t||n&&n<t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Key={DELETE:"Delete",BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",SPACE:" ",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6);e.DateInput=r.DateInput},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(7),o=n(8),a=n(3),s=n(10),u=n(4),l=n(1),h=n(11),c=n(12),f=n(2),d=n(0),p={format:"d",allowNulls:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:(r={},r.valueChange=null,r.input=null,r.inputEnd=null,r.focus=null,r.focusEnd=null,r.blur=null,r.blurEnd=null,r.keydown=null,r.mousewheel=null,r.change=null,r),selectNearestSegmentOnFocus:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:d.Constants.twoDigitYearMax,autoCorrectParts:!0},m=function(t){function e(e,n){var r=t.call(this,n)||this;return r.dateObject=null,r.currentText="",r.currentFormat="",r.interactionMode=c.DateInputInteractionMode.None,r.previousElementSelection={start:0,end:0},r.init(e,n),r}return i.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),e.prototype.init=function(t,e){var n=l.isValidDate(this.options.value)?f.cloneDate(this.options.value):new Date(e.formattedValue);l.isValidDate(n)||(n=null),this.element=t,this.options=l.extend({},p,e),this.intl=this.options.intlService,this.formatPlaceholder=this.options.formatPlaceholder?this.options.formatPlaceholder:"formatPattern",this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=c.DateInputInteractionMode.None,this.forceUpdate()},e.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener("dragStart",this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener("drop",this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener("click",this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener("mousedown",this.onElementMouseDown),this.element.addEventListener("touchstart",this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener("mouseup",this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener("input",this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener("keydown",this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener("focus",this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener("blur",this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener("change",this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener("paste",this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.addEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.unbindEvents=function(){this.element.removeEventListener("dragStart",this.onElementDragStart),this.element.removeEventListener("drop",this.onElementDrop),this.element.removeEventListener("touchstart",this.onElementMouseDown),this.element.removeEventListener("mousedown",this.onElementMouseDown),this.element.removeEventListener("mouseup",this.onElementMouseUp),this.element.removeEventListener("click",this.onElementClick),this.element.removeEventListener("input",this.onElementInput),this.element.removeEventListener("keydown",this.onElementKeyDown),this.element.removeEventListener("focus",this.onElementFocus),this.element.removeEventListener("blur",this.onElementBlur),this.element.removeEventListener("change",this.onElementChange),this.element.removeEventListener("paste",this.onElementPaste),this.element.removeEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.removeEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=l.extend(this.options,t),e&&(this.unbindEvents(),this.init(this.element,this.options))},e.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},e.prototype.isInCaretMode=function(){return this.interactionMode===c.DateInputInteractionMode.Caret},e.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},e.prototype.onElementDragStart=function(t){t.preventDefault()},e.prototype.onElementDrop=function(t){t.preventDefault()},e.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},e.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},e.prototype.onElementClick=function(t){this.mouseDownStarted=!1;var e=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),3===t.detail);else if(this.isActive&&this.options.selectNearestSegmentOnFocus){var n=this.element.selectionStart!==this.element.selectionEnd,r=l.isPresent(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,i=!n&&r?0:this.caret()[0];this.selectNearestSegment(i)}else this.setSelection(this.selectionByIndex(e.start))},e.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.keyDownEvent||{},n=e.keyCode===s.KeyCode.BACKSPACE||e.key===u.Key.BACKSPACE,r=e.keyCode===s.KeyCode.DELETE||e.key===u.Key.DELETE;if(this.element&&this.dateObject){if(this.isPasteInProgress)return this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),void(this.isPasteInProgress=!1);var i=this.interactionMode;!this.options.allowCaretMode||i===c.DateInputInteractionMode.Caret||r||n||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=c.DateInputInteractionMode.Caret:this.interactionMode=c.DateInputInteractionMode.Selection;var o=this.isInCaretMode();if(o&&this.keyDownEvent.key===u.Key.SPACE)this.restorePreviousInputEventState();else{var h=this.dateObject&&this.dateObject.getValue(),p=this.dateObject.getTextAndFormat(),m=p.text,g=p.format;this.currentFormat=g;var v="";v=o&&(n||r||i===c.DateInputInteractionMode.Caret)?this.previousElementValue:m;var y=this.elementValue,D=a.approximateStringMatching({oldText:v,newText:y,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:o,keyEvent:this.keyDownEvent});if(!o||D&&0!==D.length){if(o&&1===D.length){if(!D[0]||!D[0][0])return void this.restorePreviousInputEventState();if(o&&D[0]&&(D[0][0]===d.Constants.formatSeparator||D[0][1]===d.Constants.formatSeparator))return void this.restorePreviousInputEventState()}var b=1===D.length&&D[0][1]===d.Constants.formatSeparator,E=[],M=!1;if(!b)for(var S=0;S<D.length;S++){var w=this.dateObject.parsePart({symbol:D[S][0],currentChar:D[S][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:n||r,originalFormat:this.currentFormat});E.push(w),M=w.switchToNext}this.options.autoSwitchParts||(M=!1),this.resetSegmentValue=!1;var P,C=E[E.length-1],T=C&&!C.value,O=o&&(n||r)&&T,_=!!C&&C.resetPart,I=!f.isEqual(h,this.dateObject.value),x=this.selection;(!o||O||_)&&(_&&(P=this.currentFormat[x.start]),this.forceUpdate()),D.length&&D[0][0]!==d.Constants.formatSeparator&&(!o||O||_?P?this.setSelection(this.selectionBySymbol(P)):(this.options.autoSwitchParts||D[0][1]!==d.Constants.formatSeparator)&&this.setSelection(this.selectionBySymbol(D[0][0])):o&&(I&&l.isPresent(this.dateObject.getValue())?M&&this.switchDateSegment(1):T&&this.restorePreviousInputEventState())),M||!o||n||r||_||!T?this.options.autoSwitchParts&&(M||b)&&(o||this.switchDateSegment(1)):I?this.currentFormat.length===this.elementValue.length||o&&i!==c.DateInputInteractionMode.Caret&&I||(o&&i!==c.DateInputInteractionMode.Caret?(P=this.currentFormat[x.start],this.forceUpdate(),this.setSelection(this.selectionBySymbol(P))):this.restorePreviousInputEventState()):this.restorePreviousInputEventState(),this.tryTriggerValueChange({oldValue:h,event:t}),this.triggerInputEnd({event:t}),o&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}},e.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},e.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},e.prototype.onElementChange=function(t){this.triggerChange({event:t})},e.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){this.keyDownEvent=t,this.previousElementValue=this.element.value;var e=this.selection,n=e.start,r=e.end;this.previousElementSelection={start:n,end:r};var i=(this.options.autoSwitchKeys||[]).map((function(t){return t.toString().toLowerCase().trim()}));if(i.indexOf(t.keyCode.toString())>=0||i.indexOf(t.keyCode)>=0||i.indexOf(t.key.toLowerCase().trim())>=0){var o=i.indexOf(u.Key.TAB.toLowerCase().trim())>=0||i.indexOf(s.KeyCode.TAB)>=0||i.indexOf(s.KeyCode.TAB.toString())>=0;if(!o)return t.preventDefault(),void this.switchDateSegment(1);var a=this.selection,l=a.start,h=a.end;if(t.shiftKey&&o?this.switchDateSegment(-1):this.switchDateSegment(1),l!==this.selection.start||h!==this.selection.end)return void t.preventDefault()}var c=this.currentFormat[this.selection.start],f=this.getStepFromSymbol(c),d=!1;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===s.KeyCode.TAB)){switch(t.keyCode){case s.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),d=!0;break;case s.KeyCode.ARROW_UP:this.modifyDateSegmentValue(f,c,event),d=!0;break;case s.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),d=!0;break;case s.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-f,c,event),d=!0;break;case s.KeyCode.ENTER:break;case s.KeyCode.DELETE:case s.KeyCode.BACKSPACE:if(this.options.allowNulls){var p=this.dateObject.value;this.dateObject.setValue(null),this.forceUpdate(),this.tryTriggerValueChange({oldValue:p,event:t})}return d=!0,void(t.keyCode===s.KeyCode.BACKSPACE&&((this.options.autoSwitchKeys||[]).indexOf(s.KeyCode.BACKSPACE)>=0||(this.options.autoSwitchKeys||[]).indexOf(u.Key.BACKSPACE)>=0)&&this.switchDateSegment(-1));case u.Key.HOME:this.selectNearestSegment(0);break;case u.Key.END:this.selectNearestSegment(this.elementValue.length);break;default:return}d&&t.preventDefault()}}},e.prototype.onElementPaste=function(){this.isPasteInProgress=!0},e.prototype.onElementMouseWheel=function(t){if(this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive){var e=t;e.shiftKey?this.switchDateSegment((e.wheelDelta||-e.detail)>0?-1:1):this.modifyDateSegmentValue((e.wheelDelta||-e.detail)>0?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},e.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;l.isPresent(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e));var n=this.dateObject&&this.dateObject.getValue();this.writeValue(e),this.tryTriggerValueChange({oldValue:n,event:t})},Object.defineProperty(e.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:d.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:d.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t={start:0,end:0};return null!==this.element&&void 0!==this.element.selectionStart&&(t={start:this.element.selectionStart,end:this.element.selectionEnd}),t},enumerable:!0,configurable:!0}),e.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&this.element.setSelectionRange(t.start,t.end)},e.prototype.selectionBySymbol=function(t){for(var e=-1,n=0,r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===t&&(n=r+1,-1===e&&(e=r));return e<0&&(e=0),this.options.autoCorrectParts||this.currentFormat.length===this.currentText.length||(this.currentFormat.length<this.currentText.length?n+=this.currentText.length-this.currentFormat.length:n=Math.max(0,n-(this.currentFormat.length-this.currentText.length))),{start:e,end:n}},e.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},n=t,r=t-1;n<this.currentFormat.length||r>=0;n++,r--){if(n<this.currentFormat.length&&this.currentFormat[n]!==d.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}if(r>=0&&this.currentFormat[r]!==d.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[r]);break}}return e},e.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){var n=e.start,r=this.currentFormat[n-(this.elementValue.length-this.currentFormat.length)]||this.currentFormat[n],i="",o="";if(t<0){for(var a=n+t;a>=0;a--)if((o=this.currentFormat[a])!==d.Constants.formatSeparator&&o!==r){n=a,i=o;break}}else for(a=n+t;a<this.currentFormat.length;a++)if((o=this.currentFormat[a])!==d.Constants.formatSeparator&&o!==r){n=a,i=o;break}if(i)return this.forceUpdate(),this.setSelection(this.selectionBySymbol(i)),void(this.interactionMode=c.DateInputInteractionMode.Selection)}var s=this.selection,u=s.start,l=s.end;if(u<l&&this.currentFormat[u]!==this.currentFormat[l-1])return this.setSelection(this.selectionByIndex(t>0?u:l-1)),void(this.resetSegmentValue=!0);for(var h=this.currentFormat[u],f=u+t;f>0&&f<this.currentFormat.length&&(this.currentFormat[f]===h||this.currentFormat[f]===d.Constants.formatSeparator);)f+=t;if(this.currentFormat[f]!==d.Constants.formatSeparator){for(var p=f;p>=0&&p<this.currentFormat.length&&this.currentFormat[p]===this.currentFormat[f];)p+=t;f>p&&(p+1!==u||f+1!==l)?(this.setSelection({start:p+1,end:f+1}),this.resetSegmentValue=!0):f<p&&(f!==u||p!==l)&&(this.setSelection({start:f,end:p}),this.resetSegmentValue=!0)}},e.prototype.modifyDateSegmentValue=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n={}),this.dateObject){var r=this.value,i=1*t,o=this.caret();if("S"===(e=e||this.currentFormat[o[0]])&&!this.options.steps.millisecond){var a=l.millisecondDigitsInFormat(this.inputFormat);i=l.millisecondStepFor(a)}this.dateObject.modifyPart(e,i),this.tryTriggerValueChange({oldValue:r,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e))}},e.prototype.tryTriggerValueChange=function(t){if(void 0===t&&(t={oldValue:null,event:{}}),!f.isEqual(this.value,t.oldValue))return this.triggerValueChange(t)},e.prototype.triggerValueChange=function(t){return void 0===t&&(t={oldValue:null,event:{}}),this.trigger("valueChange",l.extend(t,{value:this.value}))},e.prototype.triggerInput=function(t){return void 0===t&&(t={event:{}}),this.trigger("input",l.extend(t,{value:this.value}))},e.prototype.triggerInputEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("inputEnd",l.extend(t,{value:this.value}))},e.prototype.triggerFocus=function(t){return void 0===t&&(t={event:{}}),this.trigger("focus",l.extend({},t))},e.prototype.triggerFocusEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("focusEnd",l.extend({},t))},e.prototype.triggerBlur=function(t){return void 0===t&&(t={event:{}}),this.trigger("blur",l.extend({},t))},e.prototype.triggerBlurEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("blurEnd",l.extend({},t))},e.prototype.triggerChange=function(t){return void 0===t&&(t={event:{}}),this.trigger("change",l.extend(t,{value:this.value}))},e.prototype.triggerKeyDown=function(t){return void 0===t&&(t={event:{}}),this.trigger("keydown",l.extend({},t))},e.prototype.triggerMouseWheel=function(t){return void 0===t&&(t={event:{}}),this.trigger("mousewheel",l.extend({},t))},e.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},e.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text,n=t.format;this.currentFormat=n,this.currentText=e},e.prototype.setElementValue=function(t){this.element.value=t},e.prototype.getStepFromSymbol=function(t){switch(t){case"S":return Number(this.options.steps.millisecond);case"s":return Number(this.options.steps.second);case"m":return Number(this.options.steps.minute);case"h":case"H":return Number(this.options.steps.hour);case"M":return Number(this.options.steps.month);case"d":case"E":return Number(this.options.steps.day);case"y":return Number(this.options.steps.year);default:return 1}},e.prototype.restorePreviousInputEventState=function(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()},e.prototype.restorePreviousElementValue=function(){this.setElementValue(this.previousElementValue||"")},e.prototype.restorePreviousElementSelection=function(){var t=this.previousElementSelection,e=t.start,n=t.end;this.setSelection({start:e||0,end:n||0})},e.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},e.prototype.verifyValue=function(t){if(t&&!l.isValidDate(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},e.prototype.refreshElementValue=function(){var t=this.caret()[0],e=this.element,n=this.isActive?this.inputFormat:this.displayFormat,r=this.dateObject.getTextAndFormat(n),i=r.text,o=r.format;this.currentFormat=o,this.currentText=i;var a=!this.isActive&&l.isPresent(this.options.placeholder)&&!this.dateObject.hasValue();l.isPresent(this.options.placeholder)&&(e.placeholder=this.options.placeholder);var s=a?"":i;this.previousElementValue=this.elementValue,this.setElementValue(s),this.isActive&&!this.options.allowCaretMode&&this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(t)},e.prototype.caret=function(t,e){void 0===e&&(e=t);var n=void 0!==t,r=[t,t],i=this.element;if(!n||!this.options.disabled&&!this.options.readonly){try{void 0!==i.selectionStart&&(n&&(l.isDocumentAvailable()&&document.activeElement!==i&&i.focus(),i.setSelectionRange(t,e)),r=[i.selectionStart,i.selectionEnd])}catch(t){r=[]}return r}},e.prototype.selectNearestSegment=function(t){for(var e=t,n=t-1;e<this.currentFormat.length||n>=0;e++,n--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(n>=0&&"_"!==this.currentFormat[n])return void this.selectDateSegment(this.currentFormat[n])}},e.prototype.selectDateSegment=function(t){for(var e=-1,n=0,r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===t&&(n=r+1,-1===e&&(e=r));e<0&&(e=0),this.caret(0,0),this.caret(e,n)},e.prototype.getDateObject=function(t){var e=(this.dateObject||{}||null).leadingZero,n=this.createDateObject({value:t});return n.setLeadingZero(this.isActive?e:null),n},e.prototype.createDateObject=function(t){return void 0===t&&(t={}),new o.DateObject(l.extend({intlService:this.intl,formatPlaceholder:this.formatPlaceholder,format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value},t))},e}(h.Observable);e.DateInput=m},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return l})),n.d(e,"__awaiter",(function(){return h})),n.d(e,"__generator",(function(){return c})),n.d(e,"__createBinding",(function(){return f})),n.d(e,"__exportStar",(function(){return d})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return m})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return v})),n.d(e,"__spreadArray",(function(){return y})),n.d(e,"__await",(function(){return D})),n.d(e,"__asyncGenerator",(function(){return b})),n.d(e,"__asyncDelegator",(function(){return E})),n.d(e,"__asyncValues",(function(){return M})),n.d(e,"__makeTemplateObject",(function(){return S})),n.d(e,"__importStar",(function(){return P})),n.d(e,"__importDefault",(function(){return C})),n.d(e,"__classPrivateFieldGet",(function(){return T})),n.d(e,"__classPrivateFieldSet",(function(){return O})),n.d(e,"__classPrivateFieldIn",(function(){return _}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function c(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var f=Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]};function d(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||f(e,t,n)}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function y(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function D(t){return this instanceof D?(this.v=t,this):new D(t)}function b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof D?Promise.resolve(n.value.v).then(u,l):h(o[0][2],n)}catch(t){h(o[0][3],t)}var n}function u(t){s("next",t)}function l(t){s("throw",t)}function h(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function E(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:D(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function M(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var w=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function P(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&f(e,t,n);return w(e,t),e}function C(t){return t&&t.__esModule?t:{default:t}}function T(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function O(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}function _(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(9),o=n(3),a=n(1),s=n(0),u=/d|M|H|h|m|s/,l=function(){function t(t){var e=t.intlService,n=t.formatPlaceholder,i=t.format,o=t.cycleTime,a=void 0!==o&&o,u=t.twoDigitYearMax,l=void 0===u?s.Constants.twoDigitYearMax:u,h=t.value,c=void 0===h?null:h,f=t.autoCorrectParts,d=void 0===f||f;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEyS",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y",S:"S"},this._value=r.getDate(new Date),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.intl=e,this.formatPlaceholder=n||"wide",this.format=i,this.cycleTime=a,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=l,this.autoCorrectParts=d,c)this._value=r.cloneDate(c);else{this._value=r.getDate(new Date);for(var p=this.dateFormatString(this.value,this.format).symbols,m=0;m<p.length;m++)this.setExisting(p[m],!1)}}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){(!t||t instanceof Date)&&(this._value=t,this.resetInvalidDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localeId",{get:function(){for(var t=s.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),n=0;n<e.length;n++){var r=e[n],i=this.intl.cldr[r];if(i.name&&i.calendar&&i.numbers&&i.name!==s.Constants.defaultLocaleId){t=i.name;break}}return t},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){t?r.isEqual(t,this._value)||(this._value=r.cloneDate(t),this.modifyExisting(!0)):(this._value=r.getDate(new Date),this.modifyExisting(!1)),this.resetInvalidDate()},t.prototype.hasValue=function(){var t=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce((function(e,n){return e||"literal"!==n.type&&"dayperiod"!==n.type&&t.getExisting(n.pattern[0])}),!1)},t.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return r.cloneDate(this.value)},t.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},t.prototype.getTextAndFormat=function(t){void 0===t&&(t="");var e=t||this.format,n=this.intl.formatDate(this.value,e,this.localeId),r=this.dateFormatString(this.value,e);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var i="",s=this.intl.formatDate(this.value,e,this.localeId),u=this.getFormattedInvalidDates(e),l=0;l<s.length;l++){var h=r.symbols[l];if("literal"===r.partMap[l].type)i+=n[l];else if(this.getInvalidDatePartValue(h)){var c=this.getPartsForSegment(r,l);if("M"===h){var f=(a.parseToInt(this.getInvalidDatePartValue(h))+1).toString();if(c.length>2)i+=u[h][l];else if(this.getInvalidDatePartValue(h))i+=o.padZero(c.length-f.length)+f,l+=c.length-1;else i+=u[h][l]}else if(this.getInvalidDatePartValue(h)){f=this.getInvalidDatePartValue(h).toString();i+=o.padZero(c.length-f.length)+f,l+=c.length-1}else i+=u[h][l]}else i+=n[l]}n=i}return this.merge(n,r)},t.prototype.getFormattedInvalidDates=function(t){var e=this;void 0===t&&(t="");var n=t||this.format,r={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){var i=e.getInvalidDatePart(t).date;if(i){var o=e.intl.formatDate(i,n,e.localeId);r[t]=o}})),r},t.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,n=0;n<e.length;n++)this.setExisting(e[n],t)},t.prototype.getExisting=function(t){switch(t){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},t.prototype.setExisting=function(t,e){switch(t){case"y":this.year=e,!1===e&&this._value.setFullYear(2e3);break;case"M":this.month=e,!1===e&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},t.prototype.modifyPart=function(t,e){if(a.isPresent(t)&&a.isPresent(e)&&0!==e){var n,i=r.cloneDate(this.value),o=!1,s="M"===t,u="d"===t||"E"===t,l=this.getExisting(t);if(this.autoCorrectParts||!u&&!s)switch(t){case"y":i.setFullYear(i.getFullYear()+e);break;case"M":i=r.addMonths(this.value,e);break;case"d":case"E":i.setDate(i.getDate()+e);break;case"h":case"H":i.setHours(i.getHours()+e),o=!0;break;case"m":i.setMinutes(i.getMinutes()+e),o=!0;break;case"s":i.setSeconds(i.getSeconds()+e),o=!0;break;case"S":i.setMilliseconds(i.getMilliseconds()+e);break;case"a":i.setHours(i.getHours()+12*e),o=!0}else{var h=this._partiallyInvalidDate.invalidDateParts||{},c=this.getInvalidDatePartValue(t),f=h.y.value||i.getFullYear(),d=h.M.value||i.getMonth(),p=h.d.value||h.E.value||i.getDate(),m=h.h.value||h.H.value||i.getHours(),g=h.m.value||i.getMinutes(),v=h.s.value||i.getSeconds(),y=h.S.value||i.getMilliseconds();switch(t){case"y":f+=e;break;case"M":d+=e;break;case"d":case"E":p+=e}if("M"===t){if((d<0||d>11)&&l)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);if(!l){if(d<0)d=a.clamp(d%11+1+11,0,11);else{var D=a.isPresent(c)?d:(e-1)%12;d=a.clamp(D,0,11)}d=a.clamp(d,0,11)}d=a.clamp(d,0,11)}else if("d"===t)if(l){if(p<=0||p>31)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t)}else if(!l){if(a.isPresent(c)&&(p<=0||p>31))return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);if(e<0){var b=a.isPresent(c)?p:31-Math.abs(e%31)+1;p=a.clamp(b,1,31)}else{b=a.isPresent(c)?p:e%31;p=a.clamp(b,1,31)}p=a.clamp(p,1,31)}var E=r.createDate(f,d,p,m,g,v,y),M=s||u?this.modifyDateSymbolWithValue(i,t,s?d:p):null,S=a.areDatePartsEqualTo(E,f,d,p,m,g,v,y);this.getValue()&&a.areDatePartsEqualTo(E,f,d,p,m,g,v,y)?(i=r.cloneDate(E),this.markDatePartsAsExisting()):s&&M?M.getMonth()===d?this.getExisting("d")?S?(i=r.cloneDate(E),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:d,date:r.cloneDate(M),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)):S?(this.resetInvalidDateSymbol(t),i=r.cloneDate(E),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),i=r.cloneDate(M)):(n=!0,this.setInvalidDatePart(t,{value:d,date:r.cloneDate(M),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)):u&&M&&(M.getDate()===p?this.getExisting("M")?S?(i=r.cloneDate(E),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:p,date:r.cloneDate(M),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)):S?(i=r.cloneDate(E),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),i=r.cloneDate(M)):(n=!0,this.setInvalidDatePart(t,{value:p,date:r.cloneDate(this.value),startDateOffset:e,startDate:r.cloneDate(this.value)}),this.setExisting(t,!1)))}this.shouldNormalizeCentury()&&(i=this.normalizeCentury(i)),o&&!this.cycleTime&&(i.getDate(),this._value.getDate()),n||(this.setExisting(t,!0),this._value=i,this.getValue()&&this.resetInvalidDate())}},t.prototype.parsePart=function(t){for(var e,n=t.symbol,i=t.currentChar,s=t.resetSegmentValue,u=t.cycleSegmentValue,l=t.rawTextValue,h=t.isDeleting,c=t.originalFormat,f=!u,d=this.dateFormatString(this.value,this.format),p=d.partMap.filter((function(t){return"literal"===t.type})).map((function(t,e){return{datePartIndex:e,type:t.type,pattern:t.pattern,literal:""}})),m=0;m<p.length;m++){for(var g=p[m],v=0;v<g.pattern.length;v++)p[m+v]&&(p[m+v].literal=g.pattern[v]);m+=g.pattern.length-1}var y={value:null,switchPart:!1,resetPart:f&&"M"===n&&d.partMap.filter((function(t){return"month"===t.type})).some((function(t){return t.pattern.length>2}))};if(!i){if(!f)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),{value:null,switchToNext:!1};for(m=0;m<p.length;m++){var D=p[m].literal,b=l.startsWith(D),E=l.endsWith(D),M=l.indexOf(D+D)>=0;if(b||E||M)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),a.extend(y,{value:null,switchToNext:!1})}}var S=this.intl.formatDate(this.value,this.format,this.localeId),w=d.symbols,P=!1,C="",T="",O="",_="",I="",x="",F=c.indexOf(n),j=c.lastIndexOf(n)-F+1,k=this.format===w||this.format===c||this.format.length===c.length;if(f){var V=0;for(m=0;m<S.length;m++){if(w[m]===n)T+=this.getExisting(n)?S[m]:"0",h?(V<j-1&&(O+=l[m]||""),V++):O+=l[m]||"",P=!0;else P?(x+=S[m],I+=S[m]):(C+=S[m],_+=S[m])}if(k){if(c.length<l.length)O+=i;else if(!h&&c.length>l.length){var U=c.length-l.length;(N=O.substring(0,O.length-U))&&N.length>0&&(O=N)}if(O.length>j)return a.extend(y,{value:null,switchToNext:!1})}else{V=0,T="",O="",C="",x="",P=!1;for(m=0;m<c.length;m++){if(c[m]===n)T+=this.getExisting(n)?S[m]||"":"0",h?(V<j-1&&(O+=l[m]||""),V++):O+=l[m]||"",P=!0;else P?x+=l[m]||"":C+=l[m]||""}if(c.length<l.length)O+=i;else if(!h&&c.length>l.length){var N;U=c.length-l.length;(N=O.substring(0,O.length-U))&&N.length>0&&(O=N)}}}else for(m=0;m<S.length;m++){if(w[m]===n)T+=this.getExisting(n)?S[m]:"0",P=!0;else P?x+=S[m]:C+=S[m]}var A=null,L=this.matchMonth(i),Y=this.matchDayPeriod(i,n),H="0"===i,K=this.leadingZero||{};H&&!f?0!==parseInt(s?i:T+i,10)||this.isAbbrMonth(d.partMap,n)||this.incrementLeadingZero(n):this.resetLeadingZero();var W=this.partPattern(d.partMap,n),R=W?W.pattern:null;if(f&&h&&!O)return this.setExisting(n,!1),a.extend(y,{value:null,switchToNext:!1});var z=T.length-3,B=!0;for(m=Math.max(0,z);m<=T.length&&B;m++){var Z=s?i:f?O:T.substring(m)+i;this.autoCorrectParts||(B=!1,f||(Z=o.unpadZero(Z),Z=o.padZero(j-Z.length)+Z)),f&&(B=!1,Z=o.unpadZero(Z));var G=parseInt(Z,10),J=C+Z+x;A=this.intl.parseDate(J,this.format,this.localeId),!f||k||a.isValidDate(A)||(A=this.intl.parseDate(_+Z+I,this.format,this.localeId),O=Z);var q=!isNaN(parseInt(i,10))||f&&h&&""===i;if(!A&&!isNaN(G)&&q){if("M"===n&&!L){var Q=G-1;Q>-1&&Q<12&&((A=r.cloneDate(this.value)).setMonth(Q),A.getMonth()!==Q&&(A=r.lastDayOfMonth(r.addMonths(A,-1))))}"y"===n&&(A=r.createDate(parseInt(Z,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(f&&a.isValidDate(A)||!f&&A)&&this.date&&A.getDate()!==this.value.getDate()&&(A=r.lastDayOfMonth(r.addMonths(A,-1))))}if(f&&a.isValidDate(A)||!f&&A){var X=this.intl.parseDate(""+C+this.peek(Z,R)+x,this.format,this.localeId),$=this.patternLength(R)||R.length,tt=((this.leadingZero||{})[n]||0)+(o.unpadZero(Z)||i).length>=$,et=null===X||K[n]&&R.length<=Z.length||tt;if(this.shouldNormalizeCentury()&&(A=this.normalizeCentury(A)),this._value=A,this.setExisting(n,!0),f&&et)if("M"===n){if(j<=2)et=(nt=a.parseToInt(O))>=2}else et=et?k?O.length===j:O.length>j:et;return a.extend(y,{value:this.value,switchToNext:et})}}if(L&&(A=this.intl.parseDate(C+L+x,this.format,this.localeId)))return this._value=A,this.setExisting(n,!0),a.extend(y,{value:this.value,switchToNext:!1});if(Y&&(A=this.intl.parseDate(C+Y+x,this.format)))return this._value=A,a.extend(y,{value:this.value,switchToNext:!0});if(H&&(this.leadingZero=this.isAbbrMonth(d.partMap,n)?null:((e={})[n]=!0,e),this.setExisting(n,!1)),f&&O.length>j)return a.extend(y,{value:null,switchToNext:!1});if(!this.autoCorrectParts){this.setExisting(n,!1);var nt=void 0,rt=f?O:T,it=a.parseToInt(rt);if(a.isNumber(it)&&(nt="M"===n?a.clamp(it-1,0,11):it),a.isNumber(nt)){var ot=this.modifyDateSymbolWithValue(this.value,n,nt);this.setExisting(n,!1),this.setInvalidDatePart(n,{value:nt,date:r.cloneDate(ot),startDate:this._partiallyInvalidDate.startDate||r.cloneDate(this.value)})}}return a.extend(y,{value:null,switchToNext:!1})},t.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(o.dateSymbolMap,{})[t]},t.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},t.prototype.setLeadingZero=function(t){this.leadingZero=t},t.prototype.normalizeCentury=function(t){if(!a.isPresent(t))return t;var e=a.cropTwoDigitYear(t),n=this.getNormalizedCenturyBase(e);return a.setYears(t,n+e)},t.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},t.prototype.isAbbrMonth=function(t,e){var n=this.partPattern(t,e);return"month"===n.type&&n.names},t.prototype.partPattern=function(t,e){return t.filter((function(t){return-1!==t.pattern.indexOf(e)}))[0]},t.prototype.peek=function(t,e){var n=t.replace(/^0*/,"")+"0";return o.padZero(e.length-n.length)+n},t.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var n=parseInt(this.typedMonthPart,10);if(n>=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},t.prototype.matchDayPeriod=function(t,e){var n=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return""},t.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),n=0;n<e.length;n++)if("month"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return[]},t.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),n=0;n<e.length;n++)if("dayperiod"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return null},t.prototype.patternLength=function(t){return"y"===t[0]?4:u.test(t)?2:0},t.prototype.dateFormatString=function(t,e){for(var n=this.intl.splitDateFormat(e,this.localeId),r=[],o=[],a=0;a<n.length;a++)for(var u=this.intl.formatDate(t,{pattern:n[a].pattern},this.localeId).length;u>0;)r.push(this.symbols[n[a].pattern[0]]||s.Constants.formatSeparator),o.push(n[a]),u--;var l=new i.Mask;return l.symbols=r.join(""),l.partMap=o,l},t.prototype.merge=function(t,e){for(var n="",r="",i=e.symbols,o=!1,s=0,u=this.getFormattedInvalidDates(i),l=i.length-1;l>=0;l--){var h=this.getPartsForSegment(e,l);if(-1===this.knownParts.indexOf(i[l])||this.getExisting(i[l]))this.autoCorrectParts?n=t[l]+n:t.length!==i.length?o?n=t[l]+n:s>0?(n=t[l]+n,--s<=0&&(o=!0)):n=(t[l+t.length-i.length]||"")+n:n=t[l]+n,r=i[l]+r;else{var c=i[l],f=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!this.getInvalidDatePartValue(c)){for(;l>=0&&c===i[l];)l--;l++}if(this.leadingZero&&this.leadingZero[c])n="0"+n;else if(!this.autoCorrectParts&&this.getInvalidDatePartValue(c)){var d=this.getInvalidDatePartValue(c).toString();"M"===c?(d=(a.parseToInt(this.getInvalidDatePartValue(c))+1).toString(),h.length>2?n=u[c][l]+n:(n=(d=(a.parseToInt(this.getInvalidDatePartValue(c))+1).toString())+n,s=d.length-h.length)):(n=d+n,f=d.length-1,s=d.length-h.length)}else n=this.dateFieldName(e.partMap[l])+n;for(;r.length<n.length;)r=i[l]+r;0!==f&&(l=l-f+(t.length-i.length))}}return{text:n,format:r}},t.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]?e[t.type]:"formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e}))},t.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},t.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some((function(t){return"yy"===t.pattern}))},t.prototype.resetInvalidDate=function(){var t=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){t.resetInvalidDatePart(e)}))},t.prototype.resetInvalidDateSymbol=function(t){var e=this;this.resetInvalidDatePart(t);var n=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){e._partiallyInvalidDate.invalidDateParts[t]&&a.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(n=!1)})),n&&this.resetInvalidDate()},t.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},t.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},t.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},t.prototype.setInvalidDatePart=function(t,e){var n=e.value,r=void 0===n?null:n,i=e.date,o=void 0===i?null:i,a=e.startDateOffset,s=void 0===a?0:a,u=e.startDate,l=void 0===u?null:u;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=r,this._partiallyInvalidDate.invalidDateParts[t].date=o,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=s,this._partiallyInvalidDate.startDate=l)},t.prototype.modifyDateSymbolWithOffset=function(t,e,n){var i=r.cloneDate(t),o=!1;switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"M":i=r.addMonths(this.value,n);break;case"d":case"E":i.setDate(i.getDate()+n);break;case"h":case"H":i.setHours(i.getHours()+n),o=!0;break;case"m":i.setMinutes(i.getMinutes()+n),o=!0;break;case"s":i.setSeconds(i.getSeconds()+n),o=!0;break;case"S":i.setMilliseconds(i.getMilliseconds()+n);break;case"a":i.setHours(i.getHours()+12*n),o=!0}return{date:i,timeModified:o}},t.prototype.modifyDateSymbolWithValue=function(t,e,n){var i=r.cloneDate(t);switch(e){case"y":i.setFullYear(n);break;case"M":i=r.addMonths(t,n-t.getMonth());break;case"d":case"E":i.setDate(n);break;case"h":case"H":i.setHours(n);break;case"m":i.setMinutes(n);break;case"s":i.setSeconds(n);break;case"S":i.setMilliseconds(n);break;case"a":i.setHours(n)}return i},t.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},t.prototype.getPartsForSegment=function(t,e){for(var n=t.partMap[e],r=[],i=e;i<t.partMap.length;i++){var o=t.partMap[i];if(n.type!==o.type||n.pattern!==o.pattern)break;r.push(o)}for(i=e-1;i>=0;i--){o=t.partMap[i];if(n.type!==o.type||n.pattern!==o.pattern)break;r.unshift(o)}return r},t}();e.DateObject=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){this.symbols="",this.partMap=[]};e.Mask=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i={events:{}},o=function(){function t(t){this.options=r.extend({},i,t)}return t.prototype.destroy=function(){},t.prototype.trigger=function(t,e){void 0===e&&(e={});var n={defaultPrevented:!1,preventDefault:function(){n.defaultPrevented=!0}};return!!r.isFunction(this.options.events[t])&&(this.options.events[t](r.extend(n,e,{sender:this})),n.defaultPrevented)},t}();e.Observable=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.None="none",t.Caret="caret",t.Selection="selection"}(e.DateInputInteractionMode||(e.DateInputInteractionMode={}))}])}));
package/dist/cdn/main.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-date-math"),require("tslib")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.KendoDateinputsCommon=e(require("@progress/kendo-date-math"),require("tslib")):t.KendoDateinputsCommon=e(t.KendoDateMath,t.self)}(window,(function(t,e){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},r=function(t){return t instanceof HTMLElement};e.isPresent=function(t){return null!=t},e.isDocumentAvailable=function(){return!!document},e.isNumber=function(t){return e.isPresent(t)&&"number"==typeof t&&!Number.isNaN(t)},e.parseToInt=function(t){return parseInt(t,10)},e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},e.deepExtend=function(t){for(var n,i,s=[],o=1;o<arguments.length;o++)s[o-1]=arguments[o];if(!s.length)return t;var l=s.shift();if(a(t)&&a(l))for(var h in l)r(l[h])?t[h]=l[h]:a(l[h])?(t[h]||e.extend(t,((n={})[h]={},n)),e.deepExtend(t[h],l[h])):e.extend(t,((i={})[h]=l[h],i));return e.deepExtend.apply(void 0,[t].concat(s))},e.noop=function(){},e.isFunction=function(t){return"function"==typeof t},e.cropTwoDigitYear=function(t){return!e.isPresent(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},e.setYears=(i="setFullYear",function(t,e){var n=s.cloneDate(t);return n[i](e),n}),e.millisecondDigitsInFormat=function(t){var e=t&&t.match(/S+(\1)/);return e?e[0].length:0},e.millisecondStepFor=function(t){return Math.pow(10,3-t)},e.areDatePartsEqualTo=function(t,e,n,i,s,a,r,o){return!(!t||t.getFullYear()!==e||t.getMonth()!==n||t.getDate()!==i||t.getHours()!==s||t.getMinutes()!==a||t.getSeconds()!==r||t.getMilliseconds()!==o)},e.isValidDate=function(t){return e.isPresent(t)&&t.getTime&&e.isNumber(t.getTime())}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(4);e.padZero=function(t){return new Array(Math.max(t,0)).fill("0").join("")},e.unpadZero=function(t){return t.replace(/^0*/,"")},e.approximateStringMatching=function(t){var e=t.oldText,n=t.newText,a=t.formatPattern,r=t.selectionStart,o=t.isInCaretMode,l=t.keyEvent,h=e[r+e.length-n.length],u=e.substring(0,r+e.length-n.length),c=n.substring(0,r),d=[];if(u===c&&r>0)return d.push([a[r-1],c[r-1]]),d;if(0===u.indexOf(c)&&o&&(l.key===s.Key.DELETE||l.key===s.Key.BACKSPACE)||0===u.indexOf(c)&&!o&&(0===c.length||a[c.length-1]!==a[c.length])){var p="";o||1!==c.length||d.push([a[0],c[0]]);for(var m=c.length;m<u.length;m++)a[m]!==p&&a[m]!==i.Constants.formatSeparator&&(p=a[m],d.push([p,""]));return d}if(o&&(0===c.indexOf(u)||a[r-1]===i.Constants.formatSeparator)||!o&&(0===c.indexOf(u)||a[r-1]===i.Constants.formatSeparator)){var f=a[0];for(m=Math.max(0,u.length-1);m<a.length;m++)if(a[m]!==i.Constants.formatSeparator){f=a[m];break}return[[f,c[r-1]]]}return!o&&" "===c[c.length-1]||!o&&c[c.length-1]===h?[[a[r-1],i.Constants.formatSeparator]]:[[a[r-1],c[r-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,n){return null===t||!(e&&e>t||n&&n<t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Key={DELETE:"Delete",BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",SPACE:" ",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.DateInput=i.DateInput},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(7),a=n(8),r=n(3),o=n(10),l=n(4),h=n(2),u=n(11),c=n(12),d=n(0),p=n(1),m={format:"d",allowNulls:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:(i={},i.valueChange=null,i.input=null,i.inputEnd=null,i.focus=null,i.focusEnd=null,i.blur=null,i.blurEnd=null,i.keydown=null,i.mousewheel=null,i.change=null,i),selectNearestSegmentOnFocus:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:p.Constants.twoDigitYearMax,autoCorrectParts:!0},f=function(t){function e(e,n){var i=t.call(this,n)||this;return i.dateObject=null,i.currentText="",i.currentFormat="",i.interactionMode=c.DateInputInteractionMode.None,i.previousElementSelection={start:0,end:0},i.init(e,n),i}return s.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),e.prototype.init=function(t,e){var n=h.isValidDate(this.options.value)?d.cloneDate(this.options.value):new Date(e.formattedValue);h.isValidDate(n)||(n=null),this.element=t,this.element._kendoWidget=this,this.options=h.extend({},m,e),this.intl=this.options.intlService,this.formatPlaceholder=this.options.formatPlaceholder?this.options.formatPlaceholder:"formatPattern",this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.forceUpdate()},e.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener("dragStart",this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener("drop",this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener("click",this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener("mousedown",this.onElementMouseDown),this.element.addEventListener("touchstart",this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener("mouseup",this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener("input",this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener("keydown",this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener("focus",this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener("blur",this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener("change",this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener("paste",this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.addEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.unbindEvents=function(){this.element.removeEventListener("dragStart",this.onElementDragStart),this.element.removeEventListener("drop",this.onElementDrop),this.element.removeEventListener("touchstart",this.onElementMouseDown),this.element.removeEventListener("mousedown",this.onElementMouseDown),this.element.removeEventListener("mouseup",this.onElementMouseUp),this.element.removeEventListener("click",this.onElementClick),this.element.removeEventListener("input",this.onElementInput),this.element.removeEventListener("keydown",this.onElementKeyDown),this.element.removeEventListener("focus",this.onElementFocus),this.element.removeEventListener("blur",this.onElementBlur),this.element.removeEventListener("change",this.onElementChange),this.element.removeEventListener("paste",this.onElementPaste),this.element.removeEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.removeEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=h.extend(this.options,t),e&&(this.destroy(),this.init(this.element,t))},e.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},e.prototype.isInCaretMode=function(){return this.interactionMode===c.DateInputInteractionMode.Caret},e.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},e.prototype.onElementDragStart=function(t){t.preventDefault()},e.prototype.onElementDrop=function(t){t.preventDefault()},e.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},e.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},e.prototype.onElementClick=function(t){this.mouseDownStarted=!1;var e=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),3===t.detail);else if(this.isActive&&this.options.selectNearestSegmentOnFocus){var n=this.element.selectionStart!==this.element.selectionEnd,i=h.isPresent(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,s=!n&&i?0:this.caret()[0];this.selectNearestSegment(s)}else this.setSelection(this.selectionByIndex(e.start))},e.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.keyDownEvent||{},n=e.keyCode===o.KeyCode.BACKSPACE||e.key===l.Key.BACKSPACE,i=e.keyCode===o.KeyCode.DELETE||e.key===l.Key.DELETE;if(this.element&&this.dateObject){if(this.isPasteInProgress)return this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),void(this.isPasteInProgress=!1);var s=this.interactionMode;!this.options.allowCaretMode||s===c.DateInputInteractionMode.Caret||i||n||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=c.DateInputInteractionMode.Caret:this.interactionMode=c.DateInputInteractionMode.Selection;var a=this.isInCaretMode();if(a&&this.keyDownEvent.key===l.Key.SPACE)this.restorePreviousInputEventState();else{var u=this.dateObject&&this.dateObject.getValue(),m=this.dateObject.getTextAndFormat(),f=m.text,v=m.format;this.currentFormat=v;var g="";g=a&&(n||i||s===c.DateInputInteractionMode.Caret)?this.previousElementValue:f;var y=this.elementValue,D=r.approximateStringMatching({oldText:g,newText:y,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:a,keyEvent:this.keyDownEvent});if(!a||D&&0!==D.length){if(a&&1===D.length){if(!D[0]||!D[0][0])return void this.restorePreviousInputEventState();if(a&&D[0]&&(D[0][0]===p.Constants.formatSeparator||D[0][1]===p.Constants.formatSeparator))return void this.restorePreviousInputEventState()}var E=1===D.length&&D[0][1]===p.Constants.formatSeparator,b=[],S=!1;if(!E)for(var M=0;M<D.length;M++){var P=this.dateObject.parsePart({symbol:D[M][0],currentChar:D[M][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:n||i,originalFormat:this.currentFormat});b.push(P),S=P.switchToNext}this.options.autoSwitchParts||(S=!1),this.resetSegmentValue=!1;var I,x=b[b.length-1],C=x&&!x.value,O=a&&(n||i)&&C,w=!!x&&x.resetPart,F=!d.isEqual(u,this.dateObject.value),k=this.selection;if((!a||O||w)&&(w&&(I=this.currentFormat[k.start]),this.forceUpdate()),D.length&&D[0][0]!==p.Constants.formatSeparator)if(!a||O||w)I?this.setSelection(this.selectionBySymbol(I)):(this.options.autoSwitchParts||D[0][1]!==p.Constants.formatSeparator)&&this.setSelection(this.selectionBySymbol(D[0][0]));else if(a)if(this.options.format.length!==this.currentFormat.length){if(F&&h.isPresent(this.dateObject.value)){var V=this.elementValue.length;this.forceUpdate();var _=this.elementValue.length-V;this.setSelection({start:k.start+_,end:k.start+_})}}else F?C&&this.restorePreviousInputEventState():this.restorePreviousInputEventState();S||!a||n||i||w||!C?this.options.autoSwitchParts&&(S||E)&&(a||this.switchDateSegment(1)):F?this.currentFormat.length===this.elementValue.length||a&&s!==c.DateInputInteractionMode.Caret&&F||(a&&s!==c.DateInputInteractionMode.Caret?(I=this.currentFormat[k.start],this.forceUpdate(),this.setSelection(this.selectionBySymbol(I))):this.restorePreviousInputEventState()):this.restorePreviousInputEventState(),this.tryTriggerValueChange({oldValue:u,event:t}),this.triggerInputEnd({event:t}),a&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}},e.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},e.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},e.prototype.onElementChange=function(t){this.triggerChange({event:t})},e.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){this.keyDownEvent=t,this.previousElementValue=this.element.value;var e=this.selection,n=e.start,i=e.end;this.previousElementSelection={start:n,end:i};var s=(this.options.autoSwitchKeys||[]).map((function(t){return t.toString().toLowerCase().trim()}));if(s.indexOf(t.keyCode.toString())>=0||s.indexOf(t.keyCode)>=0||s.indexOf(t.key.toLowerCase().trim())>=0){var a=s.indexOf(l.Key.TAB.toLowerCase().trim())>=0||s.indexOf(o.KeyCode.TAB)>=0||s.indexOf(o.KeyCode.TAB.toString())>=0;if(!a)return t.preventDefault(),void this.switchDateSegment(1);var r=this.selection,h=r.start,u=r.end;if(t.shiftKey&&a?this.switchDateSegment(-1):this.switchDateSegment(1),h!==this.selection.start||u!==this.selection.end)return void t.preventDefault()}var c=this.currentFormat[this.selection.start],d=this.getStepFromSymbol(c),p=!1;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===o.KeyCode.TAB)){switch(t.keyCode){case o.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),p=!0;break;case o.KeyCode.ARROW_UP:this.modifyDateSegmentValue(d,c,event),p=!0;break;case o.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),p=!0;break;case o.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-d,c,event),p=!0;break;case o.KeyCode.ENTER:break;case o.KeyCode.DELETE:case o.KeyCode.BACKSPACE:if(this.options.allowNulls){var m=this.dateObject.value;this.dateObject.setValue(null),this.forceUpdate(),this.tryTriggerValueChange({oldValue:m,event:t})}return p=!0,void(t.keyCode===o.KeyCode.BACKSPACE&&((this.options.autoSwitchKeys||[]).indexOf(o.KeyCode.BACKSPACE)>=0||(this.options.autoSwitchKeys||[]).indexOf(l.Key.BACKSPACE)>=0)&&this.switchDateSegment(-1));case l.Key.HOME:this.selectNearestSegment(0);break;case l.Key.END:this.selectNearestSegment(this.elementValue.length);break;default:return}p&&t.preventDefault()}}},e.prototype.onElementPaste=function(){this.isPasteInProgress=!0},e.prototype.onElementMouseWheel=function(t){if(this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive){var e=t;e.shiftKey?this.switchDateSegment((e.wheelDelta||-e.detail)>0?-1:1):this.modifyDateSegmentValue((e.wheelDelta||-e.detail)>0?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},e.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;h.isPresent(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e));var n=this.dateObject&&this.dateObject.getValue();this.writeValue(e),this.tryTriggerValueChange({oldValue:n,event:t})},Object.defineProperty(e.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:p.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:p.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t={start:0,end:0};return null!==this.element&&void 0!==this.element.selectionStart&&(t={start:this.element.selectionStart,end:this.element.selectionEnd}),t},enumerable:!0,configurable:!0}),e.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&this.element.setSelectionRange(t.start,t.end)},e.prototype.selectionBySymbol=function(t){for(var e=-1,n=0,i=0;i<this.currentFormat.length;i++)this.currentFormat[i]===t&&(n=i+1,-1===e&&(e=i));return e<0&&(e=0),{start:e,end:n}},e.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},n=t,i=t-1;n<this.currentFormat.length||i>=0;n++,i--){if(n<this.currentFormat.length&&this.currentFormat[n]!==p.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}if(i>=0&&this.currentFormat[i]!==p.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[i]);break}}return e},e.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){for(var n=e.start,i=(this.currentFormat[n],n);i>=0;i--)if(this.currentFormat[i]!==p.Constants.formatSeparator){n=i;break}var s=void 0;for(i=n;i<this.currentFormat.length&&(s=this.currentFormat[i])===p.Constants.formatSeparator;i++);s&&(this.forceUpdate(),this.setSelection(this.selectionBySymbol(s)))}var a=this.selection,r=a.start,o=a.end;if(r<o&&this.currentFormat[r]!==this.currentFormat[o-1])return this.setSelection(this.selectionByIndex(t>0?r:o-1)),void(this.resetSegmentValue=!0);for(var l=this.currentFormat[r],h=r+t;h>0&&h<this.currentFormat.length&&(this.currentFormat[h]===l||this.currentFormat[h]===p.Constants.formatSeparator);)h+=t;if(this.currentFormat[h]!==p.Constants.formatSeparator){for(var u=h;u>=0&&u<this.currentFormat.length&&this.currentFormat[u]===this.currentFormat[h];)u+=t;h>u&&(u+1!==r||h+1!==o)?(this.setSelection({start:u+1,end:h+1}),this.resetSegmentValue=!0):h<u&&(h!==r||u!==o)&&(this.setSelection({start:h,end:u}),this.resetSegmentValue=!0)}},e.prototype.modifyDateSegmentValue=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n={}),this.dateObject){var i=this.value,s=1*t,a=this.caret();if("S"===(e=e||this.currentFormat[a[0]])&&!this.options.steps.millisecond){var r=h.millisecondDigitsInFormat(this.inputFormat);s=h.millisecondStepFor(r)}this.dateObject.modifyPart(e,s),this.tryTriggerValueChange({oldValue:i,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e))}},e.prototype.tryTriggerValueChange=function(t){if(void 0===t&&(t={oldValue:null,event:{}}),!d.isEqual(this.value,t.oldValue))return this.triggerValueChange(t)},e.prototype.triggerValueChange=function(t){return void 0===t&&(t={oldValue:null,event:{}}),this.trigger("valueChange",h.extend(t,{value:this.value}))},e.prototype.triggerInput=function(t){return void 0===t&&(t={event:{}}),this.trigger("input",h.extend(t,{value:this.value}))},e.prototype.triggerInputEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("inputEnd",h.extend(t,{value:this.value}))},e.prototype.triggerFocus=function(t){return void 0===t&&(t={event:{}}),this.trigger("focus",h.extend({},t))},e.prototype.triggerFocusEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("focusEnd",h.extend({},t))},e.prototype.triggerBlur=function(t){return void 0===t&&(t={event:{}}),this.trigger("blur",h.extend({},t))},e.prototype.triggerBlurEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("blurEnd",h.extend({},t))},e.prototype.triggerChange=function(t){return void 0===t&&(t={event:{}}),this.trigger("change",h.extend(t,{value:this.value}))},e.prototype.triggerKeyDown=function(t){return void 0===t&&(t={event:{}}),this.trigger("keydown",h.extend({},t))},e.prototype.triggerMouseWheel=function(t){return void 0===t&&(t={event:{}}),this.trigger("mousewheel",h.extend({},t))},e.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},e.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text,n=t.format;this.currentFormat=n,this.currentText=e},e.prototype.setElementValue=function(t){this.element.value=t},e.prototype.getStepFromSymbol=function(t){switch(t){case"S":return Number(this.options.steps.millisecond);case"s":return Number(this.options.steps.second);case"m":return Number(this.options.steps.minute);case"h":case"H":return Number(this.options.steps.hour);case"M":return Number(this.options.steps.month);case"d":case"E":return Number(this.options.steps.day);case"y":return Number(this.options.steps.year);default:return 1}},e.prototype.restorePreviousInputEventState=function(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()},e.prototype.restorePreviousElementValue=function(){this.setElementValue(this.previousElementValue||"")},e.prototype.restorePreviousElementSelection=function(){var t=this.previousElementSelection,e=t.start,n=t.end;this.setSelection({start:e||0,end:n||0})},e.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},e.prototype.verifyValue=function(t){if(t&&!h.isValidDate(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},e.prototype.refreshElementValue=function(){var t=this.caret()[0],e=this.element,n=this.isActive?this.inputFormat:this.displayFormat,i=this.dateObject.getTextAndFormat(n),s=i.text,a=i.format;this.currentFormat=a,this.currentText=s;var r=!this.isActive&&h.isPresent(this.options.placeholder)&&!this.dateObject.hasValue();h.isPresent(this.options.placeholder)&&(e.placeholder=this.options.placeholder);var o=r?"":s;this.previousElementValue=this.elementValue,this.setElementValue(o),this.isActive&&!this.options.allowCaretMode&&this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(t)},e.prototype.caret=function(t,e){void 0===e&&(e=t);var n=void 0!==t,i=[t,t],s=this.element;if(!n||!this.options.disabled&&!this.options.readonly){try{void 0!==s.selectionStart&&(n&&(h.isDocumentAvailable()&&document.activeElement!==s&&s.focus(),s.setSelectionRange(t,e)),i=[s.selectionStart,s.selectionEnd])}catch(t){i=[]}return i}},e.prototype.selectNearestSegment=function(t){for(var e=t,n=t-1;e<this.currentFormat.length||n>=0;e++,n--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(n>=0&&"_"!==this.currentFormat[n])return void this.selectDateSegment(this.currentFormat[n])}},e.prototype.selectDateSegment=function(t){for(var e=-1,n=0,i=0;i<this.currentFormat.length;i++)this.currentFormat[i]===t&&(n=i+1,-1===e&&(e=i));e<0&&(e=0),this.caret(0,0),this.caret(e,n)},e.prototype.getDateObject=function(t){var e=(this.dateObject||{}||null).leadingZero,n=this.createDateObject({value:t});return n.setLeadingZero(this.isActive?e:null),n},e.prototype.createDateObject=function(t){return void 0===t&&(t={}),new a.DateObject(h.extend({intlService:this.intl,formatPlaceholder:this.formatPlaceholder,format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value},t))},e}(u.Observable);e.DateInput=f},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),s=n(9),a=n(3),r=n(2),o=n(1),l=/d|M|H|h|m|s/,h=function(){function t(t){var e=t.intlService,n=t.formatPlaceholder,s=t.format,a=t.cycleTime,r=void 0!==a&&a,l=t.twoDigitYearMax,h=void 0===l?o.Constants.twoDigitYearMax:l,u=t.value,c=void 0===u?null:u,d=t.autoCorrectParts,p=void 0===d||d;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEyS",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y",S:"S"},this._value=i.getDate(new Date),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.intl=e,this.formatPlaceholder=n||"wide",this.format=s,this.cycleTime=r,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=h,this.autoCorrectParts=p,c)this._value=i.cloneDate(c);else{this._value=i.getDate(new Date);for(var m=this.dateFormatString(this.value,this.format).symbols,f=0;f<m.length;f++)this.setExisting(m[f],!1)}}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){(!t||t instanceof Date)&&(this._value=t,this.resetInvalidDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localeId",{get:function(){for(var t=o.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),n=0;n<e.length;n++){var i=e[n],s=this.intl.cldr[i];if(s.name&&s.calendar&&s.numbers&&s.name!==o.Constants.defaultLocaleId){t=s.name;break}}return t},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){t?i.isEqual(t,this._value)||(this._value=i.cloneDate(t),this.modifyExisting(!0)):(this._value=i.getDate(new Date),this.modifyExisting(!1)),this.resetInvalidDate()},t.prototype.hasValue=function(){var t=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce((function(e,n){return e||"literal"!==n.type&&"dayperiod"!==n.type&&t.getExisting(n.pattern[0])}),!1)},t.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return i.cloneDate(this.value)},t.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},t.prototype.getTextAndFormat=function(t){void 0===t&&(t="");var e=t||this.format,n=this.intl.formatDate(this.value,e,this.localeId),i=this.dateFormatString(this.value,e);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var s="",o=this.intl.formatDate(this.value,e,this.localeId),l=this.getFormattedInvalidDates(e),h=0;h<o.length;h++){var u=i.symbols[h];if("literal"===i.partMap[h].type)s+=n[h];else if(this.getInvalidDatePartValue(u))if("M"===u)if(i.partMap[h].pattern.length>2)s+=l[u][h];else if(this.getInvalidDatePartValue(u)){var c=r.parseToInt(this.getInvalidDatePartValue(u)+1).toString(),d=a.padZero(Math.abs(i.partMap[h].pattern.length-c.length))+c;s+=d,h+=Math.max(0,d.length-1)}else s+=l[u][h];else this.getInvalidDatePartValue(u)?(s+=this.getInvalidDatePartValue(u),h+=Math.max(0,this.getInvalidDatePartValue(u).toString().length-1)):s+=l[u][h];else s+=n[h]}n=s}return this.merge(n,i)},t.prototype.getFormattedInvalidDates=function(t){var e=this;void 0===t&&(t="");var n=t||this.format,i={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){var s=e.getInvalidDatePart(t).date;if(s){var a=e.intl.formatDate(s,n,e.localeId);i[t]=a}})),i},t.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,n=0;n<e.length;n++)this.setExisting(e[n],t)},t.prototype.getExisting=function(t){switch(t){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},t.prototype.setExisting=function(t,e){switch(t){case"y":this.year=e,!1===e&&this._value.setFullYear(2e3);break;case"M":this.month=e,!1===e&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},t.prototype.modifyPart=function(t,e){var n,s=i.cloneDate(this.value),a=i.cloneDate(this.value),o=!1,l=0;if(this.autoCorrectParts)switch(t){case"y":s.setFullYear(s.getFullYear()+e);break;case"M":s=i.addMonths(this.value,e);break;case"d":case"E":s.setDate(s.getDate()+e);break;case"h":case"H":s.setHours(s.getHours()+e),o=!0;break;case"m":s.setMinutes(s.getMinutes()+e),o=!0;break;case"s":s.setSeconds(s.getSeconds()+e),o=!0;break;case"S":s.setMilliseconds(s.getMilliseconds()+e);break;case"a":s.setHours(s.getHours()+12*e),o=!0}else{var h="M"===t,u="d"===t||"E"===t,c=this._partiallyInvalidDate.invalidDateParts||{},d=c[t],p=c.y.value||s.getFullYear(),m=c.M.value||s.getMonth(),f=c.d.value||c.E.value||s.getDate(),v=c.h.value||c.H.value||s.getHours(),g=c.m.value||s.getMinutes(),y=c.s.value||s.getSeconds(),D=c.S.value||s.getMilliseconds();switch(t){case"y":p+=e;break;case"M":m+=e;break;case"d":case"E":f+=e;break;case"h":case"H":v+=e;break;case"m":g+=e;break;case"s":y+=e;break;case"S":D+=e}if("M"===t){if((m<0||m>11)&&this.getExisting(t))return void this.setExisting(t,!1);m=(12+m)%12}var E=i.createDate(p,m,f,v,g,y,D),b=h||u?this.modifyDateSymbolWithValue(s,t,h?m:f):null,S=r.areDatePartsEqualTo(E,p,m,f,v,g,y,D);if(this.getValue()&&r.areDatePartsEqualTo(E,p,m,f,v,g,y,D))s=i.cloneDate(E),this.markDatePartsAsExisting();else if(h&&b)b.getMonth()===m?this.getExisting("d")?S?(s=i.cloneDate(E),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:m,date:i.cloneDate(b),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):S?(this.resetInvalidDateSymbol(t),s=i.cloneDate(E),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),s=i.cloneDate(b)):(n=!0,this.setInvalidDatePart(t,{value:m,date:i.cloneDate(b),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1));else if(u&&b)b.getDate()===f?this.getExisting("M")?S?(s=i.cloneDate(E),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:f,date:i.cloneDate(b),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):S?(s=i.cloneDate(E),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),s=i.cloneDate(b)):(n=!0,this.setInvalidDatePart(t,{value:f,date:i.cloneDate(this.value),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1));else{switch(t){case"y":s.setFullYear(s.getFullYear()+e);break;case"M":s=i.addMonths(this.value,e);break;case"d":case"E":s.setDate(s.getDate()+e);break;case"h":case"H":s.setHours(s.getHours()+e),o=!0;break;case"m":s.setMinutes(s.getMinutes()+e),o=!0;break;case"s":s.setSeconds(s.getSeconds()+e),o=!0;break;case"S":s.setMilliseconds(s.getMilliseconds()+e);break;case"a":s.setHours(s.getHours()+12*e),o=!0}if(n=!0,d&&d.value)l=r.parseToInt(d.value);else if(!r.isPresent(d.value))switch(s=i.cloneDate(a),t){case"y":l=a.getFullYear();break;case"M":l=a.getMonth();break;case"d":case"E":l=a.getDate();break;case"h":case"H":l=a.getHours();break;case"m":l=a.getMinutes();break;case"s":l=a.getSeconds();break;case"S":l=a.getMilliseconds()}var M=Math.max(0,l+e);"y"!==t&&(M=r.clamp(l+e,0,99)),this.setInvalidDatePart(t,{value:M,date:i.cloneDate(s),startDateOffset:(this.getInvalidDatePart(t).startDateOffset||0)+e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)}}this.shouldNormalizeCentury()&&(s=this.normalizeCentury(s)),o&&!this.cycleTime&&(s.getDate(),this._value.getDate()),n||(this.setExisting(t,!0),this._value=s,this.getValue()&&this.resetInvalidDate())},t.prototype.parsePart=function(t){for(var e,n=t.symbol,s=t.currentChar,o=t.resetSegmentValue,l=t.cycleSegmentValue,h=t.rawTextValue,u=t.isDeleting,c=t.originalFormat,d=!l,p=this.dateFormatString(this.value,this.format),m=p.partMap.filter((function(t){return"literal"===t.type})).map((function(t,e){return{datePartIndex:e,type:t.type,pattern:t.pattern,literal:""}})),f=0;f<m.length;f++){for(var v=m[f],g=0;g<v.pattern.length;g++)m[f+g]&&(m[f+g].literal=v.pattern[g]);f+=v.pattern.length-1}var y={value:null,switchPart:!1,resetPart:d&&"M"===n&&p.partMap.filter((function(t){return"month"===t.type})).some((function(t){return t.pattern.length>2}))};if(!s){if(!d)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),{value:null,switchToNext:!1};for(f=0;f<m.length;f++){var D=m[f].literal,E=h.startsWith(D),b=h.endsWith(D),S=h.indexOf(D+D)>=0;if(E||b||S)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),r.extend(y,{value:null,switchToNext:!1})}}var M=this.intl.formatDate(this.value,this.format,this.localeId),P=p.symbols,I=!1,x="",C="",O="",w="",F="",k="",V=c.indexOf(n),_=c.lastIndexOf(n)-V+1,T=this.format===P||this.format===c||this.format.length===c.length;if(d){var A=0;for(f=0;f<M.length;f++){if(P[f]===n)C+=this.getExisting(n)?M[f]:"0",u?(A<_-1&&(O+=h[f]||""),A++):O+=h[f]||"",I=!0;else I?(k+=M[f],F+=M[f]):(x+=M[f],w+=M[f])}if(T){if(c.length<h.length&&(O+=s),O.length>_)return r.extend(y,{value:null,switchToNext:!1})}else{A=0,C="",O="",x="",k="",I=!1;for(f=0;f<c.length;f++){if(c[f]===n)C+=this.getExisting(n)?M[f]||"":"0",u?(A<_-1&&(O+=h[f]||""),A++):O+=h[f]||"",I=!0;else I?k+=h[f]||"":x+=h[f]||""}c.length<h.length&&(O+=s)}}else for(f=0;f<M.length;f++){if(P[f]===n)C+=this.getExisting(n)?M[f]:"0",I=!0;else I?k+=M[f]:x+=M[f]}var N=null,j=this.matchMonth(s),L=this.matchDayPeriod(s,n),K="0"===s,H=this.leadingZero||{};K&&!d?0!==parseInt(o?s:C+s,10)||this.isAbbrMonth(p.partMap,n)||this.incrementLeadingZero(n):this.resetLeadingZero();var B=this.partPattern(p.partMap,n),W=B?B.pattern:null;if(d&&u&&!O)return this.setExisting(n,!1),r.extend(y,{value:null,switchToNext:!1});var R=C.length-3,Y=!0;for(f=Math.max(0,R);f<=C.length&&Y;f++){this.autoCorrectParts||(Y=!1);var Z=o?s:d?O:C.substring(f)+s;d&&(Y=!1,Z=a.unpadZero(Z));var U=parseInt(Z,10),q=x+Z+k;N=this.intl.parseDate(q,this.format,this.localeId),!d||T||r.isValidDate(N)||(N=this.intl.parseDate(w+Z+F,this.format,this.localeId));var z=!isNaN(parseInt(s,10))||d&&u&&""===s;if(!N&&!isNaN(U)&&z){if("M"===n&&!j){var G=U-1;G>-1&&G<12&&((N=i.cloneDate(this.value)).setMonth(G),N.getMonth()!==G&&(N=i.lastDayOfMonth(i.addMonths(N,-1))))}"y"===n&&(N=i.createDate(parseInt(Z,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(d&&r.isValidDate(N)||!d&&N)&&this.date&&N.getDate()!==this.value.getDate()&&(N=i.lastDayOfMonth(i.addMonths(N,-1))))}if(d&&r.isValidDate(N)||!d&&N){var J=this.intl.parseDate(""+x+this.peek(Z,W)+k,this.format,this.localeId),Q=this.patternLength(W)||W.length,X=((this.leadingZero||{})[n]||0)+(a.unpadZero(Z)||s).length>=Q,$=null===J||H[n]&&W.length<=Z.length||X;return this.shouldNormalizeCentury()&&(N=this.normalizeCentury(N)),this._value=N,this.setExisting(n,!0),r.extend(y,{value:this.value,switchToNext:$})}}if(j&&(N=this.intl.parseDate(x+j+k,this.format,this.localeId)))return this._value=N,this.setExisting(n,!0),r.extend(y,{value:this.value,switchToNext:!1});if(L&&(N=this.intl.parseDate(x+L+k,this.format)))return this._value=N,r.extend(y,{value:this.value,switchToNext:!0});if(K&&(this.leadingZero=this.isAbbrMonth(p.partMap,n)?null:((e={})[n]=!0,e),this.setExisting(n,!1)),d&&O.length>_)return r.extend(y,{value:null,switchToNext:!1});if(!this.autoCorrectParts){this.setExisting(n,!1);var tt=void 0,et=d?O:C,nt=r.parseToInt(et);if(r.isNumber(nt)&&(tt="M"===n?r.clamp(nt-1,0,11):nt),r.isNumber(tt)){var it=this.modifyDateSymbolWithValue(this.value,n,tt);this.setExisting(n,!1),this.setInvalidDatePart(n,{value:tt,date:i.cloneDate(it),startDate:this._partiallyInvalidDate.startDate||i.cloneDate(this.value)})}}return r.extend(y,{value:null,switchToNext:!1})},t.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(a.dateSymbolMap,{})[t]},t.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},t.prototype.setLeadingZero=function(t){this.leadingZero=t},t.prototype.normalizeCentury=function(t){if(!r.isPresent(t))return t;var e=r.cropTwoDigitYear(t),n=this.getNormalizedCenturyBase(e);return r.setYears(t,n+e)},t.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},t.prototype.isAbbrMonth=function(t,e){var n=this.partPattern(t,e);return"month"===n.type&&n.names},t.prototype.partPattern=function(t,e){return t.filter((function(t){return-1!==t.pattern.indexOf(e)}))[0]},t.prototype.peek=function(t,e){var n=t.replace(/^0*/,"")+"0";return a.padZero(e.length-n.length)+n},t.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var n=parseInt(this.typedMonthPart,10);if(n>=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},t.prototype.matchDayPeriod=function(t,e){var n=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return""},t.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),n=0;n<e.length;n++)if("month"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return[]},t.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),n=0;n<e.length;n++)if("dayperiod"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return null},t.prototype.patternLength=function(t){return"y"===t[0]?4:l.test(t)?2:0},t.prototype.dateFormatString=function(t,e){for(var n=this.intl.splitDateFormat(e,this.localeId),i=[],a=[],r=0;r<n.length;r++)for(var l=this.intl.formatDate(t,{pattern:n[r].pattern},this.localeId).length;l>0;)i.push(this.symbols[n[r].pattern[0]]||o.Constants.formatSeparator),a.push(n[r]),l--;var h=new s.Mask;return h.symbols=i.join(""),h.partMap=a,h},t.prototype.merge=function(t,e){for(var n,i="",s="",a=e.symbols,r=function(r){if(-1===o.knownParts.indexOf(a[r])||o.getExisting(a[r]))i=t[r]+i,s=a[r]+s;else{for(var l=a[r];r>=0&&l===a[r];)r--;if(r++,o.leadingZero&&o.leadingZero[l])i="0"+i;else if(!o.autoCorrectParts&&o.getInvalidDatePartValue(l)){var h=e.partMap[r],u=e.partMap.filter((function(t){return t.type===h.type&&t.pattern===h.pattern})),c=t.substr(r,u.length);i=c+i}else i=o.dateFieldName(e.partMap[r])+i;for(;s.length<i.length;)s=a[r]+s}n=r},o=this,l=a.length-1;l>=0;l--)r(l),l=n;return{text:i,format:s}},t.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]?e[t.type]:"formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e}))},t.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},t.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some((function(t){return"yy"===t.pattern}))},t.prototype.resetInvalidDate=function(){var t=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){t.resetInvalidDatePart(e)}))},t.prototype.resetInvalidDateSymbol=function(t){var e=this;this.resetInvalidDatePart(t);var n=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){e._partiallyInvalidDate.invalidDateParts[t]&&r.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(n=!1)})),n&&this.resetInvalidDate()},t.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},t.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},t.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},t.prototype.setInvalidDatePart=function(t,e){var n=e.value,i=void 0===n?null:n,s=e.date,a=void 0===s?null:s,r=e.startDateOffset,o=void 0===r?0:r,l=e.startDate,h=void 0===l?null:l;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=i,this._partiallyInvalidDate.invalidDateParts[t].date=a,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=o,this._partiallyInvalidDate.startDate=h)},t.prototype.modifyDateSymbolWithOffset=function(t,e,n){var s=i.cloneDate(t),a=!1;switch(e){case"y":s.setFullYear(s.getFullYear()+n);break;case"M":s=i.addMonths(this.value,n);break;case"d":case"E":s.setDate(s.getDate()+n);break;case"h":case"H":s.setHours(s.getHours()+n),a=!0;break;case"m":s.setMinutes(s.getMinutes()+n),a=!0;break;case"s":s.setSeconds(s.getSeconds()+n),a=!0;break;case"S":s.setMilliseconds(s.getMilliseconds()+n);break;case"a":s.setHours(s.getHours()+12*n),a=!0}return{date:s,timeModified:a}},t.prototype.modifyDateSymbolWithValue=function(t,e,n){var s=i.cloneDate(t);switch(e){case"y":s.setFullYear(n);break;case"M":s=i.addMonths(t,n-t.getMonth());break;case"d":case"E":s.setDate(n);break;case"h":case"H":s.setHours(n);break;case"m":s.setMinutes(n);break;case"s":s.setSeconds(n);break;case"S":s.setMilliseconds(n);break;case"a":s.setHours(n)}return s},t.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},t}();e.DateObject=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){this.symbols="",this.partMap=[]};e.Mask=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),s={events:{}},a=function(){function t(t){this.options=i.extend({},s,t)}return t.prototype.destroy=function(){},t.prototype.trigger=function(t,e){void 0===e&&(e={});var n={defaultPrevented:!1,preventDefault:function(){n.defaultPrevented=!0}};return!!i.isFunction(this.options.events[t])&&(this.options.events[t](i.extend(n,e,{sender:this})),n.defaultPrevented)},t}();e.Observable=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.None="none",t.Caret="caret",t.Selection="selection"}(e.DateInputInteractionMode||(e.DateInputInteractionMode={}))}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-date-math"),require("tslib")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.KendoDateinputsCommon=e(require("@progress/kendo-date-math"),require("tslib")):t.KendoDateinputsCommon=e(t.KendoDateMath,t.self)}(window,(function(t,e){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(0),s=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},a=function(t){return t instanceof HTMLElement};e.isPresent=function(t){return null!=t},e.isDocumentAvailable=function(){return!!document},e.isNumber=function(t){return e.isPresent(t)&&"number"==typeof t&&!Number.isNaN(t)},e.parseToInt=function(t){return parseInt(t,10)},e.clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},e.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},e.deepExtend=function(t){for(var n,i,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return t;var l=r.shift();if(s(t)&&s(l))for(var h in l)a(l[h])?t[h]=l[h]:s(l[h])?(t[h]||e.extend(t,((n={})[h]={},n)),e.deepExtend(t[h],l[h])):e.extend(t,((i={})[h]=l[h],i));return e.deepExtend.apply(void 0,[t].concat(r))},e.noop=function(){},e.isFunction=function(t){return"function"==typeof t},e.cropTwoDigitYear=function(t){return!e.isPresent(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},e.setYears=(i="setFullYear",function(t,e){var n=r.cloneDate(t);return n[i](e),n}),e.millisecondDigitsInFormat=function(t){var e=t&&t.match(/S+(\1)/);return e?e[0].length:0},e.millisecondStepFor=function(t){return Math.pow(10,3-t)},e.areDatePartsEqualTo=function(t,e,n,i,r,s,a,o){return!(!t||t.getFullYear()!==e||t.getMonth()!==n||t.getDate()!==i||t.getHours()!==r||t.getMinutes()!==s||t.getSeconds()!==a||t.getMilliseconds()!==o)},e.isValidDate=function(t){return e.isPresent(t)&&t.getTime&&e.isNumber(t.getTime())}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4);e.padZero=function(t){return new Array(Math.max(t,0)).fill("0").join("")},e.unpadZero=function(t){return t.replace(/^0*/,"")},e.approximateStringMatching=function(t){var e=t.oldText,n=t.newText,s=t.formatPattern,a=t.selectionStart,o=t.isInCaretMode,l=t.keyEvent,h=e[a+e.length-n.length],u=e.substring(0,a+e.length-n.length),c=n.substring(0,a),d=[];if(u===c&&a>0)return d.push([s[a-1],c[a-1]]),d;if(0===u.indexOf(c)&&o&&(l.key===r.Key.DELETE||l.key===r.Key.BACKSPACE)||0===u.indexOf(c)&&!o&&(0===c.length||s[c.length-1]!==s[c.length])){var p="";o||1!==c.length||d.push([s[0],c[0]]);for(var m=c.length;m<u.length;m++)s[m]!==p&&s[m]!==i.Constants.formatSeparator&&(p=s[m],d.push([p,""]));return d}if(o&&(0===c.indexOf(u)||s[a-1]===i.Constants.formatSeparator)||!o&&(0===c.indexOf(u)||s[a-1]===i.Constants.formatSeparator)){var f=s[0];for(m=Math.max(0,u.length-1);m<s.length;m++)if(s[m]!==i.Constants.formatSeparator){f=s[m];break}return[[f,c[a-1]]]}return!o&&" "===c[c.length-1]||!o&&c[c.length-1]===h?[[s[a-1],i.Constants.formatSeparator]]:[[s[a-1],c[a-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,n){return null===t||!(e&&e>t||n&&n<t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Key={DELETE:"Delete",BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",SPACE:" ",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.DateInput=i.DateInput},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(7),s=n(8),a=n(3),o=n(10),l=n(4),h=n(2),u=n(11),c=n(12),d=n(0),p=n(1),m={format:"d",allowNulls:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:(i={},i.valueChange=null,i.input=null,i.inputEnd=null,i.focus=null,i.focusEnd=null,i.blur=null,i.blurEnd=null,i.keydown=null,i.mousewheel=null,i.change=null,i),selectNearestSegmentOnFocus:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:p.Constants.twoDigitYearMax,autoCorrectParts:!0},f=function(t){function e(e,n){var i=t.call(this,n)||this;return i.dateObject=null,i.currentText="",i.currentFormat="",i.interactionMode=c.DateInputInteractionMode.None,i.previousElementSelection={start:0,end:0},i.init(e,n),i}return r.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),e.prototype.init=function(t,e){var n=h.isValidDate(this.options.value)?d.cloneDate(this.options.value):new Date(e.formattedValue);h.isValidDate(n)||(n=null),this.element=t,this.options=h.extend({},m,e),this.intl=this.options.intlService,this.formatPlaceholder=this.options.formatPlaceholder?this.options.formatPlaceholder:"formatPattern",this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=c.DateInputInteractionMode.None,this.forceUpdate()},e.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener("dragStart",this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener("drop",this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener("click",this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener("mousedown",this.onElementMouseDown),this.element.addEventListener("touchstart",this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener("mouseup",this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener("input",this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener("keydown",this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener("focus",this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener("blur",this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener("change",this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener("paste",this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.addEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.unbindEvents=function(){this.element.removeEventListener("dragStart",this.onElementDragStart),this.element.removeEventListener("drop",this.onElementDrop),this.element.removeEventListener("touchstart",this.onElementMouseDown),this.element.removeEventListener("mousedown",this.onElementMouseDown),this.element.removeEventListener("mouseup",this.onElementMouseUp),this.element.removeEventListener("click",this.onElementClick),this.element.removeEventListener("input",this.onElementInput),this.element.removeEventListener("keydown",this.onElementKeyDown),this.element.removeEventListener("focus",this.onElementFocus),this.element.removeEventListener("blur",this.onElementBlur),this.element.removeEventListener("change",this.onElementChange),this.element.removeEventListener("paste",this.onElementPaste),this.element.removeEventListener("DOMMouseScroll",this.onElementMouseWheel),this.element.removeEventListener("mousewheel",this.onElementMouseWheel)},e.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=h.extend(this.options,t),e&&(this.unbindEvents(),this.init(this.element,this.options))},e.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},e.prototype.isInCaretMode=function(){return this.interactionMode===c.DateInputInteractionMode.Caret},e.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},e.prototype.onElementDragStart=function(t){t.preventDefault()},e.prototype.onElementDrop=function(t){t.preventDefault()},e.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},e.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},e.prototype.onElementClick=function(t){this.mouseDownStarted=!1;var e=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),3===t.detail);else if(this.isActive&&this.options.selectNearestSegmentOnFocus){var n=this.element.selectionStart!==this.element.selectionEnd,i=h.isPresent(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,r=!n&&i?0:this.caret()[0];this.selectNearestSegment(r)}else this.setSelection(this.selectionByIndex(e.start))},e.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.keyDownEvent||{},n=e.keyCode===o.KeyCode.BACKSPACE||e.key===l.Key.BACKSPACE,i=e.keyCode===o.KeyCode.DELETE||e.key===l.Key.DELETE;if(this.element&&this.dateObject){if(this.isPasteInProgress)return this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),void(this.isPasteInProgress=!1);var r=this.interactionMode;!this.options.allowCaretMode||r===c.DateInputInteractionMode.Caret||i||n||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=c.DateInputInteractionMode.Caret:this.interactionMode=c.DateInputInteractionMode.Selection;var s=this.isInCaretMode();if(s&&this.keyDownEvent.key===l.Key.SPACE)this.restorePreviousInputEventState();else{var u=this.dateObject&&this.dateObject.getValue(),m=this.dateObject.getTextAndFormat(),f=m.text,v=m.format;this.currentFormat=v;var g="";g=s&&(n||i||r===c.DateInputInteractionMode.Caret)?this.previousElementValue:f;var y=this.elementValue,D=a.approximateStringMatching({oldText:g,newText:y,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:s,keyEvent:this.keyDownEvent});if(!s||D&&0!==D.length){if(s&&1===D.length){if(!D[0]||!D[0][0])return void this.restorePreviousInputEventState();if(s&&D[0]&&(D[0][0]===p.Constants.formatSeparator||D[0][1]===p.Constants.formatSeparator))return void this.restorePreviousInputEventState()}var E=1===D.length&&D[0][1]===p.Constants.formatSeparator,b=[],S=!1;if(!E)for(var P=0;P<D.length;P++){var M=this.dateObject.parsePart({symbol:D[P][0],currentChar:D[P][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:n||i,originalFormat:this.currentFormat});b.push(M),S=M.switchToNext}this.options.autoSwitchParts||(S=!1),this.resetSegmentValue=!1;var I,x=b[b.length-1],C=x&&!x.value,O=s&&(n||i)&&C,w=!!x&&x.resetPart,F=!d.isEqual(u,this.dateObject.value),V=this.selection;(!s||O||w)&&(w&&(I=this.currentFormat[V.start]),this.forceUpdate()),D.length&&D[0][0]!==p.Constants.formatSeparator&&(!s||O||w?I?this.setSelection(this.selectionBySymbol(I)):(this.options.autoSwitchParts||D[0][1]!==p.Constants.formatSeparator)&&this.setSelection(this.selectionBySymbol(D[0][0])):s&&(F&&h.isPresent(this.dateObject.getValue())?S&&this.switchDateSegment(1):C&&this.restorePreviousInputEventState())),S||!s||n||i||w||!C?this.options.autoSwitchParts&&(S||E)&&(s||this.switchDateSegment(1)):F?this.currentFormat.length===this.elementValue.length||s&&r!==c.DateInputInteractionMode.Caret&&F||(s&&r!==c.DateInputInteractionMode.Caret?(I=this.currentFormat[V.start],this.forceUpdate(),this.setSelection(this.selectionBySymbol(I))):this.restorePreviousInputEventState()):this.restorePreviousInputEventState(),this.tryTriggerValueChange({oldValue:u,event:t}),this.triggerInputEnd({event:t}),s&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}},e.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},e.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.interactionMode=c.DateInputInteractionMode.None,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},e.prototype.onElementChange=function(t){this.triggerChange({event:t})},e.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){this.keyDownEvent=t,this.previousElementValue=this.element.value;var e=this.selection,n=e.start,i=e.end;this.previousElementSelection={start:n,end:i};var r=(this.options.autoSwitchKeys||[]).map((function(t){return t.toString().toLowerCase().trim()}));if(r.indexOf(t.keyCode.toString())>=0||r.indexOf(t.keyCode)>=0||r.indexOf(t.key.toLowerCase().trim())>=0){var s=r.indexOf(l.Key.TAB.toLowerCase().trim())>=0||r.indexOf(o.KeyCode.TAB)>=0||r.indexOf(o.KeyCode.TAB.toString())>=0;if(!s)return t.preventDefault(),void this.switchDateSegment(1);var a=this.selection,h=a.start,u=a.end;if(t.shiftKey&&s?this.switchDateSegment(-1):this.switchDateSegment(1),h!==this.selection.start||u!==this.selection.end)return void t.preventDefault()}var c=this.currentFormat[this.selection.start],d=this.getStepFromSymbol(c),p=!1;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===o.KeyCode.TAB)){switch(t.keyCode){case o.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),p=!0;break;case o.KeyCode.ARROW_UP:this.modifyDateSegmentValue(d,c,event),p=!0;break;case o.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),p=!0;break;case o.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-d,c,event),p=!0;break;case o.KeyCode.ENTER:break;case o.KeyCode.DELETE:case o.KeyCode.BACKSPACE:if(this.options.allowNulls){var m=this.dateObject.value;this.dateObject.setValue(null),this.forceUpdate(),this.tryTriggerValueChange({oldValue:m,event:t})}return p=!0,void(t.keyCode===o.KeyCode.BACKSPACE&&((this.options.autoSwitchKeys||[]).indexOf(o.KeyCode.BACKSPACE)>=0||(this.options.autoSwitchKeys||[]).indexOf(l.Key.BACKSPACE)>=0)&&this.switchDateSegment(-1));case l.Key.HOME:this.selectNearestSegment(0);break;case l.Key.END:this.selectNearestSegment(this.elementValue.length);break;default:return}p&&t.preventDefault()}}},e.prototype.onElementPaste=function(){this.isPasteInProgress=!0},e.prototype.onElementMouseWheel=function(t){if(this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive){var e=t;e.shiftKey?this.switchDateSegment((e.wheelDelta||-e.detail)>0?-1:1):this.modifyDateSegmentValue((e.wheelDelta||-e.detail)>0?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},e.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;h.isPresent(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e));var n=this.dateObject&&this.dateObject.getValue();this.writeValue(e),this.tryTriggerValueChange({oldValue:n,event:t})},Object.defineProperty(e.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:p.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:p.Constants.defaultDateFormat},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t={start:0,end:0};return null!==this.element&&void 0!==this.element.selectionStart&&(t={start:this.element.selectionStart,end:this.element.selectionEnd}),t},enumerable:!0,configurable:!0}),e.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&this.element.setSelectionRange(t.start,t.end)},e.prototype.selectionBySymbol=function(t){for(var e=-1,n=0,i=0;i<this.currentFormat.length;i++)this.currentFormat[i]===t&&(n=i+1,-1===e&&(e=i));return e<0&&(e=0),this.options.autoCorrectParts||this.currentFormat.length===this.currentText.length||(this.currentFormat.length<this.currentText.length?n+=this.currentText.length-this.currentFormat.length:n=Math.max(0,n-(this.currentFormat.length-this.currentText.length))),{start:e,end:n}},e.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},n=t,i=t-1;n<this.currentFormat.length||i>=0;n++,i--){if(n<this.currentFormat.length&&this.currentFormat[n]!==p.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}if(i>=0&&this.currentFormat[i]!==p.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[i]);break}}return e},e.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){var n=e.start,i=this.currentFormat[n-(this.elementValue.length-this.currentFormat.length)]||this.currentFormat[n],r="",s="";if(t<0){for(var a=n+t;a>=0;a--)if((s=this.currentFormat[a])!==p.Constants.formatSeparator&&s!==i){n=a,r=s;break}}else for(a=n+t;a<this.currentFormat.length;a++)if((s=this.currentFormat[a])!==p.Constants.formatSeparator&&s!==i){n=a,r=s;break}if(r)return this.forceUpdate(),this.setSelection(this.selectionBySymbol(r)),void(this.interactionMode=c.DateInputInteractionMode.Selection)}var o=this.selection,l=o.start,h=o.end;if(l<h&&this.currentFormat[l]!==this.currentFormat[h-1])return this.setSelection(this.selectionByIndex(t>0?l:h-1)),void(this.resetSegmentValue=!0);for(var u=this.currentFormat[l],d=l+t;d>0&&d<this.currentFormat.length&&(this.currentFormat[d]===u||this.currentFormat[d]===p.Constants.formatSeparator);)d+=t;if(this.currentFormat[d]!==p.Constants.formatSeparator){for(var m=d;m>=0&&m<this.currentFormat.length&&this.currentFormat[m]===this.currentFormat[d];)m+=t;d>m&&(m+1!==l||d+1!==h)?(this.setSelection({start:m+1,end:d+1}),this.resetSegmentValue=!0):d<m&&(d!==l||m!==h)&&(this.setSelection({start:d,end:m}),this.resetSegmentValue=!0)}},e.prototype.modifyDateSegmentValue=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n={}),this.dateObject){var i=this.value,r=1*t,s=this.caret();if("S"===(e=e||this.currentFormat[s[0]])&&!this.options.steps.millisecond){var a=h.millisecondDigitsInFormat(this.inputFormat);r=h.millisecondStepFor(a)}this.dateObject.modifyPart(e,r),this.tryTriggerValueChange({oldValue:i,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e))}},e.prototype.tryTriggerValueChange=function(t){if(void 0===t&&(t={oldValue:null,event:{}}),!d.isEqual(this.value,t.oldValue))return this.triggerValueChange(t)},e.prototype.triggerValueChange=function(t){return void 0===t&&(t={oldValue:null,event:{}}),this.trigger("valueChange",h.extend(t,{value:this.value}))},e.prototype.triggerInput=function(t){return void 0===t&&(t={event:{}}),this.trigger("input",h.extend(t,{value:this.value}))},e.prototype.triggerInputEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("inputEnd",h.extend(t,{value:this.value}))},e.prototype.triggerFocus=function(t){return void 0===t&&(t={event:{}}),this.trigger("focus",h.extend({},t))},e.prototype.triggerFocusEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("focusEnd",h.extend({},t))},e.prototype.triggerBlur=function(t){return void 0===t&&(t={event:{}}),this.trigger("blur",h.extend({},t))},e.prototype.triggerBlurEnd=function(t){return void 0===t&&(t={event:{}}),this.trigger("blurEnd",h.extend({},t))},e.prototype.triggerChange=function(t){return void 0===t&&(t={event:{}}),this.trigger("change",h.extend(t,{value:this.value}))},e.prototype.triggerKeyDown=function(t){return void 0===t&&(t={event:{}}),this.trigger("keydown",h.extend({},t))},e.prototype.triggerMouseWheel=function(t){return void 0===t&&(t={event:{}}),this.trigger("mousewheel",h.extend({},t))},e.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},e.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text,n=t.format;this.currentFormat=n,this.currentText=e},e.prototype.setElementValue=function(t){this.element.value=t},e.prototype.getStepFromSymbol=function(t){switch(t){case"S":return Number(this.options.steps.millisecond);case"s":return Number(this.options.steps.second);case"m":return Number(this.options.steps.minute);case"h":case"H":return Number(this.options.steps.hour);case"M":return Number(this.options.steps.month);case"d":case"E":return Number(this.options.steps.day);case"y":return Number(this.options.steps.year);default:return 1}},e.prototype.restorePreviousInputEventState=function(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()},e.prototype.restorePreviousElementValue=function(){this.setElementValue(this.previousElementValue||"")},e.prototype.restorePreviousElementSelection=function(){var t=this.previousElementSelection,e=t.start,n=t.end;this.setSelection({start:e||0,end:n||0})},e.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},e.prototype.verifyValue=function(t){if(t&&!h.isValidDate(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},e.prototype.refreshElementValue=function(){var t=this.caret()[0],e=this.element,n=this.isActive?this.inputFormat:this.displayFormat,i=this.dateObject.getTextAndFormat(n),r=i.text,s=i.format;this.currentFormat=s,this.currentText=r;var a=!this.isActive&&h.isPresent(this.options.placeholder)&&!this.dateObject.hasValue();h.isPresent(this.options.placeholder)&&(e.placeholder=this.options.placeholder);var o=a?"":r;this.previousElementValue=this.elementValue,this.setElementValue(o),this.isActive&&!this.options.allowCaretMode&&this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(t)},e.prototype.caret=function(t,e){void 0===e&&(e=t);var n=void 0!==t,i=[t,t],r=this.element;if(!n||!this.options.disabled&&!this.options.readonly){try{void 0!==r.selectionStart&&(n&&(h.isDocumentAvailable()&&document.activeElement!==r&&r.focus(),r.setSelectionRange(t,e)),i=[r.selectionStart,r.selectionEnd])}catch(t){i=[]}return i}},e.prototype.selectNearestSegment=function(t){for(var e=t,n=t-1;e<this.currentFormat.length||n>=0;e++,n--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(n>=0&&"_"!==this.currentFormat[n])return void this.selectDateSegment(this.currentFormat[n])}},e.prototype.selectDateSegment=function(t){for(var e=-1,n=0,i=0;i<this.currentFormat.length;i++)this.currentFormat[i]===t&&(n=i+1,-1===e&&(e=i));e<0&&(e=0),this.caret(0,0),this.caret(e,n)},e.prototype.getDateObject=function(t){var e=(this.dateObject||{}||null).leadingZero,n=this.createDateObject({value:t});return n.setLeadingZero(this.isActive?e:null),n},e.prototype.createDateObject=function(t){return void 0===t&&(t={}),new s.DateObject(h.extend({intlService:this.intl,formatPlaceholder:this.formatPlaceholder,format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value},t))},e}(u.Observable);e.DateInput=f},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(9),s=n(3),a=n(2),o=n(1),l=/d|M|H|h|m|s/,h=function(){function t(t){var e=t.intlService,n=t.formatPlaceholder,r=t.format,s=t.cycleTime,a=void 0!==s&&s,l=t.twoDigitYearMax,h=void 0===l?o.Constants.twoDigitYearMax:l,u=t.value,c=void 0===u?null:u,d=t.autoCorrectParts,p=void 0===d||d;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.leadingZero=null,this.typedMonthPart="",this.knownParts="adHhmMsEyS",this.symbols={E:"E",H:"H",M:"M",a:"a",d:"d",h:"h",m:"m",s:"s",y:"y",S:"S"},this._value=i.getDate(new Date),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.intl=e,this.formatPlaceholder=n||"wide",this.format=r,this.cycleTime=a,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=h,this.autoCorrectParts=p,c)this._value=i.cloneDate(c);else{this._value=i.getDate(new Date);for(var m=this.dateFormatString(this.value,this.format).symbols,f=0;f<m.length;f++)this.setExisting(m[f],!1)}}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){(!t||t instanceof Date)&&(this._value=t,this.resetInvalidDate())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localeId",{get:function(){for(var t=o.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),n=0;n<e.length;n++){var i=e[n],r=this.intl.cldr[i];if(r.name&&r.calendar&&r.numbers&&r.name!==o.Constants.defaultLocaleId){t=r.name;break}}return t},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){t?i.isEqual(t,this._value)||(this._value=i.cloneDate(t),this.modifyExisting(!0)):(this._value=i.getDate(new Date),this.modifyExisting(!1)),this.resetInvalidDate()},t.prototype.hasValue=function(){var t=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce((function(e,n){return e||"literal"!==n.type&&"dayperiod"!==n.type&&t.getExisting(n.pattern[0])}),!1)},t.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return i.cloneDate(this.value)},t.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},t.prototype.getTextAndFormat=function(t){void 0===t&&(t="");var e=t||this.format,n=this.intl.formatDate(this.value,e,this.localeId),i=this.dateFormatString(this.value,e);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var r="",o=this.intl.formatDate(this.value,e,this.localeId),l=this.getFormattedInvalidDates(e),h=0;h<o.length;h++){var u=i.symbols[h];if("literal"===i.partMap[h].type)r+=n[h];else if(this.getInvalidDatePartValue(u)){var c=this.getPartsForSegment(i,h);if("M"===u){var d=(a.parseToInt(this.getInvalidDatePartValue(u))+1).toString();if(c.length>2)r+=l[u][h];else if(this.getInvalidDatePartValue(u))r+=s.padZero(c.length-d.length)+d,h+=c.length-1;else r+=l[u][h]}else if(this.getInvalidDatePartValue(u)){d=this.getInvalidDatePartValue(u).toString();r+=s.padZero(c.length-d.length)+d,h+=c.length-1}else r+=l[u][h]}else r+=n[h]}n=r}return this.merge(n,i)},t.prototype.getFormattedInvalidDates=function(t){var e=this;void 0===t&&(t="");var n=t||this.format,i={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){var r=e.getInvalidDatePart(t).date;if(r){var s=e.intl.formatDate(r,n,e.localeId);i[t]=s}})),i},t.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,n=0;n<e.length;n++)this.setExisting(e[n],t)},t.prototype.getExisting=function(t){switch(t){case"y":return this.year;case"M":case"L":return this.month;case"d":return this.date;case"E":return this.date&&this.month&&this.year;case"h":case"H":return this.hours;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},t.prototype.setExisting=function(t,e){switch(t){case"y":this.year=e,!1===e&&this._value.setFullYear(2e3);break;case"M":this.month=e,!1===e&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},t.prototype.modifyPart=function(t,e){if(a.isPresent(t)&&a.isPresent(e)&&0!==e){var n,r=i.cloneDate(this.value),s=!1,o="M"===t,l="d"===t||"E"===t,h=this.getExisting(t);if(this.autoCorrectParts||!l&&!o)switch(t){case"y":r.setFullYear(r.getFullYear()+e);break;case"M":r=i.addMonths(this.value,e);break;case"d":case"E":r.setDate(r.getDate()+e);break;case"h":case"H":r.setHours(r.getHours()+e),s=!0;break;case"m":r.setMinutes(r.getMinutes()+e),s=!0;break;case"s":r.setSeconds(r.getSeconds()+e),s=!0;break;case"S":r.setMilliseconds(r.getMilliseconds()+e);break;case"a":r.setHours(r.getHours()+12*e),s=!0}else{var u=this._partiallyInvalidDate.invalidDateParts||{},c=this.getInvalidDatePartValue(t),d=u.y.value||r.getFullYear(),p=u.M.value||r.getMonth(),m=u.d.value||u.E.value||r.getDate(),f=u.h.value||u.H.value||r.getHours(),v=u.m.value||r.getMinutes(),g=u.s.value||r.getSeconds(),y=u.S.value||r.getMilliseconds();switch(t){case"y":d+=e;break;case"M":p+=e;break;case"d":case"E":m+=e}if("M"===t){if((p<0||p>11)&&h)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);if(!h){if(p<0)p=a.clamp(p%11+1+11,0,11);else{var D=a.isPresent(c)?p:(e-1)%12;p=a.clamp(D,0,11)}p=a.clamp(p,0,11)}p=a.clamp(p,0,11)}else if("d"===t)if(h){if(m<=0||m>31)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t)}else if(!h){if(a.isPresent(c)&&(m<=0||m>31))return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);if(e<0){var E=a.isPresent(c)?m:31-Math.abs(e%31)+1;m=a.clamp(E,1,31)}else{E=a.isPresent(c)?m:e%31;m=a.clamp(E,1,31)}m=a.clamp(m,1,31)}var b=i.createDate(d,p,m,f,v,g,y),S=o||l?this.modifyDateSymbolWithValue(r,t,o?p:m):null,P=a.areDatePartsEqualTo(b,d,p,m,f,v,g,y);this.getValue()&&a.areDatePartsEqualTo(b,d,p,m,f,v,g,y)?(r=i.cloneDate(b),this.markDatePartsAsExisting()):o&&S?S.getMonth()===p?this.getExisting("d")?P?(r=i.cloneDate(b),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:p,date:i.cloneDate(S),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):P?(this.resetInvalidDateSymbol(t),r=i.cloneDate(b),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),r=i.cloneDate(S)):(n=!0,this.setInvalidDatePart(t,{value:p,date:i.cloneDate(S),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):l&&S&&(S.getDate()===m?this.getExisting("M")?P?(r=i.cloneDate(b),this.resetInvalidDateSymbol(t)):(n=!0,this.setInvalidDatePart(t,{value:m,date:i.cloneDate(S),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)):P?(r=i.cloneDate(b),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),r=i.cloneDate(S)):(n=!0,this.setInvalidDatePart(t,{value:m,date:i.cloneDate(this.value),startDateOffset:e,startDate:i.cloneDate(this.value)}),this.setExisting(t,!1)))}this.shouldNormalizeCentury()&&(r=this.normalizeCentury(r)),s&&!this.cycleTime&&(r.getDate(),this._value.getDate()),n||(this.setExisting(t,!0),this._value=r,this.getValue()&&this.resetInvalidDate())}},t.prototype.parsePart=function(t){for(var e,n=t.symbol,r=t.currentChar,o=t.resetSegmentValue,l=t.cycleSegmentValue,h=t.rawTextValue,u=t.isDeleting,c=t.originalFormat,d=!l,p=this.dateFormatString(this.value,this.format),m=p.partMap.filter((function(t){return"literal"===t.type})).map((function(t,e){return{datePartIndex:e,type:t.type,pattern:t.pattern,literal:""}})),f=0;f<m.length;f++){for(var v=m[f],g=0;g<v.pattern.length;g++)m[f+g]&&(m[f+g].literal=v.pattern[g]);f+=v.pattern.length-1}var y={value:null,switchPart:!1,resetPart:d&&"M"===n&&p.partMap.filter((function(t){return"month"===t.type})).some((function(t){return t.pattern.length>2}))};if(!r){if(!d)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),{value:null,switchToNext:!1};for(f=0;f<m.length;f++){var D=m[f].literal,E=h.startsWith(D),b=h.endsWith(D),S=h.indexOf(D+D)>=0;if(E||b||S)return this.resetLeadingZero(),this.setExisting(n,!1),this.resetInvalidDateSymbol(n),a.extend(y,{value:null,switchToNext:!1})}}var P=this.intl.formatDate(this.value,this.format,this.localeId),M=p.symbols,I=!1,x="",C="",O="",w="",F="",V="",k=c.indexOf(n),T=c.lastIndexOf(n)-k+1,_=this.format===M||this.format===c||this.format.length===c.length;if(d){var A=0;for(f=0;f<P.length;f++){if(M[f]===n)C+=this.getExisting(n)?P[f]:"0",u?(A<T-1&&(O+=h[f]||""),A++):O+=h[f]||"",I=!0;else I?(V+=P[f],F+=P[f]):(x+=P[f],w+=P[f])}if(_){if(c.length<h.length)O+=r;else if(!u&&c.length>h.length){var N=c.length-h.length;(j=O.substring(0,O.length-N))&&j.length>0&&(O=j)}if(O.length>T)return a.extend(y,{value:null,switchToNext:!1})}else{A=0,C="",O="",x="",V="",I=!1;for(f=0;f<c.length;f++){if(c[f]===n)C+=this.getExisting(n)?P[f]||"":"0",u?(A<T-1&&(O+=h[f]||""),A++):O+=h[f]||"",I=!0;else I?V+=h[f]||"":x+=h[f]||""}if(c.length<h.length)O+=r;else if(!u&&c.length>h.length){var j;N=c.length-h.length;(j=O.substring(0,O.length-N))&&j.length>0&&(O=j)}}}else for(f=0;f<P.length;f++){if(M[f]===n)C+=this.getExisting(n)?P[f]:"0",I=!0;else I?V+=P[f]:x+=P[f]}var L=null,K=this.matchMonth(r),B=this.matchDayPeriod(r,n),W="0"===r,H=this.leadingZero||{};W&&!d?0!==parseInt(o?r:C+r,10)||this.isAbbrMonth(p.partMap,n)||this.incrementLeadingZero(n):this.resetLeadingZero();var R=this.partPattern(p.partMap,n),Z=R?R.pattern:null;if(d&&u&&!O)return this.setExisting(n,!1),a.extend(y,{value:null,switchToNext:!1});var Y=C.length-3,U=!0;for(f=Math.max(0,Y);f<=C.length&&U;f++){var q=o?r:d?O:C.substring(f)+r;this.autoCorrectParts||(U=!1,d||(q=s.unpadZero(q),q=s.padZero(T-q.length)+q)),d&&(U=!1,q=s.unpadZero(q));var z=parseInt(q,10),G=x+q+V;L=this.intl.parseDate(G,this.format,this.localeId),!d||_||a.isValidDate(L)||(L=this.intl.parseDate(w+q+F,this.format,this.localeId),O=q);var J=!isNaN(parseInt(r,10))||d&&u&&""===r;if(!L&&!isNaN(z)&&J){if("M"===n&&!K){var Q=z-1;Q>-1&&Q<12&&((L=i.cloneDate(this.value)).setMonth(Q),L.getMonth()!==Q&&(L=i.lastDayOfMonth(i.addMonths(L,-1))))}"y"===n&&(L=i.createDate(parseInt(q,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(d&&a.isValidDate(L)||!d&&L)&&this.date&&L.getDate()!==this.value.getDate()&&(L=i.lastDayOfMonth(i.addMonths(L,-1))))}if(d&&a.isValidDate(L)||!d&&L){var X=this.intl.parseDate(""+x+this.peek(q,Z)+V,this.format,this.localeId),$=this.patternLength(Z)||Z.length,tt=((this.leadingZero||{})[n]||0)+(s.unpadZero(q)||r).length>=$,et=null===X||H[n]&&Z.length<=q.length||tt;if(this.shouldNormalizeCentury()&&(L=this.normalizeCentury(L)),this._value=L,this.setExisting(n,!0),d&&et)if("M"===n){if(T<=2)et=(nt=a.parseToInt(O))>=2}else et=et?_?O.length===T:O.length>T:et;return a.extend(y,{value:this.value,switchToNext:et})}}if(K&&(L=this.intl.parseDate(x+K+V,this.format,this.localeId)))return this._value=L,this.setExisting(n,!0),a.extend(y,{value:this.value,switchToNext:!1});if(B&&(L=this.intl.parseDate(x+B+V,this.format)))return this._value=L,a.extend(y,{value:this.value,switchToNext:!0});if(W&&(this.leadingZero=this.isAbbrMonth(p.partMap,n)?null:((e={})[n]=!0,e),this.setExisting(n,!1)),d&&O.length>T)return a.extend(y,{value:null,switchToNext:!1});if(!this.autoCorrectParts){this.setExisting(n,!1);var nt=void 0,it=d?O:C,rt=a.parseToInt(it);if(a.isNumber(rt)&&(nt="M"===n?a.clamp(rt-1,0,11):rt),a.isNumber(nt)){var st=this.modifyDateSymbolWithValue(this.value,n,nt);this.setExisting(n,!1),this.setInvalidDatePart(n,{value:nt,date:i.cloneDate(st),startDate:this._partiallyInvalidDate.startDate||i.cloneDate(this.value)})}}return a.extend(y,{value:null,switchToNext:!1})},t.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(s.dateSymbolMap,{})[t]},t.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},t.prototype.setLeadingZero=function(t){this.leadingZero=t},t.prototype.normalizeCentury=function(t){if(!a.isPresent(t))return t;var e=a.cropTwoDigitYear(t),n=this.getNormalizedCenturyBase(e);return a.setYears(t,n+e)},t.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},t.prototype.isAbbrMonth=function(t,e){var n=this.partPattern(t,e);return"month"===n.type&&n.names},t.prototype.partPattern=function(t,e){return t.filter((function(t){return-1!==t.pattern.indexOf(e)}))[0]},t.prototype.peek=function(t,e){var n=t.replace(/^0*/,"")+"0";return s.padZero(e.length-n.length)+n},t.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0===this.monthNames.length)return"";for(;this.typedMonthPart.length>0;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var n=parseInt(this.typedMonthPart,10);if(n>=1&&n<=12&&n.toString()===this.typedMonthPart)return this.monthNames[n-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},t.prototype.matchDayPeriod=function(t,e){var n=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return""},t.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),n=0;n<e.length;n++)if("month"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return[]},t.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),n=0;n<e.length;n++)if("dayperiod"===e[n].type&&e[n].names)return this.intl.dateFormatNames(t,e[n].names);return null},t.prototype.patternLength=function(t){return"y"===t[0]?4:l.test(t)?2:0},t.prototype.dateFormatString=function(t,e){for(var n=this.intl.splitDateFormat(e,this.localeId),i=[],s=[],a=0;a<n.length;a++)for(var l=this.intl.formatDate(t,{pattern:n[a].pattern},this.localeId).length;l>0;)i.push(this.symbols[n[a].pattern[0]]||o.Constants.formatSeparator),s.push(n[a]),l--;var h=new r.Mask;return h.symbols=i.join(""),h.partMap=s,h},t.prototype.merge=function(t,e){for(var n="",i="",r=e.symbols,s=!1,o=0,l=this.getFormattedInvalidDates(r),h=r.length-1;h>=0;h--){var u=this.getPartsForSegment(e,h);if(-1===this.knownParts.indexOf(r[h])||this.getExisting(r[h]))this.autoCorrectParts?n=t[h]+n:t.length!==r.length?s?n=t[h]+n:o>0?(n=t[h]+n,--o<=0&&(s=!0)):n=(t[h+t.length-r.length]||"")+n:n=t[h]+n,i=r[h]+i;else{var c=r[h],d=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!this.getInvalidDatePartValue(c)){for(;h>=0&&c===r[h];)h--;h++}if(this.leadingZero&&this.leadingZero[c])n="0"+n;else if(!this.autoCorrectParts&&this.getInvalidDatePartValue(c)){var p=this.getInvalidDatePartValue(c).toString();"M"===c?(p=(a.parseToInt(this.getInvalidDatePartValue(c))+1).toString(),u.length>2?n=l[c][h]+n:(n=(p=(a.parseToInt(this.getInvalidDatePartValue(c))+1).toString())+n,o=p.length-u.length)):(n=p+n,d=p.length-1,o=p.length-u.length)}else n=this.dateFieldName(e.partMap[h])+n;for(;i.length<n.length;)i=r[h]+i;0!==d&&(h=h-d+(t.length-r.length))}}return{text:n,format:i}},t.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]?e[t.type]:"formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e}))},t.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},t.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some((function(t){return"yy"===t.pattern}))},t.prototype.resetInvalidDate=function(){var t=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(e){t.resetInvalidDatePart(e)}))},t.prototype.resetInvalidDateSymbol=function(t){var e=this;this.resetInvalidDatePart(t);var n=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach((function(t){e._partiallyInvalidDate.invalidDateParts[t]&&a.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(n=!1)})),n&&this.resetInvalidDate()},t.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},t.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},t.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},t.prototype.setInvalidDatePart=function(t,e){var n=e.value,i=void 0===n?null:n,r=e.date,s=void 0===r?null:r,a=e.startDateOffset,o=void 0===a?0:a,l=e.startDate,h=void 0===l?null:l;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=i,this._partiallyInvalidDate.invalidDateParts[t].date=s,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=o,this._partiallyInvalidDate.startDate=h)},t.prototype.modifyDateSymbolWithOffset=function(t,e,n){var r=i.cloneDate(t),s=!1;switch(e){case"y":r.setFullYear(r.getFullYear()+n);break;case"M":r=i.addMonths(this.value,n);break;case"d":case"E":r.setDate(r.getDate()+n);break;case"h":case"H":r.setHours(r.getHours()+n),s=!0;break;case"m":r.setMinutes(r.getMinutes()+n),s=!0;break;case"s":r.setSeconds(r.getSeconds()+n),s=!0;break;case"S":r.setMilliseconds(r.getMilliseconds()+n);break;case"a":r.setHours(r.getHours()+12*n),s=!0}return{date:r,timeModified:s}},t.prototype.modifyDateSymbolWithValue=function(t,e,n){var r=i.cloneDate(t);switch(e){case"y":r.setFullYear(n);break;case"M":r=i.addMonths(t,n-t.getMonth());break;case"d":case"E":r.setDate(n);break;case"h":case"H":r.setHours(n);break;case"m":r.setMinutes(n);break;case"s":r.setSeconds(n);break;case"S":r.setMilliseconds(n);break;case"a":r.setHours(n)}return r},t.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},t.prototype.getPartsForSegment=function(t,e){for(var n=t.partMap[e],i=[],r=e;r<t.partMap.length;r++){var s=t.partMap[r];if(n.type!==s.type||n.pattern!==s.pattern)break;i.push(s)}for(r=e-1;r>=0;r--){s=t.partMap[r];if(n.type!==s.type||n.pattern!==s.pattern)break;i.unshift(s)}return i},t}();e.DateObject=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){this.symbols="",this.partMap=[]};e.Mask=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r={events:{}},s=function(){function t(t){this.options=i.extend({},r,t)}return t.prototype.destroy=function(){},t.prototype.trigger=function(t,e){void 0===e&&(e={});var n={defaultPrevented:!1,preventDefault:function(){n.defaultPrevented=!0}};return!!i.isFunction(this.options.events[t])&&(this.options.events[t](i.extend(n,e,{sender:this})),n.defaultPrevented)},t}();e.Observable=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.None="none",t.Caret="caret",t.Selection="selection"}(e.DateInputInteractionMode||(e.DateInputInteractionMode={}))}])}));