@getflip/swirl-components 0.340.0 → 0.341.0

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.
Files changed (34) hide show
  1. package/components.json +1 -1
  2. package/dist/cjs/{maska-BX2QG_K8.js → index-BOqO2Grl.js} +3593 -17
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/swirl-components.cjs.js +1 -1
  5. package/dist/cjs/swirl-date-input.cjs.entry.js +92 -37
  6. package/dist/cjs/swirl-modal.cjs.entry.js +1 -1
  7. package/dist/cjs/swirl-time-input.cjs.entry.js +78 -49
  8. package/dist/collection/components/swirl-date-input/swirl-date-input.js +88 -33
  9. package/dist/collection/components/swirl-date-input/swirl-date-input.stories.js +1 -1
  10. package/dist/collection/components/swirl-modal/swirl-modal.css +12 -9
  11. package/dist/collection/components/swirl-time-input/swirl-time-input.js +77 -46
  12. package/dist/collection/components/swirl-time-input/swirl-time-input.stories.js +1 -1
  13. package/dist/components/assets/pdfjs/pdf.worker.min.mjs +28 -0
  14. package/dist/components/{maska.js → index3.js} +3593 -17
  15. package/dist/components/swirl-date-input.js +88 -33
  16. package/dist/components/swirl-modal.js +1 -1
  17. package/dist/components/swirl-time-input.js +78 -48
  18. package/dist/esm/{maska-CSSJQ9ZE.js → index-D3UoejeY.js} +3593 -17
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/swirl-components.js +1 -1
  21. package/dist/esm/swirl-date-input.entry.js +88 -33
  22. package/dist/esm/swirl-modal.entry.js +1 -1
  23. package/dist/esm/swirl-time-input.entry.js +76 -47
  24. package/dist/swirl-components/p-1bbb3a4b.entry.js +1 -0
  25. package/dist/swirl-components/p-96441b7e.entry.js +1 -0
  26. package/dist/swirl-components/p-D3UoejeY.js +1 -0
  27. package/dist/swirl-components/{p-a9c2c278.entry.js → p-d7f59668.entry.js} +1 -1
  28. package/dist/swirl-components/swirl-components.esm.js +1 -1
  29. package/dist/types/components/swirl-date-input/swirl-date-input.d.ts +2 -2
  30. package/dist/types/components/swirl-time-input/swirl-time-input.d.ts +1 -2
  31. package/package.json +2 -2
  32. package/dist/swirl-components/p-1217fdca.entry.js +0 -1
  33. package/dist/swirl-components/p-CSSJQ9ZE.js +0 -6
  34. package/dist/swirl-components/p-b96b8029.entry.js +0 -1
@@ -0,0 +1 @@
1
+ function t(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function e(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t){e(1,arguments);var r=Object.prototype.toString.call(t);return t instanceof Date||"object"===n(t)&&"[object Date]"===r?new Date(t.getTime()):"number"==typeof t||"[object Number]"===r?new Date(t):("string"!=typeof t&&"[object String]"!==r||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var i={};function u(){return i}function o(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t){if(e(1,arguments),!function(t){return e(1,arguments),t instanceof Date||"object"===s(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var n=r(t);return!isNaN(Number(n))}function c(n,i){return e(2,arguments),function(n,i){e(2,arguments);var u=r(n).getTime(),o=t(i);return new Date(u+o)}(n,-t(i))}function f(t){e(1,arguments);var n=r(t),i=n.getUTCDay(),u=(i<1?7:0)+i-1;return n.setUTCDate(n.getUTCDate()-u),n.setUTCHours(0,0,0,0),n}function h(t){e(1,arguments);var n=r(t),i=n.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(i+1,0,4),u.setUTCHours(0,0,0,0);var o=f(u),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=f(s);return n.getTime()>=o.getTime()?i+1:n.getTime()>=a.getTime()?i:i-1}function l(t){e(1,arguments);var n=r(t),i=f(n).getTime()-function(t){e(1,arguments);var n=h(t),r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),f(r)}(n).getTime();return Math.round(i/6048e5)+1}function d(n,i){var o,s,a,c,f,h,l,d;e(1,arguments);var b=u(),y=t(null!==(o=null!==(s=null!==(a=null!==(c=null==i?void 0:i.weekStartsOn)&&void 0!==c?c:null==i||null===(f=i.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==a?a:b.weekStartsOn)&&void 0!==s?s:null===(l=b.locale)||void 0===l||null===(d=l.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==o?o:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=r(n),v=p.getUTCDay(),w=(v<y?7:0)+v-y;return p.setUTCDate(p.getUTCDate()-w),p.setUTCHours(0,0,0,0),p}function b(n,i){var o,s,a,c,f,h,l,b;e(1,arguments);var y=r(n),p=y.getUTCFullYear(),v=u(),w=t(null!==(o=null!==(s=null!==(a=null!==(c=null==i?void 0:i.firstWeekContainsDate)&&void 0!==c?c:null==i||null===(f=i.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==a?a:v.firstWeekContainsDate)&&void 0!==s?s:null===(l=v.locale)||void 0===l||null===(b=l.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==o?o:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(p+1,0,w),m.setUTCHours(0,0,0,0);var g=d(m,i),A=new Date(0);A.setUTCFullYear(p,0,w),A.setUTCHours(0,0,0,0);var E=d(A,i);return y.getTime()>=g.getTime()?p+1:y.getTime()>=E.getTime()?p:p-1}function y(n,i){e(1,arguments);var o=r(n),s=d(o,i).getTime()-function(n,r){var i,o,s,a,c,f,h,l;e(1,arguments);var y=u(),p=t(null!==(i=null!==(o=null!==(s=null!==(a=null==r?void 0:r.firstWeekContainsDate)&&void 0!==a?a:null==r||null===(c=r.locale)||void 0===c||null===(f=c.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==s?s:y.firstWeekContainsDate)&&void 0!==o?o:null===(h=y.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1),v=b(n,r),w=new Date(0);return w.setUTCFullYear(v,0,p),w.setUTCHours(0,0,0,0),d(w,r)}(o,i).getTime();return Math.round(s/6048e5)+1}function p(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var v={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return p("yy"===e?r%100:r,e.length)}(t,e)},Y:function(t,e,n,r){var i=b(t,r),u=i>0?i:1-i;return"YY"===e?p(u%100,2):"Yo"===e?n.ordinalNumber(u,{unit:"year"}):p(u,e.length)},R:function(t,e){return p(h(t),e.length)},u:function(t,e){return p(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return p(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return p(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):p(n+1,2)}(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return p(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=y(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):p(i,e.length)},I:function(t,e,n){var r=l(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):p(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return p(t.getUTCDate(),e.length)}(t,e)},D:function(t,n,i){var u=function(t){e(1,arguments);var n=r(t),i=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var u=n.getTime();return Math.floor((i-u)/864e5)+1}(t);return"Do"===n?i.ordinalNumber(u,{unit:"dayOfYear"}):p(u,n.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),u=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(u);case"ee":return p(u,2);case"eo":return n.ordinalNumber(u,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),u=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(u);case"cc":return p(u,e.length);case"co":return n.ordinalNumber(u,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return p(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return function(t,e){return p(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return p(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):p(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):p(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return p(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return p(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var n=e.length,r=t.getUTCMilliseconds();return p(Math.floor(r*Math.pow(10,n-3)),e.length)}(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return m(i);case"XXXX":case"XX":return g(i);default:return g(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return m(i);case"xxxx":case"xx":return g(i);default:return g(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+w(i,":");default:return"GMT"+g(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+w(i,":");default:return"GMT"+g(i,":")}},t:function(t,e,n,r){return p(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,n,r){return p((r._originalDate||t).getTime(),e.length)}};function w(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),u=r%60;if(0===u)return n+String(i);var o=e;return n+String(i)+o+p(u,2)}function m(t,e){return t%60==0?(t>0?"-":"+")+p(Math.abs(t)/60,2):g(t,e)}function g(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+p(Math.floor(i/60),2)+n+p(i%60,2)}var A=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},E=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},S={p:E,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],i=r[1],u=r[2];if(!u)return A(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",A(i,e)).replace("{{time}}",E(u,e))}},j=["D","DD"],O=["YY","YYYY"];function k(t){return-1!==j.indexOf(t)}function x(t){return-1!==O.indexOf(t)}function B(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var R={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function C(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var D={date:C({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:C({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:C({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},F={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function T(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var i=t.defaultFormattingWidth||t.defaultWidth,u=null!=n&&n.width?String(n.width):i;r=t.formattingValues[u]||t.formattingValues[i]}else{var o=t.defaultWidth,s=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[s]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function M(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!i)return null;var u,o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],a=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(s);return u=t.valueCallback?t.valueCallback(a):a,{value:u=n.valueCallback?n.valueCallback(u):u,rest:e.slice(o.length)}}}var P,_={code:"en-US",formatDistance:function(t,e,n){var r,i=R[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:D,formatRelative:function(t){return F[t]},localize:{ordinalNumber:function(t){var e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:T({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:T({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:T({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:T({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:T({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(P={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(P.matchPattern);if(!n)return null;var r=n[0],i=t.match(P.parsePattern);if(!i)return null;var u=P.valueCallback?P.valueCallback(i[0]):i[0];return{value:u=e.valueCallback?e.valueCallback(u):u,rest:t.slice(r.length)}}),era:M({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:M({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:M({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:M({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:M({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},I=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,q=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,V=/^'([^]*?)'?$/,L=/''/g,Y=/[a-zA-Z]/;function N(n,i,s){var f,h,l,d,b,y,p,w,m;e(2,arguments);var g=String(i),A=u(),E=null!==(f=A.locale)&&void 0!==f?f:_,j=t(null!==(h=null!==(l=A.firstWeekContainsDate)&&void 0!==l?l:null===(d=A.locale)||void 0===d||null===(b=d.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==h?h:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=t(null!==(y=null!==(p=A.weekStartsOn)&&void 0!==p?p:null===(w=A.locale)||void 0===w||null===(m=w.options)||void 0===m?void 0:m.weekStartsOn)&&void 0!==y?y:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var R=r(n);if(!a(R))throw new RangeError("Invalid time value");var C=c(R,o(R)),D={firstWeekContainsDate:j,weekStartsOn:O,locale:E,_originalDate:R};return g.match(q).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,S[e])(t,E.formatLong):t})).join("").match(I).map((function(t){if("''"===t)return"'";var e,r,u=t[0];if("'"===u)return(r=(e=t).match(V))?r[1].replace(L,"'"):e;var o=v[u];if(o)return x(t)&&B(t,i,String(n)),k(t)&&B(t,i,String(n)),o(C,t,E.localize,D);if(u.match(Y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return t})).join("")}function Q(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function W(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&X(t,e)}function X(t,e){return X=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},X(t,e)}function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r,i,u=U(t);if(e){var o=U(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==G(i)&&"function"!=typeof i?H(r):i}}function H(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function U(t){return U=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},U(t)}function K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z(t,e){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}function $(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var J=function(){function t(){K(this,t),$(this,"subPriority",0)}return Z(t,[{key:"validate",value:function(){return!0}}]),t}(),tt=function(){W(e,J);var t=z(e);function e(n,r,i,u,o){var s;return K(this,e),(s=t.call(this)).value=n,s.validateValue=r,s.setValue=i,s.priority=u,o&&(s.subPriority=o),s}return Z(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,n){return this.setValue(t,e,this.value,n)}}]),e}(),et=function(){W(e,J);var t=z(e);function e(){var n;K(this,e);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return $(H(n=t.call.apply(t,[this].concat(i))),"priority",10),$(H(n),"subPriority",-1),n}return Z(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var n=new Date(0);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}}]),e}();var nt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,(n=[{key:"run",value:function(t,e,n,r){var i=this.parse(t,e,n,r);return i?{setter:new tt(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(){return!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),t;var e,n}();function rt(t){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(t)}function it(t,e){return it=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},it(t,e)}function ut(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ot(t){return ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ot(t)}function st(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var at=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&it(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=ot(t);if(e){var o=ot(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==rt(i)&&"function"!=typeof i?ut(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return st(ut(t=i.call.apply(i,[this].concat(n))),"priority",140),st(ut(t),"incompatibleTokens",["R","u","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,n){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}(),ct=/^(1[0-2]|0?\d)/,ft=/^(3[0-1]|[0-2]?\d)/,ht=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,lt=/^(5[0-3]|[0-4]?\d)/,dt=/^(2[0-3]|[0-1]?\d)/,bt=/^(2[0-4]|[0-1]?\d)/,yt=/^(1[0-1]|0?\d)/,pt=/^(1[0-2]|0?\d)/,vt=/^[0-5]?\d/,wt=/^[0-5]?\d/,mt=/^\d/,gt=/^\d{1,2}/,At=/^\d{1,3}/,Et=/^\d{1,4}/,St=/^-?\d+/,jt=/^-?\d/,Ot=/^-?\d{1,2}/,kt=/^-?\d{1,3}/,xt=/^-?\d{1,4}/,Bt=/^([+-])(\d{2})(\d{2})?|Z/,Rt=/^([+-])(\d{2})(\d{2})|Z/,Ct=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Dt=/^([+-])(\d{2}):(\d{2})|Z/,Ft=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Tt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Mt(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Pt(t,e){var n=e.match(t);return n?"Z"===n[0]?{value:0,rest:e.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:e.slice(n[0].length)}:null}function _t(t){return Mt(St,t)}function It(t,e){switch(t){case 1:return Mt(mt,e);case 2:return Mt(gt,e);case 3:return Mt(At,e);case 4:return Mt(Et,e);default:return Mt(new RegExp("^\\d{1,"+t+"}"),e)}}function qt(t,e){switch(t){case 1:return Mt(jt,e);case 2:return Mt(Ot,e);case 3:return Mt(kt,e);case 4:return Mt(xt,e);default:return Mt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Vt(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Lt(t,e){var n,r=e>0,i=r?e:1-e;if(i<=50)n=t||100;else{var u=i+50;n=t+100*Math.floor(u/100)-(t>=u%100?100:0)}return r?n:1-n}function Yt(t){return t%400==0||t%4==0&&t%100!=0}function Nt(t){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function Qt(t,e){return Qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Qt(t,e)}function Gt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wt(t){return Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wt(t)}function Xt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var zt=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qt(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Wt(t);if(e){var o=Wt(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Nt(i)&&"function"!=typeof i?Gt(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Xt(Gt(t=i.call.apply(i,[this].concat(n))),"priority",130),Xt(Gt(t),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Tt(It(4,t),r);case"yo":return Tt(n.ordinalNumber(t,{unit:"year"}),r);default:return Tt(It(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n){var r=t.getUTCFullYear();if(n.isTwoDigitYear){var i=Lt(n.year,r);return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-n.year:n.year,0,1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function Ut(t,e){return Ut=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ut(t,e)}function Kt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Zt(t){return Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zt(t)}function $t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jt=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ut(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Zt(t);if(e){var o=Zt(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Ht(i)&&"function"!=typeof i?Kt(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return $t(Kt(t=i.call.apply(i,[this].concat(n))),"priority",130),$t(Kt(t),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Tt(It(4,t),r);case"Yo":return Tt(n.ordinalNumber(t,{unit:"year"}),r);default:return Tt(It(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n,r){var i=b(t,r);if(n.isTwoDigitYear){var u=Lt(n.year,i);return t.setUTCFullYear(u,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),d(t,r)}return t.setUTCFullYear("era"in e&&1!==e.era?1-n.year:n.year,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),d(t,r)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function te(t){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(t)}function ee(t,e){return ee=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ee(t,e)}function ne(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function re(t){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},re(t)}function ie(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ue=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ee(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=re(t);if(e){var o=re(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==te(i)&&"function"!=typeof i?ne(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ie(ne(t=i.call.apply(i,[this].concat(n))),"priority",130),ie(ne(t),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e){return qt("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),f(r)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function oe(t){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(t)}function se(t,e){return se=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},se(t,e)}function ae(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ce(t){return ce=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ce(t)}function fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var he=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&se(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=ce(t);if(e){var o=ce(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==oe(i)&&"function"!=typeof i?ae(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return fe(ae(t=i.call.apply(i,[this].concat(n))),"priority",130),fe(ae(t),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e){return qt("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function le(t){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},le(t)}function de(t,e){return de=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},de(t,e)}function be(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ye(t){return ye=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ye(t)}function pe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ve=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&de(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=ye(t);if(e){var o=ye(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==le(i)&&"function"!=typeof i?be(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return pe(be(t=i.call.apply(i,[this].concat(n))),"priority",120),pe(be(t),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"Q":case"QQ":return It(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function we(t){return we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},we(t)}function me(t,e){return me=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},me(t,e)}function ge(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ae(t){return Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ae(t)}function Ee(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Se=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&me(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Ae(t);if(e){var o=Ae(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==we(i)&&"function"!=typeof i?ge(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Ee(ge(t=i.call.apply(i,[this].concat(n))),"priority",120),Ee(ge(t),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"q":case"qq":return It(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function je(t){return je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(t)}function Oe(t,e){return Oe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Oe(t,e)}function ke(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}function Be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Re=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Oe(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=xe(t);if(e){var o=xe(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==je(i)&&"function"!=typeof i?ke(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Be(ke(t=i.call.apply(i,[this].concat(n))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Be(ke(t),"priority",110),t}return n=u,(r=[{key:"parse",value:function(t,e,n){var r=function(t){return t-1};switch(e){case"M":return Tt(Mt(ct,t),r);case"MM":return Tt(It(2,t),r);case"Mo":return Tt(n.ordinalNumber(t,{unit:"month"}),r);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Ce(t){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce(t)}function De(t,e){return De=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},De(t,e)}function Fe(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Te(t)}function Me(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pe=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&De(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Te(t);if(e){var o=Te(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Ce(i)&&"function"!=typeof i?Fe(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Me(Fe(t=i.call.apply(i,[this].concat(n))),"priority",110),Me(Fe(t),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){var r=function(t){return t-1};switch(e){case"L":return Tt(Mt(ct,t),r);case"LL":return Tt(It(2,t),r);case"Lo":return Tt(n.ordinalNumber(t,{unit:"month"}),r);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function _e(t){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(t)}function Ie(t,e){return Ie=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ie(t,e)}function qe(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ve(t){return Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ve(t)}function Le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ye=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ie(t,e)}(a,nt);var n,i,u,o,s=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e,r,u=Ve(n);if(i){var o=Ve(this).constructor;t=Reflect.construct(u,arguments,o)}else t=u.apply(this,arguments);return e=this,!(r=t)||"object"!==_e(r)&&"function"!=typeof r?qe(e):r});function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Le(qe(t=s.call.apply(s,[this].concat(n))),"priority",100),Le(qe(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),t}return u=a,o=[{key:"parse",value:function(t,e,n){switch(e){case"w":return Mt(lt,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(n,i,u,o){return d(function(n,i,u){e(2,arguments);var o=r(n),s=t(i),a=y(o,u)-s;return o.setUTCDate(o.getUTCDate()-7*a),o}(n,u,o),o)}}],o&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(u.prototype,o),a}();function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}function Qe(t,e){return Qe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Qe(t,e)}function Ge(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function We(t){return We=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},We(t)}function Xe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ze=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qe(t,e)}(a,nt);var n,i,u,o,s=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e,r,u=We(n);if(i){var o=We(this).constructor;t=Reflect.construct(u,arguments,o)}else t=u.apply(this,arguments);return e=this,!(r=t)||"object"!==Ne(r)&&"function"!=typeof r?Ge(e):r});function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Xe(Ge(t=s.call.apply(s,[this].concat(n))),"priority",100),Xe(Ge(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),t}return u=a,o=[{key:"parse",value:function(t,e,n){switch(e){case"I":return Mt(lt,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(n,i,u){return f(function(n,i){e(2,arguments);var u=r(n),o=t(i),s=l(u)-o;return u.setUTCDate(u.getUTCDate()-7*s),u}(n,u))}}],o&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(u.prototype,o),a}();function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ue(t,e){return Ue=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ue(t,e)}function Ke(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ze(t){return Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ze(t)}function $e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Je=[31,28,31,30,31,30,31,31,30,31,30,31],tn=[31,29,31,30,31,30,31,31,30,31,30,31],en=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ue(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Ze(t);if(e){var o=Ze(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==He(i)&&"function"!=typeof i?Ke(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return $e(Ke(t=i.call.apply(i,[this].concat(n))),"priority",90),$e(Ke(t),"subPriority",1),$e(Ke(t),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"d":return Mt(ft,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){var n=Yt(t.getUTCFullYear()),r=t.getUTCMonth();return n?e>=1&&e<=tn[r]:e>=1&&e<=Je[r]}},{key:"set",value:function(t,e,n){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function nn(t){return nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nn(t)}function rn(t,e){return rn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rn(t,e)}function un(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function on(t){return on=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},on(t)}function sn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var an=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=on(t);if(e){var o=on(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==nn(i)&&"function"!=typeof i?un(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sn(un(t=i.call.apply(i,[this].concat(n))),"priority",90),sn(un(t),"subpriority",1),sn(un(t),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"D":case"DD":return Mt(ht,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return Yt(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,n){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function cn(n,i,o){var s,a,c,f,h,l,d,b;e(2,arguments);var y=u(),p=t(null!==(s=null!==(a=null!==(c=null!==(f=null==o?void 0:o.weekStartsOn)&&void 0!==f?f:null==o||null===(h=o.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==c?c:y.weekStartsOn)&&void 0!==a?a:null===(d=y.locale)||void 0===d||null===(b=d.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==s?s:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=r(n),w=t(i),m=((w%7+7)%7<p?7:0)+w-v.getUTCDay();return v.setUTCDate(v.getUTCDate()+m),v}function fn(t){return fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(t)}function hn(t,e){return hn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},hn(t,e)}function ln(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dn(t){return dn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},dn(t)}function bn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yn=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&hn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=dn(t);if(e){var o=dn(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==fn(i)&&"function"!=typeof i?ln(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return bn(ln(t=i.call.apply(i,[this].concat(n))),"priority",90),bn(ln(t),"incompatibleTokens",["D","i","e","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,r){return(t=cn(t,n,r)).setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function vn(t,e){return vn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vn(t,e)}function wn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function gn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var An=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=mn(t);if(e){var o=mn(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==pn(i)&&"function"!=typeof i?wn(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return gn(wn(t=i.call.apply(i,[this].concat(n))),"priority",90),gn(wn(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n,r){var i=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Tt(It(e.length,t),i);case"eo":return Tt(n.ordinalNumber(t,{unit:"day"}),i);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,r){return(t=cn(t,n,r)).setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function En(t){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(t)}function Sn(t,e){return Sn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Sn(t,e)}function jn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function On(t){return On=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},On(t)}function kn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xn=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=On(t);if(e){var o=On(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==En(i)&&"function"!=typeof i?jn(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return kn(jn(t=i.call.apply(i,[this].concat(n))),"priority",90),kn(jn(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n,r){var i=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Tt(It(e.length,t),i);case"co":return Tt(n.ordinalNumber(t,{unit:"day"}),i);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,r){return(t=cn(t,n,r)).setUTCHours(0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function Rn(t,e){return Rn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rn(t,e)}function Cn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Dn(t){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Dn(t)}function Fn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tn=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rn(t,e)}(a,nt);var n,i,u,o,s=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e,r,u=Dn(n);if(i){var o=Dn(this).constructor;t=Reflect.construct(u,arguments,o)}else t=u.apply(this,arguments);return e=this,!(r=t)||"object"!==Bn(r)&&"function"!=typeof r?Cn(e):r});function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Fn(Cn(t=s.call.apply(s,[this].concat(n))),"priority",90),Fn(Cn(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),t}return u=a,o=[{key:"parse",value:function(t,e,n){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return It(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return Tt(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return Tt(n.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Tt(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r);default:return Tt(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(n,i,u){return n=function(n,i){e(2,arguments);var u=t(i);u%7==0&&(u-=7);var o=r(n),s=((u%7+7)%7<1?7:0)+u-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+s),o}(n,u),n.setUTCHours(0,0,0,0),n}}],o&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(u.prototype,o),a}();function Mn(t){return Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mn(t)}function Pn(t,e){return Pn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Pn(t,e)}function _n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},In(t)}function qn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vn=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=In(t);if(e){var o=In(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Mn(i)&&"function"!=typeof i?_n(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return qn(_n(t=i.call.apply(i,[this].concat(n))),"priority",80),qn(_n(t),"incompatibleTokens",["b","B","H","k","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(Vt(n),0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Ln(t){return Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ln(t)}function Yn(t,e){return Yn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Yn(t,e)}function Nn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qn(t){return Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qn(t)}function Gn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wn=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Qn(t);if(e){var o=Qn(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Ln(i)&&"function"!=typeof i?Nn(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Gn(Nn(t=i.call.apply(i,[this].concat(n))),"priority",80),Gn(Nn(t),"incompatibleTokens",["a","B","H","k","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(Vt(n),0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Xn(t){return Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(t)}function zn(t,e){return zn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},zn(t,e)}function Hn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Un(t){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Un(t)}function Kn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zn=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&zn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Un(t);if(e){var o=Un(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Xn(i)&&"function"!=typeof i?Hn(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Kn(Hn(t=i.call.apply(i,[this].concat(n))),"priority",80),Kn(Hn(t),"incompatibleTokens",["a","b","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(Vt(n),0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function $n(t){return $n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$n(t)}function Jn(t,e){return Jn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Jn(t,e)}function tr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function er(t){return er=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},er(t)}function nr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jn(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=er(t);if(e){var o=er(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==$n(i)&&"function"!=typeof i?tr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return nr(tr(t=i.call.apply(i,[this].concat(n))),"priority",70),nr(tr(t),"incompatibleTokens",["H","K","k","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"h":return Mt(pt,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,n){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&n<12?n+12:r||12!==n?n:0,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function ir(t){return ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(t)}function ur(t,e){return ur=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ur(t,e)}function or(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sr(t){return sr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},sr(t)}function ar(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var cr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ur(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=sr(t);if(e){var o=sr(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==ir(i)&&"function"!=typeof i?or(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ar(or(t=i.call.apply(i,[this].concat(n))),"priority",70),ar(or(t),"incompatibleTokens",["a","b","h","K","k","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"H":return Mt(dt,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,n){return t.setUTCHours(n,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function fr(t){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(t)}function hr(t,e){return hr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},hr(t,e)}function lr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dr(t){return dr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},dr(t)}function br(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&hr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=dr(t);if(e){var o=dr(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==fr(i)&&"function"!=typeof i?lr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return br(lr(t=i.call.apply(i,[this].concat(n))),"priority",70),br(lr(t),"incompatibleTokens",["h","H","k","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"K":return Mt(yt,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&n<12?n+12:n,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function pr(t){return pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pr(t)}function vr(t,e){return vr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vr(t,e)}function wr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mr(t){return mr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mr(t)}function gr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ar=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=mr(t);if(e){var o=mr(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==pr(i)&&"function"!=typeof i?wr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return gr(wr(t=i.call.apply(i,[this].concat(n))),"priority",70),gr(wr(t),"incompatibleTokens",["a","b","h","H","K","t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"k":return Mt(bt,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,n){return t.setUTCHours(n<=24?n%24:n,0,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Er(t){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Er(t)}function Sr(t,e){return Sr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Sr(t,e)}function jr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Or(t){return Or=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Or(t)}function kr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Or(t);if(e){var o=Or(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Er(i)&&"function"!=typeof i?jr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return kr(jr(t=i.call.apply(i,[this].concat(n))),"priority",60),kr(jr(t),"incompatibleTokens",["t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"m":return Mt(vt,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCMinutes(n,0,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Br(t){return Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Br(t)}function Rr(t,e){return Rr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rr(t,e)}function Cr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Dr(t){return Dr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Dr(t)}function Fr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Dr(t);if(e){var o=Dr(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Br(i)&&"function"!=typeof i?Cr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Fr(Cr(t=i.call.apply(i,[this].concat(n))),"priority",50),Fr(Cr(t),"incompatibleTokens",["t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e,n){switch(e){case"s":return Mt(wt,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return It(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCSeconds(n,0),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Mr(t){return Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(t)}function Pr(t,e){return Pr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Pr(t,e)}function _r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}function qr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Ir(t);if(e){var o=Ir(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Mr(i)&&"function"!=typeof i?_r(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return qr(_r(t=i.call.apply(i,[this].concat(n))),"priority",30),qr(_r(t),"incompatibleTokens",["t","T"]),t}return n=u,(r=[{key:"parse",value:function(t,e){return Tt(It(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,n){return t.setUTCMilliseconds(n),t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Yr(t,e){return Yr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Yr(t,e)}function Nr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qr(t){return Qr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qr(t)}function Gr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Qr(t);if(e){var o=Qr(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Lr(i)&&"function"!=typeof i?Nr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Gr(Nr(t=i.call.apply(i,[this].concat(n))),"priority",10),Gr(Nr(t),"incompatibleTokens",["t","T","x"]),t}return n=u,(r=[{key:"parse",value:function(t,e){switch(e){case"X":return Pt(Bt,t);case"XX":return Pt(Rt,t);case"XXXX":return Pt(Ct,t);case"XXXXX":return Pt(Ft,t);default:return Pt(Dt,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function Xr(t){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xr(t)}function zr(t,e){return zr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},zr(t,e)}function Hr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ur(t){return Ur=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ur(t)}function Kr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zr=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&zr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=Ur(t);if(e){var o=Ur(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==Xr(i)&&"function"!=typeof i?Hr(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Kr(Hr(t=i.call.apply(i,[this].concat(n))),"priority",10),Kr(Hr(t),"incompatibleTokens",["t","T","X"]),t}return n=u,(r=[{key:"parse",value:function(t,e){switch(e){case"x":return Pt(Bt,t);case"xx":return Pt(Rt,t);case"xxxx":return Pt(Ct,t);case"xxxxx":return Pt(Ft,t);default:return Pt(Dt,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function $r(t){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$r(t)}function Jr(t,e){return Jr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Jr(t,e)}function ti(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ei(t){return ei=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ei(t)}function ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ri=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jr(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=ei(t);if(e){var o=ei(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==$r(i)&&"function"!=typeof i?ti(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ni(ti(t=i.call.apply(i,[this].concat(n))),"priority",40),ni(ti(t),"incompatibleTokens","*"),t}return n=u,(r=[{key:"parse",value:function(t){return _t(t)}},{key:"set",value:function(t,e,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}();function ii(t){return ii="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(t)}function ui(t,e){return ui=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ui(t,e)}function oi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},si(t)}function ai(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ci=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ui(t,e)}(u,nt);var t,e,n,r,i=(t=u,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var n,r,i,u=si(t);if(e){var o=si(this).constructor;n=Reflect.construct(u,arguments,o)}else n=u.apply(this,arguments);return r=this,!(i=n)||"object"!==ii(i)&&"function"!=typeof i?oi(r):i});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ai(oi(t=i.call.apply(i,[this].concat(n))),"priority",20),ai(oi(t),"incompatibleTokens","*"),t}return n=u,(r=[{key:"parse",value:function(t){return _t(t)}},{key:"set",value:function(t,e,n){return[new Date(n),{timestampIsSet:!0}]}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),u}(),fi={G:new at,y:new zt,Y:new Jt,R:new ue,u:new he,Q:new ve,q:new Se,M:new Re,L:new Pe,w:new Ye,I:new ze,d:new en,D:new an,E:new yn,e:new An,c:new xn,i:new Tn,a:new Vn,b:new Wn,B:new Zn,h:new rr,H:new cr,K:new yr,k:new Ar,m:new xr,s:new Tr,S:new Vr,X:new Wr,x:new Zr,t:new ri,T:new ci};function hi(t){return hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(t)}function li(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return di(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?di(t,e):void 0}}(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,u=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw u}}}}function di(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var bi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pi=/^'([^]*?)'?$/,vi=/''/g,wi=/\S/,mi=/[a-zA-Z]/;function gi(n,i,s,a){var f,h,l,d,b,y,p,v,w;e(3,arguments);var m=String(n),g=String(i),A=u(),E=null!==(f=A.locale)&&void 0!==f?f:_;if(!E.match)throw new RangeError("locale must contain match property");var j=t(null!==(h=null!==(l=A.firstWeekContainsDate)&&void 0!==l?l:null===(d=A.locale)||void 0===d||null===(b=d.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==h?h:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=t(null!==(y=null!==(p=A.weekStartsOn)&&void 0!==p?p:null===(v=A.locale)||void 0===v||null===(w=v.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==y?y:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===g)return""===m?r(s):new Date(NaN);var R,C={firstWeekContainsDate:j,weekStartsOn:O,locale:E},D=[new et],F=g.match(yi).map((function(t){var e=t[0];return e in S?(0,S[e])(t,E.formatLong):t})).join("").match(bi),T=[],M=li(F);try{var P=function(){var t=R.value;x(t)&&B(t,g,n),k(t)&&B(t,g,n);var e=t[0],r=fi[e];if(r){var i=r.incompatibleTokens;if(Array.isArray(i)){var u=T.find((function(t){return i.includes(t.token)||t.token===e}));if(u)throw new RangeError("The format string mustn't contain `".concat(u.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===r.incompatibleTokens&&T.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));T.push({token:e,fullToken:t});var o=r.run(m,t,E.match,C);if(!o)return{v:new Date(NaN)};D.push(o.setter),m=o.rest}else{if(e.match(mi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");if("''"===t?t="'":"'"===e&&(t=t.match(pi)[1].replace(vi,"'")),0!==m.indexOf(t))return{v:new Date(NaN)};m=m.slice(t.length)}};for(M.s();!(R=M.n()).done;){var I=P();if("object"===hi(I))return I.v}}catch(t){M.e(t)}finally{M.f()}if(m.length>0&&wi.test(m))return new Date(NaN);var q=D.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,n){return n.indexOf(t)===e})).map((function(t){return D.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),V=r(s);if(isNaN(V.getTime()))return new Date(NaN);var L,Y=c(V,o(V)),N={},G=li(q);try{for(G.s();!(L=G.n()).done;){var W=L.value;if(!W.validate(Y,C))return new Date(NaN);var X=W.set(Y,N,C);Array.isArray(X)?(Y=X[0],Q(N,X[1])):Y=X}}catch(t){G.e(t)}finally{G.f()}return Y}function Ai(t){return"string"==typeof t||t instanceof String}function Ei(t){var e;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(e=t.constructor)?void 0:e.name)}function Si(t,e){return Array.isArray(e)?Si(t,((t,n)=>e.includes(n))):Object.entries(t).reduce(((t,n)=>{let[r,i]=n;return e(i,r)&&(t[r]=i),t}),{})}const ji="NONE",Oi="LEFT",ki="FORCE_LEFT",xi="RIGHT",Bi="FORCE_RIGHT";function Ri(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ci(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Ci(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){const n=e instanceof Date,r=t instanceof Date;if(n&&r)return e.getTime()==t.getTime();if(n!=r)return!1;const u=e instanceof RegExp,o=t instanceof RegExp;if(u&&o)return e.toString()==t.toString();if(u!=o)return!1;const s=Object.keys(e);for(i=0;i<s.length;i++)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=0;i<s.length;i++)if(!Ci(t[s[i]],e[s[i]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}class Di{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ji:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?Oi:xi}}function Fi(t,e){return new Fi.InputMask(t,e)}function Ti(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?Fi.MaskedRegExp:Ai(t)?Fi.MaskedPattern:t===Date?Fi.MaskedDate:t===Number?Fi.MaskedNumber:Array.isArray(t)||t===Array?Fi.MaskedDynamic:Fi.Masked&&t.prototype instanceof Fi.Masked?t:Fi.Masked&&t instanceof Fi.Masked?t.constructor:t instanceof Function?Fi.MaskedFunction:(console.warn("Mask not found for mask",t),Fi.Masked)}function Mi(t){if(!t)throw new Error("Options in not defined");if(Fi.Masked){if(t.prototype instanceof Fi.Masked)return{mask:t};const{mask:e,...n}=t instanceof Fi.Masked?{mask:t}:Ei(t)&&t.mask instanceof Fi.Masked?t:{};if(e){const t=e.mask;return{...Si(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...n}}}return Ei(t)?{...t}:{mask:t}}function Pi(t){if(Fi.Masked&&t instanceof Fi.Masked)return t;const e=Mi(t),n=Ti(e.mask);if(!n)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Fi.createMask=Pi;class _i{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}Fi.MaskElement=_i;class Ii extends _i{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,n;return null!=(t=null==(e=(n=this.input).getRootNode)?void 0:e.call(n))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}Fi.HTMLMaskElement=Ii;class qi extends Ii{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}Fi.HTMLMaskElement=Ii;class Vi extends Ii{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),n=e&&e.anchorOffset,r=e&&e.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),n=e&&e.anchorOffset,r=e&&e.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,e);const r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}Fi.HTMLContenteditableMaskElement=Vi;class Li{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>Li.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Li.MAX_LENGTH=100,Fi.InputMask=class{constructor(t,e){this.el=t instanceof _i?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new Vi(t):new qi(t),this.masked=Pi(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Li,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var e;return null==t||(null==(e=this.masked)?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Fi.Masked)&&this.masked.constructor===Ti(t))return void this.masked.updateOptions({mask:t});const e=t instanceof Fi.Masked?t:Pi({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const n=this._listeners[t];n&&n.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,i=this.displayValue,u=this.unmaskedValue!==e||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=e,this._value=n,this._rawInputValue=r,this.el.value!==i&&(this.el.value=i),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),u&&this._fireChangeEvents(),this._historyChanging||!u&&!this.history.isEmpty||this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...n}=t,r=!this.maskEquals(e),i=this.masked.optionsIsChanged(n);r&&(this.mask=e),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Oi))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const n=this._listeners[t].indexOf(e);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new Di({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,i=n===this.masked.rawInputValue?e.removeDirection:ji;let u=this.masked.nearestInputPos(e.startChangePos+r,i);i!==ji&&(u=this.masked.nearestInputPos(u,ji)),this.updateControl(u),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class Yi{static normalize(t){return Array.isArray(t)?t:[t,new Yi]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}Fi.ChangeDetails=Yi;class Ni{constructor(t,e,n){void 0===t&&(t=""),void 0===e&&(e=0),this.value=t,this.from=e,this.stop=n}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class Qi{constructor(t){this._value="",this._update({...Qi.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){void 0===e&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new Ni(this.extractInput(t,e),t)}appendTail(t){return Ai(t)&&(t=new Ni(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new Yi({inserted:t,rawInserted:t})):new Yi}_appendChar(t,e,n){void 0===e&&(e={});const r=this.state;let i;if([t,i]=this.doPrepareChar(t,e),t&&(i=i.aggregate(this._appendCharRaw(t,e)),!i.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let u=this.pad(e);const o=this._appendCharRaw(t,e);u=u.aggregate(o),o.rawInserted||u.equals(i)?i=u:this.state=n}if(i.inserted){let t,u=!1!==this.doValidate(e);if(u&&null!=n){const e=this.state;if(!0===this.overwrite){t=n.state;for(let t=0;t<i.rawInserted.length;++t)n.unshift(this.displayValue.length-i.tailShift)}let r=this.appendTail(n);if(u=r.rawInserted.length===n.toString().length,!(u&&r.inserted||"shift"!==this.overwrite)){this.state=e,t=n.state;for(let t=0;t<i.rawInserted.length;++t)n.shift();r=this.appendTail(n),u=r.rawInserted.length===n.toString().length}u&&r.inserted&&(this.state=e)}u||(i=new Yi,this.state=r,n&&t&&(n.state=t))}return i}_appendPlaceholder(){return new Yi}_appendEager(){return new Yi}append(t,e,n){if(!Ai(t))throw new Error("value should be string");const r=Ai(n)?new Ni(String(n)):n;let i;null!=e&&e.tail&&(e._beforeTailState=this.state),[t,i]=this.doPrepare(t,e);for(let n=0;n<t.length;++n){const u=this._appendChar(t[n],e,r);if(!u.rawInserted&&!this.doSkipInvalid(t[n],e,r))break;i.aggregate(u)}return(!0===this.eager||"append"===this.eager)&&null!=e&&e.input&&t&&i.aggregate(this._appendEager()),null!=r&&(i.tailShift+=this.appendTail(r).tailShift),i}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new Yi}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,n=this.value,r=t();return this.rawInputValue=e,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,n=t(this);return this.state=e,delete this._isolated,n}doSkipInvalid(t,e,n){return Boolean(this.skipInvalid)}doPrepare(t,e){return void 0===e&&(e={}),Yi.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return void 0===e&&(e={}),Yi.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,n,r,i){void 0===n&&(n=""),void 0===r&&(r=ji),void 0===i&&(i={input:!0});const u=t+e,o=this.extractTail(u),s=!0===this.eager||"remove"===this.eager;let a;s&&(r=function(t){switch(t){case Oi:return ki;case xi:return Bi;default:return t}}(r),a=this.extractInput(0,u,{raw:!0}));let c=t;const f=new Yi;if(r!==ji&&(c=this.nearestInputPos(t,e>1&&0!==t&&!s?ji:r),f.tailShift=c-t),f.aggregate(this.remove(c)),s&&r!==ji&&a===this.rawInputValue)if(r===ki){let t;for(;a===this.rawInputValue&&(t=this.displayValue.length);)f.aggregate(new Yi({tailShift:-1})).aggregate(this.remove(t-1))}else r===Bi&&o.unshift();return f.aggregate(this.append(n,i,o))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Ci(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||Qi.EMPTY_VALUES.includes(t)&&Qi.EMPTY_VALUES.includes(e)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new Yi}}Qi.DEFAULTS={skipInvalid:!0},Qi.EMPTY_VALUES=[void 0,null,""],Fi.Masked=Qi;class Gi{constructor(t,e){void 0===t&&(t=[]),void 0===e&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=Ai(t)?new Ni(String(t)):t;const e=this.chunks[this.chunks.length-1],n=e&&(e.stop===t.stop||null==t.stop)&&t.from===e.from+e.toString().length;if(t instanceof Ni)n?e.extend(t.toString()):this.chunks.push(t);else if(t instanceof Gi){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Fi.MaskedPattern))return new Ni(this.toString()).appendTo(t);const e=new Yi;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],i=t._mapPosToBlock(t.displayValue.length),u=r.stop;let o;if(null!=u&&(!i||i.index<=u)&&((r instanceof Gi||t._stops.indexOf(u)>=0)&&e.aggregate(t._appendPlaceholder(u)),o=r instanceof Gi&&t._blocks[u]),o){const n=o.appendTail(r);e.aggregate(n);const i=r.toString().slice(n.rawInserted.length);i&&e.aggregate(t.append(i,{tail:!0}))}else e.aggregate(t.append(r.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...n}=t;Object.assign(this,n),this.chunks=e.map((t=>{const e="chunks"in t?new Gi:new Ni;return e.state=t,e}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const e=null!=t?t-this.from:t;let n=0;for(;n<this.chunks.length;){const t=this.chunks[n],r=t.unshift(e);if(t.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],n=e.shift();if(e.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class Wi{constructor(t,e){this.masked=t,this._log=[];const{offset:n,index:r}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(e=this.block)?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,ki),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oi),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oi),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,Bi),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ji),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ji),!0}))}}class Xi{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new Yi}nearestInputPos(t,e){void 0===e&&(e=ji);const n=this._value.length;switch(e){case Oi:case ki:return 0;default:return n}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new Yi;const n=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!(!0===this.eager||"append"===this.eager))&&!e.tail,r=new Yi({inserted:this.char,rawInserted:n?this.char:""});return this._value=this.char,this._isRawInput=n&&(e.raw||e.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new Yi;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Ni("")}appendTail(t){return Ai(t)&&(t=new Ni(String(t))),t.appendTo(this)}append(t,e,n){const r=this._appendChar(t[0],e);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class zi{constructor(t){const{parent:e,isOptional:n,placeholderChar:r,displayChar:i,lazy:u,eager:o,...s}=t;this.masked=Pi(s),Object.assign(this,{parent:e,isOptional:n,placeholderChar:r,displayChar:i,lazy:u,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),0===t&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new Yi}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new Yi;const n=this.masked.state;let r=this.masked._appendChar(t,this.currentMaskFlags(e));return r.inserted&&!1===this.doValidate(e)&&(r=new Yi,this.masked.state=n),r.inserted||this.isOptional||this.lazy||e.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(t,e,n){return this.masked.append(t,this.currentMaskFlags(e),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new Yi:(this.isFilled=!0,new Yi({inserted:this.placeholderChar}))}_appendEager(){return new Yi}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.masked.extractInput(t,e,n)}nearestInputPos(t,e){void 0===e&&(e=ji);const n=this.value.length,r=Math.min(Math.max(t,0),n);switch(e){case Oi:case ki:return this.isComplete?r:0;case xi:case Bi:return this.isComplete?r:n;default:return r}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(null==t||null==(e=t._beforeTailState)?void 0:e.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new Yi}}zi.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},Fi.MaskedRegExp=class extends Qi{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=t=>t.search(e)>=0),super._update(t)}};class Hi extends Qi{constructor(t){super({...Hi.DEFAULTS,...t,definitions:Object.assign({},zi.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let n=!1,r=!1;for(let i=0;i<e.length;++i){if(this.blocks){const t=e.slice(i),n=Object.keys(this.blocks).filter((e=>0===t.indexOf(e)));n.sort(((t,e)=>e.length-t.length));const r=n[0];if(r){const{expose:t,repeat:e,...n}=Mi(this.blocks[r]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:e,parent:this},o=null!=e?new Fi.RepeatBlock(u):Pi(u);o&&(this._blocks.push(o),t&&(this.exposeBlock=o),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),i+=r.length-1;continue}}let u=e[i],o=u in t;if(u===Hi.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===u||"}"===u){n=!n;continue}if("["===u||"]"===u){r=!r;continue}if(u===Hi.ESCAPE_CHAR){if(++i,u=e[i],!u)break;o=!1}const s=o?new zi({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Mi(t[u]),parent:this}):new Xi({char:u,eager:this.eager,isUnmasking:n});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:e,...n}=t;this._blocks.forEach(((t,n)=>t.state=e[n])),super.state=n}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new Yi;let n=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==n)return e;this._blocks[n].isFilled&&++n;for(let t=n;t<this._blocks.length;++t){const n=this._blocks[t]._appendEager();if(!n.inserted)break;e.aggregate(n)}return e}_appendCharRaw(t,e){void 0===e&&(e={});const n=this._mapPosToBlock(this.displayValue.length),r=new Yi;if(!n)return r;for(let u,o=n.index;u=this._blocks[o];++o){var i;const n=u._appendChar(t,{...e,_beforeTailState:null==(i=e._beforeTailState)||null==(i=i._blocks)?void 0:i[o]});if(r.aggregate(n),n.consumed)break}return r}extractTail(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const n=new Gi;return t===e||this._forEachBlocksInRange(t,e,((t,e,r,i)=>{const u=t.extractTail(r,i);u.stop=this._findStopBefore(e),u.from=this._blockStartPos(e),u instanceof Gi&&(u.blockIndex=e),n.extend(u)})),n}extractInput(t,e,n){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),void 0===n&&(n={}),t===e)return"";let r="";return this._forEachBlocksInRange(t,e,((t,e,i,u)=>{r+=t.extractInput(i,u,n)})),r}_findStopBefore(t){let e;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=t))break;e=r}return e}_appendPlaceholder(t){const e=new Yi;if(this.lazy&&null==t)return e;const n=this._mapPosToBlock(this.displayValue.length);return n?(this._blocks.slice(n.index,null!=t?t:this._blocks.length).forEach((n=>{var r;n.lazy&&null==t||e.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))})),e):e}_mapPosToBlock(t){let e="";for(let n=0;n<this._blocks.length;++n){const r=e.length;if(e+=this._blocks[n].displayValue,t<=e.length)return{index:n,offset:t-r}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+e.displayValue.length),0)}_forEachBlocksInRange(t,e,n){void 0===e&&(e=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const t=this._mapPosToBlock(e),i=t&&r.index===t.index;if(n(this._blocks[r.index],r.index,r.offset,t&&i?t.offset:this._blocks[r.index].displayValue.length),t&&!i){for(let e=r.index+1;e<t.index;++e)n(this._blocks[e],e,0,this._blocks[e].displayValue.length);n(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const n=super.remove(t,e);return this._forEachBlocksInRange(t,e,((t,e,r,i)=>{n.aggregate(t.remove(r,i))})),n}nearestInputPos(t,e){if(void 0===e&&(e=ji),!this._blocks.length)return 0;const n=new Wi(this,t);if(e===ji)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(e===Oi||e===ki){if(e===Oi){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),e===Oi){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t)return n.pos;if(n.popState(),n.ok&&n.pos<=t)return n.pos;n.popState()}return n.ok?n.pos:e===ki?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return e===xi||e===Bi?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:e===Bi?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(t,Oi)))):t}totalInputPositions(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,e,((t,e,r,i)=>{n+=t.totalInputPositions(r,i)})),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map((t=>this._blocks[t])):[]}pad(t){const e=new Yi;return this._forEachBlocksInRange(0,this.displayValue.length,(n=>e.aggregate(n.pad(t)))),e}}Hi.DEFAULTS={...Qi.DEFAULTS,lazy:!0,placeholderChar:"_"},Hi.STOP_CHAR="`",Hi.ESCAPE_CHAR="\\",Hi.InputDefinition=zi,Hi.FixedDefinition=Xi,Fi.MaskedPattern=Hi;class Ui extends Hi{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:i=this.autofix,...u}=t;this.to=e,this.from=n,this.maxLength=Math.max(String(e).length,r),this.autofix=i;const o=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let a=0;for(;a<s.length&&s[a]===o[a];)++a;u.mask=s.slice(0,a).replace(/0/g,"\\0")+"0".repeat(this.maxLength-a),super._update(u)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="",n="";const[,r,i]=t.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(e="0".repeat(r.length)+i,n="9".repeat(r.length)+i),e=e.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[e,n]}doPrepareChar(t,e){let n;return void 0===e&&(e={}),[t,n]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(n.skip=!this.isComplete),[t,n]}_appendCharRaw(t,e){if(void 0===e&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[i,u]=this.boundaries(this.value+t);return Number(u)<this.from?super._appendCharRaw(n[this.value.length],e):Number(i)>this.to?!e.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(r[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(e);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){const e=new Yi;if(this.value.length===this.maxLength)return e;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)e.aggregate(super._appendCharRaw("0",t));n.split("").forEach((t=>this._appendCharRaw(t)))}return e}}Fi.MaskedRange=Ui;class Ki extends Hi{static extractPatternOptions(t){const{mask:e,pattern:n,...r}=t;return{...r,mask:Ai(e)?e:n}}constructor(t){super(Ki.extractPatternOptions({...Ki.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:n,blocks:r,...i}={...Ki.DEFAULTS,...t},u=Object.assign({},Ki.GET_DEFAULT_BLOCKS());t.min&&(u.Y.from=t.min.getFullYear()),t.max&&(u.Y.to=t.max.getFullYear()),t.min&&t.max&&u.Y.from===u.Y.to&&(u.m.from=t.min.getMonth()+1,u.m.to=t.max.getMonth()+1,u.m.from===u.m.to&&(u.d.from=t.min.getDate(),u.d.to=t.max.getDate())),Object.assign(u,this.blocks,r),super._update({...i,mask:Ai(e)?e:n,blocks:u})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Ki.extractPatternOptions(t))}}Ki.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ui,from:1,to:31,maxLength:2},m:{mask:Ui,from:1,to:12,maxLength:2},Y:{mask:Ui,from:1900,to:9999}}),Ki.DEFAULTS={...Hi.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:t=>t?[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join("."):"",parse:t=>{const[e,n,r]=t.split(".").map(Number);return new Date(r,n-1,e)}},Fi.MaskedDate=Ki;class Zi extends Qi{constructor(t){super({...Zi.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...n}=Mi(t),r=Pi({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return e&&(this.exposeMask=r),r})):[])}_appendCharRaw(t,e){void 0===e&&(e={});const n=this._applyDispatch(t,e);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),n}_applyDispatch(t,e,n){void 0===t&&(t=""),void 0===e&&(e={}),void 0===n&&(n="");const r=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,i=this.rawInputValue,u=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:i,o=i.slice(u.length),s=this.currentMask,a=new Yi,c=null==s?void 0:s.state;return this.currentMask=this.doDispatch(t,{...e},n),this.currentMask&&(this.currentMask!==s?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),a.tailShift=this.currentMask.value.length-r.length),o&&(a.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),a}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new Yi;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,n;return{...t,_beforeTailState:(null==(e=t._beforeTailState)?void 0:e.currentMaskRef)===this.currentMask&&(null==(n=t._beforeTailState)?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,e,n){return void 0===e&&(e={}),void 0===n&&(n=""),this.dispatch(t,this,e,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){void 0===e&&(e={});let[n,r]=super.doPrepare(t,e);if(this.currentMask){let t;[n,t]=super.doPrepare(n,this.currentMaskFlags(e)),r=r.aggregate(t)}return[n,r]}doPrepareChar(t,e){void 0===e&&(e={});let[n,r]=super.doPrepareChar(t,e);if(this.currentMask){let t;[n,t]=super.doPrepareChar(n,this.currentMaskFlags(e)),r=r.aggregate(t)}return[n,r]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,e){const n=new Yi;return this.currentMask&&n.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),n}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:n,currentMask:r,...i}=t;e&&this.compiledMasks.forEach(((t,n)=>t.state=e[n])),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=i}extractInput(t,e,n){return this.currentMask?this.currentMask.extractInput(t,e,n):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,n)=>{if(!t[n])return;const{mask:r,...i}=t[n];return Ci(e,i)&&e.maskEquals(r)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean(null==(e=this.currentMask)?void 0:e.typedValueEquals(t))}}Zi.DEFAULTS={...Qi.DEFAULTS,dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,u=e.compiledMasks.map(((u,o)=>{const s=e.currentMask===u,a=s?u.displayValue.length:u.nearestInputPos(u.displayValue.length,ki);return u.rawInputValue!==i?(u.reset(),u.append(i,{raw:!0})):s||u.remove(a),u.append(t,e.currentMaskFlags(n)),u.appendTail(r),{index:o,weight:u.rawInputValue.length,totalInputPositions:u.totalInputPositions(0,Math.max(a,u.nearestInputPos(u.displayValue.length,ki)))}}));return u.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions)),e.compiledMasks[u[0].index]}},Fi.MaskedDynamic=Zi;class $i extends Hi{constructor(t){super({...$i.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...n}=t;if(e){const t=e.map((t=>t.length)),r=Math.min(...t),i=Math.max(...t)-r;n.mask="*".repeat(r),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=e}super._update(n)}_appendCharRaw(t,e){void 0===e&&(e={});const n=Math.min(this.nearestInputPos(0,Bi),this.value.length),r=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,n)));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,((t,n)=>{const i=r[0][n];n>=this.value.length||i===t.value||(t.reset(),t._appendChar(i,e))}));const t=super._appendCharRaw(r[0][this.value.length],e);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e)))),t}return new Yi({skip:!this.isComplete})}extractTail(t,e){return void 0===t&&(t=0),new Ni("",t)}remove(t,e){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),t===e)return new Yi;const n=Math.min(super.nearestInputPos(0,Bi),this.value.length);let r;for(r=t;r>=0&&!(this.enum.filter((t=>this.matchValue(t,this.value.slice(n,r),n))).length>1);--r);const i=super.remove(r,e);return i.tailShift+=r-t,i}get isComplete(){return this.enum.indexOf(this.value)>=0}}var Ji;$i.DEFAULTS={...Hi.DEFAULTS,matchValue:(t,e,n)=>t.indexOf(e,n)===n},Fi.MaskedEnum=$i,Fi.MaskedFunction=class extends Qi{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}};class tu extends Qi{constructor(t){super({...tu.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+Ri(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ri).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ri(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){void 0===e&&(e={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(t,e){void 0===e&&(e=!1);let n=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,e&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,n))}_appendCharRaw(t,e){void 0===e&&(e={});const n=this._separatorsCountFromSlice(e.tail&&e._beforeTailState?e._beforeTailState._value:this._value);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=t;let i,u=!isNaN(this.number),o=!1;if(u){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(tu.UNMASKED_RADIX,this.radix),o||(o=r===this._value&&!e.tail)):u=!1),u&&(u=Boolean(this._value.match(this._numberRegExp)))}u?i=new Yi({inserted:this._value.slice(r.length),rawInserted:o?"":t,skip:o}):(this._value=r,i=new Yi),this._value=this._insertThousandsSeparators(this._value);const s=this._separatorsCountFromSlice(e.tail&&e._beforeTailState?e._beforeTailState._value:this._value);return i.tailShift+=(s-n)*this.thousandsSeparator.length,i}_findSeparatorAround(t){if(this.thousandsSeparator){const e=this.value.indexOf(this.thousandsSeparator,t-this.thousandsSeparator.length+1);if(e<=t)return e}return-1}_adjustRangeWithSeparators(t,e){const n=this._findSeparatorAround(t);n>=0&&(t=n);const r=this._findSeparatorAround(e);return r>=0&&(e=r+this.thousandsSeparator.length),[t,e]}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const n=this.value.slice(0,t),r=this.value.slice(e),i=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const u=this._separatorsCountFromSlice(n);return new Yi({tailShift:(u-i)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case ji:case Oi:case ki:{const n=this._findSeparatorAround(t-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(t<r||this.value.length<=r||e===ki)return n}break}case xi:case Bi:{const e=this._findSeparatorAround(t);if(e>=0)return e+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,n,r)=>e+r)),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,n){void 0===e&&(e={});const r=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===tu.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,tu.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(tu.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||tu.EMPTY_VALUES.includes(t)&&tu.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}Ji=tu,tu.UNMASKED_RADIX=".",tu.EMPTY_VALUES=[...Qi.EMPTY_VALUES,0],tu.DEFAULTS={...Qi.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ji.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Fi.MaskedNumber=tu;const eu={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function nu(t,e,n){void 0===e&&(e=eu.MASKED),void 0===n&&(n=eu.MASKED);const r=Pi(t);return t=>r.runIsolated((r=>(r[e]=t,r[n])))}Fi.PIPE_TYPE=eu,Fi.createPipe=nu,Fi.pipe=function(t,e,n,r){return nu(e,n,r)(t)},Fi.RepeatBlock=class extends Hi{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,n,r;const{repeat:i,...u}=Mi(t);this._blockOpts=Object.assign({},this._blockOpts,u);const o=Pi(this._blockOpts);this.repeat=null!=(e=null!=(n=null!=i?i:o.repeat)?n:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(Pi(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,e){void 0===e&&(e={});const n=new Yi;for(let s,a,c=null!=(r=null==(i=this._mapPosToBlock(this.displayValue.length))?void 0:i.index)?r:Math.max(this._blocks.length-1,0);s=null!=(u=this._blocks[c])?u:a=!a&&this._allocateBlock(c);++c){var r,i,u,o;const f=s._appendChar(t,{...e,_beforeTailState:null==(o=e._beforeTailState)||null==(o=o._blocks)?void 0:o[c]});if(f.skip&&a){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(f),f.consumed)break}return n}_trimEmptyTail(t,e){var n,r;void 0===t&&(t=0);const i=Math.max((null==(n=this._mapPosToBlock(t))?void 0:n.index)||0,this.repeatFrom,0);let u;null!=e&&(u=null==(r=this._mapPosToBlock(e))?void 0:r.index),null==u&&(u=this._blocks.length-1);let o=0;for(let t=u;i<=t&&!this._blocks[t].unmaskedValue;--t,++o);o&&(this._blocks.splice(u-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const n=super.remove(t,e);return this._trimEmptyTail(t,e),n}totalInputPositions(t,e){return void 0===t&&(t=0),null==e&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};try{globalThis.IMask=Fi}catch{}export{Fi as I,N as f,a as i,gi as p}
@@ -1 +1 @@
1
- import{r as a,c as e,h as o,H as d,d as t}from"./p-DC8qzJZr.js";import{d as s,e as i}from"./p-B0kNlhKL.js";import{c as r}from"./p-orsBiyT_.js";import{c as l}from"./p-DIdMBZfn.js";const n=class{constructor(o){a(this,o),this.toggleFullscreen=e(this,"toggleFullscreen",7),this.modalClose=e(this,"modalClose",7),this.modalOpen=e(this,"modalOpen",7),this.primaryAction=e(this,"primaryAction",7),this.requestModalClose=e(this,"requestModalClose",7),this.secondaryAction=e(this,"secondaryAction",7),this.sidebarClose=e(this,"sidebarClose",7),this.closable=!0,this.closeButtonLabel="Close modal",this.fullscreenEnableButtonLabel="Full screen",this.fullscreenDisableButtonLabel="Exit full screen",this.padded=!0,this.variant="default",this.sidebarPadded=!0,this.sidebarFooterPadded=!0,this.sidebarCloseButtonLabel="Close sidebar",this.isOpen=!1,this.isFullscreen=!1,this.isFullscreenTransitioning=!1,this.closing=!1,this.scrollable=!1,this.scrolled=!1,this.scrolledDown=!1,this.sidebarScrolled=!1,this.sidebarScrolledDown=!1,this.sidebarScrollable=!1,this.onKeyDown=a=>{"Escape"===a.code&&(a.stopImmediatePropagation(),this.close())},this.onBackdropClick=()=>{this.close()},this.onCloseButtonClick=()=>{this.close()},this.onFullscreenButtonClick=()=>{this.setFullscreen(!this.isFullscreen)},this.onSidebarCloseButtonClick=()=>{this.hideSidebarContent=!0,this.sidebarClose.emit()},this.onPrimaryAction=a=>{this.primaryAction.emit(a)},this.onSecondaryAction=a=>{this.secondaryAction.emit(a)},this.determineScrollStatus=()=>{this.determineMainScrollStatus(),this.determineSidebarScrollStatus()},this.determineMainScrollStatus=()=>{const a=this.scrollContainer?.scrollTop>0,e=Math.ceil(this.scrollContainer?.scrollTop+this.scrollContainer?.offsetHeight)>=this.scrollContainer?.scrollHeight,o=this.scrollContainer?.scrollHeight>this.scrollContainer?.offsetHeight;a!==this.scrolled&&(this.scrolled=a),e!==this.scrolledDown&&(this.scrolledDown=e),o!==this.scrollable&&(this.scrollable=o)},this.determineSidebarScrollStatus=()=>{const a=this.sidebarScrollContainer?.scrollTop>0,e=Math.ceil(this.sidebarScrollContainer?.scrollTop+this.sidebarScrollContainer?.offsetHeight)>=this.sidebarScrollContainer?.scrollHeight,o=this.sidebarScrollContainer?.scrollHeight>this.sidebarScrollContainer?.offsetHeight;a!==this.sidebarScrolled&&(this.sidebarScrolled=a),e!==this.sidebarScrolledDown&&(this.sidebarScrolledDown=e),o!==this.sidebarScrollable&&(this.sidebarScrollable=o)}}componentDidLoad(){this.focusTrap=l(this.modalEl,{allowOutsideClick:!0,escapeDeactivates:!1,tabbableOptions:{getShadowRoot:a=>a.shadowRoot}}),this.determineScrollStatus(),this.updateCustomFooterStatus(),this.updateCustomHeaderStatus(),this.updateHeaderToolsStatus(),this.updateSecondaryContentStatus(),this.updateSidebarContentStatus(),this.updateSidebarFooterStatus()}componentDidRender(){this.focusTrap?.updateContainerElements(this.modalEl)}disconnectedCallback(){this.focusTrap?.deactivate(),this.unlockBodyScroll()}onWindowResize(){this.determineScrollStatus()}async open(){this.isOpen=!0,this.modalOpen.emit(),setTimeout((()=>{this.lockBodyScroll(),this.determineScrollStatus()})),setTimeout((()=>{this.focusTrap.activate(),this.handleAutoFocus()}),200)}async close(a){this.closing||(this.requestModalClose.emit(),(this.closable||a)&&(this.closing=!0,this.unlockBodyScroll(),setTimeout((()=>{this.focusTrap.deactivate(),this.isOpen=!1,this.modalClose.emit(),this.closing=!1}),150)))}async setFullscreen(a){this.isFullscreen!==a&&(this.isFullscreenTransitioning=!0,this.isFullscreen=a,this.toggleFullscreen.emit(this.isFullscreen),setTimeout((()=>this.isFullscreenTransitioning=!1),150))}updateCustomFooterStatus(){this.hasCustomFooter=Boolean(this.el.querySelector('[slot="custom-footer"]'))}updateCustomHeaderStatus(){this.hasCustomHeader=Boolean(this.el.querySelector('[slot="custom-header"]'))}updateHeaderToolsStatus(){this.hasHeaderTools=Boolean(this.el.querySelector('[slot="header-tools"]'))}updateSecondaryContentStatus(){this.hasSecondaryContent=Boolean(this.el.querySelector('[slot="secondary-content"]'))}updateSidebarContentStatus(){this.hasSidebarContent=Boolean(this.el.querySelector('[slot="sidebar-content"]'))}updateSidebarFooterStatus(){this.hasSidebarFooter=Boolean(this.el.querySelector('[slot="sidebar-footer"]'))}handleAutoFocus(){this.modalEl.querySelector("input[autofocus]")?.focus()}lockBodyScroll(){s(this.scrollContainer),s(this.sidebarScrollContainer)}unlockBodyScroll(){this.scrollContainer&&i(this.scrollContainer),this.sidebarScrollContainer&&i(this.sidebarScrollContainer)}render(){const a=Boolean(this.primaryActionLabel)||Boolean(this.secondaryActionLabel),e=r("modal",`modal--variant-${this.variant}`,{"modal--closing":this.closing,"modal--fullscreen":this.isFullscreen,"modal--fullscreen-transitioning":this.isFullscreenTransitioning,"modal--has-custom-footer":this.hasCustomFooter,"modal--has-custom-header":this.hasCustomHeader,"modal--has-header-tools":this.hasHeaderTools,"modal--has-secondary-content":this.hasSecondaryContent&&!this.hideSecondaryContent,"modal--hide-label":this.hideLabel,"modal--padded":this.padded,"modal--scrollable":this.scrollable,"modal--scrolled":this.scrolled,"modal--scrolled-down":this.scrolledDown,"modal--hide-secondary-content-borders":this.hideSecondaryContentBorders,"modal--has-sidebar-content":this.hasSidebarContent&&!this.hideSidebarContent,"modal--sidebar-padded":this.sidebarPadded,"modal--has-sidebar-footer":this.hasSidebarFooter&&this.hasSidebarContent&&!this.hideSidebarContent,"modal--sidebar-footer-padded":this.sidebarFooterPadded,"modal--sidebar-scrolled":this.sidebarScrolled,"modal--sidebar-scrolled-down":this.sidebarScrolledDown,"modal--sidebar-scrollable":this.sidebarScrollable});return o(d,{key:"c82bd24e5de6cb12dd85b207a2a4cb7b5976872b"},o("section",{key:"8d380c32de1a1721c7343fa705416c846d415384","aria-hidden":String(!this.isOpen),"aria-label":this.label,"aria-modal":"true",class:e,onKeyDown:this.onKeyDown,role:"dialog",ref:a=>this.modalEl=a},o("div",{key:"74389c724c2fc3dbbf64e9acf266c311e98be466",class:"modal__backdrop",onClick:this.onBackdropClick}),o("div",{key:"cd1d3b82a0de6914dd11765901f891ffc6779688",class:"modal__body",style:this.isFullscreen?{}:{"--swirl-modal-max-height":this.maxHeight,"--swirl-modal-height":this.height,minHeight:this.minHeight,maxWidth:this.maxWidth}},o("aside",{key:"6ba43b9903fc20b97c384cbb339d6ccf88bb9544",class:"modal__sidebar"},this.sidebarLabel&&o("header",{key:"0dc8eec524121375cc9c78c5866cf8642a0a5339",class:r("modal__sidebar-header",{"modal__sidebar-header--has-close-button":this.hasSidebarCloseButton})},this.hasSidebarCloseButton&&o("swirl-button",{key:"ed06f016a6fbffaaa97a73a66bf8b81b70610413",hideLabel:!0,icon:"<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>",label:this.sidebarCloseButtonLabel,onClick:this.onSidebarCloseButtonClick}),o("swirl-heading",{key:"66061ab0f8e8bf7bf44ffea221584f2bb30e090d",as:"h3",class:"modal__sidebar-heading",level:5,text:this.sidebarLabel})),o("div",{key:"df228a3e86bddbeade95c73bad1fe523aa3c30e1",class:"modal__sidebar-content",onScroll:this.determineSidebarScrollStatus,ref:a=>this.sidebarScrollContainer=a},o("slot",{key:"be16658b4ecbc40c97b8a1f1d7b6ec67c9c13828",name:"sidebar-content"})),o("div",{key:"5fdedc18e02db89897473843c7aa40e0719e128d",class:"modal__sidebar-footer"},o("slot",{key:"116e70c57e40e8f20e9380af357830d31592fd74",name:"sidebar-footer"}))),o("div",{key:"b219e652242ebd7e9b782e1282079a1d08674573",class:"modal__main-content"},o("header",{key:"e5e07dce0daead5e23f2a719a5f41f373b559008",class:"modal__custom-header"},o("slot",{key:"93f56acb67aebd593806a8f67d2d184bb243f2ec",name:"custom-header"})),(!this.hideLabel||!this.hideCloseButton)&&o("header",{key:"6c940113e4e1535ac2b479f509f4552b8ccd288a",class:"modal__header"},o("div",{key:"e4d0b9584cffab4aa97726a5a0ce6a52e8749024",class:"modal__header-bar"},!this.hideCloseButton&&o("swirl-button",{key:"19dcddfcbd1488a4255bc36d5e48d7aa87b37810",class:"modal__close-button",hideLabel:!0,icon:"default"===this.variant?"<swirl-icon-close></swirl-icon-close>":"<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>",label:this.closeButtonLabel,onClick:this.onCloseButtonClick}),this.showFullscreenButton&&o("swirl-button",{key:"f4193147bda2699e854b19016a81f46be67af807",class:"modal__fullscreen-button",hideLabel:!0,icon:this.isFullscreen?"<swirl-icon-close-fullscreen></swirl-icon-close-fullscreen>":"<swirl-icon-open-in-full></swirl-icon-open-in-full>",label:this.isFullscreen?this.fullscreenDisableButtonLabel:this.fullscreenEnableButtonLabel,onClick:this.onFullscreenButtonClick}),!this.hideLabel&&o("swirl-heading",{key:"3456ba73064e116782fc2d379a07fcb7e548b559",as:"h2",class:"modal__heading",level:3,text:this.label}))),o("div",{key:"930969de9c366d5c3b7a6ad41207c5e8b156a512",class:"modal__content-container",style:{gap:this.contentGap?`var(--s-space-${this.contentGap})`:void 0}},o("div",{key:"709500b83b513e4668921e7187a34aed059d67cb",class:"modal__primary-content",style:{maxWidth:this.primaryContentMaxWidth,flex:this.primaryContentFlex}},o("div",{key:"c8c62935631f3ac6f6cdefc4fbff82737b535caf",class:"modal__header-tools"},o("slot",{key:"df88048fb9956987d3950616dcad6c4a8df81e27",name:"header-tools"})),o("div",{key:"fb44494135b40274f22bf5a13cbc6981c5c5d08c",class:"modal__content",onScroll:this.determineMainScrollStatus,ref:a=>this.scrollContainer=a},o("slot",{key:"b9668bd1510b36ec0323d320db94e3d574c3d487"}))),o("div",{key:"b8061c98f1093c9ea51e12e7aa90969c89827d3f",class:"modal__secondary-content",style:{maxWidth:this.secondaryContentMaxWidth,flex:this.secondaryContentFlex,padding:Boolean(this.secondaryContentPadding)?`var(--s-space-${this.secondaryContentPadding})`:void 0,paddingBlockEnd:Boolean(this.secondaryContentPaddingBlockEnd)?`var(--s-space-${this.secondaryContentPaddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.secondaryContentPaddingBlockStart)?`var(--s-space-${this.secondaryContentPaddingBlockStart})`:void 0,paddingInlineEnd:Boolean(this.secondaryContentPaddingInlineEnd)?`var(--s-space-${this.secondaryContentPaddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.secondaryContentPaddingInlineStart)?`var(--s-space-${this.secondaryContentPaddingInlineStart})`:void 0}},o("slot",{key:"fd8b40685e996b00612861fdfd685aac799234e6",name:"secondary-content"}))),o("div",{key:"d3e7fdaa221558abe30ab7dbdec90f3ebfe32103",class:"modal__custom-footer"},o("slot",{key:"9e691351090de8e834973565e01382750e9f48c2",name:"custom-footer"})),a&&o("footer",{key:"79ec849bd85830c012ba1762e7fc8d18bf15b2c0",class:"modal__controls"},o("swirl-button-group",{key:"1ffa600e094bb0647619ba1f4204f2059ced15de",wrap:!0},this.secondaryActionLabel&&o("swirl-button",{key:"5c4c0634686922d4adc96242808bb685ae35da7d",label:this.secondaryActionLabel,onClick:this.onSecondaryAction}),this.primaryActionLabel&&o("swirl-button",{key:"b6310f56ca29ba9c2bf94957d676fddffaeeb65d",intent:"primary",label:this.primaryActionLabel,onClick:this.onPrimaryAction,variant:"flat"})))))))}get el(){return t(this)}};n.style=':host{display:block}:host *{box-sizing:border-box}.modal{--swirl-ghost-button-background-default:var(--s-surface-overlay-default);--swirl-ghost-button-background-hovered:var(--s-surface-overlay-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-overlay-pressed);--swirl-resource-list-item-background-default:var(\n --s-surface-overlay-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-overlay-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-overlay-pressed\n );--swirl-modal-height:auto;--swirl-modal-max-height:90vh;--swirl-modal-view-height:100vh;--swirl-modal-header-height:3.75rem;--swirl-modal-max-width:40rem;--swirl-modal-sidebar-width:25rem;--swirl-modal-max-secondary-content-width:24rem;--swirl-modal-footer-padding-small:var(--s-space-12) var(--s-space-16)\n var(--s-space-12) var(--s-space-16);--swirl-modal-footer-padding-large:var(--s-space-16) var(--s-space-24)\n var(--s-space-16) var(--s-space-24)}@supports (height: 100dvh){.modal{--swirl-modal-max-height:90dvh;--swirl-modal-view-height:100dvh}}.modal{position:fixed;z-index:var(--s-z-40);display:flex;justify-content:center;align-items:center;height:var(--swirl-modal-view-height);inset:0}.modal[aria-hidden="true"]{display:none}.modal--variant-default.modal--closing{animation:0.15s modal-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-default.modal--closing{animation:none}}.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:0.15s modal-backdrop-fade-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:none}}.modal--variant-default:not(.modal--closing) .modal__body{animation:0.15s modal-scale-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__body{animation:none}}.modal--variant-drawer{justify-content:end;align-items:stretch}.modal--variant-drawer.modal--closing{animation:0.15s modal-drawer-slide-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-drawer.modal--closing{animation:none}}@media (min-width: 768px){.modal--variant-drawer.modal--hide-label .modal__header-bar{height:auto;padding-top:var(--s-space-4);padding-bottom:var(--s-space-4)}}.modal--variant-drawer .modal__backdrop{background-color:transparent;animation:none}.modal--variant-drawer .modal__body{height:100%;max-height:none;border-radius:0;animation:0.15s modal-drawer-slide-in;box-shadow:var(--s-shadow-level-3)}@media (prefers-reduced-motion){.modal--variant-drawer .modal__body{animation:none}}.modal--variant-drawer .modal__header-bar{background-color:var(--s-surface-overlay-default)}.modal--variant-drawer .modal__header-bar .modal__close-button{margin-left:calc(-1 * var(--s-space-8))}.modal--variant-drawer .modal__header-bar .modal__fullscreen-button{display:none}@media (min-width: 768px){.modal--variant-drawer .modal__header-bar{flex-direction:row}}@media (min-width: 768px){.modal--variant-drawer.modal--padded .modal__content{padding-top:var(--s-space-8)}}.modal--padded .modal__content{padding-top:var(--s-space-24);padding-right:var(--s-space-16);padding-bottom:var(--s-space-24);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal--padded .modal__content{padding-top:0;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:var(--s-space-24)}}@media (min-width: 768px){.modal--scrollable .modal__content{padding-bottom:0}}.modal--scrollable:not(.modal--scrolled-down).modal--has-custom-footer .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--scrollable:not(.modal--scrolled-down):not(.modal--has-custom-footer) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-custom-header .modal__custom-header{display:block}.modal--has-custom-header .modal__content{padding-top:var(--s-space-16)}.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-small)}@media (min-width: 768px){.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-large)}}.modal--has-header-tools .modal__header{border-bottom-color:transparent}.modal--has-header-tools .modal__header-tools{display:block}.modal--has-secondary-content:not(.modal--fullscreen) .modal__body{max-width:calc(\n var(--swirl-modal-max-width) +\n var(--swirl-modal-max-secondary-content-width)\n )}.modal--has-secondary-content:not(.modal--has-header-tools):not(.modal--hide-secondary-content-borders) .modal__header{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-header-tools:not(.modal--hide-secondary-content-borders) .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-custom-footer:not(.modal--hide-secondary-content-borders) .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-secondary-content:not(.modal--has-custom-footer):not(.modal--hide-secondary-content-borders) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 992px){.modal--has-secondary-content .modal__header-tools,.modal--has-secondary-content .modal__content{padding-right:0}}.modal--has-secondary-content .modal__primary-content{overflow:visible;max-height:60%;flex-basis:auto}@media (min-width: 992px){.modal--has-secondary-content .modal__primary-content{max-width:calc(100% - var(--swirl-modal-max-secondary-content-width));max-height:none;flex-basis:calc(100% - var(--swirl-modal-max-secondary-content-width))}}.modal--has-secondary-content .modal__secondary-content{display:block}.modal__main-content{display:flex;flex-direction:column;overflow-y:auto;flex-grow:1}.modal__sidebar{display:none}.modal--has-sidebar-content:not(.modal--fullscreen) .modal__body{max-width:calc(\n var(--swirl-modal-max-width) + var(--swirl-modal-sidebar-width)\n )}@media (min-width: 768px){.modal--has-sidebar-content .modal__sidebar{display:flex;flex-direction:column;overflow-y:auto;flex-shrink:0;width:var(--swirl-modal-sidebar-width);border-right:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-sidebar-content .modal__sidebar .modal__sidebar-header{border-bottom:var(--s-border-width-default) solid transparent;display:flex;align-items:center;gap:var(--s-space-8);padding-right:var(--s-space-24);padding-left:var(--s-space-24)}.modal--has-sidebar-content .modal__sidebar .modal__sidebar-header.modal__sidebar-header--has-close-button{padding-left:var(--s-space-16)}.modal--has-sidebar-content .modal__sidebar .modal__sidebar-header .modal__sidebar-heading{display:flex;align-items:center;height:var(--swirl-modal-header-height)}.modal--has-sidebar-content .modal__sidebar .modal__sidebar-content{display:block;flex-grow:1;overflow-y:auto}}@media (min-width: 992px){.modal--has-sidebar-content .modal__primary-content{flex-basis:calc(100% - 20rem)}}.modal--sidebar-padded .modal__sidebar .modal__sidebar-content{padding-left:var(--s-space-24);padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-top:var(--s-space-16)}@media (min-width: 768px){.modal--scrolled:not(.modal--has-header-tools) .modal__header{border-bottom-color:var(--s-border-default)}.modal--scrolled.modal--has-header-tools .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--scrolled .modal__custom-header{border-bottom-color:var(--s-border-default)}}@media (min-width: 768px){.modal--sidebar-scrolled .modal__sidebar .modal__sidebar-header{border-bottom-color:var(--s-border-default)}}.modal--has-sidebar-footer.modal--sidebar-footer-padded .modal__sidebar-footer{padding:var(--swirl-modal-footer-padding-small)}@media (min-width: 768px){.modal--has-sidebar-footer.modal--sidebar-footer-padded .modal__sidebar-footer{padding:var(--swirl-modal-footer-padding-large)}}@media (min-width: 768px){.modal--sidebar-scrollable .modal__sidebar-content{padding-bottom:0 !important}}.modal--sidebar-scrollable:not(.modal--sidebar-scrolled-down).modal--has-sidebar-footer .modal__sidebar-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal__backdrop{position:fixed;background-color:rgba(0, 0, 0, 0.2);inset:0}.modal__body{--swirl-card-background-default:var(--s-surface-overlay-default);--swirl-card-background-hovered:var(--s-surface-overlay-hovered);--swirl-card-background-pressed:var(--s-surface-overlay-pressed);--swirl-accordion-item-toggle-default:var(--s-surface-overlay-default);--swirl-accordion-item-toggle-hovered:var(--s-surface-overlay-hovered);--swirl-accordion-item-toggle-pressed:var(--s-surface-overlay-pressed);position:relative;z-index:var(--s-z-40);display:flex;flex-direction:row;overflow:hidden;width:100vw;max-width:100vw;height:var(--swirl-modal-view-height);max-height:var(--swirl-modal-view-height);background-color:var(--s-surface-overlay-default)}.modal--fullscreen .modal__body{min-height:var(--swirl-modal-view-height)}.modal--fullscreen-transitioning .modal__body{transition:width 0.15s ease-out, max-width 0.15s ease-out, max-height 0.15s ease-out, min-height 0.15s ease-out}@media (min-width: 768px){.modal.modal--variant-default:not(.modal--fullscreen) .modal__body{width:90vw;max-width:var(--swirl-modal-max-width);max-height:var(--swirl-modal-max-height);min-height:0;border-radius:var(--s-border-radius-base);box-shadow:var(--s-shadow-level-3)}}@media (min-width: 992px){.modal.modal--variant-default:not(.modal--fullscreen) .modal__body{height:var(--swirl-modal-height)}}.modal__header{border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header{border-bottom:var(--s-border-width-default) solid transparent}}.modal__header-bar{display:flex;height:3.5rem;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-shrink:0;align-items:center;gap:var(--s-space-8)}@media (min-width: 768px){.modal__header-bar{height:var(--swirl-modal-header-height);padding-top:var(--s-space-12);padding-right:var(--s-space-24);padding-bottom:var(--s-space-12);padding-left:var(--s-space-24);flex-direction:row-reverse}}.modal__fullscreen-button{display:none}@media (min-width: 768px){.modal__fullscreen-button{display:block}}.modal__header-tools{display:none;padding-right:var(--s-space-16);padding-left:var(--s-space-16);border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header-tools{padding-right:var(--s-space-24);padding-left:var(--s-space-24);border-bottom-color:transparent}}.modal__custom-header{display:none;flex-shrink:0;border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__custom-header{border-bottom-color:transparent}}.modal__heading{overflow:hidden}.modal__heading .heading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.modal__content-container{display:flex;overflow:hidden;flex-grow:1;flex-direction:column;gap:var(--s-space-24)}@media (min-width: 992px){.modal__content-container{flex-direction:row}}.modal__primary-content{display:flex;overflow:hidden;overflow-y:auto;flex-grow:1;flex-basis:100%;flex-direction:column}.modal__content{overflow-x:hidden;overflow-y:auto;height:100%}.modal__content ::slotted(*){margin:0}.modal__secondary-content{display:none;overflow:visible;overflow-x:hidden;overflow-y:auto;max-width:none;max-height:40%;padding-right:var(--s-space-16);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal__secondary-content{padding-left:var(--s-space-24)}}@media (min-width: 992px){.modal__secondary-content{overflow-x:hidden;overflow-y:auto;max-width:var(--swirl-modal-max-secondary-content-width);max-height:none;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:0;flex-basis:50%;flex-grow:1}}.modal__custom-footer{flex-shrink:0}.modal__controls{display:flex;padding:var(--swirl-modal-footer-padding-small);flex-shrink:0;justify-content:flex-end}@media (min-width: 768px){.modal__controls{padding:var(--swirl-modal-footer-padding-large)}}.modal--has-secondary-content.modal--has-sidebar-content:not(.modal--fullscreen) .modal__body{max-width:calc(\n var(--swirl-modal-max-width) + var(--swirl-modal-sidebar-width) +\n var(--swirl-modal-max-secondary-content-width)\n )}@keyframes modal-scale-in{from{transform:scale(0)}to{transform:scale(1)}}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes modal-fade-out{from{opacity:1}to{opacity:0}}@keyframes modal-drawer-slide-in{from{transform:translate3d(100%, 0, 0)}to{transform:translate3d(0, 0, 0)}}@keyframes modal-drawer-slide-out{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0)}}';export{n as swirl_modal}
1
+ import{r as a,c as e,h as o,H as d,d as t}from"./p-DC8qzJZr.js";import{d as s,e as i}from"./p-B0kNlhKL.js";import{c as r}from"./p-orsBiyT_.js";import{c as l}from"./p-DIdMBZfn.js";const n=class{constructor(o){a(this,o),this.toggleFullscreen=e(this,"toggleFullscreen",7),this.modalClose=e(this,"modalClose",7),this.modalOpen=e(this,"modalOpen",7),this.primaryAction=e(this,"primaryAction",7),this.requestModalClose=e(this,"requestModalClose",7),this.secondaryAction=e(this,"secondaryAction",7),this.sidebarClose=e(this,"sidebarClose",7),this.closable=!0,this.closeButtonLabel="Close modal",this.fullscreenEnableButtonLabel="Full screen",this.fullscreenDisableButtonLabel="Exit full screen",this.padded=!0,this.variant="default",this.sidebarPadded=!0,this.sidebarFooterPadded=!0,this.sidebarCloseButtonLabel="Close sidebar",this.isOpen=!1,this.isFullscreen=!1,this.isFullscreenTransitioning=!1,this.closing=!1,this.scrollable=!1,this.scrolled=!1,this.scrolledDown=!1,this.sidebarScrolled=!1,this.sidebarScrolledDown=!1,this.sidebarScrollable=!1,this.onKeyDown=a=>{"Escape"===a.code&&(a.stopImmediatePropagation(),this.close())},this.onBackdropClick=()=>{this.close()},this.onCloseButtonClick=()=>{this.close()},this.onFullscreenButtonClick=()=>{this.setFullscreen(!this.isFullscreen)},this.onSidebarCloseButtonClick=()=>{this.hideSidebarContent=!0,this.sidebarClose.emit()},this.onPrimaryAction=a=>{this.primaryAction.emit(a)},this.onSecondaryAction=a=>{this.secondaryAction.emit(a)},this.determineScrollStatus=()=>{this.determineMainScrollStatus(),this.determineSidebarScrollStatus()},this.determineMainScrollStatus=()=>{const a=this.scrollContainer?.scrollTop>0,e=Math.ceil(this.scrollContainer?.scrollTop+this.scrollContainer?.offsetHeight)>=this.scrollContainer?.scrollHeight,o=this.scrollContainer?.scrollHeight>this.scrollContainer?.offsetHeight;a!==this.scrolled&&(this.scrolled=a),e!==this.scrolledDown&&(this.scrolledDown=e),o!==this.scrollable&&(this.scrollable=o)},this.determineSidebarScrollStatus=()=>{const a=this.sidebarScrollContainer?.scrollTop>0,e=Math.ceil(this.sidebarScrollContainer?.scrollTop+this.sidebarScrollContainer?.offsetHeight)>=this.sidebarScrollContainer?.scrollHeight,o=this.sidebarScrollContainer?.scrollHeight>this.sidebarScrollContainer?.offsetHeight;a!==this.sidebarScrolled&&(this.sidebarScrolled=a),e!==this.sidebarScrolledDown&&(this.sidebarScrolledDown=e),o!==this.sidebarScrollable&&(this.sidebarScrollable=o)}}componentDidLoad(){this.focusTrap=l(this.modalEl,{allowOutsideClick:!0,escapeDeactivates:!1,tabbableOptions:{getShadowRoot:a=>a.shadowRoot}}),this.determineScrollStatus(),this.updateCustomFooterStatus(),this.updateCustomHeaderStatus(),this.updateHeaderToolsStatus(),this.updateSecondaryContentStatus(),this.updateSidebarContentStatus(),this.updateSidebarFooterStatus()}componentDidRender(){this.focusTrap?.updateContainerElements(this.modalEl)}disconnectedCallback(){this.focusTrap?.deactivate(),this.unlockBodyScroll()}onWindowResize(){this.determineScrollStatus()}async open(){this.isOpen=!0,this.modalOpen.emit(),setTimeout((()=>{this.lockBodyScroll(),this.determineScrollStatus()})),setTimeout((()=>{this.focusTrap.activate(),this.handleAutoFocus()}),200)}async close(a){this.closing||(this.requestModalClose.emit(),(this.closable||a)&&(this.closing=!0,this.unlockBodyScroll(),setTimeout((()=>{this.focusTrap.deactivate(),this.isOpen=!1,this.modalClose.emit(),this.closing=!1}),150)))}async setFullscreen(a){this.isFullscreen!==a&&(this.isFullscreenTransitioning=!0,this.isFullscreen=a,this.toggleFullscreen.emit(this.isFullscreen),setTimeout((()=>this.isFullscreenTransitioning=!1),150))}updateCustomFooterStatus(){this.hasCustomFooter=Boolean(this.el.querySelector('[slot="custom-footer"]'))}updateCustomHeaderStatus(){this.hasCustomHeader=Boolean(this.el.querySelector('[slot="custom-header"]'))}updateHeaderToolsStatus(){this.hasHeaderTools=Boolean(this.el.querySelector('[slot="header-tools"]'))}updateSecondaryContentStatus(){this.hasSecondaryContent=Boolean(this.el.querySelector('[slot="secondary-content"]'))}updateSidebarContentStatus(){this.hasSidebarContent=Boolean(this.el.querySelector('[slot="sidebar-content"]'))}updateSidebarFooterStatus(){this.hasSidebarFooter=Boolean(this.el.querySelector('[slot="sidebar-footer"]'))}handleAutoFocus(){this.modalEl.querySelector("input[autofocus]")?.focus()}lockBodyScroll(){s(this.scrollContainer),s(this.sidebarScrollContainer)}unlockBodyScroll(){this.scrollContainer&&i(this.scrollContainer),this.sidebarScrollContainer&&i(this.sidebarScrollContainer)}render(){const a=Boolean(this.primaryActionLabel)||Boolean(this.secondaryActionLabel),e=r("modal",`modal--variant-${this.variant}`,{"modal--closing":this.closing,"modal--fullscreen":this.isFullscreen,"modal--fullscreen-transitioning":this.isFullscreenTransitioning,"modal--has-custom-footer":this.hasCustomFooter,"modal--has-custom-header":this.hasCustomHeader,"modal--has-header-tools":this.hasHeaderTools,"modal--has-secondary-content":this.hasSecondaryContent&&!this.hideSecondaryContent,"modal--hide-label":this.hideLabel,"modal--padded":this.padded,"modal--scrollable":this.scrollable,"modal--scrolled":this.scrolled,"modal--scrolled-down":this.scrolledDown,"modal--hide-secondary-content-borders":this.hideSecondaryContentBorders,"modal--has-sidebar-content":this.hasSidebarContent&&!this.hideSidebarContent,"modal--sidebar-padded":this.sidebarPadded,"modal--has-sidebar-footer":this.hasSidebarFooter&&this.hasSidebarContent&&!this.hideSidebarContent,"modal--sidebar-footer-padded":this.sidebarFooterPadded,"modal--sidebar-scrolled":this.sidebarScrolled,"modal--sidebar-scrolled-down":this.sidebarScrolledDown,"modal--sidebar-scrollable":this.sidebarScrollable});return o(d,{key:"c82bd24e5de6cb12dd85b207a2a4cb7b5976872b"},o("section",{key:"8d380c32de1a1721c7343fa705416c846d415384","aria-hidden":String(!this.isOpen),"aria-label":this.label,"aria-modal":"true",class:e,onKeyDown:this.onKeyDown,role:"dialog",ref:a=>this.modalEl=a},o("div",{key:"74389c724c2fc3dbbf64e9acf266c311e98be466",class:"modal__backdrop",onClick:this.onBackdropClick}),o("div",{key:"cd1d3b82a0de6914dd11765901f891ffc6779688",class:"modal__body",style:this.isFullscreen?{}:{"--swirl-modal-max-height":this.maxHeight,"--swirl-modal-height":this.height,minHeight:this.minHeight,maxWidth:this.maxWidth}},o("aside",{key:"6ba43b9903fc20b97c384cbb339d6ccf88bb9544",class:"modal__sidebar"},this.sidebarLabel&&o("header",{key:"0dc8eec524121375cc9c78c5866cf8642a0a5339",class:r("modal__sidebar-header",{"modal__sidebar-header--has-close-button":this.hasSidebarCloseButton})},this.hasSidebarCloseButton&&o("swirl-button",{key:"ed06f016a6fbffaaa97a73a66bf8b81b70610413",hideLabel:!0,icon:"<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>",label:this.sidebarCloseButtonLabel,onClick:this.onSidebarCloseButtonClick}),o("swirl-heading",{key:"66061ab0f8e8bf7bf44ffea221584f2bb30e090d",as:"h3",class:"modal__sidebar-heading",level:5,text:this.sidebarLabel})),o("div",{key:"df228a3e86bddbeade95c73bad1fe523aa3c30e1",class:"modal__sidebar-content",onScroll:this.determineSidebarScrollStatus,ref:a=>this.sidebarScrollContainer=a},o("slot",{key:"be16658b4ecbc40c97b8a1f1d7b6ec67c9c13828",name:"sidebar-content"})),o("div",{key:"5fdedc18e02db89897473843c7aa40e0719e128d",class:"modal__sidebar-footer"},o("slot",{key:"116e70c57e40e8f20e9380af357830d31592fd74",name:"sidebar-footer"}))),o("div",{key:"b219e652242ebd7e9b782e1282079a1d08674573",class:"modal__main-content"},o("header",{key:"e5e07dce0daead5e23f2a719a5f41f373b559008",class:"modal__custom-header"},o("slot",{key:"93f56acb67aebd593806a8f67d2d184bb243f2ec",name:"custom-header"})),(!this.hideLabel||!this.hideCloseButton)&&o("header",{key:"6c940113e4e1535ac2b479f509f4552b8ccd288a",class:"modal__header"},o("div",{key:"e4d0b9584cffab4aa97726a5a0ce6a52e8749024",class:"modal__header-bar"},!this.hideCloseButton&&o("swirl-button",{key:"19dcddfcbd1488a4255bc36d5e48d7aa87b37810",class:"modal__close-button",hideLabel:!0,icon:"default"===this.variant?"<swirl-icon-close></swirl-icon-close>":"<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>",label:this.closeButtonLabel,onClick:this.onCloseButtonClick}),this.showFullscreenButton&&o("swirl-button",{key:"f4193147bda2699e854b19016a81f46be67af807",class:"modal__fullscreen-button",hideLabel:!0,icon:this.isFullscreen?"<swirl-icon-close-fullscreen></swirl-icon-close-fullscreen>":"<swirl-icon-open-in-full></swirl-icon-open-in-full>",label:this.isFullscreen?this.fullscreenDisableButtonLabel:this.fullscreenEnableButtonLabel,onClick:this.onFullscreenButtonClick}),!this.hideLabel&&o("swirl-heading",{key:"3456ba73064e116782fc2d379a07fcb7e548b559",as:"h2",class:"modal__heading",level:3,text:this.label}))),o("div",{key:"930969de9c366d5c3b7a6ad41207c5e8b156a512",class:"modal__content-container",style:{gap:this.contentGap?`var(--s-space-${this.contentGap})`:void 0}},o("div",{key:"709500b83b513e4668921e7187a34aed059d67cb",class:"modal__primary-content",style:{maxWidth:this.primaryContentMaxWidth,flex:this.primaryContentFlex}},o("div",{key:"c8c62935631f3ac6f6cdefc4fbff82737b535caf",class:"modal__header-tools"},o("slot",{key:"df88048fb9956987d3950616dcad6c4a8df81e27",name:"header-tools"})),o("div",{key:"fb44494135b40274f22bf5a13cbc6981c5c5d08c",class:"modal__content",onScroll:this.determineMainScrollStatus,ref:a=>this.scrollContainer=a},o("slot",{key:"b9668bd1510b36ec0323d320db94e3d574c3d487"}))),o("div",{key:"b8061c98f1093c9ea51e12e7aa90969c89827d3f",class:"modal__secondary-content",style:{maxWidth:this.secondaryContentMaxWidth,flex:this.secondaryContentFlex,padding:Boolean(this.secondaryContentPadding)?`var(--s-space-${this.secondaryContentPadding})`:void 0,paddingBlockEnd:Boolean(this.secondaryContentPaddingBlockEnd)?`var(--s-space-${this.secondaryContentPaddingBlockEnd})`:void 0,paddingBlockStart:Boolean(this.secondaryContentPaddingBlockStart)?`var(--s-space-${this.secondaryContentPaddingBlockStart})`:void 0,paddingInlineEnd:Boolean(this.secondaryContentPaddingInlineEnd)?`var(--s-space-${this.secondaryContentPaddingInlineEnd})`:void 0,paddingInlineStart:Boolean(this.secondaryContentPaddingInlineStart)?`var(--s-space-${this.secondaryContentPaddingInlineStart})`:void 0}},o("slot",{key:"fd8b40685e996b00612861fdfd685aac799234e6",name:"secondary-content"}))),o("div",{key:"d3e7fdaa221558abe30ab7dbdec90f3ebfe32103",class:"modal__custom-footer"},o("slot",{key:"9e691351090de8e834973565e01382750e9f48c2",name:"custom-footer"})),a&&o("footer",{key:"79ec849bd85830c012ba1762e7fc8d18bf15b2c0",class:"modal__controls"},o("swirl-button-group",{key:"1ffa600e094bb0647619ba1f4204f2059ced15de",wrap:!0},this.secondaryActionLabel&&o("swirl-button",{key:"5c4c0634686922d4adc96242808bb685ae35da7d",label:this.secondaryActionLabel,onClick:this.onSecondaryAction}),this.primaryActionLabel&&o("swirl-button",{key:"b6310f56ca29ba9c2bf94957d676fddffaeeb65d",intent:"primary",label:this.primaryActionLabel,onClick:this.onPrimaryAction,variant:"flat"})))))))}get el(){return t(this)}};n.style=':host{display:block}:host *{box-sizing:border-box}.modal{--swirl-ghost-button-background-default:var(--s-surface-overlay-default);--swirl-ghost-button-background-hovered:var(--s-surface-overlay-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-overlay-pressed);--swirl-resource-list-item-background-default:var(\n --s-surface-overlay-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-overlay-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-overlay-pressed\n );--swirl-modal-height:auto;--swirl-modal-max-height:90vh;--swirl-modal-view-height:100vh;--swirl-modal-header-height:3.75rem;--swirl-modal-max-width:40rem;--swirl-modal-sidebar-width:25rem;--swirl-modal-max-secondary-content-width:24rem;--swirl-modal-footer-padding-small:var(--s-space-12) var(--s-space-16)\n var(--s-space-12) var(--s-space-16);--swirl-modal-footer-padding-large:var(--s-space-16) var(--s-space-24)\n var(--s-space-16) var(--s-space-24)}@supports (height: 100dvh){.modal{--swirl-modal-max-height:90dvh;--swirl-modal-view-height:100dvh}}.modal{position:fixed;z-index:var(--s-z-40);display:flex;justify-content:center;align-items:center;height:var(--swirl-modal-view-height);inset:0}.modal[aria-hidden="true"]{display:none}.modal--variant-default.modal--closing{animation:0.15s modal-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-default.modal--closing{animation:none}}.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:0.15s modal-backdrop-fade-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:none}}.modal--variant-default:not(.modal--closing) .modal__body{animation:0.15s modal-scale-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__body{animation:none}}.modal--variant-drawer{justify-content:end;align-items:stretch}.modal--variant-drawer.modal--closing{animation:0.15s modal-drawer-slide-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-drawer.modal--closing{animation:none}}@media (min-width: 768px){.modal--variant-drawer.modal--hide-label .modal__header-bar{height:auto;padding-top:var(--s-space-4);padding-bottom:var(--s-space-4)}}.modal--variant-drawer .modal__backdrop{background-color:transparent;animation:none}.modal--variant-drawer .modal__body{height:100%;max-height:none;border-radius:0;animation:0.15s modal-drawer-slide-in;box-shadow:var(--s-shadow-level-3)}@media (prefers-reduced-motion){.modal--variant-drawer .modal__body{animation:none}}.modal--variant-drawer .modal__header-bar{background-color:var(--s-surface-overlay-default)}.modal--variant-drawer .modal__header-bar .modal__close-button{margin-left:calc(-1 * var(--s-space-8))}.modal--variant-drawer .modal__header-bar .modal__fullscreen-button{display:none}@media (min-width: 768px){.modal--variant-drawer .modal__header-bar{flex-direction:row}}@media (min-width: 768px){.modal--variant-drawer.modal--padded .modal__content{padding-top:var(--s-space-8)}}.modal--padded .modal__content{padding-top:var(--s-space-24);padding-right:var(--s-space-16);padding-bottom:var(--s-space-24);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal--padded .modal__content{padding-top:0;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:var(--s-space-24)}}@media (min-width: 768px){.modal--scrollable .modal__content{padding-bottom:0}}.modal--scrollable:not(.modal--scrolled-down).modal--has-custom-footer .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--scrollable:not(.modal--scrolled-down):not(.modal--has-custom-footer) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-custom-header .modal__custom-header{display:block}.modal--has-custom-header .modal__content{padding-top:var(--s-space-16)}.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-small)}@media (min-width: 768px){.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-large)}}.modal--has-header-tools .modal__header{border-bottom-color:transparent}.modal--has-header-tools .modal__header-tools{display:block}.modal--has-secondary-content.modal.modal--variant-default:not(.modal--fullscreen) .modal__body,.modal--has-secondary-content.modal.modal--variant-drawer:not(.modal--fullscreen) .modal__body{max-width:calc(\n var(--swirl-modal-max-width) +\n var(--swirl-modal-max-secondary-content-width)\n )}.modal--has-secondary-content:not(.modal--has-header-tools):not(.modal--hide-secondary-content-borders) .modal__header{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-header-tools:not(.modal--hide-secondary-content-borders) .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-custom-footer:not(.modal--hide-secondary-content-borders) .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-secondary-content:not(.modal--has-custom-footer):not(.modal--hide-secondary-content-borders) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 992px){.modal--has-secondary-content .modal__header-tools,.modal--has-secondary-content .modal__content{padding-right:0}}.modal--has-secondary-content .modal__primary-content{overflow:visible;max-height:60%;flex-basis:auto}@media (min-width: 992px){.modal--has-secondary-content .modal__primary-content{max-width:calc(100% - var(--swirl-modal-max-secondary-content-width));max-height:none;flex-basis:calc(100% - var(--swirl-modal-max-secondary-content-width))}}.modal--has-secondary-content .modal__secondary-content{display:block}.modal__main-content{display:flex;flex-direction:column;overflow-y:auto;flex-grow:1}.modal__sidebar{display:none}.modal.modal--has-sidebar-content.modal.modal--variant-default:not(.modal--fullscreen) .modal__body,.modal.modal--has-sidebar-content.modal.modal--variant-drawer:not(.modal--fullscreen) .modal__body{max-width:calc(\n var(--swirl-modal-max-width) + var(--swirl-modal-sidebar-width)\n )}@media (min-width: 768px){.modal.modal--has-sidebar-content .modal__sidebar{display:flex;flex-direction:column;overflow-y:auto;flex-shrink:0;width:var(--swirl-modal-sidebar-width);border-right:var(--s-border-width-default) solid var(--s-border-default)}.modal.modal--has-sidebar-content .modal__sidebar .modal__sidebar-header{border-bottom:var(--s-border-width-default) solid transparent;display:flex;align-items:center;gap:var(--s-space-8);padding-right:var(--s-space-24);padding-left:var(--s-space-24)}.modal.modal--has-sidebar-content .modal__sidebar .modal__sidebar-header.modal__sidebar-header--has-close-button{padding-left:var(--s-space-16)}.modal.modal--has-sidebar-content .modal__sidebar .modal__sidebar-header .modal__sidebar-heading{display:flex;align-items:center;height:var(--swirl-modal-header-height)}.modal.modal--has-sidebar-content .modal__sidebar .modal__sidebar-content{display:block;flex-grow:1;overflow-y:auto}}@media (min-width: 992px){.modal.modal--has-sidebar-content .modal__primary-content{flex-basis:calc(100% - 20rem)}}.modal--sidebar-padded .modal__sidebar .modal__sidebar-content{padding-left:var(--s-space-24);padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-top:var(--s-space-16)}@media (min-width: 768px){.modal--scrolled:not(.modal--has-header-tools) .modal__header{border-bottom-color:var(--s-border-default)}.modal--scrolled.modal--has-header-tools .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--scrolled .modal__custom-header{border-bottom-color:var(--s-border-default)}}@media (min-width: 768px){.modal--sidebar-scrolled .modal__sidebar .modal__sidebar-header{border-bottom-color:var(--s-border-default)}}.modal--has-sidebar-footer.modal--sidebar-footer-padded .modal__sidebar-footer{padding:var(--swirl-modal-footer-padding-small)}@media (min-width: 768px){.modal--has-sidebar-footer.modal--sidebar-footer-padded .modal__sidebar-footer{padding:var(--swirl-modal-footer-padding-large)}}@media (min-width: 768px){.modal--sidebar-scrollable .modal__sidebar-content{padding-bottom:0 !important}}.modal--sidebar-scrollable:not(.modal--sidebar-scrolled-down).modal--has-sidebar-footer .modal__sidebar-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal__backdrop{position:fixed;background-color:rgba(0, 0, 0, 0.2);inset:0}.modal__body{--swirl-card-background-default:var(--s-surface-overlay-default);--swirl-card-background-hovered:var(--s-surface-overlay-hovered);--swirl-card-background-pressed:var(--s-surface-overlay-pressed);--swirl-accordion-item-toggle-default:var(--s-surface-overlay-default);--swirl-accordion-item-toggle-hovered:var(--s-surface-overlay-hovered);--swirl-accordion-item-toggle-pressed:var(--s-surface-overlay-pressed);position:relative;z-index:var(--s-z-40);display:flex;flex-direction:row;overflow:hidden;width:100vw;max-width:100vw;height:var(--swirl-modal-view-height);max-height:var(--swirl-modal-view-height);background-color:var(--s-surface-overlay-default)}.modal--fullscreen .modal__body{min-height:var(--swirl-modal-view-height)}.modal--fullscreen-transitioning .modal__body{transition:width 0.15s ease-out, max-width 0.15s ease-out,\n max-height 0.15s ease-out, min-height 0.15s ease-out}@media (min-width: 768px){.modal.modal--variant-default:not(.modal--fullscreen) .modal__body{width:90vw;max-width:var(--swirl-modal-max-width);max-height:var(--swirl-modal-max-height);min-height:0;border-radius:var(--s-border-radius-base);box-shadow:var(--s-shadow-level-3)}}@media (min-width: 992px){.modal.modal--variant-default:not(.modal--fullscreen) .modal__body{height:var(--swirl-modal-height)}}.modal__header{border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header{border-bottom:var(--s-border-width-default) solid transparent}}.modal__header-bar{display:flex;height:3.5rem;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-shrink:0;align-items:center;gap:var(--s-space-8)}@media (min-width: 768px){.modal__header-bar{height:var(--swirl-modal-header-height);padding-top:var(--s-space-12);padding-right:var(--s-space-24);padding-bottom:var(--s-space-12);padding-left:var(--s-space-24);flex-direction:row-reverse}}.modal__fullscreen-button{display:none}@media (min-width: 768px){.modal__fullscreen-button{display:block}}.modal__header-tools{display:none;padding-right:var(--s-space-16);padding-left:var(--s-space-16);border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header-tools{padding-right:var(--s-space-24);padding-left:var(--s-space-24);border-bottom-color:transparent}}.modal__custom-header{display:none;flex-shrink:0;border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__custom-header{border-bottom-color:transparent}}.modal__heading{overflow:hidden}.modal__heading .heading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.modal__content-container{display:flex;overflow:hidden;flex-grow:1;flex-direction:column;gap:var(--s-space-24)}@media (min-width: 992px){.modal__content-container{flex-direction:row}}.modal__primary-content{display:flex;overflow:hidden;overflow-y:auto;flex-grow:1;flex-basis:100%;flex-direction:column}.modal__content{overflow-x:hidden;overflow-y:auto;height:100%}.modal__content ::slotted(*){margin:0}.modal__secondary-content{display:none;overflow:visible;overflow-x:hidden;overflow-y:auto;max-width:none;max-height:40%;padding-right:var(--s-space-16);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal__secondary-content{padding-left:var(--s-space-24)}}@media (min-width: 992px){.modal__secondary-content{overflow-x:hidden;overflow-y:auto;max-width:var(--swirl-modal-max-secondary-content-width);max-height:none;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:0;flex-basis:50%;flex-grow:1}}.modal__custom-footer{flex-shrink:0}.modal__controls{display:flex;padding:var(--swirl-modal-footer-padding-small);flex-shrink:0;justify-content:flex-end}@media (min-width: 768px){.modal__controls{padding:var(--swirl-modal-footer-padding-large)}}.modal--has-secondary-content.modal--has-sidebar-content:not(.modal--fullscreen) .modal__body{max-width:calc(\n var(--swirl-modal-max-width) + var(--swirl-modal-sidebar-width) +\n var(--swirl-modal-max-secondary-content-width)\n )}@keyframes modal-scale-in{from{transform:scale(0)}to{transform:scale(1)}}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes modal-fade-out{from{opacity:1}to{opacity:0}}@keyframes modal-drawer-slide-in{from{transform:translate3d(100%, 0, 0)}to{transform:translate3d(0, 0, 0)}}@keyframes modal-drawer-slide-out{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0)}}';export{n as swirl_modal}