/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ "use strict";var B_=Object.create;var ys=Object.defineProperty;var D_=Object.getOwnPropertyDescriptor;var N_=Object.getOwnPropertyNames;var W_=Object.getPrototypeOf,Z_=Object.prototype.hasOwnProperty;var rm=r=>{throw TypeError(r)};var M_=(r,e,t)=>e in r?ys(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Y_=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},X_=(r,e)=>{for(var t in e)ys(r,t,{get:e[t],enumerable:!0})},nm=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of N_(e))!Z_.call(r,o)&&o!==t&&ys(r,o,{get:()=>e[o],enumerable:!(n=D_(e,o))||n.enumerable});return r};var Wr=(r,e,t)=>(t=r!=null?B_(W_(r)):{},nm(e||!r||!r.__esModule?ys(t,"default",{value:r,enumerable:!0}):t,r)),U_=r=>nm(ys({},"__esModule",{value:!0}),r);var m=(r,e,t)=>M_(r,typeof e!="symbol"?e+"":e,t),ec=(r,e,t)=>e.has(r)||rm("Cannot "+t);var C=(r,e,t)=>(ec(r,e,"read from private field"),t?t.call(r):e.get(r)),ee=(r,e,t)=>e.has(r)?rm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),z=(r,e,t,n)=>(ec(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),ae=(r,e,t)=>(ec(r,e,"access private method"),t);var wr=Y_((ac,no)=>{(function(r,e){typeof ac=="object"&&typeof no!="undefined"?no.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(ac,(function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function o(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,s){return Object.prototype.hasOwnProperty.call(i,s)}function u(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var s;for(s in i)if(a(i,s))return!1;return!0}function c(i){return i===void 0}function f(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function h(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function b(i,s){var l=[],d,p=i.length;for(d=0;d>>0,d;for(d=0;d0)for(l=0;l<_;l++)d=B[l],p=s[d],c(p)||(i[d]=p);return i}function ie(i){P(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),F===!1&&(F=!0,e.updateOffset(this),F=!1)}function Y(i){return i instanceof ie||i!=null&&i._isAMomentObject!=null}function pe(i){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+i)}function _e(i,s){var l=!0;return I(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),l){var d=[],p,_,S,W=arguments.length;for(_=0;_=0;return(_?l?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+d}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,le=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,De={},E={};function G(i,s,l,d){var p=d;typeof d=="string"&&(p=function(){return this[d]()}),i&&(E[i]=p),s&&(E[s[0]]=function(){return oe(p.apply(this,arguments),s[1],s[2])}),l&&(E[l]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)})}function _t(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Je(i){var s=i.match(N),l,d;for(l=0,d=s.length;l=0&&le.test(i);)i=i.replace(le,d),le.lastIndex=0,l-=1;return i}var wi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function qt(i){var s=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return s||!l?s:(this._longDateFormat[i]=l.match(N).map(function(d){return d==="MMMM"||d==="MM"||d==="DD"||d==="dddd"?d.slice(1):d}).join(""),this._longDateFormat[i])}var yn="Invalid date";function ti(){return this._invalidDate}var us="%d",Tu=/\d{1,2}/;function $g(i){return this._ordinal.replace("%d",i)}var Pg={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Hg(i,s,l,d){var p=this._relativeTime[l];return he(p)?p(i,s,l,d):p.replace(/%d/i,i)}function Jg(i,s){var l=this._relativeTime[i>0?"future":"past"];return he(l)?l(s):l.replace(/%s/i,s)}var ff={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function _r(i){return typeof i=="string"?ff[i]||ff[i.toLowerCase()]:void 0}function Eu(i){var s={},l,d;for(d in i)a(i,d)&&(l=_r(d),l&&(s[l]=i[d]));return s}var jg={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function zg(i){var s=[],l;for(l in i)a(i,l)&&s.push({unit:l,priority:jg[l]});return s.sort(function(d,p){return d.priority-p.priority}),s}var mf=/\d/,or=/\d\d/,pf=/\d{3}/,Gu=/\d{4}/,ba=/[+-]?\d{6}/,Me=/\d\d?/,hf=/\d\d\d\d?/,gf=/\d\d\d\d\d\d?/,va=/\d{1,3}/,Bu=/\d{1,4}/,ya=/[+-]?\d{1,6}/,Hi=/\d+/,_a=/[+-]?\d+/,Kg=/Z|[+-]\d\d:?\d\d/gi,Ia=/Z|[+-]\d\d(?::?\d\d)?/gi,qg=/[+-]?\d+(\.\d{1,3})?/,cs=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ji=/^[1-9]\d?/,Du=/^([1-9]\d|\d)/,wa;wa={};function Z(i,s,l){wa[i]=he(s)?s:function(d,p){return d&&l?l:s}}function eb(i,s){return a(wa,i)?wa[i](s._strict,s._locale):new RegExp(tb(i))}function tb(i){return _n(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(s,l,d,p,_){return l||d||p||_}))}function _n(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ir(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function fe(i){var s=+i,l=0;return s!==0&&isFinite(s)&&(l=Ir(s)),l}var Nu={};function Re(i,s){var l,d=s,p;for(typeof i=="string"&&(i=[i]),f(s)&&(d=function(_,S){S[s]=fe(_)}),p=i.length,l=0;l68?1900:2e3)};var bf=ji("FullYear",!0);function ob(){return Ca(this.year())}function ji(i,s){return function(l){return l!=null?(vf(this,i,l),e.updateOffset(this,s),this):ms(this,i)}}function ms(i,s){if(!i.isValid())return NaN;var l=i._d,d=i._isUTC;switch(s){case"Milliseconds":return d?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return d?l.getUTCSeconds():l.getSeconds();case"Minutes":return d?l.getUTCMinutes():l.getMinutes();case"Hours":return d?l.getUTCHours():l.getHours();case"Date":return d?l.getUTCDate():l.getDate();case"Day":return d?l.getUTCDay():l.getDay();case"Month":return d?l.getUTCMonth():l.getMonth();case"FullYear":return d?l.getUTCFullYear():l.getFullYear();default:return NaN}}function vf(i,s,l){var d,p,_,S,W;if(!(!i.isValid()||isNaN(l))){switch(d=i._d,p=i._isUTC,s){case"Milliseconds":return void(p?d.setUTCMilliseconds(l):d.setMilliseconds(l));case"Seconds":return void(p?d.setUTCSeconds(l):d.setSeconds(l));case"Minutes":return void(p?d.setUTCMinutes(l):d.setMinutes(l));case"Hours":return void(p?d.setUTCHours(l):d.setHours(l));case"Date":return void(p?d.setUTCDate(l):d.setDate(l));case"FullYear":break;default:return}_=l,S=i.month(),W=i.date(),W=W===29&&S===1&&!Ca(_)?28:W,p?d.setUTCFullYear(_,S,W):d.setFullYear(_,S,W)}}function sb(i){return i=_r(i),he(this[i])?this[i]():this}function ab(i,s){if(typeof i=="object"){i=Eu(i);var l=zg(i),d,p=l.length;for(d=0;d=0?(W=new Date(i+400,s,l,d,p,_,S),isFinite(W.getFullYear())&&W.setFullYear(i)):W=new Date(i,s,l,d,p,_,S),W}function ps(i){var s,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,s=new Date(Date.UTC.apply(null,l)),isFinite(s.getUTCFullYear())&&s.setUTCFullYear(i)):s=new Date(Date.UTC.apply(null,arguments)),s}function xa(i,s,l){var d=7+s-l,p=(7+ps(i,0,d).getUTCDay()-s)%7;return-p+d-1}function xf(i,s,l,d,p){var _=(7+l-d)%7,S=xa(i,d,p),W=1+7*(s-1)+_+S,te,ge;return W<=0?(te=i-1,ge=fs(te)+W):W>fs(i)?(te=i+1,ge=W-fs(i)):(te=i,ge=W),{year:te,dayOfYear:ge}}function hs(i,s,l){var d=xa(i.year(),s,l),p=Math.floor((i.dayOfYear()-d-1)/7)+1,_,S;return p<1?(S=i.year()-1,_=p+Cn(S,s,l)):p>Cn(i.year(),s,l)?(_=p-Cn(i.year(),s,l),S=i.year()+1):(S=i.year(),_=p),{week:_,year:S}}function Cn(i,s,l){var d=xa(i,s,l),p=xa(i+1,s,l);return(fs(i)-d+p)/7}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),Z("w",Me,Ji),Z("ww",Me,or),Z("W",Me,Ji),Z("WW",Me,or),ds(["w","ww","W","WW"],function(i,s,l,d){s[d.substr(0,1)]=fe(i)});function _b(i){return hs(i,this._week.dow,this._week.doy).week}var Ib={dow:0,doy:6};function wb(){return this._week.dow}function Cb(){return this._week.doy}function xb(i){var s=this.localeData().week(this);return i==null?s:this.add((i-s)*7,"d")}function Ab(i){var s=hs(this,1,4).week;return i==null?s:this.add((i-s)*7,"d")}G("d",0,"do","day"),G("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),G("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),G("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),Z("d",Me),Z("e",Me),Z("E",Me),Z("dd",function(i,s){return s.weekdaysMinRegex(i)}),Z("ddd",function(i,s){return s.weekdaysShortRegex(i)}),Z("dddd",function(i,s){return s.weekdaysRegex(i)}),ds(["dd","ddd","dddd"],function(i,s,l,d){var p=l._locale.weekdaysParse(i,d,l._strict);p!=null?s.d=p:y(l).invalidWeekday=i}),ds(["d","e","E"],function(i,s,l,d){s[d]=fe(i)});function kb(i,s){return typeof i!="string"?i:isNaN(i)?(i=s.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Sb(i,s){return typeof i=="string"?s.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Zu(i,s){return i.slice(s,7).concat(i.slice(0,s))}var Rb="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Af="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fb="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Tb=cs,Eb=cs,Gb=cs;function Bb(i,s){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(s)?"format":"standalone"];return i===!0?Zu(l,this._week.dow):i?l[i.day()]:l}function Db(i){return i===!0?Zu(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Nb(i){return i===!0?Zu(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Wb(i,s,l){var d,p,_,S=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)_=g([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(_,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(_,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(_,"").toLocaleLowerCase();return l?s==="dddd"?(p=je.call(this._weekdaysParse,S),p!==-1?p:null):s==="ddd"?(p=je.call(this._shortWeekdaysParse,S),p!==-1?p:null):(p=je.call(this._minWeekdaysParse,S),p!==-1?p:null):s==="dddd"?(p=je.call(this._weekdaysParse,S),p!==-1||(p=je.call(this._shortWeekdaysParse,S),p!==-1)?p:(p=je.call(this._minWeekdaysParse,S),p!==-1?p:null)):s==="ddd"?(p=je.call(this._shortWeekdaysParse,S),p!==-1||(p=je.call(this._weekdaysParse,S),p!==-1)?p:(p=je.call(this._minWeekdaysParse,S),p!==-1?p:null)):(p=je.call(this._minWeekdaysParse,S),p!==-1||(p=je.call(this._weekdaysParse,S),p!==-1)?p:(p=je.call(this._shortWeekdaysParse,S),p!==-1?p:null))}function Zb(i,s,l){var d,p,_;if(this._weekdaysParseExact)return Wb.call(this,i,s,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){if(p=g([2e3,1]).day(d),l&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[d]||(_="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[d]=new RegExp(_.replace(".",""),"i")),l&&s==="dddd"&&this._fullWeekdaysParse[d].test(i))return d;if(l&&s==="ddd"&&this._shortWeekdaysParse[d].test(i))return d;if(l&&s==="dd"&&this._minWeekdaysParse[d].test(i))return d;if(!l&&this._weekdaysParse[d].test(i))return d}}function Mb(i){if(!this.isValid())return i!=null?this:NaN;var s=ms(this,"Day");return i!=null?(i=kb(i,this.localeData()),this.add(i-s,"d")):s}function Yb(i){if(!this.isValid())return i!=null?this:NaN;var s=(this.day()+7-this.localeData()._week.dow)%7;return i==null?s:this.add(i-s,"d")}function Xb(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var s=Sb(i,this.localeData());return this.day(this.day()%7?s:s-7)}else return this.day()||7}function Ub(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Mu.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Tb),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Qb(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Mu.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Eb),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Vb(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Mu.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gb),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Mu(){function i(Ot,Rn){return Rn.length-Ot.length}var s=[],l=[],d=[],p=[],_,S,W,te,ge;for(_=0;_<7;_++)S=g([2e3,1]).day(_),W=_n(this.weekdaysMin(S,"")),te=_n(this.weekdaysShort(S,"")),ge=_n(this.weekdays(S,"")),s.push(W),l.push(te),d.push(ge),p.push(W),p.push(te),p.push(ge);s.sort(i),l.sort(i),d.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Yu(){return this.hours()%12||12}function Lb(){return this.hours()||24}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Yu),G("k",["kk",2],0,Lb),G("hmm",0,0,function(){return""+Yu.apply(this)+oe(this.minutes(),2)}),G("hmmss",0,0,function(){return""+Yu.apply(this)+oe(this.minutes(),2)+oe(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+oe(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+oe(this.minutes(),2)+oe(this.seconds(),2)});function kf(i,s){G(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),s)})}kf("a",!0),kf("A",!1);function Sf(i,s){return s._meridiemParse}Z("a",Sf),Z("A",Sf),Z("H",Me,Du),Z("h",Me,Ji),Z("k",Me,Ji),Z("HH",Me,or),Z("hh",Me,or),Z("kk",Me,or),Z("hmm",hf),Z("hmmss",gf),Z("Hmm",hf),Z("Hmmss",gf),Re(["H","HH"],ct),Re(["k","kk"],function(i,s,l){var d=fe(i);s[ct]=d===24?0:d}),Re(["a","A"],function(i,s,l){l._isPm=l._locale.isPM(i),l._meridiem=i}),Re(["h","hh"],function(i,s,l){s[ct]=fe(i),y(l).bigHour=!0}),Re("hmm",function(i,s,l){var d=i.length-2;s[ct]=fe(i.substr(0,d)),s[Dr]=fe(i.substr(d)),y(l).bigHour=!0}),Re("hmmss",function(i,s,l){var d=i.length-4,p=i.length-2;s[ct]=fe(i.substr(0,d)),s[Dr]=fe(i.substr(d,2)),s[wn]=fe(i.substr(p)),y(l).bigHour=!0}),Re("Hmm",function(i,s,l){var d=i.length-2;s[ct]=fe(i.substr(0,d)),s[Dr]=fe(i.substr(d))}),Re("Hmmss",function(i,s,l){var d=i.length-4,p=i.length-2;s[ct]=fe(i.substr(0,d)),s[Dr]=fe(i.substr(d,2)),s[wn]=fe(i.substr(p))});function Ob(i){return(i+"").toLowerCase().charAt(0)==="p"}var $b=/[ap]\.?m?\.?/i,Pb=ji("Hours",!0);function Hb(i,s,l){return i>11?l?"pm":"PM":l?"am":"AM"}var Rf={calendar:Kt,longDateFormat:wi,invalidDate:yn,ordinal:us,dayOfMonthOrdinalParse:Tu,relativeTime:Pg,months:ub,monthsShort:yf,week:Ib,weekdays:Rb,weekdaysMin:Fb,weekdaysShort:Af,meridiemParse:$b},Ue={},gs={},bs;function Jb(i,s){var l,d=Math.min(i.length,s.length);for(l=0;l0;){if(p=Aa(_.slice(0,l).join("-")),p)return p;if(d&&d.length>=l&&Jb(_,d)>=l-1)break;l--}s++}return bs}function zb(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Aa(i){var s=null,l;if(Ue[i]===void 0&&typeof no!="undefined"&&no&&no.exports&&zb(i))try{s=bs._abbr,l=require,l("./locale/"+i),ri(s)}catch(d){Ue[i]=null}return Ue[i]}function ri(i,s){var l;return i&&(c(s)?l=xn(i):l=Xu(i,s),l?bs=l:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),bs._abbr}function Xu(i,s){if(s!==null){var l,d=Rf;if(s.abbr=i,Ue[i]!=null)He("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),d=Ue[i]._config;else if(s.parentLocale!=null)if(Ue[s.parentLocale]!=null)d=Ue[s.parentLocale]._config;else if(l=Aa(s.parentLocale),l!=null)d=l._config;else return gs[s.parentLocale]||(gs[s.parentLocale]=[]),gs[s.parentLocale].push({name:i,config:s}),null;return Ue[i]=new rt(Ze(d,s)),gs[i]&&gs[i].forEach(function(p){Xu(p.name,p.config)}),ri(i),Ue[i]}else return delete Ue[i],null}function Kb(i,s){if(s!=null){var l,d,p=Rf;Ue[i]!=null&&Ue[i].parentLocale!=null?Ue[i].set(Ze(Ue[i]._config,s)):(d=Aa(i),d!=null&&(p=d._config),s=Ze(p,s),d==null&&(s.abbr=i),l=new rt(s),l.parentLocale=Ue[i],Ue[i]=l),ri(i)}else Ue[i]!=null&&(Ue[i].parentLocale!=null?(Ue[i]=Ue[i].parentLocale,i===ri()&&ri(i)):Ue[i]!=null&&delete Ue[i]);return Ue[i]}function xn(i){var s;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return bs;if(!n(i)){if(s=Aa(i),s)return s;i=[i]}return jb(i)}function qb(){return At(Ue)}function Uu(i){var s,l=i._a;return l&&y(i).overflow===-2&&(s=l[In]<0||l[In]>11?In:l[Jr]<1||l[Jr]>Wu(l[Dt],l[In])?Jr:l[ct]<0||l[ct]>24||l[ct]===24&&(l[Dr]!==0||l[wn]!==0||l[Ci]!==0)?ct:l[Dr]<0||l[Dr]>59?Dr:l[wn]<0||l[wn]>59?wn:l[Ci]<0||l[Ci]>999?Ci:-1,y(i)._overflowDayOfYear&&(sJr)&&(s=Jr),y(i)._overflowWeeks&&s===-1&&(s=nb),y(i)._overflowWeekday&&s===-1&&(s=ib),y(i).overflow=s),i}var ev=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tv=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rv=/Z|[+-]\d\d(?::?\d\d)?/,ka=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Qu=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],nv=/^\/?Date\((-?\d+)/i,iv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ov={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tf(i){var s,l,d=i._i,p=ev.exec(d)||tv.exec(d),_,S,W,te,ge=ka.length,Ot=Qu.length;if(p){for(y(i).iso=!0,s=0,l=ge;sfs(S)||i._dayOfYear===0)&&(y(i)._overflowDayOfYear=!0),l=ps(S,0,i._dayOfYear),i._a[In]=l.getUTCMonth(),i._a[Jr]=l.getUTCDate()),s=0;s<3&&i._a[s]==null;++s)i._a[s]=d[s]=p[s];for(;s<7;s++)i._a[s]=d[s]=i._a[s]==null?s===2?1:0:i._a[s];i._a[ct]===24&&i._a[Dr]===0&&i._a[wn]===0&&i._a[Ci]===0&&(i._nextDay=!0,i._a[ct]=0),i._d=(i._useUTC?ps:yb).apply(null,d),_=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ct]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==_&&(y(i).weekdayMismatch=!0)}}function mv(i){var s,l,d,p,_,S,W,te,ge;s=i._w,s.GG!=null||s.W!=null||s.E!=null?(_=1,S=4,l=zi(s.GG,i._a[Dt],hs(Ye(),1,4).year),d=zi(s.W,1),p=zi(s.E,1),(p<1||p>7)&&(te=!0)):(_=i._locale._week.dow,S=i._locale._week.doy,ge=hs(Ye(),_,S),l=zi(s.gg,i._a[Dt],ge.year),d=zi(s.w,ge.week),s.d!=null?(p=s.d,(p<0||p>6)&&(te=!0)):s.e!=null?(p=s.e+_,(s.e<0||s.e>6)&&(te=!0)):p=_),d<1||d>Cn(l,_,S)?y(i)._overflowWeeks=!0:te!=null?y(i)._overflowWeekday=!0:(W=xf(l,d,p,_,S),i._a[Dt]=W.year,i._dayOfYear=W.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Lu(i){if(i._f===e.ISO_8601){Tf(i);return}if(i._f===e.RFC_2822){Ef(i);return}i._a=[],y(i).empty=!0;var s=""+i._i,l,d,p,_,S,W=s.length,te=0,ge,Ot;for(p=Ve(i._f,i._locale).match(N)||[],Ot=p.length,l=0;l0&&y(i).unusedInput.push(S),s=s.slice(s.indexOf(d)+d.length),te+=d.length),E[_]?(d?y(i).empty=!1:y(i).unusedTokens.push(_),rb(_,d,i)):i._strict&&!d&&y(i).unusedTokens.push(_);y(i).charsLeftOver=W-te,s.length>0&&y(i).unusedInput.push(s),i._a[ct]<=12&&y(i).bigHour===!0&&i._a[ct]>0&&(y(i).bigHour=void 0),y(i).parsedDateParts=i._a.slice(0),y(i).meridiem=i._meridiem,i._a[ct]=pv(i._locale,i._a[ct],i._meridiem),ge=y(i).era,ge!==null&&(i._a[Dt]=i._locale.erasConvertYear(ge,i._a[Dt])),Vu(i),Uu(i)}function pv(i,s,l){var d;return l==null?s:i.meridiemHour!=null?i.meridiemHour(s,l):(i.isPM!=null&&(d=i.isPM(l),d&&s<12&&(s+=12),!d&&s===12&&(s=0)),s)}function hv(i){var s,l,d,p,_,S,W=!1,te=i._f.length;if(te===0){y(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:k()});function Df(i,s){var l,d;if(s.length===1&&n(s[0])&&(s=s[0]),!s.length)return Ye();for(l=s[0],d=1;dthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Wv(){if(!c(this._isDSTShifted))return this._isDSTShifted;var i={},s;return P(i,this),i=Gf(i),i._a?(s=i._isUTC?g(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Sv(i._a,s.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Zv(){return this.isValid()?!this._isUTC:!1}function Mv(){return this.isValid()?this._isUTC:!1}function Wf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Yv=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Xv=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nr(i,s){var l=i,d=null,p,_,S;return Ra(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(l={},s?l[s]=+i:l.milliseconds=+i):(d=Yv.exec(i))?(p=d[1]==="-"?-1:1,l={y:0,d:fe(d[Jr])*p,h:fe(d[ct])*p,m:fe(d[Dr])*p,s:fe(d[wn])*p,ms:fe(Ou(d[Ci]*1e3))*p}):(d=Xv.exec(i))?(p=d[1]==="-"?-1:1,l={y:xi(d[2],p),M:xi(d[3],p),w:xi(d[4],p),d:xi(d[5],p),h:xi(d[6],p),m:xi(d[7],p),s:xi(d[8],p)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(S=Uv(Ye(l.from),Ye(l.to)),l={},l.ms=S.milliseconds,l.M=S.months),_=new Sa(l),Ra(i)&&a(i,"_locale")&&(_._locale=i._locale),Ra(i)&&a(i,"_isValid")&&(_._isValid=i._isValid),_}Nr.fn=Sa.prototype,Nr.invalid=kv;function xi(i,s){var l=i&&parseFloat(i.replace(",","."));return(isNaN(l)?0:l)*s}function Zf(i,s){var l={};return l.months=s.month()-i.month()+(s.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(s)&&--l.months,l.milliseconds=+s-+i.clone().add(l.months,"M"),l}function Uv(i,s){var l;return i.isValid()&&s.isValid()?(s=Pu(s,i),i.isBefore(s)?l=Zf(i,s):(l=Zf(s,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Mf(i,s){return function(l,d){var p,_;return d!==null&&!isNaN(+d)&&(He(s,"moment()."+s+"(period, number) is deprecated. Please use moment()."+s+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),_=l,l=d,d=_),p=Nr(l,d),Yf(this,p,i),this}}function Yf(i,s,l,d){var p=s._milliseconds,_=Ou(s._days),S=Ou(s._months);i.isValid()&&(d=d==null?!0:d,S&&If(i,ms(i,"Month")+S*l),_&&vf(i,"Date",ms(i,"Date")+_*l),p&&i._d.setTime(i._d.valueOf()+p*l),d&&e.updateOffset(i,_||S))}var Qv=Mf(1,"add"),Vv=Mf(-1,"subtract");function Xf(i){return typeof i=="string"||i instanceof String}function Lv(i){return Y(i)||h(i)||Xf(i)||f(i)||$v(i)||Ov(i)||i===null||i===void 0}function Ov(i){var s=o(i)&&!u(i),l=!1,d=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,_,S=d.length;for(p=0;pl.valueOf():l.valueOf()9999?ut(l,s?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):he(Date.prototype.toISOString)?s?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ut(l,"Z")):ut(l,s?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function sy(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",s="",l,d,p,_;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",s="Z"),l="["+i+'("]',d=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",_=s+'[")]',this.format(l+d+p+_)}function ay(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var s=ut(this,i);return this.localeData().postformat(s)}function ly(i,s){return this.isValid()&&(Y(i)&&i.isValid()||Ye(i).isValid())?Nr({to:this,from:i}).locale(this.locale()).humanize(!s):this.localeData().invalidDate()}function uy(i){return this.from(Ye(),i)}function cy(i,s){return this.isValid()&&(Y(i)&&i.isValid()||Ye(i).isValid())?Nr({from:this,to:i}).locale(this.locale()).humanize(!s):this.localeData().invalidDate()}function dy(i){return this.to(Ye(),i)}function Uf(i){var s;return i===void 0?this._locale._abbr:(s=xn(i),s!=null&&(this._locale=s),this)}var Qf=_e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Vf(){return this._locale}var Ta=1e3,Ki=60*Ta,Ea=60*Ki,Lf=(365*400+97)*24*Ea;function qi(i,s){return(i%s+s)%s}function Of(i,s,l){return i<100&&i>=0?new Date(i+400,s,l)-Lf:new Date(i,s,l).valueOf()}function $f(i,s,l){return i<100&&i>=0?Date.UTC(i+400,s,l)-Lf:Date.UTC(i,s,l)}function fy(i){var s,l;if(i=_r(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?$f:Of,i){case"year":s=l(this.year(),0,1);break;case"quarter":s=l(this.year(),this.month()-this.month()%3,1);break;case"month":s=l(this.year(),this.month(),1);break;case"week":s=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":s=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":s=l(this.year(),this.month(),this.date());break;case"hour":s=this._d.valueOf(),s-=qi(s+(this._isUTC?0:this.utcOffset()*Ki),Ea);break;case"minute":s=this._d.valueOf(),s-=qi(s,Ki);break;case"second":s=this._d.valueOf(),s-=qi(s,Ta);break}return this._d.setTime(s),e.updateOffset(this,!0),this}function my(i){var s,l;if(i=_r(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?$f:Of,i){case"year":s=l(this.year()+1,0,1)-1;break;case"quarter":s=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":s=l(this.year(),this.month()+1,1)-1;break;case"week":s=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":s=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":s=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":s=this._d.valueOf(),s+=Ea-qi(s+(this._isUTC?0:this.utcOffset()*Ki),Ea)-1;break;case"minute":s=this._d.valueOf(),s+=Ki-qi(s,Ki)-1;break;case"second":s=this._d.valueOf(),s+=Ta-qi(s,Ta)-1;break}return this._d.setTime(s),e.updateOffset(this,!0),this}function py(){return this._d.valueOf()-(this._offset||0)*6e4}function hy(){return Math.floor(this.valueOf()/1e3)}function gy(){return new Date(this.valueOf())}function by(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function vy(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function yy(){return this.isValid()?this.toISOString():null}function _y(){return x(this)}function Iy(){return I({},y(this))}function wy(){return y(this).overflow}function Cy(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}G("N",0,0,"eraAbbr"),G("NN",0,0,"eraAbbr"),G("NNN",0,0,"eraAbbr"),G("NNNN",0,0,"eraName"),G("NNNNN",0,0,"eraNarrow"),G("y",["y",1],"yo","eraYear"),G("y",["yy",2],0,"eraYear"),G("y",["yyy",3],0,"eraYear"),G("y",["yyyy",4],0,"eraYear"),Z("N",Ju),Z("NN",Ju),Z("NNN",Ju),Z("NNNN",Dy),Z("NNNNN",Ny),Re(["N","NN","NNN","NNNN","NNNNN"],function(i,s,l,d){var p=l._locale.erasParse(i,d,l._strict);p?y(l).era=p:y(l).invalidEra=i}),Z("y",Hi),Z("yy",Hi),Z("yyy",Hi),Z("yyyy",Hi),Z("yo",Wy),Re(["y","yy","yyy","yyyy"],Dt),Re(["yo"],function(i,s,l,d){var p;l._locale._eraYearOrdinalRegex&&(p=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?s[Dt]=l._locale.eraYearOrdinalParse(i,p):s[Dt]=parseInt(i,10)});function xy(i,s){var l,d,p,_=this._eras||xn("en")._eras;for(l=0,d=_.length;l=0)return _[d]}function ky(i,s){var l=i.since<=i.until?1:-1;return s===void 0?e(i.since).year():e(i.since).year()+(s-i.offset)*l}function Sy(){var i,s,l,d=this.localeData().eras();for(i=0,s=d.length;i_&&(s=_),Vy.call(this,i,s,l,d,p))}function Vy(i,s,l,d,p){var _=xf(i,s,l,d,p),S=ps(_.year,0,_.dayOfYear);return this.year(S.getUTCFullYear()),this.month(S.getUTCMonth()),this.date(S.getUTCDate()),this}G("Q",0,"Qo","quarter"),Z("Q",mf),Re("Q",function(i,s){s[In]=(fe(i)-1)*3});function Ly(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}G("D",["DD",2],"Do","date"),Z("D",Me,Ji),Z("DD",Me,or),Z("Do",function(i,s){return i?s._dayOfMonthOrdinalParse||s._ordinalParse:s._dayOfMonthOrdinalParseLenient}),Re(["D","DD"],Jr),Re("Do",function(i,s){s[Jr]=fe(i.match(Me)[0])});var Hf=ji("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),Z("DDD",va),Z("DDDD",pf),Re(["DDD","DDDD"],function(i,s,l){l._dayOfYear=fe(i)});function Oy(i){var s=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?s:this.add(i-s,"d")}G("m",["mm",2],0,"minute"),Z("m",Me,Du),Z("mm",Me,or),Re(["m","mm"],Dr);var $y=ji("Minutes",!1);G("s",["ss",2],0,"second"),Z("s",Me,Du),Z("ss",Me,or),Re(["s","ss"],wn);var Py=ji("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return this.millisecond()*10}),G(0,["SSSSS",5],0,function(){return this.millisecond()*100}),G(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),G(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),G(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),G(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Z("S",va,mf),Z("SS",va,or),Z("SSS",va,pf);var ni,Jf;for(ni="SSSS";ni.length<=9;ni+="S")Z(ni,Hi);function Hy(i,s){s[Ci]=fe(("0."+i)*1e3)}for(ni="S";ni.length<=9;ni+="S")Re(ni,Hy);Jf=ji("Milliseconds",!1),G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");function Jy(){return this._isUTC?"UTC":""}function jy(){return this._isUTC?"Coordinated Universal Time":""}var T=ie.prototype;T.add=Qv,T.calendar=Jv,T.clone=jv,T.diff=ny,T.endOf=my,T.format=ay,T.from=ly,T.fromNow=uy,T.to=cy,T.toNow=dy,T.get=sb,T.invalidAt=wy,T.isAfter=zv,T.isBefore=Kv,T.isBetween=qv,T.isSame=ey,T.isSameOrAfter=ty,T.isSameOrBefore=ry,T.isValid=_y,T.lang=Qf,T.locale=Uf,T.localeData=Vf,T.max=_v,T.min=yv,T.parsingFlags=Iy,T.set=ab,T.startOf=fy,T.subtract=Vv,T.toArray=by,T.toObject=vy,T.toDate=gy,T.toISOString=oy,T.inspect=sy,typeof Symbol!="undefined"&&Symbol.for!=null&&(T[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),T.toJSON=yy,T.toString=iy,T.unix=hy,T.valueOf=py,T.creationData=Cy,T.eraName=Sy,T.eraNarrow=Ry,T.eraAbbr=Fy,T.eraYear=Ty,T.year=bf,T.isLeapYear=ob,T.weekYear=Zy,T.isoWeekYear=My,T.quarter=T.quarters=Ly,T.month=wf,T.daysInMonth=gb,T.week=T.weeks=xb,T.isoWeek=T.isoWeeks=Ab,T.weeksInYear=Uy,T.weeksInWeekYear=Qy,T.isoWeeksInYear=Yy,T.isoWeeksInISOWeekYear=Xy,T.date=Hf,T.day=T.days=Mb,T.weekday=Yb,T.isoWeekday=Xb,T.dayOfYear=Oy,T.hour=T.hours=Pb,T.minute=T.minutes=$y,T.second=T.seconds=Py,T.millisecond=T.milliseconds=Jf,T.utcOffset=Fv,T.utc=Ev,T.local=Gv,T.parseZone=Bv,T.hasAlignedHourOffset=Dv,T.isDST=Nv,T.isLocal=Zv,T.isUtcOffset=Mv,T.isUtc=Wf,T.isUTC=Wf,T.zoneAbbr=Jy,T.zoneName=jy,T.dates=_e("dates accessor is deprecated. Use date instead.",Hf),T.months=_e("months accessor is deprecated. Use month instead",wf),T.years=_e("years accessor is deprecated. Use year instead",bf),T.zone=_e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Tv),T.isDSTShifted=_e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Wv);function zy(i){return Ye(i*1e3)}function Ky(){return Ye.apply(null,arguments).parseZone()}function jf(i){return i}var Ce=rt.prototype;Ce.calendar=Q,Ce.longDateFormat=qt,Ce.invalidDate=ti,Ce.ordinal=$g,Ce.preparse=jf,Ce.postformat=jf,Ce.relativeTime=Hg,Ce.pastFuture=Jg,Ce.set=Lt,Ce.eras=xy,Ce.erasParse=Ay,Ce.erasConvertYear=ky,Ce.erasAbbrRegex=Gy,Ce.erasNameRegex=Ey,Ce.erasNarrowRegex=By,Ce.months=fb,Ce.monthsShort=mb,Ce.monthsParse=hb,Ce.monthsRegex=vb,Ce.monthsShortRegex=bb,Ce.week=_b,Ce.firstDayOfYear=Cb,Ce.firstDayOfWeek=wb,Ce.weekdays=Bb,Ce.weekdaysMin=Nb,Ce.weekdaysShort=Db,Ce.weekdaysParse=Zb,Ce.weekdaysRegex=Ub,Ce.weekdaysShortRegex=Qb,Ce.weekdaysMinRegex=Vb,Ce.isPM=Ob,Ce.meridiem=Hb;function Ba(i,s,l,d){var p=xn(),_=g().set(d,s);return p[l](_,i)}function zf(i,s,l){if(f(i)&&(s=i,i=void 0),i=i||"",s!=null)return Ba(i,s,l,"month");var d,p=[];for(d=0;d<12;d++)p[d]=Ba(i,d,l,"month");return p}function zu(i,s,l,d){typeof i=="boolean"?(f(s)&&(l=s,s=void 0),s=s||""):(s=i,l=s,i=!1,f(s)&&(l=s,s=void 0),s=s||"");var p=xn(),_=i?p._week.dow:0,S,W=[];if(l!=null)return Ba(s,(l+_)%7,d,"day");for(S=0;S<7;S++)W[S]=Ba(s,(S+_)%7,d,"day");return W}function qy(i,s){return zf(i,s,"months")}function e_(i,s){return zf(i,s,"monthsShort")}function t_(i,s,l){return zu(i,s,l,"weekdays")}function r_(i,s,l){return zu(i,s,l,"weekdaysShort")}function n_(i,s,l){return zu(i,s,l,"weekdaysMin")}ri("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var s=i%10,l=fe(i%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return i+l}}),e.lang=_e("moment.lang is deprecated. Use moment.locale instead.",ri),e.langData=_e("moment.langData is deprecated. Use moment.localeData instead.",xn);var An=Math.abs;function i_(){var i=this._data;return this._milliseconds=An(this._milliseconds),this._days=An(this._days),this._months=An(this._months),i.milliseconds=An(i.milliseconds),i.seconds=An(i.seconds),i.minutes=An(i.minutes),i.hours=An(i.hours),i.months=An(i.months),i.years=An(i.years),this}function Kf(i,s,l,d){var p=Nr(s,l);return i._milliseconds+=d*p._milliseconds,i._days+=d*p._days,i._months+=d*p._months,i._bubble()}function o_(i,s){return Kf(this,i,s,1)}function s_(i,s){return Kf(this,i,s,-1)}function qf(i){return i<0?Math.floor(i):Math.ceil(i)}function a_(){var i=this._milliseconds,s=this._days,l=this._months,d=this._data,p,_,S,W,te;return i>=0&&s>=0&&l>=0||i<=0&&s<=0&&l<=0||(i+=qf(Ku(l)+s)*864e5,s=0,l=0),d.milliseconds=i%1e3,p=Ir(i/1e3),d.seconds=p%60,_=Ir(p/60),d.minutes=_%60,S=Ir(_/60),d.hours=S%24,s+=Ir(S/24),te=Ir(em(s)),l+=te,s-=qf(Ku(te)),W=Ir(l/12),l%=12,d.days=s,d.months=l,d.years=W,this}function em(i){return i*4800/146097}function Ku(i){return i*146097/4800}function l_(i){if(!this.isValid())return NaN;var s,l,d=this._milliseconds;if(i=_r(i),i==="month"||i==="quarter"||i==="year")switch(s=this._days+d/864e5,l=this._months+em(s),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(s=this._days+Math.round(Ku(this._months)),i){case"week":return s/7+d/6048e5;case"day":return s+d/864e5;case"hour":return s*24+d/36e5;case"minute":return s*1440+d/6e4;case"second":return s*86400+d/1e3;case"millisecond":return Math.floor(s*864e5)+d;default:throw new Error("Unknown unit "+i)}}function kn(i){return function(){return this.as(i)}}var tm=kn("ms"),u_=kn("s"),c_=kn("m"),d_=kn("h"),f_=kn("d"),m_=kn("w"),p_=kn("M"),h_=kn("Q"),g_=kn("y"),b_=tm;function v_(){return Nr(this)}function y_(i){return i=_r(i),this.isValid()?this[i+"s"]():NaN}function Ai(i){return function(){return this.isValid()?this._data[i]:NaN}}var __=Ai("milliseconds"),I_=Ai("seconds"),w_=Ai("minutes"),C_=Ai("hours"),x_=Ai("days"),A_=Ai("months"),k_=Ai("years");function S_(){return Ir(this.days()/7)}var Sn=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function R_(i,s,l,d,p){return p.relativeTime(s||1,!!l,i,d)}function F_(i,s,l,d){var p=Nr(i).abs(),_=Sn(p.as("s")),S=Sn(p.as("m")),W=Sn(p.as("h")),te=Sn(p.as("d")),ge=Sn(p.as("M")),Ot=Sn(p.as("w")),Rn=Sn(p.as("y")),ii=_<=l.ss&&["s",_]||_0,ii[4]=d,R_.apply(null,ii)}function T_(i){return i===void 0?Sn:typeof i=="function"?(Sn=i,!0):!1}function E_(i,s){return eo[i]===void 0?!1:s===void 0?eo[i]:(eo[i]=s,i==="s"&&(eo.ss=s-1),!0)}function G_(i,s){if(!this.isValid())return this.localeData().invalidDate();var l=!1,d=eo,p,_;return typeof i=="object"&&(s=i,i=!1),typeof i=="boolean"&&(l=i),typeof s=="object"&&(d=Object.assign({},eo,s),s.s!=null&&s.ss==null&&(d.ss=s.s-1)),p=this.localeData(),_=F_(this,!l,d,p),l&&(_=p.pastFuture(+this,_)),p.postformat(_)}var qu=Math.abs;function to(i){return(i>0)-(i<0)||+i}function Da(){if(!this.isValid())return this.localeData().invalidDate();var i=qu(this._milliseconds)/1e3,s=qu(this._days),l=qu(this._months),d,p,_,S,W=this.asSeconds(),te,ge,Ot,Rn;return W?(d=Ir(i/60),p=Ir(d/60),i%=60,d%=60,_=Ir(l/12),l%=12,S=i?i.toFixed(3).replace(/\.?0+$/,""):"",te=W<0?"-":"",ge=to(this._months)!==to(W)?"-":"",Ot=to(this._days)!==to(W)?"-":"",Rn=to(this._milliseconds)!==to(W)?"-":"",te+"P"+(_?ge+_+"Y":"")+(l?ge+l+"M":"")+(s?Ot+s+"D":"")+(p||d||i?"T":"")+(p?Rn+p+"H":"")+(d?Rn+d+"M":"")+(i?Rn+S+"S":"")):"P0D"}var Ie=Sa.prototype;Ie.isValid=Av,Ie.abs=i_,Ie.add=o_,Ie.subtract=s_,Ie.as=l_,Ie.asMilliseconds=tm,Ie.asSeconds=u_,Ie.asMinutes=c_,Ie.asHours=d_,Ie.asDays=f_,Ie.asWeeks=m_,Ie.asMonths=p_,Ie.asQuarters=h_,Ie.asYears=g_,Ie.valueOf=b_,Ie._bubble=a_,Ie.clone=v_,Ie.get=y_,Ie.milliseconds=__,Ie.seconds=I_,Ie.minutes=w_,Ie.hours=C_,Ie.days=x_,Ie.weeks=S_,Ie.months=A_,Ie.years=k_,Ie.humanize=G_,Ie.toISOString=Da,Ie.toString=Da,Ie.toJSON=Da,Ie.locale=Uf,Ie.localeData=Vf,Ie.toIsoString=_e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Da),Ie.lang=Qf,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Z("x",_a),Z("X",qg),Re("X",function(i,s,l){l._d=new Date(parseFloat(i)*1e3)}),Re("x",function(i,s,l){l._d=new Date(fe(i))});return e.version="2.30.1",t(Ye),e.fn=T,e.min=Iv,e.max=wv,e.now=Cv,e.utc=g,e.unix=zy,e.months=qy,e.isDate=h,e.locale=ri,e.invalid=k,e.duration=Nr,e.isMoment=Y,e.weekdays=t_,e.parseZone=Ky,e.localeData=xn,e.isDuration=Ra,e.monthsShort=e_,e.weekdaysMin=n_,e.defineLocale=Xu,e.updateLocale=Kb,e.locales=qb,e.weekdaysShort=r_,e.normalizeUnits=_r,e.relativeTimeRounding=T_,e.relativeTimeThreshold=E_,e.calendarFormat=Hv,e.prototype=T,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e}))});var NC={};X_(NC,{default:()=>Fu});module.exports=U_(NC);var _s=class{constructor(e){m(this,"deps",e);m(this,"lastExpiredKeys",new Set)}startPeriodicTask(){let e=!0;this.periodicTask().finally(()=>{e=!1}),this.deps.registerInterval(window.setInterval(()=>{if(e){console.debug("Skip reminder interval task because task is already running.");return}e=!0,this.periodicTask().finally(()=>{e=!1})},this.deps.checkIntervalSec()*1e3))}async periodicTask(){if(this.deps.reloadUI(!1),this.deps.isScanned()||this.deps.reloadRemindersInAllFiles().then(()=>{this.deps.markScanned(),this.deps.saveData()}),this.deps.saveData(!1),this.deps.isPopupIntrusive()&&this.deps.isEditing())return;let e=this.deps.getExpiredReminders(),t=new Set(e.map(o=>o.key()));for(let o of t)if(!this.lastExpiredKeys.has(o)){this.deps.reloadUI(!0);break}if(this.lastExpiredKeys=t,!this.deps.isNotificationEnabled()||this.deps.isNotificationPaused())return;let n;for(let o of e)if(this.deps.isLayoutReady()){if(o.muteNotification)continue;if(n)for(;n.beingDisplayed;)await this.sleep(100);this.deps.showReminder(o),n=o}}async sleep(e){return new Promise(t=>setTimeout(t,e))}};function tc(r){let e=r.lastIndexOf("/");return(e===-1?r:r.slice(e+1)).replace(/\.md$/i,"")}function rc(r,e){let t=new Map;for(let a of r){let u=t.get(a.sequenceId);u===void 0?t.set(a.sequenceId,[a]):u.push(a)}let n=[],o=[];for(let a of t.values()){let u=a[a.length-1];if(u.event==="message_delete")continue;(u.atSeconds>e?n:o).push({sequenceId:u.sequenceId,atSeconds:u.atSeconds})}return{pending:n,delivered:o}}var nc="obr-";function Is(r){return r.startsWith(nc)}var Q_=16777619,V_=2166136261,L_=2654435769;function im(r,e){let t=e;for(let n=0;n>>0}var O_=` `;function om(r,e){return`${r}${O_}${e}`}function sm(r,e,t){let n=om(r,e),o=im(n,V_).toString(36),a=im(n,L_).toString(36),u=`${nc}${o}${a}`;return t===0?u:`${u}-${t}`}function ic(r){var o;let e=[...r].sort((a,u)=>a.file!==u.file?a.fileb)continue;let ie=I.get(F);v.set(ie,{sequenceId:ie,atSeconds:Math.floor(P/1e3),reminder:F})}let y=new Map;for(let F of t)y.set(F.sequenceId,F);let w=[];for(let F of v.values()){let P=y.get(F.sequenceId);(P===void 0||P.atSeconds!==F.atSeconds)&&w.push(F)}let x=[],k=new Set;function B(F){k.has(F)||(k.add(F),x.push({sequenceId:F}))}for(let F of t)Is(F.sequenceId)&&(v.has(F.sequenceId)||am(F,g)&&B(F.sequenceId));for(let F of n)am(F,g)&&B(F.sequenceId);return{publish:w,delete:x}}function am(r,e){if(!Is(r.sequenceId))return!1;let t=e.get(r.sequenceId);return t===void 0||t!==r.atSeconds}function sc(r){return r.map(e=>e.sequenceId).filter(Is)}var ro=class{constructor(e){m(this,"_value",e)}get value(){return this._value}},oi=class{constructor(e){m(this,"_value",e);m(this,"onChangeFunctions",[])}onChanged(e){this.onChangeFunctions.push(e)}get value(){return this._value}set value(e){let t=this._value;this._value=e,this.onChangeFunctions.forEach(n=>{n(t,e)})}};var sr=Wr(wr(),1);var $=class r{constructor(e,t){m(this,"time",e);m(this,"_hasTimePart",t)}static now(){return new r((0,sr.default)(),!0)}static parse(e){return e.length>10?new r((0,sr.default)(e,"YYYY-MM-DD HH:mm"),!0):new r((0,sr.default)(e,"YYYY-MM-DD"),!1)}static ofEpochMillis(e){return new r((0,sr.default)(e),!0)}static duration(e,t,n,o){return t.fixedTime(o).diff(e.fixedTime(o),n)}getTimeInMillis(e){return this.fixedTime(e).valueOf()}format(e,t){return this.fixedTime(t).format(e)}toYYYYMMMM(e){return this.fixedTime(e).format("YYYY, MMMM")}toYYYYMMDD(e){return this.fixedTime(e).format("YYYY-MM-DD")}add(e,t,n){return new r(this.fixedTime(n).clone().add(e,t),this._hasTimePart)}fixedTime(e){return this._hasTimePart?this.time:e===void 0?this.time:this.time.clone().add(e.minutes,"minutes")}get hasTimePart(){return this._hasTimePart}moment(){return this.time}isValid(){return this.time.isValid()}clone(e){let t=e==null?this._hasTimePart:e,n=this.time.clone();return new r(n,t)}toString(){return this._hasTimePart?this.format("YYYY-MM-DD HH:mm"):this.format("YYYY-MM-DD")}equals(e){return this._hasTimePart===e._hasTimePart&&this.time.isSame(e.time)}},Na=class r{constructor(e,t){m(this,"hour",e);m(this,"minute",t)}static parse(e){if(!e.match(/^\d{1,2}:\d{1,2}$/))throw`Unexpected format time(${e}). Time must be HH:mm.`;let t=e.split(":");if(t.length!==2)throw`Unexpected format time(${e}). time must be HH:mm.`;let n=parseInt(t[0]),o=parseInt(t[1]);if(n>23||n<0)throw"hour must be 0~23";if(o>59||o<0)throw"minute must be 0~59";return new r(n,o)}get minutes(){return this.hour*60+this.minute}toString(){let e=t=>t<10?"0"+t:""+t;return`${e(this.hour)}:${e(this.minute)}`}};function io(r,e){return()=>new $((0,sr.default)(),!0).add(r,e)}function lm(r){return io(r,"minutes")}function lc(r){return io(r,"hours")}function H_(r){return io(r,"days")}function J_(r){return io(r,"weeks")}function j_(r){return io(r,"months")}function z_(r){return io(r,"years")}function ki(r){return()=>{let e=(0,sr.default)();return e.isoWeekday()<=r?new $(e.isoWeekday(r),!1):new $(e.add(1,"weeks").isoWeekday(r),!1)}}function uc(){return()=>new $((0,sr.default)().add(1,"days"),!1)}function um(){return()=>new $((0,sr.default)().add(1,"weeks"),!1)}function K_(){return()=>new $((0,sr.default)().add(1,"months"),!1)}function q_(){return()=>new $((0,sr.default)().add(1,"years"),!1)}var Xe=class{constructor(e,t){m(this,"label",e);m(this,"later",t)}};function cm(r){return r.split(` `).map(e=>eI(e.trim()))}function eI(r){if(r=r.toLowerCase(),r.startsWith("in")){let e=r.split(" ");if(e.length!==3)throw"Unsupported format. Should be 'In N (minutes|hours)'";let t=e[1]==="a"||e[1]==="an"?1:parseInt(e[1]);switch(e[2]){case"minute":case"minutes":{let n=t==1?"minute":"minutes";return new Xe(`In ${t} ${n}`,lm(t))}case"hour":case"hours":{let n=t==1?"hour":"hours";return new Xe(`In ${t} ${n}`,lc(t))}case"day":case"days":{let n=t==1?"day":"days";return new Xe(`In ${t} ${n}`,H_(t))}case"week":case"weeks":{let n=t==1?"week":"weeks";return new Xe(`In ${t} ${n}`,J_(t))}case"month":case"months":{let n=t==1?"month":"months";return new Xe(`In ${t} ${n}`,j_(t))}case"year":case"years":{let n=t==1?"year":"years";return new Xe(`In ${t} ${n}`,z_(t))}}}else if(r.startsWith("next")){let e=r.substring(5);switch(e){case"sunday":return new Xe("Next Sunday",ki(0));case"monday":return new Xe("Next Monday",ki(1));case"tuesday":return new Xe("Next Tuesday",ki(2));case"wednesday":return new Xe("Next Wednesday",ki(3));case"thursday":return new Xe("Next Thursday",ki(4));case"friday":return new Xe("Next Friday",ki(5));case"saturday":return new Xe("Next Saturday",ki(6));case"day":return new Xe("Tomorrow",uc());case"week":return new Xe("Next week",um());case"month":return new Xe("Next month",K_());case"year":return new Xe("Next year",q_());default:throw`Unsupported weekday: ${e}`}}else if(r==="tomorrow")return new Xe("Tomorrow",uc());throw`Unsupported format: ${r}`}var dc=[new Xe("In 30 minutes",lm(30)),new Xe("In 1 hours",lc(1)),new Xe("In 3 hours",lc(3)),new Xe("Tomorrow",uc()),new Xe("Next week",um())],cc=class{constructor(){m(this,"dateFormat",new ro("YYYY-MM-DD"));m(this,"dateTimeFormat",new ro("YYYY-MM-DD HH:mm"));m(this,"strict",new ro(!1))}setTimeFormat(e,t,n){this.dateFormat=e,this.dateTimeFormat=t,this.strict=n}parse(e){let t=this.doParse(e,!0);return t!=null?t:this.strict.value?null:this.doParse(e,!1)}doParse(e,t){let n=(0,sr.default)(e,this.dateTimeFormat.value,t);if(n.isValid())return new $(n,!0);let o=(0,sr.default)(e,this.dateFormat.value,t);return o.isValid()?new $(o,!1):null}toString(e){return e.hasTimePart?e.format(this.dateTimeFormat.value):e.format(this.dateFormat.value)}},jr=new cc;var Wa=require("obsidian");var tI=1800*1e3,rI=10*1e3,ws=class{constructor(e){m(this,"deps",e);m(this,"debounceTimer");m(this,"syncing",!1);m(this,"syncQueued",!1);m(this,"stopped",!1);m(this,"previousEnabled")}start(){this.previousEnabled=this.deps.isEnabled(),this.sync(),this.deps.registerInterval(window.setInterval(()=>{this.sync()},tI))}stop(){this.stopped=!0,this.debounceTimer!==void 0&&(window.clearTimeout(this.debounceTimer),this.debounceTimer=void 0)}notifyRemindersChanged(){this.stopped||(this.debounceTimer!==void 0&&window.clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{this.debounceTimer=void 0,this.sync()},rI))}notifySettingsChanged(){this.stopped||(this.checkEnabledTransition(),this.notifyRemindersChanged())}checkEnabledTransition(){let e=this.deps.isEnabled(),t=this.previousEnabled;this.previousEnabled=e,t===!0&&!e&&this.cleanupAfterDisable()}async cleanupAfterDisable(){let e=this.resolveServerAndTopic();if(e===void 0)return;let{serverUrl:t,topic:n}=e;try{let{pending:o}=await this.fetchServerState(t,n),a=sc(o);for(let u of a)await this.deleteScheduled(t,n,u)}catch(o){console.error("[ntfy] Failed to clean up scheduled notifications after disabling: %o",o)}}async sync(){if(this.syncing){this.syncQueued=!0;return}this.syncing=!0;try{await this.doSync()}finally{this.syncing=!1,this.syncQueued&&(this.syncQueued=!1,this.sync())}}async doSync(){if(!this.deps.isEnabled())return;let e=this.resolveServerAndTopic();if(e===void 0)return;let{serverUrl:t,topic:n}=e;try{let{pending:o,delivered:a}=await this.fetchServerState(t,n),u=oc({reminders:this.deps.reminders(),serverPending:o,serverDelivered:a,now:$.now(),defaultTime:this.deps.defaultTime()});for(let c of u.delete)await this.deleteScheduled(t,n,c.sequenceId);for(let c of u.publish)await this.publish(t,n,c)}catch(o){console.error("[ntfy] Failed to sync scheduled notifications: %o",o)}}resolveServerAndTopic(){let e=this.deps.serverUrl().trim().replace(/\/+$/,""),t=this.deps.topic().trim();if(!(e.length===0||t.length===0))return{serverUrl:e,topic:t}}async fetchServerState(e,t){let n=await(0,Wa.requestUrl)({url:`${e}/${encodeURIComponent(t)}/json?poll=1&sched=1`,method:"GET",throw:!1});if(n.status>=400)throw new Error(`ntfy: failed to fetch the topic's scheduled messages: status=${n.status}`);let o=[];for(let u of n.text.split(` `)){let c=u.trim();if(c.length===0)continue;let f;try{f=JSON.parse(c)}catch(h){console.error("[ntfy] Failed to parse a poll response line: %o",h);continue}f.event!=="message"&&f.event!=="message_delete"||f.sequence_id===void 0||f.time===void 0||o.push({event:f.event,sequenceId:f.sequence_id,atSeconds:f.time})}let a=Math.floor(Date.now()/1e3);return rc(o,a)}async publish(e,t,n){let o=await(0,Wa.requestUrl)({url:`${e}/`,method:"POST",headers:{"Content-Type":"application/json","X-Sequence-ID":n.sequenceId},body:JSON.stringify({topic:t,title:n.reminder.title,message:tc(n.reminder.file),click:this.buildClickUrl(n.reminder),delay:String(n.atSeconds)}),throw:!1});o.status>=400&&console.error("[ntfy] Failed to publish a scheduled notification: status=%d",o.status)}async deleteScheduled(e,t,n){let o=await(0,Wa.requestUrl)({url:`${e}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,method:"DELETE",throw:!1});o.status>=400&&console.error("[ntfy] Failed to delete a scheduled notification: status=%d",o.status)}buildClickUrl(e){let t=e.file.replace(/\.md$/i,""),n=encodeURIComponent(this.deps.vaultName()),o=encodeURIComponent(t);return`obsidian://open?vault=${n}&file=${o}`}};var vn=require("obsidian");var kp=require("obsidian");var dm=require("obsidian");function fm(r,e){if(!e.reminders.getExpiredReminders(e.settings.reminderTime.value).some(o=>!o.muteNotification))return!1;if(r)return!0;let n=e.reminders.muteExpiredReminders(e.settings.reminderTime.value);return e.ui.reload(!0),e.data.save(!0),new dm.Notice(`Muted ${n} reminder${n===1?"":"s"}`),!0}var fc=require("obsidian");var mm=require("obsidian");var Za=class extends mm.SuggestModal{constructor(t,n,o,a){super(t);m(this,"laters",n);m(this,"onSelect",o);m(this,"onCloseCallback",a);this.setPlaceholder("Pause reminder notifications for...")}getSuggestions(t){return this.laters.filter(n=>n.label.toLowerCase().includes(t.toLowerCase()))}renderSuggestion(t,n){n.createEl("div",{text:t.label})}onChooseSuggestion(t){this.onSelect(t)}onClose(){var t;(t=this.onCloseCallback)==null||t.call(this)}};function nI(r,e){let t=e.later();r.data.dndUntil.value=t,r.data.save(!0),r.ui.refreshDndStatusBar(),new fc.Notice(`Reminder notifications paused until ${t.format("YYYY-MM-DD HH:mm")}`)}function Ma(r){r.data.dndUntil.value=null,r.data.save(!0),r.ui.refreshDndStatusBar(),new fc.Notice("Reminder notifications resumed")}function Ya(r,e){new Za(r.app,r.settings.laters.value,t=>{nI(r,t)},e).open()}function pm(r,e){return r||Ya(e),!0}function oo(r,e){return r==null?!1:e.getTimeInMillis()e===this.check)}setChecked(e){this.check=e?"x":" "}getHeaderLength(){return this.prefix.length+this.check.length+this.suffix.length}clone(){return si.parse(this.lineIndex,this.toMarkdown())}};m(si,"regexp",/^(?((> ?)*)?\s*[-*+][ ]+\[)(?.)(?\]\s+)(?.*)$/),m(si,"checkedStatuses",["x","-"]);var so=si;function vm(r){if(so.parse(0,r)!==null)return r;let e=/^(?(?:> ?)*\s*)(?.*)$/.exec(r),t=e.groups.lead,n=e.groups.rest;if(/^#{1,6}[ ]/.test(n)||/^\d+[.)][ ]/.test(n)||n.startsWith("|")||n.startsWith("```"))return null;let o=/^(?[-*+])[ ]+(?.*)$/.exec(n);if(o){let a=o.groups.marker,u=o.groups.content;return`${t}${a} [ ] ${u}`}return`${t}- [ ] ${n}`}var Xa=class Xa{constructor(e,t){m(this,"file",e);m(this,"lines",[]);m(this,"todos",[]);this.parse(t)}parse(e){this.lines=e.split(` `),this.todos=[];let t=null,n=0;this.lines.forEach((o,a)=>{let u=Xa.fenceRegexp.exec(o),c=u==null?void 0:u.groups.fence,f=u==null?void 0:u.groups.info;if(t===null){if(c!==void 0&&(c[0]!=="`"||!f.includes("`"))){t=c[0],n=c.length;return}}else{c!==void 0&&c[0]===t&&c.length>=n&&f.trim()===""&&(t=null);return}let h=so.parse(a,o);h&&this.todos.push(h)})}getTodos(){return this.todos}insertTodo(e,t){t.lineIndex=e,this.lines.splice(e,0,t.toMarkdown());let n=-1;for(let o in this.todos){let a=this.todos[o];a.lineIndex>=e&&(n<0&&(n=parseInt(o)),a.lineIndex++)}n<=0?this.todos.splice(0,0,t):this.todos.splice(n,0,t)}getTodo(e){let t=this.todos.find(n=>n.lineIndex===e);return t==null?null:t}applyChanges(){this.todos.forEach(e=>{this.lines[e.lineIndex]=e.toMarkdown()})}toMarkdown(){return this.applyChanges(),this.lines.join(` `)}};m(Xa,"fenceRegexp",/^\s*(?:> ?)*\s*(?`{3,}|~{3,})(?.*)$/);var Fn=Xa;var _m=require("obsidian"),ym=window.require?window.require("electron"):void 0;function Ua(){new _m.Notice('Cannot insert a reminder here. Reminders can only be added to task lines such as "- [ ] Task".')}function Qa(r,e,t,n,o){let a=r.appendReminder(e,t,n);if(a!=null)return a;if(!o)return null;let u=vm(e);if(u==null)return null;let c=n==null?void 0:n+(u.length-e.length);return r.appendReminder(u,t,c)}async function Im(r,e){return ym&&(await ym.remote.dialog.showMessageBox({type:"question",title:"Obsidian Reminder",message:r,detail:e,buttons:["OK","Cancel"],cancelId:1})).response===0?0:1}var ao=class r{constructor(e,t,n,o,a){m(this,"file",e);m(this,"title",t);m(this,"time",n);m(this,"rowNumber",o);m(this,"done",a);m(this,"muteNotification",!1);m(this,"beingDisplayed",!1)}key(){return this.file+this.title+this.time.toString()}isExpired(e,t){return this.time.getTimeInMillis(t)<=e}equals(e){return this.rowNumber===e.rowNumber&&this.title===e.title&&this.time.equals(e.time)&&this.file===e.file}getFileName(){return r.extractFileName(this.file)}static extractFileName(e){let t=e.split(/[/\\]/);return t[t.length-1].replace(/^(.*?)(\..+)?$/,"$1")}},Va=class{constructor(e){m(this,"onChange",e);m(this,"fileToReminders",new Map);m(this,"reminders",[]);m(this,"reminderTime")}getExpiredReminders(e){let t=new Date().getTime(),n=[];for(let o=0;ot.time.toYYYYMMDD()===e.toYYYYMMDD())}removeReminder(e){console.debug("Remove reminder: %o",e),this.reminders.remove(e);let t=this.fileToReminders.get(e.file);t&&(t.remove(e),t.length===0&&this.fileToReminders.delete(e.file)),this.onChange()}clear(){this.fileToReminders.clear(),this.reminders=[],this.onChange()}removeByFile(e){return this.fileToReminders.delete(e)?(this.sortReminders(),!0):!1}replaceFile(e,t){let n=this.fileToReminders.get(e);if(n){if(this.equals(n,t))return!1;let o=new Map;for(let a of n)o.set(a.key(),a.muteNotification);for(let a of t){let u=o.get(a.key());o.set(a.key(),a.muteNotification),u!==void 0&&(a.muteNotification=u)}}return this.fileToReminders.set(e,t),this.sortReminders(),!0}equals(e,t){if(e.length!==t.length)return!1;let n=[...e],o=[...t];return this.sort(n),this.sort(o),n.every((a,u)=>a.equals(o[u]))}sortReminders(){let e=[];for(let t of this.fileToReminders.values())e.push(...t);this.sort(e),this.reminders=e,this.onChange()}sort(e){e.sort((t,n)=>{var a,u;let o=t.time.getTimeInMillis((a=this.reminderTime)==null?void 0:a.value)-n.time.getTimeInMillis((u=this.reminderTime)==null?void 0:u.value);return o>0?1:o<0?-1:0})}},Cm=[{name:"US Style (12h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M/DD (ddd)",timeFormat:"h:mm A"}},{name:"US Style (24h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M/DD (ddd)",timeFormat:"HH:mm"}},{name:"EU Style (24h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"DD/MM",shortDateWithWeekdayFormat:"D/MM (ddd)",timeFormat:"HH:mm"}},{name:"EU Style (12h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"DD/MM",shortDateWithWeekdayFormat:"D/MM (ddd)",timeFormat:"h:mm A"}},{name:"JP Style (24h)",format:{yearMonthFormat:"YYYY\u5E74MM\u6708",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M\u6708D\u65E5 (ddd)",timeFormat:"HH:mm"}},{name:"JP Style (12h)",format:{yearMonthFormat:"YYYY\u5E74MM\u6708",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M\u6708D\u65E5 (ddd)",timeFormat:"h:mm A"}}];function wm(r,e,t,n){let o=$.duration(e,r,"days",t);if(o>30)return new ai(r.format(n.yearMonthFormat,t),a=>a.format(n.monthDayFormat,t));if(o>=7)return new ai("Over 1 week",a=>a.format(n.monthDayFormat,t));if(r.toYYYYMMDD(t)===e.toYYYYMMDD(t)){let a=new ai("Today",u=>u.format(n.timeFormat,t));return a.isToday=!0,a}return r.toYYYYMMDD(t)===e.add(1,"days",t).toYYYYMMDD()?new ai("Tomorrow",a=>a.format(n.timeFormat,t)):new ai(r.format(n.shortDateWithWeekdayFormat,t),a=>a.format(n.timeFormat,t))}var ai=class{constructor(e,t){m(this,"name",e);m(this,"timeToStringFunc",t);m(this,"isToday",!1);m(this,"isOverdue",!1)}timeToString(e){return this.timeToStringFunc(e)}};function xm(r,e,t){let n=$.now(),o=n.getTimeInMillis(),a=[],u=[],c=[],f=wm(n,n,e,t);for(let h=0;h0||f.isToday)&&a.push(new Cs(f,u)),u=[]),u.push(b),f=I}if(u.length>0&&a.push(new Cs(f,u)),c.length>0){let h=new ai("Overdue",b=>b.toYYYYMMDD(e)===n.toYYYYMMDD(e)?b.format(t.timeFormat,e):b.format(t.monthDayFormat,e));h.isOverdue=!0,a.splice(0,0,new Cs(h,c))}return a}var Cs=class{constructor(e,t){m(this,"group",e);m(this,"reminders",t)}get name(){return this.group.name}get isOverdue(){return this.group.isOverdue}timeToString(e){return this.group.timeToString(e)}};var Nt=class Nt{constructor(e,t){m(this,"key",e);m(this,"defaultValue",t)}};m(Nt,"now",new Nt("now",$.now())),m(Nt,"useCustomEmojiForTasksPlugin",new Nt("useCustomEmojiForTasksPlugin",!1)),m(Nt,"removeTagsForTasksPlugin",new Nt("removeTagsForTasksPlugin",!1)),m(Nt,"useReminderTimeFallbackForTasksPlugin",new Nt("useReminderTimeFallbackForTasksPlugin",!1)),m(Nt,"dataviewReminderFieldName",new Nt("dataviewReminderFieldName","reminder")),m(Nt,"linkDatesToDailyNotes",new Nt("linkDatesToDailyNotes",!1)),m(Nt,"strictDateFormat",new Nt("strictDateFormat",!1));var Qe=Nt,xs=class{constructor(){m(this,"parameters",new Map)}setParameter(e,t){this.parameters.set(e.key,()=>t.value)}setParameterFunc(e,t){this.parameters.set(e.key,t)}setParameterValue(e,t){this.parameters.set(e.key,()=>t)}getParameter(e){let t=this.parameters.get(e.key);return t==null?e.defaultValue:t()}},li=class{constructor(){m(this,"config",new xs)}setConfig(e){this.config=e}parse(e){return e.getTodos().map(t=>{let n=this.parseValidReminder(t);if(n==null)return null;let o=n.getTitle();if(o==null)return null;let a=n.getTime();if(a==null)return null;let u=new ao(e.file,o,a,t.lineIndex,t.isChecked()),c=n.computeSpan(),f=t.getHeaderLength();return{reminder:u,columnStart:c.start+f,columnEnd:c.end+f}}).filter(t=>t!=null)}async modify(e,t,n){let o=e.getTodo(t.rowNumber);if(o===null)return console.warn("Not a todo: reminder=%o",t),!1;let a=this.parseValidReminder(o);return a===null||!this.modifyReminder(e,o,a,n)?!1:(o.body=a.toMarkdown(),!0)}parseValidReminder(e){let t=this.parseReminder(e);return t===null||!this.isValidReminder(t)?null:t}isValidReminder(e){return e.getTime()!==null}modifyReminder(e,t,n,o){if(o.rawTime!==void 0){if(!n.setRawTime(o.rawTime))return console.warn("The reminder doesn't support raw time: parsed=%o",n),!1}else o.time!==void 0&&n.setTime(o.time);return o.checked!==void 0&&t.setChecked(o.checked),!0}appendReminder(e,t,n){let o=so.parse(0,e);if(o==null)return null;let a=this.parseReminder(o),u=o.getHeaderLength();return n!=null&&(n-=u),a!=null?a.setTime(t,n):(a=this.newReminder(o.body,t,n),a.setTime(t)),o.body=a.toMarkdown(),{insertedLine:o.toMarkdown(),caretPosition:u+a.getEndOfTimeTextIndex()}}isStrictDateFormat(){return this.config.getParameter(Qe.strictDateFormat)}},La=class{constructor(){m(this,"config");m(this,"formats",[])}setConfig(e){this.config=e,this.syncConfig()}parse(e){let t=[];for(let n of this.formats){let o=n.parse(e);o!=null&&t.push(...o)}return t}async modify(e,t,n){for(let o of this.formats)if(await o.modify(e,t,n))return!0;return!1}resetFormat(e){this.formats=e,this.syncConfig()}syncConfig(){this.config!=null&&this.formats.forEach(e=>e.setConfig(this.config))}appendReminder(e,t){return this.formats[0]==null?null:this.formats[0].appendReminder(e,t)}};var Ac=Wr(wr(),1);var Am="(?[[(])(?
\\s*)(?[\\p{L}\\p{N}_-]+)::(?\\s*)(?[^[\\]()]*?)(?\\s*)(?[)\\]])";function iI(r,e){return r==="["&&e==="]"?"bracket":r==="("&&e===")"?"paren":null}function km(r){let e=new RegExp(Am,"gu"),t=[],n;for(;(n=e.exec(r))!==null;){let o=n.groups,a=iI(o.open,o.close);a!=null&&t.push({key:o.key,value:o.value,style:a,start:n.index,end:n.index+n[0].length})}return t}function Sm(r,e,t){let n=r.slice(e.start,e.end),a=new RegExp(`^${Am}$`,"u").exec(n);if(a==null)return r;let u=a.groups,c=u.open.length+u.pre.length+u.key.length+2+u.mid.length,f=u.value.length,h=n.slice(0,c)+t+n.slice(c+f);return r.slice(0,e.start)+h+r.slice(e.end)}function Rm(r,e,t,n="bracket"){let[o,a]=n==="bracket"?["[","]"]:["(",")"],u=`${o}${e}:: ${t}${a}`;if(r.length===0)return u;let c=/\s$/.test(r)?"":" ";return`${r}${c}${u}`}function mc(r,e){let t=e.start,n=e.end;return t>0&&r[t-1]===" "?t-=1:n0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r})();var Ne=function(r){return r!=null},ar=function(r){return typeof r=="number"},pc=function(r){return typeof r=="string"&&As.includes(r)},kt=Array.isArray,Cr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=me(t,e/t.length)),t.slice(0,e)+String(n))}var Tm=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Wt=function(r,e){var t=r%e;return t*e<0?t+e:t},Oa=function(r,e){return{div:Math.floor(r/e),mod:Wt(r,e)}},lr=function(r){return!Ne(r)||r.length===0},ze=function(r){return!lr(r)},be=function(r,e){return ze(r)&&r.indexOf(e)!==-1};var zr=function(r,e,t,n,o,a){return n===void 0&&(n=0),o===void 0&&(o=0),a===void 0&&(a=0),new Date(Date.UTC(r,e-1,t,n,o,a))},oI=[31,28,31,30,31,30,31,31,30,31,30,31],Gm=1e3*60*60*24,$a=9999,Bm=zr(1970,1,1),sI=[6,0,1,2,3,4,5];var lo=function(r){return r%4===0&&r%100!==0||r%400===0},hc=function(r){return r instanceof Date},Ri=function(r){return hc(r)&&!isNaN(r.getTime())};var aI=function(r,e){var t=r.getTime(),n=e.getTime(),o=t-n;return Math.round(o/Gm)},ks=function(r){return aI(r,Bm)},Pa=function(r){return new Date(Bm.getTime()+r*Gm)},lI=function(r){var e=r.getUTCMonth();return e===1&&lo(r.getUTCFullYear())?29:oI[e]},Tn=function(r){return sI[r.getUTCDay()]},gc=function(r,e){var t=zr(r,e+1,1);return[Tn(t),lI(t)]},Ha=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Ja=function(r){var e=new Date(r.getTime());return e},bc=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r})(),Gn=uI;var vc=function(r,e){return vc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])},vc(r,e)};function co(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");vc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var St=function(){return St=Object.assign||function(e){for(var t,n=1,o=arguments.length;ne[0].length)&&(e=a,t=o)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r})();function Rs(r,e){e===void 0&&(e=Fi);var t={},n=new hI(e.tokens);if(!n.start(r))return null;return o(),t;function o(){n.expect("every");var g=n.acceptNumber();if(g&&(t.interval=parseInt(g[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=U.DAILY,n.nextSymbol()&&(u(),I());break;case"weekday(s)":t.freq=U.WEEKLY,t.byweekday=[U.MO,U.TU,U.WE,U.TH,U.FR],n.nextSymbol(),u(),I();break;case"week(s)":t.freq=U.WEEKLY,n.nextSymbol()&&(a(),u(),I());break;case"hour(s)":t.freq=U.HOURLY,n.nextSymbol()&&(a(),I());break;case"minute(s)":t.freq=U.MINUTELY,n.nextSymbol()&&(a(),I());break;case"month(s)":t.freq=U.MONTHLY,n.nextSymbol()&&(a(),I());break;case"year(s)":t.freq=U.YEARLY,n.nextSymbol()&&(a(),I());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=U.WEEKLY;var v=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[U[v]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=f();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(U[y]),n.nextSymbol()}u(),b(),I();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(t.freq=U.YEARLY,t.bymonth=[c()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=c();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}a(),I();break;default:throw new Error("Unknown symbol")}}function a(){var g=n.accept("on"),v=n.accept("the");if(g||v)do{var y=h(),w=f(),x=c();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(U[w].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(w)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(U[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[U.MO,U.TU,U.WE,U.TH,U.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var k=n.acceptNumber();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(k[0],10)];n.accept("comma");){if(k=n.acceptNumber(),!k)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(k[0],10))}}else if(x)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(x);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function u(){var g=n.accept("at");if(g)do{var v=n.acceptNumber();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(v[0],10)];n.accept("comma");){if(v=n.acceptNumber(),!v)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(v[0],10))}}while(n.accept("comma")||n.accept("at"))}function c(){switch(n.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 f(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function h(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var g=parseInt(n.value[1],10);if(g<-366||g>366)throw new Error("Nth out of range: "+g);return n.nextSymbol(),n.accept("last")?-g:g;default:return!1}}function b(){n.accept("on"),n.accept("the");var g=h();if(g)for(t.bymonthday=[g],n.nextSymbol();n.accept("comma");){if(g=h(),!g)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(g),n.nextSymbol()}}function I(){if(n.symbol==="until"){var g=Date.parse(n.text);if(!g)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(g)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ue;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ue||(ue={}));function Fs(r){return r12){var n=Math.floor(this.month/12),o=Wt(this.month,12);this.month=o,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,o){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Oa(this.hour,24),u=a.div,c=a.mod;if(u&&(this.hour=c,this.addDaily(u)),lr(o)||be(o,this.hour))break}},e.prototype.addMinutes=function(t,n,o,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var u=Oa(this.minute,60),c=u.div,f=u.mod;if(c&&(this.minute=f,this.addHours(c,!1,o)),(lr(o)||be(o,this.hour))&&(lr(a)||be(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,o,a,u){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var c=Oa(this.second,60),f=c.div,h=c.mod;if(f&&(this.second=h,this.addMinutes(f,!1,o,a)),(lr(o)||be(o,this.hour))&&(lr(a)||be(a,this.minute))&&(lr(u)||be(u,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=gc(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>$a))return;t=gc(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var o=t.freq,a=t.interval,u=t.wkst,c=t.byhour,f=t.byminute,h=t.bysecond;switch(o){case ue.YEARLY:return this.addYears(a);case ue.MONTHLY:return this.addMonths(a);case ue.WEEKLY:return this.addWeekly(a,u);case ue.DAILY:return this.addDaily(a);case ue.HOURLY:return this.addHours(a,n,c);case ue.MINUTELY:return this.addMinutes(a,n,c,f);case ue.SECONDLY:return this.addSeconds(a,n,c,f,h)}},e})(mo);function _c(r){for(var e=[],t=Object.keys(r),n=0,o=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||ze(e.byweekno)||ze(e.byyearday)||e.bymonthday||ze(e.bymonthday)||Ne(e.byweekday)||Ne(e.byeaster)))switch(e.freq){case U.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case U.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case U.WEEKLY:e.byweekday=[Tn(e.dtstart)];break}if(Ne(e.bymonth)&&!kt(e.bymonth)&&(e.bymonth=[e.bymonth]),Ne(e.byyearday)&&!kt(e.byyearday)&&ar(e.byyearday)&&(e.byyearday=[e.byyearday]),!Ne(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(kt(e.bymonthday)){for(var o=[],a=[],t=0;t0?o.push(n):n<0&&a.push(n)}e.bymonthday=o,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Ne(e.byweekno)&&!kt(e.byweekno)&&(e.byweekno=[e.byweekno]),!Ne(e.byweekday))e.bynweekday=null;else if(ar(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(pc(e.byweekday))e.byweekday=[nt.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof nt)!e.byweekday.n||e.freq>U.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var u=[],c=[],t=0;tU.MONTHLY?u.push(f.weekday):c.push([f.weekday,f.n])}e.byweekday=ze(u)?u:null,e.bynweekday=ze(c)?c:null}return Ne(e.byhour)?ar(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(b=0,h=c.yearlen+Wt(u-e.wkst,7)):h=n-b;for(var I=Math.floor(h/7),g=Wt(h,7),v=Math.floor(I+g/4),y=0;y0&&w<=v){var x=void 0;w>1?(x=b+(w-1)*7,b!==f&&(x-=7-f)):x=b;for(var k=0;k<7&&(c.wnomask[x]=1,x++,c.wdaymask[x]!==e.wkst);k++);}}if(be(e.byweekno,1)){var x=b+v*7;if(b!==f&&(x-=7-f),x=4?(P=0,Y=ie+Wt(F-e.wkst,7)):Y=n-b,B=Math.floor(52+Wt(Y,7)/4)}if(be(e.byweekno,B))for(var x=0;xa)return Bn(r);if(B>=t){var F=op(B,e);if(!r.accept(F)||c&&(--c,!c))return Bn(r)}}else for(var k=v;ka)return Bn(r);if(B>=t){var F=op(B,e);if(!r.accept(F)||c&&(--c,!c))return Bn(r)}}}if(e.interval===0||(f.add(e,w),f.year>$a))return Bn(r);Fs(n)||(b=h.gettimeset(n)(f.hour,f.minute,f.second,0)),h.rebuild(f.year,f.month)}}function SI(r,e,t){var n=t.bymonth,o=t.byweekno,a=t.byweekday,u=t.byeaster,c=t.bymonthday,f=t.bynmonthday,h=t.byyearday;return ze(n)&&!be(n,r.mmask[e])||ze(o)&&!r.wnomask[e]||ze(a)&&!be(a,r.wdaymask[e])||ze(r.nwdaymask)&&!r.nwdaymask[e]||u!==null&&!be(r.eastermask,e)||(ze(c)||ze(f))&&!be(c,r.mdaymask[e])&&!be(f,r.nmdaymask[e])||ze(h)&&(e=r.yearlen&&!be(h,e+1-r.yearlen)&&!be(h,-r.nextyearlen+e-r.yearlen))}function op(r,e){return new Ti(r,e.tzid).rezonedDate()}function Bn(r){return r.getValue()}function RI(r,e,t,n,o){for(var a=!1,u=e;u=U.HOURLY&&ze(o)&&!be(o,e.hour)||n>=U.MINUTELY&&ze(a)&&!be(a,e.minute)||n>=U.SECONDLY&&ze(u)&&!be(u,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var xr={MO:new nt(0),TU:new nt(1),WE:new nt(2),TH:new nt(3),FR:new nt(4),SA:new nt(5),SU:new nt(6)},Ts={freq:ue.YEARLY,dtstart:null,interval:1,wkst:xr.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},Qm=Object.keys(Ts),U=(function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Om,this.origOptions=_c(e);var n=Xm(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Rs(e,t)},r.fromText=function(e,t){return Wm(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return ja(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new yc("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Gn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,o){if(n===void 0&&(n=!1),!Ri(e)||!Ri(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(o)return this._iter(new yc("between",a,o));var u=this._cacheGet("between",a);return u===!1&&(u=this._iter(new Gn("between",a)),this._cacheAdd("between",u,a)),u},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Ri(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},o=this._cacheGet("before",n);return o===!1&&(o=this._iter(new Gn("before",n)),this._cacheAdd("before",o,n)),o},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Ri(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},o=this._cacheGet("after",n);return o===!1&&(o=this._iter(new Gn("after",n)),this._cacheAdd("after",o,n)),o},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Bs(this.origOptions)},r.prototype.toText=function(e,t,n){return Zm(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Mm(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ue.YEARLY,r.MONTHLY=ue.MONTHLY,r.WEEKLY=ue.WEEKLY,r.DAILY=ue.DAILY,r.HOURLY=ue.HOURLY,r.MINUTELY=ue.MINUTELY,r.SECONDLY=ue.SECONDLY,r.MO=xr.MO,r.TU=xr.TU,r.WE=xr.WE,r.TH=xr.TH,r.FR=xr.FR,r.SA=xr.SA,r.SU=xr.SU,r.parseString=Gs,r.optionsToString=Bs,r})();function sp(r,e,t,n,o,a){var u={},c=r.accept;function f(g,v){t.forEach(function(y){y.between(g,v,!0).forEach(function(w){u[Number(w)]=!0})})}o.forEach(function(g){var v=new Ti(g,a).rezonedDate();u[Number(v)]=!0}),r.accept=function(g){var v=Number(g);return isNaN(v)?c.call(this,g):!u[v]&&(f(new Date(v-1),new Date(v+1)),!u[v])?(u[v]=!0,c.call(this,g)):!0},r.method==="between"&&(f(r.args.after,r.args.before),r.accept=function(g){var v=Number(g);return u[v]?!0:(u[v]=!0,c.call(this,g))});for(var h=0;h1||o.length||a.length||u.length){var b=new Cc(h);return b.dtstart(c),b.tzid(f||void 0),n.forEach(function(g){b.rrule(new U(wc(g,c,f),h))}),o.forEach(function(g){b.rdate(g)}),a.forEach(function(g){b.exrule(new U(wc(g,c,f),h))}),u.forEach(function(g){b.exdate(g)}),e.compatible&&e.dtstart&&b.rdate(c),b}var I=n[0]||{};return new U(wc(I,I.dtstart||e.dtstart||c,I.tzid||e.tzid||f),h)}function za(r,e){return e===void 0&&(e={}),EI(r,GI(e))}function wc(r,e,t){return St(St({},r),{dtstart:e,tzid:t})}function GI(r){var e=[],t=Object.keys(r),n=Object.keys(ap);if(t.forEach(function(o){be(n,o)||e.push(o)}),e.length)throw new Error("Invalid options: "+e.join(", "));return St(St({},ap),r)}function BI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=Tm(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function DI(r){var e=BI(r),t=e.name,n=e.value,o=t.split(";");if(!o)throw new Error("empty property name");return{name:o[0].toUpperCase(),parms:o.slice(1),value:n}}function NI(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(`
`),n=0;n0&&o[0]===" "?(t[n-1]+=o.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function WI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function lp(r,e){return WI(e),r.split(",").map(function(t){return Ss(t)})}function up(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nt.key.toLowerCase()===e)}firstField(e){var t;return(t=this.fieldsByKey(e)[0])!=null?t:null}hasReminderField(){return this.firstField(this.reminderFieldName)!=null}hasAnySourceField(){return this.hasReminderField()||this.firstField(Ei)!=null}reminderSourceField(){var e;return(e=this.firstField(this.reminderFieldName))!=null?e:this.firstField(Ei)}getTitle(){let e=new Set([...XI,this.reminderFieldName]),t=this.fields().filter(o=>e.has(o.key.toLowerCase())).sort((o,a)=>a.start-o.start),n=this.text;for(let o of t)n=mc(n,o);return n=n.trim(),this.removeTags&&(n=qa(n)),n}getTime(){let e=this.reminderSourceField();return e==null?null:xc(e.value)}setTime(e){var o;let t=this.reminderSourceField(),n=(o=t==null?void 0:t.key)!=null?o:Ei;this.setFieldValue(n,mp(e))}setRawTime(e){var o;let t=this.reminderSourceField(),n=(o=t==null?void 0:t.key)!=null?o:Ei;return this.setFieldValue(n,e),!0}getDueDate(){let e=this.firstField(Ei);return e==null?null:xc(e.value)}setDueDate(e){this.setFieldValue(Ei,mp(e))}getRecurrence(){var t;let e=this.firstField(pp);return(t=e==null?void 0:e.value)!=null?t:null}getDoneDate(){let e=this.firstField(el);return e==null?null:xc(e.value)}setDoneDate(e){if(e==null){this.removeFieldByKey(el);return}let t=e instanceof $?e.format(kc):e;this.setFieldValue(el,t)}getEndOfTimeTextIndex(){let e=this.reminderSourceField();return e!=null?e.end:this.toMarkdown().length}computeSpan(){let e=this.reminderSourceField();return e==null?{start:0,end:0}:{start:e.start,end:e.end}}toMarkdown(){return this.text}clone(){return r.parse(this.toMarkdown(),this.reminderFieldName,this.removeTags)}setFieldValue(e,t){let n=this.firstField(e);n!=null?this.text=Sm(this.text,n,t):this.text=Rm(this.text,e,t,"bracket")}removeFieldByKey(e){let t=this.firstField(e);t!=null&&(this.text=mc(this.text,t))}},nl=class nl extends ho{parseReminder(e){let t=tl.parse(e.body,this.reminderFieldName(),this.removeTagsEnabled());return t.hasAnySourceField()?t:null}reminderFieldName(){return this.config.getParameter(Qe.dataviewReminderFieldName)}removeTagsEnabled(){return this.config.getParameter(Qe.removeTagsForTasksPlugin)}usesSeparateReminderDate(e){return e.hasReminderField()}newReminder(e,t){let n=tl.parse(e,this.reminderFieldName(),this.removeTagsEnabled());return n.setTime(t),n}};m(nl,"instance",new nl);var rl=nl;var hp=Wr(wr(),1);var qr=class qr{constructor(e,t,n,o,a=null){m(this,"linkDatesToDailyNotes",e);m(this,"title1",t);m(this,"time",n);m(this,"title2",o);m(this,"recurrence",a)}static parse(e,t){t==null&&(t=!1);let n=qr.regexp.exec(e);if(n==null)return null;let o=n.groups.title1,a=n.groups.time;if(a==null)return null;let u=n.groups.title2;t&&(a=a.replace("[[",""),a=a.replace("]]",""));let c=null,f=a.indexOf(qr.recurrenceSymbol);if(f>=0){let h=a.substring(0,f).trim(),b=a.substring(f+qr.recurrenceSymbol.length).trim();b!==""&&(a=h,c=b)}return new qr(t,o,a,u,c)}getTitle(){return`${this.title1.trim()} ${this.title2.trim()}`.trim()}getTime(){return jr.parse(this.time)}setTime(e){this.time=jr.toString(e)}setRawTime(e){return this.time=e,!0}getEndOfTimeTextIndex(){return this.toMarkdown().length-this.title2.length}computeSpan(){let e=this.title1.length,t=this.computeGroupText();return{start:e,end:e+t.length}}toMarkdown(){return`${this.title1}${this.computeGroupText()}${this.title2}`}computeGroupText(){let e=this.recurrence!==null?`${this.time} ${qr.recurrenceSymbol}${this.recurrence}`:this.time;return`(@${this.renderTimeText(e)})`}renderTimeText(e){if(!this.linkDatesToDailyNotes)return e;let t=jr.parse(this.time);if(!t)return e;let n=jr.toString(t.clone(!1));return e.replace(n,`[[${n}]]`)}clone(){return qr.parse(this.toMarkdown(),this.linkDatesToDailyNotes)}};m(qr,"regexp",/^(?.*?)\(@(?