"use strict" ; / *
THIS IS A GENERATED / BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
* /
/ *
License obsidian - tasks :
MIT License
Copyright ( c ) 2021 Martin Schenck
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the "Software" ) , to deal
in the Software without restriction , including without limitation the rights
to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
copies of the Software , and to permit persons to whom the Software is
furnished to do so , subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE .
* /
/ *
License rrule ( included library ) :
rrule . js : Library for working with recurrence rules for calendar dates .
=== === === === === === === === === === === === === === === === === === === === === === === ==
Copyright 2010 , Jakub Roztocil < jakub @ roztocil . name > and Lars Schöning
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1. Redistributions of source code must retain the above copyright notice ,
this list of conditions and the following disclaimer .
2. Redistributions in binary form must reproduce the above copyright
notice , this list of conditions and the following disclaimer in the
documentation and / or other materials provided with the distribution .
3. Neither the name of The author nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission .
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR
ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
. / rrule . js and . / test / tests . js is based on python - dateutil . LICENCE :
python - dateutil - Extensions to the standard Python datetime module .
=== === === === === === === === === === === === === === === === === === === === === === ==
Copyright ( c ) 2003 - 2011 - Gustavo Niemeyer < gustavo @ niemeyer . net >
Copyright ( c ) 2012 - Tomi Pieviläinen < tomi . pievilainen @ iki . fi >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
* Redistributions of source code must retain the above copyright notice ,
this list of conditions and the following disclaimer .
* Redistributions in binary form must reproduce the above copyright notice ,
this list of conditions and the following disclaimer in the documentation
and / or other materials provided with the distribution .
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL ,
EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO ,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR
PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
* /
/ *
License chrono - node ( included library ) :
The MIT License
Copyright ( c ) 2014 , Wanasit Tanakitrungruang
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the "Software" ) , to deal
in the Software without restriction , including without limitation the rights
to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
copies of the Software , and to permit persons to whom the Software is
furnished to do so , subject to the following conditions :
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE .
* /
var p _ = Object . create ; var On = Object . defineProperty , h _ = Object . defineProperties , m _ = Object . getOwnPropertyDescriptor , y _ = Object . getOwnPropertyDescriptors , g _ = Object . getOwnPropertyNames , $d = Object . getOwnPropertySymbols , _ _ = Object . getPrototypeOf , Bd = Object . prototype . hasOwnProperty , T _ = Object . prototype . propertyIsEnumerable ; var jd = ( r , e , t ) => e in r ? On ( r , e , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : t } ) : r [ e ] = t , Ye = ( r , e ) => { for ( var t in e || ( e = { } ) ) Bd . call ( e , t ) && jd ( r , t , e [ t ] ) ; if ( $d ) for ( var t of $d ( e ) ) T _ . call ( e , t ) && jd ( r , t , e [ t ] ) ; return r } , It = ( r , e ) => h _ ( r , y _ ( e ) ) ; var p = ( r , e ) => ( ) => ( e || r ( ( e = { exports : { } } ) . exports , e ) , e . exports ) , b _ = ( r , e ) => { for ( var t in e ) On ( r , t , { get : e [ t ] , enumerable : ! 0 } ) } , Gd = ( r , e , t , n ) => { if ( e && typeof e == "object" || typeof e == "function" ) for ( let i of g _ ( e ) ) ! Bd . call ( r , i ) && i !== t && On ( r , i , { get : ( ) => e [ i ] , enumerable : ! ( n = m _ ( e , i ) ) || n . enumerable } ) ; return r } ; var as = ( r , e , t ) => ( t = r != null ? p _ ( _ _ ( r ) ) : { } , Gd ( e || ! r || ! r . _ _esModule ? On ( t , "default" , { value : r , enumerable : ! 0 } ) : t , r ) ) , v _ = r => Gd ( On ( { } , "__esModule" , { value : ! 0 } ) , r ) ; var ne = ( r , e , t ) => new Promise ( ( n , i ) => { var s = u => { try { o ( t . next ( u ) ) } catch ( l ) { i ( l ) } } , a = u => { try { o ( t . throw ( u ) ) } catch ( l ) { i ( l ) } } , o = u => u . done ? n ( u . value ) : Promise . resolve ( u . value ) . then ( s , a ) ; o ( ( t = t . apply ( r , e ) ) . next ( ) ) } ) ; var Tf = p ( ( pA , fs ) => { var Qd , Jd , ef , tf , rf , nf , sf , af , of , ds , Ha , uf , lf , Vr , cf , df , ff , pf , hf , mf , yf , gf , _f ; ( function ( r ) { var e = typeof global == "object" ? global : typeof self == "object" ? self : typeof this == "object" ? this : { } ; typeof define == "function" && define . amd ? define ( "tslib" , [ "exports" ] , function ( n ) { r ( t ( e , t ( n ) ) ) } ) : typeof fs == "object" && typeof fs . exports == "object" ? r ( t ( e , t ( fs . exports ) ) ) : r ( t ( e ) ) ; function t ( n , i ) { return n !== e && ( typeof Object . create == "function" ? Object . defineProperty ( n , "__esModule" , { value : ! 0 } ) : n . _ _esModule = ! 0 ) , function ( s , a ) { return n [ s ] = i ? i ( s , a ) : a } } } ) ( function ( r ) { var e = Object . setPrototypeOf || { _ _proto _ _ : [ ] } instanceof Array && function ( t , n ) { t . _ _proto _ _ = n } || function ( t , n ) { for ( var i in n ) n . hasOwnProperty ( i ) && ( t [ i ] = n [ i ] ) } ; Qd = function ( t , n ) { e ( t , n ) ; function i ( ) { this . constructor = t } t . prototype = n === null ? Object . create ( n ) : ( i . prototype = n . prototype , new i ) } , Jd = Object . assign || function ( t ) { for ( var n , i = 1 , s = arguments . length ; i < s ; i ++ ) { n = arguments [ i ] ; for ( var a in n ) Object . prototype . hasOwnProperty . call ( n , a ) && ( t [ a ] = n [ a ] ) } return t } , ef = function ( t , n ) { var i = { } ; for ( var s in t ) Object . prototype . hasOwnProperty . call ( t , s ) && n . indexOf ( s ) < 0 && ( i [ s ] = t [ s ] ) ; if ( t != null && typeof Object . getOwnPropertySymbols == "function" ) for ( var a = 0 , s = Object . getOwnPropertySymbols ( t ) ; a < s . length ; a ++ ) n . indexOf ( s [ a ] ) < 0 && Object . prototype . propertyIsEnumerable . call ( t , s [ a ] ) && ( i [ s [ a ] ] = t [ s [ a ] ] ) ; return i } , tf = function ( t , n , i , s ) { var a = arguments . length , o = a < 3 ? n : s === null ? s = Object . getOwnPropertyDescriptor ( n , i ) : s , u ; if ( typeof Reflect == "object" && typeof Reflect . decorate == "function" ) o = Reflect . decorate ( t , n , i , s ) ; else for ( var l = t . length - 1 ; l >= 0 ; l -- ) ( u = t [ l ] ) && ( o = ( a < 3 ? u ( o ) : a > 3 ? u ( n , i , o ) : u ( n , i ) ) || o ) ; return a > 3 && o && Object . defineProperty ( n , i , o ) , o } , rf = function ( t , n ) { return function ( i , s ) { n ( i , s , t ) } } , nf = function ( t , n ) { if ( typeof Reflect == "object" && typeof Reflect . metadata == "function" ) return Reflect . metadata ( t , n ) } , sf = function ( t , n , i , s ) { function a ( o ) { return o instanceof i ? o : new i ( function ( u ) { u ( o ) } ) } return new ( i || ( i = Promise ) ) ( function ( o , u ) { function l ( f ) { try { d ( s . next ( f ) ) } catch ( h ) { u ( h ) } } function c ( f ) { try { d ( s . throw ( f ) ) } catch ( h ) { u ( h ) } } function d ( f ) { f . done ? o ( f . value ) : a ( f . value ) . then ( l , c ) } d ( ( s = s . apply ( t , n || [ ] ) ) . next ( ) ) } ) } , af = function ( t , n ) { var i = { label : 0 , sent : function ( ) { if ( o [ 0 ] & 1 ) throw o [ 1 ] ; return o [ 1 ] } , trys : [ ] , ops : [ ] } , s , a , o , u ; return u = { next : l ( 0 ) , throw : l ( 1 ) , return : l ( 2 ) } , typeof Symbol == "function" && ( u [ Symbol . iterator ] = function ( ) { return this } ) , u ; function l ( d ) { return function ( f ) { return c ( [ d , f ] ) } } function c ( d ) { if ( s ) throw new TypeError ( "Generator is already executing." ) ; for ( ; i ; ) try { if ( s = 1 , a && ( o = d [ 0 ] & 2 ? a . return : d [ 0 ] ? a . throw || ( ( o = a . return ) && o . call ( a ) , 0 ) : a . next ) && ! ( o = o . call ( a , d [ 1 ] ) ) . done ) return o ; switch ( a = 0 , o && ( d = [ d [ 0 ] & 2 , o . value ] ) , d [ 0 ] ) { case 0 : case 1 : o = d ; break ; case 4 : return i . label ++ , { value : d [ 1 ] , done : ! 1 } ; case 5 : i . label ++ , a = d [ 1 ] , d = [ 0 ] ; continue ; case 7 : d = i . ops . pop ( ) , i . trys . pop ( ) ; continue ; default : if ( o = i . trys , ! ( o = o . length > 0 && o [ o . length - 1 ] ) && ( d [ 0 ] === 6 || d [ 0 ] === 2 ) ) { i = 0 ; continue } if ( d [ 0 ] === 3 && ( !
` ),{globalFilter:f}=ie(),h,m=0;for(let g of l){if(g.position.start.line<r.sectionStart||g.task===void 0)continue;if(d[g.position.start.line].includes(f)){if(m===r.sectionIndex){h=g;break}m++}}if(h===void 0){console.error("Tasks: could not find task to toggle in the file.");return}let y=[...d.slice(0,h.position.start.line),...e.map(g=>g.toFileLineString()),...d.slice(h.position.start.line+1)];yield t.modify(o,y.join( `
` ))});var Kr=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.shortMode=!1}};var ls=["MO","TU","WE","TH","FR","SA","SU"],he=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(ls.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=ls[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var se=function(r){return r!=null},Ke=function(r){return typeof r=="number"},Ga=function(r){return ls.indexOf(r)>=0},Ne=Array.isArray,et=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n<e;n++)t.push(n);return t};var j=function(r,e){var t=0,n=[];if(Ne(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},Zd=function(r){return Ne(r)?r:[r]};function Mr(r,e,t){t===void 0&&(t=" ");var n=String(r);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=j(t,e/t.length)),t.slice(0,e)+String(n))}var Xd=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Ue=function(r,e){var t=r%e;return t*e<0?t+e:t},cs=function(r,e){return{div:Math.floor(r/e),mod:Ue(r,e)}},Ve=function(r){return!se(r)||r.length===0},pe=function(r){return!Ve(r)},B=function(r,e){return pe(r)&&r.indexOf(e)!==-1};var ur;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),i=t.getTime()-r.tzOffset(t),s=n-i;return Math.round(s/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;n<e.length;n++)t.push(r.clone(e[n]));return t},r.sort=function(e){e.sort(function(t,n){return t.getTime()-n.getTime()})},r.timeToUntilString=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[Mr(n.getUTCFullYear().toString(),4,"0"),Mr(n.getUTCMonth()+1,2,"0"),Mr(n.getUTCDate(),2,"0"),"T",Mr(n.getUTCHours(),2,"0"),Mr(n.getUTCMinutes(),2,"0"),Mr(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},r.untilStringToDate=function(e){var t=/^( \d {4})( \d {2})( \d {2})(T( \d {2})( \d {2})( \d {2})Z?)? $ /,n=t.exec(e);if(!n)throw new Error("Invalid UNTIL value: "+e);return new Date(Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[5],10)||0,parseInt(n[6],10)||0,parseInt(n[7],10)||0))}})(ur||(ur={}));var A=ur;var D_=function(){function r(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e==="between"?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e===
` ).map(C_).filter(function(t){return t!==null});return $ e( $ e({},e[0]),e[1])}function Cn(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^; \s ]+)/i.exec(r);if(!t)return e;var n=t[0],i=t[1],s=t[2];return i&&(e.tzid=i),e.dtstart=A.untilStringToDate(s),e}function C_(r){if(r=r.replace(/^ \s +| \s + $ /,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return Af(r);var t=e[0],n=e[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return Af(r);case"DTSTART":return Cn(r);default:throw new Error("Unsupported RFC prop "+n+" in "+r)}}function Af(r){var e=r.replace(/^RRULE:/i,""),t=Cn(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=F[o.toUpperCase()];break;case"WKST":t.wkst=tt[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=S_(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=x_(o);break;case"DTSTART":case"TZID":var c=Cn(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=A.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function S_(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(kf)}return kf(r)}function kf(r){return/^[+-]? \d + $ /.test(r)?Number(r):r}function x_(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return tt[t];var n=t.match(/^([+-]? \d {1,2})([A-Z]{2}) $ /),i=Number(n[1]),s=n[2],a=tt[s].weekday;return new he(a,i)})}var Ar=function(){function r(e,t){this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!0,configurable:!0}),r.prototype.toString=function(){var e=A.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":"+e:";TZID="+this.tzid+":"+e},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),i=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid,e!=null?e:"UTC")})),s=i.getTime()-n.getTime();return new Date(this.date.getTime()-s)},r}();function xn(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(Nn),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!B(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!se(o)||Ne(o)&&!o.length)){switch(a){case"FREQ":u=R.FREQUENCIES[r.freq];break;case"WKST":Ke(o)?u=new he(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=Zd(o).map(function(h){return h instanceof he?h:Ne(h)?new he(h[0],h[1]):new he(h)}).toString();break;case"DTSTART":t=I_(o,r.tzid);break;case"UNTIL":u=A.timeToUntilString(o,!r.tzid);break;default:if(Ne(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var d=e.map(function(h){var m=h[0],y=h[1];return m+"="+y.toString()}).join(";"),f="";return d!==""&&(f="RRULE:"+d),[t,f].filter(function(h){return!!h}).join( `
` )}function I_(r,e){return r?"DTSTART"+new Ar(new Date(r),e).toString():""}function U_(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 Nf=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?A.clone(t):A.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,i=t?Object.keys(t):[],s=function(c){for(var d=0;d<i.length;d++){var f=i[d];if(!U_(t[f],c[f]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(Ne(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(i.length&&s(u))){n=u._value;break}}if(!n&&this.all){for(var l=new qt(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return Ne(n)?A.cloneDates(n):n instanceof Date?A.clone(n):n},r}();var Cf=Pr(j(1,31),j(2,28),j(3,31),j(4,30),j(5,31),j(6,30),j(7,31),j(8,31),j(9,30),j(10,31),j(11,30),j(12,31),j(1,7)),Sf=Pr(j(1,31),j(2,29),j(3,31),j(4,30),j(5,31),j(6,30),j(7,31),j(8,31),j(9,30),j(10,31),j(11,30),j(12,31),j(1,7)),q_=et(1,29),F_=et(1,30),lr=et(1,31),qe=et(1,32),xf=Pr(qe,F_,qe,lr,qe,lr,qe,qe,lr,qe,lr,qe,qe.slice(0,7)),If=Pr(qe,q_,qe,lr,qe,lr,qe,qe,lr,qe,lr,qe,qe.slice(0,7)),W_=et(-28,0),L_=et(-29,0),cr=et(-30,0),Fe=et(-31,0),Uf=Pr(Fe,L_,Fe,cr,Fe,cr,Fe,Fe,cr,Fe,cr,Fe,Fe.slice(0,7)),qf=Pr(Fe,W_,Fe,cr,Fe,cr,Fe,Fe,cr,Fe,cr,Fe,Fe.slice(0,7)),Ff=[0,31,60,91,121,152,182,213,244,274,305,335,366],Wf=[0,31,59,90,120,151,181,212,243,273,304,334,365],Va=function(){for(var r=[],e=0;e<55;e++)r=r.concat(et(7));return r}();function Lf(r,e){var t=new Date(Date.UTC(r,0,1)),n=A.isLeapYear(r)?366:365,i=A.isLeapYear(r+1)?366:365,s=A.toOrdinal(t),a=A.getWeekday(t),o= $ e( $ e({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},Y_(r)),{wnomask:null});if(Ve(e.byweekno))return o;o.wnomask=j(0,n+7);var u,l,c=u=Ue(7-a+e.wkst,7);c>=4?(c=0,l=o.yearlen+Ue(a-e.wkst,7)):l=n-c;for(var d=Math.floor(l/7),f=Ue(l,7),h=Math.floor(d+f/4),m=0;m<e.byweekno.length;m++){var y=e.byweekno[m];if(y<0&&(y+=h+1),y>0&&y<=h){var g=void 0;y>1?(g=c+(y-1)*7,c!==u&&(g-=7-u)):g=c;for(var O=0;O<7&&(o.wnomask[g]=1,g++,o.wdaymask[g]!==e.wkst);O++);}}if(B(e.byweekno,1)){var g=c+h*7;if(c!==u&&(g-=7-u),g<n)for(var m=0;m<7&&(o.wnomask[g]=1,g+=1,o.wdaymask[g]!==e.wkst);m++);}if(c){var S=void 0;if(B(e.byweekno,-1))S=-1;else{var N=A.getWeekday(new Date(Date.UTC(r-1,0,1))),z=Ue(7-N.valueOf()+e.wkst,7),te=A.isLeapYear(r-1)?366:365,le=void 0;z>=4?(z=0,le=te+Ue(N-e.wkst,7)):le=n-c,S=Math.floor(52+Ue(le,7)/4)}if(B(e.byweekno,S))for(var g=0;g<c;g++)o.wnomask[g]=1}return o}function Y_(r){var e=A.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=A.getWeekday(t);return e===365?{mmask:Cf,mdaymask:If,nmdaymask:qf,wdaymask:Va.slice(n),mrange:Wf}:{mmask:Sf,mdaymask:xf,nmdaymask:Uf,wdaymask:Va.slice(n),mrange:Ff}}function Yf(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===R.YEARLY)if(Ve(s.bymonth))o=[[0,t]];else for(var u=0;u<s.bymonth.length;u++)e=s.bymonth[u],o.push(n.slice(e-1,e+1));else s.freq===R.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(Ve(o))return a;a.nwdaymask=j(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],d=l[1]-1,f=0;f<s.bynweekday.length;f++){var h=void 0,m=s.bynweekday[f],y=m[0],g=m[1];g<0?(h=d+(g+1)*7,h-=Ue(i[h]-y,7)):(h=c+(g-1)*7,h+=Ue(7-i[h]+y,7)),c<=h&&h<=d&&(a.nwdaymask[h]=1)}return a}function $ f(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),i=r%100,s=Math.floor(n/4),a=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),l=Math.floor(19*t+n-s-u+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-l-d)%7,h=Math.floor((t+11*l+22*f)/451),m=Math.floor((l+f-7*h+114)/31),y=(l+f-7*h+114)%31+1,g=Date.UTC(r,m-1,y+e),O=Date.UTC(r,0,1);return[Math.ceil((g-O)/(1e3*60*60*24))]}var $ _=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=Lf(e,n)),pe(n.bynweekday)&&(t!==this.lastmonth
` ),n=0;n<t.length;){var i=t[n]=t[n].replace(/ \s + $ /g,"");i?n>0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function Q_(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Kf(r,e){return Q_(e),r.split(",").map(function(t){return A.untilStringToDate(t)})}function Vf(r){var e=this;return function(t){if(t!==void 0&&(e["_"+r]=t),e["_"+r]!==void 0)return e["_"+r];for(var n=0;n<e._rrule.length;n++){var i=e._rrule[n].origOptions[r];if(i)return i}}}var Xa=function(r){Zr(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Vf.apply(n,["dtstart"]),n.tzid=Vf.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return Hf(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Zf(t,this._rrule)},e.prototype.exrule=function(t){Zf(t,this._exrule)},e.prototype.rdate=function(t){Xf(t,this._rdate)},e.prototype.exdate=function(t){Xf(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return hs(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return hs(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(xn({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(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&t.push(Qf("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(Qf("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}(R);function Zf(r,e){if(!(r instanceof R))throw new TypeError(String(r)+" is not RRule instance");B(e.map(String),String(r))||e.push(r)}function Xf(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");B(e.map(Number),Number(r))||(e.push(r),A.sort(e))}function Qf(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?r+":":r+";TZID="+t+":",s=e.map(function(a){return A.timeToUntilString(a.valueOf(),n)}).join(",");return""+i+s}var G=class{static by(e,t){let n=[G.compareByUrgency,G.compareByStatus,G.compareByDueDate,G.compareByPriority,G.compareByPath],i=[];for(let{property:s,reverse:a,propertyInstance:o}of e.sorting){let u=G.comparators[s];i.push(a?G.makeReversedComparator(u):u),s==="tag"&&(G.tagPropertyInstance=o)}return t.sort(G.makeCompositeComparator([...i,...n]))}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}static compareByUrgency(e,t){return t.urgency-e.urgency}static compareByStatus(e,t){return e.status<t.status?1:e.status>t.status?-1:0}static compareByPriority(e,t){return e.priority.localeCompare(t.priority)}static compareByStartDate(e,t){return G.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return G.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return G.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return G.compareByDate(e.doneDate,t.doneDate)}static compareByTag(e,t){if(e.tags.length===0&&t.tags.length===0)return 0;if(e.tags.length===0)return 1;if(t.tags.length===0)return-1;let n=G.tagPropertyInstance-1;return e.tags.length<G.tagPropertyInstance&&t.tags.length>=G.tagPropertyInstance?1:t.tags.length<G.tagPropertyInstance&&e.tags.length>=G.tagPropertyInstance?-1:e.tags.length<G.tagPropertyInstance&&t.tags.length<G.tagPropertyInstance?0:e.tags[n]<t.tags[n]?-1:e.tags[n]>t.tags[n]?1:0}static compareByDate(e,t){return e!==null&&t===null?-1:e===null&&t!==null?1:e!==null&&t!==null?e.isAfter(t)?1:e.isBefore(t)?-1:0:0}static compareByPath(e,t){return e.path<t.path?-1:e.path>t.path?1:0}static compareByDescription(e,t){return G.cleanDescription(e.description).localeCompare(G.cleanDescription(t.description))}static cleanDescription(e){let t=ie().globalFilter;e=e.replace(t,"").trim();let n=/^ \[ \[ ?([^ \] ]*) \] /,i=e.match(n);if(i!==null){let l=i[1];e=l.substring(l.indexOf("|")+1)+e.replace(n,"")}let s=/^ \* \* ?([^*]*) \* /,a=e.match(s);a!==null&&(e=a[1]+e.replace(n,""));let o=/^==?([^=]*)==/,u=e.match(o);return u!==null&&(e=u[1]+e.replace(o,"")),e}},Be=G;Be.tagPropertyInstance=1,Be.comparators={urgency:G.compareByUrgency,description:G.compareByDescription,priority:G.compareByPriority,start:G.compareByStartDate,scheduled:G.compareByScheduledDate,due:G.compareByDueDate,done:G.compareByDoneDate,path:G.compareByPath,status:G.compareByStatus,tag:G.compareByTag};var dt=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)? $ /i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=R.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new R(u);return new dt({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}n
` ),o=null,u=0;for(let l of t)if(l.task!==void 0){if((o===null||o.position.end.line<l.position.start.line)&&(o=dr.getSection({lineNumberTask:l.position.start.line,sections:n.sections}),u=0),o===null)continue;let c=a[l.position.start.line],d=W.fromLine({line:c,path:i.path,sectionStart:o.position.start.line,sectionIndex:u,precedingHeader:dr.getPrecedingHeader({lineNumberTask:l.position.start.line,sections:n.sections,fileLines:a})});d!==null&&(u++,s.push(d))}return s}static getSection({lineNumberTask:e,sections:t}){if(t===void 0)return null;for(let n of t)if(n.type==="list"&&n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader({lineNumberTask:e,sections:t,fileLines:n}){if(t===void 0)return null;let i;for(let l of t)if(l.type==="heading"){if(l.position.start.line>e)break;i=l}if(i===void 0)return null;let s=i.position.start.line,a=n[s],o=/^#+ +(.*)/u,u=a.match(o);return u===null?null:u[1]}};var Qc=require("obsidian");var Bg=require("obsidian");function Jr(){}function to(r){return r()}function tp(){return Object.create(null)}function Nr(r){r.forEach(to)}function np(r){return typeof r=="function"}function ip(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function sp(r){return Object.keys(r).length===0}var ap=!1;function J_(){ap=!0}function eT(){ap=!1}function T(r,e){r.appendChild(e)}function ro(r,e,t){r.insertBefore(e,t||null)}function bs(r){r.parentNode.removeChild(r)}function C(r){return document.createElement(r)}function tT(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Yt(r){return document.createTextNode(r)}function Z(){return Yt(" ")}function fr(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function op(r){return function(e){return e.preventDefault(),r.call(this,e)}}function L(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function rT(r){return Array.from(r.childNodes)}function up(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function ft(r,e){r.value=e==null?"":e}function no(r,e){for(let t=0;t<r.options.length;t+=1){let n=r.options[t];if(n.__value===e){n.selected=!0;return}}r.selectedIndex=-1}function lp(r){let e=r.querySelector(":checked")||r.options[0];return e&&e.__value}var kr=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=tT(t.nodeName):this.e=C(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)ro(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(bs)}};var qn;function Un(r){qn=r}function nT(){if(!qn)throw new Error("Function called outside component initialization");return qn}function io(r){nT(). $ $ .on_mount.push(r)}var In=[];var _s=[],gs=[],rp=[],iT=Promise.resolve(),eo=!1;function sT(){eo||(eo=!0,iT.then(cp))}function Fn(r){gs.push(r)}var Ja=new Set,ys=0;function cp(){let r=qn;do{for(;ys<In.length;){let e=In[ys];ys++,Un(e),aT(e. $ $ )}for(Un(null),In.length=0,ys=0;_s.length;)_s.pop()();for(let e=0;e<gs.length;e+=1){let t=gs[e];Ja.has(t)||(Ja.add(t),t())}gs.length=0}while(In.length);for(;rp.length;)rp.pop()();eo=!1,Ja.clear(),Un(r)}function aT(r){if(r.fragment!==null){r.update(),Nr(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Fn)}}var oT=new Set;function uT(r,e){r&&r.i&&(oT.delete(r),r.i(e))}var dC=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function lT(r,e,t,n){let{fragment:i,on_mount:s,on_destroy:a,after_update:o}=r. $ $ ;i&&i.m(e,t),n||Fn(()=>{let u=s.map(to).filter(np);a?a.push(...u):Nr(u),r. $ $ .on_mount=[]}),o.forEach(Fn)}function dp(r,e){let t=r. $ $ ;t.fragment!==null&&(Nr(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function cT(r,e){r. $ $ .dirty[0]===-1&&(In.push(r),sT(),r. $ $ .dirty.fill(0)),r. $ $ .dirty[e/31|0]|=1<<e%31}function fp(r,e,t,n,i,s,a,o=[-1]){let u=qn;Un(r);let l=r. $ $ ={fragment:null,ctx:null,props:s,update:Jr,not_equal:i,bound:tp(),on_mo
` ),Dr=C("input"),xd=Z(),qa=C("code"),Fa=Yt(rs),Id=Z(),ns=C("div"),Ud=Yt( ` Done on :
` ),is=C("code"),qd=Z(),Fd=C("hr"),Wd=Z(),Wa=C("div"),Ld=Z(),ss=C("div"),ss.innerHTML='<button type="submit" class="mod-cta">Apply</button>',L(i,"for","description"),L(a,"id","description"),L(a,"type","text"),L(a,"class","tasks-modal-description"),L(a,"placeholder","Take out the trash"),L(n,"class","tasks-modal-section"),L(d,"for","priority"),m.__value="none",m.value=m.__value,y.__value="high",y.value=y.__value,g.__value="medium",g.value=g.__value,O.__value="low",O.value=O.__value,L(h,"id","priority"),L(h,"class","dropdown"),r[0].priority===void 0&&Fn(()=>r[14].call(h)),L(c,"class","tasks-modal-section"),L(le,"for","recurrence"),L(w,"id","description"),L(w,"type","text"),L(w,"placeholder","Try 'every 2 weeks on Thursday'."),_.a=null,L(te,"class","tasks-modal-section"),L(J,"for","due"),L(re,"id","due"),L(re,"type","text"),L(re,"placeholder",Vc),ct.a=null,L(Y,"class","tasks-modal-date"),L(ar,"for","scheduled"),L(St,"id","scheduled"),L(St,"type","text"),L(St,"placeholder",Vc),Qi.a=null,L(ke,"class","tasks-modal-date"),L(Ji,"for","start"),L(xt,"id","start"),L(xt,"type","text"),L(xt,"placeholder",Vc),es.a=null,L(or,"class","tasks-modal-date"),L(P,"class","tasks-modal-section"),L(Dr,"type","checkbox"),L(Dr,"class","task-list-item-checkbox tasks-modal-checkbox"),Dr.checked=ts=r[0].status==="Done",Dr.disabled=!0,L(Hr,"class","tasks-modal-section"),L(Wa,"class","tasks-modal-section"),L(ss,"class","tasks-modal-section"),L(e,"class","tasks-modal")},m(ce,Le){ro(ce,e,Le),T(e,t),T(t,n),T(n,i),T(n,s),T(n,a),ft(a,r[0].description),r[13](a),T(t,o),T(t,u),T(t,l),T(t,c),T(c,d),T(c,f),T(c,h),T(h,m),T(h,y),T(h,g),T(h,O),no(h,r[0].priority),T(t,S),T(t,N),T(t,z),T(t,te),T(te,le),T(te,x),T(te,w),ft(w,r[0].recurrenceRule),T(te,Ie),T(te,Oe),T(Oe,D),T(Oe,v),_.m(r[5],Oe),T(t,M),T(t,b),T(t,k),T(t,P),T(P,Y),T(Y,J),T(Y,ae),T(Y,re),ft(re,r[0].dueDate),T(Y,lt),T(Y,We),T(We,ir),T(We,sr),ct.m(r[4],We),T(P,Ae),T(P,ke),T(ke,ar),T(ke,wr),T(ke,St),ft(St,r[0].scheduledDate),T(ke,Ed),T(ke,Mn),T(Mn,Rd),T(Mn,wd),Qi.m(r[3],Mn),T(P,Dd),T(P,or),T(or,Ji),T(or,Md),T(or,xt),ft(xt,r[0].startDate),T(or,Pd),T(or,Pn),T(Pn,Od),T(Pn,Ad),es.m(r[2],Pn),T(t,kd),T(t,Nd),T(t,Cd),T(t,Hr),T(Hr,zr),T(zr,Sd),T(zr,Dr),T(zr,xd),T(zr,qa),T(qa,Fa),T(Hr,Id),T(Hr,ns),T(ns,Ud),T(ns,is),is.innerHTML=r[6],T(t,qd),T(t,Fd),T(t,Wd),T(t,Wa),T(t,Ld),T(t,ss),La||(Yd=[fr(a,"input",r[12]),fr(h,"change",r[14]),fr(w,"input",r[15]),fr(re,"input",r[16]),fr(St,"input",r[17]),fr(xt,"input",r[18]),fr(t,"submit",op(r[7]))],La=!0)},p(ce,[Le]){Le&1&&a.value!==ce[0].description&&ft(a,ce[0].description),Le&1&&no(h,ce[0].priority),Le&1&&w.value!==ce[0].recurrenceRule&&ft(w,ce[0].recurrenceRule),Le&32&&_.p(ce[5]),Le&1&&re.value!==ce[0].dueDate&&ft(re,ce[0].dueDate),Le&16&&ct.p(ce[4]),Le&1&&St.value!==ce[0].scheduledDate&&ft(St,ce[0].scheduledDate),Le&8&&Qi.p(ce[3]),Le&1&&xt.value!==ce[0].startDate&&ft(xt,ce[0].startDate),Le&4&&es.p(ce[2]),Le&1&&ts!==(ts=ce[0].status==="Done")&&(Dr.checked=ts),Le&1&&rs!==(rs=ce[0].status+"")&&up(Fa,rs),Le&64&&(is.innerHTML=ce[6])},i:Jr,o:Jr,d(ce){ce&&bs(e),r[13](null),La=!1,Nr(Yd)}}}var Vc="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function NO(r,e,t){var n,i;let{task:s}=e,{onSubmit:a}=e,o,u={description:"",status:"Todo",priority:"none",recurrenceRule:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:""},l="",c="",d="",f="",h="";function m(x,w,Ie=void 0){if(!w)return ` < i > no $ { x } date < /i>`;let Oe=Wi.parseDate(w,Ie,{forwardDate:Ie!=null});return Oe!==null?window.moment(Oe).format("YYYY-MM-DD"):`<i>invalid ${x} date</i > ` }io(()=>{let x=s.getDescriptionWithoutGlobalFilter(),w="none";s.priority==="4"?w="low":s.priority==="2"?w="medium":s.priority==="1"&&(w="high"),t(0,u={description:x,status:s.status,priority:w,recurrenceRule:s.recurrence?s.recurrence.toText():"",startDate:s.startDate?s.startDate.format("YYYY-MM-DD"):"",scheduledDate:s.scheduledDate?s.scheduledDate.format("YYYY-MM-DD"):"",dueDate:s.dueDate?s.dueDate.format("YYYY-MM-DD"):"",doneDate:s.doneDate?s.doneDate.format("YYYY-MM-DD"):""}),setTimeout(()=>{o.focus()},10)});let y=()=>{let{global
` );e.setLine(a,h)};new _n({app:n,task:u,onSubmit:l}).open()},CO=({line:r,path:e})=>{var d;let t=W.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(t!==null)return t;let n=/^([ \s \t ]*)[-*]? *( \[ (.) \] )? *(.*)/u,i=r.match(n);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new W({status:"Todo",description:"",path:e,indentation:"",originalStatusCharacter:" ",priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[]});let s=i[1],a=(d=i[3])!=null?d:" ",o=a===" "?"Todo":"Done",u=i[4],l=r.match(W.blockLinkRegex),c=l!==null?l[0]:"";return c!==""&&(u=u.replace(W.blockLinkRegex,"")),new W({status:o,description:u,path:e,indentation:s,originalStatusCharacter:a,blockLink:c,priority:"3",startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[]})};var Jc=require("obsidian");var Hg=(r,e,t)=>{var u;if(r)return t instanceof Jc.MarkdownView;if(!(t instanceof Jc.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=SO({line:a,path:n});e.setLine(s,o),/[^ [ \] *-]/.test(o)&&e.setCursor({line:i.line,ch:i.ch+o.length-a.length})},SO=({line:r,path:e})=>{let t=r,n=W.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(n!==null)t=xO({task:n});else{let i=r.match(W.taskRegex);if(i!==null)t=IO({regexMatch:i});else{let s=/^([ \s \t ]*)([-*])/;s.test(r)?t=r.replace(s," $ 1 $ 2 [ ]"):t=r.replace(/^([ \s \t ]*)/," $ 1- ")}}return t},xO=({task:r})=>r.toggle().map(n=>n.toFileLineString()).join( `
` ),IO=({regexMatch:r})=>{let e=r[1],t=r[2].toLowerCase(),n=r[3];return ` $ { e } - [ $ { t === " " ? "x" : " " } ] $ { n } ` };var fa=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>Gg(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Hg})}};var pa=class{constructor({obsidianEents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var ha=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return ne(this,null,function*(){var c;let{globalFilter:n}=ie(),i=e.findAll(".task-list-item").filter(d=>{var m;let f=(m=d.textContent)==null?void 0:m.split( `
` );if(f===void 0)return!1;let h=null;for(let y=0;y<f.length;y=y+1)if(f[y]!==""){h=f[y];break}return h===null?!1:h.includes(n)});if(i.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split( `
` ),u=0,l=[];for(let d=a.lineStart;d<=a.lineEnd;d++){let f=o[d];if(f===void 0)continue;let h=W.fromLine({line:f,path:s,sectionStart:a.lineStart,sectionIndex:u,precedingHeader:null});h!==null&&(l.push(h),u++)}for(let d=0;d<i.length;d++){let f=l[d],h=i[d];if(f===void 0||h===void 0)continue;let m=(c=h.getAttr("data-line"))!=null?c:"0",y=Number.parseInt(m,10),g=yield f.toLi({parentUlElement:e,listIndex:y}),O=h.childNodes;for(let z=0;z<O.length;z=z+1){let te=O[z];te.nodeName.toLowerCase()==="div"?g.prepend(te):te.nodeName.toLowerCase()==="ul"&&g.append(te)}let S=h.querySelectorAll("[data-footnote-id]"),N=g.querySelectorAll("[data-footnote-id]");if(S.length===N.length)for(let z=0;z<S.length;z++)N[z].replaceWith(S[z]);h.replaceWith(g)}})}};var zg=require("@codemirror/view");var Kg=()=>zg.ViewPlugin.fromClass(ed),ed=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let{state:n}=this.view,i=this.view.posAtDOM(t),s=n.doc.lineAt(i),a=W.fromLine({line:s.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null});if(a===null)return!1;e.preventDefault();let u=a.toggle().map(d=>d.toFileLineString()).join(n.lineBreak),l=n.update({changes:{from:s.from,to:s.to,insert:u}});this.view.dispatch(l);let c=t.checked;return setTimeout(()=>{t.checked=c},1),!0}};var l_=require("obsidian");var ma=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var ya=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let i=0;i<n;i++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let i=e[n];if(i!=this.lastHeadingAtLevel[n]){t.push(new ma(n,i));for(let s=n;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return t}};var ga=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,i]of this.children)e.push(n),i.generateAllPaths(e).forEach((a,o)=>t.set(o,a)),e.pop();return t}};var _a=class extends Map{},Ta=class extends ga{},ba=class{constructor(e,t){this.groups=new _a;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new Ta(t),i=[n];for(let s of e){let a=[];for(let o of i)for(let u of o.values){let l=br.getGroupNamesForTask(s.property,u);for(let c of l){let d=o.children.get(c);d===void 0&&(d=new Ta([]),o.children.set(c,d),a.push(d)),d.values.push(u)}}i=a}return n}getSortedGroups(){return new _a([...this.groups.entries()].sort())}};var va=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+ `
` ;return e}toString(){let e= `
` ;e+= ` Group names : [ $ { this . groups } ]
` ;for(let t of this.groupHeadings)e+= ` $ { "#" . repeat ( 4 + t . nestingLevel ) } $ { t . name }
` ;return e+=this.tasksAsStringOfLines(),e}};var Ea=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new ba(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+= `
-- -
` ;return e+= `
$ { this . totalTasksCount ( ) } tasks
` ,e}addTasks(e){let t=new ya(e.groups);for(let[n,i]of e.groups){let s=t.getHeadingsForTaskGroup(n),a=new va(n,s,i);this.add(a)}}add(e){this._groups.push(e)}};var Vg=as(Te()),Xt=class{static parseDate(e,t=!1){return window.moment(Vg.parseDate(e,void 0,{forwardDate:t})).startOf("day")}};var ue=class{canCreateFilterForLine(e){return ue.lineMatchesFilter(this.filterRegexp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}};var _e=class{};var vr=class extends ue{canCreateFilterForLine(e){return e===vr.instructionForFieldPresence||e===vr.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let t=new _e;if(e===vr.instructionForFieldPresence){let i=new _e;return i.filter=s=>this.dates(s).some(a=>a!==null),i}if(e===vr.instructionForFieldAbsence){let i=new _e;return i.filter=s=>!this.dates(s).some(a=>a!==null),i}let n=ue.getMatch(this.filterRegexp(),e);if(n!==null){let i=Xt.parseDate(n[2]);i.isValid()?n[1]==="before"?t.filter=s=>this.dates(s).some(a=>a&&a.isBefore(i)):n[1]==="after"?t.filter=s=>this.dates(s).some(a=>a&&a.isAfter(i)):t.filter=s=>this.dates(s).some(a=>a&&a.isSame(i)):t.error="do not understand happens date"}else t.error="do not understand query filter (happens date)";return t}earliestDate(e){return new vr().dates(e).sort(Be.compareByDate)[0]}filterRegexp(){return vr.happensRegexp}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}fieldName(){return"happens"}},Qt=vr;Qt.happensRegexp=/^happens (before|after|on)? ?(.*)/,Qt.instructionForFieldPresence="has happens date",Qt.instructionForFieldAbsence="no happens date";var oe=class{static by(e,t){return new Ea(e,t)}static getGroupNamesForTask(e,t){let n=oe.groupers[e];return n(t)}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[ ` Priority $ { e . priority } : $ { t } ` ]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByStartDate(e){return[oe.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[oe.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[oe.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[oe.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new Qt().earliestDate(e);return[oe.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(oe.groupDateFormat)}static groupByPath(e){return[e.path.replace(".md","")]}static groupByFolder(e){let t=e.path,n=e.filename+".md",i=t.substring(0,t.lastIndexOf(n));return i===""?["/"]:[i]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:[t]}static groupByRoot(e){let t=e.path.replace(/ \\ /g,"/"),n=t.indexOf("/");return n==-1?["/"]:[t.substring(0,n+1)]}static groupByBacklink(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?["Unknown Location"]:[t]}static groupByStatus(e){return[e.status]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},br=oe;br.groupDateFormat="YYYY-MM-DD dddd",br.groupers={backlink:oe.groupByBacklink,done:oe.groupByDoneDate,due:oe.groupByDueDate,filename:oe.groupByFileName,folder:oe.groupByFolder,happens:oe.groupByHappensDate,heading:oe.groupByHeading,path:oe.groupByPath,priority:oe.groupByPriority,recurrence:oe.groupByRecurrence,recurring:oe.groupByRecurring,root:oe.groupByRoot,scheduled:oe.groupByScheduledDate,start:oe.groupByStartDate,status:oe.groupByStatus,tags:oe.groupByTags};var bt=class extends ue{createFilterOrErrorMessage(e){let t=new _e,n=ue.getMatch(this.filterRegexp(),e);return n!==null?n[1]==="includes"?t.filter=s=>bt.stringIncludesCaseInsensitive(this.value(s),n[2]):n[1]==="does not include"?t.filter=s=>!bt.stringIncludesCaseInsensitive(this.value(s),n[2]):t.erro
` ).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.sortByRegexp.test(t):this.parseSortBy({line:t});break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error= ` do not understand query : $ { t } ` }})}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(n=>{e=e.filter(n)});let t=Be.by(this,e).slice(0,this.limit);return br.by(this.grouping,t)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null)switch(t[1].trim().toLowerCase()){case"task count":this._layoutOptions.hideTaskCount=!0;break;case"backlink":this._layoutOptions.hideBacklinks=!0;break;case"priority":this._layoutOptions.hidePriority=!0;break;case"start date":this._layoutOptions.hideStartDate=!0;break;case"scheduled date":this._layoutOptions.hideScheduledDate=!0;break;case"due date":this._layoutOptions.hideDueDate=!0;break;case"done date":this._layoutOptions.hideDoneDate=!0;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=!0;break;case"edit button":this._layoutOptions.hideEditButton=!0;break;default:this._error="do not understand hide option"}}parseFilter(e){let t=Ca(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=e.match(this.sortByRegexp);t!==null?this._sorting.push({property:t[1],reverse:!!t[2],propertyInstance:isNaN(+t[3])?1:+t[3]}):this._error="do not understand query sorting"}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push({property:t[1]}):this._error="do not understand query grouping"}};var Sa=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return ne(this,null,function*(){n.addChild(new Dn({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},Dn=class extends l_.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=new wn({source:s}),this.queryType="tasks";break;default:this.query=new wn({source:s}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new wn({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return ne(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug( ` Render $ { this . queryType } called for a block in active file "${this.filePath}" , to select from $ { t . length } tasks : plugin state : $ { n } ` );let o=this.query.applyQueryToTasks(t);for(let l of o.groups){Dn.addGroupHeadings(s,l.groupHeadings);let{taskList:c}=yield this.createTasksList({tasks:l.tasks,content:s});s.appendChild(c)}let u=o.totalTasksCount();console.debug( ` $ { u } of $ { t . length } tasks displayed in a blo
` }),n=n.slice(0,t.autoSuggestMaxItems),n}function HO(r){if(Object.values(be).some(e=>e.length>0&&r.includes(e)))return!0}function zO(r,e){let t=[];return r.includes(Dt)||t.push({displayText: ` $ { Dt } due date ` ,appendText: ` $ { Dt } ` }),r.includes(Rt)||t.push({displayText: ` $ { Rt } start date ` ,appendText: ` $ { Rt } ` }),r.includes(wt)||t.push({displayText: ` $ { wt } scheduled date ` ,appendText: ` $ { wt } ` }),HO(r)||(t.push({displayText: ` $ { be . High } high priority ` ,appendText: ` $ { be . High } ` }),t.push({displayText: ` $ { be . Medium } medium priority ` ,appendText: ` $ { be . Medium } ` }),t.push({displayText: ` $ { be . Low } low priority ` ,appendText: ` $ { be . Low } ` })),r.includes(Et)||t.push({displayText: ` $ { Et } recurring ( repeat ) ` ,appendText: ` $ { Et } ` }),t}function KO(r,e,t){let n=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp( ` ( [ $ { GO } ] ) \ \ s * ( [ 0 - 9 a - zA - Z ] * ) ` ,"ug"),a=vd(r,s,e);if(a&&a.length>=2){let o=a[1],u=a[2];if(u.length<t.autoSuggestMinMatch)return[];let l=u&&u.length>1?Xt.parseDate(gn(u),!0):null;l&&l.isValid()&&i.push({displayText: ` $ { l . format ( W . dateFormat ) } ` ,appendText: ` $ { o } $ { l . format ( W . dateFormat ) } ` ,insertAt:a.index,insertSkip:a[0].length});let c=1,d=5,f=n.filter(h=>u&&u.length>=c&&h.toLowerCase().includes(u.toLowerCase())).slice(0,d);f.length===0&&(f=n.slice(0,d));for(let h of f){let y= ` $ { Xt . parseDate ( h , ! 0 ) . format ( W . dateFormat ) } ` ;i.push({suggestionType:"match",displayText: ` $ { h } ( $ { y } ) ` ,appendText: ` $ { o } $ { y } ` ,insertAt:a.index,insertSkip:a[0].length})}}return i}function VO(r,e,t){var o;let n=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],i=[],s=new RegExp( ` ( $ { Et } ) \ \ s * ( [ 0 - 9 a - zA - Z ] * ) ` ,"ug"),a=vd(r,s,e);if(a&&a.length>=2){let u=a[1],l=a[2];if(l.length<t.autoSuggestMinMatch)return[];if(l.length>0){let h=(o=dt.fromText({recurrenceRuleText:l,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:o.toText();if(h){let m= ` $ { u } $ { h } ` ;if(i.push({suggestionType:"match",displayText: ` \u2705 $ { h } ` ,appendText:m,insertAt:a.index,insertSkip:a[0].length}),a[0]==m)return[]}}let c=1,d=t.autoSuggestMaxItems/2,f=n.filter(h=>l&&l.length>=c&&h.toLowerCase().includes(l.toLowerCase())).slice(0,d);f.length===0&&l.trim().length===0&&(f=n.slice(0,d));for(let h of f)i.push({suggestionType:"match",displayText: ` $ { h } ` ,appendText: ` $ { u } $ { h } ` ,insertAt:a.index,insertSkip:a[0].length})}return i}function vd(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i;return[]}var Ia=class extends d_.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return s.contains(this.settings.globalFilter)&&s.match(W.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){let n=t.query,i=t.editor.getCursor(),s=c_(n,i.ch,this.settings),a=[];for(let o of s)a.push(It(Ye({},o),{context:t}));return a}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(d);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var Ua=class extends f_.Plugin{onload(){return ne(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new xa({plugin:this})),Kd({metadataCache:this.app.metadataCache,vault:this.app.vault});let t=new pa({obsidianEents:this.app.workspace});this.cache=new dr({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlin
/ * !
* rrule . js - Library for working with recurrence rules for calendar dates .
* https : //github.com/jakubroztocil/rrule
*
* Copyright 2010 , Jakub Roztocil and Lars Schoning
* Licenced under the BSD licence .
* https : //github.com/jakubroztocil/rrule/blob/master/LICENCE
*
* Based on :
* python - dateutil - Extensions to the standard Python datetime module .
* Copyright ( c ) 2003 - 2011 - Gustavo Niemeyer < gustavo @ niemeyer . net >
* Copyright ( c ) 2012 - Tomi Pieviläinen < tomi . pievilainen @ iki . fi >
* https : //github.com/jakubroztocil/rrule/blob/master/LICENCE
*
* /
/ * !
* rrule . js - Library for working with recurrence rules for calendar dates .
* https : //github.com/jakubroztocil/rrule
*
* Copyright 2010 , Jakub Roztocil and Lars Schoning
* Licenced under the BSD licence .
* https : //github.com/jakubroztocil/rrule/blob/master/LICENCE
*
* /
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright ( c ) Microsoft Corporation .
Permission to use , copy , modify , and / or distribute this software for any
purpose with or without fee is hereby granted .
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS . IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL , DIRECT ,
INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE , DATA OR PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR
OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /