Files

46 lines
191 KiB
JavaScript
Raw Permalink Normal View History

2025-10-25 20:35:10 +08:00
/*
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 Af=Object.create;var Nr=Object.defineProperty;var Wf=Object.getOwnPropertyDescriptor;var $f=Object.getOwnPropertyNames;var Vf=Object.getPrototypeOf,jf=Object.prototype.hasOwnProperty;var Hf=(n,e,r)=>e in n?Nr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;var Gf=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),zf=(n,e)=>{for(var r in e)Nr(n,r,{get:e[r],enumerable:!0})},$o=(n,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $f(e))!jf.call(n,o)&&o!==r&&Nr(n,o,{get:()=>e[o],enumerable:!(i=Wf(e,o))||i.enumerable});return n};var Ot=(n,e,r)=>(r=n!=null?Af(Vf(n)):{},$o(e||!n||!n.__esModule?Nr(r,"default",{value:n,enumerable:!0}):r,n)),Zf=n=>$o(Nr({},"__esModule",{value:!0}),n);var g=(n,e,r)=>Hf(n,typeof e!="symbol"?e+"":e,r);var xt=Gf((Ki,ur)=>{(function(n,e){typeof Ki=="object"&&typeof ur!="undefined"?ur.exports=e():typeof define=="function"&&define.amd?define(e):n.moment=e()})(Ki,function(){"use strict";var n;function e(){return n.apply(null,arguments)}function r(t){n=t}function i(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function o(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function l(t,s){return Object.prototype.hasOwnProperty.call(t,s)}function c(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var s;for(s in t)if(l(t,s))return!1;return!0}function d(t){return t===void 0}function m(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function h(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function y(t,s){var a=[],u,f=t.length;for(u=0;u<f;++u)a.push(s(t[u],u));return a}function w(t,s){for(var a in s)l(s,a)&&(t[a]=s[a]);return l(s,"toString")&&(t.toString=s.toString),l(s,"valueOf")&&(t.valueOf=s.valueOf),t}function _(t,s,a,u){return wo(t,s,a,u,!0).utc()}function x(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function b(t){return t._pf==null&&(t._pf=x()),t._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(t){var s=Object(this),a=s.length>>>0,u;for(u=0;u<a;u++)if(u in s&&t.call(this,s[u],u,s))return!0;return!1};function F(t){if(t._isValid==null){var s=b(t),a=D.call(s.parsedDateParts,function(f){return f!=null}),u=!isNaN(t._d.getTime())&&s.overflow<0&&!s.empty&&!s.invalidEra&&!s.invalidMonth&&!s.invalidWeekday&&!s.weekdayMismatch&&!s.nullInput&&!s.invalidFormat&&!s.userInvalidated&&(!s.meridiem||s.meridiem&&a);if(t._strict&&(u=u&&s.charsLeftOver===0&&s.unusedTokens.length===0&&s.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=u;else return u}return t._isValid}function T(t){var s=_(NaN);return t!=null?w(b(s),t):b(s).userInvalidated=!0,s}var B=e.momentProperties=[],P=!1;function N(t,s){var a,u,f,p=B.length;if(d(s._isAMomentObject)||(t._isAMomentObject=s._isAMomentObject),d(s._i)||(t._i=s._i),d(s._f)||(t._f=s._f),d(s._l)||(t._l=s._l),d(s._strict)||(t._strict=s._strict),d(s._tzm)||(t._tzm=s._tzm),d(s._isUTC)||(t._isUTC=s._isUTC),d(s._offset)||(t._offset=s._offset),d(s._pf)||(t._pf=b(s)),d(s._locale)||(t._locale=s._locale),p>0)for(a=0;a<p;a++)u=B[a],f=s[u],d(f)||(t[u]=f);return t}function V(t){N(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),P===!1&&(P=!0,e.updateOffset(this),P=!1)}function I(t){return t instanceof V||t!=null&&t._isAMomentObject!=null}function be(t){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+t)}function q(t,s){var a=!0;return w(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,t),a){var u=[],f,p,v,L=arguments.length;for(p=0;p<L;p++){if(f="",typeof arguments[p]=="object"){f+=`
[`+p+"] ";for(v in arguments[0])l(arguments[0],v)&&(f+=v+": "+arguments[0][v]+", ");f=f.slice(0,-2)}else f=arguments[p];u.push(f)}be(t+`
Arguments: `+Array.prototype.slice.call(u).join("")+`
`+new Error().stack),a=!1}return s.apply(this,arguments)},s)}var j={};function ee(t,s){e.deprecationHandler!=null&&e.deprecationHandler(t,s),j[t]||(be(s),j[t]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function ie(t){return typeof Function!="undefined"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function E(t){var s,a;for(a in t)l(t,a)&&(s=t[a],ie(s)?this[a]=s:this["_"+a]=s);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function te(t,s){var a=w({},t),u;for(u in s)l(s,u)&&(o(t[u])&&o(s[u])?(a[u]={},w(a[u],t[u]),w(a[u],s[u])):s[u]!=null?a[u]=s[u]:delete a[u]);for(u in t)l(t,u)&&!l(s,u)&&o(t[u])&&(a[u]=w({},a[u]));return a}function le(t){t!=null&&this.set(t)}var C;Object.keys?C=Object.keys:C=function(t){var s,a=[];for(s in t)l(t,s)&&a.push(s);return a};var Je={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function H(t,s,a){var u=this._calendar[t]||this._calendar.sameElse;return ie(u)?u.call(s,a):u}function Ee(t,s,a){var u=""+Math.abs(t),f=s-u.length,p=t>=0;return(p?a?"+":"":"-")+Math.pow(10,Math.max(0,f)).toString().substr(1)+u}var Ri=/(\[[^\[]*\])|(\\)?([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,un=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ei={},er={};function Q(t,s,a,u){var f=u;typeof u=="string"&&(f=function(){return this[u]()}),t&&(er[t]=f),s&&(er[s[0]]=function(){return Ee(f.apply(this,arguments),s[1],s[2])}),a&&(er[a]=function(){return this.localeData().ordinal(f.apply(this,arguments),t)})}function jl(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Hl(t){var s=t.match(Ri),a,u;for(a=0,u=s.length;a<u;a++)er[s[a]]?s[a]=er[s[a]]:s[a]=jl(s[a]);return function(f){var p="",v;for(v=0;v<u;v++)p+=ie(s[v])?s[v].call(f,t):s[v];return p}}function dn(t,s){return t.isValid()?(s=Ks(s,t.localeData()),Ei[s]=Ei[s]||Hl(s),Ei[s](t)):t.localeData().invalidDate()}function Ks(t,s){var a=5;function u(f){return s.longDateFormat(f)||f}for(un.lastIndex=0;a>=0&&un.test(t);)t=t.replace(un,u),un.lastIndex=0,a-=1;return t}var Gl={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 zl(t){var s=this._longDateFormat[t],a=this._longDateFormat[t.toUpperCase()];return s||!a?s:(this._longDateFormat[t]=a.match(Ri).map(function(u){return u==="MMMM"||u==="MM"||u==="DD"||u==="dddd"?u.slice(1):u}).join(""),this._longDateFormat[t])}var Zl="Invalid date";function Jl(){return this._invalidDate}var ql="%d",Kl=/\d{1,2}/;function Xl(t){return this._ordinal.replace("%d",t)}var eu={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 tu(t,s,a,u){var f=this._relativeTime[a];return ie(f)?f(t,s,a,u):f.replace(/%d/i,t)}function ru(t,s){var a=this._relativeTime[t>0?"future":"past"];return ie(a)?a(s):a.replace(/%s/i,s)}var Fr={};function Ue(t,s){var a=t.toLowerCase();Fr[a]=Fr[a+"s"]=Fr[s]=t}function qe(t){return typeof t=="string"?Fr[t]||Fr[t.toLowerCase()]:void 0}function Ui(t){var s={},a,u;for(u in t)l(t,u)&&(a=qe(u),a&&(s[a]=t[u]));return s}var Xs={};function Ye(t,s){Xs[t]=s}function nu(t){var s=[],a;for(a in t)l(t,a)&&s.push({unit:a,priority:Xs[a]});return s.sort(function(u,f){return u.priority-f.priority}),s}function cn(t){return t%4===0&&t%100!==0||t%400===0}function Ke(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function W(t){var s=+t,a=0;return s!==0&&isFinite(s)&&(a=Ke(s)),a}function tr(t,s){return function(a){return a!=null?(eo(this,t,a),e.updateOffset(this,s),this):fn(this,t)}}function fn(t,s){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+s]():NaN}function eo(t,s,a){t.isValid()&&!is
`),this.todos=[],this.lines.forEach((r,i)=>{let o=Br.parse(i,r);o&&this.todos.push(o)})}getTodos(){return this.todos}insertTodo(e,r){r.lineIndex=e,this.lines.splice(e,0,r.toMarkdown());let i=-1;for(let o in this.todos){let l=this.todos[o];l.lineIndex>=e&&(i<0&&(i=parseInt(o)),l.lineIndex++)}i<=0?this.todos.splice(0,0,r):this.todos.splice(i,0,r)}getTodo(e){let r=this.todos.find(i=>i.lineIndex===e);return r==null?null:r}applyChanges(){this.todos.forEach(e=>{this.lines[e.lineIndex]=e.toMarkdown()})}toMarkdown(){return this.applyChanges(),this.lines.join(`
`)}};var lr=class{constructor(e){this._value=e}get value(){return this._value}},jt=class{constructor(e){this._value=e;g(this,"onChangeFunctions",[])}onChanged(e){this.onChangeFunctions.push(e)}get value(){return this._value}set value(e){let r=this._value;this._value=e,this.onChangeFunctions.forEach(i=>{i(r,e)})}};var Xe=Ot(xt(),1);var G=class n{constructor(e,r){this.time=e;this._hasTimePart=r}static now(){return new n((0,Xe.default)(),!0)}static parse(e){return e.length>10?new n((0,Xe.default)(e,"YYYY-MM-DD HH:mm"),!0):new n((0,Xe.default)(e,"YYYY-MM-DD"),!1)}static duration(e,r,i,o){return r.fixedTime(o).diff(e.fixedTime(o),i)}getTimeInMillis(e){return this.fixedTime(e).valueOf()}format(e,r){return this.fixedTime(r).format(e)}toYYYYMMMM(e){return this.fixedTime(e).format("YYYY, MMMM")}toYYYYMMDD(e){return this.fixedTime(e).format("YYYY-MM-DD")}add(e,r,i){return new n(this.fixedTime(i).clone().add(e,r),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 r=e==null?this._hasTimePart:e,i=this.time.clone();return new n(i,r)}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)}},Un=class n{constructor(e,r){this.hour=e;this.minute=r}static parse(e){if(!e.match(/^\d{1,2}:\d{1,2}$/))throw`Unexpected format time(${e}). Time must be HH:mm.`;let r=e.split(":");if(r.length!==2)throw`Unexpected format time(${e}). time must be HH:mm.`;let i=parseInt(r[0]),o=parseInt(r[1]);if(i>23||i<0)throw"hour must be 0~23";if(o>59||o<0)throw"minute must be 0~59";return new n(i,o)}get minutes(){return this.hour*60+this.minute}toString(){let e=r=>r<10?"0"+r:""+r;return`${e(this.hour)}:${e(this.minute)}`}};function dr(n,e){return()=>new G((0,Xe.default)(),!0).add(n,e)}function zo(n){return dr(n,"minutes")}function Xi(n){return dr(n,"hours")}function Jf(n){return dr(n,"days")}function qf(n){return dr(n,"weeks")}function Kf(n){return dr(n,"months")}function Xf(n){return dr(n,"years")}function Ht(n){return()=>{let e=(0,Xe.default)();return e.isoWeekday()<=n?new G(e.isoWeekday(n),!1):new G(e.add(1,"weeks").isoWeekday(n),!1)}}function es(){return()=>new G((0,Xe.default)().add(1,"days"),!1)}function Zo(){return()=>new G((0,Xe.default)().add(1,"weeks"),!1)}function em(){return()=>new G((0,Xe.default)().add(1,"months"),!1)}function tm(){return()=>new G((0,Xe.default)().add(1,"years"),!1)}var he=class{constructor(e,r){this.label=e;this.later=r}};function Jo(n){return n.split(`
`).map(e=>rm(e.trim()))}function rm(n){if(n=n.toLowerCase(),n.startsWith("in")){let e=n.split(" ");if(e.length!==3)throw"Unsupported format. Should be 'In N (minutes|hours)'";let r=e[1]==="a"||e[1]==="an"?1:parseInt(e[1]);switch(e[2]){case"minute":case"minutes":{let i=r==1?"minute":"minutes";return new he(`In ${r} ${i}`,zo(r))}case"hour":case"hours":{let i=r==1?"hour":"hours";return new he(`In ${r} ${i}`,Xi(r))}case"day":case"days":{let i=r==1?"day":"days";return new he(`In ${r} ${i}`,Jf(r))}case"week":case"weeks":{let i=r==1?"week":"weeks";return new he(`In ${r} ${i}`,qf(r))}case"month":case"months":{let i=r==1?"month":"months";return new he(`In ${r} ${i}`,Kf(r))}case"year":case"years":{let i=r==1?"year":"years";return new he(`In ${r} ${i}`,Xf(r))}}}else if(n.startsWith("next")){let e=n.substring(5);switch(e){case"sunday":return new he("Next Sunday",Ht(0));case"monday":return new he("Next Monday",Ht(1));case"tuesday":return new he("Next Tuesday",Ht(2));case"wednesday":return new he("Next Wednesday",Ht(3));case"thursday":return new he("Next Thursday",Ht(4));case"friday":return new he("Next Friday",Ht(5));case"saturday":return new he("Next Saturday",Ht(6));case"day":return new he("Tomorrow",es());case"week":return new he("Next week",Zo());case"month":return new he("Next month",em());case"year":return new he("Next year",tm());default:throw`Unsupported weekday: ${e}`}}else if(n==="tomorrow")return new he("Tomorrow",es());throw`Unsupported format: ${n}`}var Eh=[new he("In 30 minutes",zo(30)),new he("In 1 hours",Xi(1)),new he("In 3 hours",Xi(3)),new he("Tomorrow",es()),new he("Next week",Zo())],ts=class{constructor(){g(this,"dateFormat",new lr("YYYY-MM-DD"));g(this,"dateTimeFormat",new lr("YYYY-MM-DD HH:mm"));g(this,"strict",new lr(!1))}setTimeFormat(e,r,i){this.dateFormat=e,this.dateTimeFormat=r,this.strict=i}parse(e){let r=this.doParse(e,!0);return r!=null?r:this.strict.value?null:this.doParse(e,!1)}doParse(e,r){let i=(0,Xe.default)(e,this.dateTimeFormat.value,r);if(i.isValid())return new G(i,!0);let o=(0,Xe.default)(e,this.dateFormat.value,r);return o.isValid()?new G(o,!1):null}toString(e){return e.hasTimePart?e.format(this.dateTimeFormat.value):e.format(this.dateFormat.value)}},ut=new ts;var cr=class{constructor(e,r,i,o,l){this.file=e;this.title=r;this.time=i;this.rowNumber=o;this.done=l;g(this,"muteNotification",!1);g(this,"beingDisplayed",!1)}key(){return this.file+this.title+this.time.toString()}equals(e){return this.rowNumber===e.rowNumber&&this.title===e.title&&this.time.equals(e.time)&&this.file===e.file}getFileName(){let e=this.file.split(/[/\\]/);return e[e.length-1].replace(/^(.*?)(\..+)?$/,"$1")}static extractFileName(e){let r=e.split(/[/\\]/);return r[r.length-1].replace(/^(.*?)(\..+)?$/,"$1")}},Yn=class{constructor(e){this.onChange=e;g(this,"fileToReminders",new Map);g(this,"reminders",[]);g(this,"reminderTime")}getExpiredReminders(e){let r=new Date().getTime(),i=[];for(let o=0;o<this.reminders.length;o++){let l=this.reminders[o];if(l.time.getTimeInMillis(e)<=r)i.push(l);else break}return i}byDate(e){return this.reminders.filter(r=>r.time.toYYYYMMDD()===e.toYYYYMMDD())}removeReminder(e){console.debug("Remove reminder: %o",e),this.reminders.remove(e);let r=this.fileToReminders.get(e.file);r&&(r.remove(e),r.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,r){let i=this.fileToReminders.get(e);if(i){if(this.equals(i,r))return!1;let o=new Map;for(let l of i)o.set(l.key(),l.muteNotification);for(let l of r){let c=o.get(l.key());o.set(l.key(),l.muteNotification),c!==void 0&&(l.muteNotification=c)}}return this.fileToReminders.set(e,r),this.sortReminders(),!0}equals(e,r){if(e.length!==r.length)return!1;this.sort(e),this.sort(r);for(let i in e){let o=e[i],l=r[i];if(o==null&&l!=null||l==null&&o!=null)return!1;if(!(o==null&&l==null)&&!o.equals(l))return!1}return!0}sortReminders(){let e=[];for(let r of this.fileToReminders.values())e.push(.
`).map(pm).filter(function(r){return r!==null});return Me(Me({},e[0]),e[1])}function Zr(n){var e={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!r)return e;var i=r[1],o=r[2];return i&&(e.tzid=i),e.dtstart=jr(o),e}function pm(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var e=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!e)return ha(n);var r=e[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return ha(n);case"DTSTART":return Zr(n);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(n))}}function ha(n){var e=n.replace(/^RRULE:/i,""),r=Zr(e),i=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return i.forEach(function(o){var l=o.split("="),c=l[0],d=l[1];switch(c.toUpperCase()){case"FREQ":r.freq=$[d.toUpperCase()];break;case"WKST":r.wkst=rt[d.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var m=ym(d),h=c.toLowerCase();r[h]=m;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=gm(d);break;case"DTSTART":case"TZID":var y=Zr(n);r.tzid=y.tzid,r.dtstart=y.dtstart;break;case"UNTIL":r.until=jr(d);break;case"BYEASTER":r.byeaster=Number(d);break;default:throw new Error("Unknown RRULE property '"+c+"'")}}),r}function ym(n){if(n.indexOf(",")!==-1){var e=n.split(",");return e.map(pa)}return pa(n)}function pa(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function gm(n){var e=n.split(",");return e.map(function(r){if(r.length===2)return rt[r];var i=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!i||i.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var o=Number(i[1]),l=i[2],c=rt[l].weekday;return new xe(c,o)})}var Jt=function(){function n(e,r){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=r}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var e=hr(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:sa(this.date,this.tzid)},n}();function qr(n){for(var e=[],r="",i=Object.keys(n),o=Object.keys(zr),l=0;l<i.length;l++)if(i[l]!=="tzid"&&Z(o,i[l])){var c=i[l].toUpperCase(),d=n[i[l]],m="";if(!(!ue(d)||Fe(d)&&!d.length)){switch(c){case"FREQ":m=U.FREQUENCIES[n.freq];break;case"WKST":Ge(d)?m=new xe(d).toString():m=d.toString();break;case"BYWEEKDAY":c="BYDAY",m=ea(d).map(function(x){return x instanceof xe?x:Fe(x)?new xe(x[0],x[1]):new xe(x)}).toString();break;case"DTSTART":r=bm(d,n.tzid);break;case"UNTIL":m=hr(d,!n.tzid);break;default:if(Fe(d)){for(var h=[],y=0;y<d.length;y++)h[y]=String(d[y]);m=h.toString()}else m=String(d)}m&&e.push([c,m])}}var w=e.map(function(x){var b=x[0],D=x[1];return"".concat(b,"=").concat(D.toString())}).join(";"),_="";return w!==""&&(_="RRULE:".concat(w)),[r,_].filter(function(x){return!!x}).join(`
`)}function bm(n,e){return n?"DTSTART"+new Jt(new Date(n),e).toString():""}function vm(n,e){return Array.isArray(n)?!Array.isArray(e)||n.length!==e.length?!1:n.every(function(r,i){return r.getTime()===e[i].getTime()}):n instanceof Date?e instanceof Date&&n.getTime()===e.getTime():n===e}var ya=function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(e,r,i){r&&(r=r instanceof Date?Hn(r):os(r)),e==="all"?this.all=r:(i._value=r,this[e].push(i))},n.prototype._cacheGet=function(e,r){var i=!1,o=r?Object.keys(r):[],l=function(y){for(var w=0;w<o.length;w++){var _=o[w];if(!vm(r[_],y[_]))return!0}return!1},c=this[e];if(e==="all")i=this.all;else if(Fe(c))for(var d=0;d<c.length;d++){var m=c[d];if(!(o.length&&l(m))){i=m._value;break}}if(!i&&this.all){for(var h=new St(e,r),d=0;d<this.all.length&&h.accept(this.all[d]);d++);i=h.getValue(),this._cacheAdd(e,i,r)}return Fe(i)?os(i):i instanceof Date?Hn(i):i},n}();var ga=S(S(S(S(S(S(S(S(S(S(S(S(S([],z(1,31),!0),z(2,28),!0),z(3,31),!0),z(4,30),!0),z(5,31),!0),z(6,30),!0),z(7,31),!0),z(8,31),!0),z(9,30),!0),z(10,31),!0),z(11,30),!0),z(12,31),!0),z(1,7),!0),ba=S(S(S(S(S(S(S(S(S(S(S(S(S([],z(1,31),!0),z(2,29),!0),z(3,31),!0),z(4,30),!0),z(5,31),!0),z(6,30),!0),z(7,31),!0),z(8,31),!0),z(9,30),!0),z(10,31),!0),z(11,30),!0),z(12,31),!0),z(1,7),!0),_m=tt(1,29),wm=tt(1,30),Ct=tt(1,31),Le=tt(1,32),va=S(S(S(S(S(S(S(S(S(S(S(S(S([],Le,!0),wm,!0),Le,!0),Ct,!0),Le,!0),Ct,!0),Le,!0),Le,!0),Ct,!0),Le,!0),Ct,!0),Le,!0),Le.slice(0,7),!0),_a=S(S(S(S(S(S(S(S(S(S(S(S(S([],Le,!0),_m,!0),Le,!0),Ct,!0),Le,!0),Ct,!0),Le,!0),Le,!0),Ct,!0),Le,!0),Ct,!0),Le,!0),Le.slice(0,7),!0),xm=tt(-28,0),km=tt(-29,0),Bt=tt(-30,0),Ne=tt(-31,0),wa=S(S(S(S(S(S(S(S(S(S(S(S(S([],Ne,!0),km,!0),Ne,!0),Bt,!0),Ne,!0),Bt,!0),Ne,!0),Ne,!0),Bt,!0),Ne,!0),Bt,!0),Ne,!0),Ne.slice(0,7),!0),xa=S(S(S(S(S(S(S(S(S(S(S(S(S([],Ne,!0),xm,!0),Ne,!0),Bt,!0),Ne,!0),Bt,!0),Ne,!0),Ne,!0),Bt,!0),Ne,!0),Bt,!0),Ne,!0),Ne.slice(0,7),!0),ka=[0,31,60,91,121,152,182,213,244,274,305,335,366],Da=[0,31,59,90,120,151,181,212,243,273,304,334,365],ds=function(){for(var n=[],e=0;e<55;e++)n=n.concat(tt(7));return n}();function Sa(n,e){var r=dt(n,1,1),i=mr(n)?366:365,o=mr(n+1)?366:365,l=Vr(r),c=kt(r),d=Me(Me({yearlen:i,nextyearlen:o,yearordinal:l,yearweekday:c},Dm(n)),{wnomask:null});if(ze(e.byweekno))return d;d.wnomask=z(0,i+7);var m,h,y=m=Qe(7-c+e.wkst,7);y>=4?(y=0,h=d.yearlen+Qe(c-e.wkst,7)):h=i-y;for(var w=Math.floor(h/7),_=Qe(h,7),x=Math.floor(w+_/4),b=0;b<e.byweekno.length;b++){var D=e.byweekno[b];if(D<0&&(D+=x+1),D>0&&D<=x){var F=void 0;D>1?(F=y+(D-1)*7,y!==m&&(F-=7-m)):F=y;for(var T=0;T<7&&(d.wnomask[F]=1,F++,d.wdaymask[F]!==e.wkst);T++);}}if(Z(e.byweekno,1)){var F=y+x*7;if(y!==m&&(F-=7-m),F<i)for(var b=0;b<7&&(d.wnomask[F]=1,F+=1,d.wdaymask[F]!==e.wkst);b++);}if(y){var B=void 0;if(Z(e.byweekno,-1))B=-1;else{var P=kt(dt(n-1,1,1)),N=Qe(7-P.valueOf()+e.wkst,7),V=mr(n-1)?366:365,I=void 0;N>=4?(N=0,I=V+Qe(P-e.wkst,7)):I=i-y,B=Math.floor(52+Qe(I,7)/4)}if(Z(e.byweekno,B))for(var F=0;F<y;F++)d.wnomask[F]=1}return d}function Dm(n){var e=mr(n)?366:365,r=dt(n,1,1),i=kt(r);return e===365?{mmask:ga,mdaymask:_a,nmdaymask:xa,wdaymask:ds.slice(i),mrange:Da}:{mmask:ba,mdaymask:va,nmdaymask:wa,wdaymask:ds.slice(i),mrange:ka}}function Ta(n,e,r,i,o,l){var c={lastyear:n,lastmonth:e,nwdaymask:[]},d=[];if(l.freq===U.YEARLY)if(ze(l.bymonth))d=[[0,r]];else for(var m=0;m<l.bymonth.length;m++)e=l.bymonth[m],d.push(i.slice(e-1,e+1));else l.freq===U.MONTHLY&&(d=[i.slice(e-1,e+1)]);if(ze(d))return c;c.nwdaymask=z(0,r);for(var m=0;m<d.length;m++)for(var h=d[m],y=h[0],w=h[1]-1,_=0;_<l.bynweekday.length;_++){var x=void 0,b=l.bynweekday[_],D=b[0],F=b[1];F<0?(x=w+(F+1)*7,x-=Qe(o[x]-D,7)):(x=y+(F-1)*7,x+=Qe(7-o[x]+D,7)),y<=x&&x<=w&&(c.nwdaymask[x]=1)}return c}function Fa(n,e){e===void 0&&(e=0);var r=n%19,i=Math.floor(n/100),o=n%100,l=Math.floor(i/4),c=i%4,d=Math.floor((i+8)/25),m=Math.floor((i-d+1)/3),h=Math.floor(19*r+i-l-m+15)%30,y=Math.floor(o/4),w=o%4,_=Math.floor(32+2*c+2*y-h-w)%7,x=Math.floor((r+11*h+22*_)/451),b=Math.floor((h+_-7*x+1
`),i=0;i<r.length;){var o=r[i]=r[i].replace(/\s+$/g,"");o?i>0&&o[0]===" "?(r[i-1]+=o.slice(1),r.splice(i,1)):i+=1:r.splice(i,1)}return r}function Lm(n){n.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Oa(n,e){return Lm(e),n.split(",").map(function(r){return jr(r)})}function Qa(n){var e=this;return function(r){if(r!==void 0&&(e["_".concat(n)]=r),e["_".concat(n)]!==void 0)return e["_".concat(n)];for(var i=0;i<e._rrule.length;i++){var o=e._rrule[i].origOptions[n];if(o)return o}}}var fs=function(n){pr(e,n);function e(r){r===void 0&&(r=!1);var i=n.call(this,{},r)||this;return i.dtstart=Qa.apply(i,["dtstart"]),i.tzid=Qa.apply(i,["tzid"]),i._rrule=[],i._rdate=[],i._exrule=[],i._exdate=[],i}return e.prototype._iter=function(r){return Ua(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(r){La(r,this._rrule)},e.prototype.exrule=function(r){La(r,this._exrule)},e.prototype.rdate=function(r){Na(r,this._rdate)},e.prototype.exdate=function(r){Na(r,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(r){return zn(r.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(r){return zn(r.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},e.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(qr({dtstart:this._dtstart}))),this._rrule.forEach(function(i){r=r.concat(i.toString().split(`
`))}),this._exrule.forEach(function(i){r=r.concat(i.toString().split(`
`).map(function(o){return o.replace(/^RRULE:/,"EXRULE:")}).filter(function(o){return!/^DTSTART/.test(o)}))}),this._rdate.length&&r.push(Ca("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(Ca("EXDATE",this._exdate,this.tzid())),r},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var r=new e(!!this._cache);return this._rrule.forEach(function(i){return r.rrule(i.clone())}),this._exrule.forEach(function(i){return r.exrule(i.clone())}),this._rdate.forEach(function(i){return r.rdate(new Date(i.getTime()))}),this._exdate.forEach(function(i){return r.exdate(new Date(i.getTime()))}),r},e}(U);function La(n,e){if(!(n instanceof U))throw new TypeError(String(n)+" is not RRule instance");Z(e.map(String),String(n))||e.push(n)}function Na(n,e){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Z(e.map(Number),Number(n))||(e.push(n),Dt(e))}function Ca(n,e,r){var i=!r||r.toUpperCase()==="UTC",o=i?"".concat(n,":"):"".concat(n,";TZID=").concat(r,":"),l=e.map(function(c){return hr(c.valueOf(),i)}).join(",");return"".concat(o).concat(l)}var at=class n{constructor(e,r){this.primary=e;this.func=r}static ofChar(e){return new n(e,r=>r===e)}static ofChars(e){if(e.length===0)throw"empty symbol";if(e[0]==null)throw"ch mustn't be null";return e.length===0?this.ofChar(e[0]):new n(e[0],r=>e.filter(i=>r===i).length>0)}isSymbol(e){return this.func(e)}},Zn=class{constructor(e){this.tokens=e}setTokenText(e,r,i=!1,o=!1,l=!1,c){let d=this.getToken(e);if(d===null){if(!o)return null;if(e instanceof at?d={symbol:e.primary,text:r}:d={symbol:e,text:r},l&&d.symbol!==""&&!d.text.startsWith(" ")&&(d.text=" "+d.text),this.tokens.length>0){let m=this.tokens[this.tokens.length-1];this.isTokenEndsWithSpace(m)||(m.text+=" ")}if(c==null)this.tokens.push(d);else{let m=0,h=-1,y=0;for(let w of this.tokens){let _=m+w.symbol.length+w.text.length;if(y>0&&_>c){h=y;break}m=_,y++}h==-1?this.tokens.push(d):(this.tokens.splice(h,0,d),h<this.tokens.length-1&&(d.text=d.text+" "))}return d}return this.replaceTokenText(d,r,i),d}length(){return this.tokens.length}replaceTokenText(e,r,i=!1){if(!i){e.text=r;return}e.text=e.text.replace(/^(\s*).*?(\s*)$/,`$1${r}$2`)}isTokenEndsWithSpace(e){return e.text.match(/^.*\s$/)}getToken(e){for(let r of this.tokens)if(e instanceof at){if(e.isSymbol(r.symbol))return r}else if(e===r.symbol)return r;return null}getTokenText(e,r=!1){let i=this.getToken(e);return i===null?null:r?i.text.replace(/^\s*(.*?)\s*$/,"$1"):i.text}removeToken(e){this.tokens=this.tokens.filter(r=>!e.isSymbol(r.symbol))}forEachTokens(e){this.tokens.forEach(e)}rangeOfSymbol(e){let r=0;for(let i of this.tokens){let o=r+i.symbol.length+i.text.length;if(e.isSymbol(i.symbol))return{start:r,end:o};r=o}}join(){return this.tokens.map(e=>e.symbol+e.text).join("")}};function Ba(n,e){let r=[...n],i="",o=null,l=[],c=()=>{o===null?l.push({symbol:"",text:i}):o.text=i};return r.forEach(d=>{e.filter(h=>h.isSymbol(d)).length>0?(c(),o={symbol:d,text:""},l.push(o),i=""):i+=d}),i.length>0&&c(),l}function Nm(n){return n.replace(/#\w+/g,"")}var re=class re{constructor(e,r,i,o){this.useCustomEmoji=e;this.removeTags=r;this.strictDateFormat=i;this.tokens=o}static parse(e,r,i,o){return new re(r!=null?r:!1,i!=null?i:!1,o!=null?o:!0,new Zn(Ba(e,this.allSymbols)))}getTitle(){let e=this.tokens.getTokenText("",!0);return e!=null&&this.removeTags&&(e=Nm(e)),e}getTime(){return this.getDate(this.getReminderSymbol())}setTime(e,r){this.useCustomEmoji?this.setDate(this.getReminderSymbol(),e,1):this.setDate(this.getReminderSymbol(),e,r)}getDueDate(){return this.getDate(re.symbolDueDate)}setDueDate(e){this.setDate(re.symbolDueDate,e)}setRawTime(e){return this.setDate(this.getReminderSymbol(),e),!0}getReminderSymbol(){return this.useCustomEmoji?re.symbolReminder:re.symbolDueDate}getEndOfTimeTextIndex(){let e=re.symbolDueDate;this.useCustomEmoji&&(e=re.symbolReminder);let r=this.tokens.rangeOfSymbol(e);return r!=null?r.end:this.toMarkdown().length}toMarkdown(){return this.tokens.join()}setTitle(e){this.tokens.setTokenText("",e,!0,!0)}getDoneDate(){return this.getDate(re.symbolDoneDate)}setDoneDate(e){this.setDate(re.symbolDoneDate,e)}getRecurrence(){return this.tokens.getTokenText(re.symbolRecurrence,!0)}clone(){return re.parse(this.toMarkdown(),this.useCustomEmoji,this.removeTags,this.strictDateFormat)}getDate(e){let r=this.tokens.ge
[${o}]`);for(let c of l)r.push(String(c));n.app.vault.adapter.write(e,r.join(" "))};console.debug=i("debug"),console.error=i("error"),console.info=i("info"),console.log=i("log"),console.warn=i("warn")}var ft="reminder-list";var fi=require("obsidian");function ge(){}function Im(n,e){for(let r in e)n[r]=e[r];return n}function ys(n){return n()}function ti(){return Object.create(null)}function Se(n){n.forEach(ys)}function It(n){return typeof n=="function"}function Ce(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function el(n){return Object.keys(n).length===0}function tl(n,e,r,i){if(n){let o=rl(n,e,r,i);return n[0](o)}}function rl(n,e,r,i){return n[1]&&i?Im(r.ctx.slice(),n[1](i(e))):r.ctx}function nl(n,e,r,i){if(n[2]&&i){let o=n[2](i(r));if(e.dirty===void 0)return o;if(typeof o=="object"){let l=[],c=Math.max(e.dirty.length,o.length);for(let d=0;d<c;d+=1)l[d]=e.dirty[d]|o[d];return l}return e.dirty|o}return e.dirty}function il(n,e,r,i,o,l){if(o){let c=rl(e,r,i,l);n.p(c,o)}}function sl(n){if(n.ctx.length>32){let e=[],r=n.ctx.length/32;for(let i=0;i<r;i++)e[i]=-1;return e}return-1}var gs=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var ri=class n{constructor(e){g(this,"_listeners","WeakMap"in gs?new WeakMap:void 0);g(this,"_observer");g(this,"options");this.options=e}observe(e,r){return this._listeners.set(e,r),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!=null?e:this._observer=new ResizeObserver(r=>{var i;for(let o of r)n.entries.set(o.target,o),(i=this._listeners.get(o.target))==null||i(o)})}};ri.entries="WeakMap"in gs?new WeakMap:void 0;var ol=!1;function al(){ol=!0}function ll(){ol=!1}function M(n,e){n.appendChild(e)}function ne(n,e,r){n.insertBefore(e,r||null)}function X(n){n.parentNode&&n.parentNode.removeChild(n)}function nt(n,e){for(let r=0;r<n.length;r+=1)n[r]&&n[r].d(e)}function Y(n){return document.createElement(n)}function Re(n){return document.createTextNode(n)}function de(){return Re(" ")}function ce(n,e,r,i){return n.addEventListener(e,r,i),()=>n.removeEventListener(e,r,i)}function O(n,e,r){r==null?n.removeAttribute(e):n.getAttribute(e)!==r&&n.setAttribute(e,r)}function ul(n){return Array.from(n.childNodes)}function Ae(n,e){e=""+e,n.data!==e&&(n.data=e)}function tn(n,e){n.value=e==null?"":e}function vr(n,e,r){for(let i=0;i<n.options.length;i+=1){let o=n.options[i];if(o.__value===e){o.selected=!0;return}}(!r||e!==void 0)&&(n.selectedIndex=-1)}function ni(n){let e=n.querySelector(":checked");return e&&e.__value}function it(n,e,r){n.classList.toggle(e,!!r)}function ii(n,e,{bubbles:r=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:r,cancelable:i})}function dl(n){let e={};return n.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}var Pt;function Mt(n){Pt=n}function si(){if(!Pt)throw new Error("Function called outside component initialization");return Pt}function qt(n){si().$$.on_mount.push(n)}function bs(n){si().$$.after_update.push(n)}function rn(){let n=si();return(e,r,{cancelable:i=!1}={})=>{let o=n.$$.callbacks[e];if(o){let l=ii(e,r,{cancelable:i});return o.slice().forEach(c=>{c.call(n,l)}),!l.defaultPrevented}return!0}}var Kt=[];var We=[],wr=[],_s=[],cl=Promise.resolve(),ws=!1;function xs(){ws||(ws=!0,cl.then(oi))}function ks(){return xs(),cl}function Rt(n){wr.push(n)}function Ds(n){_s.push(n)}var vs=new Set,_r=0;function oi(){if(_r!==0)return;let n=Pt;do{try{for(;_r<Kt.length;){let e=Kt[_r];_r++,Mt(e),Gm(e.$$)}}catch(e){throw Kt.length=0,_r=0,e}for(Mt(null),Kt.length=0,_r=0;We.length;)We.pop()();for(let e=0;e<wr.length;e+=1){let r=wr[e];vs.has(r)||(vs.add(r),r())}wr.length=0}while(Kt.length);for(;_s.length;)_s.pop()();ws=!1,vs.clear(),Mt(n)}function Gm(n){if(n.fragment!==null){n.update(),Se(n.before_update);let e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Rt)}}function fl(n){let e=[],r=[];wr.forEach(i=>n.indexOf(i)===-1?e.push(i):r.push(i)),r.forEach(i=>i()),wr=e}var ai=new Set,Xt;function
`)}},gi=class{unmarshal(e){return en.find(i=>i.name===e)}marshal(e){return e.name}};var mt="re-scan",Sr=class{constructor(){g(this,"settings",new hi);g(this,"reminderTime");g(this,"reminderTimeStep");g(this,"useSystemNotification");g(this,"laters");g(this,"weekStart");g(this,"dateFormat");g(this,"dateTimeFormat");g(this,"strictDateFormat");g(this,"autoCompleteTrigger");g(this,"primaryFormat");g(this,"useCustomEmojiForTasksPlugin");g(this,"removeTagsForTasksPlugin");g(this,"linkDatesToDailyNotes");g(this,"yearMonthDisplayFormat");g(this,"monthDayDisplayFormat");g(this,"timeDisplayFormat");g(this,"shortDateWithWeekdayDisplayFormat");g(this,"editDetectionSec");g(this,"reminderCheckIntervalSec");let e=new Is(this.settings);this.reminderTime=this.settings.newSettingBuilder().key("reminderTime").name("Reminder Time").desc("Time when a reminder with no time part will show").tag(mt).text("09:00").placeHolder("Time (hh:mm)").build(new pi),this.reminderTimeStep=this.settings.newSettingBuilder().key("reminderTimeStep").name("Reminder Time Step (minutes)").desc("Step of time for reminder time (minutes)").number(15).build(new ke),this.useSystemNotification=this.settings.newSettingBuilder().key("useSystemNotification").name("Use system notification").desc("Use system notification for reminder notifications").toggle(!1).build(new ke),this.laters=this.settings.newSettingBuilder().key("laters").name("Remind me later").desc("Line-separated list of remind me later items").textArea(`In 30 minutes
In 1 hour
In 3 hours
Tomorrow
Next week`).placeHolder(`In 30 minutes
In 1 hour
In 3 hours
Tomorrow
Next week`).build(new yi);let r=this.settings.newSettingBuilder().key("weekStart").name("Week start").desc("Select the first day of the week").dropdown("0");Array.from({length:7},(l,c)=>{let d=(0,Bs.default)().weekday(c).format("dddd");r.addOption(d,c.toString())}),this.weekStart=r.onAnyValueChanged(()=>{Bs.default.updateLocale("en",{week:{dow:Number(this.weekStart.value)}})}).build(new ke),this.dateFormat=this.settings.newSettingBuilder().key("dateFormat").name("Date format").desc("moment style date format: https://momentjs.com/docs/#/displaying/format/").tag(mt).text("YYYY-MM-DD").placeHolder("YYYY-MM-DD").onAnyValueChanged(l=>{l.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new ke),this.strictDateFormat=this.settings.newSettingBuilder().key("strictDateFormat").name("Strict Date format").desc("Strictly parse the date and time").tag(mt).toggle(!1).build(new ke),this.dateTimeFormat=this.settings.newSettingBuilder().key("dateTimeFormat").name("Date and time format").desc("moment() style date time format: https://momentjs.com/docs/#/displaying/format/").tag(mt).text("YYYY-MM-DD HH:mm").placeHolder("YYYY-MM-DD HH:mm").onAnyValueChanged(l=>{l.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new ke),this.linkDatesToDailyNotes=this.settings.newSettingBuilder().key("linkDatesToDailyNotes").name("Link dates to daily notes").desc("When toggled, Dates link to daily notes.").tag(mt).toggle(!1).onAnyValueChanged(l=>{l.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new ke),this.autoCompleteTrigger=this.settings.newSettingBuilder().key("autoCompleteTrigger").name("Calendar popup trigger").desc("Trigger text to show calendar popup").text("(@").placeHolder("(@").onAnyValueChanged(l=>{let c=this.autoCompleteTrigger.value;l.setInfo(`Popup is ${c.length===0?"disabled":"enabled"}`)}).build(new ke);let i=this.settings.newSettingBuilder().key("primaryReminderFormat").name("Primary reminder format").desc("Reminder format for generated reminder by calendar popup").dropdown(en[0].name);en.forEach(l=>i.addOption(`${l.description} - ${l.example}`,l.name)),this.primaryFormat=i.build(new gi),this.useCustomEmojiForTasksPlugin=this.settings.newSettingBuilder().key("useCustomEmojiForTasksPlugin").name("Distinguish between reminder date and due date").desc("Use custom emoji \u23F0 instead of \u{1F4C5} and distinguish between reminder date/time and Tasks Plugin's due date.").tag(mt).toggle(!1).onAnyValueChanged(l=>{l.setEnabled(e.enableTasksPluginReminderFormat.value)}).build(new ke),this.removeTagsForTasksPlugin=this.settings.newSettingBuilder().key("removeTagsForTasksPlugin").name("Remove tags from reminder title").desc("If checked, tags(#xxx) are removed from the reminder list view and notification.").tag(mt).toggle(!1).onAnyValueChanged(l=>{l.setEnabled(e.enableTasksPluginReminderFormat.value)}).build(new ke),this.yearMonthDisplayFormat=this.settings.newSettingBuilder().key("yearMonthDisplayFormat").name("Year & Month Format").desc(`Moment style year and month format:
https://momentjs.com/docs/#/displaying/format/`).text("YYYY, MMMM").placeHolder("YYYY, MMMM").build(new ke),this.monthDayDisplayFormat=this.settings.newSettingBuilder().key("monthDayDisplayFormat").name("Month & Day Format").desc(`Moment style month and day format:
https://momentjs.com/docs/#/displaying/format/`).text("MM/DD").placeHolder("MM/DD").build(new ke),this.shortDateWithWeekdayDisplayFormat=this.settings.newSettingBuilder().key("shortDateWithWeekdayDisplayFormat").name("Short Date with Weekday Format").desc(`Moment style short date with weekday format:
https://momentjs.com/docs/#/displaying/format/`).text("M/DD (ddd)").placeHolder("M/DD (ddd)").build(new ke),this.timeDisplayFormat=this.settings.newSettingBuilder().key("timeDisplayFormat").name("Time Format").desc(`Moment style time format:
https://momentjs.com/docs/#/displaying/format/`).text("HH:mm").placeHolder("HH:mm").build(new ke),this.editDetectionSec=this.settings.newSettingBuilder().key("editDetectionSec").name("Edit Detection Time").desc("The minimum amount of time (in seconds) after a key is typed that it will be identified as notifiable.").number(10).build(new ke),this.reminderCheckIntervalSec=this.settings.newSettingBuilder().key("reminderCheckIntervalSec").name("Reminder check interval").desc("Interval(in seconds) to periodically check whether or not you should be notified of reminders. You will need to restart Obsidian for this setting to take effect.").number(5).build(new ke),this.settings.newGroup("Notification Settings").addSettings(this.reminderTime,this.reminderTimeStep,this.laters,this.useSystemNotification),this.settings.newGroup("Editor").addSettings(this.autoCompleteTrigger,this.primaryFormat),this.settings.newGroup("Reminder Format - Reminder Plugin").addSettings(e.enableReminderPluginReminderFormat,this.dateFormat,this.dateTimeFormat,this.strictDateFormat,this.linkDatesToDailyNotes),this.settings.newGroup("Reminder Format - Tasks Plugin").addSettings(e.enableTasksPluginReminderFormat,this.useCustomEmojiForTasksPlugin,this.removeTagsForTasksPlugin),this.settings.newGroup("Reminder Format - Kanban Plugin").addSettings(e.enableKanbanPluginReminderFormat),this.settings.newGroup("Date/Time Display Format").addSettings(this.yearMonthDisplayFormat,this.monthDayDisplayFormat,this.shortDateWithWeekdayDisplayFormat,this.timeDisplayFormat),this.settings.newGroup("Advanced").addSettings(this.editDetectionSec,this.reminderCheckIntervalSec,this.weekStart);let o=new Ar;o.setParameterFunc(Pe.now,()=>G.now()),o.setParameter(Pe.useCustomEmojiForTasksPlugin,this.useCustomEmojiForTasksPlugin),o.setParameter(Pe.linkDatesToDailyNotes,this.linkDatesToDailyNotes),o.setParameter(Pe.removeTagsForTasksPlugin,this.removeTagsForTasksPlugin),Wa(o)}forEach(e){this.settings.forEach(e)}},Is=class{constructor(e){this.settings=e;g(this,"settingKeyToFormatName",new Map);g(this,"reminderFormatSettings",[]);g(this,"enableReminderPluginReminderFormat");g(this,"enableTasksPluginReminderFormat");g(this,"enableKanbanPluginReminderFormat");this.enableReminderPluginReminderFormat=this.createUseReminderFormatSetting(ms),this.enableTasksPluginReminderFormat=this.createUseReminderFormatSetting(hs),this.enableKanbanPluginReminderFormat=this.createUseReminderFormatSetting(ps)}createUseReminderFormatSetting(e){let r=`enable${e.name}`,i=this.settings.newSettingBuilder().key(r).name(`Enable ${e.description}`).desc(`Enable ${e.description}`).tag(mt).toggle(e.defaultEnabled).onAnyValueChanged(o=>{var l;o.setInfo(`Example: ${(l=e.format.appendReminder("- [ ] Task 1",G.now()))==null?void 0:l.insertedLine}`)}).build(new ke);return this.settingKeyToFormatName.set(r,e),this.reminderFormatSettings.push(i),i.rawValue.onChanged(()=>{this.updateReminderFormat()}),i}updateReminderFormat(){let e=this.reminderFormatSettings.filter(r=>r.value).map(r=>this.settingKeyToFormatName.get(r.key)).filter(r=>r!==void 0);Aa(e)}};var bi=Ot(xt(),1);var Ps=class{constructor(e){this.date=e}isToday(e){return this.date===void 0?!1:this.date.date()===e.date()&&this.date.month()===e.month()&&this.date.year()===e.year()}isHoliday(){let e=bi.default.localeData().firstDayOfWeek();return[(6-e+7)%7,(0-e+7)%7].includes(this.date.weekday())}},As=class{constructor(e){this.weekStart=e;g(this,"days",[]);let r=e.clone();for(let i=0;i<7;i++)this.days.push(new Ps(r.clone())),r.add(1,"day")}},vi=class{constructor(e,r){this.monthStart=e;g(this,"weeks",[]);g(this,"weekStart");this.weekStart=r||0;let i=e.clone().add(-(e.weekday()-this.weekStart+7)%7,"day");for(let o=0;o<6&&!(o>0&&!this.isThisMonth(i));o++)this.weeks.push(new As(i.clone())),i.add(1,"week")}isThisMonth(e){return this.monthStart.month()===e.month()&&this.monthStart.year()===e.year()}},_i=class n{constructor(e,r,i){g(this,"_current");g(this,"today");g(this,"weekStart");this.weekStart=i||0,e?this.today=e:this.today=(0,bi.default)(),r?this._current=new vi(r.clone().set
${e}
`;return this._current.weeks.forEach(i=>{let o=" ";i.days.forEach(l=>{let c;l.date&&this._current.isThisMonth(l.date)?c=l.date.format("DD"):c=" ",o=o+c+" "}),r=r+o+`
`}),r}get current(){return this._current}};var Tr=class{constructor(){g(this,"digits",[]);g(this,"lastInput",0)}handle(e){let r=new Date().getTime();return r-this.lastInput>1e3&&this.clear(),this.lastInput=r,this.digits.push(e),this.digits.join("")}clear(){this.digits=[]}};var ah=n=>({}),wl=n=>({});function xl(n,e,r){let i=n.slice();return i[25]=e[r],i}function kl(n,e,r){let i=n.slice();return i[28]=e[r],i}function Dl(n,e,r){let i=n.slice();return i[28]=e[r],i}function Sl(n){let e,r=n[28]+"",i;return{c(){e=Y("th"),i=Re(r),O(e,"class","svelte-kmxndl")},m(o,l){ne(o,e,l),M(e,i)},p(o,l){l[0]&16&&r!==(r=o[28]+"")&&Ae(i,r)},d(o){o&&X(e)}}}function Tl(n){let e,r,i=n[28].date.format("D")+"",o,l,c;function d(){return n[15](n[28])}function m(){return n[16](n[28])}return{c(){e=Y("td"),r=Y("button"),o=Re(i),O(r,"tabindex","-1"),O(r,"class","calendar-date svelte-kmxndl"),it(r,"is-selected",n[28].isToday(n[0])),it(r,"other-month",!n[1].current.isThisMonth(n[28].date)),it(r,"is-holiday",n[28].isHoliday()),it(r,"is-past",n[28].date.isBefore(n[1].today))},m(h,y){ne(h,e,y),M(e,r),M(r,o),l||(c=[ce(r,"click",d),ce(r,"dblclick",m)],l=!0)},p(h,y){n=h,y[0]&2&&i!==(i=n[28].date.format("D")+"")&&Ae(o,i),y[0]&3&&it(r,"is-selected",n[28].isToday(n[0])),y[0]&2&&it(r,"other-month",!n[1].current.isThisMonth(n[28].date)),y[0]&2&&it(r,"is-holiday",n[28].isHoliday()),y[0]&2&&it(r,"is-past",n[28].date.isBefore(n[1].today))},d(h){h&&X(e),l=!1,Se(c)}}}function Fl(n){let e,r,i=we(n[25].days),o=[];for(let l=0;l<i.length;l+=1)o[l]=Tl(kl(n,i,l));return{c(){e=Y("tr");for(let l=0;l<o.length;l+=1)o[l].c();r=de()},m(l,c){ne(l,e,c);for(let d=0;d<o.length;d+=1)o[d]&&o[d].m(e,null);M(e,r)},p(l,c){if(c[0]&195){i=we(l[25].days);let d;for(d=0;d<i.length;d+=1){let m=kl(l,i,d);o[d]?o[d].p(m,c):(o[d]=Tl(m),o[d].c(),o[d].m(e,r))}for(;d<o.length;d+=1)o[d].d(1);o.length=i.length}},d(l){l&&X(e),nt(o,l)}}}function lh(n){let e,r,i,o,l,c=n[1].current.monthStart.format("MMM")+"",d,m,h,y=n[1].current.monthStart.format("YYYY")+"",w,_,x,b,D,F,T,B,P,N,V,I,be,q,j=we(n[4]),ee=[];for(let C=0;C<j.length;C+=1)ee[C]=Sl(Dl(n,j,C));let ie=we(n[1].current.weeks),E=[];for(let C=0;C<ie.length;C+=1)E[C]=Fl(xl(n,ie,C));let te=n[12].footer,le=tl(te,n,n[11],wl);return{c(){e=Y("div"),r=Y("div"),i=Y("button"),i.textContent="<",o=de(),l=Y("span"),d=Re(c),m=de(),h=Y("span"),w=Re(y),_=de(),x=Y("button"),x.textContent=">",b=de(),D=Y("table"),F=Y("thead"),T=Y("tr");for(let C=0;C<ee.length;C+=1)ee[C].c();B=de(),P=Y("tbody");for(let C=0;C<E.length;C+=1)E[C].c();N=de(),V=Y("div"),le&&le.c(),O(i,"tabindex","-1"),O(i,"class","month-nav svelte-kmxndl"),O(l,"class","month svelte-kmxndl"),O(h,"class","year svelte-kmxndl"),O(x,"tabindex","-1"),O(x,"class","month-nav svelte-kmxndl"),O(r,"class","year-month svelte-kmxndl"),O(V,"class","footer"),O(e,"class","reminder-calendar svelte-kmxndl"),O(e,"tabindex","0"),O(e,"role","grid")},m(C,Je){ne(C,e,Je),M(e,r),M(r,i),M(r,o),M(r,l),M(l,d),M(r,m),M(r,h),M(h,w),M(r,_),M(r,x),M(e,b),M(e,D),M(D,F),M(F,T);for(let H=0;H<ee.length;H+=1)ee[H]&&ee[H].m(T,null);M(D,B),M(D,P);for(let H=0;H<E.length;H+=1)E[H]&&E[H].m(P,null);n[17](D),M(e,N),M(e,V),le&&le.m(V,null),n[18](V),I=!0,be||(q=[ce(i,"click",n[13]),ce(x,"click",n[14]),ce(e,"focus",n[19]),ce(e,"blur",n[20]),ce(e,"keydown",n[10])],be=!0)},p(C,Je){if((!I||Je[0]&2)&&c!==(c=C[1].current.monthStart.format("MMM")+"")&&Ae(d,c),(!I||Je[0]&2)&&y!==(y=C[1].current.monthStart.format("YYYY")+"")&&Ae(w,y),Je[0]&16){j=we(C[4]);let H;for(H=0;H<j.length;H+=1){let Ee=Dl(C,j,H);ee[H]?ee[H].p(Ee,Je):(ee[H]=Sl(Ee),ee[H].c(),ee[H].m(T,null))}for(;H<ee.length;H+=1)ee[H].d(1);ee.length=j.length}if(Je[0]&195){ie=we(C[1].current.weeks);let H;for(H=0;H<ie.length;H+=1){let Ee=xl(C,ie,H);E[H]?E[H].p(Ee,Je):(E[H]=Fl(Ee),E[H].c(),E[H].m(P,null))}for(;H<E.length;H+=1)E[H].d(1);E.length=ie.length}le&&le.p&&(!I||Je[0]&2048)&&il(le,te,C,C[11],I?nl(te,C[11],Je,ah):sl(C[11]),wl)},i(C){I||(ae(le,C),I=!0)},o(C){ye(le,C),I=!1},d(C){C&&X(e),nt(ee,C),nt(E,C),n[17](null),le&&le.d(C),n[18](null),be=!1,Se(q)}}}function uh(n,e,r){let i,o,{$$slots:l={},$$scope:c}=e,{value:
/*! Bundled license information:
moment/moment.js:
(*! moment.js *)
(*! version : 2.29.4 *)
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
(*! license : MIT *)
(*! momentjs.com *)
*/
/* nosourcemap */