You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
282 KiB

3 years ago
/*
3 years ago
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3 years ago
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.
*/
3 years ago
var ay=Object.create;var yn=Object.defineProperty,oy=Object.defineProperties,uy=Object.getOwnPropertyDescriptor,ly=Object.getOwnPropertyDescriptors,cy=Object.getOwnPropertyNames,Zu=Object.getOwnPropertySymbols,dy=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable;var Ju=(n,e,t)=>e in n?yn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e)=>{for(var t in e||(e={}))Ku.call(e,t)&&Ju(n,t,e[t]);if(Zu)for(var t of Zu(e))fy.call(e,t)&&Ju(n,t,e[t]);return n},cr=(n,e)=>oy(n,ly(e)),Qu=n=>yn(n,"__esModule",{value:!0});var g=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),hy=(n,e)=>{Qu(n);for(var t in e)yn(n,t,{get:e[t],enumerable:!0})},my=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cy(e))!Ku.call(n,r)&&r!=="default"&&yn(n,r,{get:()=>e[r],enumerable:!(t=uy(e,r))||t.enumerable});return n},$e=n=>my(Qu(yn(n!=null?ay(dy(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var ae=(n,e,t)=>new Promise((r,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?r(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(n,e)).next())});var Ml=g((zE,Si)=>{var al,ol,ul,ll,cl,dl,fl,hl,ml,Pi,Bs,pl,yl,Ir,gl,vl,Tl,_l,bl,wl,Dl,El,kl;(function(n){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){n(t(e,t(r)))}):typeof Si=="object"&&typeof Si.exports=="object"?n(t(e,t(Si.exports))):n(t(e));function t(r,i){return r!==e&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(s,a){return r[s]=i?i(s,a):a}}})(function(n){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])};al=function(t,r){e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)},ol=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ul=function(t,r){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&r.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++)r.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(i[s[a]]=t[s[a]]);return i},ll=function(t,r,i,s){var a=arguments.length,o=a<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,r,i,s);else for(var l=t.length-1;l>=0;l--)(u=t[l])&&(o=(a<3?u(o):a>3?u(r,i,o):u(r,i))||o);return a>3&&o&&Object.defineProperty(r,i,o),o},cl=function(t,r){return function(i,s){r(i,s,t)}},dl=function(t,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,r)},fl=function(t,r,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{c(s.next(f))}catch(h){u(h)}}function d(f){try{c(s.throw(f))}catch(h){u(h)}}function c(f){f.done?o(f.value):a(f.value).then(l,d)}c((s=s.apply(t,r||[])).next())})},hl=function(t,r){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(c){return function(f){return d([c,f])}}function d(c){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,a=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(o=i.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return e=n[Symbol.iterator](),e.next.bind(e)}var mr=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}return e}(Vs(Error)),Ay=function(n){it(e,n);function e(t){return n.call(this,"Invalid DateTime: "+t.toMessage())||this}return e}(mr),Ny=function(n){it(e,n);function e(t){return n.call(this,"Invalid Interval: "+t.toMessage())||this}return e}(mr),Cy=function(n){it(e,n);function e(t){return n.call(this,"Invalid Duration: "+t.toMessage())||this}return e}(mr),Dn=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}return e}(mr),Yl=function(n){it(e,n);function e(t){return n.call(this,"Invalid unit "+t)||this}return e}(mr),st=function(n){it(e,n);function e(){return n.apply(this,arguments)||this}return e}(mr),Gt=function(n){it(e,n);function e(){return n.call(this,"Zone is an abstract class")||this}return e}(mr),_="numeric",ft="short",Je="long",Ni={year:_,month:_,day:_},Zs={year:_,month:ft,day:_},ql={year:_,month:ft,day:_,weekday:ft},Ks={year:_,month:Je,day:_},Js={year:_,month:Je,day:_,weekday:Je},Qs={hour:_,minute:_},Xs={hour:_,minute:_,second:_},ea={hour:_,minute:_,second:_,timeZoneName:ft},ta={hour:_,minute:_,second:_,timeZoneName:Je},ra={hour:_,minute:_,hour12:!1},na={hour:_,minute:_,second:_,hour12:!1},ia={hour:_,minute:_,second:_,hour12:!1,timeZoneName:ft},sa={hour:_,minute:_,second:_,hour12:!1,timeZoneName:Je},aa={year:_,month:_,day:_,hour:_,minute:_},oa={year:_,month:_,day:_,hour:_,minute:_,second:_},ua={year:_,month:ft,day:_,hour:_,minute:_},la={year:_,month:ft,day:_,hour:_,minute:_,second:_},jl={year:_,month:ft,day:_,weekday:ft,hour:_,minute:_},ca={year:_,month:Je,day:_,hour:_,minute:_,timeZoneName:ft},da={year:_,month:Je,day:_,hour:_,minute:_,second:_,timeZoneName:ft},fa={year:_,month:Je,day:_,weekday:Je,hour:_,minute:_,timeZoneName:Je},ha={year:_,month:Je,day:_,weekday:Je,hour:_,minute:_,second:_,timeZoneName:Je};function H(n){return typeof n=="undefined"}function pr(n){return typeof n=="number"}function Ci(n){return typeof n=="number"&&n%1==0}function Iy(n){return typeof n=="string"}function Fy(n){return Object.prototype.toString.call(n)==="[object Date]"}function kt(){try{return typeof Intl!="undefined"&&Intl.DateTimeFormat}catch(n){return!1}}function En(){return!H(Intl.DateTimeFormat.prototype.formatToParts)}function $l(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch(n){return!1}}function Ly(n){return Array.isArray(n)?n:[n]}function Bl(n,e,t){if(n.length!==0)return n.reduce(function(r,i){var s=[e(i),i];return r&&t(r[0],s[0])===r[0]?r:s},null)[1]}function Hl(n,e){return e.reduce(function(t,r){return t[r]=n[r],t},{})}function Ur(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Nt(n,e,t){return Ci(n)&&n>=e&&n<=t}function Wy(n,e){return n-e*Math.floor(n/e)}function Yr(n,e){e===void 0&&(e=2);var t=n<0?"-":"",r=t?n*-1:n,i;return r.toString().length<e?i=("0".repeat(e)+r).slice(-e):i=r.toString(),""+t+i}function Ye(n){if(!(H(n)||n===null||n===""))return parseInt(n,10)}function ma(n){if(!(H(n)||n===null||n==="")){var e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function pa(n,e,t){t===void 0&&(t=!1);var r=Math.pow(10,e),i=t?Math.trunc:Math.round;return i(n*r)/r}function kn(n){return n%4==0&&(n%100!=0||n%400==0)}function Mn(n){return kn(n)?366:365}function Ii(n,e){var t=Wy(e-1,12)+1,r=n+(e-t)/12;return t===2?kn(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function ya(n){var e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function Fi(n){var e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,r=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||r===3?53:52}function ga(n){return n>99?n:n>60?1900+n:2e3+n}function Gl(n,e,t,r){r===void 0&&(r=null);var i=new Date(n),s={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);var a=Object.assign({timeZoneName:e},s),o=k
`),{globalFilter:f}=le(),h,m=0;for(let y of l){if(y.position.start.line<n.sectionStart||y.task===void 0)continue;if(c[y.position.start.line].includes(f)){if(m===n.sectionIndex){h=y;break}m++}}if(h===void 0){console.error("Tasks: could not find task to toggle in the file.");return}let p=[...c.slice(0,h.position.start.line),...e.map(y=>y.toFileLineString()),...c.slice(h.position.start.line+1)];yield t.modify(o,p.join(`
`))});var gn=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 Oi=["MO","TU","WE","TH","FR","SA","SU"],me=function(){function n(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return n.fromStr=function(e){return new n(Oi.indexOf(e))},n.prototype.nth=function(e){return this.n===e?this:new n(this.weekday,e)},n.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},n.prototype.toString=function(){var e=Oi[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n}();var re=function(n){return n!=null},Ze=function(n){return typeof n=="number"},$s=function(n){return Oi.indexOf(n)>=0},Me=Array.isArray,rt=function(n,e){e===void 0&&(e=n),arguments.length===1&&(e=n,n=0);for(var t=[],r=n;r<e;r++)t.push(r);return t};var U=function(n,e){var t=0,r=[];if(Me(n))for(;t<e;t++)r[t]=[].concat(n);else for(;t<e;t++)r[t]=n;return r},il=function(n){return Me(n)?n:[n]};function dr(n,e,t){t===void 0&&(t=" ");var r=String(n);return e=e>>0,r.length>e?String(r):(e=e-r.length,e>t.length&&(t+=U(t,e/t.length)),t.slice(0,e)+String(r))}var sl=function(n,e,t){var r=n.split(e);return t?r.slice(0,t).concat([r.slice(t).join(e)]):r},Se=function(n,e){var t=n%e;return t*e<0?t+e:t},Ri=function(n,e){return{div:Math.floor(n/e),mod:Se(n,e)}},Ke=function(n){return!re(n)||n.length===0},de=function(n){return!Ke(n)},Y=function(n,e){return de(n)&&n.indexOf(e)!==-1};var Bt;(function(n){n.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],n.ONE_DAY=1e3*60*60*24,n.MAXYEAR=9999,n.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),n.PY_WEEKDAYS=[6,0,1,2,3,4,5],n.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())/n.ONE_DAY)+1},n.isLeapYear=function(e){return e%4==0&&e%100!=0||e%400==0},n.isDate=function(e){return e instanceof Date},n.isValidDate=function(e){return n.isDate(e)&&!isNaN(e.getTime())},n.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},n.daysBetween=function(e,t){var r=e.getTime()-n.tzOffset(e),i=t.getTime()-n.tzOffset(t),s=r-i;return Math.round(s/n.ONE_DAY)},n.toOrdinal=function(e){return n.daysBetween(e,n.ORDINAL_BASE)},n.fromOrdinal=function(e){return new Date(n.ORDINAL_BASE.getTime()+e*n.ONE_DAY)},n.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&n.isLeapYear(e.getUTCFullYear())?29:n.MONTH_DAYS[t]},n.getWeekday=function(e){return n.PY_WEEKDAYS[e.getUTCDay()]},n.monthRange=function(e,t){var r=new Date(Date.UTC(e,t,1));return[n.getWeekday(r),n.getMonthDays(r)]},n.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()))},n.clone=function(e){var t=new Date(e.getTime());return t},n.cloneDates=function(e){for(var t=[],r=0;r<e.length;r++)t.push(n.clone(e[r]));return t},n.sort=function(e){e.sort(function(t,r){return t.getTime()-r.getTime()})},n.timeToUntilString=function(e,t){t===void 0&&(t=!0);var r=new Date(e);return[dr(r.getUTCFullYear().toString(),4,"0"),dr(r.getUTCMonth()+1,2,"0"),dr(r.getUTCDate(),2,"0"),"T",dr(r.getUTCHours(),2,"0"),dr(r.getUTCMinutes(),2,"0"),dr(r.getUTCSeconds(),2,"0"),t?"Z":""].join("")},n.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,r=t.exec(e);if(!r)throw new Error("Invalid UNTIL value: "+e);return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))}})(Bt||(Bt={}));var O=Bt;var vy=function(){function n(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==="be
`).map(ky).filter(function(t){return t!==null});return Ue(Ue({},e[0]),e[1])}function wn(n){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!t)return e;var r=t[0],i=t[1],s=t[2];return i&&(e.tzid=i),e.dtstart=O.untilStringToDate(s),e}function ky(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var e=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!e)return Fl(n);var t=e[0],r=e[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return Fl(n);case"DTSTART":return wn(n);default:throw new Error("Unsupported RFC prop "+r+" in "+n)}}function Fl(n){var e=n.replace(/^RRULE:/i,""),t=wn(e),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=I[o.toUpperCase()];break;case"WKST":t.wkst=nt[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=My(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=Oy(o);break;case"DTSTART":case"TZID":var d=wn(n);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=O.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function My(n){if(n.indexOf(",")!==-1){var e=n.split(",");return e.map(Ll)}return Ll(n)}function Ll(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function Oy(n){var e=n.split(",");return e.map(function(t){if(t.length===2)return nt[t];var r=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/),i=Number(r[1]),s=r[2],a=nt[s].weekday;return new me(a,i)})}var Gc=$e(Hc()),wr=function(){function n(e,t){this.date=e,this.tzid=t}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!0,configurable:!0}),n.prototype.toString=function(){var e=O.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":"+e:";TZID="+this.tzid+":"+e},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){if(this.isUTC)return this.date;try{var e=Gc.DateTime.fromJSDate(this.date),t=e.setZone(this.tzid,{keepLocalTime:!0});return t.toJSDate()}catch(r){return r instanceof TypeError&&console.error("Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone"),this.date}},n}();function Nn(n){for(var e=[],t="",r=Object.keys(n),i=Object.keys(_n),s=0;s<r.length;s++)if(r[s]!=="tzid"&&!!Y(i,r[s])){var a=r[s].toUpperCase(),o=n[r[s]],u="";if(!(!re(o)||Me(o)&&!o.length)){switch(a){case"FREQ":u=$.FREQUENCIES[n.freq];break;case"WKST":Ze(o)?u=new me(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=il(o).map(function(h){return h instanceof me?h:Me(h)?new me(h[0],h[1]):new me(h)}).toString();break;case"DTSTART":t=Pv(o,n.tzid);break;case"UNTIL":u=O.timeToUntilString(o,!n.tzid);break;default:if(Me(o)){for(var l=[],d=0;d<o.length;d++)l[d]=String(o[d]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var c=e.map(function(h){var m=h[0],p=h[1];return m+"="+p.toString()}).join(";"),f="";return c!==""&&(f="RRULE:"+c),[t,f].filter(function(h){return!!h}).join(`
`)}function Pv(n,e){return n?"DTSTART"+new wr(new Date(n),e).toString():""}var zc=function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(e,t,r){t&&(t=t instanceof Date?O.clone(t):O.cloneDates(t)),e==="all"?this.all=t:(r._value=t,this[e].push(r))},n.prototype._cacheGet=function(e,t){var r=!1,i=t?Object.keys(t):[],s=function(d){for(var c=0;c<i.length;c++){var f=i[c];if(String(t[f])!==String(d[f]))return!0}return!1},a=this[e];if(e==="all")r=this.all;else if(Me(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(i.length&&s(u))){r=u._value;break}}if(!r&&this.all){for(var l=new At(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);r=l.getValue(),this._cacheAdd(e,r,t)}return Me(r)?O.cloneDates(r):r instanceof Date?O.clone(r):r},n}();var Vc=fr(U(1,31),U(2,28),U(3,31),U(4,30),U(5,31),U(6,30),U(7,31),U(8,31),U(9,30),U(10,31),U(11,30),U(12,31),U(1,7)),Zc=fr(U(1,31),U(2,29),U(3,31),U(4,30),U(5,31),U(6,30),U(7,31),U(8,31),U(9,30),U(10,31),U(11,30),U(12,31),U(1,7)),Sv=rt(1,29),xv=rt(1,30),zt=rt(1,31),xe=rt(1,32),Kc=fr(xe,xv,xe,zt,xe,zt,xe,xe,zt,xe,zt,xe,xe.slice(0,7)),Jc=fr(xe,Sv,xe,zt,xe,zt,xe,xe,zt,xe,zt,xe,xe.slice(0,7)),Av=rt(-28,0),Nv=rt(-29,0),Vt=rt(-30,0),Ae=rt(-31,0),Qc=fr(Ae,Nv,Ae,Vt,Ae,Vt,Ae,Ae,Vt,Ae,Vt,Ae,Ae.slice(0,7)),Xc=fr(Ae,Av,Ae,Vt,Ae,Vt,Ae,Ae,Vt,Ae,Vt,Ae,Ae.slice(0,7)),ed=[0,31,60,91,121,152,182,213,244,274,305,335,366],td=[0,31,59,90,120,151,181,212,243,273,304,334,365],Ia=function(){for(var n=[],e=0;e<55;e++)n=n.concat(rt(7));return n}();function rd(n,e){var t=new Date(Date.UTC(n,0,1)),r=O.isLeapYear(n)?366:365,i=O.isLeapYear(n+1)?366:365,s=O.toOrdinal(t),a=O.getWeekday(t),o=Ue(Ue({yearlen:r,nextyearlen:i,yearordinal:s,yearweekday:a},Cv(n)),{wnomask:null});if(Ke(e.byweekno))return o;o.wnomask=U(0,r+7);var u,l,d=u=Se(7-a+e.wkst,7);d>=4?(d=0,l=o.yearlen+Se(a-e.wkst,7)):l=r-d;for(var c=Math.floor(l/7),f=Se(l,7),h=Math.floor(c+f/4),m=0;m<e.byweekno.length;m++){var p=e.byweekno[m];if(p<0&&(p+=h+1),p>0&&p<=h){var y=void 0;p>1?(y=d+(p-1)*7,d!==u&&(y-=7-u)):y=d;for(var v=0;v<7&&(o.wnomask[y]=1,y++,o.wdaymask[y]!==e.wkst);v++);}}if(Y(e.byweekno,1)){var y=d+h*7;if(d!==u&&(y-=7-u),y<r)for(var m=0;m<7&&(o.wnomask[y]=1,y+=1,o.wdaymask[y]!==e.wkst);m++);}if(d){var A=void 0;if(Y(e.byweekno,-1))A=-1;else{var X=O.getWeekday(new Date(Date.UTC(n-1,0,1))),W=Se(7-X.valueOf()+e.wkst,7),G=O.isLeapYear(n-1)?366:365,P=void 0;W>=4?(W=0,P=G+Se(X-e.wkst,7)):P=r-d,A=Math.floor(52+Se(P,7)/4)}if(Y(e.byweekno,A))for(var y=0;y<d;y++)o.wnomask[y]=1}return o}function Cv(n){var e=O.isLeapYear(n)?366:365,t=new Date(Date.UTC(n,0,1)),r=O.getWeekday(t);return e===365?{mmask:Vc,mdaymask:Jc,nmdaymask:Xc,wdaymask:Ia.slice(r),mrange:td}:{mmask:Zc,mdaymask:Kc,nmdaymask:Qc,wdaymask:Ia.slice(r),mrange:ed}}function nd(n,e,t,r,i,s){var a={lastyear:n,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===$.YEARLY)if(Ke(s.bymonth))o=[[0,t]];else for(var u=0;u<s.bymonth.length;u++)e=s.bymonth[u],o.push(r.slice(e-1,e+1));else s.freq===$.MONTHLY&&(o=[r.slice(e-1,e+1)]);if(Ke(o))return a;a.nwdaymask=U(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],d=l[0],c=l[1]-1,f=0;f<s.bynweekday.length;f++){var h=void 0,m=s.bynweekday[f],p=m[0],y=m[1];y<0?(h=c+(y+1)*7,h-=Se(i[h]-p,7)):(h=d+(y-1)*7,h+=Se(7-i[h]+p,7)),d<=h&&h<=c&&(a.nwdaymask[h]=1)}return a}function id(n,e){e===void 0&&(e=0);var t=n%19,r=Math.floor(n/100),i=n%100,s=Math.floor(r/4),a=r%4,o=Math.floor((r+8)/25),u=Math.floor((r-o+1)/3),l=Math.floor(19*t+r-s-u+15)%30,d=Math.floor(i/4),c=i%4,f=Math.floor(32+2*a+2*d-l-c)%7,h=Math.floor((t+11*l+22*f)/451),m=Math.floor((l+f-7*h+114)/31),p=(l+f-7*h+114)%31+1,y=Date.UTC(n,m-1,p+e),v=Date.UTC(n,0,1);return[Math.ceil((y-v)/(1e3*60*60*24))]}var Iv=function(){function n(e){this.options=e}return n.prototype.rebuild=function(e,t){var r=this.options;if(e!==this.lastyear&&(this.yearinfo=rd(e,r)),de(r.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=nd(e,t,s,a,o,r)}re(r.byeaster)&&(this.eastermask=id(e,r.byeaster))},Object.defineProperty(n.prototype,"lastyear"
`),r=0;r<t.length;){var i=t[r]=t[r].replace(/\s+$/g,"");i?r>0&&i[0]===" "?(t[r-1]+=i.slice(1),t.splice(r,1)):r+=1:t.splice(r,1)}return t}function Gv(n){n.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function cd(n,e){return Gv(e),n.split(",").map(function(t){return O.untilStringToDate(t)})}function dd(n){var e=this;return function(t){if(t!==void 0&&(e["_"+n]=t),e["_"+n]!==void 0)return e["_"+n];for(var r=0;r<e._rrule.length;r++){var i=e._rrule[r].origOptions[n];if(i)return i}}}var zv=function(n){Fr(e,n);function e(t){t===void 0&&(t=!1);var r=n.call(this,{},t)||this;return r.dtstart=dd.apply(r,["dtstart"]),r.tzid=dd.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return e.prototype._iter=function(t){return ud(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){fd(t,this._rrule)},e.prototype.exrule=function(t){fd(t,this._exrule)},e.prototype.rdate=function(t){hd(t,this._rdate)},e.prototype.exdate=function(t){hd(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return zi(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return zi(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(Nn({dtstart:this._dtstart}))),this._rrule.forEach(function(r){t=t.concat(r.toString().split(`
`))}),this._exrule.forEach(function(r){t=t.concat(r.toString().split(`
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&t.push(md("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(md("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(r){return t.rrule(r.clone())}),this._exrule.forEach(function(r){return t.exrule(r.clone())}),this._rdate.forEach(function(r){return t.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return t.exdate(new Date(r.getTime()))}),t},e}($),La=zv;function fd(n,e){if(!(n instanceof $))throw new TypeError(String(n)+" is not RRule instance");Y(e.map(String),String(n))||e.push(n)}function hd(n,e){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Y(e.map(Number),Number(n))||(e.push(n),O.sort(e))}function md(n,e,t){var r=!t||t.toUpperCase()==="UTC",i=r?n+":":n+";TZID="+t+":",s=e.map(function(a){return O.timeToUntilString(a.valueOf(),r)}).join(",");return""+i+s}var ee=$;var Zt=class{constructor({rrule:e,baseOnToday:t,referenceDate:r,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=r,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:r,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=$.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):r?l=window.moment(r):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 d=new $(u);return new Zt({rrule:d,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:r,dueDate:i})}}catch(s){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let r=window.moment();e=new $(cr(Ve({},this.rrule.origOptions),{dtstart:r.startOf("day").utc(!0).toDate()})).after(r.endOf("day").utc(!0).toDate())}else{let r=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day").utc(!0);e=this.rrule.after(r.toDate())}if(e!==null){let i=window.moment.utc(e).local(!0).startOf("day"),s=null,a=null,o=null;if(this.referenceDate){if(this.startDate){let u=window.moment.duration(this.startDate.diff(this.referenceDate));s=window.moment(i),s.add(Math.round(u.asDays()),"days")}if(this.scheduledDate){let u=window.moment.duration(this.scheduledDate.diff(this.referenceDate));a=window.moment(i),a.add(Math.round(u.asDays()),"days")}if(this.dueDate){let u=window.moment.duration(this.dueDate.diff(this.referenceDate));o=window.moment(i),o.add(Math.round(u.asDays()),"days")}}return{startDate:s,scheduledDate:a,dueDate:o}}return null}};var It=class{static calculate(e){let t=0;if(e.dueDate!==null){let r=window.moment().diff(e.dueDate)/It.milliSecondsPerDay,i;r>=7?i=1:r>=-14?i=(r+14)*.8/21+.2:i=.2,t+=i*It.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*It.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*It.startedCoefficient),e.priority){case"1":t+=1*It.priorityCoefficient;break;case"2":t+=.65*It.priorityCoefficient;break;case"3":t+=.325*It.priorityCoefficient;break}return t}},Kt=It;Kt.dueCoefficient=12,Kt.scheduledCoefficient=5,Kt.startedCoefficient=-3,Kt.priorityCoefficient=6,Kt.milliSecondsPerDay=1e3*60*60*24;var he;(function(t){t.Todo="Todo",t.Done="Done"})(he||(he={}));var ie;(function(i){i.High="1",i.Medium="2",i.None="3",i.Low="4"})(ie||(ie={}));var Z=class{constructor({status:e,description:t,path:r,indentation:i,sectionStart:s,sectionIndex:a,originalStatusCharacter:o,precedingHeader:u,priority:l,startDate:d,scheduledDate:c,dueDate:f,doneDate:h,recurrence:m,blockLink:p,tags:y}){this._urgency=null;this.status=e,this.description=t,this.path=r,this.indentation=i,this.sectionStart=s,this.sectionIndex=a,this.originalStatusCharacter=o,this.precedingHeader=u,this.tags=y,this.priority=l,this.startDate=d,this.scheduledDate=c,this.dueDate=f,this.doneDate=h,this.recurrence=m,this.blockLink=p}static fromLine({line:e,path:t,sectionStart:r,sectionIndex:i,precedingHeader:s}){let a=e.match(Z.taskRegex);if(a===null)return null;let o=a[3].trim(),{globalFilter:
`);this.tasks=this.tasks.filter(u=>u.path!==e.path);let a=null,o=0;for(let u of r)if(u.task!==void 0){if((a===null||a.position.end.line<u.position.start.line)&&(a=this.getSection({lineNumberTask:u.position.start.line,sections:t.sections}),o=0),a===null)continue;let l=s[u.position.start.line],d=Q.fromLine({line:l,path:e.path,sectionStart:a.position.start.line,sectionIndex:o,precedingHeader:this.getPrecedingHeader({lineNumberTask:u.position.start.line,sections:t.sections,fileLines:s})});d!==null&&(o++,this.tasks.push(d))}this.notifySubscribers()})}getSection({lineNumberTask:e,sections:t}){if(t===void 0)return null;for(let r of t)if(r.type==="list"&&r.position.start.line<=e&&r.position.end.line>=e)return r;return null}getPrecedingHeader({lineNumberTask:e,sections:t,fileLines:r}){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=r[s],o=/^#+ +(.*)/u,u=a.match(o);return u===null?null:u[1]}};var cu=$e(require("obsidian"));var Jp=$e(require("obsidian"));function Zr(){}function Ua(n){return n()}function yd(){return Object.create(null)}function Er(n){n.forEach(Ua)}function gd(n){return typeof n=="function"}function vd(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}function Td(n){return Object.keys(n).length===0}var HO=new Set;var _d=!1;function Vv(){_d=!0}function Zv(){_d=!1}function b(n,e){n.appendChild(e)}function Ya(n,e,t){n.insertBefore(e,t||null)}function Zi(n){n.parentNode.removeChild(n)}function x(n){return document.createElement(n)}function Ft(n){return document.createTextNode(n)}function ne(){return Ft(" ")}function Jt(n,e,t,r){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function bd(n){return function(e){return e.preventDefault(),n.call(this,e)}}function F(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Kv(n){return Array.from(n.childNodes)}function wd(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function yt(n,e){n.value=e==null?"":e}function qa(n,e){for(let t=0;t<n.options.length;t+=1){let r=n.options[t];if(r.__value===e){r.selected=!0;return}}n.selectedIndex=-1}function Dd(n){let e=n.querySelector(":checked")||n.options[0];return e&&e.__value}var Kr=class{constructor(){this.e=this.n=null}c(e){this.h(e)}m(e,t,r=null){this.e||(this.e=x(t.nodeName),this.t=t,this.c(e)),this.i(r)}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)Ya(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Zi)}};var GO=new Set;var Ki;function Ji(n){Ki=n}function Jv(){if(!Ki)throw new Error("Function called outside component initialization");return Ki}function ja(n){Jv().$$.on_mount.push(n)}var Cn=[];var Qi=[],Xi=[],Ed=[],Qv=Promise.resolve(),$a=!1;function Xv(){$a||($a=!0,Qv.then(kd))}function In(n){Xi.push(n)}var Ba=!1,Ha=new Set;function kd(){if(!Ba){Ba=!0;do{for(let n=0;n<Cn.length;n+=1){let e=Cn[n];Ji(e),eT(e.$$)}for(Ji(null),Cn.length=0;Qi.length;)Qi.pop()();for(let n=0;n<Xi.length;n+=1){let e=Xi[n];Ha.has(e)||(Ha.add(e),e())}Xi.length=0}while(Cn.length);for(;Ed.length;)Ed.pop()();$a=!1,Ba=!1,Ha.clear()}}function eT(n){if(n.fragment!==null){n.update(),Er(n.before_update);let e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(In)}}var tT=new Set;function rT(n,e){n&&n.i&&(tT.delete(n),n.i(e))}var zO=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var VO=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function nT(n,e,t,r){let{fragment:i,on_mount:s,on_destroy:a,after_update:o}=n.$$;i&&i.m(e,t),r||In(()=>{let u=s.map(Ua).filter(gd);a?a.push(...u):Er(u),n.$$.on_mount=[]}),o.forEach(In)}function Md(n,e){let t=n.$$;t.fragment!==null&&(Er(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t
`),lr=x("input"),qu=ne(),Is=x("code"),Fs=Ft(wi),ju=ne(),Di=x("div"),$u=Ft(`Done on:
`),Ei=x("code"),Bu=ne(),Hu=x("hr"),Gu=ne(),Ls=x("div"),zu=ne(),ki=x("div"),ki.innerHTML='<button type="submit" class="mod-cta">Apply</button>',F(i,"for","description"),F(a,"id","description"),F(a,"type","text"),F(a,"class","tasks-modal-description"),F(a,"placeholder","Take out the trash"),F(r,"class","tasks-modal-section"),F(c,"for","priority"),m.__value="none",m.value=m.__value,p.__value="high",p.value=p.__value,y.__value="medium",y.value=y.__value,v.__value="low",v.value=v.__value,F(h,"id","priority"),F(h,"class","dropdown"),n[0].priority===void 0&&In(()=>n[14].call(h)),F(d,"class","tasks-modal-section"),F(P,"for","recurrence"),F(M,"id","description"),F(M,"type","text"),F(M,"placeholder","Try 'every 2 weeks on Thursday'."),D.a=null,F(G,"class","tasks-modal-section"),F(K,"for","due"),F(z,"id","due"),F(z,"type","text"),F(z,"placeholder","Try 'Monday' or 'tomorrow'."),Dt.a=null,F(S,"class","tasks-modal-date"),F(ve,"for","scheduled"),F(ze,"id","scheduled"),F(ze,"type","text"),F(ze,"placeholder","Try 'Monday' or 'tomorrow'."),gi.a=null,F(Le,"class","tasks-modal-date"),F(vi,"for","start"),F(xt,"id","start"),F(xt,"type","text"),F(xt,"placeholder","Try 'Monday' or 'tomorrow'."),_i.a=null,F($t,"class","tasks-modal-date"),F(R,"class","tasks-modal-section"),F(lr,"type","checkbox"),F(lr,"class","task-list-item-checkbox tasks-modal-checkbox"),lr.checked=bi=n[0].status===he.Done,lr.disabled=!0,F(Ar,"class","tasks-modal-section"),F(Ls,"class","tasks-modal-section"),F(ki,"class","tasks-modal-section"),F(e,"class","tasks-modal")},m(ue,We){Ya(ue,e,We),b(e,t),b(t,r),b(r,i),b(r,s),b(r,a),yt(a,n[0].description),n[13](a),b(t,o),b(t,u),b(t,l),b(t,d),b(d,c),b(d,f),b(d,h),b(h,m),b(h,p),b(h,y),b(h,v),qa(h,n[0].priority),b(t,A),b(t,X),b(t,W),b(t,G),b(G,P),b(G,j),b(G,M),yt(M,n[0].recurrenceRule),b(G,Ie),b(G,Fe),b(Fe,E),D.m(n[5],Fe),b(t,T),b(t,k),b(t,w),b(t,R),b(R,S),b(S,K),b(S,se),b(S,z),yt(z,n[0].dueDate),b(S,ge),b(S,Ge),b(Ge,tt),Dt.m(n[4],Ge),b(R,jt),b(R,Le),b(Le,ve),b(Le,ct),b(Le,ze),yt(ze,n[0].scheduledDate),b(Le,ur),b(Le,yi),b(yi,Au),gi.m(n[3],yi),b(R,Nu),b(R,$t),b($t,vi),b($t,Cu),b($t,xt),yt(xt,n[0].startDate),b($t,Iu),b($t,Ti),b(Ti,Fu),_i.m(n[2],Ti),b(t,Lu),b(t,Wu),b(t,Uu),b(t,Ar),b(Ar,Nr),b(Nr,Yu),b(Nr,lr),b(Nr,qu),b(Nr,Is),b(Is,Fs),b(Ar,ju),b(Ar,Di),b(Di,$u),b(Di,Ei),Ei.innerHTML=n[6],b(t,Bu),b(t,Hu),b(t,Gu),b(t,Ls),b(t,zu),b(t,ki),Ws||(Vu=[Jt(a,"input",n[12]),Jt(h,"change",n[14]),Jt(M,"input",n[15]),Jt(z,"input",n[16]),Jt(ze,"input",n[17]),Jt(xt,"input",n[18]),Jt(t,"submit",bd(n[7]))],Ws=!0)},p(ue,[We]){We&1&&a.value!==ue[0].description&&yt(a,ue[0].description),We&1&&qa(h,ue[0].priority),We&1&&M.value!==ue[0].recurrenceRule&&yt(M,ue[0].recurrenceRule),We&32&&D.p(ue[5]),We&1&&z.value!==ue[0].dueDate&&yt(z,ue[0].dueDate),We&16&&Dt.p(ue[4]),We&1&&ze.value!==ue[0].scheduledDate&&yt(ze,ue[0].scheduledDate),We&8&&gi.p(ue[3]),We&1&&xt.value!==ue[0].startDate&&yt(xt,ue[0].startDate),We&4&&_i.p(ue[2]),We&1&&bi!==(bi=ue[0].status===he.Done)&&(lr.checked=bi),We&1&&wi!==(wi=ue[0].status+"")&&wd(Fs,wi),We&64&&(Ei.innerHTML=ue[6])},i:Zr,o:Zr,d(ue){ue&&Zi(e),n[13](null),Ws=!1,Er(Vu)}}}function kE(n,e,t){var r,i;let{task:s}=e,{onSubmit:a}=e,o,u={description:"",status:he.Todo,priority:"none",recurrenceRule:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:""},l="",d="",c="",f="",h="";ja(()=>{let{globalFilter:P}=le(),j=s.description.replace(P,"").replace(" "," ").trim(),M="none";s.priority===ie.Low?M="low":s.priority===ie.Medium?M="medium":s.priority===ie.High&&(M="high"),t(0,u={description:j,status:s.status,priority:M,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 m=()=>{let{globalFilter:P}=le(),j=u.description.trim();j.includes(P)||(j=P+" "+j);let M=null,Ie=ar.default.parseDate(u.startDate,new Date,{forwardDate:!0});Ie!==null&&(M=window.moment(Ie));let Fe=n
`);e.setLine(a,h)};new di({app:r,task:u,onSubmit:l}).open()},ME=({line:n,path:e})=>{var c;let t=Q.fromLine({line:n,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(t!==null)return t;let r=/^([\s\t]*)[-*]? *(\[(.)\])? *(.*)/u,i=n.match(r);if(i===null)return console.error("Tasks: Cannot create task on line:",n),new Q({status:he.Todo,description:"",path:e,indentation:"",originalStatusCharacter:" ",priority:ie.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,blockLink:"",tags:[]});let s=i[1],a=(c=i[3])!=null?c:" ",o=a===" "?he.Todo:he.Done,u=i[4],l=n.match(Q.blockLinkRegex),d=l!==null?l[0]:"";return d!==""&&(u=u.replace(Q.blockLinkRegex,"")),new Q({status:o,description:u,path:e,indentation:s,originalStatusCharacter:a,blockLink:d,priority:ie.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[]})};var du=$e(require("obsidian"));var Xp=(n,e,t)=>{var u;if(n)return t instanceof du.MarkdownView;if(!(t instanceof du.MarkdownView))return;let r=(u=t.file)==null?void 0:u.path;if(r===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=OE({line:a,path:r});e.setLine(s,o),/[^ [\]*-]/.test(o)&&e.setCursor({line:i.line,ch:i.ch+o.length-a.length})},OE=({line:n,path:e})=>{let t=n,r=Q.fromLine({line:n,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(r!==null)t=RE({task:r});else{let i=n.match(Q.taskRegex);if(i!==null)t=PE({regexMatch:i});else{let s=/^([\s\t]*)([-*])/;s.test(n)?t=n.replace(s,"$1$2 [ ]"):t=n.replace(/^([\s\t]*)/,"$1- ")}}return t},RE=({task:n})=>n.toggle().map(r=>r.toFileLineString()).join(`
`),PE=({regexMatch:n})=>{let e=n[1],t=n[2].toLowerCase(),r=n[3];return`${e}- [${t===" "?"x":" "}] ${r}`};var fu=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,r,i)=>Qp(t,r,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Xp})}};var fn;(function(t){t.CacheUpdate="obsidian-tasks-plugin:cache-update",t.RequestCacheUpdate="obsidian-tasks-plugin:request-cache-update"})(fn||(fn={}));var hu=class{constructor({obsidianEents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on(fn.CacheUpdate,e)}triggerCacheUpdate(e){this.obsidianEvents.trigger(fn.CacheUpdate,e)}onRequestCacheUpdate(e){return this.obsidianEvents.on(fn.RequestCacheUpdate,e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger(fn.RequestCacheUpdate,e)}off(e){this.obsidianEvents.offref(e)}};var mu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return ae(this,null,function*(){var d;let{globalFilter:r}=le(),i=e.findAll(".task-list-item").filter(c=>{var m;let f=(m=c.textContent)==null?void 0:m.split(`
`);if(f===void 0)return!1;let h=null;for(let p=0;p<f.length;p=p+1)if(f[p]!==""){h=f[p];break}return h===null?!1:h.includes(r)});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 c=a.lineStart;c<=a.lineEnd;c++){let f=o[c];if(f===void 0)continue;let h=Q.fromLine({line:f,path:s,sectionStart:a.lineStart,sectionIndex:u,precedingHeader:null});h!==null&&(l.push(h),u++)}for(let c=0;c<i.length;c++){let f=l[c],h=i[c];if(f===void 0||h===void 0)continue;let m=(d=h.getAttr("data-line"))!=null?d:"0",p=Number.parseInt(m,10),y=yield f.toLi({parentUlElement:e,listIndex:p}),v=h.childNodes;for(let W=0;W<v.length;W=W+1){let G=v[W];G.nodeName.toLowerCase()==="div"?y.prepend(G):G.nodeName.toLowerCase()==="ul"&&y.append(G)}let A=h.querySelectorAll("[data-footnote-id]"),X=y.querySelectorAll("[data-footnote-id]");if(A.length===X.length)for(let W=0;W<A.length;W++)X[W].replaceWith(A[W]);h.replaceWith(y)}})}};var ey=$e(require("@codemirror/view"));var ty=()=>ey.ViewPlugin.fromClass(ry),ry=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:r}=this.view,i=this.view.posAtDOM(t),s=r.doc.lineAt(i),a=Q.fromLine({line:s.text,path:"",sectionStart:0,sectionIndex:0,precedingHeader:null});if(a===null)return!1;e.preventDefault();let u=a.toggle().map(c=>c.toFileLineString()).join(r.lineBreak),l=r.update({changes:{from:s.from,to:s.to,insert:u}});this.view.dispatch(l);let d=t.checked;return setTimeout(()=>{t.checked=d},1),!0}};var iy=$e(require("obsidian"));var pu=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var yu=class{constructor(e){this.lastHeadingAtLevel=new Array;let r=e.keys().next().value.length;for(let i=0;i<r;i++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let r=0;r<e.length;r++){let i=e[r];if(i!=this.lastHeadingAtLevel[r]){t.push(new pu(r,i));for(let s=r;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[r]=i}}return t}};var gu=class extends Map{},vu=class{constructor(e,t){this.groups=new gu;if(e.length===0||t.length===0)this.groups.set([],t);else{let r=or.getGroupersForAllQueryGroupings(e);for(let i of t){let s=or.getGroupNamesForTask(r,i);this.addTask(s,i)}this.groups=this.getSortedGroups()}}addTask(e,t){let r=this.getOrCreateGroupForGroupNames(e);r==null||r.push(t)}getOrCreateGroupForGroupNames(e){for(let[r,i]of this.groups)if(JSON.stringify(r)===JSON.stringify(e))return i;let t=[];return this.groups.set(e,t),t}getSortedGroups(){return new gu([...this.groups.entries()].sort())}};var Tu=class{constructor(e,t,r){this.groups=e,this.groupHeadings=t,this.tasks=r}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 _u=class{constructor(e,t){this._groups=new Array;let r=new vu(e,t);this.addTasks(r)}get groups(){return this._groups}totalTasksCount(){let e=0;for(let t of this.groups)e+=t.tasks.length;return e}toString(){let e="";for(let r of this.groups)e+=r.toString(),e+=`
---
`;return e+=`
${this.totalTasksCount()} tasks
`,e}addTasks(e){let t=new yu(e.groups);for(let[r,i]of e.groups){let s=t.getHeadingsForTaskGroup(r),a=new Tu(r,s,i);this.add(a)}}add(e){this._groups.push(e)}};var Te=class{static by(e,t){return new _u(e,t)}static getGroupersForAllQueryGroupings(e){let t=[];for(let{property:r}of e){let i=Te.groupers[r];t.push(i)}return t}static getGroupNamesForTask(e,t){let r=[];for(let i of e){let s=i(t);r.push(s)}return r}static getGroupNameForTask(e,t){return Te.groupers[e](t)}static groupByStartDate(e){return Te.groupByDate(e.startDate,"start")}static groupByScheduledDate(e){return Te.groupByDate(e.scheduledDate,"scheduled")}static groupByDueDate(e){return Te.groupByDate(e.dueDate,"due")}static groupByDoneDate(e){return Te.groupByDate(e.doneDate,"done")}static groupByDate(e,t){return e===null?"No "+t+" date":e.format(Te.groupDateFormat)}static groupByPath(e){return e.path.replace(".md","")}static groupByFolder(e){let t=e.path,r=e.filename+".md",i=t.substring(0,t.lastIndexOf(r));return i===""?"/":i}static groupByFileName(e){let t=e.filename;return t===null?"Unknown Location":t}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}},or=Te;or.groupDateFormat="YYYY-MM-DD dddd",or.groupers={backlink:Te.groupByBacklink,done:Te.groupByDoneDate,due:Te.groupByDueDate,filename:Te.groupByFileName,folder:Te.groupByFolder,heading:Te.groupByHeading,path:Te.groupByPath,scheduled:Te.groupByScheduledDate,start:Te.groupByStartDate,status:Te.groupByStatus};var B=class{static by(e,t){let r=[B.compareByUrgency,B.compareByStatus,B.compareByDueDate,B.compareByPriority,B.compareByPath],i=[];for(let{property:s,reverse:a,propertyInstance:o}of e.sorting){let u=B.comparators[s];i.push(a?B.makeReversedComparator(u):u),s==="tag"&&(B.tagPropertyInstance=o)}return t.sort(B.makeCompositeComparator([...i,...r]))}static makeReversedComparator(e){return(t,r)=>e(t,r)*-1}static makeCompositeComparator(e){return(t,r)=>{for(let i of e){let s=i(t,r);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 B.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return B.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return B.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return B.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 r=B.tagPropertyInstance-1;return e.tags.length<B.tagPropertyInstance&&t.tags.length>=B.tagPropertyInstance?1:t.tags.length<B.tagPropertyInstance&&e.tags.length>=B.tagPropertyInstance?-1:e.tags.length<B.tagPropertyInstance&&t.tags.length<B.tagPropertyInstance?0:e.tags[r]<t.tags[r]?-1:e.tags[r]>t.tags[r]?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 B.cleanDescription(e.description).localeCompare(B.cleanDescription(t.description))}static cleanDescription(e){let t=le().globalFilter;e=e.replace(t,"").trim();let r=/^\[\[?([^\]]*)\]/,i=e.match(r);if(i!==null){let l=i[1];e=l.substring(l.indexOf("|")+1)+e.replace(r,"")}let s=/^\*\*?([^*]*)\*/,a=e.match(s);a!==null&&(e=a[1]+e.replace(r,""));let o=/^==?([^=]*)==/,u=e.match(o);return u!==null&&(e=u[1]+e.replace(o,"")),e}},fi=B;fi.tagPropertyInstance=1,fi.comparators={urgency:B.compareByUrgency,description:B.compareByDescription,priority:B.compareByPriority,start:B.compareByStartDate,scheduled:B.compareByScheduledDate,due:B.compareByDueDate,done:B.compareByDoneDate,path:B.compareByPath,status:B.compareByStatus,
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case t===this.doneString:this._filters.push(r=>r.status===he.Done);break;case t===this.notDoneString:this._filters.push(r=>r.status!==he.Done);break;case t===this.recurringString:this._filters.push(r=>r.recurrence!==null);break;case t===this.notRecurringString:this._filters.push(r=>r.recurrence===null);break;case t===this.excludeSubItemsString:this._filters.push(r=>r.indentation==="");break;case t===this.noStartString:this._filters.push(r=>r.startDate===null);break;case t===this.noScheduledString:this._filters.push(r=>r.scheduledDate===null);break;case t===this.noDueString:this._filters.push(r=>r.dueDate===null);break;case t===this.hasStartString:this._filters.push(r=>r.startDate!==null);break;case t===this.hasScheduledString:this._filters.push(r=>r.scheduledDate!==null);break;case t===this.hasDueString:this._filters.push(r=>r.dueDate!==null);break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.parseFilter(t,new xs):break;case this.parseFilter(t,new mn):break;case this.parseFilter(t,new Ns):break;case this.parseFilter(t,new As):break;case this.parseFilter(t,new Rs):break;case this.parseFilter(t,new hn):break;case this.parseFilter(t,new Ss):break;case this.parseFilter(t,new Os):break;case this.parseFilter(t,new Cs):break;case this.parseFilter(t,new Ps):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;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(r=>{e=e.filter(r)});let t=fi.by(this,e).slice(0,this.limit);return or.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,t){if(t.canCreateFilterForLine(e)){let{filter:r,error:i}=t.createFilterOrErrorMessage(e);return r?this._filters.push(r):this._error=i,!0}else return!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 Pu=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,r){return ae(this,null,function*(){r.addChild(new pi({app:this.app,events:this.events,container:t,source:e}))})}},pi=class extends iy.MarkdownRenderChild{constructor({app:e,events:t,container:r,source:i}){super(r);switch(this.app=e,this.events=t,this.source=i,this.containerEl.className){case"block-language-tasks":this.query=new mi({source:i}),this.queryType="tasks";break;default:this.query=new
3 years ago
/*!
* 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.
***************************************************************************** */