Comparing version 2.7.0 to 2.7.1
### Changelog | ||
- 2.7.1 (2022-07-10) | ||
- Internal: | ||
- Upgrade build dependencies (#515) | ||
- Migrate from tslint to eslint (#514) | ||
- Fix precommit & lint warnings (#519) | ||
- Fix invalid date formats in tests (#517) | ||
- Remove default exports (#513) | ||
- Point to esm correctly (#516) | ||
- 2.7.0 (2022-06-05) | ||
- Features: | ||
- Removes Luxon dependency | ||
- Removes default export in favor of named exports | ||
- **BREAKING CHANGE** Removes default export in favor of named exports | ||
- Removes Luxon dependency (#508) | ||
- 2.6.8 (2021-02-04) | ||
- Bugfixes: | ||
@@ -13,2 +25,3 @@ - Solve circular imports (#444) | ||
- 2.6.6 (2020-08-23) | ||
- Bugfixes: | ||
@@ -19,4 +32,4 @@ - Fixed broken npm package (#417) | ||
- Bugfixes: | ||
- `luxon`-less binary should not contain any `luxon` imports (#410) | ||
- Fixed `toText` pluralization of “minutes“ (#415) | ||
- `luxon`-less binary should not contain any `luxon` imports (#410) | ||
- Fixed `toText` pluralization of “minutes“ (#415) | ||
- 2.6.4 (2019-12-18) | ||
@@ -23,0 +36,0 @@ - Bugfixes: |
@@ -1,39 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rrule=e():t.rrule=e()}("undefined"!=typeof self?self:this,function(){return r={},i.m=n=[function(t,e,n){"use strict";n.r(e);var r=["MO","TU","WE","TH","FR","SA","SU"],f=(i.fromStr=function(t){return new i(r.indexOf(t))},i.prototype.nth=function(t){return this.n===t?this:new i(this.weekday,t)},i.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},i.prototype.toString=function(){var t=r[this.weekday];return this.n&&(t=(0<this.n?"+":"")+String(this.n)+t),t},i.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},i);function i(t,e){if(0===e)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}function a(t,e){void 0===e&&(e=t),1===arguments.length&&(e=t,t=0);for(var n=[],r=t;r<e;r++)n.push(r);return n}function Y(t,e){var n=0,r=[];if(m(t))for(;n<e;n++)r[n]=[].concat(t);else for(;n<e;n++)r[n]=t;return r}var D=function(t){return null!=t},p=function(t){return"number"==typeof t},h=function(t){return 0<=r.indexOf(t)},m=Array.isArray;function o(t,e,n){void 0===n&&(n=" ");var r=String(t);return e>>=0,r.length>e?String(r):((e-=r.length)>n.length&&(n+=Y(n,e/n.length)),n.slice(0,e)+String(r))}function u(t,e){return{div:Math.floor(t/e),mod:U(t,e)}}function S(t){return!D(t)||0===t.length}var s,y,c=function(t,e,n){var r=t.split(e);return n?r.slice(0,n).concat([r.slice(n).join(e)]):r},U=function(t,e){var n=t%e;return n*e<0?n+e:n},O=function(t){return!S(t)},L=function(t,e){return O(t)&&-1!==t.indexOf(e)};(y=s=s||{}).MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],y.ONE_DAY=864e5,y.MAXYEAR=9999,y.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),y.PY_WEEKDAYS=[6,0,1,2,3,4,5],y.getYearDay=function(t){var e=new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate());return Math.ceil((e.valueOf()-new Date(t.getUTCFullYear(),0,1).valueOf())/y.ONE_DAY)+1},y.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},y.isDate=function(t){return t instanceof Date},y.isValidDate=function(t){return y.isDate(t)&&!isNaN(t.getTime())},y.tzOffset=function(t){return 60*t.getTimezoneOffset()*1e3},y.daysBetween=function(t,e){var n=t.getTime()-y.tzOffset(t)-(e.getTime()-y.tzOffset(e));return Math.round(n/y.ONE_DAY)},y.toOrdinal=function(t){return y.daysBetween(t,y.ORDINAL_BASE)},y.fromOrdinal=function(t){return new Date(y.ORDINAL_BASE.getTime()+t*y.ONE_DAY)},y.getMonthDays=function(t){var e=t.getUTCMonth();return 1===e&&y.isLeapYear(t.getUTCFullYear())?29:y.MONTH_DAYS[e]},y.getWeekday=function(t){return y.PY_WEEKDAYS[t.getUTCDay()]},y.monthRange=function(t,e){var n=new Date(Date.UTC(t,e,1));return[y.getWeekday(n),y.getMonthDays(n)]},y.combine=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()))},y.clone=function(t){return new Date(t.getTime())},y.cloneDates=function(t){for(var e=[],n=0;n<t.length;n++)e.push(y.clone(t[n]));return e},y.sort=function(t){t.sort(function(t,e){return t.getTime()-e.getTime()})},y.timeToUntilString=function(t,e){void 0===e&&(e=!0);var n=new Date(t);return[o(n.getUTCFullYear().toString(),4,"0"),o(n.getUTCMonth()+1,2,"0"),o(n.getUTCDate(),2,"0"),"T",o(n.getUTCHours(),2,"0"),o(n.getUTCMinutes(),2,"0"),o(n.getUTCSeconds(),2,"0"),e?"Z":""].join("")},y.untilStringToDate=function(t){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(t);if(!e)throw new Error("Invalid UNTIL value: "+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))};var M=s;function d(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))}var l=(d.prototype.accept=function(t){++this.total;var e=this.minDate&&t<this.minDate,n=this.maxDate&&t>this.maxDate;if("between"===this.method){if(e)return!0;if(n)return!1}else if("before"===this.method){if(n)return!1}else if("after"===this.method)return!!e||(this.add(t),!1);return this.add(t)},d.prototype.add=function(t){return this._result.push(t),!0},d.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},d.prototype.clone=function(){return new d(this.method,this.args)},d),b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)}; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */function w(t,e){function n(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v,_=function(){return(_=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function g(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function k(t,e,n){var r=v.call(this,t,e)||this;return r.iterator=n,r}function E(t,e){return-1!==t.indexOf(e)}function T(t){return t.toString()}function x(t,e,n){return e+" "+n+", "+t}var R=(w(k,v=l),k.prototype.add=function(t){return!!this.iterator(t,this._result.length)&&(this._result.push(t),!0)},k),A={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}};function N(t,e,n,r){if(void 0===e&&(e=T),void 0===n&&(n=A),void 0===r&&(r=x),this.text=[],this.language=n||A,this.gettext=e,this.dateFormatter=r,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);i.sort(function(t,e){return t-e}),a.sort(function(t,e){return e-t}),this.bymonthday=i.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(D(this.origOptions.byweekday)){var o=m(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],s=String(o);this.byweekday={allWeeks:o.filter(function(t){return!t.n}),someWeeks:o.filter(function(t){return Boolean(t.n)}),isWeekdays:-1!==s.indexOf("MO")&&-1!==s.indexOf("TU")&&-1!==s.indexOf("WE")&&-1!==s.indexOf("TH")&&-1!==s.indexOf("FR")&&-1===s.indexOf("SA")&&-1===s.indexOf("SU"),isEveryDay:-1!==s.indexOf("MO")&&-1!==s.indexOf("TU")&&-1!==s.indexOf("WE")&&-1!==s.indexOf("TH")&&-1!==s.indexOf("FR")&&-1!==s.indexOf("SA")&&-1!==s.indexOf("SU")};var u=function(t,e){return t.weekday-e.weekday};this.byweekday.allWeeks.sort(u),this.byweekday.someWeeks.sort(u),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}var C,I,W=(N.isFullyConvertible=function(t){if(!(t.options.freq in N.IMPLEMENTED))return!1;if(t.origOptions.until&&t.origOptions.count)return!1;for(var e in t.origOptions){if(E(["dtstart","wkst","freq"],e))return!0;if(!E(N.IMPLEMENTED[t.options.freq],e))return!1}return!0},N.prototype.isFullyConvertible=function(){return N.isFullyConvertible(this.rrule)},N.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in N.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[It.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var e=this.options.until;this.add(this.dateFormatter(e.getUTCFullYear(),this.language.monthNames[e.getUTCMonth()],e.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},N.prototype.HOURLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},N.prototype.MINUTELY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},N.prototype.DAILY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},N.prototype.WEEKLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("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())},N.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(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},N.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(this.plural(this.options.interval)?t("years"):t("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(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},N.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")))},N.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"))))},N.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},N.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},N.prototype.nth=function(t){var e,n;t=parseInt(t.toString(),10);var r=this.gettext;if(-1===t)return r("last");switch(n=Math.abs(t)){case 1:case 21:case 31:e=n+r("st");break;case 2:case 22:e=n+r("nd");break;case 3:case 23:e=n+r("rd");break;default:e=n+r("th")}return t<0?e+" "+r("last"):e},N.prototype.monthtext=function(t){return this.language.monthNames[t-1]},N.prototype.weekdaytext=function(t){var e=p(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},N.prototype.plural=function(t){return t%100!=1},N.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},N.prototype.list=function(t,e,n,r){function i(t){return e&&e.call(a,t)}void 0===r&&(r=","),m(t)||(t=[t]),e=e||function(t){return t.toString()};var a=this;return n?function(t,e,n){for(var r="",i=0;i<t.length;i++)0!==i&&(i===t.length-1?r+=" "+n+" ":r+=e+" "),r+=t[i];return r}(t.map(i),r,n):t.map(i).join(r+" ")},N),j=(H.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},H.prototype.isDone=function(){return this.done&&null===this.symbol},H.prototype.nextSymbol=function(){var t,e;this.symbol=null,this.value=null;do{if(this.done)return!1;for(var n in t=null,this.rules){var r=this.rules[n].exec(this.text);r&&(null===t||r[0].length>t[0].length)&&(t=r,e=n)}if(null!=t&&(this.text=this.text.substr(t[0].length),""===this.text&&(this.done=!0)),null==t)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===e);return this.symbol=e,this.value=t,!0},H.prototype.accept=function(t){if(this.symbol!==t)return!1;if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0},H.prototype.acceptNumber=function(){return this.accept("number")},H.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},H);function H(t){this.done=!0,this.rules=t}function q(t,e){void 0===e&&(e=A);var o={},s=new j(e.tokens);return s.start(t)?(function(){s.expect("every");var t=s.acceptNumber();t&&(o.interval=parseInt(t[0],10));if(s.isDone())throw new Error("Unexpected end");switch(s.symbol){case"day(s)":o.freq=It.DAILY,s.nextSymbol()&&(function(){if(!s.accept("at"))return;do{var t=s.acceptNumber();if(!t)throw new Error("Unexpected symbol "+s.symbol+", expected hour");for(o.byhour=[parseInt(t[0],10)];s.accept("comma");){if(!(t=s.acceptNumber()))throw new Error("Unexpected symbol "+s.symbol+"; expected hour");o.byhour.push(parseInt(t[0],10))}}while(s.accept("comma")||s.accept("at"))}(),a());break;case"weekday(s)":o.freq=It.WEEKLY,o.byweekday=[It.MO,It.TU,It.WE,It.TH,It.FR],s.nextSymbol(),a();break;case"week(s)":o.freq=It.WEEKLY,s.nextSymbol()&&(i(),a());break;case"hour(s)":o.freq=It.HOURLY,s.nextSymbol()&&(i(),a());break;case"minute(s)":o.freq=It.MINUTELY,s.nextSymbol()&&(i(),a());break;case"month(s)":o.freq=It.MONTHLY,s.nextSymbol()&&(i(),a());break;case"year(s)":o.freq=It.YEARLY,s.nextSymbol()&&(i(),a());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":o.freq=It.WEEKLY;var e=s.symbol.substr(0,2).toUpperCase();if(o.byweekday=[It[e]],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw new Error("Unexpected end");var n=h();if(!n)throw new Error("Unexpected symbol "+s.symbol+", expected weekday");o.byweekday.push(It[n]),s.nextSymbol()}!function(){s.accept("on"),s.accept("the");var t=y();if(!t)return;o.bymonthday=[t],s.nextSymbol();for(;s.accept("comma");){if(!(t=y()))throw new Error("Unexpected symbol "+s.symbol+"; expected monthday");o.bymonthday.push(t),s.nextSymbol()}}(),a();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(o.freq=It.YEARLY,o.bymonth=[u()],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw new Error("Unexpected end");var r=u();if(!r)throw new Error("Unexpected symbol "+s.symbol+", expected month");o.bymonth.push(r),s.nextSymbol()}i(),a();break;default:throw new Error("Unknown symbol")}}(),o):null;function i(){var t=s.accept("on"),e=s.accept("the");if(t||e)do{var n=y(),r=h(),i=u();if(n)r?(s.nextSymbol(),o.byweekday||(o.byweekday=[]),o.byweekday.push(It[r].nth(n))):(o.bymonthday||(o.bymonthday=[]),o.bymonthday.push(n),s.accept("day(s)"));else if(r)s.nextSymbol(),o.byweekday||(o.byweekday=[]),o.byweekday.push(It[r]);else if("weekday(s)"===s.symbol)s.nextSymbol(),o.byweekday||(o.byweekday=[It.MO,It.TU,It.WE,It.TH,It.FR]);else if("week(s)"===s.symbol){s.nextSymbol();var a=s.acceptNumber();if(!a)throw new Error("Unexpected symbol "+s.symbol+", expected week number");for(o.byweekno=[parseInt(a[0],10)];s.accept("comma");){if(!(a=s.acceptNumber()))throw new Error("Unexpected symbol "+s.symbol+"; expected monthday");o.byweekno.push(parseInt(a[0],10))}}else{if(!i)return;s.nextSymbol(),o.bymonth||(o.bymonth=[]),o.bymonth.push(i)}}while(s.accept("comma")||s.accept("the")||s.accept("on"))}function u(){switch(s.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 h(){switch(s.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return s.symbol.substr(0,2).toUpperCase();default:return!1}}function y(){switch(s.symbol){case"last":return s.nextSymbol(),-1;case"first":return s.nextSymbol(),1;case"second":return s.nextSymbol(),s.accept("last")?-2:2;case"third":return s.nextSymbol(),s.accept("last")?-3:3;case"nth":var t=parseInt(s.value[1],10);if(t<-366||366<t)throw new Error("Nth out of range: "+t);return s.nextSymbol(),s.accept("last")?-t:t;default:return!1}}function a(){if("until"===s.symbol){var t=Date.parse(s.text);if(!t)throw new Error("Cannot parse until date:"+s.text);o.until=new Date(t)}else s.accept("for")&&(o.count=parseInt(s.value[0],10),s.expect("number"))}}function P(t){return t<C.HOURLY} | ||
/*! | ||
* rrule.js - Library for working with recurrence rules for calendar dates. | ||
* https://github.com/jakubroztocil/rrule | ||
* | ||
* Copyright 2010, Jakub Roztocil and Lars Schoning | ||
* Licenced under the BSD licence. | ||
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE | ||
* | ||
*/(I=C=C||{})[I.YEARLY=0]="YEARLY",I[I.MONTHLY=1]="MONTHLY",I[I.WEEKLY=2]="WEEKLY",I[I.DAILY=3]="DAILY",I[I.HOURLY=4]="HOURLY",I[I.MINUTELY=5]="MINUTELY",I[I.SECONDLY=6]="SECONDLY";var z=["count","until","interval","byweekday","bymonthday","bymonth"];W.IMPLEMENTED=[],W.IMPLEMENTED[C.HOURLY]=z,W.IMPLEMENTED[C.MINUTELY]=z,W.IMPLEMENTED[C.DAILY]=["byhour"].concat(z),W.IMPLEMENTED[C.WEEKLY]=z,W.IMPLEMENTED[C.MONTHLY]=z,W.IMPLEMENTED[C.YEARLY]=["byweekno","byyearday"].concat(z);var F=W.isFullyConvertible,K=(B.prototype.getHours=function(){return this.hour},B.prototype.getMinutes=function(){return this.minute},B.prototype.getSeconds=function(){return this.second},B.prototype.getMilliseconds=function(){return this.millisecond},B.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},B);function B(t,e,n,r){this.hour=t,this.minute=e,this.second=n,this.millisecond=r||0}var Z,V=(w(X,Z=K),X.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},X.prototype.getWeekday=function(){return s.getWeekday(new Date(this.getTime()))},X.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},X.prototype.getDay=function(){return this.day},X.prototype.getMonth=function(){return this.month},X.prototype.getYear=function(){return this.year},X.prototype.addYears=function(t){this.year+=t},X.prototype.addMonths=function(t){if(this.month+=t,12<this.month){var e=Math.floor(this.month/12),n=U(this.month,12);this.month=n,this.year+=e,0===this.month&&(this.month=12,--this.year)}},X.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()},X.prototype.addDaily=function(t){this.day+=t,this.fixDay()},X.prototype.addHours=function(t,e,n){for(e&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var r=u(this.hour,24),i=r.div,a=r.mod;if(i&&(this.hour=a,this.addDaily(i)),S(n)||L(n,this.hour))break}},X.prototype.addMinutes=function(t,e,n,r){for(e&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var i=u(this.minute,60),a=i.div,o=i.mod;if(a&&(this.minute=o,this.addHours(a,!1,n)),(S(n)||L(n,this.hour))&&(S(r)||L(r,this.minute)))break}},X.prototype.addSeconds=function(t,e,n,r,i){for(e&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var a=u(this.second,60),o=a.div,s=a.mod;if(o&&(this.second=s,this.addMinutes(o,!1,n,r)),(S(n)||L(n,this.hour))&&(S(r)||L(r,this.minute))&&(S(i)||L(i,this.second)))break}},X.prototype.fixDay=function(){if(!(this.day<=28)){var t=s.monthRange(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>s.MAXYEAR))return;t=s.monthRange(this.year,this.month-1)[1]}}},X.prototype.add=function(t,e){var n=t.freq,r=t.interval,i=t.wkst,a=t.byhour,o=t.byminute,s=t.bysecond;switch(n){case C.YEARLY:return this.addYears(r);case C.MONTHLY:return this.addMonths(r);case C.WEEKLY:return this.addWeekly(r,i);case C.DAILY:return this.addDaily(r);case C.HOURLY:return this.addHours(r,e,a);case C.MINUTELY:return this.addMinutes(r,e,a,o);case C.SECONDLY:return this.addSeconds(r,e,a,o,s)}},X);function X(t,e,n,r,i,a,o){var s=Z.call(this,r,i,a,o)||this;return s.year=t,s.month=e,s.day=n,s}function G(t){for(var e=[],n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];L(Ct,i)||e.push(i),M.isDate(t[i])&&!M.isValidDate(t[i])&&e.push(i)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return _({},t)}function Q(t){var e=t.split("\n").map(J).filter(function(t){return null!==t});return _(_({},e[0]),e[1])}function $(t){var e={},n=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(t);if(!n)return e;n[0];var r=n[1],i=n[2];return r&&(e.tzid=r),e.dtstart=M.untilStringToDate(i),e}function J(t){if(!(t=t.replace(/^\s+|\s+$/,"")).length)return null;var e=/^([A-Z]+?)[:;]/.exec(t.toUpperCase());if(!e)return tt(t);e[0];var n=e[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return tt(t);case"DTSTART":return $(t);default:throw new Error("Unsupported RFC prop "+n+" in "+t)}}function tt(u){var h=$(u.replace(/^RRULE:/i,""));return u.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach(function(t){var e,n=t.split("="),r=n[0],i=n[1];switch(r.toUpperCase()){case"FREQ":h.freq=C[i.toUpperCase()];break;case"WKST":h.wkst=At[i.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var a=-1===(e=i).indexOf(",")?et(e):e.split(",").map(et),o=r.toLowerCase();h[o]=a;break;case"BYWEEKDAY":case"BYDAY":h.byweekday=i.split(",").map(function(t){if(2===t.length)return At[t];var e=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/),n=Number(e[1]),r=e[2],i=At[r].weekday;return new f(i,n)});break;case"DTSTART":case"TZID":var s=$(u);h.tzid=s.tzid,h.dtstart=s.dtstart;break;case"UNTIL":h.until=M.untilStringToDate(i);break;case"BYEASTER":h.byeaster=Number(i);break;default:throw new Error("Unknown RRULE property '"+r+"'")}}),h}function et(t){return/^[+-]?\d+$/.test(t)?Number(t):t}var nt=(Object.defineProperty(rt.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!0,configurable:!0}),rt.prototype.toString=function(){var t=M.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":"+t:";TZID="+this.tzid+":"+t},rt.prototype.getTime=function(){return this.date.getTime()},rt.prototype.rezonedDate=function(){var t;if(this.isUTC)return this.date;var e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:e})),r=new Date(this.date.toLocaleString(void 0,{timeZone:null!=(t=this.tzid)?t:"UTC"})).getTime()-n.getTime();return new Date(this.date.getTime()-r)},rt);function rt(t,e){this.date=t,this.tzid=e}function it(t){for(var e,n=[],r="",i=Object.keys(t),a=Object.keys(Nt),o=0;o<i.length;o++)if("tzid"!==i[o]&&L(a,i[o])){var s=i[o].toUpperCase(),u=t[i[o]],h="";if(D(u)&&(!m(u)||u.length)){switch(s){case"FREQ":h=It.FREQUENCIES[t.freq];break;case"WKST":h=p(u)?new f(u).toString():u.toString();break;case"BYWEEKDAY":s="BYDAY",h=(m(e=u)?e:[e]).map(function(t){return t instanceof f?t:m(t)?new f(t[0],t[1]):new f(t)}).toString();break;case"DTSTART":r=at(u,t.tzid);break;case"UNTIL":h=M.timeToUntilString(u,!t.tzid);break;default:if(m(u)){for(var y=[],d=0;d<u.length;d++)y[d]=String(u[d]);h=y.toString()}else h=String(u)}h&&n.push([s,h])}}var c=n.map(function(t){return t[0]+"="+t[1].toString()}).join(";"),l="";return""!==c&&(l="RRULE:"+c),[r,l].filter(function(t){return!!t}).join("\n")}function at(t,e){return t?"DTSTART"+new nt(new Date(t),e).toString():""}function ot(t,n){return Array.isArray(t)?!!Array.isArray(n)&&(t.length===n.length&&t.every(function(t,e){return t.getTime()===n[e].getTime()})):t instanceof Date?n instanceof Date&&t.getTime()===n.getTime():t===n}var st=(ut.prototype._cacheAdd=function(t,e,n){e=e&&(e instanceof Date?M.clone(e):M.cloneDates(e)),"all"===t?this.all=e:(n._value=e,this[t].push(n))},ut.prototype._cacheGet=function(t,r){function e(t){for(var e=0;e<i.length;e++){var n=i[e];if(!ot(r[n],t[n]))return!0}return!1}var n=!1,i=r?Object.keys(r):[],a=this[t];if("all"===t)n=this.all;else if(m(a))for(var o=0;o<a.length;o++){var s=a[o];if(!i.length||!e(s)){n=s._value;break}}if(!n&&this.all){var u=new l(t,r);for(o=0;o<this.all.length&&u.accept(this.all[o]);o++);n=u.getValue(),this._cacheAdd(t,n,r)}return m(n)?M.cloneDates(n):n instanceof Date?M.clone(n):n},ut);function ut(){this.all=!1,this.before=[],this.after=[],this.between=[]}var ht=g(Y(1,31),Y(2,28),Y(3,31),Y(4,30),Y(5,31),Y(6,30),Y(7,31),Y(8,31),Y(9,30),Y(10,31),Y(11,30),Y(12,31),Y(1,7)),yt=g(Y(1,31),Y(2,29),Y(3,31),Y(4,30),Y(5,31),Y(6,30),Y(7,31),Y(8,31),Y(9,30),Y(10,31),Y(11,30),Y(12,31),Y(1,7)),dt=a(1,29),ct=a(1,30),lt=a(1,31),ft=a(1,32),pt=g(ft,ct,ft,lt,ft,lt,ft,ft,lt,ft,lt,ft,ft.slice(0,7)),mt=g(ft,dt,ft,lt,ft,lt,ft,ft,lt,ft,lt,ft,ft.slice(0,7)),bt=a(-28,0),wt=a(-29,0),vt=a(-30,0),gt=a(-31,0),kt=g(gt,wt,gt,vt,gt,vt,gt,gt,vt,gt,vt,gt,gt.slice(0,7)),Et=g(gt,bt,gt,vt,gt,vt,gt,gt,vt,gt,vt,gt,gt.slice(0,7)),Tt=[0,31,60,91,121,152,182,213,244,274,305,335,366],Dt=[0,31,59,90,120,151,181,212,243,273,304,334,365],Ot=function(){for(var t=[],e=0;e<55;e++)t=t.concat(a(7));return t}();function xt(t,e){var n,r,i,a,o,s,u=new Date(Date.UTC(t,0,1)),h=M.isLeapYear(t)?366:365,y=M.isLeapYear(t+1)?366:365,d=M.toOrdinal(u),c=M.getWeekday(u),l=_(_({yearlen:h,nextyearlen:y,yearordinal:d,yearweekday:c},(n=t,r=M.isLeapYear(n)?366:365,i=new Date(Date.UTC(n,0,1)),a=M.getWeekday(i),365!=r?{mmask:yt,mdaymask:pt,nmdaymask:kt,wdaymask:Ot.slice(a),mrange:Tt}:{mmask:ht,mdaymask:mt,nmdaymask:Et,wdaymask:Ot.slice(a),mrange:Dt})),{wnomask:null});if(S(e.byweekno))return l;l.wnomask=Y(0,7+h);var f=o=U(7-c+e.wkst,7);s=4<=f?(f=0,l.yearlen+U(c-e.wkst,7)):h-f;for(var p=Math.floor(s/7),m=U(s,7),b=Math.floor(p+m/4),w=0;w<e.byweekno.length;w++){var v=e.byweekno[w];if(v<0&&(v+=b+1),0<v&&v<=b){var g=void 0;1<v?(g=f+7*(v-1),f!==o&&(g-=7-o)):g=f;for(var k=0;k<7&&(l.wnomask[g]=1,g++,l.wdaymask[g]!==e.wkst);k++);}}if(L(e.byweekno,1)){g=f+7*b;if(f!==o&&(g-=7-o),g<h)for(w=0;w<7&&(g+=l.wnomask[g]=1,l.wdaymask[g]!==e.wkst);w++);}if(f){var E=void 0;if(L(e.byweekno,-1))E=-1;else{var T=M.getWeekday(new Date(Date.UTC(t-1,0,1))),D=U(7-T.valueOf()+e.wkst,7),O=M.isLeapYear(t-1)?366:365,x=void 0;x=4<=D?(D=0,O+U(T-e.wkst,7)):h-f,E=Math.floor(52+U(x,7)/4)}if(L(e.byweekno,E))for(g=0;g<f;g++)l.wnomask[g]=1}return l}function Yt(t){this.options=t}var St=(Yt.prototype.rebuild=function(t,e){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=xt(t,n)),O(n.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var r=this.yearinfo,i=r.yearlen,a=r.mrange,o=r.wdaymask;this.monthinfo=function(t,e,n,r,i,a){var o={lastyear:t,lastmonth:e,nwdaymask:[]},s=[];if(a.freq===It.YEARLY)if(S(a.bymonth))s=[[0,n]];else for(var u=0;u<a.bymonth.length;u++)e=a.bymonth[u],s.push(r.slice(e-1,e+1));else a.freq===It.MONTHLY&&(s=[r.slice(e-1,e+1)]);if(S(s))return o;for(o.nwdaymask=Y(0,n),u=0;u<s.length;u++)for(var h=s[u],y=h[0],d=h[1]-1,c=0;c<a.bynweekday.length;c++){var l=void 0,f=a.bynweekday[c],p=f[0],m=f[1];m<0?(l=d+7*(m+1),l-=U(i[l]-p,7)):(l=y+7*(m-1),l+=U(7-i[l]+p,7)),y<=l&&l<=d&&(o.nwdaymask[l]=1)}return o}(t,e,i,a,o,n)}D(n.byeaster)&&(this.eastermask=function(t,e){void 0===e&&(e=0);var n=t%19,r=Math.floor(t/100),i=t%100,a=Math.floor(r/4),o=r%4,s=Math.floor((r+8)/25),u=Math.floor((r-s+1)/3),h=Math.floor(19*n+r-a-u+15)%30,y=Math.floor(i/4),d=i%4,c=Math.floor(32+2*o+2*y-h-d)%7,l=Math.floor((n+11*h+22*c)/451),f=Math.floor((h+c-7*l+114)/31),p=(h+c-7*l+114)%31+1,m=Date.UTC(t,f-1,p+e),b=Date.UTC(t,0,1);return[Math.ceil((m-b)/864e5)]}(t,n.byeaster))},Object.defineProperty(Yt.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!0,configurable:!0}),Object.defineProperty(Yt.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!0,configurable:!0}),Yt.prototype.ydayset=function(){return[a(this.yearlen),0,this.yearlen]},Yt.prototype.mdayset=function(t,e,n){for(var r=this.mrange[e-1],i=this.mrange[e],a=Y(null,this.yearlen),o=r;o<i;o++)a[o]=o;return[a,r,i]},Yt.prototype.wdayset=function(t,e,n){for(var r=Y(null,this.yearlen+7),i=M.toOrdinal(new Date(Date.UTC(t,e-1,n)))-this.yearordinal,a=i,o=0;o<7&&(r[i]=i,++i,this.wdaymask[i]!==this.options.wkst);o++);return[r,a,i]},Yt.prototype.ddayset=function(t,e,n){var r=Y(null,this.yearlen),i=M.toOrdinal(new Date(Date.UTC(t,e-1,n)))-this.yearordinal;return r[i]=i,[r,i,1+i]},Yt.prototype.htimeset=function(e,t,n,r){var i=this,a=[];return this.options.byminute.forEach(function(t){a=a.concat(i.mtimeset(e,t,n,r))}),M.sort(a),a},Yt.prototype.mtimeset=function(e,n,t,r){var i=this.options.bysecond.map(function(t){return new K(e,n,t,r)});return M.sort(i),i},Yt.prototype.stimeset=function(t,e,n,r){return[new K(t,e,n,r)]},Yt.prototype.getdayset=function(t){switch(t){case C.YEARLY:return this.ydayset.bind(this);case C.MONTHLY:return this.mdayset.bind(this);case C.WEEKLY:return this.wdayset.bind(this);case C.DAILY:default:return this.ddayset.bind(this)}},Yt.prototype.gettimeset=function(t){switch(t){case C.HOURLY:return this.htimeset.bind(this);case C.MINUTELY:return this.mtimeset.bind(this);case C.SECONDLY:return this.stimeset.bind(this)}},Yt);function Ut(t,e,n,r,i,a){for(var o=[],s=0;s<t.length;s++){var u=void 0,h=void 0,y=t[s];h=y<0?(u=Math.floor(y/e.length),U(y,e.length)):(u=Math.floor((y-1)/e.length),U(y-1,e.length));for(var d=[],c=n;c<r;c++){var l=a[c];D(l)&&d.push(l)}var f=void 0;f=u<0?d.slice(u)[0]:d[u];var p=e[h],m=M.fromOrdinal(i.yearordinal+f),b=M.combine(m,p);L(o,b)||o.push(b)}return M.sort(o),o}function Lt(t,e){var n=e.dtstart,r=e.freq,i=e.interval,a=e.until,o=e.bysetpos,s=e.count;if(0===s||0===i)return _t(t);var u=V.fromDate(n),h=new St(e);h.rebuild(u.year,u.month);for(var y=function(t,e,n){var r=n.freq,i=n.byhour,a=n.byminute,o=n.bysecond;if(P(r))return function(t){var r=t.dtstart.getTime()%1e3;if(!P(t.freq))return[];var i=[];return t.byhour.forEach(function(n){t.byminute.forEach(function(e){t.bysecond.forEach(function(t){i.push(new K(n,e,t,r))})})}),i}(n);if(r>=It.HOURLY&&O(i)&&!L(i,e.hour)||r>=It.MINUTELY&&O(a)&&!L(a,e.minute)||r>=It.SECONDLY&&O(o)&&!L(o,e.second))return[];return t.gettimeset(r)(e.hour,e.minute,e.second,e.millisecond)}(h,u,e);;){var d=h.getdayset(r)(u.year,u.month,u.day),c=d[0],l=d[1],f=d[2],p=Rt(c,l,f,h,e);if(O(o))for(var m=Ut(o,y,l,f,h,c),b=0;b<m.length;b++){var w=m[b];if(a&&a<w)return _t(t);if(n<=w){var v=Mt(w,e);if(!t.accept(v))return _t(t);if(s&&!--s)return _t(t)}}else for(b=l;b<f;b++){var g=c[b];if(D(g))for(var k=M.fromOrdinal(h.yearordinal+g),E=0;E<y.length;E++){var T=y[E];w=M.combine(k,T);if(a&&a<w)return _t(t);if(n<=w){v=Mt(w,e);if(!t.accept(v))return _t(t);if(s&&!--s)return _t(t)}}}if(0===e.interval)return _t(t);if(u.add(e,p),u.year>M.MAXYEAR)return _t(t);P(r)||(y=h.gettimeset(r)(u.hour,u.minute,u.second,0)),h.rebuild(u.year,u.month)}}function Mt(t,e){return new nt(t,e.tzid).rezonedDate()}function _t(t){return t.getValue()}function Rt(t,e,n,r,i){for(var a,o,s,u,h,y,d,c,l,f,p=!1,m=e;m<n;m++){var b=t[m];a=r,o=b,void 0,u=(s=i).bymonth,h=s.byweekno,y=s.byweekday,d=s.byeaster,c=s.bymonthday,l=s.bynmonthday,f=s.byyearday,(p=O(u)&&!L(u,a.mmask[o])||O(h)&&!a.wnomask[o]||O(y)&&!L(y,a.wdaymask[o])||O(a.nwdaymask)&&!a.nwdaymask[o]||null!==d&&!L(a.eastermask,o)||(O(c)||O(l))&&!L(c,a.mdaymask[o])&&!L(l,a.nmdaymask[o])||O(f)&&(o<a.yearlen&&!L(f,o+1)&&!L(f,-a.yearlen+o)||o>=a.yearlen&&!L(f,o+1-a.yearlen)&&!L(f,-a.nextyearlen+o-a.yearlen)))&&(t[b]=null)}return p}var At={MO:new f(0),TU:new f(1),WE:new f(2),TH:new f(3),FR:new f(4),SA:new f(5),SU:new f(6)},Nt={freq:C.YEARLY,dtstart:null,interval:1,wkst:At.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},Ct=Object.keys(Nt),It=(Wt.parseText=function(t,e){return q(t,e)},Wt.fromText=function(t,e){return void 0===(n=e)&&(n=A),new It(q(t,n)||void 0);var n},Wt.fromString=function(t){return new Wt(Wt.parseString(t)||void 0)},Wt.prototype._iter=function(t){return Lt(t,this.options)},Wt.prototype._cacheGet=function(t,e){return!!this._cache&&this._cache._cacheGet(t,e)},Wt.prototype._cacheAdd=function(t,e,n){if(this._cache)return this._cache._cacheAdd(t,e,n)},Wt.prototype.all=function(t){if(t)return this._iter(new R("all",{},t));var e=this._cacheGet("all");return!1===e&&(e=this._iter(new l("all",{})),this._cacheAdd("all",e)),e},Wt.prototype.between=function(t,e,n,r){if(void 0===n&&(n=!1),!M.isValidDate(t)||!M.isValidDate(e))throw new Error("Invalid date passed in to RRule.between");var i={before:e,after:t,inc:n};if(r)return this._iter(new R("between",i,r));var a=this._cacheGet("between",i);return!1===a&&(a=this._iter(new l("between",i)),this._cacheAdd("between",a,i)),a},Wt.prototype.before=function(t,e){if(void 0===e&&(e=!1),!M.isValidDate(t))throw new Error("Invalid date passed in to RRule.before");var n={dt:t,inc:e},r=this._cacheGet("before",n);return!1===r&&(r=this._iter(new l("before",n)),this._cacheAdd("before",r,n)),r},Wt.prototype.after=function(t,e){if(void 0===e&&(e=!1),!M.isValidDate(t))throw new Error("Invalid date passed in to RRule.after");var n={dt:t,inc:e},r=this._cacheGet("after",n);return!1===r&&(r=this._iter(new l("after",n)),this._cacheAdd("after",r,n)),r},Wt.prototype.count=function(){return this.all().length},Wt.prototype.toString=function(){return it(this.origOptions)},Wt.prototype.toText=function(t,e,n){return new W(this,t,e,n).toString()},Wt.prototype.isFullyConvertibleToText=function(){return F(this)},Wt.prototype.clone=function(){return new Wt(this.origOptions)},Wt.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],Wt.YEARLY=C.YEARLY,Wt.MONTHLY=C.MONTHLY,Wt.WEEKLY=C.WEEKLY,Wt.DAILY=C.DAILY,Wt.HOURLY=C.HOURLY,Wt.MINUTELY=C.MINUTELY,Wt.SECONDLY=C.SECONDLY,Wt.MO=At.MO,Wt.TU=At.TU,Wt.WE=At.WE,Wt.TH=At.TH,Wt.FR=At.FR,Wt.SA=At.SA,Wt.SU=At.SU,Wt.parseString=Q,Wt.optionsToString=it,Wt);function Wt(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this._cache=e?null:new st,this.origOptions=G(t);var n=function(t){var e=_(_({},Nt),G(t));if(D(e.byeaster)&&(e.freq=It.YEARLY),!D(e.freq)||!It.FREQUENCIES[e.freq])throw new Error("Invalid frequency: "+e.freq+" "+t.freq);if(e.dtstart||(e.dtstart=new Date((new Date).setMilliseconds(0))),D(e.wkst)?p(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=It.MO.weekday,D(e.bysetpos)){p(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var n=0;n<e.bysetpos.length;n++){if(0===(a=e.bysetpos[n])||!(-366<=a&&a<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||O(e.byweekno)||O(e.byyearday)||Boolean(e.bymonthday)||O(e.bymonthday)||D(e.byweekday)||D(e.byeaster)))switch(e.freq){case It.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case It.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case It.WEEKLY:e.byweekday=[M.getWeekday(e.dtstart)]}if(D(e.bymonth)&&!m(e.bymonth)&&(e.bymonth=[e.bymonth]),D(e.byyearday)&&!m(e.byyearday)&&p(e.byyearday)&&(e.byyearday=[e.byyearday]),D(e.bymonthday))if(m(e.bymonthday)){var r=[],i=[];for(n=0;n<e.bymonthday.length;n++){var a;0<(a=e.bymonthday[n])?r.push(a):a<0&&i.push(a)}e.bymonthday=r,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);else e.bymonthday=[],e.bynmonthday=[];if(D(e.byweekno)&&!m(e.byweekno)&&(e.byweekno=[e.byweekno]),D(e.byweekday))if(p(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(h(e.byweekday))e.byweekday=[f.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof f)!e.byweekday.n||e.freq>It.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{var o=[],s=[];for(n=0;n<e.byweekday.length;n++){var u=e.byweekday[n];p(u)?o.push(u):h(u)?o.push(f.fromStr(u).weekday):!u.n||e.freq>It.MONTHLY?o.push(u.weekday):s.push([u.weekday,u.n])}e.byweekday=O(o)?o:null,e.bynweekday=O(s)?s:null}else e.bynweekday=null;return D(e.byhour)?p(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<It.HOURLY?[e.dtstart.getUTCHours()]:null,D(e.byminute)?p(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<It.MINUTELY?[e.dtstart.getUTCMinutes()]:null,D(e.bysecond)?p(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<It.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}(t).parsedOptions;this.options=n}var jt={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function Ht(t,e){var s=[],u=[],h=[],y=[],n=$(t),r=n.dtstart,d=n.tzid;return function(t,e){void 0===e&&(e=!1);if(!(t=t&&t.trim()))throw new Error("Invalid empty string");if(!e)return t.split(/\s/);var n=t.split("\n"),r=0;for(;r<n.length;){var i=n[r]=n[r].replace(/\s+$/g,"");i?0<r&&" "===i[0]?(n[r-1]+=i.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}(t,e.unfold).forEach(function(t){if(t){var e=function(t){var e=function(t){if(-1===t.indexOf(":"))return{name:"RRULE",value:t};var e=c(t,":",1),n=e[0],r=e[1];return{name:n,value:r}}(t),n=e.name,r=e.value,i=n.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}(t),n=e.name,r=e.parms,i=e.value;switch(n.toUpperCase()){case"RRULE":if(r.length)throw new Error("unsupported RRULE parm: "+r.join(","));s.push(Q(t));break;case"RDATE":var a=/RDATE(?:;TZID=([^:=]+))?/i.exec(t),o=(a[0],a[1]);o&&!d&&(d=o),u=u.concat(zt(i,r));break;case"EXRULE":if(r.length)throw new Error("unsupported EXRULE parm: "+r.join(","));h.push(Q(i));break;case"EXDATE":y=y.concat(zt(i,r));break;case"DTSTART":break;default:throw new Error("unsupported property: "+n)}}}),{dtstart:r,tzid:d,rrulevals:s,rdatevals:u,exrulevals:h,exdatevals:y}}function qt(t,e){return void 0===e&&(e={}),function(t,e){var n=Ht(t,e),r=n.rrulevals,i=n.rdatevals,a=n.exrulevals,o=n.exdatevals,s=n.dtstart,u=n.tzid,h=!1===e.cache;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||1<r.length||i.length||a.length||o.length){var y=new Bt(h);return y.dtstart(s),y.tzid(u||void 0),r.forEach(function(t){y.rrule(new It(Pt(t,s,u),h))}),i.forEach(function(t){y.rdate(t)}),a.forEach(function(t){y.exrule(new It(Pt(t,s,u),h))}),o.forEach(function(t){y.exdate(t)}),e.compatible&&e.dtstart&&y.rdate(s),y}var d=r[0]||{};return new It(Pt(d,d.dtstart||e.dtstart||s,d.tzid||e.tzid||u),h)}(t,function(t){var e=[],n=Object.keys(t),r=Object.keys(jt);if(n.forEach(function(t){L(r,t)||e.push(t)}),e.length)throw new Error("Invalid options: "+e.join(", "));return _(_({},jt),t)}(e))}function Pt(t,e,n){return _(_({},t),{dtstart:e,tzid:n})}function zt(t,e){return e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)}),t.split(",").map(function(t){return M.untilStringToDate(t)})}function Ft(r){var i=this;return function(t){if(void 0!==t&&(i["_"+r]=t),void 0!==i["_"+r])return i["_"+r];for(var e=0;e<i._rrule.length;e++){var n=i._rrule[e].origOptions[r];if(n)return n}}}var Kt,Bt=(w(Zt,Kt=It),Zt.prototype._iter=function(t){return function(e,t,r,n,i,a){var o={},s=e.accept;function u(e,n){r.forEach(function(t){t.between(e,n,!0).forEach(function(t){o[Number(t)]=!0})})}i.forEach(function(t){var e=new nt(t,a).rezonedDate();o[Number(e)]=!0}),e.accept=function(t){var e=Number(t);return isNaN(e)?s.call(this,t):!(!o[e]&&(u(new Date(e-1),new Date(e+1)),!o[e]))||(o[e]=!0,s.call(this,t))},"between"===e.method&&(u(e.args.after,e.args.before),e.accept=function(t){var e=Number(t);return!!o[e]||(o[e]=!0,s.call(this,t))});for(var h=0;h<n.length;h++){var y=new nt(n[h],a).rezonedDate();if(!e.accept(new Date(y.getTime())))break}t.forEach(function(t){Lt(e,t.options)});var d=e._result;switch(M.sort(d),e.method){case"all":case"between":return d;case"before":return d.length&&d[d.length-1]||null;case"after":default:return d.length&&d[0]||null}}(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},Zt.prototype.rrule=function(t){Vt(t,this._rrule)},Zt.prototype.exrule=function(t){Vt(t,this._exrule)},Zt.prototype.rdate=function(t){Xt(t,this._rdate)},Zt.prototype.exdate=function(t){Xt(t,this._exdate)},Zt.prototype.rrules=function(){return this._rrule.map(function(t){return qt(t.toString())})},Zt.prototype.exrules=function(){return this._exrule.map(function(t){return qt(t.toString())})},Zt.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},Zt.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},Zt.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(it({dtstart:this._dtstart}))),this._rrule.forEach(function(t){e=e.concat(t.toString().split("\n"))}),this._exrule.forEach(function(t){e=e.concat(t.toString().split("\n").map(function(t){return t.replace(/^RRULE:/,"EXRULE:")}).filter(function(t){return!/^DTSTART/.test(t)}))}),this._rdate.length&&e.push(Gt("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(Gt("EXDATE",this._exdate,this.tzid())),e},Zt.prototype.toString=function(){return this.valueOf().join("\n")},Zt.prototype.clone=function(){var e=new Zt(!!this._cache);return this._rrule.forEach(function(t){return e.rrule(t.clone())}),this._exrule.forEach(function(t){return e.exrule(t.clone())}),this._rdate.forEach(function(t){return e.rdate(new Date(t.getTime()))}),this._exdate.forEach(function(t){return e.exdate(new Date(t.getTime()))}),e},Zt);function Zt(t){void 0===t&&(t=!1);var e=Kt.call(this,{},t)||this;return e.dtstart=Ft.apply(e,["dtstart"]),e.tzid=Ft.apply(e,["tzid"]),e._rrule=[],e._rdate=[],e._exrule=[],e._exdate=[],e}function Vt(t,e){if(!(t instanceof It))throw new TypeError(String(t)+" is not RRule instance");L(e.map(String),String(t))||e.push(t)}function Xt(t,e){if(!(t instanceof Date))throw new TypeError(String(t)+" is not Date instance");L(e.map(Number),Number(t))||(e.push(t),M.sort(e))}function Gt(t,e,n){var r=!n||"UTC"===n.toUpperCase();return(r?t+":":t+";TZID="+n+":")+e.map(function(t){return M.timeToUntilString(t.valueOf(),r)}).join(",")}n.d(e,"rrulestr",function(){return qt}),n.d(e,"Frequency",function(){return C}),n.d(e,"Weekday",function(){return f}),n.d(e,"RRule",function(){return It}),n.d(e,"RRuleSet",function(){return Bt}); | ||
/*! | ||
* rrule.js - Library for working with recurrence rules for calendar dates. | ||
* https://github.com/jakubroztocil/rrule | ||
* | ||
* Copyright 2010, Jakub Roztocil and Lars Schoning | ||
* Licenced under the BSD licence. | ||
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE | ||
* | ||
* Based on: | ||
* python-dateutil - Extensions to the standard Python datetime module. | ||
* Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net> | ||
* Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi> | ||
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE | ||
* | ||
*/e.default=It}],i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0);function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var n,r}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rrule=e():t.rrule=e()}("undefined"!=typeof self?self:this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Frequency:()=>U,RRule:()=>Dt,RRuleSet:()=>Mt,Weekday:()=>r,rrulestr:()=>Yt});var n=["MO","TU","WE","TH","FR","SA","SU"],r=function(){function t(t,e){if(0===e)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return t.fromStr=function(e){return new t(n.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=n[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}(),i=function(t){return null!=t},o=function(t){return"number"==typeof t},a=function(t){return"string"==typeof t&&n.includes(t)},s=Array.isArray,u=function(t,e){void 0===e&&(e=t),1===arguments.length&&(e=t,t=0);for(var n=[],r=t;r<e;r++)n.push(r);return n},h=function(t,e){var n=0,r=[];if(s(t))for(;n<e;n++)r[n]=[].concat(t);else for(;n<e;n++)r[n]=t;return r};function y(t,e,n){void 0===n&&(n=" ");var r=String(t);return e>>=0,r.length>e?String(r):((e-=r.length)>n.length&&(n+=h(n,e/n.length)),n.slice(0,e)+String(r))}var c,d=function(t,e){var n=t%e;return n*e<0?n+e:n},l=function(t,e){return{div:Math.floor(t/e),mod:d(t,e)}},f=function(t){return!i(t)||0===t.length},p=function(t){return!f(t)},m=function(t,e){return p(t)&&-1!==t.indexOf(e)};!function(t){t.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],t.ONE_DAY=864e5,t.MAXYEAR=9999,t.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),t.PY_WEEKDAYS=[6,0,1,2,3,4,5],t.getYearDay=function(e){var n=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((n.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/t.ONE_DAY)+1},t.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},t.isDate=function(t){return t instanceof Date},t.isValidDate=function(e){return t.isDate(e)&&!isNaN(e.getTime())},t.tzOffset=function(t){return 60*t.getTimezoneOffset()*1e3},t.daysBetween=function(e,n){var r=e.getTime()-t.tzOffset(e)-(n.getTime()-t.tzOffset(n));return Math.round(r/t.ONE_DAY)},t.toOrdinal=function(e){return t.daysBetween(e,t.ORDINAL_BASE)},t.fromOrdinal=function(e){return new Date(t.ORDINAL_BASE.getTime()+e*t.ONE_DAY)},t.getMonthDays=function(e){var n=e.getUTCMonth();return 1===n&&t.isLeapYear(e.getUTCFullYear())?29:t.MONTH_DAYS[n]},t.getWeekday=function(e){return t.PY_WEEKDAYS[e.getUTCDay()]},t.monthRange=function(e,n){var r=new Date(Date.UTC(e,n,1));return[t.getWeekday(r),t.getMonthDays(r)]},t.combine=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()))},t.clone=function(t){return new Date(t.getTime())},t.cloneDates=function(e){for(var n=[],r=0;r<e.length;r++)n.push(t.clone(e[r]));return n},t.sort=function(t){t.sort((function(t,e){return t.getTime()-e.getTime()}))},t.timeToUntilString=function(t,e){void 0===e&&(e=!0);var n=new Date(t);return[y(n.getUTCFullYear().toString(),4,"0"),y(n.getUTCMonth()+1,2,"0"),y(n.getUTCDate(),2,"0"),"T",y(n.getUTCHours(),2,"0"),y(n.getUTCMinutes(),2,"0"),y(n.getUTCSeconds(),2,"0"),e?"Z":""].join("")},t.untilStringToDate=function(t){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(t);if(!e)throw new 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))}}(c||(c={}));const b=c;const w=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,n=this.maxDate&&t>this.maxDate;if("between"===this.method){if(e)return!0;if(n)return!1}else if("before"===this.method){if(n)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}();var v=function(t,e){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},v(t,e)};function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var k=function(){return k=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},k.apply(this,arguments)};Object.create;function E(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;const T=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.iterator=r,i}return g(e,t),e.prototype.add=function(t){return!!this.iterator(t,this._result.length)&&(this._result.push(t),!0)},e}(w);const D={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 O=function(t,e){return-1!==t.indexOf(e)},x=function(t){return t.toString()},Y=function(t,e,n){return"".concat(e," ").concat(n,", ").concat(t)};const S=function(){function t(t,e,n,r){if(void 0===e&&(e=x),void 0===n&&(n=D),void 0===r&&(r=Y),this.text=[],this.language=n||D,this.gettext=e,this.dateFormatter=r,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var o=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);o.sort((function(t,e){return t-e})),a.sort((function(t,e){return e-t})),this.bymonthday=o.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(i(this.origOptions.byweekday)){var u=s(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],h=String(u);this.byweekday={allWeeks:u.filter((function(t){return!t.n})),someWeeks:u.filter((function(t){return Boolean(t.n)})),isWeekdays:-1!==h.indexOf("MO")&&-1!==h.indexOf("TU")&&-1!==h.indexOf("WE")&&-1!==h.indexOf("TH")&&-1!==h.indexOf("FR")&&-1===h.indexOf("SA")&&-1===h.indexOf("SU"),isEveryDay:-1!==h.indexOf("MO")&&-1!==h.indexOf("TU")&&-1!==h.indexOf("WE")&&-1!==h.indexOf("TH")&&-1!==h.indexOf("FR")&&-1!==h.indexOf("SA")&&-1!==h.indexOf("SU")};var y=function(t,e){return t.weekday-e.weekday};this.byweekday.allWeeks.sort(y),this.byweekday.someWeeks.sort(y),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))return!1;if(e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(O(["dtstart","wkst","freq"],n))return!0;if(!O(t.IMPLEMENTED[e.options.freq],n))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[Dt.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var n=this.options.until;this.add(this.dateFormatter(n.getUTCFullYear(),this.language.monthNames[n.getUTCMonth()],n.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("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(this.plural(this.options.interval)?t("hours"):t("hour"))},t.prototype.MINUTELY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("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(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("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(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("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())},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(this.plural(this.options.interval)?t("months"):t("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(this.plural(this.options.interval)?t("years"):t("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(this.plural(this.options.byweekno.length)?t("weeks"):t("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){var e;t=parseInt(t.toString(),10);var n=this.gettext;if(-1===t)return n("last");var r=Math.abs(t);switch(r){case 1:case 21:case 31:e=r+n("st");break;case 2:case 22:e=r+n("nd");break;case 3:case 23:e=r+n("rd");break;default:e=r+n("th")}return t<0?e+" "+n("last"):e},t.prototype.monthtext=function(t){return this.language.monthNames[t-1]},t.prototype.weekdaytext=function(t){var e=o(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,n,r){var i=this;void 0===r&&(r=","),s(t)||(t=[t]);e=e||function(t){return t.toString()};var o=function(t){return e&&e.call(i,t)};return n?function(t,e,n){for(var r="",i=0;i<t.length;i++)0!==i&&(i===t.length-1?r+=" "+n+" ":r+=e+" "),r+=t[i];return r}(t.map(o),r,n):t.map(o).join(r+" ")},t}();var U,L=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(){var t,e;this.symbol=null,this.value=null;do{if(this.done)return!1;for(var n in t=null,this.rules){var r=this.rules[n].exec(this.text);r&&(null===t||r[0].length>t[0].length)&&(t=r,e=n)}if(null!=t&&(this.text=this.text.substr(t[0].length),""===this.text&&(this.done=!0)),null==t)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===e);return this.symbol=e,this.value=t,!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 new Error("expected "+t+" but found "+this.symbol)},t}();function M(t,e){void 0===e&&(e=D);var n={},r=new L(e.tokens);return r.start(t)?(function(){r.expect("every");var t=r.acceptNumber();t&&(n.interval=parseInt(t[0],10));if(r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":n.freq=Dt.DAILY,r.nextSymbol()&&(!function(){if(!r.accept("at"))return;do{var t=r.acceptNumber();if(!t)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(n.byhour=[parseInt(t[0],10)];r.accept("comma");){if(!(t=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected hour");n.byhour.push(parseInt(t[0],10))}}while(r.accept("comma")||r.accept("at"))}(),u());break;case"weekday(s)":n.freq=Dt.WEEKLY,n.byweekday=[Dt.MO,Dt.TU,Dt.WE,Dt.TH,Dt.FR],r.nextSymbol(),u();break;case"week(s)":n.freq=Dt.WEEKLY,r.nextSymbol()&&(i(),u());break;case"hour(s)":n.freq=Dt.HOURLY,r.nextSymbol()&&(i(),u());break;case"minute(s)":n.freq=Dt.MINUTELY,r.nextSymbol()&&(i(),u());break;case"month(s)":n.freq=Dt.MONTHLY,r.nextSymbol()&&(i(),u());break;case"year(s)":n.freq=Dt.YEARLY,r.nextSymbol()&&(i(),u());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":n.freq=Dt.WEEKLY;var e=r.symbol.substr(0,2).toUpperCase();if(n.byweekday=[Dt[e]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var h=a();if(!h)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");n.byweekday.push(Dt[h]),r.nextSymbol()}!function(){r.accept("on"),r.accept("the");var t=s();if(!t)return;n.bymonthday=[t],r.nextSymbol();for(;r.accept("comma");){if(!(t=s()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");n.bymonthday.push(t),r.nextSymbol()}}(),u();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(n.freq=Dt.YEARLY,n.bymonth=[o()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var y=o();if(!y)throw new Error("Unexpected symbol "+r.symbol+", expected month");n.bymonth.push(y),r.nextSymbol()}i(),u();break;default:throw new Error("Unknown symbol")}}(),n):null;function i(){var t=r.accept("on"),e=r.accept("the");if(t||e)do{var i=s(),u=a(),h=o();if(i)u?(r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(Dt[u].nth(i))):(n.bymonthday||(n.bymonthday=[]),n.bymonthday.push(i),r.accept("day(s)"));else if(u)r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(Dt[u]);else if("weekday(s)"===r.symbol)r.nextSymbol(),n.byweekday||(n.byweekday=[Dt.MO,Dt.TU,Dt.WE,Dt.TH,Dt.FR]);else if("week(s)"===r.symbol){r.nextSymbol();var y=r.acceptNumber();if(!y)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(n.byweekno=[parseInt(y[0],10)];r.accept("comma");){if(!(y=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");n.byweekno.push(parseInt(y[0],10))}}else{if(!h)return;r.nextSymbol(),n.bymonth||(n.bymonth=[]),n.bymonth.push(h)}}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function o(){switch(r.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 a(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function s(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var t=parseInt(r.value[1],10);if(t<-366||t>366)throw new Error("Nth out of range: "+t);return r.nextSymbol(),r.accept("last")?-t:t;default:return!1}}function u(){if("until"===r.symbol){var t=Date.parse(r.text);if(!t)throw new Error("Cannot parse until date:"+r.text);n.until=new Date(t)}else r.accept("for")&&(n.count=parseInt(r.value[0],10),r.expect("number"))}}function _(t){return t<U.HOURLY}!function(t){t[t.YEARLY=0]="YEARLY",t[t.MONTHLY=1]="MONTHLY",t[t.WEEKLY=2]="WEEKLY",t[t.DAILY=3]="DAILY",t[t.HOURLY=4]="HOURLY",t[t.MINUTELY=5]="MINUTELY",t[t.SECONDLY=6]="SECONDLY"}(U||(U={}));var R=function(t,e){return void 0===e&&(e=D),new Dt(M(t,e)||void 0)},A=["count","until","interval","byweekday","bymonthday","bymonth"];S.IMPLEMENTED=[],S.IMPLEMENTED[U.HOURLY]=A,S.IMPLEMENTED[U.MINUTELY]=A,S.IMPLEMENTED[U.DAILY]=["byhour"].concat(A),S.IMPLEMENTED[U.WEEKLY]=A,S.IMPLEMENTED[U.MONTHLY]=A,S.IMPLEMENTED[U.YEARLY]=["byweekno","byyearday"].concat(A);var N=S.isFullyConvertible,C=function(){function t(t,e,n,r){this.hour=t,this.minute=e,this.second=n,this.millisecond=r||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 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},t}(),I=function(t){function e(e,n,r,i,o,a,s){var u=t.call(this,i,o,a,s)||this;return u.year=e,u.month=n,u.day=r,u}return g(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 c.getWeekday(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),n=d(this.month,12);this.month=n,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,n){for(e&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var r=l(this.hour,24),i=r.div,o=r.mod;if(i&&(this.hour=o,this.addDaily(i)),f(n)||m(n,this.hour))break}},e.prototype.addMinutes=function(t,e,n,r){for(e&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var i=l(this.minute,60),o=i.div,a=i.mod;if(o&&(this.minute=a,this.addHours(o,!1,n)),(f(n)||m(n,this.hour))&&(f(r)||m(r,this.minute)))break}},e.prototype.addSeconds=function(t,e,n,r,i){for(e&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var o=l(this.second,60),a=o.div,s=o.mod;if(a&&(this.second=s,this.addMinutes(a,!1,n,r)),(f(n)||m(n,this.hour))&&(f(r)||m(r,this.minute))&&(f(i)||m(i,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=c.monthRange(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>c.MAXYEAR))return;t=c.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,e){var n=t.freq,r=t.interval,i=t.wkst,o=t.byhour,a=t.byminute,s=t.bysecond;switch(n){case U.YEARLY:return this.addYears(r);case U.MONTHLY:return this.addMonths(r);case U.WEEKLY:return this.addWeekly(r,i);case U.DAILY:return this.addDaily(r);case U.HOURLY:return this.addHours(r,e,o);case U.MINUTELY:return this.addMinutes(r,e,o,a);case U.SECONDLY:return this.addSeconds(r,e,o,a,s)}},e}(C);function W(t){for(var e=[],n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];m(Tt,i)||e.push(i),b.isDate(t[i])&&!b.isValidDate(t[i])&&e.push(i)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return k({},t)}function j(t){var e=k(k({},Et),W(t));if(i(e.byeaster)&&(e.freq=Dt.YEARLY),!i(e.freq)||!Dt.FREQUENCIES[e.freq])throw new Error("Invalid frequency: ".concat(e.freq," ").concat(t.freq));if(e.dtstart||(e.dtstart=new Date((new Date).setMilliseconds(0))),i(e.wkst)?o(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=Dt.MO.weekday,i(e.bysetpos)){o(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var n=0;n<e.bysetpos.length;n++){if(0===(y=e.bysetpos[n])||!(y>=-366&&y<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||p(e.byweekno)||p(e.byyearday)||Boolean(e.bymonthday)||p(e.bymonthday)||i(e.byweekday)||i(e.byeaster)))switch(e.freq){case Dt.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case Dt.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case Dt.WEEKLY:e.byweekday=[b.getWeekday(e.dtstart)]}if(i(e.bymonth)&&!s(e.bymonth)&&(e.bymonth=[e.bymonth]),i(e.byyearday)&&!s(e.byyearday)&&o(e.byyearday)&&(e.byyearday=[e.byyearday]),i(e.bymonthday))if(s(e.bymonthday)){var u=[],h=[];for(n=0;n<e.bymonthday.length;n++){var y;(y=e.bymonthday[n])>0?u.push(y):y<0&&h.push(y)}e.bymonthday=u,e.bynmonthday=h}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);else e.bymonthday=[],e.bynmonthday=[];if(i(e.byweekno)&&!s(e.byweekno)&&(e.byweekno=[e.byweekno]),i(e.byweekday))if(o(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(a(e.byweekday))e.byweekday=[r.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof r)!e.byweekday.n||e.freq>Dt.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{var c=[],d=[];for(n=0;n<e.byweekday.length;n++){var l=e.byweekday[n];o(l)?c.push(l):a(l)?c.push(r.fromStr(l).weekday):!l.n||e.freq>Dt.MONTHLY?c.push(l.weekday):d.push([l.weekday,l.n])}e.byweekday=p(c)?c:null,e.bynweekday=p(d)?d:null}else e.bynweekday=null;return i(e.byhour)?o(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<Dt.HOURLY?[e.dtstart.getUTCHours()]:null,i(e.byminute)?o(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<Dt.MINUTELY?[e.dtstart.getUTCMinutes()]:null,i(e.bysecond)?o(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<Dt.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function H(t){var e=t.split("\n").map(P).filter((function(t){return null!==t}));return k(k({},e[0]),e[1])}function q(t){var e={},n=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(t);if(!n)return e;var r=n[1],i=n[2];return r&&(e.tzid=r),e.dtstart=b.untilStringToDate(i),e}function P(t){if(!(t=t.replace(/^\s+|\s+$/,"")).length)return null;var e=/^([A-Z]+?)[:;]/.exec(t.toUpperCase());if(!e)return z(t);var n=e[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return z(t);case"DTSTART":return q(t);default:throw new Error("Unsupported RFC prop ".concat(n," in ").concat(t))}}function z(t){var e=q(t.replace(/^RRULE:/i,""));return t.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach((function(n){var i=n.split("="),o=i[0],a=i[1];switch(o.toUpperCase()){case"FREQ":e.freq=U[a.toUpperCase()];break;case"WKST":e.wkst=kt[a.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var s=function(t){if(-1!==t.indexOf(",")){return t.split(",").map(F)}return F(t)}(a),u=o.toLowerCase();e[u]=s;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=function(t){return t.split(",").map((function(t){if(2===t.length)return kt[t];var e=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!e||e.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var n=Number(e[1]),i=e[2],o=kt[i].weekday;return new r(o,n)}))}(a);break;case"DTSTART":case"TZID":var h=q(t);e.tzid=h.tzid,e.dtstart=h.dtstart;break;case"UNTIL":e.until=b.untilStringToDate(a);break;case"BYEASTER":e.byeaster=Number(a);break;default:throw new Error("Unknown RRULE property '"+o+"'")}})),e}function F(t){return/^[+-]?\d+$/.test(t)?Number(t):t}var K=function(){function t(t,e){if(isNaN(t.getTime()))throw new 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=b.timeToUntilString(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(){var t;if(this.isUTC)return this.date;var e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:e})),r=new Date(this.date.toLocaleString(void 0,{timeZone:null!==(t=this.tzid)&&void 0!==t?t:"UTC"})).getTime()-n.getTime();return new Date(this.date.getTime()-r)},t}();function B(t){for(var e,n=[],a="",u=Object.keys(t),h=Object.keys(Et),y=0;y<u.length;y++)if("tzid"!==u[y]&&m(h,u[y])){var c=u[y].toUpperCase(),d=t[u[y]],l="";if(i(d)&&(!s(d)||d.length)){switch(c){case"FREQ":l=Dt.FREQUENCIES[t.freq];break;case"WKST":l=o(d)?new r(d).toString():d.toString();break;case"BYWEEKDAY":c="BYDAY",l=(e=d,s(e)?e:[e]).map((function(t){return t instanceof r?t:s(t)?new r(t[0],t[1]):new r(t)})).toString();break;case"DTSTART":a=Z(d,t.tzid);break;case"UNTIL":l=b.timeToUntilString(d,!t.tzid);break;default:if(s(d)){for(var f=[],p=0;p<d.length;p++)f[p]=String(d[p]);l=f.toString()}else l=String(d)}l&&n.push([c,l])}}var w=n.map((function(t){var e=t[0],n=t[1];return"".concat(e,"=").concat(n.toString())})).join(";"),v="";return""!==w&&(v="RRULE:".concat(w)),[a,v].filter((function(t){return!!t})).join("\n")}function Z(t,e){return t?"DTSTART"+new K(new Date(t),e).toString():""}function V(t,e){return Array.isArray(t)?!!Array.isArray(e)&&(t.length===e.length&&t.every((function(t,n){return t.getTime()===e[n].getTime()}))):t instanceof Date?e instanceof Date&&t.getTime()===e.getTime():t===e}var X=function(){function t(){this.all=!1,this.before=[],this.after=[],this.between=[]}return t.prototype._cacheAdd=function(t,e,n){e&&(e=e instanceof Date?b.clone(e):b.cloneDates(e)),"all"===t?this.all=e:(n._value=e,this[t].push(n))},t.prototype._cacheGet=function(t,e){var n=!1,r=e?Object.keys(e):[],i=function(t){for(var n=0;n<r.length;n++){var i=r[n];if(!V(e[i],t[i]))return!0}return!1},o=this[t];if("all"===t)n=this.all;else if(s(o))for(var a=0;a<o.length;a++){var u=o[a];if(!r.length||!i(u)){n=u._value;break}}if(!n&&this.all){var h=new w(t,e);for(a=0;a<this.all.length&&h.accept(this.all[a]);a++);n=h.getValue(),this._cacheAdd(t,n,e)}return s(n)?b.cloneDates(n):n instanceof Date?b.clone(n):n},t}(),G=E(E(E(E(E(E(E(E(E(E(E(E(E([],h(1,31),!0),h(2,28),!0),h(3,31),!0),h(4,30),!0),h(5,31),!0),h(6,30),!0),h(7,31),!0),h(8,31),!0),h(9,30),!0),h(10,31),!0),h(11,30),!0),h(12,31),!0),h(1,7),!0),Q=E(E(E(E(E(E(E(E(E(E(E(E(E([],h(1,31),!0),h(2,29),!0),h(3,31),!0),h(4,30),!0),h(5,31),!0),h(6,30),!0),h(7,31),!0),h(8,31),!0),h(9,30),!0),h(10,31),!0),h(11,30),!0),h(12,31),!0),h(1,7),!0),$=u(1,29),J=u(1,30),tt=u(1,31),et=u(1,32),nt=E(E(E(E(E(E(E(E(E(E(E(E(E([],et,!0),J,!0),et,!0),tt,!0),et,!0),tt,!0),et,!0),et,!0),tt,!0),et,!0),tt,!0),et,!0),et.slice(0,7),!0),rt=E(E(E(E(E(E(E(E(E(E(E(E(E([],et,!0),$,!0),et,!0),tt,!0),et,!0),tt,!0),et,!0),et,!0),tt,!0),et,!0),tt,!0),et,!0),et.slice(0,7),!0),it=u(-28,0),ot=u(-29,0),at=u(-30,0),st=u(-31,0),ut=E(E(E(E(E(E(E(E(E(E(E(E(E([],st,!0),ot,!0),st,!0),at,!0),st,!0),at,!0),st,!0),st,!0),at,!0),st,!0),at,!0),st,!0),st.slice(0,7),!0),ht=E(E(E(E(E(E(E(E(E(E(E(E(E([],st,!0),it,!0),st,!0),at,!0),st,!0),at,!0),st,!0),st,!0),at,!0),st,!0),at,!0),st,!0),st.slice(0,7),!0),yt=[0,31,60,91,121,152,182,213,244,274,305,335,366],ct=[0,31,59,90,120,151,181,212,243,273,304,334,365],dt=function(){for(var t=[],e=0;e<55;e++)t=t.concat(u(7));return t}();function lt(t,e){var n,r,i=new Date(Date.UTC(t,0,1)),o=b.isLeapYear(t)?366:365,a=b.isLeapYear(t+1)?366:365,s=b.toOrdinal(i),u=b.getWeekday(i),y=k(k({yearlen:o,nextyearlen:a,yearordinal:s,yearweekday:u},function(t){var e=b.isLeapYear(t)?366:365,n=new Date(Date.UTC(t,0,1)),r=b.getWeekday(n);if(365===e)return{mmask:G,mdaymask:rt,nmdaymask:ht,wdaymask:dt.slice(r),mrange:ct};return{mmask:Q,mdaymask:nt,nmdaymask:ut,wdaymask:dt.slice(r),mrange:yt}}(t)),{wnomask:null});if(f(e.byweekno))return y;y.wnomask=h(0,o+7);var c=n=d(7-u+e.wkst,7);c>=4?(c=0,r=y.yearlen+d(u-e.wkst,7)):r=o-c;for(var l=Math.floor(r/7),p=d(r,7),w=Math.floor(l+p/4),v=0;v<e.byweekno.length;v++){var g=e.byweekno[v];if(g<0&&(g+=w+1),g>0&&g<=w){var E=void 0;g>1?(E=c+7*(g-1),c!==n&&(E-=7-n)):E=c;for(var T=0;T<7&&(y.wnomask[E]=1,E++,y.wdaymask[E]!==e.wkst);T++);}}if(m(e.byweekno,1)){E=c+7*w;if(c!==n&&(E-=7-n),E<o)for(v=0;v<7&&(y.wnomask[E]=1,E+=1,y.wdaymask[E]!==e.wkst);v++);}if(c){var D=void 0;if(m(e.byweekno,-1))D=-1;else{var O=b.getWeekday(new Date(Date.UTC(t-1,0,1))),x=d(7-O.valueOf()+e.wkst,7),Y=b.isLeapYear(t-1)?366:365,S=void 0;x>=4?(x=0,S=Y+d(O-e.wkst,7)):S=o-c,D=Math.floor(52+d(S,7)/4)}if(m(e.byweekno,D))for(E=0;E<c;E++)y.wnomask[E]=1}return y}const ft=function(){function t(t){this.options=t}return t.prototype.rebuild=function(t,e){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=lt(t,n)),p(n.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var r=this.yearinfo,o=r.yearlen,a=r.mrange,s=r.wdaymask;this.monthinfo=function(t,e,n,r,i,o){var a={lastyear:t,lastmonth:e,nwdaymask:[]},s=[];if(o.freq===Dt.YEARLY)if(f(o.bymonth))s=[[0,n]];else for(var u=0;u<o.bymonth.length;u++)e=o.bymonth[u],s.push(r.slice(e-1,e+1));else o.freq===Dt.MONTHLY&&(s=[r.slice(e-1,e+1)]);if(f(s))return a;for(a.nwdaymask=h(0,n),u=0;u<s.length;u++)for(var y=s[u],c=y[0],l=y[1]-1,p=0;p<o.bynweekday.length;p++){var m=void 0,b=o.bynweekday[p],w=b[0],v=b[1];v<0?(m=l+7*(v+1),m-=d(i[m]-w,7)):(m=c+7*(v-1),m+=d(7-i[m]+w,7)),c<=m&&m<=l&&(a.nwdaymask[m]=1)}return a}(t,e,o,a,s,n)}i(n.byeaster)&&(this.eastermask=function(t,e){void 0===e&&(e=0);var n=t%19,r=Math.floor(t/100),i=t%100,o=Math.floor(r/4),a=r%4,s=Math.floor((r+8)/25),u=Math.floor((r-s+1)/3),h=Math.floor(19*n+r-o-u+15)%30,y=Math.floor(i/4),c=i%4,d=Math.floor(32+2*a+2*y-h-c)%7,l=Math.floor((n+11*h+22*d)/451),f=Math.floor((h+d-7*l+114)/31),p=(h+d-7*l+114)%31+1,m=Date.UTC(t,f-1,p+e),b=Date.UTC(t,0,1);return[Math.ceil((m-b)/864e5)]}(t,n.byeaster))},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[u(this.yearlen),0,this.yearlen]},t.prototype.mdayset=function(t,e){for(var n=this.mrange[e-1],r=this.mrange[e],i=h(null,this.yearlen),o=n;o<r;o++)i[o]=o;return[i,n,r]},t.prototype.wdayset=function(t,e,n){for(var r=h(null,this.yearlen+7),i=b.toOrdinal(new Date(Date.UTC(t,e-1,n)))-this.yearordinal,o=i,a=0;a<7&&(r[i]=i,++i,this.wdaymask[i]!==this.options.wkst);a++);return[r,o,i]},t.prototype.ddayset=function(t,e,n){var r=h(null,this.yearlen),i=b.toOrdinal(new Date(Date.UTC(t,e-1,n)))-this.yearordinal;return r[i]=i,[r,i,i+1]},t.prototype.htimeset=function(t,e,n,r){var i=this,o=[];return this.options.byminute.forEach((function(e){o=o.concat(i.mtimeset(t,e,n,r))})),b.sort(o),o},t.prototype.mtimeset=function(t,e,n,r){var i=this.options.bysecond.map((function(n){return new C(t,e,n,r)}));return b.sort(i),i},t.prototype.stimeset=function(t,e,n,r){return[new C(t,e,n,r)]},t.prototype.getdayset=function(t){switch(t){case U.YEARLY:return this.ydayset.bind(this);case U.MONTHLY:return this.mdayset.bind(this);case U.WEEKLY:return this.wdayset.bind(this);case U.DAILY:default:return this.ddayset.bind(this)}},t.prototype.gettimeset=function(t){switch(t){case U.HOURLY:return this.htimeset.bind(this);case U.MINUTELY:return this.mtimeset.bind(this);case U.SECONDLY:return this.stimeset.bind(this)}},t}();function pt(t,e,n,r,o,a){for(var s=[],u=0;u<t.length;u++){var h=void 0,y=void 0,c=t[u];c<0?(h=Math.floor(c/e.length),y=d(c,e.length)):(h=Math.floor((c-1)/e.length),y=d(c-1,e.length));for(var l=[],f=n;f<r;f++){var p=a[f];i(p)&&l.push(p)}var w=void 0;w=h<0?l.slice(h)[0]:l[h];var v=e[y],g=b.fromOrdinal(o.yearordinal+w),k=b.combine(g,v);m(s,k)||s.push(k)}return b.sort(s),s}function mt(t,e){var n=e.dtstart,r=e.freq,o=e.interval,a=e.until,s=e.bysetpos,u=e.count;if(0===u||0===o)return vt(t);var h=I.fromDate(n),y=new ft(e);y.rebuild(h.year,h.month);for(var c=function(t,e,n){var r=n.freq,i=n.byhour,o=n.byminute,a=n.bysecond;if(_(r))return function(t){var e=t.dtstart.getTime()%1e3;if(!_(t.freq))return[];var n=[];return t.byhour.forEach((function(r){t.byminute.forEach((function(i){t.bysecond.forEach((function(t){n.push(new C(r,i,t,e))}))}))})),n}(n);if(r>=Dt.HOURLY&&p(i)&&!m(i,e.hour)||r>=Dt.MINUTELY&&p(o)&&!m(o,e.minute)||r>=Dt.SECONDLY&&p(a)&&!m(a,e.second))return[];return t.gettimeset(r)(e.hour,e.minute,e.second,e.millisecond)}(y,h,e);;){var d=y.getdayset(r)(h.year,h.month,h.day),l=d[0],f=d[1],w=d[2],v=gt(l,f,w,y,e);if(p(s))for(var g=pt(s,c,f,w,y,l),k=0;k<g.length;k++){var E=g[k];if(a&&E>a)return vt(t);if(E>=n){var T=wt(E,e);if(!t.accept(T))return vt(t);if(u&&!--u)return vt(t)}}else for(k=f;k<w;k++){var D=l[k];if(i(D))for(var O=b.fromOrdinal(y.yearordinal+D),x=0;x<c.length;x++){var Y=c[x];E=b.combine(O,Y);if(a&&E>a)return vt(t);if(E>=n){T=wt(E,e);if(!t.accept(T))return vt(t);if(u&&!--u)return vt(t)}}}if(0===e.interval)return vt(t);if(h.add(e,v),h.year>b.MAXYEAR)return vt(t);_(r)||(c=y.gettimeset(r)(h.hour,h.minute,h.second,0)),y.rebuild(h.year,h.month)}}function bt(t,e,n){var r=n.bymonth,i=n.byweekno,o=n.byweekday,a=n.byeaster,s=n.bymonthday,u=n.bynmonthday,h=n.byyearday;return p(r)&&!m(r,t.mmask[e])||p(i)&&!t.wnomask[e]||p(o)&&!m(o,t.wdaymask[e])||p(t.nwdaymask)&&!t.nwdaymask[e]||null!==a&&!m(t.eastermask,e)||(p(s)||p(u))&&!m(s,t.mdaymask[e])&&!m(u,t.nmdaymask[e])||p(h)&&(e<t.yearlen&&!m(h,e+1)&&!m(h,-t.yearlen+e)||e>=t.yearlen&&!m(h,e+1-t.yearlen)&&!m(h,-t.nextyearlen+e-t.yearlen))}function wt(t,e){return new K(t,e.tzid).rezonedDate()}function vt(t){return t.getValue()}function gt(t,e,n,r,i){for(var o=!1,a=e;a<n;a++){var s=t[a];(o=bt(r,s,i))&&(t[s]=null)}return o}var kt={MO:new r(0),TU:new r(1),WE:new r(2),TH:new r(3),FR:new r(4),SA:new r(5),SU:new r(6)},Et={freq:U.YEARLY,dtstart:null,interval:1,wkst:kt.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},Tt=Object.keys(Et),Dt=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this._cache=e?null:new X,this.origOptions=W(t);var n=j(t).parsedOptions;this.options=n}return t.parseText=function(t,e){return M(t,e)},t.fromText=function(t,e){return R(t,e)},t.fromString=function(e){return new t(t.parseString(e)||void 0)},t.prototype._iter=function(t){return mt(t,this.options)},t.prototype._cacheGet=function(t,e){return!!this._cache&&this._cache._cacheGet(t,e)},t.prototype._cacheAdd=function(t,e,n){if(this._cache)return this._cache._cacheAdd(t,e,n)},t.prototype.all=function(t){if(t)return this._iter(new T("all",{},t));var e=this._cacheGet("all");return!1===e&&(e=this._iter(new w("all",{})),this._cacheAdd("all",e)),e},t.prototype.between=function(t,e,n,r){if(void 0===n&&(n=!1),!b.isValidDate(t)||!b.isValidDate(e))throw new Error("Invalid date passed in to RRule.between");var i={before:e,after:t,inc:n};if(r)return this._iter(new T("between",i,r));var o=this._cacheGet("between",i);return!1===o&&(o=this._iter(new w("between",i)),this._cacheAdd("between",o,i)),o},t.prototype.before=function(t,e){if(void 0===e&&(e=!1),!b.isValidDate(t))throw new Error("Invalid date passed in to RRule.before");var n={dt:t,inc:e},r=this._cacheGet("before",n);return!1===r&&(r=this._iter(new w("before",n)),this._cacheAdd("before",r,n)),r},t.prototype.after=function(t,e){if(void 0===e&&(e=!1),!b.isValidDate(t))throw new Error("Invalid date passed in to RRule.after");var n={dt:t,inc:e},r=this._cacheGet("after",n);return!1===r&&(r=this._iter(new w("after",n)),this._cacheAdd("after",r,n)),r},t.prototype.count=function(){return this.all().length},t.prototype.toString=function(){return B(this.origOptions)},t.prototype.toText=function(t,e,n){return function(t,e,n,r){return new S(t,e,n,r).toString()}(this,t,e,n)},t.prototype.isFullyConvertibleToText=function(){return N(this)},t.prototype.clone=function(){return new t(this.origOptions)},t.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],t.YEARLY=U.YEARLY,t.MONTHLY=U.MONTHLY,t.WEEKLY=U.WEEKLY,t.DAILY=U.DAILY,t.HOURLY=U.HOURLY,t.MINUTELY=U.MINUTELY,t.SECONDLY=U.SECONDLY,t.MO=kt.MO,t.TU=kt.TU,t.WE=kt.WE,t.TH=kt.TH,t.FR=kt.FR,t.SA=kt.SA,t.SU=kt.SU,t.parseString=H,t.optionsToString=B,t}();var Ot={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function xt(t,e){var n=[],r=[],i=[],o=[],a=q(t),s=a.dtstart,u=a.tzid,h=function(t,e){void 0===e&&(e=!1);if(!(t=t&&t.trim()))throw new Error("Invalid empty string");if(!e)return t.split(/\s/);var n=t.split("\n"),r=0;for(;r<n.length;){var i=n[r]=n[r].replace(/\s+$/g,"");i?r>0&&" "===i[0]?(n[r-1]+=i.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}(t,e.unfold);return h.forEach((function(t){var e;if(t){var a=function(t){var e=function(t){if(-1===t.indexOf(":"))return{name:"RRULE",value:t};var e=(i=t,o=":",a=1,s=i.split(o),a?s.slice(0,a).concat([s.slice(a).join(o)]):s),n=e[0],r=e[1];var i,o,a,s;return{name:n,value:r}}(t),n=e.name,r=e.value,i=n.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}(t),s=a.name,h=a.parms,y=a.value;switch(s.toUpperCase()){case"RRULE":if(h.length)throw new Error("unsupported RRULE parm: ".concat(h.join(",")));n.push(H(t));break;case"RDATE":var c=(null!==(e=/RDATE(?:;TZID=([^:=]+))?/i.exec(t))&&void 0!==e?e:[])[1];c&&!u&&(u=c),r=r.concat(Ut(y,h));break;case"EXRULE":if(h.length)throw new Error("unsupported EXRULE parm: ".concat(h.join(",")));i.push(H(y));break;case"EXDATE":o=o.concat(Ut(y,h));break;case"DTSTART":break;default:throw new Error("unsupported property: "+s)}}})),{dtstart:s,tzid:u,rrulevals:n,rdatevals:r,exrulevals:i,exdatevals:o}}function Yt(t,e){return void 0===e&&(e={}),function(t,e){var n=xt(t,e),r=n.rrulevals,i=n.rdatevals,o=n.exrulevals,a=n.exdatevals,s=n.dtstart,u=n.tzid,h=!1===e.cache;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||r.length>1||i.length||o.length||a.length){var y=new Mt(h);return y.dtstart(s),y.tzid(u||void 0),r.forEach((function(t){y.rrule(new Dt(St(t,s,u),h))})),i.forEach((function(t){y.rdate(t)})),o.forEach((function(t){y.exrule(new Dt(St(t,s,u),h))})),a.forEach((function(t){y.exdate(t)})),e.compatible&&e.dtstart&&y.rdate(s),y}var c=r[0]||{};return new Dt(St(c,c.dtstart||e.dtstart||s,c.tzid||e.tzid||u),h)}(t,function(t){var e=[],n=Object.keys(t),r=Object.keys(Ot);if(n.forEach((function(t){m(r,t)||e.push(t)})),e.length)throw new Error("Invalid options: "+e.join(", "));return k(k({},Ot),t)}(e))}function St(t,e,n){return k(k({},t),{dtstart:e,tzid:n})}function Ut(t,e){return function(t){t.forEach((function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)}))}(e),t.split(",").map((function(t){return b.untilStringToDate(t)}))}function Lt(t){var e=this;return function(n){if(void 0!==n&&(e["_".concat(t)]=n),void 0!==e["_".concat(t)])return e["_".concat(t)];for(var r=0;r<e._rrule.length;r++){var i=e._rrule[r].origOptions[t];if(i)return i}}}var Mt=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this,{},e)||this;return n.dtstart=Lt.apply(n,["dtstart"]),n.tzid=Lt.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return g(e,t),e.prototype._iter=function(t){return function(t,e,n,r,i,o){var a={},s=t.accept;function u(t,e){n.forEach((function(n){n.between(t,e,!0).forEach((function(t){a[Number(t)]=!0}))}))}i.forEach((function(t){var e=new K(t,o).rezonedDate();a[Number(e)]=!0})),t.accept=function(t){var e=Number(t);return isNaN(e)?s.call(this,t):!(!a[e]&&(u(new Date(e-1),new Date(e+1)),!a[e]))||(a[e]=!0,s.call(this,t))},"between"===t.method&&(u(t.args.after,t.args.before),t.accept=function(t){var e=Number(t);return!!a[e]||(a[e]=!0,s.call(this,t))});for(var h=0;h<r.length;h++){var y=new K(r[h],o).rezonedDate();if(!t.accept(new Date(y.getTime())))break}e.forEach((function(e){mt(t,e.options)}));var c=t._result;switch(b.sort(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){_t(t,this._rrule)},e.prototype.exrule=function(t){_t(t,this._exrule)},e.prototype.rdate=function(t){Rt(t,this._rdate)},e.prototype.exdate=function(t){Rt(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map((function(t){return Yt(t.toString())}))},e.prototype.exrules=function(){return this._exrule.map((function(t){return Yt(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(B({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(At("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(At("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}(Dt);function _t(t,e){if(!(t instanceof Dt))throw new TypeError(String(t)+" is not RRule instance");m(e.map(String),String(t))||e.push(t)}function Rt(t,e){if(!(t instanceof Date))throw new TypeError(String(t)+" is not Date instance");m(e.map(Number),Number(t))||(e.push(t),b.sort(e))}function At(t,e,n){var r=!n||"UTC"===n.toUpperCase(),i=r?"".concat(t,":"):"".concat(t,";TZID=").concat(n,":"),o=e.map((function(t){return b.timeToUntilString(t.valueOf(),r)})).join(",");return"".concat(i).concat(o)}return e})())); | ||
//# sourceMappingURL=rrule.min.js.map |
{ | ||
"name": "rrule", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "JavaScript library for working with recurrence rules for calendar dates.", | ||
@@ -16,4 +16,4 @@ "homepage": "http://jakubroztocil.github.io/rrule/", | ||
"main": "dist/es5/rrule.js", | ||
"module": "dist/esm/src/index.js", | ||
"types": "dist/esm/src/index.d.ts", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/esm/index.d.ts", | ||
"repository": { | ||
@@ -23,12 +23,12 @@ "type": "git", | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "yarn lint" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "yarn lint && tsc && webpack && tsc dist/esm/**/*.d.ts", | ||
"lint": "yarn tslint --project . --fix --config tslint.json", | ||
"test": "TS_NODE_PROJECT=tsconfig.test.json mocha **/*.test.ts", | ||
"test-ci": "TS_NODE_PROJECT=tsconfig.test.json nyc mocha **/*.test.ts" | ||
"prebuild": "yarn clean", | ||
"build": "yarn lint && yarn format-check && tsc -b tsconfig.build.json && webpack && tsc dist/esm/**/*.d.ts", | ||
"clean": "rm -rf dist/", | ||
"lint": "yarn eslint . --fix --config .eslintrc.js", | ||
"format": "yarn prettier --write .", | ||
"format-check": "yarn prettier --check .", | ||
"run-ts": "TS_NODE_PROJECT=tsconfig.json node --loader ts-node/esm", | ||
"test": "yarn run-ts ./node_modules/.bin/mocha **/*.test.ts", | ||
"test-ci": "yarn run-ts ./node_modules/.bin/nyc yarn run-ts ./node_modules/.bin/mocha **/*.test.ts" | ||
}, | ||
@@ -48,34 +48,38 @@ "nyc": { | ||
}, | ||
"lint-staged": { | ||
"*.ts": [ | ||
"yarn lint", | ||
"yarn format" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/assert": "^1.4.3", | ||
"@types/chai": "^4.2.7", | ||
"@types/jquery": "^3.3.29", | ||
"@types/mocha": "^5.2.5", | ||
"@types/mockdate": "^2.0.0", | ||
"@types/node": "^12.12.18", | ||
"@types/mocha": "^9.1.1", | ||
"@types/mockdate": "^3.0.0", | ||
"@types/node": "^17.0.41", | ||
"@typescript-eslint/eslint-plugin": "^5.27.1", | ||
"@typescript-eslint/parser": "^5.27.1", | ||
"chai": "^4.2.0", | ||
"copy-webpack-plugin": "^5.1.1", | ||
"coverage": "^0.4.1", | ||
"html-webpack-plugin": "^3.2.0", | ||
"husky": "^3.1.0", | ||
"jquery": "^3.3.1", | ||
"mocha": "^6.2.2", | ||
"mockdate": "^2.0.5", | ||
"nyc": "^14.1.1", | ||
"source-map-loader": "^0.2.4", | ||
"eslint": "^8.17.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jsdoc": "^39.3.2", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.1", | ||
"mocha": "^10.0.0", | ||
"mockdate": "^3.0.5", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.6.2", | ||
"source-map-loader": "^3.0.1", | ||
"source-map-support": "^0.5.16", | ||
"ts-loader": "^6.2.1", | ||
"ts-node": "^8.5.4", | ||
"tslint": "^5.20.1", | ||
"tslint-eslint-rules": "^5.4.0", | ||
"typescript": "^3.7.3", | ||
"uglifyjs-webpack-plugin": "^2.2.0", | ||
"webpack": "^4.41.3", | ||
"webpack-cli": "^3.3.10" | ||
"terser-webpack-plugin": "^5.3.3", | ||
"ts-loader": "^9.3.0", | ||
"ts-node": "^10.8.1", | ||
"typescript": "^4.7.3", | ||
"webpack": "^5.73.0", | ||
"webpack-cli": "^4.9.2" | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"demo" | ||
] | ||
}, | ||
"files": [ | ||
@@ -87,4 +91,4 @@ "dist", | ||
"dependencies": { | ||
"tslib": "^1.10.0" | ||
"tslib": "^2.4.0" | ||
} | ||
} |
223
README.md
@@ -1,3 +0,2 @@ | ||
rrule.js | ||
======== | ||
# rrule.js | ||
@@ -21,8 +20,8 @@ **Library for working with recurrence rules for calendar dates.** | ||
* * * * * | ||
--- | ||
### Quick Start | ||
- [Demo app](http://jakubroztocil.github.io/rrule/) | ||
- [Demo app](http://jakubroztocil.github.io/rrule/) | ||
- # For contributors and maintainers: the code for the demo app is only on `gh-pages` branch | ||
@@ -37,4 +36,4 @@ #### Client Side | ||
* [rrule.min.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.min.js) (bundled, minified) | ||
* [rrule.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.js) (bundled, not minified) | ||
- [rrule.min.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.min.js) (bundled, minified) | ||
- [rrule.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.js) (bundled, not minified) | ||
@@ -58,2 +57,3 @@ ```html | ||
**RRule:** | ||
```es6 | ||
@@ -100,2 +100,3 @@ import { RRule, RRuleSet, rrulestr } from 'rrule' | ||
**RRuleSet:** | ||
```js | ||
@@ -105,7 +106,9 @@ const rruleSet = new RRuleSet() | ||
// Add a rrule to rruleSet | ||
rruleSet.rrule(new RRule({ | ||
freq: RRule.MONTHLY, | ||
count: 5, | ||
dtstart: new Date(Date.UTC(2012, 1, 1, 10, 30)) | ||
})) | ||
rruleSet.rrule( | ||
new RRule({ | ||
freq: RRule.MONTHLY, | ||
count: 5, | ||
dtstart: new Date(Date.UTC(2012, 1, 1, 10, 30)), | ||
}) | ||
) | ||
@@ -119,7 +122,9 @@ // Add a date to rruleSet | ||
// Add a exclusion rrule to rruleSet | ||
rruleSet.exrule(new RRule({ | ||
freq: RRule.MONTHLY, | ||
count: 2, | ||
dtstart: new Date(Date.UTC(2012, 2, 1, 10, 30)) | ||
})) | ||
rruleSet.exrule( | ||
new RRule({ | ||
freq: RRule.MONTHLY, | ||
count: 2, | ||
dtstart: new Date(Date.UTC(2012, 2, 1, 10, 30)), | ||
}) | ||
) | ||
@@ -130,27 +135,31 @@ // Add a exclusion date to rruleSet | ||
// Get all occurrence dates (Date instances): | ||
rruleSet.all() | ||
[ '2012-02-01T10:30:00.000Z', | ||
rruleSet.all()[ | ||
('2012-02-01T10:30:00.000Z', | ||
'2012-05-01T10:30:00.000Z', | ||
'2012-07-01T10:30:00.000Z', | ||
'2012-07-02T10:30:00.000Z' ] | ||
'2012-07-02T10:30:00.000Z') | ||
] | ||
// Get a slice: | ||
rruleSet.between(new Date(Date.UTC(2012, 2, 1)), new Date(Date.UTC(2012, 6, 2))) | ||
[ '2012-05-01T10:30:00.000Z', '2012-07-01T10:30:00.000Z' ] | ||
rruleSet.between( | ||
new Date(Date.UTC(2012, 2, 1)), | ||
new Date(Date.UTC(2012, 6, 2)) | ||
)[('2012-05-01T10:30:00.000Z', '2012-07-01T10:30:00.000Z')] | ||
// To string | ||
rruleSet.valueOf()[ | ||
('DTSTART:20120201T023000Z', | ||
'RRULE:FREQ=MONTHLY;COUNT=5', | ||
'RDATE:20120701T023000Z,20120702T023000Z', | ||
'EXRULE:FREQ=MONTHLY;COUNT=2', | ||
'EXDATE:20120601T023000Z') | ||
] | ||
// To string | ||
rruleSet.valueOf() | ||
['DTSTART:20120201T023000Z', | ||
'RRULE:FREQ=MONTHLY;COUNT=5', | ||
'RDATE:20120701T023000Z,20120702T023000Z', | ||
'EXRULE:FREQ=MONTHLY;COUNT=2', | ||
'EXDATE:20120601T023000Z'] | ||
// To string | ||
rruleSet.toString() | ||
'["DTSTART:20120201T023000Z","RRULE:FREQ=MONTHLY;COUNT=5","RDATE:20120701T023000Z,20120702T023000Z","EXRULE:FREQ=MONTHLY;COUNT=2","EXDATE:20120601T023000Z"]' | ||
;('["DTSTART:20120201T023000Z","RRULE:FREQ=MONTHLY;COUNT=5","RDATE:20120701T023000Z,20120702T023000Z","EXRULE:FREQ=MONTHLY;COUNT=2","EXDATE:20120601T023000Z"]') | ||
``` | ||
**rrulestr:** | ||
```js | ||
@@ -161,7 +170,10 @@ // Parse a RRule string, return a RRule object | ||
// Parse a RRule string, return a RRuleSet object | ||
rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5', {forceset: true}) | ||
rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5', { | ||
forceset: true, | ||
}) | ||
// Parse a RRuleSet string, return a RRuleSet object | ||
rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z') | ||
rrulestr( | ||
'DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5\nRDATE:20120701T023000Z,20120702T023000Z\nEXRULE:FREQ=MONTHLY;COUNT=2\nEXDATE:20120601T023000Z' | ||
) | ||
``` | ||
@@ -220,3 +232,3 @@ | ||
* * * * * | ||
--- | ||
@@ -237,7 +249,7 @@ ### Timezone Support | ||
count: 1, | ||
tzid: 'Asia/Tokyo' | ||
}).all() | ||
// assuming the system timezone is set to America/Los_Angeles, you get: | ||
[ '2018-01-31T17:30:00.000Z' ] | ||
tzid: 'Asia/Tokyo', | ||
}).all()[ | ||
// assuming the system timezone is set to America/Los_Angeles, you get: | ||
'2018-01-31T17:30:00.000Z' | ||
] | ||
// which is the time in Los Angeles when it's 2018-02-01T10:30:00 in Tokyo. | ||
@@ -254,7 +266,5 @@ ``` | ||
dtstart: new Date(2018, 1, 1, 10, 30), | ||
until: new Date(2018, 2, 31) | ||
}).all() | ||
until: new Date(2018, 2, 31), | ||
}).all()[('2018-02-01T18:30:00.000Z', '2018-03-01T18:30:00.000Z')] | ||
[ '2018-02-01T18:30:00.000Z', '2018-03-01T18:30:00.000Z' ] | ||
// RIGHT: Will produce dates with recurrences at the correct time | ||
@@ -264,6 +274,4 @@ new RRule({ | ||
dtstart: new Date(Date.UTC(2018, 1, 1, 10, 30)), | ||
until: new Date(Date.UTC(2018, 2, 31)) | ||
}).all() | ||
[ '2018-02-01T10:30:00.000Z', '2018-03-01T10:30:00.000Z' ] | ||
until: new Date(Date.UTC(2018, 2, 31)), | ||
}).all()[('2018-02-01T10:30:00.000Z', '2018-03-01T10:30:00.000Z')] | ||
``` | ||
@@ -442,3 +450,2 @@ | ||
`noCache`: Set to `true` to disable caching of results. If you will use the | ||
@@ -451,6 +458,4 @@ same rrule instance multiple times, enabling caching will improve the | ||
--- | ||
* * * * * | ||
#### Instance properties | ||
@@ -470,6 +475,4 @@ | ||
--- | ||
* * * * * | ||
#### Occurrence Retrieval Methods | ||
@@ -491,11 +494,12 @@ | ||
```javascript | ||
rule.all() | ||
[ '2012-02-01T10:30:00.000Z', | ||
rule.all()[ | ||
('2012-02-01T10:30:00.000Z', | ||
'2012-05-01T10:30:00.000Z', | ||
'2012-07-01T10:30:00.000Z', | ||
'2012-07-02T10:30:00.000Z' ] | ||
'2012-07-02T10:30:00.000Z') | ||
] | ||
rule.all(function (date, i){return i < 2}) | ||
[ '2012-02-01T10:30:00.000Z', | ||
'2012-05-01T10:30:00.000Z' ] | ||
rule.all(function (date, i) { | ||
return i < 2 | ||
})[('2012-02-01T10:30:00.000Z', '2012-05-01T10:30:00.000Z')] | ||
``` | ||
@@ -514,5 +518,5 @@ | ||
```javascript | ||
rule.between(new Date(Date.UTC(2012, 7, 1)), new Date(Date.UTC(2012, 8, 1))) | ||
['2012-08-27T10:30:00.000Z', | ||
'2012-08-31T10:30:00.000Z'] | ||
rule.between(new Date(Date.UTC(2012, 7, 1)), new Date(Date.UTC(2012, 8, 1)))[ | ||
('2012-08-27T10:30:00.000Z', '2012-08-31T10:30:00.000Z') | ||
] | ||
``` | ||
@@ -526,3 +530,2 @@ | ||
##### `RRule.prototype.after(dt, inc=false)` | ||
@@ -538,6 +541,4 @@ | ||
--- | ||
* * * * * | ||
#### iCalendar RFC String Methods | ||
@@ -552,3 +553,3 @@ | ||
rule.toString() | ||
"DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR" | ||
;('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20130130T230000Z;BYDAY=MO,FR') | ||
@@ -567,3 +568,3 @@ rule.toString() == RRule.optionsToString(rule.origOptions) | ||
RRule.optionsToString(rule.options) | ||
"DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;WKST=0;UNTIL=20130130T230000Z;BYDAY=MO,FR;BYHOUR=10;BYMINUTE=30;BYSECOND=0" | ||
;('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;INTERVAL=5;WKST=0;UNTIL=20130130T230000Z;BYDAY=MO,FR;BYHOUR=10;BYMINUTE=30;BYSECOND=0') | ||
@@ -573,5 +574,5 @@ // Cherry-pick only some options from an rrule: | ||
freq: rule.options.freq, | ||
dtstart: rule.options.dtstart | ||
dtstart: rule.options.dtstart, | ||
}) | ||
"DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;" | ||
;('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;') | ||
``` | ||
@@ -584,6 +585,8 @@ | ||
```javascript | ||
var rule = RRule.fromString("DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;") | ||
var rule = RRule.fromString('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY;') | ||
// This is equivalent | ||
var rule = new RRule(RRule.parseString("DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY")) | ||
var rule = new RRule( | ||
RRule.parseString('DTSTART:20120201T093000Z\nRRULE:FREQ=WEEKLY') | ||
) | ||
``` | ||
@@ -601,3 +604,3 @@ | ||
* * * * * | ||
--- | ||
@@ -620,6 +623,6 @@ #### Natural Language Text Methods | ||
freq: RRule.WEEKLY, | ||
count: 23 | ||
count: 23, | ||
}) | ||
rule.toText() | ||
"every week for 23 times" | ||
;('every week for 23 times') | ||
``` | ||
@@ -651,13 +654,12 @@ | ||
--- | ||
* * * * * | ||
#### `RRuleSet` Constructor | ||
```javascript | ||
new RRuleSet([noCache=false]) | ||
new RRuleSet([(noCache = false)]) | ||
``` | ||
The RRuleSet instance allows more complex recurrence setups, mixing multiple | ||
rules, dates, exclusion rules, and exclusion dates. | ||
rules, dates, exclusion rules, and exclusion dates. | ||
@@ -672,5 +674,7 @@ Default `noCache` argument is `false`, caching of results will be enabled, | ||
##### `RRuleSet.prototype.rdate(dt)` | ||
Include the given datetime instance in the recurrence set generation. | ||
##### `RRuleSet.prototype.exrule(rrule)` | ||
Include the given rrule instance in the recurrence set exclusion list. Dates | ||
@@ -683,2 +687,3 @@ which are part of the given recurrence rules will not be generated, even if | ||
##### `RRuleSet.prototype.exdate(dt)` | ||
Include the given datetime instance in the recurrence set exclusion list. Dates | ||
@@ -689,2 +694,3 @@ included that way will not be generated, even if some inclusive rrule or | ||
##### `RRuleSet.prototype.tzid(tz?)` | ||
Sets or overrides the timezone identifier. Useful if there are no rrules in this | ||
@@ -725,3 +731,3 @@ RRuleSet and thus no DTSTART. | ||
* * * * * | ||
--- | ||
@@ -767,16 +773,15 @@ #### `rrulestr` Function | ||
--- | ||
* * * * * | ||
### Differences From iCalendar RFC | ||
* `RRule` has no `byday` keyword. The equivalent keyword has been replaced by | ||
the `byweekday` keyword, to remove the ambiguity present in the original | ||
keyword. | ||
* Unlike documented in the RFC, the starting datetime, `dtstart`, is | ||
not the first recurrence instance, unless it does fit in the specified rules. | ||
This is in part due to this project being a port of | ||
[python-dateutil](https://labix.org/python-dateutil#head-a65103993a21b717f6702063f3717e6e75b4ba66), | ||
which has the same non-compliant functionality. Note that you can get the | ||
original behavior by using a `RRuleSet` and adding the `dtstart` as an `rdate`. | ||
- `RRule` has no `byday` keyword. The equivalent keyword has been replaced by | ||
the `byweekday` keyword, to remove the ambiguity present in the original | ||
keyword. | ||
- Unlike documented in the RFC, the starting datetime, `dtstart`, is | ||
not the first recurrence instance, unless it does fit in the specified rules. | ||
This is in part due to this project being a port of | ||
[python-dateutil](https://labix.org/python-dateutil#head-a65103993a21b717f6702063f3717e6e75b4ba66), | ||
which has the same non-compliant functionality. Note that you can get the | ||
original behavior by using a `RRuleSet` and adding the `dtstart` as an `rdate`. | ||
@@ -788,7 +793,9 @@ ```javascript | ||
// Add a rrule to rruleSet | ||
rruleSet.rrule(new RRule({ | ||
freq: RRule.MONTHLY, | ||
count: 5, | ||
dtstart: start | ||
})) | ||
rruleSet.rrule( | ||
new RRule({ | ||
freq: RRule.MONTHLY, | ||
count: 5, | ||
dtstart: start, | ||
}) | ||
) | ||
@@ -799,4 +806,4 @@ // Add a date to rruleSet | ||
* Unlike documented in the RFC, every keyword is valid on every frequency (the | ||
RFC documents that `byweekno` is only valid on yearly frequencies, for example). | ||
- Unlike documented in the RFC, every keyword is valid on every frequency (the | ||
RFC documents that `byweekno` is only valid on yearly frequencies, for example). | ||
@@ -827,6 +834,6 @@ ### Development | ||
* [Jakub Roztocil](http://roztocil.co/) | ||
([@jakubroztocil](http://twitter.com/jakubroztocil)) | ||
* Lars Schöning ([@lyschoening](http://twitter.com/lyschoening)) | ||
* David Golightly ([@davigoli](http://twitter.com/davigoli)) | ||
- [Jakub Roztocil](http://roztocil.co/) | ||
([@jakubroztocil](http://twitter.com/jakubroztocil)) | ||
- Lars Schöning ([@lyschoening](http://twitter.com/lyschoening)) | ||
- David Golightly ([@davigoli](http://twitter.com/davigoli)) | ||
@@ -841,19 +848,13 @@ Python `dateutil` is written by [Gustavo | ||
[npm-image]: http://img.shields.io/npm/v/rrule.svg | ||
[ci-url]: https://github.com/jakubroztocil/rrule/actions | ||
[ci-image]: https://github.com/jakubroztocil/rrule/workflows/Node%20CI/badge.svg | ||
[downloads-url]: https://npmjs.org/package/rrule | ||
[downloads-image]: http://img.shields.io/npm/dm/rrule.svg?style=flat-square | ||
[js-standard-url]: https://github.com/feross/standard | ||
[js-standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat | ||
[gitter-url]: https://gitter.im/rrule-js/Lobby | ||
[gitter-image]: https://img.shields.io/gitter/room/nwjs/nw.js.svg | ||
#### Related projects | ||
* https://rrules.com/ — RESTful API to get back occurrences of RRULEs that conform to RFC 5545. | ||
- https://rrules.com/ — RESTful API to get back occurrences of RRULEs that conform to RFC 5545. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
826
793222
28
120
4594
1
+ Addedtslib@2.8.1(transitive)
- Removedtslib@1.14.1(transitive)
Updatedtslib@^2.4.0