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.

188 lines
209 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
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 Kf=Object.create;var Dr=Object.defineProperty,Vf=Object.defineProperties,Zf=Object.getOwnPropertyDescriptor,Qf=Object.getOwnPropertyDescriptors,Xf=Object.getOwnPropertyNames,Ga=Object.getOwnPropertySymbols,Jf=Object.getPrototypeOf,Ha=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable;var za=(r,e,t)=>e in r?Dr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,We=(r,e)=>{for(var t in e||(e={}))Ha.call(e,t)&&za(r,t,e[t]);if(Ga)for(var t of Ga(e))eh.call(e,t)&&za(r,t,e[t]);return r},It=(r,e)=>Vf(r,Qf(e)),Ka=r=>Dr(r,"__esModule",{value:!0});var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),th=(r,e)=>{Ka(r);for(var t in e)Dr(r,t,{get:e[t],enumerable:!0})},rh=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xf(e))!Ha.call(r,n)&&n!=="default"&&Dr(r,n,{get:()=>e[n],enumerable:!(t=Zf(e,n))||t.enumerable});return r},Le=r=>rh(Ka(Dr(r!=null?Kf(Jf(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var te=(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 wo=p((Iv,An)=>{var ro,no,io,so,ao,oo,uo,lo,co,On,Oi,fo,ho,Xt,po,mo,yo,go,_o,To,bo,vo,Do;(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 An=="object"&&typeof An.exports=="object"?r(t(e,t(An.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])};ro=function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},no=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},io=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},so=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},ao=function(t,n){return function(i,s){n(i,s,t)}},oo=function(t,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,n)},uo=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{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,n||[])).next())})},lo=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(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]===2)){i=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(c[0]===6&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(t,i)}catch(f){c=[6,f],a=0}finally{s=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Do=function(t,n,i,s){s===void 0&&(s=i),t[s]=n[i]},co=function(t,n){for(var i in t)i!=="default"&&!n.hasOwnProperty(i)&&(n[i]=t[i])},On=function(t){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&t[n],s=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Oi=function(t,n){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var s=i.call(t),a,o=[],u;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)o.push(a.value)}catch(l){u={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(u)throw u.error}}return o},fo=function(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(Oi(arguments[n]));return t},ho=function(){for(var t=0,n=0,i=arguments.length;n<i;n++)t+=arguments[n].length;for(var s=Array(t),a=0,n=0;n<i;n++)for(var o=arguments[n],u=0,l=o.length;u<l;u++,a++)s[a]=o[u];return s},Xt=function(t){return this instanceof Xt?(this.v=t,this):new Xt(t)},po=function(t,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=i.apply(t,n||[]),a,o=[];return a={},u("next"),u("throw"),u("return"),a[Symbol.asyncIterator]=function(){return this},a;function u(m){s[m]&&(a[m]=function(g){return new Promise(function(b,O){o.push([m,g,b,O])>1||l(m,g)})})}function l(m,g){try{d(s[m](g))}catch(b){h(o[0][3],b)}}function d(m){m.value instanceof Xt?Promise.resolve(m.value.v).then(c,f):h(o[0][2],m)}function c(m){l("next",m)}function f(m){l("throw",m)}function h(m,g){m(g),o.shift(),o.length&&l(o[0][0],o[0][1])}},mo=function(t){var n,i;return n={},s("next"),s("throw",function(a){throw a}),s("return"),n[Symbol.iterator]=function(){return this},n;function s(a,o){n[a]=t[a]?function(u){return(i=!i)?{value:Xt(t[a](u)),done:a==="return"}:o?o(u):u}:o}},yo=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],i;return n?n.call(t):(t=typeof On=="function"?On(t):t[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(o){i[o]=t[o]&&function(u){return new Promise(function(l,d){u=t[o](u),a(l,d,u.done,u.value)})}}function a(o,u,l,d){Promise.resolve(d).then(function(c){o({value:c,done:l})},u)}},go=function(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t},_o=function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var i in t)Object.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n.default=t,n},To=function(t){return t&&t.__esModule?t:{default:t}},bo=function(t,n){if(!n.has(t))throw new TypeError("attempted to get private field on non-instance");return n.get(t)},vo=function(t,n,i){if(!n.has(t))throw new TypeError("attempted to set private field on non-instance");return n.set(t,i),i},r("__extends",ro),r("__assign",no),r("__rest",io),r("__decorate",so),r("__param",ao),r("__metadata",oo),r("__awaiter",uo),r("__generator",lo),r("__exportStar",co),r("__createBinding",Do),r("__values",On),r("__read",Oi),r("__spread",fo),r("__spreadArrays",ho),r("__await",Xt),r("__asyncGenerator",po),r("__asyncDelegator",mo),r("__asyncValues",yo),r("__makeTemplateObject",go),r("__importStar",_o),r("__importDefault",To),r("__classPrivateFieldGet",bo),r("__classPrivateFieldSet",vo)})});var ae=p(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.matchAnyPattern=Et.extractTerms=Et.repeatedTimeunitPattern=void 0;function zh(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s*(?:,?\\s{0,5}${t}){0,10}`}Et.repeatedTimeunitPattern=zh;function yu(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Et.extractTerms=yu;function Kh(r){return`(?:${yu(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Et.matchAnyPattern=Kh});var be=p((ji,Bi)=>{(function(r,e){typeof ji=="object"&&typeof Bi!="undefined"?Bi.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(ji,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",d="quarter",c="year",f="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},O=function(w,v,y){var E=String(w);return!E||E.length>=v?w:""+Array(v+1-E.length).join(y)+w},K={s:O,z:function(w){var v=-w.utcOffset(),y=Math.abs(v),E=Math.floor(y/60),T=y%60;return(v<=0?"+":"-")+O(E,2,"0")+":"+O(T,2,"0")},m:function w(v,y){if(v.date()<y.date())return-w(y,v);var E=12*(y.year()-v.year())+(y.month()-v.month()),T=v.clone().add(E,l),k=y-T<0,M=v.clone().add(E+(k?-1:1),l);return+(-(E+(y-T)/(k?T-M:M-T))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:l,y:c,w:u,d:o,D:f,h:a,m:s,s:i,ms:n,Q:d}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},J="en",j={};j[J]=b;var V=function(w){return w instanceof ne},re=function(w,v,y){var E;if(!w)return J;if(typeof w=="string")j[w]&&(E=w),v&&(j[w]=v,E=w);else{var T=w.name;j[T]=w,E=T}return!y&&E&&(J=E),E||!y&&J},x=function(w,v){if(V(w))return w.clone();var y=typeof v=="object"?v:{};return y.date=w,y.args=arguments,new ne(y)},R=K;R.l=re,R.i=V,R.w=function(w,v){return x(w,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var ne=function(){function w(y){this.$L=re(y.locale,null,!0),this.parse(y)}var v=w.prototype;return v.parse=function(y){this.$d=function(E){var T=E.date,k=E.utc;if(T===null)return new Date(NaN);if(R.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var M=T.match(m);if(M){var G=M[2]-1||0,ee=(M[7]||"0").substring(0,3);return k?new Date(Date.UTC(M[1],G,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ee)):new Date(M[1],G,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ee)}}return new Date(T)}(y),this.$x=y.x||{},this.init()},v.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},v.$utils=function(){return R},v.isValid=function(){return this.$d.toString()!==h},v.isSame=function(y,E){var T=x(y);return this.startOf(E)<=T&&T<=this.endOf(E)},v.isAfter=function(y,E){return x(y)<this.startOf(E)},v.isBefore=function(y,E){return this.endOf(E)<x(y)},v.$g=function(y,E,T){return R.u(y)?this[E]:this.set(T,y)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(y,E){var T=this,k=!!R.u(E)||E,M=R.p(y),G=function(Me,fe){var ze=R.w(T.$u?Date.UTC(T.$y,fe,Me):new Date(T.$y,fe,Me),T);return k?ze:ze.endOf(o)},ee=function(Me,fe){return R.w(T.toDate()[Me].apply(T.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(fe)),T)},q=this.$W,de=this.$M,Ie=this.$D,$e="set"+(this.$u?"UTC":"");switch(M){case c:return k?G(1,0):G(31,11);case l:return k?G(1,de):G(0,de+1);case u:var tt=this.$locale().weekStart||0,yt=(q<tt?q+7:q)-tt;return G(k?Ie-yt:Ie+(6-yt),de);case o:case f:return ee($e+"Hours",0);case a:return ee($e+"Minutes",1);case s:return ee($e+"Seconds",2);case i:return ee($e+"Milliseconds",3);default:return this.clone()}},v.endOf=function(y){return this.startOf(y,!1)},v.$set=function(y,E){var T,k=R.p(y),M="set"+(this.$u?"UTC":""),G=(T={},T[o]=M+"Date",T[f]=M+"Date",T[l]=M+"Month",T[c]=M+"FullYear",T[a]=M+"Hours",T[s]=M+"Minutes",T[i]=M+"Seconds",T[n]=M+"Milliseconds",T)[k],ee=k===o?this.$D+(E-this.$W):E;if(k===l||k===c){var q=this.clone().set(f,1);q.$d[G](ee),q.init(),this.$d=q.set(f,Math.min(this.$D,q.daysInMonth())).$d}else G&&this.$d[G](ee);return this.init(),this},v.set=function(y,E){return this.clone().$set(y,E)},v.get=function(y){return this[R.p(y)]()},v.add=function(y,E){var T,k=this;y=Number(y);var M=R.p(E),G=function(de){var Ie=x(k);return R.w(Ie.date(Ie.date()+Math.round(de*y)),k)};if(M===l)return this.set(l,this.$M+y);if(M===c)return this.set(c,this.$y+y);if(M===o)return G(1);if(M===u)return G(7);var ee=(T={},T[s]=e,T[a]=t,T[i]=r,T)[M]||1,q=this.$d.getTime()+y*ee;return R.w(q,this)},v.subtract=function(y,E){return this.add(-1*y,E)},v.format=function(y){var E=this,T=this.$locale();if(!this.isValid())return T.invalidDate||h;var k=y||"YYYY-MM-DDTHH:mm:ssZ",M=R.z(this),G=this.$H,ee=this.$m,q=this.$M,de=T.weekdays,Ie=T.months,$e=function(fe,ze,Fe,Nt){return fe&&(fe[ze]||fe(E,k))||Fe[ze].substr(0,Nt)},tt=function(fe){return R.s(G%12||12,fe,"0")},yt=T.meridiem||function(fe,ze,Fe){var Nt=fe<12?"AM":"PM";return Fe?Nt.toLowerCase():Nt},Me={YY:String(this.$y).slice(-2),YYYY:this.$y,M:q+1,MM:R.s(q+1,2,"0"),MMM:$e(T.monthsShort,q,Ie,3),MMMM:$e(Ie,q),D:this.$D,DD:R.s(this.$D,2,"0"),d:String(this.$W),dd:$e(T.weekdaysMin,this.$W,de,2),ddd:$e(T.weekdaysShort,this.$W,de,3),dddd:de[this.$W],H:String(G),HH:R.s(G,2,"0"),h:tt(1),hh:tt(2),a:yt(G,ee,!0),A:yt(G,ee,!1),m:String(ee),mm:R.s(ee,2,"0"),s:String(this.$s),ss:R.s(this.$s,2,"0"),SSS:R.s(this.$ms,3,"0"),Z:M};return k.replace(g,function(fe,ze){return ze||Me[fe]||M.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(y,E,T){var k,M=R.p(E),G=x(y),ee=(G.utcOffset()-this.utcOffset())*e,q=this-G,de=R.m(this,G);return de=(k={},k[c]=de/12,k[l]=de,k[d]=de/3,k[u]=(q-ee)/6048e5,k[o]=(q-ee)/864e5,k[a]=q/t,k[s]=q/e,k[i]=q/r,k)[M]||q,T?de:R.a(de)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return j[this.$L]},v.locale=function(y,E){if(!y)return this.$L;var T=this.clone(),k=re(y,E,!0);return k&&(T.$L=k),T},v.clone=function(){return R.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},w}(),Ce=ne.prototype;return x.prototype=Ce,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",o],["$M",l],["$y",c],["$D",f]].forEach(function(w){Ce[w[1]]=function(v){return this.$g(v,w[0],w[1])}}),x.extend=function(w,v){return w.$i||(w(v,ne,x),w.$i=!0),x},x.locale=re,x.isDayjs=V,x.unix=function(w){return x(1e3*w)},x.en=j[J],x.Ls=j,x.p={},x})});var Ne=p(kt=>{"use strict";var Vh=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.findYearClosestToRef=kt.findMostLikelyADYear=void 0;var Zh=Vh(be());function Qh(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}kt.findMostLikelyADYear=Qh;function Xh(r,e,t){let n=Zh.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n))<Math.abs(i.diff(n))?i=s:Math.abs(a.diff(n))<Math.abs(i.diff(n))&&(i=a),i.year()}kt.findYearClosestToRef=Xh});var Re=p(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.parseTimeUnits=C.TIME_UNITS_PATTERN=C.parseYear=C.YEAR_PATTERN=C.parseOrdinalNumberPattern=C.ORDINAL_NUMBER_PATTERN=C.parseNumberPattern=C.NUMBER_PATTERN=C.TIME_UNIT_DICTIONARY=C.ORDINAL_WORD_DICTIONARY=C.INTEGER_WORD_DICTIONARY=C.MONTH_DICTIONARY=C.FULL_MONTH_NAME_DICTIONARY=C.WEEKDAY_DICTIONARY=void 0;var Ln=ae(),Jh=Ne();C.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};C.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};C.MONTH_DICTIONARY=Object.assign(Object.assign({},C.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});C.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};C.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};C.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",y:"year",yr:"year",year:"year",years:"year"};C.NUMBER_PATTERN=`(?:${Ln.matchAnyPattern(C.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function gu(r){let e=r.toLowerCase();return C.INTEGER_WORD_DICTIONARY[e]!==void 0?C.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}C.parseNumberPattern=gu;C.ORDINAL_NUMBER_PATTERN=`(?:${Ln.matchAnyPattern(C.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function ep(r){let e=r.toLowerCase();return C.ORDINAL_WORD_DICTIONARY[e]!==void 0?C.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}C.parseOrdinalNumberPattern=ep;C.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:BE|AD|BC)|[1-2][0-9]{3}|[5-9][0-9])";function tp(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r))return r=r.replace(/AD/i,""),parseInt(r);let e=parseInt(r);return Jh.findMostLikelyADYear(e)}C.parseYear=tp;var _u=`(${C.NUMBER_PATTERN})\\s{0,5}(${Ln.matchAnyPattern(C.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Tu=new RegExp(_u,"i");C.TIME_UNITS_PATTERN=Ln.repeatedTimeunitPattern("(?:(?:about|around)\\s*)?",_u);function rp(r){let e={},t=r,n=Tu.exec(t);for(;n;)np(e,n),t=t.substring(n[0].length),n=Tu.exec(t);return e}C.parseTimeUnits=rp;function np(r,e){let t=gu(e[1]),n=C.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var bu=p((Gi,Hi)=>{(function(r,e){typeof Gi=="object"&&typeof Hi!="undefined"?Hi.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Gi,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),d=!!l.u(u)||u;if(l.p(o)===e){var c=this.quarter()-1;return d?this.month(3*c).startOf(r).startOf("day"):this.month(3*c+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var Ve=p(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.implySimilarTime=nt.assignSimilarTime=nt.assignSimilarDate=nt.assignTheNextDay=void 0;function ip(r,e){e=e.add(1,"day"),vu(r,e),Du(r,e)}nt.assignTheNextDay=ip;function vu(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}nt.assignSimilarDate=vu;function sp(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.assign("timezoneOffset",e.utcOffset())}nt.assignSimilarTime=sp;function Du(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond()),r.imply("timezoneOffset",e.utcOffset())}nt.implySimilarTime=Du});var Ge=p(Rt=>{"use strict";var wu=Rt&&Rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.ParsingResult=Rt.ParsingComponents=void 0;var ap=wu(bu()),Yn=wu(be()),zi=Ve();Yn.default.extend(ap.default);var ir=class{constructor(e,t){if(this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Yn.default(e);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new ir(new Date);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.isCertain("timezoneOffset")?this.dateWithoutTimezoneAdjustment():this.date();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}]`}dayjs(){return Yn.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getTimezoneAdjustmentMinute(e){var t;e=e!=null?e:new Date;let n=-e.getTimezoneOffset(),i=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:n;return n-i}static createRelativeFromRefDate(e,t){let n=Yn.default(e);for(let s in t)n=n.add(t[s],s);let i=new ir(e);return t.hour||t.minute||t.second?(zi.assignSimilarTime(i,n),zi.assignSimilarDate(i,n)):(zi.implySimilarTime(i,n),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};Rt.ParsingComponents=ir;var Un=class{constructor(e,t,n,i,s){this.refDate=e,this.index=t,this.text=n,this.start=i||new ir(this.refDate),this.end=s}clone(){let e=new Un(this.refDate,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};Rt.ParsingResult=Un});var N=p(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.AbstractParserWithWordBoundaryChecking=void 0;var Eu=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`(\\W|^)${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){let n=t[1];t.index=t.index+n.length,t[0]=t[0].substring(n.length);for(let i=2;i<t.length;i++)t[i-1]=t[i];return this.innerExtract(e,t)}};qn.AbstractParserWithWordBoundaryChecking=Eu});var Ru=p(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Ki=Re(),op=Ge(),up=N(),lp=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ki.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),cp=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Ki.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),ku=class extends up.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?cp:lp}innerExtract(e,t){let n=Ki.parseTimeUnits(t[1]);return op.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};Vi.default=ku});var Nu=p(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});var dp=Ne(),Pu=Re(),Mu=Re(),$n=Re(),fp=ae(),hp=N(),pp=new RegExp(`(?:on\\s*?)?(${$n.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:to|\\-|\\\u2013|until|through|till|\\s)\\s*(${$n.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+fp.matchAnyPattern(Pu.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Mu.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ou=1,Au=2,mp=3,xu=4,Cu=class extends hp.AbstractParserWithWordBoundaryChecking{innerPattern(){return pp}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Pu.MONTH_DICTIONARY[t[mp].toLowerCase()],s=$n.parseOrdinalNumberPattern(t[Ou]);if(s>31)return t.index=t.index+t[Ou].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[xu]){let a=Mu.parseYear(t[xu]);n.start.assign("year",a)}else{let a=dp.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Au]){let a=$n.parseOrdinalNumberPattern(t[Au]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Zi.default=Cu});var Yu=p(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var yp=Ne(),Su=Re(),jn=Re(),Iu=Re(),gp=ae(),_p=N(),Tp=new RegExp(`(${gp.matchAnyPattern(Su.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${jn.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${jn.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Iu.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),bp=1,vp=2,Fu=3,Wu=4,Lu=class extends _p.AbstractParserWithWordBoundaryChecking{innerPattern(){return Tp}innerExtract(e,t){let n=Su.MONTH_DICTIONARY[t[bp].toLowerCase()],i=jn.parseOrdinalNumberPattern(t[vp]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[Wu]){let u=Iu.parseYear(t[Wu]);s.assign("year",u)}else{let u=yp.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Fu])return s;let a=jn.parseOrdinalNumberPattern(t[Fu]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Qi.default=Lu});var ju=p(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});var Xi=Re(),Dp=Ne(),wp=ae(),Uu=Re(),Ep=N(),kp=new RegExp(`((?:in)\\s*)?(${wp.matchAnyPattern(Xi.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Uu.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Rp=1,Pp=2,qu=3,$u=class extends Ep.AbstractParserWithWordBoundaryChecking{innerPattern(){return kp}innerExtract(e,t){let n=t[Pp].toLowerCase();if(t[0].length<=3&&!Xi.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[Rp]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=Xi.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[qu]){let a=Uu.parseYear(t[qu]);i.start.assign("year",a)}else{let a=Dp.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};Ji.default=$u});var zu=p(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Bu=Re(),Mp=ae(),Op=N(),Ap=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Mp.matchAnyPattern(Bu.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),xp=1,Cp=2,Gu=3,Np=4,Hu=class extends Op.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ap}innerExtract(e,t){let n=t[Gu]?parseInt(t[Gu]):Bu.MONTH_DICTIONARY[t[Cp].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[xp]);return{day:parseInt(t[Np]),month:n,year:i}}};es.default=Hu});var Vu=p(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var Sp=N(),Ip=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Fp=1,Wp=2,Ku=class extends Sp.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ip}innerExtract(e,t){let n=parseInt(t[Wp]),i=parseInt(t[Fp]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};ts.default=Ku});var ar=p(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AbstractTimeExpressionParser=void 0;var xe=ve();function Lp(r,e){return new RegExp(`(^|\\s|T|\\b)${r}(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\:|\\\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}function Yp(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Zu=2,sr=3,Bn=4,Gn=5,Sr=6,Qu=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Zu]);if(o>100){if(this.strictMode||t[sr]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[sr]!=null){if(t[sr].length==1&&!t[Sr])return null;s=parseInt(t[sr])}if(s>=60)return null;if(o>12&&(a=xe.Meridiem.PM),t[Sr]!=null){if(o>12)return null;let u=t[Sr][0].toLowerCase();u=="a"&&(a=xe.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=xe.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",xe.Meridiem.AM):i.imply("meridiem",xe.Meridiem.PM),t[Gn]!=null){let u=parseInt(t[Gn].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Bn]!=null){let u=parseInt(t[Bn]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Gn]!=null){let u=parseInt(t[Gn].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[Bn]!=null){let u=parseInt(t[Bn]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Zu]),a=0,o=-1;if(t[sr]!=null?a=parseInt(t[sr]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=xe.Meridiem.PM),t[Sr]!=null){if(s>12)return null;let u=t[Sr][0].toLowerCase();u=="a"&&(o=xe.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=xe.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==xe.Meridiem.AM?(n.start.imply("meridiem",xe.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",xe.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",xe.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",xe.Meridiem.PM)):s>12?i.imply("meridiem",xe.Meridiem.PM):s<=12&&i.imply("meridiem",xe.Meridiem.AM),i.date().getTime()<n.start.date().getTime()&&i.imply("day",i.get("day")+1),i}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)$/);if(t){let n=t[1];if(this.strictMode||n.includes(".")&&!n.match(/\d(\.\d{2})+$/)||parseInt(n)>24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Lp(e,t),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=Yp(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Hn.AbstractTimeExpressionParser=Qu});var Ju=p(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var zn=ve(),Up=ar(),Xu=class extends Up.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",zn.Meridiem.PM)):i<6&&n.assign("meridiem",zn.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",zn.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",zn.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};rs.default=Xu});var ur=p(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.addImpliedTimeUnits=or.reverseTimeUnits=void 0;function qp(r){let e={};for(let t in r)e[t]=-r[t];return e}or.reverseTimeUnits=qp;function $p(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}or.addImpliedTimeUnits=$p});var tl=p(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var ns=Re(),jp=Ge(),Bp=N(),Gp=ur(),Hp=new RegExp("("+ns.TIME_UNITS_PATTERN+")(?:ago|before|earlier)(?=(?:\\W|$))","i"),zp=new RegExp("("+ns.TIME_UNITS_PATTERN+")ago(?=(?:\\W|$))","i"),el=class extends Bp.AbstractParserWithWordBoundaryChecking{constructor(e){super();this.strictMode=e}innerPattern(){return this.strictMode?zp:Hp}innerExtract(e,t){let n=ns.parseTimeUnits(t[1]),i=Gp.reverseTimeUnits(n);return jp.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};is.default=el});var nl=p(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var ss=Re(),Kp=Ge(),Vp=N(),Zp=new RegExp("("+ss.TIME_UNITS_PATTERN+")(later|after|from now|henceforth|forward|out)(?=(?:\\W|$))","i"),Qp=new RegExp("("+ss.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Xp=1,rl=class extends Vp.AbstractParserWithWordBoundaryChecking{constructor(e){super();this.strictMode=e}innerPattern(){return this.strictMode?Qp:Zp}innerExtract(e,t){let n=ss.parseTimeUnits(t[Xp]);return Kp.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};as.default=rl});var Ir=p(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.MergingRefiner=lr.Filter=void 0;var il=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};lr.Filter=il;var sl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a<t.length;a++){s=t[a];let o=e.text.substring(i.index+i.text.length,s.index);if(!this.shouldMergeResults(o,i,s,e))n.push(i),i=s;else{let u=i,l=s,d=this.mergeResults(o,u,l,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${u} and ${l} into ${d}`)}),i=d}}return i!=null&&n.push(i),n}};lr.MergingRefiner=sl});var $t=p(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var Jp=Ir(),al=class extends Jp.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index<n.index?i.text=t.text+e+n.text:i.text=n.text+e+t.text,i}};os.default=al});var ul=p(Fr=>{"use strict";var em=Fr&&Fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fr,"__esModule",{value:!0});var tm=em($t()),ol=class extends tm.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Fr.default=ol});var ll=p(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.mergeDateTimeComponent=cr.mergeDateTimeResult=void 0;var rm=ve();function nm(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=us(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=us(s,a);r.end==null&&o.date().getTime()<t.start.date().getTime()&&(o.isCertain("day")?o.assign("day",o.get("day")+1):o.imply("day",o.get("day")+1)),t.end=o}return t}cr.mergeDateTimeResult=nm;function us(r,e){let t=r.clone();return e.isCertain("hour")?(t.assign("hour",e.get("hour")),t.assign("minute",e.get("minute")),e.isCertain("second")?(t.assign("second",e.get("second")),e.isCertain("millisecond")?t.assign("millisecond",e.get("millisecond")):t.imply("millisecond",e.get("millisecond"))):(t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond")))):(t.imply("hour",e.get("hour")),t.imply("minute",e.get("minute")),t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond"))),e.isCertain("timezoneOffset")&&t.assign("timezoneOffset",e.get("timezoneOffset")),e.isCertain("meridiem")?t.assign("meridiem",e.get("meridiem")):e.get("meridiem")!=null&&t.get("meridiem")==null&&t.imply("meridiem",e.get("meridiem")),t.get("meridiem")==rm.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}cr.mergeDateTimeComponent=us});var dr=p(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var im=Ir(),cl=ll(),dl=class extends im.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?cl.mergeDateTimeResult(t,n):cl.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};ls.default=dl});var hl=p(Wr=>{"use strict";var sm=Wr&&Wr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wr,"__esModule",{value:!0});var am=sm(dr()),fl=class extends am.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Wr.default=fl});var ml=p(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var om=new RegExp("^\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),um={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},pl=class{constructor(e){this.timezone=Object.assign(Object.assign({},um),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=om.exec(u);if(!l)return;let d=l[1].toUpperCase(),c=(o=(a=i[d])!==null&&a!==void 0?a:this.timezone[d])!==null&&o!==void 0?o:null;if(c===null)return;e.debug(()=>{console.log(`Extracting timezone: '${d}' into : ${c}`)});let f=s.start.get("timezoneOffset");f!==null&&c!=f||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",c),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",c))}),t}};cs.default=pl});var gl=p(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var lm=new RegExp("^\\s*(?:(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?","i"),cm=1,dm=2,fm=3,yl=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=lm.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[dm]),o=parseInt(s[fm]||"0"),u=a*60+o;s[cm]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0]}),t}};ds.default=yl});var Tl=p(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var _l=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;s<t.length;s++){let a=t[s];a.index<i.index+i.text.length?a.text.length>i.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};fs.default=_l});var vl=p(Lr=>{"use strict";var hm=Lr&&Lr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Lr,"__esModule",{value:!0});var pm=hm(be()),bl=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=pm.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Lr.default=bl});var wl=p(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var mm=Ir(),Dl=class extends mm.Filter{constructor(e){super();this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};hs.default=Dl});var ms=p(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var ym=N(),gm=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),_m=1,Tm=2,bm=3,El=4,vm=5,kl=6,Rl=7,Pl=8,Ml=9,Ol=class extends ym.AbstractParserWithWordBoundaryChecking{innerPattern(){return gm}innerExtract(e,t){let n={};if(n.year=parseInt(t[_m]),n.month=parseInt(t[Tm]),n.day=parseInt(t[bm]),t[El]!=null)if(n.hour=parseInt(t[El]),n.minute=parseInt(t[vm]),t[kl]!=null&&(n.second=parseInt(t[kl])),t[Rl]!=null&&(n.millisecond=parseInt(t[Rl])),t[Pl]==null)n.timezoneOffset=0;else{let i=parseInt(t[Pl]),s=0;t[Ml]!=null&&(s=parseInt(t[Ml]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};ps.default=Ol});var xl=p(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var Dm=Ir(),Al=class extends Dm.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};ys.default=Al});var hr=p(fr=>{"use strict";var jt=fr&&fr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fr,"__esModule",{value:!0});fr.includeCommonConfiguration=void 0;var wm=jt(ml()),Em=jt(gl()),Cl=jt(Tl()),km=jt(vl()),Rm=jt(wl()),Pm=jt(ms()),Mm=jt(xl());function Om(r,e=!1){return r.parsers.unshift(new Pm.default),r.refiners.unshift(new Mm.default),r.refiners.unshift(new wm.default),r.refiners.unshift(new Em.default),r.refiners.unshift(new Cl.default),r.refiners.push(new Cl.default),r.refiners.push(new km.default),r.refiners.push(new Rm.default(e)),r}fr.includeCommonConfiguration=Om});var Bt=p(Se=>{"use strict";var Am=Se&&Se.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Se,"__esModule",{value:!0});Se.tonight=Se.tomorrow=Se.yesterday=Se.today=Se.now=void 0;var Yr=Ge(),Ur=Am(be()),Pt=Ve(),xm=ve();function Cm(r){let e=Ur.default(r),t=new Yr.ParsingComponents(r,{});return Pt.assignSimilarDate(t,e),Pt.assignSimilarTime(t,e),t}Se.now=Cm;function Nm(r){let e=Ur.default(r),t=new Yr.ParsingComponents(r,{});return Pt.assignSimilarDate(t,e),Pt.implySimilarTime(t,e),t}Se.today=Nm;function Sm(r){let e=Ur.default(r),t=new Yr.ParsingComponents(r,{});return e=e.add(-1,"day"),Pt.assignSimilarDate(t,e),Pt.implySimilarTime(t,e),t}Se.yesterday=Sm;function Im(r){let e=Ur.default(r),t=new Yr.ParsingComponents(r,{});return Pt.assignTheNextDay(t,e),t}Se.tomorrow=Im;function Fm(r,e=22){let t=Ur.default(r),n=new Yr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",xm.Meridiem.PM),Pt.assignSimilarDate(n,t),n}Se.tonight=Fm});var Sl=p(Ze=>{"use strict";var Wm=Ze&&Ze.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Lm=Ze&&Ze.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ym=Ze&&Ze.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Wm(e,r,t);return Lm(e,r),e},Um=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});var qm=Um(be()),$m=N(),jm=Ve(),qr=Ym(Bt()),Bm=/(now|today|tonight|tomorrow|tmr|yesterday|last\s*night)(?=\W|$)/i,Nl=class extends $m.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Bm}innerExtract(e,t){let n=qm.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return qr.now(e.refDate);case"today":return qr.today(e.refDate);case"yesterday":return qr.yesterday(e.refDate);case"tomorrow":case"tmr":return qr.tomorrow(e.refDate);case"tonight":return qr.tonight(e.refDate);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),jm.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};Ze.default=Nl});var Fl=p($r=>{"use strict";var Gm=$r&&$r.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($r,"__esModule",{value:!0});var Kn=ve(),Hm=N(),zm=Gm(be()),Km=Ve(),Vm=/(?:this)?\s*(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Il=class extends Hm.AbstractParserWithWordBoundaryChecking{innerPattern(){return Vm}innerExtract(e,t){let n=zm.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Kn.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Kn.Meridiem.PM),i.imply("hour",20);break;case"midnight":Km.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Kn.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Kn.Meridiem.AM),i.imply("hour",12);break}return i}};$r.default=Il});var pr=p(Mt=>{"use strict";var Zm=Mt&&Mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.toDayJSClosestWeekday=Mt.toDayJSWeekday=void 0;var Wl=Zm(be());function Qm(r,e,t){if(!t)return Ll(r,e);let n=Wl.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}Mt.toDayJSWeekday=Qm;function Ll(r,e){let t=Wl.default(r),n=t.day();return Math.abs(e-7-n)<Math.abs(e-n)?t=t.day(e-7):Math.abs(e+7-n)<Math.abs(e-n)?t=t.day(e+7):t=t.day(e),t}Mt.toDayJSClosestWeekday=Ll});var ql=p(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Yl=Re(),Xm=ae(),Jm=N(),ey=pr(),ty=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${Xm.matchAnyPattern(Yl.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),ry=1,ny=2,iy=3,Ul=class extends Jm.AbstractParserWithWordBoundaryChecking{innerPattern(){return ty}innerExtract(e,t){let n=t[ny].toLowerCase(),i=Yl.WEEKDAY_DICTIONARY[n],s=t[ry],a=t[iy],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=ey.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};gs.default=Ul});var Gl=p(jr=>{"use strict";var sy=jr&&jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jr,"__esModule",{value:!0});var $l=Re(),jl=Ge(),ay=sy(be()),oy=N(),uy=ae(),ly=new RegExp(`(this|next|last|past)\\s*(${uy.matchAnyPattern($l.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),cy=1,dy=2,Bl=class extends oy.AbstractParserWithWordBoundaryChecking{innerPattern(){return ly}innerExtract(e,t){let n=t[cy].toLowerCase(),i=t[dy].toLowerCase(),s=$l.TIME_UNIT_DICTIONARY[i];if(n=="next"){let u={};return u[s]=1,jl.ParsingComponents.createRelativeFromRefDate(e.refDate,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,jl.ParsingComponents.createRelativeFromRefDate(e.refDate,u)}let a=e.createParsingComponents(),o=ay.default(e.refDate);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};jr.default=Bl});var Ot=p(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.ParsingContext=mr.Chrono=void 0;var Br=Ge(),fy=Ts(),Gr=class{constructor(e){e=e||fy.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Gr({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new _s(e,t||new Date,n||{}),s=[];return this.parsers.forEach(a=>{let o=Gr.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let d=null;l instanceof Br.ParsingResult?d=l:l instanceof Br.ParsingComponents?(d=e.createParsingResult(o.index,o[0]),d.start=l):d=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${d}`)),n.push(d),a=s.substring(u+d.text.length),o=i.exec(a)}return n}};mr.Chrono=Gr;var _s=class{constructor(e,t,n){this.text=e,this.refDate=t,this.option=n}createParsingComponents(e){return e instanceof Br.ParsingComponents?e:new Br.ParsingComponents(this.refDate,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new Br.ParsingResult(this.refDate,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};mr.ParsingContext=_s});var yr=p(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Hl=Ne(),hy=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Vn=1,zl=5,Kl=2,Vl=3,bs=4,Zl=class{constructor(e){this.groupNumberMonth=e?Vl:Kl,this.groupNumberDay=e?Kl:Vl}pattern(){return hy}extract(e,t){if(t[Vn]=="/"||t[zl]=="/"){t.index+=t[0].length;return}let n=t.index+t[Vn].length,i=t[0].substr(t[Vn].length,t[0].length-t[Vn].length-t[zl].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[bs]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[bs]){let u=parseInt(t[bs]),l=Hl.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=Hl.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};vs.default=Zl});var Jl=p(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});var Ql=Re(),py=Ge(),my=N(),yy=ur(),gy=new RegExp(`(this|last|past|next|\\+|-)\\s*(${Ql.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Xl=class extends my.AbstractParserWithWordBoundaryChecking{innerPattern(){return gy}innerExtract(e,t){let n=t[1].toLowerCase(),i=Ql.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=yy.reverseTimeUnits(i);break}return py.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};Ds.default=Xl});var Ts=p(ce=>{"use strict";var De=ce&&ce.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ce,"__esModule",{value:!0});ce.createConfiguration=ce.createCasualConfiguration=ce.parseDate=ce.parse=ce.GB=ce.strict=ce.casual=void 0;var _y=De(Ru()),Ty=De(Nu()),by=De(Yu()),vy=De(ju()),Dy=De(zu()),wy=De(Vu()),Ey=De(Ju()),ky=De(tl()),Ry=De(nl()),Py=De(ul()),My=De(hl()),Oy=hr(),Ay=De(Sl()),xy=De(Fl()),Cy=De(ql()),Ny=De(Gl()),ws=Ot(),Sy=De(yr()),Iy=De(Jl());ce.casual=new ws.Chrono(ec(!1));ce.strict=new ws.Chrono(Zn(!0,!1));ce.GB=new ws.Chrono(Zn(!1,!0));function Fy(r,e,t){return ce.casual.parse(r,e,t)}ce.parse=Fy;function Wy(r,e,t){return ce.casual.parseDate(r,e,t)}ce.parseDate=Wy;function ec(r=!1){let e=Zn(!1,r);return e.parsers.unshift(new Ay.default),e.parsers.unshift(new xy.default),e.parsers.unshift(new vy.default),e.parsers.unshift(new Ny.default),e.parsers.unshift(new Iy.default),e}ce.createCasualConfiguration=ec;function Zn(r=!0,e=!1){return Oy.includeCommonConfiguration({parsers:[new Sy.default(e),new _y.default,new Ty.default,new by.default,new Cy.default,new Dy.default,new wy.default,new Ey.default(r),new ky.default(r),new Ry.default(r)],refiners:[new My.default,new Py.default]},r)}ce.createConfiguration=Zn});var nc=p(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var Ly=ar(),tc=ve(),rc=class extends Ly.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}primarySuffix(){return"(?:\\s*uhr)?(?:\\s*(?:morgens|vormittags|nachmittags|abends|nachts))?(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);return n&&((t[0].endsWith("morgens")||t[0].endsWith("vormittags"))&&(n.assign("meridiem",tc.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour"))),(t[0].endsWith("nachmittags")||t[0].endsWith("abends")||t[0].endsWith("nachts"))&&(n.assign("meridiem",tc.Meridiem.PM),n.get("hour")<12&&n.assign("hour",n.get("hour")+12))),n}};Es.default=rc});var Qn=p(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.parseTimeUnits=z.TIME_UNITS_PATTERN=z.parseYear=z.YEAR_PATTERN=z.parseNumberPattern=z.NUMBER_PATTERN=z.TIME_UNIT_DICTIONARY=z.INTEGER_WORD_DICTIONARY=z.MONTH_DICTIONARY=z.WEEKDAY_DICTIONARY=void 0;var ks=ae(),Yy=Ne();z.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};z.MONTH_DICTIONARY={januar:1,jan:1,"jan.":1,februar:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};z.INTEGER_WORD_DICTIONARY={eins:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};z.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",y:"year",yr:"year",year:"year",years:"year"};z.NUMBER_PATTERN=`(?:${ks.matchAnyPattern(z.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function ic(r){let e=r.toLowerCase();return z.INTEGER_WORD_DICTIONARY[e]!==void 0?z.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}z.parseNumberPattern=ic;z.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*C(?:hr)?\\.?)?)";function Uy(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return Yy.findMostLikelyADYear(e)}z.parseYear=Uy;var sc=`(${z.NUMBER_PATTERN})\\s{0,5}(${ks.matchAnyPattern(z.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ac=new RegExp(sc,"i");z.TIME_UNITS_PATTERN=ks.repeatedTimeunitPattern("",sc);function qy(r){let e={},t=r,n=ac.exec(t);for(;n;)$y(e,n),t=t.substring(n[0].length),n=ac.exec(t);return e}z.parseTimeUnits=qy;function $y(r,e){let t=ic(e[1]),n=z.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var lc=p(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var oc=Qn(),jy=ae(),By=N(),Gy=pr(),Hy=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${jy.matchAnyPattern(oc.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),zy=1,Ky=3,Vy=2,uc=class extends By.AbstractParserWithWordBoundaryChecking{innerPattern(){return Hy}innerExtract(e,t){let n=t[Vy].toLowerCase(),i=oc.WEEKDAY_DICTIONARY[n],s=t[zy],a=t[Ky],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=Gy.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Rs.default=uc});var dc=p(Hr=>{"use strict";var Zy=Hr&&Hr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hr,"__esModule",{value:!0});var Qy=Zy($t()),cc=class extends Qy.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Hr.default=cc});var hc=p(zr=>{"use strict";var Xy=zr&&zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zr,"__esModule",{value:!0});var Jy=Xy(dr()),fc=class extends Jy.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};zr.default=fc});var Ps=p(Kr=>{"use strict";var eg=Kr&&Kr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Kr,"__esModule",{value:!0});var tg=eg(be()),Gt=ve(),rg=N(),ng=Ve(),ig=ur(),Xn=class extends rg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=tg.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return ng.implySimilarTime(s,n),Xn.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=ig.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",Gt.Meridiem.AM);break}return e}};Kr.default=Xn});var gc=p(Qe=>{"use strict";var sg=Qe&&Qe.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ag=Qe&&Qe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),og=Qe&&Qe.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&sg(e,r,t);return ag(e,r),e},pc=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});var ug=pc(be()),lg=N(),Ht=Ve(),cg=pc(Ps()),mc=og(Bt()),dg=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),fg=1,hg=2,yc=class extends lg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return dg}innerExtract(e,t){let n=ug.default(e.refDate),i=(t[fg]||"").toLowerCase(),s=(t[hg]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=mc.now(e.refDate);break;case"heute":a=mc.today(e.refDate);break;case"morgen":Ht.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Ht.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Ht.assignSimilarDate(a,n),Ht.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Ht.assignSimilarDate(a,n),Ht.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Ht.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=cg.default.extractTimeComponents(a,s)),a}};Qe.default=yc});var Ec=p(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var pg=Ne(),_c=Qn(),Tc=Qn(),mg=ae(),yg=N(),gg=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${mg.matchAnyPattern(_c.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Tc.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),bc=1,vc=2,_g=3,Dc=4,wc=class extends yg.AbstractParserWithWordBoundaryChecking{innerPattern(){return gg}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=_c.MONTH_DICTIONARY[t[_g].toLowerCase()],s=parseInt(t[bc]);if(s>31)return t.index=t.index+t[bc].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Dc]){let a=Tc.parseYear(t[Dc]);n.start.assign("year",a)}else{let a=pg.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[vc]){let a=parseInt(t[vc]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Ms.default=wc});var Pc=p(pe=>{"use strict";var dt=pe&&pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pe,"__esModule",{value:!0});pe.createConfiguration=pe.createCasualConfiguration=pe.parseDate=pe.parse=pe.strict=pe.casual=void 0;var Tg=hr(),kc=Ot(),bg=dt(yr()),vg=dt(ms()),Dg=dt(nc()),wg=dt(lc()),Eg=dt(dc()),kg=dt(hc()),Rg=dt(gc()),Pg=dt(Ps()),Mg=dt(Ec());pe.casual=new kc.Chrono(Rc());pe.strict=new kc.Chrono(Os(!0));function Og(r,e,t){return pe.casual.parse(r,e,t)}pe.parse=Og;function Ag(r,e,t){return pe.casual.parseDate(r,e,t)}pe.parseDate=Ag;function Rc(r=!0){let e=Os(!1,r);return e.parsers.unshift(new Pg.default),e.parsers.unshift(new Rg.default),e}pe.createCasualConfiguration=Rc;function Os(r=!0,e=!0){return Tg.includeCommonConfiguration({parsers:[new vg.default,new bg.default(e),new Dg.default,new Mg.default,new wg.default],refiners:[new Eg.default,new kg.default]},r)}pe.createConfiguration=Os});var Ac=p(Xe=>{"use strict";var xg=Xe&&Xe.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Cg=Xe&&Xe.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ng=Xe&&Xe.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&xg(e,r,t);return Cg(e,r),e},Sg=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});var Ig=Sg(be()),Fg=ve(),Wg=N(),Mc=Ve(),Jn=Ng(Bt()),Oc=class extends Wg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=Ig.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return Jn.now(e.refDate);case"aujourd'hui":return Jn.today(e.refDate);case"hier":return Jn.yesterday(e.refDate);case"demain":return Jn.tomorrow(e.refDate);default:i.match(/cette\s*nuit/)?(Mc.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",Fg.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),Mc.assignSimilarDate(s,n),s.imply("hour",0))}return s}};Xe.default=Oc});var Cc=p(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var Vr=ve(),Lg=N(),xc=class extends Lg.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Vr.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Vr.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Vr.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Vr.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Vr.Meridiem.AM);break}return i}};As.default=xc});var Sc=p(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var Yg=ar(),Nc=class extends Yg.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};xs.default=Nc});var Fc=p(Zr=>{"use strict";var Ug=Zr&&Zr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zr,"__esModule",{value:!0});var qg=Ug(dr()),Ic=class extends qg.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Zr.default=Ic});var Lc=p(Qr=>{"use strict";var $g=Qr&&Qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qr,"__esModule",{value:!0});var jg=$g($t()),Wc=class extends jg.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Qr.default=Wc});var At=p($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.parseTimeUnits=$.TIME_UNITS_PATTERN=$.parseYear=$.YEAR_PATTERN=$.parseOrdinalNumberPattern=$.ORDINAL_NUMBER_PATTERN=$.parseNumberPattern=$.NUMBER_PATTERN=$.TIME_UNIT_DICTIONARY=$.INTEGER_WORD_DICTIONARY=$.MONTH_DICTIONARY=$.WEEKDAY_DICTIONARY=void 0;var Cs=ae();$.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};$.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};$.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};$.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};$.NUMBER_PATTERN=`(?:${Cs.matchAnyPattern($.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?|quelques?|demi-?)`;function Yc(r){let e=r.toLowerCase();return $.INTEGER_WORD_DICTIONARY[e]!==void 0?$.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}$.parseNumberPattern=Yc;$.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function Bg(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}$.parseOrdinalNumberPattern=Bg;$.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function Gg(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}$.parseYear=Gg;var Uc=`(${$.NUMBER_PATTERN})\\s{0,5}(${Cs.matchAnyPattern($.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qc=new RegExp(Uc,"i");$.TIME_UNITS_PATTERN=Cs.repeatedTimeunitPattern("",Uc);function Hg(r){let e={},t=r,n=qc.exec(t);for(;n;)zg(e,n),t=t.substring(n[0].length),n=qc.exec(t);return e}$.parseTimeUnits=Hg;function zg(r,e){let t=Yc(e[1]),n=$.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Bc=p(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var $c=At(),Kg=ae(),Vg=N(),Zg=pr(),Qg=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${Kg.matchAnyPattern($c.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),Xg=1,Jg=2,jc=class extends Vg.AbstractParserWithWordBoundaryChecking{innerPattern(){return Qg}innerExtract(e,t){let n=t[Xg].toLowerCase(),i=$c.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[Jg];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=Zg.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Ns.default=jc});var Kc=p(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var Xr=ve(),e_=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),t_=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),r_=2,Gc=3,Hc=4,zc=5,Jr=class{pattern(e){return e_}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=Jr.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=t_.exec(i);return s&&(n.end=Jr.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[r_]),t[Gc]!=null&&(i=parseInt(t[Gc])),i>=60||n>24)return null;if(n>=12&&(s=Xr.Meridiem.PM),t[zc]!=null){if(n>12)return null;let a=t[zc][0].toLowerCase();a=="a"&&(s=Xr.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Xr.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Xr.Meridiem.AM):e.imply("meridiem",Xr.Meridiem.PM),t[Hc]!=null){let a=parseInt(t[Hc]);if(a>=60)return null;e.assign("second",a)}return e}};Ss.default=Jr});var td=p(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var n_=Ne(),Vc=At(),Zc=At(),ei=At(),i_=ae(),s_=N(),a_=new RegExp(`(?:on\\s*?)?(${ei.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${ei.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${i_.matchAnyPattern(Vc.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Zc.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Qc=1,Xc=2,o_=3,Jc=4,ed=class extends s_.AbstractParserWithWordBoundaryChecking{innerPattern(){return a_}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Vc.MONTH_DICTIONARY[t[o_].toLowerCase()],s=ei.parseOrdinalNumberPattern(t[Qc]);if(s>31)return t.index=t.index+t[Qc].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Jc]){let a=Zc.parseYear(t[Jc]);n.start.assign("year",a)}else{let a=n_.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Xc]){let a=ei.parseOrdinalNumberPattern(t[Xc]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Is.default=ed});var id=p(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});var rd=At(),u_=Ge(),l_=N(),c_=ur(),nd=class extends l_.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${rd.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=rd.parseTimeUnits(t[1]),i=c_.reverseTimeUnits(n);return u_.ParsingComponents.createRelativeFromRefDate(e.refDate,i)}};Fs.default=nd});var od=p(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});var sd=At(),d_=Ge(),f_=N(),ad=class extends f_.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant)\\s*(${sd.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=sd.parseTimeUnits(t[1]);return d_.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};Ws.default=ad});var ld=p(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var ti=At(),h_=Ge(),p_=N(),m_=ur(),y_=ae(),ud=class extends p_.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ti.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${y_.matchAnyPattern(ti.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?ti.parseNumberPattern(t[1]):1,i=ti.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=m_.reverseTimeUnits(s)),h_.ParsingComponents.createRelativeFromRefDate(e.refDate,s)}};Ls.default=ud});var fd=p(me=>{"use strict";var He=me&&me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(me,"__esModule",{value:!0});me.createConfiguration=me.createCasualConfiguration=me.parseDate=me.parse=me.strict=me.casual=void 0;var g_=hr(),cd=Ot(),__=He(Ac()),T_=He(Cc()),b_=He(yr()),v_=He(Sc()),D_=He(Fc()),w_=He(Lc()),E_=He(Bc()),k_=He(Kc()),R_=He(td()),P_=He(id()),M_=He(od()),O_=He(ld());me.casual=new cd.Chrono(dd());me.strict=new cd.Chrono(Ys(!0));function A_(r,e,t){return me.casual.parse(r,e,t)}me.parse=A_;function x_(r,e,t){return me.casual.parseDate(r,e,t)}me.parseDate=x_;function dd(r=!0){let e=Ys(!1,r);return e.parsers.unshift(new __.default),e.parsers.unshift(new T_.default),e.parsers.unshift(new O_.default),e}me.createCasualConfiguration=dd;function Ys(r=!0,e=!0){return g_.includeCommonConfiguration({parsers:[new b_.default(e),new R_.default,new v_.default,new k_.default,new P_.default,new M_.default,new E_.default],refiners:[new D_.default,new w_.default]},r)}me.createConfiguration=Ys});var hd=p(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.toHankaku=void 0;function C_(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,N_)}ri.toHankaku=C_;function N_(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var yd=p(en=>{"use strict";var S_=en&&en.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(en,"__esModule",{value:!0});var Us=hd(),I_=Ne(),F_=S_(be()),W_=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9-]{1,4}|元)))年\s*)?([0-9-]{1,2})月\s*([0-9-]{1,2})日/i,pd=1,L_=2,qs=3,Y_=4,U_=5,q_=6,md=class{pattern(){return W_}extract(e,t){let n=parseInt(Us.toHankaku(t[U_])),i=parseInt(Us.toHankaku(t[q_])),s=e.createParsingComponents({day:i,month:n});if(t[pd]&&t[pd].match("\u540C|\u4ECA|\u672C")){let a=F_.default(e.refDate);s.assign("year",a.year())}if(t[L_]){let a=t[Y_],o=a=="\u5143"?1:parseInt(Us.toHankaku(a));t[qs]=="\u4EE4\u548C"?o+=2018:t[qs]=="\u5E73\u6210"?o+=1988:t[qs]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=I_.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};en.default=md});var _d=p(tn=>{"use strict";var $_=tn&&tn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tn,"__esModule",{value:!0});var j_=$_($t()),gd=class extends j_.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};tn.default=gd});var vd=p(Je=>{"use strict";var B_=Je&&Je.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),G_=Je&&Je.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),H_=Je&&Je.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&B_(e,r,t);return G_(e,r),e},z_=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});var K_=z_(be()),Td=ve(),$s=H_(Bt()),V_=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,bd=class{pattern(){return V_}extract(e,t){let n=t[0],i=K_.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return $s.yesterday(e.refDate);case"\u660E\u65E5":return $s.tomorrow(e.refDate);case"\u4ECA\u65E5":case"\u5F53\u65E5":return $s.today(e.refDate)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",Td.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",Td.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};Je.default=bd});var Ed=p(ye=>{"use strict";var js=ye&&ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ye,"__esModule",{value:!0});ye.createConfiguration=ye.createCasualConfiguration=ye.parseDate=ye.parse=ye.strict=ye.casual=void 0;var Z_=js(yd()),Q_=js(_d()),X_=js(vd()),Dd=Ot();ye.casual=new Dd.Chrono(wd());ye.strict=new Dd.Chrono(Bs());function J_(r,e,t){return ye.casual.parse(r,e,t)}ye.parse=J_;function eT(r,e,t){return ye.casual.parseDate(r,e,t)}ye.parseDate=eT;function wd(){let r=Bs();return r.parsers.unshift(new X_.default),r}ye.createCasualConfiguration=wd;function Bs(){return{parsers:[new Z_.default],refiners:[new Q_.default]}}ye.createConfiguration=Bs});var ni=p(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.parseYear=it.YEAR_PATTERN=it.MONTH_DICTIONARY=it.WEEKDAY_DICTIONARY=void 0;it.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};it.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};it.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function tT(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}it.parseYear=tT});var Pd=p(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var kd=ni(),rT=ae(),nT=N(),iT=pr(),sT=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${rT.matchAnyPattern(kd.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),aT=1,oT=2,uT=3,Rd=class extends nT.AbstractParserWithWordBoundaryChecking{innerPattern(){return sT}innerExtract(e,t){let n=t[oT].toLowerCase(),i=kd.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[aT],a=t[uT],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=iT.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Gs.default=Rd});var Od=p(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});var lT=ar(),Md=class extends lT.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Hs.default=Md});var xd=p(rn=>{"use strict";var cT=rn&&rn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rn,"__esModule",{value:!0});var dT=cT(dr()),Ad=class extends dT.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};rn.default=Ad});var Nd=p(nn=>{"use strict";var fT=nn&&nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nn,"__esModule",{value:!0});var hT=fT($t()),Cd=class extends hT.default{patternBetween(){return/^\s*(?:-)\s*$/i}};nn.default=Cd});var Ud=p(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});var pT=Ne(),Sd=ni(),Id=ni(),mT=ae(),yT=N(),gT=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${mT.matchAnyPattern(Sd.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Id.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Fd=1,Wd=2,_T=3,Ld=4,Yd=class extends yT.AbstractParserWithWordBoundaryChecking{innerPattern(){return gT}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Sd.MONTH_DICTIONARY[t[_T].toLowerCase()],s=parseInt(t[Fd]);if(s>31)return t.index=t.index+t[Fd].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Ld]){let a=Id.parseYear(t[Ld]);n.start.assign("year",a)}else{let a=pT.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Wd]){let a=parseInt(t[Wd]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};zs.default=Yd});var $d=p(ft=>{"use strict";var TT=ft&&ft.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),bT=ft&&ft.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),vT=ft&&ft.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&TT(e,r,t);return bT(e,r),e};Object.defineProperty(ft,"__esModule",{value:!0});var DT=N(),ii=vT(Bt()),qd=class extends DT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return ii.now(e.refDate);case"hoje":return ii.today(e.refDate);case"amanha":case"amanh\xE3":return ii.tomorrow(e.refDate);case"ontem":return ii.yesterday(e.refDate)}return i}};ft.default=qd});var Bd=p(sn=>{"use strict";var wT=sn&&sn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sn,"__esModule",{value:!0});var si=ve(),ET=N(),kT=Ve(),RT=wT(be()),jd=class extends ET.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=RT.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",si.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",si.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",si.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":kT.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",si.Meridiem.AM),i.imply("hour",12);break}return i}};sn.default=jd});var zd=p(ge=>{"use strict";var xt=ge&&ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ge,"__esModule",{value:!0});ge.createConfiguration=ge.createCasualConfiguration=ge.parseDate=ge.parse=ge.strict=ge.casual=void 0;var PT=hr(),Gd=Ot(),MT=xt(yr()),OT=xt(Pd()),AT=xt(Od()),xT=xt(xd()),CT=xt(Nd()),NT=xt(Ud()),ST=xt($d()),IT=xt(Bd());ge.casual=new Gd.Chrono(Hd());ge.strict=new Gd.Chrono(Ks(!0));function FT(r,e,t){return ge.casual.parse(r,e,t)}ge.parse=FT;function WT(r,e,t){return ge.casual.parseDate(r,e,t)}ge.parseDate=WT;function Hd(r=!0){let e=Ks(!1,r);return e.parsers.push(new ST.default),e.parsers.push(new IT.default),e}ge.createCasualConfiguration=Hd;function Ks(r=!0,e=!0){return PT.includeCommonConfiguration({parsers:[new MT.default(e),new OT.default,new AT.default,new NT.default],refiners:[new xT.default,new CT.default]},r)}ge.createConfiguration=Ks});var Vd=p(an=>{"use strict";var LT=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0});var YT=LT($t()),Kd=class extends YT.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};an.default=Kd});var Qd=p(on=>{"use strict";var UT=on&&on.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(on,"__esModule",{value:!0});var qT=UT(dr()),Zd=class extends qT.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};on.default=Zd});var Jd=p(ht=>{"use strict";var $T=ht&&ht.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),jT=ht&&ht.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BT=ht&&ht.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$T(e,r,t);return jT(e,r),e};Object.defineProperty(ht,"__esModule",{value:!0});var GT=N(),ai=BT(Bt()),Xd=class extends GT.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return ai.now(e.refDate);case"vandaag":return ai.today(e.refDate);case"morgen":case"morgend":return ai.tomorrow(e.refDate);case"gisteren":return ai.yesterday(e.refDate)}return i}};ht.default=Xd});var tf=p(un=>{"use strict";var HT=un&&un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(un,"__esModule",{value:!0});var oi=ve(),zT=N(),KT=HT(be()),VT=Ve(),ZT=1,QT=2,ef=class extends zT.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=KT.default(e.refDate),i=e.createParsingComponents();switch(t[ZT]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[QT].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",oi.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",oi.Meridiem.PM),i.imply("hour",20);break;case"middernacht":VT.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",oi.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",oi.Meridiem.AM),i.imply("hour",12);break}return i}};un.default=ef});var pt=p(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.parseTimeUnits=F.TIME_UNITS_PATTERN=F.parseYear=F.YEAR_PATTERN=F.parseOrdinalNumberPattern=F.ORDINAL_NUMBER_PATTERN=F.parseNumberPattern=F.NUMBER_PATTERN=F.TIME_UNIT_DICTIONARY=F.ORDINAL_WORD_DICTIONARY=F.INTEGER_WORD_DICTIONARY=F.MONTH_DICTIONARY=F.WEEKDAY_DICTIONARY=void 0;var ui=ae(),XT=Ne();F.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};F.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};F.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};F.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};F.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuten:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};F.NUMBER_PATTERN=`(?:${ui.matchAnyPattern(F.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|een?|halve?)`;function rf(r){let e=r.toLowerCase();return F.INTEGER_WORD_DICTIONARY[e]!==void 0?F.INTEGER_WORD_DICTIONARY[e]:e==="een"?1:e.match(/halve?/)?.5:parseFloat(e)}F.parseNumberPattern=rf;F.ORDINAL_NUMBER_PATTERN=`(?:${ui.matchAnyPattern(F.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function JT(r){let e=r.toLowerCase();return F.ORDINAL_WORD_DICTIONARY[e]!==void 0?F.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}F.parseOrdinalNumberPattern=JT;F.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function eb(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return XT.findMostLikelyADYear(e)}F.parseYear=eb;var nf=`(${F.NUMBER_PATTERN})\\s{0,5}(${ui.matchAnyPattern(F.TIME_UNIT_DICTIONARY)})\\s{0,5}`,sf=new RegExp(nf,"i");F.TIME_UNITS_PATTERN=ui.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",nf);function tb(r){let e={},t=r,n=sf.exec(t);for(;n;)rb(e,n),t=t.substring(n[0].length),n=sf.exec(t);return e}F.parseTimeUnits=tb;function rb(r,e){let t=rf(e[1]),n=F.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var uf=p(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var af=pt(),nb=Ge(),ib=N(),of=class extends ib.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+af.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=af.parseTimeUnits(t[1]);return nb.ParsingComponents.createRelativeFromRefDate(e.refDate,n)}};Vs.default=of});var df=p(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var lf=pt(),sb=ae(),ab=N(),ob=pr(),ub=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${sb.matchAnyPattern(lf.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),lb=1,cb=2,db=3,cf=class extends ab.AbstractParserWithWordBoundaryChecking{innerPattern(){return ub}innerExtract(e,t){let n=t[cb].toLowerCase(),i=lf.WEEKDAY_DICTIONARY[n],s=t[lb],a=t[db],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=ob.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Zs.default=cf});var _f=p(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});var fb=Ne(),ff=pt(),li=pt(),hf=pt(),hb=ae(),pb=N(),mb=new RegExp(`(?:on\\s*?)?(${li.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${li.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+hb.matchAnyPattern(ff.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${hf.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),yb=3,pf=1,mf=2,yf=4,gf=class extends pb.AbstractParserWithWordBoundaryChecking{innerPattern(){return mb}innerExtract(e,t){let n=ff.MONTH_DICTIONARY[t[yb].toLowerCase()],i=li.parseOrdinalNumberPattern(t[pf]);if(i>31)return t.index=t.index+t[pf].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[yf]){let u=hf.parseYear(t[yf]);s.assign("year",u)}else{let u=fb.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[mf])return s;let a=li.parseOrdinalNumberPattern(t[mf]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Qs.default=gf});var wf=p(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});var Tf=pt(),gb=Ne(),_b=ae(),bf=pt(),Tb=N(),bb=new RegExp(`(${_b.matchAnyPattern(Tf.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${bf.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),vb=1,vf=2,Df=class extends Tb.AbstractParserWithWordBoundaryChecking{innerPattern(){return bb}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[vb],s=Tf.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[vf]){let a=bf.parseYear(t[vf]);n.assign("year",a)}else{let a=gb.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};Xs.default=Df});var kf=p(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var Db=N(),wb=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Eb=1,kb=2,Ef=class extends Db.AbstractParserWithWordBoundaryChecking{innerPattern(){return wb}innerExtract(e,t){let n=parseInt(t[kb]),i=parseInt(t[Eb]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};Js.default=Ef});var Pf=p(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var Rb=ar(),Rf=class extends Rb.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};ea.default=Rf});var xf=p(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});var Mf=pt(),Pb=ae(),Mb=N(),Ob=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Pb.matchAnyPattern(Mf.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Ab=1,xb=2,Of=3,Cb=4,Af=class extends Mb.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ob}innerExtract(e,t){let n=t[Of]?parseInt(t[Of]):Mf.MONTH_DICTIONARY[t[xb].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[Ab]);return{day:parseInt(t[Cb]),month:n,year:i}}};ta.default=Af});var Nf=p(ln=>{"use strict";var Nb=ln&&ln.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ln,"__esModule",{value:!0});var Sb=N(),ci=ve(),ra=Ve(),Ib=Nb(be()),Fb=1,Wb=2,Cf=class extends Sb.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[Fb].toLowerCase(),i=t[Wb].toLowerCase(),s=e.createParsingComponents(),a=Ib.default(e.refDate);switch(n){case"gisteren":ra.assignSimilarDate(s,a.add(-1,"day"));break;case"van":ra.assignSimilarDate(s,a);break;case"morgen":ra.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",ci.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",ci.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",ci.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",ci.Meridiem.PM),s.imply("hour",20);break}return s}};ln.default=Cf});var Ff=p(_e=>{"use strict";var qe=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.createConfiguration=_e.createCasualConfiguration=_e.parseDate=_e.parse=_e.strict=_e.casual=void 0;var Lb=hr(),Sf=Ot(),Yb=qe(Vd()),Ub=qe(Qd()),qb=qe(Jd()),$b=qe(tf()),jb=qe(yr()),Bb=qe(uf()),Gb=qe(df()),Hb=qe(_f()),zb=qe(wf()),Kb=qe(kf()),Vb=qe(Pf()),Zb=qe(xf()),Qb=qe(Nf());_e.casual=new Sf.Chrono(If());_e.strict=new Sf.Chrono(na(!0));function Xb(r,e,t){return _e.casual.parse(r,e,t)}_e.parse=Xb;function Jb(r,e,t){return _e.casual.parseDate(r,e,t)}_e.parseDate=Jb;function If(r=!0){let e=na(!1,r);return e.parsers.unshift(new qb.default),e.parsers.unshift(new $b.default),e.parsers.unshift(new Qb.default),e}_e.createCasualConfiguration=If;function na(r=!0,e=!0){return Lb.includeCommonConfiguration({parsers:[new jb.default(e),new Hb.default,new zb.default,new Vb.default,new Bb.default,new Kb.default,new Gb.default,new Zb.default],refiners:[new Ub.default,new Yb.default]},r)}_e.createConfiguration=na});var ve=p(Y=>{"use strict";var ev=Y&&Y.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),tv=Y&&Y.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gr=Y&&Y.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ev(e,r,t);return tv(e,r),e};Object.defineProperty(Y,"__esModule",{value:!0});Y.parseDate=Y.parse=Y.casual=Y.strict=Y.nl=Y.pt=Y.ja=Y.fr=Y.de=Y.Meridiem=Y.Chrono=Y.en=void 0;var ia=gr(Ts());Y.en=ia;var rv=Ot();Object.defineProperty(Y,"Chrono",{enumerable:!0,get:function(){return rv.Chrono}});var nv;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(nv=Y.Meridiem||(Y.Meridiem={}));var iv=gr(Pc());Y.de=iv;var sv=gr(fd());Y.fr=sv;var av=gr(Ed());Y.ja=av;var ov=gr(zd());Y.pt=ov;var uv=gr(Ff());Y.nl=uv;Y.strict=ia.strict;Y.casual=ia.casual;function lv(r,e,t){return Y.casual.parse(r,e,t)}Y.parse=lv;function cv(r,e,t){return Y.casual.parseDate(r,e,t)}Y.parseDate=cv});th(exports,{default:()=>Pa});var zf=Le(require("obsidian"));var Nn=Le(require("obsidian"));var Tv=new Error("timeout while waiting for mutex to become available"),bv=new Error("mutex already locked"),nh=new Error("request for lock canceled"),Va=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(c){a(c)}}function u(d){try{l(n.throw(d))}catch(c){a(c)}}function l(d){d.done?s(d.value):i(d.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Za=class{constructor(e,t=nh){if(this._maxConcurrency=e,this._cancelError=t,this._queue=[],this._waiters=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){let e=this.isLocked(),t=new Promise((n,i)=>this._queue.push({resolve:n,reject:i}));return e||this._dispatch(),t}runExclusive(e){return Va(this,void 0,void 0,function*(){let[t,n]=yield this.acquire();try{return yield e(t)}finally{n()}})}waitForUnlock(){return Va(this,void 0,void 0,function*(){return this.isLocked()?new Promise(t=>this._waiters.push({resolve:t})):Promise.resolve()})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailable on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){let e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){let e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._value++,this._resolveWaiters(),this._dispatch())},e.resolve([this._value--,this._currentReleaser])}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}},ih=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(d){try{l(n.next(d))}catch(c){a(c)}}function u(d){try{l(n.throw(d))}catch(c){a(c)}}function l(d){d.done?s(d.value):i(d.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Ei=class{constructor(e){this._semaphore=new Za(1,e)}acquire(){return ih(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var nu=Le(require("obsidian"));var Qa=Le(require("obsidian"));var sh={globalFilter:"",removeGlobalFilter:!1,setDoneDate:!0},ki=We({},sh),se=()=>We({},ki),Qt=r=>(ki=We(We({},ki),r),se());var Ri,Pi,Xa=({metadataCache:r,vault:e})=>{Ri=r,Pi=e},Rn=t=>te(void 0,[t],function*({originalTask:r,newTasks:e}){if(Pi===void 0||Ri===void 0){console.error("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Ja({originalTask:r,newTasks:e,vault:Pi,metadataCache:Ri,previousTries:0})}),Ja=s=>te(void 0,[s],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i}){let a=()=>{if(i>10){console.error("Tasks: Too many retries. File update not possible ...");return}let b=Math.min(Math.pow(10,i),100);setTimeout(()=>{Ja({originalTask:r,newTasks:e,vault:t,metadataCache:n,previousTries:i+1})},b)},o=t.getAbstractFileByPath(r.path);if(!(o instanceof Qa.TFile))return console.warn(`Tasks: No file found for task ${r.description}. Retrying ...`),a();if(o.extension!=="md"){console.error("Tasks: Only supporting files with the .md file extension.");return}let u=n.getFileCache(o);if(u==null||u===null)return console.warn(`Tasks: No file cache found for file ${o.path}. Retrying ...`),a();let l=u.listItems;if(l===void 0||l.length===0)return console.warn(`Tasks: No list items found in file cache of ${o.path}. Retrying ...`),a();let c=(yield t.read(o)).split(`
`),{globalFilter:f}=se(),h,m=0;for(let b of l){if(b.position.start.line<r.sectionStart||b.task===void 0)continue;if(c[b.position.start.line].includes(f)){if(m===r.sectionIndex){h=b;break}m++}}if(h===void 0){console.error("Tasks: could not find task to toggle in the file.");return}let g=[...c.slice(0,h.position.start.line),...e.map(b=>b.toFileLineString()),...c.slice(h.position.start.line+1)];yield t.modify(o,g.join(`
`))});var wr=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 Pn=["MO","TU","WE","TH","FR","SA","SU"],le=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(Pn.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=Pn[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 Z=function(r){return r!=null},Ye=function(r){return typeof r=="number"},Mi=function(r){return Pn.indexOf(r)>=0},Te=Array.isArray,je=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 W=function(r,e){var t=0,n=[];if(Te(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},eo=function(r){return Te(r)?r:[r]};function Ft(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+=W(t,e/t.length)),t.slice(0,e)+String(n))}var to=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},we=function(r,e){var t=r%e;return t*e<0?t+e:t},Mn=function(r,e){return{div:Math.floor(r/e),mod:we(r,e)}},Ue=function(r){return!Z(r)||r.length===0},oe=function(r){return!Ue(r)},L=function(r,e){return oe(r)&&r.indexOf(e)!==-1};var _t;(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[Ft(n.getUTCFullYear().toString(),4,"0"),Ft(n.getUTCMonth()+1,2,"0"),Ft(n.getUTCDate(),2,"0"),"T",Ft(n.getUTCHours(),2,"0"),Ft(n.getUTCMinutes(),2,"0"),Ft(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))}})(_t||(_t={}));var P=_t;var ah=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==="before"?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e==="after"&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return r.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),ot=ah;var Eo=Le(wo()),{__extends:Jt,__assign:Ae,__rest:Fv,__decorate:Wv,__param:Lv,__metadata:Yv,__awaiter:Uv,__generator:qv,__exportStar:$v,__createBinding:jv,__values:Bv,__read:Gv,__spread:Hv,__spreadArrays:Wt,__await:zv,__asyncGenerator:Kv,__asyncDelegator:Vv,__asyncValues:Zv,__makeTemplateObject:Qv,__importStar:Xv,__importDefault:Jv,__classPrivateFieldGet:eD,__classPrivateFieldSet:tD}=Eo.default;var oh=function(r){Jt(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(ot),Ai=oh;var uh={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Lt=uh;var ko=function(r,e){return r.indexOf(e)!==-1},lh=function(r){return r.toString()},ch=function(r,e,t){return e+" "+t+", "+r},dh=function(){function r(e,t,n,i){if(t===void 0&&(t=lh),n===void 0&&(n=Lt),i===void 0&&(i=ch),this.text=[],this.language=n||Lt,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(d,c){return d-c}),a.sort(function(d,c){return c-d}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Z(this.origOptions.byweekday)){var o=Te(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(d){return!d.n}),someWeeks:o.filter(function(d){return Boolean(d.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(d,c){return d.weekday-c.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(ko(["dtstart","wkst","freq"],n))return!0;if(!ko(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[D.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n,i=this.gettext;if(e===-1)return i("last");switch(n=Math.abs(e),n){case 1:case 21:case 31:t=n+i("st");break;case 2:case 22:t=n+i("nd");break;case 3:case 23:t=n+i("rd");break;default:t=n+i("th")}return e<0?t+" "+i("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=Ye(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!=1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){i===void 0&&(i=","),Te(e)||(e=[e]);var s=function(u,l,d){for(var c="",f=0;f<u.length;f++)f!==0&&(f===u.length-1?c+=" "+d+" ":c+=l+" "),c+=u[f];return c};t=t||function(u){return u.toString()};var a=this,o=function(u){return t&&t.call(a,u)};return n?s(e.map(o),i,n):e.map(o).join(i+" ")},r}(),rt=dh;var fh=function(){function r(e){this.done=!0,this.rules=e}return r.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},r.prototype.isDone=function(){return this.done&&this.symbol===null},r.prototype.nextSymbol=function(){var e,t,n=this;this.symbol=null,this.value=null;do{if(this.done)return!1;var i=void 0;e=null;for(var s in this.rules){i=this.rules[s];var a=i.exec(n.text);a&&(e===null||a[0].length>e[0].length)&&(e=a,t=s)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r}();function Er(r,e){e===void 0&&(e=Lt);var t={},n=new fh(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var f=n.acceptNumber();if(f&&(t.interval=parseInt(f[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=D.DAILY,n.nextSymbol()&&(a(),c());break;case"weekday(s)":t.freq=D.WEEKLY,t.byweekday=[D.MO,D.TU,D.WE,D.TH,D.FR],n.nextSymbol(),c();break;case"week(s)":t.freq=D.WEEKLY,n.nextSymbol()&&(s(),c());break;case"hour(s)":t.freq=D.HOURLY,n.nextSymbol()&&(s(),c());break;case"minute(s)":t.freq=D.MINUTELY,n.nextSymbol()&&(s(),c());break;case"month(s)":t.freq=D.MONTHLY,n.nextSymbol()&&(s(),c());break;case"year(s)":t.freq=D.YEARLY,n.nextSymbol()&&(s(),c());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=D.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[D[h]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=u();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(D[m]),n.nextSymbol()}d(),c();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=D.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var g=o();if(!g)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(g),n.nextSymbol()}s(),c();break;default:throw new Error("Unknown symbol")}}function s(){var f=n.accept("on"),h=n.accept("the");if(!!(f||h))do{var m=l(),g=u(),b=o();if(m)g?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(D[g].nth(m))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(m),n.accept("day(s)"));else if(g)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(D[g]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[D.MO,D.TU,D.WE,D.TH,D.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var O=n.acceptNumber();if(!O)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(O[0],10)];n.accept("comma");){if(O=n.acceptNumber(),!O)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(O[0],10))}}else if(b)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(b);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var f=n.accept("at");if(!!f)do{var h=n.acceptNumber();if(!h)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(h[0],10)];n.accept("comma");){if(h=n.acceptNumber(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(h[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var f=parseInt(n.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return n.nextSymbol(),n.accept("last")?-f:f;default:return!1}}function d(){n.accept("on"),n.accept("the");var f=l();if(!!f)for(t.bymonthday=[f],n.nextSymbol();n.accept("comma");){if(f=l(),!f)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(f),n.nextSymbol()}}function c(){if(n.symbol==="until"){var f=Date.parse(n.text);if(!f)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(f)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var S;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(S||(S={}));function kr(r){return r<S.HOURLY}var Ro=function(r,e){return e===void 0&&(e=Lt),new D(Er(r,e)||void 0)},er=["count","until","interval","byweekday","bymonthday","bymonth"];rt.IMPLEMENTED=[];rt.IMPLEMENTED[S.HOURLY]=er;rt.IMPLEMENTED[S.MINUTELY]=er;rt.IMPLEMENTED[S.DAILY]=["byhour"].concat(er);rt.IMPLEMENTED[S.WEEKLY]=er;rt.IMPLEMENTED[S.MONTHLY]=er;rt.IMPLEMENTED[S.YEARLY]=["byweekno","byyearday"].concat(er);var Po=function(r,e,t,n){return new rt(r,e,t,n).toString()},Mo=rt.isFullyConvertible;var tr=function(){function r(e,t,n,i){this.hour=e,this.minute=t,this.second=n,this.millisecond=i||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r}();var Oo=function(r){Jt(e,r);function e(t,n,i,s,a,o,u){var l=r.call(this,s,a,o,u)||this;return l.year=t,l.month=n,l.day=i,l}return e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return _t.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),i=we(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Mn(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Ue(i)||L(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Mn(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Ue(i)||L(i,this.hour))&&(Ue(s)||L(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Mn(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Ue(i)||L(i,this.hour))&&(Ue(s)||L(s,this.minute))&&(Ue(a)||L(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=_t.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>_t.MAXYEAR))return;t=_t.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case S.YEARLY:return this.addYears(s);case S.MONTHLY:return this.addMonths(s);case S.WEEKLY:return this.addWeekly(s,a);case S.DAILY:return this.addDaily(s);case S.HOURLY:return this.addHours(s,n,o);case S.MINUTELY:return this.addMinutes(s,n,o,u);case S.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(tr);function xi(r){for(var e=[],t=Object.keys(r),n=0,i=t;n<i.length;n++){var s=i[n];L(Co,s)||e.push(s),P.isDate(r[s])&&!P.isValidDate(r[s])&&e.push(s)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return Ae({},r)}function Ao(r){var e=Ae(Ae({},Rr),xi(r));if(Z(e.byeaster)&&(e.freq=D.YEARLY),!(Z(e.freq)&&D.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: "+e.freq+" "+r.freq);if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),Z(e.wkst)?Ye(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=D.MO.weekday,Z(e.bysetpos)){Ye(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++){var n=e.bysetpos[t];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||oe(e.byweekno)||oe(e.byyearday)||Boolean(e.bymonthday)||oe(e.bymonthday)||Z(e.byweekday)||Z(e.byeaster)))switch(e.freq){case D.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case D.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case D.WEEKLY:e.byweekday=[P.getWeekday(e.dtstart)];break}if(Z(e.bymonth)&&!Te(e.bymonth)&&(e.bymonth=[e.bymonth]),Z(e.byyearday)&&!Te(e.byyearday)&&Ye(e.byyearday)&&(e.byyearday=[e.byyearday]),!Z(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Te(e.bymonthday)){for(var i=[],s=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Z(e.byweekno)&&!Te(e.byweekno)&&(e.byweekno=[e.byweekno]),!Z(e.byweekday))e.bynweekday=null;else if(Ye(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Mi(e.byweekday))e.byweekday=[le.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof le)!e.byweekday.n||e.freq>D.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t<e.byweekday.length;t++){var u=e.byweekday[t];if(Ye(u)){a.push(u);continue}else if(Mi(u)){a.push(le.fromStr(u).weekday);continue}!u.n||e.freq>D.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=oe(a)?a:null,e.bynweekday=oe(o)?o:null}return Z(e.byhour)?Ye(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<D.HOURLY?[e.dtstart.getUTCHours()]:null,Z(e.byminute)?Ye(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<D.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Z(e.bysecond)?Ye(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<D.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function xo(r){var e=r.dtstart.getTime()%1e3;if(!kr(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new tr(n,i,s,e))})})}),t}function Pr(r){var e=r.split(`
`).map(hh).filter(function(t){return t!==null});return Ae(Ae({},e[0]),e[1])}function Mr(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=P.untilStringToDate(s),e}function hh(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return No(r);var t=e[0],n=e[1];switch(n.toUpperCase()){case"RRULE":case"EXRULE":return No(r);case"DTSTART":return Mr(r);default:throw new Error("Unsupported RFC prop "+n+" in "+r)}}function No(r){var e=r.replace(/^RRULE:/i,""),t=Mr(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=S[o.toUpperCase()];break;case"WKST":t.wkst=Be[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=ph(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=mh(o);break;case"DTSTART":case"TZID":var d=Mr(r);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=P.untilStringToDate(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function ph(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(So)}return So(r)}function So(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function mh(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Be[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/),i=Number(n[1]),s=n[2],a=Be[s].weekday;return new le(a,i)})}var Yt=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=P.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 Or(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(Rr),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!L(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!Z(o)||Te(o)&&!o.length)){switch(a){case"FREQ":u=D.FREQUENCIES[r.freq];break;case"WKST":Ye(o)?u=new le(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=eo(o).map(function(h){return h instanceof le?h:Te(h)?new le(h[0],h[1]):new le(h)}).toString();break;case"DTSTART":t=yh(o,r.tzid);break;case"UNTIL":u=P.timeToUntilString(o,!r.tzid);break;default:if(Te(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],g=h[1];return m+"="+g.toString()}).join(";"),f="";return c!==""&&(f="RRULE:"+c),[t,f].filter(function(h){return!!h}).join(`
`)}function yh(r,e){return r?"DTSTART"+new Yt(new Date(r),e).toString():""}function gh(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 Io=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?P.clone(t):P.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(d){for(var c=0;c<i.length;c++){var f=i[c];if(!gh(t[f],d[f]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(Te(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 ot(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return Te(n)?P.cloneDates(n):n instanceof Date?P.clone(n):n},r}();var Fo=Wt(W(1,31),W(2,28),W(3,31),W(4,30),W(5,31),W(6,30),W(7,31),W(8,31),W(9,30),W(10,31),W(11,30),W(12,31),W(1,7)),Wo=Wt(W(1,31),W(2,29),W(3,31),W(4,30),W(5,31),W(6,30),W(7,31),W(8,31),W(9,30),W(10,31),W(11,30),W(12,31),W(1,7)),_h=je(1,29),Th=je(1,30),Tt=je(1,31),Ee=je(1,32),Lo=Wt(Ee,Th,Ee,Tt,Ee,Tt,Ee,Ee,Tt,Ee,Tt,Ee,Ee.slice(0,7)),Yo=Wt(Ee,_h,Ee,Tt,Ee,Tt,Ee,Ee,Tt,Ee,Tt,Ee,Ee.slice(0,7)),bh=je(-28,0),vh=je(-29,0),bt=je(-30,0),ke=je(-31,0),Uo=Wt(ke,vh,ke,bt,ke,bt,ke,ke,bt,ke,bt,ke,ke.slice(0,7)),qo=Wt(ke,bh,ke,bt,ke,bt,ke,ke,bt,ke,bt,ke,ke.slice(0,7)),$o=[0,31,60,91,121,152,182,213,244,274,305,335,366],jo=[0,31,59,90,120,151,181,212,243,273,304,334,365],Ci=function(){for(var r=[],e=0;e<55;e++)r=r.concat(je(7));return r}();function Bo(r,e){var t=new Date(Date.UTC(r,0,1)),n=P.isLeapYear(r)?366:365,i=P.isLeapYear(r+1)?366:365,s=P.toOrdinal(t),a=P.getWeekday(t),o=Ae(Ae({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},Dh(r)),{wnomask:null});if(Ue(e.byweekno))return o;o.wnomask=W(0,n+7);var u,l,d=u=we(7-a+e.wkst,7);d>=4?(d=0,l=o.yearlen+we(a-e.wkst,7)):l=n-d;for(var c=Math.floor(l/7),f=we(l,7),h=Math.floor(c+f/4),m=0;m<e.byweekno.length;m++){var g=e.byweekno[m];if(g<0&&(g+=h+1),g>0&&g<=h){var b=void 0;g>1?(b=d+(g-1)*7,d!==u&&(b-=7-u)):b=d;for(var O=0;O<7&&(o.wnomask[b]=1,b++,o.wdaymask[b]!==e.wkst);O++);}}if(L(e.byweekno,1)){var b=d+h*7;if(d!==u&&(b-=7-u),b<n)for(var m=0;m<7&&(o.wnomask[b]=1,b+=1,o.wdaymask[b]!==e.wkst);m++);}if(d){var K=void 0;if(L(e.byweekno,-1))K=-1;else{var J=P.getWeekday(new Date(Date.UTC(r-1,0,1))),j=we(7-J.valueOf()+e.wkst,7),V=P.isLeapYear(r-1)?366:365,re=void 0;j>=4?(j=0,re=V+we(J-e.wkst,7)):re=n-d,K=Math.floor(52+we(re,7)/4)}if(L(e.byweekno,K))for(var b=0;b<d;b++)o.wnomask[b]=1}return o}function Dh(r){var e=P.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=P.getWeekday(t);return e===365?{mmask:Fo,mdaymask:Yo,nmdaymask:qo,wdaymask:Ci.slice(n),mrange:jo}:{mmask:Wo,mdaymask:Lo,nmdaymask:Uo,wdaymask:Ci.slice(n),mrange:$o}}function Go(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===D.YEARLY)if(Ue(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===D.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(Ue(o))return a;a.nwdaymask=W(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],g=m[0],b=m[1];b<0?(h=c+(b+1)*7,h-=we(i[h]-g,7)):(h=d+(b-1)*7,h+=we(7-i[h]+g,7)),d<=h&&h<=c&&(a.nwdaymask[h]=1)}return a}function Ho(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,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),g=(l+f-7*h+114)%31+1,b=Date.UTC(r,m-1,g+e),O=Date.UTC(r,0,1);return[Math.ceil((b-O)/(1e3*60*60*24))]}var wh=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=Bo(e,n)),oe(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=Go(e,t,s,a,o,n)}Z(n.byeaster)&&(this.eastermask=Ho(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!0,configurable:!0}),r.prototype.ydayset=function(){return[je(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t,n){for(var i=this.mrange[t-1],s=this.mrange[t],a=W(null,this.yearlen),o=i;o<s;o++)a[o]=o;return[a,i,s]},r.prototype.wdayset=function(e,t,n){for(var i=W(null,this.yearlen+7),s=P.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,a=s,o=0;o<7&&(i[s]=s,++s,this.wdaymask[s]!==this.options.wkst);o++);return[i,a,s]},r.prototype.ddayset=function(e,t,n){var i=W(null,this.yearlen),s=P.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return i[s]=s,[i,s,s+1]},r.prototype.htimeset=function(e,t,n,i){var s=this,a=[];return this.options.byminute.forEach(function(o){a=a.concat(s.mtimeset(e,o,n,i))}),P.sort(a),a},r.prototype.mtimeset=function(e,t,n,i){var s=this.options.bysecond.map(function(a){return new tr(e,t,a,i)});return P.sort(s),s},r.prototype.stimeset=function(e,t,n,i){return[new tr(e,t,n,i)]},r.prototype.getdayset=function(e){switch(e){case S.YEARLY:return this.ydayset.bind(this);case S.MONTHLY:return this.mdayset.bind(this);case S.WEEKLY:return this.wdayset.bind(this);case S.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case S.HOURLY:return this.htimeset.bind(this);case S.MINUTELY:return this.mtimeset.bind(this);case S.SECONDLY:return this.stimeset.bind(this)}},r}(),zo=wh;function Ko(r,e,t,n,i,s){for(var a=[],o=0;o<r.length;o++){var u=void 0,l=void 0,d=r[o];d<0?(u=Math.floor(d/e.length),l=we(d,e.length)):(u=Math.floor((d-1)/e.length),l=we(d-1,e.length));for(var c=[],f=t;f<n;f++){var h=s[f];!Z(h)||c.push(h)}var m=void 0;u<0?m=c.slice(u)[0]:m=c[u];var g=e[l],b=P.fromOrdinal(i.yearordinal+m),O=P.combine(b,g);L(a,O)||a.push(O)}return P.sort(a),a}function xn(r,e){var t=e.dtstart,n=e.freq,i=e.interval,s=e.until,a=e.bysetpos,o=e.count;if(o===0||i===0)return ut(r);var u=Oo.fromDate(t),l=new zo(e);l.rebuild(u.year,u.month);for(var d=Rh(l,u,e);;){var c=l.getdayset(n)(u.year,u.month,u.day),f=c[0],h=c[1],m=c[2],g=kh(f,h,m,l,e);if(oe(a))for(var b=Ko(a,d,h,m,l,f),O=0;O<b.length;O++){var K=b[O];if(s&&K>s)return ut(r);if(K>=t){var J=Vo(K,e);if(!r.accept(J)||o&&(--o,!o))return ut(r)}}else for(var O=h;O<m;O++){var j=f[O];if(!!Z(j))for(var V=P.fromOrdinal(l.yearordinal+j),re=0;re<d.length;re++){var x=d[re],K=P.combine(V,x);if(s&&K>s)return ut(r);if(K>=t){var J=Vo(K,e);if(!r.accept(J)||o&&(--o,!o))return ut(r)}}}if(e.interval===0||(u.add(e,g),u.year>P.MAXYEAR))return ut(r);kr(n)||(d=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function Eh(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return oe(n)&&!L(n,r.mmask[e])||oe(i)&&!r.wnomask[e]||oe(s)&&!L(s,r.wdaymask[e])||oe(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!L(r.eastermask,e)||(oe(o)||oe(u))&&!L(o,r.mdaymask[e])&&!L(u,r.nmdaymask[e])||oe(l)&&(e<r.yearlen&&!L(l,e+1)&&!L(l,-r.yearlen+e)||e>=r.yearlen&&!L(l,e+1-r.yearlen)&&!L(l,-r.nextyearlen+e-r.yearlen))}function Vo(r,e){return new Yt(r,e.tzid).rezonedDate()}function ut(r){return r.getValue()}function kh(r,e,t,n,i){for(var s=!1,a=e;a<t;a++){var o=r[a];s=Eh(n,o,i),s&&(r[o]=null)}return s}function Rh(r,e,t){var n=t.freq,i=t.byhour,s=t.byminute,a=t.bysecond;return kr(n)?xo(t):n>=D.HOURLY&&oe(i)&&!L(i,e.hour)||n>=D.MINUTELY&&oe(s)&&!L(s,e.minute)||n>=D.SECONDLY&&oe(a)&&!L(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Be={MO:new le(0),TU:new le(1),WE:new le(2),TH:new le(3),FR:new le(4),SA:new le(5),SU:new le(6)},Rr={freq:S.YEARLY,dtstart:null,interval:1,wkst:Be.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Co=Object.keys(Rr),D=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Io,this.origOptions=xi(e);var n=Ao(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Er(e,t)},r.fromText=function(e,t){return Ro(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return xn(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(!!this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new Ai("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new ot("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!P.isValidDate(e)||!P.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new Ai("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new ot("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!P.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new ot("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!P.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new ot("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Or(this.origOptions)},r.prototype.toText=function(e,t,n){return Po(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return Mo(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=S.YEARLY,r.MONTHLY=S.MONTHLY,r.WEEKLY=S.WEEKLY,r.DAILY=S.DAILY,r.HOURLY=S.HOURLY,r.MINUTELY=S.MINUTELY,r.SECONDLY=S.SECONDLY,r.MO=Be.MO,r.TU=Be.TU,r.WE=Be.WE,r.TH=Be.TH,r.FR=Be.FR,r.SA=Be.SA,r.SU=Be.SU,r.parseString=Pr,r.optionsToString=Or,r}();function Zo(r,e,t,n,i,s){var a={},o=r.accept;function u(f,h){t.forEach(function(m){m.between(f,h,!0).forEach(function(g){a[Number(g)]=!0})})}i.forEach(function(f){var h=new Yt(f,s).rezonedDate();a[Number(h)]=!0}),r.accept=function(f){var h=Number(f);return isNaN(h)?o.call(this,f):!a[h]&&(u(new Date(h-1),new Date(h+1)),!a[h])?(a[h]=!0,o.call(this,f)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(f){var h=Number(f);return a[h]?!0:(a[h]=!0,o.call(this,f))});for(var l=0;l<n.length;l++){var d=new Yt(n[l],s).rezonedDate();if(!r.accept(new Date(d.getTime())))break}e.forEach(function(f){xn(r,f.options)});var c=r._result;switch(P.sort(c),r.method){case"all":case"between":return c;case"before":return c.length&&c[c.length-1]||null;case"after":default:return c.length&&c[0]||null}}var Qo={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function Ph(r,e){var t=[],n=[],i=[],s=[],a=Mr(r),o=a.dtstart,u=a.tzid,l=Ch(r,e.unfold);return l.forEach(function(d){if(!!d){var c=xh(d),f=c.name,h=c.parms,m=c.value;switch(f.toUpperCase()){case"RRULE":if(h.length)throw new Error("unsupported RRULE parm: "+h.join(","));t.push(Pr(d));break;case"RDATE":var g=/RDATE(?:;TZID=([^:=]+))?/i.exec(d),b=g[0],O=g[1];O&&!u&&(u=O),n=n.concat(Xo(m,h));break;case"EXRULE":if(h.length)throw new Error("unsupported EXRULE parm: "+h.join(","));i.push(Pr(m));break;case"EXDATE":s=s.concat(Xo(m,h));break;case"DTSTART":break;default:throw new Error("unsupported property: "+f)}}}),{dtstart:o,tzid:u,rrulevals:t,rdatevals:n,exrulevals:i,exdatevals:s}}function Mh(r,e){var t=Ph(r,e),n=t.rrulevals,i=t.rdatevals,s=t.exrulevals,a=t.exdatevals,o=t.dtstart,u=t.tzid,l=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||i.length||s.length||a.length){var d=new Si(l);return d.dtstart(o),d.tzid(u||void 0),n.forEach(function(f){d.rrule(new D(Ni(f,o,u),l))}),i.forEach(function(f){d.rdate(f)}),s.forEach(function(f){d.exrule(new D(Ni(f,o,u),l))}),a.forEach(function(f){d.exdate(f)}),e.compatible&&e.dtstart&&d.rdate(o),d}var c=n[0]||{};return new D(Ni(c,c.dtstart||e.dtstart||o,c.tzid||e.tzid||u),l)}function Cn(r,e){return e===void 0&&(e={}),Mh(r,Oh(e))}function Ni(r,e,t){return Ae(Ae({},r),{dtstart:e,tzid:t})}function Oh(r){var e=[],t=Object.keys(r),n=Object.keys(Qo);if(t.forEach(function(i){L(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Ae(Ae({},Qo),r)}function Ah(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=to(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function xh(r){var e=Ah(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function Ch(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(`
`),n=0;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 Nh(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Xo(r,e){return Nh(e),r.split(",").map(function(t){return P.untilStringToDate(t)})}function Jo(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 Si=function(r){Jt(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Jo.apply(n,["dtstart"]),n.tzid=Jo.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return Zo(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){eu(t,this._rrule)},e.prototype.exrule=function(t){eu(t,this._exrule)},e.prototype.rdate=function(t){tu(t,this._rdate)},e.prototype.exdate=function(t){tu(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Cn(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Cn(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(Or({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(ru("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(ru("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}(D);function eu(r,e){if(!(r instanceof D))throw new TypeError(String(r)+" is not RRule instance");L(e.map(String),String(r))||e.push(r)}function tu(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");L(e.map(Number),Number(r))||(e.push(r),P.sort(e))}function ru(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?r+":":r+";TZID="+t+":",s=e.map(function(a){return P.timeToUntilString(a.valueOf(),n)}).join(",");return""+i+s}var vt=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=D.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 d=new D(u);return new vt({rrule:d,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}next(){var t;let e;if(this.baseOnToday){let n=window.moment();e=new D(It(We({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()})).after(n.endOf("day").utc(!0).toDate())}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day").utc(!0);e=this.rrule.after(n.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 lt=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().diff(e.dueDate)/lt.milliSecondsPerDay,i;n>=7?i=1:n>=-14?i=(n+14)*.8/21+.2:i=.2,t+=i*lt.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*lt.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*lt.startedCoefficient),e.priority){case"1":t+=1*lt.priorityCoefficient;break;case"2":t+=.65*lt.priorityCoefficient;break;case"3":t+=.325*lt.priorityCoefficient;break}return t}},Dt=lt;Dt.dueCoefficient=12,Dt.scheduledCoefficient=5,Dt.startedCoefficient=-3,Dt.priorityCoefficient=6,Dt.milliSecondsPerDay=1e3*60*60*24;var ue;(function(t){t.Todo="Todo",t.Done="Done"})(ue||(ue={}));var X;(function(i){i.High="1",i.Medium="2",i.None="3",i.Low="4"})(X||(X={}));var B=class{constructor({status:e,description:t,path:n,indentation:i,sectionStart:s,sectionIndex:a,originalStatusCharacter:o,precedingHeader:u,priority:l,startDate:d,scheduledDate:c,dueDate:f,doneDate:h,recurrence:m,blockLink:g,tags:b}){this._urgency=null;this.status=e,this.description=t,this.path=n,this.indentation=i,this.sectionStart=s,this.sectionIndex=a,this.originalStatusCharacter=o,this.precedingHeader=u,this.tags=b,this.priority=l,this.startDate=d,this.scheduledDate=c,this.dueDate=f,this.doneDate=h,this.recurrence=m,this.blockLink=g}static fromLine({line:e,path:t,sectionStart:n,sectionIndex:i,precedingHeader:s}){let a=e.match(B.taskRegex);if(a===null)return null;let o=a[3].trim(),{globalFilter:u}=se();if(!o.includes(u))return null;let l=o,d=a[1],c=a[2].toLowerCase(),f;switch(c){case" ":f=ue.Todo;break;default:f=ue.Done}let h=l.match(this.blockLinkRegex),m=h!==null?h[0]:"";m!==""&&(l=l.replace(this.blockLinkRegex,"").trim());let g,b=X.None,O=null,K=null,J=null,j=null,V=null,re=[],x=7,R=0;do{g=!1;let w=l.match(B.priorityRegex);if(w!==null){switch(w[1]){case"\u{1F53D}":b=X.Low;break;case"\u{1F53C}":b=X.Medium;break;case"\u23EB":b=X.High;break}l=l.replace(B.priorityRegex,"").trim(),g=!0}let v=l.match(B.doneDateRegex);v!==null&&(j=window.moment(v[1],B.dateFormat),l=l.replace(B.doneDateRegex,"").trim(),g=!0);let y=l.match(B.dueDateRegex);y!==null&&(J=window.moment(y[1],B.dateFormat),l=l.replace(B.dueDateRegex,"").trim(),g=!0);let E=l.match(B.scheduledDateRegex);E!==null&&(K=window.moment(E[1],B.dateFormat),l=l.replace(B.scheduledDateRegex,"").trim(),g=!0);let T=l.match(B.startDateRegex);T!==null&&(O=window.moment(T[1],B.dateFormat),l=l.replace(B.startDateRegex,"").trim(),g=!0);let k=l.match(B.recurrenceRegex);k!==null&&(V=vt.fromText({recurrenceRuleText:k[1].trim(),startDate:O,scheduledDate:K,dueDate:J}),l=l.replace(B.recurrenceRegex,"").trim(),g=!0),R++}while(g&&R<=x);let ne=l.match(this.hashTags);return ne!==null&&(re=ne.filter(w=>w!==u).map(w=>w.trim())),new B({status:f,description:l,path:t,indentation:d,sectionStart:n,sectionIndex:i,originalStatusCharacter:c,precedingHeader:s,priority:b,startDate:O,scheduledDate:K,dueDate:J,doneDate:j,recurrence:V,blockLink:m,tags:re})}toLi(s){return te(this,arguments,function*({parentUlElement:e,listIndex:t,layoutOptions:n,isFilenameUnique:i}){let a=e.createEl("li");a.addClasses(["task-list-item","plugin-tasks-list-item"]);let o=this.toString(n),{globalFilter:u,removeGlobalFilter:l}=se();l&&(o=o.replace(u,"").trim());let d=a.createSpan();d.addClass("tasks-list-text"),yield nu.MarkdownRenderer.renderMarkdown(o,d,this.path,null);let c=d.querySelector("blockquote"),f=c!=null?c:d,h=f.querySelector("p");if(h!==null){for(;h.firstChild;)f.insertBefore(h.firstChild,h);h.remove()}d.findAll("p").forEach(g=>{g.hasChildNodes()||g.remove()}),d.findAll(".footnotes").forEach(g=>{g.remove()});let m=a.createEl("input");return m.addClass("task-list-item-checkbox"),m.type="checkbox",this.status!==ue.Todo&&(m.checked=!0,a.addClass("is-checked")),m.onClickEvent(g=>{g.preventDefault(),g.stopPropagation(),m.disabled=!0;let b=this.toggle();Rn({originalTask:this,newTasks:b})}),a.prepend(m),a.setAttr("data-task",this.originalStatusCharacter.trim()),a.setAttr("data-line",t),m.setAttr("data-line",t),(n==null?void 0:n.shortMode)&&this.addTooltip({element:d,isFilenameUnique:i}),a})}toString(e){var i;e=e!=null?e:new wr;let t=this.description;if(!e.hidePriority){let s="";this.priority===X.High?s=" \u23EB":this.priority===X.Medium?s=" \u{1F53C}":this.priority===X.Low&&(s=" \u{1F53D}"),t+=s}return!e.hideRecurrenceRule&&this.recurrence&&(t+=e.shortMode?" \u{1F501}":` \u{1F501} ${this.recurrence.toText()}`),!e.hideStartDate&&this.startDate&&(t+=e.shortMode?" \u{1F6EB}":` \u{1F6EB} ${this.startDate.format(B.dateFormat)}`),!e.hideScheduledDate&&this.scheduledDate&&(t+=e.shortMode?" \u23F3":` \u23F3 ${this.scheduledDate.format(B.dateFormat)}`),!e.hideDueDate&&this.dueDate&&(t+=e.shortMode?" \u{1F4C5}":` \u{1F4C5} ${this.dueDate.format(B.dateFormat)}`),!e.hideDoneDate&&this.doneDate&&(t+=e.shortMode?" \u2705":` \u2705 ${this.doneDate.format(B.dateFormat)}`),t+=(i=this.blockLink)!=null?i:"",t}toFileLineString(){return`${this.indentation}- [${this.originalStatusCharacter}] ${this.toString()}`}toggle(){let e=this.status===ue.Todo?ue.Done:ue.Todo,t=null,n=null;if(e!==ue.Todo){let{setDoneDate:a}=se();a&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let i=new B(It(We({},this),{status:e,doneDate:t,originalStatusCharacter:e===ue.Done?"x":" "})),s=[];if(n!==null){let a=new B(It(We(We({},this),n),{blockLink:""}));s.push(a)}return s.push(i),s}get urgency(){return this._urgency===null&&(this._urgency=Dt.calculate(this)),this._urgency}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}addTooltip({element:e,isFilenameUnique:t}){e.addEventListener("mouseenter",()=>{let n=e.createDiv();n.addClasses(["tooltip","mod-right"]),this.recurrence&&n.createDiv().setText(`\u{1F501} ${this.recurrence.toText()}`),this.startDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u{1F6EB}",date:this.startDate})),this.scheduledDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u23F3",date:this.scheduledDate})),this.dueDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u{1F4C5}",date:this.dueDate})),this.doneDate&&n.createDiv().setText(B.toTooltipDate({signifier:"\u2705",date:this.doneDate}));let i=this.getLinkText({isFilenameUnique:t});i&&n.createDiv().setText(`\u{1F517} ${i}`),e.addEventListener("mouseleave",()=>{n.remove()})})}static toTooltipDate({signifier:e,date:t}){return`${e} ${t.format(B.dateFormat)} (${t.from(window.moment().startOf("day"))})`}},H=B;H.dateFormat="YYYY-MM-DD",H.taskRegex=/^([\s\t]*)[-*] +\[(.)\] *(.*)/u,H.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,H.priorityRegex=/([⏫🔼🔽])$/u,H.startDateRegex=/🛫 ?(\d{4}-\d{2}-\d{2})$/u,H.scheduledDateRegex=/[⏳⌛] ?(\d{4}-\d{2}-\d{2})$/u,H.dueDateRegex=/[📅📆🗓] ?(\d{4}-\d{2}-\d{2})$/u,H.doneDateRegex=/✅ ?(\d{4}-\d{2}-\d{2})$/u,H.recurrenceRegex=/🔁 ?([a-zA-Z0-9, !]+)$/iu,H.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g;var Ut;(function(n){n.Cold="Cold",n.Initializing="Initializing",n.Warm="Warm"})(Ut||(Ut={}));var Ii=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new Ei,this.state=Ut.Cold,this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>te(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){let e=this.vault.on("create",i=>{i instanceof Nn.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(i)})});this.vaultEventReferences.push(e);let t=this.vault.on("delete",i=>{i instanceof Nn.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(s=>s.path!==i.path),this.notifySubscribers()})});this.vaultEventReferences.push(t);let n=this.vault.on("rename",(i,s)=>{i instanceof Nn.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.map(a=>a.path===s?new H(It(We({},a),{path:i.path})):a),this.notifySubscribers()})});this.vaultEventReferences.push(n)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>te(this,null,function*(){this.state=Ut.Initializing,yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state=Ut.Warm,this.notifySubscribers()}))}indexFile(e){return te(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=t.listItems;n===void 0&&(n=[]);let s=(yield this.vault.cachedRead(e)).split(`
`);this.tasks=this.tasks.filter(u=>u.path!==e.path);let a=null,o=0;for(let u of n)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=H.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 n of t)if(n.type==="list"&&n.position.start.line<=e&&n.position.end.line>=e)return n;return null}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 aa=Le(require("obsidian"));var Yf=Le(require("obsidian"));function rr(){}function Fi(r){return r()}function iu(){return Object.create(null)}function qt(r){r.forEach(Fi)}function su(r){return typeof r=="function"}function au(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function ou(r){return Object.keys(r).length===0}var C1=new Set;var uu=!1;function Sh(){uu=!0}function Ih(){uu=!1}function _(r,e){r.appendChild(e)}function Wi(r,e,t){r.insertBefore(e,t||null)}function Sn(r){r.parentNode.removeChild(r)}function A(r){return document.createElement(r)}function Fh(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function ct(r){return document.createTextNode(r)}function Q(){return ct(" ")}function wt(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function lu(r){return function(e){return e.preventDefault(),r.call(this,e)}}function I(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Wh(r){return Array.from(r.childNodes)}function cu(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Ke(r,e){r.value=e==null?"":e}function Li(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 du(r){let e=r.querySelector(":checked")||r.options[0];return e&&e.__value}var nr=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=Fh(t.nodeName):this.e=A(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)Wi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Sn)}};var N1=new Map;var Ar;function xr(r){Ar=r}function Lh(){if(!Ar)throw new Error("Function called outside component initialization");return Ar}function Yi(r){Lh().$$.on_mount.push(r)}var Cr=[];var In=[],Fn=[],fu=[],Yh=Promise.resolve(),Ui=!1;function Uh(){Ui||(Ui=!0,Yh.then(hu))}function Nr(r){Fn.push(r)}var qi=new Set,Wn=0;function hu(){let r=Ar;do{for(;Wn<Cr.length;){let e=Cr[Wn];Wn++,xr(e),qh(e.$$)}for(xr(null),Cr.length=0,Wn=0;In.length;)In.pop()();for(let e=0;e<Fn.length;e+=1){let t=Fn[e];qi.has(t)||(qi.add(t),t())}Fn.length=0}while(Cr.length);for(;fu.length;)fu.pop()();Ui=!1,qi.clear(),xr(r)}function qh(r){if(r.fragment!==null){r.update(),qt(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Nr)}}var $h=new Set;function jh(r,e){r&&r.i&&($h.delete(r),r.i(e))}var S1=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var I1=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 Bh(r,e,t,n){let{fragment:i,on_mount:s,on_destroy:a,after_update:o}=r.$$;i&&i.m(e,t),n||Nr(()=>{let u=s.map(Fi).filter(su);a?a.push(...u):qt(u),r.$$.on_mount=[]}),o.forEach(Nr)}function pu(r,e){let t=r.$$;t.fragment!==null&&(qt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Gh(r,e){r.$$.dirty[0]===-1&&(Cr.push(r),Uh(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function mu(r,e,t,n,i,s,a,o=[-1]){let u=Ar;xr(r);let l=r.$$={fragment:null,ctx:null,props:s,update:rr,not_equal:i,bound:iu(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:iu(),dirty:o,skip_bound:!1,root:e.target||u.$$.root};a&&a(l.root);let d=!1;if(l.ctx=t?t(r,e.props||{},(c,f,...h)=>{let m=h.length?h[0]:f;return l.ctx&&i(l.ctx[c],l.ctx[c]=m)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](m),d&&Gh(r,c)),f}):[],l.update(),d=!0,qt(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){Sh();let c=Wh(e.target);l.fragment&&l.fragment.l(c),c.forEach(Sn)}else l.fragment&&l.fragment.c();e.intro&&jh(r.$$.fragment),Bh(r,e.target,e.anchor,e.customElement),Ih(),hu()}xr(u)}var Hh;typeof HTMLElement=="function"&&(Hh=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Fi).filter(su);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){qt(this.$$.on_disconnect)}$destroy(){pu(this,1),this.$destroy=rr}$on(r,e){let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!ou(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var $i=class{$destroy(){pu(this,1),this.$destroy=rr}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!ou(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var cn=Le(ve());var dv={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function di(r){for(let[e,t]of Object.entries(dv))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}function fv(r){let e,t,n,i,s,a,o,u,l,d,c,f,h,m,g,b,O,K,J,j,V,re,x,R,ne,Ce,w,v,y,E,T,k,M,G,ee,q,de,Ie,$e,tt,yt,Me,fe,ze,Fe,Nt,yn,Ma,gn,Oa,gt,_n,Aa,at,xa,Tn,Ca,bn,Na,Sa,Ia,Vt,Zt,Fa,St,vn,Wa,bi,Dn=r[0].status+"",vi,La,wn,Ya,En,Ua,qa,$a,Di,ja,kn,wi,Ba;return{c(){e=A("div"),t=A("form"),n=A("div"),i=A("label"),i.textContent="Description",s=Q(),a=A("input"),o=Q(),u=A("hr"),l=Q(),d=A("div"),c=A("label"),c.textContent="Priority",f=Q(),h=A("select"),m=A("option"),m.textContent="None",g=A("option"),g.textContent="\u23EB High",b=A("option"),b.textContent="\u{1F53C} Medium",O=A("option"),O.textContent="\u{1F53D} Low",K=Q(),J=A("hr"),j=Q(),V=A("div"),re=A("label"),re.textContent="Recurrence",x=Q(),R=A("input"),ne=Q(),Ce=A("code"),w=ct("\u{1F501} "),v=new nr(!1),y=Q(),E=A("hr"),T=Q(),k=A("div"),M=A("div"),G=A("label"),G.textContent="Due",ee=Q(),q=A("input"),de=Q(),Ie=A("code"),$e=ct("\u{1F4C5} "),tt=new nr(!1),yt=Q(),Me=A("div"),fe=A("label"),fe.textContent="Scheduled",ze=Q(),Fe=A("input"),Nt=Q(),yn=A("code"),Ma=ct("\u23F3 "),gn=new nr(!1),Oa=Q(),gt=A("div"),_n=A("label"),_n.textContent="Start",Aa=Q(),at=A("input"),xa=Q(),Tn=A("code"),Ca=ct("\u{1F6EB} "),bn=new nr(!1),Na=Q(),Sa=A("hr"),Ia=Q(),Vt=A("div"),Zt=A("div"),Fa=ct(`Status:
`),St=A("input"),Wa=Q(),bi=A("code"),vi=ct(Dn),La=Q(),wn=A("div"),Ya=ct(`Done on:
`),En=A("code"),Ua=Q(),qa=A("hr"),$a=Q(),Di=A("div"),ja=Q(),kn=A("div"),kn.innerHTML='<button type="submit" class="mod-cta">Apply</button>',I(i,"for","description"),I(a,"id","description"),I(a,"type","text"),I(a,"class","tasks-modal-description"),I(a,"placeholder","Take out the trash"),I(n,"class","tasks-modal-section"),I(c,"for","priority"),m.__value="none",m.value=m.__value,g.__value="high",g.value=g.__value,b.__value="medium",b.value=b.__value,O.__value="low",O.value=O.__value,I(h,"id","priority"),I(h,"class","dropdown"),r[0].priority===void 0&&Nr(()=>r[14].call(h)),I(d,"class","tasks-modal-section"),I(re,"for","recurrence"),I(R,"id","description"),I(R,"type","text"),I(R,"placeholder","Try 'every 2 weeks on Thursday'."),v.a=null,I(V,"class","tasks-modal-section"),I(G,"for","due"),I(q,"id","due"),I(q,"type","text"),I(q,"placeholder",sa),tt.a=null,I(M,"class","tasks-modal-date"),I(fe,"for","scheduled"),I(Fe,"id","scheduled"),I(Fe,"type","text"),I(Fe,"placeholder",sa),gn.a=null,I(Me,"class","tasks-modal-date"),I(_n,"for","start"),I(at,"id","start"),I(at,"type","text"),I(at,"placeholder",sa),bn.a=null,I(gt,"class","tasks-modal-date"),I(k,"class","tasks-modal-section"),I(St,"type","checkbox"),I(St,"class","task-list-item-checkbox tasks-modal-checkbox"),St.checked=vn=r[0].status===ue.Done,St.disabled=!0,I(Vt,"class","tasks-modal-section"),I(Di,"class","tasks-modal-section"),I(kn,"class","tasks-modal-section"),I(e,"class","tasks-modal")},m(ie,Oe){Wi(ie,e,Oe),_(e,t),_(t,n),_(n,i),_(n,s),_(n,a),Ke(a,r[0].description),r[13](a),_(t,o),_(t,u),_(t,l),_(t,d),_(d,c),_(d,f),_(d,h),_(h,m),_(h,g),_(h,b),_(h,O),Li(h,r[0].priority),_(t,K),_(t,J),_(t,j),_(t,V),_(V,re),_(V,x),_(V,R),Ke(R,r[0].recurrenceRule),_(V,ne),_(V,Ce),_(Ce,w),v.m(r[5],Ce),_(t,y),_(t,E),_(t,T),_(t,k),_(k,M),_(M,G),_(M,ee),_(M,q),Ke(q,r[0].dueDate),_(M,de),_(M,Ie),_(Ie,$e),tt.m(r[4],Ie),_(k,yt),_(k,Me),_(Me,fe),_(Me,ze),_(Me,Fe),Ke(Fe,r[0].scheduledDate),_(Me,Nt),_(Me,yn),_(yn,Ma),gn.m(r[3],yn),_(k,Oa),_(k,gt),_(gt,_n),_(gt,Aa),_(gt,at),Ke(at,r[0].startDate),_(gt,xa),_(gt,Tn),_(Tn,Ca),bn.m(r[2],Tn),_(t,Na),_(t,Sa),_(t,Ia),_(t,Vt),_(Vt,Zt),_(Zt,Fa),_(Zt,St),_(Zt,Wa),_(Zt,bi),_(bi,vi),_(Vt,La),_(Vt,wn),_(wn,Ya),_(wn,En),En.innerHTML=r[6],_(t,Ua),_(t,qa),_(t,$a),_(t,Di),_(t,ja),_(t,kn),wi||(Ba=[wt(a,"input",r[12]),wt(h,"change",r[14]),wt(R,"input",r[15]),wt(q,"input",r[16]),wt(Fe,"input",r[17]),wt(at,"input",r[18]),wt(t,"submit",lu(r[7]))],wi=!0)},p(ie,[Oe]){Oe&1&&a.value!==ie[0].description&&Ke(a,ie[0].description),Oe&1&&Li(h,ie[0].priority),Oe&1&&R.value!==ie[0].recurrenceRule&&Ke(R,ie[0].recurrenceRule),Oe&32&&v.p(ie[5]),Oe&1&&q.value!==ie[0].dueDate&&Ke(q,ie[0].dueDate),Oe&16&&tt.p(ie[4]),Oe&1&&Fe.value!==ie[0].scheduledDate&&Ke(Fe,ie[0].scheduledDate),Oe&8&&gn.p(ie[3]),Oe&1&&at.value!==ie[0].startDate&&Ke(at,ie[0].startDate),Oe&4&&bn.p(ie[2]),Oe&1&&vn!==(vn=ie[0].status===ue.Done)&&(St.checked=vn),Oe&1&&Dn!==(Dn=ie[0].status+"")&&cu(vi,Dn),Oe&64&&(En.innerHTML=ie[6])},i:rr,o:rr,d(ie){ie&&Sn(e),r[13](null),wi=!1,qt(Ba)}}}var sa="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function hv(r,e,t){var n,i;let{task:s}=e,{onSubmit:a}=e,o,u={description:"",status:ue.Todo,priority:"none",recurrenceRule:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:""},l="",d="",c="",f="",h="";function m(x,R,ne=void 0){if(!R)return`<i>no ${x} date</i>`;let Ce=cn.default.parseDate(R,ne,{forwardDate:ne!=null});return Ce!==null?window.moment(Ce).format("YYYY-MM-DD"):`<i>invalid ${x} date</i>`}Yi(()=>{let{globalFilter:x}=se(),R=s.description.replace(x,"").replace(" "," ").trim(),ne="none";s.priority===X.Low?ne="low":s.priority===X.Medium?ne="medium":s.priority===X.High&&(ne="high"),t(0,u={description:R,status:s.status,priority:ne,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 g=()=>{let{globalFilter:x}=se(),R=u.description.trim();R.includes(x)||(R=x+" "+R);let ne=null,Ce=cn.default.parseDate(u.startDate,new Date,{forwardDate:!0});Ce!==null&&(ne=window.moment(Ce));let w=null,v=cn.default.parseDate(u.scheduledDate,new Date,{forwardDate:!0});v!==null&&(w=window.moment(v));let y=null,E=cn.default.parseDate(u.dueDate,new Date,{forwardDate:!0});E!==null&&(y=window.moment(E));let T=null;u.recurrenceRule&&(T=vt.fromText({recurrenceRuleText:u.recurrenceRule,startDate:ne,scheduledDate:w,dueDate:y}));let k;switch(u.priority){case"low":k=X.Low;break;case"medium":k=X.Medium;break;case"high":k=X.High;break;default:k=X.None}let M=new H(Object.assign(Object.assign({},s),{description:R,status:u.status,priority:k,recurrence:T,startDate:ne,scheduledDate:w,dueDate:y,doneDate:window.moment(u.doneDate,"YYYY-MM-DD").isValid()?window.moment(u.doneDate,"YYYY-MM-DD"):null}));a([M])};function b(){u.description=this.value,t(0,u)}function O(x){In[x?"unshift":"push"](()=>{o=x,t(1,o)})}function K(){u.priority=du(this),t(0,u)}function J(){u.recurrenceRule=this.value,t(0,u)}function j(){u.dueDate=this.value,t(0,u)}function V(){u.scheduledDate=this.value,t(0,u)}function re(){u.startDate=this.value,t(0,u)}return r.$$set=x=>{"task"in x&&t(8,s=x.task),"onSubmit"in x&&t(9,a=x.onSubmit)},r.$$.update=()=>{if(r.$$.dirty&1){e:t(0,u.startDate=di(u.startDate),u),t(2,l=m("start",u.startDate,new Date))}if(r.$$.dirty&1){e:t(0,u.scheduledDate=di(u.scheduledDate),u),t(3,d=m("scheduled",u.scheduledDate,new Date))}if(r.$$.dirty&1){e:t(0,u.dueDate=di(u.dueDate),u),t(4,c=m("due",u.dueDate,new Date))}if(r.$$.dirty&3073){e:u.recurrenceRule?t(5,f=t(11,i=t(10,n=vt.fromText({recurrenceRuleText:u.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||n===void 0?void 0:n.toText())!==null&&i!==void 0?i:"<i>invalid recurrence rule</i>"):t(5,f="<i>not recurring</>")}if(r.$$.dirty&1){e:t(6,h=m("done",u.doneDate))}},[u,o,l,d,c,f,h,g,s,a,n,i,b,O,K,J,j,V,re]}var Wf=class extends $i{constructor(e){super();mu(this,e,hv,fv,au,{task:8,onSubmit:9})}},Lf=Wf;var dn=class extends Yf.Modal{constructor({app:e,task:t,onSubmit:n}){super(e);this.task=t,this.onSubmit=i=>{n(i),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:e}=this;new Lf({target:e,props:{task:this.task,onSubmit:this.onSubmit}})}onClose(){let{contentEl:e}=this;e.empty()}};var Uf=(r,e,t,n)=>{var c;if(r)return t instanceof aa.MarkdownView;if(!(t instanceof aa.MarkdownView))return;let i=(c=t.file)==null?void 0:c.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=pv({line:o,path:i}),l=f=>{let h=f.map(m=>m.toFileLineString()).join(`
`);e.setLine(a,h)};new dn({app:n,task:u,onSubmit:l}).open()},pv=({line:r,path:e})=>{var c;let t=H.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 H({status:ue.Todo,description:"",path:e,indentation:"",originalStatusCharacter:" ",priority:X.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===" "?ue.Todo:ue.Done,u=i[4],l=r.match(H.blockLinkRegex),d=l!==null?l[0]:"";return d!==""&&(u=u.replace(H.blockLinkRegex,"")),new H({status:o,description:u,path:e,indentation:s,originalStatusCharacter:a,blockLink:d,priority:X.None,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,sectionStart:0,sectionIndex:0,precedingHeader:null,tags:[]})};var oa=Le(require("obsidian"));var qf=(r,e,t)=>{var u;if(r)return t instanceof oa.MarkdownView;if(!(t instanceof oa.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=mv({line:a,path:n});e.setLine(s,o),/[^ [\]*-]/.test(o)&&e.setCursor({line:i.line,ch:i.ch+o.length-a.length})},mv=({line:r,path:e})=>{let t=r,n=H.fromLine({line:r,path:e,sectionStart:0,sectionIndex:0,precedingHeader:null});if(n!==null)t=yv({task:n});else{let i=r.match(H.taskRegex);if(i!==null)t=gv({regexMatch:i});else{let s=/^([\s\t]*)([-*])/;s.test(r)?t=r.replace(s,"$1$2 [ ]"):t=r.replace(/^([\s\t]*)/,"$1- ")}}return t},yv=({task:r})=>r.toggle().map(n=>n.toFileLineString()).join(`
`),gv=({regexMatch:r})=>{let e=r[1],t=r[2].toLowerCase(),n=r[3];return`${e}- [${t===" "?"x":" "}] ${n}`};var ua=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)=>Uf(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:qf})}};var _r;(function(t){t.CacheUpdate="obsidian-tasks-plugin:cache-update",t.RequestCacheUpdate="obsidian-tasks-plugin:request-cache-update"})(_r||(_r={}));var la=class{constructor({obsidianEents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on(_r.CacheUpdate,e)}triggerCacheUpdate(e){this.obsidianEvents.trigger(_r.CacheUpdate,e)}onRequestCacheUpdate(e){return this.obsidianEvents.on(_r.RequestCacheUpdate,e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger(_r.RequestCacheUpdate,e)}off(e){this.obsidianEvents.offref(e)}};var ca=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return te(this,null,function*(){var d;let{globalFilter:n}=se(),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 g=0;g<f.length;g=g+1)if(f[g]!==""){h=f[g];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 c=a.lineStart;c<=a.lineEnd;c++){let f=o[c];if(f===void 0)continue;let h=H.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",g=Number.parseInt(m,10),b=yield f.toLi({parentUlElement:e,listIndex:g}),O=h.childNodes;for(let j=0;j<O.length;j=j+1){let V=O[j];V.nodeName.toLowerCase()==="div"?b.prepend(V):V.nodeName.toLowerCase()==="ul"&&b.append(V)}let K=h.querySelectorAll("[data-footnote-id]"),J=b.querySelectorAll("[data-footnote-id]");if(K.length===J.length)for(let j=0;j<K.length;j++)J[j].replaceWith(K[j]);h.replaceWith(b)}})}};var $f=Le(require("@codemirror/view"));var jf=()=>$f.ViewPlugin.fromClass(Bf),Bf=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=H.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(n.lineBreak),l=n.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 Hf=Le(require("obsidian"));var da=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var fa=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 da(n,i));for(let s=n;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return t}};var ha=class extends Map{},pa=class{constructor(e,t){this.groups=new ha;if(e.length===0||t.length===0)this.groups.set([],t);else{let n=Ct.getGroupersForAllQueryGroupings(e);for(let i of t){let s=Ct.getGroupNamesForTask(n,i);this.addTask(s,i)}this.groups=this.getSortedGroups()}}addTask(e,t){let n=this.getOrCreateGroupForGroupNames(e);n==null||n.push(t)}getOrCreateGroupForGroupNames(e){for(let[n,i]of this.groups)if(JSON.stringify(n)===JSON.stringify(e))return i;let t=[];return this.groups.set(e,t),t}getSortedGroups(){return new ha([...this.groups.entries()].sort())}};var ma=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 ya=class{constructor(e,t){this._groups=new Array;let n=new pa(e,t);this.addTasks(n)}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 n of this.groups)e+=n.toString(),e+=`
---
`;return e+=`
${this.totalTasksCount()} tasks
`,e}addTasks(e){let t=new fa(e.groups);for(let[n,i]of e.groups){let s=t.getHeadingsForTaskGroup(n),a=new ma(n,s,i);this.add(a)}}add(e){this._groups.push(e)}};var he=class{static by(e,t){return new ya(e,t)}static getGroupersForAllQueryGroupings(e){let t=[];for(let{property:n}of e){let i=he.groupers[n];t.push(i)}return t}static getGroupNamesForTask(e,t){let n=[];for(let i of e){let s=i(t);n.push(s)}return n}static getGroupNameForTask(e,t){return he.groupers[e](t)}static groupByStartDate(e){return he.groupByDate(e.startDate,"start")}static groupByScheduledDate(e){return he.groupByDate(e.scheduledDate,"scheduled")}static groupByDueDate(e){return he.groupByDate(e.dueDate,"due")}static groupByDoneDate(e){return he.groupByDate(e.doneDate,"done")}static groupByDate(e,t){return e===null?"No "+t+" date":e.format(he.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 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}},Ct=he;Ct.groupDateFormat="YYYY-MM-DD dddd",Ct.groupers={backlink:he.groupByBacklink,done:he.groupByDoneDate,due:he.groupByDueDate,filename:he.groupByFileName,folder:he.groupByFolder,heading:he.groupByHeading,path:he.groupByPath,scheduled:he.groupByScheduledDate,start:he.groupByStartDate,status:he.groupByStatus};var U=class{static by(e,t){let n=[U.compareByUrgency,U.compareByStatus,U.compareByDueDate,U.compareByPriority,U.compareByPath],i=[];for(let{property:s,reverse:a,propertyInstance:o}of e.sorting){let u=U.comparators[s];i.push(a?U.makeReversedComparator(u):u),s==="tag"&&(U.tagPropertyInstance=o)}return t.sort(U.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 U.compareByDate(e.startDate,t.startDate)}static compareByScheduledDate(e,t){return U.compareByDate(e.scheduledDate,t.scheduledDate)}static compareByDueDate(e,t){return U.compareByDate(e.dueDate,t.dueDate)}static compareByDoneDate(e,t){return U.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=U.tagPropertyInstance-1;return e.tags.length<U.tagPropertyInstance&&t.tags.length>=U.tagPropertyInstance?1:t.tags.length<U.tagPropertyInstance&&e.tags.length>=U.tagPropertyInstance?-1:e.tags.length<U.tagPropertyInstance&&t.tags.length<U.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 U.cleanDescription(e.description).localeCompare(U.cleanDescription(t.description))}static cleanDescription(e){let t=se().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}},fn=U;fn.tagPropertyInstance=1,fn.comparators={urgency:U.compareByUrgency,description:U.compareByDescription,priority:U.compareByPriority,start:U.compareByStartDate,scheduled:U.compareByScheduledDate,due:U.compareByDueDate,done:U.compareByDoneDate,path:U.compareByPath,status:U.compareByStatus,tag:U.compareByTag};var et=class{canCreateFilterForLine(e){return this.filterRegexp().test(e)}};var Pe=class{};var st=class extends et{createFilterOrErrorMessage(e){let t=new Pe,n=e.match(this.filterRegexp());return n!==null?n[1]==="includes"?t.filter=s=>st.stringIncludesCaseInsensitive(this.value(s),n[2]):n[1]==="does not include"?t.filter=s=>!st.stringIncludesCaseInsensitive(this.value(s),n[2]):t.error=`do not understand query filter (${this.fieldName()})`:t.error=`do not understand query filter (${this.fieldName()})`,t}static stringIncludesCaseInsensitive(e,t){return e.toLocaleLowerCase().includes(t.toLocaleLowerCase())}};var ga=class extends st{fieldName(){return"description"}filterRegexp(){return ga.descriptionRegexp}value(e){let t=se().globalFilter;return e.description.replace(t,"").trim()}},fi=ga;fi.descriptionRegexp=/^description (includes|does not include) (.*)/;var Gf=Le(ve()),hn=class{static parseDate(e){return window.moment(Gf.parseDate(e)).startOf("day")}};var mt=class extends et{createFilterOrErrorMessage(e){let t=new Pe,n=e.match(this.filterRegexp());if(n!==null){let i=hn.parseDate(n[2]);i.isValid()?n[1]==="before"?t.filter=s=>{let a=this.date(s);return a?a.isBefore(i):this.filterResultIfFieldMissing()}:n[1]==="after"?t.filter=s=>{let a=this.date(s);return a?a.isAfter(i):this.filterResultIfFieldMissing()}:t.filter=s=>{let a=this.date(s);return a?a.isSame(i):this.filterResultIfFieldMissing()}:t.error="do not understand "+this.fieldName()+" date"}else t.error="do not understand query filter ("+this.fieldName()+" date)";return t}};var zt=class extends mt{canCreateFilterForLine(e){return e===zt.instructionForFieldPresence||e===zt.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){if(e===zt.instructionForFieldPresence){let t=new Pe;return t.filter=n=>this.date(n)!==null,t}if(e===zt.instructionForFieldAbsence){let t=new Pe;return t.filter=n=>this.date(n)===null,t}return super.createFilterOrErrorMessage(e)}filterRegexp(){return zt.doneRegexp}fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}},Tr=zt;Tr.doneRegexp=/^done (before|after|on)? ?(.*)/,Tr.instructionForFieldPresence="has done date",Tr.instructionForFieldAbsence="no done date";var _a=class extends mt{filterRegexp(){return _a.dueRegexp}fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}},hi=_a;hi.dueRegexp=/^due (before|after|on)? ?(.*)/;var Ta=class extends st{filterRegexp(){return Ta.headingRegexp}fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}},pi=Ta;pi.headingRegexp=/^heading (includes|does not include) (.*)/;var ba=class extends st{filterRegexp(){return ba.pathRegexp}fieldName(){return"path"}value(e){return e.path}},mi=ba;mi.pathRegexp=/^path (includes|does not include) (.*)/;var va=class extends et{createFilterOrErrorMessage(e){let t=new Pe,n=e.match(this.filterRegexp());if(n!==null){let i=n[3],s=null;switch(i){case"low":s=X.Low;break;case"none":s=X.None;break;case"medium":s=X.Medium;break;case"high":s=X.High;break}if(s===null)return t.error="do not understand priority",t;let a;n[2]==="above"?a=o=>o.priority?o.priority.localeCompare(s)<0:!1:n[2]==="below"?a=o=>o.priority?o.priority.localeCompare(s)>0:!1:a=o=>o.priority?o.priority===s:!1,t.filter=a}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegexp(){return va.priorityRegexp}},yi=va;yi.priorityRegexp=/^priority (is )?(above|below)? ?(low|none|medium|high)/;var Da=class extends mt{filterRegexp(){return Da.scheduledRegexp}fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}},gi=Da;gi.scheduledRegexp=/^scheduled (before|after|on)? ?(.*)/;var wa=class extends mt{filterRegexp(){return wa.startRegexp}fieldName(){return"start"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}},_i=wa;_i.startRegexp=/^starts (before|after|on)? ?(.*)/;var Kt=class extends et{canCreateFilterForLine(e){return e===Kt.instructionForFieldPresence||e===Kt.instructionForFieldAbsence?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let t=new Pe;if(e===Kt.instructionForFieldPresence){let i=new Pe;return i.filter=s=>this.dates(s).some(a=>a!==null),i}if(e===Kt.instructionForFieldAbsence){let i=new Pe;return i.filter=s=>!this.dates(s).some(a=>a!==null),i}let n=e.match(this.filterRegexp());if(n!==null){let i=hn.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}filterRegexp(){return Kt.happensRegexp}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}fieldName(){return"happens"}},br=Kt;br.happensRegexp=/^happens (before|after|on)? ?(.*)/,br.instructionForFieldPresence="has happens date",br.instructionForFieldAbsence="no happens date";var Ea=class extends et{createFilterOrErrorMessage(e){let t=new Pe,n=e.match(this.filterRegexp());if(n!==null){let i=n[2],s=n[3].replace(/^#/,"");i==="include"||i==="includes"?t.filter=a=>a.tags.find(o=>o.toLowerCase().includes(s.toLowerCase()))!==void 0:n[2]==="do not include"||n[2]==="does not include"?t.filter=a=>a.tags.find(o=>o.toLowerCase().includes(s.toLowerCase()))==null:t.error="do not understand query filter (tag/tags)"}else t.error="do not understand query filter (tag/tags)";return t}fieldName(){return"tag/tags"}filterRegexp(){return Ea.tagRegexp}},Ti=Ea;Ti.tagRegexp=/^(tag|tags) (includes|does not include|include|do not include) (.*)/;var pn=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new wr;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.noStartString="no start date";this.hasStartString="has start date";this.noScheduledString="no scheduled date";this.hasScheduledString="has scheduled date";this.noDueString="no due date";this.hasDueString="has due date";this.doneString="done";this.notDoneString="not done";this.sortByRegexp=/^sort by (urgency|status|priority|start|scheduled|due|done|path|description|tag)( reverse)?[\s]*(\d+)?/;this.groupByRegexp=/^group by (backlink|done|due|filename|folder|heading|path|scheduled|start|status)/;this.hideOptionsRegexp=/^hide (task count|backlink|priority|start date|scheduled date|done date|due date|recurrence rule|edit button)/;this.shortModeRegexp=/^short/;this.recurringString="is recurring";this.notRecurringString="is not recurring";this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.excludeSubItemsString="exclude sub-items";this.commentRegexp=/^#.*/;this.source=e,e.split(`
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case t===this.doneString:this._filters.push(n=>n.status===ue.Done);break;case t===this.notDoneString:this._filters.push(n=>n.status!==ue.Done);break;case t===this.recurringString:this._filters.push(n=>n.recurrence!==null);break;case t===this.notRecurringString:this._filters.push(n=>n.recurrence===null);break;case t===this.excludeSubItemsString:this._filters.push(n=>n.indentation==="");break;case t===this.noStartString:this._filters.push(n=>n.startDate===null);break;case t===this.noScheduledString:this._filters.push(n=>n.scheduledDate===null);break;case t===this.noDueString:this._filters.push(n=>n.dueDate===null);break;case t===this.hasStartString:this._filters.push(n=>n.startDate!==null);break;case t===this.hasScheduledString:this._filters.push(n=>n.scheduledDate!==null);break;case t===this.hasDueString:this._filters.push(n=>n.dueDate!==null);break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.parseFilter(t,new yi):break;case this.parseFilter(t,new br):break;case this.parseFilter(t,new _i):break;case this.parseFilter(t,new gi):break;case this.parseFilter(t,new hi):break;case this.parseFilter(t,new Tr):break;case this.parseFilter(t,new mi):break;case this.parseFilter(t,new fi):break;case this.parseFilter(t,new Ti):break;case this.parseFilter(t,new pi):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(n=>{e=e.filter(n)});let t=fn.by(this,e).slice(0,this.limit);return Ct.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:n,error:i}=t.createFilterOrErrorMessage(e);return n?this._filters.push(n):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 ka=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 te(this,null,function*(){n.addChild(new mn({app:this.app,events:this.events,container:t,source:e}))})}},mn=class extends Hf.MarkdownRenderChild{constructor({app:e,events:t,container:n,source:i}){super(n);switch(this.app=e,this.events=t,this.source=i,this.containerEl.className){case"block-language-tasks":this.query=new pn({source:i}),this.queryType="tasks";break;default:this.query=new pn({source:i}),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 e=new Date;e.setHours(24,0,0,0);let t=new Date,n=e.getTime()-t.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new pn({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},n+1e3)}render(n){return te(this,arguments,function*({tasks:e,state:t}){var s;console.debug(`Render ${this.queryType} called for ${e.length} tasks, state: ${t}`);let i=this.containerEl.createEl("div");if(t===Ut.Warm&&this.query.error===void 0){let a=this.query.applyQueryToTasks(e);for(let u of a.groups){mn.addGroupHeadings(i,u.groupHeadings);let{taskList:l}=yield this.createTasksList({tasks:u.tasks,content:i});i.appendChild(l)}let o=a.totalTasksCount();this.addTaskCount(i,o)}else this.query.error!==void 0?i.setText(`Tasks query: ${this.query.error}`):i.setText("Loading Tasks ...");(s=this.containerEl.firstChild)==null||s.replaceWith(i)})}createTasksList(n){return te(this,arguments,function*({tasks:e,content:t}){let i=e.length,s=t.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]);for(let a=0;a<i;a++){let o=e[a],u=this.isFilenameUnique({task:o}),l=yield o.toLi({parentUlElement:s,listIndex:a,layoutOptions:this.query.layoutOptions,isFilenameUnique:u});l.querySelectorAll("[data-footnote-id]").forEach(h=>h.remove());let c=l.createSpan(),f=this.query.layoutOptions.shortMode;this.query.layoutOptions.hideBacklinks||this.addBacklinks(c,o,f,u),this.query.layoutOptions.hideEditButton||this.addEditButton(c,o),s.appendChild(l)}return{taskList:s,tasksCount:i}})}addEditButton(e,t){e.createEl("a",{cls:"tasks-edit"}).onClickEvent(i=>{i.preventDefault();let s=o=>{Rn({originalTask:t,newTasks:o})};new dn({app:this.app,task:t,onSubmit:s}).open()})}static addGroupHeadings(e,t){for(let n of t)mn.addGroupHeading(e,n)}static addGroupHeading(e,t){let n;t.nestingLevel===0?n=e.createEl("h4",{cls:"tasks-group-heading"}):t.nestingLevel===1?n=e.createEl("h5",{cls:"tasks-group-heading"}):n=e.createEl("h6",{cls:"tasks-group-heading"}),n.appendText(t.name)}addBacklinks(e,t,n,i){var o;e.addClass("tasks-backlink"),n||e.append(" (");let s=e.createEl("a");s.href=t.path,s.setAttribute("data-href",t.path),s.rel="noopener",s.target="_blank",s.addClass("internal-link"),n&&s.addClass("internal-link-short-mode"),t.precedingHeader!==null&&(s.href=s.href+"#"+t.precedingHeader,s.setAttribute("data-href",s.getAttribute("data-href")+"#"+t.precedingHeader));let a;n?a=" \u{1F517}":a=(o=t.getLinkText({isFilenameUnique:i}))!=null?o:"",s.setText(a),n||e.append(")")}addTaskCount(e,t){this.query.layoutOptions.hideTaskCount||e.createDiv({text:`${t} task${t!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:e}){let t=e.path.match(/([^/]*)\..+$/i);if(t===null)return;let n=t[1];return this.app.vault.getMarkdownFiles().filter(s=>{if(s.basename===n)return!0}).length<2}};var vr=Le(require("obsidian"));var Ra=class extends vr.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.plugin=e}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:"Tasks Settings"}),e.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),new vr.Setting(e).setName("Global task filter").setDesc("The global filter will be applied to all checklist items.").addText(t=>{let n=se();t.setPlaceholder("#task").setValue(n.globalFilter).onChange(i=>te(this,null,function*(){Qt({globalFilter:i}),yield this.plugin.saveSettings()}))}),e.createEl("div",{cls:"setting-item-description",text:'The global filter will be applied to all checklist items to filter out "non-task" checklist items.\nA checklist item must include the specified string in its description in order to be considered a task.\nFor example, if you set the global filter to `#task`, the Tasks plugin will only handle checklist items tagged with `#task`.\nOther checklist items will remain normal checklist items and not appear in queries or get a done date set.\nLeave empty if you want all checklist items from your vault to be tasks managed by this plugin.'}),new vr.Setting(e).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(t=>{let n=se();t.setValue(n.removeGlobalFilter).onChange(i=>te(this,null,function*(){Qt({removeGlobalFilter:i}),yield this.plugin.saveSettings()}))}),new vr.Setting(e).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done").addToggle(t=>{let n=se();t.setValue(n.setDoneDate).onChange(i=>te(this,null,function*(){Qt({setDoneDate:i}),yield this.plugin.saveSettings()}))})}};var Pa=class extends zf.Plugin{onload(){return te(this,null,function*(){console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new Ra({plugin:this})),Xa({metadataCache:this.app.metadataCache,vault:this.app.vault});let e=new la({obsidianEents:this.app.workspace});this.cache=new Ii({metadataCache:this.app.metadataCache,vault:this.app.vault,events:e}),this.inlineRenderer=new ca({plugin:this}),this.queryRenderer=new ka({plugin:this,events:e}),this.registerEditorExtension(jf()),new ua({plugin:this})})}onunload(){var e;console.log('unloading plugin "tasks"'),(e=this.cache)==null||e.unload()}loadSettings(){return te(this,null,function*(){let e=yield this.loadData();Qt(e)})}saveSettings(){return te(this,null,function*(){yield this.saveData(se())})}};
/*!
* 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.
***************************************************************************** */