@progress/kendo-dateinputs-common 0.4.2-dev.202501141100 → 0.4.2-develop.2

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
- System.register("@progress/kendo-dateinputs-common",["tslib","@progress/kendo-date-math"],function(a){var r,o;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){r=e(t)},function(t){o=e(t)}],execute:function(){function n(t){var e;return(s[t]||(e=s[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,n),e.l=!0,e)).exports}var i,s;i=[function(t,r,e){Object.defineProperty(r,"__esModule",{value:!0});function o(t){return t&&"object"==typeof t&&!Array.isArray(t)}var i=e(2);r.isPresent=function(t){return null!=t},r.isDocumentAvailable=function(){return!!document},r.isNumber=function(t){return r.isPresent(t)&&"number"==typeof t&&!Number.isNaN(t)},r.parseToInt=function(t){return parseInt(t,10)},r.isParseableToInt=function(t){return r.isNumber(r.parseToInt(t))&&/^[0-9]+$/.test(t)},r.clamp=function(t,e,i){return Math.min(i,Math.max(e,t))},r.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},r.deepExtend=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!e.length)return t;var n,s=e.shift();if(o(t)&&o(s))for(var a in s)s.hasOwnProperty(a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(n=s[a],n instanceof HTMLElement?t[a]=s[a]:!o(s[a])||s[a]instanceof Date?r.extend(t,((n={})[a]=s[a],n)):(t[a]&&o(t[a])||r.extend(t,((n={})[a]={},n)),r.deepExtend(t[a],s[a])));return r.deepExtend.apply(void 0,[t].concat(e))},r.noop=function(){},r.isFunction=function(t){return"function"==typeof t},r.cropTwoDigitYear=function(t){return!r.isPresent(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},r.setYears=function(t,e){t=i.cloneDate(t);return t.setFullYear(e),t},r.millisecondDigitsInFormat=function(t){t=t&&t.match(/S+(\1)/);return t?t[0].length:0},r.millisecondStepFor=function(t){return Math.pow(10,3-t)},r.areDatePartsEqualTo=function(t,e,i,n,s,a,r,o){return!(!t||t.getFullYear()!==e||t.getMonth()!==i||t.getDate()!==n||t.getHours()!==s||t.getMinutes()!==a||t.getSeconds()!==r||t.getMilliseconds()!==o)},r.isValidDate=function(t){return r.isPresent(t)&&t.getTime&&r.isNumber(t.getTime())},r.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.maxTouchPoints&&2<navigator.maxTouchPoints&&/Macintosh/i.test(navigator.userAgent)}},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},function(t,e){t.exports=o},function(t,e,i){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,i){Object.defineProperty(e,"__esModule",{value:!0});var p=i(1),m=i(3);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,i=t.newText,n=t.formatPattern,s=t.selectionStart,a=t.isInCaretMode,t=t.keyEvent,r=s+e.length-i.length,o=e[r],l=e.substring(0,r),e=i.substring(0,s),h=[];if(l===e&&0<s)return h.push([n[s-1],e[s-1]]),h;if(0===l.indexOf(e)&&a&&(t.key===m.Key.DELETE||t.key===m.Key.BACKSPACE)||0===l.indexOf(e)&&!a&&(0===e.length||n[e.length-1]!==n[e.length])){var u="";a||1!==e.length||h.push([n[0],e[0]]);for(var c=e.length;c<l.length;c++)n[c]!==u&&n[c]!==p.Constants.formatSeparator&&(u=n[c],h.push([u,""]));return h}if((!a||0!==e.indexOf(l)&&n[s-1]!==p.Constants.formatSeparator)&&(a||0!==e.indexOf(l)&&n[s-1]!==p.Constants.formatSeparator))return" "===e[e.length-1]||e[e.length-1]===o&&"_"===n[r]?[[n[s-1],p.Constants.formatSeparator]]:[[n[s-1],e[s-1]]];for(var d=n[0],c=Math.max(0,l.length-1);c<n.length;c++)if(n[c]!==p.Constants.formatSeparator){d=n[c];break}return[[d,e[s-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,i){return null===t||!(e&&t<e||i&&i<t)}},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),(e=e.DateInputInteractionMode||(e.DateInputInteractionMode={})).None="none",e.Caret="caret",e.Selection="selection"},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s={events:{}};function a(t){this.options=n.extend({},s,t)}a.prototype.destroy=function(){},a.prototype.trigger=function(t,e){void 0===e&&(e={});var i={defaultPrevented:!1,preventDefault:function(){i.defaultPrevented=!0}};return!!n.isFunction(this.options.events[t])&&(this.options.events[t](n.extend(i,e,{sender:this})),i.defaultPrevented)},e.Observable=a},function(t,e,i){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,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=function(){this.symbols="",this.partMap=[]}},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var X=i(2),o=i(8),tt=i(4),et=i(0),u=i(1),n=/d|M|H|h|m|s/;function s(t){var e=t.intlService,i=t.formatPlaceholder,n=t.format,s=t.cycleTime,s=void 0!==s&&s,a=t.twoDigitYearMax,a=void 0===a?u.Constants.twoDigitYearMax:a,r=t.value,r=void 0===r?null:r,o=t.autoCorrectParts,o=void 0===o||o,t=t.toggleDayPeriod,t=void 0!==t&&t;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.dayperiod=!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=this.getDefaultDate(),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.setOptions({intlService:e,formatPlaceholder:i,format:n,cycleTime:s,twoDigitYearMax:a,value:r,autoCorrectParts:o,toggleDayPeriod:t}),r)this._value=X.cloneDate(r);else{this._value=this.getDefaultDate();for(var l=this.dateFormatString(this.value,this.format).symbols,h=0;h<l.length;h++)this.setExisting(l[h],!1)}}Object.defineProperty(s.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(s.prototype,"localeId",{get:function(){for(var t=u.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),i=0;i<e.length;i++){var n=e[i],n=this.intl.cldr[n];if(n.name&&n.calendar&&n.numbers&&n.name!==u.Constants.defaultLocaleId){t=n.name;break}}return t},enumerable:!0,configurable:!0}),s.prototype.setOptions=function(t){this.intl=t.intlService,this.formatPlaceholder=t.formatPlaceholder||"wide",this.format=t.format,this.cycleTime=t.cycleTime,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=t.twoDigitYearMax,this.autoCorrectParts=t.autoCorrectParts,this.toggleDayPeriod=t.toggleDayPeriod},s.prototype.setValue=function(t){t?X.isEqual(t,this._value)||(this._value=X.cloneDate(t),this.modifyExisting(!0)):(this._value=this.getDefaultDate(),this.modifyExisting(!1)),this.resetInvalidDate()},s.prototype.hasValue=function(){var i=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce(function(t,e){return t||"literal"!==e.type&&"dayperiod"!==e.type&&i.getExisting(e.pattern[0])},!1)},s.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return X.cloneDate(this.value)},s.prototype.createDefaultDate=function(){return X.createDate(2e3,0,31)},s.prototype.getDefaultDate=function(){return X.getDate(this.createDefaultDate())},s.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},s.prototype.getTextAndFormat=function(t){var t=(t=void 0===t?"":t)||this.format,e=this.intl.formatDate(this.value,t,this.localeId),i=this.dateFormatString(this.value,t);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var n="",s=this.intl.formatDate(this.value,t,this.localeId),a=this.getFormattedInvalidDates(t),r=0;r<s.length;r++){var o,l,h=i.symbols[r];"literal"!==i.partMap[r].type&&this.getInvalidDatePartValue(h)?(o=this.getPartsForSegment(i,r),"M"===h?(l=(et.parseToInt(this.getInvalidDatePartValue(h))+1).toString(),!(2<o.length)&&this.getInvalidDatePartValue(h)?(n+=tt.padZero(o.length-l.length)+l,r+=o.length-1):n+=a[h][r]):this.getInvalidDatePartValue(h)?(l=this.getInvalidDatePartValue(h).toString(),n+=tt.padZero(o.length-l.length)+l,r+=o.length-1):n+=a[h][r]):n+=e[r]}e=n}return this.merge(e,i)},s.prototype.getFormattedInvalidDates=function(t){var i=this,n=(t=void 0===t?"":t)||this.format,s={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){var e=i.getInvalidDatePart(t).date;e&&(e=i.intl.formatDate(e,n,i.localeId),s[t]=e)}),s},s.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,i=0;i<e.length;i++)this.setExisting(e[i],t)},s.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"t":case"a":return this.dayperiod;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},s.prototype.setExisting=function(t,e){switch(t){case"y":!1===(this.year=e)&&this._value.setFullYear(2e3);break;case"M":!1===(this.month=e)&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"t":case"a":this.dayperiod=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},s.prototype.modifyPart=function(t,e){if(et.isPresent(t)&&et.isPresent(e)&&0!==e){var i,n=X.cloneDate(this.value),s=!1,a="M"===t,r="d"===t||"E"===t,o=this.getExisting(t);if(this.autoCorrectParts||!r&&!a)switch(t){case"y":n.setFullYear(n.getFullYear()+e);break;case"M":n=X.addMonths(this.value,e);break;case"d":case"E":n.setDate(n.getDate()+e);break;case"h":case"H":n.setHours(n.getHours()+e),s=!0;break;case"m":n.setMinutes(n.getMinutes()+e),s=!0;break;case"s":n.setSeconds(n.getSeconds()+e),s=!0;break;case"S":n.setMilliseconds(n.getMilliseconds()+e);break;case"a":var l=n.getHours();this.toggleDayPeriod?n.setHours(12<=l?l-12:l+12):n.setHours(n.getHours()+12*e),s=!0}else{var h=this._partiallyInvalidDate.invalidDateParts||{},u=this.getInvalidDatePartValue(t),c=h.y.value||n.getFullYear(),d=h.M.value||n.getMonth(),p=h.d.value||h.E.value||n.getDate(),m=h.h.value||h.H.value||n.getHours(),g=h.m.value||n.getMinutes(),f=h.s.value||n.getSeconds(),h=h.S.value||n.getMilliseconds();switch(t){case"y":c+=e;break;case"M":d+=e;break;case"d":case"E":p+=e}if("M"===t){if((d<0||11<d)&&o)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);o||(d=d<0?et.clamp(d%11+1+11,0,11):(v=et.isPresent(u)?d:(e-1)%12,et.clamp(v,0,11)),d=et.clamp(d,0,11)),d=et.clamp(d,0,11)}else if("d"===t)if(o){if(p<=0||31<p)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t)}else if(!o){if(et.isPresent(u)&&(p<=0||31<p))return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);p=(v=e<0?et.isPresent(u)?p:31-Math.abs(e%31)+1:et.isPresent(u)?p:e%31,et.clamp(v,1,31)),p=et.clamp(p,1,31)}var o=X.createDate(c,d,p,m,g,f,h),u=a||r?this.modifyDateSymbolWithValue(n,t,a?d:p):null,v=et.areDatePartsEqualTo(o,c,d,p,m,g,f,h);this.getValue()&&et.areDatePartsEqualTo(o,c,d,p,m,g,f,h)?(n=X.cloneDate(o),this.markDatePartsAsExisting()):a&&u?u.getMonth()===d?this.getExisting("d")?v?(n=X.cloneDate(o),this.resetInvalidDateSymbol(t)):(i=!0,this.setInvalidDatePart(t,{value:d,date:X.cloneDate(u),startDateOffset:e,startDate:X.cloneDate(this.value)}),this.setExisting(t,!1)):v?(this.resetInvalidDateSymbol(t),n=X.cloneDate(o),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),n=X.cloneDate(u)):(i=!0,this.setInvalidDatePart(t,{value:d,date:X.cloneDate(u),startDateOffset:e,startDate:X.cloneDate(this.value)}),this.setExisting(t,!1)):r&&u&&(u.getDate()===p?this.getExisting("M")?v?(n=X.cloneDate(o),this.resetInvalidDateSymbol(t)):(i=!0,this.setInvalidDatePart(t,{value:p,date:X.cloneDate(u),startDateOffset:e,startDate:X.cloneDate(this.value)}),this.setExisting(t,!1)):v?(n=X.cloneDate(o),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),n=X.cloneDate(u)):(i=!0,this.setInvalidDatePart(t,{value:p,date:X.cloneDate(this.value),startDateOffset:e,startDate:X.cloneDate(this.value)}),this.setExisting(t,!1)))}this.shouldNormalizeCentury()&&(n=this.normalizeCentury(n)),s&&!this.cycleTime&&(n.getDate(),this._value.getDate()),i||(this.setExisting(t,!0),this._value=n,this.getValue()&&this.resetInvalidDate())}},s.prototype.parsePart=function(t){for(var e=t.symbol,i=t.currentChar,N=t.resetSegmentValue,n=t.cycleSegmentValue,s=t.rawTextValue,j=t.isDeleting,a=t.originalFormat,r=!n,t=this.dateFormatString(this.value,this.format),o=t.partMap.filter(function(t){return"literal"===t.type}).map(function(t,e){return{datePartIndex:e,type:t.type,pattern:t.pattern,literal:""}}),l=t.partMap.map(function(t){return{type:t.type,pattern:t.pattern,text:""}}),h=0;h<o.length;h++){for(var u=o[h],c=0;c<u.pattern.length;c++)o[h+c]&&(o[h+c].literal=u.pattern[c]);h+=u.pattern.length-1}for(h=0;h<l.length;h++){for(u=l[h],c=0;c<u.pattern.length;c++)l[h+c]&&(l[h+c].text=u.pattern[c]);h+=u.pattern.length-1}var d={value:null,switchToNext:!1,resetPart:r&&"M"===e&&t.partMap.filter(function(t){return"month"===t.type}).some(function(t){return 2<t.pattern.length}),hasInvalidDatePart:!1};if(!i){if(!r)return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),et.extend(d,{value:null,switchToNext:!1});for(h=0;h<o.length;h++){var p=o[h].literal,L=s.startsWith(p),K=s.endsWith(p),p=0<=s.indexOf(p+p);if(L||K||p)return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),et.extend(d,{value:null,switchToNext:!1})}}var m=this.intl.formatDate(this.value,this.format,this.localeId),W=t.symbols,g=!1,f="",v="",y="",D="",E="",P="",H="";for(h=0;h<l.length;h++)H+=l[h].text;var n=this.format===W||this.format===H||this.format===a||this.format.length===a.length,b=(n?H:a).indexOf(e),B=(n?H:a).lastIndexOf(e)-b+1,Z=a.length-s.length;if(r||!r&&!this.autoCorrectParts){for(h=0;h<m.length;h++)W[h]===e?(v+=this.getExisting(e)?m[h]:"0",0<Z&&!(y.length+Z<B)||(y+=s[h]||""),g=!0):g?(P+=m[h],E+=m[h]):(f+=m[h],D+=m[h]);if(n&&(H.length<s.length?y+=i:j||(a.length,s.length),y.length>B))return et.extend(d,{value:null,switchToNext:!1});if(!n||!this.autoCorrectParts){for(P=f=y=v="",g=!1,h=0;h<a.length;h++)a[h]===e?(v+=this.getExisting(e)?m[h]||"":"0",0<Z&&!(y.length+Z<B)||(y+=s[h]||""),g=!0):g?P+=s[h-Z]||"":f+=s[h]||"";a.length<s.length&&(y+=i)}}if(!r)if(this.autoCorrectParts)for(P=f=y=v="",g=!1,h=0;h<m.length;h++)W[h]===e?(v+=this.getExisting(e)?m[h]:"0",g=!0):g?P+=m[h]:f+=m[h];else v=N?y:v;var S=null,R=this.matchMonth(i),b=this.matchDayPeriod(i,e),M="0"===i,U=this.leadingZero||{},t=(M?("0"===y&&(y=v),0!==et.parseToInt(N?i:(r?y:v)+i)||this.isAbbrMonth(t.partMap,e)||this.incrementLeadingZero(e)):this.resetLeadingZero(),this.partPattern(t.partMap,e)),Y=t?t.pattern:null,z=this.patternLength(Y)||Y.length;if(r&&j&&!y)this.setExisting(e,!1);else{for(var t=v.length-3,q=!0,I=r?y:v,h=Math.max(0,t);h<=v.length&&q;h++){I=N?i:r?y:v.substring(h)+i,!r&&this.autoCorrectParts||(q=!1,I=tt.unpadZero(I),I=tt.padZero(z-I.length)+I);var x,O=parseInt(I,10),S=this.intl.parseDate(f+I+P,this.format,this.localeId),G=!1,J=(r&&!et.isValidDate(S)&&this.autoCorrectParts&&(S=this.intl.parseDate(D+I+E,this.format,this.localeId),G=!0),!isNaN(parseInt(i,10))||r&&j&&""===i);if(!S&&!isNaN(O)&&J&&this.autoCorrectParts&&("M"!==e||R||-1<(J=O-1)&&J<12&&((S=X.cloneDate(this.value)).setMonth(J),S.getMonth()!==J)&&(S=X.lastDayOfMonth(X.addMonths(S,-1))),"y"===e)&&(S=X.createDate(parseInt(I,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),r&&et.isValidDate(S)||!r&&S)&&this.date&&S.getDate()!==this.value.getDate()&&(S=X.lastDayOfMonth(X.addMonths(S,-1))),r&&et.isValidDate(S)||!r&&S)return x=(O=this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:G,middle:I,patternValue:Y,basePrefix:D,baseSuffix:E,prefix:f,suffix:P,symbol:e,patternLength:z,leadingZero:U})).switchToNext,this.shouldNormalizeCentury()&&(S=this.normalizeCentury(S)),"H"===e&&12<=S.getHours()&&this.setExisting("a",!0),this._value=S,this.setExisting(e,!0),this.resetInvalidDateSymbol(e),this.autoCorrectParts||("M"===e?this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d")):"d"===e&&this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M")),this.hasInvalidDatePart())||(this.markDatePartsAsExisting(),O.peekedDate)||!O.switchToNext||this.autoCorrectParts||"M"===e||"d"===e&&30===O.parsedPeekedValue&&1===this.value.getMonth()&&(x=!1),et.extend(d,{value:this.value,switchToNext:x})}if(R&&(S=this.intl.parseDate(f+R+P,this.format,this.localeId)))return this._value=S,this.setExisting(e,!0),et.extend(d,{value:this.value,switchToNext:!1});if(b&&(S=this.intl.parseDate(f+b+P,this.format)||this.intl.parseDate(D+b+E,this.format)))return this._value=S,this.setExisting(e,!0),et.extend(d,{value:this.value,switchToNext:!0});if(M&&this.setExisting(e,!1),!this.autoCorrectParts){var $,Q,w,C,V,F,k,T,_,A,t=void 0,b=r?y:I,M=et.parseToInt(b);if(et.isNumber(M)&&et.isParseableToInt(b)){if("d"===e&&(M<=0||31<M)||"M"===e&&(M<=0||11<M)){if(r)return et.extend(d,{value:null,switchToNext:!1});M=et.parseToInt(b=i)}return et.isNumber(M)&&et.isParseableToInt(b)?(t="M"===e?M-1:M,$="M"===e,Q="d"===e,w=X.cloneDate(this._value),k=(V=this._partiallyInvalidDate.invalidDateParts||{}).y.value||w.getFullYear(),C=$?t:V.M.value||w.getMonth(),t=Q?t:V.d.value||V.E.value||w.getDate(),T=V.h.value||V.H.value||w.getHours(),_=V.m.value||w.getMinutes(),A=V.s.value||w.getSeconds(),V=V.S.value||w.getMilliseconds(),F=X.createDate(k,C,t,T,_,A,V),k=et.areDatePartsEqualTo(F,k,C,t,T,_,A,V),T=$||Q?this.modifyDateSymbolWithValue(w,e,$?C:t):null,_=!1,$&&T?T.getMonth()===C?this.getExisting("d")?k?(w=X.cloneDate(F),this.resetInvalidDateSymbol(e)):(_=!0,this.setInvalidDatePart(e,{value:C,date:X.cloneDate(T),startDate:X.cloneDate(this.value)}),this.setExisting(e,!1)):k?(this.resetInvalidDateSymbol(e),w=X.cloneDate(F),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(e),w=X.cloneDate(T)):(_=!0,this.setInvalidDatePart(e,{value:C,date:X.cloneDate(T),startDate:X.cloneDate(this.value)}),this.setExisting(e,!1)):Q&&T&&(T.getDate()===t?this.getExisting("M")?k?(w=X.cloneDate(F),this.resetInvalidDateSymbol(e)):(_=!0,this.setInvalidDatePart(e,{value:t,date:X.cloneDate(T),startDate:X.cloneDate(this.value)}),this.setExisting(e,!1)):k?(w=X.cloneDate(F),this.resetInvalidDateSymbol(e),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(e),w=X.cloneDate(T)):(_=!0,this.setInvalidDatePart(e,{value:t,date:X.cloneDate(this.value),startDate:X.cloneDate(this.value)}),this.setExisting(e,!1))),_||(this.setExisting(e,!0),r&&!et.isValidDate(S)?(A=this.intl.parseDate(D+I+E,this.format,this.localeId),et.isValidDate(A)&&(this._value=A)):this._value=w,this.getValue()&&this.resetInvalidDate()),x=!1,x="M"===e?2<=M||2<=b.length:n?this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:!this.autoCorrectParts,middle:I,patternValue:Y,basePrefix:D,baseSuffix:E,prefix:f,suffix:P,symbol:e,patternLength:z,leadingZero:U}).switchToNext:b.length>B,et.extend(d,{value:null,switchToNext:x,hasInvalidDatePart:_})):et.extend(d,{value:null,switchToNext:!1})}}}return et.extend(d,{value:null,switchToNext:!1})},s.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(tt.dateSymbolMap,{})[t]},s.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},s.prototype.setLeadingZero=function(t){this.leadingZero=t},s.prototype.getLeadingZero=function(){return this.leadingZero||{}},s.prototype.normalizeCentury=function(t){var e,i;return et.isPresent(t)?(e=et.cropTwoDigitYear(t),i=this.getNormalizedCenturyBase(e),et.setYears(t,i+e)):t},s.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},s.prototype.isAbbrMonth=function(t,e){t=this.partPattern(t,e);return"month"===t.type&&t.names},s.prototype.partPattern=function(t,e){return t.filter(function(t){return-1!==t.pattern.indexOf(e)})[0]},s.prototype.peek=function(t,e){t=t.replace(/^0*/,"")+"0";return tt.padZero(e.length-t.length)+t},s.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0!==this.monthNames.length)for(;0<this.typedMonthPart.length;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var i=parseInt(this.typedMonthPart,10);if(1<=i&&i<=12&&i.toString()===this.typedMonthPart)return this.monthNames[i-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},s.prototype.matchDayPeriod=function(t,e){t=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(t))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(t))return this.dayPeriods.pm}return""},s.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),i=0;i<e.length;i++)if("month"===e[i].type&&e[i].names)return this.intl.dateFormatNames(t,e[i].names);return[]},s.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),i=0;i<e.length;i++)if("dayperiod"===e[i].type&&e[i].names)return this.intl.dateFormatNames(t,e[i].names);return null},s.prototype.patternLength=function(t){return"y"===t[0]?4:n.test(t)?2:0},s.prototype.dateFormatString=function(t,e){for(var i=this.intl.splitDateFormat(e,this.localeId),n=[],s=[],a=0;a<i.length;a++)for(var r=this.intl.formatDate(t,{pattern:i[a].pattern},this.localeId).length;0<r;)n.push(this.symbols[i[a].pattern[0]]||u.Constants.formatSeparator),s.push(i[a]),r--;e=new o.Mask;return e.symbols=n.join(""),e.partMap=s,e},s.prototype.merge=function(t,e){for(var i="",n="",s=e.symbols,a=!1,r=0,o=this.getFormattedInvalidDates(s),l=s.length-1;0<=l;l--){var h=this.getPartsForSegment(e,l);if(-1===this.knownParts.indexOf(s[l])||this.getExisting(s[l]))this.autoCorrectParts||t.length===s.length||a?i=t[l]+i:0<r?(i=t[l]+i,--r<=0&&(a=!0)):i=(t[l+t.length-s.length]||"")+i,n=s[l]+n;else{var u,c=s[l],d=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!this.getInvalidDatePartValue(c)){for(;0<=l&&c===s[l];)l--;l++}for(this.leadingZero&&this.leadingZero[c]?i="0"+i:!this.autoCorrectParts&&this.getInvalidDatePartValue(c)?(u=this.getInvalidDatePartValue(c).toString(),"M"===c?(u=(et.parseToInt(this.getInvalidDatePartValue(c))+1).toString(),2<h.length?i=o[c][l]+i:(u=(et.parseToInt(this.getInvalidDatePartValue(c))+1).toString(),i=tt.padZero(h.length-u.length)+u+i,d=h.length-1,r=u.length-h.length)):(i=tt.padZero(h.length-u.length)+u+i,d=h.length-1,r=u.length-h.length)):i=this.dateFieldName(e.partMap[l])+i;n.length<i.length;)n=s[l]+n;0!==d&&(l=l-d+(t.length-s.length))}}return{text:i,format:n}},s.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]||("formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e})))},s.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},s.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some(function(t){return"yy"===t.pattern})},s.prototype.resetInvalidDate=function(){var e=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){e.resetInvalidDatePart(t)})},s.prototype.resetInvalidDateSymbol=function(t){var e=this,i=(this.resetInvalidDatePart(t),!0);Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){e._partiallyInvalidDate.invalidDateParts[t]&&et.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(i=!1)}),i&&this.resetInvalidDate()},s.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},s.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},s.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},s.prototype.setInvalidDatePart=function(t,e){var i=e.value,n=e.date,n=void 0===n?null:n,s=e.startDateOffset,s=void 0===s?0:s,e=e.startDate,e=void 0===e?null:e;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=void 0===i?null:i,this._partiallyInvalidDate.invalidDateParts[t].date=n,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=s,this._partiallyInvalidDate.startDate=e)},s.prototype.hasInvalidDatePart=function(){var e=this,i=!1;return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){e._partiallyInvalidDate.invalidDateParts[t]&&et.isPresent(e._partiallyInvalidDate.invalidDateParts[t].value)&&(i=!0)}),i},s.prototype.modifyDateSymbolWithOffset=function(t,e,i){var n=X.cloneDate(t),s=!1;switch(e){case"y":n.setFullYear(n.getFullYear()+i);break;case"M":n=X.addMonths(this.value,i);break;case"d":case"E":n.setDate(n.getDate()+i);break;case"h":case"H":n.setHours(n.getHours()+i),s=!0;break;case"m":n.setMinutes(n.getMinutes()+i),s=!0;break;case"s":n.setSeconds(n.getSeconds()+i),s=!0;break;case"S":n.setMilliseconds(n.getMilliseconds()+i);break;case"a":n.setHours(n.getHours()+12*i),s=!0}return{date:n,timeModified:s}},s.prototype.modifyDateSymbolWithValue=function(t,e,i){var n=X.cloneDate(t);switch(e){case"y":n.setFullYear(i);break;case"M":n=X.addMonths(t,i-t.getMonth());break;case"d":case"E":n.setDate(i);break;case"h":case"H":n.setHours(i);break;case"m":n.setMinutes(i);break;case"s":n.setSeconds(i);break;case"S":n.setMilliseconds(i);break;case"a":n.setHours(i)}return n},s.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},s.prototype.getPartsForSegment=function(t,e){for(var i=t.partMap[e],n=[],s=e;s<t.partMap.length;s++){var a=t.partMap[s];if(i.type!==a.type||i.pattern!==a.pattern)break;n.push(a)}for(s=e-1;0<=s&&(a=t.partMap[s],i.type===a.type&&i.pattern===a.pattern);s--)n.unshift(a);return n},s.prototype.isPeekDateOverflowingDatePart=function(t){var e=t.useBasePrefixAndSuffix,i=t.middle,n=t.patternValue,s=t.basePrefix,a=t.baseSuffix,r=t.prefix,o=t.suffix,l=t.symbol,h=t.patternLength,t=t.leadingZero,u=this.peek(i,n),e=e?""+s+u+a:""+r+u+o,s=this.intl.parseDate(e,this.format,this.localeId),a=((this.leadingZero||{})[l]||0)+tt.unpadZero(i).length>=h;return{peekedDate:s,peekedDateString:e,peekedValue:u,parsedPeekedValue:et.parseToInt(u),switchToNext:null===s||(t[l]?n.length<=i.length:a)}},e.DateObject=s},function(t,e){t.exports=r},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n,s=i(10),a=i(9),I=i(4),x=i(7),O=i(3),w=i(0),r=i(6),C=i(5),V=i(2),F=i(1),o={format:"d",hasPlaceholder:!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={}).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,selectPreviousSegmentOnBackspace:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:F.Constants.twoDigitYearMax,autoCorrectParts:!0,autoFill:!1,toggleDayPeriod:!1},i=(n=r.Observable,s.__extends(l,n),Object.defineProperty(l.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!0,configurable:!0}),l.prototype.init=function(t,e){var i=w.isValidDate(this.options.value)?V.cloneDate(this.options.value):new Date(e.formattedValue);w.isValidDate(i)||(i=null),this.element=t,this.options=w.extend({},o,e,{steps:s.__assign({},o.steps,e.steps)}),this.intl=this.options.intlService,this.dateObject=this.createDateObject(),this.dateObject.setValue(i),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=C.DateInputInteractionMode.None,this.forceUpdate()},l.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,n.prototype.destroy.call(this)},l.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)},l.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)},l.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=w.extend({},this.options,t,{steps:s.__assign({},o.steps,t.steps)}),this.setDateObjectOptions(),e&&(this.unbindEvents(),this.init(this.element,this.options))},l.prototype.setDateObjectOptions=function(){var t;this.dateObject&&(t=this.getDateObjectOptions(),this.dateObject.setOptions(t))},l.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},l.prototype.isInCaretMode=function(){return this.interactionMode===C.DateInputInteractionMode.Caret},l.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},l.prototype.onElementDragStart=function(t){t.preventDefault()},l.prototype.onElementDrop=function(t){t.preventDefault()},l.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},l.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},l.prototype.onElementClick=function(t){this.mouseDownStarted=!1,this.switchedPartOnPreviousKeyAction=!1;var e,i=this.selection;this.isInCaretMode()&&this.forceUpdate(),3!==t.detail&&(this.isActive&&this.options.selectNearestSegmentOnFocus?(t=this.element.selectionStart!==this.element.selectionEnd,e=w.isPresent(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,t=!t&&e?0:this.caret()[0],this.selectNearestSegment(t)):this.setSelection(this.selectionByIndex(i.start)))},l.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.elementValue;if(this.element&&this.dateObject){var i=this.switchedPartOnPreviousKeyAction;if(this.isPasteInProgress)this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),this.isPasteInProgress=!1;else{var n=this.keyDownEvent||{},s=n.keyCode===x.KeyCode.BACKSPACE||n.key===O.Key.BACKSPACE,a=n.keyCode===x.KeyCode.DELETE||n.key===O.Key.DELETE,n=this.interactionMode,r=(!this.options.allowCaretMode||n===C.DateInputInteractionMode.Caret||a||s||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=C.DateInputInteractionMode.Caret:this.interactionMode=C.DateInputInteractionMode.Selection,this.isInCaretMode());if(r&&this.keyDownEvent.key===O.Key.SPACE)this.restorePreviousInputEventState();else{var o=this.dateObject&&this.dateObject.getValue(),l=this.dateObject?this.dateObject.value:null,h=this.dateObject.getTextAndFormat(),u=h.text,h=h.format,h=(this.currentFormat=h,r&&(s||a||n===C.DateInputInteractionMode.Caret)?this.previousElementValue:u),n=this.elementValue,c=I.approximateStringMatching({oldText:h,newText:n,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:r,keyEvent:this.keyDownEvent});if(c&&c.length&&c[0]&&c[0][1]!==F.Constants.formatSeparator&&(this.switchedPartOnPreviousKeyAction=!1),!r||c&&0!==c.length){if(r&&1===c.length){if(!c[0]||!c[0][0])return void this.restorePreviousInputEventState();if(r&&c[0]&&(c[0][0]===F.Constants.formatSeparator||c[0][1]===F.Constants.formatSeparator))return void this.restorePreviousInputEventState()}var u=1===c.length&&c[0][1]===F.Constants.formatSeparator,d=[],p=!1,m=null;if(!u)for(var g=0;g<c.length;g++){var f=this.dateObject.parsePart({symbol:c[g][0],currentChar:c[g][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:s||a,originalFormat:this.currentFormat});d.push(f),f.value||(m={type:"parse"}),p=f.switchToNext}this.options.autoSwitchParts||(p=!1),this.resetSegmentValue=!1;var v,h=this.options.format===this.currentFormat||w.isPresent(this.options.format)&&1<this.options.format.length,n=d[d.length-1],y=n&&!w.isPresent(n.value),D=r&&(s||a)&&y,E=!!n&&n.resetPart,P=this.dateObject.getValue(),b=!V.isEqual(o,P),S=this.dateObject.value,M=this.selection;r?(v=c&&0<c.length?c[0][0]:null,v=this.dateObject.getLeadingZero()[v],c.length&&c[0][0]!==F.Constants.formatSeparator?p?(this.forceUpdateWithSelection(),this.switchDateSegment(1)):E?(E=this.currentFormat[M.start])?(this.forceUpdate(),this.setSelection(this.selectionBySymbol(E))):this.restorePreviousInputEventState():D?(this.forceUpdate(),c.length&&c[0][0]!==F.Constants.formatSeparator&&this.setSelection(this.selectionBySymbol(c[0][0]))):y?"0"===t.data&&v||(w.isPresent(o)&&!w.isPresent(P)?this.restorePreviousInputEventState():!w.isPresent(o)&&w.isPresent(P)?this.forceUpdateWithSelection():w.isPresent(o)&&w.isPresent(P)?b?this.forceUpdateWithSelection():this.restorePreviousInputEventState():w.isPresent(o)||w.isPresent(P)?l===S&&this.restorePreviousInputEventState():this.forceUpdateWithSelection()):h||this.forceUpdateWithSelection():!this.options.autoSwitchParts&&c[0][1]===F.Constants.formatSeparator||this.setSelection(this.selectionBySymbol(c[0][0]))):(this.forceUpdate(),c.length&&c[0][0]!==F.Constants.formatSeparator&&this.setSelection(this.selectionBySymbol(c[0][0])),this.options.autoSwitchParts?u?(this.resetSegmentValue=!0,i||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):p&&(this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):n&&n.switchToNext?this.resetSegmentValue=!0:u&&(this.resetSegmentValue=!0,i||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0),s&&this.options.selectPreviousSegmentOnBackspace&&this.switchDateSegment(-1)),this.tryTriggerValueChange({oldValue:o,event:t}),this.triggerInputEnd({event:t,error:m,oldElementValue:e,newElementValue:this.elementValue}),r&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}}},l.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=C.DateInputInteractionMode.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},l.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.options.autoFill&&this.autoFill(),this.interactionMode=C.DateInputInteractionMode.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},l.prototype.onElementChange=function(t){this.triggerChange({event:t})},l.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){var e=this.selection,i=e.start,e=e.end,n=t;if(this.keyDownEvent=t,this.previousElementValue=this.element.value,this.previousElementSelection={start:i,end:e},this.keyEventMatchesAutoSwitchKeys(t)){i=t.keyCode===x.KeyCode.TAB;if(!i)return t.preventDefault(),void this.switchDateSegment(1);var e=this.selection,s=e.start,e=e.end;if(t.shiftKey&&i?this.switchDateSegment(-1):this.switchDateSegment(1),s!==this.selection.start||e!==this.selection.end)return void t.preventDefault()}var a=this.currentFormat[this.selection.start],r=this.getStepFromSymbol(a),o=!1,l=this.elementValue;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===x.KeyCode.TAB)){switch(t.keyCode){case x.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ARROW_UP:this.modifyDateSegmentValue(r,a,n),l!==this.elementValue&&this.triggerInputEnd({event:t,error:null,newElementValue:this.elementValue,oldElementValue:l}),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-r,a,n),l!==this.elementValue&&this.triggerInputEnd({event:t,error:null,newElementValue:this.elementValue,oldElementValue:l}),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ENTER:break;case x.KeyCode.HOME:this.selectNearestSegment(0),this.switchedPartOnPreviousKeyAction=!(o=!0),this.resetSegmentValue=!0;break;case x.KeyCode.END:this.selectNearestSegment(this.elementValue.length),this.switchedPartOnPreviousKeyAction=!(o=!0),this.resetSegmentValue=!0;break;default:return}o&&t.preventDefault()}}},l.prototype.onElementPaste=function(){this.isPasteInProgress=!0},l.prototype.onElementMouseWheel=function(t){var e,i=this.elementValue;this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive&&((e=t).shiftKey?this.switchDateSegment(0<(e.wheelDelta||-e.detail)?-1:1):this.modifyDateSegmentValue(0<(e.wheelDelta||-e.detail)?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),i!==this.elementValue)&&this.triggerInputEnd({event:t,error:null,newElementValue:this.elementValue,oldElementValue:i})},l.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value,i=(w.isPresent(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e)),this.dateObject&&this.dateObject.getValue());this.writeValue(e),this.tryTriggerValueChange({oldValue:i,event:t})},Object.defineProperty(l.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!0,configurable:!0}),Object.defineProperty(l.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(l.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(l.prototype,"selection",{get:function(){var t={start:0,end:0};return t=null!==this.element&&void 0!==this.element.selectionStart?{start:this.element.selectionStart,end:this.element.selectionEnd}:t},enumerable:!0,configurable:!0}),l.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&(this.element.setSelectionRange(t.start,t.end),w.isDocumentAvailable()&&w.isIOS()&&this.element.scrollIntoView({block:"nearest",inline:"nearest"}),t.start!==t.end)&&(this.interactionMode=C.DateInputInteractionMode.Selection)},l.prototype.selectionBySymbol=function(t){for(var e=-1,i=0,n=0;n<this.currentFormat.length;n++)this.currentFormat[n]===t&&(i=n+1,-1===e)&&(e=n);return e<0&&(e=0),this.options.autoCorrectParts||this.currentFormat.length===this.currentText.length||(this.currentFormat.length<this.currentText.length?i+=this.currentText.length-this.currentFormat.length:i=Math.max(0,i-(this.currentFormat.length-this.currentText.length))),{start:e,end:i}},l.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},i=t,n=t-1;i<this.currentFormat.length||0<=n;i++,n--){if(i<this.currentFormat.length&&this.currentFormat[i]!==F.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[i]);break}if(0<=n&&this.currentFormat[n]!==F.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}}return e},l.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){var i=e.start,n=this.currentFormat[i-1],s="",a="";if(t<0){for(var r=i+t;0<=r;r--)if((a=this.currentFormat[r])!==F.Constants.formatSeparator&&a!==n){i=r,s=a;break}}else for(r=i+t;r<this.currentFormat.length;r++)if((a=this.currentFormat[r])!==F.Constants.formatSeparator&&a!==n){i=r,s=a;break}if(s)return this.forceUpdate(),this.setSelection(this.selectionBySymbol(s)),void(this.interactionMode=C.DateInputInteractionMode.Selection)}this.interactionMode=C.DateInputInteractionMode.None;var e=this.selection,o=e.start,e=e.end;if(o<e&&this.currentFormat[o]!==this.currentFormat[e-1])this.setSelection(this.selectionByIndex(0<t?o:e-1)),this.resetSegmentValue=!0,this.interactionMode=C.DateInputInteractionMode.None;else{for(var l=this.currentFormat[o],h=o+t;0<h&&h<this.currentFormat.length&&(this.currentFormat[h]===l||this.currentFormat[h]===F.Constants.formatSeparator);)h+=t;if(this.currentFormat[h]!==F.Constants.formatSeparator){for(var u=h;0<=u&&u<this.currentFormat.length&&this.currentFormat[u]===this.currentFormat[h];)u+=t;u<h&&(u+1!==o||h+1!==e)?(this.setSelection({start:u+1,end:h+1}),this.resetSegmentValue=!0):h<u&&(h!==o||u!==e)&&(this.setSelection({start:h,end:u}),this.resetSegmentValue=!0),this.interactionMode=C.DateInputInteractionMode.None}}},l.prototype.modifyDateSegmentValue=function(t,e,i){var n,s,a;void 0===e&&(e=""),void 0===i&&(i={}),this.dateObject&&!this.options.readonly&&(n=this.value,a=1,s=this.caret(),"S"!==(e=e||this.currentFormat[s[0]])||this.options.steps.millisecond&&1!==this.options.steps.millisecond||(s=w.millisecondDigitsInFormat(this.inputFormat),a=w.millisecondStepFor(s)),this.dateObject.modifyPart(e,a*t),this.tryTriggerValueChange({oldValue:n,event:i}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e)))},l.prototype.tryTriggerValueChange=function(t){if(!V.isEqual(this.value,(t=void 0===t?{oldValue:null,event:{}}:t).oldValue))return this.triggerValueChange(t)},l.prototype.triggerValueChange=function(t){return this.trigger("valueChange",w.extend(t=void 0===t?{oldValue:null,event:{}}:t,{value:this.value}))},l.prototype.triggerInput=function(t){return this.trigger("input",w.extend(t=void 0===t?{event:{}}:t,{value:this.value}))},l.prototype.triggerInputEnd=function(t){return this.trigger("inputEnd",w.extend(t=void 0===t?{event:{},error:null,oldElementValue:"",newElementValue:""}:t,{value:this.value}))},l.prototype.triggerFocus=function(t){return this.trigger("focus",w.extend({},t=void 0===t?{event:{}}:t))},l.prototype.triggerFocusEnd=function(t){return this.trigger("focusEnd",w.extend({},t=void 0===t?{event:{}}:t))},l.prototype.triggerBlur=function(t){return this.trigger("blur",w.extend({},t=void 0===t?{event:{}}:t))},l.prototype.triggerBlurEnd=function(t){return this.trigger("blurEnd",w.extend({},t=void 0===t?{event:{}}:t))},l.prototype.triggerChange=function(t){return this.trigger("change",w.extend(t=void 0===t?{event:{}}:t,{value:this.value}))},l.prototype.triggerKeyDown=function(t){return this.trigger("keydown",w.extend({},t=void 0===t?{event:{}}:t))},l.prototype.triggerMouseWheel=function(t){return this.trigger("mousewheel",w.extend({},t=void 0===t?{event:{}}:t))},l.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},l.prototype.forceUpdateWithSelection=function(){var t=this.selection,e=t.start,t=t.end,i=this.elementValue.length,i=(this.forceUpdate(),this.elementValue.length-i);this.setSelection({start:e+i,end:t+i})},l.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text,t=t.format;this.currentFormat=t,this.currentText=e},l.prototype.setElementValue=function(t){this.element.value=t},l.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}},l.prototype.restorePreviousInputEventState=function(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()},l.prototype.restorePreviousElementValue=function(){this.setElementValue(this.previousElementValue||"")},l.prototype.restorePreviousElementSelection=function(){var t=this.previousElementSelection,e=t.start,t=t.end;this.setSelection({start:e||0,end:t||0})},l.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},l.prototype.verifyValue=function(t){if(t&&!w.isValidDate(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},l.prototype.refreshElementValue=function(){var t=this.element,e=this.isActive?this.inputFormat:this.displayFormat,e=this.dateObject.getTextAndFormat(e),i=e.text,e=e.format,e=(this.currentFormat=e,this.currentText=i,this.options.hasPlaceholder||w.isPresent(this.options.placeholder)),n=!this.isActive&&e&&!this.dateObject.hasValue(),e=(e&&w.isPresent(this.options.placeholder)&&(t.placeholder=this.options.placeholder),n?"":i);this.previousElementValue=this.elementValue,this.setElementValue(e)},l.prototype.caret=function(t,e){void 0===e&&(e=t);var i=void 0!==t,n=[t,t],s=this.element;if(!i||!this.options.disabled&&!this.options.readonly){try{void 0!==s.selectionStart&&(i&&(w.isDocumentAvailable()&&document.activeElement!==s&&s.focus(),s.setSelectionRange(t,e)),n=[s.selectionStart,s.selectionEnd])}catch(t){n=[]}return n}},l.prototype.selectNearestSegment=function(t){for(var e=t,i=t-1;e<this.currentFormat.length||0<=i;e++,i--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(0<=i&&"_"!==this.currentFormat[i])return void this.selectDateSegment(this.currentFormat[i])}},l.prototype.selectDateSegment=function(t){for(var e=-1,i=0,n=0;n<this.currentFormat.length;n++)this.currentFormat[n]===t&&(i=n+1,-1===e)&&(e=n);e<0&&(e=0),this.caret(0,0),this.caret(e,i)},l.prototype.getDateObject=function(t){var e=(this.dateObject||{}).leadingZero,t=(this.options.value=t,this.createDateObject());return t.setLeadingZero(this.isActive?e:null),t},l.prototype.createDateObject=function(){var t=this.getDateObjectOptions();return new a.DateObject(w.extend({},t))},l.prototype.getDateObjectOptions=function(){return{intlService:this.options.intlService,formatPlaceholder:this.options.formatPlaceholder||"formatPattern",format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value,toggleDayPeriod:this.options.toggleDayPeriod}},l.prototype.keyEventMatchesAutoSwitchKeys=function(t){var e=(this.options.autoSwitchKeys||[]).map(function(t){return t.toString().toLowerCase().trim()});return 0<=e.indexOf(t.keyCode.toString())||0<=e.indexOf(t.keyCode)||0<=e.indexOf(t.key.toLowerCase().trim())},l.prototype.autoFill=function(){var t,e,i,n,s,a=this.dateObject,r=new Date;(a.date||a.month||a.year||a.hours||a.minutes||a.seconds)&&(i=(a.year?a.value:r).getFullYear(),e=(a.month?a.value:r).getMonth(),t=(a.date?a.value:r).getDate(),n=(a.hours?a.value:r).getHours(),s=(a.minutes?a.value:r).getMinutes(),r=(a.seconds?a.value:r).getSeconds(),a.setValue(new Date(i,e,t,n,s,r)),this.refreshElementValue(),this.triggerValueChange())},l);function l(t,e){var i=n.call(this,e)||this;return i.dateObject=null,i.currentText="",i.currentFormat="",i.interactionMode=C.DateInputInteractionMode.None,i.previousElementSelection={start:0,end:0},i.init(t,e),i}e.DateInput=i},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n,i=i(11),s=(e.DateInput=i.DateInput,e);for(n in s)a(n,s[n])}],s={},n.m=i,n.c=s,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=12)}}});
1
+ System.register("@progress/kendo-dateinputs-common",["@progress/kendo-date-math","tslib"],function(r,t){var o={},l={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(l,"__esModule",{value:!0}),{setters:[function(e){Object.keys(e).forEach(function(t){o[t]=e[t]})},function(e){Object.keys(e).forEach(function(t){l[t]=e[t]})}],execute:function(){function i(t){var e=s[t];return void 0!==e||(e=s[t]={exports:{}},n[t](e,e.exports,i)),e.exports}var n,s,t,e,a;r((n={761:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=void 0,e.Constants={formatSeparator:"_",twoDigitYearMax:68,defaultDateFormat:"d",defaultLocaleId:"en"}},953:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DateObject=void 0;var tt=i(618),o=i(930),et=i(506),it=i(849),u=i(761),n=/d|M|H|h|m|s/;function s(t){var e=t.intlService,i=t.formatPlaceholder,n=t.format,s=t.cycleTime,s=void 0!==s&&s,a=t.twoDigitYearMax,a=void 0===a?u.Constants.twoDigitYearMax:a,r=t.value,r=void 0===r?null:r,o=t.autoCorrectParts,o=void 0===o||o,t=t.toggleDayPeriod,t=void 0!==t&&t;if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.dayperiod=!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=this.getDefaultDate(),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.setOptions({intlService:e,formatPlaceholder:i,format:n,cycleTime:s,twoDigitYearMax:a,value:r,autoCorrectParts:o,toggleDayPeriod:t}),r)this._value=(0,tt.cloneDate)(r);else{this._value=this.getDefaultDate();for(var l=this.dateFormatString(this.value,this.format).symbols,h=0;h<l.length;h++)this.setExisting(l[h],!1)}}Object.defineProperty(s.prototype,"value",{get:function(){return this._value},set:function(t){(!t||t instanceof Date)&&(this._value=t,this.resetInvalidDate())},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"localeId",{get:function(){for(var t=u.Constants.defaultLocaleId,e=Object.keys(this.intl.cldr),i=0;i<e.length;i++){var n=e[i],n=this.intl.cldr[n];if(n.name&&n.calendar&&n.numbers&&n.name!==u.Constants.defaultLocaleId){t=n.name;break}}return t},enumerable:!1,configurable:!0}),s.prototype.setOptions=function(t){this.intl=t.intlService,this.formatPlaceholder=t.formatPlaceholder||"wide",this.format=t.format,this.cycleTime=t.cycleTime,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=t.twoDigitYearMax,this.autoCorrectParts=t.autoCorrectParts,this.toggleDayPeriod=t.toggleDayPeriod},s.prototype.setValue=function(t){t?(0,tt.isEqual)(t,this._value)||(this._value=(0,tt.cloneDate)(t),this.modifyExisting(!0)):(this._value=this.getDefaultDate(),this.modifyExisting(!1)),this.resetInvalidDate()},s.prototype.hasValue=function(){var i=this;return this.intl.splitDateFormat(this.format,this.localeId).reduce(function(t,e){return t||"literal"!==e.type&&"dayperiod"!==e.type&&i.getExisting(e.pattern[0])},!1)},s.prototype.getValue=function(){for(var t=0;t<this.knownParts.length;t++)if(!this.getExisting(this.knownParts[t]))return null;return(0,tt.cloneDate)(this.value)},s.prototype.createDefaultDate=function(){return(0,tt.createDate)(2e3,0,31)},s.prototype.getDefaultDate=function(){return(0,tt.getDate)(this.createDefaultDate())},s.prototype.getFormattedDate=function(t){return this.intl.formatDate(this.getValue(),t,this.localeId)},s.prototype.getTextAndFormat=function(t){var t=(t=void 0===t?"":t)||this.format,e=this.intl.formatDate(this.value,t,this.localeId),i=this.dateFormatString(this.value,t);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){for(var n="",s=this.intl.formatDate(this.value,t,this.localeId),a=this.getFormattedInvalidDates(t),r=0;r<s.length;r++){var o,l,h=i.symbols[r];"literal"!==i.partMap[r].type&&this.getInvalidDatePartValue(h)?(o=this.getPartsForSegment(i,r),"M"===h?(l=((0,it.parseToInt)(this.getInvalidDatePartValue(h))+1).toString(),!(2<o.length)&&this.getInvalidDatePartValue(h)?(n+=(0,et.padZero)(o.length-l.length)+l,r+=o.length-1):n+=a[h][r]):this.getInvalidDatePartValue(h)?(l=this.getInvalidDatePartValue(h).toString(),n+=(0,et.padZero)(o.length-l.length)+l,r+=o.length-1):n+=a[h][r]):n+=e[r]}e=n}return this.merge(e,i)},s.prototype.getFormattedInvalidDates=function(t){var i=this,n=(t=void 0===t?"":t)||this.format,s={E:"",H:"",M:"",a:"",d:"",h:"",m:"",s:"",y:"",S:""};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){var e=i.getInvalidDatePart(t).date;e&&(e=i.intl.formatDate(e,n,i.localeId),s[t]=e)}),s},s.prototype.modifyExisting=function(t){for(var e=this.dateFormatString(this.value,this.format).symbols,i=0;i<e.length;i++)this.setExisting(e[i],t)},s.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"t":case"a":return this.dayperiod;case"m":return this.minutes;case"s":return this.seconds;case"S":return this.milliseconds;default:return!0}},s.prototype.setExisting=function(t,e){switch(t){case"y":!1===(this.year=e)&&this._value.setFullYear(2e3);break;case"M":!1===(this.month=e)&&this.autoCorrectParts&&this._value.setMonth(0);break;case"d":this.date=e;break;case"h":case"H":this.hours=e;break;case"t":case"a":this.dayperiod=e;break;case"m":this.minutes=e;break;case"s":this.seconds=e;break;case"S":this.milliseconds=e}this.getValue()&&this.resetInvalidDate()},s.prototype.modifyPart=function(t,e){if((0,it.isPresent)(t)&&(0,it.isPresent)(e)&&0!==e){var i,n=(0,tt.cloneDate)(this.value),s=!1,a="M"===t,r="d"===t||"E"===t,o=this.getExisting(t);if(this.autoCorrectParts||!r&&!a){var l=n.getHours();switch(t){case"y":n.setFullYear(n.getFullYear()+e);break;case"M":n=(0,tt.addMonths)(this.value,e);break;case"d":case"E":n.setDate(n.getDate()+e);break;case"h":case"H":n.setHours(n.getHours()+e),s=!0;break;case"m":n.setMinutes(n.getMinutes()+e),s=!0;break;case"s":n.setSeconds(n.getSeconds()+e),s=!0;break;case"S":n.setMilliseconds(n.getMilliseconds()+e);break;case"a":this.toggleDayPeriod?n.setHours(12<=l?l-12:l+12):n.setHours(n.getHours()+12*e),s=!0}}else{var h=this._partiallyInvalidDate.invalidDateParts||{},u=this.getInvalidDatePartValue(t),c=h.y.value||n.getFullYear(),d=h.M.value||n.getMonth(),p=h.d.value||h.E.value||n.getDate(),m=h.h.value||h.H.value||n.getHours(),g=h.m.value||n.getMinutes(),v=h.s.value||n.getSeconds(),h=h.S.value||n.getMilliseconds();switch(t){case"y":c+=e;break;case"M":d+=e;break;case"d":case"E":p+=e}if("M"===t){if((d<0||11<d)&&o)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);o||(d=d<0?(0,it.clamp)(d%11+1+11,0,11):(f=(0,it.isPresent)(u)?d:(e-1)%12,(0,it.clamp)(f,0,11)),d=(0,it.clamp)(d,0,11)),d=(0,it.clamp)(d,0,11)}else if("d"===t)if(o){if(p<=0||31<p)return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t)}else if(!o){if((0,it.isPresent)(u)&&(p<=0||31<p))return this.setExisting(t,!1),void this.resetInvalidDateSymbol(t);p=(f=e<0?(0,it.isPresent)(u)?p:31-Math.abs(e%31)+1:(0,it.isPresent)(u)?p:e%31,(0,it.clamp)(f,1,31)),p=(0,it.clamp)(p,1,31)}var o=(0,tt.createDate)(c,d,p,m,g,v,h),u=a||r?this.modifyDateSymbolWithValue(n,t,a?d:p):null,f=(0,it.areDatePartsEqualTo)(o,c,d,p,m,g,v,h);this.getValue()&&(0,it.areDatePartsEqualTo)(o,c,d,p,m,g,v,h)?(n=(0,tt.cloneDate)(o),this.markDatePartsAsExisting()):a&&u?u.getMonth()===d?this.getExisting("d")?f?(n=(0,tt.cloneDate)(o),this.resetInvalidDateSymbol(t)):(i=!0,this.setInvalidDatePart(t,{value:d,date:(0,tt.cloneDate)(u),startDateOffset:e,startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(t,!1)):f?(this.resetInvalidDateSymbol(t),n=(0,tt.cloneDate)(o),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(t),n=(0,tt.cloneDate)(u)):(i=!0,this.setInvalidDatePart(t,{value:d,date:(0,tt.cloneDate)(u),startDateOffset:e,startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(t,!1)):r&&u&&(u.getDate()===p?this.getExisting("M")?f?(n=(0,tt.cloneDate)(o),this.resetInvalidDateSymbol(t)):(i=!0,this.setInvalidDatePart(t,{value:p,date:(0,tt.cloneDate)(u),startDateOffset:e,startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(t,!1)):f?(n=(0,tt.cloneDate)(o),this.resetInvalidDateSymbol(t),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(t),n=(0,tt.cloneDate)(u)):(i=!0,this.setInvalidDatePart(t,{value:p,date:(0,tt.cloneDate)(this.value),startDateOffset:e,startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(t,!1)))}this.shouldNormalizeCentury()&&(n=this.normalizeCentury(n)),s&&!this.cycleTime&&(n.getDate(),this._value.getDate()),i||(this.setExisting(t,!0),this._value=n,this.getValue()&&this.resetInvalidDate())}},s.prototype.parsePart=function(t){for(var e=t.symbol,i=t.currentChar,N=t.resetSegmentValue,n=t.rawTextValue,j=t.isDeleting,s=t.originalFormat,a=!t.cycleSegmentValue,r=this.dateFormatString(this.value,this.format),o=r.partMap.filter(function(t){return"literal"===t.type}).map(function(t,e){return{datePartIndex:e,type:t.type,pattern:t.pattern,literal:""}}),l=r.partMap.map(function(t){return{type:t.type,pattern:t.pattern,text:""}}),h=0;h<o.length;h++){for(var u=o[h],c=0;c<u.pattern.length;c++)o[h+c]&&(o[h+c].literal=u.pattern[c]);h+=u.pattern.length-1}for(h=0;h<l.length;h++){for(u=l[h],c=0;c<u.pattern.length;c++)l[h+c]&&(l[h+c].text=u.pattern[c]);h+=u.pattern.length-1}var d={value:null,switchToNext:!1,resetPart:a&&"M"===e&&r.partMap.filter(function(t){return"month"===t.type}).some(function(t){return 2<t.pattern.length}),hasInvalidDatePart:!1};if(!i){if(!a)return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),(0,it.extend)(d,{value:null,switchToNext:!1});for(h=0;h<o.length;h++){var L=o[h].literal,K=n.startsWith(L),W=n.endsWith(L),L=0<=n.indexOf(L+L);if(K||W||L)return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),(0,it.extend)(d,{value:null,switchToNext:!1})}}var p=this.intl.formatDate(this.value,this.format,this.localeId),H=r.symbols,m=!1,g="",v="",f="",y="",D="",E="",B="";for(h=0;h<l.length;h++)B+=l[h].text;var t=this.format===H||this.format===B||this.format===s||this.format.length===s.length,P=(t?B:s).indexOf(e),Z=(t?B:s).lastIndexOf(e)-P+1,R=s.length-n.length;if(a||!a&&!this.autoCorrectParts){for(h=0;h<p.length;h++)H[h]===e?(v+=this.getExisting(e)?p[h]:"0",0<R&&!(f.length+R<Z)||(f+=n[h]||""),m=!0):m?(E+=p[h],D+=p[h]):(g+=p[h],y+=p[h]);if(t&&(B.length<n.length?f+=i:j||(s.length,n.length),f.length>Z))return(0,it.extend)(d,{value:null,switchToNext:!1});if(!t||!this.autoCorrectParts){for(E=g=f=v="",m=!1,h=0;h<s.length;h++)s[h]===e?(v+=this.getExisting(e)?p[h]||"":"0",0<R&&!(f.length+R<Z)||(f+=n[h]||""),m=!0):m?E+=n[h-R]||"":g+=n[h]||"";s.length<n.length&&(f+=i)}}if(!a)if(this.autoCorrectParts)for(E=g=f=v="",m=!1,h=0;h<p.length;h++)H[h]===e?(v+=this.getExisting(e)?p[h]:"0",m=!0):m?E+=p[h]:g+=p[h];else v=N?f:v;var b=null,Y=this.matchMonth(i),P=this.matchDayPeriod(i,e),S="0"===i,U=this.leadingZero||{},M=(S?("0"===f&&(f=v),0!==(0,it.parseToInt)(N?i:(a?f:v)+i)||this.isAbbrMonth(r.partMap,e)||this.incrementLeadingZero(e)):this.resetLeadingZero(),this.partPattern(r.partMap,e)),z=M?M.pattern:null,q=this.patternLength(z)||z.length;if(a&&j&&!f)this.setExisting(e,!1);else{for(var M=v.length-3,G=!0,I=a?f:v,h=Math.max(0,M);h<=v.length&&G;h++){I=N?i:a?f:v.substring(h)+i,!a&&this.autoCorrectParts||(I=(G=!1,et.unpadZero)(I),I=(0,et.padZero)(q-I.length)+I);var x,O=parseInt(I,10),J=((b=this.intl.parseDate(g+I+E,this.format,this.localeId))&&this.value&&r.partMap.every(function(t){return"year"!==t.type&&"month"!==t.type&&"day"!=t.type})&&(b.setFullYear(this.value.getFullYear()),b.setMonth(this.value.getMonth()),b.setDate(this.value.getDate())),!1),$=(a&&!(0,it.isValidDate)(b)&&this.autoCorrectParts&&(b=this.intl.parseDate(y+I+D,this.format,this.localeId),J=!0),!isNaN(parseInt(i,10))||a&&j&&""===i);if(!b&&!isNaN(O)&&$&&this.autoCorrectParts&&("M"!==e||Y||-1<($=O-1)&&$<12&&((b=(0,tt.cloneDate)(this.value)).setMonth($),b.getMonth()!==$)&&(b=(0,tt.lastDayOfMonth)((0,tt.addMonths)(b,-1))),"y"===e)&&(b=(0,tt.createDate)(parseInt(I,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),a&&(0,it.isValidDate)(b)||!a&&b)&&this.date&&b.getDate()!==this.value.getDate()&&(b=(0,tt.lastDayOfMonth)((0,tt.addMonths)(b,-1))),a&&(0,it.isValidDate)(b)||!a&&b)return x=(O=this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:J,middle:I,patternValue:z,basePrefix:y,baseSuffix:D,prefix:g,suffix:E,symbol:e,patternLength:q,leadingZero:U})).switchToNext,this.shouldNormalizeCentury()&&(b=this.normalizeCentury(b)),"H"===e&&12<=b.getHours()&&this.setExisting("a",!0),this._value=b,this.setExisting(e,!0),this.resetInvalidDateSymbol(e),this.autoCorrectParts||("M"===e?this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d")):"d"===e&&this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M")),this.hasInvalidDatePart())||(this.markDatePartsAsExisting(),O.peekedDate)||!O.switchToNext||this.autoCorrectParts||"M"===e||"d"===e&&30===O.parsedPeekedValue&&1===this.value.getMonth()&&(x=!1),(0,it.extend)(d,{value:this.value,switchToNext:x})}if(Y&&(b=this.intl.parseDate(g+Y+E,this.format,this.localeId)))return this._value=b,this.setExisting(e,!0),(0,it.extend)(d,{value:this.value,switchToNext:!1});if(P&&(b=this.intl.parseDate(g+P+E,this.format)||this.intl.parseDate(y+P+D,this.format)))return this._value=b,this.setExisting(e,!0),(0,it.extend)(d,{value:this.value,switchToNext:!0});if(S&&this.setExisting(e,!1),!this.autoCorrectParts){var Q,X,w,C,F,V,k,T,_,A,M=void 0,P=a?f:I,S=(0,it.parseToInt)(P);if((0,it.isNumber)(S)&&(0,it.isParseableToInt)(P)){if("d"===e&&(S<=0||31<S)||"M"===e&&(S<=0||11<S)){if(a)return(0,it.extend)(d,{value:null,switchToNext:!1});S=(0,it.parseToInt)(P=i)}return(0,it.isNumber)(S)&&(0,it.isParseableToInt)(P)?(M="M"===e?S-1:S,Q="M"===e,X="d"===e,w=(0,tt.cloneDate)(this._value),k=(F=this._partiallyInvalidDate.invalidDateParts||{}).y.value||w.getFullYear(),C=Q?M:F.M.value||w.getMonth(),M=X?M:F.d.value||F.E.value||w.getDate(),T=F.h.value||F.H.value||w.getHours(),_=F.m.value||w.getMinutes(),A=F.s.value||w.getSeconds(),F=F.S.value||w.getMilliseconds(),V=(0,tt.createDate)(k,C,M,T,_,A,F),k=(0,it.areDatePartsEqualTo)(V,k,C,M,T,_,A,F),T=Q||X?this.modifyDateSymbolWithValue(w,e,Q?C:M):null,_=!1,Q&&T?T.getMonth()===C?this.getExisting("d")?k?(w=(0,tt.cloneDate)(V),this.resetInvalidDateSymbol(e)):(_=!0,this.setInvalidDatePart(e,{value:C,date:(0,tt.cloneDate)(T),startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(e,!1)):k?(this.resetInvalidDateSymbol(e),w=(0,tt.cloneDate)(V),this.getExisting("M")&&this.getExisting("y")&&(this.setExisting("d",!0),this.resetInvalidDateSymbol("d"))):(this.resetInvalidDateSymbol(e),w=(0,tt.cloneDate)(T)):(_=!0,this.setInvalidDatePart(e,{value:C,date:(0,tt.cloneDate)(T),startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(e,!1)):X&&T&&(T.getDate()===M?this.getExisting("M")?k?(w=(0,tt.cloneDate)(V),this.resetInvalidDateSymbol(e)):(_=!0,this.setInvalidDatePart(e,{value:M,date:(0,tt.cloneDate)(T),startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(e,!1)):k?(w=(0,tt.cloneDate)(V),this.resetInvalidDateSymbol(e),this.getExisting("d")&&this.getExisting("y")&&(this.setExisting("M",!0),this.resetInvalidDateSymbol("M"))):(this.resetInvalidDateSymbol(e),w=(0,tt.cloneDate)(T)):(_=!0,this.setInvalidDatePart(e,{value:M,date:(0,tt.cloneDate)(this.value),startDate:(0,tt.cloneDate)(this.value)}),this.setExisting(e,!1))),_||(this.setExisting(e,!0),a&&!(0,it.isValidDate)(b)?(A=this.intl.parseDate(y+I+D,this.format,this.localeId),(0,it.isValidDate)(A)&&(this._value=A)):this._value=w,this.getValue()&&this.resetInvalidDate()),x=!1,x="M"===e?2<=S||2<=P.length:t?this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:!this.autoCorrectParts,middle:I,patternValue:z,basePrefix:y,baseSuffix:D,prefix:g,suffix:E,symbol:e,patternLength:q,leadingZero:U}).switchToNext:P.length>Z,(0,it.extend)(d,{value:null,switchToNext:x,hasInvalidDatePart:_})):(0,it.extend)(d,{value:null,switchToNext:!1})}}}return(0,it.extend)(d,{value:null,switchToNext:!1})},s.prototype.symbolMap=function(t){return this.intl.splitDateFormat(this.format,this.localeId).reduce(et.dateSymbolMap,{})[t]},s.prototype.resetLeadingZero=function(){var t=null!==this.leadingZero;return this.setLeadingZero(null),t},s.prototype.setLeadingZero=function(t){this.leadingZero=t},s.prototype.getLeadingZero=function(){return this.leadingZero||{}},s.prototype.normalizeCentury=function(t){var e,i;return(0,it.isPresent)(t)?(e=(0,it.cropTwoDigitYear)(t),i=this.getNormalizedCenturyBase(e),(0,it.setYears)(t,i+e)):t},s.prototype.incrementLeadingZero=function(t){var e=this.leadingZero||{};e[t]=(e[t]||0)+1,this.leadingZero=e},s.prototype.isAbbrMonth=function(t,e){t=this.partPattern(t,e);return"month"===t.type&&t.names},s.prototype.partPattern=function(t,e){return t.filter(function(t){return-1!==t.pattern.indexOf(e)})[0]},s.prototype.peek=function(t,e){t=t.replace(/^0*/,"")+"0";return(0,et.padZero)(e.length-t.length)+t},s.prototype.matchMonth=function(t){if(this.typedMonthPart+=t.toLowerCase(),0!==this.monthNames.length)for(;0<this.typedMonthPart.length;){for(var e=0;e<this.monthNames.length;e++)if(0===this.monthNames[e].toLowerCase().indexOf(this.typedMonthPart))return this.monthNames[e];var i=parseInt(this.typedMonthPart,10);if(1<=i&&i<=12&&i.toString()===this.typedMonthPart)return this.monthNames[i-1];this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return""},s.prototype.matchDayPeriod=function(t,e){t=t.toLowerCase();if("a"===e&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(t))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(t))return this.dayPeriods.pm}return""},s.prototype.allFormattedMonths=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format,this.localeId),i=0;i<e.length;i++)if("month"===e[i].type&&e[i].names)return this.intl.dateFormatNames(t,e[i].names);return[]},s.prototype.allDayPeriods=function(t){void 0===t&&(t="en");for(var e=this.intl.splitDateFormat(this.format),i=0;i<e.length;i++)if("dayperiod"===e[i].type&&e[i].names)return this.intl.dateFormatNames(t,e[i].names);return null},s.prototype.patternLength=function(t){return"y"===t[0]?4:n.test(t)?2:0},s.prototype.dateFormatString=function(t,e){for(var i=this.intl.splitDateFormat(e,this.localeId),n=[],s=[],a=0;a<i.length;a++)for(var r=this.intl.formatDate(t,{pattern:i[a].pattern},this.localeId).length;0<r;)n.push(this.symbols[i[a].pattern[0]]||u.Constants.formatSeparator),s.push(i[a]),r--;e=new o.Mask;return e.symbols=n.join(""),e.partMap=s,e},s.prototype.merge=function(t,e){for(var i="",n="",s=e.symbols,a=!1,r=0,o=this.getFormattedInvalidDates(s),l=s.length-1;0<=l;l--){var h=this.getPartsForSegment(e,l);if(-1===this.knownParts.indexOf(s[l])||this.getExisting(s[l]))this.autoCorrectParts||t.length===s.length||a?i=t[l]+i:0<r?(i=t[l]+i,--r<=0&&(a=!0)):i=(t[l+t.length-s.length]||"")+i,n=s[l]+n;else{var u,c=s[l],d=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!this.getInvalidDatePartValue(c)){for(;0<=l&&c===s[l];)l--;l++}for(this.leadingZero&&this.leadingZero[c]?i="0"+i:!this.autoCorrectParts&&this.getInvalidDatePartValue(c)?(u=this.getInvalidDatePartValue(c).toString(),"M"===c?(u=((0,it.parseToInt)(this.getInvalidDatePartValue(c))+1).toString(),2<h.length?i=o[c][l]+i:(u=((0,it.parseToInt)(this.getInvalidDatePartValue(c))+1).toString(),i=(0,et.padZero)(h.length-u.length)+u+i,d=h.length-1,r=u.length-h.length)):(i=(0,et.padZero)(h.length-u.length)+u+i,d=h.length-1,r=u.length-h.length)):i=this.dateFieldName(e.partMap[l])+i;n.length<i.length;)n=s[l]+n;0!==d&&(l=l-d+(t.length-s.length))}}return{text:i,format:n}},s.prototype.dateFieldName=function(t){var e=this.formatPlaceholder||"wide";return e[t.type]||("formatPattern"===e?t.pattern:this.intl.dateFieldName(Object.assign(t,{nameType:e})))},s.prototype.getNormalizedCenturyBase=function(t){return t>this.twoDigitYearMax?1900:2e3},s.prototype.shouldNormalizeCentury=function(){return this.intl.splitDateFormat(this.format).some(function(t){return"yy"===t.pattern})},s.prototype.resetInvalidDate=function(){var e=this;this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){e.resetInvalidDatePart(t)})},s.prototype.resetInvalidDateSymbol=function(t){var e=this,i=(this.resetInvalidDatePart(t),!0);Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){e._partiallyInvalidDate.invalidDateParts[t]&&(0,it.isPresent)(e._partiallyInvalidDate.invalidDateParts[t].value)&&(i=!1)}),i&&this.resetInvalidDate()},s.prototype.resetInvalidDatePart=function(t){this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t]={value:null,date:null,startDateOffset:0})},s.prototype.getInvalidDatePart=function(t){return this._partiallyInvalidDate.invalidDateParts[t]||{}},s.prototype.getInvalidDatePartValue=function(t){return(this._partiallyInvalidDate.invalidDateParts[t]||{}).value},s.prototype.setInvalidDatePart=function(t,e){var i=e.value,n=e.date,n=void 0===n?null:n,s=e.startDateOffset,s=void 0===s?0:s,e=e.startDate,e=void 0===e?null:e;this._partiallyInvalidDate.invalidDateParts[t]&&(this._partiallyInvalidDate.invalidDateParts[t].value=void 0===i?null:i,this._partiallyInvalidDate.invalidDateParts[t].date=n,this._partiallyInvalidDate.invalidDateParts[t].startDateOffset=s,this._partiallyInvalidDate.startDate=e)},s.prototype.hasInvalidDatePart=function(){var e=this,i=!1;return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(function(t){e._partiallyInvalidDate.invalidDateParts[t]&&(0,it.isPresent)(e._partiallyInvalidDate.invalidDateParts[t].value)&&(i=!0)}),i},s.prototype.modifyDateSymbolWithOffset=function(t,e,i){var n=(0,tt.cloneDate)(t),s=!1;switch(e){case"y":n.setFullYear(n.getFullYear()+i);break;case"M":n=(0,tt.addMonths)(this.value,i);break;case"d":case"E":n.setDate(n.getDate()+i);break;case"h":case"H":n.setHours(n.getHours()+i),s=!0;break;case"m":n.setMinutes(n.getMinutes()+i),s=!0;break;case"s":n.setSeconds(n.getSeconds()+i),s=!0;break;case"S":n.setMilliseconds(n.getMilliseconds()+i);break;case"a":n.setHours(n.getHours()+12*i),s=!0}return{date:n,timeModified:s}},s.prototype.modifyDateSymbolWithValue=function(t,e,i){var n=(0,tt.cloneDate)(t);switch(e){case"y":n.setFullYear(i);break;case"M":n=(0,tt.addMonths)(t,i-t.getMonth());break;case"d":case"E":n.setDate(i);break;case"h":case"H":case"a":n.setHours(i);break;case"m":n.setMinutes(i);break;case"s":n.setSeconds(i);break;case"S":n.setMilliseconds(i)}return n},s.prototype.markDatePartsAsExisting=function(){this.modifyExisting(!0)},s.prototype.getPartsForSegment=function(t,e){for(var i=t.partMap[e],n=[],s=e;s<t.partMap.length;s++){var a=t.partMap[s];if(i.type!==a.type||i.pattern!==a.pattern)break;n.push(a)}for(s=e-1;0<=s&&(a=t.partMap[s],i.type===a.type)&&i.pattern===a.pattern;s--)n.unshift(a);return n},s.prototype.isPeekDateOverflowingDatePart=function(t){var e=t.useBasePrefixAndSuffix,i=t.middle,n=t.patternValue,s=t.basePrefix,a=t.baseSuffix,r=t.prefix,o=t.suffix,l=t.symbol,h=t.patternLength,t=t.leadingZero,u=this.peek(i,n),e=e?"".concat(s).concat(u).concat(a):"".concat(r).concat(u).concat(o),s=this.intl.parseDate(e,this.format,this.localeId),a=((this.leadingZero||{})[l]||0)+(0,et.unpadZero)(i).length>=h;return{peekedDate:s,peekedDateString:e,peekedValue:u,parsedPeekedValue:(0,it.parseToInt)(u),switchToNext:null===s||(t[l]?n.length<=i.length:a)}},e.DateObject=s},503:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Key=void 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"}},874:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode=void 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}},930:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=void 0,e.Mask=function(){this.symbols="",this.partMap=[]}},179:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var n=i(849),s={events:{}};function a(t){this.options=(0,n.extend)({},s,t)}a.prototype.destroy=function(){this.options={}},a.prototype.trigger=function(t,e){void 0===e&&(e={});var i={defaultPrevented:!1,preventDefault:function(){i.defaultPrevented=!0}};return!!(0,n.isFunction)(this.options.events[t])&&(this.options.events[t]((0,n.extend)(i,e,{sender:this})),i.defaultPrevented)},e.Observable=a},849:(t,r,e)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isIOS=r.isValidDate=r.areDatePartsEqualTo=r.millisecondStepFor=r.millisecondDigitsInFormat=r.setYears=r.cropTwoDigitYear=r.isFunction=r.noop=r.deepExtend=r.extend=r.clamp=r.isParseableToInt=r.parseToInt=r.isNumber=r.isDocumentAvailable=r.isPresent=void 0;function o(t){return t&&"object"==typeof t&&!Array.isArray(t)}var l=e(109),i=e(618);r.isPresent=function(t){return null!=t},r.isDocumentAvailable=function(){return!!document},r.isNumber=function(t){return(0,r.isPresent)(t)&&"number"==typeof t&&!Number.isNaN(t)},r.parseToInt=function(t){return parseInt(t,10)},r.isParseableToInt=function(t){return(0,r.isNumber)((0,r.parseToInt)(t))&&/^[0-9]+$/.test(t)},r.clamp=function(t,e,i){return Math.min(i,Math.max(e,t))},r.extend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object.assign.apply(Object,t)},r.deepExtend=function(t){for(var e,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(!i.length)return t;var s=i.shift();if(o(t)&&o(s))for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&(s[a]instanceof HTMLElement?t[a]=s[a]:!o(s[a])||s[a]instanceof Date?(0,r.extend)(t,((e={})[a]=s[a],e)):(t[a]&&o(t[a])||(0,r.extend)(t,((e={})[a]={},e)),(0,r.deepExtend)(t[a],s[a])));return r.deepExtend.apply(void 0,l.__spreadArray([t],i,!1))},r.noop=function(){},r.isFunction=function(t){return"function"==typeof t},r.cropTwoDigitYear=function(t){return!(0,r.isPresent)(t)||isNaN(t.getTime())?0:Number(t.getFullYear().toString().slice(-2))},r.setYears=function(t,e){t=(0,i.cloneDate)(t);return t.setFullYear(e),t},r.millisecondDigitsInFormat=function(t){t=t&&t.match(/S+(\1)/);return t?t[0].length:0},r.millisecondStepFor=function(t){return Math.pow(10,3-t)},r.areDatePartsEqualTo=function(t,e,i,n,s,a,r,o){return!(!t||t.getFullYear()!==e||t.getMonth()!==i||t.getDate()!==n||t.getHours()!==s||t.getMinutes()!==a||t.getSeconds()!==r||t.getMilliseconds()!==o)},r.isValidDate=function(t){return(0,r.isPresent)(t)&&t.getTime&&(0,r.isNumber)(t.getTime())},r.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.maxTouchPoints&&2<navigator.maxTouchPoints&&/Macintosh/i.test(navigator.userAgent)}},415:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DateInput=void 0;var n,s=i(109),a=i(953),I=i(506),x=i(874),O=i(503),w=i(849),r=i(179),C=i(655),F=i(618),V=i(761),o="dragStart",l="touchstart",h="mousedown",u="mouseup",c="input",d="keydown",p="focus",m="blur",g="DOMMouseScroll",v="mousewheel",f="valueChange",y="inputEnd",D="blurEnd",E="focusEnd",P="change",b={format:"d",hasPlaceholder:!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={})[f]=null,i[c]=null,i[y]=null,i[p]=null,i[E]=null,i[m]=null,i[D]=null,i[d]=null,i[v]=null,i[P]=null,i),selectNearestSegmentOnFocus:!1,selectPreviousSegmentOnBackspace:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:V.Constants.twoDigitYearMax,autoCorrectParts:!0,autoFill:!1,toggleDayPeriod:!1},i=(n=r.Observable,s.__extends(S,n),Object.defineProperty(S.prototype,"value",{get:function(){return this.dateObject&&this.dateObject.getValue()},enumerable:!1,configurable:!0}),S.prototype.init=function(t,e){var i=(0,w.isValidDate)(this.options.value)?(0,F.cloneDate)(this.options.value):new Date(e.formattedValue);(0,w.isValidDate)(i)||(i=null),this.element=t,this.options=(0,w.extend)({},b,e,{steps:s.__assign(s.__assign({},b.steps),e.steps)}),this.intl=this.options.intlService,this.dateObject=this.createDateObject(),this.dateObject.setValue(i),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=C.DateInputInteractionMode.None,this.forceUpdate()},S.prototype.destroy=function(){this.unbindEvents(),this.dateObject=null,n.prototype.destroy.call(this)},S.prototype.bindEvents=function(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener(o,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(h,this.onElementMouseDown),this.element.addEventListener(l,this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener(u,this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener(c,this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener(d,this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener(p,this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener(m,this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener(P,this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener("paste",this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener(g,this.onElementMouseWheel),this.element.addEventListener(v,this.onElementMouseWheel)},S.prototype.unbindEvents=function(){this.element.removeEventListener(o,this.onElementDragStart),this.element.removeEventListener("drop",this.onElementDrop),this.element.removeEventListener(l,this.onElementMouseDown),this.element.removeEventListener(h,this.onElementMouseDown),this.element.removeEventListener(u,this.onElementMouseUp),this.element.removeEventListener("click",this.onElementClick),this.element.removeEventListener(c,this.onElementInput),this.element.removeEventListener(d,this.onElementKeyDown),this.element.removeEventListener(p,this.onElementFocus),this.element.removeEventListener(m,this.onElementBlur),this.element.removeEventListener(P,this.onElementChange),this.element.removeEventListener("paste",this.onElementPaste),this.element.removeEventListener(g,this.onElementMouseWheel),this.element.removeEventListener(v,this.onElementMouseWheel)},S.prototype.setOptions=function(t,e){void 0===e&&(e=!1),this.options=(0,w.extend)({},this.options,t,{steps:s.__assign(s.__assign({},b.steps),t.steps)}),this.setDateObjectOptions(),e&&(this.unbindEvents(),this.init(this.element,this.options))},S.prototype.setDateObjectOptions=function(){var t;this.dateObject&&(t=this.getDateObjectOptions(),this.dateObject.setOptions(t))},S.prototype.resetLocale=function(){this.unbindEvents(),this.init(this.element,this.options)},S.prototype.isInCaretMode=function(){return this.interactionMode===C.DateInputInteractionMode.Caret},S.prototype.focus=function(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)},S.prototype.onElementDragStart=function(t){t.preventDefault()},S.prototype.onElementDrop=function(t){t.preventDefault()},S.prototype.onElementMouseDown=function(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive},S.prototype.onElementMouseUp=function(t){this.mouseDownStarted=!1,t.preventDefault()},S.prototype.onElementClick=function(t){this.mouseDownStarted=!1,this.switchedPartOnPreviousKeyAction=!1;var e,i=this.selection;this.isInCaretMode()&&this.forceUpdate(),3!==t.detail&&(this.isActive&&this.options.selectNearestSegmentOnFocus?(t=this.element.selectionStart!==this.element.selectionEnd,e=(0,w.isPresent)(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,t=!t&&e?0:this.caret()[0],this.selectNearestSegment(t)):this.setSelection(this.selectionByIndex(i.start)))},S.prototype.onElementInput=function(t){this.triggerInput({event:t});var e=this.elementValue;if(this.element&&this.dateObject){var i=this.switchedPartOnPreviousKeyAction;if(this.isPasteInProgress)this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(t),this.isPasteInProgress=!1;else{var n=this.keyDownEvent||{},s=n.keyCode===x.KeyCode.BACKSPACE||n.key===O.Key.BACKSPACE,a=n.keyCode===x.KeyCode.DELETE||n.key===O.Key.DELETE,n=this.interactionMode,r=(!this.options.allowCaretMode||n===C.DateInputInteractionMode.Caret||a||s||(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=C.DateInputInteractionMode.Caret:this.interactionMode=C.DateInputInteractionMode.Selection,this.isInCaretMode());if(r&&this.keyDownEvent.key===O.Key.SPACE)this.restorePreviousInputEventState();else{var o=this.dateObject&&this.dateObject.getValue(),l=this.dateObject?this.dateObject.value:null,h=this.dateObject.getTextAndFormat(),u=h.text,n=(this.currentFormat=h.format,h=r&&(s||a||n===C.DateInputInteractionMode.Caret)?this.previousElementValue:u,this.elementValue),c=(0,I.approximateStringMatching)({oldText:h,newText:n,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:r,keyEvent:this.keyDownEvent});if(c&&c.length&&c[0]&&c[0][1]!==V.Constants.formatSeparator&&(this.switchedPartOnPreviousKeyAction=!1),!r||c&&0!==c.length){if(r&&1===c.length){if(!c[0]||!c[0][0])return void this.restorePreviousInputEventState();if(r&&c[0]&&(c[0][0]===V.Constants.formatSeparator||c[0][1]===V.Constants.formatSeparator))return void this.restorePreviousInputEventState()}var u=1===c.length&&c[0][1]===V.Constants.formatSeparator,d=[],p=!1,m=null;if(!u)for(var g=0;g<c.length;g++){var v=this.dateObject.parsePart({symbol:c[g][0],currentChar:c[g][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:s||a,originalFormat:this.currentFormat});d.push(v),v.value||(m={type:"parse"}),p=v.switchToNext}this.options.autoSwitchParts||(p=!1),this.resetSegmentValue=!1;var f,h=this.options.format===this.currentFormat||(0,w.isPresent)(this.options.format)&&1<this.options.format.length,n=d[d.length-1],y=n&&!(0,w.isPresent)(n.value),D=r&&(s||a)&&y,E=!!n&&n.resetPart,P=this.dateObject.getValue(),b=!(0,F.isEqual)(o,P),S=this.dateObject.value,M=this.selection;r?(f=c&&0<c.length?c[0][0]:null,f=this.dateObject.getLeadingZero()[f],c.length&&c[0][0]!==V.Constants.formatSeparator?p?(this.forceUpdateWithSelection(),this.switchDateSegment(1)):E?(E=this.currentFormat[M.start])?(this.forceUpdate(),this.setSelection(this.selectionBySymbol(E))):this.restorePreviousInputEventState():D?(this.forceUpdate(),c.length&&c[0][0]!==V.Constants.formatSeparator&&this.setSelection(this.selectionBySymbol(c[0][0]))):y?"0"===t.data&&f||((0,w.isPresent)(o)&&!(0,w.isPresent)(P)?this.restorePreviousInputEventState():!(0,w.isPresent)(o)&&(0,w.isPresent)(P)?this.forceUpdateWithSelection():(0,w.isPresent)(o)&&(0,w.isPresent)(P)?b?this.forceUpdateWithSelection():this.restorePreviousInputEventState():(0,w.isPresent)(o)||(0,w.isPresent)(P)?l===S&&this.restorePreviousInputEventState():this.forceUpdateWithSelection()):h||this.forceUpdateWithSelection():!this.options.autoSwitchParts&&c[0][1]===V.Constants.formatSeparator||this.setSelection(this.selectionBySymbol(c[0][0]))):(this.forceUpdate(),c.length&&c[0][0]!==V.Constants.formatSeparator&&this.setSelection(this.selectionBySymbol(c[0][0])),this.options.autoSwitchParts?u?(this.resetSegmentValue=!0,i||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):p&&(this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):n&&n.switchToNext?this.resetSegmentValue=!0:u&&(this.resetSegmentValue=!0,i||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0),s&&this.options.selectPreviousSegmentOnBackspace&&this.switchDateSegment(-1)),this.tryTriggerValueChange({oldValue:o,event:t}),this.triggerInputEnd({event:t,error:m,oldElementValue:e,newElementValue:this.elementValue}),r&&this.setTextAndFormat()}else this.restorePreviousInputEventState()}}}},S.prototype.onElementFocus=function(t){this.triggerFocus({event:t})||(this.isActive=!0,this.interactionMode=C.DateInputInteractionMode.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:t}))},S.prototype.onElementBlur=function(t){this.resetSegmentValue=!0,this.isActive=!1,this.triggerBlur({event:t})||(this.options.autoFill&&this.autoFill(),this.interactionMode=C.DateInputInteractionMode.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.triggerBlurEnd({event:t}))},S.prototype.onElementChange=function(t){this.triggerChange({event:t})},S.prototype.onElementKeyDown=function(t){if(!this.triggerKeyDown({event:t})){var e=this.selection,i=e.start,e=e.end,n=t;if(this.keyDownEvent=t,this.previousElementValue=this.element.value,this.previousElementSelection={start:i,end:e},this.keyEventMatchesAutoSwitchKeys(t)){i=t.keyCode===x.KeyCode.TAB;if(!i)return t.preventDefault(),void this.switchDateSegment(1);var e=this.selection,s=e.start,e=e.end;if(t.shiftKey&&i?this.switchDateSegment(-1):this.switchDateSegment(1),s!==this.selection.start||e!==this.selection.end)return void t.preventDefault()}var a=this.currentFormat[this.selection.start],r=this.getStepFromSymbol(a),o=!1,l=this.elementValue;if(!(t.altKey||t.ctrlKey||t.metaKey||t.keyCode===x.KeyCode.TAB)){switch(t.keyCode){case x.KeyCode.ARROW_LEFT:this.switchDateSegment(-1),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ARROW_UP:this.modifyDateSegmentValue(r,a,n),l!==this.elementValue&&this.triggerInputEnd({event:t,error:null,newElementValue:this.elementValue,oldElementValue:l}),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ARROW_RIGHT:this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ARROW_DOWN:this.modifyDateSegmentValue(-r,a,n),l!==this.elementValue&&this.triggerInputEnd({event:t,error:null,newElementValue:this.elementValue,oldElementValue:l}),this.switchedPartOnPreviousKeyAction=!(o=!0);break;case x.KeyCode.ENTER:break;case x.KeyCode.HOME:this.selectNearestSegment(0),this.switchedPartOnPreviousKeyAction=!(o=!0),this.resetSegmentValue=!0;break;case x.KeyCode.END:this.selectNearestSegment(this.elementValue.length),this.switchedPartOnPreviousKeyAction=!(o=!0),this.resetSegmentValue=!0;break;default:return}o&&t.preventDefault()}}},S.prototype.onElementPaste=function(){this.isPasteInProgress=!0},S.prototype.onElementMouseWheel=function(t){var e,i=this.elementValue;this.options.enableMouseWheel&&!this.triggerMouseWheel({event:t})&&this.isActive&&((e=t).shiftKey?this.switchDateSegment(0<(e.wheelDelta||-e.detail)?-1:1):this.modifyDateSegmentValue(0<(e.wheelDelta||-e.detail)?1:-1),e.returnValue=!1,e.preventDefault&&e.preventDefault(),i!==this.elementValue)&&this.triggerInputEnd({event:t,error:null,newElementValue:this.elementValue,oldElementValue:i})},S.prototype.updateOnPaste=function(t){var e=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value,i=((0,w.isPresent)(e)&&this.dateObject.shouldNormalizeCentury()&&(e=this.dateObject.normalizeCentury(e)),this.dateObject&&this.dateObject.getValue());this.writeValue(e),this.tryTriggerValueChange({oldValue:i,event:t})},Object.defineProperty(S.prototype,"elementValue",{get:function(){return(this.element||{}).value||""},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"inputFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.inputFormat:V.Constants.defaultDateFormat},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"displayFormat",{get:function(){return this.options.format?"string"==typeof this.options.format?this.options.format:this.options.format.displayFormat:V.Constants.defaultDateFormat},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selection",{get:function(){var t={start:0,end:0};return t=null!==this.element&&void 0!==this.element.selectionStart?{start:this.element.selectionStart,end:this.element.selectionEnd}:t},enumerable:!1,configurable:!0}),S.prototype.setSelection=function(t){this.element&&document.activeElement===this.element&&(this.element.setSelectionRange(t.start,t.end),(0,w.isDocumentAvailable)()&&(0,w.isIOS)()&&this.element.scrollIntoView({block:"nearest",inline:"nearest"}),t.start!==t.end)&&(this.interactionMode=C.DateInputInteractionMode.Selection)},S.prototype.selectionBySymbol=function(t){for(var e=-1,i=0,n=0;n<this.currentFormat.length;n++)this.currentFormat[n]===t&&(i=n+1,-1===e)&&(e=n);return e<0&&(e=0),this.options.autoCorrectParts||this.currentFormat.length===this.currentText.length||(this.currentFormat.length<this.currentText.length?i+=this.currentText.length-this.currentFormat.length:i=Math.max(0,i-(this.currentFormat.length-this.currentText.length))),{start:e,end:i}},S.prototype.selectionByIndex=function(t){for(var e={start:t,end:t},i=t,n=t-1;i<this.currentFormat.length||0<=n;i++,n--){if(i<this.currentFormat.length&&this.currentFormat[i]!==V.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[i]);break}if(0<=n&&this.currentFormat[n]!==V.Constants.formatSeparator){e=this.selectionBySymbol(this.currentFormat[n]);break}}return e},S.prototype.switchDateSegment=function(t){var e=this.selection;if(this.isInCaretMode()){var i=e.start,n=this.currentFormat[i-1],s="",a="";if(t<0){for(var r=i+t;0<=r;r--)if((a=this.currentFormat[r])!==V.Constants.formatSeparator&&a!==n){i=r,s=a;break}}else for(r=i+t;r<this.currentFormat.length;r++)if((a=this.currentFormat[r])!==V.Constants.formatSeparator&&a!==n){i=r,s=a;break}if(s)return this.forceUpdate(),this.setSelection(this.selectionBySymbol(s)),void(this.interactionMode=C.DateInputInteractionMode.Selection)}this.interactionMode=C.DateInputInteractionMode.None;var e=this.selection,o=e.start,e=e.end;if(o<e&&this.currentFormat[o]!==this.currentFormat[e-1])this.setSelection(this.selectionByIndex(0<t?o:e-1)),this.resetSegmentValue=!0,this.interactionMode=C.DateInputInteractionMode.None;else{for(var l=this.currentFormat[o],h=o+t;0<h&&h<this.currentFormat.length&&(this.currentFormat[h]===l||this.currentFormat[h]===V.Constants.formatSeparator);)h+=t;if(this.currentFormat[h]!==V.Constants.formatSeparator){for(var u=h;0<=u&&u<this.currentFormat.length&&this.currentFormat[u]===this.currentFormat[h];)u+=t;u<h&&(u+1!==o||h+1!==e)?(this.setSelection({start:u+1,end:h+1}),this.resetSegmentValue=!0):h<u&&(h!==o||u!==e)&&(this.setSelection({start:h,end:u}),this.resetSegmentValue=!0),this.interactionMode=C.DateInputInteractionMode.None}}},S.prototype.modifyDateSegmentValue=function(t,e,i){var n,s,a;void 0===e&&(e=""),void 0===i&&(i={}),this.dateObject&&!this.options.readonly&&(n=this.value,a=1,s=this.caret(),"S"!==(e=e||this.currentFormat[s[0]])||this.options.steps.millisecond&&1!==this.options.steps.millisecond||(s=(0,w.millisecondDigitsInFormat)(this.inputFormat),a=(0,w.millisecondStepFor)(s)),this.dateObject.modifyPart(e,a*t),this.tryTriggerValueChange({oldValue:n,event:i}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(e)))},S.prototype.tryTriggerValueChange=function(t){if(!(0,F.isEqual)(this.value,(t=void 0===t?{oldValue:null,event:{}}:t).oldValue))return this.triggerValueChange(t)},S.prototype.triggerValueChange=function(t){return this.trigger(f,(0,w.extend)(t=void 0===t?{oldValue:null,event:{}}:t,{value:this.value}))},S.prototype.triggerInput=function(t){return this.trigger(c,(0,w.extend)(t=void 0===t?{event:{}}:t,{value:this.value}))},S.prototype.triggerInputEnd=function(t){return this.trigger(y,(0,w.extend)(t=void 0===t?{event:{},error:null,oldElementValue:"",newElementValue:""}:t,{value:this.value}))},S.prototype.triggerFocus=function(t){return this.trigger(p,(0,w.extend)({},t=void 0===t?{event:{}}:t))},S.prototype.triggerFocusEnd=function(t){return this.trigger(E,(0,w.extend)({},t=void 0===t?{event:{}}:t))},S.prototype.triggerBlur=function(t){return this.trigger(m,(0,w.extend)({},t=void 0===t?{event:{}}:t))},S.prototype.triggerBlurEnd=function(t){return this.trigger(D,(0,w.extend)({},t=void 0===t?{event:{}}:t))},S.prototype.triggerChange=function(t){return this.trigger(P,(0,w.extend)(t=void 0===t?{event:{}}:t,{value:this.value}))},S.prototype.triggerKeyDown=function(t){return this.trigger(d,(0,w.extend)({},t=void 0===t?{event:{}}:t))},S.prototype.triggerMouseWheel=function(t){return this.trigger(v,(0,w.extend)({},t=void 0===t?{event:{}}:t))},S.prototype.forceUpdate=function(){this.setTextAndFormat(),this.refreshElementValue()},S.prototype.forceUpdateWithSelection=function(){var t=this.selection,e=t.start,t=t.end,i=this.elementValue.length,i=(this.forceUpdate(),this.elementValue.length-i);this.setSelection({start:e+i,end:t+i})},S.prototype.setTextAndFormat=function(){var t=this.dateObject.getTextAndFormat(),e=t.text;this.currentFormat=t.format,this.currentText=e},S.prototype.setElementValue=function(t){this.element.value=t},S.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}},S.prototype.restorePreviousInputEventState=function(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()},S.prototype.restorePreviousElementValue=function(){this.setElementValue(this.previousElementValue||"")},S.prototype.restorePreviousElementSelection=function(){var t=this.previousElementSelection,e=t.start;this.setSelection({start:e||0,end:t.end||0})},S.prototype.writeValue=function(t){this.verifyValue(t),this.dateObject=this.getDateObject(t),this.refreshElementValue()},S.prototype.verifyValue=function(t){if(t&&!(0,w.isValidDate)(t))throw new Error("The 'value' should be a valid JavaScript Date instance.")},S.prototype.refreshElementValue=function(){var t=this.element,e=this.isActive?this.inputFormat:this.displayFormat,e=this.dateObject.getTextAndFormat(e),i=e.text,e=(this.currentFormat=e.format,this.currentText=i,this.options.hasPlaceholder||(0,w.isPresent)(this.options.placeholder)),n=!this.isActive&&e&&!this.dateObject.hasValue(),e=(e&&(0,w.isPresent)(this.options.placeholder)&&(t.placeholder=this.options.placeholder),n?"":i);this.previousElementValue=this.elementValue,this.setElementValue(e)},S.prototype.caret=function(t,e){void 0===e&&(e=t);var i=void 0!==t,n=[t,t],s=this.element;if(!i||!this.options.disabled&&!this.options.readonly){try{void 0!==s.selectionStart&&(i&&((0,w.isDocumentAvailable)()&&document.activeElement!==s&&s.focus(),s.setSelectionRange(t,e)),n=[s.selectionStart,s.selectionEnd])}catch(t){n=[]}return n}},S.prototype.selectNearestSegment=function(t){for(var e=t,i=t-1;e<this.currentFormat.length||0<=i;e++,i--){if(e<this.currentFormat.length&&"_"!==this.currentFormat[e])return void this.selectDateSegment(this.currentFormat[e]);if(0<=i&&"_"!==this.currentFormat[i])return void this.selectDateSegment(this.currentFormat[i])}},S.prototype.selectDateSegment=function(t){for(var e=-1,i=0,n=0;n<this.currentFormat.length;n++)this.currentFormat[n]===t&&(i=n+1,-1===e)&&(e=n);e<0&&(e=0),this.caret(0,0),this.caret(e,i)},S.prototype.getDateObject=function(t){var e=(this.dateObject||{}).leadingZero,t=(this.options.value=t,this.createDateObject());return t.setLeadingZero(this.isActive?e:null),t},S.prototype.createDateObject=function(){var t=this.getDateObjectOptions();return new a.DateObject((0,w.extend)({},t))},S.prototype.getDateObjectOptions=function(){return{intlService:this.options.intlService,formatPlaceholder:this.options.formatPlaceholder||"formatPattern",format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value,toggleDayPeriod:this.options.toggleDayPeriod}},S.prototype.keyEventMatchesAutoSwitchKeys=function(t){var e=(this.options.autoSwitchKeys||[]).map(function(t){return t.toString().toLowerCase().trim()});return 0<=e.indexOf(t.keyCode.toString())||0<=e.indexOf(t.keyCode)||0<=e.indexOf(t.key.toLowerCase().trim())},S.prototype.autoFill=function(){var t,e,i,n,s,a=this.dateObject,r=new Date;(a.date||a.month||a.year||a.hours||a.minutes||a.seconds)&&(i=(a.year?a.value:r).getFullYear(),e=(a.month?a.value:r).getMonth(),t=(a.date?a.value:r).getDate(),n=(a.hours?a.value:r).getHours(),s=(a.minutes?a.value:r).getMinutes(),r=(a.seconds?a.value:r).getSeconds(),a.setValue(new Date(i,e,t,n,s,r)),this.refreshElementValue(),this.triggerValueChange())},S);function S(t,e){var i=n.call(this,e)||this;return i.dateObject=null,i.currentText="",i.currentFormat="",i.interactionMode=C.DateInputInteractionMode.None,i.previousElementSelection={start:0,end:0},i.init(t,e),i}e.DateInput=i},655:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DateInputInteractionMode=void 0,e.DateInputInteractionMode={None:"none",Caret:"caret",Selection:"selection"}},506:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isInRange=e.dateSymbolMap=e.approximateStringMatching=e.unpadZero=e.padZero=void 0;var p=i(761),m=i(503);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,i=t.newText,n=t.formatPattern,s=t.selectionStart,a=t.isInCaretMode,t=t.keyEvent,r=s+e.length-i.length,o=e[r],l=e.substring(0,r),e=i.substring(0,s),h=[];if(l===e&&0<s)return h.push([n[s-1],e[s-1]]),h;if(0===l.indexOf(e)&&a&&(t.key===m.Key.DELETE||t.key===m.Key.BACKSPACE)||0===l.indexOf(e)&&!a&&(0===e.length||n[e.length-1]!==n[e.length])){var u="";a||1!==e.length||h.push([n[0],e[0]]);for(var c=e.length;c<l.length;c++)n[c]!==u&&n[c]!==p.Constants.formatSeparator&&(u=n[c],h.push([u,""]));return h}if((!a||0!==e.indexOf(l)&&n[s-1]!==p.Constants.formatSeparator)&&(a||0!==e.indexOf(l)&&n[s-1]!==p.Constants.formatSeparator))return" "===e[e.length-1]||e[e.length-1]===o&&"_"===n[r]?[[n[s-1],p.Constants.formatSeparator]]:[[n[s-1],e[s-1]]];for(var d=n[0],c=Math.max(0,l.length-1);c<n.length;c++)if(n[c]!==p.Constants.formatSeparator){d=n[c];break}return[[d,e[s-1]]]},e.dateSymbolMap=function(t,e){return t[e.pattern[0]]=e.type,t},e.isInRange=function(t,e,i){return null===t||!(e&&t<e||i&&i<t)}},618:t=>{t.exports=o},109:t=>{t.exports=l}},s={},t=a={},Object.defineProperty(t,"__esModule",{value:!0}),t.DateInput=void 0,e=i(415),Object.defineProperty(t,"DateInput",{enumerable:!0,get:function(){return e.DateInput}}),a))}}});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-dateinputs-common",
3
3
  "description": "Kendo UI common date input utilities",
4
- "version": "0.4.2-dev.202501141100",
4
+ "version": "0.4.2-develop.2",
5
5
  "keywords": [
6
6
  "Kendo UI"
7
7
  ],
@@ -15,8 +15,8 @@
15
15
  "jsdelivr": "dist/cdn/main.js",
16
16
  "unpkg": "dist/cdn/main.js",
17
17
  "engines": {
18
- "npm": ">=8.0.0",
19
- "node": ">=18.0.0"
18
+ "npm": ">=10.0.0",
19
+ "node": ">=20.0.0"
20
20
  },
21
21
  "scripts": {
22
22
  "test": "jest --config jest.config.js",
@@ -25,53 +25,40 @@
25
25
  "e2e": "gulp e2e",
26
26
  "e2e:ci": "CHROME_BIN=`which chromium-browser` NO_SANDBOX=true ENV_BROWSER=Chrome_headless npm run e2e",
27
27
  "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider gulp start",
28
- "lint": "gulp lint",
28
+ "lint": "eslint ./src",
29
29
  "api-check": "cross-env NODE_OPTIONS=--openssl-legacy-provider gulp api-check",
30
30
  "build-package": "cross-env NODE_OPTIONS=--openssl-legacy-provider gulp build-ts-package",
31
- "semantic-release": "semantic-release pre && semantic-prerelease publish --public && semantic-release post"
31
+ "prepare": "is-ci || husky install"
32
32
  },
33
33
  "dependencies": {
34
34
  "@progress/kendo-date-math": "^1.5.9",
35
35
  "tslib": "^2.4.1"
36
36
  },
37
37
  "devDependencies": {
38
+ "@commitlint/cli": "^19.6.1",
39
+ "@commitlint/config-conventional": "^19.6.0",
38
40
  "@progress/kendo-intl": "^3.1.1",
39
- "@progress/kendo-typescript-tasks": "^10.0.0",
40
- "@progress/semantic-prerelease": "^3.0.0",
41
+ "@progress/kendo-typescript-tasks": "^11.3.8-dev.20",
41
42
  "@types/jasmine": "~2.2.0",
42
- "@types/jest": "^23.3.2",
43
+ "@types/jest": "^29.5.14",
44
+ "@typescript-eslint/eslint-plugin": "^4.28.2",
43
45
  "cross-env": "^7.0.3",
44
46
  "cz-conventional-changelog": "^1.1.5",
47
+ "eslint": "^7.32.0",
45
48
  "ghooks": "^1.0.3",
46
- "gulp": "^4.0.0",
47
- "jest": "^23.6.0",
48
- "jest-preset-typescript": "^1.0.1",
49
- "semantic-release": "^6.3.6",
50
- "ts-jest": "^23.1.4",
51
- "typescript": "~3.4.0",
52
- "validate-commit-msg": "^1.1.1"
49
+ "gulp": "^5.0.0",
50
+ "husky": "^9.1.7",
51
+ "is-ci": "^4.1.0",
52
+ "jest": "^29.7.0",
53
+ "jest-environment-jsdom": "^29.7.0",
54
+ "jsdom": "^26.0.0",
55
+ "semantic-release": "^24.2.1",
56
+ "ts-jest": "^29.2.5",
57
+ "typescript": "^5.7.3"
53
58
  },
54
59
  "config": {
55
60
  "commitizen": {
56
61
  "path": "./node_modules/cz-conventional-changelog"
57
- },
58
- "ghooks": {
59
- "commit-msg": "validate-commit-msg"
60
- },
61
- "validate-commit-msg": {
62
- "types": [
63
- "feat",
64
- "fix",
65
- "docs",
66
- "style",
67
- "refactor",
68
- "perf",
69
- "test",
70
- "chore",
71
- "revert"
72
- ],
73
- "warnOnFail": false,
74
- "maxSubjectLength": 100
75
62
  }
76
63
  },
77
64
  "repository": {
@@ -82,17 +69,23 @@
82
69
  "url": "https://github.com/telerik/kendo-angular"
83
70
  },
84
71
  "release": {
85
- "debug": false,
86
- "branchTags": {
87
- "develop": "dev"
88
- },
89
- "fallbackTags": {
90
- "dev": "latest"
91
- },
92
- "analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
93
- "generateNotes": "@progress/semantic-prerelease/generateNotes",
94
- "getLastRelease": "@progress/semantic-prerelease/getLastRelease",
95
- "verifyConditions": "@progress/semantic-prerelease/verifyConditions",
96
- "verifyRelease": "@progress/semantic-prerelease/verifyRelease"
97
- }
98
- }
72
+ "branches": [
73
+ {
74
+ "name": "master",
75
+ "channel": "latest"
76
+ },
77
+ {
78
+ "name": "develop",
79
+ "prerelease": true,
80
+ "channel": "dev"
81
+ }
82
+ ]
83
+ },
84
+ "publishConfig": {
85
+ "access": "public"
86
+ },
87
+ "files": [
88
+ "dist",
89
+ "src/**/*.d.ts"
90
+ ]
91
+ }
package/CODEOWNERS DELETED
@@ -1,2 +0,0 @@
1
- * @telerik/inputs-owners
2
- docs/* @telerik/docs-reviewers