Files
StudyDiary/.obsidian/plugins/obsidian-reminder-plugin/main.js
T

101 lines
280 KiB
JavaScript
Raw Normal View History

2026-07-23 20:36:13 +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 b_=Object.create;var ys=Object.defineProperty;var v_=Object.getOwnPropertyDescriptor;var y_=Object.getOwnPropertyNames;var __=Object.getPrototypeOf,I_=Object.prototype.hasOwnProperty;var Lf=r=>{throw TypeError(r)};var w_=(r,e,t)=>e in r?ys(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var C_=(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})},Of=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of y_(e))!I_.call(r,o)&&o!==t&&ys(r,o,{get:()=>e[o],enumerable:!(n=v_(e,o))||n.enumerable});return r};var Nr=(r,e,t)=>(t=r!=null?b_(__(r)):{},Of(e||!r||!r.__esModule?ys(t,"default",{value:r,enumerable:!0}):t,r)),A_=r=>Of(ys({},"__esModule",{value:!0}),r);var h=(r,e,t)=>w_(r,typeof e!="symbol"?e+"":e,t),Hu=(r,e,t)=>e.has(r)||Lf("Cannot "+t);var C=(r,e,t)=>(Hu(r,e,"read from private field"),t?t.call(r):e.get(r)),q=(r,e,t)=>e.has(r)?Lf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),j=(r,e,t,n)=>(Hu(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),le=(r,e,t)=>(Hu(r,e,"access private method"),t);var wr=C_((ju,io)=>{(function(r,e){typeof ju=="object"&&typeof io!="undefined"?io.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(ju,(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 c(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 u(i){return i===void 0}function f(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function p(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function b(i,s){var l=[],d,m=i.length;for(d=0;d<m;++d)l.push(s(i[d],d));return l}function I(i,s){for(var l in s)a(s,l)&&(i[l]=s[l]);return a(s,"toString")&&(i.toString=s.toString),a(s,"valueOf")&&(i.valueOf=s.valueOf),i}function g(i,s,l,d){return If(i,s,l,d,!0).utc()}function v(){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 y(i){return i._pf==null&&(i._pf=v()),i._pf}var w;Array.prototype.some?w=Array.prototype.some:w=function(i){var s=Object(this),l=s.length>>>0,d;for(d=0;d<l;d++)if(d in s&&i.call(this,s[d],d,s))return!0;return!1};function x(i){var s=null,l=!1,d=i._d&&!isNaN(i._d.getTime());if(d&&(s=y(i),l=w.call(s.parsedDateParts,function(m){return m!=null}),d=s.overflow<0&&!s.empty&&!s.invalidEra&&!s.invalidMonth&&!s.invalidWeekday&&!s.weekdayMismatch&&!s.nullInput&&!s.invalidFormat&&!s.userInvalidated&&(!s.meridiem||s.meridiem&&l),i._strict&&(d=d&&s.charsLeftOver===0&&s.unusedTokens.length===0&&s.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=d;else return d;return i._isValid}function k(i){var s=g(NaN);return i!=null?I(y(s),i):y(s).userInvalidated=!0,s}var E=e.momentProperties=[],Z=!1;function te(i,s){var l,d,m,_=E.length;if(u(s._isAMomentObject)||(i._isAMomentObject=s._isAMomentObject),u(s._i)||(i._i=s._i),u(s._f)||(i._f=s._f),u(s._l)||(i._l=s._l),u(s._strict)||(i._strict=s._strict),u(s._tzm)||(i._tzm=s._tzm),u(s._isUTC)||(i._isUTC=s._isUTC),u(s._offset)||(i._offset=s._offset),u(s._pf)||(i._pf=y(s)),u(s._locale)||(i._locale=s._locale),_>0)for(l=0;l<_;l++)d=E[l],m=s[d],u(m)||(i[d]=m);return i}function ae(i){te(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Z===!1&&(Z=!0,e.updateOffset(this),Z=!1)}function M(i){return i instanceof ae||i!=null&&i._isAMomentObject!=null}function pe(i){e.suppressDeprecationWarnings===!1&&typeof consol
[`+_+"] ";for(R in arguments[0])a(arguments[0],R)&&(m+=R+": "+arguments[0][R]+", ");m=m.slice(0,-2)}else m=arguments[_];d.push(m)}pe(i+`
Arguments: `+Array.prototype.slice.call(d).join("")+`
`+new Error().stack),l=!1}return s.apply(this,arguments)},s)}var Te={};function He(i,s){e.deprecationHandler!=null&&e.deprecationHandler(i,s),Te[i]||(pe(s),Te[i]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function he(i){return typeof Function!="undefined"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function Lt(i){var s,l;for(l in i)a(i,l)&&(s=i[l],he(s)?this[l]=s:this["_"+l]=s);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ne(i,s){var l=I({},i),d;for(d in s)a(s,d)&&(o(i[d])&&o(s[d])?(l[d]={},I(l[d],i[d]),I(l[d],s[d])):s[d]!=null?l[d]=s[d]:delete l[d]);for(d in i)a(i,d)&&!a(s,d)&&o(i[d])&&(l[d]=I({},l[d]));return l}function tt(i){i!=null&&this.set(i)}var xt;Object.keys?xt=Object.keys:xt=function(i){var s,l=[];for(s in i)a(i,s)&&l.push(s);return l};var Kt={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Q(i,s,l){var d=this._calendar[i]||this._calendar.sameElse;return he(d)?d.call(s,l):d}function ie(i,s,l){var d=""+Math.abs(i),m=s-d.length,_=i>=0;return(_?l?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+d}var D=/(\[[^\[]*\])|(\\)?([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,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Be={},T={};function G(i,s,l,d){var m=d;typeof d=="string"&&(m=function(){return this[d]()}),i&&(T[i]=m),s&&(T[s[0]]=function(){return ie(m.apply(this,arguments),s[1],s[2])}),l&&(T[l]=function(){return this.localeData().ordinal(m.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(D),l,d;for(l=0,d=s.length;l<d;l++)T[s[l]]?s[l]=T[s[l]]:s[l]=_t(s[l]);return function(m){var _="",R;for(R=0;R<d;R++)_+=he(s[R])?s[R].call(m,i):s[R];return _}}function lt(i,s){return i.isValid()?(s=Ve(s,i.localeData()),Be[s]=Be[s]||Je(s),Be[s](i)):i.localeData().invalidDate()}function Ve(i,s){var l=5;function d(m){return s.longDateFormat(m)||m}for(se.lastIndex=0;l>=0&&se.test(i);)i=i.replace(se,d),se.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(D).map(function(d){return d==="MMMM"||d==="MM"||d==="DD"||d==="dddd"?d.slice(1):d}).join(""),this._longDateFormat[i])}var vn="Invalid date";function ei(){return this._invalidDate}var us="%d",xu=/\d{1,2}/;function Tg(i){return this._ordinal.replace("%d",i)}var Gg={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 Eg(i,s,l,d){var m=this._relativeTime[l];return he(m)?m(i,s,l,d):m.replace(/%d/i,i)}function Bg(i,s){var l=this._relativeTime[i>0?"future":"past"];return he(l)?l(s):l.replace(/%s/i,s)}var qd={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 typeo
`).map(e=>B_(e.trim()))}function B_(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 Ye(`In ${t} ${n}`,jf(t))}case"hour":case"hours":{let n=t==1?"hour":"hours";return new Ye(`In ${t} ${n}`,zu(t))}case"day":case"days":{let n=t==1?"day":"days";return new Ye(`In ${t} ${n}`,R_(t))}case"week":case"weeks":{let n=t==1?"week":"weeks";return new Ye(`In ${t} ${n}`,S_(t))}case"month":case"months":{let n=t==1?"month":"months";return new Ye(`In ${t} ${n}`,F_(t))}case"year":case"years":{let n=t==1?"year":"years";return new Ye(`In ${t} ${n}`,T_(t))}}}else if(r.startsWith("next")){let e=r.substring(5);switch(e){case"sunday":return new Ye("Next Sunday",ki(0));case"monday":return new Ye("Next Monday",ki(1));case"tuesday":return new Ye("Next Tuesday",ki(2));case"wednesday":return new Ye("Next Wednesday",ki(3));case"thursday":return new Ye("Next Thursday",ki(4));case"friday":return new Ye("Next Friday",ki(5));case"saturday":return new Ye("Next Saturday",ki(6));case"day":return new Ye("Tomorrow",Ku());case"week":return new Ye("Next week",zf());case"month":return new Ye("Next month",G_());case"year":return new Ye("Next year",E_());default:throw`Unsupported weekday: ${e}`}}else if(r==="tomorrow")return new Ye("Tomorrow",Ku());throw`Unsupported format: ${r}`}var ec=[new Ye("In 30 minutes",jf(30)),new Ye("In 1 hours",zu(1)),new Ye("In 3 hours",zu(3)),new Ye("Tomorrow",Ku()),new Ye("Next week",zf())],qu=class{constructor(){h(this,"dateFormat",new no("YYYY-MM-DD"));h(this,"dateTimeFormat",new no("YYYY-MM-DD HH:mm"));h(this,"strict",new no(!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,or.default)(e,this.dateTimeFormat.value,t);if(n.isValid())return new P(n,!0);let o=(0,or.default)(e,this.dateFormat.value,t);return o.isValid()?new P(o,!1):null}toString(e){return e.hasTimePart?e.format(this.dateTimeFormat.value):e.format(this.dateFormat.value)}},Jr=new qu;function qf(r,e){return ro(e.data.dndUntil.value,P.now())?(r||Da(e),!0):!1}function em(r,e){return r||e.fileSystem.reloadRemindersInAllFiles(),!0}function tm(r,e){return r||e.showReminderList(),!0}var oi=class oi{constructor(e,t,n,o,a){h(this,"lineIndex",e);h(this,"prefix",t);h(this,"check",n);h(this,"suffix",o);h(this,"body",a)}static parse(e,t){let n=oi.regexp.exec(t);return n?new oi(e,n.groups.prefix,n.groups.check,n.groups.suffix,n.groups.body):null}toMarkdown(){return`${this.prefix}${this.check}${this.suffix}${this.body}`}isChecked(){return oi.checkedStatuses.some(e=>e===this.check)}setChecked(e){this.check=e?"x":" "}getHeaderLength(){return this.prefix.length+this.check.length+this.suffix.length}clone(){return oi.parse(this.lineIndex,this.toMarkdown())}};h(oi,"regexp",/^(?<prefix>((> ?)*)?\s*[-*+][ ]+\[)(?<check>.)(?<suffix>\]\s+)(?<body>.*)$/),h(oi,"checkedStatuses",["x","-"]);var so=oi;function rm(r){if(so.parse(0,r)!==null)return r;let e=/^(?<lead>(?:> ?)*\s*)(?<rest>.*)$/.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=/^(?<marker>[-*+])[ ]+(?<content>.*)$/.exec(n);if(o){let a=o.groups.marker,c=o.groups.content;return`${t}${a} [ ] ${c}`}return`${t}- [ ] ${n}`}var Sn=class{constructor(e,t){h(this,"file",e);h(this,"lines",[]);h(this,"todos",[]);this.parse(t)}parse(e){this.lines=e.split(`
`),this.todos=[],this.lines.forEach((t,n)=>{let o=so.parse(n,t);o&&this.todos.push(o)})}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(`
`)}};var im=require("obsidian"),nm=window.require?window.require("electron"):void 0;function Za(){new im.Notice('Cannot insert a reminder here. Reminders can only be added to task lines such as "- [ ] Task".')}function Ya(r,e,t,n,o){let a=r.appendReminder(e,t,n);if(a!=null)return a;if(!o)return null;let c=rm(e);if(c==null)return null;let u=n==null?void 0:n+(c.length-e.length);return r.appendReminder(c,t,u)}async function om(r,e){return nm&&(await nm.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){h(this,"file",e);h(this,"title",t);h(this,"time",n);h(this,"rowNumber",o);h(this,"done",a);h(this,"muteNotification",!1);h(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")}},Ma=class{constructor(e){h(this,"onChange",e);h(this,"fileToReminders",new Map);h(this,"reminders",[]);h(this,"reminderTime")}getExpiredReminders(e){let t=new Date().getTime(),n=[];for(let o=0;o<this.reminders.length;o++){let a=this.reminders[o];if(a.isExpired(t,e))n.push(a);else break}return n}muteExpiredReminders(e){let t=0;for(let n of this.getExpiredReminders(e))n.muteNotification||(n.muteNotification=!0,t++);return t}byDate(e){return this.reminders.filter(t=>t.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 c=o.get(a.key());o.set(a.key(),a.muteNotification),c!==void 0&&(a.muteNotification=c)}}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,c)=>a.equals(o[c]))}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,c;let o=t.time.getTimeInMillis((a=this.reminderTime)==null?void 0:a.value)-n.time.getTimeInMillis((c=this.reminderTime)==null?void 0:c.value);return o>0?1:o<0?-1:0})}},am=[{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 sm(r,e,t,n){let o=P.duration(e,r,"days",t);if(o>30)return new si(r.format(n.yearMonthFormat,t),a=>a.format(n.monthDayFormat,t));if(o>=7)return new si("Over 1 week",a=>a.format(n.monthDayFormat,t));if(r.toYYYYMMDD(t)===e.toYYYYMMDD(t)){let a=new si("Today",c=>c.format(n.timeFormat,t));return a.isToday=!0,a}return r.toYYYYMMDD(t)===e.add(1,"days",t).toYYYYMMDD()?new si("Tomorrow",a=>
`).map($_).filter(function(t){return t!==null});return kt(kt({},e[0]),e[1])}function Fs(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],o=t[2];return n&&(e.tzid=n),e.dtstart=As(o),e}function $_(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return Rm(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return Rm(r);case"DTSTART":return Fs(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function Rm(r){var e=r.replace(/^RRULE:/i,""),t=Fs(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(o){var a=o.split("="),c=a[0],u=a[1];switch(c.toUpperCase()){case"FREQ":t.freq=ue[u.toUpperCase()];break;case"WKST":t.wkst=xr[u.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var f=P_(u),p=c.toLowerCase();t[p]=f;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=H_(u);break;case"DTSTART":case"TZID":var b=Fs(r);t.tzid=b.tzid,t.dtstart=b.dtstart;break;case"UNTIL":t.until=As(u);break;case"BYEASTER":t.byeaster=Number(u);break;default:throw new Error("Unknown RRULE property '"+c+"'")}}),t}function P_(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(Sm)}return Sm(r)}function Sm(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function H_(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return xr[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var o=Number(n[1]),a=n[2],c=xr[a].weekday;return new rt(c,o)})}var Ti=(function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=uo(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:vm(this.date,this.tzid)},r})();function Gs(r){for(var e=[],t="",n=Object.keys(r),o=Object.keys(Ss),a=0;a<n.length;a++)if(n[a]!=="tzid"&&be(o,n[a])){var c=n[a].toUpperCase(),u=r[n[a]],f="";if(!(!De(u)||At(u)&&!u.length)){switch(c){case"FREQ":f=U.FREQUENCIES[r.freq];break;case"WKST":sr(u)?f=new rt(u).toString():f=u.toString();break;case"BYWEEKDAY":c="BYDAY",f=mm(u).map(function(v){return v instanceof rt?v:At(v)?new rt(v[0],v[1]):new rt(v)}).toString();break;case"DTSTART":t=J_(u,r.tzid);break;case"UNTIL":f=uo(u,!r.tzid);break;default:if(At(u)){for(var p=[],b=0;b<u.length;b++)p[b]=String(u[b]);f=p.toString()}else f=String(u)}f&&e.push([c,f])}}var I=e.map(function(v){var y=v[0],w=v[1];return"".concat(y,"=").concat(w.toString())}).join(";"),g="";return I!==""&&(g="RRULE:".concat(I)),[t,g].filter(function(v){return!!v}).join(`
`)}function J_(r,e){return r?"DTSTART"+new Ti(new Date(r),e).toString():""}function j_(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var Fm=(function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?Oa(t):oc(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,o=t?Object.keys(t):[],a=function(b){for(var I=0;I<o.length;I++){var g=o[I];if(!j_(t[g],b[g]))return!0}return!1},c=this[e];if(e==="all")n=this.all;else if(At(c))for(var u=0;u<c.length;u++){var f=c[u];if(!(o.length&&a(f))){n=f._value;break}}if(!n&&this.all){for(var p=new Gn(e,t),u=0;u<this.all.length&&p.accept(this.all[u]);u++);n=p.getValue(),this._cacheAdd(e,n,t)}return At(n)?oc(n):n instanceof Date?Oa(n):n},r})();var Tm=B(B(B(B(B(B(B(B(B(B(B(B(B([],me(1,31),!0),me(2,28),!0),me(3,31),!0),me(4,30),!0),me(5,31),!0),me(6,30),!0),me(7,31),!0),me(8,31),!0),me(9,30),!0),me(10,31),!0),me(11,30),!0),me(12,31),!0),me(1,7),!0),Gm=B(B(B(B(B(B(B(B(B(B(B(B(B([],me(1,31),!0),me(2,29),!0),me(3,31),!0),me(4,30),!0),me(5,31),!0),me(6,30),!0),me(7,31),!0),me(8,31),!0),me(9,30),!0),me(10,31),!0),me(11,30),!0),me(12,31),!0),me(1,7),!0),z_=Cr(1,29),K_=Cr(1,30),li=Cr(1,31),Zt=Cr(1,32),Em=B(B(B(B(B(B(B(B(B(B(B(B(B([],Zt,!0),K_,!0),Zt,!0),li,!0),Zt,!0),li,!0),Zt,!0),Zt,!0),li,!0),Zt,!0),li,!0),Zt,!0),Zt.slice(0,7),!0),Bm=B(B(B(B(B(B(B(B(B(B(B(B(B([],Zt,!0),z_,!0),Zt,!0),li,!0),Zt,!0),li,!0),Zt,!0),Zt,!0),li,!0),Zt,!0),li,!0),Zt,!0),Zt.slice(0,7),!0),q_=Cr(-28,0),eI=Cr(-29,0),ui=Cr(-30,0),Yt=Cr(-31,0),Dm=B(B(B(B(B(B(B(B(B(B(B(B(B([],Yt,!0),eI,!0),Yt,!0),ui,!0),Yt,!0),ui,!0),Yt,!0),Yt,!0),ui,!0),Yt,!0),ui,!0),Yt,!0),Yt.slice(0,7),!0),Nm=B(B(B(B(B(B(B(B(B(B(B(B(B([],Yt,!0),q_,!0),Yt,!0),ui,!0),Yt,!0),ui,!0),Yt,!0),Yt,!0),ui,!0),Yt,!0),ui,!0),Yt,!0),Yt.slice(0,7),!0),Wm=[0,31,60,91,121,152,182,213,244,274,305,335,366],Zm=[0,31,59,90,120,151,181,212,243,273,304,334,365],uc=(function(){for(var r=[],e=0;e<55;e++)r=r.concat(Cr(7));return r})();function Ym(r,e){var t=jr(r,1,1),n=lo(r)?366:365,o=lo(r+1)?366:365,a=xs(t),c=Fn(t),u=kt(kt({yearlen:n,nextyearlen:o,yearordinal:a,yearweekday:c},tI(r)),{wnomask:null});if(ar(e.byweekno))return u;u.wnomask=me(0,n+7);var f,p,b=f=Wt(7-c+e.wkst,7);b>=4?(b=0,p=u.yearlen+Wt(c-e.wkst,7)):p=n-b;for(var I=Math.floor(p/7),g=Wt(p,7),v=Math.floor(I+g/4),y=0;y<e.byweekno.length;y++){var w=e.byweekno[y];if(w<0&&(w+=v+1),w>0&&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&&(u.wnomask[x]=1,x++,u.wdaymask[x]!==e.wkst);k++);}}if(be(e.byweekno,1)){var x=b+v*7;if(b!==f&&(x-=7-f),x<n)for(var y=0;y<7&&(u.wnomask[x]=1,x+=1,u.wdaymask[x]!==e.wkst);y++);}if(b){var E=void 0;if(be(e.byweekno,-1))E=-1;else{var Z=Fn(jr(r-1,1,1)),te=Wt(7-Z.valueOf()+e.wkst,7),ae=lo(r-1)?366:365,M=void 0;te>=4?(te=0,M=ae+Wt(Z-e.wkst,7)):M=n-b,E=Math.floor(52+Wt(M,7)/4)}if(be(e.byweekno,E))for(var x=0;x<b;x++)u.wnomask[x]=1}return u}function tI(r){var e=lo(r)?366:365,t=jr(r,1,1),n=Fn(t);return e===365?{mmask:Tm,mdaymask:Bm,nmdaymask:Nm,wdaymask:uc.slice(n),mrange:Zm}:{mmask:Gm,mdaymask:Em,nmdaymask:Dm,wdaymask:uc.slice(n),mrange:Wm}}function Mm(r,e,t,n,o,a){var c={lastyear:r,lastmonth:e,nwdaymask:[]},u=[];if(a.freq===U.YEARLY)if(ar(a.bymonth))u=[[0,t]];else for(var f=0;f<a.bymonth.length;f++)e=a.bymonth[f],u.push(n.slice(e-1,e+1));else a.freq===U.MONTHLY&&(u=[n.slice(e-1,e+1)]);if(ar(u))return c;c.nwdaymask=me(0,t);for(var f=0;f<u.length;f++)for(var p=u[f],b=p[0],I=p[1]-1,g=0;g<a.bynweekday.length;g++){var v=void 0,y=a.bynweekday[g],w=y[0],x=y[1];x<0?(v=I+(x+1)*7,v-=Wt(o[v]-w,7)):(v=b+(x-1)*7,v+=Wt(7-o[v]+w,7)),b<=v&&v<=I&&(c.nwdaymask[v]=1)}return c}function Xm(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),o=r%100,a=Math.floor(n/4),c=n%4,u=Math.floor((n+8)/25),f=Math.floor((n-u+1)/3),p=Math.floor(19*t+n-a-f+15)%30,b=Math.floor(o/4),I=o%4,g=Math.floor(32+2*c+2*b-p-I)%7,v=Math.floor((t
`),n=0;n<t.length;){var o=t[n]=t[n].replace(/\s+$/g,"");o?n>0&&o[0]===" "?(t[n-1]+=o.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function fI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function $m(r,e){return fI(e),r.split(",").map(function(t){return As(t)})}function Pm(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;n<e._rrule.length;n++){var o=e._rrule[n].origOptions[r];if(o)return o}}}var dc=(function(r){co(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Pm.apply(n,["dtstart"]),n.tzid=Pm.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return Lm(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Hm(t,this._rrule)},e.prototype.exrule=function(t){Hm(t,this._exrule)},e.prototype.rdate=function(t){Jm(t,this._rdate)},e.prototype.exdate=function(t){Jm(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Pa(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Pa(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(Gs({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(`
`))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(`
`).map(function(o){return o.replace(/^RRULE:/,"EXRULE:")}).filter(function(o){return!/^DTSTART/.test(o)}))}),this._rdate.length&&t.push(jm("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(jm("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e})(U);function Hm(r,e){if(!(r instanceof U))throw new TypeError(String(r)+" is not RRule instance");be(e.map(String),String(r))||e.push(r)}function Jm(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");be(e.map(Number),Number(r))||(e.push(r),Tn(e))}function jm(r,e,t){var n=!t||t.toUpperCase()==="UTC",o=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),a=e.map(function(c){return uo(c.valueOf(),n)}).join(",");return"".concat(o).concat(a)}function po(r,e,t){let n;try{n=U.parseText(r)}catch(p){console.warn("Failed to parse recurrence text: recurrence=%s, error=%o",r,p);return}if(!n)return;e=e.clone();let o=t.moment().clone();o.set("hour",e.get("hour")),o.set("minute",e.get("minute")),o.set("second",e.get("second")),o.set("millisecond",e.get("millisecond")),o.isAfter(e)&&(e=o);let a=e.clone();n.dtstart=e.utc(!0).toDate();let u=new U(n).after(e.toDate(),!1);if(u==null)return;let f=u.getTime()-n.dtstart.getTime();return a.add(f,"millisecond"),a.toDate()}function Ja(r){return r.replace(/#[\p{L}\p{N}\p{M}_/-]+/gu,"").trim()}var ho=class extends ai{modifyReminder(e,t,n,o){if(!super.modifyReminder(e,t,n,o))return!1;if(o.checked!==void 0)if(o.checked){let a=n.getRecurrence();if(a!==null){let c=t.clone(),u=n.clone(),f=n.getDueDate(),p=this.config.getParameter(Qe.now);if(this.usesSeparateReminderDate(n)){let b=n.getTime();if(b==null)return!1;let I=po(a,b.moment(),p);if(I==null)return!1;if(u.setTime(new P((0,Ha.default)(I),b.hasTimePart)),f!=null){let g=po(a,f.moment(),p);if(g==null)return!1;u.setDueDate(new P((0,Ha.default)(g),f.hasTimePart))}}else{if(f==null)return!1;let b=po(a,f.moment(),p);if(b==null)return!1;let I=new P((0,Ha.default)(b),f.hasTimePart);u.setTime(I)}c.body=u.toMarkdown(),c.setChecked(!1),e.insertTodo(t.lineIndex,c)}n.setDoneDate(this.config.getParameter(Qe.now))}else n.setDoneDate(void 0);return!0}};var mI=["YYYY-MM-DDTHH:mm","YYYY-MM-DD HH:mm"],pc="YYYY-MM-DD";function fc(r){for(let t of mI){let n=(0,mc.default)(r,t,!0);if(n.isValid())return new P(n,!0)}let e=(0,mc.default)(r,pc,!0);return e.isValid()?new P(e,!1):null}function zm(r){return r.hasTimePart?r.format("YYYY-MM-DDTHH:mm"):r.format(pc)}var Gi="due",ja="completion",Km="repeat",pI="scheduled",hI="start",gI=[Gi,ja,Km,pI,hI],za=class r{constructor(e,t,n){h(this,"text",e);h(this,"reminderFieldName",t);h(this,"removeTags",n)}static parse(e,t,n){return new r(e,t.toLowerCase(),n!=null?n:!1)}fields(){return cm(this.text)}fieldsByKey(e){return this.fields().filter(t=>t.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(Gi)!=null}reminderSourceField(){var e;return(e=this.firstField(this.reminderFieldName))!=null?e:this.firstField(Gi)}getTitle(){let e=new Set([...gI,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=tc(n,o);return n=n.trim(),this.removeTags&&(n=Ja(n)),n}getTime(){let e=this.reminderSourceField();return e==null?null:fc(e.value)}setTime(e){var o;let t=this.reminderSourceField(),n=(o=t==null?void 0:t.key)!=null?o:Gi;this.setFieldValue(n,zm(e))}setRawTime(e){var o;let t=this.reminderSourceField(),n=(o=t==null?void 0:t.key)!=null?o:Gi;return this.setFieldValue(n,e),!0}getDueDate(){let e=this.firstField(Gi);return e==null?null:fc(e.value)}setDueDate(e){this.setFieldValue(Gi,zm(e))}getRecurrence(){var t;let e=this.firstField(Km);return(t=e==null?void 0:e.value)!=null?t:null}getDoneDate(){let e=this.firstField(ja);return e==null?null:fc(e.value)}setDoneDate(e){if(e==null){this.removeFieldByKey(ja);return}let t=e instanceof P?e.f
[${o}]`);for(let c of a)t.push(String(c));r.app.vault.adapter.write(e,t.join(" "))};console.debug=n("debug"),console.error=n("error"),console.info=n("info"),console.log=n("log"),console.warn=n("warn")}var qr="reminder-list";var _I=10*1e3,pl=class{constructor(e){h(this,"plugin",e);h(this,"el")}onload(){this.el=this.plugin.addStatusBarItem(),this.el.addClass("reminder-dnd-status-bar"),this.el.style.display="none",this.el.style.cursor="pointer",this.el.setAttribute("aria-label","Click to resume reminder notifications"),this.plugin.registerDomEvent(this.el,"click",()=>{Da(this.plugin)}),this.plugin.registerInterval(window.setInterval(()=>this.refresh(),_I)),this.refresh()}refresh(){if(!this.el)return;let e=this.plugin.data.dndUntil.value;if(!ro(e,P.now())){this.el.style.display="none";return}this.el.setText(`\u{1F515} Until ${this.formatUntil(e)}`),this.el.style.display=""}formatUntil(e){let t=this.plugin.settings.timeDisplayFormat.value,n=e.format(t);if(e.toYYYYMMDD()===P.now().toYYYYMMDD())return n;let o=this.plugin.settings.monthDayDisplayFormat.value;return`${e.format(o)} ${n}`}};var hl=class{constructor(e){h(this,"plugin",e);h(this,"el")}onload(){this.el=this.plugin.addStatusBarItem(),this.el.addClass("reminder-overdue-status-bar"),this.el.style.display="none",this.el.style.cursor="pointer",this.el.setAttribute("aria-label","Overdue reminders \u2014 click to open the reminder list"),this.plugin.registerDomEvent(this.el,"click",()=>{this.plugin.ui.showReminderList()}),this.plugin.settings.showOverdueCountInStatusBar.rawValue.onChanged(()=>this.refresh()),this.plugin.registerInterval(window.setInterval(()=>this.refresh(),1e4)),this.refresh()}refresh(){if(!this.el)return;if(!this.plugin.settings.showOverdueCountInStatusBar.value){this.el.style.display="none";return}let e=this.plugin.reminders.getExpiredReminders(this.plugin.settings.reminderTime.value).length;if(e===0){this.el.style.display="none";return}this.el.setText(`\u23F0 ${e}`),this.el.style.display=""}};var iu=require("obsidian");var ct=Symbol("$state"),Bs=Symbol("legacy props"),hp=Symbol(""),gl=Symbol("proxy path"),bl=Symbol("attributes"),Ds=Symbol("class"),Ic=Symbol("style"),Ns=Symbol("text"),ci=Symbol("form reset"),wc=Symbol("hmr anchor"),di=new class extends Error{constructor(){super(...arguments);h(this,"name","StaleReactionError");h(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},pp,Cc=!!((pp=globalThis.document)!=null&&pp.contentType)&&globalThis.document.contentType.includes("xml");var Io=3,Ar=8;var bp,vp,gp=(vp=(bp=globalThis.process)==null?void 0:bp.env)==null?void 0:vp.NODE_ENV,S=gp&&!gp.toLowerCase().startsWith("prod");var kr=Array.isArray,yp=Array.prototype.indexOf,fi=Array.prototype.includes,wo=Array.from,xc=Object.keys,Rt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,vl=Object.getOwnPropertyDescriptors,Ac=Object.prototype,_p=Array.prototype,Ei=Object.getPrototypeOf,kc=Object.isExtensible;var en=()=>{};function Ip(r){return r()}function Co(r){for(var e=0;e<r.length;e++)r[e]()}function yl(){var r,e,t=new Promise((n,o)=>{r=n,e=o});return{promise:t,resolve:r,reject:e}}function _l(r){return r===this.v}function Rc(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function Il(r){return!Rc(r,this.v)}function wp(r){if(S){let e=new Error(`invariant_violation
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${r}"
https://svelte.dev/e/invariant_violation`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invariant_violation")}function xo(r){if(S){let e=new Error(`lifecycle_outside_component
\`${r}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function xp(){if(S){let r=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function Sc(){if(S){let r=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function Ap(){if(S){let r=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/derived_references_self")}function Fc(r,e,t){if(S){let n=new Error(`each_key_duplicate
${t?`Keyed each block has duplicate key \`${t}\` at indexes ${r} and ${e}`:`Keyed each block has duplicate key at indexes ${r} and ${e}`}
https://svelte.dev/e/each_key_duplicate`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function kp(r,e,t){if(S){let n=new Error(`each_key_volatile
Keyed each block has key that is not idempotent \u2014 the key for item at index ${r} was \`${e}\` but is now \`${t}\`. Keys must be the same each time for a given item
https://svelte.dev/e/each_key_volatile`);throw n.name="Svelte error",n}else throw new Error("https://svelte.dev/e/each_key_volatile")}function Rp(r){if(S){let e=new Error(`effect_in_teardown
\`${r}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Sp(){if(S){let r=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Fp(r){if(S){let e=new Error(`effect_orphan
\`${r}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function Tp(){if(S){let r=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
https://svelte.dev/e/effect_update_depth_exceeded`);throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gp(){if(S){let r=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/hydration_failed")}function Ep(r){if(S){let e=new Error(`lifecycle_legacy_only
\`${r}(...)\` cannot be used in runes mode
https://svelte.dev/e/lifecycle_legacy_only`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function Bp(r){if(S){let e=new Error(`props_invalid_value
Cannot do \`bind:${r}={undefined}\` when \`${r}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function Dp(r){if(S){let e=new Error(`rune_outside_svelte
The \`${r}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function Np(){if(S){let r=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Wp(){if(S){let r=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zp(){if(S){let r=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Yp(){if(S){let r=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw r.name="Svelte error",r}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var nt=!1,tn=!1,Zr=!1;function Mp(){tn=!0}var Dn={};var Ge=Symbol("uninitialized"),Rr=Symbol("filename");var wl="http://www.w3.org/1999/xhtml";var Ws=null;function Mt(r,e){return r.label=e,xl(r.v,e),r}function xl(r,e){var t;return(t=r==null?void 0:r[gl])==null||t.call(r,e),r}function Yr(r){let e=new Error,t=wI();return t.length===0?null:(t.unshift(`
`),Rt(e,"stack",{value:t.join(`
`)}),Rt(e,"name",{value:r}),e)}function wI(){let r=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let e=new Error().stack;if(Error.stackTraceLimit=r,!e)return[];let t=e.split(`
`),n=[];for(let o=0;o<t.length;o++){let a=t[o],c=a.replaceAll("\\","/");if(a.trim()!=="Error"){if(a.includes("validate_each_keys"))return[];c.includes("svelte/src/internal")||c.includes("node_modules/.vite")||n.push(a)}}return n}function Up(r,e){if(!S)throw new Error("invariant(...) was not guarded by if (DEV)");r||wp(e)}var K=null;function Nn(r){K=r}var rn=null;function Ao(r){rn=r}var Mr=null;function Al(r){Mr=r}function Ke(r,e=!1,t){K={p:K,i:!1,c:null,e:null,s:r,x:null,r:Y,l:tn&&!e?{s:null,u:null,$:[]}:null},S&&(K.function=t,Mr=t)}function qe(r){var o;var e=K,t=e.e;if(t!==null){e.e=null;for(var n of t)Tc(n)}return r!==void 0&&(e.x=r),e.i=!0,K=e.p,S&&(Mr=(o=K==null?void 0:K.function)!=null?o:null),r!=null?r:{}}function nn(){return!tn||K!==null&&K.l===null}var Bi=[];function Qp(){var r=Bi;Bi=[],Co(r)}function it(r){if(Bi.length===0&&!Di){var e=Bi;queueMicrotask(()=>{e===Bi&&Qp()})}Bi.push(r)}function Vp(){for(;Bi.length>0;)Qp()}var on="font-weight: bold",sn="font-weight: normal";function Lp(r){S?console.warn(`%c[svelte] await_reactivity_loss
%cDetected reactivity loss when reading \`${r}\`. This happens when state is read in an async function after an earlier \`await\`
https://svelte.dev/e/await_reactivity_loss`,on,sn):console.warn("https://svelte.dev/e/await_reactivity_loss")}function Op(r,e){S?console.warn(`%c[svelte] await_waterfall
%cAn async derived, \`${r}\` (${e}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
https://svelte.dev/e/await_waterfall`,on,sn):console.warn("https://svelte.dev/e/await_waterfall")}function $p(){S?console.warn(`%c[svelte] derived_inert
%cReading a derived belonging to a now-destroyed effect may result in stale values
https://svelte.dev/e/derived_inert`,on,sn):console.warn("https://svelte.dev/e/derived_inert")}function Pp(r,e,t){S?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${r}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${t}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,on,sn):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Ni(r){S?console.warn(`%c[svelte] hydration_mismatch
%c${r?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${r}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,on,sn):console.warn("https://svelte.dev/e/hydration_mismatch")}function Hp(){S?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,on,sn):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Jp(){S?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",on,sn):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function kl(r){S?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${r}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,on,sn):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function jp(){S?console.warn(`%c[svelte] state_proxy_unmount
%cTried to unmount a state proxy, rather than a component
https://svelte.dev/e/state_proxy_unmount`,on,sn):console.warn("https://svelte.dev/e/state_proxy_unmount")}function zp(){S?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",on,sn):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var L=!1;function dt(r){L=r}var ne;function Se(r){if(r===null)throw Ni(),Dn;return ne=r}function Gt(){return Se(Et(ne))}function X(r){if(L){if(Et(ne)!==null)throw Ni(),Dn;ne=r}}function So(r=1){if(L){for(var e=r,t=ne;e--;)t=Et(t);ne=t}}function an(r=!0){for(var e=0,t=ne;;){if(t.nodeType===Ar){var n=t.data;if(n==="]"){if(e===0)return t;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var o=Et(t);r&&t.remove(),t=o}}function Ys(r){if(!r||r.nodeType!==Ar)throw Ni(),Dn;return r.data}var CI=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Wn(r){if(typeof r!="object"||r===null||ct in r)return r;let e=Ei(r);if(e!==Ac&&e!==_p)return r;var t=new Map,n=kr(r),o=ln(0),a=S&&Zr?Yr("created at"):null,c=pi,u=I=>{if(pi===c)return I();var g=$,v=pi;ft(null),Gc(c);var y=I();return ft(g),Gc(v),y};n&&(t.set("length",ln(r.length,a)),S&&(r=AI(r)));var f="";let p=!1;function b(I){if(!p){p=!0,f=I,Mt(o,`${f} version`);for(let[g,v]of t)Mt(v,Wi(f,g));p=!1}}return new Proxy(r,{defineProperty(I,g,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&Np();var y=t.get(g);return y===void 0?u(()=>{var w=ln(v.value,a);return t.set(g,w),S&&typeof g=="string"&&Mt(w,Wi(f,g)),w}):z(y,v.value,!0),!0},deleteProperty(I,g){var v=t.get(g);if(v===void 0){if(g in I){let y=u(()=>ln(Ge,a));t.set(g,y),Zi(o),S&&Mt(y,Wi(f,g))}}else z(v,Ge),Zi(o);return!0},get(I,g,v){var k;if(g===ct)return r;if(S&&g===gl)return b;var y=t.get(g),w=g in I;if(y===void 0&&(!w||(k=$t(I,g))!=null&&k.writable)&&(y=u(()=>{var E=Wn(w?I[g]:Ge),Z=ln(E,a);return S&&Mt(Z,Wi(f,g)),Z}),t.set(g,y)),y!==void 0){var x=A(y);return x===Ge?void 0:x}return Reflect.get(I,g,v)},getOwnPropertyDescriptor(I,g){var v=Reflect.getOwnPropertyDescriptor(I,g);if(v&&"value"in v){var y=t.get(g);y&&(v.value=A(y))}else if(v===void 0){var w=t.get(g),x=w==null?void 0:w.v;if(w!==void 0&&x!==Ge)return{enumerable:!0,configurable:!0,value:x,writable:!0}}return v},has(I,g){var x;if(g===ct)return!0;var v=t.get(g),y=v!==void 0&&v.v!==Ge||Reflect.has(I,g);if(v!==void 0||Y!==null&&(!y||(x=$t(I,g))!=null&&x.writable)){v===void 0&&(v=u(()=>{var k=y?Wn(I[g]):Ge,E=ln(k,a);return S&&Mt(E,Wi(f,g)),E}),t.set(g,v));var w=A(v);if(w===Ge)return!1}return y},set(I,g,v,y){var pe;var w=t.get(g),x=g in I;if(n&&g==="length")for(var k=v;k<w.v;k+=1){var E=t.get(k+"");E!==void 0?z(E,Ge):k in I&&(E=u(()=>ln(Ge,a)),t.set(k+"",E),S&&Mt(E,Wi(f,k)))}if(w===void 0)(!x||(pe=$t(I,g))!=null&&pe.writable)&&(w=u(()=>ln(void 0,a)),S&&Mt(w,Wi(f,g)),z(w,Wn(v)),t.set(g,w));else{x=w.v!==Ge;var Z=u(()=>Wn(v));z(w,Z)}var te=Reflect.getOwnPropertyDescriptor(I,g);if(te!=null&&te.set&&te.set.call(y,v),!x){if(n&&typeof g=="string"){var ae=t.get("length"),M=Number(g);Number.isInteger(M)&&M>=ae.v&&z(ae,M+1)}Zi(o)}return!0},ownKeys(I){A(o);var g=Reflect.ownKeys(I).filter(w=>{var x=t.get(w);return x===void 0||x.v!==Ge});for(var[v,y]of t)y.v!==Ge&&!(v in I)&&g.push(v);return g},setPrototypeOf(){Wp()}})}function Wi(r,e){var t;return typeof e=="symbol"?`${r}[Symbol(${(t=e.description)!=null?t:""})]`:CI.test(e)?`${r}.${e}`:/^\d+$/.test(e)?`${r}[${e}]`:`${r}['${e}']`}function Fo(r){try{if(r!==null&&typeof r=="object"&&ct in r)return r[ct]}catch(e){}return r}function Ec(r,e){return Object.is(Fo(r),Fo(e))}var xI=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function AI(r){return new Proxy(r,{get(e,t,n){var o=Reflect.get(e,t,n);return xI.has(t)?function(...a){Kp();var c=o.apply(this,a);return Rl(),c}:o}})}function qp(){let r=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:t,lastIndexOf:n,includes:o}=r;r.indexOf=function(a,c){let u=t.call(this,a,c);if(u===-1){for(let f=c!=null?c:0;f<this.length;f+=1)if(Fo(this[f])
${n}in ${((c=e.fn)==null?void 0:c.name)||"<unknown>"}`,a=e.ctx;a!==null;)o+=`
${n}in ${(u=a.function)==null?void 0:u[Rr].split("/").pop()}`,a=a.p;return{message:r.message+`
${o}
`,stack:(f=r.stack)==null?void 0:f.split(`
`).filter(p=>!p.includes("svelte/src/internal")).join(`
`)}}}function nh(r){let e=Bc.get(r);e&&(Rt(r,"message",{value:e.message}),Rt(r,"stack",{value:e.stack}))}var RI=-7169;function ke(r,e){r.f=r.f&RI|e}function Go(r){(r.f&512)!==0||r.deps===null?ke(r,1024):ke(r,4096)}function ih(r){if(r!==null)for(let e of r)(e.f&2)===0||(e.f&65536)===0||(e.f^=65536,ih(e.deps))}function El(r,e,t){(r.f&2048)!==0?e.add(r):(r.f&4096)!==0&&t.add(r),ih(r.deps),ke(r,1024)}var oh=!1,Bl=!1;function Dc(r){var e=Bl;try{return Bl=!1,[r(),Bl]}finally{Bl=e}}function sh(r){let e=0,t=Vt(0),n;return S&&Mt(t,"createSubscriber version"),()=>{mi()&&(A(t),gt(()=>(e===0&&(n=V(()=>r(()=>Zi(t)))),e+=1,()=>{it(()=>{e-=1,e===0&&(n==null||n(),n=void 0,Zi(t))})})))}}var FI=589824;function Mc(r,e,t,n){new Nc(r,e,t,n)}var ur,Vs,Tr,Yi,rr,Gr,Pt,cr,Mn,Mi,gi,Bo,Ls,Os,un,Wl,Xe,lh,uh,ch,Wc,Dl,Nl,Zc,Yc,Nc=class{constructor(e,t,n,o){q(this,Xe);h(this,"parent");h(this,"is_pending",!1);h(this,"transform_error");q(this,ur);q(this,Vs,L?ne:null);q(this,Tr);q(this,Yi);q(this,rr);q(this,Gr,null);q(this,Pt,null);q(this,cr,null);q(this,Mn,null);q(this,Mi,0);q(this,gi,0);q(this,Bo,!1);q(this,Ls,new Set);q(this,Os,new Set);q(this,un,null);q(this,Wl,sh(()=>(j(this,un,Vt(C(this,Mi))),S&&Mt(C(this,un),"$effect.pending()"),()=>{j(this,un,null)})));var a,c;j(this,ur,e),j(this,Tr,t),j(this,Yi,u=>{var f=Y;f.b=this,f.f|=128,n(u)}),this.parent=Y.b,this.transform_error=(c=o!=null?o:(a=this.parent)==null?void 0:a.transform_error)!=null?c:(u=>u),j(this,rr,mr(()=>{if(L){let u=C(this,Vs);Gt();let f=u.data==="[!";if(u.data.startsWith("[?")){let b=JSON.parse(u.data.slice("[?".length));le(this,Xe,uh).call(this,b)}else f?le(this,Xe,ch).call(this):le(this,Xe,lh).call(this)}else le(this,Xe,Wc).call(this)},FI)),L&&j(this,ur,ne)}defer_effect(e){El(e,C(this,Ls),C(this,Os))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!C(this,Tr).pending}update_pending_count(e,t){le(this,Xe,Zc).call(this,e,t),j(this,Mi,C(this,Mi)+e),!(!C(this,un)||C(this,Bo))&&(j(this,Bo,!0),it(()=>{j(this,Bo,!1),C(this,un)&&Qr(C(this,un),C(this,Mi))}))}get_effect_pending(){return C(this,Wl).call(this),A(C(this,un))}error(e){var t;if(!C(this,Tr).onerror&&!C(this,Tr).failed)throw e;(t=O)!=null&&t.is_fork?(C(this,Gr)&&O.skip_effect(C(this,Gr)),C(this,Pt)&&O.skip_effect(C(this,Pt)),C(this,cr)&&O.skip_effect(C(this,cr)),O.oncommit(()=>{le(this,Xe,Yc).call(this,e)})):le(this,Xe,Yc).call(this,e)}};ur=new WeakMap,Vs=new WeakMap,Tr=new WeakMap,Yi=new WeakMap,rr=new WeakMap,Gr=new WeakMap,Pt=new WeakMap,cr=new WeakMap,Mn=new WeakMap,Mi=new WeakMap,gi=new WeakMap,Bo=new WeakMap,Ls=new WeakMap,Os=new WeakMap,un=new WeakMap,Wl=new WeakMap,Xe=new WeakSet,lh=function(){try{j(this,Gr,bt(()=>C(this,Yi).call(this,C(this,ur))))}catch(e){this.error(e)}},uh=function(e){let t=C(this,Tr).failed;t&&j(this,cr,bt(()=>{t(C(this,ur),()=>e,()=>()=>{})}))},ch=function(){let e=C(this,Tr).pending;e&&(this.is_pending=!0,j(this,Pt,bt(()=>e(C(this,ur)))),it(()=>{var t=j(this,Mn,document.createDocumentFragment()),n=It();t.append(n),j(this,Gr,le(this,Xe,Nl).call(this,()=>bt(()=>C(this,Yi).call(this,n)))),C(this,gi)===0&&(C(this,ur).before(t),j(this,Mn,null),cn(C(this,Pt),()=>{j(this,Pt,null)}),le(this,Xe,Dl).call(this,O))}))},Wc=function(){try{if(this.is_pending=this.has_pending_snippet(),j(this,gi,0),j(this,Mi,0),j(this,Gr,bt(()=>{C(this,Yi).call(this,C(this,ur))})),C(this,gi)>0){var e=j(this,Mn,document.createDocumentFragment());Do(C(this,Gr),e);let t=C(this,Tr).pending;j(this,Pt,bt(()=>t(C(this,ur))))}else le(this,Xe,Dl).call(this,O)}catch(t){this.error(t)}},Dl=function(e){this.is_pending=!1,e.transfer_effects(C(this,Ls),C(this,Os))},Nl=function(e){var t=Y,n=$,o=K;et(C(this,rr)),ft(C(this,rr)),Nn(C(this,rr).ctx);try{return fr.ensure(),e()}catch(a){return Gl(a),null}finally{et(t),ft(n),Nn(o)}},Zc=function(e,t){var n;if(!this.has_pending_snippet()){this.parent&&le(n=this.parent,Xe,Zc).call(n,e,t);return}j(this,gi,C(this,gi)+e),C(this,gi)===0&&(le(this,Xe,Dl).call(this,t),C(this,Pt)&&cn(C(this,Pt),()=>{j(this,Pt,null)}),C(this,Mn)&&(C(this,ur).before(C(this,Mn)),j(t
`).some(f=>f.startsWith("https://svelte.dev/e/")))throw u;return u!==Dn&&console.warn("Failed to hydrate: ",u),e.recover===!1&&Gp(),Sl(),Us(t),dt(!1),Jl(r,e)}finally{dt(n),Se(o)}}var Hl=new Map;function Oh(r,{target:e,anchor:t,props:n={},events:o,context:a,intro:c=!0,transformError:u}){Sl();var f=void 0,p=Nh(()=>{var b=t!=null?t:e.appendChild(It());Mc(b,{pending:()=>{}},v=>{Ke({});var y=K;if(a&&(y.c=a),o&&(n.$$events=o),L&&jn(v,null),cd=c,f=r(v,n)||{},cd=!0,L&&(Y.nodes.end=ne,ne===null||ne.nodeType!==Ar||ne.data!=="]"))throw Ni(),Dn;qe()},u);var I=new Set,g=v=>{for(var y=0;y<v.length;y++){var w=v[y];if(!I.has(w)){I.add(w);var x=Lh(w);for(let Z of[e,document]){var k=Hl.get(Z);k===void 0&&(k=new Map,Hl.set(Z,k));var E=k.get(w);E===void 0?(Z.addEventListener(w,Pl,{passive:x}),k.set(w,1)):k.set(w,E+1)}}}};return g(wo(Xh)),sd.add(g),()=>{var x;for(var v of I)for(let k of[e,document]){var y=Hl.get(k),w=y.get(v);--w==0?(k.removeEventListener(v,Pl),y.delete(v),y.size===0&&Hl.delete(k)):y.set(v,w)}sd.delete(g),b!==t&&((x=b.parentNode)==null||x.removeChild(b))}});return dd.set(f,p),f}var dd=new WeakMap;function md(r,e){let t=dd.get(r);return t?(dd.delete(r),t(e)):(S&&(ct in r?jp():Hp()),Promise.resolve())}function jl(r){return function(...e){var t=e[0];return t.stopPropagation(),r==null?void 0:r.apply(this,e)}}function zl(r){return function(...e){var t=e[0];return t.preventDefault(),r==null?void 0:r.apply(this,e)}}function at(r){return new pd(r)}var zn,Er,pd=class{constructor(e){q(this,zn);q(this,Er);var a,c;var t=new Map,n=(u,f)=>{var p=Ce(f,!1,!1);return t.set(u,p),p};let o=new Proxy({...e.props||{},$$events:{}},{get(u,f){var p;return A((p=t.get(f))!=null?p:n(f,Reflect.get(u,f)))},has(u,f){var p;return f===Bs?!0:(A((p=t.get(f))!=null?p:n(f,Reflect.get(u,f))),Reflect.has(u,f))},set(u,f,p){var b;return z((b=t.get(f))!=null?b:n(f,p),p),Reflect.set(u,f,p)}});j(this,Er,(e.hydrate?fd:Jl)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover,transformError:e.transformError})),!nt&&(!((c=e==null?void 0:e.props)!=null&&c.$$host)||e.sync===!1)&&J(),j(this,zn,o.$$events);for(let u of Object.keys(C(this,Er)))u==="$set"||u==="$destroy"||u==="$on"||Rt(this,u,{get(){return C(this,Er)[u]},set(f){C(this,Er)[u]=f},enumerable:!0});C(this,Er).$set=u=>{Object.assign(o,u)},C(this,Er).$destroy=()=>{md(C(this,Er))}}$set(e){C(this,Er).$set(e)}$on(e,t){C(this,zn)[e]=C(this,zn)[e]||[];let n=(...o)=>t.call(this,...o);return C(this,zn)[e].push(n),()=>{C(this,zn)[e]=C(this,zn)[e].filter(o=>o!==n)}}$destroy(){C(this,Er).$destroy()}};zn=new WeakMap,Er=new WeakMap;var $h,Ph,Hh;typeof window!="undefined"&&((Hh=(Ph=($h=window.__svelte)!=null?$h:window.__svelte={}).v)!=null?Hh:Ph.v=new Set).add("5");Mp();var $r,mn,vr,Oi,na,ia,Kl,Kn=class{constructor(e,t=!0){h(this,"anchor");q(this,$r,new Map);q(this,mn,new Map);q(this,vr,new Map);q(this,Oi,new Set);q(this,na,!0);q(this,ia,e=>{if(C(this,$r).has(e)){var t=C(this,$r).get(e),n=C(this,mn).get(t);if(n)Ho(n),C(this,Oi).delete(t);else{var o=C(this,vr).get(t);o&&(Ho(o.effect),C(this,mn).set(t,o.effect),C(this,vr).delete(t),S&&(o.fragment.lastChild[wc]=this.anchor),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),n=o.effect)}for(let[a,c]of C(this,$r)){if(C(this,$r).delete(a),a===e)break;let u=C(this,vr).get(c);u&&(Oe(u.effect),C(this,vr).delete(c))}for(let[a,c]of C(this,mn)){if(a===t||C(this,Oi).has(a))continue;let u=()=>{if(Array.from(C(this,$r).values()).includes(a)){var p=document.createDocumentFragment();Do(c,p),p.append(It()),C(this,vr).set(a,{effect:c,fragment:p})}else Oe(c);C(this,Oi).delete(a),C(this,mn).delete(a)};C(this,na)||!n?(C(this,Oi).add(a),cn(c,u,!1)):u()}}});q(this,Kl,e=>{C(this,$r).delete(e);let t=Array.from(C(this,$r).values());for(let[n,o]of C(this,vr))t.includes(n)||(Oe(o.effect),C(this,vr).delete(n))});this.anchor=e,j(this,na,t)}ensure(e,t){var n=O,o=Fl();if(t&&!C(this,mn).has(e)&&!C(this,vr).has(e))if(o){var a=document.createDocumentFragment(),c=It();a.append(c),C(this,vr).set(e,{effect:bt(()=>t(c)),fragment:a})}else C(this,
\r\f\xA0\v\uFEFF`];function tg(r,e,t){var n=r==null?"":""+r;if(e&&(n=n?n+" "+e:e),t){for(var o of Object.keys(t))if(t[o])n=n?n+" "+o:o;else if(n.length)for(var a=o.length,c=0;(c=n.indexOf(o,c))>=0;){var u=c+a;(c===0||eg.includes(n[c-1]))&&(u===n.length||eg.includes(n[u]))?n=(c===0?"":n.substring(0,c))+n.substring(u+1):c=u}}return n===""?null:n}function gn(r,e,t,n,o,a){var c=r[Ds];if(L||c!==t||c===void 0){var u=tg(t,n,a);(!L||u!==r.getAttribute("class"))&&(u==null?r.removeAttribute("class"):e?r.className=u:r.setAttribute("class",u)),r[Ds]=t}else if(a&&o!==a)for(var f in a){var p=!!a[f];(o==null||p!==!!o[f])&&r.classList.toggle(f,p)}return a}function ql(r,e,t=!1){if(r.multiple){if(e==null)return;if(!kr(e))return Jp();for(var n of r.options)n.selected=e.includes(aa(n));return}for(n of r.options){var o=aa(n);if(Ec(o,e)){n.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function vd(r){var e=new MutationObserver(()=>{ql(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),pt(()=>{e.disconnect()})}function la(r,e,t=e){var n=new WeakSet,o=!0;Vl(r,"change",a=>{var p;var c=a?"[selected]":":checked",u;if(r.multiple)u=[].map.call(r.querySelectorAll(c),aa);else{var f=(p=r.querySelector(c))!=null?p:r.querySelector("option:not([disabled])");u=f&&aa(f)}t(u),r.__value=u,O!==null&&n.add(O)}),br(()=>{var a=e();if(r===document.activeElement){var c=nt?dn:O;if(n.has(c))return}if(ql(r,a,o),o&&a===void 0){var u=r.querySelector(":checked");u!==null&&(a=aa(u),t(a))}r.__value=a,o=!1}),vd(r)}function aa(r){return"__value"in r?r.__value:r.value}var vw=Symbol("is custom element"),yw=Symbol("is html"),_w=Cc?"link":"LINK";function _d(r){if(L){var e=!1,t=()=>{if(!e){if(e=!0,r.hasAttribute("value")){var n=r.value;Pr(r,"value",null),r.value=n}if(r.hasAttribute("checked")){var o=r.checked;Pr(r,"checked",null),r.checked=o}}};r[ci]=t,it(t),Ql()}}function Id(r,e){e?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function Pr(r,e,t,n){var o=Iw(r);if(L&&(o[e]=r.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&r.nodeName===_w)){n||Cw(r,e,t!=null?t:"");return}o[e]!==(o[e]=t)&&(e==="loading"&&(r[hp]=t),t==null?r.removeAttribute(e):typeof t!="string"&&ww(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function Iw(r){var e,t;return(t=r[e=bl])!=null?t:r[e]={[vw]:r.nodeName.includes("-"),[yw]:r.namespaceURI===wl}}var rg=new Map;function ww(r){var e=r.getAttribute("is")||r.nodeName,t=rg.get(e);if(t)return t;rg.set(e,t=[]);for(var n,o=r,a=Element.prototype;a!==o;){n=vl(o);for(var c in n)n[c].set&&c!=="innerHTML"&&c!=="textContent"&&c!=="innerText"&&t.push(c);o=Ei(o)}return t}function Cw(r,e,t){var n;S&&(e==="srcset"&&xw(r,t)||yd((n=r.getAttribute(e))!=null?n:"",t)||Pp(e,r.outerHTML.replace(r.innerHTML,r.innerHTML&&"..."),String(t)))}function yd(r,e){return r===e?!0:new URL(r,document.baseURI).href===new URL(e,document.baseURI).href}function ng(r){return r.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function xw(r,e){var t=ng(r.srcset),n=ng(e);return n.length===t.length&&n.every(([o,a],c)=>a===t[c][1]&&(yd(t[c][0],o)||yd(o,t[c][0])))}function xd(r,e,t=e){var n=new WeakSet;Vl(r,"input",async o=>{S&&r.type==="checkbox"&&Sc();var a=o?r.defaultValue:r.value;if(a=wd(r)?Cd(a):a,t(a),O!==null&&n.add(O),await Jn(),a!==(a=e())){var c=r.selectionStart,u=r.selectionEnd,f=r.value.length;if(r.value=a!=null?a:"",u!==null){var p=r.value.length;c===u&&u===f&&p>f?(r.selectionStart=p,r.selectionEnd=p):(r.selectionStart=c,r.selectionEnd=Math.min(u,p))}}}),(L&&r.defaultValue!==r.value||V(e)==null&&r.value)&&(t(wd(r)?Cd(r.value):r.value),O!==null&&n.add(O)),gt(()=>{S&&r.type==="checkbox"&&Sc();var o=e();if(r===document.activeElement){var a=nt?dn:O;if(n.has(a))return}wd(r)&&o===Cd(r.value)||r.type==="date"&&!o&&!r.value||o!==r.value&&(r.value=o!=null?o:"")})}function wd(r){var e=r.type;return e==="number"||e==="range"}function Cd(r){return r===""?null:+r}function Ad(r,e,t){var n=$t(r,e);n&&n.set&&(r[e]=t,pt(()=>{r[e]=null}))}function kd(r,e){return r===e||(r==null?void 0:r[ct])===e}function Ct
${e}
`;return this._current.weeks.forEach(n=>{let o=" ";n.days.forEach(a=>{let c;a.date&&this._current.isThisMonth(a.date)?c=a.date.format("DD"):c=" ",o=o+c+" "}),t=t+o+`
`}),t}get current(){return this._current}};var es=class{constructor(){h(this,"digits",[]);h(this,"lastInput",0)}handle(e){let t=new Date().getTime();return t-this.lastInput>1e3&&this.clear(),this.lastInput=t,this.digits.push(e),this.digits.join("")}clear(){this.digits=[]}};var Uw=ve('<th class="svelte-1lru178"> </th>'),Qw=ve('<td><button tabindex="-1"> </button></td>'),Vw=ve("<tr></tr>"),Lw=ve('<div class="reminder-calendar svelte-1lru178" tabindex="0" role="grid"><div class="year-month svelte-1lru178"><button tabindex="-1" class="month-nav svelte-1lru178">&lt;</button> <span class="month svelte-1lru178"> </span> <span class="year svelte-1lru178"> </span> <button tabindex="-1" class="month-nav svelte-1lru178">&gt;</button></div> <table><thead><tr></tr></thead><tbody></tbody></table> <div class="footer"><!></div></div>');function su(r,e){if(new.target)return at({component:su,...r});Ke(e,!1);let t=Ce(),n=Ce(),o=re(e,"value",28,ts.default),a=re(e,"weekStart",12,0),c=jo(),u=Ce(),f=Ce(),p=Ce();function b(){A(p).focus()}function I(Q){o(Q)}function g(Q){o(Q),w()}function v(){o(o().add(-1,"month"))}function y(){o(o().add(1,"month"))}function w(){c("select",o())}let x=new es;function k(Q){if(Q.key>="0"&&Q.key<="9"){Q.preventDefault();let ie=x.handle(Q.key);switch(ie.length){case 1:{let D=parseInt(ie);D>0&&o(o().set("date",D));break}case 2:ie.startsWith("0")&&(ie=ie.slice(1)),o(o().set("date",parseInt(ie)));break;case 4:{let D=ie.slice(0,2),se=ie.slice(2,4);D.startsWith("0")&&(D=D.slice(1)),se.startsWith("0")&&(se=se.slice(1)),o(o().set("month",parseInt(D)-1)),o(o().set("date",parseInt(se)))}break}return}x.clear(),Q.key==="ArrowLeft"||Q.ctrlKey&&Q.key==="B"?(o(o().add(-1,"day")),Q.preventDefault()):Q.key==="ArrowRight"||Q.ctrlKey&&Q.key==="F"?(o(o().add(1,"day")),Q.preventDefault()):Q.key==="ArrowUp"||Q.ctrlKey&&Q.key==="P"?o(o().add(-7,"day")):Q.key==="ArrowDown"||Q.ctrlKey&&Q.key==="N"?(o(o().add(7,"day")),Q.preventDefault()):Q.key==="Enter"&&(w(),Q.preventDefault())}Jo(()=>{td(f,A(f).style.width=A(u).clientWidth+"px")}),yi(()=>(ua,ts.default,st(o()),st(a())),()=>{z(t,new ua((0,ts.default)().startOf("day"),o().startOf("day"),a()))}),yi(()=>(ts.default,A(t)),()=>{z(n,Array.from({length:7},(Q,ie)=>(0,ts.default)().day((A(t).weekStart+ie)%7).format("ddd")))}),ra();var E={focus:b,get value(){return o()},set value(Q){o(Q),J()},get weekStart(){return a()},set weekStart(Q){a(Q),J()},$set:yt,$on:(Q,ie)=>vt(e,Q,ie)};Bt();var Z=Lw(),te=H(Z),ae=H(te),M=Ie(ae,2),pe=H(M,!0);X(M);var ye=Ie(M,2),Te=H(ye,!0);X(ye);var He=Ie(ye,2);X(te);var he=Ie(te,2),Lt=H(he),Ne=H(Lt);zt(Ne,5,()=>A(n),Q=>Q,(Q,ie)=>{var D=Uw(),se=H(D,!0);X(D),$e(()=>Pe(se,A(ie))),de(Q,D)}),X(Ne),X(Lt);var tt=Ie(Lt);zt(tt,5,()=>(A(t),V(()=>A(t).current.weeks)),Q=>Q.key,(Q,ie)=>{var D=Vw();zt(D,5,()=>(A(ie),V(()=>A(ie).days)),se=>se.date.valueOf(),(se,Be)=>{var T=Qw(),G=H(T);let _t;var Je=H(G,!0);X(G),X(T),$e((lt,Ve)=>{_t=gn(G,1,"calendar-date svelte-1lru178",null,_t,lt),Pe(Je,Ve)},[()=>({"is-selected":A(Be).isToday(o()),"other-month":!A(t).current.isThisMonth(A(Be).date),"is-holiday":A(Be).isHoliday(),"is-past":A(Be).date.isBefore(A(t).today)}),()=>(A(Be),V(()=>A(Be).date.format("D")))]),ce("click",G,()=>I(A(Be).date)),ce("dblclick",G,()=>g(A(Be).date)),de(se,T)}),X(D),de(Q,D)}),X(tt),X(he),Ct(he,Q=>z(u,Q),()=>A(u));var xt=Ie(he,2),Kt=H(xt);return bd(Kt,e,"footer",{},null),X(xt),Ct(xt,Q=>z(f,Q),()=>A(f)),X(Z),Ct(Z,Q=>z(p,Q),()=>A(p)),$e((Q,ie)=>{Pe(pe,Q),Pe(Te,ie)},[()=>(A(t),V(()=>A(t).current.monthStart.format("MMM"))),()=>(A(t),V(()=>A(t).current.monthStart.format("YYYY")))]),ce("click",ae,()=>v()),ce("click",He,()=>y()),ce("focus",Z,()=>{c("focus")}),ce("blur",Z,()=>{c("blur")}),ce("keydown",Z,k),de(r,Z),Ad(e,"focus",b),qe(E)}var Ow=ve("<option> </option>"),$w=ve('<select class="time-picker svelte-16e079f"></select>');function au(r,e){if(new.target)return at({component:au,...r});Ke(e,!1);let t=re(e,"value",12,"00:00"),n=re(e,"step",12,15),o=jo();function a(){o("select",t())}function c(){o("focus")}function u(){o("blur")}function f(){let y=[];for(let w=0;w<1440;w+=n()){let x
`)[u])!=null?b:"",p=r.state.doc.line(u+1);r.dispatch({changes:{from:p.from,to:p.to,insert:f},effects:[ca.of()]})}var eC=300,Ig=is.Annotation.define();function Nd(r,e){var t,n,o,a;try{if(!r.settings.editorReminderDisplay.value)return[];if(!((t=e.field(fu.editorLivePreviewField,!1))!=null&&t))return[];let c=(a=(o=(n=e.field(fu.editorInfoField,!1))==null?void 0:n.file)==null?void 0:o.path)!=null?a:"",u=new Sn(c,e.doc.toString());return gg(e.doc,yo(u))}catch(c){return console.error("Failed to parse reminders for editor pills.",c),[]}}function Dd(r,e,t){let n=r.selection.main.head,o=new is.RangeSetBuilder;for(let a of e)n>=a.from&&n<=a.to||o.add(a.from,a.to,os.Decoration.replace({widget:new du(a,t)}));return o.finish()}function tC(r,e){let t=[];for(let n of r){let o=e.mapPos(n.from),a=e.mapPos(n.to,1);o<a&&t.push({...n,from:o,to:a})}return t}function rC(r){return is.StateField.define({create(e){let t=Nd(r,e);return{decos:Dd(e,t,r),cache:t}},update(e,t){let n=e.decos.map(t.changes),o=t.docChanged?tC(e.cache,t.changes):e.cache,a=t.annotation(Ig);a!==void 0&&(o=a);let c=t.docChanged&&o.some(b=>t.changes.touchesRange(b.from,b.to)),u=t.effects.some(b=>b.is(ca));if(c||t.reconfigured||u&&a===void 0)return o=Nd(r,t.state),n=Dd(t.state,o,r),{decos:n,cache:o};let p=!t.startState.selection.eq(t.state.selection);return(a!==void 0||p)&&(n=Dd(t.state,o,r)),{decos:n,cache:o}},provide:e=>os.EditorView.decorations.from(e,t=>t.decos)})}function nC(r){return os.ViewPlugin.fromClass(class{constructor(e){h(this,"view",e);h(this,"debounceTimer")}update(e){e.docChanged&&(this.debounceTimer!==void 0&&window.clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{this.debounceTimer=void 0;let t=Nd(r,this.view.state);this.view.dispatch({annotations:Ig.of(t),effects:[ca.of()]})},eC))}destroy(){this.debounceTimer!==void 0&&(window.clearTimeout(this.debounceTimer),this.debounceTimer=void 0)}})}function Wd(r){return[rC(r),nC(r)]}var mu=require("@codemirror/state"),Ii=require("@codemirror/view"),Zd=mu.StateEffect.define();function iC(r){return r.from>=r.to?Ii.Decoration.none:Ii.Decoration.set([Ii.Decoration.mark({attributes:{style:"background-color: var(--text-highlight-bg);"}}).range(r.from,r.to)])}var oC=mu.StateField.define({create(){return Ii.Decoration.none},update(r,e){let t=e.effects.find(n=>n.is(Zd));return t!==void 0?iC(t.value):e.docChanged||!e.startState.selection.eq(e.state.selection)?Ii.Decoration.none:r.map(e.changes)},provide:r=>Ii.EditorView.decorations.from(r)});function wg(){return oC}var Ag=require("obsidian");var Cg=require("obsidian");var sC=ve('<div class="icon-text svelte-1qeb5yo"><span class="icon svelte-1qeb5yo"></span> <span class="text svelte-1qeb5yo"> </span></div>');function ss(r,e){if(new.target)return at({component:ss,...r});Ke(e,!1);let t=re(e,"icon",12,""),n=re(e,"text",12,""),o=Ce();Jo(()=>{(0,Cg.setIcon)(A(o),t())});var a={get icon(){return t()},set icon(b){t(b),J()},get text(){return n()},set text(b){n(b),J()},$set:yt,$on:(b,I)=>vt(e,b,I)};Bt();var c=sC(),u=H(c);Ct(u,b=>z(o,b),()=>A(o));var f=Ie(u,2),p=H(f,!0);return X(f),X(c),$e(()=>Pe(p,n())),de(r,c),qe(a)}var aC=ve('<button class="reminder-toast-close svelte-1u4loek" aria-label="Close">\xD7</button>'),lC=ve("<option> </option>"),uC=ve('<div class="reminder-secondary-actions svelte-1u4loek"><button class="reminder-footer-action svelte-1u4loek" title="Pause all notifications for a chosen duration. Reminders are not muted: anything still overdue notifies you again after the pause ends.">Pause all notifications\u2026</button> <button class="reminder-footer-action svelte-1u4loek" title="Mute every currently overdue reminder. Muted reminders stay silent (even across restarts) until you snooze them or change their date.">Mute all reminders\u2026</button></div>'),cC=ve('<main tabindex="-1"><!> <h3 class="reminder-title svelte-1u4loek"><!></h3> <button class="reminder-file svelte-1u4loek" title="Alt+O / Ctrl+O" aria-keyshortcuts="Alt+O Control+O"><!></button> <div class="reminder-actions svelte-1u4loek"><button class="mod-cta svelte-1u4loek" title="Alt+D /
`)}},_u=class{unmarshal(e){return e.split(`
`).map(t=>t.trim()).filter(t=>t.length>0)}marshal(e){return e.join(`
`)}},Iu=class{unmarshal(e){let t=_o.find(n=>n.name===e);return t!==void 0?t:(console.warn(`Unknown reminder format: ${e}. Falling back to the default format.`),_o[0])}marshal(e){return e.name}};var yr="re-scan",wu=class{constructor(){h(this,"settings",new bu);h(this,"reminderTime");h(this,"reminderTimeStep");h(this,"enableNotification");h(this,"notificationPopupStyle");h(this,"openNoteOnReminderClick");h(this,"useSystemNotification");h(this,"showPopupWithSystemNotification");h(this,"focusDoneButtonOnPopup");h(this,"laters");h(this,"weekStart");h(this,"dateFormat");h(this,"dateTimeFormat");h(this,"strictDateFormat");h(this,"autoCompleteTrigger");h(this,"convertNonTaskLines");h(this,"editorReminderDisplay");h(this,"primaryFormat");h(this,"excludedPaths");h(this,"useCustomEmojiForTasksPlugin");h(this,"useReminderTimeFallbackForTasksPlugin");h(this,"removeTagsForTasksPlugin");h(this,"dataviewReminderFieldName");h(this,"linkDatesToDailyNotes");h(this,"yearMonthDisplayFormat");h(this,"monthDayDisplayFormat");h(this,"timeDisplayFormat");h(this,"shortDateWithWeekdayDisplayFormat");h(this,"editDetectionSec");h(this,"reminderCheckIntervalSec");h(this,"showOverdueCountInStatusBar");let e=new Kd(this.settings);this.reminderTime=this.settings.newSettingBuilder().key("reminderTime").name("Reminder time").desc("Time when a reminder with no time part will show").tag(yr).text("09:00").placeHolder("Time (hh:mm)").build(new vu),this.reminderTimeStep=this.settings.newSettingBuilder().key("reminderTimeStep").name("Reminder time step (minutes)").desc("Step of time for reminder time (minutes)").number(15).build(new Ae),this.enableNotification=this.settings.newSettingBuilder().key("enableNotification").name("Enable reminder notifications").desc("If disabled, reminder popups and system notifications are not shown. The reminder list view keeps working.").toggle(!0).build(new Ae),this.notificationPopupStyle=this.settings.newSettingBuilder().key("notificationPopupStyle").name("Reminder popup style").desc("Toast: a card in the corner of the window that does not interrupt your work. Modal: a dialog in the center of the window that takes focus.").dropdown("toast").addOption("Toast (corner card)","toast").addOption("Modal (center dialog)","modal").build(new Ae),this.openNoteOnReminderClick=this.settings.newSettingBuilder().key("openNoteOnReminderClick").name("Open note on reminder click").desc("When clicking a reminder in the reminder list or a system notification, open the note directly instead of showing the reminder popup.").toggle(!1).build(new Ae),this.useSystemNotification=this.settings.newSettingBuilder().key("useSystemNotification").name("Use system notification").desc("Use system notification for reminder notifications").toggle(!1).build(new Ae),this.showPopupWithSystemNotification=this.settings.newSettingBuilder().key("showPopupWithSystemNotification").name("Show popup together with system notification").desc("When using system notification, also show the built-in reminder popup at the same time. The popup handles the reminder actions; the system notification acts as an alert only.").toggle(!1).build(new Ae),this.focusDoneButtonOnPopup=this.settings.newSettingBuilder().key("focusDoneButtonOnPopup").name("Focus Done button on popup").desc("Automatically focus the Done button when a reminder popup opens, so pressing Enter completes the task. Off by default to prevent accidentally completing a reminder you haven't read.").toggle(!1).build(new Ae),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 yu);let t=this.settings.newSettingBuilder().key("weekStart").name("Week start").desc("Select the first day of the week").dropdown("0");Array.from({length:7},(a,c)=>{let u=(0,Sg.default)().day(c).format("dddd");t.addOption(u,c.toString())}),this.weekStart=t.build(new Ae),this.dateFormat=this.settings.newSettingBuilder().key("dateFormat").name("Date format").desc("moment style date format: https://momentjs.com/docs/#/displaying/format/").tag(yr).text("YYYY-MM-DD").placeHolder("YYYY-MM-DD").onAnyValueChanged(a=>{a.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ae),this.strictDateFormat=this.settings.newSettingBuilder().key("strictDateFormat").name("Strict date format").desc("Strictly parse the date and time").tag(yr).toggle(!1).onAnyValueChanged(a=>{a.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ae),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(yr).text("YYYY-MM-DD HH:mm").placeHolder("YYYY-MM-DD HH:mm").onAnyValueChanged(a=>{a.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ae),this.linkDatesToDailyNotes=this.settings.newSettingBuilder().key("linkDatesToDailyNotes").name("Link dates to daily notes").desc("When toggled, Dates link to daily notes.").tag(yr).toggle(!1).onAnyValueChanged(a=>{a.setEnabled(e.enableReminderPluginReminderFormat.value)}).build(new Ae),this.autoCompleteTrigger=this.settings.newSettingBuilder().key("autoCompleteTrigger").name("Calendar popup trigger").desc("Trigger text to show calendar popup").text("(@").placeHolder("(@").onAnyValueChanged(a=>{let c=this.autoCompleteTrigger.value;a.setInfo(`Popup is ${c.length===0?"disabled":"enabled"}`)}).build(new Ae),this.convertNonTaskLines=this.settings.newSettingBuilder().key("convertNonTaskLines").name("Convert non-task lines when inserting a reminder").desc('When inserting a reminder from the calendar popup on a line that is not a task, convert the line into a task list item ("- [ ] ") automatically. When disabled, a notice is shown instead.').toggle(!0).build(new Ae),this.editorReminderDisplay=this.settings.newSettingBuilder().key("editorReminderDisplay").name("Show reminder pills in editor").desc("Render each reminder's time as a clickable pill (\u23F0) in Live Preview. Clicking a pill opens the date/time chooser to change it. Disable to show the raw reminder text instead.").toggle(!0).build(new Ae);let n=this.settings.newSettingBuilder().key("primaryReminderFormat").name("Primary reminder format").desc("Reminder format for generated reminder by calendar popup").dropdown(_o[0].name);_o.forEach(a=>n.addOption(`${a.description} - ${a.example}`,a.name)),this.primaryFormat=n.build(new Iu),this.excludedPaths=this.settings.newSettingBuilder().key("excludedPaths").name("Excluded files/folders").desc("Reminders in these files/folders are ignored. One vault-relative path per line (e.g. Templates or Archive/2020).").tag(yr).textArea("").placeHolder(`Templates
Archive/2020`).build(new _u),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(yr).toggle(!1).onAnyValueChanged(a=>{a.setEnabled(e.enableTasksPluginReminderFormat.value)}).build(new Ae),this.useReminderTimeFallbackForTasksPlugin=this.settings.newSettingBuilder().key("useReminderTimeFallbackForTasksPlugin").name("Fall back to due, scheduled, or start date").desc("When the reminder date (\u23F0) is missing, use the due date (\u{1F4C5}), then the scheduled date (\u23F3), then the start date (\u{1F6EB}), in that order.").tag(yr).toggle(!1).onAnyValueChanged(a=>{a.setEnabled(e.enableTasksPluginReminderFormat.value&&this.useCustomEmojiForTasksPlugin.value)}).build(new Ae),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(yr).toggle(!1).onAnyValueChanged(a=>{a.setEnabled(e.enableTasksPluginReminderFormat.value)}).build(new Ae),this.dataviewReminderFieldName=this.settings.newSettingBuilder().key("dataviewReminderFieldName").name("Reminder field name").desc("The inline field (e.g. [reminder:: 2021-09-08]) read as the reminder date. On a line that also has a due field, this field takes precedence.").tag(yr).text("reminder").placeHolder("reminder").onAnyValueChanged(a=>{a.setEnabled(e.enableDataviewReminderFormat.value)}).build(new Ae),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 Ae),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 Ae),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 Ae),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 Ae),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. Only applies to the Modal popup style; Toast reminders are shown immediately even while typing.").number(10).build(new Ae),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 Ae),this.showOverdueCountInStatusBar=this.settings.newSettingBuilder().key("showOverdueCountInStatusBar").name("Show overdue count in status bar").desc("Show the number of overdue reminders in the status bar. Click it to open the reminder list.").toggle(!0).build(new Ae),this.settings.newPage("Notifications").newGroup().addSettings(this.reminderTime,this.reminderTimeStep,this.laters,this.enableNotification,this.notificationPopupStyle,this.openNoteOnReminderClick,this.useSystemNotification,this.showPopupWithSystemNotification,this.focusDoneButtonOnPopup,this.showOverdueCountInStatusBar),this.settings.newPage("Editor").newGroup().addSettings(this.autoCompleteTrigger,this.convertNonTaskLines,this.primaryFormat,this.editorReminderDisplay);let o=this.settings.newPage("Reminder formats");o.newGroup("Reminder plugin format").addSettings(e.enableReminderPluginReminderFormat,this.dateFormat,this.dateTimeFormat,this.strictDateFormat,this.linkDatesToDailyNotes),o.newGroup("Tasks plugin format").addSettings(e.enableTasksPluginReminderFormat,this.useCustomEmojiForTasksPlugin,this.useReminderTimeFallbackForTasksPlugin,this.removeTagsForTasksPlugin),o.newGroup("Dataview format").addSettings(e.enableDataviewReminderFormat,this.dataviewReminderFieldName),o.newGroup("Kanban plugin format").addSettings(e.enableKanbanPluginReminderFormat),this.settings.newPage("Display").newGroup().addSettings(this.yearMonthDisplayFormat,this.monthDayDisplayFormat,this.shortDateWithWeekdayDisplayFormat,this.timeDisplayFormat,this.weekStart),this.settings.newPage("Advanced").newGroup().addSettings(this.excludedPaths,this.editDetectionSec,this.reminderCheckIntervalSec)}wireReminderFormatConfig(){let e=new ws;e.setParameterFunc(Qe.now,()=>P.now()),e.setParameter(Qe.useCustomEmojiForTasksPlugin,this.useCustomEmojiForTasksPlugin),e.setParameter(Qe.linkDatesToDailyNotes,this.linkDatesToDailyNotes),e.setParameter(Qe.removeTagsForTasksPlugin,this.removeTagsForTasksPlugin),e.setParameter(Qe.useReminderTimeFallbackForTasksPlugin,this.useReminderTimeFallbackForTasksPlugin),e.setParameter(Qe.dataviewReminderFieldName,this.dataviewReminderFieldName),rp(e)}forEach(e){this.settings.forEach(e)}},Kd=class{constructor(e){h(this,"settings",e);h(this,"settingKeyToFormatName",new Map);h(this,"reminderFormatSettings",[]);h(this,"enableReminderPluginReminderFormat");h(this,"enableTasksPluginReminderFormat");h(this,"enableKanbanPluginReminderFormat");h(this,"enableDataviewReminderFormat");this.enableReminderPluginReminderFormat=this.createUseReminderFormatSetting(bc),this.enableTasksPluginReminderFormat=this.createUseReminderFormatSetting(vc),this.enableKanbanPluginReminderFormat=this.createUseReminderFormatSetting(yc),this.enableDataviewReminderFormat=this.createUseReminderFormatSetting(_c)}createUseReminderFormatSetting(e){let t=`enable${e.name}`,n=this.settings.newSettingBuilder().key(t).name(`Enable ${e.description}`).desc("Recognize reminders written in this format.").tag(yr).toggle(e.defaultEnabled).onAnyValueChanged(o=>{var a;o.setInfo(`Example: ${(a=e.format.appendReminder("- [ ] Task 1",P.now()))==null?void 0:a.insertedLine}`)}).build(new Ae);return this.settingKeyToFormatName.set(t,e),this.reminderFormatSettings.push(n),n.rawValue.onChanged(()=>{this.updateReminderFormat()}),n}updateReminderFormat(){let e=this.reminderFormatSet
/*! Bundled license information:
moment/moment.js:
(*! moment.js *)
(*! version : 2.30.1 *)
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
(*! license : MIT *)
(*! momentjs.com *)
*/
/* nosourcemap */