|
|
/*
|
|
|
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 and Clare Macrae
|
|
|
|
|
|
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.
|
|
|
*/
|
|
|
|
|
|
"use strict";var mk=Object.create;var Li=Object.defineProperty,yk=Object.defineProperties,gk=Object.getOwnPropertyDescriptor,_k=Object.getOwnPropertyDescriptors,Tk=Object.getOwnPropertyNames,zp=Object.getOwnPropertySymbols,bk=Object.getPrototypeOf,Kp=Object.prototype.hasOwnProperty,vk=Object.prototype.propertyIsEnumerable;var Vp=(r,e,t)=>e in r?Li(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ce=(r,e)=>{for(var t in e||(e={}))Kp.call(e,t)&&Vp(r,t,e[t]);if(zp)for(var t of zp(e))vk.call(e,t)&&Vp(r,t,e[t]);return r},er=(r,e)=>yk(r,_k(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),wk=(r,e)=>{for(var t in e)Li(r,t,{get:e[t],enumerable:!0})},Zp=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Tk(e))!Kp.call(r,s)&&s!==t&&Li(r,s,{get:()=>e[s],enumerable:!(n=gk(e,s))||n.enumerable});return r};var ns=(r,e,t)=>(t=r!=null?mk(bk(r)):{},Zp(e||!r||!r.__esModule?Li(t,"default",{value:r,enumerable:!0}):t,r)),kk=r=>Zp(Li({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(f){s(f)}},o=c=>{try{l(t.throw(c))}catch(f){s(f)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Le=O(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.matchAnyPattern=xn.extractTerms=xn.repeatedTimeunitPattern=void 0;function Ok(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}xn.repeatedTimeunitPattern=Ok;function Xp(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}xn.extractTerms=Xp;function Mk(r){return`(?:${Xp(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}xn.matchAnyPattern=Mk});var Pe=O((Ml,Rl)=>{(function(r,e){typeof Ml=="object"&&typeof Rl!="undefined"?Rl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Ml,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",f="month",m="quarter",g="year",T="date",E="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,C={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("_")},q=function(V,W,x){var Q=String(V);return!Q||Q.length>=W?V:""+Array(W+1-Q.length).join(x)+V},$={s:q,z:function(V){var W=-V.utcOffset(),x=Math.abs(W),Q=Math.floor(x/60),Y=x%60;return(W<=0?"+":"-")+q(Q,2,"0")+":"+q(Y,2,"0")},m:function V(W,x){if(W.date()<x.date())return-V(x,W);var Q=12*(x.year()-W.year())+(x.month()-W.month()),Y=W.clone().add(Q,f),ue=x-Y<0,y=W.clone().add(Q+(ue?-1:1),f);return+(-(Q+(x-Y)/(ue?Y-y:y-Y))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:f,y:g,w:c,d:l,D:T,h:o,m:a,s,ms:n,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},B="en",me={};me[B]=C;var fe=function(V){return V instanceof Ct},ve=function(V,W,x){var Q;if(!V)return B;if(typeof V=="string")me[V]&&(Q=V),W&&(me[V]=W,Q=V);else{var Y=V.name;me[Y]=V,Q=Y}return!x&&Q&&(B=Q),Q||!x&&B},ee=function(V,W){if(fe(V))return V.clone();var x=typeof W=="object"?W:{};return x.date=V,x.args=arguments,new Ct(x)},te=$;te.l=ve,te.i=fe,te.w=function(V,W){return ee(V,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var Ct=function(){function V(x){this.$L=ve(x.locale,null,!0),this.parse(x)}var W=V.prototype;return W.parse=function(x){this.$d=function(Q){var Y=Q.date,ue=Q.utc;if(Y===null)return new Date(NaN);if(te.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var y=Y.match(v);if(y){var _=y[2]-1||0,w=(y[7]||"0").substring(0,3);return ue?new Date(Date.UTC(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)):new Date(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)}}return new Date(Y)}(x),this.$x=x.x||{},this.init()},W.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},W.$utils=function(){return te},W.isValid=function(){return this.$d.toString()!==E},W.isSame=function(x,Q){var Y=ee(x);return this.startOf(Q)<=Y&&Y<=this.endOf(Q)},W.isAfter=function(x,Q){return ee(x)<this.startOf(Q)},W.isBefore=function(x,Q){return this.endOf(Q)<ee(x)},W.$g=function(x,Q,Y){return te.u(x)?this[Q]:this.set(Y,x)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(x,Q){var Y=this,ue=!!te.u(Q)||Q,y=te.p(x),_=function(N,j){var De=te.w(Y.$u?Date.UTC(Y.$y,j,N):new Date(Y.$y,j,N),Y);return ue?De:De.endOf(l)},w=function(N,j){return te.w(Y.toDate()[N].apply(Y.toDate("s"),(ue?[0,0,0,0]:[23,59,59,999]).slice(j)),Y)},k=this.$W,S=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(y){case g:return ue?_(1,0):_(31,11);case f:return ue?_(1,S):_(0,S+1);case c:var I=this.$locale().weekStart||0,A=(k<I?k+7:k)-I;return _(ue?M-A:M+(6-A),S);case l:case T:return w(D+"Hours",0);case o:return w(D+"Minutes",1);case a:return w(D+"Seconds",2);case s:return w(D+"Milliseconds",3);default:return this.clone()}},W.endOf=function(x){return this.startOf(x,!1)},W.$set=function(x,Q){var Y,ue=te.p(x),y="set"+(this.$u?"UTC":""),_=(Y={},Y[l]=y+"Date",Y[T]=y+"Date",Y[f]=y+"Month",Y[g]=y+"FullYear",Y[o]=y+"Hours",Y[a]=y+"Minutes",Y[s]=y+"Seconds",Y[n]=y+"Milliseconds",Y)[ue],w=ue===l?this.$D+(Q-this.$W):Q;if(ue===f||ue===g){var k=this.clone().set(T,1);k.$d[_](w),k.init(),this.$d=k.set(T,Math.min(this.$D,k.daysInMonth())).$d}else _&&this.$d[_](w);return this.init(),this},W.set=function(x,Q){return this.clone().$set(x,Q)},W.get=function(x){return this[te.p(x)]()},W.add=function(x,Q){var Y,ue=this;x=Number(x);var y=te.p(Q),_=function(S){var M=ee(ue);return te.w(M.date(M.date()+Math.round(S*x)),ue)};if(y===f)return this.set(f,this.$M+x);if(y===g)return this.set(g,this.$y+x);if(y===l)return _(1);if(y===c)return _(7);var w=(Y={},Y[a]=e,Y[o]=t,Y[s]=r,Y)[y]||1,k=this.$d.getTime()+x*w;return te.w(k,this)},W.subtract=function(x,Q){return this.add(-1*x,Q)},W.format=function(x){var Q=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||E;var ue=x||"YYYY-MM-DDTHH:mm:ssZ",y=te.z(this),_=this.$H,w=this.$m,k=this.$M,S=Y.weekdays,M=Y.months,D=function(j,De,ye,ce){return j&&(j[De]||j(Q,ue))||ye[De].substr(0,ce)},I=function(j){return te.s(_%12||12,j,"0")},A=Y.meridiem||function(j,De,ye){var ce=j<12?"AM":"PM";return ye?ce.toLowerCase():ce},N={YY:String(this.$y).slice(-2),YYYY:this.$y,M:k+1,MM:te.s(k+1,2,"0"),MMM:D(Y.monthsShort,k,M,3),MMMM:D(M,k),D:this.$D,DD:te.s(this.$D,2,"0"),d:String(this.$W),dd:D(Y.weekdaysMin,this.$W,S,2),ddd:D(Y.weekdaysShort,this.$W,S,3),dddd:S[this.$W],H:String(_),HH:te.s(_,2,"0"),h:I(1),hh:I(2),a:A(_,w,!0),A:A(_,w,!1),m:String(w),mm:te.s(w,2,"0"),s:String(this.$s),ss:te.s(this.$s,2,"0"),SSS:te.s(this.$ms,3,"0"),Z:y};return ue.replace(R,function(j,De){return De||N[j]||y.replace(":","")})},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(x,Q,Y){var ue,y=te.p(Q),_=ee(x),w=(_.utcOffset()-this.utcOffset())*e,k=this-_,S=te.m(this,_);return S=(ue={},ue[g]=S/12,ue[f]=S,ue[m]=S/3,ue[c]=(k-w)/6048e5,ue[l]=(k-w)/864e5,ue[o]=k/t,ue[a]=k/e,ue[s]=k/r,ue)[y]||k,Y?S:te.a(S)},W.daysInMonth=function(){return this.endOf(f).$D},W.$locale=function(){return me[this.$L]},W.locale=function(x,Q){if(!x)return this.$L;var Y=this.clone(),ue=ve(x,Q,!0);return ue&&(Y.$L=ue),Y},W.clone=function(){return te.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},V}(),mt=Ct.prototype;return ee.prototype=mt,[["$ms",n],["$s",s],["$m",a],["$H",o],["$W",l],["$M",f],["$y",g],["$D",T]].forEach(function(V){mt[V[1]]=function(W){return this.$g(W,V[0],V[1])}}),ee.extend=function(V,W){return V.$i||(V(W,Ct,ee),V.$i=!0),ee},ee.locale=ve,ee.isDayjs=fe,ee.unix=function(V){return ee(1e3*V)},ee.en=me[B],ee.Ls=me,ee.p={},ee})});var Rt=O(An=>{"use strict";var Rk=An&&An.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(An,"__esModule",{value:!0});An.findYearClosestToRef=An.findMostLikelyADYear=void 0;var Pk=Rk(Pe());function xk(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}An.findMostLikelyADYear=xk;function Ak(r,e,t){let n=Pk.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let a=s.add(1,"y"),o=s.add(-1,"y");return Math.abs(a.diff(n))<Math.abs(s.diff(n))?s=a:Math.abs(o.diff(n))<Math.abs(s.diff(n))&&(s=o),s.year()}An.findYearClosestToRef=Ak});var Pt=O(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.parseTimeUnits=_e.TIME_UNITS_PATTERN=_e.parseYear=_e.YEAR_PATTERN=_e.parseOrdinalNumberPattern=_e.ORDINAL_NUMBER_PATTERN=_e.parseNumberPattern=_e.NUMBER_PATTERN=_e.TIME_UNIT_DICTIONARY=_e.ORDINAL_WORD_DICTIONARY=_e.INTEGER_WORD_DICTIONARY=_e.MONTH_DICTIONARY=_e.FULL_MONTH_NAME_DICTIONARY=_e.WEEKDAY_DICTIONARY=void 0;var Do=Le(),Nk=Rt();_e.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};_e.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};_e.MONTH_DICTIONARY=Object.assign(Object.assign({},_e.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});_e.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};_e.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};_e.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",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};_e.NUMBER_PATTERN=`(?:${Do.matchAnyPattern(_e.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function Jp(r){let e=r.toLowerCase();return _e.INTEGER_WORD_DICTIONARY[e]!==void 0?_e.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)}_e.parseNumberPattern=Jp;_e.ORDINAL_NUMBER_PATTERN=`(?:${Do.matchAnyPattern(_e.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Ck(r){let e=r.toLowerCase();return _e.ORDINAL_WORD_DICTIONARY[e]!==void 0?_e.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}_e.parseOrdinalNumberPattern=Ck;_e.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function Ik(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return Nk.findMostLikelyADYear(e)}_e.parseYear=Ik;var em=`(${_e.NUMBER_PATTERN})\\s{0,3}(${Do.matchAnyPattern(_e.TIME_UNIT_DICTIONARY)})`,Qp=new RegExp(em,"i");_e.TIME_UNITS_PATTERN=Do.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",em);function Fk(r){let e={},t=r,n=Qp.exec(t);for(;n;)Lk(e,n),t=t.substring(n[0].length).trim(),n=Qp.exec(t);return e}_e.parseTimeUnits=Fk;function Lk(r,e){let t=Jp(e[1]),n=_e.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var tm=O((Pl,xl)=>{(function(r,e){typeof Pl=="object"&&typeof xl!="undefined"?xl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Pl,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(l){return this.$utils().u(l)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(l-1))};var a=s.add;s.add=function(l,c){return l=Number(l),this.$utils().p(c)===e?this.add(3*l,r):a.bind(this)(l,c)};var o=s.startOf;s.startOf=function(l,c){var f=this.$utils(),m=!!f.u(c)||c;if(f.p(l)===e){var g=this.quarter()-1;return m?this.month(3*g).startOf(r).startOf("day"):this.month(3*g+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var pr=O(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.implySimilarTime=Lr.assignSimilarTime=Lr.assignSimilarDate=Lr.assignTheNextDay=void 0;var rm=ht();function Yk(r,e){e=e.add(1,"day"),nm(r,e),sm(r,e)}Lr.assignTheNextDay=Yk;function nm(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Lr.assignSimilarDate=nm;function Uk(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",rm.Meridiem.AM):r.assign("meridiem",rm.Meridiem.PM)}Lr.assignSimilarTime=Uk;function sm(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Lr.implySimilarTime=sm});var im=O(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.toTimezoneOffset=ss.TIMEZONE_ABBR_MAP=void 0;ss.TIMEZONE_ABBR_MAP={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:180,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};function Wk(r){var e;return r==null?null:typeof r=="number"?r:(e=ss.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}ss.toTimezoneOffset=Wk});var tt=O(Yr=>{"use strict";var am=Yr&&Yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.ParsingResult=Yr.ParsingComponents=Yr.ReferenceWithTimezone=void 0;var qk=am(tm()),Eo=am(Pe()),Al=pr(),jk=im();Eo.default.extend(qk.default);var Nl=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=jk.toTimezoneOffset(e.timezone))}};Yr.ReferenceWithTimezone=Nl;var is=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=Eo.default(e.instant);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 is(this.reference);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.dateWithoutTimezoneAdjustment();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)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Eo.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(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}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let s=-e.getTimezoneOffset(),a=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-a}static createRelativeFromReference(e,t){let n=Eo.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new is(e);return t.hour||t.minute||t.second?(Al.assignSimilarTime(s,n),Al.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Al.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};Yr.ParsingComponents=is;var Yi=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new is(e),this.end=a}clone(){let e=new Yi(this.reference,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}', ...}]`}};Yr.ParsingResult=Yi});var Z=O(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.AbstractParserWithWordBoundaryChecking=void 0;var Cl=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let a=2;a<t.length;a++)t[a-1]=t[a];return this.innerExtract(e,t)}};So.AbstractParserWithWordBoundaryChecking=Cl});var om=O(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var Fl=Pt(),$k=tt(),Bk=Z(),Gk=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Fl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Hk=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Fl.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Il=class extends Bk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?Hk:Gk}innerExtract(e,t){let n=Fl.parseTimeUnits(t[1]);return $k.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ll.default=Il});var hm=O(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var zk=Rt(),dm=Pt(),fm=Pt(),Oo=Pt(),Vk=Le(),Kk=Z(),Zk=new RegExp(`(?:on\\s{0,3})?(${Oo.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Oo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${Vk.matchAnyPattern(dm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${fm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),um=1,lm=2,Xk=3,cm=4,Yl=class extends Kk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=dm.MONTH_DICTIONARY[t[Xk].toLowerCase()],a=Oo.parseOrdinalNumberPattern(t[um]);if(a>31)return t.index=t.index+t[um].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[cm]){let o=fm.parseYear(t[cm]);n.start.assign("year",o)}else{let o=zk.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[lm]){let o=Oo.parseOrdinalNumberPattern(t[lm]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Ul.default=Yl});var _m=O(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var Qk=Rt(),ym=Pt(),Mo=Pt(),gm=Pt(),Jk=Le(),eD=Z(),tD=new RegExp(`(${Jk.matchAnyPattern(ym.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Mo.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Mo.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${gm.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),rD=1,nD=2,pm=3,mm=4,Wl=class extends eD.AbstractParserWithWordBoundaryChecking{innerPattern(){return tD}innerExtract(e,t){let n=ym.MONTH_DICTIONARY[t[rD].toLowerCase()],s=Mo.parseOrdinalNumberPattern(t[nD]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[mm]){let c=gm.parseYear(t[mm]);a.assign("year",c)}else{let c=Qk.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[pm])return a;let o=Mo.parseOrdinalNumberPattern(t[pm]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};ql.default=Wl});var vm=O(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var jl=Pt(),sD=Rt(),iD=Le(),bm=Pt(),aD=Z(),oD=new RegExp(`((?:in)\\s*)?(${iD.matchAnyPattern(jl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${bm.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),uD=1,lD=2,Tm=3,$l=class extends aD.AbstractParserWithWordBoundaryChecking{innerPattern(){return oD}innerExtract(e,t){let n=t[lD].toLowerCase();if(t[0].length<=3&&!jl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[uD]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=jl.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[Tm]){let o=bm.parseYear(t[Tm]);s.start.assign("year",o)}else{let o=sD.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};Bl.default=$l});var Dm=O(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var km=Pt(),cD=Le(),dD=Z(),fD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${cD.matchAnyPattern(km.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),hD=1,pD=2,wm=3,mD=4,Gl=class extends dD.AbstractParserWithWordBoundaryChecking{innerPattern(){return fD}innerExtract(e,t){let n=t[wm]?parseInt(t[wm]):km.MONTH_DICTIONARY[t[pD].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[hD]);return{day:parseInt(t[mD]),month:n,year:s}}};Hl.default=Gl});var Em=O(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var yD=Z(),gD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),_D=1,TD=2,zl=class extends yD.AbstractParserWithWordBoundaryChecking{innerPattern(){return gD}innerExtract(e,t){let n=parseInt(t[TD]),s=parseInt(t[_D]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Vl.default=zl});var as=O(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.AbstractTimeExpressionParser=void 0;var $t=ht();function bD(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function vD(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 Sm=2,qs=3,Ro=4,Po=5,Ui=6,Kl=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}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}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 s=t.index+t[1].length,a=t[0].substring(t[1].length),o=e.createParsingResult(s,a,n);t.index+=t[0].length;let l=e.text.substring(t.index),f=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&f&&f[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!f||f[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,f,o),o.end&&(o.text+=f[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[Sm]);if(l>100){if(this.strictMode||t[qs]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[qs]!=null){if(t[qs].length==1&&!t[Ui])return null;a=parseInt(t[qs])}if(a>=60)return null;if(l>12&&(o=$t.Meridiem.PM),t[Ui]!=null){if(l>12)return null;let c=t[Ui][0].toLowerCase();c=="a"&&(o=$t.Meridiem.AM,l==12&&(l=0)),c=="p"&&(o=$t.Meridiem.PM,l!=12&&(l+=12))}if(s.assign("hour",l),s.assign("minute",a),o!==null?s.assign("meridiem",o):l<12?s.imply("meridiem",$t.Meridiem.AM):s.imply("meridiem",$t.Meridiem.PM),t[Po]!=null){let c=parseInt(t[Po].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Ro]!=null){let c=parseInt(t[Ro]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Po]!=null){let c=parseInt(t[Po].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Ro]!=null){let c=parseInt(t[Ro]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[Sm]),o=0,l=-1;if(t[qs]!=null?o=parseInt(t[qs]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=$t.Meridiem.PM),t[Ui]!=null){if(a>12)return null;let c=t[Ui][0].toLowerCase();c=="a"&&(l=$t.Meridiem.AM,a==12&&(a=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),c=="p"&&(l=$t.Meridiem.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(l==$t.Meridiem.AM?(n.start.imply("meridiem",$t.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",$t.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",a),s.assign("minute",o),l>=0?s.assign("meridiem",l):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?s.imply("meridiem",$t.Meridiem.AM):a<=12&&(s.assign("hour",a+12),s.assign("meridiem",$t.Meridiem.PM)):a>12?s.imply("meridiem",$t.Meridiem.PM):a<=12&&s.imply("meridiem",$t.Meridiem.AM),s.date().getTime()<n.start.date().getTime()&&s.imply("day",s.get("day")+1),s}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/)||e.text.match(/^\d\d\d+$/)||e.text.match(/\d[apAP]$/))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],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let a=parseInt(s),o=parseInt(n);if(a>24||o>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=bD(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),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=vD(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};xo.AbstractTimeExpressionParser=Kl});var Om=O(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Ao=ht(),wD=as(),Zl=class extends wD.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ao.Meridiem.PM)):s<6&&n.assign("meridiem",Ao.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Ao.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Ao.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};Xl.default=Zl});var mr=O(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.addImpliedTimeUnits=js.reverseTimeUnits=void 0;function kD(r){let e={};for(let t in r)e[t]=-r[t];return e}js.reverseTimeUnits=kD;function DD(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);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}js.addImpliedTimeUnits=DD});var Mm=O(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var Jl=Pt(),ED=tt(),SD=Z(),OD=mr(),MD=new RegExp(`(${Jl.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),RD=new RegExp(`(${Jl.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),Ql=class extends SD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?RD:MD}innerExtract(e,t){let n=Jl.parseTimeUnits(t[1]),s=OD.reverseTimeUnits(n);return ED.ParsingComponents.createRelativeFromReference(e.reference,s)}};ec.default=Ql});var Rm=O(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var rc=Pt(),PD=tt(),xD=Z(),AD=new RegExp(`(${rc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),ND=new RegExp("("+rc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),CD=1,tc=class extends xD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?ND:AD}innerExtract(e,t){let n=rc.parseTimeUnits(t[CD]);return PD.ParsingComponents.createRelativeFromReference(e.reference,n)}};nc.default=tc});var Bs=O($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.MergingRefiner=$s.Filter=void 0;var sc=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};$s.Filter=sc;var ic=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],a=null;for(let o=1;o<t.length;o++){a=t[o];let l=e.text.substring(s.index+s.text.length,a.index);if(!this.shouldMergeResults(l,s,a,e))n.push(s),s=a;else{let c=s,f=a,m=this.mergeResults(l,c,f,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${c} and ${f} into ${m}`)}),s=m}}return s!=null&&n.push(s),n}};$s.MergingRefiner=ic});var Ur=O(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var ID=Bs(),ac=class extends ID.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(a=>{t.start.isCertain(a)||t.start.assign(a,n.start.get(a))}),t.start.getCertainComponents().forEach(a=>{n.start.isCertain(a)||n.start.assign(a,t.start.get(a))})),t.start.date().getTime()>n.start.date().getTime()){let a=t.start.dayjs(),o=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&a.add(-7,"days").isBefore(o)?(a=a.add(-7,"days"),t.start.imply("day",a.date()),t.start.imply("month",a.month()+1),t.start.imply("year",a.year())):n.start.isOnlyWeekdayComponent()&&o.add(7,"days").isAfter(a)?(o=o.add(7,"days"),n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index<n.index?s.text=t.text+e+n.text:s.text=n.text+e+t.text,s}};oc.default=ac});var Pm=O(Wi=>{"use strict";var FD=Wi&&Wi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wi,"__esModule",{value:!0});var LD=FD(Ur()),uc=class extends LD.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Wi.default=uc});var xm=O(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.mergeDateTimeComponent=Gs.mergeDateTimeResult=void 0;var YD=ht();function UD(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=lc(n,s),r.end!=null||e.end!=null){let a=r.end==null?r.start:r.end,o=e.end==null?e.start:e.end,l=lc(a,o);r.end==null&&l.date().getTime()<t.start.date().getTime()&&(l.isCertain("day")?l.assign("day",l.get("day")+1):l.imply("day",l.get("day")+1)),t.end=l}return t}Gs.mergeDateTimeResult=UD;function lc(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")==YD.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}Gs.mergeDateTimeComponent=lc});var rn=O(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var WD=Bs(),Am=xm(),cc=class extends WD.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 s=t.start.isOnlyDate()?Am.mergeDateTimeResult(t,n):Am.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};dc.default=cc});var Nm=O(qi=>{"use strict";var qD=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});var jD=qD(rn()),fc=class extends jD.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};qi.default=fc});var Cm=O(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var $D=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),BD={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},hc=class{constructor(e){this.timezone=Object.assign(Object.assign({},BD),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(a=>{var o,l;let c=e.text.substring(a.index+a.text.length),f=$D.exec(c);if(!f)return;let m=f[1].toUpperCase(),g=(l=(o=s[m])!==null&&o!==void 0?o:this.timezone[m])!==null&&l!==void 0?l:null;if(g===null)return;e.debug(()=>{console.log(`Extracting timezone: '${m}' into: ${g} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&g!=T&&(a.start.isCertain("timezoneOffset")||m!=f[1])||a.start.isOnlyDate()&&m!=f[1]||(a.text+=f[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",g),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",g))}),t}};pc.default=hc});var No=O(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var GD=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),HD=1,zD=2,VD=3,mc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),a=GD.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[zD]),l=parseInt(a[VD]||"0"),c=o*60+l;c>14*60||(a[HD]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};yc.default=mc});var Im=O(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var gc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let a=1;a<t.length;a++){let o=t[a];o.index<s.index+s.text.length?o.text.length>s.text.length&&(s=o):(n.push(s),s=o)}return s!=null&&n.push(s),n}};_c.default=gc});var Fm=O(ji=>{"use strict";var KD=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});var ZD=KD(Pe()),Tc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=ZD.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let a=0;a<3&&s.isAfter(n.start.dayjs());a++)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()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};ji.default=Tc});var Lm=O(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var XD=Bs(),bc=class extends XD.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}};vc.default=bc});var Dc=O(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var QD=Z(),JD=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"),eE=1,tE=2,rE=3,Ym=4,nE=5,Um=6,Wm=7,qm=8,jm=9,wc=class extends QD.AbstractParserWithWordBoundaryChecking{innerPattern(){return JD}innerExtract(e,t){let n={};if(n.year=parseInt(t[eE]),n.month=parseInt(t[tE]),n.day=parseInt(t[rE]),t[Ym]!=null)if(n.hour=parseInt(t[Ym]),n.minute=parseInt(t[nE]),t[Um]!=null&&(n.second=parseInt(t[Um])),t[Wm]!=null&&(n.millisecond=parseInt(t[Wm])),t[qm]==null)n.timezoneOffset=0;else{let s=parseInt(t[qm]),a=0;t[jm]!=null&&(a=parseInt(t[jm]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};kc.default=wc});var $m=O(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var sE=Bs(),Ec=class extends sE.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Sc.default=Ec});var nn=O(Hs=>{"use strict";var os=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.includeCommonConfiguration=void 0;var iE=os(Cm()),aE=os(No()),Bm=os(Im()),oE=os(Fm()),uE=os(Lm()),lE=os(Dc()),cE=os($m());function dE(r,e=!1){return r.parsers.unshift(new lE.default),r.refiners.unshift(new cE.default),r.refiners.unshift(new iE.default),r.refiners.unshift(new aE.default),r.refiners.unshift(new Bm.default),r.refiners.push(new Bm.default),r.refiners.push(new oE.default),r.refiners.push(new uE.default(e)),r}Hs.includeCommonConfiguration=dE});var an=O(Ie=>{"use strict";var fE=Ie&&Ie.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.noon=Ie.morning=Ie.midnight=Ie.yesterdayEvening=Ie.evening=Ie.lastNight=Ie.tonight=Ie.theDayAfter=Ie.tomorrow=Ie.theDayBefore=Ie.yesterday=Ie.today=Ie.now=void 0;var Wr=tt(),zs=fE(Pe()),sn=pr(),$i=ht();function hE(r){let e=zs.default(r.instant),t=new Wr.ParsingComponents(r,{});return sn.assignSimilarDate(t,e),sn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Ie.now=hE;function pE(r){let e=zs.default(r.instant),t=new Wr.ParsingComponents(r,{});return sn.assignSimilarDate(t,e),sn.implySimilarTime(t,e),t}Ie.today=pE;function mE(r){return Gm(r,1)}Ie.yesterday=mE;function Gm(r,e){return Oc(r,-e)}Ie.theDayBefore=Gm;function yE(r){return Oc(r,1)}Ie.tomorrow=yE;function Oc(r,e){let t=zs.default(r.instant),n=new Wr.ParsingComponents(r,{});return t=t.add(e,"day"),sn.assignSimilarDate(n,t),sn.implySimilarTime(n,t),n}Ie.theDayAfter=Oc;function gE(r,e=22){let t=zs.default(r.instant),n=new Wr.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",$i.Meridiem.PM),sn.assignSimilarDate(n,t),n}Ie.tonight=gE;function _E(r,e=0){let t=zs.default(r.instant),n=new Wr.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),sn.assignSimilarDate(n,t),n.imply("hour",e),n}Ie.lastNight=_E;function TE(r,e=20){let t=new Wr.ParsingComponents(r,{});return t.imply("meridiem",$i.Meridiem.PM),t.imply("hour",e),t}Ie.evening=TE;function bE(r,e=20){let t=zs.default(r.instant),n=new Wr.ParsingComponents(r,{});return t=t.add(-1,"day"),sn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",$i.Meridiem.PM),n}Ie.yesterdayEvening=bE;function vE(r){let e=new Wr.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ie.midnight=vE;function wE(r,e=6){let t=new Wr.ParsingComponents(r,{});return t.imply("meridiem",$i.Meridiem.AM),t.imply("hour",e),t}Ie.morning=wE;function kE(r){let e=new Wr.ParsingComponents(r,{});return e.imply("meridiem",$i.Meridiem.AM),e.imply("hour",12),e}Ie.noon=kE});var Hm=O(Sr=>{"use strict";var DE=Sr&&Sr.__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]}),EE=Sr&&Sr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),SE=Sr&&Sr.__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)&&DE(e,r,t);return EE(e,r),e},OE=Sr&&Sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sr,"__esModule",{value:!0});var ME=OE(Pe()),RE=Z(),PE=pr(),Bi=SE(an()),xE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Mc=class extends RE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return xE}innerExtract(e,t){let n=ME.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return Bi.now(e.reference);case"today":return Bi.today(e.reference);case"yesterday":return Bi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Bi.tomorrow(e.reference);case"tonight":return Bi.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),PE.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};Sr.default=Mc});var zm=O(Gi=>{"use strict";var AE=Gi&&Gi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gi,"__esModule",{value:!0});var Co=ht(),NE=Z(),CE=AE(Pe()),IE=pr(),FE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Rc=class extends NE.AbstractParserWithWordBoundaryChecking{innerPattern(){return FE}innerExtract(e,t){let n=CE.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",Co.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",Co.Meridiem.PM),s.imply("hour",20);break;case"midnight":IE.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",Co.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",Co.Meridiem.AM),s.imply("hour",12);break}return s}};Gi.default=Rc});var us=O(Nn=>{"use strict";var LE=Nn&&Nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.toDayJSClosestWeekday=Nn.toDayJSWeekday=void 0;var Vm=LE(Pe());function YE(r,e,t){if(!t)return Km(r,e);let n=Vm.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}Nn.toDayJSWeekday=YE;function Km(r,e){let t=Vm.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}Nn.toDayJSClosestWeekday=Km});var Xm=O(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var Zm=Pt(),UE=Le(),WE=Z(),qE=us(),jE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${UE.matchAnyPattern(Zm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),$E=1,BE=2,GE=3,Pc=class extends WE.AbstractParserWithWordBoundaryChecking{innerPattern(){return jE}innerExtract(e,t){let n=t[BE].toLowerCase(),s=Zm.WEEKDAY_DICTIONARY[n],a=t[$E],o=t[GE],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="last"||l=="past"?c="last":l=="next"?c="next":l=="this"&&(c="this");let f=qE.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};xc.default=Pc});var ey=O(Hi=>{"use strict";var HE=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var Jm=Pt(),Qm=tt(),zE=HE(Pe()),VE=Z(),KE=Le(),ZE=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${KE.matchAnyPattern(Jm.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),XE=1,QE=2,Ac=class extends VE.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZE}innerExtract(e,t){let n=t[XE].toLowerCase(),s=t[QE].toLowerCase(),a=Jm.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,Qm.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,Qm.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=zE.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Hi.default=Ac});var Or=O(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.ParsingContext=Zs.Chrono=void 0;var Vs=tt(),JE=Nc(),Ks=class{constructor(e){e=e||JE.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Ks({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new Io(e,t,n),a=[];return this.parsers.forEach(o=>{let l=Ks.executeParser(s,o);a=a.concat(l)}),a.sort((o,l)=>o.index-l.index),this.refiners.forEach(function(o){a=o.refine(s,a)}),a}static executeParser(e,t){let n=[],s=t.pattern(e),a=e.text,o=e.text,l=s.exec(o);for(;l;){let c=l.index+a.length-o.length;l.index=c;let f=t.extract(e,l);if(!f){o=a.substring(l.index+1),l=s.exec(o);continue}let m=null;f instanceof Vs.ParsingResult?m=f:f instanceof Vs.ParsingComponents?(m=e.createParsingResult(l.index,l[0]),m.start=f):m=e.createParsingResult(l.index,l[0],f),e.debug(()=>console.log(`${t.constructor.name} extracted result ${m}`)),n.push(m),o=a.substring(c+m.text.length),l=s.exec(o)}return n}};Zs.Chrono=Ks;var Io=class{constructor(e,t,n){this.text=e,this.reference=new Vs.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Vs.ParsingComponents?e:new Vs.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let a=typeof t=="string"?t:this.text.substring(e,t),o=n?this.createParsingComponents(n):null,l=s?this.createParsingComponents(s):null;return new Vs.ParsingResult(this.reference,e,a,o,l)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};Zs.ParsingContext=Io});var ls=O(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var ty=Rt(),eS=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"),Fo=1,ry=5,ny=2,sy=3,Cc=4,Ic=class{constructor(e){this.groupNumberMonth=e?sy:ny,this.groupNumberDay=e?ny:sy}pattern(){return eS}extract(e,t){if(t[Fo]=="/"||t[ry]=="/"){t.index+=t[0].length;return}let n=t.index+t[Fo].length,s=t[0].substr(t[Fo].length,t[0].length-t[Fo].length-t[ry].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Cc]&&t[0].indexOf("/")<0)return;let a=e.createParsingResult(n,s),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(a.start.assign("day",l),a.start.assign("month",o),t[Cc]){let c=parseInt(t[Cc]),f=ty.findMostLikelyADYear(c);a.start.assign("year",f)}else{let c=ty.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};Fc.default=Ic});var ay=O(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var iy=Pt(),tS=tt(),rS=Z(),nS=mr(),sS=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${iy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Lc=class extends rS.AbstractParserWithWordBoundaryChecking{innerPattern(){return sS}innerExtract(e,t){let n=t[1].toLowerCase(),s=iy.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=nS.reverseTimeUnits(s);break}return tS.ParsingComponents.createRelativeFromReference(e.reference,s)}};Yc.default=Lc});var uy=O(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var iS=Bs(),Uc=tt(),aS=Pt(),oS=mr();function oy(r){return r.text.match(/\s+(before|from)$/i)!=null}function uS(r){return r.text.match(/\s+(after|since)$/i)!=null}var Wc=class extends iS.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!oy(t)&&!uS(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=aS.parseTimeUnits(t.text);oy(t)&&(s=oS.reverseTimeUnits(s));let a=Uc.ParsingComponents.createRelativeFromReference(new Uc.ReferenceWithTimezone(n.start.date()),s);return new Uc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};qc.default=Wc});var Nc=O(ot=>{"use strict";var _t=ot&&ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ot,"__esModule",{value:!0});ot.createConfiguration=ot.createCasualConfiguration=ot.parseDate=ot.parse=ot.GB=ot.strict=ot.casual=void 0;var lS=_t(om()),cS=_t(hm()),dS=_t(_m()),fS=_t(vm()),hS=_t(Dm()),pS=_t(Em()),mS=_t(Om()),yS=_t(Mm()),gS=_t(Rm()),_S=_t(Pm()),TS=_t(Nm()),bS=nn(),vS=_t(Hm()),wS=_t(zm()),kS=_t(Xm()),DS=_t(ey()),jc=Or(),ES=_t(ls()),SS=_t(ay()),OS=_t(uy());ot.casual=new jc.Chrono(ly(!1));ot.strict=new jc.Chrono(Lo(!0,!1));ot.GB=new jc.Chrono(Lo(!1,!0));function MS(r,e,t){return ot.casual.parse(r,e,t)}ot.parse=MS;function RS(r,e,t){return ot.casual.parseDate(r,e,t)}ot.parseDate=RS;function ly(r=!1){let e=Lo(!1,r);return e.parsers.unshift(new vS.default),e.parsers.unshift(new wS.default),e.parsers.unshift(new fS.default),e.parsers.unshift(new DS.default),e.parsers.unshift(new SS.default),e}ot.createCasualConfiguration=ly;function Lo(r=!0,e=!1){return bS.includeCommonConfiguration({parsers:[new ES.default(e),new lS.default,new cS.default,new dS.default,new kS.default,new hS.default,new pS.default,new mS.default(r),new yS.default(r),new gS.default(r)],refiners:[new OS.default,new TS.default,new _S.default]},r)}ot.createConfiguration=Lo});var cy=O(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var PS=as(),$c=class extends PS.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Bc.default=$c});var zi=O(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.parseTimeUnits=We.TIME_UNITS_PATTERN=We.parseYear=We.YEAR_PATTERN=We.parseNumberPattern=We.NUMBER_PATTERN=We.TIME_UNIT_DICTIONARY=We.INTEGER_WORD_DICTIONARY=We.MONTH_DICTIONARY=We.WEEKDAY_DICTIONARY=void 0;var Gc=Le(),xS=Rt();We.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};We.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber: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};We.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer: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};We.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};We.NUMBER_PATTERN=`(?:${Gc.matchAnyPattern(We.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function fy(r){let e=r.toLowerCase();return We.INTEGER_WORD_DICTIONARY[e]!==void 0?We.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)}We.parseNumberPattern=fy;We.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function AS(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,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return xS.findMostLikelyADYear(e)}We.parseYear=AS;var hy=`(${We.NUMBER_PATTERN})\\s{0,5}(${Gc.matchAnyPattern(We.TIME_UNIT_DICTIONARY)})\\s{0,5}`,dy=new RegExp(hy,"i");We.TIME_UNITS_PATTERN=Gc.repeatedTimeunitPattern("",hy);function NS(r){let e={},t=r,n=dy.exec(t);for(;n;)CS(e,n),t=t.substring(n[0].length),n=dy.exec(t);return e}We.parseTimeUnits=NS;function CS(r,e){let t=fy(e[1]),n=We.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var my=O(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var py=zi(),IS=Le(),FS=Z(),LS=us(),YS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${IS.matchAnyPattern(py.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),US=1,WS=3,qS=2,Hc=class extends FS.AbstractParserWithWordBoundaryChecking{innerPattern(){return YS}innerExtract(e,t){let n=t[qS].toLowerCase(),s=py.WEEKDAY_DICTIONARY[n],a=t[US],o=t[WS],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l.match(/letzte/)?c="last":l.match(/chste/)?c="next":l.match(/diese/)&&(c="this");let f=LS.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};zc.default=Hc});var Ty=O(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var Cn=ht(),jS=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),$S=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),BS=2,yy=3,gy=4,_y=5,Xs=class{pattern(e){return jS}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=Xs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=$S.exec(s);return a&&(n.end=Xs.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[BS]),t[yy]!=null&&(s=parseInt(t[yy])),s>=60||n>24)return null;if(n>=12&&(a=Cn.Meridiem.PM),t[_y]!=null){if(n>12)return null;let o=t[_y].toLowerCase();o.match(/morgen|vormittag/)&&(a=Cn.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=Cn.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=Cn.Meridiem.AM,n=0):n<6?a=Cn.Meridiem.AM:(a=Cn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",Cn.Meridiem.AM):e.imply("meridiem",Cn.Meridiem.PM),t[gy]!=null){let o=parseInt(t[gy]);if(o>=60)return null;e.assign("second",o)}return e}};Vc.default=Xs});var by=O(Vi=>{"use strict";var GS=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var HS=GS(Ur()),Kc=class extends HS.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};Vi.default=Kc});var vy=O(Ki=>{"use strict";var zS=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var VS=zS(rn()),Zc=class extends VS.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};Ki.default=Zc});var Xc=O(Xi=>{"use strict";var KS=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var ZS=KS(Pe()),cs=ht(),XS=Z(),QS=pr(),JS=mr(),Zi=class extends XS.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=ZS.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return QS.implySimilarTime(a,n),Zi.extractTimeComponents(a,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=JS.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",cs.Meridiem.AM);break}return e}};Xi.default=Zi});var Dy=O(Mr=>{"use strict";var eO=Mr&&Mr.__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]}),tO=Mr&&Mr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),rO=Mr&&Mr.__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)&&eO(e,r,t);return tO(e,r),e},ky=Mr&&Mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mr,"__esModule",{value:!0});var nO=ky(Pe()),sO=Z(),ds=pr(),iO=ky(Xc()),wy=rO(an()),aO=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),oO=1,uO=2,Qc=class extends sO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return aO}innerExtract(e,t){let n=nO.default(e.refDate),s=(t[oO]||"").toLowerCase(),a=(t[uO]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=wy.now(e.reference);break;case"heute":o=wy.today(e.reference);break;case"morgen":ds.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),ds.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),ds.assignSimilarDate(o,n),ds.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),ds.assignSimilarDate(o,n),ds.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),ds.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=iO.default.extractTimeComponents(o,a)),o}};Mr.default=Qc});var Py=O(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var lO=Rt(),My=zi(),Ry=zi(),cO=Le(),dO=Z(),fO=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${cO.matchAnyPattern(My.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Ry.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ey=1,Sy=2,hO=3,Oy=4,Jc=class extends dO.AbstractParserWithWordBoundaryChecking{innerPattern(){return fO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=My.MONTH_DICTIONARY[t[hO].toLowerCase()],a=parseInt(t[Ey]);if(a>31)return t.index=t.index+t[Ey].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Oy]){let o=Ry.parseYear(t[Oy]);n.start.assign("year",o)}else{let o=lO.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Sy]){let o=parseInt(t[Sy]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};ed.default=Jc});var xy=O(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var Yo=zi(),pO=tt(),mO=Z(),yO=mr(),gO=Le(),td=class extends mO.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Yo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${gO.matchAnyPattern(Yo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Yo.parseNumberPattern(t[2]):1,s=Yo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],a={};a[s]=n;let o=t[1]||t[3]||"";if(o=o.toLowerCase(),!!o)return(/vor/.test(o)||/letzte/.test(o)||/vergangen/.test(o))&&(a=yO.reverseTimeUnits(a)),pO.ParsingComponents.createRelativeFromReference(e.reference,a)}};rd.default=td});var Cy=O(Tt=>{"use strict";var Rr=Tt&&Tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.createConfiguration=Tt.createCasualConfiguration=Tt.parseDate=Tt.parse=Tt.strict=Tt.casual=void 0;var _O=nn(),Ay=Or(),TO=Rr(ls()),bO=Rr(Dc()),vO=Rr(cy()),wO=Rr(my()),kO=Rr(Ty()),DO=Rr(by()),EO=Rr(vy()),SO=Rr(Dy()),OO=Rr(Xc()),MO=Rr(Py()),RO=Rr(xy());Tt.casual=new Ay.Chrono(Ny());Tt.strict=new Ay.Chrono(nd(!0));function PO(r,e,t){return Tt.casual.parse(r,e,t)}Tt.parse=PO;function xO(r,e,t){return Tt.casual.parseDate(r,e,t)}Tt.parseDate=xO;function Ny(r=!0){let e=nd(!1,r);return e.parsers.unshift(new OO.default),e.parsers.unshift(new SO.default),e.parsers.unshift(new RO.default),e}Tt.createCasualConfiguration=Ny;function nd(r=!0,e=!0){return _O.includeCommonConfiguration({parsers:[new bO.default,new TO.default(e),new vO.default,new kO.default,new MO.default,new wO.default],refiners:[new DO.default,new EO.default]},r)}Tt.createConfiguration=nd});var Fy=O(Pr=>{"use strict";var AO=Pr&&Pr.__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]}),NO=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CO=Pr&&Pr.__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)&&AO(e,r,t);return NO(e,r),e},IO=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var FO=IO(Pe()),LO=ht(),YO=Z(),Iy=pr(),Uo=CO(an()),sd=class extends YO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=FO.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return Uo.now(e.reference);case"aujourd'hui":return Uo.today(e.reference);case"hier":return Uo.yesterday(e.reference);case"demain":return Uo.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(Iy.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",LO.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),Iy.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Pr.default=sd});var Ly=O(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var Qi=ht(),UO=Z(),id=class extends UO.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(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",Qi.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",Qi.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",Qi.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",Qi.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",Qi.Meridiem.AM);break}return s}};ad.default=id});var Yy=O(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var WO=as(),od=class extends WO.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)}};ud.default=od});var Uy=O(Ji=>{"use strict";var qO=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var jO=qO(rn()),ld=class extends jO.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};Ji.default=ld});var Wy=O(ea=>{"use strict";var $O=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var BO=$O(Ur()),cd=class extends BO.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ea.default=cd});var In=O(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.parseTimeUnits=xe.TIME_UNITS_PATTERN=xe.parseYear=xe.YEAR_PATTERN=xe.parseOrdinalNumberPattern=xe.ORDINAL_NUMBER_PATTERN=xe.parseNumberPattern=xe.NUMBER_PATTERN=xe.TIME_UNIT_DICTIONARY=xe.INTEGER_WORD_DICTIONARY=xe.MONTH_DICTIONARY=xe.WEEKDAY_DICTIONARY=void 0;var dd=Le();xe.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};xe.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};xe.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};xe.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"};xe.NUMBER_PATTERN=`(?:${dd.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function jy(r){let e=r.toLowerCase();return xe.INTEGER_WORD_DICTIONARY[e]!==void 0?xe.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}xe.parseNumberPattern=jy;xe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function GO(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}xe.parseOrdinalNumberPattern=GO;xe.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 HO(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}xe.parseYear=HO;var $y=`(${xe.NUMBER_PATTERN})\\s{0,5}(${dd.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,qy=new RegExp($y,"i");xe.TIME_UNITS_PATTERN=dd.repeatedTimeunitPattern("",$y);function zO(r){let e={},t=r,n=qy.exec(t);for(;n;)VO(e,n),t=t.substring(n[0].length),n=qy.exec(t);return e}xe.parseTimeUnits=zO;function VO(r,e){let t=jy(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Gy=O(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var By=In(),KO=Le(),ZO=Z(),XO=us(),QO=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${KO.matchAnyPattern(By.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),JO=1,eM=2,fd=class extends ZO.AbstractParserWithWordBoundaryChecking{innerPattern(){return QO}innerExtract(e,t){let n=t[JO].toLowerCase(),s=By.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[eM];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=XO.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};hd.default=fd});var Ky=O(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var ta=ht(),tM=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"),rM=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"),nM=2,Hy=3,zy=4,Vy=5,Qs=class{pattern(e){return tM}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=Qs.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=rM.exec(s);return a&&(n.end=Qs.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[nM]),t[Hy]!=null&&(s=parseInt(t[Hy])),s>=60||n>24)return null;if(n>=12&&(a=ta.Meridiem.PM),t[Vy]!=null){if(n>12)return null;let o=t[Vy][0].toLowerCase();o=="a"&&(a=ta.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=ta.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",ta.Meridiem.AM):e.imply("meridiem",ta.Meridiem.PM),t[zy]!=null){let o=parseInt(t[zy]);if(o>=60)return null;e.assign("second",o)}return e}};pd.default=Qs});var tg=O(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});var sM=Rt(),Jy=In(),eg=In(),Wo=In(),iM=Le(),aM=Z(),oM=new RegExp(`(?:on\\s*?)?(${Wo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Wo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${iM.matchAnyPattern(Jy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${eg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Zy=1,Xy=2,uM=3,Qy=4,md=class extends aM.AbstractParserWithWordBoundaryChecking{innerPattern(){return oM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Jy.MONTH_DICTIONARY[t[uM].toLowerCase()],a=Wo.parseOrdinalNumberPattern(t[Zy]);if(a>31)return t.index=t.index+t[Zy].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Qy]){let o=eg.parseYear(t[Qy]);n.start.assign("year",o)}else{let o=sM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Xy]){let o=Wo.parseOrdinalNumberPattern(t[Xy]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};yd.default=md});var ng=O(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var rg=In(),lM=tt(),cM=Z(),dM=mr(),gd=class extends cM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${rg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=rg.parseTimeUnits(t[1]),s=dM.reverseTimeUnits(n);return lM.ParsingComponents.createRelativeFromReference(e.reference,s)}};_d.default=gd});var ig=O(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var sg=In(),fM=tt(),hM=Z(),Td=class extends hM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${sg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=sg.parseTimeUnits(t[1]);return fM.ParsingComponents.createRelativeFromReference(e.reference,n)}};bd.default=Td});var ag=O(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var qo=In(),pM=tt(),mM=Z(),yM=mr(),gM=Le(),vd=class extends mM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${qo.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${gM.matchAnyPattern(qo.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]?qo.parseNumberPattern(t[1]):1,s=qo.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],a={};a[s]=n;let o=t[2]||t[4]||"";if(o=o.toLowerCase(),!!o)return(/derni[eè]re?s?/.test(o)||/pass[ée]e?s?/.test(o)||/pr[ée]c[ée]dents?/.test(o))&&(a=yM.reverseTimeUnits(a)),pM.ParsingComponents.createRelativeFromReference(e.reference,a)}};wd.default=vd});var lg=O(bt=>{"use strict";var yr=bt&&bt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bt,"__esModule",{value:!0});bt.createConfiguration=bt.createCasualConfiguration=bt.parseDate=bt.parse=bt.strict=bt.casual=void 0;var _M=nn(),og=Or(),TM=yr(Fy()),bM=yr(Ly()),vM=yr(ls()),wM=yr(Yy()),kM=yr(Uy()),DM=yr(Wy()),EM=yr(Gy()),SM=yr(Ky()),OM=yr(tg()),MM=yr(ng()),RM=yr(ig()),PM=yr(ag());bt.casual=new og.Chrono(ug());bt.strict=new og.Chrono(kd(!0));function xM(r,e,t){return bt.casual.parse(r,e,t)}bt.parse=xM;function AM(r,e,t){return bt.casual.parseDate(r,e,t)}bt.parseDate=AM;function ug(r=!0){let e=kd(!1,r);return e.parsers.unshift(new TM.default),e.parsers.unshift(new bM.default),e.parsers.unshift(new PM.default),e}bt.createCasualConfiguration=ug;function kd(r=!0,e=!0){return _M.includeCommonConfiguration({parsers:[new vM.default(e),new OM.default,new wM.default,new SM.default,new MM.default,new RM.default,new EM.default],refiners:[new kM.default,new DM.default]},r)}bt.createConfiguration=kd});var cg=O(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.toHankaku=void 0;function NM(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,CM)}jo.toHankaku=NM;function CM(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var fg=O(ra=>{"use strict";var IM=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var Dd=cg(),FM=Rt(),LM=IM(Pe()),YM=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,dg=1,UM=2,Ed=3,WM=4,qM=5,jM=6,Sd=class{pattern(){return YM}extract(e,t){let n=parseInt(Dd.toHankaku(t[qM])),s=parseInt(Dd.toHankaku(t[jM])),a=e.createParsingComponents({day:s,month:n});if(t[dg]&&t[dg].match("\u540C|\u4ECA|\u672C")){let o=LM.default(e.refDate);a.assign("year",o.year())}if(t[UM]){let o=t[WM],l=o=="\u5143"?1:parseInt(Dd.toHankaku(o));t[Ed]=="\u4EE4\u548C"?l+=2018:t[Ed]=="\u5E73\u6210"?l+=1988:t[Ed]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=FM.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};ra.default=Sd});var hg=O(na=>{"use strict";var $M=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var BM=$M(Ur()),Od=class extends BM.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};na.default=Od});var mg=O(xr=>{"use strict";var GM=xr&&xr.__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]}),HM=xr&&xr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),zM=xr&&xr.__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)&&GM(e,r,t);return HM(e,r),e},VM=xr&&xr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xr,"__esModule",{value:!0});var KM=VM(Pe()),pg=ht(),Md=zM(an()),ZM=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Rd=class{pattern(){return ZM}extract(e,t){let n=t[0],s=KM.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Md.yesterday(e.reference);case"\u660E\u65E5":return Md.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Md.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",pg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",pg.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};xr.default=Rd});var _g=O(vt=>{"use strict";var Pd=vt&&vt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vt,"__esModule",{value:!0});vt.createConfiguration=vt.createCasualConfiguration=vt.parseDate=vt.parse=vt.strict=vt.casual=void 0;var XM=Pd(fg()),QM=Pd(hg()),JM=Pd(mg()),yg=Or();vt.casual=new yg.Chrono(gg());vt.strict=new yg.Chrono(xd());function eR(r,e,t){return vt.casual.parse(r,e,t)}vt.parse=eR;function tR(r,e,t){return vt.casual.parseDate(r,e,t)}vt.parseDate=tR;function gg(){let r=xd();return r.parsers.unshift(new JM.default),r}vt.createCasualConfiguration=gg;function xd(){return{parsers:[new XM.default],refiners:[new QM.default]}}vt.createConfiguration=xd});var $o=O(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.parseYear=qr.YEAR_PATTERN=qr.MONTH_DICTIONARY=qr.WEEKDAY_DICTIONARY=void 0;qr.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};qr.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};qr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function rR(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)}qr.parseYear=rR});var bg=O(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var Tg=$o(),nR=Le(),sR=Z(),iR=us(),aR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${nR.matchAnyPattern(Tg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),oR=1,uR=2,lR=3,Ad=class extends sR.AbstractParserWithWordBoundaryChecking{innerPattern(){return aR}innerExtract(e,t){let n=t[uR].toLowerCase(),s=Tg.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[oR],o=t[lR],l=a||o||"";l=l.toLowerCase();let c=null;l=="passado"?c="this":l=="pr\xF3ximo"||l=="proximo"?c="next":l=="este"&&(c="this");let f=iR.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Nd.default=Ad});var vg=O(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});var cR=as(),Cd=class extends cR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Id.default=Cd});var wg=O(sa=>{"use strict";var dR=sa&&sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sa,"__esModule",{value:!0});var fR=dR(rn()),Fd=class extends fR.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};sa.default=Fd});var kg=O(ia=>{"use strict";var hR=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var pR=hR(Ur()),Ld=class extends pR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ia.default=Ld});var Rg=O(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});var mR=Rt(),Og=$o(),Mg=$o(),yR=Le(),gR=Z(),_R=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*)(${yR.matchAnyPattern(Og.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Mg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Dg=1,Eg=2,TR=3,Sg=4,Yd=class extends gR.AbstractParserWithWordBoundaryChecking{innerPattern(){return _R}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Og.MONTH_DICTIONARY[t[TR].toLowerCase()],a=parseInt(t[Dg]);if(a>31)return t.index=t.index+t[Dg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Sg]){let o=Mg.parseYear(t[Sg]);n.start.assign("year",o)}else{let o=mR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Eg]){let o=parseInt(t[Eg]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Ud.default=Yd});var Pg=O(on=>{"use strict";var bR=on&&on.__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]}),vR=on&&on.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wR=on&&on.__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)&&bR(e,r,t);return vR(e,r),e};Object.defineProperty(on,"__esModule",{value:!0});var kR=Z(),Bo=wR(an()),Wd=class extends kR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return Bo.now(e.reference);case"hoje":return Bo.today(e.reference);case"amanha":case"amanh\xE3":return Bo.tomorrow(e.reference);case"ontem":return Bo.yesterday(e.reference)}return s}};on.default=Wd});var xg=O(aa=>{"use strict";var DR=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var Go=ht(),ER=Z(),SR=pr(),OR=DR(Pe()),qd=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=OR.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",Go.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",Go.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",Go.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":SR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",Go.Meridiem.AM),s.imply("hour",12);break}return s}};aa.default=qd});var Cg=O(wt=>{"use strict";var Fn=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var MR=nn(),Ag=Or(),RR=Fn(ls()),PR=Fn(bg()),xR=Fn(vg()),AR=Fn(wg()),NR=Fn(kg()),CR=Fn(Rg()),IR=Fn(Pg()),FR=Fn(xg());wt.casual=new Ag.Chrono(Ng());wt.strict=new Ag.Chrono(jd(!0));function LR(r,e,t){return wt.casual.parse(r,e,t)}wt.parse=LR;function YR(r,e,t){return wt.casual.parseDate(r,e,t)}wt.parseDate=YR;function Ng(r=!0){let e=jd(!1,r);return e.parsers.push(new IR.default),e.parsers.push(new FR.default),e}wt.createCasualConfiguration=Ng;function jd(r=!0,e=!0){return MR.includeCommonConfiguration({parsers:[new RR.default(e),new PR.default,new xR.default,new CR.default],refiners:[new AR.default,new NR.default]},r)}wt.createConfiguration=jd});var Ig=O(oa=>{"use strict";var UR=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var WR=UR(Ur()),$d=class extends WR.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};oa.default=$d});var Fg=O(ua=>{"use strict";var qR=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var jR=qR(rn()),Bd=class extends jR.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ua.default=Bd});var Lg=O(un=>{"use strict";var $R=un&&un.__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]}),BR=un&&un.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),GR=un&&un.__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)&&$R(e,r,t);return BR(e,r),e};Object.defineProperty(un,"__esModule",{value:!0});var HR=Z(),Ho=GR(an()),Gd=class extends HR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return Ho.now(e.reference);case"vandaag":return Ho.today(e.reference);case"morgen":case"morgend":return Ho.tomorrow(e.reference);case"gisteren":return Ho.yesterday(e.reference)}return s}};un.default=Gd});var Yg=O(la=>{"use strict";var zR=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var zo=ht(),VR=Z(),KR=zR(Pe()),ZR=pr(),XR=1,QR=2,Hd=class extends VR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=KR.default(e.refDate),s=e.createParsingComponents();switch(t[XR]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[QR].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",zo.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",zo.Meridiem.PM),s.imply("hour",20);break;case"middernacht":ZR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",zo.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",zo.Meridiem.AM),s.imply("hour",12);break}return s}};la.default=Hd});var tr=O(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.parseTimeUnits=we.TIME_UNITS_PATTERN=we.parseYear=we.YEAR_PATTERN=we.parseOrdinalNumberPattern=we.ORDINAL_NUMBER_PATTERN=we.parseNumberPattern=we.NUMBER_PATTERN=we.TIME_UNIT_DICTIONARY=we.ORDINAL_WORD_DICTIONARY=we.INTEGER_WORD_DICTIONARY=we.MONTH_DICTIONARY=we.WEEKDAY_DICTIONARY=void 0;var Vo=Le(),JR=Rt();we.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};we.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};we.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};we.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};we.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};we.NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(we.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Wg(r){let e=r.toLowerCase();return we.INTEGER_WORD_DICTIONARY[e]!==void 0?we.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}we.parseNumberPattern=Wg;we.ORDINAL_NUMBER_PATTERN=`(?:${Vo.matchAnyPattern(we.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function eP(r){let e=r.toLowerCase();return we.ORDINAL_WORD_DICTIONARY[e]!==void 0?we.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}we.parseOrdinalNumberPattern=eP;we.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function tP(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 JR.findMostLikelyADYear(e)}we.parseYear=tP;var qg=`(${we.NUMBER_PATTERN})\\s{0,5}(${Vo.matchAnyPattern(we.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ug=new RegExp(qg,"i");we.TIME_UNITS_PATTERN=Vo.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",qg);function rP(r){let e={},t=r,n=Ug.exec(t);for(;n;)nP(e,n),t=t.substring(n[0].length),n=Ug.exec(t);return e}we.parseTimeUnits=rP;function nP(r,e){let t=Wg(e[1]),n=we.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var $g=O(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var jg=tr(),sP=tt(),iP=Z(),zd=class extends iP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+jg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=jg.parseTimeUnits(t[1]);return sP.ParsingComponents.createRelativeFromReference(e.reference,n)}};Vd.default=zd});var Gg=O(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});var Bg=tr(),aP=Le(),oP=Z(),uP=us(),lP=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${aP.matchAnyPattern(Bg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),cP=1,dP=2,fP=3,Kd=class extends oP.AbstractParserWithWordBoundaryChecking{innerPattern(){return lP}innerExtract(e,t){let n=t[dP].toLowerCase(),s=Bg.WEEKDAY_DICTIONARY[n],a=t[cP],o=t[fP],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let f=uP.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Zd.default=Kd});var Xg=O(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var hP=Rt(),Kg=tr(),Ko=tr(),Zg=tr(),pP=Le(),mP=Z(),yP=new RegExp(`(?:on\\s*?)?(${Ko.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${Ko.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+pP.matchAnyPattern(Kg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${Zg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gP=3,Hg=1,zg=2,Vg=4,Xd=class extends mP.AbstractParserWithWordBoundaryChecking{innerPattern(){return yP}innerExtract(e,t){let n=Kg.MONTH_DICTIONARY[t[gP].toLowerCase()],s=Ko.parseOrdinalNumberPattern(t[Hg]);if(s>31)return t.index=t.index+t[Hg].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[Vg]){let c=Zg.parseYear(t[Vg]);a.assign("year",c)}else{let c=hP.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[zg])return a;let o=Ko.parseOrdinalNumberPattern(t[zg]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};Qd.default=Xd});var t_=O(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Jg=tr(),_P=Rt(),TP=Le(),e_=tr(),bP=Z(),vP=new RegExp(`(${TP.matchAnyPattern(Jg.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${e_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),wP=1,Qg=2,Jd=class extends bP.AbstractParserWithWordBoundaryChecking{innerPattern(){return vP}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[wP],a=Jg.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[Qg]){let o=e_.parseYear(t[Qg]);n.assign("year",o)}else{let o=_P.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};ef.default=Jd});var r_=O(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var kP=Z(),DP=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),EP=1,SP=2,tf=class extends kP.AbstractParserWithWordBoundaryChecking{innerPattern(){return DP}innerExtract(e,t){let n=parseInt(t[SP]),s=parseInt(t[EP]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};rf.default=tf});var n_=O(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var OP=as(),nf=class extends OP.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};sf.default=nf});var a_=O(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var i_=tr(),MP=Le(),RP=Z(),PP=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${MP.matchAnyPattern(i_.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),xP=1,AP=2,s_=3,NP=4,af=class extends RP.AbstractParserWithWordBoundaryChecking{innerPattern(){return PP}innerExtract(e,t){let n=t[s_]?parseInt(t[s_]):i_.MONTH_DICTIONARY[t[AP].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[xP]);return{day:parseInt(t[NP]),month:n,year:s}}};of.default=af});var o_=O(ca=>{"use strict";var CP=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var IP=Z(),Zo=ht(),uf=pr(),FP=CP(Pe()),LP=1,YP=2,lf=class extends IP.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[LP].toLowerCase(),s=t[YP].toLowerCase(),a=e.createParsingComponents(),o=FP.default(e.refDate);switch(n){case"gisteren":uf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":uf.assignSimilarDate(a,o);break;case"morgen":uf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",Zo.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",Zo.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",Zo.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",Zo.Meridiem.PM),a.imply("hour",20);break}return a}};ca.default=lf});var l_=O(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var u_=tr(),UP=tt(),WP=Z(),qP=mr(),jP=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${u_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),cf=class extends WP.AbstractParserWithWordBoundaryChecking{innerPattern(){return jP}innerExtract(e,t){let n=t[1].toLowerCase(),s=u_.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=qP.reverseTimeUnits(s);break}return UP.ParsingComponents.createRelativeFromReference(e.reference,s)}};df.default=cf});var f_=O(da=>{"use strict";var $P=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var d_=tr(),c_=tt(),BP=$P(Pe()),GP=Z(),HP=Le(),zP=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${HP.matchAnyPattern(d_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),VP=1,KP=2,ff=class extends GP.AbstractParserWithWordBoundaryChecking{innerPattern(){return zP}innerExtract(e,t){let n=t[VP].toLowerCase(),s=t[KP].toLowerCase(),a=d_.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,c_.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,c_.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=BP.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/maand/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/jaar/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};da.default=ff});var h_=O(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var pf=tr(),ZP=tt(),XP=Z(),QP=mr(),JP=new RegExp("("+pf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),ex=new RegExp("("+pf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),hf=class extends XP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?ex:JP}innerExtract(e,t){let n=pf.parseTimeUnits(t[1]),s=QP.reverseTimeUnits(n);return ZP.ParsingComponents.createRelativeFromReference(e.reference,s)}};mf.default=hf});var p_=O(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var gf=tr(),tx=tt(),rx=Z(),nx=new RegExp("("+gf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),sx=new RegExp("("+gf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),ix=1,yf=class extends rx.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?sx:nx}innerExtract(e,t){let n=gf.parseTimeUnits(t[ix]);return tx.ParsingComponents.createRelativeFromReference(e.reference,n)}};_f.default=yf});var __=O(kt=>{"use strict";var xt=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var ax=nn(),m_=Or(),ox=xt(Ig()),ux=xt(Fg()),lx=xt(Lg()),cx=xt(Yg()),dx=xt(ls()),fx=xt($g()),hx=xt(Gg()),px=xt(Xg()),y_=xt(t_()),mx=xt(r_()),yx=xt(n_()),gx=xt(a_()),_x=xt(o_()),Tx=xt(l_()),bx=xt(f_()),vx=xt(h_()),wx=xt(p_());kt.casual=new m_.Chrono(g_());kt.strict=new m_.Chrono(Tf(!0));function kx(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=kx;function Dx(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=Dx;function g_(r=!0){let e=Tf(!1,r);return e.parsers.unshift(new lx.default),e.parsers.unshift(new cx.default),e.parsers.unshift(new _x.default),e.parsers.unshift(new y_.default),e.parsers.unshift(new bx.default),e.parsers.unshift(new Tx.default),e}kt.createCasualConfiguration=g_;function Tf(r=!0,e=!0){return ax.includeCommonConfiguration({parsers:[new dx.default(e),new fx.default,new px.default,new y_.default,new hx.default,new gx.default,new mx.default,new yx.default(r),new vx.default(r),new wx.default(r)],refiners:[new ux.default,new ox.default]},r)}kt.createConfiguration=Tf});var w_=O(fa=>{"use strict";var Ex=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var Sx=Ex(Pe()),Ox=Z(),Mx=1,T_=2,Rx=3,b_=4,v_=5,Px=6,bf=class extends Ox.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),a=Sx.default(e.refDate),o=a;if(t[Mx])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[T_]){let l=t[T_],c=t[Rx];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day")),c=="\u65E9"||c=="\u671D"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[b_]){let c=t[b_][0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[v_]){let l=t[v_];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day"));let c=t[Px];if(c){let f=c[0];f=="\u65E9"||f=="\u671D"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"||f=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};fa.default=bf});var Js=O(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.zhStringToYear=zt.zhStringToNumber=zt.WEEKDAY_OFFSET=zt.NUMBER=void 0;zt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};zt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function xx(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?zt.NUMBER[n]:e*zt.NUMBER[n]:e+=zt.NUMBER[n]}return e}zt.zhStringToNumber=xx;function Ax(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+zt.NUMBER[n]}return parseInt(e)}zt.zhStringToYear=Ax});var D_=O(ha=>{"use strict";var Nx=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var Cx=Nx(Pe()),Ix=Z(),fs=Js(),vf=1,k_=2,wf=3,kf=class extends Ix.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(fs.NUMBER).join("")+"]{4}|["+Object.keys(fs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(fs.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(fs.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=Cx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[k_]);if(isNaN(a)&&(a=fs.zhStringToNumber(t[k_])),s.start.assign("month",a),t[wf]){let o=parseInt(t[wf]);isNaN(o)&&(o=fs.zhStringToNumber(t[wf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[vf]){let o=parseInt(t[vf]);isNaN(o)&&(o=fs.zhStringToYear(t[vf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};ha.default=kf});var S_=O(pa=>{"use strict";var Fx=pa&&pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pa,"__esModule",{value:!0});var Lx=Fx(Pe()),Yx=Z(),E_=Js(),Ux=new RegExp("(\\d+|["+Object.keys(E_.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),Df=1,Wx=2,Ef=class extends Yx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ux}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Df]);if(isNaN(s)&&(s=E_.zhStringToNumber(t[Df])),isNaN(s)){let c=t[Df];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=Lx.default(e.refDate),l=t[Wx][0];return l.match(/[日天星禮月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u79AE"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u9418")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};pa.default=Ef});var M_=O(ma=>{"use strict";var qx=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var jx=qx(Pe()),$x=Z(),O_=Js(),Bx=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(O_.WEEKDAY_OFFSET).join("|")+")"),Sf=class extends $x.AbstractParserWithWordBoundaryChecking{innerPattern(){return Bx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=O_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":(l=="\u4ECA"||l=="\u9019"||l=="\u5462")&&(o="this");let c=jx.default(e.refDate),f=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),f?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};ma.default=Sf});var R_=O(ya=>{"use strict";var Gx=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var Hx=Gx(Pe()),zx=Z(),_r=Js(),Vx=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(_r.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(_r.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(_r.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Kx=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(_r.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(_r.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(_r.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Xo=1,Qo=2,Jo=3,eu=4,tu=5,ru=6,gr=7,ei=8,nu=9,Of=class extends zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Vx}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=Hx.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[Xo]){var o=t[Xo];o=="\u660E"||o=="\u807D"?n.hour()>1&&a.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a.add(-1,"day"):o=="\u524D"?a.add(-2,"day"):o=="\u5927\u524D"?a.add(-3,"day"):o=="\u5F8C"?a.add(2,"day"):o=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[eu]){var l=t[eu];l=="\u660E"||l=="\u807D"?a.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?a.add(-1,"day"):l=="\u524D"?a.add(-2,"day"):l=="\u5927\u524D"?a.add(-3,"day"):l=="\u5F8C"?a.add(2,"day"):l=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let c=0,f=0,m=-1;if(t[ei]){var g=parseInt(t[ei]);if(isNaN(g)&&(g=_r.zhStringToNumber(t[ei])),g>=60)return null;s.start.assign("second",g)}if(c=parseInt(t[ru]),isNaN(c)&&(c=_r.zhStringToNumber(t[ru])),t[gr]?t[gr]=="\u534A"?f=30:t[gr]=="\u6B63"||t[gr]=="\u6574"?f=0:(f=parseInt(t[gr]),isNaN(f)&&(f=_r.zhStringToNumber(t[gr]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(m=1),t[nu]){if(c>12)return null;var T=t[nu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12))}else if(t[Qo]){var E=t[Qo],v=E[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[Jo]){var R=t[Jo],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(m=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[tu]){var q=t[tu],$=q[0];$=="\u4E0A"||$=="\u671D"||$=="\u65E9"||$=="\u51CC"?(m=0,c==12&&(c=0)):($=="\u4E0B"||$=="\u664F"||$=="\u665A")&&(m=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",f),m>=0?s.start.assign("meridiem",m):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=Kx.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let B=a.clone();if(s.end=e.createParsingComponents(),t[Xo]){var o=t[Xo];o=="\u660E"||o=="\u807D"?n.hour()>1&&B.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?B.add(-1,"day"):o=="\u524D"?B.add(-2,"day"):o=="\u5927\u524D"?B.add(-3,"day"):o=="\u5F8C"?B.add(2,"day"):o=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else if(t[eu]){var l=t[eu];l=="\u660E"||l=="\u807D"?B.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?B.add(-1,"day"):l=="\u524D"?B.add(-2,"day"):l=="\u5927\u524D"?B.add(-3,"day"):l=="\u5F8C"?B.add(2,"day"):l=="\u5927\u5F8C"&&B.add(3,"day"),s.end.assign("day",B.date()),s.end.assign("month",B.month()+1),s.end.assign("year",B.year())}else s.end.imply("day",B.date()),s.end.imply("month",B.month()+1),s.end.imply("year",B.year());if(c=0,f=0,m=-1,t[ei]){var g=parseInt(t[ei]);if(isNaN(g)&&(g=_r.zhStringToNumber(t[ei])),g>=60)return null;s.end.assign("second",g)}if(c=parseInt(t[ru]),isNaN(c)&&(c=_r.zhStringToNumber(t[ru])),t[gr]?t[gr]=="\u534A"?f=30:t[gr]=="\u6B63"||t[gr]=="\u6574"?f=0:(f=parseInt(t[gr]),isNaN(f)&&(f=_r.zhStringToNumber(t[gr]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(m=1),t[nu]){if(c>12)return null;var T=t[nu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(m==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[Qo]){var E=t[Qo],v=E[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[Jo]){var R=t[Jo],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(m=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[tu]){var q=t[tu],$=q[0];$=="\u4E0A"||$=="\u671D"||$=="\u65E9"||$=="\u51CC"?(m=0,c==12&&(c=0)):($=="\u4E0B"||$=="\u664F"||$=="\u665A")&&(m=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",f),m>=0?s.end.assign("meridiem",m):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>c?s.end.imply("meridiem",0):c>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};ya.default=Of});var x_=O(ga=>{"use strict";var Zx=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var Xx=Zx(Pe()),Qx=Z(),P_=Js(),Jx=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(P_.WEEKDAY_OFFSET).join("|")+")"),Mf=class extends Qx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Jx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=P_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=Xx.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};ga.default=Mf});var A_=O(_a=>{"use strict";var eA=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var tA=eA(Ur()),Rf=class extends tA.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};_a.default=Rf});var N_=O(Ta=>{"use strict";var rA=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var nA=rA(rn()),Pf=class extends nA.default{patternBetween(){return/^\s*$/i}};Ta.default=Pf});var C_=O(ut=>{"use strict";var ln=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.createConfiguration=ut.createCasualConfiguration=ut.parseDate=ut.parse=ut.strict=ut.casual=ut.hant=void 0;var xf=Or(),sA=ln(No()),iA=nn(),aA=ln(w_()),oA=ln(D_()),uA=ln(S_()),lA=ln(M_()),cA=ln(R_()),dA=ln(x_()),fA=ln(A_()),hA=ln(N_());ut.hant=new xf.Chrono(Af());ut.casual=new xf.Chrono(Af());ut.strict=new xf.Chrono(Nf());function pA(r,e,t){return ut.casual.parse(r,e,t)}ut.parse=pA;function mA(r,e,t){return ut.casual.parseDate(r,e,t)}ut.parseDate=mA;function Af(){let r=Nf();return r.parsers.unshift(new aA.default),r}ut.createCasualConfiguration=Af;function Nf(){let r=iA.includeCommonConfiguration({parsers:[new oA.default,new lA.default,new dA.default,new cA.default,new uA.default],refiners:[new fA.default,new hA.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof sA.default)),r}ut.createConfiguration=Nf});var Y_=O(ba=>{"use strict";var yA=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var gA=yA(Pe()),_A=Z(),TA=1,I_=2,bA=3,F_=4,L_=5,vA=6,Cf=class extends _A.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,s=e.createParsingResult(n,t[0]),a=gA.default(e.refDate),o=a;if(t[TA])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[I_]){let l=t[I_],c=t[bA];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day")),c=="\u65E9"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[F_]){let c=t[F_][0];c=="\u65E9"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[L_]){let l=t[L_];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day"));let c=t[vA];if(c){let f=c[0];f=="\u65E9"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};ba.default=Cf});var ti=O(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.zhStringToYear=Vt.zhStringToNumber=Vt.WEEKDAY_OFFSET=Vt.NUMBER=void 0;Vt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Vt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function wA(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Vt.NUMBER[n]:e*Vt.NUMBER[n]:e+=Vt.NUMBER[n]}return e}Vt.zhStringToNumber=wA;function kA(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Vt.NUMBER[n]}return parseInt(e)}Vt.zhStringToYear=kA});var W_=O(va=>{"use strict";var DA=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var EA=DA(Pe()),SA=Z(),hs=ti(),If=1,U_=2,Ff=3,Lf=class extends SA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(hs.NUMBER).join("")+"]{4}|["+Object.keys(hs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(hs.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(hs.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=EA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[U_]);if(isNaN(a)&&(a=hs.zhStringToNumber(t[U_])),s.start.assign("month",a),t[Ff]){let o=parseInt(t[Ff]);isNaN(o)&&(o=hs.zhStringToNumber(t[Ff])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[If]){let o=parseInt(t[If]);isNaN(o)&&(o=hs.zhStringToYear(t[If])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};va.default=Lf});var j_=O(wa=>{"use strict";var OA=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var MA=OA(Pe()),RA=Z(),q_=ti(),PA=new RegExp("(\\d+|["+Object.keys(q_.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Yf=1,xA=2,Uf=class extends RA.AbstractParserWithWordBoundaryChecking{innerPattern(){return PA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Yf]);if(isNaN(s)&&(s=q_.zhStringToNumber(t[Yf])),isNaN(s)){let c=t[Yf];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=MA.default(e.refDate),l=t[xA][0];return l.match(/[日天星礼月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u793C"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u949F")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};wa.default=Uf});var B_=O(ka=>{"use strict";var AA=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var NA=AA(Pe()),CA=Z(),$_=ti(),IA=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys($_.WEEKDAY_OFFSET).join("|")+")"),Wf=class extends CA.AbstractParserWithWordBoundaryChecking{innerPattern(){return IA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=$_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":l=="\u8FD9"&&(o="this");let c=NA.default(e.refDate),f=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),f?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};ka.default=Wf});var G_=O(Da=>{"use strict";var FA=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var LA=FA(Pe()),YA=Z(),br=ti(),UA=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),WA=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),su=1,iu=2,au=3,ou=4,uu=5,lu=6,Tr=7,ri=8,cu=9,qf=class extends YA.AbstractParserWithWordBoundaryChecking{innerPattern(){return UA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=LA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[su]){let m=t[su];m=="\u660E"?n.hour()>1&&a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[ou]){let m=t[ou];m=="\u660E"?a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let o=0,l=0,c=-1;if(t[ri]){let m=parseInt(t[ri]);if(isNaN(m)&&(m=br.zhStringToNumber(t[ri])),m>=60)return null;s.start.assign("second",m)}if(o=parseInt(t[lu]),isNaN(o)&&(o=br.zhStringToNumber(t[lu])),t[Tr]?t[Tr]=="\u534A"?l=30:t[Tr]=="\u6B63"||t[Tr]=="\u6574"?l=0:(l=parseInt(t[Tr]),isNaN(l)&&(l=br.zhStringToNumber(t[Tr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[cu]){if(o>12)return null;let m=t[cu][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12))}else if(t[iu]){let g=t[iu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[au]){let g=t[au][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[uu]){let g=t[uu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}if(s.start.assign("hour",o),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):o<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=WA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let f=a.clone();if(s.end=e.createParsingComponents(),t[su]){let m=t[su];m=="\u660E"?n.hour()>1&&f.add(1,"day"):m=="\u6628"?f.add(-1,"day"):m=="\u524D"?f.add(-2,"day"):m=="\u5927\u524D"?f.add(-3,"day"):m=="\u540E"?f.add(2,"day"):m=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else if(t[ou]){let m=t[ou];m=="\u660E"?f.add(1,"day"):m=="\u6628"?f.add(-1,"day"):m=="\u524D"?f.add(-2,"day"):m=="\u5927\u524D"?f.add(-3,"day"):m=="\u540E"?f.add(2,"day"):m=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else s.end.imply("day",f.date()),s.end.imply("month",f.month()+1),s.end.imply("year",f.year());if(o=0,l=0,c=-1,t[ri]){let m=parseInt(t[ri]);if(isNaN(m)&&(m=br.zhStringToNumber(t[ri])),m>=60)return null;s.end.assign("second",m)}if(o=parseInt(t[lu]),isNaN(o)&&(o=br.zhStringToNumber(t[lu])),t[Tr]?t[Tr]=="\u534A"?l=30:t[Tr]=="\u6B63"||t[Tr]=="\u6574"?l=0:(l=parseInt(t[Tr]),isNaN(l)&&(l=br.zhStringToNumber(t[Tr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[cu]){if(o>12)return null;let m=t[cu][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[iu]){let g=t[iu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[au]){let g=t[au][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[uu]){let g=t[uu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}return s.text=s.text+t[0],s.end.assign("hour",o),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>o?s.end.imply("meridiem",0):o>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};Da.default=qf});var z_=O(Ea=>{"use strict";var qA=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var jA=qA(Pe()),$A=Z(),H_=ti(),BA=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(H_.WEEKDAY_OFFSET).join("|")+")"),jf=class extends $A.AbstractParserWithWordBoundaryChecking{innerPattern(){return BA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=H_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=jA.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};Ea.default=jf});var V_=O(Sa=>{"use strict";var GA=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var HA=GA(Ur()),$f=class extends HA.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Sa.default=$f});var K_=O(Oa=>{"use strict";var zA=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var VA=zA(rn()),Bf=class extends VA.default{patternBetween(){return/^\s*$/i}};Oa.default=Bf});var Z_=O(lt=>{"use strict";var cn=lt&<.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(lt,"__esModule",{value:!0});lt.createConfiguration=lt.createCasualConfiguration=lt.parseDate=lt.parse=lt.strict=lt.casual=lt.hans=void 0;var Gf=Or(),KA=cn(No()),ZA=nn(),XA=cn(Y_()),QA=cn(W_()),JA=cn(j_()),eN=cn(B_()),tN=cn(G_()),rN=cn(z_()),nN=cn(V_()),sN=cn(K_());lt.hans=new Gf.Chrono(Hf());lt.casual=new Gf.Chrono(Hf());lt.strict=new Gf.Chrono(zf());function iN(r,e,t){return lt.casual.parse(r,e,t)}lt.parse=iN;function aN(r,e,t){return lt.casual.parseDate(r,e,t)}lt.parseDate=aN;function Hf(){let r=zf();return r.parsers.unshift(new XA.default),r}lt.createCasualConfiguration=Hf;function zf(){let r=ZA.includeCommonConfiguration({parsers:[new QA.default,new eN.default,new rN.default,new tN.default,new JA.default],refiners:[new nN.default,new sN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof KA.default)),r}lt.createConfiguration=zf});var Q_=O(rr=>{"use strict";var X_=rr&&rr.__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]}),oN=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),uN=rr&&rr.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&X_(e,r,t)},lN=rr&&rr.__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)&&X_(e,r,t);return oN(e,r),e};Object.defineProperty(rr,"__esModule",{value:!0});rr.hans=void 0;uN(C_(),rr);rr.hans=lN(Z_())});var Kt=O(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.parseTimeUnits=he.TIME_UNITS_PATTERN=he.parseYear=he.YEAR_PATTERN=he.parseOrdinalNumberPattern=he.ORDINAL_NUMBER_PATTERN=he.parseNumberPattern=he.NUMBER_PATTERN=he.TIME_UNIT_DICTIONARY=he.ORDINAL_WORD_DICTIONARY=he.INTEGER_WORD_DICTIONARY=he.MONTH_DICTIONARY=he.FULL_MONTH_NAME_DICTIONARY=he.WEEKDAY_DICTIONARY=he.REGEX_PARTS=void 0;var du=Le(),cN=Rt();he.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};he.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};he.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};he.MONTH_DICTIONARY=Object.assign(Object.assign({},he.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});he.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};he.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};he.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};he.NUMBER_PATTERN=`(?:${du.matchAnyPattern(he.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function eT(r){let e=r.toLowerCase();return he.INTEGER_WORD_DICTIONARY[e]!==void 0?he.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}he.parseNumberPattern=eT;he.ORDINAL_NUMBER_PATTERN=`(?:${du.matchAnyPattern(he.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function dN(r){let e=r.toLowerCase();return he.ORDINAL_WORD_DICTIONARY[e]!==void 0?he.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}he.parseOrdinalNumberPattern=dN;var Vf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";he.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Vf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Vf}|[5-9][0-9]${Vf})`;function fN(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return cN.findMostLikelyADYear(e)}he.parseYear=fN;var tT=`(${he.NUMBER_PATTERN})\\s{0,3}(${du.matchAnyPattern(he.TIME_UNIT_DICTIONARY)})`,J_=new RegExp(tT,"i");he.TIME_UNITS_PATTERN=du.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",tT);function hN(r){let e={},t=r,n=J_.exec(t);for(;n;)pN(e,n),t=t.substring(n[0].length).trim(),n=J_.exec(t);return e}he.parseTimeUnits=hN;function pN(r,e){let t=eT(e[1]),n=he.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var nT=O(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var Ma=Kt(),mN=tt(),yN=Z(),rT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ma.TIME_UNITS_PATTERN})${Ma.REGEX_PARTS.rightBoundary}`,gN=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${rT}`,Ma.REGEX_PARTS.flags),_N=new RegExp(rT,"i"),Kf=class extends yN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ma.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?_N:gN}innerExtract(e,t){let n=Ma.parseTimeUnits(t[1]);return mN.ParsingComponents.createRelativeFromReference(e.reference,n)}};Zf.default=Kf});var uT=O(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var TN=Rt(),Ra=Kt(),oT=Kt(),fu=Kt(),bN=Le(),vN=Z(),wN=new RegExp(`(?:\u0441)?\\s*(${fu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${fu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${bN.matchAnyPattern(Ra.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${oT.YEAR_PATTERN}(?![^\\s]\\d)))?${Ra.REGEX_PARTS.rightBoundary}`,Ra.REGEX_PARTS.flags),sT=1,iT=2,kN=3,aT=4,Xf=class extends vN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ra.REGEX_PARTS.leftBoundary}innerPattern(){return wN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ra.MONTH_DICTIONARY[t[kN].toLowerCase()],a=fu.parseOrdinalNumberPattern(t[sT]);if(a>31)return t.index=t.index+t[sT].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[aT]){let o=oT.parseYear(t[aT]);n.start.assign("year",o)}else{let o=TN.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[iT]){let o=fu.parseOrdinalNumberPattern(t[iT]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Qf.default=Xf});var dT=O(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var Pa=Kt(),DN=Rt(),EN=Le(),cT=Kt(),SN=Z(),ON=new RegExp(`((?:\u0432)\\s*)?(${EN.matchAnyPattern(Pa.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${cT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Pa.REGEX_PARTS.flags),MN=2,lT=3,Jf=class extends SN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Pa.REGEX_PARTS.leftBoundary}innerPattern(){return ON}innerExtract(e,t){let n=t[MN].toLowerCase();if(t[0].length<=3&&!Pa.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let a=Pa.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[lT]){let o=cT.parseYear(t[lT]);s.start.assign("year",o)}else{let o=DN.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};eh.default=Jf});var hT=O(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});var hu=ht(),RN=as(),fT=Kt(),th=class extends RN.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return fT.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${fT.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",hu.Meridiem.PM)):s<6&&n.assign("meridiem",hu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",hu.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",hu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};rh.default=th});var pT=O(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var pu=Kt(),PN=tt(),xN=Z(),AN=mr(),NN=new RegExp(`(${pu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,pu.REGEX_PARTS.flags),nh=class extends xN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return pu.REGEX_PARTS.leftBoundary}innerPattern(){return NN}innerExtract(e,t){let n=pu.parseTimeUnits(t[1]),s=AN.reverseTimeUnits(n);return PN.ParsingComponents.createRelativeFromReference(e.reference,s)}};sh.default=nh});var mT=O(xa=>{"use strict";var CN=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var IN=CN(Ur()),ih=class extends IN.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};xa.default=ih});var yT=O(Aa=>{"use strict";var FN=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var LN=FN(rn()),ah=class extends LN.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Aa.default=ah});var gT=O(dn=>{"use strict";var YN=dn&&dn.__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]}),UN=dn&&dn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),WN=dn&&dn.__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)&&YN(e,r,t);return UN(e,r),e};Object.defineProperty(dn,"__esModule",{value:!0});var qN=Z(),Na=WN(an()),oh=Kt(),jN=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${oh.REGEX_PARTS.rightBoundary}`,oh.REGEX_PARTS.flags),uh=class extends qN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return oh.REGEX_PARTS.leftBoundary}innerPattern(e){return jN}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Na.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Na.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Na.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Na.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Na.theDayBefore(e.reference,2)}return s}};dn.default=uh});var _T=O(Ar=>{"use strict";var $N=Ar&&Ar.__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]}),BN=Ar&&Ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),GN=Ar&&Ar.__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)&&$N(e,r,t);return BN(e,r),e},HN=Ar&&Ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ar,"__esModule",{value:!0});var zN=Z(),ps=GN(an()),VN=pr(),KN=HN(Pe()),lh=Kt(),ZN=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${lh.REGEX_PARTS.rightBoundary}`,lh.REGEX_PARTS.flags),ch=class extends zN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return lh.REGEX_PARTS.leftBoundary}innerPattern(){return ZN}innerExtract(e,t){let n=KN.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return ps.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return ps.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return ps.morning(e.reference);if(s.match(/в\s*полдень/))return ps.noon(e.reference);if(s.match(/прошлой\s*ночью/))return ps.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return ps.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),VN.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?ps.midnight(e.reference):a}};Ar.default=ch});var TT=O(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var Ca=Kt(),XN=Le(),QN=Z(),JN=us(),eC=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${XN.matchAnyPattern(Ca.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${Ca.REGEX_PARTS.rightBoundary}`,Ca.REGEX_PARTS.flags),tC=1,rC=2,nC=3,dh=class extends QN.AbstractParserWithWordBoundaryChecking{innerPattern(){return eC}patternLeftBoundary(){return Ca.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[rC].toLowerCase(),s=Ca.WEEKDAY_DICTIONARY[n],a=t[tC],o=t[nC],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||l=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||l=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?c="last":l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?c="next":(l=="\u044D\u0442\u043E\u0442"||l=="\u044D\u0442\u0443"||l=="\u044D\u0442\u043E\u0439")&&(c="this");let f=JN.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};fh.default=dh});var vT=O(Fa=>{"use strict";var sC=Fa&&Fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fa,"__esModule",{value:!0});var Ia=Kt(),bT=tt(),iC=sC(Pe()),aC=Z(),oC=Le(),uC=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${oC.matchAnyPattern(Ia.TIME_UNIT_DICTIONARY)})(?=\\s*)${Ia.REGEX_PARTS.rightBoundary}`,Ia.REGEX_PARTS.flags),lC=1,cC=2,hh=class extends aC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ia.REGEX_PARTS.leftBoundary}innerPattern(){return uC}innerExtract(e,t){let n=t[lC].toLowerCase(),s=t[cC].toLowerCase(),a=Ia.TIME_UNIT_DICTIONARY[s];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let c={};return c[a]=1,bT.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let c={};return c[a]=-1,bT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=iC.default(e.reference.instant);return a.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):a.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):a.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Fa.default=hh});var wT=O(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var La=Kt(),dC=tt(),fC=Z(),hC=mr(),pC=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${La.TIME_UNITS_PATTERN})${La.REGEX_PARTS.rightBoundary}`,La.REGEX_PARTS.flags),ph=class extends fC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return La.REGEX_PARTS.leftBoundary}innerPattern(){return pC}innerExtract(e,t){let n=t[1].toLowerCase(),s=La.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=hC.reverseTimeUnits(s);break}return dC.ParsingComponents.createRelativeFromReference(e.reference,s)}};mh.default=ph});var ET=O(Dt=>{"use strict";var nr=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.createConfiguration=Dt.createCasualConfiguration=Dt.parseDate=Dt.parse=Dt.strict=Dt.casual=void 0;var mC=nr(nT()),yC=nr(uT()),gC=nr(dT()),_C=nr(hT()),TC=nr(pT()),bC=nr(mT()),vC=nr(yT()),wC=nn(),kC=nr(gT()),DC=nr(_T()),EC=nr(TT()),SC=nr(vT()),kT=Or(),OC=nr(ls()),MC=nr(wT());Dt.casual=new kT.Chrono(DT());Dt.strict=new kT.Chrono(yh(!0));function RC(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=RC;function PC(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=PC;function DT(){let r=yh(!1);return r.parsers.unshift(new kC.default),r.parsers.unshift(new DC.default),r.parsers.unshift(new gC.default),r.parsers.unshift(new SC.default),r.parsers.unshift(new MC.default),r}Dt.createCasualConfiguration=DT;function yh(r=!0){return wC.includeCommonConfiguration({parsers:[new OC.default(!0),new mC.default,new yC.default,new EC.default,new _C.default(r),new TC.default],refiners:[new vC.default,new bC.default]},r)}Dt.createConfiguration=yh});var ht=O(Te=>{"use strict";var xC=Te&&Te.__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]}),AC=Te&&Te.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ln=Te&&Te.__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)&&xC(e,r,t);return AC(e,r),e};Object.defineProperty(Te,"__esModule",{value:!0});Te.parseDate=Te.parse=Te.casual=Te.strict=Te.ru=Te.zh=Te.nl=Te.pt=Te.ja=Te.fr=Te.de=Te.Meridiem=Te.Chrono=Te.en=void 0;var gh=Ln(Nc());Te.en=gh;var NC=Or();Object.defineProperty(Te,"Chrono",{enumerable:!0,get:function(){return NC.Chrono}});var CC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(CC=Te.Meridiem||(Te.Meridiem={}));var IC=Ln(Cy());Te.de=IC;var FC=Ln(lg());Te.fr=FC;var LC=Ln(_g());Te.ja=LC;var YC=Ln(Cg());Te.pt=YC;var UC=Ln(__());Te.nl=UC;var WC=Ln(Q_());Te.zh=WC;var qC=Ln(ET());Te.ru=qC;Te.strict=gh.strict;Te.casual=gh.casual;function jC(r,e,t){return Te.casual.parse(r,e,t)}Te.parse=jC;function $C(r,e,t){return Te.casual.parseDate(r,e,t)}Te.parseDate=$C});var Th=O((_h,ni)=>{(function(r,e){typeof _h=="object"&&typeof ni!="undefined"?ni.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(_h,function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,u){return Object.prototype.hasOwnProperty.call(i,u)}function o(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var u;for(u in i)if(a(i,u))return!1;return!0}function l(i){return i===void 0}function c(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function f(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,u){var d=[],h,p=i.length;for(h=0;h<p;++h)d.push(u(i[h],h));return d}function g(i,u){for(var d in u)a(u,d)&&(i[d]=u[d]);return a(u,"toString")&&(i.toString=u.toString),a(u,"valueOf")&&(i.valueOf=u.valueOf),i}function T(i,u,d,h){return Ep(i,u,d,h,!0).utc()}function E(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(i){return i._pf==null&&(i._pf=E()),i._pf}var R;Array.prototype.some?R=Array.prototype.some:R=function(i){var u=Object(this),d=u.length>>>0,h;for(h=0;h<d;h++)if(h in u&&i.call(this,u[h],h,u))return!0;return!1};function C(i){if(i._isValid==null){var u=v(i),d=R.call(u.parsedDateParts,function(p){return p!=null}),h=!isNaN(i._d.getTime())&&u.overflow<0&&!u.empty&&!u.invalidEra&&!u.invalidMonth&&!u.invalidWeekday&&!u.weekdayMismatch&&!u.nullInput&&!u.invalidFormat&&!u.userInvalidated&&(!u.meridiem||u.meridiem&&d);if(i._strict&&(h=h&&u.charsLeftOver===0&&u.unusedTokens.length===0&&u.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=h;else return h}return i._isValid}function q(i){var u=T(NaN);return i!=null?g(v(u),i):v(u).userInvalidated=!0,u}var $=e.momentProperties=[],B=!1;function me(i,u){var d,h,p,b=$.length;if(l(u._isAMomentObject)||(i._isAMomentObject=u._isAMomentObject),l(u._i)||(i._i=u._i),l(u._f)||(i._f=u._f),l(u._l)||(i._l=u._l),l(u._strict)||(i._strict=u._strict),l(u._tzm)||(i._tzm=u._tzm),l(u._isUTC)||(i._isUTC=u._isUTC),l(u._offset)||(i._offset=u._offset),l(u._pf)||(i._pf=v(u)),l(u._locale)||(i._locale=u._locale),b>0)for(d=0;d<b;d++)h=$[d],p=u[h],l(p)||(i[h]=p);return i}function fe(i){me(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),B===!1&&(B=!0,e.updateOffset(this),B=!1)}function ve(i){return i instanceof fe||i!=null&&i._isAMomentObject!=null}function ee(i){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+i)}function te(i,u){var d=!0;return g(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),d){var h=[],p,b,P,re=arguments.length;for(b=0;b<re;b++){if(p="",typeof arguments[b]=="object"){p+=`
|
|
|
[`+b+"] ";for(P in arguments[0])a(arguments[0],P)&&(p+=P+": "+arguments[0][P]+", ");p=p.slice(0,-2)}else p=arguments[b];h.push(p)}ee(i+`
|
|
|
Arguments: `+Array.prototype.slice.call(h).join("")+`
|
|
|
`+new Error().stack),d=!1}return u.apply(this,arguments)},u)}var Ct={};function mt(i,u){e.deprecationHandler!=null&&e.deprecationHandler(i,u),Ct[i]||(ee(u),Ct[i]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function V(i){return typeof Function!="undefined"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function W(i){var u,d;for(d in i)a(i,d)&&(u=i[d],V(u)?this[d]=u:this["_"+d]=u);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(i,u){var d=g({},i),h;for(h in u)a(u,h)&&(s(i[h])&&s(u[h])?(d[h]={},g(d[h],i[h]),g(d[h],u[h])):u[h]!=null?d[h]=u[h]:delete d[h]);for(h in i)a(i,h)&&!a(u,h)&&s(i[h])&&(d[h]=g({},d[h]));return d}function Q(i){i!=null&&this.set(i)}var Y;Object.keys?Y=Object.keys:Y=function(i){var u,d=[];for(u in i)a(i,u)&&d.push(u);return d};var ue={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function y(i,u,d){var h=this._calendar[i]||this._calendar.sameElse;return V(h)?h.call(u,d):h}function _(i,u,d){var h=""+Math.abs(i),p=u-h.length,b=i>=0;return(b?d?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+h}var w=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,k=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,S={},M={};function D(i,u,d,h){var p=h;typeof h=="string"&&(p=function(){return this[h]()}),i&&(M[i]=p),u&&(M[u[0]]=function(){return _(p.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)})}function I(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function A(i){var u=i.match(w),d,h;for(d=0,h=u.length;d<h;d++)M[u[d]]?u[d]=M[u[d]]:u[d]=I(u[d]);return function(p){var b="",P;for(P=0;P<h;P++)b+=V(u[P])?u[P].call(p,i):u[P];return b}}function N(i,u){return i.isValid()?(u=j(u,i.localeData()),S[u]=S[u]||A(u),S[u](i)):i.localeData().invalidDate()}function j(i,u){var d=5;function h(p){return u.longDateFormat(p)||p}for(k.lastIndex=0;d>=0&&k.test(i);)i=i.replace(k,h),k.lastIndex=0,d-=1;return i}var De={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ye(i){var u=this._longDateFormat[i],d=this._longDateFormat[i.toUpperCase()];return u||!d?u:(this._longDateFormat[i]=d.match(w).map(function(h){return h==="MMMM"||h==="MM"||h==="DD"||h==="dddd"?h.slice(1):h}).join(""),this._longDateFormat[i])}var ce="Invalid date";function Fe(){return this._invalidDate}var K="%d",qe=/\d{1,2}/;function Je(i){return this._ordinal.replace("%d",i)}var Ze={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Dr(i,u,d,h){var p=this._relativeTime[d];return V(p)?p(i,u,d,h):p.replace(/%d/i,i)}function Ot(i,u){var d=this._relativeTime[i>0?"future":"past"];return V(d)?d(u):d.replace(/%s/i,u)}var Ae={};function nt(i,u){var d=i.toLowerCase();Ae[d]=Ae[d+"s"]=Ae[u]=i}function yt(i){return typeof i=="string"?Ae[i]||Ae[i.toLowerCase()]:void 0}function kn(i){var u={},d,h;for(h in i)a(i,h)&&(d=yt(h),d&&(u[d]=i[h]));return u}var Ri={};function je(i,u){Ri[i]=u}function Ns(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Ri[d]});return u.sort(function(h,p){return h.priority-p.priority}),u}function Kn(i){return i%4===0&&i%100!==0||i%400===0}function dt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function de(i){var u=+i,d=0;return u!==0&&isFinite(u)&&(d=dt(u)),d}function zr(i,u){return function(d){return d!=null?(Zn(this,i,d),e.updateOffset(this,u),this):Mt(this,i)}}function Mt(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function Zn(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&Kn(i.year())&&i.month()===1&&i.date()===29?(d=de(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),co(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function ao(i){return i=yt(i),V(this[i])?this[i]():this}function Fr(i,u){if(typeof i=="object"){i=kn(i);var d=Ns(i),h,p=d.length;for(h=0;h<p;h++)this[d[h].unit](i[d[h].unit])}else if(i=yt(i),V(this[i]))return this[i](u);return this}var Dn=/\d/,gt=/\d\d/,Pi=/\d{3}/,lr=/\d{4}/,Vr=/[+-]?\d{6}/,Ye=/\d\d?/,En=/\d\d\d\d?/,Cs=/\d\d\d\d\d\d?/,Xn=/\d{1,3}/,Sn=/\d{1,4}/,Qn=/[+-]?\d{1,6}/,cr=/\d+/,On=/[+-]?\d+/,oo=/Z|[+-]\d\d:?\d\d/gi,Kr=/Z|[+-]\d\d(?::?\d\d)?/gi,uo=/[+-]?\d+(\.\d{1,3})?/,dr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,fr;fr={};function H(i,u,d){fr[i]=V(u)?u:function(h,p){return h&&d?d:u}}function Is(i,u){return a(fr,i)?fr[i](u._strict,u._locale):new RegExp(lo(i))}function lo(i){return ft(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(u,d,h,p,b){return d||h||p||b}))}function ft(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Jn={};function Ne(i,u){var d,h=u,p;for(typeof i=="string"&&(i=[i]),c(u)&&(h=function(b,P){P[u]=de(b)}),p=i.length,d=0;d<p;d++)Jn[i[d]]=h}function hr(i,u){Ne(i,function(d,h,p,b){p._w=p._w||{},u(d,p._w,p,b)})}function It(i,u,d){u!=null&&a(Jn,i)&&Jn[i](u,d._a,d,i)}var et=0,Xe=1,G=2,ne=3,le=4,qt=5,es=6,Wv=7,qv=8;function jv(i,u){return(i%u+u)%u}var st;Array.prototype.indexOf?st=Array.prototype.indexOf:st=function(i){var u;for(u=0;u<this.length;++u)if(this[u]===i)return u;return-1};function co(i,u){if(isNaN(i)||isNaN(u))return NaN;var d=jv(u,12);return i+=(u-d)/12,d===1?Kn(i)?29:28:31-d%7%2}D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),D("MMMM",0,0,function(i){return this.localeData().months(this,i)}),nt("month","M"),je("month",8),H("M",Ye),H("MM",Ye,gt),H("MMM",function(i,u){return u.monthsShortRegex(i)}),H("MMMM",function(i,u){return u.monthsRegex(i)}),Ne(["M","MM"],function(i,u){u[Xe]=de(i)-1}),Ne(["MMM","MMMM"],function(i,u,d,h){var p=d._locale.monthsParse(i,h,d._strict);p!=null?u[Xe]=p:v(d).invalidMonth=i});var $v="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),cp="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),dp=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Bv=dr,Gv=dr;function Hv(i,u){return i?n(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||dp).test(u)?"format":"standalone"][i.month()]:n(this._months)?this._months:this._months.standalone}function zv(i,u){return i?n(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[dp.test(u)?"format":"standalone"][i.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Vv(i,u,d){var h,p,b,P=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],h=0;h<12;++h)b=T([2e3,h]),this._shortMonthsParse[h]=this.monthsShort(b,"").toLocaleLowerCase(),this._longMonthsParse[h]=this.months(b,"").toLocaleLowerCase();return d?u==="MMM"?(p=st.call(this._shortMonthsParse,P),p!==-1?p:null):(p=st.call(this._longMonthsParse,P),p!==-1?p:null):u==="MMM"?(p=st.call(this._shortMonthsParse,P),p!==-1?p:(p=st.call(this._longMonthsParse,P),p!==-1?p:null)):(p=st.call(this._longMonthsParse,P),p!==-1?p:(p=st.call(this._shortMonthsParse,P),p!==-1?p:null))}function Kv(i,u,d){var h,p,b;if(this._monthsParseExact)return Vv.call(this,i,u,d);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),h=0;h<12;h++){if(p=T([2e3,h]),d&&!this._longMonthsParse[h]&&(this._longMonthsParse[h]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[h]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i")),!d&&!this._monthsParse[h]&&(b="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[h]=new RegExp(b.replace(".",""),"i")),d&&u==="MMMM"&&this._longMonthsParse[h].test(i))return h;if(d&&u==="MMM"&&this._shortMonthsParse[h].test(i))return h;if(!d&&this._monthsParse[h].test(i))return h}}function fp(i,u){var d;if(!i.isValid())return i;if(typeof u=="string"){if(/^\d+$/.test(u))u=de(u);else if(u=i.localeData().monthsParse(u),!c(u))return i}return d=Math.min(i.date(),co(i.year(),u)),i._d["set"+(i._isUTC?"UTC":"")+"Month"](u,d),i}function hp(i){return i!=null?(fp(this,i),e.updateOffset(this,!0),this):Mt(this,"Month")}function Zv(){return co(this.year(),this.month())}function Xv(i){return this._monthsParseExact?(a(this,"_monthsRegex")||pp.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Bv),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function Qv(i){return this._monthsParseExact?(a(this,"_monthsRegex")||pp.call(this),i?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Gv),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function pp(){function i(P,re){return re.length-P.length}var u=[],d=[],h=[],p,b;for(p=0;p<12;p++)b=T([2e3,p]),u.push(this.monthsShort(b,"")),d.push(this.months(b,"")),h.push(this.months(b,"")),h.push(this.monthsShort(b,""));for(u.sort(i),d.sort(i),h.sort(i),p=0;p<12;p++)u[p]=ft(u[p]),d[p]=ft(d[p]);for(p=0;p<24;p++)h[p]=ft(h[p]);this._monthsRegex=new RegExp("^("+h.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+u.join("|")+")","i")}D("Y",0,0,function(){var i=this.year();return i<=9999?_(i,4):"+"+i}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),nt("year","y"),je("year",1),H("Y",On),H("YY",Ye,gt),H("YYYY",Sn,lr),H("YYYYY",Qn,Vr),H("YYYYYY",Qn,Vr),Ne(["YYYYY","YYYYYY"],et),Ne("YYYY",function(i,u){u[et]=i.length===2?e.parseTwoDigitYear(i):de(i)}),Ne("YY",function(i,u){u[et]=e.parseTwoDigitYear(i)}),Ne("Y",function(i,u){u[et]=parseInt(i,10)});function xi(i){return Kn(i)?366:365}e.parseTwoDigitYear=function(i){return de(i)+(de(i)>68?1900:2e3)};var mp=zr("FullYear",!0);function Jv(){return Kn(this.year())}function ew(i,u,d,h,p,b,P){var re;return i<100&&i>=0?(re=new Date(i+400,u,d,h,p,b,P),isFinite(re.getFullYear())&&re.setFullYear(i)):re=new Date(i,u,d,h,p,b,P),re}function Ai(i){var u,d;return i<100&&i>=0?(d=Array.prototype.slice.call(arguments),d[0]=i+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(i)):u=new Date(Date.UTC.apply(null,arguments)),u}function fo(i,u,d){var h=7+u-d,p=(7+Ai(i,0,h).getUTCDay()-u)%7;return-p+h-1}function yp(i,u,d,h,p){var b=(7+d-h)%7,P=fo(i,h,p),re=1+7*(u-1)+b+P,ge,Ue;return re<=0?(ge=i-1,Ue=xi(ge)+re):re>xi(i)?(ge=i+1,Ue=re-xi(i)):(ge=i,Ue=re),{year:ge,dayOfYear:Ue}}function Ni(i,u,d){var h=fo(i.year(),u,d),p=Math.floor((i.dayOfYear()-h-1)/7)+1,b,P;return p<1?(P=i.year()-1,b=p+Zr(P,u,d)):p>Zr(i.year(),u,d)?(b=p-Zr(i.year(),u,d),P=i.year()+1):(P=i.year(),b=p),{week:b,year:P}}function Zr(i,u,d){var h=fo(i,u,d),p=fo(i+1,u,d);return(xi(i)-h+p)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),nt("week","w"),nt("isoWeek","W"),je("week",5),je("isoWeek",5),H("w",Ye),H("ww",Ye,gt),H("W",Ye),H("WW",Ye,gt),hr(["w","ww","W","WW"],function(i,u,d,h){u[h.substr(0,1)]=de(i)});function tw(i){return Ni(i,this._week.dow,this._week.doy).week}var rw={dow:0,doy:6};function nw(){return this._week.dow}function sw(){return this._week.doy}function iw(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function aw(i){var u=Ni(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),D("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),D("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),nt("day","d"),nt("weekday","e"),nt("isoWeekday","E"),je("day",11),je("weekday",11),je("isoWeekday",11),H("d",Ye),H("e",Ye),H("E",Ye),H("dd",function(i,u){return u.weekdaysMinRegex(i)}),H("ddd",function(i,u){return u.weekdaysShortRegex(i)}),H("dddd",function(i,u){return u.weekdaysRegex(i)}),hr(["dd","ddd","dddd"],function(i,u,d,h){var p=d._locale.weekdaysParse(i,h,d._strict);p!=null?u.d=p:v(d).invalidWeekday=i}),hr(["d","e","E"],function(i,u,d,h){u[h]=de(i)});function ow(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function uw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function cl(i,u){return i.slice(u,7).concat(i.slice(0,u))}var lw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),cw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dw=dr,fw=dr,hw=dr;function pw(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?cl(d,this._week.dow):i?d[i.day()]:d}function mw(i){return i===!0?cl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function yw(i){return i===!0?cl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function gw(i,u,d){var h,p,b,P=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)b=T([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(b,"").toLocaleLowerCase();return d?u==="dddd"?(p=st.call(this._weekdaysParse,P),p!==-1?p:null):u==="ddd"?(p=st.call(this._shortWeekdaysParse,P),p!==-1?p:null):(p=st.call(this._minWeekdaysParse,P),p!==-1?p:null):u==="dddd"?(p=st.call(this._weekdaysParse,P),p!==-1||(p=st.call(this._shortWeekdaysParse,P),p!==-1)?p:(p=st.call(this._minWeekdaysParse,P),p!==-1?p:null)):u==="ddd"?(p=st.call(this._shortWeekdaysParse,P),p!==-1||(p=st.call(this._weekdaysParse,P),p!==-1)?p:(p=st.call(this._minWeekdaysParse,P),p!==-1?p:null)):(p=st.call(this._minWeekdaysParse,P),p!==-1||(p=st.call(this._weekdaysParse,P),p!==-1)?p:(p=st.call(this._shortWeekdaysParse,P),p!==-1?p:null))}function _w(i,u,d){var h,p,b;if(this._weekdaysParseExact)return gw.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),h=0;h<7;h++){if(p=T([2e3,1]).day(h),d&&!this._fullWeekdaysParse[h]&&(this._fullWeekdaysParse[h]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[h]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[h]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[h]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[h]=new RegExp(b.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[h].test(i))return h;if(d&&u==="ddd"&&this._shortWeekdaysParse[h].test(i))return h;if(d&&u==="dd"&&this._minWeekdaysParse[h].test(i))return h;if(!d&&this._weekdaysParse[h].test(i))return h}}function Tw(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=ow(i,this.localeData()),this.add(i-u,"d")):u}function bw(i){if(!this.isValid())return i!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return i==null?u:this.add(i-u,"d")}function vw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=uw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function ww(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||dl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=dw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function kw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||dl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Dw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||dl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hw),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function dl(){function i(jt,tn){return tn.length-jt.length}var u=[],d=[],h=[],p=[],b,P,re,ge,Ue;for(b=0;b<7;b++)P=T([2e3,1]).day(b),re=ft(this.weekdaysMin(P,"")),ge=ft(this.weekdaysShort(P,"")),Ue=ft(this.weekdays(P,"")),u.push(re),d.push(ge),h.push(Ue),p.push(re),p.push(ge),p.push(Ue);u.sort(i),d.sort(i),h.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function fl(){return this.hours()%12||12}function Ew(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,fl),D("k",["kk",2],0,Ew),D("hmm",0,0,function(){return""+fl.apply(this)+_(this.minutes(),2)}),D("hmmss",0,0,function(){return""+fl.apply(this)+_(this.minutes(),2)+_(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+_(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+_(this.minutes(),2)+_(this.seconds(),2)});function _p(i,u){D(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}_p("a",!0),_p("A",!1),nt("hour","h"),je("hour",13);function Tp(i,u){return u._meridiemParse}H("a",Tp),H("A",Tp),H("H",Ye),H("h",Ye),H("k",Ye),H("HH",Ye,gt),H("hh",Ye,gt),H("kk",Ye,gt),H("hmm",En),H("hmmss",Cs),H("Hmm",En),H("Hmmss",Cs),Ne(["H","HH"],ne),Ne(["k","kk"],function(i,u,d){var h=de(i);u[ne]=h===24?0:h}),Ne(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Ne(["h","hh"],function(i,u,d){u[ne]=de(i),v(d).bigHour=!0}),Ne("hmm",function(i,u,d){var h=i.length-2;u[ne]=de(i.substr(0,h)),u[le]=de(i.substr(h)),v(d).bigHour=!0}),Ne("hmmss",function(i,u,d){var h=i.length-4,p=i.length-2;u[ne]=de(i.substr(0,h)),u[le]=de(i.substr(h,2)),u[qt]=de(i.substr(p)),v(d).bigHour=!0}),Ne("Hmm",function(i,u,d){var h=i.length-2;u[ne]=de(i.substr(0,h)),u[le]=de(i.substr(h))}),Ne("Hmmss",function(i,u,d){var h=i.length-4,p=i.length-2;u[ne]=de(i.substr(0,h)),u[le]=de(i.substr(h,2)),u[qt]=de(i.substr(p))});function Sw(i){return(i+"").toLowerCase().charAt(0)==="p"}var Ow=/[ap]\.?m?\.?/i,Mw=zr("Hours",!0);function Rw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var bp={calendar:ue,longDateFormat:De,invalidDate:ce,ordinal:K,dayOfMonthOrdinalParse:qe,relativeTime:Ze,months:$v,monthsShort:cp,week:rw,weekdays:lw,weekdaysMin:cw,weekdaysShort:gp,meridiemParse:Ow},Qe={},Ci={},Ii;function Pw(i,u){var d,h=Math.min(i.length,u.length);for(d=0;d<h;d+=1)if(i[d]!==u[d])return d;return h}function vp(i){return i&&i.toLowerCase().replace("_","-")}function xw(i){for(var u=0,d,h,p,b;u<i.length;){for(b=vp(i[u]).split("-"),d=b.length,h=vp(i[u+1]),h=h?h.split("-"):null;d>0;){if(p=ho(b.slice(0,d).join("-")),p)return p;if(h&&h.length>=d&&Pw(b,h)>=d-1)break;d--}u++}return Ii}function Aw(i){return i.match("^[^/\\\\]*$")!=null}function ho(i){var u=null,d;if(Qe[i]===void 0&&typeof ni!="undefined"&&ni&&ni.exports&&Aw(i))try{u=Ii._abbr,d=require,d("./locale/"+i),Mn(u)}catch(h){Qe[i]=null}return Qe[i]}function Mn(i,u){var d;return i&&(l(u)?d=Xr(i):d=hl(i,u),d?Ii=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Ii._abbr}function hl(i,u){if(u!==null){var d,h=bp;if(u.abbr=i,Qe[i]!=null)mt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),h=Qe[i]._config;else if(u.parentLocale!=null)if(Qe[u.parentLocale]!=null)h=Qe[u.parentLocale]._config;else if(d=ho(u.parentLocale),d!=null)h=d._config;else return Ci[u.parentLocale]||(Ci[u.parentLocale]=[]),Ci[u.parentLocale].push({name:i,config:u}),null;return Qe[i]=new Q(x(h,u)),Ci[i]&&Ci[i].forEach(function(p){hl(p.name,p.config)}),Mn(i),Qe[i]}else return delete Qe[i],null}function Nw(i,u){if(u!=null){var d,h,p=bp;Qe[i]!=null&&Qe[i].parentLocale!=null?Qe[i].set(x(Qe[i]._config,u)):(h=ho(i),h!=null&&(p=h._config),u=x(p,u),h==null&&(u.abbr=i),d=new Q(u),d.parentLocale=Qe[i],Qe[i]=d),Mn(i)}else Qe[i]!=null&&(Qe[i].parentLocale!=null?(Qe[i]=Qe[i].parentLocale,i===Mn()&&Mn(i)):Qe[i]!=null&&delete Qe[i]);return Qe[i]}function Xr(i){var u;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Ii;if(!n(i)){if(u=ho(i),u)return u;i=[i]}return xw(i)}function Cw(){return Y(Qe)}function pl(i){var u,d=i._a;return d&&v(i).overflow===-2&&(u=d[Xe]<0||d[Xe]>11?Xe:d[G]<1||d[G]>co(d[et],d[Xe])?G:d[ne]<0||d[ne]>24||d[ne]===24&&(d[le]!==0||d[qt]!==0||d[es]!==0)?ne:d[le]<0||d[le]>59?le:d[qt]<0||d[qt]>59?qt:d[es]<0||d[es]>999?es:-1,v(i)._overflowDayOfYear&&(u<et||u>G)&&(u=G),v(i)._overflowWeeks&&u===-1&&(u=Wv),v(i)._overflowWeekday&&u===-1&&(u=qv),v(i).overflow=u),i}var Iw=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lw=/Z|[+-]\d\d(?::?\d\d)?/,po=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ml=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Yw=/^\/?Date\((-?\d+)/i,Uw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ww={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function wp(i){var u,d,h=i._i,p=Iw.exec(h)||Fw.exec(h),b,P,re,ge,Ue=po.length,jt=ml.length;if(p){for(v(i).iso=!0,u=0,d=Ue;u<d;u++)if(po[u][1].exec(p[1])){P=po[u][0],b=po[u][2]!==!1;break}if(P==null){i._isValid=!1;return}if(p[3]){for(u=0,d=jt;u<d;u++)if(ml[u][1].exec(p[3])){re=(p[2]||" ")+ml[u][0];break}if(re==null){i._isValid=!1;return}}if(!b&&re!=null){i._isValid=!1;return}if(p[4])if(Lw.exec(p[4]))ge="Z";else{i._isValid=!1;return}i._f=P+(re||"")+(ge||""),gl(i)}else i._isValid=!1}function qw(i,u,d,h,p,b){var P=[jw(i),cp.indexOf(u),parseInt(d,10),parseInt(h,10),parseInt(p,10)];return b&&P.push(parseInt(b,10)),P}function jw(i){var u=parseInt(i,10);return u<=49?2e3+u:u<=999?1900+u:u}function $w(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bw(i,u,d){if(i){var h=gp.indexOf(i),p=new Date(u[0],u[1],u[2]).getDay();if(h!==p)return v(d).weekdayMismatch=!0,d._isValid=!1,!1}return!0}function Gw(i,u,d){if(i)return Ww[i];if(u)return 0;var h=parseInt(d,10),p=h%100,b=(h-p)/100;return b*60+p}function kp(i){var u=Uw.exec($w(i._i)),d;if(u){if(d=qw(u[4],u[3],u[2],u[5],u[6],u[7]),!Bw(u[1],d,i))return;i._a=d,i._tzm=Gw(u[8],u[9],u[10]),i._d=Ai.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),v(i).rfc2822=!0}else i._isValid=!1}function Hw(i){var u=Yw.exec(i._i);if(u!==null){i._d=new Date(+u[1]);return}if(wp(i),i._isValid===!1)delete i._isValid;else return;if(kp(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:e.createFromInputFallback(i)}e.createFromInputFallback=te("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Fs(i,u,d){return i!=null?i:u!=null?u:d}function zw(i){var u=new Date(e.now());return i._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()]}function yl(i){var u,d,h=[],p,b,P;if(!i._d){for(p=zw(i),i._w&&i._a[G]==null&&i._a[Xe]==null&&Vw(i),i._dayOfYear!=null&&(P=Fs(i._a[et],p[et]),(i._dayOfYear>xi(P)||i._dayOfYear===0)&&(v(i)._overflowDayOfYear=!0),d=Ai(P,0,i._dayOfYear),i._a[Xe]=d.getUTCMonth(),i._a[G]=d.getUTCDate()),u=0;u<3&&i._a[u]==null;++u)i._a[u]=h[u]=p[u];for(;u<7;u++)i._a[u]=h[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[ne]===24&&i._a[le]===0&&i._a[qt]===0&&i._a[es]===0&&(i._nextDay=!0,i._a[ne]=0),i._d=(i._useUTC?Ai:ew).apply(null,h),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ne]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==b&&(v(i).weekdayMismatch=!0)}}function Vw(i){var u,d,h,p,b,P,re,ge,Ue;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(b=1,P=4,d=Fs(u.GG,i._a[et],Ni(ze(),1,4).year),h=Fs(u.W,1),p=Fs(u.E,1),(p<1||p>7)&&(ge=!0)):(b=i._locale._week.dow,P=i._locale._week.doy,Ue=Ni(ze(),b,P),d=Fs(u.gg,i._a[et],Ue.year),h=Fs(u.w,Ue.week),u.d!=null?(p=u.d,(p<0||p>6)&&(ge=!0)):u.e!=null?(p=u.e+b,(u.e<0||u.e>6)&&(ge=!0)):p=b),h<1||h>Zr(d,b,P)?v(i)._overflowWeeks=!0:ge!=null?v(i)._overflowWeekday=!0:(re=yp(d,h,p,b,P),i._a[et]=re.year,i._dayOfYear=re.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function gl(i){if(i._f===e.ISO_8601){wp(i);return}if(i._f===e.RFC_2822){kp(i);return}i._a=[],v(i).empty=!0;var u=""+i._i,d,h,p,b,P,re=u.length,ge=0,Ue,jt;for(p=j(i._f,i._locale).match(w)||[],jt=p.length,d=0;d<jt;d++)b=p[d],h=(u.match(Is(b,i))||[])[0],h&&(P=u.substr(0,u.indexOf(h)),P.length>0&&v(i).unusedInput.push(P),u=u.slice(u.indexOf(h)+h.length),ge+=h.length),M[b]?(h?v(i).empty=!1:v(i).unusedTokens.push(b),It(b,h,i)):i._strict&&!h&&v(i).unusedTokens.push(b);v(i).charsLeftOver=re-ge,u.length>0&&v(i).unusedInput.push(u),i._a[ne]<=12&&v(i).bigHour===!0&&i._a[ne]>0&&(v(i).bigHour=void 0),v(i).parsedDateParts=i._a.slice(0),v(i).meridiem=i._meridiem,i._a[ne]=Kw(i._locale,i._a[ne],i._meridiem),Ue=v(i).era,Ue!==null&&(i._a[et]=i._locale.erasConvertYear(Ue,i._a[et])),yl(i),pl(i)}function Kw(i,u,d){var h;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(h=i.isPM(d),h&&u<12&&(u+=12),!h&&u===12&&(u=0)),u)}function Zw(i){var u,d,h,p,b,P,re=!1,ge=i._f.length;if(ge===0){v(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;p<ge;p++)b=0,P=!1,u=me({},i),i._useUTC!=null&&(u._useUTC=i._useUTC),u._f=i._f[p],gl(u),C(u)&&(P=!0),b+=v(u).charsLeftOver,b+=v(u).unusedTokens.length*10,v(u).score=b,re?b<h&&(h=b,d=u):(h==null||b<h||P)&&(h=b,d=u,P&&(re=!0));g(i,d||u)}function Xw(i){if(!i._d){var u=kn(i._i),d=u.day===void 0?u.date:u.day;i._a=m([u.year,u.month,d,u.hour,u.minute,u.second,u.millisecond],function(h){return h&&parseInt(h,10)}),yl(i)}}function Qw(i){var u=new fe(pl(Dp(i)));return u._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Dp(i){var u=i._i,d=i._f;return i._locale=i._locale||Xr(i._l),u===null||d===void 0&&u===""?q({nullInput:!0}):(typeof u=="string"&&(i._i=u=i._locale.preparse(u)),ve(u)?new fe(pl(u)):(f(u)?i._d=u:n(d)?Zw(i):d?gl(i):Jw(i),C(i)||(i._d=null),i))}function Jw(i){var u=i._i;l(u)?i._d=new Date(e.now()):f(u)?i._d=new Date(u.valueOf()):typeof u=="string"?Hw(i):n(u)?(i._a=m(u.slice(0),function(d){return parseInt(d,10)}),yl(i)):s(u)?Xw(i):c(u)?i._d=new Date(u):e.createFromInputFallback(i)}function Ep(i,u,d,h,p){var b={};return(u===!0||u===!1)&&(h=u,u=void 0),(d===!0||d===!1)&&(h=d,d=void 0),(s(i)&&o(i)||n(i)&&i.length===0)&&(i=void 0),b._isAMomentObject=!0,b._useUTC=b._isUTC=p,b._l=d,b._i=i,b._f=u,b._strict=h,Qw(b)}function ze(i,u,d,h){return Ep(i,u,d,h,!1)}var e0=te("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:q()}),t0=te("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:q()});function Sp(i,u){var d,h;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return ze();for(d=u[0],h=1;h<u.length;++h)(!u[h].isValid()||u[h][i](d))&&(d=u[h]);return d}function r0(){var i=[].slice.call(arguments,0);return Sp("isBefore",i)}function n0(){var i=[].slice.call(arguments,0);return Sp("isAfter",i)}var s0=function(){return Date.now?Date.now():+new Date},Fi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function i0(i){var u,d=!1,h,p=Fi.length;for(u in i)if(a(i,u)&&!(st.call(Fi,u)!==-1&&(i[u]==null||!isNaN(i[u]))))return!1;for(h=0;h<p;++h)if(i[Fi[h]]){if(d)return!1;parseFloat(i[Fi[h]])!==de(i[Fi[h]])&&(d=!0)}return!0}function a0(){return this._isValid}function o0(){return Er(NaN)}function mo(i){var u=kn(i),d=u.year||0,h=u.quarter||0,p=u.month||0,b=u.week||u.isoWeek||0,P=u.day||0,re=u.hour||0,ge=u.minute||0,Ue=u.second||0,jt=u.millisecond||0;this._isValid=i0(u),this._milliseconds=+jt+Ue*1e3+ge*6e4+re*1e3*60*60,this._days=+P+b*7,this._months=+p+h*3+d*12,this._data={},this._locale=Xr(),this._bubble()}function yo(i){return i instanceof mo}function _l(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function u0(i,u,d){var h=Math.min(i.length,u.length),p=Math.abs(i.length-u.length),b=0,P;for(P=0;P<h;P++)(d&&i[P]!==u[P]||!d&&de(i[P])!==de(u[P]))&&b++;return b+p}function Op(i,u){D(i,0,0,function(){var d=this.utcOffset(),h="+";return d<0&&(d=-d,h="-"),h+_(~~(d/60),2)+u+_(~~d%60,2)})}Op("Z",":"),Op("ZZ",""),H("Z",Kr),H("ZZ",Kr),Ne(["Z","ZZ"],function(i,u,d){d._useUTC=!0,d._tzm=Tl(Kr,i)});var l0=/([\+\-]|\d\d)/gi;function Tl(i,u){var d=(u||"").match(i),h,p,b;return d===null?null:(h=d[d.length-1]||[],p=(h+"").match(l0)||["-",0,0],b=+(p[1]*60)+de(p[2]),b===0?0:p[0]==="+"?b:-b)}function bl(i,u){var d,h;return u._isUTC?(d=u.clone(),h=(ve(i)||f(i)?i.valueOf():ze(i).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+h),e.updateOffset(d,!1),d):ze(i).local()}function vl(i){return-Math.round(i._d.getTimezoneOffset())}e.updateOffset=function(){};function c0(i,u,d){var h=this._offset||0,p;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Tl(Kr,i),i===null)return this}else Math.abs(i)<16&&!d&&(i=i*60);return!this._isUTC&&u&&(p=vl(this)),this._offset=i,this._isUTC=!0,p!=null&&this.add(p,"m"),h!==i&&(!u||this._changeInProgress?xp(this,Er(i-h,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?h:vl(this)}function d0(i,u){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,u),this):-this.utcOffset()}function f0(i){return this.utcOffset(0,i)}function h0(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(vl(this),"m")),this}function p0(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Tl(oo,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function m0(i){return this.isValid()?(i=i?ze(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function y0(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function g0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return me(i,this),i=Dp(i),i._a?(u=i._isUTC?T(i._a):ze(i._a),this._isDSTShifted=this.isValid()&&u0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function _0(){return this.isValid()?!this._isUTC:!1}function T0(){return this.isValid()?this._isUTC:!1}function Mp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var b0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,v0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Er(i,u){var d=i,h=null,p,b,P;return yo(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(h=b0.exec(i))?(p=h[1]==="-"?-1:1,d={y:0,d:de(h[G])*p,h:de(h[ne])*p,m:de(h[le])*p,s:de(h[qt])*p,ms:de(_l(h[es]*1e3))*p}):(h=v0.exec(i))?(p=h[1]==="-"?-1:1,d={y:ts(h[2],p),M:ts(h[3],p),w:ts(h[4],p),d:ts(h[5],p),h:ts(h[6],p),m:ts(h[7],p),s:ts(h[8],p)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(P=w0(ze(d.from),ze(d.to)),d={},d.ms=P.milliseconds,d.M=P.months),b=new mo(d),yo(i)&&a(i,"_locale")&&(b._locale=i._locale),yo(i)&&a(i,"_isValid")&&(b._isValid=i._isValid),b}Er.fn=mo.prototype,Er.invalid=o0;function ts(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Rp(i,u){var d={};return d.months=u.month()-i.month()+(u.year()-i.year())*12,i.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+i.clone().add(d.months,"M"),d}function w0(i,u){var d;return i.isValid()&&u.isValid()?(u=bl(u,i),i.isBefore(u)?d=Rp(i,u):(d=Rp(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Pp(i,u){return function(d,h){var p,b;return h!==null&&!isNaN(+h)&&(mt(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=d,d=h,h=b),p=Er(d,h),xp(this,p,i),this}}function xp(i,u,d,h){var p=u._milliseconds,b=_l(u._days),P=_l(u._months);!i.isValid()||(h=h==null?!0:h,P&&fp(i,Mt(i,"Month")+P*d),b&&Zn(i,"Date",Mt(i,"Date")+b*d),p&&i._d.setTime(i._d.valueOf()+p*d),h&&e.updateOffset(i,b||P))}var k0=Pp(1,"add"),D0=Pp(-1,"subtract");function Ap(i){return typeof i=="string"||i instanceof String}function E0(i){return ve(i)||f(i)||Ap(i)||c(i)||O0(i)||S0(i)||i===null||i===void 0}function S0(i){var u=s(i)&&!o(i),d=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,P=h.length;for(p=0;p<P;p+=1)b=h[p],d=d||a(i,b);return u&&d}function O0(i){var u=n(i),d=!1;return u&&(d=i.filter(function(h){return!c(h)&&Ap(i)}).length===0),u&&d}function M0(i){var u=s(i)&&!o(i),d=!1,h=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,b;for(p=0;p<h.length;p+=1)b=h[p],d=d||a(i,b);return u&&d}function R0(i,u){var d=i.diff(u,"days",!0);return d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse"}function P0(i,u){arguments.length===1&&(arguments[0]?E0(arguments[0])?(i=arguments[0],u=void 0):M0(arguments[0])&&(u=arguments[0],i=void 0):(i=void 0,u=void 0));var d=i||ze(),h=bl(d,this).startOf("day"),p=e.calendarFormat(this,h)||"sameElse",b=u&&(V(u[p])?u[p].call(this,d):u[p]);return this.format(b||this.localeData().calendar(p,this,ze(d)))}function x0(){return new fe(this)}function A0(i,u){var d=ve(i)?i:ze(i);return this.isValid()&&d.isValid()?(u=yt(u)||"millisecond",u==="millisecond"?this.valueOf()>d.valueOf():d.valueOf()<this.clone().startOf(u).valueOf()):!1}function N0(i,u){var d=ve(i)?i:ze(i);return this.isValid()&&d.isValid()?(u=yt(u)||"millisecond",u==="millisecond"?this.valueOf()<d.valueOf():this.clone().endOf(u).valueOf()<d.valueOf()):!1}function C0(i,u,d,h){var p=ve(i)?i:ze(i),b=ve(u)?u:ze(u);return this.isValid()&&p.isValid()&&b.isValid()?(h=h||"()",(h[0]==="("?this.isAfter(p,d):!this.isBefore(p,d))&&(h[1]===")"?this.isBefore(b,d):!this.isAfter(b,d))):!1}function I0(i,u){var d=ve(i)?i:ze(i),h;return this.isValid()&&d.isValid()?(u=yt(u)||"millisecond",u==="millisecond"?this.valueOf()===d.valueOf():(h=d.valueOf(),this.clone().startOf(u).valueOf()<=h&&h<=this.clone().endOf(u).valueOf())):!1}function F0(i,u){return this.isSame(i,u)||this.isAfter(i,u)}function L0(i,u){return this.isSame(i,u)||this.isBefore(i,u)}function Y0(i,u,d){var h,p,b;if(!this.isValid())return NaN;if(h=bl(i,this),!h.isValid())return NaN;switch(p=(h.utcOffset()-this.utcOffset())*6e4,u=yt(u),u){case"year":b=go(this,h)/12;break;case"month":b=go(this,h);break;case"quarter":b=go(this,h)/3;break;case"second":b=(this-h)/1e3;break;case"minute":b=(this-h)/6e4;break;case"hour":b=(this-h)/36e5;break;case"day":b=(this-h-p)/864e5;break;case"week":b=(this-h-p)/6048e5;break;default:b=this-h}return d?b:dt(b)}function go(i,u){if(i.date()<u.date())return-go(u,i);var d=(u.year()-i.year())*12+(u.month()-i.month()),h=i.clone().add(d,"months"),p,b;return u-h<0?(p=i.clone().add(d-1,"months"),b=(u-h)/(h-p)):(p=i.clone().add(d+1,"months"),b=(u-h)/(p-h)),-(d+b)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function U0(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function W0(i){if(!this.isValid())return null;var u=i!==!0,d=u?this.clone().utc():this;return d.year()<0||d.year()>9999?N(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):V(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",N(d,"Z")):N(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function q0(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,h,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=u+'[")]',this.format(d+h+p+b)}function j0(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function $0(i,u){return this.isValid()&&(ve(i)&&i.isValid()||ze(i).isValid())?Er({to:this,from:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function B0(i){return this.from(ze(),i)}function G0(i,u){return this.isValid()&&(ve(i)&&i.isValid()||ze(i).isValid())?Er({from:this,to:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function H0(i){return this.to(ze(),i)}function Np(i){var u;return i===void 0?this._locale._abbr:(u=Xr(i),u!=null&&(this._locale=u),this)}var Cp=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Ip(){return this._locale}var _o=1e3,Ls=60*_o,To=60*Ls,Fp=(365*400+97)*24*To;function Ys(i,u){return(i%u+u)%u}function Lp(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Fp:new Date(i,u,d).valueOf()}function Yp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Fp:Date.UTC(i,u,d)}function z0(i){var u,d;if(i=yt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Yp:Lp,i){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=Ys(u+(this._isUTC?0:this.utcOffset()*Ls),To);break;case"minute":u=this._d.valueOf(),u-=Ys(u,Ls);break;case"second":u=this._d.valueOf(),u-=Ys(u,_o);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function V0(i){var u,d;if(i=yt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Yp:Lp,i){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=To-Ys(u+(this._isUTC?0:this.utcOffset()*Ls),To)-1;break;case"minute":u=this._d.valueOf(),u+=Ls-Ys(u,Ls)-1;break;case"second":u=this._d.valueOf(),u+=_o-Ys(u,_o)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function K0(){return this._d.valueOf()-(this._offset||0)*6e4}function Z0(){return Math.floor(this.valueOf()/1e3)}function X0(){return new Date(this.valueOf())}function Q0(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function J0(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function e1(){return this.isValid()?this.toISOString():null}function t1(){return C(this)}function r1(){return g({},v(this))}function n1(){return v(this).overflow}function s1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),H("N",wl),H("NN",wl),H("NNN",wl),H("NNNN",m1),H("NNNNN",y1),Ne(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,h){var p=d._locale.erasParse(i,h,d._strict);p?v(d).era=p:v(d).invalidEra=i}),H("y",cr),H("yy",cr),H("yyy",cr),H("yyyy",cr),H("yo",g1),Ne(["y","yy","yyy","yyyy"],et),Ne(["yo"],function(i,u,d,h){var p;d._locale._eraYearOrdinalRegex&&(p=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[et]=d._locale.eraYearOrdinalParse(i,p):u[et]=parseInt(i,10)});function i1(i,u){var d,h,p,b=this._eras||Xr("en")._eras;for(d=0,h=b.length;d<h;++d){switch(typeof b[d].since){case"string":p=e(b[d].since).startOf("day"),b[d].since=p.valueOf();break}switch(typeof b[d].until){case"undefined":b[d].until=1/0;break;case"string":p=e(b[d].until).startOf("day").valueOf(),b[d].until=p.valueOf();break}}return b}function a1(i,u,d){var h,p,b=this.eras(),P,re,ge;for(i=i.toUpperCase(),h=0,p=b.length;h<p;++h)if(P=b[h].name.toUpperCase(),re=b[h].abbr.toUpperCase(),ge=b[h].narrow.toUpperCase(),d)switch(u){case"N":case"NN":case"NNN":if(re===i)return b[h];break;case"NNNN":if(P===i)return b[h];break;case"NNNNN":if(ge===i)return b[h];break}else if([P,re,ge].indexOf(i)>=0)return b[h]}function o1(i,u){var d=i.since<=i.until?1:-1;return u===void 0?e(i.since).year():e(i.since).year()+(u-i.offset)*d}function u1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].name;return""}function l1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].narrow;return""}function c1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].abbr;return""}function d1(){var i,u,d,h,p=this.localeData().eras();for(i=0,u=p.length;i<u;++i)if(d=p[i].since<=p[i].until?1:-1,h=this.clone().startOf("day").valueOf(),p[i].since<=h&&h<=p[i].until||p[i].until<=h&&h<=p[i].since)return(this.year()-e(p[i].since).year())*d+p[i].offset;return this.year()}function f1(i){return a(this,"_erasNameRegex")||kl.call(this),i?this._erasNameRegex:this._erasRegex}function h1(i){return a(this,"_erasAbbrRegex")||kl.call(this),i?this._erasAbbrRegex:this._erasRegex}function p1(i){return a(this,"_erasNarrowRegex")||kl.call(this),i?this._erasNarrowRegex:this._erasRegex}function wl(i,u){return u.erasAbbrRegex(i)}function m1(i,u){return u.erasNameRegex(i)}function y1(i,u){return u.erasNarrowRegex(i)}function g1(i,u){return u._eraYearOrdinalRegex||cr}function kl(){var i=[],u=[],d=[],h=[],p,b,P=this.eras();for(p=0,b=P.length;p<b;++p)u.push(ft(P[p].name)),i.push(ft(P[p].abbr)),d.push(ft(P[p].narrow)),h.push(ft(P[p].name)),h.push(ft(P[p].abbr)),h.push(ft(P[p].narrow));this._erasRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+u.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+d.join("|")+")","i")}D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100});function bo(i,u){D(0,[i,i.length],0,u)}bo("gggg","weekYear"),bo("ggggg","weekYear"),bo("GGGG","isoWeekYear"),bo("GGGGG","isoWeekYear"),nt("weekYear","gg"),nt("isoWeekYear","GG"),je("weekYear",1),je("isoWeekYear",1),H("G",On),H("g",On),H("GG",Ye,gt),H("gg",Ye,gt),H("GGGG",Sn,lr),H("gggg",Sn,lr),H("GGGGG",Qn,Vr),H("ggggg",Qn,Vr),hr(["gggg","ggggg","GGGG","GGGGG"],function(i,u,d,h){u[h.substr(0,2)]=de(i)}),hr(["gg","GG"],function(i,u,d,h){u[h]=e.parseTwoDigitYear(i)});function _1(i){return Up.call(this,i,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function T1(i){return Up.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function b1(){return Zr(this.year(),1,4)}function v1(){return Zr(this.isoWeekYear(),1,4)}function w1(){var i=this.localeData()._week;return Zr(this.year(),i.dow,i.doy)}function k1(){var i=this.localeData()._week;return Zr(this.weekYear(),i.dow,i.doy)}function Up(i,u,d,h,p){var b;return i==null?Ni(this,h,p).year:(b=Zr(i,h,p),u>b&&(u=b),D1.call(this,i,u,d,h,p))}function D1(i,u,d,h,p){var b=yp(i,u,d,h,p),P=Ai(b.year,0,b.dayOfYear);return this.year(P.getUTCFullYear()),this.month(P.getUTCMonth()),this.date(P.getUTCDate()),this}D("Q",0,"Qo","quarter"),nt("quarter","Q"),je("quarter",7),H("Q",Dn),Ne("Q",function(i,u){u[Xe]=(de(i)-1)*3});function E1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),nt("date","D"),je("date",9),H("D",Ye),H("DD",Ye,gt),H("Do",function(i,u){return i?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient}),Ne(["D","DD"],G),Ne("Do",function(i,u){u[G]=de(i.match(Ye)[0])});var Wp=zr("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),nt("dayOfYear","DDD"),je("dayOfYear",4),H("DDD",Xn),H("DDDD",Pi),Ne(["DDD","DDDD"],function(i,u,d){d._dayOfYear=de(i)});function S1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}D("m",["mm",2],0,"minute"),nt("minute","m"),je("minute",14),H("m",Ye),H("mm",Ye,gt),Ne(["m","mm"],le);var O1=zr("Minutes",!1);D("s",["ss",2],0,"second"),nt("second","s"),je("second",15),H("s",Ye),H("ss",Ye,gt),Ne(["s","ss"],qt);var M1=zr("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),nt("millisecond","ms"),je("millisecond",16),H("S",Xn,Dn),H("SS",Xn,gt),H("SSS",Xn,Pi);var Rn,qp;for(Rn="SSSS";Rn.length<=9;Rn+="S")H(Rn,cr);function R1(i,u){u[es]=de(("0."+i)*1e3)}for(Rn="S";Rn.length<=9;Rn+="S")Ne(Rn,R1);qp=zr("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function P1(){return this._isUTC?"UTC":""}function x1(){return this._isUTC?"Coordinated Universal Time":""}var F=fe.prototype;F.add=k0,F.calendar=P0,F.clone=x0,F.diff=Y0,F.endOf=V0,F.format=j0,F.from=$0,F.fromNow=B0,F.to=G0,F.toNow=H0,F.get=ao,F.invalidAt=n1,F.isAfter=A0,F.isBefore=N0,F.isBetween=C0,F.isSame=I0,F.isSameOrAfter=F0,F.isSameOrBefore=L0,F.isValid=t1,F.lang=Cp,F.locale=Np,F.localeData=Ip,F.max=t0,F.min=e0,F.parsingFlags=r1,F.set=Fr,F.startOf=z0,F.subtract=D0,F.toArray=Q0,F.toObject=J0,F.toDate=X0,F.toISOString=W0,F.inspect=q0,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=e1,F.toString=U0,F.unix=Z0,F.valueOf=K0,F.creationData=s1,F.eraName=u1,F.eraNarrow=l1,F.eraAbbr=c1,F.eraYear=d1,F.year=mp,F.isLeapYear=Jv,F.weekYear=_1,F.isoWeekYear=T1,F.quarter=F.quarters=E1,F.month=hp,F.daysInMonth=Zv,F.week=F.weeks=iw,F.isoWeek=F.isoWeeks=aw,F.weeksInYear=w1,F.weeksInWeekYear=k1,F.isoWeeksInYear=b1,F.isoWeeksInISOWeekYear=v1,F.date=Wp,F.day=F.days=Tw,F.weekday=bw,F.isoWeekday=vw,F.dayOfYear=S1,F.hour=F.hours=Mw,F.minute=F.minutes=O1,F.second=F.seconds=M1,F.millisecond=F.milliseconds=qp,F.utcOffset=c0,F.utc=f0,F.local=h0,F.parseZone=p0,F.hasAlignedHourOffset=m0,F.isDST=y0,F.isLocal=_0,F.isUtcOffset=T0,F.isUtc=Mp,F.isUTC=Mp,F.zoneAbbr=P1,F.zoneName=x1,F.dates=te("dates accessor is deprecated. Use date instead.",Wp),F.months=te("months accessor is deprecated. Use month instead",hp),F.years=te("years accessor is deprecated. Use year instead",mp),F.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",d0),F.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",g0);function A1(i){return ze(i*1e3)}function N1(){return ze.apply(null,arguments).parseZone()}function jp(i){return i}var Re=Q.prototype;Re.calendar=y,Re.longDateFormat=ye,Re.invalidDate=Fe,Re.ordinal=Je,Re.preparse=jp,Re.postformat=jp,Re.relativeTime=Dr,Re.pastFuture=Ot,Re.set=W,Re.eras=i1,Re.erasParse=a1,Re.erasConvertYear=o1,Re.erasAbbrRegex=h1,Re.erasNameRegex=f1,Re.erasNarrowRegex=p1,Re.months=Hv,Re.monthsShort=zv,Re.monthsParse=Kv,Re.monthsRegex=Qv,Re.monthsShortRegex=Xv,Re.week=tw,Re.firstDayOfYear=sw,Re.firstDayOfWeek=nw,Re.weekdays=pw,Re.weekdaysMin=yw,Re.weekdaysShort=mw,Re.weekdaysParse=_w,Re.weekdaysRegex=ww,Re.weekdaysShortRegex=kw,Re.weekdaysMinRegex=Dw,Re.isPM=Sw,Re.meridiem=Rw;function vo(i,u,d,h){var p=Xr(),b=T().set(h,u);return p[d](b,i)}function $p(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return vo(i,u,d,"month");var h,p=[];for(h=0;h<12;h++)p[h]=vo(i,h,d,"month");return p}function Dl(i,u,d,h){typeof i=="boolean"?(c(u)&&(d=u,u=void 0),u=u||""):(u=i,d=u,i=!1,c(u)&&(d=u,u=void 0),u=u||"");var p=Xr(),b=i?p._week.dow:0,P,re=[];if(d!=null)return vo(u,(d+b)%7,h,"day");for(P=0;P<7;P++)re[P]=vo(u,(P+b)%7,h,"day");return re}function C1(i,u){return $p(i,u,"months")}function I1(i,u){return $p(i,u,"monthsShort")}function F1(i,u,d){return Dl(i,u,d,"weekdays")}function L1(i,u,d){return Dl(i,u,d,"weekdaysShort")}function Y1(i,u,d){return Dl(i,u,d,"weekdaysMin")}Mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var u=i%10,d=de(i%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return i+d}}),e.lang=te("moment.lang is deprecated. Use moment.locale instead.",Mn),e.langData=te("moment.langData is deprecated. Use moment.localeData instead.",Xr);var Qr=Math.abs;function U1(){var i=this._data;return this._milliseconds=Qr(this._milliseconds),this._days=Qr(this._days),this._months=Qr(this._months),i.milliseconds=Qr(i.milliseconds),i.seconds=Qr(i.seconds),i.minutes=Qr(i.minutes),i.hours=Qr(i.hours),i.months=Qr(i.months),i.years=Qr(i.years),this}function Bp(i,u,d,h){var p=Er(u,d);return i._milliseconds+=h*p._milliseconds,i._days+=h*p._days,i._months+=h*p._months,i._bubble()}function W1(i,u){return Bp(this,i,u,1)}function q1(i,u){return Bp(this,i,u,-1)}function Gp(i){return i<0?Math.floor(i):Math.ceil(i)}function j1(){var i=this._milliseconds,u=this._days,d=this._months,h=this._data,p,b,P,re,ge;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=Gp(El(d)+u)*864e5,u=0,d=0),h.milliseconds=i%1e3,p=dt(i/1e3),h.seconds=p%60,b=dt(p/60),h.minutes=b%60,P=dt(b/60),h.hours=P%24,u+=dt(P/24),ge=dt(Hp(u)),d+=ge,u-=Gp(El(ge)),re=dt(d/12),d%=12,h.days=u,h.months=d,h.years=re,this}function Hp(i){return i*4800/146097}function El(i){return i*146097/4800}function $1(i){if(!this.isValid())return NaN;var u,d,h=this._milliseconds;if(i=yt(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+h/864e5,d=this._months+Hp(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(El(this._months)),i){case"week":return u/7+h/6048e5;case"day":return u+h/864e5;case"hour":return u*24+h/36e5;case"minute":return u*1440+h/6e4;case"second":return u*86400+h/1e3;case"millisecond":return Math.floor(u*864e5)+h;default:throw new Error("Unknown unit "+i)}}function B1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+de(this._months/12)*31536e6:NaN}function Jr(i){return function(){return this.as(i)}}var G1=Jr("ms"),H1=Jr("s"),z1=Jr("m"),V1=Jr("h"),K1=Jr("d"),Z1=Jr("w"),X1=Jr("M"),Q1=Jr("Q"),J1=Jr("y");function ek(){return Er(this)}function tk(i){return i=yt(i),this.isValid()?this[i+"s"]():NaN}function rs(i){return function(){return this.isValid()?this._data[i]:NaN}}var rk=rs("milliseconds"),nk=rs("seconds"),sk=rs("minutes"),ik=rs("hours"),ak=rs("days"),ok=rs("months"),uk=rs("years");function lk(){return dt(this.days()/7)}var en=Math.round,Us={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ck(i,u,d,h,p){return p.relativeTime(u||1,!!d,i,h)}function dk(i,u,d,h){var p=Er(i).abs(),b=en(p.as("s")),P=en(p.as("m")),re=en(p.as("h")),ge=en(p.as("d")),Ue=en(p.as("M")),jt=en(p.as("w")),tn=en(p.as("y")),Pn=b<=d.ss&&["s",b]||b<d.s&&["ss",b]||P<=1&&["m"]||P<d.m&&["mm",P]||re<=1&&["h"]||re<d.h&&["hh",re]||ge<=1&&["d"]||ge<d.d&&["dd",ge];return d.w!=null&&(Pn=Pn||jt<=1&&["w"]||jt<d.w&&["ww",jt]),Pn=Pn||Ue<=1&&["M"]||Ue<d.M&&["MM",Ue]||tn<=1&&["y"]||["yy",tn],Pn[2]=u,Pn[3]=+i>0,Pn[4]=h,ck.apply(null,Pn)}function fk(i){return i===void 0?en:typeof i=="function"?(en=i,!0):!1}function hk(i,u){return Us[i]===void 0?!1:u===void 0?Us[i]:(Us[i]=u,i==="s"&&(Us.ss=u-1),!0)}function pk(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,h=Us,p,b;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(h=Object.assign({},Us,u),u.s!=null&&u.ss==null&&(h.ss=u.s-1)),p=this.localeData(),b=dk(this,!d,h,p),d&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Sl=Math.abs;function Ws(i){return(i>0)-(i<0)||+i}function wo(){if(!this.isValid())return this.localeData().invalidDate();var i=Sl(this._milliseconds)/1e3,u=Sl(this._days),d=Sl(this._months),h,p,b,P,re=this.asSeconds(),ge,Ue,jt,tn;return re?(h=dt(i/60),p=dt(h/60),i%=60,h%=60,b=dt(d/12),d%=12,P=i?i.toFixed(3).replace(/\.?0+$/,""):"",ge=re<0?"-":"",Ue=Ws(this._months)!==Ws(re)?"-":"",jt=Ws(this._days)!==Ws(re)?"-":"",tn=Ws(this._milliseconds)!==Ws(re)?"-":"",ge+"P"+(b?Ue+b+"Y":"")+(d?Ue+d+"M":"")+(u?jt+u+"D":"")+(p||h||i?"T":"")+(p?tn+p+"H":"")+(h?tn+h+"M":"")+(i?tn+P+"S":"")):"P0D"}var Oe=mo.prototype;Oe.isValid=a0,Oe.abs=U1,Oe.add=W1,Oe.subtract=q1,Oe.as=$1,Oe.asMilliseconds=G1,Oe.asSeconds=H1,Oe.asMinutes=z1,Oe.asHours=V1,Oe.asDays=K1,Oe.asWeeks=Z1,Oe.asMonths=X1,Oe.asQuarters=Q1,Oe.asYears=J1,Oe.valueOf=B1,Oe._bubble=j1,Oe.clone=ek,Oe.get=tk,Oe.milliseconds=rk,Oe.seconds=nk,Oe.minutes=sk,Oe.hours=ik,Oe.days=ak,Oe.weeks=lk,Oe.months=ok,Oe.years=uk,Oe.humanize=pk,Oe.toISOString=wo,Oe.toString=wo,Oe.toJSON=wo,Oe.locale=Np,Oe.localeData=Ip,Oe.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",wo),Oe.lang=Cp,D("X",0,0,"unix"),D("x",0,0,"valueOf"),H("x",On),H("X",uo),Ne("X",function(i,u,d){d._d=new Date(parseFloat(i)*1e3)}),Ne("x",function(i,u,d){d._d=new Date(de(i))});return e.version="2.29.4",t(ze),e.fn=F,e.min=r0,e.max=n0,e.now=s0,e.utc=T,e.unix=A1,e.months=C1,e.isDate=f,e.locale=Mn,e.invalid=q,e.duration=Er,e.isMoment=ve,e.weekdays=F1,e.parseZone=N1,e.localeData=Xr,e.isDuration=yo,e.monthsShort=I1,e.weekdaysMin=Y1,e.defineLocale=hl,e.updateLocale=Nw,e.locales=Cw,e.weekdaysShort=L1,e.normalizeUnits=yt,e.relativeTimeRounding=fk,e.relativeTimeThreshold=hk,e.calendarFormat=R0,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var KT=O((nY,bu)=>{var MT,RT,PT,xT,AT,NT,CT,IT,FT,_u,vh,LT,YT,UT,ai,WT,qT,jT,$T,BT,GT,HT,zT,VT,Tu;(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 bu=="object"&&typeof bu.exports=="object"?r(t(e,t(bu.exports))):r(t(e));function t(n,s){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=s?s(a,o):o}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])};MT=function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function a(){this.constructor=n}n.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)},RT=Object.assign||function(n){for(var s,a=1,o=arguments.length;a<o;a++){s=arguments[a];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(n[l]=s[l])}return n},PT=function(n,s){var a={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.indexOf(o)<0&&(a[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(n);l<o.length;l++)s.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(n,o[l])&&(a[o[l]]=n[o[l]]);return a},xT=function(n,s,a,o){var l=arguments.length,c=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,a):o,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,s,a,o);else for(var m=n.length-1;m>=0;m--)(f=n[m])&&(c=(l<3?f(c):l>3?f(s,a,c):f(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},AT=function(n,s){return function(a,o){s(a,o,n)}},NT=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},CT=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(f){f(c)})}return new(a||(a=Promise))(function(c,f){function m(E){try{T(o.next(E))}catch(v){f(v)}}function g(E){try{T(o.throw(E))}catch(v){f(v)}}function T(E){E.done?c(E.value):l(E.value).then(m,g)}T((o=o.apply(n,s||[])).next())})},IT=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,f;return f={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function m(T){return function(E){return g([T,E])}}function g(T){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,l&&(c=T[0]&2?l.return:T[0]?l.throw||((c=l.return)&&c.call(l),0):l.next)&&!(c=c.call(l,T[1])).done)return c;switch(l=0,c&&(T=[T[0]&2,c.value]),T[0]){case 0:case 1:c=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,l=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(c=a.trys,!(c=c.length>0&&c[c.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!c||T[1]>c[0]&&T[1]<c[3])){a.label=T[1];break}if(T[0]===6&&a.label<c[1]){a.label=c[1],c=T;break}if(c&&a.label<c[2]){a.label=c[2],a.ops.push(T);break}c[2]&&a.ops.pop(),a.trys.pop();continue}T=s.call(n,a)}catch(E){T=[6,E],l=0}finally{o=c=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},FT=function(n,s){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&Tu(s,n,a)},Tu=Object.create?function(n,s,a,o){o===void 0&&(o=a);var l=Object.getOwnPropertyDescriptor(s,a);(!l||("get"in l?!s.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(n,o,l)}:function(n,s,a,o){o===void 0&&(o=a),n[o]=s[a]},_u=function(n){var s=typeof Symbol=="function"&&Symbol.iterator,a=s&&n[s],o=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},vh=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],f;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(m){f={error:m}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(f)throw f.error}}return c},LT=function(){for(var n=[],s=0;s<arguments.length;s++)n=n.concat(vh(arguments[s]));return n},YT=function(){for(var n=0,s=0,a=arguments.length;s<a;s++)n+=arguments[s].length;for(var o=Array(n),l=0,s=0;s<a;s++)for(var c=arguments[s],f=0,m=c.length;f<m;f++,l++)o[l]=c[f];return o},UT=function(n,s,a){if(a||arguments.length===2)for(var o=0,l=s.length,c;o<l;o++)(c||!(o in s))&&(c||(c=Array.prototype.slice.call(s,0,o)),c[o]=s[o]);return n.concat(c||Array.prototype.slice.call(s))},ai=function(n){return this instanceof ai?(this.v=n,this):new ai(n)},WT=function(n,s,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=a.apply(n,s||[]),l,c=[];return l={},f("next"),f("throw"),f("return"),l[Symbol.asyncIterator]=function(){return this},l;function f(R){o[R]&&(l[R]=function(C){return new Promise(function(q,$){c.push([R,C,q,$])>1||m(R,C)})})}function m(R,C){try{g(o[R](C))}catch(q){v(c[0][3],q)}}function g(R){R.value instanceof ai?Promise.resolve(R.value.v).then(T,E):v(c[0][2],R)}function T(R){m("next",R)}function E(R){m("throw",R)}function v(R,C){R(C),c.shift(),c.length&&m(c[0][0],c[0][1])}},qT=function(n){var s,a;return s={},o("next"),o("throw",function(l){throw l}),o("return"),s[Symbol.iterator]=function(){return this},s;function o(l,c){s[l]=n[l]?function(f){return(a=!a)?{value:ai(n[l](f)),done:l==="return"}:c?c(f):f}:c}},jT=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=n[Symbol.asyncIterator],a;return s?s.call(n):(n=typeof _u=="function"?_u(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(c){a[c]=n[c]&&function(f){return new Promise(function(m,g){f=n[c](f),l(m,g,f.done,f.value)})}}function l(c,f,m,g){Promise.resolve(g).then(function(T){c({value:T,done:m})},f)}},$T=function(n,s){return Object.defineProperty?Object.defineProperty(n,"raw",{value:s}):n.raw=s,n};var t=Object.create?function(n,s){Object.defineProperty(n,"default",{enumerable:!0,value:s})}:function(n,s){n.default=s};BT=function(n){if(n&&n.__esModule)return n;var s={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&Tu(s,n,a);return t(s,n),s},GT=function(n){return n&&n.__esModule?n:{default:n}},HT=function(n,s,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!o:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:s.get(n)},zT=function(n,s,a,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!l:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(n,a):l?l.value=a:s.set(n,a),a},VT=function(n,s){if(s===null||typeof s!="object"&&typeof s!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?s===n:n.has(s)},r("__extends",MT),r("__assign",RT),r("__rest",PT),r("__decorate",xT),r("__param",AT),r("__metadata",NT),r("__awaiter",CT),r("__generator",IT),r("__exportStar",FT),r("__createBinding",Tu),r("__values",_u),r("__read",vh),r("__spread",LT),r("__spreadArrays",YT),r("__spreadArray",UT),r("__await",ai),r("__asyncGenerator",WT),r("__asyncDelegator",qT),r("__asyncValues",jT),r("__makeTemplateObject",$T),r("__importStar",BT),r("__importDefault",GT),r("__classPrivateFieldGet",HT),r("__classPrivateFieldSet",zT),r("__classPrivateFieldIn",VT)})});var Cb=O((Ab,Nb)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",o=typeof Reflect=="object",l=typeof setImmediate=="function",c=l?setImmediate:setTimeout,f=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var _=Object.getOwnPropertyNames(y);return _.push.apply(_,Object.getOwnPropertySymbols(y)),_}:Object.keys;function m(){this._events={},this._conf&&g.call(this,this._conf)}function g(y){y&&(this._conf=y,y.delimiter&&(this.delimiter=y.delimiter),y.maxListeners!==r&&(this._maxListeners=y.maxListeners),y.wildcard&&(this.wildcard=y.wildcard),y.newListener&&(this._newListener=y.newListener),y.removeListener&&(this._removeListener=y.removeListener),y.verboseMemoryLeak&&(this.verboseMemoryLeak=y.verboseMemoryLeak),y.ignoreErrors&&(this.ignoreErrors=y.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function T(y,_){var w="(node) warning: possible EventEmitter memory leak detected. "+y+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+_+"."),typeof process!="undefined"&&process.emitWarning){var k=new Error(w);k.name="MaxListenersExceededWarning",k.emitter=this,k.count=y,process.emitWarning(k)}else console.error(w),console.trace&&console.trace()}var E=function(y,_,w){var k=arguments.length;switch(k){case 0:return[];case 1:return[y];case 2:return[y,_];case 3:return[y,_,w];default:for(var S=new Array(k);k--;)S[k]=arguments[k];return S}};function v(y,_){for(var w={},k,S=y.length,M=_?_.length:0,D=0;D<S;D++)k=y[D],w[k]=D<M?_[D]:r;return w}function R(y,_,w){this._emitter=y,this._target=_,this._listeners={},this._listenersCount=0;var k,S;if((w.on||w.off)&&(k=w.on,S=w.off),_.addEventListener?(k=_.addEventListener,S=_.removeEventListener):_.addListener?(k=_.addListener,S=_.removeListener):_.on&&(k=_.on,S=_.off),!k&&!S)throw Error("target does not implement any known event API");if(typeof k!="function")throw TypeError("on method must be a function");if(typeof S!="function")throw TypeError("off method must be a function");this._on=k,this._off=S;var M=y._observers;M?M.push(this):y._observers=[this]}Object.assign(R.prototype,{subscribe:function(y,_,w){var k=this,S=this._target,M=this._emitter,D=this._listeners,I=function(){var A=E.apply(null,arguments),N={data:A,name:_,original:y};if(w){var j=w.call(S,N);j!==!1&&M.emit.apply(M,[N.name].concat(A));return}M.emit.apply(M,[_].concat(A))};if(D[y])throw Error("Event '"+y+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!k._onNewListener?(this._onNewListener=function(A){A===_&&D[y]===null&&(D[y]=I,k._on.call(S,y,I))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(A){A===_&&!M.hasListeners(A)&&D[y]&&(D[y]=null,k._off.call(S,y,I))},D[y]=null,M.on("removeListener",this._onRemoveListener)):(D[y]=I,k._on.call(S,y,I))},unsubscribe:function(y){var _=this,w=this._listeners,k=this._emitter,S,M,D=this._off,I=this._target,A;if(y&&typeof y!="string")throw TypeError("event must be a string");function N(){_._onNewListener&&(k.off("newListener",_._onNewListener),k.off("removeListener",_._onRemoveListener),_._onNewListener=null,_._onRemoveListener=null);var j=ve.call(k,_);k._observers.splice(j,1)}if(y){if(S=w[y],!S)return;D.call(I,y,S),delete w[y],--this._listenersCount||N()}else{for(M=f(w),A=M.length;A-- >0;)y=M[A],D.call(I,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function C(y,_,w,k){var S=Object.assign({},_);if(!y)return S;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),D=M.length,I,A,N;function j(ye){throw Error('Invalid "'+I+'" option value'+(ye?". Reason: "+ye:""))}for(var De=0;De<D;De++){if(I=M[De],!k&&!e.call(_,I))throw Error('Unknown "'+I+'" option');A=y[I],A!==r&&(N=w[I],S[I]=N?N(A,j):A)}return S}function q(y,_){return(typeof y!="function"||!y.hasOwnProperty("prototype"))&&_("value must be a constructor"),y}function $(y){var _="value must be type of "+y.join("|"),w=y.length,k=y[0],S=y[1];return w===1?function(M,D){if(typeof M===k)return M;D(_)}:w===2?function(M,D){var I=typeof M;if(I===k||I===S)return M;D(_)}:function(M,D){for(var I=typeof M,A=w;A-- >0;)if(I===y[A])return M;D(_)}}var B=$(["function"]),me=$(["object","function"]);function fe(y,_,w){var k,S,M=0,D,I=new y(function(A,N,j){w=C(w,{timeout:0,overload:!1},{timeout:function(Fe,K){return Fe*=1,(typeof Fe!="number"||Fe<0||!Number.isFinite(Fe))&&K("timeout must be a positive number"),Fe}}),k=!w.overload&&typeof y.prototype.cancel=="function"&&typeof j=="function";function De(){S&&(S=null),M&&(clearTimeout(M),M=0)}var ye=function(Fe){De(),A(Fe)},ce=function(Fe){De(),N(Fe)};k?_(ye,ce,j):(S=[function(Fe){ce(Fe||Error("canceled"))}],_(ye,ce,function(Fe){if(D)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Fe!="function")throw TypeError("onCancel callback must be a function");S.push(Fe)}),D=!0),w.timeout>0&&(M=setTimeout(function(){var Fe=Error("timeout");Fe.code="ETIMEDOUT",M=0,I.cancel(Fe),N(Fe)},w.timeout))});return k||(I.cancel=function(A){if(!!S){for(var N=S.length,j=1;j<N;j++)S[j](A);S[0](A),S=null}}),I}function ve(y){var _=this._observers;if(!_)return-1;for(var w=_.length,k=0;k<w;k++)if(_[k]._target===y)return k;return-1}function ee(y,_,w,k,S){if(!w)return null;if(k===0){var M=typeof _;if(M==="string"){var D,I,A=0,N=0,j=this.delimiter,De=j.length;if((I=_.indexOf(j))!==-1){D=new Array(5);do D[A++]=_.slice(N,I),N=I+De;while((I=_.indexOf(j,N))!==-1);D[A++]=_.slice(N),_=D,S=A}else _=[_],S=1}else M==="object"?S=_.length:(_=[_],S=1)}var ye=null,ce,Fe,K,qe,Je,Ze=_[k],Dr=_[k+1],Ot,Ae;if(k===S)w._listeners&&(typeof w._listeners=="function"?(y&&y.push(w._listeners),ye=[w]):(y&&y.push.apply(y,w._listeners),ye=[w]));else if(Ze==="*"){for(Ot=f(w),I=Ot.length;I-- >0;)ce=Ot[I],ce!=="_listeners"&&(Ae=ee(y,_,w[ce],k+1,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae));return ye}else if(Ze==="**"){for(Je=k+1===S||k+2===S&&Dr==="*",Je&&w._listeners&&(ye=ee(y,_,w,S,S)),Ot=f(w),I=Ot.length;I-- >0;)ce=Ot[I],ce!=="_listeners"&&(ce==="*"||ce==="**"?(w[ce]._listeners&&!Je&&(Ae=ee(y,_,w[ce],S,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae)),Ae=ee(y,_,w[ce],k,S)):ce===Dr?Ae=ee(y,_,w[ce],k+2,S):Ae=ee(y,_,w[ce],k,S),Ae&&(ye?ye.push.apply(ye,Ae):ye=Ae));return ye}else w[Ze]&&(ye=ee(y,_,w[Ze],k+1,S));if(Fe=w["*"],Fe&&ee(y,_,Fe,k+1,S),K=w["**"],K)if(k<S)for(K._listeners&&ee(y,_,K,S,S),Ot=f(K),I=Ot.length;I-- >0;)ce=Ot[I],ce!=="_listeners"&&(ce===Dr?ee(y,_,K[ce],k+2,S):ce===Ze?ee(y,_,K[ce],k+1,S):(qe={},qe[ce]=K[ce],ee(y,_,{"**":qe},k+1,S)));else K._listeners?ee(y,_,K,S,S):K["*"]&&K["*"]._listeners&&ee(y,_,K["*"],S,S);return ye}function te(y,_,w){var k=0,S=0,M,D=this.delimiter,I=D.length,A;if(typeof y=="string")if((M=y.indexOf(D))!==-1){A=new Array(5);do A[k++]=y.slice(S,M),S=M+I;while((M=y.indexOf(D,S))!==-1);A[k++]=y.slice(S)}else A=[y],k=1;else A=y,k=y.length;if(k>1){for(M=0;M+1<k;M++)if(A[M]==="**"&&A[M+1]==="**")return}var N=this.listenerTree,j;for(M=0;M<k;M++)if(j=A[M],N=N[j]||(N[j]={}),M===k-1)return N._listeners?(typeof N._listeners=="function"&&(N._listeners=[N._listeners]),w?N._listeners.unshift(_):N._listeners.push(_),!N._listeners.warned&&this._maxListeners>0&&N._listeners.length>this._maxListeners&&(N._listeners.warned=!0,T.call(this,N._listeners.length,j))):N._listeners=_,!0;return!0}function Ct(y,_,w,k){for(var S=f(y),M=S.length,D,I,A,N=y._listeners,j;M-- >0;)I=S[M],D=y[I],I==="_listeners"?A=w:A=w?w.concat(I):[I],j=k||typeof I=="symbol",N&&_.push(j?A:A.join(this.delimiter)),typeof D=="object"&&Ct.call(this,D,_,A,j);return _}function mt(y){for(var _=f(y),w=_.length,k,S,M;w-- >0;)S=_[w],k=y[S],k&&(M=!0,S!=="_listeners"&&!mt(k)&&delete y[S]);return M}function V(y,_,w){this.emitter=y,this.event=_,this.listener=w}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function W(y,_,w){if(w===!0)S=!0;else if(w===!1)k=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var k=w.async,S=w.promisify,M=w.nextTick,D=w.objectify}if(k||M||S){var I=_,A=_._origin||_;if(M&&!s)throw Error("process.nextTick is not supported");S===r&&(S=_.constructor.name==="AsyncFunction"),_=function(){var N=arguments,j=this,De=this.event;return S?M?Promise.resolve():new Promise(function(ye){c(ye)}).then(function(){return j.event=De,I.apply(j,N)}):(M?process.nextTick:c)(function(){j.event=De,I.apply(j,N)})},_._async=!0,_._origin=A}return[_,D?new V(this,y,_):this]}function x(y){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,g.call(this,y)}x.EventEmitter2=x,x.prototype.listenTo=function(y,_,w){if(typeof y!="object")throw TypeError("target musts be an object");var k=this;w=C(w,{on:r,off:r,reducers:r},{on:B,off:B,reducers:me});function S(M){if(typeof M!="object")throw TypeError("events must be an object");var D=w.reducers,I=ve.call(k,y),A;I===-1?A=new R(k,y,w):A=k._observers[I];for(var N=f(M),j=N.length,De,ye=typeof D=="function",ce=0;ce<j;ce++)De=N[ce],A.subscribe(De,M[De]||De,ye?D:D&&D[De])}return t(_)?S(v(_)):S(typeof _=="string"?v(_.split(/\s+/)):_),this},x.prototype.stopListeningTo=function(y,_){var w=this._observers;if(!w)return!1;var k=w.length,S,M=!1;if(y&&typeof y!="object")throw TypeError("target should be an object");for(;k-- >0;)S=w[k],(!y||S._target===y)&&(S.unsubscribe(_),M=!0);return M},x.prototype.delimiter=".",x.prototype.setMaxListeners=function(y){y!==r&&(this._maxListeners=y,this._conf||(this._conf={}),this._conf.maxListeners=y)},x.prototype.getMaxListeners=function(){return this._maxListeners},x.prototype.event="",x.prototype.once=function(y,_,w){return this._once(y,_,!1,w)},x.prototype.prependOnceListener=function(y,_,w){return this._once(y,_,!0,w)},x.prototype._once=function(y,_,w,k){return this._many(y,1,_,w,k)},x.prototype.many=function(y,_,w,k){return this._many(y,_,w,!1,k)},x.prototype.prependMany=function(y,_,w,k){return this._many(y,_,w,!0,k)},x.prototype._many=function(y,_,w,k,S){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function D(){return--_===0&&M.off(y,D),w.apply(this,arguments)}return D._origin=w,this._on(y,D,k,S)},x.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],_,w=this.wildcard,k,S,M,D,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(w&&(_=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(S=y.length,a){for(M=0;M<S;M++)if(typeof y[M]=="symbol"){I=!0;break}}I||(y=y.join(this.delimiter))}var A=arguments.length,N;if(this._all&&this._all.length)for(N=this._all.slice(),M=0,S=N.length;M<S;M++)switch(this.event=y,A){case 1:N[M].call(this,y);break;case 2:N[M].call(this,y,arguments[1]);break;case 3:N[M].call(this,y,arguments[1],arguments[2]);break;default:N[M].apply(this,arguments)}if(w)N=[],ee.call(this,N,_,this.listenerTree,0,S);else if(N=this._events[y],typeof N=="function"){switch(this.event=y,A){case 1:N.call(this);break;case 2:N.call(this,arguments[1]);break;case 3:N.call(this,arguments[1],arguments[2]);break;default:for(k=new Array(A-1),D=1;D<A;D++)k[D-1]=arguments[D];N.apply(this,k)}return!0}else N&&(N=N.slice());if(N&&N.length){if(A>3)for(k=new Array(A-1),D=1;D<A;D++)k[D-1]=arguments[D];for(M=0,S=N.length;M<S;M++)switch(this.event=y,A){case 1:N[M].call(this);break;case 2:N[M].call(this,arguments[1]);break;case 3:N[M].call(this,arguments[1],arguments[2]);break;default:N[M].apply(this,k)}return!0}else if(!this.ignoreErrors&&!this._all&&y==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},x.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],_=this.wildcard,w,k,S,M,D,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(_&&(w=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(M=y.length,a){for(D=0;D<M;D++)if(typeof y[D]=="symbol"){k=!0;break}}k||(y=y.join(this.delimiter))}var A=[],N=arguments.length,j;if(this._all)for(D=0,M=this._all.length;D<M;D++)switch(this.event=y,N){case 1:A.push(this._all[D].call(this,y));break;case 2:A.push(this._all[D].call(this,y,arguments[1]));break;case 3:A.push(this._all[D].call(this,y,arguments[1],arguments[2]));break;default:A.push(this._all[D].apply(this,arguments))}if(_?(j=[],ee.call(this,j,w,this.listenerTree,0)):j=this._events[y],typeof j=="function")switch(this.event=y,N){case 1:A.push(j.call(this));break;case 2:A.push(j.call(this,arguments[1]));break;case 3:A.push(j.call(this,arguments[1],arguments[2]));break;default:for(S=new Array(N-1),I=1;I<N;I++)S[I-1]=arguments[I];A.push(j.apply(this,S))}else if(j&&j.length){if(j=j.slice(),N>3)for(S=new Array(N-1),I=1;I<N;I++)S[I-1]=arguments[I];for(D=0,M=j.length;D<M;D++)switch(this.event=y,N){case 1:A.push(j[D].call(this));break;case 2:A.push(j[D].call(this,arguments[1]));break;case 3:A.push(j[D].call(this,arguments[1],arguments[2]));break;default:A.push(j[D].apply(this,S))}}else if(!this.ignoreErrors&&!this._all&&y==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(A)},x.prototype.on=function(y,_,w){return this._on(y,_,!1,w)},x.prototype.prependListener=function(y,_,w){return this._on(y,_,!0,w)},x.prototype.onAny=function(y){return this._onAny(y,!1)},x.prototype.prependAny=function(y){return this._onAny(y,!0)},x.prototype.addListener=x.prototype.on,x.prototype._onAny=function(y,_){if(typeof y!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),_?this._all.unshift(y):this._all.push(y),this},x.prototype._on=function(y,_,w,k){if(typeof y=="function")return this._onAny(y,_),this;if(typeof _!="function")throw new Error("on only accepts instances of Function");this._events||m.call(this);var S=this,M;return k!==r&&(M=W.call(this,y,_,k),_=M[0],S=M[1]),this._newListener&&this.emit("newListener",y,_),this.wildcard?(te.call(this,y,_,w),S):(this._events[y]?(typeof this._events[y]=="function"&&(this._events[y]=[this._events[y]]),w?this._events[y].unshift(_):this._events[y].push(_),!this._events[y].warned&&this._maxListeners>0&&this._events[y].length>this._maxListeners&&(this._events[y].warned=!0,T.call(this,this._events[y].length,y))):this._events[y]=_,S)},x.prototype.off=function(y,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var w,k=[];if(this.wildcard){var S=typeof y=="string"?y.split(this.delimiter):y.slice();if(k=ee.call(this,null,S,this.listenerTree,0),!k)return this}else{if(!this._events[y])return this;w=this._events[y],k.push({_listeners:w})}for(var M=0;M<k.length;M++){var D=k[M];if(w=D._listeners,t(w)){for(var I=-1,A=0,N=w.length;A<N;A++)if(w[A]===_||w[A].listener&&w[A].listener===_||w[A]._origin&&w[A]._origin===_){I=A;break}if(I<0)continue;return this.wildcard?D._listeners.splice(I,1):this._events[y].splice(I,1),w.length===0&&(this.wildcard?delete D._listeners:delete this._events[y]),this._removeListener&&this.emit("removeListener",y,_),this}else(w===_||w.listener&&w.listener===_||w._origin&&w._origin===_)&&(this.wildcard?delete D._listeners:delete this._events[y],this._removeListener&&this.emit("removeListener",y,_))}return this.listenerTree&&mt(this.listenerTree),this},x.prototype.offAny=function(y){var _=0,w=0,k;if(y&&this._all&&this._all.length>0){for(k=this._all,_=0,w=k.length;_<w;_++)if(y===k[_])return k.splice(_,1),this._removeListener&&this.emit("removeListenerAny",y),this}else{if(k=this._all,this._removeListener)for(_=0,w=k.length;_<w;_++)this.emit("removeListenerAny",k[_]);this._all=[]}return this},x.prototype.removeListener=x.prototype.off,x.prototype.removeAllListeners=function(y){if(y===r)return!this._events||m.call(this),this;if(this.wildcard){var _=ee.call(this,null,y,this.listenerTree,0),w,k;if(!_)return this;for(k=0;k<_.length;k++)w=_[k],w._listeners=null;this.listenerTree&&mt(this.listenerTree)}else this._events&&(this._events[y]=null);return this},x.prototype.listeners=function(y){var _=this._events,w,k,S,M,D;if(y===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!_)return[];for(w=f(_),M=w.length,S=[];M-- >0;)k=_[w[M]],typeof k=="function"?S.push(k):S.push.apply(S,k);return S}else{if(this.wildcard){if(D=this.listenerTree,!D)return[];var I=[],A=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,I,A,D,0),I}return _?(k=_[y],k?typeof k=="function"?[k]:k:[]):[]}},x.prototype.eventNames=function(y){var _=this._events;return this.wildcard?Ct.call(this,this.listenerTree,[],null,y):_?f(_):[]},x.prototype.listenerCount=function(y){return this.listeners(y).length},x.prototype.hasListeners=function(y){if(this.wildcard){var _=[],w=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,_,w,this.listenerTree,0),_.length>0}var k=this._events,S=this._all;return!!(S&&S.length||k&&(y===r?f(k).length:k[y]))},x.prototype.listenersAny=function(){return this._all?this._all:[]},x.prototype.waitFor=function(y,_){var w=this,k=typeof _;return k==="number"?_={timeout:_}:k==="function"&&(_={filter:_}),_=C(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:B,Promise:q}),fe(_.Promise,function(S,M,D){function I(){var A=_.filter;if(!(A&&!A.apply(w,arguments)))if(w.off(y,I),_.handleError){var N=arguments[0];N?M(N):S(E.apply(null,arguments).slice(1))}else S(E.apply(null,arguments))}D(function(){w.off(y,I)}),w._on(y,I,!1)},{timeout:_.timeout,overload:_.overload})};function Q(y,_,w){w=C(w,{Promise,timeout:0,overload:!1},{Promise:q});var k=w.Promise;return fe(k,function(S,M,D){var I;if(typeof y.addEventListener=="function"){I=function(){S(E.apply(null,arguments))},D(function(){y.removeEventListener(_,I)}),y.addEventListener(_,I,{once:!0});return}var A=function(){N&&y.removeListener("error",N),S(E.apply(null,arguments))},N;_!=="error"&&(N=function(j){y.removeListener(_,A),M(j)},y.once("error",N)),D(function(){N&&y.removeListener("error",N),y.removeListener(_,A)}),y.once(_,A)},{timeout:w.timeout,overload:w.overload})}var Y=x.prototype;if(Object.defineProperties(x,{defaultMaxListeners:{get:function(){return Y._maxListeners},set:function(y){if(typeof y!="number"||y<0||Number.isNaN(y))throw TypeError("n must be a non-negative number");Y._maxListeners=y},enumerable:!0},once:{value:Q,writable:!0,configurable:!0}}),Object.defineProperties(Y,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return x});else if(typeof Ab=="object")Nb.exports=x;else{var ue=new Function("","return this")();ue.EventEmitter2=x}})()});var Hr=O(zn=>{"use strict";zn.__esModule=!0;var iF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(iF=zn.Operators||(zn.Operators={}));var aF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(aF=zn.StructuralCharacters||(zn.StructuralCharacters={}));var oF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(oF=zn.Tokens||(zn.Tokens={}))});var Xh=O(Bu=>{"use strict";Bu.__esModule=!0;var rt=Hr();Bu.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Bu.VALID_TOKENS={identifierOnly:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS},{name:rt.Tokens.OPERATOR,value:rt.Operators.NOT}],binaryOperator:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR}],binaryOperatorOrClose:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Qh=O(_n=>{"use strict";_n.__esModule=!0;var vi=Hr();_n.STRUCTURAL_CHARACTERS={"(":vi.StructuralCharacters.OPEN_PARENTHESIS,")":vi.StructuralCharacters.CLOSE_PARENTHESIS};_n.OPERATORS={AND:vi.Operators.AND,OR:vi.Operators.OR,XOR:vi.Operators.XOR,NOT:vi.Operators.NOT};_n.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));_n.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);_n.COMMENT_DELIMITER=String.fromCodePoint(35);_n.EOL=String.fromCodePoint(10);_n.ESCAPE_CHARACTER=String.fromCodePoint(92)});var hv=O(Tn=>{"use strict";var Jh=Tn&&Tn.__assign||function(){return Jh=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}return r},Jh.apply(this,arguments)};Tn.__esModule=!0;var fv=Hr(),Ms=Qh();Tn.createResult=function(r,e,t){return{token:Jh({name:r},e!==null?{value:e}:{}),remainingString:t}};Tn.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Ms.EOL){e=t;break}}return Tn.createResult(fv.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};Tn.getQuotedIdentifier=function(r){for(var e=!1,t="",n=null,s=0;s<r.length;s+=1){var a=r[s];if(n===null)a===Ms.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Ms.QUOTED_IDENTIFIER_DELIMITER:n=s:(a===Ms.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=a);else{if(!Ms.SEPARATORS.has(a)&&!Ms.STRUCTURAL_CHARACTERS[a])throw new Error("Unexpected character: "+a+" Expected ) character or separator");break}}if(n===null)throw new Error("Unexpected end of expression: expected "+Ms.QUOTED_IDENTIFIER_DELIMITER+" character");return Tn.createResult(fv.Tokens.IDENTIFIER,t,r.slice(n+1))}});var pv=O(ep=>{"use strict";ep.__esModule=!0;var wi=Hr(),or=Qh(),ki=hv();ep.lex=function(r){for(var e=null,t=null,n=null,s=0;s<r.length;s+=1){var a=r[s];if(e===null){if(!or.SEPARATORS.has(a)){var o=or.STRUCTURAL_CHARACTERS[a];if(o){var l=r[s+1];if(o===wi.StructuralCharacters.CLOSE_PARENTHESIS&&l&&!or.SEPARATORS.has(l)&&l!==wi.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+l+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return ki.createResult(wi.Tokens.STRUCTURAL_CHARACTER,or.STRUCTURAL_CHARACTERS[a],r.slice(s+1))}if(a===or.QUOTED_IDENTIFIER_DELIMITER)return ki.getQuotedIdentifier(r.slice(s+1));if(a===or.COMMENT_DELIMITER)return ki.getComment(r.slice(s+1));e=s}}else if(or.SEPARATORS.has(a)||or.STRUCTURAL_CHARACTERS[a]){t=s,n=a;break}else if(a===or.QUOTED_IDENTIFIER_DELIMITER||a===or.COMMENT_DELIMITER)throw new Error("Unexpected character: "+a)}if(e!==null){t=t!=null?t:r.length;var c=r.slice(e,t),f=r.slice(t);if(or.OPERATORS[c]){if(n&&!or.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return ki.createResult(wi.Tokens.OPERATOR,or.OPERATORS[c],f)}else return ki.createResult(wi.Tokens.IDENTIFIER,c,f)}return ki.createResult(wi.Tokens.EOF,null,"")}});var mv=O(bn=>{"use strict";var uF=bn&&bn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};bn.__esModule=!0;var lF=pv(),Di=Hr(),Gu=Xh();bn.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var s=lF.lex(e),a=s.token,o=s.remainingString;if(e=o,a.name!==Di.Tokens.COMMENT)return bn.validateToken(a,t,n),a}}};bn.getValue=function(r,e){var t=r(Gu.VALID_TOKENS.identifierOrNot),n=t.value===Di.Operators.NOT;n&&(t=r(Gu.VALID_TOKENS.identifierOnly));var s=t.name===Di.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?uF(s,[{name:Di.Tokens.OPERATOR,value:Di.Operators.NOT}]):s};bn.previousOperatorTakesPrecedent=function(r,e){return Gu.OPERATOR_PRECEDENCE[r]<=Gu.OPERATOR_PRECEDENCE[e]};bn.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===Di.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,s=e;n<s.length;n++){var a=s[n];if(a.name===r.name&&(!a.value||a.value===r.value))return}throw new TypeError("Invalid token")}});var rp=O(ro=>{"use strict";var Ei=ro&&ro.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};ro.__esModule=!0;var yv=Hr(),gv=Xh(),Hu=mv();ro.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=Hu.newTokenGenerator(r);return tp(e)};var tp=function(r,e){e===void 0&&(e=!1);for(var t=Ei(Hu.getValue(r,tp)),n=[];;){var s=e?gv.VALID_TOKENS.binaryOperatorOrClose:gv.VALID_TOKENS.binaryOperator,a=r(s,!e);if(a.name===yv.Tokens.EOF||a.name===yv.Tokens.STRUCTURAL_CHARACTER)return Ei(t,Ei(n).reverse());for(;n.length;){var o=n[n.length-1]||null;if(o&&Hu.previousOperatorTakesPrecedent(o.value,a.value))t=Ei(t,[o]),n=n.slice(0,-1);else break}n=Ei(n,[a]),t=Ei(t,Hu.getValue(r,tp))}}});var np=O(vn=>{"use strict";vn.__esModule=!0;var _v=Hr();vn.andUtil=function(r,e){return r&&e};vn.orUtil=function(r,e){return r||e};vn.xorUtil=function(r,e){return r!==e};vn.notUtil=function(r){return!r};vn.isIdentifier=function(r){var e=r.name,t=r.value;return e===_v.Tokens.IDENTIFIER&&typeof t=="string"};vn.isOperator=function(r){var e=r.name,t=r.value;return e===_v.Tokens.OPERATOR&&typeof t=="string"};vn.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var Tv=O(ap=>{"use strict";var no;ap.__esModule=!0;var sp=Hr(),ip=np();ap.OPERATOR_MAP=(no={},no[sp.Operators.AND]=ip.andUtil,no[sp.Operators.OR]=ip.orUtil,no[sp.Operators.XOR]=ip.xorUtil,no)});var vv=O(Ps=>{"use strict";var op=Ps&&Ps.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};Ps.__esModule=!0;var cF=rp(),bv=Hr(),dF=Tv(),Rs=np();Ps.getEvaluator=function(r){var e=cF.parse(r);return function(t){return Ps.evaluate(e,t)}};Ps.evaluate=function(r,e){if(!Array.isArray(r))throw new Error(r+" should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator");var t=r.reduce(function(n,s,a){if(!(s&&(Rs.isIdentifier(s)||Rs.isOperator(s))))throw new Error("Invalid token: "+s+". Found in parsed expression at index "+a);if(s.name===bv.Tokens.IDENTIFIER)return op(n,[Boolean(e[s.value])]);var o=n[n.length-2],l=n[n.length-1];if(s.value===bv.Operators.NOT)return l===void 0&&Rs.throwInvalidExpression("missing identifier"),op(n.slice(0,-1),[Rs.notUtil(l)]);(l===void 0||o===void 0)&&Rs.throwInvalidExpression("missing identifier");var c=dF.OPERATOR_MAP[s.value];return c||Rs.throwInvalidExpression("unknown operator"),op(n.slice(0,-2),[c(o,l)])},[]);return t.length!==1&&Rs.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var kv=O(so=>{"use strict";so.__esModule=!0;var wv=vv();so.getEvaluator=wv.getEvaluator;so.evaluate=wv.evaluate;var fF=rp();so.parse=fF.parse});var gF={};wk(gF,{default:()=>ll});module.exports=kk(gF);var Uv=require("obsidian");var di=require("obsidian");var TF=new Error("timeout while waiting for mutex to become available"),bF=new Error("mutex already locked"),Dk=new Error("request for lock canceled"),Ek=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{f(n.next(m))}catch(g){o(g)}}function c(m){try{f(n.throw(m))}catch(g){o(g)}}function f(m){m.done?a(m.value):s(m.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},Ol=class{constructor(e,t=Dk){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return Ek(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let s=this._value,a=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(a)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},Sk=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(m){try{f(n.next(m))}catch(g){o(g)}}function c(m){try{f(n.throw(m))}catch(g){o(g)}}function f(m){m.done?a(m.value):s(m.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},ko=class{constructor(e){this._semaphore=new Ol(1,e)}acquire(){return Sk(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.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var mu=ns(ht()),si=ns(Th()),ms=class{static parseDate(e,t=!1){return window.moment(mu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e){let t=mu.parse(e,void 0,{forwardDate:!0});if(t.length===0)return[si.default.invalid(),si.default.invalid()];let n=t[0].start,s=t[1]&&t[1].start?t[1].start:n,a=window.moment(n.date()),o=window.moment(s.date()),l=[a,o];o.isBefore(a)&&(l=[o,a]);let c=/(last|this|next) (week|month|quarter|year)/,f=e.match(c);if(f&&f.length===3){let m=f[1],g=si.default.duration(),T=f[2];switch(T){case"month":case"quarter":case"year":case"week":g.add(1,T)}switch(l=[(0,si.default)(),(0,si.default)()],m){case"last":l.forEach(E=>E.subtract(g));break;case"next":l.forEach(E=>E.add(g));break}switch(T){case"month":case"quarter":case"year":l=[l[0].startOf(T),l[1].endOf(T)];break;case"week":l=[l[0].startOf("isoWeek"),l[1].endOf("isoWeek")];break}}return l.forEach(m=>m.startOf("day")),l}};var BC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function ii(r){for(let[e,t]of Object.entries(BC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var yu=["MO","TU","WE","TH","FR","SA","SU"],ct=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(yu.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=yu[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 He=function(r){return r!=null},sr=function(r){return typeof r=="number"},bh=function(r){return typeof r=="string"&&yu.includes(r)},At=Array.isArray,vr=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 ke=function(r,e){var t=0,n=[];if(At(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},ST=function(r){return At(r)?r:[r]};function ys(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+=ke(t,e/t.length)),t.slice(0,e)+String(n))}var OT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Ft=function(r,e){var t=r%e;return t*e<0?t+e:t},gu=function(r,e){return{div:Math.floor(r/e),mod:Ft(r,e)}},ir=function(r){return!He(r)||r.length===0},it=function(r){return!ir(r)},Ee=function(r,e){return it(r)&&r.indexOf(e)!==-1};var Yn;(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),s=t.getTime()-r.tzOffset(t),a=n-s;return Math.round(a/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[ys(n.getUTCFullYear().toString(),4,"0"),ys(n.getUTCMonth()+1,2,"0"),ys(n.getUTCDate(),2,"0"),"T",ys(n.getUTCHours(),2,"0"),ys(n.getUTCMinutes(),2,"0"),ys(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: ".concat(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))}})(Yn||(Yn={}));var ie=Yn;var GC=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}(),fn=GC;var ZT=ns(KT(),1),{__extends:oi,__assign:Bt,__rest:sY,__decorate:iY,__param:aY,__metadata:oY,__awaiter:uY,__generator:lY,__exportStar:cY,__createBinding:dY,__values:fY,__read:hY,__spread:pY,__spreadArrays:mY,__spreadArray:U,__await:yY,__asyncGenerator:gY,__asyncDelegator:_Y,__asyncValues:TY,__makeTemplateObject:bY,__importStar:vY,__importDefault:wY,__classPrivateFieldGet:kY,__classPrivateFieldSet:DY,__classPrivateFieldIn:EY}=ZT.default;var HC=function(r){oi(e,r);function e(t,n,s){var a=r.call(this,t,n)||this;return a.iterator=s,a}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(fn),wh=HC;var zC={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}},gs=zC;var XT=function(r,e){return r.indexOf(e)!==-1},VC=function(r){return r.toString()},KC=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},ZC=function(){function r(e,t,n,s){if(t===void 0&&(t=VC),n===void 0&&(n=gs),s===void 0&&(s=KC),this.text=[],this.language=n||gs,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(m,g){return m-g}),o.sort(function(m,g){return g-m}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(He(this.origOptions.byweekday)){var l=At(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(m){return!m.n}),someWeeks:l.filter(function(m){return Boolean(m.n)}),isWeekdays:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")===-1&&c.indexOf("SU")===-1,isEveryDay:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")!==-1&&c.indexOf("SU")!==-1};var f=function(m,g){return m.weekday-g.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),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(XT(["dtstart","wkst","freq"],n))return!0;if(!XT(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[X.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=this.gettext;if(e===-1)return n("last");var s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+n("st");break;case 2:case 22:t=s+n("nd");break;case 3:case 23:t=s+n("rd");break;default:t=s+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=sr(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,s){var a=this;s===void 0&&(s=","),At(e)||(e=[e]);var o=function(c,f,m){for(var g="",T=0;T<c.length;T++)T!==0&&(T===c.length-1?g+=" "+m+" ":g+=f+" "),g+=c[T];return g};t=t||function(c){return c.toString()};var l=function(c){return t&&t.call(a,c)};return n?o(e.map(l),s,n):e.map(l).join(s+" ")},r}(),jr=ZC;var XC=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;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var s in this.rules){n=this.rules[s];var a=n.exec(this.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 Ya(r,e){e===void 0&&(e=gs);var t={},n=new XC(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var T=n.acceptNumber();if(T&&(t.interval=parseInt(T[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=X.DAILY,n.nextSymbol()&&(o(),g());break;case"weekday(s)":t.freq=X.WEEKLY,t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR],n.nextSymbol(),g();break;case"week(s)":t.freq=X.WEEKLY,n.nextSymbol()&&(a(),g());break;case"hour(s)":t.freq=X.HOURLY,n.nextSymbol()&&(a(),g());break;case"minute(s)":t.freq=X.MINUTELY,n.nextSymbol()&&(a(),g());break;case"month(s)":t.freq=X.MONTHLY,n.nextSymbol()&&(a(),g());break;case"year(s)":t.freq=X.YEARLY,n.nextSymbol()&&(a(),g());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=X.WEEKLY;var E=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[E]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var v=c();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(X[v]),n.nextSymbol()}m(),g();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=X.YEARLY,t.bymonth=[l()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var R=l();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(R),n.nextSymbol()}a(),g();break;default:throw new Error("Unknown symbol")}}function a(){var T=n.accept("on"),E=n.accept("the");if(!!(T||E))do{var v=f(),R=c(),C=l();if(v)R?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R].nth(v))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(v),n.accept("day(s)"));else if(R)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var q=n.acceptNumber();if(!q)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(q[0],10)];n.accept("comma");){if(q=n.acceptNumber(),!q)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(q[0],10))}}else if(C)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(C);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var T=n.accept("at");if(!!T)do{var E=n.acceptNumber();if(!E)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(E[0],10)];n.accept("comma");){if(E=n.acceptNumber(),!E)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(E[0],10))}}while(n.accept("comma")||n.accept("at"))}function l(){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 c(){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 f(){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 T=parseInt(n.value[1],10);if(T<-366||T>366)throw new Error("Nth out of range: "+T);return n.nextSymbol(),n.accept("last")?-T:T;default:return!1}}function m(){n.accept("on"),n.accept("the");var T=f();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=f(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(T),n.nextSymbol()}}function g(){if(n.symbol==="until"){var T=Date.parse(n.text);if(!T)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(T)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var be;(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"})(be||(be={}));function Ua(r){return r<be.HOURLY}var QT=function(r,e){return e===void 0&&(e=gs),new X(Ya(r,e)||void 0)},ui=["count","until","interval","byweekday","bymonthday","bymonth"];jr.IMPLEMENTED=[];jr.IMPLEMENTED[be.HOURLY]=ui;jr.IMPLEMENTED[be.MINUTELY]=ui;jr.IMPLEMENTED[be.DAILY]=["byhour"].concat(ui);jr.IMPLEMENTED[be.WEEKLY]=ui;jr.IMPLEMENTED[be.MONTHLY]=ui;jr.IMPLEMENTED[be.YEARLY]=["byweekno","byyearday"].concat(ui);var JT=function(r,e,t,n){return new jr(r,e,t,n).toString()},eb=jr.isFullyConvertible;var li=function(){function r(e,t,n,s){this.hour=e,this.minute=t,this.second=n,this.millisecond=s||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 tb=function(r){oi(e,r);function e(t,n,s,a,o,l,c){var f=r.call(this,a,o,l,c)||this;return f.year=t,f.month=n,f.day=s,f}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 Yn.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),s=Ft(this.month,12);this.month=s,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,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=gu(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),ir(s)||Ee(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var o=gu(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(ir(s)||Ee(s,this.hour))&&(ir(a)||Ee(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var l=gu(this.second,60),c=l.div,f=l.mod;if(c&&(this.second=f,this.addMinutes(c,!1,s,a)),(ir(s)||Ee(s,this.hour))&&(ir(a)||Ee(a,this.minute))&&(ir(o)||Ee(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Yn.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>Yn.MAXYEAR))return;t=Yn.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,a=t.interval,o=t.wkst,l=t.byhour,c=t.byminute,f=t.bysecond;switch(s){case be.YEARLY:return this.addYears(a);case be.MONTHLY:return this.addMonths(a);case be.WEEKLY:return this.addWeekly(a,o);case be.DAILY:return this.addDaily(a);case be.HOURLY:return this.addHours(a,n,l);case be.MINUTELY:return this.addMinutes(a,n,l,c);case be.SECONDLY:return this.addSeconds(a,n,l,c,f)}},e}(li);function kh(r){for(var e=[],t=Object.keys(r),n=0,s=t;n<s.length;n++){var a=s[n];Ee(sb,a)||e.push(a),ie.isDate(r[a])&&!ie.isValidDate(r[a])&&e.push(a)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return Bt({},r)}function rb(r){var e=Bt(Bt({},Wa),kh(r));if(He(e.byeaster)&&(e.freq=X.YEARLY),!(He(e.freq)&&X.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(r.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),He(e.wkst)?sr(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=X.MO.weekday,He(e.bysetpos)){sr(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)||it(e.byweekno)||it(e.byyearday)||Boolean(e.bymonthday)||it(e.bymonthday)||He(e.byweekday)||He(e.byeaster)))switch(e.freq){case X.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case X.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case X.WEEKLY:e.byweekday=[ie.getWeekday(e.dtstart)];break}if(He(e.bymonth)&&!At(e.bymonth)&&(e.bymonth=[e.bymonth]),He(e.byyearday)&&!At(e.byyearday)&&sr(e.byyearday)&&(e.byyearday=[e.byyearday]),!He(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(At(e.bymonthday)){for(var s=[],a=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?s.push(n):n<0&&a.push(n)}e.bymonthday=s,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(He(e.byweekno)&&!At(e.byweekno)&&(e.byweekno=[e.byweekno]),!He(e.byweekday))e.bynweekday=null;else if(sr(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(bh(e.byweekday))e.byweekday=[ct.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof ct)!e.byweekday.n||e.freq>X.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var o=[],l=[],t=0;t<e.byweekday.length;t++){var c=e.byweekday[t];if(sr(c)){o.push(c);continue}else if(bh(c)){o.push(ct.fromStr(c).weekday);continue}!c.n||e.freq>X.MONTHLY?o.push(c.weekday):l.push([c.weekday,c.n])}e.byweekday=it(o)?o:null,e.bynweekday=it(l)?l:null}return He(e.byhour)?sr(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<X.HOURLY?[e.dtstart.getUTCHours()]:null,He(e.byminute)?sr(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<X.MINUTELY?[e.dtstart.getUTCMinutes()]:null,He(e.bysecond)?sr(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<X.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function nb(r){var e=r.dtstart.getTime()%1e3;if(!Ua(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(s){r.bysecond.forEach(function(a){t.push(new li(n,s,a,e))})})}),t}function ja(r){var e=r.split(`
|
|
|
`).map(QC).filter(function(t){return t!==null});return Bt(Bt({},e[0]),e[1])}function qa(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],s=t[2];return n&&(e.tzid=n),e.dtstart=ie.untilStringToDate(s),e}function QC(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return ib(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return ib(r);case"DTSTART":return qa(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function ib(r){var e=r.replace(/^RRULE:/i,""),t=qa(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(s){var a=s.split("="),o=a[0],l=a[1];switch(o.toUpperCase()){case"FREQ":t.freq=be[l.toUpperCase()];break;case"WKST":t.wkst=wr[l.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var c=JC(l),f=o.toLowerCase();t[f]=c;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=eI(l);break;case"DTSTART":case"TZID":var m=qa(r);t.tzid=m.tzid,t.dtstart=m.dtstart;break;case"UNTIL":t.until=ie.untilStringToDate(l);break;case"BYEASTER":t.byeaster=Number(l);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),t}function JC(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(ab)}return ab(r)}function ab(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function eI(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return wr[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var s=Number(n[1]),a=n[2],o=wr[a].weekday;return new ct(o,s)})}var _s=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=ie.timeToUntilString(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),s=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid)!==null&&e!==void 0?e:"UTC"})),a=s.getTime()-n.getTime();return new Date(this.date.getTime()-a)},r}();function $a(r){for(var e=[],t="",n=Object.keys(r),s=Object.keys(Wa),a=0;a<n.length;a++)if(n[a]!=="tzid"&&!!Ee(s,n[a])){var o=n[a].toUpperCase(),l=r[n[a]],c="";if(!(!He(l)||At(l)&&!l.length)){switch(o){case"FREQ":c=X.FREQUENCIES[r.freq];break;case"WKST":sr(l)?c=new ct(l).toString():c=l.toString();break;case"BYWEEKDAY":o="BYDAY",c=ST(l).map(function(E){return E instanceof ct?E:At(E)?new ct(E[0],E[1]):new ct(E)}).toString();break;case"DTSTART":t=tI(l,r.tzid);break;case"UNTIL":c=ie.timeToUntilString(l,!r.tzid);break;default:if(At(l)){for(var f=[],m=0;m<l.length;m++)f[m]=String(l[m]);c=f.toString()}else c=String(l)}c&&e.push([o,c])}}var g=e.map(function(E){var v=E[0],R=E[1];return"".concat(v,"=").concat(R.toString())}).join(";"),T="";return g!==""&&(T="RRULE:".concat(g)),[t,T].filter(function(E){return!!E}).join(`
|
|
|
`)}function tI(r,e){return r?"DTSTART"+new _s(new Date(r),e).toString():""}function rI(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 ob=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?ie.clone(t):ie.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,s=t?Object.keys(t):[],a=function(m){for(var g=0;g<s.length;g++){var T=s[g];if(!rI(t[T],m[T]))return!0}return!1},o=this[e];if(e==="all")n=this.all;else if(At(o))for(var l=0;l<o.length;l++){var c=o[l];if(!(s.length&&a(c))){n=c._value;break}}if(!n&&this.all){for(var f=new fn(e,t),l=0;l<this.all.length&&f.accept(this.all[l]);l++);n=f.getValue(),this._cacheAdd(e,n,t)}return At(n)?ie.cloneDates(n):n instanceof Date?ie.clone(n):n},r}();var ub=U(U(U(U(U(U(U(U(U(U(U(U(U([],ke(1,31),!0),ke(2,28),!0),ke(3,31),!0),ke(4,30),!0),ke(5,31),!0),ke(6,30),!0),ke(7,31),!0),ke(8,31),!0),ke(9,30),!0),ke(10,31),!0),ke(11,30),!0),ke(12,31),!0),ke(1,7),!0),lb=U(U(U(U(U(U(U(U(U(U(U(U(U([],ke(1,31),!0),ke(2,29),!0),ke(3,31),!0),ke(4,30),!0),ke(5,31),!0),ke(6,30),!0),ke(7,31),!0),ke(8,31),!0),ke(9,30),!0),ke(10,31),!0),ke(11,30),!0),ke(12,31),!0),ke(1,7),!0),nI=vr(1,29),sI=vr(1,30),Un=vr(1,31),Lt=vr(1,32),cb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Lt,!0),sI,!0),Lt,!0),Un,!0),Lt,!0),Un,!0),Lt,!0),Lt,!0),Un,!0),Lt,!0),Un,!0),Lt,!0),Lt.slice(0,7),!0),db=U(U(U(U(U(U(U(U(U(U(U(U(U([],Lt,!0),nI,!0),Lt,!0),Un,!0),Lt,!0),Un,!0),Lt,!0),Lt,!0),Un,!0),Lt,!0),Un,!0),Lt,!0),Lt.slice(0,7),!0),iI=vr(-28,0),aI=vr(-29,0),Wn=vr(-30,0),Yt=vr(-31,0),fb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),aI,!0),Yt,!0),Wn,!0),Yt,!0),Wn,!0),Yt,!0),Yt,!0),Wn,!0),Yt,!0),Wn,!0),Yt,!0),Yt.slice(0,7),!0),hb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),iI,!0),Yt,!0),Wn,!0),Yt,!0),Wn,!0),Yt,!0),Yt,!0),Wn,!0),Yt,!0),Wn,!0),Yt,!0),Yt.slice(0,7),!0),pb=[0,31,60,91,121,152,182,213,244,274,305,335,366],mb=[0,31,59,90,120,151,181,212,243,273,304,334,365],Dh=function(){for(var r=[],e=0;e<55;e++)r=r.concat(vr(7));return r}();function yb(r,e){var t=new Date(Date.UTC(r,0,1)),n=ie.isLeapYear(r)?366:365,s=ie.isLeapYear(r+1)?366:365,a=ie.toOrdinal(t),o=ie.getWeekday(t),l=Bt(Bt({yearlen:n,nextyearlen:s,yearordinal:a,yearweekday:o},oI(r)),{wnomask:null});if(ir(e.byweekno))return l;l.wnomask=ke(0,n+7);var c,f,m=c=Ft(7-o+e.wkst,7);m>=4?(m=0,f=l.yearlen+Ft(o-e.wkst,7)):f=n-m;for(var g=Math.floor(f/7),T=Ft(f,7),E=Math.floor(g+T/4),v=0;v<e.byweekno.length;v++){var R=e.byweekno[v];if(R<0&&(R+=E+1),R>0&&R<=E){var C=void 0;R>1?(C=m+(R-1)*7,m!==c&&(C-=7-c)):C=m;for(var q=0;q<7&&(l.wnomask[C]=1,C++,l.wdaymask[C]!==e.wkst);q++);}}if(Ee(e.byweekno,1)){var C=m+E*7;if(m!==c&&(C-=7-c),C<n)for(var v=0;v<7&&(l.wnomask[C]=1,C+=1,l.wdaymask[C]!==e.wkst);v++);}if(m){var $=void 0;if(Ee(e.byweekno,-1))$=-1;else{var B=ie.getWeekday(new Date(Date.UTC(r-1,0,1))),me=Ft(7-B.valueOf()+e.wkst,7),fe=ie.isLeapYear(r-1)?366:365,ve=void 0;me>=4?(me=0,ve=fe+Ft(B-e.wkst,7)):ve=n-m,$=Math.floor(52+Ft(ve,7)/4)}if(Ee(e.byweekno,$))for(var C=0;C<m;C++)l.wnomask[C]=1}return l}function oI(r){var e=ie.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=ie.getWeekday(t);return e===365?{mmask:ub,mdaymask:db,nmdaymask:hb,wdaymask:Dh.slice(n),mrange:mb}:{mmask:lb,mdaymask:cb,nmdaymask:fb,wdaymask:Dh.slice(n),mrange:pb}}function gb(r,e,t,n,s,a){var o={lastyear:r,lastmonth:e,nwdaymask:[]},l=[];if(a.freq===X.YEARLY)if(ir(a.bymonth))l=[[0,t]];else for(var c=0;c<a.bymonth.length;c++)e=a.bymonth[c],l.push(n.slice(e-1,e+1));else a.freq===X.MONTHLY&&(l=[n.slice(e-1,e+1)]);if(ir(l))return o;o.nwdaymask=ke(0,t);for(var c=0;c<l.length;c++)for(var f=l[c],m=f[0],g=f[1]-1,T=0;T<a.bynweekday.length;T++){var E=void 0,v=a.bynweekday[T],R=v[0],C=v[1];C<0?(E=g+(C+1)*7,E-=Ft(s[E]-R,7)):(E=m+(C-1)*7,E+=Ft(7-s[E]+R,7)),m<=E&&E<=g&&(o.nwdaymask[E]=1)}return o}function _b(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),s=r%100,a=Math.floor(n/4),o=n%4,l=Math.floor((n+8)/25),c=Math.floor((n-l+1)/3),f=Math.floor(19*t+n-a-c+15)%30,m=Math.floor(s/4),g=s%4,T=Math.floor(32+2*o+2*m-f-g)%7,E=Math.floor((t+11*f+22*T)/451),v=Math.floor((f+T-7*E+114)/31),R=(f+T-7*E+114)%31+1,C=Date.UTC(r,v-1,R+e),q=Date.UTC(r,0,1);return[Math.ceil((C-q)/(1e3*60*60*24))]}var uI=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=yb(e,n)),it(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var s=this.yearinfo,a=s.yearlen,o=s.mrange,l=s.wdaymask;this.monthinfo=gb(e,t,a,o,l,n)}He(n.byeaster)&&(this.eastermask=_b(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),r.prototype.ydayset=function(){return[vr(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],s=this.mrange[t],a=ke(null,this.yearlen),o=n;o<s;o++)a[o]=o;return[a,n,s]},r.prototype.wdayset=function(e,t,n){for(var s=ke(null,this.yearlen+7),a=ie.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,o=a,l=0;l<7&&(s[a]=a,++a,this.wdaymask[a]!==this.options.wkst);l++);return[s,o,a]},r.prototype.ddayset=function(e,t,n){var s=ke(null,this.yearlen),a=ie.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return s[a]=a,[s,a,a+1]},r.prototype.htimeset=function(e,t,n,s){var a=this,o=[];return this.options.byminute.forEach(function(l){o=o.concat(a.mtimeset(e,l,n,s))}),ie.sort(o),o},r.prototype.mtimeset=function(e,t,n,s){var a=this.options.bysecond.map(function(o){return new li(e,t,o,s)});return ie.sort(a),a},r.prototype.stimeset=function(e,t,n,s){return[new li(e,t,n,s)]},r.prototype.getdayset=function(e){switch(e){case be.YEARLY:return this.ydayset.bind(this);case be.MONTHLY:return this.mdayset.bind(this);case be.WEEKLY:return this.wdayset.bind(this);case be.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case be.HOURLY:return this.htimeset.bind(this);case be.MINUTELY:return this.mtimeset.bind(this);case be.SECONDLY:return this.stimeset.bind(this)}},r}(),Tb=uI;function bb(r,e,t,n,s,a){for(var o=[],l=0;l<r.length;l++){var c=void 0,f=void 0,m=r[l];m<0?(c=Math.floor(m/e.length),f=Ft(m,e.length)):(c=Math.floor((m-1)/e.length),f=Ft(m-1,e.length));for(var g=[],T=t;T<n;T++){var E=a[T];!He(E)||g.push(E)}var v=void 0;c<0?v=g.slice(c)[0]:v=g[c];var R=e[f],C=ie.fromOrdinal(s.yearordinal+v),q=ie.combine(C,R);Ee(o,q)||o.push(q)}return ie.sort(o),o}function vu(r,e){var t=e.dtstart,n=e.freq,s=e.interval,a=e.until,o=e.bysetpos,l=e.count;if(l===0||s===0)return hn(r);var c=tb.fromDate(t),f=new Tb(e);f.rebuild(c.year,c.month);for(var m=dI(f,c,e);;){var g=f.getdayset(n)(c.year,c.month,c.day),T=g[0],E=g[1],v=g[2],R=cI(T,E,v,f,e);if(it(o))for(var C=bb(o,m,E,v,f,T),q=0;q<C.length;q++){var $=C[q];if(a&&$>a)return hn(r);if($>=t){var B=vb($,e);if(!r.accept(B)||l&&(--l,!l))return hn(r)}}else for(var q=E;q<v;q++){var me=T[q];if(!!He(me))for(var fe=ie.fromOrdinal(f.yearordinal+me),ve=0;ve<m.length;ve++){var ee=m[ve],$=ie.combine(fe,ee);if(a&&$>a)return hn(r);if($>=t){var B=vb($,e);if(!r.accept(B)||l&&(--l,!l))return hn(r)}}}if(e.interval===0||(c.add(e,R),c.year>ie.MAXYEAR))return hn(r);Ua(n)||(m=f.gettimeset(n)(c.hour,c.minute,c.second,0)),f.rebuild(c.year,c.month)}}function lI(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,f=t.byyearday;return it(n)&&!Ee(n,r.mmask[e])||it(s)&&!r.wnomask[e]||it(a)&&!Ee(a,r.wdaymask[e])||it(r.nwdaymask)&&!r.nwdaymask[e]||o!==null&&!Ee(r.eastermask,e)||(it(l)||it(c))&&!Ee(l,r.mdaymask[e])&&!Ee(c,r.nmdaymask[e])||it(f)&&(e<r.yearlen&&!Ee(f,e+1)&&!Ee(f,-r.yearlen+e)||e>=r.yearlen&&!Ee(f,e+1-r.yearlen)&&!Ee(f,-r.nextyearlen+e-r.yearlen))}function vb(r,e){return new _s(r,e.tzid).rezonedDate()}function hn(r){return r.getValue()}function cI(r,e,t,n,s){for(var a=!1,o=e;o<t;o++){var l=r[o];a=lI(n,l,s),a&&(r[l]=null)}return a}function dI(r,e,t){var n=t.freq,s=t.byhour,a=t.byminute,o=t.bysecond;return Ua(n)?nb(t):n>=X.HOURLY&&it(s)&&!Ee(s,e.hour)||n>=X.MINUTELY&&it(a)&&!Ee(a,e.minute)||n>=X.SECONDLY&&it(o)&&!Ee(o,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var wr={MO:new ct(0),TU:new ct(1),WE:new ct(2),TH:new ct(3),FR:new ct(4),SA:new ct(5),SU:new ct(6)},Wa={freq:be.YEARLY,dtstart:null,interval:1,wkst:wr.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},sb=Object.keys(Wa),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new ob,this.origOptions=kh(e);var n=rb(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ya(e,t)},r.fromText=function(e,t){return QT(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return vu(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 wh("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new fn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!ie.isValidDate(e)||!ie.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(s)return this._iter(new wh("between",a,s));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new fn("between",a)),this._cacheAdd("between",o,a)),o},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!ie.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new fn("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!ie.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new fn("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return $a(this.origOptions)},r.prototype.toText=function(e,t,n){return JT(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return eb(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=be.YEARLY,r.MONTHLY=be.MONTHLY,r.WEEKLY=be.WEEKLY,r.DAILY=be.DAILY,r.HOURLY=be.HOURLY,r.MINUTELY=be.MINUTELY,r.SECONDLY=be.SECONDLY,r.MO=wr.MO,r.TU=wr.TU,r.WE=wr.WE,r.TH=wr.TH,r.FR=wr.FR,r.SA=wr.SA,r.SU=wr.SU,r.parseString=ja,r.optionsToString=$a,r}();function wb(r,e,t,n,s,a){var o={},l=r.accept;function c(T,E){t.forEach(function(v){v.between(T,E,!0).forEach(function(R){o[Number(R)]=!0})})}s.forEach(function(T){var E=new _s(T,a).rezonedDate();o[Number(E)]=!0}),r.accept=function(T){var E=Number(T);return isNaN(E)?l.call(this,T):!o[E]&&(c(new Date(E-1),new Date(E+1)),!o[E])?(o[E]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var E=Number(T);return o[E]?!0:(o[E]=!0,l.call(this,T))});for(var f=0;f<n.length;f++){var m=new _s(n[f],a).rezonedDate();if(!r.accept(new Date(m.getTime())))break}e.forEach(function(T){vu(r,T.options)});var g=r._result;switch(ie.sort(g),r.method){case"all":case"between":return g;case"before":return g.length&&g[g.length-1]||null;case"after":default:return g.length&&g[0]||null}}var kb={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function fI(r,e){var t=[],n=[],s=[],a=[],o=qa(r),l=o.dtstart,c=o.tzid,f=gI(r,e.unfold);return f.forEach(function(m){var g;if(!!m){var T=yI(m),E=T.name,v=T.parms,R=T.value;switch(E.toUpperCase()){case"RRULE":if(v.length)throw new Error("unsupported RRULE parm: ".concat(v.join(",")));t.push(ja(m));break;case"RDATE":var C=(g=/RDATE(?:;TZID=([^:=]+))?/i.exec(m))!==null&&g!==void 0?g:[],q=C[1];q&&!c&&(c=q),n=n.concat(Db(R,v));break;case"EXRULE":if(v.length)throw new Error("unsupported EXRULE parm: ".concat(v.join(",")));s.push(ja(R));break;case"EXDATE":a=a.concat(Db(R,v));break;case"DTSTART":break;default:throw new Error("unsupported property: "+E)}}}),{dtstart:l,tzid:c,rrulevals:t,rdatevals:n,exrulevals:s,exdatevals:a}}function hI(r,e){var t=fI(r,e),n=t.rrulevals,s=t.rdatevals,a=t.exrulevals,o=t.exdatevals,l=t.dtstart,c=t.tzid,f=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||s.length||a.length||o.length){var m=new Sh(f);return m.dtstart(l),m.tzid(c||void 0),n.forEach(function(T){m.rrule(new X(Eh(T,l,c),f))}),s.forEach(function(T){m.rdate(T)}),a.forEach(function(T){m.exrule(new X(Eh(T,l,c),f))}),o.forEach(function(T){m.exdate(T)}),e.compatible&&e.dtstart&&m.rdate(l),m}var g=n[0]||{};return new X(Eh(g,g.dtstart||e.dtstart||l,g.tzid||e.tzid||c),f)}function wu(r,e){return e===void 0&&(e={}),hI(r,pI(e))}function Eh(r,e,t){return Bt(Bt({},r),{dtstart:e,tzid:t})}function pI(r){var e=[],t=Object.keys(r),n=Object.keys(kb);if(t.forEach(function(s){Ee(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Bt(Bt({},kb),r)}function mI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=OT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function yI(r){var e=mI(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function gI(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 s=t[n]=t[n].replace(/\s+$/g,"");s?n>0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function _I(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Db(r,e){return _I(e),r.split(",").map(function(t){return ie.untilStringToDate(t)})}function Eb(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;n<e._rrule.length;n++){var s=e._rrule[n].origOptions[r];if(s)return s}}}var Sh=function(r){oi(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Eb.apply(n,["dtstart"]),n.tzid=Eb.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return wb(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Sb(t,this._rrule)},e.prototype.exrule=function(t){Sb(t,this._exrule)},e.prototype.rdate=function(t){Ob(t,this._rdate)},e.prototype.exdate=function(t){Ob(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return wu(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return wu(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($a({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(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(Mb("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(Mb("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}(X);function Sb(r,e){if(!(r instanceof X))throw new TypeError(String(r)+" is not RRule instance");Ee(e.map(String),String(r))||e.push(r)}function Ob(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");Ee(e.map(Number),Number(r))||(e.push(r),ie.sort(e))}function Mb(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),a=e.map(function(o){return ie.timeToUntilString(o.valueOf(),n)}).join(",");return"".concat(s).concat(a)}function $r(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?-1:!r.isValid()&&e.isValid()||r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var Et=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:a,dueDate:o}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=a,this.dueDate=o}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let a=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(a==null)return null;let o=a[1].trim(),l=a[2]!==void 0,c=X.parseText(o);if(c!==null){let f=null;s?f=window.moment(s):n?f=window.moment(n):t&&(f=window.moment(t)),!l&&f!==null?c.dtstart=window.moment(f).startOf("day").utc(!0).toDate():c.dtstart=window.moment().startOf("day").utc(!0).toDate();let m=new X(c);return new Et({rrule:m,baseOnToday:l,referenceDate:f,startDate:t,scheduledDate:n,dueDate:s})}}catch(a){}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(),s=new X(er(Ce({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),s)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,s=null,a=null;if(this.referenceDate){if(this.startDate){let o=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(o.asDays()),"days")}if(this.scheduledDate){let o=window.moment.duration(this.scheduledDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(o.asDays()),"days")}if(this.dueDate){let o=window.moment.duration(this.dueDate.diff(this.referenceDate));a=window.moment(e),a.add(Math.round(o.asDays()),"days")}}return{startDate:n,scheduledDate:s,dueDate:a}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||$r(this.startDate,e.startDate)!==0||$r(this.scheduledDate,e.scheduledDate)!==0||$r(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),s=this.toText(),a=s.match(/every( \d+)? month(s)?(.*)?/);a!==null&&(s.includes(" on ")||(n=Et.nextAfterMonths(e,n,t,a[1])));let o=s.match(/every( \d+)? year(s)?(.*)?/);return o!==null&&(n=Et.nextAfterYears(e,n,t,o[1])),Et.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Et.isSkippingTooManyMonths(e,t,a);)t=Et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));Et.isSkippingTooManyYears(e,t,a);)t=Et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new X(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Rb(r){let e=`${r.startDateSymbol}${r.scheduledDateSymbol}${r.dueDateSymbol}`;return(t,n,s)=>{let a=[];a=a.concat(bI(t,n,s,e)),a=a.concat(vI(t,n,s,r.recurrenceSymbol));let o=TI(t,s,r),l=Oh(t,/([a-zA-Z'_-]*)/g,n),c=!1;if(l&&l.length>0){let f=l[0];if(f.length>=Math.max(1,s.autoSuggestMinMatch)){let m=o.filter(g=>g.displayText.toLowerCase().includes(f.toLowerCase()));for(let g of m)a.push({suggestionType:"match",displayText:g.displayText,appendText:g.appendText,insertAt:l.index,insertSkip:f.length}),c=!0}}return!c&&s.autoSuggestMinMatch===0&&(a=a.concat(o)),a.length>0&&!a.some(f=>f.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
|
|
|
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function TI(r,e,t){let n=a=>Object.values(t.prioritySymbols).some(o=>o.length>0&&a.includes(o)),s=[];return r.includes(t.dueDateSymbol)||s.push({displayText:`${t.dueDateSymbol} due date`,appendText:`${t.dueDateSymbol} `}),r.includes(t.startDateSymbol)||s.push({displayText:`${t.startDateSymbol} start date`,appendText:`${t.startDateSymbol} `}),r.includes(t.scheduledDateSymbol)||s.push({displayText:`${t.scheduledDateSymbol} scheduled date`,appendText:`${t.scheduledDateSymbol} `}),n(r)||(s.push({displayText:`${t.prioritySymbols.High} high priority`,appendText:`${t.prioritySymbols.High} `}),s.push({displayText:`${t.prioritySymbols.Medium} medium priority`,appendText:`${t.prioritySymbols.Medium} `}),s.push({displayText:`${t.prioritySymbols.Low} low priority`,appendText:`${t.prioritySymbols.Low} `})),r.includes(t.recurrenceSymbol)||s.push({displayText:`${t.recurrenceSymbol} recurring (repeat)`,appendText:`${t.recurrenceSymbol} `}),s}function bI(r,e,t,n){let s=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`([${n}])\\s*([0-9a-zA-Z ]*)`,"ug"),l=Oh(r,o,e);if(l&&l.length>=2){let c=l[1],f=l[2];if(f.length<t.autoSuggestMinMatch)return[];let m=f&&f.length>1?ms.parseDate(ii(f),!0):null;m&&m.isValid()&&a.push({displayText:`${m.format(ae.dateFormat)}`,appendText:`${c} ${m.format(ae.dateFormat)} `,insertAt:l.index,insertSkip:l[0].length});let g=1,T=5,E=s.filter(v=>f&&f.length>=g&&v.toLowerCase().includes(f.toLowerCase())).slice(0,T);E.length===0&&(E=s.slice(0,T));for(let v of E){let C=`${ms.parseDate(v,!0).format(ae.dateFormat)}`;a.push({suggestionType:"match",displayText:`${v} (${C})`,appendText:`${c} ${C} `,insertAt:l.index,insertSkip:l[0].length})}}return a}function vI(r,e,t,n){var c;let s=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),l=Oh(r,o,e);if(l&&l.length>=2){let f=l[1],m=l[2];if(m.length<t.autoSuggestMinMatch)return[];if(m.length>0){let v=(c=Et.fromText({recurrenceRuleText:m,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:c.toText();if(v){let R=`${f} ${v} `;if(a.push({suggestionType:"match",displayText:`\u2705 ${v}`,appendText:R,insertAt:l.index,insertSkip:l[0].length}),l[0]==R)return[]}}let g=1,T=t.autoSuggestMaxItems/2,E=s.filter(v=>m&&m.length>=g&&v.toLowerCase().includes(m.toLowerCase())).slice(0,T);E.length===0&&m.trim().length===0&&(E=s.slice(0,T));for(let v of E)a.push({suggestionType:"match",displayText:`${v}`,appendText:`${f} ${v} `,insertAt:l.index,insertSkip:l[0].length})}return a}function Oh(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s;return[]}var Ba=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},qn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenComponents=[];this.specificClasses=[];e?this.options=e:this.options=new Ba,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(s,a,o)=>a?(this.specificClasses.push(`tasks-layout-hide-${o}`),this.hiddenComponents.push(o),s.filter(l=>l!=o)):s,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideCreatedDate,"createdDate"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),e.shortMode&&this.specificClasses.push("tasks-layout-short-mode"),n}};var Mh={prioritySymbols:{High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([⏫🔼🔽])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Ga=class{constructor(e){this.symbols=e}serialize(e){let t=new qn,n="";for(let s of t.layoutComponents)n+=this.componentToString(e,t,s);return n}componentToString(e,t,n){var g;let{prioritySymbols:s,startDateSymbol:a,createdDateSymbol:o,scheduledDateSymbol:l,doneDateSymbol:c,recurrenceSymbol:f,dueDateSymbol:m}=this.symbols;switch(n){case"description":return e.description;case"priority":{let T="";return e.priority==="1"?T=" "+s.High:e.priority==="2"?T=" "+s.Medium:e.priority==="4"&&(T=" "+s.Low),T}case"startDate":return e.startDate?t.options.shortMode?" "+a:` ${a} ${e.startDate.format(ae.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+o:` ${o} ${e.createdDate.format(ae.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+l:` ${l} ${e.scheduledDate.format(ae.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+c:` ${c} ${e.doneDate.format(ae.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+m:` ${m} ${e.dueDate.format(ae.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+f:` ${f} ${e.recurrence.toText()}`:"";case"blockLink":return(g=e.blockLink)!=null?g:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}deserialize(e){let{prioritySymbols:t,TaskFormatRegularExpressions:n}=this.symbols,s,a="3",o=null,l=null,c=null,f=null,m=null,g="",T=null,E="",v=20,R=0;do{s=!1;let C=e.match(n.priorityRegex);if(C!==null){switch(C[1]){case t.Low:a="4";break;case t.Medium:a="2";break;case t.High:a="1";break}e=e.replace(n.priorityRegex,"").trim(),s=!0}let q=e.match(n.doneDateRegex);q!==null&&(f=window.moment(q[1],ae.dateFormat),e=e.replace(n.doneDateRegex,"").trim(),s=!0);let $=e.match(n.dueDateRegex);$!==null&&(c=window.moment($[1],ae.dateFormat),e=e.replace(n.dueDateRegex,"").trim(),s=!0);let B=e.match(n.scheduledDateRegex);B!==null&&(l=window.moment(B[1],ae.dateFormat),e=e.replace(n.scheduledDateRegex,"").trim(),s=!0);let me=e.match(n.startDateRegex);me!==null&&(o=window.moment(me[1],ae.dateFormat),e=e.replace(n.startDateRegex,"").trim(),s=!0);let fe=e.match(n.createdDateRegex);fe!==null&&(m=window.moment(fe[1],ae.dateFormat),e=e.replace(n.createdDateRegex,"").trim(),s=!0);let ve=e.match(n.recurrenceRegex);ve!==null&&(g=ve[1].trim(),e=e.replace(n.recurrenceRegex,"").trim(),s=!0);let ee=e.match(ae.hashTagsFromEnd);if(ee!=null){e=e.replace(ae.hashTagsFromEnd,"").trim(),s=!0;let te=ee[0].trim();E=E.length>0?[te,E].join(" "):te}R++}while(s&&R<=v);return g.length>0&&(T=Et.fromText({recurrenceRuleText:g,startDate:o,scheduledDate:l,dueDate:c})),E.length>0&&(e+=" "+E),{description:e,priority:a,startDate:o,createdDate:m,scheduledDate:l,dueDate:c,doneDate:f,recurrence:T,tags:$e.extractHashtags(e)}}};var kr=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(kr||{}),St=class{constructor(e,t,n,s,a="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=a}};var Zt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Zt(new St("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Zt(new St("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Zt(new St(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Zt(new St("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Zt(new St("/","In Progress","x",!0,"IN_PROGRESS"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return kr[e]||"TODO"}static createUnknownStatus(e){return new Zt(new St(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Zt.getTypeFromStatusTypeString(e[3]);return new Zt(new St(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return Zt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},pe=Zt;pe.DONE=Zt.makeDone(),pe.EMPTY=Zt.makeEmpty(),pe.TODO=Zt.makeTodo();var ku=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var pt=class{constructor(){this.coreStatuses=[pe.makeTodo().configuration,pe.makeDone().configuration],this.customStatuses=[pe.makeInProgress().configuration,pe.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new pe(e);return t.findIndex(s=>new pe(s).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){pt.deleteAllCustomStatuses(e),new pt().customStatuses.forEach(n=>{pt.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(o=>o.symbol==s[0]&&o.name==s[1]&&o.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):pt.addStatus(e.customStatuses,pe.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var Pb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Br=class{constructor(e,t,n,s,a,o){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=a;this.stable=o}static get values(){let e=[];return Pb.forEach(t=>{e=[...e,new Br(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Br.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Br.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var ci={tasksPluginEmoji:{displayName:"Default",taskSerializer:new Ga(Mh),buildSuggestions:Rb(Mh)}},kI={globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],statusSettings:new pt,features:Br.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new ku},jn=Ce({},kI),se=()=>{for(let r in Br.settingsFlags)jn.features[r]===void 0&&(jn.features[r]=Br.settingsFlags[r]);return jn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=pe.getTypeFromStatusTypeString(r.type);t[e]=new St((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Ce({},jn)},Gt=r=>(jn=Ce(Ce({},jn),r),se());var Ts=(r,e)=>(jn.generalSettings[r]=e,se()),xb=r=>{var e;return(e=jn.features[r])!=null?e:!1};function za(){return ci[se().taskFormat]}var Be=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==pe.EMPTY.symbol)}static getInstance(){return Be.instance||(Be.instance=new Be),Be.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof pe?this._registeredStatuses.push(e):this._registeredStatuses.push(new pe(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):pe.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):pe.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:pe.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return pe.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:pe.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new Be,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=Be.copyStatusWithNewName(a,`Unknown (${a.symbol})`);s.push(o),n.add(o)}),s}static copyStatusWithNewName(e,t){let n=new St(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new pe(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[pe.makeTodo(),pe.makeInProgress(),pe.makeDone(),pe.makeCancelled()].forEach(t=>{this.add(t)})}};var mn=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/mn.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+14)*.8/21+.2:s=.2,t+=s*mn.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*mn.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*mn.startedCoefficient),e.priority){case"1":t+=1*mn.priorityCoefficient;break;case"2":t+=.65*mn.priorityCoefficient;break;case"3":t+=.325*mn.priorityCoefficient;break}return t}},pn=mn;pn.dueCoefficient=12,pn.scheduledCoefficient=5,pn.startedCoefficient=-3,pn.priorityCoefficient=6,pn.milliSecondsPerDay=1e3*60*60*24;var Wb=require("obsidian");var Ka=require("obsidian");var Ib=ns(Th()),DI=require("obsidian"),Fb=ns(Cb());var Rh=class extends Fb.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let a in this.options.minLevels)t.startsWith(a)&&a.length>=s.length&&(n=this.options.minLevels[a],s=a);return new Ph(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,Ib.default)().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},Du=new Rh,Ph=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e)<this.minLevel)return;let a={level:e,module:this.module,message:t,objects:n,traceId:void 0};this.logManager.emit("log",a)}trace(e,t){this.log("trace",e,t)}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}logWithId(e,t,n,s){if(this.levelToInt(e)<this.minLevel)return;let o={level:e,module:this.module,message:n,objects:s,traceId:t};this.logManager.emit("log",o)}traceWithId(e,t,n){this.logWithId("trace",e,t,n)}debugWithId(e,t,n){this.logWithId("debug",e,t,n)}infoWithId(e,t,n){this.logWithId("info",e,t,n)}warnWithId(e,t,n){this.logWithId("warn",e,t,n)}errorWithId(e,t,n){this.logWithId("error",e,t,n)}};var Ah,Nh,Ch,EI=["md"],Va=Du.getLogger("tasks"),Lb=({metadataCache:r,vault:e,workspace:t})=>{Ah=r,Nh=e,Ch=t},Eu=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(Nh===void 0||Ah===void 0||Ch===void 0){Ih("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Va.debug(`replaceTaskWithTasks entered. ${r.path}`),Yb({originalTask:r,newTasks:e,vault:Nh,metadataCache:Ah,workspace:Ch,previousTries:0})});function Ih(r){console.error(r),new Ka.Notice(r,15e3)}function xh(r){console.warn(r),new Ka.Notice(r,1e4)}function SI(r){Va.debug(r)}var Yb=o=>J(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){Va.debug(`tryRepetitive after ${a} previous tries`);let l=()=>{if(a>10){let C=`Tasks: Could not find the correct task line to update.
|
|
|
|
|
|
The task line not updated is:
|
|
|
${r.originalMarkdown}
|
|
|
|
|
|
In this markdown file:
|
|
|
"${r.taskLocation.path}"
|
|
|
|
|
|
Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated).
|
|
|
|
|
|
Recommendations:
|
|
|
|
|
|
1. Close all panes that have the above file open, and then re-open the file.
|
|
|
|
|
|
2. Check for exactly identical copies of the task line, in this file, and see if you can make them different.
|
|
|
`;Ih(C);return}let R=Math.min(Math.pow(10,a),100);Va.debug(`timeout = ${R}`),setTimeout(()=>{Yb({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},R)},c=t.getAbstractFileByPath(r.path);if(!(c instanceof Ka.TFile))return xh(`Tasks: No file found for task ${r.description}. Retrying ...`),l();if(!EI.includes(c.extension)){Ih(`Tasks: Does not support files with the ${c.extension} file extension.`);return}let f=n.getFileCache(c);if(f==null||f===null)return xh(`Tasks: No file cache found for file ${c.path}. Retrying ...`),l();let m=f.listItems;if(m===void 0||m.length===0)return xh(`Tasks: No list items found in file cache of ${c.path}. Retrying ...`),l();let T=(yield t.read(c)).split(`
|
|
|
`),E=OI(r,T,m,SI);if(E===void 0)return l();let v=[...T.slice(0,E),...e.map(R=>R.toFileLineString()),...T.slice(E+1)];yield t.modify(c,v.join(`
|
|
|
`))});function Ub(r,e){return r<e.length}function OI(r,e,t,n){let s=MI(r,e);return s!==void 0||(s=RI(r,e),s!==void 0)?s:PI(r,e,t,n)}function MI(r,e){let t=r.taskLocation.lineNumber;if(Ub(t,e)&&e[t]===r.originalMarkdown)return Va.debug(`Found original markdown at original line number ${t}`),t}function RI(r,e){let t=[];for(let n=0;n<e.length;n++)e[n]===r.originalMarkdown&&t.push(n);if(t.length===1)return t[0]}function PI(r,e,t,n){let{globalFilter:s}=se(),a,o=0;for(let l of t){let c=l.position.start.line;if(!Ub(c,e))return;if(c<r.taskLocation.sectionStart||l.task===void 0)continue;let f=e[c];if(f.includes(s)){if(o===r.taskLocation.sectionIndex){if(f===r.originalMarkdown)a=c;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
|
|
|
Expected task:
|
|
|
${r.originalMarkdown}
|
|
|
Found task:
|
|
|
${f}`);return}break}o++}}return a}var $n={description:"task-description",priority:"task-priority",dueDate:"task-due",startDate:"task-start",createdDate:"task-created",scheduledDate:"task-scheduled",doneDate:"task-done",recurrenceRule:"task-recurring",blockLink:""},xI=7,AI="far";function NI(r,e,t){return J(this,null,function*(){yield Wb.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function qb(r,e,t=null){return J(this,null,function*(){var l;t||(t=NI);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");n.appendChild(s),s.classList.add("tasks-list-text");let a=yield CI(r,e,s,t);for(let c in a)n.dataset[c]=a[c];let o=document.createElement("input");return n.appendChild(o),o.classList.add("task-list-item-checkbox"),o.type="checkbox",r.status.symbol!==" "&&(o.checked=!0,n.classList.add("is-checked")),o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),o.disabled=!0;let f=r.toggle();Eu({originalTask:r,newTasks:f})}),n.prepend(o),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),o.setAttribute("data-line",e.listIndex.toString()),(l=e.layoutOptions)!=null&&l.shortMode&&UI({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function CI(r,e,t,n){return J(this,null,function*(){let s={},a=new qn(e.layoutOptions),o=ci.tasksPluginEmoji.taskSerializer;for(let l of a.layoutComponents){let c=o.componentToString(r,a,l);if(c){l==="description"&&(c=WI(c));let f=document.createElement("span");if(t.appendChild(f),f){let m=document.createElement("span");f.appendChild(m),yield II(m,c,l,r,n);let[g,T]=Fh(l,r);FI(l,m),f.classList.add(...g);for(let E in T)f.dataset[E]=T[E];s=Ce(Ce({},s),T)}}}for(let l of a.hiddenComponents){let[c,f]=Fh(l,r);s=Ce(Ce({},s),f)}if(s.taskPriority===void 0){let[l,c]=Fh("priority",r);s=Ce(Ce({},s),c)}return s})}function II(r,e,t,n,s){return J(this,null,function*(){if(t==="description"){let{debugSettings:a}=se();a.showTaskHiddenData&&(e+=`<br>\u{1F41B} <b>${n.lineNumber}</b> . ${n.sectionStart} . ${n.sectionIndex} . '<code>${n.originalMarkdown}</code>'<br>'<code>${n.path}</code>' > '<code>${n.precedingHeader}</code>'<br>`),yield s(e,r,n.path);let o=r.querySelector("blockquote"),l=o!=null?o:r,c=l.querySelector("p");if(c!==null){for(;c.firstChild;)l.insertBefore(c.firstChild,c);c.remove()}r.querySelectorAll("p").forEach(f=>{f.hasChildNodes()||f.remove()}),r.querySelectorAll(".footnotes").forEach(f=>{f.remove()})}else r.innerHTML=e})}function Fh(r,e){let t=[],n={},s=(a,o)=>{let l=LI(a);l&&(n[o]=l)};switch(r){case"description":t.push($n.description);break;case"priority":{let a=null;e.priority==="1"?a="high":e.priority==="2"?a="medium":e.priority==="4"?a="low":a="normal",n.taskPriority=a,t.push($n.priority);break}case"createdDate":{let a=e.createdDate;a&&(t.push($n.createdDate),s(a,"taskCreated"));break}case"dueDate":{let a=e.dueDate;a&&(t.push($n.dueDate),s(a,"taskDue"));break}case"startDate":{let a=e.startDate;a&&(t.push($n.startDate),s(a,"taskStart"));break}case"scheduledDate":{let a=e.scheduledDate;a&&(t.push($n.scheduledDate),s(a,"taskScheduled"));break}case"doneDate":{let a=e.doneDate;a&&(t.push($n.doneDate),s(a,"taskDone"));break}case"recurrenceRule":{t.push($n.recurrenceRule);break}}return[t,n]}function FI(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n<t.length;n++){let s=t[n].textContent;if(s){let a=YI(s),o=t[n];a&&(o.dataset.tagName=a)}}}}function LI(r){let e=window.moment().startOf("day"),t="",n=e.diff(r,"days");return isNaN(n)?null:n===0?"today":(n>0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=xI?t+=Math.abs(n).toString()+"d":t+=AI,t)}function YI(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function UI({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=ci.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let f=e.createDiv();f.addClasses(["tooltip","pop-up"]),r.recurrence&&f.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&f.createDiv().setText(Za({signifier:a,date:r.createdDate})),r.startDate&&f.createDiv().setText(Za({signifier:s,date:r.startDate})),r.scheduledDate&&f.createDiv().setText(Za({signifier:o,date:r.scheduledDate})),r.dueDate&&f.createDiv().setText(Za({signifier:l,date:r.dueDate})),r.doneDate&&f.createDiv().setText(Za({signifier:c,date:r.doneDate}));let m=r.getLinkText({isFilenameUnique:t});m&&f.createDiv().setText(`\u{1F517} ${m}`),e.addEventListener("mouseleave",()=>{f.remove()})})}function Za({signifier:r,date:e}){return`${r} ${e.format(ae.dateFormat)} (${e.from(window.moment().startOf("day"))})`}function WI(r){let{globalFilter:e,removeGlobalFilter:t}=se();return t?r.replace(e,"").trim():r}var Xt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=se();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),s=e.substring(t,n),a=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(s)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,a=e.scheduledDateIsInferred;return n===null?a&&(a=!1,s=null):a?s=n:this.canApplyFallback(e)&&(s=n,a=!0),new $e(er(Ce({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:a}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new $e(er(Ce({},s),{scheduledDateIsInferred:!1}))),s))}};function Su(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var ar=class{},ae=ar;ae.dateFormat="YYYY-MM-DD",ae.indentationRegex=/^([\s\t>]*)/,ae.listMarkerRegex=/([-*]|[0-9]+\.)/,ae.checkboxRegex=/\[(.)\]/u,ae.afterCheckboxRegex=/ *(.*)/u,ae.taskRegex=new RegExp(ar.indentationRegex.source+ar.listMarkerRegex.source+" +"+ar.checkboxRegex.source+ar.afterCheckboxRegex.source,"u"),ae.nonTaskRegex=new RegExp(ar.indentationRegex.source+ar.listMarkerRegex.source+"? *("+ar.checkboxRegex.source+")?"+ar.afterCheckboxRegex.source,"u"),ae.listItemRegex=new RegExp(ar.indentationRegex.source+ar.listMarkerRegex.source),ae.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ae.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ae.hashTagsFromEnd=new RegExp(ar.hashTags.source+"$");var $e=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:f,dueDate:m,doneDate:g,recurrence:T,blockLink:E,tags:v,originalMarkdown:R,scheduledDateIsInferred:C}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=a,this.taskLocation=n,this.tags=v,this.priority=o,this.createdDate=l,this.startDate=c,this.scheduledDate=f,this.dueDate=m,this.doneDate=g,this.recurrence=T,this.blockLink=E,this.originalMarkdown=R,this.scheduledDateIsInferred=C}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=e.match(ae.taskRegex);if(s===null)return null;let a=s[4].trim(),{globalFilter:o}=se();if(!a.includes(o))return null;let l=a,c=s[1],f=s[2],m=s[3],g=Be.getInstance().bySymbolOrCreate(m),T=l.match(ae.blockLinkRegex),E=T!==null?T[0]:"";E!==""&&(l=l.replace(ae.blockLinkRegex,"").trim());let{taskSerializer:v}=za(),R=v.deserialize(l),C=!1;return Xt.canApplyFallback(R)&&n!==null&&(R.scheduledDate=n,C=!0),R.tags=R.tags.map(q=>q.trim()),o&&(R.tags=R.tags.filter(q=>q!==o)),new $e(er(Ce({},R),{status:g,indentation:c,listMarker:f,taskLocation:t,blockLink:E,originalMarkdown:e,scheduledDateIsInferred:C}))}toLi(e){return J(this,null,function*(){return qb(this,e)})}toString(){return za().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Be.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=se();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new $e(er(Ce({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=se(),l=null;o&&(l=window.moment());let c=Be.getInstance().getNextStatusOrCreate(e),f=new $e(er(Ce(Ce({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(f)}return a.push(s),a}get urgency(){return this._urgency===null&&(this._urgency=pn.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}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)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let a of t)if(this[a]!==e[a])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let a of t){let o=this[a],l=e[a];if($r(o,l)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static extractHashtags(e){var t,n;return(n=(t=e.match(ae.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}getDescriptionWithoutGlobalFilter(){let{globalFilter:e}=se(),t=this.description;if(e.length===0)return t;let n=RegExp("(^|\\s)"+Su(e)+"($|\\s)","ug");return this.description.search(n)>-1&&(t=t.replace(n,"$1$2").replace(" "," ").trim()),t}};var Xa=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var Nt=class{constructor(e,t,n,s,a){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=a}static fromUnknownPosition(e){return new Nt(e,0,0,0,null)}fromRenamedFile(e){return new Nt(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var bs=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 ko,this.state="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",()=>J(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{useFilenameAsScheduledDate:e}=se(),t=this.vault.on("create",a=>{a instanceof di.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof di.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(o=>o.path!==a.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(a,o)=>{a instanceof di.TFile&&this.tasksMutex.runExclusive(()=>{let l=new Xa(()=>Xt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Xt.updateTaskPath(c,a.path,l.value):new $e(er(Ce({},c),{taskLocation:c.taskLocation.fromRenamedFile(a.path)})):c),this.notifySubscribers()})});this.vaultEventReferences.push(s)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(o=>o.path===e.path),s=t.listItems,a=[];if(s!==void 0){let o=yield this.vault.cachedRead(e);a=this.getTasksFromFileContent(o,s,t,e)}$e.tasksListsIdentical(n,a)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(o=>o.path!==e.path),this.tasks.push(...a),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let a=[],o=e.split(`
|
|
|
`),l=o.length,c=new Xa(()=>Xt.fromPath(s.path)),f=null,m=0;for(let g of t)if(g.task!==void 0){let T=g.position.start.line;if(T>=l)return console.log(`${s.path} Obsidian gave us a line number ${T} past the end of the file. ${l}.`),a;if((f===null||f.position.end.line<T)&&(f=bs.getSection(T,n.sections),m=0),f===null)continue;let E=o[T];if(E===void 0){console.log(`${s.path}: line ${T} - ignoring 'undefined' line.`);continue}let v;try{v=$e.fromLine({line:E,taskLocation:new Nt(s.path,T,f.position.start.line,m,bs.getPrecedingHeader(T,n.headings)),fallbackDate:c.value})}catch(R){this.reportTaskParsingErrorToUser(R,s,g,E);continue}v!==null&&(m++,a.push(v))}return a}reportTaskParsingErrorToUser(e,t,n,s){let a=`There was an error reading one of the tasks in this vault.
|
|
|
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
|
|
|
Error: ${e}
|
|
|
File: ${t.path}
|
|
|
Line number: ${n.position.start.line}
|
|
|
Task line: ${s}
|
|
|
|
|
|
Please create a bug report for this message at
|
|
|
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose
|
|
|
to help us find and fix the underlying issue.
|
|
|
|
|
|
Include:
|
|
|
- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine.
|
|
|
- the output from running the Obsidian command 'Show debug info'
|
|
|
|
|
|
The error popup will only be shown when Tasks is starting up, but if the error persists,
|
|
|
it will be shown in the console every time this file is edited during the Obsidian
|
|
|
session.
|
|
|
`;console.error(a),e instanceof Error&&console.error(e.stack),this.state==="Initializing"&&new di.Notice(a,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var zh=require("obsidian");var av=require("obsidian");function ws(){}function Uh(r){return r()}function Bb(){return Object.create(null)}function ks(r){r.forEach(Uh)}function Hb(r){return typeof r=="function"}function zb(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Vb(r){return Object.keys(r).length===0}var Kb=!1;function qI(){Kb=!0}function jI(){Kb=!1}function L(r,e){r.appendChild(e)}function fi(r,e,t){r.insertBefore(e,t||null)}function Ds(r){r.parentNode.removeChild(r)}function Wh(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function oe(r){return document.createElement(r)}function $I(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Qt(r){return document.createTextNode(r)}function Se(){return Qt(" ")}function Ht(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function Zb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function z(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function BI(r){return Array.from(r.childNodes)}function qh(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Nr(r,e){r.value=e==null?"":e}function jh(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 Xb(r){let e=r.querySelector(":checked")||r.options[0];return e&&e.__value}function Cr(r,e,t){r.classList[t?"add":"remove"](e)}var vs=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=$I(t.nodeName):this.e=oe(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)fi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Ds)}};var eo;function Ja(r){eo=r}function GI(){if(!eo)throw new Error("Function called outside component initialization");return eo}function $h(r){GI().$$.on_mount.push(r)}var Qa=[];var Ru=[],Mu=[],Gb=[],HI=Promise.resolve(),Yh=!1;function zI(){Yh||(Yh=!0,HI.then(Qb))}function to(r){Mu.push(r)}var Lh=new Set,Ou=0;function Qb(){let r=eo;do{for(;Ou<Qa.length;){let e=Qa[Ou];Ou++,Ja(e),VI(e.$$)}for(Ja(null),Qa.length=0,Ou=0;Ru.length;)Ru.pop()();for(let e=0;e<Mu.length;e+=1){let t=Mu[e];Lh.has(t)||(Lh.add(t),t())}Mu.length=0}while(Qa.length);for(;Gb.length;)Gb.pop()();Yh=!1,Lh.clear(),Ja(r)}function VI(r){if(r.fragment!==null){r.update(),ks(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(to)}}var KI=new Set;function ZI(r,e){r&&r.i&&(KI.delete(r),r.i(e))}var ij=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function XI(r,e,t,n){let{fragment:s,on_mount:a,on_destroy:o,after_update:l}=r.$$;s&&s.m(e,t),n||to(()=>{let c=a.map(Uh).filter(Hb);o?o.push(...c):ks(c),r.$$.on_mount=[]}),l.forEach(to)}function Jb(r,e){let t=r.$$;t.fragment!==null&&(ks(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function QI(r,e){r.$$.dirty[0]===-1&&(Qa.push(r),zI(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function ev(r,e,t,n,s,a,o,l=[-1]){let c=eo;Ja(r);let f=r.$$={fragment:null,ctx:null,props:a,update:ws,not_equal:s,bound:Bb(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Bb(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};o&&o(f.root);let m=!1;if(f.ctx=t?t(r,e.props||{},(g,T,...E)=>{let v=E.length?E[0]:T;return f.ctx&&s(f.ctx[g],f.ctx[g]=v)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](v),m&&QI(r,g)),T}):[],f.update(),m=!0,ks(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){qI();let g=BI(e.target);f.fragment&&f.fragment.l(g),g.forEach(Ds)}else f.fragment&&f.fragment.c();e.intro&&ZI(r.$$.fragment),XI(r,e.target,e.anchor,e.customElement),jI(),Qb()}Ja(c)}var JI;typeof HTMLElement=="function"&&(JI=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(Uh).filter(Hb);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){ks(this.$$.on_disconnect)}$destroy(){Jb(this,1),this.$destroy=ws}$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&&!Vb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Pu=class{$destroy(){Jb(this,1),this.$destroy=ws}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!Vb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Gh=ns(ht());function tv(r,e,t){let n=r.slice();return n[45]=e[t],n}function rv(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n}function eF(r){let e,t=r[50]+"",n;return{c(){e=oe("span"),n=Qt(t)},m(s,a){fi(s,e,a),L(e,n)},p:ws,d(s){s&&Ds(e)}}}function nv(r){let e,t,n,s,a,o,l,c,f=r[49]+"",m,g,T=r[50]&&r[50].charCodeAt(0)>=256,E,v,R,C,q=T&&eF(r);return{c(){e=oe("span"),t=oe("input"),o=Se(),l=oe("label"),c=oe("span"),m=Qt(f),g=Se(),q&&q.c(),v=Se(),z(t,"type","radio"),z(t,"id",n="priority-"+r[48]),t.__value=s=r[48],t.value=t.__value,z(t,"accesskey",a=r[15](r[49].charAt(0).toLowerCase())),r[33][0].push(t),z(c,"class","accesskey-first"),z(l,"for",E="priority-"+r[48])},m($,B){fi($,e,B),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,m),L(l,g),q&&q.m(l,null),L(e,v),R||(C=Ht(t,"change",r[32]),R=!0)},p($,B){B[0]&32768&&a!==(a=$[15]($[49].charAt(0).toLowerCase()))&&z(t,"accesskey",a),B[0]&3&&(t.checked=t.__value===$[1].priority),T&&q.p($,B)},d($){$&&Ds(e),r[33][0].splice(r[33][0].indexOf(t),1),q&&q.d(),R=!1,C()}}}function sv(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=oe("option"),n=Qt(t),s=Qt(" ["),o=Qt(a),l=Qt("]"),e.__value=c=r[45],e.value=e.__value},m(f,m){fi(f,e,m),L(e,n),L(e,s),L(e,o),L(e,l)},p(f,m){m[0]&1&&t!==(t=f[45].name+"")&&qh(n,t),m[0]&1&&a!==(a=f[45].symbol+"")&&qh(o,a),m[0]&1&&c!==(c=f[45])&&(e.__value=c,e.value=e.__value)},d(f){f&&Ds(e)}}}function tF(r){let e,t,n,s,a,o,l,c,f,m,g,T,E,v,R,C,q,$,B,me,fe,ve,ee,te,Ct,mt,V,W,x,Q,Y,ue,y,_,w,k,S,M,D,I,A,N,j,De,ye,ce,Fe,K,qe,Je,Ze,Dr,Ot,Ae,nt,yt,kn,Ri,je,Ns,Kn,dt,de,zr,Mt,Zn,ao,Fr,Dn,gt,Pi,lr,Vr,Ye,En,Cs,Xn,Sn,Qn,cr,On,oo,Kr,uo,dr,fr,H,Is,lo,ft,Jn,Ne,hr=r[20],It=[];for(let G=0;G<hr.length;G+=1)It[G]=nv(rv(r,hr,G));let et=r[0],Xe=[];for(let G=0;G<et.length;G+=1)Xe[G]=sv(tv(r,et,G));return{c(){e=oe("div"),t=oe("form"),n=oe("div"),s=oe("label"),s.innerHTML='Descrip<span class="accesskey">t</span>ion',a=Se(),o=oe("textarea"),c=Se(),f=oe("div"),m=oe("label"),g=Qt("Priority"),E=Se();for(let G=0;G<It.length;G+=1)It[G].c();v=Se(),R=oe("div"),C=oe("label"),C.textContent="Recurs",q=Se(),$=oe("input"),me=Se(),fe=oe("code"),ve=Qt(r[16]),ee=Se(),te=new vs(!1),Ct=Se(),mt=oe("label"),mt.textContent="Due",V=Se(),W=oe("input"),Q=Se(),Y=oe("code"),ue=Qt(r[19]),y=Se(),_=new vs(!1),w=Se(),k=oe("label"),k.textContent="Scheduled",S=Se(),M=oe("input"),I=Se(),A=oe("code"),N=Qt(r[18]),j=Se(),De=new vs(!1),ye=Se(),ce=oe("label"),ce.innerHTML='St<span class="accesskey">a</span>rt',Fe=Se(),K=oe("input"),Je=Se(),Ze=oe("code"),Dr=Qt(r[17]),Ot=Se(),Ae=new vs(!1),nt=Se(),yt=oe("div"),kn=oe("label"),kn.innerHTML=`Only
|
|
|
<span class="accesskey-first">future</span> dates:`,Ri=Se(),je=oe("input"),Kn=Se(),dt=oe("div"),de=oe("label"),de.innerHTML='Stat<span class="accesskey">u</span>s',zr=Se(),Mt=oe("select");for(let G=0;G<Xe.length;G+=1)Xe[G].c();ao=Se(),Fr=oe("div"),Dn=oe("div"),gt=oe("label"),gt.textContent="Completed:",Pi=Se(),lr=oe("input"),Ye=Se(),En=oe("div"),Cs=oe("span"),Cs.textContent="Created on:",Xn=Se(),Sn=oe("code"),Qn=Se(),cr=oe("div"),On=oe("span"),On.textContent="Done on:",oo=Se(),Kr=oe("code"),uo=Se(),dr=oe("div"),fr=oe("button"),H=Qt("Apply"),lo=Se(),ft=oe("button"),ft.textContent="Cancel",z(s,"for","description"),z(o,"id","description"),z(o,"type","text"),z(o,"class","tasks-modal-description"),z(o,"placeholder","Take out the trash"),z(o,"accesskey",l=r[15]("t")),z(n,"class","tasks-modal-section"),z(m,"for",T="priority-"+r[1].priority),z(f,"class","tasks-modal-section tasks-modal-priorities"),z(C,"for","recurrence"),z(C,"class","accesskey-first"),z($,"id","recurrence"),z($,"type","text"),z($,"placeholder","Try 'every 2 weeks on Thursday'."),z($,"accesskey",B=r[15]("r")),Cr($,"tasks-modal-error",!r[8]),te.a=null,z(mt,"for","due"),z(mt,"class","accesskey-first"),z(W,"id","due"),z(W,"type","text"),z(W,"placeholder",Bh),z(W,"accesskey",x=r[15]("d")),Cr(W,"tasks-modal-error",!r[7]),_.a=null,z(k,"for","scheduled"),z(k,"class","accesskey-first"),z(M,"id","scheduled"),z(M,"type","text"),z(M,"placeholder",Bh),z(M,"accesskey",D=r[15]("s")),Cr(M,"tasks-modal-error",!r[5]),De.a=null,z(ce,"for","start"),z(K,"id","start"),z(K,"type","text"),z(K,"placeholder",Bh),z(K,"accesskey",qe=r[15]("a")),Cr(K,"tasks-modal-error",!r[3]),Ae.a=null,z(kn,"for","forwardOnly"),z(je,"id","forwardOnly"),z(je,"type","checkbox"),z(je,"class","task-list-item-checkbox tasks-modal-checkbox"),z(je,"accesskey",Ns=r[15]("f")),z(R,"class","tasks-modal-section tasks-modal-dates"),z(de,"for","status"),z(Mt,"id","status-type"),z(Mt,"class","dropdown"),z(Mt,"accesskey",Zn=r[15]("u")),r[1].status===void 0&&to(()=>r[39].call(Mt)),z(dt,"class","tasks-modal-section"),z(gt,"for","status"),z(lr,"id","status"),z(lr,"type","checkbox"),z(lr,"class","task-list-item-checkbox tasks-modal-checkbox"),lr.checked=Vr=r[1].status.isCompleted(),lr.disabled=!0,z(Fr,"class","tasks-modal-section tasks-modal-status"),fr.disabled=Is=!r[14],z(fr,"type","submit"),z(fr,"class","mod-cta"),z(ft,"type","button"),z(dr,"class","tasks-modal-section tasks-modal-buttons"),Cr(t,"with-accesskeys",r[9]),z(e,"class","tasks-modal")},m(G,ne){fi(G,e,ne),L(e,t),L(t,n),L(n,s),L(n,a),L(n,o),Nr(o,r[1].description),r[31](o),L(t,c),L(t,f),L(f,m),L(m,g),L(f,E);for(let le=0;le<It.length;le+=1)It[le].m(f,null);L(t,v),L(t,R),L(R,C),L(R,q),L(R,$),Nr($,r[1].recurrenceRule),L(R,me),L(R,fe),L(fe,ve),L(fe,ee),te.m(r[12],fe),L(R,Ct),L(R,mt),L(R,V),L(R,W),Nr(W,r[1].dueDate),L(R,Q),L(R,Y),L(Y,ue),L(Y,y),_.m(r[6],Y),L(R,w),L(R,k),L(R,S),L(R,M),Nr(M,r[1].scheduledDate),L(R,I),L(R,A),L(A,N),L(A,j),De.m(r[4],A),L(R,ye),L(R,ce),L(R,Fe),L(R,K),Nr(K,r[1].startDate),L(R,Je),L(R,Ze),L(Ze,Dr),L(Ze,Ot),Ae.m(r[2],Ze),L(R,nt),L(R,yt),L(yt,kn),L(yt,Ri),L(yt,je),je.checked=r[1].forwardOnly,L(t,Kn),L(t,dt),L(dt,de),L(dt,zr),L(dt,Mt);for(let le=0;le<Xe.length;le+=1)Xe[le].m(Mt,null);jh(Mt,r[1].status),L(t,ao),L(t,Fr),L(Fr,Dn),L(Dn,gt),L(Dn,Pi),L(Dn,lr),L(Fr,Ye),L(Fr,En),L(En,Cs),L(En,Xn),L(En,Sn),Sn.innerHTML=r[11],L(Fr,Qn),L(Fr,cr),L(cr,On),L(cr,oo),L(cr,Kr),Kr.innerHTML=r[13],L(t,uo),L(t,dr),L(dr,fr),L(fr,H),L(dr,lo),L(dr,ft),Jn||(Ne=[Ht(o,"input",r[30]),Ht(o,"keydown",r[23]),Ht(o,"paste",r[24]),Ht(o,"drop",r[24]),Ht(f,"keyup",r[21]),Ht($,"input",r[34]),Ht(W,"input",r[35]),Ht(M,"input",r[36]),Ht(K,"input",r[37]),Ht(je,"change",r[38]),Ht(Mt,"change",r[39]),Ht(ft,"click",r[22]),Ht(t,"submit",Zb(r[25]))],Jn=!0)},p(G,ne){if(ne[0]&32768&&l!==(l=G[15]("t"))&&z(o,"accesskey",l),ne[0]&3&&Nr(o,G[1].description),ne[0]&3&&T!==(T="priority-"+G[1].priority)&&z(m,"for",T),ne[0]&1081346){hr=G[20];let le;for(le=0;le<hr.length;le+=1){let qt=rv(G,hr,le);It[le]?It[le].p(qt,ne):(It[le]=nv(qt),It[le].c(),It[le].m(f,null))}for(;le<It.length;le+=1)It[le].d(1);It.length=hr.length}if(ne[0]&32768&&B!==(B=G[15]("r"))&&z($,"accesskey",B),ne[0]&3&&$.value!==G[1].recurrenceRule&&Nr($,G[1].recurrenceRule),ne[0]&256&&Cr($,"tasks-modal-error",!G[8]),ne[0]&4096&&te.p(G[12]),ne[0]&32768&&x!==(x=G[15]("d"))&&z(W,"accesskey",x),ne[0]&3&&W.value!==G[1].dueDate&&Nr(W,G[1].dueDate),ne[0]&128&&Cr(W,"tasks-modal-error",!G[7]),ne[0]&64&&_.p(G[6]),ne[0]&32768&&D!==(D=G[15]("s"))&&z(M,"accesskey",D),ne[0]&3&&M.value!==G[1].scheduledDate&&Nr(M,G[1].scheduledDate),ne[0]&32&&Cr(M,"tasks-modal-error",!G[5]),ne[0]&16&&De.p(G[4]),ne[0]&32768&&qe!==(qe=G[15]("a"))&&z(K,"accesskey",qe),ne[0]&3&&K.value!==G[1].startDate&&Nr(K,G[1].startDate),ne[0]&8&&Cr(K,"tasks-modal-error",!G[3]),ne[0]&4&&Ae.p(G[2]),ne[0]&32768&&Ns!==(Ns=G[15]("f"))&&z(je,"accesskey",Ns),ne[0]&3&&(je.checked=G[1].forwardOnly),ne[0]&1){et=G[0];let le;for(le=0;le<et.length;le+=1){let qt=tv(G,et,le);Xe[le]?Xe[le].p(qt,ne):(Xe[le]=sv(qt),Xe[le].c(),Xe[le].m(Mt,null))}for(;le<Xe.length;le+=1)Xe[le].d(1);Xe.length=et.length}ne[0]&32768&&Zn!==(Zn=G[15]("u"))&&z(Mt,"accesskey",Zn),ne[0]&3&&jh(Mt,G[1].status),ne[0]&3&&Vr!==(Vr=G[1].status.isCompleted())&&(lr.checked=Vr),ne[0]&2048&&(Sn.innerHTML=G[11]),ne[0]&8192&&(Kr.innerHTML=G[13]),ne[0]&16384&&Is!==(Is=!G[14])&&(fr.disabled=Is),ne[0]&512&&Cr(t,"with-accesskeys",G[9])},i:ws,o:ws,d(G){G&&Ds(e),r[31](null),Wh(It,G),Wh(Xe,G),Jn=!1,ks(Ne)}}}var Bh="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function rF(r,e,t){let n;var s;let{task:a}=e,{onSubmit:o}=e,{statusOptions:l}=e,{prioritySymbols:c,recurrenceSymbol:f,startDateSymbol:m,scheduledDateSymbol:g,dueDateSymbol:T}=ci.tasksPluginEmoji.taskSerializer.symbols,E,v={description:"",status:pe.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},R=!0,C="",q="",$=!0,B="",me=!0,fe="",ve=!0,ee="",te=!0,Ct="",mt=!1,V=!0,W=!0,x=[{value:"low",label:"Low",symbol:c.Low},{value:"none",label:"Normal",symbol:c.None},{value:"medium",label:"Medium",symbol:c.Medium},{value:"high",label:"High",symbol:c.High}];function Q(K,qe,Je=void 0){if(!qe)return`<i>no ${K} date</i>`;let Ze=Gh.parseDate(qe,Je,{forwardDate:Je!=null});return Ze!==null?window.moment(Ze).format("YYYY-MM-DD"):`<i>invalid ${K} date</i>`}function Y(K,qe){return Q(K,qe,v.forwardOnly?new Date:void 0)}function ue(K){let qe=null,Je=Gh.parseDate(K,new Date,{forwardDate:v.forwardOnly});return Je!==null&&(qe=window.moment(Je)),qe}$h(()=>{let{globalFilter:K,provideAccessKeys:qe}=se();t(9,V=qe);let Je=a.getDescriptionWithoutGlobalFilter();(Je!=a.description||Je.indexOf(K)==-1)&&(mt=!0);let Ze="none";a.priority==="4"?Ze="low":a.priority==="2"?Ze="medium":a.priority==="1"&&(Ze="high"),t(1,v={description:Je,status:a.status,priority:Ze,recurrenceRule:a.recurrence?a.recurrence.toText():"",createdDate:a.createdDate?a.createdDate.format("YYYY-MM-DD"):"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{E.focus()},10)});let y=K=>{if(K.key&&!K.altKey&&!K.ctrlKey){let qe=x.find(Je=>Je.label.charAt(0).toLowerCase()==K.key);qe&&t(1,v.priority=qe.value,v)}},_=()=>{o([])},w=K=>{K.key==="Enter"&&(K.preventDefault(),W&&S())},k=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},S=()=>{let{globalFilter:K}=se(),qe=v.description.trim();mt&&(qe=K+" "+qe);let Je=ue(v.startDate),Ze=ue(v.scheduledDate),Dr=ue(v.dueDate),Ot=null;v.recurrenceRule&&(Ot=Et.fromText({recurrenceRuleText:v.recurrenceRule,startDate:Je,scheduledDate:Ze,dueDate:Dr}));let Ae;switch(v.priority){case"low":Ae="4";break;case"medium":Ae="2";break;case"high":Ae="1";break;default:Ae="3"}let nt=new $e(Object.assign(Object.assign({},a),{description:qe,status:v.status,priority:Ae,recurrence:Ot,startDate:Je,scheduledDate:Ze,dueDate:Dr,doneDate:window.moment(v.doneDate,"YYYY-MM-DD").isValid()?window.moment(v.doneDate,"YYYY-MM-DD"):null}));o([nt])},M=[[]];function D(){v.description=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function I(K){Ru[K?"unshift":"push"](()=>{E=K,t(10,E)})}function A(){v.priority=this.__value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function N(){v.recurrenceRule=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function j(){v.dueDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function De(){v.scheduledDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ye(){v.startDate=this.value,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function ce(){v.forwardOnly=this.checked,t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}function Fe(){v.status=Xb(this),t(1,v),t(6,fe),t(2,q),t(4,B),t(0,l)}return r.$$set=K=>{"task"in K&&t(26,a=K.task),"onSubmit"in K&&t(27,o=K.onSubmit),"statusOptions"in K&&t(0,l=K.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=K=>V?K:null)}if(r.$$.dirty[0]&66){e:t(1,v.dueDate=ii(v.dueDate),v),t(6,fe=Y("due",v.dueDate)),t(7,ve=!fe.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.startDate=ii(v.startDate),v),t(2,q=Y("start",v.startDate)),t(3,$=!q.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.scheduledDate=ii(v.scheduledDate),v),t(4,B=Y("scheduled",v.scheduledDate)),t(5,me=!B.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,te=!0),!v.recurrenceRule)t(12,ee="<i>not recurring</>");else{let K=t(28,s=Et.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();K?t(12,ee=K):(t(12,ee="<i>invalid recurrence rule</i>"),t(8,te=!1))}}if(r.$$.dirty[0]&2){e:t(29,R=v.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,W=ve&&te&&me&&$&&R)}if(r.$$.dirty[0]&2){e:t(11,C=Q("created",v.createdDate)),t(13,Ct=Q("done",v.doneDate))}},[l,v,q,$,B,me,fe,ve,te,V,E,C,ee,Ct,W,n,f,m,g,T,x,y,_,w,k,S,a,o,s,R,D,I,A,M,N,j,De,ye,ce,Fe]}var Hh=class extends Pu{constructor(e){super(),ev(this,e,rF,tF,zb,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},iv=Hh;var Bn=class extends av.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=a=>{a.length&&s(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new iv({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Be.getInstance().registeredStatuses;return Be.getInstance().bySymbol(this.task.status.symbol)===pe.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var xu=({line:r,path:e})=>{var v,R;let t=Xt.fromPath(e),n=$e.fromLine({line:r,taskLocation:Nt.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=se(),a=null;s&&(a=window.moment());let o=r.match(ae.nonTaskRegex);if(o===null)return console.error("Tasks: Cannot create task on line:",r),new $e({status:pe.TODO,description:"",taskLocation:Nt.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let l=o[1],c=(v=o[2])!=null?v:"-",f=(R=o[4])!=null?R:" ",m=Be.getInstance().bySymbolOrCreate(f),g=o[5],T=r.match(ae.blockLinkRegex),E=T!==null?T[0]:"";return E!==""&&(g=g.replace(ae.blockLinkRegex,"")),new $e({status:m,description:g,taskLocation:Nt.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:E,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var ov=(r,e,t,n)=>{var g;if(r)return t instanceof zh.MarkdownView;if(!(t instanceof zh.MarkdownView))return;let s=(g=t.file)==null?void 0:g.path;if(s===void 0)return;let o=e.getCursor().line,l=e.getLine(o),c=xu({line:l,path:s}),f=T=>{let E=Xt.removeInferredStatusIfNeeded(c,T).map(v=>v.toFileLineString()).join(`
|
|
|
`);e.setLine(o,E)};new Bn({app:n,task:c,onSubmit:f}).open()};var Vh=require("obsidian");var uv=(r,e,t)=>{var c;if(r)return t instanceof Vh.MarkdownView;if(!(t instanceof Vh.MarkdownView))return;let n=(c=t.file)==null?void 0:c.path;if(n===void 0)return;let s=e.getCursor(),a=s.line,o=e.getLine(a),l=nF(o,n);e.setLine(a,l.text),e.setCursor(sF(s,l))},nF=(r,e)=>{let t=$e.fromLine({line:r,taskLocation:Nt.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggle().map(s=>s.toFileLineString());return{text:n.join(`
|
|
|
`),moveTo:{line:n.length-1}}}else{let n=r.match(ae.taskRegex);if(n!==null){let s=n[3],o=Be.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(ae.taskRegex,`$1- [${o}] $4`)}}else if(ae.listItemRegex.test(r)){let s=r.replace(ae.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(ae.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},sF=(r,e)=>{var a;let t={line:0,ch:r.ch},n=Ce(Ce({},t),(a=e.moveTo)!=null?a:{}),s=e.text.split(`
|
|
|
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var Au=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,s)=>ov(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:uv})}};var Nu=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var Cu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var m;let{globalFilter:n}=se(),s=e.findAll(".task-list-item").filter(g=>{var v;let T=(v=g.textContent)==null?void 0:v.split(`
|
|
|
`);if(T===void 0)return!1;let E=null;for(let R=0;R<T.length;R=R+1)if(T[R]!==""){E=T[R];break}return E===null?!1:E.includes(n)});if(s.length===0)return;let a=t.sourcePath,o=t.getSectionInfo(e);if(o===null)return;let l=o.text.split(`
|
|
|
`),c=0,f=[];for(let g=o.lineStart;g<=o.lineEnd;g++){let T=l[g];if(T===void 0)continue;let E=null,v=$e.fromLine({line:T,taskLocation:new Nt(a,g,o.lineStart,c,E),fallbackDate:null});v!==null&&(f.push(v),c++)}for(let g=0;g<s.length;g++){let T=f[g],E=s[g];if(T===void 0||E===void 0)continue;let v=(m=E.getAttr("data-line"))!=null?m:"0",R=Number.parseInt(v,10),C=yield T.toLi({parentUlElement:e,listIndex:R}),q=E.childNodes;for(let me=0;me<q.length;me=me+1){let fe=q[me];fe.nodeName.toLowerCase()==="div"?C.prepend(fe):fe.nodeName.toLowerCase()==="ul"&&C.append(fe)}let $=E.querySelectorAll("[data-footnote-id]"),B=C.querySelectorAll("[data-footnote-id]");if($.length===B.length)for(let me=0;me<$.length;me++)B[me].replaceWith($[me]);E.replaceWith(C)}})}};var lv=require("@codemirror/view"),cv=require("obsidian");var dv=()=>lv.ViewPlugin.fromClass(Kh),Kh=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 n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let T=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview.
|
|
|
If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(T),new cv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=$e.fromLine({line:o.text,taskLocation:Nt.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${a} Line: ${o.text}`),l===null)return!1;e.preventDefault();let f=l.toggle().map(T=>T.toFileLineString()).join(s.lineBreak),m=s.update({changes:{from:o.from,to:o.to,insert:f}});this.view.dispatch(m);let g=t.checked;return setTimeout(()=>{t.checked=g},1),!0}};var ol=require("obsidian");var yn=class{constructor(e,t,n){this.property=e,this.comparator=yn.maybeReverse(n,t)}static maybeReverse(e,t){return e?yn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var hi=class{constructor(e,t){this.property=e,this.grouper=t}};var Ve=class{canCreateFilterForLine(e){return Ve.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Su(this.fieldNameSingular())}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?Ve.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Ve.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new yn(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(){return new hi(this.fieldNameSingular(),this.grouper())}};var at=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new at("None of",e,"NOT")}static booleanXor(e){return new at("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e+`${this.symbol}`;this.children.length>1&&(t+=` (${this.description})`),t+=":";let n=e+" ";for(let s=0;s<this.children.length;s++)t+=`
|
|
|
${this.children[s].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let s=t[0],a=t[1];if(s.symbol===n&&a.symbol==="")return s.children.push(a),s}return new at(e,t,n)}};var Jt=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction}
|
|
|
`:`${e}${this.instruction} =>
|
|
|
${t.asString(" ")}
|
|
|
`}},Ke=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new Ke(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new Ke(e);return n.error=t,n}};var Iu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Ke(e);return e===this._instruction?(t.filter=new Jt(e,this._filter,new at(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Gr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Iu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let s=n.createFilterOrErrorMessage(e);if(s.error===void 0)return s}let t=new Ke(e);return t.error=`do not understand filter: ${e}`,t}};var Gn=class extends Ve{constructor(){super(...arguments);this._filters=new Gr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var gn=class extends Gn{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=gn.oldStatusName(e),s=gn.oldStatusName(t);return n<s?1:n>s?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}};var Ut=class extends Ve{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Gr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let s=new Ke(t),a=Ve.getMatch(this.filterRegExp(),t);if(a!==null){let o=a[1],l=a[2],c=ms.parseDateRange(l);if(!c[0].isValid()||!c[1].isValid())s.error="do not understand "+this.fieldName()+" date";else{let f=this.buildFilterFunction(o,c),m=Ut.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),c);s.filter=new Jt(t,f,new at(m))}}else s.error="do not understand query filter ("+this.fieldName()+" date)";return s}buildFilterFunction(t,n){let s;return t==="before"?s=a=>a?a.isBefore(n[0]):this.filterResultIfFieldMissing():t==="after"?s=a=>a?a.isAfter(n[1]):this.filterResultIfFieldMissing():s=a=>a?a.isSameOrAfter(n[0])&&a.isSameOrBefore(n[1]):this.filterResultIfFieldMissing(),this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (before|after|on|in)? ?(.*)`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,a){let o,l="YYYY-MM-DD (dddd Do MMMM YYYY)",c;switch(n){case"before":o=n,c=a[0].format(l);break;case"after":o=n,c=a[1].format(l);break;default:a[0].isSame(a[1])?(o="on",c=a[0].format(l)):(o="between",c=`${a[0].format(l)} and ${a[1].format(l)} inclusive`);break}let f=`${t} date is ${o} ${c}`;return s&&(f+=` OR no ${t} date`),f}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>$r(this.date(t),this.date(n))}};var pi=class extends Ut{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var Zh=class extends Ve{createFilterOrErrorMessage(e){let t=new Ke(e),n=Ve.getMatch(this.filterRegExp(),e);if(n!==null){let s=n[5],a=null;switch(s){case"low":a="4";break;case"none":a="3";break;case"medium":a="2";break;case"high":a="1";break}if(a===null)return t.error="do not understand priority",t;let o=e,l;switch(n[3]){case"above":l=c=>c.priority.localeCompare(a)<0;break;case"below":l=c=>c.priority.localeCompare(a)>0;break;case"not":l=c=>c.priority!==a;break;default:l=c=>c.priority===a,o=`${this.fieldName()} is ${s}`}t.filter=new Jt(e,l,new at(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return Zh.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}},Es=Zh;Es.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var mi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var yi=class extends mi{constructor(t){super();this.stringToFind=t}matches(t){return yi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var gi=class extends mi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,s=t.match(n);if(s!==null){let a=new RegExp(s[1],s[2]);return new gi(a)}else return null}matches(t){return t.match(this.regex)!==null}};var Wt=class extends Ve{createFilterOrErrorMessage(e){let t=Ve.getMatch(this.filterRegExp(),e);if(t===null)return Ke.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,s,a]=t,o=null;if(s.includes("include"))o=new yi(a);else if(s.includes("regex")&&(o=gi.validateAndConstruct(a),o===null))return Ke.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(o===null)return Ke.fromError(e,`do not understand query filter (${this.fieldName()})`);let l=s.match(/not/)!==null,c=new Jt(e,this.getFilter(o,l),new at(e));return Ke.fromFilter(c)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}};var _i=class extends Wt{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}};var Ti=class extends Ve{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return Ke.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}};var bi=class{static by(e,t){let n=[new Ti().comparator(),new gn().comparator(),new pi().comparator(),new Es().comparator(),new _i().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(bi.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let a=s(t,n);if(a!==0)return a}return 0}}};var Ss=class extends Wt{fieldName(){return"description"}value(e){let t=se().globalFilter;return e.description.replace(t,"").trim()}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ss.cleanDescription(e.description),s=Ss.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){let t=se().globalFilter;e=e.replace(t,"").trim();let n=/^\[\[?([^\]]*)]]?/,s=e.match(n);if(s!==null){let a=s[1];e=a.substring(a.indexOf("|")+1)+e.replace(n,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var Fu=class extends Ut{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Lu=class extends Ut{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Yu=class extends Gn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var Uu=class extends Wt{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}};var Wu=class extends Ut{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var qu=class extends Ut{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Hn=class extends Ut{constructor(){let e=new Gr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return Array.of(e.startDate,e.scheduledDate,e.dueDate)}earliestDate(e){return new Hn().dates(e).sort($r)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var ju=class extends Gn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}};var $u=class extends Wt{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let s=e.matchesAnyOf(this.values(n));return t?!s:s}}};var Os=class extends $u{constructor(){super();this.filterInstructions=new Gr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let s=!!n[1],a=isNaN(+n[2])?1:+n[2],o=Os.makeCompareByTagComparator(a);return new yn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Os.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let a=t-1;if(n.tags.length<t&&s.tags.length>=t)return 1;if(s.tags.length<t&&n.tags.length>=t)return-1;if(n.tags.length<t&&s.tags.length<t)return 0;let o=n.tags[a],l=s.tags[a];return o.localeCompare(l,void 0,{numeric:!0})}}};var Dv=ns(kv());var zu=class extends Ve{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){let n=new Ke(t);if(t.length===0)return n.error="empty line",n;let s=this.preprocessExpression(t);try{let a=(0,Dv.parse)(s);for(let c of a)if(c.name==="IDENTIFIER"&&c.value){let f=c.value.trim();if(!(f in this.subFields)){let m=Vu(f);if(m===null)return n.error=`couldn't parse sub-expression '${f}'`,n;if(m.error)return n.error=`couldn't parse sub-expression '${f}': ${m.error}`,n;m.filter&&(this.subFields[f]=m.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(c.value))return n.error=`unknown boolean operator '${c.value}'`,n}let o=c=>this.filterTaskWithParsedQuery(c,a),l=this.constructExplanation(a);return n.filter=new Jt(t,o,l),n}catch(a){let o=a instanceof Error?a.message:"unknown error type";return n.error=`malformed boolean query -- ${o} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of n)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let f=this.subFields[l.value.trim()].filterFunction(t);o.push(a(f))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let c=s(o.pop());o.push(a(!c))}else if(l.value==="OR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c||f))}else if(l.value==="AND"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&f))}else if(l.value==="XOR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&!f||!c&&f))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let a=this.subFields[s.value.trim()];n.push(a.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let a=n.pop();n.push(at.booleanNot([a]))}else if(s.value==="OR"){let a=n.pop(),o=n.pop();n.push(at.booleanOr([o,a]))}else if(s.value==="AND"){let a=n.pop(),o=n.pop();n.push(at.booleanAnd([o,a]))}else if(s.value==="XOR"){let a=n.pop(),o=n.pop();n.push(at.booleanXor([o,a]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s);return n[0]}};var Ku=class extends Wt{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}};var Zu=class extends Wt{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Vn=class extends Ve{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return Ve.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Ve.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,s,a]=t,o=kr[a.toUpperCase()];if(!o)return this.helpMessage(e);let l;switch(s){case"is":l=c=>c.status.type===o;break;case"is not":l=c=>c.status.type!==o;break;default:return this.helpMessage(e)}return Ke.fromFilter(new Jt(e,l,new at(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(kr).filter(s=>s!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'.
|
|
|
Allowed options: 'is' and 'is not' (without quotes).
|
|
|
Allowed values: ${t}
|
|
|
Note: values are case-insensitive,
|
|
|
so 'in_progress' works too, for example.
|
|
|
Example: ${this.fieldNameSingular()} is not NON_TASK`;return Ke.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Vn.groupName(e),s=Vn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Vn.groupName(e)]}static groupName(e){let t;switch(e.status.type){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return t+" "+e.status.type}};var Xu=class extends Wt{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}};var up=[()=>new Zu,()=>new Vn,()=>new gn,()=>new ju,()=>new Es,()=>new Hn,()=>new Fu,()=>new qu,()=>new Wu,()=>new pi,()=>new Lu,()=>new _i,()=>new Ss,()=>new Os,()=>new Uu,()=>new Yu,()=>new zu,()=>new Ku,()=>new Ti,()=>new Xu];function Vu(r){for(let e of up){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Ev(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of up){let s=t().parseSortLine(r);if(s)return s}return null}function Sv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of up){let n=t(),s=n.fieldNameSingular();if(r===`group by ${s}`&&n.supportsGrouping())return n.createGrouper()}return null}var Qu=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Ju=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let s=0;s<n;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let s=e[n];if(s!=this.lastHeadingAtLevel[n]){t.push(new Qu(n,s));for(let a=n;a<e.length;a++)this.lastHeadingAtLevel[a]="";this.lastHeadingAtLevel[n]=s}}return t}};var el=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,s]of this.children)e.push(n),s.generateAllPaths(e).forEach((o,l)=>t.set(l,o)),e.pop();return t}};var tl=class extends Map{},rl=class extends el{},nl=class{constructor(e,t){this.groups=new tl;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new rl(t),s=[n];for(let a of e){let o=[];for(let l of s)for(let c of l.values){let f=wn.getGroupNamesForTask(a,c);for(let m of f){let g=l.children.get(m);g===void 0&&(g=new rl([]),l.children.set(m,g),o.push(g)),g.values.push(c)}}s=o}return n}getSortedGroups(){return new tl([...this.groups.entries()].sort())}};var sl=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 il=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new nl(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=`
|
|
|
---
|
|
|
`;return e+=`
|
|
|
${this.totalTasksCount()} tasks
|
|
|
`,e}addTasks(e){let t=new Ju(e.groups);for(let[n,s]of e.groups){let a=t.getHeadingsForTaskGroup(n),o=new sl(n,a,s);this.add(o)}}add(e){this._groups.push(e)}};var Me=class{static fromGroupingProperty(e){return new hi(e,Me.grouperForProperty(e))}static by(e,t){return new il(e,t)}static getGroupNamesForTask(e,t){return e.grouper(t)}static grouperForProperty(e){return Me.groupers[e]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByPriority(e){let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}static groupByRecurrence(e){return e.recurrence!==null?[e.recurrence.toText()]:["None"]}static groupByRecurring(e){return e.recurrence!==null?["Recurring"]:["Not Recurring"]}static groupByCreatedDate(e){return[Me.stringFromDate(e.createdDate,"created")]}static groupByStartDate(e){return[Me.stringFromDate(e.startDate,"start")]}static groupByScheduledDate(e){return[Me.stringFromDate(e.scheduledDate,"scheduled")]}static groupByDueDate(e){return[Me.stringFromDate(e.dueDate,"due")]}static groupByDoneDate(e){return[Me.stringFromDate(e.doneDate,"done")]}static groupByHappensDate(e){let t=new Hn().earliestDate(e);return[Me.stringFromDate(t,"happens")]}static stringFromDate(e,t){return e===null?"No "+t+" date":e.format(Me.groupDateFormat)}static groupByPath(e){return[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}static groupByFolder(e){let t=e.path,n=e.filename+".md",s=t.substring(0,t.lastIndexOf(n));return s===""?["/"]:[Me.escapeMarkdownCharacters(s)]}static groupByFileName(e){let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[Me.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=Me.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let s=Me.groupByHeading(e)[0];return n===s?[n]:[`${n} > ${s}`]}static groupByStatus(e){return e.status.symbol===" "?["Todo"]:["Done"]}static groupByHeading(e){return e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}static groupByTags(e){return e.tags.length==0?["(No tags)"]:e.tags}},wn=Me;wn.groupDateFormat="YYYY-MM-DD dddd",wn.groupers={backlink:Me.groupByBacklink,created:Me.groupByCreatedDate,done:Me.groupByDoneDate,due:Me.groupByDueDate,filename:Me.groupByFileName,folder:Me.groupByFolder,happens:Me.groupByHappensDate,heading:Me.groupByHeading,path:Me.groupByPath,priority:Me.groupByPriority,recurrence:Me.groupByRecurrence,recurring:Me.groupByRecurring,root:Me.groupByRoot,scheduled:Me.groupByScheduledDate,start:Me.groupByStartDate,status:Me.groupByStatus,tags:Me.groupByTags};var Si=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Ba;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|created|done|due|filename|folder|happens|heading|path|priority|recurrence|recurring|root|scheduled|start|status|tags)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(`
|
|
|
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy2({line:t}):break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}explainQuery(){return`Explanation of this Tasks code block query:
|
|
|
|
|
|
`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="",{globalFilter:t}=se();t.length!==0&&(e+=`Only tasks containing the global filter '${t}'.
|
|
|
|
|
|
`);let n=this.filters.length;if(n===0)e+="No filters supplied. All tasks will match the query.";else for(let a=0;a<n;a++)a>0&&(e+=`
|
|
|
`),e+=this.filters[a].explainFilterIndented("");this._limit!==void 0&&(e+=`
|
|
|
|
|
|
At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`.
|
|
|
`);let{debugSettings:s}=se();return s.ignoreSortInstructions&&(e+=`
|
|
|
|
|
|
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}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(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=se(),s=(t.ignoreSortInstructions?e:bi.by(this.sorting,e)).slice(0,this.limit);return wn.by(this.grouping,s)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=Vu(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=Ev(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push(wn.fromGroupingProperty(t[1])):this._error="do not understand query grouping"}parseGroupBy2({line:e}){let t=Sv(e);return t?(this._grouping.push(t),!0):!1}};var al=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 J(this,null,function*(){n.addChild(new lp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},lp=class extends ol.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.events=n,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=new Si({source:a}),this.queryType="tasks";break;default:this.query=new Si({source:a}),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Si({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return J(this,arguments,function*({tasks:t,state:n}){var o;let a=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(a);let l=this.query.applyQueryToTasks(t);for(let f of l.groups){this.addGroupHeadings(a,f.groupHeadings);let{taskList:m}=yield this.createTasksList({tasks:f.tasks,content:a});a.appendChild(m)}let c=l.totalTasksCount();console.debug(`${c} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(a,c)}else this.query.error!==void 0?a.createDiv().innerHTML=`<pre>Tasks query: ${this.query.error.replace(/\n/g,"<br>")}</pre>`:a.setText("Loading Tasks ...");(o=this.containerEl.firstChild)==null||o.replaceWith(a)})}createExplanation(t){let n=this.query.explainQuery(),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTasksList(s){return J(this,arguments,function*({tasks:t,content:n}){let a=t.length,o=new qn(this.query.layoutOptions),l=n.createEl("ul");l.addClasses(["contains-task-list","plugin-tasks-query-result"]),l.addClasses(o.specificClasses);let c=this.getGroupingAttribute();c&&c.length>0&&(l.dataset.taskGroupBy=c);for(let f=0;f<a;f++){let m=t[f],g=this.isFilenameUnique({task:m}),T=yield m.toLi({parentUlElement:l,listIndex:f,layoutOptions:this.query.layoutOptions,isFilenameUnique:g,taskLayout:o});T.querySelectorAll("[data-footnote-id]").forEach(C=>C.remove());let v=this.query.layoutOptions.shortMode,R=T.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(R,m),this.query.layoutOptions.hideBacklinks||this.addBacklinks(R,m,v,g),this.query.layoutOptions.hideEditButton||this.addEditButton(R,m),l.appendChild(T)}return{taskList:l,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Eu({originalTask:n,newTasks:Xt.removeInferredStatusIfNeeded(n,c)})};new Bn({app:this.app,task:n,onSubmit:o}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let s of n)this.addGroupHeading(t,s)}addGroupHeading(t,n){return J(this,null,function*(){let s;n.nestingLevel===0?s=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?s=t.createEl("h5",{cls:"tasks-group-heading"}):s=t.createEl("h6",{cls:"tasks-group-heading"}),yield ol.MarkdownRenderer.renderMarkdown(n.name,s,this.filePath,this)})}addBacklinks(t,n,s,a){var f;let o=t.createSpan({cls:"tasks-backlink"});s||o.append(" (");let l=o.createEl("a");if(l.href=n.path,l.setAttribute("data-href",n.path),l.rel="noopener",l.target="_blank",l.addClass("internal-link"),s&&l.addClass("internal-link-short-mode"),n.precedingHeader!==null){let m=n.precedingHeader.replace(/#/g,"");l.href=l.href+"#"+m,l.setAttribute("data-href",l.getAttribute("data-href")+"#"+m)}let c;s?c=" \u{1F517}":c=(f=n.getLinkText({isFilenameUnique:a}))!=null?f:"",l.setText(c),s||o.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(o=>{if(o.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var Ge=require("obsidian");function Ov(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function Mv(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Rv(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function Pv(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function xv(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function Av(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var Nv=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.</p><p>You can add edit and add your own custom statuses in the section below.</p>"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`<p>You should first <b>select and install a CSS Snippet or Theme</b> to style custom checkboxes.</p><p>Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.</p><p><b>Note</b> Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.</p><p></p><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/statuses/">documentation</a> to get started!</p>`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var Ir=require("obsidian");var xs=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,s,a]=e,o=[];if(o.push(...this.validateType(a)),t===s&&a!=="NON_TASK"&&o.push(`Status symbol '${t}' toggles to itself`),o.length>0)return o;let l=pe.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return xs.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return xs.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=kr[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,s=new Be,a=n==="X"?"x":n,o=s.bySymbol(a);return o.type!=="EMPTY"&&(e.nextStatusSymbol!==o.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${o.nextStatusSymbol}'`),e.type!==o.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${o.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var As=new xs,ur=class extends Ir.Modal{constructor(t,n,s){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=s}statusConfiguration(){return new St(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return J(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new Ir.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(f=>{s=f,f.setValue(this.statusSymbol).onChange(m=>{this.statusSymbol=m,ur.setValid(f,As.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(f=>{ur.setValid(s,As.validateSymbol(this.statusConfiguration()))});let a;new Ir.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(f=>{a=f,f.setValue(this.statusName).onChange(m=>{this.statusName=m,ur.setValid(f,As.validateName(this.statusConfiguration()))})}).then(f=>{ur.setValid(a,As.validateName(this.statusConfiguration()))});let o;new Ir.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(f=>{o=f,f.setValue(this.statusNextSymbol).onChange(m=>{this.statusNextSymbol=m,ur.setValid(f,As.validateNextSymbol(this.statusConfiguration()))})}).then(f=>{ur.setValid(o,As.validateNextSymbol(this.statusConfiguration()))}),new Ir.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(f=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(g=>{f.addOption(g,g)}),f.setValue(this.type).onChange(g=>{this.type=pe.getTypeFromStatusTypeString(g)})}),pe.tasksPluginCanCreateCommandsForStatuses()&&new Ir.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(f=>{f.setValue(this.statusAvailableAsCommand).onChange(m=>J(this,null,function*(){this.statusAvailableAsCommand=m}))});let l=t.createDiv(),c=new Ir.Setting(l);c.addButton(f=>(f.setTooltip("Save").setIcon("checkmark").onClick(()=>J(this,null,function*(){let m=As.validate(this.statusConfiguration());if(m.length>0){let g=m.join(`
|
|
|
`)+`
|
|
|
|
|
|
Fix errors before saving.`;new Ir.Notice(g);return}this.saved=!0,this.close()})),f)),c.addExtraButton(f=>(f.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),f))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?ur.removeValidationError(t):ur.setValidationError(t)}};var Oi=class extends Ge.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return J(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Global filter Settings"}),new Ge.Setting(t).setName("Global task filter").setDesc(Oi.createFragmentWithHTML('<p><b>Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.</b></p><p>Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.<p><p>For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.</br>Other checklist items will remain normal checklist items and not appear in queries or get a done date set.</p><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/global-filter/">documentation</a>.</p>')).addText(s=>{let a=se();s.setPlaceholder("e.g. #task or TODO").setValue(a.globalFilter).onChange(o=>J(this,null,function*(){Gt({globalFilter:o}),yield this.plugin.saveSettings()}))}),new Ge.Setting(t).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(s=>{let a=se();s.setValue(a.removeGlobalFilter).onChange(o=>J(this,null,function*(){Gt({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=se();Nv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new Ge.Setting(t).setName("Set created date on every added task").setDesc("Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.").addToggle(s=>{let a=se();s.setValue(a.setCreatedDate).onChange(o=>J(this,null,function*(){Gt({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new Ge.Setting(t).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(s=>{let a=se();s.setValue(a.setDoneDate).onChange(o=>J(this,null,function*(){Gt({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new Ge.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Oi.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/use-filename-as-default-date/">documentation</a>.</p>')).addToggle(s=>{let a=se();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>J(this,null,function*(){Gt({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new Ge.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(s=>J(this,null,function*(){let a=se();yield this.plugin.saveSettings(),s.setValue(Oi.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>J(this,null,function*(){let l=Oi.parseCommaSeparatedFolders(o);Gt({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Ge.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(s=>{let a=se();s.setValue(a.autoSuggestInEditor).onChange(o=>J(this,null,function*(){Gt({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new Ge.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(s=>{let a=se();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>J(this,null,function*(){Gt({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new Ge.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(s=>{let a=se();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>J(this,null,function*(){Gt({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Ge.Setting(t).setName("Provide access keys in dialogs").setDesc("If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.").addToggle(s=>{let a=se();s.setValue(a.provideAccessKeys).onChange(o=>J(this,null,function*(){Gt({provideAccessKeys:o}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let a=t.createEl("details",{cls:"tasks-nested-settings",attr:Ce({},n.open||s[n.text]?{open:!0}:{})});a.empty(),a.ontoggle=()=>{s[n.text]=a.open,Gt({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new Ge.Setting(o).setHeading().setName(n.text),o.createDiv("collapser").createDiv("handle"),n.notice!==null){let l=a.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&l.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(l=>{if(!(l.featureFlag!==""&&!xb(l.featureFlag))&&(l.type==="checkbox"?new Ge.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let f=se();f.generalSettings[l.settingName]||Ts(l.settingName,l.initialValue),c.setValue(f.generalSettings[l.settingName]).onChange(m=>J(this,null,function*(){Ts(l.settingName,m),yield this.plugin.saveSettings()}))}):l.type==="text"?new Ge.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let f=se();f.generalSettings[l.settingName]||Ts(l.settingName,l.initialValue);let m=g=>J(this,null,function*(){Ts(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,Ge.debounce)(m,500,!0))}):l.type==="textarea"?new Ge.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let f=se();f.generalSettings[l.settingName]||Ts(l.settingName,l.initialValue);let m=g=>J(this,null,function*(){Ts(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,Ge.debounce)(m,500,!0)),c.inputEl.rows=8,c.inputEl.cols=40}):l.type==="function"&&this.customFunctions[l.settingName](a,this),l.notice!==null)){let c=a.createEl("p",{cls:l.notice.class,text:l.notice.text});l.notice.html!==null&&c.insertAdjacentHTML("beforeend",l.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:s}=se();s.coreStatuses.forEach(a=>{Cv(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=se();s.customStatuses.forEach(f=>{Cv(t,f,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new Ge.Setting(t).addButton(f=>{f.setButtonText("Add New Task Status").setCta().onClick(()=>J(this,null,function*(){pt.addStatus(s.customStatuses,new St("","","",!1,"TODO")),yield Mi(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Ov()],["Ebullientworks Theme",Rv()],["ITS Theme & SlRvb Checkboxes",Pv()],["Minimal Theme",xv()],["Things Theme",Av()],["Aura Theme (Dark mode only)",Mv()]];for(let[f,m]of o)new Ge.Setting(t).addButton(T=>{let E=`${f}: Add ${m.length} supported Statuses`;T.setButtonText(E).onClick(()=>J(this,null,function*(){yield yF(m,s,n)}))}).infoEl.remove();new Ge.Setting(t).addButton(f=>{f.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>J(this,null,function*(){let g=this.plugin.getTasks().map(E=>E.status),T=Be.getInstance().findUnknownStatuses(g);T.length!==0&&(T.forEach(E=>{pt.addStatus(s.customStatuses,E)}),yield Mi(s,n))}))}).infoEl.remove(),new Ge.Setting(t).addButton(f=>{f.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>J(this,null,function*(){pt.resetAllCustomStatuses(s),yield Mi(s,n)}))}).infoEl.remove()}},io=Oi;io.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Cv(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new pe(e).previewText();let c=new Ge.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(f=>{f.setIcon("cross").setTooltip("Delete").onClick(()=>J(this,null,function*(){pt.deleteStatus(t,e)&&(yield Mi(n,s))}))}),c.addExtraButton(f=>{f.setIcon("pencil").setTooltip("Edit").onClick(()=>J(this,null,function*(){let m=new ur(a,e,o);m.onClose=()=>J(this,null,function*(){m.saved&&pt.replaceStatus(t,e,m.statusConfiguration())&&(yield Mi(n,s))}),m.open()}))}),c.infoEl.remove()}function yF(r,e,t){return J(this,null,function*(){pt.bulkAddStatusCollection(e,r).forEach(s=>{new Ge.Notice(s)}),yield Mi(e,t)})}function Mi(r,e){return J(this,null,function*(){Gt({statusSettings:r}),pt.applyToStatusRegistry(r,Be.getInstance()),yield e.saveSettings(!0)})}var Iv=require("obsidian");var ul=class extends Iv.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let a=n.getLine(t.line);return a.contains(this.settings.globalFilter)&&a.match(ae.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:a.length},query:a}:null}getSuggestions(t){var o,l,c;let n=t.query,s=t.editor.getCursor();return((c=(l=(o=za()).buildSuggestions)==null?void 0:l.call(o,n,s.ch,this.settings))!=null?c:[]).map(f=>er(Ce({},f),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,f,m;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let g=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(f=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||f.dispatchEvent(g);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(m=t.insertAt)!=null?m:a.ch},l=t.insertSkip?{line:a.line,ch:o.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,o,l),t.context.editor.setCursor({line:a.line,ch:o.ch+t.appendText.length})}};var Fv=(r,e)=>{let t,n=new Promise((o,l)=>{t=o});return e(r,o=>{let l=o.map(c=>c.toFileLineString()).join(`
|
|
|
`);t(l)}).open(),n};var Lv=(r,e)=>{let t=xu({line:"",path:""});return new Bn({app:r,task:t,onSubmit:e})};var Yv=r=>({createTaskLineModal:()=>Fv(r,Lv)});var ll=class extends Uv.Plugin{get apiV1(){return Yv(app)}onload(){return J(this,null,function*(){Du.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new io({plugin:this})),Lb({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Nu({obsidianEvents:this.app.workspace});this.cache=new bs({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new Cu({plugin:this}),this.queryRenderer=new al({plugin:this,events:t}),this.registerEditorExtension(dv()),this.registerEditorSuggest(new ul(this.app,se())),new Au({plugin:this})})}loadTaskStatuses(){return J(this,null,function*(){let{statusSettings:t}=se();pt.applyToStatusRegistry(t,Be.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();Gt(t),yield this.loadTaskStatuses()})}saveSettings(){return J(this,null,function*(){yield this.saveData(se())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}};
|
|
|
/*!
|
|
|
* EventEmitter2
|
|
|
* https://github.com/hij1nx/EventEmitter2
|
|
|
*
|
|
|
* Copyright (c) 2013 hij1nx
|
|
|
* Licensed under the MIT license.
|
|
|
*/
|
|
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
|
//! license : MIT
|
|
|
//! moment.js
|
|
|
//! momentjs.com
|
|
|
//! version : 2.29.4
|