@openremote/or-scheduler 1.24.1 → 1.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -3485,7 +3485,7 @@
3485
3485
  >
3486
3486
  <slot name="overlay"></slot>
3487
3487
  </vaadin-multi-select-combo-box-overlay>
3488
- `}}tA(sK);let sG=class extends sK{};sG=function(t,e,a,i){var h,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var r=t.length-1;r>=0;r--)(h=t[r])&&(n=(s<3?h(n):s>3?h(e,a,n):h(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n}([_("or-vaadin-multi-select-combo-box")],sG);let sZ=class extends hn{};function sX(t,e,a){return t?e(t):a?.(t)}sZ=function(t,e,a,i){var h,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var r=t.length-1;r>=0;r--)(h=t[r])&&(n=(s<3?h(n):s>3?h(e,a,n):h(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n}([_("or-vaadin-time-picker")],sZ);var sQ=n(954);(o=c||(c={})).BUTTON="button",o.BUTTON_TOGGLE="button-toggle",o.BUTTON_MOMENTARY="button-momentary",o.CHECKBOX="checkbox",o.CHECKBOX_LIST="checkbox-list",o.COLOUR="color",o.DATE="date",o.DATETIME="datetime-local",o.EMAIL="email",o.JSON="json",o.JSON_OBJECT="json-object",o.MONTH="month",o.NUMBER="number",o.BIG_INT="big-int",o.PASSWORD="password",o.RADIO="radio",o.SWITCH="switch",o.RANGE="range",o.TELEPHONE="tel",o.TEXT="text",o.TEXTAREA="textarea",o.TIME="time",o.URL="url",o.WEEK="week",o.SELECT="select",o.LIST="list",o.CRON="cron",o.DURATION="duration",o.DURATION_TIME="duration-time",o.DURATION_PERIOD="duration-period";var sJ=["MO","TU","WE","TH","FR","SA","SU"],s0=function(){function t(t,e){if(0===e)throw Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return t.fromStr=function(e){return new t(sJ.indexOf(e))},t.prototype.nth=function(e){return this.n===e?this:new t(this.weekday,e)},t.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},t.prototype.toString=function(){var t=sJ[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},t.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},t}(),s1=function(t){return null!=t},s2=function(t){return"number"==typeof t},s3=function(t){return"string"==typeof t&&sJ.includes(t)},s5=Array.isArray,s4=function(t,e){void 0===e&&(e=t),1==arguments.length&&(e=t,t=0);for(var a=[],i=t;i<e;i++)a.push(i);return a},s6=function(t,e){var a=0,i=[];if(s5(t))for(;a<e;a++)i[a]=[].concat(t);else for(;a<e;a++)i[a]=t;return i};function s8(t,e,a){void 0===a&&(a=" ");var i=String(t);return(e|=0,i.length>e)?String(i):((e-=i.length)>a.length&&(a+=s6(a,e/a.length)),a.slice(0,e)+String(i))}var s7=function(t,e,a){var i=t.split(e);return a?i.slice(0,a).concat([i.slice(a).join(e)]):i},s9=function(t,e){var a=t%e;return a*e<0?a+e:a},nt=function(t,e){return{div:Math.floor(t/e),mod:s9(t,e)}},ne=function(t){return!s1(t)||0===t.length},na=function(t){return!ne(t)},ni=function(t,e){return na(t)&&-1!==t.indexOf(e)},nh=function(t,e,a,i,h,s){return void 0===i&&(i=0),void 0===h&&(h=0),void 0===s&&(s=0),new Date(Date.UTC(t,e-1,a,i,h,s))},ns=[31,28,31,30,31,30,31,31,30,31,30,31],nn=nh(1970,1,1),nr=[6,0,1,2,3,4,5],no=function(t){return t%4==0&&t%100!=0||t%400==0},nl=function(t){return t instanceof Date},nd=function(t){return nl(t)&&!isNaN(t.getTime())},nc=function(t){var e,a;return e=t,a=nn,Math.round((e.getTime()-a.getTime())/864e5)},nv=function(t){return new Date(nn.getTime()+864e5*t)},np=function(t){var e=t.getUTCMonth();return 1===e&&no(t.getUTCFullYear())?29:ns[e]},nu=function(t){return nr[t.getUTCDay()]},n_=function(t,e){var a=nh(t,e+1,1);return[nu(a),np(a)]},ng=function(t,e){return e=e||t,new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},nm=function(t){return new Date(t.getTime())},nf=function(t){for(var e=[],a=0;a<t.length;a++)e.push(nm(t[a]));return e},nb=function(t){t.sort(function(t,e){return t.getTime()-e.getTime()})},ny=function(t,e){void 0===e&&(e=!0);var a=new Date(t);return""+s8(a.getUTCFullYear().toString(),4,"0")+s8(a.getUTCMonth()+1,2,"0")+s8(a.getUTCDate(),2,"0")+"T"+s8(a.getUTCHours(),2,"0")+s8(a.getUTCMinutes(),2,"0")+s8(a.getUTCSeconds(),2,"0")+(e?"Z":"")},nM=function(t){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(t);if(!e)throw Error("Invalid UNTIL value: ".concat(t));return new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10),parseInt(e[5],10)||0,parseInt(e[6],10)||0,parseInt(e[7],10)||0))},nz=function(t,e){return t.toLocaleString("sv-SE",{timeZone:e}).replace(" ","T")+"Z"},nw=function(t,e){var a=new Date(nz(t,Intl.DateTimeFormat().resolvedOptions().timeZone)),i=new Date(nz(t,null!=e?e:"UTC")).getTime()-a.getTime();return new Date(t.getTime()-i)},nC=function(){function t(t,e){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=e,"between"===t?(this.maxDate=e.inc?e.before:new Date(e.before.getTime()-1),this.minDate=e.inc?e.after:new Date(e.after.getTime()+1)):"before"===t?this.maxDate=e.inc?e.dt:new Date(e.dt.getTime()-1):"after"===t&&(this.minDate=e.inc?e.dt:new Date(e.dt.getTime()+1))}return t.prototype.accept=function(t){++this.total;var e=this.minDate&&t<this.minDate,a=this.maxDate&&t>this.maxDate;if("between"===this.method){if(e)return!0;if(a)return!1}else if("before"===this.method){if(a)return!1}else if("after"===this.method)return!!e||(this.add(t),!1);return this.add(t)},t.prototype.add=function(t){return this._result.push(t),!0},t.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;default:return t.length?t[t.length-1]:null}},t.prototype.clone=function(){return new t(this.method,this.args)},t}(),nx=function(t,e){return(nx=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(t,e)};function nk(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function a(){this.constructor=t}nx(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var nE=function(){return(nE=Object.assign||function(t){for(var e,a=1,i=arguments.length;a<i;a++)for(var h in e=arguments[a])Object.prototype.hasOwnProperty.call(e,h)&&(t[h]=e[h]);return t}).apply(this,arguments)};function nT(t,e,a){if(a||2==arguments.length)for(var i,h=0,s=e.length;h<s;h++)!i&&h in e||(i||(i=Array.prototype.slice.call(e,0,h)),i[h]=e[h]);return t.concat(i||Array.prototype.slice.call(e))}var nI=function(t){function e(e,a,i){var h=t.call(this,e,a)||this;return h.iterator=i,h}return nk(e,t),e.prototype.add=function(t){return!!this.iterator(t,this._result.length)&&(this._result.push(t),!0)},e}(nC);let nS={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var nD=function(t,e){return -1!==t.indexOf(e)},nA=function(t){return t.toString()},nO=function(t,e,a){return"".concat(e," ").concat(a,", ").concat(t)},nP=function(){function t(t,e,a,i){if(void 0===e&&(e=nA),void 0===a&&(a=nS),void 0===i&&(i=nO),this.text=[],this.language=a||nS,this.gettext=e,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var h=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);h.sort(function(t,e){return t-e}),s.sort(function(t,e){return e-t}),this.bymonthday=h.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(s1(this.origOptions.byweekday)){var n=s5(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],r=String(n);this.byweekday={allWeeks:n.filter(function(t){return!t.n}),someWeeks:n.filter(function(t){return!!t.n}),isWeekdays:-1!==r.indexOf("MO")&&-1!==r.indexOf("TU")&&-1!==r.indexOf("WE")&&-1!==r.indexOf("TH")&&-1!==r.indexOf("FR")&&-1===r.indexOf("SA")&&-1===r.indexOf("SU"),isEveryDay:-1!==r.indexOf("MO")&&-1!==r.indexOf("TU")&&-1!==r.indexOf("WE")&&-1!==r.indexOf("TH")&&-1!==r.indexOf("FR")&&-1!==r.indexOf("SA")&&-1!==r.indexOf("SU")};var o=function(t,e){return t.weekday-e.weekday};this.byweekday.allWeeks.sort(o),this.byweekday.someWeeks.sort(o),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return t.isFullyConvertible=function(e){if(!(e.options.freq in t.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var a in e.origOptions){if(nD(["dtstart","tzid","wkst","freq"],a))break;if(!nD(t.IMPLEMENTED[e.options.freq],a))return!1}return!0},t.prototype.isFullyConvertible=function(){return t.isFullyConvertible(this.rrule)},t.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in t.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[rc.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var a=this.options.until;this.add(this.dateFormatter(a.getUTCFullYear(),this.language.monthNames[a.getUTCMonth()],a.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(e(this.plural(this.options.count)?"times":"time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},t.prototype.HOURLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"hours":"hour"))},t.prototype.MINUTELY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"minutes":"minute"))},t.prototype.DAILY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(t(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(t(this.plural(this.options.interval)?"days":"day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},t.prototype.WEEKLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(t(this.plural(this.options.interval)?"weeks":"week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(t(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(t(this.plural(this.options.interval)?"days":"day")):(1===this.options.interval&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},t.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"months":"month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},t.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"years":"year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(t(this.plural(this.options.byweekno.length)?"weeks":"week")).add(this.list(this.options.byweekno,void 0,t("and")))},t.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},t.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},t.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},t.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},t.prototype.nth=function(t){t=parseInt(t.toString(),10);var e,a=this.gettext;if(-1===t)return a("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:e=i+a("st");break;case 2:case 22:e=i+a("nd");break;case 3:case 23:e=i+a("rd");break;default:e=i+a("th")}return t<0?e+" "+a("last"):e},t.prototype.monthtext=function(t){return this.language.monthNames[t-1]},t.prototype.weekdaytext=function(t){var e=s2(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},t.prototype.plural=function(t){return t%100!=1},t.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},t.prototype.list=function(t,e,a,i){var h=this;void 0===i&&(i=","),s5(t)||(t=[t]),e=e||function(t){return t.toString()};var s=function(t){return e&&e.call(h,t)};if(!a)return t.map(s).join(i+" ");for(var n=t.map(s),r=i,o="",l=0;l<n.length;l++)0!==l&&(l===n.length-1?o+=" "+a+" ":o+=r+" "),o+=n[l];return o},t}(),nL=function(){function t(t){this.done=!0,this.rules=t}return t.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},t.prototype.isDone=function(){return this.done&&null===this.symbol},t.prototype.nextSymbol=function(){this.symbol=null,this.value=null;do{if(this.done)return!1;for(var t in e=null,this.rules){var e,a,i=this.rules[t].exec(this.text);i&&(null===e||i[0].length>e[0].length)&&(e=i,a=t)}if(null!=e&&(this.text=this.text.substr(e[0].length),""===this.text&&(this.done=!0)),null==e){this.done=!0,this.symbol=null,this.value=null;return}}while("SKIP"===a);return this.symbol=a,this.value=e,!0},t.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},t.prototype.acceptNumber=function(){return this.accept("number")},t.prototype.expect=function(t){if(this.accept(t))return!0;throw Error("expected "+t+" but found "+this.symbol)},t}();function n$(t,e){void 0===e&&(e=nS);var a={},i=new nL(e.tokens);if(!i.start(t))return null;return function(){i.expect("every");var t=i.acceptNumber();if(t&&(a.interval=parseInt(t[0],10)),i.isDone())throw Error("Unexpected end");switch(i.symbol){case"day(s)":a.freq=rc.DAILY,i.nextSymbol()&&(s(),l());break;case"weekday(s)":a.freq=rc.WEEKLY,a.byweekday=[rc.MO,rc.TU,rc.WE,rc.TH,rc.FR],i.nextSymbol(),s(),l();break;case"week(s)":a.freq=rc.WEEKLY,i.nextSymbol()&&(h(),s(),l());break;case"hour(s)":a.freq=rc.HOURLY,i.nextSymbol()&&(h(),l());break;case"minute(s)":a.freq=rc.MINUTELY,i.nextSymbol()&&(h(),l());break;case"month(s)":a.freq=rc.MONTHLY,i.nextSymbol()&&(h(),l());break;case"year(s)":a.freq=rc.YEARLY,i.nextSymbol()&&(h(),l());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":if(a.freq=rc.WEEKLY,a.byweekday=[rc[i.symbol.substr(0,2).toUpperCase()]],!i.nextSymbol())return;for(;i.accept("comma");){if(i.isDone())throw Error("Unexpected end");var e=r();if(!e)throw Error("Unexpected symbol "+i.symbol+", expected weekday");a.byweekday.push(rc[e]),i.nextSymbol()}s(),function(){i.accept("on"),i.accept("the");var t=o();if(t)for(a.bymonthday=[t],i.nextSymbol();i.accept("comma");){if(!(t=o()))throw Error("Unexpected symbol "+i.symbol+"; expected monthday");a.bymonthday.push(t),i.nextSymbol()}}(),l();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(a.freq=rc.YEARLY,a.bymonth=[n()],!i.nextSymbol())return;for(;i.accept("comma");){if(i.isDone())throw Error("Unexpected end");var d=n();if(!d)throw Error("Unexpected symbol "+i.symbol+", expected month");a.bymonth.push(d),i.nextSymbol()}h(),l();break;default:throw Error("Unknown symbol")}}(),a;function h(){var t=i.accept("on"),e=i.accept("the");if(t||e)do{var h=o(),s=r(),l=n();if(h)s?(i.nextSymbol(),a.byweekday||(a.byweekday=[]),a.byweekday.push(rc[s].nth(h))):(a.bymonthday||(a.bymonthday=[]),a.bymonthday.push(h),i.accept("day(s)"));else if(s)i.nextSymbol(),a.byweekday||(a.byweekday=[]),a.byweekday.push(rc[s]);else if("weekday(s)"===i.symbol)i.nextSymbol(),a.byweekday||(a.byweekday=[rc.MO,rc.TU,rc.WE,rc.TH,rc.FR]);else if("week(s)"===i.symbol){i.nextSymbol();var d=i.acceptNumber();if(!d)throw Error("Unexpected symbol "+i.symbol+", expected week number");for(a.byweekno=[parseInt(d[0],10)];i.accept("comma");){if(!(d=i.acceptNumber()))throw Error("Unexpected symbol "+i.symbol+"; expected monthday");a.byweekno.push(parseInt(d[0],10))}}else{if(!l)return;i.nextSymbol(),a.bymonth||(a.bymonth=[]),a.bymonth.push(l)}}while(i.accept("comma")||i.accept("the")||i.accept("on"))}function s(){if(i.accept("at"))do{var t=i.acceptNumber();if(!t)throw Error("Unexpected symbol "+i.symbol+", expected hour");for(a.byhour=[parseInt(t[0],10)];i.accept("comma");){if(!(t=i.acceptNumber()))throw Error("Unexpected symbol "+i.symbol+"; expected hour");a.byhour.push(parseInt(t[0],10))}}while(i.accept("comma")||i.accept("at"))}function n(){switch(i.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function r(){switch(i.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return i.symbol.substr(0,2).toUpperCase();default:return!1}}function o(){switch(i.symbol){case"last":return i.nextSymbol(),-1;case"first":return i.nextSymbol(),1;case"second":return i.nextSymbol(),i.accept("last")?-2:2;case"third":return i.nextSymbol(),i.accept("last")?-3:3;case"nth":var t=parseInt(i.value[1],10);if(t<-366||t>366)throw Error("Nth out of range: "+t);return i.nextSymbol(),i.accept("last")?-t:t;default:return!1}}function l(){if("until"===i.symbol){var t=Date.parse(i.text);if(!t)throw Error("Cannot parse until date:"+i.text);a.until=new Date(t)}else i.accept("for")&&(a.count=parseInt(i.value[0],10),i.expect("number"))}}function nR(t){return t<v.HOURLY}(l=v||(v={}))[l.YEARLY=0]="YEARLY",l[l.MONTHLY=1]="MONTHLY",l[l.WEEKLY=2]="WEEKLY",l[l.DAILY=3]="DAILY",l[l.HOURLY=4]="HOURLY",l[l.MINUTELY=5]="MINUTELY",l[l.SECONDLY=6]="SECONDLY";var nV=["count","until","interval","byweekday","bymonthday","bymonth"];nP.IMPLEMENTED=[],nP.IMPLEMENTED[v.HOURLY]=nV,nP.IMPLEMENTED[v.MINUTELY]=nV,nP.IMPLEMENTED[v.DAILY]=["byhour"].concat(nV),nP.IMPLEMENTED[v.WEEKLY]=nV,nP.IMPLEMENTED[v.MONTHLY]=nV,nP.IMPLEMENTED[v.YEARLY]=["byweekno","byyearday"].concat(nV);var nN=nP.isFullyConvertible,nB=function(){function t(t,e,a,i){this.hour=t,this.minute=e,this.second=a,this.millisecond=i||0}return t.prototype.getHours=function(){return this.hour},t.prototype.getMinutes=function(){return this.minute},t.prototype.getSeconds=function(){return this.second},t.prototype.getMilliseconds=function(){return this.millisecond},t.prototype.getTime=function(){return(60*this.hour*60+60*this.minute+this.second)*1e3+this.millisecond},t}(),nF=function(t){function e(e,a,i,h,s,n,r){var o=t.call(this,h,s,n,r)||this;return o.year=e,o.month=a,o.day=i,o}return nk(e,t),e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return nu(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var e=Math.floor(this.month/12),a=s9(this.month,12);this.month=a,this.year+=e,0===this.month&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,e){e>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-e))+7*t:this.day+=-(this.getWeekday()-e)+7*t,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,e,a){for(e&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var i=nt(this.hour,24),h=i.div,s=i.mod;if(h&&(this.hour=s,this.addDaily(h)),ne(a)||ni(a,this.hour))break}},e.prototype.addMinutes=function(t,e,a,i){for(e&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var h=nt(this.minute,60),s=h.div,n=h.mod;if(s&&(this.minute=n,this.addHours(s,!1,a)),(ne(a)||ni(a,this.hour))&&(ne(i)||ni(i,this.minute)))break}},e.prototype.addSeconds=function(t,e,a,i,h){for(e&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var s=nt(this.second,60),n=s.div,r=s.mod;if(n&&(this.second=r,this.addMinutes(n,!1,a,i)),(ne(a)||ni(a,this.hour))&&(ne(i)||ni(i,this.minute))&&(ne(h)||ni(h,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=n_(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;t=n_(this.year,this.month-1)[1]}}},e.prototype.add=function(t,e){var a=t.freq,i=t.interval,h=t.wkst,s=t.byhour,n=t.byminute,r=t.bysecond;switch(a){case v.YEARLY:return this.addYears(i);case v.MONTHLY:return this.addMonths(i);case v.WEEKLY:return this.addWeekly(i,h);case v.DAILY:return this.addDaily(i);case v.HOURLY:return this.addHours(i,e,s);case v.MINUTELY:return this.addMinutes(i,e,s,n);case v.SECONDLY:return this.addSeconds(i,e,s,n,r)}},e}(nB);function nH(t){for(var e=[],a=Object.keys(t),i=0;i<a.length;i++){var h=a[i];ni(rd,h)||e.push(h),nl(t[h])&&!nd(t[h])&&e.push(h)}if(e.length)throw Error("Invalid options: "+e.join(", "));return nE({},t)}function nU(t){var e=t.split("\n").map(nY).filter(function(t){return null!==t});return nE(nE({},e[0]),e[1])}function nj(t){var e={},a=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(t);if(!a)return e;var i=a[1],h=a[2];return i&&(e.tzid=i),e.dtstart=nM(h),e}function nY(t){if(!(t=t.replace(/^\s+|\s+$/,"")).length)return null;var e=/^([A-Z]+?)[:;]/.exec(t.toUpperCase());if(!e)return nq(t);var a=e[1];switch(a.toUpperCase()){case"RRULE":case"EXRULE":return nq(t);case"DTSTART":return nj(t);default:throw Error("Unsupported RFC prop ".concat(a," in ").concat(t))}}function nq(t){var e=nj(t.replace(/^RRULE:/i,""));return t.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach(function(a){var i=a.split("="),h=i[0],s=i[1];switch(h.toUpperCase()){case"FREQ":e.freq=v[s.toUpperCase()];break;case"WKST":e.wkst=ro[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var n,r=-1!==(n=s).indexOf(",")?n.split(",").map(nW):nW(n);e[h.toLowerCase()]=r;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=s.split(",").map(function(t){if(2===t.length)return ro[t];var e=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!e||e.length<3)throw SyntaxError("Invalid weekday string: ".concat(t));var a=Number(e[1]);return new s0(ro[e[2]].weekday,a)});break;case"DTSTART":case"TZID":var o=nj(t);e.tzid=o.tzid,e.dtstart=o.dtstart;break;case"UNTIL":e.until=nM(s);break;case"BYEASTER":e.byeaster=Number(s);break;default:throw Error("Unknown RRULE property '"+h+"'")}}),e}function nW(t){return/^[+-]?\d+$/.test(t)?Number(t):t}var nK=function(){function t(t,e){if(isNaN(t.getTime()))throw RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(t.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var t=ny(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},t.prototype.getTime=function(){return this.date.getTime()},t.prototype.rezonedDate=function(){return this.isUTC?this.date:nw(this.date,this.tzid)},t}();function nG(t){for(var e=[],a="",i=Object.keys(t),h=Object.keys(rl),s=0;s<i.length;s++)if("tzid"!==i[s]&&ni(h,i[s])){var n,r,o=i[s].toUpperCase(),l=t[i[s]],d="";if(!(!s1(l)||s5(l)&&!l.length)){switch(o){case"FREQ":d=rc.FREQUENCIES[t.freq];break;case"WKST":d=s2(l)?new s0(l).toString():l.toString();break;case"BYWEEKDAY":o="BYDAY",d=(s5(l)?l:[l]).map(function(t){return t instanceof s0?t:s5(t)?new s0(t[0],t[1]):new s0(t)}).toString();break;case"DTSTART":n=l,r=t.tzid,a=n?"DTSTART"+new nK(new Date(n),r).toString():"";break;case"UNTIL":d=ny(l,!t.tzid);break;default:if(s5(l)){for(var c=[],v=0;v<l.length;v++)c[v]=String(l[v]);d=c.toString()}else d=String(l)}d&&e.push([o,d])}}var p=e.map(function(t){var e=t[0],a=t[1];return"".concat(e,"=").concat(a.toString())}).join(";"),u="";return""!==p&&(u="RRULE:".concat(p)),[a,u].filter(function(t){return!!t}).join("\n")}var nZ=function(){function t(){this.all=!1,this.before=[],this.after=[],this.between=[]}return t.prototype._cacheAdd=function(t,e,a){e&&(e=e instanceof Date?nm(e):nf(e)),"all"===t?this.all=e:(a._value=e,this[t].push(a))},t.prototype._cacheGet=function(t,e){var a=!1,i=e?Object.keys(e):[],h=this[t];if("all"===t)a=this.all;else if(s5(h))for(var s=0;s<h.length;s++){var n=h[s];if(!(i.length&&function(t){for(var a=0;a<i.length;a++){var h=i[a];if(!function(t,e){return Array.isArray(t)?!!Array.isArray(e)&&t.length===e.length&&t.every(function(t,a){return t.getTime()===e[a].getTime()}):t instanceof Date?e instanceof Date&&t.getTime()===e.getTime():t===e}(e[h],t[h]))return!0}return!1}(n))){a=n._value;break}}if(!a&&this.all){for(var r=new nC(t,e),s=0;s<this.all.length&&r.accept(this.all[s]);s++);a=r.getValue(),this._cacheAdd(t,a,e)}return s5(a)?nf(a):a instanceof Date?nm(a):a},t}(),nX=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],s6(1,31),!0),s6(2,28),!0),s6(3,31),!0),s6(4,30),!0),s6(5,31),!0),s6(6,30),!0),s6(7,31),!0),s6(8,31),!0),s6(9,30),!0),s6(10,31),!0),s6(11,30),!0),s6(12,31),!0),s6(1,7),!0),nQ=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],s6(1,31),!0),s6(2,29),!0),s6(3,31),!0),s6(4,30),!0),s6(5,31),!0),s6(6,30),!0),s6(7,31),!0),s6(8,31),!0),s6(9,30),!0),s6(10,31),!0),s6(11,30),!0),s6(12,31),!0),s6(1,7),!0),nJ=s4(1,29),n0=s4(1,30),n1=s4(1,31),n2=s4(1,32),n3=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n2,!0),n0,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2.slice(0,7),!0),n5=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n2,!0),nJ,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2.slice(0,7),!0),n4=s4(-28,0),n6=s4(-29,0),n8=s4(-30,0),n7=s4(-31,0),n9=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n7,!0),n6,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7.slice(0,7),!0),rt=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n7,!0),n4,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7.slice(0,7),!0),re=[0,31,60,91,121,152,182,213,244,274,305,335,366],ra=[0,31,59,90,120,151,181,212,243,273,304,334,365],ri=function(){for(var t=[],e=0;e<55;e++)t=t.concat(s4(7));return t}(),rh=function(){function t(t){this.options=t}return t.prototype.rebuild=function(t,e){var a,i,h,s,n,r,o,l,d,c,v=this.options;if(t!==this.lastyear&&(this.yearinfo=function(t,e){var a,i,h,s,n,r=nh(t,1,1),o=no(t)?366:365,l=no(t+1)?366:365,d=nc(r),c=nu(r),v=nE(nE({yearlen:o,nextyearlen:l,yearordinal:d,yearweekday:c},(i=no(a=t)?366:365,h=nu(nh(a,1,1)),365===i?{mmask:nX,mdaymask:n5,nmdaymask:rt,wdaymask:ri.slice(h),mrange:ra}:{mmask:nQ,mdaymask:n3,nmdaymask:n9,wdaymask:ri.slice(h),mrange:re})),{wnomask:null});if(ne(e.byweekno))return v;v.wnomask=s6(0,o+7);var p=s=s9(7-c+e.wkst,7);p>=4?(p=0,n=v.yearlen+s9(c-e.wkst,7)):n=o-p;for(var u=Math.floor(Math.floor(n/7)+s9(n,7)/4),_=0;_<e.byweekno.length;_++){var g=e.byweekno[_];if(g<0&&(g+=u+1),g>0&&g<=u){var m=void 0;g>1?(m=p+(g-1)*7,p!==s&&(m-=7-s)):m=p;for(var f=0;f<7&&(v.wnomask[m]=1,m++,v.wdaymask[m]!==e.wkst);f++);}}if(ni(e.byweekno,1)){var m=p+7*u;if(p!==s&&(m-=7-s),m<o)for(var _=0;_<7&&(v.wnomask[m]=1,m+=1,v.wdaymask[m]!==e.wkst);_++);}if(p){var b=void 0;if(ni(e.byweekno,-1))b=-1;else{var y=nu(nh(t-1,1,1)),M=s9(7-y.valueOf()+e.wkst,7),z=no(t-1)?366:365,w=void 0;M>=4?(M=0,w=z+s9(y-e.wkst,7)):w=o-p,b=Math.floor(52+s9(w,7)/4)}if(ni(e.byweekno,b))for(var m=0;m<p;m++)v.wnomask[m]=1}return v}(t,v)),na(v.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var p=this.yearinfo,u=p.yearlen,_=p.mrange,g=p.wdaymask;this.monthinfo=function(t,e,a,i,h,s){var n={lastyear:t,lastmonth:e,nwdaymask:[]},r=[];if(s.freq===rc.YEARLY)if(ne(s.bymonth))r=[[0,a]];else for(var o=0;o<s.bymonth.length;o++)e=s.bymonth[o],r.push(i.slice(e-1,e+1));else s.freq===rc.MONTHLY&&(r=[i.slice(e-1,e+1)]);if(ne(r))return n;n.nwdaymask=s6(0,a);for(var o=0;o<r.length;o++)for(var l=r[o],d=l[0],c=l[1]-1,v=0;v<s.bynweekday.length;v++){var p=void 0,u=s.bynweekday[v],_=u[0],g=u[1];g<0?(p=c+(g+1)*7,p-=s9(h[p]-_,7)):(p=d+(g-1)*7,p+=s9(7-h[p]+_,7)),d<=p&&p<=c&&(n.nwdaymask[p]=1)}return n}(t,e,u,_,g,v)}s1(v.byeaster)&&(this.eastermask=(void 0===(a=v.byeaster)&&(a=0),i=t%19,h=Math.floor(t/100),s=t%100,n=Math.floor(h/4),r=Math.floor((h+8)/25),o=Math.floor((h-r+1)/3),l=Math.floor(19*i+h-n-o+15)%30,d=Math.floor(32+h%4*2+2*Math.floor(s/4)-l-s%4)%7,c=Math.floor((i+11*l+22*d)/451),[Math.ceil((Date.UTC(t,Math.floor((l+d-7*c+114)/31)-1,(l+d-7*c+114)%31+1+a)-Date.UTC(t,0,1))/864e5)]))},Object.defineProperty(t.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),t.prototype.ydayset=function(){return[s4(this.yearlen),0,this.yearlen]},t.prototype.mdayset=function(t,e){for(var a=this.mrange[e-1],i=this.mrange[e],h=s6(null,this.yearlen),s=a;s<i;s++)h[s]=s;return[h,a,i]},t.prototype.wdayset=function(t,e,a){for(var i=s6(null,this.yearlen+7),h=nc(nh(t,e,a))-this.yearordinal,s=h,n=0;n<7&&(i[h]=h,++h,this.wdaymask[h]!==this.options.wkst);n++);return[i,s,h]},t.prototype.ddayset=function(t,e,a){var i=s6(null,this.yearlen),h=nc(nh(t,e,a))-this.yearordinal;return i[h]=h,[i,h,h+1]},t.prototype.htimeset=function(t,e,a,i){var h=this,s=[];return this.options.byminute.forEach(function(e){s=s.concat(h.mtimeset(t,e,a,i))}),nb(s),s},t.prototype.mtimeset=function(t,e,a,i){var h=this.options.bysecond.map(function(a){return new nB(t,e,a,i)});return nb(h),h},t.prototype.stimeset=function(t,e,a,i){return[new nB(t,e,a,i)]},t.prototype.getdayset=function(t){switch(t){case v.YEARLY:return this.ydayset.bind(this);case v.MONTHLY:return this.mdayset.bind(this);case v.WEEKLY:return this.wdayset.bind(this);case v.DAILY:default:return this.ddayset.bind(this)}},t.prototype.gettimeset=function(t){switch(t){case v.HOURLY:return this.htimeset.bind(this);case v.MINUTELY:return this.mtimeset.bind(this);case v.SECONDLY:return this.stimeset.bind(this)}},t}();function rs(t,e){var a=e.dtstart,i=e.freq,h=e.interval,s=e.until,n=e.bysetpos,r=e.count;if(0===r||0===h)return rr(t);var o=nF.fromDate(a),l=new rh(e);l.rebuild(o.year,o.month);for(var d=function(t,e,a){var i=a.freq,h=a.byhour,s=a.byminute,n=a.bysecond;if(nR(i)){var r=a.dtstart.getTime()%1e3;if(!nR(a.freq))return[];var o=[];return a.byhour.forEach(function(t){a.byminute.forEach(function(e){a.bysecond.forEach(function(a){o.push(new nB(t,e,a,r))})})}),o}return i>=rc.HOURLY&&na(h)&&!ni(h,e.hour)||i>=rc.MINUTELY&&na(s)&&!ni(s,e.minute)||i>=rc.SECONDLY&&na(n)&&!ni(n,e.second)?[]:t.gettimeset(i)(e.hour,e.minute,e.second,e.millisecond)}(l,o,e);;){var c=l.getdayset(i)(o.year,o.month,o.day),v=c[0],p=c[1],u=c[2],_=function(t,e,a,i,h){for(var s=!1,n=e;n<a;n++){var r=t[n];(s=function(t,e,a){var i=a.bymonth,h=a.byweekno,s=a.byweekday,n=a.byeaster,r=a.bymonthday,o=a.bynmonthday,l=a.byyearday;return na(i)&&!ni(i,t.mmask[e])||na(h)&&!t.wnomask[e]||na(s)&&!ni(s,t.wdaymask[e])||na(t.nwdaymask)&&!t.nwdaymask[e]||null!==n&&!ni(t.eastermask,e)||(na(r)||na(o))&&!ni(r,t.mdaymask[e])&&!ni(o,t.nmdaymask[e])||na(l)&&(e<t.yearlen&&!ni(l,e+1)&&!ni(l,-t.yearlen+e)||e>=t.yearlen&&!ni(l,e+1-t.yearlen)&&!ni(l,-t.nextyearlen+e-t.yearlen))}(i,r,h))&&(t[r]=null)}return s}(v,p,u,l,e);if(na(n))for(var g=function(t,e,a,i,h,s){for(var n=[],r=0;r<t.length;r++){var o=void 0,l=void 0,d=t[r];d<0?(o=Math.floor(d/e.length),l=s9(d,e.length)):(o=Math.floor((d-1)/e.length),l=s9(d-1,e.length));for(var c=[],v=a;v<i;v++){var p=s[v];s1(p)&&c.push(p)}var u=void 0;u=o<0?c.slice(o)[0]:c[o];var _=e[l],g=ng(nv(h.yearordinal+u),_);ni(n,g)||n.push(g)}return nb(n),n}(n,d,p,u,l,v),m=0;m<g.length;m++){var f=g[m];if(s&&f>s)return rr(t);if(f>=a){var b=rn(f,e);if(!t.accept(b)||r&&!--r)return rr(t)}}else for(var m=p;m<u;m++){var y=v[m];if(s1(y))for(var M=nv(l.yearordinal+y),z=0;z<d.length;z++){var f=ng(M,d[z]);if(s&&f>s)return rr(t);if(f>=a){var b=rn(f,e);if(!t.accept(b)||r&&!--r)return rr(t)}}}if(0===e.interval||(o.add(e,_),o.year>9999))return rr(t);nR(i)||(d=l.gettimeset(i)(o.hour,o.minute,o.second,0)),l.rebuild(o.year,o.month)}}function rn(t,e){return new nK(t,e.tzid).rezonedDate()}function rr(t){return t.getValue()}var ro={MO:new s0(0),TU:new s0(1),WE:new s0(2),TH:new s0(3),FR:new s0(4),SA:new s0(5),SU:new s0(6)},rl={freq:v.YEARLY,dtstart:null,interval:1,wkst:ro.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},rd=Object.keys(rl),rc=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this._cache=e?null:new nZ,this.origOptions=nH(t);var a=function(t){var e=nE(nE({},rl),nH(t));if(s1(e.byeaster)&&(e.freq=rc.YEARLY),!(s1(e.freq)&&rc.FREQUENCIES[e.freq]))throw Error("Invalid frequency: ".concat(e.freq," ").concat(t.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),s1(e.wkst)?s2(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=rc.MO.weekday,s1(e.bysetpos)){s2(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var a=0;a<e.bysetpos.length;a++){var i=e.bysetpos[a];if(0===i||!(i>=-366&&i<=366))throw Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||na(e.byweekno)||na(e.byyearday)||e.bymonthday||na(e.bymonthday)||s1(e.byweekday)||s1(e.byeaster)))switch(e.freq){case rc.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case rc.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case rc.WEEKLY:e.byweekday=[nu(e.dtstart)]}if(s1(e.bymonth)&&!s5(e.bymonth)&&(e.bymonth=[e.bymonth]),s1(e.byyearday)&&!s5(e.byyearday)&&s2(e.byyearday)&&(e.byyearday=[e.byyearday]),s1(e.bymonthday))if(s5(e.bymonthday)){for(var h=[],s=[],a=0;a<e.bymonthday.length;a++){var i=e.bymonthday[a];i>0?h.push(i):i<0&&s.push(i)}e.bymonthday=h,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);else e.bymonthday=[],e.bynmonthday=[];if(s1(e.byweekno)&&!s5(e.byweekno)&&(e.byweekno=[e.byweekno]),s1(e.byweekday))if(s2(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(s3(e.byweekday))e.byweekday=[s0.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof s0)!e.byweekday.n||e.freq>rc.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var n=[],r=[],a=0;a<e.byweekday.length;a++){var o=e.byweekday[a];if(s2(o)){n.push(o);continue}if(s3(o)){n.push(s0.fromStr(o).weekday);continue}!o.n||e.freq>rc.MONTHLY?n.push(o.weekday):r.push([o.weekday,o.n])}e.byweekday=na(n)?n:null,e.bynweekday=na(r)?r:null}else e.bynweekday=null;return s1(e.byhour)?s2(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<rc.HOURLY?[e.dtstart.getUTCHours()]:null,s1(e.byminute)?s2(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<rc.MINUTELY?[e.dtstart.getUTCMinutes()]:null,s1(e.bysecond)?s2(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<rc.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}(t).parsedOptions;this.options=a}return t.parseText=function(t,e){return n$(t,e)},t.fromText=function(t,e){var a;return void 0===(a=e)&&(a=nS),new rc(n$(t,a)||void 0)},t.fromString=function(e){return new t(t.parseString(e)||void 0)},t.prototype._iter=function(t){return rs(t,this.options)},t.prototype._cacheGet=function(t,e){return!!this._cache&&this._cache._cacheGet(t,e)},t.prototype._cacheAdd=function(t,e,a){if(this._cache)return this._cache._cacheAdd(t,e,a)},t.prototype.all=function(t){if(t)return this._iter(new nI("all",{},t));var e=this._cacheGet("all");return!1===e&&(e=this._iter(new nC("all",{})),this._cacheAdd("all",e)),e},t.prototype.between=function(t,e,a,i){if(void 0===a&&(a=!1),!nd(t)||!nd(e))throw Error("Invalid date passed in to RRule.between");var h={before:e,after:t,inc:a};if(i)return this._iter(new nI("between",h,i));var s=this._cacheGet("between",h);return!1===s&&(s=this._iter(new nC("between",h)),this._cacheAdd("between",s,h)),s},t.prototype.before=function(t,e){if(void 0===e&&(e=!1),!nd(t))throw Error("Invalid date passed in to RRule.before");var a={dt:t,inc:e},i=this._cacheGet("before",a);return!1===i&&(i=this._iter(new nC("before",a)),this._cacheAdd("before",i,a)),i},t.prototype.after=function(t,e){if(void 0===e&&(e=!1),!nd(t))throw Error("Invalid date passed in to RRule.after");var a={dt:t,inc:e},i=this._cacheGet("after",a);return!1===i&&(i=this._iter(new nC("after",a)),this._cacheAdd("after",i,a)),i},t.prototype.count=function(){return this.all().length},t.prototype.toString=function(){return nG(this.origOptions)},t.prototype.toText=function(t,e,a){return new nP(this,t,e,a).toString()},t.prototype.isFullyConvertibleToText=function(){return nN(this)},t.prototype.clone=function(){return new t(this.origOptions)},t.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],t.YEARLY=v.YEARLY,t.MONTHLY=v.MONTHLY,t.WEEKLY=v.WEEKLY,t.DAILY=v.DAILY,t.HOURLY=v.HOURLY,t.MINUTELY=v.MINUTELY,t.SECONDLY=v.SECONDLY,t.MO=ro.MO,t.TU=ro.TU,t.WE=ro.WE,t.TH=ro.TH,t.FR=ro.FR,t.SA=ro.SA,t.SU=ro.SU,t.parseString=nU,t.optionsToString=nG,t}(),rv={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function rp(t,e){return void 0===e&&(e={}),function(t,e){var a,i,h,s,n,r,o,l=(a=[],i=[],h=[],s=[],r=(n=nj(t)).dtstart,o=n.tzid,(function(t,e){if(void 0===e&&(e=!1),!(t=t&&t.trim()))throw Error("Invalid empty string");if(!e)return t.split(/\s/);for(var a=t.split("\n"),i=0;i<a.length;){var h=a[i]=a[i].replace(/\s+$/g,"");h?i>0&&" "===h[0]?(a[i-1]+=h.slice(1),a.splice(i,1)):i+=1:a.splice(i,1)}return a})(t,e.unfold).forEach(function(t){if(t){var e,n=function(t){var e=function(t){if(-1===t.indexOf(":"))return{name:"RRULE",value:t};var e=s7(t,":",1);return{name:e[0],value:e[1]}}(t),a=e.name,i=e.value,h=a.split(";");if(!h)throw Error("empty property name");return{name:h[0].toUpperCase(),parms:h.slice(1),value:i}}(t),r=n.name,l=n.parms,d=n.value;switch(r.toUpperCase()){case"RRULE":if(l.length)throw Error("unsupported RRULE parm: ".concat(l.join(",")));a.push(nU(t));break;case"RDATE":var c=(null!=(e=/RDATE(?:;TZID=([^:=]+))?/i.exec(t))?e:[])[1];c&&!o&&(o=c),i=i.concat(r_(d,l));break;case"EXRULE":if(l.length)throw Error("unsupported EXRULE parm: ".concat(l.join(",")));h.push(nU(d));break;case"EXDATE":s=s.concat(r_(d,l));break;case"DTSTART":break;default:throw Error("unsupported property: "+r)}}}),{dtstart:r,tzid:o,rrulevals:a,rdatevals:i,exrulevals:h,exdatevals:s}),d=l.rrulevals,c=l.rdatevals,v=l.exrulevals,p=l.exdatevals,u=l.dtstart,_=l.tzid,g=!1===e.cache;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||d.length>1||c.length||v.length||p.length){var m=new rm(g);return m.dtstart(u),m.tzid(_||void 0),d.forEach(function(t){m.rrule(new rc(ru(t,u,_),g))}),c.forEach(function(t){m.rdate(t)}),v.forEach(function(t){m.exrule(new rc(ru(t,u,_),g))}),p.forEach(function(t){m.exdate(t)}),e.compatible&&e.dtstart&&m.rdate(u),m}var f=d[0]||{};return new rc(ru(f,f.dtstart||e.dtstart||u,f.tzid||e.tzid||_),g)}(t,function(t){var e=[],a=Object.keys(t),i=Object.keys(rv);if(a.forEach(function(t){ni(i,t)||e.push(t)}),e.length)throw Error("Invalid options: "+e.join(", "));return nE(nE({},rv),t)}(e))}function ru(t,e,a){return nE(nE({},t),{dtstart:e,tzid:a})}function r_(t,e){return e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw Error("unsupported RDATE/EXDATE parm: "+t)}),t.split(",").map(function(t){return nM(t)})}function rg(t){var e=this;return function(a){if(void 0!==a&&(e["_".concat(t)]=a),void 0!==e["_".concat(t)])return e["_".concat(t)];for(var i=0;i<e._rrule.length;i++){var h=e._rrule[i].origOptions[t];if(h)return h}}}var rm=function(t){function e(e){void 0===e&&(e=!1);var a=t.call(this,{},e)||this;return a.dtstart=rg.apply(a,["dtstart"]),a.tzid=rg.apply(a,["tzid"]),a._rrule=[],a._rdate=[],a._exrule=[],a._exdate=[],a}return nk(e,t),e.prototype._iter=function(t){return function(t,e,a,i,h,s){var n={},r=t.accept;function o(t,e){a.forEach(function(a){a.between(t,e,!0).forEach(function(t){n[Number(t)]=!0})})}h.forEach(function(t){n[Number(new nK(t,s).rezonedDate())]=!0}),t.accept=function(t){var e=Number(t);return isNaN(e)?r.call(this,t):!!n[e]||(o(new Date(e-1),new Date(e+1)),!!n[e])||(n[e]=!0,r.call(this,t))},"between"===t.method&&(o(t.args.after,t.args.before),t.accept=function(t){var e=Number(t);return!!n[e]||(n[e]=!0,r.call(this,t))});for(var l=0;l<i.length;l++){var d=new nK(i[l],s).rezonedDate();if(!t.accept(new Date(d.getTime())))break}e.forEach(function(e){rs(t,e.options)});var c=t._result;switch(nb(c),t.method){case"all":case"between":return c;case"before":return c.length&&c[c.length-1]||null;default:return c.length&&c[0]||null}}(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){rf(t,this._rrule)},e.prototype.exrule=function(t){rf(t,this._exrule)},e.prototype.rdate=function(t){rb(t,this._rdate)},e.prototype.exdate=function(t){rb(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return rp(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return rp(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(nG({dtstart:this._dtstart}))),this._rrule.forEach(function(e){t=t.concat(e.toString().split("\n"))}),this._exrule.forEach(function(e){t=t.concat(e.toString().split("\n").map(function(t){return t.replace(/^RRULE:/,"EXRULE:")}).filter(function(t){return!/^DTSTART/.test(t)}))}),this._rdate.length&&t.push(ry("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(ry("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join("\n")},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(e){return t.rrule(e.clone())}),this._exrule.forEach(function(e){return t.exrule(e.clone())}),this._rdate.forEach(function(e){return t.rdate(new Date(e.getTime()))}),this._exdate.forEach(function(e){return t.exdate(new Date(e.getTime()))}),t},e}(rc);function rf(t,e){if(!(t instanceof rc))throw TypeError(String(t)+" is not RRule instance");ni(e.map(String),String(t))||e.push(t)}function rb(t,e){if(!(t instanceof Date))throw TypeError(String(t)+" is not Date instance");ni(e.map(Number),Number(t))||(e.push(t),nb(e))}function ry(t,e,a){var i=!a||"UTC"===a.toUpperCase(),h=i?"".concat(t,":"):"".concat(t,";TZID=").concat(a,":"),s=e.map(function(t){return ny(t.valueOf(),i)}).join(",");return"".concat(h).concat(s)}let rM={YEARLY:"rrule.frequency.YEARLY",MONTHLY:"rrule.frequency.MONTHLY",WEEKLY:"rrule.frequency.WEEKLY",DAILY:"rrule.frequency.DAILY",HOURLY:"rrule.frequency.HOURLY",MINUTELY:"rrule.frequency.MINUTELY",SECONDLY:"rrule.frequency.SECONDLY"},rz=["bymonth","byweekno","byyearday","bymonthday","byweekday","byhour","byminute","bysecond"],rw={SECONDLY:["byweekno"],MINUTELY:["byweekno"],HOURLY:["byweekno"],DAILY:["byweekno","byyearday"],WEEKLY:["byweekno","byyearday","bymonthday"],MONTHLY:["byweekno","byyearday"],YEARLY:[]},rC=["bymonth","byweekno","byyearday","byhour","byminute","bysecond"],rx={SECONDLY:["bymonthday","byweekday",...rC,...rw.SECONDLY],MINUTELY:["bymonthday","byweekday",...rC,...rw.MINUTELY],HOURLY:["bymonthday","byweekday",...rC,...rw.HOURLY],DAILY:["bymonthday","byweekday",...rC,...rw.DAILY],WEEKLY:["bymonthday",...rC,...rw.WEEKLY],MONTHLY:["byweekday",...rC,...rw.MONTHLY],YEARLY:["bymonthday","byweekday",...rC,...rw.YEARLY]},rk={MO:"monday",TU:"tuesday",WE:"wednesday",TH:"thursday",FR:"friday",SA:"saturday",SU:"sunday"},rE={1:"january",2:"february",3:"march",4:"april",5:"may",6:"june",7:"july",8:"august",9:"september",10:"october",11:"november",12:"december"};(d=p||(p={})).default="default",d.period="period",d.recurrence="recurrence";let rT={never:"never",until:"schedule.ends.until",count:"schedule.ends.count"};var rI=n(416),rS=n.n(rI),rD=function(t,e,a,i){var h,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var r=t.length-1;r>=0;r--)(h=t[r])&&(n=(s<3?h(n):s>3?h(e,a,n):h(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n};function rA(t,e){return Array.from({length:e-t+1},(e,a)=>t+a)}let rO=rA(-53,53).filter(Boolean),rP=rA(-366,366).filter(Boolean),rL=rA(-31,31).filter(Boolean),r$=rA(1,24),rR=rA(1,60);class rV extends CustomEvent{constructor(t){super(rV.NAME,{detail:{value:t},bubbles:!0,composed:!0})}}rV.NAME="or-scheduler-changed";class rN extends CustomEvent{constructor(){super(rN.NAME,{bubbles:!0,composed:!0})}}rN.NAME="or-scheduler-removed";let rB=class extends(0,u.translate)(u.i18next)(tI){constructor(){super(...arguments),this.defaultEventTypeLabel="default",this.disableNegativeByPartValues=!1,this.disabledFrequencies=[],this.disabledRRuleParts=[],this.disabledByPartCombinations=rw,this.header="scheduleActivity",this.isAllDay=!0,this.open=!1,this.removable=!1,this.schedule=this.defaultSchedule,this.timezoneOffset=0,this._count=1,this._ends="never",this._eventType=p.default,this._until=rS()().toDate()}get _scheduleWithOffset(){return this._applyTimezoneOffset(this.schedule,this.timezoneOffset)}set _scheduleWithOffset(t){this.schedule=this._applyTimezoneOffset(t,-this.timezoneOffset)}get _timeLabel(){if(this._eventType===p.default)return tl`<or-translate value="${this.defaultEventTypeLabel}" .options="${this._getDefaultMessageOptions()}"></or-translate>`;if(this._scheduleWithOffset){let t=this._scheduleWithOffset;if(t.recurrence){let e=rS()(t.end).diff(t.start,"days"),a={start:rS()(t.start).format("HH:mm"),end:rS()(t.end).format("HH:mm")},i=tl``;this.isAllDay&&e>0?i=tl`<or-translate value="forDays" .options="${{days:e,count:e}}"></or-translate>`:e>0?i=tl`<or-translate value="fromToDays" .options="${Object.assign(Object.assign({},a),{days:e,count:e})}"></or-translate>`:0===e&&(i=tl`<or-translate value="fromTo" .options="${a}"></or-translate>`);let h=tl`<span>&nbsp;${i}</span>`,s=Object.values(rE).map(u.i18next.t),n=Object.values(rk).map(u.i18next.t),r=[n.pop(),...n],o=this._rrule.toText(t=>u.i18next.t(`rrule.${t}`),{dayNames:r,monthNames:s,tokens:{}});return tl`<span class="time-label"><span>${o}</span>${h}</span>`}let e=this.isAllDay?"DD-MM-YYYY":"DD-MM-YYYY HH:mm";return tl`<or-translate value="activeFromTo" .options="${{start:rS()(t.start).format(e),end:rS()(t.end).format(e)}}"></or-translate>`}}connectedCallback(){var t,e,a;super.connectedCallback();let i=this._applyTimezoneOffset(null!=(t=this.schedule)?t:this.defaultSchedule,this.timezoneOffset);if((null==i?void 0:i.start)&&(null==i?void 0:i.start)){let t=rS()(null==i?void 0:i.start),e=rS()(null==i?void 0:i.end);this.isAllDay=t.isSame(t.clone().startOf("day"))&&e.isSame(e.clone().endOf("day"))}if(null==(e=this.schedule)?void 0:e.recurrence){let t=rc.fromString(this.schedule.recurrence).origOptions;t.until?this._until=rS()(t.until).toDate():t.count&&(this._count=t.count)}!this.schedule||sQ.Util.objectsEqual(this.schedule,this.defaultSchedule)?this._eventType=p.default:this._eventType=(null==(a=this.schedule)?void 0:a.recurrence)?p.recurrence:p.period}shouldUpdate(t){var e,a,i,h,s,n,r;return this.schedule&&!this.schedule.end&&(null==(e=this.defaultSchedule)?void 0:e.end)&&(this.schedule=Object.assign(Object.assign({},this.schedule),{end:this.defaultSchedule.end})),t.has("schedule")&&((null==(a=this._scheduleWithOffset)?void 0:a.recurrence)?this._rrule=rc.fromString(this._scheduleWithOffset.recurrence):this._eventType===p.default&&(null==(i=this.defaultSchedule)?void 0:i.recurrence)&&(this._rrule=rc.fromString(this.defaultSchedule.recurrence))),t.has("_rrule")&&this._rrule&&(this._byRRuleParts=rz.filter(t=>{var e;return!(null==(e=this.disabledByPartCombinations[v[this._rrule.options.freq]])?void 0:e.includes(t))}).filter(t=>!this.disabledRRuleParts.includes(t)),this._ends=(null==(s=null==(h=this._rrule)?void 0:h.origOptions)?void 0:s.until)&&"until"||(null==(r=null==(n=this._rrule)?void 0:n.origOptions)?void 0:r.count)&&"count"||"never"),super.shouldUpdate(t)}_setAllDay(){let t=this._scheduleWithOffset;if(this.isAllDay&&this._eventType!==p.default){let e=rS()(null==t?void 0:t.start).startOf("day").valueOf(),a=rS()(null==t?void 0:t.end).endOf("day").valueOf();this._scheduleWithOffset=Object.assign(Object.assign({},t),{start:e,end:a})}}_getRRule(t=this._rrule){var e,a,i;return null==(i=null==(a=null==(e=null==t?void 0:t.toString())?void 0:e.split("RRULE:"))?void 0:a[1])?void 0:i.replace(/(UNTIL=\d+T\d+)Z/,"$1")}_setRRuleValue(t,e){var a;let i=null==(a=this._rrule)?void 0:a.origOptions,h=this._scheduleWithOffset;if("interval"===e||"freq"===e||e.startsWith("by"))if("byweekday"===e)i.byweekday=t.map(t=>rc[t]);else if("freq"===e){for(let t of rz)delete i[t];i[e]=t}else i[e]=t;else if("start"===e&&i){let[e,a,s]=t.split("-").map(Number);i.dtstart=rS()(h.start).set({year:e,month:a-1,date:s}).toDate(),h.start=i.dtstart.getTime()}else if("end"===e){let[e,a,i]=t.split("-").map(Number);h.end=rS()(h.end).set({year:e,month:a-1,date:i}).toDate().getTime()}else if("start-time"===e){let[e,a]=t.split(":");i?i.dtstart=rS()(h.start).set({hour:e,minute:a,second:0,millisecond:0}).toDate():i=new rc({dtstart:rS()(h.start).set({hour:e,minute:a,second:0,millisecond:0}).toDate()}).origOptions,h.start=rS()(i.dtstart).toDate().getTime()}else if("end-time"===e){let[e,a]=t.split(":");h.end=rS()(h.end).set({hour:e,minute:a,second:0,millisecond:0}).toDate().getTime()}else switch(e){case"all-day":this.isAllDay=t;break;case"recurrence-ends":"until"===t?(i.until=this._until,delete i.count):("count"===t?i.count=this._count:delete i.count,delete i.until),this._ends=t;break;case"until":this._until=new Date(t),i.until=this._until;break;case"count":this._count=t,i.count=this._count}this._eventType===p.recurrence?(this._rrule=new rc(i),this._scheduleWithOffset=Object.assign(Object.assign({},h),{recurrence:this._getRRule()})):this._scheduleWithOffset=Object.assign({},h)}_setCalendarEventType(t){var e,a,i,h,s,n,r,o,l,d;let c=t.target.value;this._eventType=c;let v=rS()().startOf("day");if(c===p.default){this.schedule={start:null!=(a=null==(e=this.defaultSchedule)?void 0:e.start)?a:v.valueOf()-this.timezoneOffset,end:null!=(h=null==(i=this.defaultSchedule)?void 0:i.end)?h:v.endOf("day").valueOf()-this.timezoneOffset};let t=null==(s=this.defaultSchedule)?void 0:s.recurrence;this._rrule=t?rc.fromString(t):void 0;return}let u={start:null!=(r=null==(n=this._scheduleWithOffset)?void 0:n.start)?r:v.valueOf(),end:null!=(l=null==(o=this._scheduleWithOffset)?void 0:o.end)?l:v.endOf("day").valueOf()};c===p.period?this._scheduleWithOffset=u:this._scheduleWithOffset=Object.assign(Object.assign({},u),{recurrence:null!=(d=this._getRRule())?d:"FREQ=DAILY"})}_applyTimezoneOffset(t,e){if(t){let{start:a,end:i,recurrence:h}=Object.assign({},t);if(h&&rc.fromString(h).origOptions.until){let t=rc.fromString(h).origOptions;t.until=new Date(Number(t.until)+e),h=this._getRRule(new rc(t))}return{start:null!=a?a+e:a,end:null!=i?i+e:i,recurrence:h}}}_getDefaultMessageOptions(){var t,e;return{date:rS().utc(null==(t=this.defaultSchedule)?void 0:t.start).format("YYYY-MM-DD"),time:rS().utc(null==(e=this.defaultSchedule)?void 0:e.start).format("HH:mm")}}render(){return tl`
3488
+ `}}tA(sK);let sG=class extends sK{};sG=function(t,e,a,i){var h,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var r=t.length-1;r>=0;r--)(h=t[r])&&(n=(s<3?h(n):s>3?h(e,a,n):h(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n}([_("or-vaadin-multi-select-combo-box")],sG);let sZ=class extends hn{};function sX(t,e,a){return t?e(t):a?.(t)}sZ=function(t,e,a,i){var h,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var r=t.length-1;r>=0;r--)(h=t[r])&&(n=(s<3?h(n):s>3?h(e,a,n):h(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n}([_("or-vaadin-time-picker")],sZ);var sQ=n(954);(o=c||(c={})).BUTTON="button",o.BUTTON_TOGGLE="button-toggle",o.BUTTON_MOMENTARY="button-momentary",o.CHECKBOX="checkbox",o.CHECKBOX_LIST="checkbox-list",o.COLOUR="color",o.DATE="date",o.DATETIME="datetime-local",o.EMAIL="email",o.JSON="json",o.JSON_OBJECT="json-object",o.MONTH="month",o.NUMBER="number",o.BIG_INT="big-int",o.PASSWORD="password",o.RADIO="radio",o.SWITCH="switch",o.RANGE="range",o.TELEPHONE="tel",o.TEXT="text",o.TEXTAREA="textarea",o.TIME="time",o.URL="url",o.WEEK="week",o.SELECT="select",o.LIST="list",o.CRON="cron",o.DURATION="duration",o.DURATION_TIME="duration-time",o.DURATION_PERIOD="duration-period";var sJ=["MO","TU","WE","TH","FR","SA","SU"],s0=function(){function t(t,e){if(0===e)throw Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return t.fromStr=function(e){return new t(sJ.indexOf(e))},t.prototype.nth=function(e){return this.n===e?this:new t(this.weekday,e)},t.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},t.prototype.toString=function(){var t=sJ[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},t.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},t}(),s1=function(t){return null!=t},s2=function(t){return"number"==typeof t},s3=function(t){return"string"==typeof t&&sJ.includes(t)},s5=Array.isArray,s4=function(t,e){void 0===e&&(e=t),1==arguments.length&&(e=t,t=0);for(var a=[],i=t;i<e;i++)a.push(i);return a},s6=function(t,e){var a=0,i=[];if(s5(t))for(;a<e;a++)i[a]=[].concat(t);else for(;a<e;a++)i[a]=t;return i};function s8(t,e,a){void 0===a&&(a=" ");var i=String(t);return(e|=0,i.length>e)?String(i):((e-=i.length)>a.length&&(a+=s6(a,e/a.length)),a.slice(0,e)+String(i))}var s7=function(t,e,a){var i=t.split(e);return a?i.slice(0,a).concat([i.slice(a).join(e)]):i},s9=function(t,e){var a=t%e;return a*e<0?a+e:a},nt=function(t,e){return{div:Math.floor(t/e),mod:s9(t,e)}},ne=function(t){return!s1(t)||0===t.length},na=function(t){return!ne(t)},ni=function(t,e){return na(t)&&-1!==t.indexOf(e)},nh=function(t,e,a,i,h,s){return void 0===i&&(i=0),void 0===h&&(h=0),void 0===s&&(s=0),new Date(Date.UTC(t,e-1,a,i,h,s))},ns=[31,28,31,30,31,30,31,31,30,31,30,31],nn=nh(1970,1,1),nr=[6,0,1,2,3,4,5],no=function(t){return t%4==0&&t%100!=0||t%400==0},nl=function(t){return t instanceof Date},nd=function(t){return nl(t)&&!isNaN(t.getTime())},nc=function(t){var e,a;return e=t,a=nn,Math.round((e.getTime()-a.getTime())/864e5)},nv=function(t){return new Date(nn.getTime()+864e5*t)},np=function(t){var e=t.getUTCMonth();return 1===e&&no(t.getUTCFullYear())?29:ns[e]},nu=function(t){return nr[t.getUTCDay()]},n_=function(t,e){var a=nh(t,e+1,1);return[nu(a),np(a)]},ng=function(t,e){return e=e||t,new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},nm=function(t){return new Date(t.getTime())},nf=function(t){for(var e=[],a=0;a<t.length;a++)e.push(nm(t[a]));return e},nb=function(t){t.sort(function(t,e){return t.getTime()-e.getTime()})},ny=function(t,e){void 0===e&&(e=!0);var a=new Date(t);return[s8(a.getUTCFullYear().toString(),4,"0"),s8(a.getUTCMonth()+1,2,"0"),s8(a.getUTCDate(),2,"0"),"T",s8(a.getUTCHours(),2,"0"),s8(a.getUTCMinutes(),2,"0"),s8(a.getUTCSeconds(),2,"0"),e?"Z":""].join("")},nM=function(t){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(t);if(!e)throw Error("Invalid UNTIL value: ".concat(t));return new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10),parseInt(e[5],10)||0,parseInt(e[6],10)||0,parseInt(e[7],10)||0))},nz=function(t,e){return t.toLocaleString("sv-SE",{timeZone:e}).replace(" ","T")+"Z"},nw=function(t,e){var a=new Date(nz(t,Intl.DateTimeFormat().resolvedOptions().timeZone)),i=new Date(nz(t,null!=e?e:"UTC")).getTime()-a.getTime();return new Date(t.getTime()-i)},nC=function(){function t(t,e){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=e,"between"===t?(this.maxDate=e.inc?e.before:new Date(e.before.getTime()-1),this.minDate=e.inc?e.after:new Date(e.after.getTime()+1)):"before"===t?this.maxDate=e.inc?e.dt:new Date(e.dt.getTime()-1):"after"===t&&(this.minDate=e.inc?e.dt:new Date(e.dt.getTime()+1))}return t.prototype.accept=function(t){++this.total;var e=this.minDate&&t<this.minDate,a=this.maxDate&&t>this.maxDate;if("between"===this.method){if(e)return!0;if(a)return!1}else if("before"===this.method){if(a)return!1}else if("after"===this.method)return!!e||(this.add(t),!1);return this.add(t)},t.prototype.add=function(t){return this._result.push(t),!0},t.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;default:return t.length?t[t.length-1]:null}},t.prototype.clone=function(){return new t(this.method,this.args)},t}(),nx=function(t,e){return(nx=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(t,e)};function nk(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function a(){this.constructor=t}nx(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var nE=function(){return(nE=Object.assign||function(t){for(var e,a=1,i=arguments.length;a<i;a++)for(var h in e=arguments[a])Object.prototype.hasOwnProperty.call(e,h)&&(t[h]=e[h]);return t}).apply(this,arguments)};function nT(t,e,a){if(a||2==arguments.length)for(var i,h=0,s=e.length;h<s;h++)!i&&h in e||(i||(i=Array.prototype.slice.call(e,0,h)),i[h]=e[h]);return t.concat(i||Array.prototype.slice.call(e))}var nI=function(t){function e(e,a,i){var h=t.call(this,e,a)||this;return h.iterator=i,h}return nk(e,t),e.prototype.add=function(t){return!!this.iterator(t,this._result.length)&&(this._result.push(t),!0)},e}(nC);let nS={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var nD=function(t,e){return -1!==t.indexOf(e)},nA=function(t){return t.toString()},nO=function(t,e,a){return"".concat(e," ").concat(a,", ").concat(t)},nP=function(){function t(t,e,a,i){if(void 0===e&&(e=nA),void 0===a&&(a=nS),void 0===i&&(i=nO),this.text=[],this.language=a||nS,this.gettext=e,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var h=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);h.sort(function(t,e){return t-e}),s.sort(function(t,e){return e-t}),this.bymonthday=h.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(s1(this.origOptions.byweekday)){var n=s5(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],r=String(n);this.byweekday={allWeeks:n.filter(function(t){return!t.n}),someWeeks:n.filter(function(t){return!!t.n}),isWeekdays:-1!==r.indexOf("MO")&&-1!==r.indexOf("TU")&&-1!==r.indexOf("WE")&&-1!==r.indexOf("TH")&&-1!==r.indexOf("FR")&&-1===r.indexOf("SA")&&-1===r.indexOf("SU"),isEveryDay:-1!==r.indexOf("MO")&&-1!==r.indexOf("TU")&&-1!==r.indexOf("WE")&&-1!==r.indexOf("TH")&&-1!==r.indexOf("FR")&&-1!==r.indexOf("SA")&&-1!==r.indexOf("SU")};var o=function(t,e){return t.weekday-e.weekday};this.byweekday.allWeeks.sort(o),this.byweekday.someWeeks.sort(o),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return t.isFullyConvertible=function(e){if(!(e.options.freq in t.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var a in e.origOptions){if(nD(["dtstart","tzid","wkst","freq"],a))break;if(!nD(t.IMPLEMENTED[e.options.freq],a))return!1}return!0},t.prototype.isFullyConvertible=function(){return t.isFullyConvertible(this.rrule)},t.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in t.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[rc.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var a=this.options.until;this.add(this.dateFormatter(a.getUTCFullYear(),this.language.monthNames[a.getUTCMonth()],a.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(e(this.plural(this.options.count)?"times":"time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},t.prototype.HOURLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"hours":"hour"))},t.prototype.MINUTELY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"minutes":"minute"))},t.prototype.DAILY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(t(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(t(this.plural(this.options.interval)?"days":"day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},t.prototype.WEEKLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(t(this.plural(this.options.interval)?"weeks":"week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(t(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(t(this.plural(this.options.interval)?"days":"day")):(1===this.options.interval&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},t.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"months":"month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},t.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(t(this.plural(this.options.interval)?"years":"year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(t(this.plural(this.options.byweekno.length)?"weeks":"week")).add(this.list(this.options.byweekno,void 0,t("and")))},t.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},t.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},t.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},t.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},t.prototype.nth=function(t){t=parseInt(t.toString(),10);var e,a=this.gettext;if(-1===t)return a("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:e=i+a("st");break;case 2:case 22:e=i+a("nd");break;case 3:case 23:e=i+a("rd");break;default:e=i+a("th")}return t<0?e+" "+a("last"):e},t.prototype.monthtext=function(t){return this.language.monthNames[t-1]},t.prototype.weekdaytext=function(t){var e=s2(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},t.prototype.plural=function(t){return t%100!=1},t.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},t.prototype.list=function(t,e,a,i){var h=this;void 0===i&&(i=","),s5(t)||(t=[t]),e=e||function(t){return t.toString()};var s=function(t){return e&&e.call(h,t)};if(!a)return t.map(s).join(i+" ");for(var n=t.map(s),r=i,o="",l=0;l<n.length;l++)0!==l&&(l===n.length-1?o+=" "+a+" ":o+=r+" "),o+=n[l];return o},t}(),nL=function(){function t(t){this.done=!0,this.rules=t}return t.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},t.prototype.isDone=function(){return this.done&&null===this.symbol},t.prototype.nextSymbol=function(){this.symbol=null,this.value=null;do{if(this.done)return!1;for(var t in e=null,this.rules){var e,a,i=this.rules[t].exec(this.text);i&&(null===e||i[0].length>e[0].length)&&(e=i,a=t)}if(null!=e&&(this.text=this.text.substr(e[0].length),""===this.text&&(this.done=!0)),null==e){this.done=!0,this.symbol=null,this.value=null;return}}while("SKIP"===a);return this.symbol=a,this.value=e,!0},t.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},t.prototype.acceptNumber=function(){return this.accept("number")},t.prototype.expect=function(t){if(this.accept(t))return!0;throw Error("expected "+t+" but found "+this.symbol)},t}();function n$(t,e){void 0===e&&(e=nS);var a={},i=new nL(e.tokens);if(!i.start(t))return null;return function(){i.expect("every");var t=i.acceptNumber();if(t&&(a.interval=parseInt(t[0],10)),i.isDone())throw Error("Unexpected end");switch(i.symbol){case"day(s)":a.freq=rc.DAILY,i.nextSymbol()&&(s(),l());break;case"weekday(s)":a.freq=rc.WEEKLY,a.byweekday=[rc.MO,rc.TU,rc.WE,rc.TH,rc.FR],i.nextSymbol(),s(),l();break;case"week(s)":a.freq=rc.WEEKLY,i.nextSymbol()&&(h(),s(),l());break;case"hour(s)":a.freq=rc.HOURLY,i.nextSymbol()&&(h(),l());break;case"minute(s)":a.freq=rc.MINUTELY,i.nextSymbol()&&(h(),l());break;case"month(s)":a.freq=rc.MONTHLY,i.nextSymbol()&&(h(),l());break;case"year(s)":a.freq=rc.YEARLY,i.nextSymbol()&&(h(),l());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":if(a.freq=rc.WEEKLY,a.byweekday=[rc[i.symbol.substr(0,2).toUpperCase()]],!i.nextSymbol())return;for(;i.accept("comma");){if(i.isDone())throw Error("Unexpected end");var e=r();if(!e)throw Error("Unexpected symbol "+i.symbol+", expected weekday");a.byweekday.push(rc[e]),i.nextSymbol()}s(),function(){i.accept("on"),i.accept("the");var t=o();if(t)for(a.bymonthday=[t],i.nextSymbol();i.accept("comma");){if(!(t=o()))throw Error("Unexpected symbol "+i.symbol+"; expected monthday");a.bymonthday.push(t),i.nextSymbol()}}(),l();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(a.freq=rc.YEARLY,a.bymonth=[n()],!i.nextSymbol())return;for(;i.accept("comma");){if(i.isDone())throw Error("Unexpected end");var d=n();if(!d)throw Error("Unexpected symbol "+i.symbol+", expected month");a.bymonth.push(d),i.nextSymbol()}h(),l();break;default:throw Error("Unknown symbol")}}(),a;function h(){var t=i.accept("on"),e=i.accept("the");if(t||e)do{var h=o(),s=r(),l=n();if(h)s?(i.nextSymbol(),a.byweekday||(a.byweekday=[]),a.byweekday.push(rc[s].nth(h))):(a.bymonthday||(a.bymonthday=[]),a.bymonthday.push(h),i.accept("day(s)"));else if(s)i.nextSymbol(),a.byweekday||(a.byweekday=[]),a.byweekday.push(rc[s]);else if("weekday(s)"===i.symbol)i.nextSymbol(),a.byweekday||(a.byweekday=[rc.MO,rc.TU,rc.WE,rc.TH,rc.FR]);else if("week(s)"===i.symbol){i.nextSymbol();var d=i.acceptNumber();if(!d)throw Error("Unexpected symbol "+i.symbol+", expected week number");for(a.byweekno=[parseInt(d[0],10)];i.accept("comma");){if(!(d=i.acceptNumber()))throw Error("Unexpected symbol "+i.symbol+"; expected monthday");a.byweekno.push(parseInt(d[0],10))}}else{if(!l)return;i.nextSymbol(),a.bymonth||(a.bymonth=[]),a.bymonth.push(l)}}while(i.accept("comma")||i.accept("the")||i.accept("on"))}function s(){if(i.accept("at"))do{var t=i.acceptNumber();if(!t)throw Error("Unexpected symbol "+i.symbol+", expected hour");for(a.byhour=[parseInt(t[0],10)];i.accept("comma");){if(!(t=i.acceptNumber()))throw Error("Unexpected symbol "+i.symbol+"; expected hour");a.byhour.push(parseInt(t[0],10))}}while(i.accept("comma")||i.accept("at"))}function n(){switch(i.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function r(){switch(i.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return i.symbol.substr(0,2).toUpperCase();default:return!1}}function o(){switch(i.symbol){case"last":return i.nextSymbol(),-1;case"first":return i.nextSymbol(),1;case"second":return i.nextSymbol(),i.accept("last")?-2:2;case"third":return i.nextSymbol(),i.accept("last")?-3:3;case"nth":var t=parseInt(i.value[1],10);if(t<-366||t>366)throw Error("Nth out of range: "+t);return i.nextSymbol(),i.accept("last")?-t:t;default:return!1}}function l(){if("until"===i.symbol){var t=Date.parse(i.text);if(!t)throw Error("Cannot parse until date:"+i.text);a.until=new Date(t)}else i.accept("for")&&(a.count=parseInt(i.value[0],10),i.expect("number"))}}function nR(t){return t<v.HOURLY}(l=v||(v={}))[l.YEARLY=0]="YEARLY",l[l.MONTHLY=1]="MONTHLY",l[l.WEEKLY=2]="WEEKLY",l[l.DAILY=3]="DAILY",l[l.HOURLY=4]="HOURLY",l[l.MINUTELY=5]="MINUTELY",l[l.SECONDLY=6]="SECONDLY";var nV=["count","until","interval","byweekday","bymonthday","bymonth"];nP.IMPLEMENTED=[],nP.IMPLEMENTED[v.HOURLY]=nV,nP.IMPLEMENTED[v.MINUTELY]=nV,nP.IMPLEMENTED[v.DAILY]=["byhour"].concat(nV),nP.IMPLEMENTED[v.WEEKLY]=nV,nP.IMPLEMENTED[v.MONTHLY]=nV,nP.IMPLEMENTED[v.YEARLY]=["byweekno","byyearday"].concat(nV);var nN=nP.isFullyConvertible,nB=function(){function t(t,e,a,i){this.hour=t,this.minute=e,this.second=a,this.millisecond=i||0}return t.prototype.getHours=function(){return this.hour},t.prototype.getMinutes=function(){return this.minute},t.prototype.getSeconds=function(){return this.second},t.prototype.getMilliseconds=function(){return this.millisecond},t.prototype.getTime=function(){return(60*this.hour*60+60*this.minute+this.second)*1e3+this.millisecond},t}(),nF=function(t){function e(e,a,i,h,s,n,r){var o=t.call(this,h,s,n,r)||this;return o.year=e,o.month=a,o.day=i,o}return nk(e,t),e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return nu(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var e=Math.floor(this.month/12),a=s9(this.month,12);this.month=a,this.year+=e,0===this.month&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,e){e>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-e))+7*t:this.day+=-(this.getWeekday()-e)+7*t,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,e,a){for(e&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var i=nt(this.hour,24),h=i.div,s=i.mod;if(h&&(this.hour=s,this.addDaily(h)),ne(a)||ni(a,this.hour))break}},e.prototype.addMinutes=function(t,e,a,i){for(e&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var h=nt(this.minute,60),s=h.div,n=h.mod;if(s&&(this.minute=n,this.addHours(s,!1,a)),(ne(a)||ni(a,this.hour))&&(ne(i)||ni(i,this.minute)))break}},e.prototype.addSeconds=function(t,e,a,i,h){for(e&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var s=nt(this.second,60),n=s.div,r=s.mod;if(n&&(this.second=r,this.addMinutes(n,!1,a,i)),(ne(a)||ni(a,this.hour))&&(ne(i)||ni(i,this.minute))&&(ne(h)||ni(h,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=n_(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;t=n_(this.year,this.month-1)[1]}}},e.prototype.add=function(t,e){var a=t.freq,i=t.interval,h=t.wkst,s=t.byhour,n=t.byminute,r=t.bysecond;switch(a){case v.YEARLY:return this.addYears(i);case v.MONTHLY:return this.addMonths(i);case v.WEEKLY:return this.addWeekly(i,h);case v.DAILY:return this.addDaily(i);case v.HOURLY:return this.addHours(i,e,s);case v.MINUTELY:return this.addMinutes(i,e,s,n);case v.SECONDLY:return this.addSeconds(i,e,s,n,r)}},e}(nB);function nH(t){for(var e=[],a=Object.keys(t),i=0;i<a.length;i++){var h=a[i];ni(rd,h)||e.push(h),nl(t[h])&&!nd(t[h])&&e.push(h)}if(e.length)throw Error("Invalid options: "+e.join(", "));return nE({},t)}function nU(t){var e=t.split("\n").map(nY).filter(function(t){return null!==t});return nE(nE({},e[0]),e[1])}function nj(t){var e={},a=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(t);if(!a)return e;var i=a[1],h=a[2];return i&&(e.tzid=i),e.dtstart=nM(h),e}function nY(t){if(!(t=t.replace(/^\s+|\s+$/,"")).length)return null;var e=/^([A-Z]+?)[:;]/.exec(t.toUpperCase());if(!e)return nq(t);var a=e[1];switch(a.toUpperCase()){case"RRULE":case"EXRULE":return nq(t);case"DTSTART":return nj(t);default:throw Error("Unsupported RFC prop ".concat(a," in ").concat(t))}}function nq(t){var e=nj(t.replace(/^RRULE:/i,""));return t.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach(function(a){var i=a.split("="),h=i[0],s=i[1];switch(h.toUpperCase()){case"FREQ":e.freq=v[s.toUpperCase()];break;case"WKST":e.wkst=ro[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var n,r=-1!==(n=s).indexOf(",")?n.split(",").map(nW):nW(n);e[h.toLowerCase()]=r;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=s.split(",").map(function(t){if(2===t.length)return ro[t];var e=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!e||e.length<3)throw SyntaxError("Invalid weekday string: ".concat(t));var a=Number(e[1]);return new s0(ro[e[2]].weekday,a)});break;case"DTSTART":case"TZID":var o=nj(t);e.tzid=o.tzid,e.dtstart=o.dtstart;break;case"UNTIL":e.until=nM(s);break;case"BYEASTER":e.byeaster=Number(s);break;default:throw Error("Unknown RRULE property '"+h+"'")}}),e}function nW(t){return/^[+-]?\d+$/.test(t)?Number(t):t}var nK=function(){function t(t,e){if(isNaN(t.getTime()))throw RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(t.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var t=ny(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},t.prototype.getTime=function(){return this.date.getTime()},t.prototype.rezonedDate=function(){return this.isUTC?this.date:nw(this.date,this.tzid)},t}();function nG(t){for(var e=[],a="",i=Object.keys(t),h=Object.keys(rl),s=0;s<i.length;s++)if("tzid"!==i[s]&&ni(h,i[s])){var n,r,o=i[s].toUpperCase(),l=t[i[s]],d="";if(!(!s1(l)||s5(l)&&!l.length)){switch(o){case"FREQ":d=rc.FREQUENCIES[t.freq];break;case"WKST":d=s2(l)?new s0(l).toString():l.toString();break;case"BYWEEKDAY":o="BYDAY",d=(s5(l)?l:[l]).map(function(t){return t instanceof s0?t:s5(t)?new s0(t[0],t[1]):new s0(t)}).toString();break;case"DTSTART":n=l,r=t.tzid,a=n?"DTSTART"+new nK(new Date(n),r).toString():"";break;case"UNTIL":d=ny(l,!t.tzid);break;default:if(s5(l)){for(var c=[],v=0;v<l.length;v++)c[v]=String(l[v]);d=c.toString()}else d=String(l)}d&&e.push([o,d])}}var p=e.map(function(t){var e=t[0],a=t[1];return"".concat(e,"=").concat(a.toString())}).join(";"),u="";return""!==p&&(u="RRULE:".concat(p)),[a,u].filter(function(t){return!!t}).join("\n")}var nZ=function(){function t(){this.all=!1,this.before=[],this.after=[],this.between=[]}return t.prototype._cacheAdd=function(t,e,a){e&&(e=e instanceof Date?nm(e):nf(e)),"all"===t?this.all=e:(a._value=e,this[t].push(a))},t.prototype._cacheGet=function(t,e){var a=!1,i=e?Object.keys(e):[],h=this[t];if("all"===t)a=this.all;else if(s5(h))for(var s=0;s<h.length;s++){var n=h[s];if(!(i.length&&function(t){for(var a=0;a<i.length;a++){var h=i[a];if(!function(t,e){return Array.isArray(t)?!!Array.isArray(e)&&t.length===e.length&&t.every(function(t,a){return t.getTime()===e[a].getTime()}):t instanceof Date?e instanceof Date&&t.getTime()===e.getTime():t===e}(e[h],t[h]))return!0}return!1}(n))){a=n._value;break}}if(!a&&this.all){for(var r=new nC(t,e),s=0;s<this.all.length&&r.accept(this.all[s]);s++);a=r.getValue(),this._cacheAdd(t,a,e)}return s5(a)?nf(a):a instanceof Date?nm(a):a},t}(),nX=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],s6(1,31),!0),s6(2,28),!0),s6(3,31),!0),s6(4,30),!0),s6(5,31),!0),s6(6,30),!0),s6(7,31),!0),s6(8,31),!0),s6(9,30),!0),s6(10,31),!0),s6(11,30),!0),s6(12,31),!0),s6(1,7),!0),nQ=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],s6(1,31),!0),s6(2,29),!0),s6(3,31),!0),s6(4,30),!0),s6(5,31),!0),s6(6,30),!0),s6(7,31),!0),s6(8,31),!0),s6(9,30),!0),s6(10,31),!0),s6(11,30),!0),s6(12,31),!0),s6(1,7),!0),nJ=s4(1,29),n0=s4(1,30),n1=s4(1,31),n2=s4(1,32),n3=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n2,!0),n0,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2.slice(0,7),!0),n5=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n2,!0),nJ,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2,!0),n1,!0),n2,!0),n1,!0),n2,!0),n2.slice(0,7),!0),n4=s4(-28,0),n6=s4(-29,0),n8=s4(-30,0),n7=s4(-31,0),n9=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n7,!0),n6,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7.slice(0,7),!0),rt=nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT(nT([],n7,!0),n4,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7,!0),n8,!0),n7,!0),n8,!0),n7,!0),n7.slice(0,7),!0),re=[0,31,60,91,121,152,182,213,244,274,305,335,366],ra=[0,31,59,90,120,151,181,212,243,273,304,334,365],ri=function(){for(var t=[],e=0;e<55;e++)t=t.concat(s4(7));return t}(),rh=function(){function t(t){this.options=t}return t.prototype.rebuild=function(t,e){var a,i,h,s,n,r,o,l,d,c,v=this.options;if(t!==this.lastyear&&(this.yearinfo=function(t,e){var a,i,h,s,n,r=nh(t,1,1),o=no(t)?366:365,l=no(t+1)?366:365,d=nc(r),c=nu(r),v=nE(nE({yearlen:o,nextyearlen:l,yearordinal:d,yearweekday:c},(i=no(a=t)?366:365,h=nu(nh(a,1,1)),365===i?{mmask:nX,mdaymask:n5,nmdaymask:rt,wdaymask:ri.slice(h),mrange:ra}:{mmask:nQ,mdaymask:n3,nmdaymask:n9,wdaymask:ri.slice(h),mrange:re})),{wnomask:null});if(ne(e.byweekno))return v;v.wnomask=s6(0,o+7);var p=s=s9(7-c+e.wkst,7);p>=4?(p=0,n=v.yearlen+s9(c-e.wkst,7)):n=o-p;for(var u=Math.floor(Math.floor(n/7)+s9(n,7)/4),_=0;_<e.byweekno.length;_++){var g=e.byweekno[_];if(g<0&&(g+=u+1),g>0&&g<=u){var m=void 0;g>1?(m=p+(g-1)*7,p!==s&&(m-=7-s)):m=p;for(var f=0;f<7&&(v.wnomask[m]=1,m++,v.wdaymask[m]!==e.wkst);f++);}}if(ni(e.byweekno,1)){var m=p+7*u;if(p!==s&&(m-=7-s),m<o)for(var _=0;_<7&&(v.wnomask[m]=1,m+=1,v.wdaymask[m]!==e.wkst);_++);}if(p){var b=void 0;if(ni(e.byweekno,-1))b=-1;else{var y=nu(nh(t-1,1,1)),M=s9(7-y.valueOf()+e.wkst,7),z=no(t-1)?366:365,w=void 0;M>=4?(M=0,w=z+s9(y-e.wkst,7)):w=o-p,b=Math.floor(52+s9(w,7)/4)}if(ni(e.byweekno,b))for(var m=0;m<p;m++)v.wnomask[m]=1}return v}(t,v)),na(v.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var p=this.yearinfo,u=p.yearlen,_=p.mrange,g=p.wdaymask;this.monthinfo=function(t,e,a,i,h,s){var n={lastyear:t,lastmonth:e,nwdaymask:[]},r=[];if(s.freq===rc.YEARLY)if(ne(s.bymonth))r=[[0,a]];else for(var o=0;o<s.bymonth.length;o++)e=s.bymonth[o],r.push(i.slice(e-1,e+1));else s.freq===rc.MONTHLY&&(r=[i.slice(e-1,e+1)]);if(ne(r))return n;n.nwdaymask=s6(0,a);for(var o=0;o<r.length;o++)for(var l=r[o],d=l[0],c=l[1]-1,v=0;v<s.bynweekday.length;v++){var p=void 0,u=s.bynweekday[v],_=u[0],g=u[1];g<0?(p=c+(g+1)*7,p-=s9(h[p]-_,7)):(p=d+(g-1)*7,p+=s9(7-h[p]+_,7)),d<=p&&p<=c&&(n.nwdaymask[p]=1)}return n}(t,e,u,_,g,v)}s1(v.byeaster)&&(this.eastermask=(void 0===(a=v.byeaster)&&(a=0),i=t%19,h=Math.floor(t/100),s=t%100,n=Math.floor(h/4),r=Math.floor((h+8)/25),o=Math.floor((h-r+1)/3),l=Math.floor(19*i+h-n-o+15)%30,d=Math.floor(32+h%4*2+2*Math.floor(s/4)-l-s%4)%7,c=Math.floor((i+11*l+22*d)/451),[Math.ceil((Date.UTC(t,Math.floor((l+d-7*c+114)/31)-1,(l+d-7*c+114)%31+1+a)-Date.UTC(t,0,1))/864e5)]))},Object.defineProperty(t.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),t.prototype.ydayset=function(){return[s4(this.yearlen),0,this.yearlen]},t.prototype.mdayset=function(t,e){for(var a=this.mrange[e-1],i=this.mrange[e],h=s6(null,this.yearlen),s=a;s<i;s++)h[s]=s;return[h,a,i]},t.prototype.wdayset=function(t,e,a){for(var i=s6(null,this.yearlen+7),h=nc(nh(t,e,a))-this.yearordinal,s=h,n=0;n<7&&(i[h]=h,++h,this.wdaymask[h]!==this.options.wkst);n++);return[i,s,h]},t.prototype.ddayset=function(t,e,a){var i=s6(null,this.yearlen),h=nc(nh(t,e,a))-this.yearordinal;return i[h]=h,[i,h,h+1]},t.prototype.htimeset=function(t,e,a,i){var h=this,s=[];return this.options.byminute.forEach(function(e){s=s.concat(h.mtimeset(t,e,a,i))}),nb(s),s},t.prototype.mtimeset=function(t,e,a,i){var h=this.options.bysecond.map(function(a){return new nB(t,e,a,i)});return nb(h),h},t.prototype.stimeset=function(t,e,a,i){return[new nB(t,e,a,i)]},t.prototype.getdayset=function(t){switch(t){case v.YEARLY:return this.ydayset.bind(this);case v.MONTHLY:return this.mdayset.bind(this);case v.WEEKLY:return this.wdayset.bind(this);case v.DAILY:default:return this.ddayset.bind(this)}},t.prototype.gettimeset=function(t){switch(t){case v.HOURLY:return this.htimeset.bind(this);case v.MINUTELY:return this.mtimeset.bind(this);case v.SECONDLY:return this.stimeset.bind(this)}},t}();function rs(t,e){var a=e.dtstart,i=e.freq,h=e.interval,s=e.until,n=e.bysetpos,r=e.count;if(0===r||0===h)return rr(t);var o=nF.fromDate(a),l=new rh(e);l.rebuild(o.year,o.month);for(var d=function(t,e,a){var i=a.freq,h=a.byhour,s=a.byminute,n=a.bysecond;if(nR(i)){var r=a.dtstart.getTime()%1e3;if(!nR(a.freq))return[];var o=[];return a.byhour.forEach(function(t){a.byminute.forEach(function(e){a.bysecond.forEach(function(a){o.push(new nB(t,e,a,r))})})}),o}return i>=rc.HOURLY&&na(h)&&!ni(h,e.hour)||i>=rc.MINUTELY&&na(s)&&!ni(s,e.minute)||i>=rc.SECONDLY&&na(n)&&!ni(n,e.second)?[]:t.gettimeset(i)(e.hour,e.minute,e.second,e.millisecond)}(l,o,e);;){var c=l.getdayset(i)(o.year,o.month,o.day),v=c[0],p=c[1],u=c[2],_=function(t,e,a,i,h){for(var s=!1,n=e;n<a;n++){var r=t[n];(s=function(t,e,a){var i=a.bymonth,h=a.byweekno,s=a.byweekday,n=a.byeaster,r=a.bymonthday,o=a.bynmonthday,l=a.byyearday;return na(i)&&!ni(i,t.mmask[e])||na(h)&&!t.wnomask[e]||na(s)&&!ni(s,t.wdaymask[e])||na(t.nwdaymask)&&!t.nwdaymask[e]||null!==n&&!ni(t.eastermask,e)||(na(r)||na(o))&&!ni(r,t.mdaymask[e])&&!ni(o,t.nmdaymask[e])||na(l)&&(e<t.yearlen&&!ni(l,e+1)&&!ni(l,-t.yearlen+e)||e>=t.yearlen&&!ni(l,e+1-t.yearlen)&&!ni(l,-t.nextyearlen+e-t.yearlen))}(i,r,h))&&(t[r]=null)}return s}(v,p,u,l,e);if(na(n))for(var g=function(t,e,a,i,h,s){for(var n=[],r=0;r<t.length;r++){var o=void 0,l=void 0,d=t[r];d<0?(o=Math.floor(d/e.length),l=s9(d,e.length)):(o=Math.floor((d-1)/e.length),l=s9(d-1,e.length));for(var c=[],v=a;v<i;v++){var p=s[v];s1(p)&&c.push(p)}var u=void 0;u=o<0?c.slice(o)[0]:c[o];var _=e[l],g=ng(nv(h.yearordinal+u),_);ni(n,g)||n.push(g)}return nb(n),n}(n,d,p,u,l,v),m=0;m<g.length;m++){var f=g[m];if(s&&f>s)return rr(t);if(f>=a){var b=rn(f,e);if(!t.accept(b)||r&&!--r)return rr(t)}}else for(var m=p;m<u;m++){var y=v[m];if(s1(y))for(var M=nv(l.yearordinal+y),z=0;z<d.length;z++){var f=ng(M,d[z]);if(s&&f>s)return rr(t);if(f>=a){var b=rn(f,e);if(!t.accept(b)||r&&!--r)return rr(t)}}}if(0===e.interval||(o.add(e,_),o.year>9999))return rr(t);nR(i)||(d=l.gettimeset(i)(o.hour,o.minute,o.second,0)),l.rebuild(o.year,o.month)}}function rn(t,e){return new nK(t,e.tzid).rezonedDate()}function rr(t){return t.getValue()}var ro={MO:new s0(0),TU:new s0(1),WE:new s0(2),TH:new s0(3),FR:new s0(4),SA:new s0(5),SU:new s0(6)},rl={freq:v.YEARLY,dtstart:null,interval:1,wkst:ro.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},rd=Object.keys(rl),rc=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this._cache=e?null:new nZ,this.origOptions=nH(t);var a=function(t){var e=nE(nE({},rl),nH(t));if(s1(e.byeaster)&&(e.freq=rc.YEARLY),!(s1(e.freq)&&rc.FREQUENCIES[e.freq]))throw Error("Invalid frequency: ".concat(e.freq," ").concat(t.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),s1(e.wkst)?s2(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=rc.MO.weekday,s1(e.bysetpos)){s2(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var a=0;a<e.bysetpos.length;a++){var i=e.bysetpos[a];if(0===i||!(i>=-366&&i<=366))throw Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||na(e.byweekno)||na(e.byyearday)||e.bymonthday||na(e.bymonthday)||s1(e.byweekday)||s1(e.byeaster)))switch(e.freq){case rc.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case rc.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case rc.WEEKLY:e.byweekday=[nu(e.dtstart)]}if(s1(e.bymonth)&&!s5(e.bymonth)&&(e.bymonth=[e.bymonth]),s1(e.byyearday)&&!s5(e.byyearday)&&s2(e.byyearday)&&(e.byyearday=[e.byyearday]),s1(e.bymonthday))if(s5(e.bymonthday)){for(var h=[],s=[],a=0;a<e.bymonthday.length;a++){var i=e.bymonthday[a];i>0?h.push(i):i<0&&s.push(i)}e.bymonthday=h,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);else e.bymonthday=[],e.bynmonthday=[];if(s1(e.byweekno)&&!s5(e.byweekno)&&(e.byweekno=[e.byweekno]),s1(e.byweekday))if(s2(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(s3(e.byweekday))e.byweekday=[s0.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof s0)!e.byweekday.n||e.freq>rc.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var n=[],r=[],a=0;a<e.byweekday.length;a++){var o=e.byweekday[a];if(s2(o)){n.push(o);continue}if(s3(o)){n.push(s0.fromStr(o).weekday);continue}!o.n||e.freq>rc.MONTHLY?n.push(o.weekday):r.push([o.weekday,o.n])}e.byweekday=na(n)?n:null,e.bynweekday=na(r)?r:null}else e.bynweekday=null;return s1(e.byhour)?s2(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<rc.HOURLY?[e.dtstart.getUTCHours()]:null,s1(e.byminute)?s2(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<rc.MINUTELY?[e.dtstart.getUTCMinutes()]:null,s1(e.bysecond)?s2(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<rc.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}(t).parsedOptions;this.options=a}return t.parseText=function(t,e){return n$(t,e)},t.fromText=function(t,e){var a;return void 0===(a=e)&&(a=nS),new rc(n$(t,a)||void 0)},t.fromString=function(e){return new t(t.parseString(e)||void 0)},t.prototype._iter=function(t){return rs(t,this.options)},t.prototype._cacheGet=function(t,e){return!!this._cache&&this._cache._cacheGet(t,e)},t.prototype._cacheAdd=function(t,e,a){if(this._cache)return this._cache._cacheAdd(t,e,a)},t.prototype.all=function(t){if(t)return this._iter(new nI("all",{},t));var e=this._cacheGet("all");return!1===e&&(e=this._iter(new nC("all",{})),this._cacheAdd("all",e)),e},t.prototype.between=function(t,e,a,i){if(void 0===a&&(a=!1),!nd(t)||!nd(e))throw Error("Invalid date passed in to RRule.between");var h={before:e,after:t,inc:a};if(i)return this._iter(new nI("between",h,i));var s=this._cacheGet("between",h);return!1===s&&(s=this._iter(new nC("between",h)),this._cacheAdd("between",s,h)),s},t.prototype.before=function(t,e){if(void 0===e&&(e=!1),!nd(t))throw Error("Invalid date passed in to RRule.before");var a={dt:t,inc:e},i=this._cacheGet("before",a);return!1===i&&(i=this._iter(new nC("before",a)),this._cacheAdd("before",i,a)),i},t.prototype.after=function(t,e){if(void 0===e&&(e=!1),!nd(t))throw Error("Invalid date passed in to RRule.after");var a={dt:t,inc:e},i=this._cacheGet("after",a);return!1===i&&(i=this._iter(new nC("after",a)),this._cacheAdd("after",i,a)),i},t.prototype.count=function(){return this.all().length},t.prototype.toString=function(){return nG(this.origOptions)},t.prototype.toText=function(t,e,a){return new nP(this,t,e,a).toString()},t.prototype.isFullyConvertibleToText=function(){return nN(this)},t.prototype.clone=function(){return new t(this.origOptions)},t.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],t.YEARLY=v.YEARLY,t.MONTHLY=v.MONTHLY,t.WEEKLY=v.WEEKLY,t.DAILY=v.DAILY,t.HOURLY=v.HOURLY,t.MINUTELY=v.MINUTELY,t.SECONDLY=v.SECONDLY,t.MO=ro.MO,t.TU=ro.TU,t.WE=ro.WE,t.TH=ro.TH,t.FR=ro.FR,t.SA=ro.SA,t.SU=ro.SU,t.parseString=nU,t.optionsToString=nG,t}(),rv={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function rp(t,e){return void 0===e&&(e={}),function(t,e){var a,i,h,s,n,r,o,l=(a=[],i=[],h=[],s=[],r=(n=nj(t)).dtstart,o=n.tzid,(function(t,e){if(void 0===e&&(e=!1),!(t=t&&t.trim()))throw Error("Invalid empty string");if(!e)return t.split(/\s/);for(var a=t.split("\n"),i=0;i<a.length;){var h=a[i]=a[i].replace(/\s+$/g,"");h?i>0&&" "===h[0]?(a[i-1]+=h.slice(1),a.splice(i,1)):i+=1:a.splice(i,1)}return a})(t,e.unfold).forEach(function(t){if(t){var e,n=function(t){var e=function(t){if(-1===t.indexOf(":"))return{name:"RRULE",value:t};var e=s7(t,":",1);return{name:e[0],value:e[1]}}(t),a=e.name,i=e.value,h=a.split(";");if(!h)throw Error("empty property name");return{name:h[0].toUpperCase(),parms:h.slice(1),value:i}}(t),r=n.name,l=n.parms,d=n.value;switch(r.toUpperCase()){case"RRULE":if(l.length)throw Error("unsupported RRULE parm: ".concat(l.join(",")));a.push(nU(t));break;case"RDATE":var c=(null!=(e=/RDATE(?:;TZID=([^:=]+))?/i.exec(t))?e:[])[1];c&&!o&&(o=c),i=i.concat(r_(d,l));break;case"EXRULE":if(l.length)throw Error("unsupported EXRULE parm: ".concat(l.join(",")));h.push(nU(d));break;case"EXDATE":s=s.concat(r_(d,l));break;case"DTSTART":break;default:throw Error("unsupported property: "+r)}}}),{dtstart:r,tzid:o,rrulevals:a,rdatevals:i,exrulevals:h,exdatevals:s}),d=l.rrulevals,c=l.rdatevals,v=l.exrulevals,p=l.exdatevals,u=l.dtstart,_=l.tzid,g=!1===e.cache;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||d.length>1||c.length||v.length||p.length){var m=new rm(g);return m.dtstart(u),m.tzid(_||void 0),d.forEach(function(t){m.rrule(new rc(ru(t,u,_),g))}),c.forEach(function(t){m.rdate(t)}),v.forEach(function(t){m.exrule(new rc(ru(t,u,_),g))}),p.forEach(function(t){m.exdate(t)}),e.compatible&&e.dtstart&&m.rdate(u),m}var f=d[0]||{};return new rc(ru(f,f.dtstart||e.dtstart||u,f.tzid||e.tzid||_),g)}(t,function(t){var e=[],a=Object.keys(t),i=Object.keys(rv);if(a.forEach(function(t){ni(i,t)||e.push(t)}),e.length)throw Error("Invalid options: "+e.join(", "));return nE(nE({},rv),t)}(e))}function ru(t,e,a){return nE(nE({},t),{dtstart:e,tzid:a})}function r_(t,e){return e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw Error("unsupported RDATE/EXDATE parm: "+t)}),t.split(",").map(function(t){return nM(t)})}function rg(t){var e=this;return function(a){if(void 0!==a&&(e["_".concat(t)]=a),void 0!==e["_".concat(t)])return e["_".concat(t)];for(var i=0;i<e._rrule.length;i++){var h=e._rrule[i].origOptions[t];if(h)return h}}}var rm=function(t){function e(e){void 0===e&&(e=!1);var a=t.call(this,{},e)||this;return a.dtstart=rg.apply(a,["dtstart"]),a.tzid=rg.apply(a,["tzid"]),a._rrule=[],a._rdate=[],a._exrule=[],a._exdate=[],a}return nk(e,t),e.prototype._iter=function(t){return function(t,e,a,i,h,s){var n={},r=t.accept;function o(t,e){a.forEach(function(a){a.between(t,e,!0).forEach(function(t){n[Number(t)]=!0})})}h.forEach(function(t){n[Number(new nK(t,s).rezonedDate())]=!0}),t.accept=function(t){var e=Number(t);return isNaN(e)?r.call(this,t):!!n[e]||(o(new Date(e-1),new Date(e+1)),!!n[e])||(n[e]=!0,r.call(this,t))},"between"===t.method&&(o(t.args.after,t.args.before),t.accept=function(t){var e=Number(t);return!!n[e]||(n[e]=!0,r.call(this,t))});for(var l=0;l<i.length;l++){var d=new nK(i[l],s).rezonedDate();if(!t.accept(new Date(d.getTime())))break}e.forEach(function(e){rs(t,e.options)});var c=t._result;switch(nb(c),t.method){case"all":case"between":return c;case"before":return c.length&&c[c.length-1]||null;default:return c.length&&c[0]||null}}(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){rf(t,this._rrule)},e.prototype.exrule=function(t){rf(t,this._exrule)},e.prototype.rdate=function(t){rb(t,this._rdate)},e.prototype.exdate=function(t){rb(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return rp(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return rp(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(nG({dtstart:this._dtstart}))),this._rrule.forEach(function(e){t=t.concat(e.toString().split("\n"))}),this._exrule.forEach(function(e){t=t.concat(e.toString().split("\n").map(function(t){return t.replace(/^RRULE:/,"EXRULE:")}).filter(function(t){return!/^DTSTART/.test(t)}))}),this._rdate.length&&t.push(ry("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(ry("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join("\n")},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(e){return t.rrule(e.clone())}),this._exrule.forEach(function(e){return t.exrule(e.clone())}),this._rdate.forEach(function(e){return t.rdate(new Date(e.getTime()))}),this._exdate.forEach(function(e){return t.exdate(new Date(e.getTime()))}),t},e}(rc);function rf(t,e){if(!(t instanceof rc))throw TypeError(String(t)+" is not RRule instance");ni(e.map(String),String(t))||e.push(t)}function rb(t,e){if(!(t instanceof Date))throw TypeError(String(t)+" is not Date instance");ni(e.map(Number),Number(t))||(e.push(t),nb(e))}function ry(t,e,a){var i=!a||"UTC"===a.toUpperCase(),h=i?"".concat(t,":"):"".concat(t,";TZID=").concat(a,":"),s=e.map(function(t){return ny(t.valueOf(),i)}).join(",");return"".concat(h).concat(s)}let rM={YEARLY:"rrule.frequency.YEARLY",MONTHLY:"rrule.frequency.MONTHLY",WEEKLY:"rrule.frequency.WEEKLY",DAILY:"rrule.frequency.DAILY",HOURLY:"rrule.frequency.HOURLY",MINUTELY:"rrule.frequency.MINUTELY",SECONDLY:"rrule.frequency.SECONDLY"},rz=["bymonth","byweekno","byyearday","bymonthday","byweekday","byhour","byminute","bysecond"],rw={SECONDLY:["byweekno"],MINUTELY:["byweekno"],HOURLY:["byweekno"],DAILY:["byweekno","byyearday"],WEEKLY:["byweekno","byyearday","bymonthday"],MONTHLY:["byweekno","byyearday"],YEARLY:[]},rC=["bymonth","byweekno","byyearday","byhour","byminute","bysecond"],rx={SECONDLY:["bymonthday","byweekday",...rC,...rw.SECONDLY],MINUTELY:["bymonthday","byweekday",...rC,...rw.MINUTELY],HOURLY:["bymonthday","byweekday",...rC,...rw.HOURLY],DAILY:["bymonthday","byweekday",...rC,...rw.DAILY],WEEKLY:["bymonthday",...rC,...rw.WEEKLY],MONTHLY:["byweekday",...rC,...rw.MONTHLY],YEARLY:["bymonthday","byweekday",...rC,...rw.YEARLY]},rk={MO:"monday",TU:"tuesday",WE:"wednesday",TH:"thursday",FR:"friday",SA:"saturday",SU:"sunday"},rE={1:"january",2:"february",3:"march",4:"april",5:"may",6:"june",7:"july",8:"august",9:"september",10:"october",11:"november",12:"december"};(d=p||(p={})).default="default",d.period="period",d.recurrence="recurrence";let rT={never:"never",until:"schedule.ends.until",count:"schedule.ends.count"};var rI=n(416),rS=n.n(rI),rD=function(t,e,a,i){var h,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var r=t.length-1;r>=0;r--)(h=t[r])&&(n=(s<3?h(n):s>3?h(e,a,n):h(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n};function rA(t,e){return Array.from({length:e-t+1},(e,a)=>t+a)}let rO=rA(-53,53).filter(Boolean),rP=rA(-366,366).filter(Boolean),rL=rA(-31,31).filter(Boolean),r$=rA(1,24),rR=rA(1,60);class rV extends CustomEvent{constructor(t){super(rV.NAME,{detail:{value:t},bubbles:!0,composed:!0})}}rV.NAME="or-scheduler-changed";class rN extends CustomEvent{constructor(){super(rN.NAME,{bubbles:!0,composed:!0})}}rN.NAME="or-scheduler-removed";let rB=class extends(0,u.translate)(u.i18next)(tI){constructor(){super(...arguments),this.defaultEventTypeLabel="default",this.disableNegativeByPartValues=!1,this.disabledFrequencies=[],this.disabledRRuleParts=[],this.disabledByPartCombinations=rw,this.header="scheduleActivity",this.isAllDay=!0,this.open=!1,this.removable=!1,this.schedule=this.defaultSchedule,this.timezoneOffset=0,this._count=1,this._ends="never",this._eventType=p.default,this._until=rS()().toDate()}get _scheduleWithOffset(){return this._applyTimezoneOffset(this.schedule,this.timezoneOffset)}set _scheduleWithOffset(t){this.schedule=this._applyTimezoneOffset(t,-this.timezoneOffset)}get _timeLabel(){if(this._eventType===p.default)return tl`<or-translate value="${this.defaultEventTypeLabel}" .options="${this._getDefaultMessageOptions()}"></or-translate>`;if(this._scheduleWithOffset){let t=this._scheduleWithOffset;if(t.recurrence){let e=rS()(t.end).diff(t.start,"days"),a={start:rS()(t.start).format("HH:mm"),end:rS()(t.end).format("HH:mm")},i=tl``;this.isAllDay&&e>0?i=tl`<or-translate value="forDays" .options="${{days:e,count:e}}"></or-translate>`:e>0?i=tl`<or-translate value="fromToDays" .options="${Object.assign(Object.assign({},a),{days:e,count:e})}"></or-translate>`:0===e&&(i=tl`<or-translate value="fromTo" .options="${a}"></or-translate>`);let h=tl`<span>&nbsp;${i}</span>`,s=Object.values(rE).map(u.i18next.t),n=Object.values(rk).map(u.i18next.t),r=[n.pop(),...n],o=this._rrule.toText(t=>u.i18next.t(`rrule.${t}`),{dayNames:r,monthNames:s,tokens:{}});return tl`<span class="time-label"><span>${o}</span>${h}</span>`}let e=this.isAllDay?"DD-MM-YYYY":"DD-MM-YYYY HH:mm";return tl`<or-translate value="activeFromTo" .options="${{start:rS()(t.start).format(e),end:rS()(t.end).format(e)}}"></or-translate>`}}connectedCallback(){var t,e,a;super.connectedCallback();let i=this._applyTimezoneOffset(null!=(t=this.schedule)?t:this.defaultSchedule,this.timezoneOffset);if((null==i?void 0:i.start)&&(null==i?void 0:i.start)){let t=rS()(null==i?void 0:i.start),e=rS()(null==i?void 0:i.end);this.isAllDay=t.isSame(t.clone().startOf("day"))&&e.isSame(e.clone().endOf("day"))}if(null==(e=this.schedule)?void 0:e.recurrence){let t=rc.fromString(this.schedule.recurrence).origOptions;t.until?this._until=rS()(t.until).toDate():t.count&&(this._count=t.count)}!this.schedule||sQ.Util.objectsEqual(this.schedule,this.defaultSchedule)?this._eventType=p.default:this._eventType=(null==(a=this.schedule)?void 0:a.recurrence)?p.recurrence:p.period}shouldUpdate(t){var e,a,i,h,s,n,r;return this.schedule&&!this.schedule.end&&(null==(e=this.defaultSchedule)?void 0:e.end)&&(this.schedule=Object.assign(Object.assign({},this.schedule),{end:this.defaultSchedule.end})),t.has("schedule")&&((null==(a=this._scheduleWithOffset)?void 0:a.recurrence)?this._rrule=rc.fromString(this._scheduleWithOffset.recurrence):this._eventType===p.default&&(null==(i=this.defaultSchedule)?void 0:i.recurrence)&&(this._rrule=rc.fromString(this.defaultSchedule.recurrence))),t.has("_rrule")&&this._rrule&&(this._byRRuleParts=rz.filter(t=>{var e;return!(null==(e=this.disabledByPartCombinations[v[this._rrule.options.freq]])?void 0:e.includes(t))}).filter(t=>!this.disabledRRuleParts.includes(t)),this._ends=(null==(s=null==(h=this._rrule)?void 0:h.origOptions)?void 0:s.until)&&"until"||(null==(r=null==(n=this._rrule)?void 0:n.origOptions)?void 0:r.count)&&"count"||"never"),super.shouldUpdate(t)}_setAllDay(){let t=this._scheduleWithOffset;if(this.isAllDay&&this._eventType!==p.default){let e=rS()(null==t?void 0:t.start).startOf("day").valueOf(),a=rS()(null==t?void 0:t.end).endOf("day").valueOf();this._scheduleWithOffset=Object.assign(Object.assign({},t),{start:e,end:a})}}_getRRule(t=this._rrule){var e,a,i;return null==(i=null==(a=null==(e=null==t?void 0:t.toString())?void 0:e.split("RRULE:"))?void 0:a[1])?void 0:i.replace(/(UNTIL=\d+T\d+)Z/,"$1")}_setRRuleValue(t,e){var a;let i=null==(a=this._rrule)?void 0:a.origOptions,h=this._scheduleWithOffset;if("interval"===e||"freq"===e||e.startsWith("by"))if("byweekday"===e)i.byweekday=t.map(t=>rc[t]);else if("freq"===e){for(let t of rz)delete i[t];i[e]=t}else i[e]=t;else if("start"===e&&i){let[e,a,s]=t.split("-").map(Number);i.dtstart=rS()(h.start).set({year:e,month:a-1,date:s}).toDate(),h.start=i.dtstart.getTime()}else if("end"===e){let[e,a,i]=t.split("-").map(Number);h.end=rS()(h.end).set({year:e,month:a-1,date:i}).toDate().getTime()}else if("start-time"===e){let[e,a]=t.split(":");i?i.dtstart=rS()(h.start).set({hour:e,minute:a,second:0,millisecond:0}).toDate():i=new rc({dtstart:rS()(h.start).set({hour:e,minute:a,second:0,millisecond:0}).toDate()}).origOptions,h.start=rS()(i.dtstart).toDate().getTime()}else if("end-time"===e){let[e,a]=t.split(":");h.end=rS()(h.end).set({hour:e,minute:a,second:0,millisecond:0}).toDate().getTime()}else switch(e){case"all-day":this.isAllDay=t;break;case"recurrence-ends":"until"===t?(i.until=this._until,delete i.count):("count"===t?i.count=this._count:delete i.count,delete i.until),this._ends=t;break;case"until":this._until=new Date(t),i.until=this._until;break;case"count":this._count=t,i.count=this._count}this._eventType===p.recurrence?(this._rrule=new rc(i),this._scheduleWithOffset=Object.assign(Object.assign({},h),{recurrence:this._getRRule()})):this._scheduleWithOffset=Object.assign({},h)}_setCalendarEventType(t){var e,a,i,h,s,n,r,o,l,d;let c=t.target.value;this._eventType=c;let v=rS()().startOf("day");if(c===p.default){this.schedule={start:null!=(a=null==(e=this.defaultSchedule)?void 0:e.start)?a:v.valueOf()-this.timezoneOffset,end:null!=(h=null==(i=this.defaultSchedule)?void 0:i.end)?h:v.endOf("day").valueOf()-this.timezoneOffset};let t=null==(s=this.defaultSchedule)?void 0:s.recurrence;this._rrule=t?rc.fromString(t):void 0;return}let u={start:null!=(r=null==(n=this._scheduleWithOffset)?void 0:n.start)?r:v.valueOf(),end:null!=(l=null==(o=this._scheduleWithOffset)?void 0:o.end)?l:v.endOf("day").valueOf()};c===p.period?this._scheduleWithOffset=u:this._scheduleWithOffset=Object.assign(Object.assign({},u),{recurrence:null!=(d=this._getRRule())?d:"FREQ=DAILY"})}_applyTimezoneOffset(t,e){if(t){let{start:a,end:i,recurrence:h}=Object.assign({},t);if(h&&rc.fromString(h).origOptions.until){let t=rc.fromString(h).origOptions;t.until=new Date(Number(t.until)+e),h=this._getRRule(new rc(t))}return{start:null!=a?a+e:a,end:null!=i?i+e:i,recurrence:h}}}_getDefaultMessageOptions(){var t,e;return{date:rS().utc(null==(t=this.defaultSchedule)?void 0:t.start).format("YYYY-MM-DD"),time:rS().utc(null==(e=this.defaultSchedule)?void 0:e.start).format("HH:mm")}}render(){return tl`
3489
3489
  <or-vaadin-button style="max-width: 100%" @click="${()=>this._dialog.open()}">${this._timeLabel}</or-vaadin-button>
3490
3490
  <or-vaadin-dialog id="scheduler" header-title="${u.i18next.t(this.header)}" ?opened="${this.open}" @closed="${this._onClose}"
3491
3491
  ${hF(this._getDialogHeader,[])}